VirtualBox

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

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

Correction

  • Property svn:eol-style set to native
File size: 557.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="5124f7ec-6b67-493c-9dee-ee45a44114e1"
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="Master" value="2">
923 <desc>Fault tolerant master VM.</desc>
924 </const>
925 <const name="Standby" value="3">
926 <desc>Fault tolerant standby 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="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="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="70ddc295-39fb-46e2-a93b-854e123b2b97"
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 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="faultTolerancePassword" type="wstring">
3976 <desc>
3977 The password to check for on the standby VM. This is just a
3978 very basic measure to prevent simple hacks and operators accidentally
3979 choosing the wrong standby VM.
3980 </desc>
3981 </attribute>
3982
3983 <attribute name="faultToleranceSyncInterval" type="unsigned long">
3984 <desc>
3985 The interval in ms used for syncing the state between source and target.
3986 </desc>
3987 </attribute>
3988
3989 <attribute name="RTCUseUTC" type="boolean">
3990 <desc>
3991 When set to @a true, the RTC device of the virtual machine will run
3992 in UTC time, otherwise in local time. Especially Unix guests prefer
3993 the time in UTC.
3994 </desc>
3995 </attribute>
3996
3997 <attribute name="ioCacheEnabled" type="boolean">
3998 <desc>
3999 When set to @a true, the builtin I/O cache of the virtual machine
4000 will be enabled.
4001 </desc>
4002 </attribute>
4003
4004 <attribute name="ioCacheSize" type="unsigned long">
4005 <desc>
4006 Maximum size of the I/O cache in MB.
4007 </desc>
4008 </attribute>
4009
4010 <method name="lockMachine">
4011 <desc>
4012 Locks the machine for the given session to enable the caller
4013 to make changes to the machine or start the VM or control
4014 VM execution.
4015
4016 There are two ways to lock a machine for such uses:
4017
4018 <ul>
4019 <li>If you want to make changes to the machine settings,
4020 you must obtain an exclusive write lock on the machine
4021 by setting @a lockType to @c Write.
4022
4023 This will only succeed if no other process has locked
4024 the machine to prevent conflicting changes. Only after
4025 an exclusive write lock has been obtained using this method, one
4026 can change all VM settings or execute the VM in the process
4027 space of the session object. (Note that the latter is only of
4028 interest if you actually want to write a new front-end for
4029 virtual machines; but this API gets called internally by
4030 the existing front-ends such as VBoxHeadless and the VirtualBox
4031 GUI to acquire a write lock on the machine that they are running.)
4032
4033 On success, write-locking the machine for a session creates
4034 a second copy of the IMachine object. It is this second object
4035 upon which changes can be made; in VirtualBox terminology, the
4036 second copy is "mutable". It is only this second, mutable machine
4037 object upon which you can call methods that change the
4038 machine state. After having called this method, you can
4039 obtain this second, mutable machine object using the
4040 <link to="ISession::machine" /> attribute.
4041 </li>
4042 <li>If you only want to check the machine state or control
4043 machine execution without actually changing machine
4044 settings (e.g. to get access to VM statistics or take
4045 a snapshot or save the machine state), then set the
4046 @a lockType argument to @c Shared.
4047
4048 If no other session has obtained a lock, you will obtain an
4049 exclusive write lock as described above. However, if another
4050 session has already obtained such a lock, then a link to that
4051 existing session will be established which allows you
4052 to control that existing session.
4053
4054 To find out which type of lock was obtained, you can
4055 inspect <link to="ISession::type" />, which will have been
4056 set to either @c WriteLock or @c Shared.
4057 </li>
4058 </ul>
4059
4060 In either case, you can get access to the <link to="IConsole" />
4061 object which controls VM execution.
4062
4063 Also in all of the above cases, one must always call
4064 <link to="ISession::unlockMachine" /> to release the lock on the machine, or
4065 the machine's state will eventually be set to "Aborted".
4066
4067 To change settings on a machine, the following sequence is typically
4068 performed:
4069
4070 <ol>
4071 <li>Call this method to obtain an exclusive write lock for the current session.</li>
4072
4073 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
4074
4075 <li>Change the settings of the machine by invoking IMachine methods.</li>
4076
4077 <li>Call <link to="IMachine::saveSettings" />.</li>
4078
4079 <li>Release the write lock by calling <link to="ISession::unlockMachine"/>.</li>
4080 </ol>
4081
4082 <result name="E_UNEXPECTED">
4083 Virtual machine not registered.
4084 </result>
4085 <result name="E_ACCESSDENIED">
4086 Process not started by OpenRemoteSession.
4087 </result>
4088 <result name="VBOX_E_INVALID_OBJECT_STATE">
4089 Session already open or being opened.
4090 </result>
4091 <result name="VBOX_E_VM_ERROR">
4092 Failed to assign machine to session.
4093 </result>
4094 </desc>
4095 <param name="session" type="ISession" dir="in">
4096 <desc>
4097 Session object for which the machine will be locked.
4098 </desc>
4099 </param>
4100 <param name="lockType" type="LockType" dir="in">
4101 <desc>
4102 If set to @c Write, then attempt to acquire an exclusive write lock or fail.
4103 If set to @c Shared, then either acquire an exclusive write lock or establish
4104 a link to an existing session.
4105 </desc>
4106 </param>
4107 </method>
4108
4109 <method name="launchVMProcess">
4110 <desc>
4111 Spawns a new process that will execute the virtual machine and obtains a shared
4112 lock on the machine for the calling session.
4113
4114 If launching the VM succeeds, the new VM process will create its own session
4115 and write-lock the machine for it, preventing conflicting changes from other
4116 processes. If the machine is already locked (because it is already running or
4117 because another session has a write lock), launching the VM process will therefore
4118 fail. Reversely, future attempts to obtain a write lock will also fail while the
4119 machine is running.
4120
4121 The caller's session object remains separate from the session opened by the new
4122 VM process. It receives its own <link to="IConsole" /> object which can be used
4123 to control machine execution, but it cannot be used to change all VM settings
4124 which would be available after a <link to="#lockMachine" /> call.
4125
4126 The caller must eventually release the session's shared lock by calling
4127 <link to="ISession::unlockMachine" /> on the local session object once this call
4128 has returned. However, the session's state (see <link to="ISession::state" />)
4129 will not return to "Unlocked" until the remote session has also unlocked
4130 the machine (i.e. the machine has stopped running).
4131
4132 Lauching a VM process can take some time (a new VM is started in a new process,
4133 for which memory and other resources need to be set up). Because of this,
4134 an <link to="IProgress" /> object is returned to allow the caller to wait
4135 for this asynchronous operation to be completed. Until then, the caller's
4136 session object remains in the "Unlocked" state, and its <link to="ISession::machine" />
4137 and <link to="ISession::console" /> attributes cannot be accessed.
4138 It is recommended to use <link to="IProgress::waitForCompletion" /> or
4139 similar calls to wait for completion. Completion is signalled when the VM
4140 is powered on. If launching the VM fails, error messages can be queried
4141 via the progress object, if available.
4142
4143 The progress object will have at least 2 sub-operations. The first
4144 operation covers the period up to the new VM process calls powerUp.
4145 The subsequent operations mirror the <link to="IConsole::powerUp"/>
4146 progress object. Because <link to="IConsole::powerUp"/> may require
4147 some extra sub-operations, the <link to="IProgress::operationCount"/>
4148 may change at the completion of operation.
4149
4150 For details on the teleportation progress operation, see
4151 <link to="IConsole::powerUp"/>.
4152
4153 The @a environment argument is a string containing definitions of
4154 environment variables in the following format:
4155 @code
4156 NAME[=VALUE]\n
4157 NAME[=VALUE]\n
4158 ...
4159 @endcode
4160 where <tt>\\n</tt> is the new line character. These environment
4161 variables will be appended to the environment of the VirtualBox server
4162 process. If an environment variable exists both in the server process
4163 and in this list, the value from this list takes precedence over the
4164 server's variable. If the value of the environment variable is
4165 omitted, this variable will be removed from the resulting environment.
4166 If the environment string is @c null or empty, the server environment
4167 is inherited by the started process as is.
4168
4169 <result name="E_UNEXPECTED">
4170 Virtual machine not registered.
4171 </result>
4172 <result name="E_INVALIDARG">
4173 Invalid session type @a type.
4174 </result>
4175 <result name="VBOX_E_OBJECT_NOT_FOUND">
4176 No machine matching @a machineId found.
4177 </result>
4178 <result name="VBOX_E_INVALID_OBJECT_STATE">
4179 Session already open or being opened.
4180 </result>
4181 <result name="VBOX_E_IPRT_ERROR">
4182 Launching process for machine failed.
4183 </result>
4184 <result name="VBOX_E_VM_ERROR">
4185 Failed to assign machine to session.
4186 </result>
4187 </desc>
4188 <param name="session" type="ISession" dir="in">
4189 <desc>
4190 Client session object to which the VM process will be connected (this
4191 must be in "Unlocked" state).
4192 </desc>
4193 </param>
4194 <param name="type" type="wstring" dir="in">
4195 <desc>
4196 Front-end to use for the new VM process. The following are currently supported:
4197 <ul>
4198 <li><tt>"gui"</tt>: VirtualBox Qt GUI front-end</li>
4199 <li><tt>"vrdp"</tt>: VBoxHeadless (VRDP Server) front-end</li>
4200 <li><tt>"sdl"</tt>: VirtualBox SDL front-end</li>
4201 </ul>
4202 </desc>
4203 </param>
4204 <param name="environment" type="wstring" dir="in">
4205 <desc>
4206 Environment to pass to the VM process.
4207 </desc>
4208 </param>
4209 <param name="progress" type="IProgress" dir="return">
4210 <desc>Progress object to track the operation completion.</desc>
4211 </param>
4212 </method>
4213
4214 <method name="setBootOrder">
4215 <desc>
4216 Puts the given device to the specified position in
4217 the boot order.
4218
4219 To indicate that no device is associated with the given position,
4220 <link to="DeviceType::Null"/> should be used.
4221
4222 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4223
4224 <result name="E_INVALIDARG">
4225 Boot @a position out of range.
4226 </result>
4227 <result name="E_NOTIMPL">
4228 Booting from USB @a device currently not supported.
4229 </result>
4230
4231 </desc>
4232 <param name="position" type="unsigned long" dir="in">
4233 <desc>
4234 Position in the boot order (@c 1 to the total number of
4235 devices the machine can boot from, as returned by
4236 <link to="ISystemProperties::maxBootPosition"/>).
4237 </desc>
4238 </param>
4239 <param name="device" type="DeviceType" dir="in">
4240 <desc>
4241 The type of the device used to boot at the given position.
4242 </desc>
4243 </param>
4244 </method>
4245
4246 <method name="getBootOrder" const="yes">
4247 <desc>
4248 Returns the device type that occupies the specified
4249 position in the boot order.
4250
4251 @todo [remove?]
4252 If the machine can have more than one device of the returned type
4253 (such as hard disks), then a separate method should be used to
4254 retrieve the individual device that occupies the given position.
4255
4256 If here are no devices at the given position, then
4257 <link to="DeviceType::Null"/> is returned.
4258
4259 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4260
4261 <result name="E_INVALIDARG">
4262 Boot @a position out of range.
4263 </result>
4264
4265 </desc>
4266 <param name="position" type="unsigned long" dir="in">
4267 <desc>
4268 Position in the boot order (@c 1 to the total number of
4269 devices the machine can boot from, as returned by
4270 <link to="ISystemProperties::maxBootPosition"/>).
4271 </desc>
4272 </param>
4273 <param name="device" type="DeviceType" dir="return">
4274 <desc>
4275 Device at the given position.
4276 </desc>
4277 </param>
4278 </method>
4279
4280 <method name="attachDevice">
4281 <desc>
4282 Attaches a device and optionally mounts a medium to the given storage
4283 controller (<link to="IStorageController" />, identified by @a name),
4284 at the indicated port and device.
4285
4286 This method is intended for managing storage devices in general while a
4287 machine is powered off. It can be used to attach and detach fixed
4288 and removeable media. The following kind of media can be attached
4289 to a machine:
4290
4291 <ul>
4292 <li>For fixed and removable media, you can pass in a medium that was
4293 previously opened using <link to="IVirtualBox::openMedium" />.
4294 </li>
4295
4296 <li>Only for storage devices supporting removable media (such as
4297 DVDs and floppies), you can also specify a null pointer to
4298 indicate an empty drive or one of the medium objects listed
4299 in the <link to="IHost::DVDDrives" /> and <link to="IHost::floppyDrives"/>
4300 arrays to indicate a host drive.
4301 For removeable devices, you can also use <link to="IMachine::mountMedium"/>
4302 to change the media while the machine is running.
4303 </li>
4304 </ul>
4305
4306 In a VM's default configuration of virtual machines, the secondary
4307 master of the IDE controller is used for a CD/DVD drive.
4308
4309 After calling this returns successfully, a new instance of
4310 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4311 attachments (see <link to="IMachine::mediumAttachments"/>).
4312
4313 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4314 information about attaching media.
4315
4316 The specified device slot must not have a device attached to it,
4317 or this method will fail.
4318
4319 <note>
4320 You cannot attach a device to a newly created machine until
4321 this machine's settings are saved to disk using
4322 <link to="#saveSettings"/>.
4323 </note>
4324 <note>
4325 If the medium is being attached indirectly, a new differencing medium
4326 will implicitly be created for it and attached instead. If the
4327 changes made to the machine settings (including this indirect
4328 attachment) are later cancelled using <link to="#discardSettings"/>,
4329 this implicitly created differencing medium will implicitly
4330 be deleted.
4331 </note>
4332
4333 <result name="E_INVALIDARG">
4334 SATA device, SATA port, IDE port or IDE slot out of range, or
4335 file or UUID not found.
4336 </result>
4337 <result name="VBOX_E_INVALID_OBJECT_STATE">
4338 Machine must be registered before media can be attached.
4339 </result>
4340 <result name="VBOX_E_INVALID_VM_STATE">
4341 Invalid machine state.
4342 </result>
4343 <result name="VBOX_E_OBJECT_IN_USE">
4344 A medium is already attached to this or another virtual machine.
4345 </result>
4346
4347 </desc>
4348 <param name="name" type="wstring" dir="in">
4349 <desc>Name of the storage controller to attach the device to.</desc>
4350 </param>
4351 <param name="controllerPort" type="long" dir="in">
4352 <desc>Port to attach the device to. For an IDE controller, 0 specifies
4353 the primary controller and 1 specifies the secondary controller.
4354 For a SCSI controller, this must range from 0 to 15; for a SATA controller,
4355 from 0 to 29; for an SAS controller, from 0 to 7.</desc>
4356 </param>
4357 <param name="device" type="long" dir="in">
4358 <desc>Device slot in the given port to attach the device to. This is only
4359 relevant for IDE controllers, for which 0 specifies the master device and
4360 1 specifies the slave device. For all other controller types, this must
4361 be 0.</desc>
4362 </param>
4363 <param name="type" type="DeviceType" dir="in">
4364 <desc>Device type of the attached device. For media opened by
4365 <link to="IVirtualBox::openMedium" />, this must match the device type
4366 specified there.</desc>
4367 </param>
4368 <param name="medium" type="IMedium" dir="in">
4369 <desc>Medium to mount or NULL for an empty drive.</desc>
4370 </param>
4371 </method>
4372
4373 <method name="detachDevice">
4374 <desc>
4375 Detaches the device attached to a device slot of the specified bus.
4376
4377 Detaching the device from the virtual machine is deferred. This means
4378 that the medium remains associated with the machine when this method
4379 returns and gets actually de-associated only after a successful
4380 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4381 for more detailed information about attaching media.
4382
4383 <note>
4384 You cannot detach a device from a running machine.
4385 </note>
4386 <note>
4387 Detaching differencing media implicitly created by <link
4388 to="#attachDevice"/> for the indirect attachment using this
4389 method will <b>not</b> implicitly delete them. The
4390 <link to="IMedium::deleteStorage"/> operation should be
4391 explicitly performed by the caller after the medium is successfully
4392 detached and the settings are saved with
4393 <link to="#saveSettings"/>, if it is the desired action.
4394 </note>
4395
4396 <result name="VBOX_E_INVALID_VM_STATE">
4397 Attempt to detach medium from a running virtual machine.
4398 </result>
4399 <result name="VBOX_E_OBJECT_NOT_FOUND">
4400 No medium attached to given slot/bus.
4401 </result>
4402 <result name="VBOX_E_NOT_SUPPORTED">
4403 Medium format does not support storage deletion.
4404 </result>
4405
4406 </desc>
4407 <param name="name" type="wstring" dir="in">
4408 <desc>Name of the storage controller to detach the medium from.</desc>
4409 </param>
4410 <param name="controllerPort" type="long" dir="in">
4411 <desc>Port number to detach the medium from.</desc>
4412 </param>
4413 <param name="device" type="long" dir="in">
4414 <desc>Device slot number to detach the medium from.</desc>
4415 </param>
4416 </method>
4417
4418 <method name="passthroughDevice">
4419 <desc>
4420 Sets the passthrough mode of an existing DVD device. Changing the
4421 setting while the VM is running is forbidden. The setting is only used
4422 if at VM start the device is configured as a host DVD drive, in all
4423 other cases it is ignored. The device must already exist; see
4424 <link to="IMachine::attachDevice"/> for how to attach a new device.
4425
4426 The @a controllerPort and @a device parameters specify the device slot and
4427 have have the same meaning as with <link to="IMachine::attachDevice" />.
4428
4429 <result name="E_INVALIDARG">
4430 SATA device, SATA port, IDE port or IDE slot out of range.
4431 </result>
4432 <result name="VBOX_E_INVALID_OBJECT_STATE">
4433 Attempt to modify an unregistered virtual machine.
4434 </result>
4435 <result name="VBOX_E_INVALID_VM_STATE">
4436 Invalid machine state.
4437 </result>
4438
4439 </desc>
4440 <param name="name" type="wstring" dir="in">
4441 <desc>Name of the storage controller.</desc>
4442 </param>
4443 <param name="controllerPort" type="long" dir="in">
4444 <desc>Storage controller port.</desc>
4445 </param>
4446 <param name="device" type="long" dir="in">
4447 <desc>Device slot in the given port.</desc>
4448 </param>
4449 <param name="passthrough" type="boolean" dir="in">
4450 <desc>New value for the passthrough setting.</desc>
4451 </param>
4452 </method>
4453
4454 <method name="mountMedium">
4455 <desc>
4456 Mounts a medium (<link to="IMedium" />, identified
4457 by the given UUID @a id) to the given storage controller
4458 (<link to="IStorageController" />, identified by @a name),
4459 at the indicated port and device. The device must already exist;
4460 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4461
4462 This method is intended only for managing removable media, where the
4463 device is fixed but media is changeable at runtime (such as DVDs
4464 and floppies). It cannot be used for fixed media such as hard disks.
4465
4466 The @a controllerPort and @a device parameters specify the device slot and
4467 have have the same meaning as with <link to="IMachine::attachDevice" />.
4468
4469 The specified device slot can have a medium mounted, which will be
4470 unmounted first. Specifying a zero UUID (or an empty string) for
4471 @a medium does just an unmount.
4472
4473 See <link to="IMedium"/> for more detailed information about
4474 attaching media.
4475
4476 <result name="E_INVALIDARG">
4477 SATA device, SATA port, IDE port or IDE slot out of range.
4478 </result>
4479 <result name="VBOX_E_INVALID_OBJECT_STATE">
4480 Attempt to attach medium to an unregistered virtual machine.
4481 </result>
4482 <result name="VBOX_E_INVALID_VM_STATE">
4483 Invalid machine state.
4484 </result>
4485 <result name="VBOX_E_OBJECT_IN_USE">
4486 Medium already attached to this or another virtual machine.
4487 </result>
4488
4489 </desc>
4490 <param name="name" type="wstring" dir="in">
4491 <desc>Name of the storage controller to attach the medium to.</desc>
4492 </param>
4493 <param name="controllerPort" type="long" dir="in">
4494 <desc>Port to attach the medium to.</desc>
4495 </param>
4496 <param name="device" type="long" dir="in">
4497 <desc>Device slot in the given port to attach the medium to.</desc>
4498 </param>
4499 <param name="medium" type="uuid" mod="string" dir="in">
4500 <desc>UUID of the medium to attach. A zero UUID means unmount the
4501 currently mounted medium.</desc>
4502 </param>
4503 <param name="force" type="boolean" dir="in">
4504 <desc>Allows to force unmount/mount of a medium which is locked by
4505 theDevice slot in the given port to attach the medium to.</desc>
4506 </param>
4507 </method>
4508
4509 <method name="getMedium" const="yes">
4510 <desc>
4511 Returns the virtual medium attached to a device slot of the specified
4512 bus.
4513
4514 Note that if the medium was indirectly attached by
4515 <link to="#mountMedium"/> to the given device slot then this
4516 method will return not the same object as passed to the
4517 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4518 more detailed information about mounting a medium.
4519
4520 <result name="VBOX_E_OBJECT_NOT_FOUND">
4521 No medium attached to given slot/bus.
4522 </result>
4523
4524 </desc>
4525 <param name="name" type="wstring" dir="in">
4526 <desc>Name of the storage controller the medium is attached to.</desc>
4527 </param>
4528 <param name="controllerPort" type="long" dir="in">
4529 <desc>Port to query.</desc>
4530 </param>
4531 <param name="device" type="long" dir="in">
4532 <desc>Device slot in the given port to query.</desc>
4533 </param>
4534 <param name="medium" type="IMedium" dir="return">
4535 <desc>Attached medium object.</desc>
4536 </param>
4537 </method>
4538
4539 <method name="getMediumAttachmentsOfController" const="yes">
4540 <desc>
4541 Returns an array of medium attachments which are attached to the
4542 the controller with the given name.
4543
4544 <result name="VBOX_E_OBJECT_NOT_FOUND">
4545 A storage controller with given name doesn't exist.
4546 </result>
4547 </desc>
4548 <param name="name" type="wstring" dir="in"/>
4549 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4550 </method>
4551
4552 <method name="getMediumAttachment" const="yes">
4553 <desc>
4554 Returns a medium attachment which corresponds to the controller with
4555 the given name, on the given port and device slot.
4556
4557 <result name="VBOX_E_OBJECT_NOT_FOUND">
4558 No attachment exists for the given controller/port/device combination.
4559 </result>
4560 </desc>
4561 <param name="name" type="wstring" dir="in"/>
4562 <param name="controllerPort" type="long" dir="in"/>
4563 <param name="device" type="long" dir="in"/>
4564 <param name="attachment" type="IMediumAttachment" dir="return"/>
4565 </method>
4566
4567 <method name="getNetworkAdapter" const="yes">
4568 <desc>
4569 Returns the network adapter associated with the given slot.
4570 Slots are numbered sequentially, starting with zero. The total
4571 number of adapters per machine is defined by the
4572 <link to="ISystemProperties::networkAdapterCount"/> property,
4573 so the maximum slot number is one less than that property's value.
4574
4575 <result name="E_INVALIDARG">
4576 Invalid @a slot number.
4577 </result>
4578
4579 </desc>
4580 <param name="slot" type="unsigned long" dir="in"/>
4581 <param name="adapter" type="INetworkAdapter" dir="return"/>
4582 </method>
4583
4584 <method name="addStorageController">
4585 <desc>
4586 Adds a new storage controller (SCSI, SAS or SATA controller) to the
4587 machine and returns it as an instance of
4588 <link to="IStorageController" />.
4589
4590 @a name identifies the controller for subsequent calls such as
4591 <link to="#getStorageControllerByName" />,
4592 <link to="#getStorageControllerByInstance" />,
4593 <link to="#removeStorageController" />,
4594 <link to="#attachDevice" /> or <link to="#mountMedium" />.
4595
4596 After the controller has been added, you can set its exact
4597 type by setting the <link to="IStorageController::controllerType" />.
4598
4599 <result name="VBOX_E_OBJECT_IN_USE">
4600 A storage controller with given name exists already.
4601 </result>
4602 <result name="E_INVALIDARG">
4603 Invalid @a controllerType.
4604 </result>
4605 </desc>
4606 <param name="name" type="wstring" dir="in"/>
4607 <param name="connectionType" type="StorageBus" dir="in"/>
4608 <param name="controller" type="IStorageController" dir="return"/>
4609 </method>
4610
4611 <method name="getStorageControllerByName" const="yes">
4612 <desc>
4613 Returns a storage controller with the given name.
4614
4615 <result name="VBOX_E_OBJECT_NOT_FOUND">
4616 A storage controller with given name doesn't exist.
4617 </result>
4618 </desc>
4619 <param name="name" type="wstring" dir="in"/>
4620 <param name="storageController" type="IStorageController" dir="return"/>
4621 </method>
4622
4623 <method name="getStorageControllerByInstance" const="yes">
4624 <desc>
4625 Returns a storage controller with the given instance number.
4626
4627 <result name="VBOX_E_OBJECT_NOT_FOUND">
4628 A storage controller with given instance number doesn't exist.
4629 </result>
4630 </desc>
4631 <param name="instance" type="unsigned long" dir="in"/>
4632 <param name="storageController" type="IStorageController" dir="return"/>
4633 </method>
4634
4635 <method name="removeStorageController">
4636 <desc>
4637 Removes a storage controller from the machine.
4638
4639 <result name="VBOX_E_OBJECT_NOT_FOUND">
4640 A storage controller with given name doesn't exist.
4641 </result>
4642 </desc>
4643 <param name="name" type="wstring" dir="in"/>
4644 </method>
4645
4646 <method name="getSerialPort" const="yes">
4647 <desc>
4648 Returns the serial port associated with the given slot.
4649 Slots are numbered sequentially, starting with zero. The total
4650 number of serial ports per machine is defined by the
4651 <link to="ISystemProperties::serialPortCount"/> property,
4652 so the maximum slot number is one less than that property's value.
4653
4654 <result name="E_INVALIDARG">
4655 Invalid @a slot number.
4656 </result>
4657
4658 </desc>
4659 <param name="slot" type="unsigned long" dir="in"/>
4660 <param name="port" type="ISerialPort" dir="return"/>
4661 </method>
4662
4663 <method name="getParallelPort" const="yes">
4664 <desc>
4665 Returns the parallel port associated with the given slot.
4666 Slots are numbered sequentially, starting with zero. The total
4667 number of parallel ports per machine is defined by the
4668 <link to="ISystemProperties::parallelPortCount"/> property,
4669 so the maximum slot number is one less than that property's value.
4670
4671 <result name="E_INVALIDARG">
4672 Invalid @a slot number.
4673 </result>
4674
4675 </desc>
4676 <param name="slot" type="unsigned long" dir="in"/>
4677 <param name="port" type="IParallelPort" dir="return"/>
4678 </method>
4679
4680 <method name="getExtraDataKeys">
4681 <desc>
4682 Returns an array representing the machine-specific extra data keys
4683 which currently have values defined.
4684 </desc>
4685 <param name="value" type="wstring" dir="return" safearray="yes">
4686 <desc>Array of extra data keys.</desc>
4687 </param>
4688 </method>
4689
4690 <method name="getExtraData">
4691 <desc>
4692 Returns associated machine-specific extra data.
4693
4694 If the requested data @a key does not exist, this function will
4695 succeed and return an empty string in the @a value argument.
4696
4697 <result name="VBOX_E_FILE_ERROR">
4698 Settings file not accessible.
4699 </result>
4700 <result name="VBOX_E_XML_ERROR">
4701 Could not parse the settings file.
4702 </result>
4703
4704 </desc>
4705 <param name="key" type="wstring" dir="in">
4706 <desc>Name of the data key to get.</desc>
4707 </param>
4708 <param name="value" type="wstring" dir="return">
4709 <desc>Value of the requested data key.</desc>
4710 </param>
4711 </method>
4712
4713 <method name="setExtraData">
4714 <desc>
4715 Sets associated machine-specific extra data.
4716
4717 If you pass @c null or an empty string as a key @a value, the given
4718 @a key will be deleted.
4719
4720 <note>
4721 Before performing the actual data change, this method will ask all
4722 registered listeners using the
4723 <link to="IExtraDataCanChangeEvent"/>
4724 notification for a permission. If one of the listeners refuses the
4725 new value, the change will not be performed.
4726 </note>
4727 <note>
4728 On success, the
4729 <link to="IExtraDataChangedEvent"/> notification
4730 is called to inform all registered listeners about a successful data
4731 change.
4732 </note>
4733 <note>
4734 This method can be called outside the machine session and therefore
4735 it's a caller's responsibility to handle possible race conditions
4736 when several clients change the same key at the same time.
4737 </note>
4738
4739 <result name="VBOX_E_FILE_ERROR">
4740 Settings file not accessible.
4741 </result>
4742 <result name="VBOX_E_XML_ERROR">
4743 Could not parse the settings file.
4744 </result>
4745
4746 </desc>
4747 <param name="key" type="wstring" dir="in">
4748 <desc>Name of the data key to set.</desc>
4749 </param>
4750 <param name="value" type="wstring" dir="in">
4751 <desc>Value to assign to the key.</desc>
4752 </param>
4753 </method>
4754
4755 <method name="getCPUProperty" const="yes">
4756 <desc>
4757 Returns the virtual CPU boolean value of the specified property.
4758
4759 <result name="E_INVALIDARG">
4760 Invalid property.
4761 </result>
4762
4763 </desc>
4764 <param name="property" type="CPUPropertyType" dir="in">
4765 <desc>
4766 Property type to query.
4767 </desc>
4768 </param>
4769 <param name="value" type="boolean" dir="return">
4770 <desc>
4771 Property value.
4772 </desc>
4773 </param>
4774 </method>
4775
4776 <method name="setCPUProperty">
4777 <desc>
4778 Sets the virtual CPU boolean value of the specified property.
4779
4780 <result name="E_INVALIDARG">
4781 Invalid property.
4782 </result>
4783
4784 </desc>
4785 <param name="property" type="CPUPropertyType" dir="in">
4786 <desc>
4787 Property type to query.
4788 </desc>
4789 </param>
4790 <param name="value" type="boolean" dir="in">
4791 <desc>
4792 Property value.
4793 </desc>
4794 </param>
4795 </method>
4796
4797 <method name="getCPUIDLeaf" const="yes">
4798 <desc>
4799 Returns the virtual CPU cpuid information for the specified leaf.
4800
4801 Currently supported index values for cpuid:
4802 Standard CPUID leafs: 0 - 0xA
4803 Extended CPUID leafs: 0x80000000 - 0x8000000A
4804
4805 See the Intel and AMD programmer's manuals for detailed information
4806 about the cpuid instruction and its leafs.
4807 <result name="E_INVALIDARG">
4808 Invalid id.
4809 </result>
4810
4811 </desc>
4812 <param name="id" type="unsigned long" dir="in">
4813 <desc>
4814 CPUID leaf index.
4815 </desc>
4816 </param>
4817 <param name="valEax" type="unsigned long" dir="out">
4818 <desc>
4819 CPUID leaf value for register eax.
4820 </desc>
4821 </param>
4822 <param name="valEbx" type="unsigned long" dir="out">
4823 <desc>
4824 CPUID leaf value for register ebx.
4825 </desc>
4826 </param>
4827 <param name="valEcx" type="unsigned long" dir="out">
4828 <desc>
4829 CPUID leaf value for register ecx.
4830 </desc>
4831 </param>
4832 <param name="valEdx" type="unsigned long" dir="out">
4833 <desc>
4834 CPUID leaf value for register edx.
4835 </desc>
4836 </param>
4837 </method>
4838
4839 <method name="setCPUIDLeaf">
4840 <desc>
4841 Sets the virtual CPU cpuid information for the specified leaf. Note that these values
4842 are not passed unmodified. VirtualBox clears features that it doesn't support.
4843
4844 Currently supported index values for cpuid:
4845 Standard CPUID leafs: 0 - 0xA
4846 Extended CPUID leafs: 0x80000000 - 0x8000000A
4847
4848 See the Intel and AMD programmer's manuals for detailed information
4849 about the cpuid instruction and its leafs.
4850
4851 Do not use this method unless you know exactly what you're doing. Misuse can lead to
4852 random crashes inside VMs.
4853 <result name="E_INVALIDARG">
4854 Invalid id.
4855 </result>
4856
4857 </desc>
4858 <param name="id" type="unsigned long" dir="in">
4859 <desc>
4860 CPUID leaf index.
4861 </desc>
4862 </param>
4863 <param name="valEax" type="unsigned long" dir="in">
4864 <desc>
4865 CPUID leaf value for register eax.
4866 </desc>
4867 </param>
4868 <param name="valEbx" type="unsigned long" dir="in">
4869 <desc>
4870 CPUID leaf value for register ebx.
4871 </desc>
4872 </param>
4873 <param name="valEcx" type="unsigned long" dir="in">
4874 <desc>
4875 CPUID leaf value for register ecx.
4876 </desc>
4877 </param>
4878 <param name="valEdx" type="unsigned long" dir="in">
4879 <desc>
4880 CPUID leaf value for register edx.
4881 </desc>
4882 </param>
4883 </method>
4884
4885 <method name="removeCPUIDLeaf">
4886 <desc>
4887 Removes the virtual CPU cpuid leaf for the specified index
4888
4889 <result name="E_INVALIDARG">
4890 Invalid id.
4891 </result>
4892
4893 </desc>
4894 <param name="id" type="unsigned long" dir="in">
4895 <desc>
4896 CPUID leaf index.
4897 </desc>
4898 </param>
4899 </method>
4900
4901 <method name="removeAllCPUIDLeaves">
4902 <desc>
4903 Removes all the virtual CPU cpuid leaves
4904 </desc>
4905 </method>
4906
4907 <method name="getHWVirtExProperty" const="yes">
4908 <desc>
4909 Returns the value of the specified hardware virtualization boolean property.
4910
4911 <result name="E_INVALIDARG">
4912 Invalid property.
4913 </result>
4914
4915 </desc>
4916 <param name="property" type="HWVirtExPropertyType" dir="in">
4917 <desc>
4918 Property type to query.
4919 </desc>
4920 </param>
4921 <param name="value" type="boolean" dir="return">
4922 <desc>
4923 Property value.
4924 </desc>
4925 </param>
4926 </method>
4927
4928 <method name="setHWVirtExProperty">
4929 <desc>
4930 Sets a new value for the specified hardware virtualization boolean property.
4931
4932 <result name="E_INVALIDARG">
4933 Invalid property.
4934 </result>
4935
4936 </desc>
4937 <param name="property" type="HWVirtExPropertyType" dir="in">
4938 <desc>
4939 Property type to set.
4940 </desc>
4941 </param>
4942 <param name="value" type="boolean" dir="in">
4943 <desc>
4944 New property value.
4945 </desc>
4946 </param>
4947 </method>
4948
4949 <method name="saveSettings">
4950 <desc>
4951 Saves any changes to machine settings made since the session
4952 has been opened or a new machine has been created, or since the
4953 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
4954 For registered machines, new settings become visible to all
4955 other VirtualBox clients after successful invocation of this
4956 method.
4957 <note>
4958 The method sends <link to="IMachineDataChangedEvent"/>
4959 notification event after the configuration has been successfully
4960 saved (only for registered machines).
4961 </note>
4962 <note>
4963 Calling this method is only valid on instances returned
4964 by <link to="ISession::machine"/> and on new machines
4965 created by <link to="IVirtualBox::createMachine"/> but not
4966 yet registered, or on unregistered machines after calling
4967 <link to="IMachine::unregister"/>.
4968 </note>
4969
4970 <result name="VBOX_E_FILE_ERROR">
4971 Settings file not accessible.
4972 </result>
4973 <result name="VBOX_E_XML_ERROR">
4974 Could not parse the settings file.
4975 </result>
4976 <result name="E_ACCESSDENIED">
4977 Modification request refused.
4978 </result>
4979
4980 </desc>
4981 </method>
4982
4983 <method name="discardSettings">
4984 <desc>
4985 Discards any changes to the machine settings made since the session
4986 has been opened or since the last call to <link to="#saveSettings"/>
4987 or <link to="#discardSettings"/>.
4988 <note>
4989 Calling this method is only valid on instances returned
4990 by <link to="ISession::machine"/> and on new machines
4991 created by <link to="IVirtualBox::createMachine"/> or
4992 opened by <link to="IVirtualBox::openMachine"/> but not
4993 yet registered, or on unregistered machines after calling
4994 <link to="IMachine::unregister"/>.
4995 </note>
4996
4997 <result name="VBOX_E_INVALID_VM_STATE">
4998 Virtual machine is not mutable.
4999 </result>
5000
5001 </desc>
5002 </method>
5003
5004 <method name="unregister">
5005 <desc>
5006 Unregisters the machine, which must have been previously registered using
5007 <link to="IVirtualBox::registerMachine"/>, and optionally do additional
5008 cleanup before the machine is unregistered.
5009
5010 This method does not delete any files. It only changes the machine configuration and
5011 the list of registered machines in the VirtualBox object. To delete the files which
5012 belonged to the machine, including the XML file of the machine itself, call
5013 <link to="#delete"/>, optionally with the array of IMedium objects which was returned
5014 from this method.
5015
5016 How thoroughly this method cleans up the machine configuration before unregistering
5017 the machine depends on the @a cleanupMode argument.
5018
5019 <ul>
5020 <li>With "UnregisterOnly", the machine will only be unregistered, but no additional
5021 cleanup will be performed. The call will fail if the machine is in "Saved" state
5022 or has any snapshots or any media attached (see <link to="IMediumAttachment" />.
5023 It is the responsibility of the caller to delete all such configuration in this mode.
5024 In this mode, the API behaves like the former @c IVirtualBox::unregisterMachine() API
5025 which it replaces.</li>
5026 <li>With "DetachAllReturnNone", the call will succeed even if the machine is in "Saved"
5027 state or if it has snapshots or media attached. All media attached to the current machine
5028 state or in snapshots will be detached. No medium objects will be returned; all of the
5029 machine's media will remain open.</li>
5030 <li>With "DetachAllReturnHardDisksOnly", the call will behave like with "DetachAllReturnNone",
5031 except that all the hard disk medium objects which were detached from the machine will
5032 be returned as an array. This allows for quickly passing them to the <link to="#delete" />
5033 API for closing and deletion.</li>
5034 <li>With "Full", the call will behave like with "DetachAllReturnHardDisksOnly", except
5035 that all media will be returned in the array, including removeable media like DVDs and
5036 floppies. This might be useful if the user wants to inspect in detail which media were
5037 attached to the machine. Be careful when passing the media array to <link to="#delete" />
5038 in that case because users will typically want to preserve ISO and RAW image files.</li>
5039 </ul>
5040
5041 This API does not verify whether the media files returned in the array are still
5042 attached to other machines (i.e. shared between several machines). If such a shared
5043 image is passed to <link to="#delete" /> however, closing the image will fail there
5044 and the image will be silently skipped.
5045
5046 A typical implementation will use "DetachAllReturnHardDisksOnly" and then pass the
5047 resulting IMedia array to <link to="#delete"/>. This way, the machine is completely
5048 deleted with all its saved states and hard disk images, but images for removeable
5049 drives (such as ISO and RAW files) will remain on disk.
5050
5051 The call will fail if the machine is currently locked (see <link to="ISession" />).
5052 It implicitly calls <link to="#saveSettings"/> to save all current machine settings
5053 before unregistering it.
5054
5055 After successful method invocation, the <link to="IMachineRegisteredEvent"/> event
5056 is fired.
5057
5058 <note>
5059 If the given machine is inaccessible (see <link to="#accessible"/>), it
5060 will be unregistered and fully uninitialized right afterwards. As a result,
5061 the returned machine object will be unusable and an attempt to call
5062 <b>any</b> method will return the "Object not ready" error.
5063 </note>
5064
5065 <result name="VBOX_E_INVALID_OBJECT_STATE">
5066 Machine is currently locked for a session.
5067 </result>
5068 </desc>
5069
5070 <param name="cleanupMode" type="CleanupMode" dir="in">
5071 <desc>How to clean up after the machine has been unregistered.</desc>
5072 </param>
5073 <param name="aMedia" type="IMedium" safearray="yes" dir="return">
5074 <desc>List of media detached from the machine, depending on the @a cleanupMode parameter.</desc>
5075 </param>
5076 </method>
5077
5078 <method name="delete">
5079 <desc>
5080 Deletes the files associated with this machine from disk. If medium objects are passed
5081 in with the @a aMedia argument, they are closed and, if closing was succesful, their
5082 storage files are deleted as well. For convenience, this array of media files can be
5083 the same as the one returned from a previous <link to="#unregister" /> call.
5084
5085 This method must only be called on machines which are either write-locked (i.e. on instances
5086 returned by <link to="ISession::machine"/>) or on unregistered machines (i.e. not yet
5087 registered machines created by <link to="IVirtualBox::createMachine"/> or opened by
5088 <link to="IVirtualBox::openMachine"/>, or after having called <link to="#unregister"/>).
5089
5090 The following files will be deleted by this method:
5091 <ul>
5092 <li>If <link to="#unregister" /> had been previously called with a @a cleanupMode
5093 argument other than "UnregisterOnly", this will delete all saved state files that
5094 the machine had in use; possibly one if the machine was in "Saved" state and one
5095 for each online snapshot that the machine had.</li>
5096 <li>On each medium object passed in the @a aMedia array, this will call
5097 <link to="IMedium::close" />. If that succeeds, this will attempt to delete the
5098 medium's storage on disk. Since the close() call will fail if the medium is still
5099 in use, e.g. because it is still attached to a second machine; in that case the
5100 storage will not be deleted.</li>
5101 <li>Finally, the machine's own XML file will be deleted.</li>
5102 </ul>
5103
5104 Since deleting large disk image files can be a time-consuming I/O operation, this
5105 method operates asynchronously and returns an IProgress object to allow the caller
5106 to monitor the progress. There will be one sub-operation for each file that is
5107 being deleted (saved state or medium storage file).
5108
5109 <note>
5110 <link to="#settingsModified"/> will return @c true after this
5111 method successfully returns.
5112 </note>
5113
5114 <result name="VBOX_E_INVALID_VM_STATE">
5115 Machine is registered but not write-locked.
5116 </result>
5117 <result name="VBOX_E_IPRT_ERROR">
5118 Could not delete the settings file.
5119 </result>
5120 </desc>
5121 <param name="aMedia" type="IMedium" safearray="yes" dir="in">
5122 <desc>List of media to be closed and whose storage files will be deleted.</desc>
5123 </param>
5124 <param name="aProgress" type="IProgress" dir="return">
5125 <desc>Progress object to track the operation completion.</desc>
5126 </param>
5127 </method>
5128
5129 <method name="export">
5130 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5131 steps required to export VirtualBox machines to OVF.
5132 </desc>
5133
5134 <param name="aAppliance" type="IAppliance" dir="in">
5135 <desc>Appliance to export this machine to.</desc>
5136 </param>
5137 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5138 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5139 </param>
5140 </method >
5141
5142 <method name="getSnapshot">
5143 <desc>
5144 Returns a snapshot of this machine with the given UUID.
5145 A @c null UUID can be used to obtain the first snapshot
5146 taken on this machine. This is useful if you want to traverse
5147 the whole tree of snapshots starting from the root.
5148
5149 <result name="VBOX_E_OBJECT_NOT_FOUND">
5150 Virtual machine has no snapshots or snapshot not found.
5151 </result>
5152
5153 </desc>
5154 <param name="id" type="uuid" mod="string" dir="in">
5155 <desc>UUID of the snapshot to get</desc>
5156 </param>
5157 <param name="snapshot" type="ISnapshot" dir="return">
5158 <desc>Snapshot object with the given UUID.</desc>
5159 </param>
5160 </method>
5161
5162 <method name="findSnapshot">
5163 <desc>
5164 Returns a snapshot of this machine with the given name.
5165
5166 <result name="VBOX_E_OBJECT_NOT_FOUND">
5167 Virtual machine has no snapshots or snapshot not found.
5168 </result>
5169
5170 </desc>
5171 <param name="name" type="wstring" dir="in">
5172 <desc>Name of the snapshot to find</desc>
5173 </param>
5174 <param name="snapshot" type="ISnapshot" dir="return">
5175 <desc>Snapshot object with the given name.</desc>
5176 </param>
5177 </method>
5178
5179 <method name="setCurrentSnapshot">
5180 <desc>
5181 Sets the current snapshot of this machine.
5182 <note>
5183 In the current implementation, this operation is not
5184 implemented.
5185 </note>
5186 </desc>
5187 <param name="id" type="uuid" mod="string" dir="in">
5188 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5189 </param>
5190 </method>
5191
5192 <method name="createSharedFolder">
5193 <desc>
5194 Creates a new permanent shared folder by associating the given logical
5195 name with the given host path, adds it to the collection of shared
5196 folders and starts sharing it. Refer to the description of
5197 <link to="ISharedFolder"/> to read more about logical names.
5198
5199 <result name="VBOX_E_OBJECT_IN_USE">
5200 Shared folder already exists.
5201 </result>
5202 <result name="VBOX_E_FILE_ERROR">
5203 Shared folder @a hostPath not accessible.
5204 </result>
5205
5206 </desc>
5207 <param name="name" type="wstring" dir="in">
5208 <desc>Unique logical name of the shared folder.</desc>
5209 </param>
5210 <param name="hostPath" type="wstring" dir="in">
5211 <desc>Full path to the shared folder in the host file system.</desc>
5212 </param>
5213 <param name="writable" type="boolean" dir="in">
5214 <desc>Whether the share is writable or readonly.</desc>
5215 </param>
5216 <param name="automount" type="boolean" dir="in">
5217 <desc>Whether the share gets automatically mounted by the guest
5218 or not.</desc>
5219 </param>
5220 </method>
5221
5222 <method name="removeSharedFolder">
5223 <desc>
5224 Removes the permanent shared folder with the given name previously
5225 created by <link to="#createSharedFolder"/> from the collection of
5226 shared folders and stops sharing it.
5227
5228 <result name="VBOX_E_INVALID_VM_STATE">
5229 Virtual machine is not mutable.
5230 </result>
5231 <result name="VBOX_E_OBJECT_NOT_FOUND">
5232 Shared folder @a name does not exist.
5233 </result>
5234
5235 </desc>
5236 <param name="name" type="wstring" dir="in">
5237 <desc>Logical name of the shared folder to remove.</desc>
5238 </param>
5239 </method>
5240
5241 <method name="canShowConsoleWindow">
5242 <desc>
5243 Returns @c true if the VM console process can activate the
5244 console window and bring it to foreground on the desktop of
5245 the host PC.
5246 <note>
5247 This method will fail if a session for this machine is not
5248 currently open.
5249 </note>
5250
5251 <result name="VBOX_E_INVALID_VM_STATE">
5252 Machine session is not open.
5253 </result>
5254
5255 </desc>
5256 <param name="canShow" type="boolean" dir="return">
5257 <desc>
5258 @c true if the console window can be shown and @c false otherwise.
5259 </desc>
5260 </param>
5261 </method>
5262
5263 <method name="showConsoleWindow">
5264 <desc>
5265 Activates the console window and brings it to foreground on
5266 the desktop of the host PC. Many modern window managers on
5267 many platforms implement some sort of focus stealing
5268 prevention logic, so that it may be impossible to activate
5269 a window without the help of the currently active
5270 application. In this case, this method will return a non-zero
5271 identifier that represents the top-level window of the VM
5272 console process. The caller, if it represents a currently
5273 active process, is responsible to use this identifier (in a
5274 platform-dependent manner) to perform actual window
5275 activation.
5276 <note>
5277 This method will fail if a session for this machine is not
5278 currently open.
5279 </note>
5280
5281 <result name="VBOX_E_INVALID_VM_STATE">
5282 Machine session is not open.
5283 </result>
5284
5285 </desc>
5286 <param name="winId" type="long long" dir="return">
5287 <desc>
5288 Platform-dependent identifier of the top-level VM console
5289 window, or zero if this method has performed all actions
5290 necessary to implement the <i>show window</i> semantics for
5291 the given platform and/or VirtualBox front-end.
5292 </desc>
5293 </param>
5294 </method>
5295
5296 <method name="getGuestProperty" const="yes">
5297 <desc>
5298 Reads an entry from the machine's guest property store.
5299
5300 <result name="VBOX_E_INVALID_VM_STATE">
5301 Machine session is not open.
5302 </result>
5303
5304 </desc>
5305 <param name="name" type="wstring" dir="in">
5306 <desc>
5307 The name of the property to read.
5308 </desc>
5309 </param>
5310 <param name="value" type="wstring" dir="out">
5311 <desc>
5312 The value of the property. If the property does not exist then this
5313 will be empty.
5314 </desc>
5315 </param>
5316 <param name="timestamp" type="long long" dir="out">
5317 <desc>
5318 The time at which the property was last modified, as seen by the
5319 server process.
5320 </desc>
5321 </param>
5322 <param name="flags" type="wstring" dir="out">
5323 <desc>
5324 Additional property parameters, passed as a comma-separated list of
5325 "name=value" type entries.
5326 </desc>
5327 </param>
5328 </method>
5329
5330 <method name="getGuestPropertyValue" const="yes">
5331 <desc>
5332 Reads a value from the machine's guest property store.
5333
5334 <result name="VBOX_E_INVALID_VM_STATE">
5335 Machine session is not open.
5336 </result>
5337
5338 </desc>
5339 <param name="property" type="wstring" dir="in">
5340 <desc>
5341 The name of the property to read.
5342 </desc>
5343 </param>
5344 <param name="value" type="wstring" dir="return">
5345 <desc>
5346 The value of the property. If the property does not exist then this
5347 will be empty.
5348 </desc>
5349 </param>
5350 </method>
5351
5352 <method name="getGuestPropertyTimestamp" const="yes">
5353 <desc>
5354 Reads a property timestamp from the machine's guest property store.
5355
5356 <result name="VBOX_E_INVALID_VM_STATE">
5357 Machine session is not open.
5358 </result>
5359
5360 </desc>
5361 <param name="property" type="wstring" dir="in">
5362 <desc>
5363 The name of the property to read.
5364 </desc>
5365 </param>
5366 <param name="value" type="long long" dir="return">
5367 <desc>
5368 The timestamp. If the property does not exist then this will be
5369 empty.
5370 </desc>
5371 </param>
5372 </method>
5373
5374 <method name="setGuestProperty">
5375 <desc>
5376 Sets, changes or deletes an entry in the machine's guest property
5377 store.
5378
5379 <result name="E_ACCESSDENIED">
5380 Property cannot be changed.
5381 </result>
5382 <result name="E_INVALIDARG">
5383 Invalid @a flags.
5384 </result>
5385 <result name="VBOX_E_INVALID_VM_STATE">
5386 Virtual machine is not mutable or session not open.
5387 </result>
5388 <result name="VBOX_E_INVALID_OBJECT_STATE">
5389 Cannot set transient property when machine not running.
5390 </result>
5391
5392 </desc>
5393 <param name="property" type="wstring" dir="in">
5394 <desc>
5395 The name of the property to set, change or delete.
5396 </desc>
5397 </param>
5398 <param name="value" type="wstring" dir="in">
5399 <desc>
5400 The new value of the property to set, change or delete. If the
5401 property does not yet exist and value is non-empty, it will be
5402 created. If the value is @c null or empty, the property will be
5403 deleted if it exists.
5404 </desc>
5405 </param>
5406 <param name="flags" type="wstring" dir="in">
5407 <desc>
5408 Additional property parameters, passed as a comma-separated list of
5409 "name=value" type entries.
5410 </desc>
5411 </param>
5412 </method>
5413
5414 <method name="setGuestPropertyValue">
5415 <desc>
5416 Sets, changes or deletes a value in the machine's guest property
5417 store. The flags field will be left unchanged or created empty for a
5418 new property.
5419
5420 <result name="E_ACCESSDENIED">
5421 Property cannot be changed.
5422 </result>
5423 <result name="VBOX_E_INVALID_VM_STATE">
5424 Virtual machine is not mutable or session not open.
5425 </result>
5426 <result name="VBOX_E_INVALID_OBJECT_STATE">
5427 Cannot set transient property when machine not running.
5428 </result>
5429 </desc>
5430
5431 <param name="property" type="wstring" dir="in">
5432 <desc>
5433 The name of the property to set, change or delete.
5434 </desc>
5435 </param>
5436 <param name="value" type="wstring" dir="in">
5437 <desc>
5438 The new value of the property to set, change or delete. If the
5439 property does not yet exist and value is non-empty, it will be
5440 created. If the value is @c null or empty, the property will be
5441 deleted if it exists.
5442 </desc>
5443 </param>
5444 </method>
5445
5446 <method name="enumerateGuestProperties">
5447 <desc>
5448 Return a list of the guest properties matching a set of patterns along
5449 with their values, time stamps and flags.
5450 </desc>
5451 <param name="patterns" type="wstring" dir="in">
5452 <desc>
5453 The patterns to match the properties against, separated by '|'
5454 characters. If this is empty or @c null, all properties will match.
5455 </desc>
5456 </param>
5457 <param name="name" type="wstring" dir="out" safearray="yes">
5458 <desc>
5459 The names of the properties returned.
5460 </desc>
5461 </param>
5462 <param name="value" type="wstring" dir="out" safearray="yes">
5463 <desc>
5464 The values of the properties returned. The array entries match the
5465 corresponding entries in the @a name array.
5466 </desc>
5467 </param>
5468 <param name="timestamp" type="long long" dir="out" safearray="yes">
5469 <desc>
5470 The time stamps of the properties returned. The array entries match
5471 the corresponding entries in the @a name array.
5472 </desc>
5473 </param>
5474 <param name="flags" type="wstring" dir="out" safearray="yes">
5475 <desc>
5476 The flags of the properties returned. The array entries match the
5477 corresponding entries in the @a name array.
5478 </desc>
5479 </param>
5480 </method>
5481
5482 <method name="querySavedThumbnailSize">
5483 <desc>
5484 Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.
5485 </desc>
5486 <param name="screenId" type="unsigned long" dir="in">
5487 <desc>
5488 Saved guest screen to query info from.
5489 </desc>
5490 </param>
5491 <param name="size" type="unsigned long" dir="out">
5492 <desc>
5493 Size of buffer required to store the bitmap.
5494 </desc>
5495 </param>
5496 <param name="width" type="unsigned long" dir="out">
5497 <desc>
5498 Bitmap width.
5499 </desc>
5500 </param>
5501 <param name="height" type="unsigned long" dir="out">
5502 <desc>
5503 Bitmap height.
5504 </desc>
5505 </param>
5506 </method>
5507
5508 <method name="readSavedThumbnailToArray">
5509 <desc>
5510 Thumbnail is retrieved to an array of bytes in uncompressed 32-bit BGRA or RGBA format.
5511 </desc>
5512 <param name="screenId" type="unsigned long" dir="in">
5513 <desc>
5514 Saved guest screen to read from.
5515 </desc>
5516 </param>
5517 <param name="BGR" type="boolean" dir="in">
5518 <desc>
5519 How to order bytes in the pixel. A pixel consists of 4 bytes. If this parameter is true, then
5520 bytes order is: B, G, R, 0xFF. If this parameter is false, then bytes order is: R, G, B, 0xFF.
5521 </desc>
5522 </param>
5523 <param name="width" type="unsigned long" dir="out">
5524 <desc>
5525 Bitmap width.
5526 </desc>
5527 </param>
5528 <param name="height" type="unsigned long" dir="out">
5529 <desc>
5530 Bitmap height.
5531 </desc>
5532 </param>
5533 <param name="data" type="octet" safearray="yes" dir="return">
5534 <desc>
5535 Array with resulting bitmap data.
5536 </desc>
5537 </param>
5538 </method>
5539
5540 <method name="querySavedScreenshotPNGSize">
5541 <desc>
5542 Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.
5543 </desc>
5544 <param name="screenId" type="unsigned long" dir="in">
5545 <desc>
5546 Saved guest screen to query info from.
5547 </desc>
5548 </param>
5549 <param name="size" type="unsigned long" dir="out">
5550 <desc>
5551 Size of buffer required to store the PNG binary data.
5552 </desc>
5553 </param>
5554 <param name="width" type="unsigned long" dir="out">
5555 <desc>
5556 Image width.
5557 </desc>
5558 </param>
5559 <param name="height" type="unsigned long" dir="out">
5560 <desc>
5561 Image height.
5562 </desc>
5563 </param>
5564 </method>
5565
5566 <method name="readSavedScreenshotPNGToArray">
5567 <desc>
5568 Screenshot in PNG format is retrieved to an array of bytes.
5569 </desc>
5570 <param name="screenId" type="unsigned long" dir="in">
5571 <desc>
5572 Saved guest screen to read from.
5573 </desc>
5574 </param>
5575 <param name="width" type="unsigned long" dir="out">
5576 <desc>
5577 Image width.
5578 </desc>
5579 </param>
5580 <param name="height" type="unsigned long" dir="out">
5581 <desc>
5582 Image height.
5583 </desc>
5584 </param>
5585 <param name="data" type="octet" dir="return" safearray="yes">
5586 <desc>
5587 Array with resulting PNG data.
5588 </desc>
5589 </param>
5590 </method>
5591
5592 <method name="hotPlugCPU">
5593 <desc>
5594 Plugs a CPU into the machine.
5595 </desc>
5596 <param name="cpu" type="unsigned long" dir="in">
5597 <desc>
5598 The CPU id to insert.
5599 </desc>
5600 </param>
5601 </method>
5602
5603 <method name="hotUnplugCPU">
5604 <desc>
5605 Removes a CPU from the machine.
5606 </desc>
5607 <param name="cpu" type="unsigned long" dir="in">
5608 <desc>
5609 The CPU id to remove.
5610 </desc>
5611 </param>
5612 </method>
5613
5614 <method name="getCPUStatus">
5615 <desc>
5616 Returns the current status of the given CPU.
5617 </desc>
5618 <param name="cpu" type="unsigned long" dir="in">
5619 <desc>
5620 The CPU id to check for.
5621 </desc>
5622 </param>
5623 <param name="attached" type="boolean" dir="return">
5624 <desc>
5625 Status of the CPU.
5626 </desc>
5627 </param>
5628 </method>
5629
5630 <method name="queryLogFilename">
5631 <desc>
5632 Queries for the VM log file name of an given index. Returns an empty
5633 string if a log file with that index doesn't exists.
5634 </desc>
5635 <param name="idx" type="unsigned long" dir="in">
5636 <desc>
5637 Which log file name to query. 0=current log file.
5638 </desc>
5639 </param>
5640 <param name="filename" type="wstring" dir="return">
5641 <desc>
5642 On return the full path to the log file or an empty string on error.
5643 </desc>
5644 </param>
5645 </method>
5646
5647 <method name="readLog">
5648 <desc>
5649 Reads the VM log file. The chunk size is limited, so even if you
5650 ask for a big piece there might be less data returned.
5651 </desc>
5652 <param name="idx" type="unsigned long" dir="in">
5653 <desc>
5654 Which log file to read. 0=current log file.
5655 </desc>
5656 </param>
5657 <param name="offset" type="long long" dir="in">
5658 <desc>
5659 Offset in the log file.
5660 </desc>
5661 </param>
5662 <param name="size" type="long long" dir="in">
5663 <desc>
5664 Chunk size to read in the log file.
5665 </desc>
5666 </param>
5667 <param name="data" type="octet" dir="return" safearray="yes">
5668 <desc>
5669 Data read from the log file. A data size of 0 means end of file
5670 if the requested chunk size was not 0. This is the unprocessed
5671 file data, i.e. the line ending style depends on the platform of
5672 the system the server is running on.
5673 </desc>
5674 </param>
5675 </method>
5676 </interface>
5677
5678 <!--
5679 // IConsole
5680 /////////////////////////////////////////////////////////////////////////
5681 -->
5682
5683 <interface
5684 name="IRemoteDisplayInfo" extends="$unknown"
5685 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
5686 wsmap="struct"
5687 >
5688 <desc>
5689 Contains information about the remote display (VRDP) capabilities and status.
5690 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5691 </desc>
5692
5693 <attribute name="active" type="boolean" readonly="yes">
5694 <desc>
5695 Whether the remote display connection is active.
5696 </desc>
5697 </attribute>
5698
5699 <attribute name="port" type="long" readonly="yes">
5700 <desc>
5701 VRDP server port number. If this property is equal to <tt>0</tt>, then
5702 the VRDP server failed to start, usually because there are no free TCP
5703 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
5704 server has not yet been started.
5705 </desc>
5706 </attribute>
5707
5708 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5709 <desc>
5710 How many times a client connected.
5711 </desc>
5712 </attribute>
5713
5714 <attribute name="beginTime" type="long long" readonly="yes">
5715 <desc>
5716 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5717 </desc>
5718 </attribute>
5719
5720 <attribute name="endTime" type="long long" readonly="yes">
5721 <desc>
5722 When the last connection was terminated or the current time, if
5723 connection is still active, in milliseconds since 1970-01-01 UTC.
5724 </desc>
5725 </attribute>
5726
5727 <attribute name="bytesSent" type="long long" readonly="yes">
5728 <desc>
5729 How many bytes were sent in last or current, if still active, connection.
5730 </desc>
5731 </attribute>
5732
5733 <attribute name="bytesSentTotal" type="long long" readonly="yes">
5734 <desc>
5735 How many bytes were sent in all connections.
5736 </desc>
5737 </attribute>
5738
5739 <attribute name="bytesReceived" type="long long" readonly="yes">
5740 <desc>
5741 How many bytes were received in last or current, if still active, connection.
5742 </desc>
5743 </attribute>
5744
5745 <attribute name="bytesReceivedTotal" type="long long" readonly="yes">
5746 <desc>
5747 How many bytes were received in all connections.
5748 </desc>
5749 </attribute>
5750
5751 <attribute name="user" type="wstring" readonly="yes">
5752 <desc>
5753 Login user name supplied by the client.
5754 </desc>
5755 </attribute>
5756
5757 <attribute name="domain" type="wstring" readonly="yes">
5758 <desc>
5759 Login domain name supplied by the client.
5760 </desc>
5761 </attribute>
5762
5763 <attribute name="clientName" type="wstring" readonly="yes">
5764 <desc>
5765 The client name supplied by the client.
5766 </desc>
5767 </attribute>
5768
5769 <attribute name="clientIP" type="wstring" readonly="yes">
5770 <desc>
5771 The IP address of the client.
5772 </desc>
5773 </attribute>
5774
5775 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5776 <desc>
5777 The client software version number.
5778 </desc>
5779 </attribute>
5780
5781 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5782 <desc>
5783 Public key exchange method used when connection was established.
5784 Values: 0 - RDP4 public key exchange scheme.
5785 1 - X509 certificates were sent to client.
5786 </desc>
5787 </attribute>
5788
5789 </interface>
5790
5791 <interface
5792 name="IConsole" extends="$unknown"
5793 uuid="03cb7897-ea17-4e6c-81ae-4bd90be2fde2"
5794 wsmap="managed"
5795 >
5796 <desc>
5797 The IConsole interface represents an interface to control virtual
5798 machine execution.
5799
5800 A console object gets created when a machine has been locked for a
5801 particular session (client process) using <link to="IMachine::lockMachine" />
5802 or <link to="IMachine::launchVMProcess"/>. The console object can
5803 then be found in the session's <link to="ISession::console" /> attribute.
5804
5805 Methods of the IConsole interface allow the caller to query the current
5806 virtual machine execution state, pause the machine or power it down, save
5807 the machine state or take a snapshot, attach and detach removable media
5808 and so on.
5809
5810 <see>ISession</see>
5811 </desc>
5812
5813 <attribute name="machine" type="IMachine" readonly="yes">
5814 <desc>
5815 Machine object this console is sessioned with.
5816 <note>
5817 This is a convenience property, it has the same value as
5818 <link to="ISession::machine"/> of the corresponding session
5819 object.
5820 </note>
5821 </desc>
5822 </attribute>
5823
5824 <attribute name="state" type="MachineState" readonly="yes">
5825 <desc>
5826 Current execution state of the machine.
5827 <note>
5828 This property always returns the same value as the corresponding
5829 property of the IMachine object this console is sessioned with.
5830 For the process that owns (executes) the VM, this is the
5831 preferable way of querying the VM state, because no IPC
5832 calls are made.
5833 </note>
5834 </desc>
5835 </attribute>
5836
5837 <attribute name="guest" type="IGuest" readonly="yes">
5838 <desc>Guest object.</desc>
5839 </attribute>
5840
5841 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5842 <desc>
5843 Virtual keyboard object.
5844 <note>
5845 If the machine is not running, any attempt to use
5846 the returned object will result in an error.
5847 </note>
5848 </desc>
5849 </attribute>
5850
5851 <attribute name="mouse" type="IMouse" readonly="yes">
5852 <desc>
5853 Virtual mouse object.
5854 <note>
5855 If the machine is not running, any attempt to use
5856 the returned object will result in an error.
5857 </note>
5858 </desc>
5859 </attribute>
5860
5861 <attribute name="display" type="IDisplay" readonly="yes">
5862 <desc>Virtual display object.
5863 <note>
5864 If the machine is not running, any attempt to use
5865 the returned object will result in an error.
5866 </note>
5867 </desc>
5868 </attribute>
5869
5870 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5871 <desc>Debugging interface.</desc>
5872 </attribute>
5873
5874 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
5875 <desc>
5876 Collection of USB devices currently attached to the virtual
5877 USB controller.
5878 <note>
5879 The collection is empty if the machine is not running.
5880 </note>
5881 </desc>
5882 </attribute>
5883
5884 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
5885 <desc>
5886 List of USB devices currently attached to the remote VRDP client.
5887 Once a new device is physically attached to the remote host computer,
5888 it appears in this list and remains there until detached.
5889 </desc>
5890 </attribute>
5891
5892 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
5893 <desc>
5894 Collection of shared folders for the current session. These folders
5895 are called transient shared folders because they are available to the
5896 guest OS running inside the associated virtual machine only for the
5897 duration of the session (as opposed to
5898 <link to="IMachine::sharedFolders"/> which represent permanent shared
5899 folders). When the session is closed (e.g. the machine is powered down),
5900 these folders are automatically discarded.
5901
5902 New shared folders are added to the collection using
5903 <link to="#createSharedFolder"/>. Existing shared folders can be
5904 removed using <link to="#removeSharedFolder"/>.
5905 </desc>
5906 </attribute>
5907
5908 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5909 <desc>
5910 Interface that provides information on Remote Display (VRDP) connection.
5911 </desc>
5912 </attribute>
5913
5914 <attribute name="eventSource" type="IEventSource" readonly="yes">
5915 <desc>
5916 Event source for console events.
5917 </desc>
5918 </attribute>
5919
5920 <method name="powerUp">
5921 <desc>
5922 Starts the virtual machine execution using the current machine
5923 state (that is, its current execution state, current settings and
5924 current storage devices).
5925
5926 <note>
5927 This method is only useful for front-ends that want to actually
5928 execute virtual machines in their own process (like the VirtualBox
5929 or VBoxSDL front-ends). Unless you are intending to write such a
5930 front-end, do not call this method. If you simply want to
5931 start virtual machine execution using one of the existing front-ends
5932 (for example the VirtualBox GUI or headless server), use
5933 <link to="IMachine::launchVMProcess"/> instead; these
5934 front-ends will power up the machine automatically for you.
5935 </note>
5936
5937 If the machine is powered off or aborted, the execution will
5938 start from the beginning (as if the real hardware were just
5939 powered on).
5940
5941 If the machine is in the <link to="MachineState::Saved"/> state,
5942 it will continue its execution the point where the state has
5943 been saved.
5944
5945 If the machine <link to="IMachine::teleporterEnabled"/> property is
5946 enabled on the machine being powered up, the machine will wait for an
5947 incoming teleportation in the <link to="MachineState::TeleportingIn"/>
5948 state. The returned progress object will have at least three
5949 operations where the last three are defined as: (1) powering up and
5950 starting TCP server, (2) waiting for incoming teleportations, and
5951 (3) perform teleportation. These operations will be reflected as the
5952 last three operations of the progress objected returned by
5953 <link to="IMachine::launchVMProcess"/> as well.
5954
5955 <see>#saveState</see>
5956
5957 <result name="VBOX_E_INVALID_VM_STATE">
5958 Virtual machine already running.
5959 </result>
5960 <result name="VBOX_E_HOST_ERROR">
5961 Host interface does not exist or name not set.
5962 </result>
5963 <result name="VBOX_E_FILE_ERROR">
5964 Invalid saved state file.
5965 </result>
5966 </desc>
5967 <param name="progress" type="IProgress" dir="return">
5968 <desc>Progress object to track the operation completion.</desc>
5969 </param>
5970 </method>
5971
5972 <method name="powerUpPaused">
5973 <desc>
5974 Identical to powerUp except that the VM will enter the
5975 <link to="MachineState::Paused"/> state, instead of
5976 <link to="MachineState::Running"/>.
5977
5978 <see>#powerUp</see>
5979 <result name="VBOX_E_INVALID_VM_STATE">
5980 Virtual machine already running.
5981 </result>
5982 <result name="VBOX_E_HOST_ERROR">
5983 Host interface does not exist or name not set.
5984 </result>
5985 <result name="VBOX_E_FILE_ERROR">
5986 Invalid saved state file.
5987 </result>
5988 </desc>
5989 <param name="progress" type="IProgress" dir="return">
5990 <desc>Progress object to track the operation completion.</desc>
5991 </param>
5992 </method>
5993
5994 <method name="powerDown">
5995 <desc>
5996 Initiates the power down procedure to stop the virtual machine
5997 execution.
5998
5999 The completion of the power down procedure is tracked using the returned
6000 IProgress object. After the operation is complete, the machine will go
6001 to the PoweredOff state.
6002 <result name="VBOX_E_INVALID_VM_STATE">
6003 Virtual machine must be Running, Paused or Stuck to be powered down.
6004 </result>
6005 </desc>
6006 <param name="progress" type="IProgress" dir="return">
6007 <desc>Progress object to track the operation completion.</desc>
6008 </param>
6009 </method>
6010
6011 <method name="reset">
6012 <desc>Resets the virtual machine.
6013 <result name="VBOX_E_INVALID_VM_STATE">
6014 Virtual machine not in Running state.
6015 </result>
6016 <result name="VBOX_E_VM_ERROR">
6017 Virtual machine error in reset operation.
6018 </result>
6019 </desc>
6020 </method>
6021
6022 <method name="pause">
6023 <desc>Pauses the virtual machine execution.
6024 <result name="VBOX_E_INVALID_VM_STATE">
6025 Virtual machine not in Running state.
6026 </result>
6027 <result name="VBOX_E_VM_ERROR">
6028 Virtual machine error in suspend operation.
6029 </result>
6030 </desc>
6031 </method>
6032
6033 <method name="resume">
6034 <desc>Resumes the virtual machine execution.
6035 <result name="VBOX_E_INVALID_VM_STATE">
6036 Virtual machine not in Paused state.
6037 </result>
6038 <result name="VBOX_E_VM_ERROR">
6039 Virtual machine error in resume operation.
6040 </result>
6041 </desc>
6042 </method>
6043
6044 <method name="powerButton">
6045 <desc>Sends the ACPI power button event to the guest.
6046 <result name="VBOX_E_INVALID_VM_STATE">
6047 Virtual machine not in Running state.
6048 </result>
6049 <result name="VBOX_E_PDM_ERROR">
6050 Controlled power off failed.
6051 </result>
6052 </desc>
6053 </method>
6054
6055 <method name="sleepButton">
6056 <desc>Sends the ACPI sleep button event to the guest.
6057 <result name="VBOX_E_INVALID_VM_STATE">
6058 Virtual machine not in Running state.
6059 </result>
6060 <result name="VBOX_E_PDM_ERROR">
6061 Sending sleep button event failed.
6062 </result>
6063 </desc>
6064 </method>
6065
6066 <method name="getPowerButtonHandled">
6067 <desc>Checks if the last power button event was handled by guest.
6068 <result name="VBOX_E_PDM_ERROR">
6069 Checking if the event was handled by the guest OS failed.
6070 </result>
6071 </desc>
6072 <param name="handled" type="boolean" dir="return"/>
6073 </method>
6074
6075 <method name="getGuestEnteredACPIMode">
6076 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6077 G1 (sleeping). If this method returns @c false, the guest will
6078 most likely not respond to external ACPI events.
6079 <result name="VBOX_E_INVALID_VM_STATE">
6080 Virtual machine not in Running state.
6081 </result>
6082 </desc>
6083 <param name="entered" type="boolean" dir="return"/>
6084 </method>
6085
6086 <method name="saveState">
6087 <desc>
6088 Saves the current execution state of a running virtual machine
6089 and stops its execution.
6090
6091 After this operation completes, the machine will go to the
6092 Saved state. Next time it is powered up, this state will
6093 be restored and the machine will continue its execution from
6094 the place where it was saved.
6095
6096 This operation differs from taking a snapshot to the effect
6097 that it doesn't create new differencing media. Also, once
6098 the machine is powered up from the state saved using this method,
6099 the saved state is deleted, so it will be impossible to return
6100 to this state later.
6101
6102 <note>
6103 On success, this method implicitly calls
6104 <link to="IMachine::saveSettings"/> to save all current machine
6105 settings (including runtime changes to the DVD medium, etc.).
6106 Together with the impossibility to change any VM settings when it is
6107 in the Saved state, this guarantees adequate hardware
6108 configuration of the machine when it is restored from the saved
6109 state file.
6110 </note>
6111
6112 <note>
6113 The machine must be in the Running or Paused state, otherwise
6114 the operation will fail.
6115 </note>
6116 <result name="VBOX_E_INVALID_VM_STATE">
6117 Virtual machine state neither Running nor Paused.
6118 </result>
6119 <result name="VBOX_E_FILE_ERROR">
6120 Failed to create directory for saved state file.
6121 </result>
6122
6123 <see><link to="#takeSnapshot"/></see>
6124 </desc>
6125 <param name="progress" type="IProgress" dir="return">
6126 <desc>Progress object to track the operation completion.</desc>
6127 </param>
6128 </method>
6129
6130 <method name="adoptSavedState">
6131 <desc>
6132 Associates the given saved state file to the virtual machine.
6133
6134 On success, the machine will go to the Saved state. Next time it is
6135 powered up, it will be restored from the adopted saved state and
6136 continue execution from the place where the saved state file was
6137 created.
6138
6139 The specified saved state file path may be absolute or relative to the
6140 folder the VM normally saves the state to (usually,
6141 <link to="IMachine::snapshotFolder"/>).
6142
6143 <note>
6144 It's a caller's responsibility to make sure the given saved state
6145 file is compatible with the settings of this virtual machine that
6146 represent its virtual hardware (memory size, storage disk configuration
6147 etc.). If there is a mismatch, the behavior of the virtual machine
6148 is undefined.
6149 </note>
6150 <result name="VBOX_E_INVALID_VM_STATE">
6151 Virtual machine state neither PoweredOff nor Aborted.
6152 </result>
6153 </desc>
6154 <param name="savedStateFile" type="wstring" dir="in">
6155 <desc>Path to the saved state file to adopt.</desc>
6156 </param>
6157 </method>
6158
6159 <method name="discardSavedState">
6160 <desc>
6161 Forcibly resets the machine to "Powered Off" state if it is
6162 currently in the "Saved" state (previously created by <link to="#saveState"/>).
6163 Next time the machine is powered up, a clean boot will occur.
6164 <note>
6165 This operation is equivalent to resetting or powering off
6166 the machine without doing a proper shutdown of the guest
6167 operating system; as with resetting a running phyiscal
6168 computer, it can can lead to data loss.
6169 </note>
6170 If @a fRemoveFile is @c true, the file in the machine directory
6171 into which the machine state was saved is also deleted. If
6172 this is @c false, then the state can be recovered and later
6173 re-inserted into a machine using <link to="#adoptSavedState" />.
6174 The location of the file can be found in the
6175 <link to="IMachine::stateFilePath" /> attribute.
6176 <result name="VBOX_E_INVALID_VM_STATE">
6177 Virtual machine not in state Saved.
6178 </result>
6179 </desc>
6180 <param name="fRemoveFile" type="boolean" dir="in" >
6181 <desc>Whether to also remove the saved state file.</desc>
6182 </param>
6183 </method>
6184
6185 <method name="getDeviceActivity">
6186 <desc>
6187 Gets the current activity type of a given device or device group.
6188 <result name="E_INVALIDARG">
6189 Invalid device type.
6190 </result>
6191 </desc>
6192 <param name="type" type="DeviceType" dir="in"/>
6193 <param name="activity" type="DeviceActivity" dir="return"/>
6194 </method>
6195
6196 <method name="attachUSBDevice">
6197 <desc>
6198 Attaches a host USB device with the given UUID to the
6199 USB controller of the virtual machine.
6200
6201 The device needs to be in one of the following states:
6202 <link to="USBDeviceState::Busy"/>,
6203 <link to="USBDeviceState::Available"/> or
6204 <link to="USBDeviceState::Held"/>,
6205 otherwise an error is immediately returned.
6206
6207 When the device state is
6208 <link to="USBDeviceState::Busy">Busy</link>, an error may also
6209 be returned if the host computer refuses to release it for some reason.
6210
6211 <see>IUSBController::deviceFilters, USBDeviceState</see>
6212 <result name="VBOX_E_INVALID_VM_STATE">
6213 Virtual machine state neither Running nor Paused.
6214 </result>
6215 <result name="VBOX_E_PDM_ERROR">
6216 Virtual machine does not have a USB controller.
6217 </result>
6218 </desc>
6219 <param name="id" type="uuid" mod="string" dir="in">
6220 <desc>UUID of the host USB device to attach.</desc>
6221 </param>
6222 </method>
6223
6224 <method name="detachUSBDevice">
6225 <desc>
6226 Detaches an USB device with the given UUID from the USB controller
6227 of the virtual machine.
6228
6229 After this method succeeds, the VirtualBox server re-initiates
6230 all USB filters as if the device were just physically attached
6231 to the host, but filters of this machine are ignored to avoid
6232 a possible automatic re-attachment.
6233
6234 <see>IUSBController::deviceFilters, USBDeviceState</see>
6235
6236 <result name="VBOX_E_PDM_ERROR">
6237 Virtual machine does not have a USB controller.
6238 </result>
6239 <result name="E_INVALIDARG">
6240 USB device not attached to this virtual machine.
6241 </result>
6242 </desc>
6243 <param name="id" type="uuid" mod="string" dir="in">
6244 <desc>UUID of the USB device to detach.</desc>
6245 </param>
6246 <param name="device" type="IUSBDevice" dir="return">
6247 <desc>Detached USB device.</desc>
6248 </param>
6249 </method>
6250
6251 <method name="findUSBDeviceByAddress">
6252 <desc>
6253 Searches for a USB device with the given host address.
6254
6255 <result name="VBOX_E_OBJECT_NOT_FOUND">
6256 Given @c name does not correspond to any USB device.
6257 </result>
6258
6259 <see>IUSBDevice::address</see>
6260 </desc>
6261 <param name="name" type="wstring" dir="in">
6262 <desc>
6263 Address of the USB device (as assigned by the host) to
6264 search for.
6265 </desc>
6266 </param>
6267 <param name="device" type="IUSBDevice" dir="return">
6268 <desc>Found USB device object.</desc>
6269 </param>
6270 </method>
6271
6272 <method name="findUSBDeviceById">
6273 <desc>
6274 Searches for a USB device with the given UUID.
6275
6276 <result name="VBOX_E_OBJECT_NOT_FOUND">
6277 Given @c id does not correspond to any USB device.
6278 </result>
6279
6280 <see>IUSBDevice::id</see>
6281 </desc>
6282 <param name="id" type="uuid" mod="string" dir="in">
6283 <desc>UUID of the USB device to search for.</desc>
6284 </param>
6285 <param name="device" type="IUSBDevice" dir="return">
6286 <desc>Found USB device object.</desc>
6287 </param>
6288 </method>
6289
6290 <method name="createSharedFolder">
6291 <desc>
6292 Creates a transient new shared folder by associating the given logical
6293 name with the given host path, adds it to the collection of shared
6294 folders and starts sharing it. Refer to the description of
6295 <link to="ISharedFolder"/> to read more about logical names.
6296
6297 <result name="VBOX_E_INVALID_VM_STATE">
6298 Virtual machine in Saved state or currently changing state.
6299 </result>
6300 <result name="VBOX_E_FILE_ERROR">
6301 Shared folder already exists or not accessible.
6302 </result>
6303 </desc>
6304 <param name="name" type="wstring" dir="in">
6305 <desc>Unique logical name of the shared folder.</desc>
6306 </param>
6307 <param name="hostPath" type="wstring" dir="in">
6308 <desc>Full path to the shared folder in the host file system.</desc>
6309 </param>
6310 <param name="writable" type="boolean" dir="in">
6311 <desc>Whether the share is writable or readonly</desc>
6312 </param>
6313 <param name="automount" type="boolean" dir="in">
6314 <desc>Whether the share gets automatically mounted by the guest
6315 or not.</desc>
6316 </param>
6317 </method>
6318
6319 <method name="removeSharedFolder">
6320 <desc>
6321 Removes a transient shared folder with the given name previously
6322 created by <link to="#createSharedFolder"/> from the collection of
6323 shared folders and stops sharing it.
6324 <result name="VBOX_E_INVALID_VM_STATE">
6325 Virtual machine in Saved state or currently changing state.
6326 </result>
6327 <result name="VBOX_E_FILE_ERROR">
6328 Shared folder does not exists.
6329 </result>
6330 </desc>
6331 <param name="name" type="wstring" dir="in">
6332 <desc>Logical name of the shared folder to remove.</desc>
6333 </param>
6334 </method>
6335
6336 <method name="takeSnapshot">
6337 <desc>
6338 Saves the current execution state
6339 and all settings of the machine and creates differencing images
6340 for all normal (non-independent) media.
6341 See <link to="ISnapshot" /> for an introduction to snapshots.
6342
6343 This method can be called for a PoweredOff, Saved (see
6344 <link to="#saveState"/>), Running or
6345 Paused virtual machine. When the machine is PoweredOff, an
6346 offline snapshot is created. When the machine is Running a live
6347 snapshot is created, and an online snapshot is is created when Paused.
6348
6349 The taken snapshot is always based on the
6350 <link to="IMachine::currentSnapshot">current snapshot</link>
6351 of the associated virtual machine and becomes a new current snapshot.
6352
6353 <note>
6354 This method implicitly calls <link to="IMachine::saveSettings"/> to
6355 save all current machine settings before taking an offline snapshot.
6356 </note>
6357
6358 <result name="VBOX_E_INVALID_VM_STATE">
6359 Virtual machine currently changing state.
6360 </result>
6361 </desc>
6362 <param name="name" type="wstring" dir="in">
6363 <desc>Short name for the snapshot.</desc>
6364 </param>
6365 <param name="description" type="wstring" dir="in">
6366 <desc>Optional description of the snapshot.</desc>
6367 </param>
6368 <param name="progress" type="IProgress" dir="return">
6369 <desc>Progress object to track the operation completion.</desc>
6370 </param>
6371 </method>
6372
6373 <method name="deleteSnapshot">
6374 <desc>
6375 Starts deleting the specified snapshot asynchronously.
6376 See <link to="ISnapshot" /> for an introduction to snapshots.
6377
6378 The execution state and settings of the associated machine stored in
6379 the snapshot will be deleted. The contents of all differencing media of
6380 this snapshot will be merged with the contents of their dependent child
6381 media to keep the medium chain valid (in other words, all changes
6382 represented by media being deleted will be propagated to their child
6383 medium). After that, this snapshot's differencing medium will be
6384 deleted. The parent of this snapshot will become a new parent for all
6385 its child snapshots.
6386
6387 If the deleted snapshot is the current one, its parent snapshot will
6388 become a new current snapshot. The current machine state is not directly
6389 affected in this case, except that currently attached differencing
6390 media based on media of the deleted snapshot will be also merged as
6391 described above.
6392
6393 If the deleted snapshot is the first or current snapshot, then the
6394 respective IMachine attributes will be adjusted. Deleting the current
6395 snapshot will also implicitly call <link to="IMachine::saveSettings"/>
6396 to make all current machine settings permanent.
6397
6398 Deleting a snapshot has the following preconditions:
6399
6400 <ul>
6401 <li>Child media of all normal media of the deleted snapshot
6402 must be accessible (see <link to="IMedium::state"/>) for this
6403 operation to succeed. In particular, this means that all virtual
6404 machines, whose media are directly or indirectly based on the
6405 media of deleted snapshot, must be powered off.</li>
6406
6407 <li>You cannot delete the snapshot if a medium attached to it has
6408 more than once child medium (differencing images) because otherwise
6409 merging would be impossible. This might be the case if there is
6410 more than one child snapshot or differencing images were created
6411 for other reason (e.g. implicitly because of multiple machine
6412 attachments).</li>
6413 </ul>
6414
6415
6416 The virtual machine's <link to="IMachine::state">state</link> is
6417 changed to "DeletingSnapshot", "DeletingSnapshotOnline" or
6418 "DeletingSnapshotPaused" while this operation is in progress.
6419
6420 <note>
6421 Merging medium contents can be very time and disk space
6422 consuming, if these media are big in size and have many
6423 children. However, if the snapshot being deleted is the last
6424 (head) snapshot on the branch, the operation will be rather
6425 quick.
6426 </note>
6427 <result name="VBOX_E_INVALID_VM_STATE">
6428 The running virtual machine prevents deleting this snapshot. This
6429 happens only in very specific situations, usually snapshots can be
6430 deleted without trouble while a VM is running. The error message
6431 text explains the reason for the failure.
6432 </result>
6433 </desc>
6434 <param name="id" type="uuid" mod="string" dir="in">
6435 <desc>UUID of the snapshot to delete.</desc>
6436 </param>
6437 <param name="progress" type="IProgress" dir="return">
6438 <desc>Progress object to track the operation completion.</desc>
6439 </param>
6440 </method>
6441
6442 <method name="restoreSnapshot">
6443 <desc>
6444 Starts resetting the machine's current state to the state contained
6445 in the given snapshot, asynchronously. All current settings of the
6446 machine will be reset and changes stored in differencing media
6447 will be lost.
6448 See <link to="ISnapshot" /> for an introduction to snapshots.
6449
6450 After this operation is successfully completed, new empty differencing
6451 media are created for all normal media of the machine.
6452
6453 If the given snapshot is an online snapshot, the machine will go to
6454 the <link to="MachineState::Saved"> saved state</link>, so that the
6455 next time it is powered on, the execution state will be restored
6456 from the state of the snapshot.
6457
6458 <note>
6459 The machine must not be running, otherwise the operation will fail.
6460 </note>
6461
6462 <note>
6463 If the machine state is <link to="MachineState::Saved">Saved</link>
6464 prior to this operation, the saved state file will be implicitly
6465 deleted (as if <link to="IConsole::discardSavedState"/> were
6466 called).
6467 </note>
6468
6469 <result name="VBOX_E_INVALID_VM_STATE">
6470 Virtual machine is running.
6471 </result>
6472 </desc>
6473 <param name="snapshot" type="ISnapshot" dir="in">
6474 <desc>The snapshot to restore the VM state from.</desc>
6475 </param>
6476 <param name="progress" type="IProgress" dir="return">
6477 <desc>Progress object to track the operation completion.</desc>
6478 </param>
6479 </method>
6480
6481 <method name="teleport">
6482 <desc>
6483 Teleport the VM to a different host machine or process.
6484
6485 TODO explain the details.
6486
6487 <result name="VBOX_E_INVALID_VM_STATE">
6488 Virtual machine not running or paused.
6489 </result>
6490 </desc>
6491 <param name="hostname" type="wstring" dir="in">
6492 <desc>The name or IP of the host to teleport to.</desc>
6493 </param>
6494 <param name="tcpport" type="unsigned long" dir="in">
6495 <desc>The TCP port to connect to (1..65535).</desc>
6496 </param>
6497 <param name="password" type="wstring" dir="in">
6498 <desc>The password.</desc>
6499 </param>
6500 <param name="maxDowntime" type="unsigned long" dir="in">
6501 <desc>
6502 The maximum allowed downtime given as milliseconds. 0 is not a valid
6503 value. Recommended value: 250 ms.
6504
6505 The higher the value is, the greater the chance for a successful
6506 teleportation. A small value may easily result in the teleportation
6507 process taking hours and eventually fail.
6508
6509 <note>
6510 The current implementation treats this a guideline, not as an
6511 absolute rule.
6512 </note>
6513 </desc>
6514 </param>
6515 <param name="progress" type="IProgress" dir="return">
6516 <desc>Progress object to track the operation completion.</desc>
6517 </param>
6518 </method>
6519
6520 </interface>
6521
6522 <!--
6523 // IHost
6524 /////////////////////////////////////////////////////////////////////////
6525 -->
6526
6527 <enum
6528 name="HostNetworkInterfaceMediumType"
6529 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6530 >
6531 <desc>
6532 Type of encapsulation. Ethernet encapsulation includes both wired and
6533 wireless Ethernet connections.
6534 <see>IHostNetworkInterface</see>
6535 </desc>
6536
6537 <const name="Unknown" value="0">
6538 <desc>
6539 The type of interface cannot be determined.
6540 </desc>
6541 </const>
6542 <const name="Ethernet" value="1">
6543 <desc>
6544 Ethernet frame encapsulation.
6545 </desc>
6546 </const>
6547 <const name="PPP" value="2">
6548 <desc>
6549 Point-to-point protocol encapsulation.
6550 </desc>
6551 </const>
6552 <const name="SLIP" value="3">
6553 <desc>
6554 Serial line IP encapsulation.
6555 </desc>
6556 </const>
6557 </enum>
6558
6559 <enum
6560 name="HostNetworkInterfaceStatus"
6561 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6562 >
6563 <desc>
6564 Current status of the interface.
6565 <see>IHostNetworkInterface</see>
6566 </desc>
6567
6568 <const name="Unknown" value="0">
6569 <desc>
6570 The state of interface cannot be determined.
6571 </desc>
6572 </const>
6573 <const name="Up" value="1">
6574 <desc>
6575 The interface is fully operational.
6576 </desc>
6577 </const>
6578 <const name="Down" value="2">
6579 <desc>
6580 The interface is not functioning.
6581 </desc>
6582 </const>
6583 </enum>
6584
6585 <enum
6586 name="HostNetworkInterfaceType"
6587 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6588 >
6589 <desc>
6590 Network interface type.
6591 </desc>
6592 <const name="Bridged" value="1"/>
6593 <const name="HostOnly" value="2"/>
6594 </enum>
6595
6596 <interface
6597 name="IHostNetworkInterface" extends="$unknown"
6598 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6599 wsmap="managed"
6600 >
6601 <desc>
6602 Represents one of host's network interfaces. IP V6 address and network
6603 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6604 separated by colons.
6605 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6606 </desc>
6607 <attribute name="name" type="wstring" readonly="yes">
6608 <desc>Returns the host network interface name.</desc>
6609 </attribute>
6610
6611 <attribute name="id" type="uuid" mod="string" readonly="yes">
6612 <desc>Returns the interface UUID.</desc>
6613 </attribute>
6614
6615 <attribute name="networkName" type="wstring" readonly="yes">
6616 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6617 </attribute>
6618
6619 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6620 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6621 </attribute>
6622
6623 <attribute name="IPAddress" type="wstring" readonly="yes">
6624 <desc>Returns the IP V4 address of the interface.</desc>
6625 </attribute>
6626
6627 <attribute name="networkMask" type="wstring" readonly="yes">
6628 <desc>Returns the network mask of the interface.</desc>
6629 </attribute>
6630
6631 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6632 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6633 </attribute>
6634
6635 <attribute name="IPV6Address" type="wstring" readonly="yes">
6636 <desc>Returns the IP V6 address of the interface.</desc>
6637 </attribute>
6638
6639 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6640 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6641 </attribute>
6642
6643 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6644 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6645 </attribute>
6646
6647 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6648 <desc>Type of protocol encapsulation used.</desc>
6649 </attribute>
6650
6651 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6652 <desc>Status of the interface.</desc>
6653 </attribute>
6654
6655 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6656 <desc>specifies the host interface type.</desc>
6657 </attribute>
6658
6659 <method name="enableStaticIpConfig">
6660 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6661 <param name="IPAddress" type="wstring" dir="in">
6662 <desc>
6663 IP address.
6664 </desc>
6665 </param>
6666 <param name="networkMask" type="wstring" dir="in">
6667 <desc>
6668 network mask.
6669 </desc>
6670 </param>
6671 </method>
6672
6673 <method name="enableStaticIpConfigV6">
6674 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6675 <param name="IPV6Address" type="wstring" dir="in">
6676 <desc>
6677 IP address.
6678 </desc>
6679 </param>
6680 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6681 <desc>
6682 network mask.
6683 </desc>
6684 </param>
6685 </method>
6686
6687 <method name="enableDynamicIpConfig">
6688 <desc>enables the dynamic IP configuration.</desc>
6689 </method>
6690
6691 <method name="dhcpRediscover">
6692 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6693 </method>
6694
6695 </interface>
6696
6697 <interface
6698 name="IHost" extends="$unknown"
6699 uuid="35b004f4-7806-4009-bfa8-d1308adba7e5"
6700 wsmap="managed"
6701 >
6702 <desc>
6703 The IHost interface represents the physical machine that this VirtualBox
6704 installation runs on.
6705
6706 An object implementing this interface is returned by the
6707 <link to="IVirtualBox::host" /> attribute. This interface contains
6708 read-only information about the host's physical hardware (such as what
6709 processors and disks are available, what the host operating system is,
6710 and so on) and also allows for manipulating some of the host's hardware,
6711 such as global USB device filters and host interface networking.
6712
6713 </desc>
6714 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
6715 <desc>List of DVD drives available on the host.</desc>
6716 </attribute>
6717
6718 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
6719 <desc>List of floppy drives available on the host.</desc>
6720 </attribute>
6721
6722 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6723 <desc>
6724 List of USB devices currently attached to the host.
6725 Once a new device is physically attached to the host computer,
6726 it appears in this list and remains there until detached.
6727
6728 <note>
6729 If USB functionality is not available in the given edition of
6730 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6731 </note>
6732 </desc>
6733 </attribute>
6734
6735 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
6736 <desc>
6737 List of USB device filters in action.
6738 When a new device is physically attached to the host computer,
6739 filters from this list are applied to it (in order they are stored
6740 in the list). The first matched filter will determine the
6741 <link to="IHostUSBDeviceFilter::action">action</link>
6742 performed on the device.
6743
6744 Unless the device is ignored by these filters, filters of all
6745 currently running virtual machines
6746 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6747
6748 <note>
6749 If USB functionality is not available in the given edition of
6750 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6751 </note>
6752
6753 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6754 </desc>
6755 </attribute>
6756
6757 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6758 <desc>List of host network interfaces currently defined on the host.</desc>
6759 </attribute>
6760
6761 <attribute name="processorCount" type="unsigned long" readonly="yes">
6762 <desc>Number of (logical) CPUs installed in the host system.</desc>
6763 </attribute>
6764
6765 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6766 <desc>Number of (logical) CPUs online in the host system.</desc>
6767 </attribute>
6768
6769 <attribute name="processorCoreCount" type="unsigned long" readonly="yes">
6770 <desc>Number of physical processor cores installed in the host system.</desc>
6771 </attribute>
6772
6773 <method name="getProcessorSpeed">
6774 <desc>Query the (approximate) maximum speed of a specified host CPU in
6775 Megahertz.
6776 </desc>
6777 <param name="cpuId" type="unsigned long" dir="in">
6778 <desc>
6779 Identifier of the CPU.
6780 </desc>
6781 </param>
6782 <param name="speed" type="unsigned long" dir="return">
6783 <desc>
6784 Speed value. 0 is returned if value is not known or @a cpuId is
6785 invalid.
6786 </desc>
6787 </param>
6788 </method>
6789
6790 <method name="getProcessorFeature">
6791 <desc>Query whether a CPU feature is supported or not.</desc>
6792 <param name="feature" type="ProcessorFeature" dir="in">
6793 <desc>
6794 CPU Feature identifier.
6795 </desc>
6796 </param>
6797 <param name="supported" type="boolean" dir="return">
6798 <desc>
6799 Feature is supported or not.
6800 </desc>
6801 </param>
6802 </method>
6803
6804 <method name="getProcessorDescription">
6805 <desc>Query the model string of a specified host CPU.
6806 </desc>
6807 <param name="cpuId" type="unsigned long" dir="in">
6808 <desc>
6809 Identifier of the CPU.
6810 <note>
6811 The current implementation might not necessarily return the
6812 description for this exact CPU.
6813 </note>
6814 </desc>
6815 </param>
6816 <param name="description" type="wstring" dir="return">
6817 <desc>
6818 Model string. An empty string is returned if value is not known or
6819 @a cpuId is invalid.
6820 </desc>
6821 </param>
6822 </method>
6823
6824 <method name="getProcessorCPUIDLeaf">
6825 <desc>
6826 Returns the CPU cpuid information for the specified leaf.
6827 </desc>
6828 <param name="cpuId" type="unsigned long" dir="in">
6829 <desc>
6830 Identifier of the CPU. The CPU most be online.
6831 <note>
6832 The current implementation might not necessarily return the
6833 description for this exact CPU.
6834 </note>
6835 </desc>
6836 </param>
6837 <param name="leaf" type="unsigned long" dir="in">
6838 <desc>
6839 CPUID leaf index (eax).
6840 </desc>
6841 </param>
6842 <param name="subLeaf" type="unsigned long" dir="in">
6843 <desc>
6844 CPUID leaf sub index (ecx). This currently only applies to cache
6845 information on Intel CPUs. Use 0 if retriving values for
6846 <link to="IMachine::setCPUIDLeaf"/>.
6847 </desc>
6848 </param>
6849 <param name="valEax" type="unsigned long" dir="out">
6850 <desc>
6851 CPUID leaf value for register eax.
6852 </desc>
6853 </param>
6854 <param name="valEbx" type="unsigned long" dir="out">
6855 <desc>
6856 CPUID leaf value for register ebx.
6857 </desc>
6858 </param>
6859 <param name="valEcx" type="unsigned long" dir="out">
6860 <desc>
6861 CPUID leaf value for register ecx.
6862 </desc>
6863 </param>
6864 <param name="valEdx" type="unsigned long" dir="out">
6865 <desc>
6866 CPUID leaf value for register edx.
6867 </desc>
6868 </param>
6869 </method>
6870
6871 <attribute name="memorySize" type="unsigned long" readonly="yes">
6872 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6873 </attribute>
6874
6875 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6876 <desc>Available system memory in the host system.</desc>
6877 </attribute>
6878
6879 <attribute name="operatingSystem" type="wstring" readonly="yes">
6880 <desc>Name of the host system's operating system.</desc>
6881 </attribute>
6882
6883 <attribute name="OSVersion" type="wstring" readonly="yes">
6884 <desc>Host operating system's version string.</desc>
6885 </attribute>
6886
6887 <attribute name="UTCTime" type="long long" readonly="yes">
6888 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6889 </attribute>
6890
6891 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
6892 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
6893 </attribute>
6894
6895 <method name="createHostOnlyNetworkInterface">
6896 <desc>
6897 Creates a new adapter for Host Only Networking.
6898 <result name="E_INVALIDARG">
6899 Host network interface @a name already exists.
6900 </result>
6901 </desc>
6902 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6903 <desc>
6904 Created host interface object.
6905 </desc>
6906 </param>
6907 <param name="progress" type="IProgress" dir="return">
6908 <desc>
6909 Progress object to track the operation completion.
6910 </desc>
6911 </param>
6912 </method>
6913
6914 <method name="removeHostOnlyNetworkInterface">
6915 <desc>
6916 Removes the given Host Only Networking interface.
6917 <result name="VBOX_E_OBJECT_NOT_FOUND">
6918 No host network interface matching @a id found.
6919 </result>
6920 </desc>
6921 <param name="id" type="uuid" mod="string" dir="in">
6922 <desc>
6923 Adapter GUID.
6924 </desc>
6925 </param>
6926 <param name="progress" type="IProgress" dir="return">
6927 <desc>
6928 Progress object to track the operation completion.
6929 </desc>
6930 </param>
6931 </method>
6932
6933 <method name="createUSBDeviceFilter">
6934 <desc>
6935 Creates a new USB device filter. All attributes except
6936 the filter name are set to empty (any match),
6937 <i>active</i> is @c false (the filter is not active).
6938
6939 The created filter can be added to the list of filters using
6940 <link to="#insertUSBDeviceFilter"/>.
6941
6942 <see>#USBDeviceFilters</see>
6943 </desc>
6944 <param name="name" type="wstring" dir="in">
6945 <desc>
6946 Filter name. See <link to="IUSBDeviceFilter::name"/> for more information.
6947 </desc>
6948 </param>
6949 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6950 <desc>Created filter object.</desc>
6951 </param>
6952 </method>
6953
6954 <method name="insertUSBDeviceFilter">
6955 <desc>
6956 Inserts the given USB device to the specified position
6957 in the list of filters.
6958
6959 Positions are numbered starting from @c 0. If the specified
6960 position is equal to or greater than the number of elements in
6961 the list, the filter is added at the end of the collection.
6962
6963 <note>
6964 Duplicates are not allowed, so an attempt to insert a
6965 filter already in the list is an error.
6966 </note>
6967 <note>
6968 If USB functionality is not available in the given edition of
6969 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6970 </note>
6971
6972 <see>#USBDeviceFilters</see>
6973
6974 <result name="VBOX_E_INVALID_OBJECT_STATE">
6975 USB device filter is not created within this VirtualBox instance.
6976 </result>
6977 <result name="E_INVALIDARG">
6978 USB device filter already in list.
6979 </result>
6980
6981 </desc>
6982 <param name="position" type="unsigned long" dir="in">
6983 <desc>Position to insert the filter to.</desc>
6984 </param>
6985 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
6986 <desc>USB device filter to insert.</desc>
6987 </param>
6988 </method>
6989
6990 <method name="removeUSBDeviceFilter">
6991 <desc>
6992 Removes a USB device filter from the specified position in the
6993 list of filters.
6994
6995 Positions are numbered starting from @c 0. Specifying a
6996 position equal to or greater than the number of elements in
6997 the list will produce an error.
6998
6999 <note>
7000 If USB functionality is not available in the given edition of
7001 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7002 </note>
7003
7004 <see>#USBDeviceFilters</see>
7005
7006 <result name="E_INVALIDARG">
7007 USB device filter list empty or invalid @a position.
7008 </result>
7009
7010 </desc>
7011 <param name="position" type="unsigned long" dir="in">
7012 <desc>Position to remove the filter from.</desc>
7013 </param>
7014 </method>
7015
7016 <method name="findHostDVDDrive">
7017 <desc>
7018 Searches for a host DVD drive with the given @c name.
7019
7020 <result name="VBOX_E_OBJECT_NOT_FOUND">
7021 Given @c name does not correspond to any host drive.
7022 </result>
7023
7024 </desc>
7025 <param name="name" type="wstring" dir="in">
7026 <desc>Name of the host drive to search for</desc>
7027 </param>
7028 <param name="drive" type="IMedium" dir="return">
7029 <desc>Found host drive object</desc>
7030 </param>
7031 </method>
7032
7033 <method name="findHostFloppyDrive">
7034 <desc>
7035 Searches for a host floppy drive with the given @c name.
7036
7037 <result name="VBOX_E_OBJECT_NOT_FOUND">
7038 Given @c name does not correspond to any host floppy drive.
7039 </result>
7040
7041 </desc>
7042 <param name="name" type="wstring" dir="in">
7043 <desc>Name of the host floppy drive to search for</desc>
7044 </param>
7045 <param name="drive" type="IMedium" dir="return">
7046 <desc>Found host floppy drive object</desc>
7047 </param>
7048 </method>
7049
7050 <method name="findHostNetworkInterfaceByName">
7051 <desc>
7052 Searches through all host network interfaces for an interface with
7053 the given @c name.
7054 <note>
7055 The method returns an error if the given @c name does not
7056 correspond to any host network interface.
7057 </note>
7058 </desc>
7059 <param name="name" type="wstring" dir="in">
7060 <desc>Name of the host network interface to search for.</desc>
7061 </param>
7062 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7063 <desc>Found host network interface object.</desc>
7064 </param>
7065 </method>
7066 <method name="findHostNetworkInterfaceById">
7067 <desc>
7068 Searches through all host network interfaces for an interface with
7069 the given GUID.
7070 <note>
7071 The method returns an error if the given GUID does not
7072 correspond to any host network interface.
7073 </note>
7074 </desc>
7075 <param name="id" type="uuid" mod="string" dir="in">
7076 <desc>GUID of the host network interface to search for.</desc>
7077 </param>
7078 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7079 <desc>Found host network interface object.</desc>
7080 </param>
7081 </method>
7082 <method name="findHostNetworkInterfacesOfType">
7083 <desc>
7084 Searches through all host network interfaces and returns a list of interfaces of the specified type
7085 </desc>
7086 <param name="type" type="HostNetworkInterfaceType" dir="in">
7087 <desc>type of the host network interfaces to search for.</desc>
7088 </param>
7089 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7090 <desc>Found host network interface objects.</desc>
7091 </param>
7092 </method>
7093
7094 <method name="findUSBDeviceById">
7095 <desc>
7096 Searches for a USB device with the given UUID.
7097
7098 <result name="VBOX_E_OBJECT_NOT_FOUND">
7099 Given @c id does not correspond to any USB device.
7100 </result>
7101
7102 <see>IHostUSBDevice::id</see>
7103 </desc>
7104 <param name="id" type="uuid" mod="string" dir="in">
7105 <desc>UUID of the USB device to search for.</desc>
7106 </param>
7107 <param name="device" type="IHostUSBDevice" dir="return">
7108 <desc>Found USB device object.</desc>
7109 </param>
7110 </method>
7111
7112 <method name="findUSBDeviceByAddress">
7113 <desc>
7114 Searches for a USB device with the given host address.
7115
7116 <result name="VBOX_E_OBJECT_NOT_FOUND">
7117 Given @c name does not correspond to any USB device.
7118 </result>
7119
7120 <see>IHostUSBDevice::address</see>
7121 </desc>
7122 <param name="name" type="wstring" dir="in">
7123 <desc>
7124 Address of the USB device (as assigned by the host) to
7125 search for.
7126 </desc>
7127 </param>
7128 <param name="device" type="IHostUSBDevice" dir="return">
7129 <desc>Found USB device object.</desc>
7130 </param>
7131 </method>
7132
7133 </interface>
7134
7135 <!--
7136 // ISystemProperties
7137 /////////////////////////////////////////////////////////////////////////
7138 -->
7139
7140 <interface
7141 name="ISystemProperties"
7142 extends="$unknown"
7143 uuid="07c3ffd8-8f59-49cc-b608-53a332e85cc3"
7144 wsmap="managed"
7145 >
7146 <desc>
7147 The ISystemProperties interface represents global properties of the given
7148 VirtualBox installation.
7149
7150 These properties define limits and default values for various attributes
7151 and parameters. Most of the properties are read-only, but some can be
7152 changed by a user.
7153 </desc>
7154
7155 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7156 <desc>Minimum guest system memory in Megabytes.</desc>
7157 </attribute>
7158
7159 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7160 <desc>Maximum guest system memory in Megabytes.</desc>
7161 </attribute>
7162
7163 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7164 <desc>Minimum guest video memory in Megabytes.</desc>
7165 </attribute>
7166
7167 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7168 <desc>Maximum guest video memory in Megabytes.</desc>
7169 </attribute>
7170
7171 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7172 <desc>Minimum CPU count.</desc>
7173 </attribute>
7174
7175 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7176 <desc>Maximum CPU count.</desc>
7177 </attribute>
7178
7179 <attribute name="maxGuestMonitors" type="unsigned long" readonly="yes">
7180 <desc>Maximum of monitors which could be connected.</desc>
7181 </attribute>
7182
7183 <attribute name="maxVDISize" type="long long" readonly="yes">
7184 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7185 </attribute>
7186
7187 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7188 <desc>
7189 Number of network adapters associated with every
7190 <link to="IMachine"/> instance.
7191 </desc>
7192 </attribute>
7193
7194 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7195 <desc>
7196 Number of serial ports associated with every
7197 <link to="IMachine"/> instance.
7198 </desc>
7199 </attribute>
7200
7201 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7202 <desc>
7203 Number of parallel ports associated with every
7204 <link to="IMachine"/> instance.
7205 </desc>
7206 </attribute>
7207
7208 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7209 <desc>
7210 Maximum device position in the boot order. This value corresponds
7211 to the total number of devices a machine can boot from, to make it
7212 possible to include all possible devices to the boot list.
7213 <see><link to="IMachine::setBootOrder"/></see>
7214 </desc>
7215 </attribute>
7216
7217 <attribute name="defaultMachineFolder" type="wstring">
7218 <desc>
7219 Full path to the default directory used to create new or open
7220 existing machines when a settings file name contains no
7221 path.
7222
7223 The initial value of this property is
7224 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7225 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7226
7227 <note>
7228 Setting this property to @c null or an empty string will restore the
7229 initial value.
7230 </note>
7231 <note>
7232 When settings this property, the specified path can be
7233 absolute (full path) or relative
7234 to the <link to="IVirtualBox::homeFolder">
7235 VirtualBox home directory</link>.
7236 When reading this property, a full path is
7237 always returned.
7238 </note>
7239 <note>
7240 The specified path may not exist, it will be created
7241 when necessary.
7242 </note>
7243
7244 <see>
7245 <link to="IVirtualBox::createMachine"/>,
7246 <link to="IVirtualBox::openMachine"/>
7247 </see>
7248 </desc>
7249 </attribute>
7250
7251 <attribute name="defaultHardDiskFolder" type="wstring">
7252 <desc>
7253 Full path to the default directory used to create new or open existing
7254 virtual disks.
7255
7256 This path is used when the storage unit of a hard disk is a regular file
7257 in the host's file system and only a file name that contains no path is
7258 given.
7259
7260 The initial value of this property is
7261 <tt>&lt;</tt>
7262 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7263 <tt>&gt;/HardDisks</tt>.
7264
7265 <note>
7266 Setting this property to @c null or empty string will restore the
7267 initial value.
7268 </note>
7269 <note>
7270 When settings this property, the specified path can be relative
7271 to the
7272 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7273 absolute. When reading this property, a full path is
7274 always returned.
7275 </note>
7276 <note>
7277 The specified path may not exist, it will be created
7278 when necessary.
7279 </note>
7280
7281 <see>
7282 IMedium,
7283 <link to="IVirtualBox::createHardDisk"/>,
7284 <link to="IVirtualBox::openMedium"/>,
7285 <link to="IMedium::location"/>
7286 </see>
7287 </desc>
7288 </attribute>
7289
7290 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7291 <desc>
7292 List of all medium storage formats supported by this VirtualBox
7293 installation.
7294
7295 Keep in mind that the medium format identifier
7296 (<link to="IMediumFormat::id"/>) used in other API calls like
7297 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7298 medium format is a case-insensitive string. This means that, for
7299 example, all of the following strings:
7300 <pre>
7301 "VDI"
7302 "vdi"
7303 "VdI"</pre>
7304 refer to the same medium format.
7305
7306 Note that the virtual medium framework is backend-based, therefore
7307 the list of supported formats depends on what backends are currently
7308 installed.
7309
7310 <see>
7311 <link to="IMediumFormat"/>,
7312 </see>
7313 </desc>
7314 </attribute>
7315
7316 <attribute name="defaultHardDiskFormat" type="wstring">
7317 <desc>
7318 Identifier of the default medium format used by VirtualBox.
7319
7320 The medium format set by this attribute is used by VirtualBox
7321 when the medium format was not specified explicitly. One example is
7322 <link to="IVirtualBox::createHardDisk"/> with the empty
7323 format argument. A more complex example is implicit creation of
7324 differencing media when taking a snapshot of a virtual machine:
7325 this operation will try to use a format of the parent medium first
7326 and if this format does not support differencing media the default
7327 format specified by this argument will be used.
7328
7329 The list of supported medium formats may be obtained by the
7330 <link to="#mediumFormats"/> call. Note that the default medium
7331 format must have a capability to create differencing media;
7332 otherwise operations that create media implicitly may fail
7333 unexpectedly.
7334
7335 The initial value of this property is <tt>"VDI"</tt> in the current
7336 version of the VirtualBox product, but may change in the future.
7337
7338 <note>
7339 Setting this property to @c null or empty string will restore the
7340 initial value.
7341 </note>
7342
7343 <see>
7344 <link to="#mediumFormats"/>,
7345 <link to="IMediumFormat::id"/>,
7346 <link to="IVirtualBox::createHardDisk"/>
7347 </see>
7348 </desc>
7349 </attribute>
7350
7351 <attribute name="freeDiskSpaceWarning" type="long long">
7352 <desc>Issue a warning if the free disk space is below (or in some disk
7353 intensive operation is expected to go below) the given size in
7354 Megabytes.</desc>
7355 </attribute>
7356
7357 <attribute name="freeDiskSpacePercentWarning" type="unsigned long">
7358 <desc>Issue a warning if the free disk space is below (or in some disk
7359 intensive operation is expected to go below) the given percentage.</desc>
7360 </attribute>
7361
7362 <attribute name="freeDiskSpaceError" type="long long">
7363 <desc>Issue an error if the free disk space is below (or in some disk
7364 intensive operation is expected to go below) the given size in
7365 Megabytes.</desc>
7366 </attribute>
7367
7368 <attribute name="freeDiskSpacePercentError" type="unsigned long">
7369 <desc>Issue an error if the free disk space is below (or in some disk
7370 intensive operation is expected to go below) the given percentage.</desc>
7371 </attribute>
7372
7373 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7374 <desc>
7375 Library that provides authentication for VRDP clients. The library
7376 is used if a virtual machine's authentication type is set to "external"
7377 in the VM RemoteDisplay configuration.
7378
7379 The system library extension (".DLL" or ".so") must be omitted.
7380 A full path can be specified; if not, then the library must reside on the
7381 system's default library path.
7382
7383 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7384 of that name in one of the default VirtualBox library directories.
7385
7386 For details about VirtualBox authentication libraries and how to implement
7387 them, please refer to the VirtualBox manual.
7388
7389 <note>
7390 Setting this property to @c null or empty string will restore the
7391 initial value.
7392 </note>
7393 </desc>
7394 </attribute>
7395
7396 <attribute name="webServiceAuthLibrary" type="wstring">
7397 <desc>
7398 Library that provides authentication for webservice clients. The library
7399 is used if a virtual machine's authentication type is set to "external"
7400 in the VM RemoteDisplay configuration and will be called from
7401 within the <link to="IWebsessionManager::logon" /> implementation.
7402
7403 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7404 there is no per-VM setting for this, as the webservice is a global
7405 resource (if it is running). Only for this setting (for the webservice),
7406 setting this value to a literal <tt>"null"</tt> string disables authentication,
7407 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7408 no matter what user name and password are supplied.
7409
7410 The initial value of this property is <tt>"VRDPAuth"</tt>,
7411 meaning that the webservice will use the same authentication
7412 library that is used by default for VBoxVRDP (again, see
7413 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7414 The format and calling convention of authentication libraries
7415 is the same for the webservice as it is for VBoxVRDP.
7416
7417 <note>
7418 Setting this property to @c null or empty string will restore the
7419 initial value.
7420 </note>
7421 </desc>
7422 </attribute>
7423
7424 <attribute name="LogHistoryCount" type="unsigned long">
7425 <desc>
7426 This value specifies how many old release log files are kept.
7427 </desc>
7428 </attribute>
7429
7430 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7431 <desc>This value hold the default audio driver for the current
7432 system.</desc>
7433 </attribute>
7434
7435 <method name="getMaxDevicesPerPortForStorageBus">
7436 <desc>Returns the maximum number of devices which can be attached to a port
7437 for the given storage bus.</desc>
7438
7439 <param name="bus" type="StorageBus" dir="in">
7440 <desc>The storage bus type to get the value for.</desc>
7441 </param>
7442
7443 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
7444 <desc>The maximum number of devices which can eb attached to the port for the given
7445 storage bus.</desc>
7446 </param>
7447 </method>
7448
7449 <method name="getMinPortCountForStorageBus">
7450 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
7451
7452 <param name="bus" type="StorageBus" dir="in">
7453 <desc>The storage bus type to get the value for.</desc>
7454 </param>
7455
7456 <param name="minPortCount" type="unsigned long" dir="return">
7457 <desc>The minimum number of ports for the given storage bus.</desc>
7458 </param>
7459 </method>
7460
7461 <method name="getMaxPortCountForStorageBus">
7462 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
7463
7464 <param name="bus" type="StorageBus" dir="in">
7465 <desc>The storage bus type to get the value for.</desc>
7466 </param>
7467
7468 <param name="maxPortCount" type="unsigned long" dir="return">
7469 <desc>The maximum number of ports for the given storage bus.</desc>
7470 </param>
7471 </method>
7472
7473 <method name="getMaxInstancesOfStorageBus">
7474 <desc>Returns the maximum number of storage bus instances which
7475 can be configured for each VM. This corresponds to the number of
7476 storage controllers one can have.</desc>
7477
7478 <param name="bus" type="StorageBus" dir="in">
7479 <desc>The storage bus type to get the value for.</desc>
7480 </param>
7481
7482 <param name="maxInstances" type="unsigned long" dir="return">
7483 <desc>The maximum number of instances for the given storage bus.</desc>
7484 </param>
7485 </method>
7486
7487 <method name="getDeviceTypesForStorageBus">
7488 <desc>Returns list of all the supported device types
7489 (<link to="DeviceType"/>) for the given type of storage
7490 bus.</desc>
7491
7492 <param name="bus" type="StorageBus" dir="in">
7493 <desc>The storage bus type to get the value for.</desc>
7494 </param>
7495
7496 <param name="deviceTypes" type="DeviceType" safearray="yes" dir="return">
7497 <desc>The list of all supported device types for the given storage bus.</desc>
7498 </param>
7499 </method>
7500 </interface>
7501
7502 <!--
7503 // IGuest
7504 /////////////////////////////////////////////////////////////////////////
7505 -->
7506
7507 <interface
7508 name="IGuestOSType" extends="$unknown"
7509 uuid="e3f6727e-a09b-41ea-a824-864a176472f3"
7510 wsmap="struct"
7511 >
7512 <desc>
7513 </desc>
7514
7515 <attribute name="familyId" type="wstring" readonly="yes">
7516 <desc>Guest OS family identifier string.</desc>
7517 </attribute>
7518
7519 <attribute name="familyDescription" type="wstring" readonly="yes">
7520 <desc>Human readable description of the guest OS family.</desc>
7521 </attribute>
7522
7523 <attribute name="id" type="wstring" readonly="yes">
7524 <desc>Guest OS identifier string.</desc>
7525 </attribute>
7526
7527 <attribute name="description" type="wstring" readonly="yes">
7528 <desc>Human readable description of the guest OS.</desc>
7529 </attribute>
7530
7531 <attribute name="is64Bit" type="boolean" readonly="yes">
7532 <desc>Returns @c true if the given OS is 64-bit</desc>
7533 </attribute>
7534
7535 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7536 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7537 </attribute>
7538
7539 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7540 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7541 </attribute>
7542
7543 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7544 <desc>Recommended RAM size in Megabytes.</desc>
7545 </attribute>
7546
7547 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7548 <desc>Recommended video RAM size in Megabytes.</desc>
7549 </attribute>
7550
7551 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7552 <desc>Recommended hard disk size in Megabytes.</desc>
7553 </attribute>
7554
7555 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7556 <desc>Returns recommended network adapter for this OS type.</desc>
7557 </attribute>
7558
7559 <attribute name="recommendedPae" type="boolean" readonly="yes">
7560 <desc>Returns @c true if using PAE is recommended for this OS type.</desc>
7561 </attribute>
7562
7563 <attribute name="recommendedDvdStorageController" type="StorageControllerType" readonly="yes">
7564 <desc>Recommended storage controller type for DVD/CD drives.</desc>
7565 </attribute>
7566
7567 <attribute name="recommendedDvdStorageBus" type="StorageBus" readonly="yes">
7568 <desc>Recommended storage bus type for DVD/CD drives.</desc>
7569 </attribute>
7570
7571 <attribute name="recommendedHdStorageController" type="StorageControllerType" readonly="yes">
7572 <desc>Recommended storage controller type for HD drives.</desc>
7573 </attribute>
7574
7575 <attribute name="recommendedHdStorageBus" type="StorageBus" readonly="yes">
7576 <desc>Recommended storage bus type for HD drives.</desc>
7577 </attribute>
7578
7579 <attribute name="recommendedFirmware" type="FirmwareType" readonly="yes">
7580 <desc>Recommended firmware type.</desc>
7581 </attribute>
7582
7583 <attribute name="recommendedUsbHid" type="boolean" readonly="yes">
7584 <desc>Returns @c true if using USB Human Interface Devices, such as keyboard and mouse recommended.</desc>
7585 </attribute>
7586
7587 <attribute name="recommendedHpet" type="boolean" readonly="yes">
7588 <desc>Returns @c true if using HPET is recommended for this OS type.</desc>
7589 </attribute>
7590
7591 <attribute name="recommendedUsbTablet" type="boolean" readonly="yes">
7592 <desc>Returns @c true if using a USB Tablet is recommended.</desc>
7593 </attribute>
7594
7595 <attribute name="recommendedRtcUseUtc" type="boolean" readonly="yes">
7596 <desc>Returns @c true if the RTC of this VM should be set to UTC</desc>
7597 </attribute>
7598
7599 </interface>
7600
7601 <interface
7602 name="IGuest" extends="$unknown"
7603 uuid="506da00d-1ca5-4ccf-851d-8683253d0f5e"
7604 wsmap="managed"
7605 >
7606 <desc>
7607 The IGuest interface represents information about the operating system
7608 running inside the virtual machine. Used in
7609 <link to="IConsole::guest"/>.
7610
7611 IGuest provides information about the guest operating system, whether
7612 Guest Additions are installed and other OS-specific virtual machine
7613 properties.
7614 </desc>
7615
7616 <attribute name="OSTypeId" type="wstring" readonly="yes">
7617 <desc>
7618 Identifier of the Guest OS type as reported by the Guest
7619 Additions.
7620 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7621 an IGuestOSType object representing details about the given
7622 Guest OS type.
7623 <note>
7624 If Guest Additions are not installed, this value will be
7625 the same as <link to="IMachine::OSTypeId"/>.
7626 </note>
7627 </desc>
7628 </attribute>
7629
7630 <attribute name="additionsActive" type="boolean" readonly="yes">
7631 <desc>
7632 Flag whether the Guest Additions are installed and active
7633 in which case their version will be returned by the
7634 <link to="#additionsVersion"/> property.
7635 </desc>
7636 </attribute>
7637
7638 <attribute name="additionsVersion" type="wstring" readonly="yes">
7639 <desc>
7640 Version of the Guest Additions including the revision (3 decimal numbers
7641 separated by dots + revision number) installed on the guest or empty
7642 when the Additions are not installed.
7643 </desc>
7644 </attribute>
7645
7646 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7647 <desc>
7648 Flag whether seamless guest display rendering (seamless desktop
7649 integration) is supported.
7650 </desc>
7651 </attribute>
7652
7653 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7654 <desc>
7655 Flag whether the guest is in graphics mode. If it is not, then
7656 seamless rendering will not work, resize hints are not immediately
7657 acted on and guest display resizes are probably not initiated by
7658 the guest additions.
7659 </desc>
7660 </attribute>
7661
7662 <attribute name="memoryBalloonSize" type="unsigned long">
7663 <desc>Guest system memory balloon size in megabytes (transient property).</desc>
7664 </attribute>
7665
7666 <attribute name="statisticsUpdateInterval" type="unsigned long">
7667 <desc>Interval to update guest statistics in seconds.</desc>
7668 </attribute>
7669
7670 <method name="internalGetStatistics">
7671 <desc>
7672 Internal method; do not use as it might change at any time
7673 </desc>
7674 <param name="cpuUser" type="unsigned long" dir="out">
7675 <desc>Percentage of processor time spent in user mode as seen by the guest</desc>
7676 </param>
7677 <param name="cpuKernel" type="unsigned long" dir="out">
7678 <desc>Percentage of processor time spent in kernel mode as seen by the guest</desc>
7679 </param>
7680 <param name="cpuIdle" type="unsigned long" dir="out">
7681 <desc>Percentage of processor time spent idling as seen by the guest</desc>
7682 </param>
7683 <param name="memTotal" type="unsigned long" dir="out">
7684 <desc>Total amount of physical guest RAM</desc>
7685 </param>
7686 <param name="memFree" type="unsigned long" dir="out">
7687 <desc>Free amount of physical guest RAM</desc>
7688 </param>
7689 <param name="memBalloon" type="unsigned long" dir="out">
7690 <desc>Amount of ballooned physical guest RAM</desc>
7691 </param>
7692 <param name="memShared" type="unsigned long" dir="out">
7693 <desc>Amount of shared physical guest RAM</desc>
7694 </param>
7695 <param name="memCache" type="unsigned long" dir="out">
7696 <desc>Total amount of guest (disk) cache memory</desc>
7697 </param>
7698 <param name="pagedTotal" type="unsigned long" dir="out">
7699 <desc>Total amount of space in the page file</desc>
7700 </param>
7701 <param name="memAllocTotal" type="unsigned long" dir="out">
7702 <desc>Total amount of memory allocated by the hypervisor</desc>
7703 </param>
7704 <param name="memFreeTotal" type="unsigned long" dir="out">
7705 <desc>Total amount of free memory available in the hypervisor</desc>
7706 </param>
7707 <param name="memBalloonTotal" type="unsigned long" dir="out">
7708 <desc>Total amount of memory ballooned by the hypervisor</desc>
7709 </param>
7710 <param name="memSharedTotal" type="unsigned long" dir="out">
7711 <desc>Total amount of shared memory in the hypervisor</desc>
7712 </param>
7713 </method>
7714
7715 <method name="setCredentials">
7716 <desc>
7717 Store login credentials that can be queried by guest operating
7718 systems with Additions installed. The credentials are transient
7719 to the session and the guest may also choose to erase them. Note
7720 that the caller cannot determine whether the guest operating system
7721 has queried or made use of the credentials.
7722
7723 <result name="VBOX_E_VM_ERROR">
7724 VMM device is not available.
7725 </result>
7726
7727 </desc>
7728 <param name="userName" type="wstring" dir="in">
7729 <desc>User name string, can be empty</desc>
7730 </param>
7731 <param name="password" type="wstring" dir="in">
7732 <desc>Password string, can be empty</desc>
7733 </param>
7734 <param name="domain" type="wstring" dir="in">
7735 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7736 </param>
7737 <param name="allowInteractiveLogon" type="boolean" dir="in">
7738 <desc>
7739 Flag whether the guest should alternatively allow the user to
7740 interactively specify different credentials. This flag might
7741 not be supported by all versions of the Additions.
7742 </desc>
7743 </param>
7744 </method>
7745
7746 <method name="executeProcess">
7747 <desc>
7748 Executes an existing program inside the guest VM.
7749
7750 <result name="VBOX_E_IPRT_ERROR">
7751 Could not execute process.
7752 </result>
7753
7754 </desc>
7755 <param name="execName" type="wstring" dir="in">
7756 <desc>
7757 Full path name of the command to execute on the guest; the
7758 commands has to exists in the guest VM in order to be executed.
7759 </desc>
7760 </param>
7761 <param name="flags" type="unsigned long" dir="in">
7762 <desc>
7763 Execution flags - currently not supported and therefore
7764 has to be set to 0.
7765 </desc>
7766 </param>
7767 <param name="arguments" type="wstring" safearray="yes" dir="in">
7768 <desc>
7769 Array of arguments passed to the execution command.
7770 </desc>
7771 </param>
7772 <param name="environment" type="wstring" safearray="yes" dir="in">
7773 <desc>
7774 Environment variables that can be set while the command is being
7775 executed, in form of "NAME=VALUE"; one pair per entry. To unset a
7776 variable just set its name ("NAME") without a value.
7777 </desc>
7778 </param>
7779 <param name="userName" type="wstring" dir="in">
7780 <desc>
7781 User name under which the command will be executed; has to exist
7782 and have the appropriate rights to execute programs in the VM.
7783 </desc>
7784 </param>
7785 <param name="password" type="wstring" dir="in">
7786 <desc>
7787 Password of the user account specified.
7788 </desc>
7789 </param>
7790 <param name="timeoutMS" type="unsigned long" dir="in">
7791 <desc>
7792 The maximum timeout value (in msec) to wait for finished program
7793 execution. Pass 0 for an infinite timeout.
7794 </desc>
7795 </param>
7796 <param name="pid" type="unsigned long" dir="out">
7797 <desc>
7798 The PID (process ID) of the started command for later reference.
7799 </desc>
7800 </param>
7801 <param name="progress" type="IProgress" dir="return">
7802 <desc>Progress object to track the operation completion.</desc>
7803 </param>
7804 </method>
7805
7806 <method name="getProcessOutput">
7807 <desc>
7808 Retrieves output of a formerly started process.
7809
7810 <result name="VBOX_E_IPRT_ERROR">
7811 Could not retrieve output.
7812 </result>
7813
7814 </desc>
7815 <param name="pid" type="unsigned long" dir="in">
7816 <desc>
7817 Process id returned by earlier executeProcess() call.
7818 </desc>
7819 </param>
7820 <param name="flags" type="unsigned long" dir="in">
7821 <desc>
7822 Flags describing which output to retrieve.
7823 </desc>
7824 </param>
7825 <param name="timeoutMS" type="unsigned long" dir="in">
7826 <desc>
7827 The maximum timeout value (in msec) to wait for output
7828 data. Pass 0 for an infinite timeout.
7829 </desc>
7830 </param>
7831 <param name="size" type="long long" dir="in">
7832 <desc>
7833 Size in bytes to read in the buffer.
7834 </desc>
7835 </param>
7836 <param name="data" type="octet" dir="return" safearray="yes">
7837 <desc>
7838 Buffer for retrieving the actual output. A data size of 0 means end of file
7839 if the requested size was not 0. This is the unprocessed
7840 output data, i.e. the line ending style depends on the platform of
7841 the system the server is running on.
7842 </desc>
7843 </param>
7844 </method>
7845
7846 <method name="getProcessStatus">
7847 <desc>
7848 Retrieves status, exit code and the exit reason of a formerly started process.
7849
7850 <result name="VBOX_E_IPRT_ERROR">
7851 Process with specified PID was not found.
7852 </result>
7853
7854 </desc>
7855 <param name="pid" type="unsigned long" dir="in">
7856 <desc>
7857 Process id returned by earlier executeProcess() call.
7858 </desc>
7859 </param>
7860 <param name="exitcode" type="unsigned long" dir="out">
7861 <desc>
7862 The exit code (if available).
7863 </desc>
7864 </param>
7865 <param name="flags" type="unsigned long" dir="out">
7866 <desc>
7867 Additional flags of process status (not used at the moment).
7868 </desc>
7869 </param>
7870 <param name="reason" type="unsigned long" dir="return">
7871 <desc>
7872 The current process status.
7873 </desc>
7874 </param>
7875 </method>
7876
7877 </interface>
7878
7879
7880 <!--
7881 // IProgress
7882 /////////////////////////////////////////////////////////////////////////
7883 -->
7884
7885 <interface
7886 name="IProgress" extends="$unknown"
7887 uuid="A163C98F-8635-4AA8-B770-A9941737F3EF"
7888 wsmap="managed"
7889 >
7890 <desc>
7891 The IProgress interface is used to track and control
7892 asynchronous tasks within VirtualBox.
7893
7894 An instance of this is returned every time VirtualBox starts
7895 an asynchronous task (in other words, a separate thread) which
7896 continues to run after a method call returns. For example,
7897 <link to="IConsole::saveState" />, which saves the state of
7898 a running virtual machine, can take a long time to complete.
7899 To be able to display a progress bar, a user interface such as
7900 the VirtualBox graphical user interface can use the IProgress
7901 object returned by that method.
7902
7903 Note that IProgress is a "read-only" interface in the sense
7904 that only the VirtualBox internals behind the Main API can
7905 create and manipulate progress objects, whereas client code
7906 can only use the IProgress object to monitor a task's
7907 progress and, if <link to="#cancelable" /> is @c true,
7908 cancel the task by calling <link to="#cancel" />.
7909
7910 A task represented by IProgress consists of either one or
7911 several sub-operations that run sequentially, one by one (see
7912 <link to="#operation" /> and <link to="#operationCount" />).
7913 Every operation is identified by a number (starting from 0)
7914 and has a separate description.
7915
7916 You can find the individual percentage of completion of the current
7917 operation in <link to="#operationPercent" /> and the
7918 percentage of completion of the task as a whole
7919 in <link to="#percent" />.
7920
7921 Similarly, you can wait for the completion of a particular
7922 operation via <link to="#waitForOperationCompletion" /> or
7923 for the completion of the whole task via
7924 <link to="#waitForCompletion" />.
7925 </desc>
7926
7927 <attribute name="id" type="uuid" mod="string" readonly="yes">
7928 <desc>ID of the task.</desc>
7929 </attribute>
7930
7931 <attribute name="description" type="wstring" readonly="yes">
7932 <desc>Description of the task.</desc>
7933 </attribute>
7934
7935 <attribute name="initiator" type="$unknown" readonly="yes">
7936 <desc>Initiator of the task.</desc>
7937 </attribute>
7938
7939 <attribute name="cancelable" type="boolean" readonly="yes">
7940 <desc>Whether the task can be interrupted.</desc>
7941 </attribute>
7942
7943 <attribute name="percent" type="unsigned long" readonly="yes">
7944 <desc>
7945 Current progress value of the task as a whole, in percent.
7946 This value depends on how many operations are already complete.
7947 Returns 100 if <link to="#completed" /> is @c true.
7948 </desc>
7949 </attribute>
7950
7951 <attribute name="timeRemaining" type="long" readonly="yes">
7952 <desc>
7953 Estimated remaining time until the task completes, in
7954 seconds. Returns 0 once the task has completed; returns -1
7955 if the remaining time cannot be computed, in particular if
7956 the current progress is 0.
7957
7958 Even if a value is returned, the estimate will be unreliable
7959 for low progress values. It will become more reliable as the
7960 task progresses; it is not recommended to display an ETA
7961 before at least 20% of a task have completed.
7962 </desc>
7963 </attribute>
7964
7965 <attribute name="completed" type="boolean" readonly="yes">
7966 <desc>Whether the task has been completed.</desc>
7967 </attribute>
7968
7969 <attribute name="canceled" type="boolean" readonly="yes">
7970 <desc>Whether the task has been canceled.</desc>
7971 </attribute>
7972
7973 <attribute name="resultCode" type="long" readonly="yes">
7974 <desc>
7975 Result code of the progress task.
7976 Valid only if <link to="#completed"/> is @c true.
7977 </desc>
7978 </attribute>
7979
7980 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7981 <desc>
7982 Extended information about the unsuccessful result of the
7983 progress operation. May be @c null if no extended information
7984 is available.
7985 Valid only if <link to="#completed"/> is @c true and
7986 <link to="#resultCode"/> indicates a failure.
7987 </desc>
7988 </attribute>
7989
7990 <attribute name="operationCount" type="unsigned long" readonly="yes">
7991 <desc>
7992 Number of sub-operations this task is divided into.
7993 Every task consists of at least one suboperation.
7994 </desc>
7995 </attribute>
7996
7997 <attribute name="operation" type="unsigned long" readonly="yes">
7998 <desc>Number of the sub-operation being currently executed.</desc>
7999 </attribute>
8000
8001 <attribute name="operationDescription" type="wstring" readonly="yes">
8002 <desc>
8003 Description of the sub-operation being currently executed.
8004 </desc>
8005 </attribute>
8006
8007 <attribute name="operationPercent" type="unsigned long" readonly="yes">
8008 <desc>Progress value of the current sub-operation only, in percent.</desc>
8009 </attribute>
8010
8011 <attribute name="operationWeight" type="unsigned long" readonly="yes">
8012 <desc>Weight value of the current sub-operation only.</desc>
8013 </attribute>
8014
8015 <attribute name="timeout" type="unsigned long">
8016 <desc>
8017 When non-zero, this specifies the number of milliseconds after which
8018 the operation will automatically be canceled. This can only be set on
8019 cancelable objects.
8020 </desc>
8021 </attribute>
8022
8023 <method name="setCurrentOperationProgress">
8024 <desc>Internal method, not to be called externally.</desc>
8025 <param name="percent" type="unsigned long" dir="in" />
8026 </method>
8027 <method name="setNextOperation">
8028 <desc>Internal method, not to be called externally.</desc>
8029 <param name="nextOperationDescription" type="wstring" dir="in" />
8030 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8031 </method>
8032
8033 <method name="waitForCompletion">
8034 <desc>
8035 Waits until the task is done (including all sub-operations)
8036 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8037
8038 Note that the VirtualBox/XPCOM/COM/native event queues of the calling
8039 thread are not processed while waiting. Neglecting event queues may
8040 have dire consequences (degrade performance, resource hogs,
8041 deadlocks, etc.), this is specially so for the main thread on
8042 platforms using XPCOM. Callers are adviced wait for short periods
8043 and service their event queues between calls, or to create a worker
8044 thread to do the waiting.
8045
8046 <result name="VBOX_E_IPRT_ERROR">
8047 Failed to wait for task completion.
8048 </result>
8049 </desc>
8050
8051 <param name="timeout" type="long" dir="in">
8052 <desc>
8053 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8054 </desc>
8055 </param>
8056 </method>
8057
8058 <method name="waitForOperationCompletion">
8059 <desc>
8060 Waits until the given operation is done with a given timeout in
8061 milliseconds; specify -1 for an indefinite wait.
8062
8063 See <link to="#waitForCompletion"> for event queue considerations.</link>
8064
8065 <result name="VBOX_E_IPRT_ERROR">
8066 Failed to wait for operation completion.
8067 </result>
8068
8069 </desc>
8070 <param name="operation" type="unsigned long" dir="in">
8071 <desc>
8072 Number of the operation to wait for.
8073 Must be less than <link to="#operationCount"/>.
8074 </desc>
8075 </param>
8076 <param name="timeout" type="long" dir="in">
8077 <desc>
8078 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8079 </desc>
8080 </param>
8081 </method>
8082
8083 <method name="cancel">
8084 <desc>
8085 Cancels the task.
8086 <note>
8087 If <link to="#cancelable"/> is @c false, then this method will fail.
8088 </note>
8089
8090 <result name="VBOX_E_INVALID_OBJECT_STATE">
8091 Operation cannot be canceled.
8092 </result>
8093
8094 </desc>
8095 </method>
8096
8097 </interface>
8098
8099 <!--
8100 // ISnapshot
8101 /////////////////////////////////////////////////////////////////////////
8102 -->
8103
8104 <interface
8105 name="ISnapshot" extends="$unknown"
8106 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8107 wsmap="managed"
8108 >
8109 <desc>
8110 The ISnapshot interface represents a snapshot of the virtual
8111 machine.
8112
8113 Together with the differencing media that are created
8114 when a snapshot is taken, a machine can be brought back to
8115 the exact state it was in when the snapshot was taken.
8116
8117 The ISnapshot interface has no methods, only attributes; snapshots
8118 are controlled through methods of the <link to="IConsole" /> interface
8119 which also manage the media associated with the snapshot.
8120 The following operations exist:
8121
8122 <ul>
8123 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8124 by creating new, empty differencing images for the machine's
8125 media and saving the VM settings and (if the VM is running)
8126 the current VM state in the snapshot.
8127
8128 The differencing images will then receive all data written to
8129 the machine's media, while their parent (base) images
8130 remain unmodified after the snapshot has been taken (see
8131 <link to="IMedium" /> for details about differencing images).
8132 This simplifies restoring a machine to the state of a snapshot:
8133 only the differencing images need to be deleted.
8134
8135 The current machine state is not changed by taking a snapshot.
8136 If the machine is running, it will resume execution after the
8137 snapshot has been taken.
8138 </li>
8139
8140 <li><link to="IConsole::restoreSnapshot"/>: this goes back to
8141 a previous snapshot. This resets the machine's state to that of
8142 the previous snapshot by deleting the differencing image of each
8143 of the machine's media and setting the machine's settings
8144 and state to the state that was saved in the snapshot (if any).
8145
8146 This destroys the machine's current state.
8147 </li>
8148
8149 <li><link to="IConsole::deleteSnapshot"/>: deletes a snapshot
8150 without affecting the current machine state.
8151
8152 This does not change the machine, but instead frees the resources
8153 allocated when the snapshot was taken: the settings and machine state
8154 is deleted (if any), and the snapshot's differencing image for each
8155 of the machine's media gets merged with its parent image.
8156
8157 Neither the current machine state nor other snapshots are affected
8158 by this operation, except that parent media will be modified
8159 to contain the disk data associated with the snapshot being deleted.
8160 </li>
8161 </ul>
8162
8163 Each snapshot contains the settings of the virtual machine (hardware
8164 configuration etc.). In addition, if the machine was running when the
8165 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState::Running"/>),
8166 the current VM state is saved in the snapshot (similarly to what happens
8167 when a VM's state is saved). The snapshot is then said to
8168 be <i>online</i> because when restoring it, the VM will be running.
8169
8170 If the machine is saved (<link to="MachineState::Saved"/>), the snapshot
8171 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8172
8173 Otherwise, if the machine was not running (<link to="MachineState::PoweredOff"/>
8174 or <link to="MachineState::Aborted"/>), the snapshot is <i>offline</i>;
8175 it then contains a so-called "zero execution state", representing a
8176 machine that is powered off.
8177
8178 <h3>Snapshot branches and the "current" snapshot</h3>
8179
8180 Snapshots can be chained, whereby every next snapshot is based on the
8181 previous one. This chaining is related to medium branching
8182 (see the <link to="IMedium"/> description) in that every time
8183 a new snapshot is created, a new differencing medium is implicitly
8184 created for all normal media attached to the machine.
8185
8186 Each virtual machine has a "current snapshot", identified by
8187 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8188 to the last snapshot in the chain. In a future version of VirtualBox,
8189 it will be possible to reset a machine's current state to that of an
8190 earlier snapshot without deleting the current state so that it will be
8191 possible to create alternative snapshot paths in a snapshot tree.
8192
8193 In the current implementation, multiple snapshot branches within one
8194 virtual machine are not allowed. Every machine has a single branch,
8195 and <link to="IConsole::takeSnapshot"/> operation adds a new
8196 snapshot to the top of that branch.
8197 </desc>
8198
8199 <attribute name="id" type="uuid" mod="string" readonly="yes">
8200 <desc>UUID of the snapshot.</desc>
8201 </attribute>
8202
8203 <attribute name="name" type="wstring">
8204 <desc>Short name of the snapshot.</desc>
8205 </attribute>
8206
8207 <attribute name="description" type="wstring">
8208 <desc>Optional description of the snapshot.</desc>
8209 </attribute>
8210
8211 <attribute name="timeStamp" type="long long" readonly="yes">
8212 <desc>
8213 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8214 </desc>
8215 </attribute>
8216
8217 <attribute name="online" type="boolean" readonly="yes">
8218 <desc>
8219 @c true if this snapshot is an online snapshot and @c false otherwise.
8220
8221 When this attribute is @c true, the
8222 <link to="IMachine::stateFilePath"/> attribute of the
8223 <link to="#machine"/> object associated with this snapshot
8224 will point to the saved state file. Otherwise, it will be
8225 an empty string.
8226 </desc>
8227 </attribute>
8228
8229 <attribute name="machine" type="IMachine" readonly="yes">
8230 <desc>
8231 Virtual machine this snapshot is taken on. This object
8232 stores all settings the machine had when taking this snapshot.
8233 <note>
8234 The returned machine object is immutable, i.e. no
8235 any settings can be changed.
8236 </note>
8237 </desc>
8238 </attribute>
8239
8240 <attribute name="parent" type="ISnapshot" readonly="yes">
8241 <desc>
8242 Parent snapshot (a snapshot this one is based on), or
8243 @c null if the snapshot has no parent (i.e. is the first snapshot).
8244 </desc>
8245 </attribute>
8246
8247 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8248 <desc>
8249 Child snapshots (all snapshots having this one as a parent).
8250 </desc>
8251 </attribute>
8252
8253 </interface>
8254
8255
8256 <!--
8257 // IMedium
8258 /////////////////////////////////////////////////////////////////////////
8259 -->
8260
8261 <enum
8262 name="MediumState"
8263 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8264 >
8265 <desc>
8266 Virtual medium state.
8267 <see>IMedium</see>
8268 </desc>
8269
8270 <const name="NotCreated" value="0">
8271 <desc>
8272 Associated medium storage does not exist (either was not created yet or
8273 was deleted).
8274 </desc>
8275 </const>
8276 <const name="Created" value="1">
8277 <desc>
8278 Associated storage exists and accessible; this gets set if the
8279 accessibility check performed by <link to="IMedium::refreshState" />
8280 was successful.
8281 </desc>
8282 </const>
8283 <const name="LockedRead" value="2">
8284 <desc>
8285 Medium is locked for reading (see <link to="IMedium::lockRead"/>),
8286 no data modification is possible.
8287 </desc>
8288 </const>
8289 <const name="LockedWrite" value="3">
8290 <desc>
8291 Medium is locked for writing (see <link to="IMedium::lockWrite"/>),
8292 no concurrent data reading or modification is possible.
8293 </desc>
8294 </const>
8295 <const name="Inaccessible" value="4">
8296 <desc>
8297 Medium accessiblity check (see <link to="IMedium::refreshState" />) has
8298 not yet been performed, or else, associated medium storage is not
8299 accessible. In the first case, <link to="IMedium::lastAccessError"/>
8300 is empty, in the second case, it describes the error that occured.
8301 </desc>
8302 </const>
8303 <const name="Creating" value="5">
8304 <desc>
8305 Associated medium storage is being created.
8306 </desc>
8307 </const>
8308 <const name="Deleting" value="6">
8309 <desc>
8310 Associated medium storage is being deleted.
8311 </desc>
8312 </const>
8313 </enum>
8314
8315 <enum
8316 name="MediumType"
8317 uuid="46bf1fd4-ad86-4ded-8c49-28bd2d148e5a"
8318 >
8319 <desc>
8320 Virtual medium type.
8321 <see>IMedium</see>
8322 </desc>
8323
8324 <const name="Normal" value="0">
8325 <desc>
8326 Normal medium (attached directly or indirectly, preserved
8327 when taking snapshots).
8328 </desc>
8329 </const>
8330 <const name="Immutable" value="1">
8331 <desc>
8332 Immutable medium (attached indirectly, changes are wiped out
8333 the next time the virtual machine is started).
8334 </desc>
8335 </const>
8336 <const name="Writethrough" value="2">
8337 <desc>
8338 Write through medium (attached directly, ignored when
8339 taking snapshots).
8340 </desc>
8341 </const>
8342 <const name="Shareable" value="3">
8343 <desc>
8344 Allow using this medium concurrently by several machines.
8345 <note>Present since VirtualBox 3.2.0, and accepted since 3.2.8.</note>
8346 </desc>
8347 </const>
8348 </enum>
8349
8350 <enum
8351 name="MediumVariant"
8352 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8353 >
8354 <desc>
8355 Virtual medium image variant. More than one flag may be set.
8356 <see>IMedium</see>
8357 </desc>
8358
8359 <const name="Standard" value="0">
8360 <desc>
8361 No particular variant requested, results in using the backend default.
8362 </desc>
8363 </const>
8364 <const name="VmdkSplit2G" value="0x01">
8365 <desc>
8366 VMDK image split in chunks of less than 2GByte.
8367 </desc>
8368 </const>
8369 <const name="VmdkStreamOptimized" value="0x04">
8370 <desc>
8371 VMDK streamOptimized image. Special import/export format which is
8372 read-only/append-only.
8373 </desc>
8374 </const>
8375 <const name="VmdkESX" value="0x08">
8376 <desc>
8377 VMDK format variant used on ESX products.
8378 </desc>
8379 </const>
8380 <const name="Fixed" value="0x10000">
8381 <desc>
8382 Fixed image. Only allowed for base images.
8383 </desc>
8384 </const>
8385 <const name="Diff" value="0x20000">
8386 <desc>
8387 Differencing image. Only allowed for child images.
8388 </desc>
8389 </const>
8390 </enum>
8391
8392 <interface
8393 name="IMediumAttachment" extends="$unknown"
8394 uuid="c29452cc-ca72-404b-9261-cfc514f1e412"
8395 wsmap="struct"
8396 >
8397 <desc>
8398 The IMediumAttachment interface links storage media to virtual machines.
8399 For each medium (<link to="IMedium"/>) which has been attached to a
8400 storage controller (<link to="IStorageController"/>) of a machine
8401 (<link to="IMachine"/>) via the <link to="IMachine::attachDevice" />
8402 method, one instance of IMediumAttachment is added to the machine's
8403 <link to="IMachine::mediumAttachments"/> array attribute.
8404
8405 Each medium attachment specifies the storage controller as well as a
8406 port and device number and the IMedium instance representing a virtual
8407 hard disk or floppy or DVD image.
8408
8409 For removeable media (DVDs or floppies), there are two additional
8410 options. For one, the IMedium instance can be @c null to represent
8411 an empty drive with no media inserted (see <link to="IMachine::mountMedium" />);
8412 secondly, the medium can be one of the pseudo-media for host drives
8413 listed in <link to="IHost::DVDDrives"/> or <link to="IHost::floppyDrives"/>.
8414 </desc>
8415
8416 <attribute name="medium" type="IMedium" readonly="yes">
8417 <desc>Medium object associated with this attachment; it
8418 can be @c null for removable devices.</desc>
8419 </attribute>
8420
8421 <attribute name="controller" type="wstring" readonly="yes">
8422 <desc>Name of the storage controller of this attachment; this
8423 refers to one of the controllers in <link to="IMachine::storageControllers" />
8424 by name.</desc>
8425 </attribute>
8426
8427 <attribute name="port" type="long" readonly="yes">
8428 <desc>Port number of this attachment.
8429 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8430 </desc>
8431 </attribute>
8432
8433 <attribute name="device" type="long" readonly="yes">
8434 <desc>Device slot number of this attachment.
8435 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8436 </desc>
8437 </attribute>
8438
8439 <attribute name="type" type="DeviceType" readonly="yes">
8440 <desc>Device type of this attachment.</desc>
8441 </attribute>
8442
8443 <attribute name="passthrough" type="boolean" readonly="yes">
8444 <desc>Pass I/O requests through to a device on the host.</desc>
8445 </attribute>
8446
8447 <attribute name="bandwidthLimit" type="unsigned long">
8448 <desc>
8449 Maximum throughput allowed for this medium attachment, in units of 1 mbps.
8450 A zero value means uncapped/unlimited.
8451 </desc>
8452 </attribute>
8453
8454 </interface>
8455
8456 <interface
8457 name="IMedium" extends="$unknown"
8458 uuid="858ea9d3-9ade-4aa7-91b7-d8a40f8f9b16"
8459 wsmap="managed"
8460 >
8461 <desc>
8462 The IMedium interface represents virtual storage for a machine's
8463 hard disks, CD/DVD or floppy drives. It will typically represent
8464 a disk image on the host, for example a VDI or VMDK file representing
8465 a virtual hard disk, or an ISO or RAW file representing virtual
8466 removable media, but can also point to a network location (e.g.
8467 for iSCSI targets).
8468
8469 Instances of IMedium are connected to virtual machines by way of
8470 medium attachments (see <link to="IMediumAttachment" />), which link
8471 the storage medium to a particular device slot of a storage controller
8472 of the virtual machine.
8473 In the VirtualBox API, virtual storage is therefore always represented
8474 by the following chain of object links:
8475
8476 <ul>
8477 <li><link to="IMachine::storageControllers"/> contains an array of
8478 storage controllers (IDE, SATA, SCSI, SAS or a floppy controller;
8479 these are instances of <link to="IStorageController"/>).</li>
8480 <li><link to="IMachine::mediumAttachments"/> contains an array of
8481 medium attachments (instances of <link to="IMediumAttachment"/>),
8482 each containing a storage controller from the above array, a
8483 port/device specification, and an instance of IMedium representing
8484 the medium storage (image file).
8485
8486 For removable media, the storage medium is optional; a medium
8487 attachment with no medium represents a CD/DVD or floppy drive
8488 with no medium inserted. By contrast, hard disk attachments
8489 will always have an IMedium object attached.</li>
8490 <li>Each IMedium in turn points to a storage unit (such as a file
8491 on the host computer or a network resource) that holds actual
8492 data. This location is represented by the <link to="#location"/>
8493 attribute.</li>
8494 </ul>
8495
8496 Existing media are opened using <link to="IVirtualBox::openMedium"/>;
8497 new hard disk media can be created with the VirtualBox API using the
8498 <link to="IVirtualBox::createHardDisk"/> method.
8499
8500 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8501 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8502 type in a regular file.
8503
8504 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8505 drive; in that case the <link to="#id" /> attribute contains the UUID of
8506 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8507
8508 <h3>Known media</h3>
8509
8510 When an existing medium is opened for the first time, it is automatically
8511 remembered by the given VirtualBox installation or, in other words, becomes
8512 a <i>known medium</i>. Known media are stored in the media
8513 registry transparently maintained by VirtualBox and stored in settings
8514 files so that this registry is preserved when VirtualBox is not running.
8515
8516 Newly created virtual media are remembered only when the associated
8517 storage unit is actually created.
8518
8519 All known media can be enumerated using
8520 <link to="IVirtualBox::hardDisks"/>,
8521 <link to="IVirtualBox::DVDImages"/> and
8522 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8523 quickly found using the <link to="IVirtualBox::findMedium"/> method.
8524
8525 Only known media can be attached to virtual machines.
8526
8527 Removing known media from the media registry is performed when the given
8528 medium is closed using the <link to="#close"/> method or when its
8529 associated storage unit is deleted.
8530
8531 <h3>Accessibility checks</h3>
8532
8533 VirtualBox defers media accessibility checks until the <link to="#refreshState" />
8534 method is called explicitly on a medium. This is done to make the VirtualBox object
8535 ready for serving requests as fast as possible and let the end-user
8536 application decide if it needs to check media accessibility right away or not.
8537
8538 As a result, when VirtualBox starts up (e.g. the VirtualBox
8539 object gets created for the first time), all known media are in the
8540 "Inaccessible" state, but the value of the <link to="#lastAccessError"/>
8541 attribute is an empty string because no actual accessibility check has
8542 been made yet.
8543
8544 After calling <link to="#refreshState" />, a medium is considered
8545 <i>accessible</i> if its storage unit can be read. In that case, the
8546 <link to="#state"/> attribute has a value of "Created". If the storage
8547 unit cannot be read (for example, because it is located on a disconnected
8548 network resource, or was accidentally deleted outside VirtualBox),
8549 the medium is considered <i>inaccessible</i>, which is indicated by the
8550 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8551 obtained by reading the <link to="#lastAccessError"/> attribute.
8552
8553 <h3>Medium types</h3>
8554
8555 There are four types of medium behavior (see <link to="MediumType" />):
8556 "normal", "immutable", "writethrough" and "shareable", represented by the
8557 <link to="#type"/> attribute. The type of the medium defines how the
8558 medium is attached to a virtual machine and what happens when a
8559 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8560 attached medium is taken. At the moment DVD and floppy media are always
8561 of type "writethrough".
8562
8563 All media can be also divided in two groups: <i>base</i> media and
8564 <i>differencing</i> media. A base medium contains all sectors of the
8565 medium data in its own storage and therefore can be used independently.
8566 In contrast, a differencing mediun is a "delta" to some other medium and
8567 contains only those sectors which differ from that other medium, which is
8568 then called a <i>parent</i>. The differencing medium is said to be
8569 <i>linked to</i> that parent. The parent may be itself a differencing
8570 medium, thus forming a chain of linked media. The last element in that
8571 chain must always be a base medium. Note that several differencing
8572 media may be linked to the same parent medium.
8573
8574 Differencing media can be distinguished from base media by querying the
8575 <link to="#parent"/> attribute: base media do not have parents they would
8576 depend on, so the value of this attribute is always @c null for them.
8577 Using this attribute, it is possible to walk up the medium tree (from the
8578 child medium to its parent). It is also possible to walk down the tree
8579 using the <link to="#children"/> attribute.
8580
8581 Note that the type of all differencing media is "normal"; all other
8582 values are meaningless for them. Base media may be of any type.
8583
8584 <h3>Creating hard disks</h3>
8585
8586 New base hard disks are created using
8587 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8588 opened using <link to="IVirtualBox::openMedium"/>. Differencing hard
8589 disks are usually implicitly created by VirtualBox when needed but may
8590 also be created explicitly using <link to="#createDiffStorage"/>.
8591
8592 After the hard disk is successfully created (including the storage unit)
8593 or opened, it becomes a known hard disk (remembered in the internal media
8594 registry). Known hard disks can be attached to a virtual machine, accessed
8595 through <link to="IVirtualBox::findMedium"/> or enumerated using the
8596 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8597
8598 The following methods, besides <link to="IMedium::close"/>,
8599 automatically remove the hard disk from the media registry:
8600 <ul>
8601 <li><link to="#deleteStorage"/></li>
8602 <li><link to="#mergeTo"/></li>
8603 </ul>
8604
8605 If the storage unit of the hard disk is a regular file in the host's
8606 file system then the rules stated in the description of the
8607 <link to="IMedium::location"/> attribute apply when setting its value. In
8608 addition, a plain file name without any path may be given, in which case
8609 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8610 folder</link> will be prepended to it.
8611
8612 <h4>Automatic composition of the file name part</h4>
8613
8614 Another extension to the <link to="IMedium::location"/> attribute is that
8615 there is a possibility to cause VirtualBox to compose a unique value for
8616 the file name part of the location using the UUID of the hard disk. This
8617 applies only to hard disks in <link to="MediumState::NotCreated"/> state,
8618 e.g. before the storage unit is created, and works as follows. You set the
8619 value of the <link to="IMedium::location"/> attribute to a location
8620 specification which only contains the path specification but not the file
8621 name part and ends with either a forward slash or a backslash character.
8622 In response, VirtualBox will generate a new UUID for the hard disk and
8623 compose the file name using the following pattern:
8624 <pre>
8625 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8626 </pre>
8627 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8628 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8629 is the default extension for the storage format of this hard disk. After
8630 that, you may call any of the methods that create a new hard disk storage
8631 unit and they will use the generated UUID and file name.
8632
8633 <h3>Attaching Hard Disks</h3>
8634
8635 Hard disks are attached to virtual machines using the
8636 <link to="IMachine::attachDevice"/> method and detached using the
8637 <link to="IMachine::detachDevice"/> method. Depending on their
8638 <link to="#type"/>, hard disks are attached either
8639 <i>directly</i> or <i>indirectly</i>.
8640
8641 When a hard disk is being attached directly, it is associated with the
8642 virtual machine and used for hard disk operations when the machine is
8643 running. When a hard disk is being attached indirectly, a new differencing
8644 hard disk linked to it is implicitly created and this differencing hard
8645 disk is associated with the machine and used for hard disk operations.
8646 This also means that if <link to="IMachine::attachDevice"/> performs
8647 a direct attachment then the same hard disk will be returned in response
8648 to the subsequent <link to="IMachine::getMedium"/> call; however if
8649 an indirect attachment is performed then
8650 <link to="IMachine::getMedium"/> will return the implicitly created
8651 differencing hard disk, not the original one passed to <link
8652 to="IMachine::attachDevice"/>. In detail:
8653
8654 <ul>
8655 <li><b>Normal base</b> hard disks that do not have children (i.e.
8656 differencing hard disks linked to them) and that are not already
8657 attached to virtual machines in snapshots are attached <b>directly</b>.
8658 Otherwise, they are attached <b>indirectly</b> because having
8659 dependent children or being part of the snapshot makes it impossible
8660 to modify hard disk contents without breaking the integrity of the
8661 dependent party. The <link to="#readOnly"/> attribute allows to
8662 quickly determine the kind of the attachment for the given hard
8663 disk. Note that if a normal base hard disk is to be indirectly
8664 attached to a virtual machine with snapshots then a special
8665 procedure called <i>smart attachment</i> is performed (see below).</li>
8666 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
8667 they are attached <b>directly</b> if they do not have children and are
8668 not attached to virtual machines in snapshots, and <b>indirectly</b>
8669 otherwise. Note that the smart attachment procedure is never performed
8670 for differencing hard disks.</li>
8671 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
8672 they are designed to be non-writable. If an immutable hard disk is
8673 attached to a virtual machine with snapshots then a special
8674 procedure called smart attachment is performed (see below).</li>
8675 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
8676 also as designed. This also means that writethrough hard disks cannot
8677 have other hard disks linked to them at all.</li>
8678 <li><b>Shareable</b> hard disks are always attached <b>directly</b>,
8679 also as designed. This also means that shareable hard disks cannot
8680 have other hard disks linked to them at all. They behave almost
8681 like writethrough hard disks, except that shareable hard disks can
8682 be attached to several virtual machines which are running, allowing
8683 concurrent accesses. You need special cluster software running in
8684 the virtual machines to make use of such disks.</li>
8685 </ul>
8686
8687 Note that the same hard disk, regardless of its type, may be attached to
8688 more than one virtual machine at a time. In this case, the machine that is
8689 started first gains exclusive access to the hard disk and attempts to
8690 start other machines having this hard disk attached will fail until the
8691 first machine is powered down.
8692
8693 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8694 that the given hard disk remains associated with the given machine after a
8695 successful <link to="IMachine::detachDevice"/> call until
8696 <link to="IMachine::saveSettings"/> is called to save all changes to
8697 machine settings to disk. This deferring is necessary to guarantee that
8698 the hard disk configuration may be restored at any time by a call to
8699 <link to="IMachine::discardSettings"/> before the settings
8700 are saved (committed).
8701
8702 Note that if <link to="IMachine::discardSettings"/> is called after
8703 indirectly attaching some hard disks to the machine but before a call to
8704 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8705 all differencing hard disks implicitly created by
8706 <link to="IMachine::attachDevice"/> for these indirect attachments.
8707 Such implicitly created hard disks will also be immediately deleted when
8708 detached explicitly using the <link to="IMachine::detachDevice"/>
8709 call if it is made before <link to="IMachine::saveSettings"/>. This
8710 implicit deletion is safe because newly created differencing hard
8711 disks do not contain any user data.
8712
8713 However, keep in mind that detaching differencing hard disks that were
8714 implicitly created by <link to="IMachine::attachDevice"/>
8715 before the last <link to="IMachine::saveSettings"/> call will
8716 <b>not</b> implicitly delete them as they may already contain some data
8717 (for example, as a result of virtual machine execution). If these hard
8718 disks are no more necessary, the caller can always delete them explicitly
8719 using <link to="#deleteStorage"/> after they are actually de-associated
8720 from this machine by the <link to="IMachine::saveSettings"/> call.
8721
8722 <h3>Smart Attachment</h3>
8723
8724 When normal base or immutable hard disks are indirectly attached to a
8725 virtual machine then some additional steps are performed to make sure the
8726 virtual machine will have the most recent "view" of the hard disk being
8727 attached. These steps include walking through the machine's snapshots
8728 starting from the current one and going through ancestors up to the first
8729 snapshot. Hard disks attached to the virtual machine in all
8730 of the encountered snapshots are checked whether they are descendants of
8731 the given normal base or immutable hard disk. The first found child (which
8732 is the differencing hard disk) will be used instead of the normal base or
8733 immutable hard disk as a parent for creating a new differencing hard disk
8734 that will be actually attached to the machine. And only if no descendants
8735 are found or if the virtual machine does not have any snapshots then the
8736 normal base or immutable hard disk will be used itself as a parent for
8737 this differencing hard disk.
8738
8739 It is easier to explain what smart attachment does using the
8740 following example:
8741 <pre>
8742BEFORE attaching B.vdi: AFTER attaching B.vdi:
8743
8744Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8745 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8746 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8747 Snapshot 4 (none) Snapshot 4 (none)
8748 CurState (none) CurState (D3->D2.vdi)
8749
8750 NOT
8751 ...
8752 CurState (D3->B.vdi)
8753 </pre>
8754 The first column is the virtual machine configuration before the base hard
8755 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8756 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8757 mean that the hard disk that is actually attached to the machine is a
8758 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8759 another hard disk, <tt>B.vdi</tt>.
8760
8761 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8762 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8763 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8764 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8765 it cannot be attached directly and needs an indirect attachment (i.e.
8766 implicit creation of a new differencing hard disk). Due to the smart
8767 attachment procedure, the new differencing hard disk
8768 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8769 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8770 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8771 machine.
8772
8773 Note that if there is more than one descendant hard disk of the given base
8774 hard disk found in a snapshot, and there is an exact device, channel and
8775 bus match, then this exact match will be used. Otherwise, the youngest
8776 descendant will be picked up.
8777
8778 There is one more important aspect of the smart attachment procedure which
8779 is not related to snapshots at all. Before walking through the snapshots
8780 as described above, the backup copy of the current list of hard disk
8781 attachment is searched for descendants. This backup copy is created when
8782 the hard disk configuration is changed for the first time after the last
8783 <link to="IMachine::saveSettings"/> call and used by
8784 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8785 changes. When such a descendant is found in this backup copy, it will be
8786 simply re-attached back, without creating a new differencing hard disk for
8787 it. This optimization is necessary to make it possible to re-attach the
8788 base or immutable hard disk to a different bus, channel or device slot
8789 without losing the contents of the differencing hard disk actually
8790 attached to the machine in place of it.
8791 </desc>
8792
8793 <attribute name="id" type="uuid" mod="string" readonly="yes">
8794 <desc>
8795 UUID of the medium. For a newly created medium, this value is a randomly
8796 generated UUID.
8797
8798 <note>
8799 For media in one of MediumState_NotCreated, MediumState_Creating or
8800 MediumState_Deleting states, the value of this property is undefined
8801 and will most likely be an empty UUID.
8802 </note>
8803 </desc>
8804 </attribute>
8805
8806 <attribute name="description" type="wstring">
8807 <desc>
8808 Optional description of the medium. For a newly created medium the value
8809 of this attribute is an empty string.
8810
8811 Medium types that don't support this attribute will return E_NOTIMPL in
8812 attempt to get or set this attribute's value.
8813
8814 <note>
8815 For some storage types, reading this attribute may return an outdated
8816 (last known) value when <link to="#state"/> is <link
8817 to="MediumState::Inaccessible"/> or <link
8818 to="MediumState::LockedWrite"/> because the value of this attribute is
8819 stored within the storage unit itself. Also note that changing the
8820 attribute value is not possible in such case, as well as when the
8821 medium is the <link to="MediumState::LockedRead"/> state.
8822 </note>
8823 </desc>
8824 </attribute>
8825
8826 <attribute name="state" type="MediumState" readonly="yes">
8827 <desc>
8828 Returns the current medium state, which is the last state set by
8829 the accessibility check performed by <link to="#refreshState"/>.
8830 If that method has not yet been called on the medium, the state
8831 is "Inaccessible"; as opposed to truly inaccessible media, the
8832 value of <link to="#lastAccessError"/> will be an empty string in
8833 that case.
8834
8835 <note>As of version 3.1, this no longer performs an accessibility check
8836 automatically; call <link to="#refreshState"/> for that.
8837 </note>
8838 </desc>
8839 </attribute>
8840
8841 <attribute name="variant" type="MediumVariant" readonly="yes">
8842 <desc>
8843 Returns the storage format variant information for this medium.
8844 Before <link to="#refreshState"/> is called this method returns
8845 an undefined value.
8846 </desc>
8847 </attribute>
8848
8849 <attribute name="location" type="wstring">
8850 <desc>
8851 Location of the storage unit holding medium data.
8852
8853 The format of the location string is medium type specific. For medium
8854 types using regular files in a host's file system, the location
8855 string is the full file name.
8856
8857 Some medium types may support changing the storage unit location by
8858 simply changing the value of this property. If this operation is not
8859 supported, the implementation will return E_NOTIMPL in attempt to set
8860 this attribute's value.
8861
8862 When setting a value of the location attribute which is a regular file
8863 in the host's file system, the given file name may be either relative to
8864 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8865 absolute. Note that if the given location specification does not contain
8866 the file extension part then a proper default extension will be
8867 automatically appended by the implementation depending on the medium type.
8868 </desc>
8869 </attribute>
8870
8871 <attribute name="name" type="wstring" readonly="yes">
8872 <desc>
8873 Name of the storage unit holding medium data.
8874
8875 The returned string is a short version of the <link to="#location"/>
8876 attribute that is suitable for representing the medium in situations
8877 where the full location specification is too long (such as lists
8878 and comboboxes in GUI frontends). This string is also used by frontends
8879 to sort the media list alphabetically when needed.
8880
8881 For example, for locations that are regular files in the host's file
8882 system, the value of this attribute is just the file name (+ extension),
8883 without the path specification.
8884
8885 Note that as opposed to the <link to="#location"/> attribute, the name
8886 attribute will not necessary be unique for a list of media of the
8887 given type and format.
8888 </desc>
8889 </attribute>
8890
8891 <attribute name="deviceType" type="DeviceType" readonly="yes">
8892 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
8893 medium.</desc>
8894 </attribute>
8895
8896 <attribute name="hostDrive" type="boolean" readonly="yes">
8897 <desc>True if this corresponds to a drive on the host.</desc>
8898 </attribute>
8899
8900 <attribute name="size" type="long long" readonly="yes">
8901 <desc>
8902 Physical size of the storage unit used to hold medium data (in bytes).
8903
8904 <note>
8905 For media whose <link to="#state"/> is <link
8906 to="MediumState::Inaccessible"/>, the value of this property is the
8907 last known size. For <link to="MediumState::NotCreated"/> media,
8908 the returned value is zero.
8909 </note>
8910 </desc>
8911 </attribute>
8912
8913 <attribute name="format" type="wstring" readonly="yes">
8914 <desc>
8915 Storage format of this medium.
8916
8917 The value of this attribute is a string that specifies a backend used
8918 to store medium data. The storage format is defined when you create a
8919 new medium or automatically detected when you open an existing medium,
8920 and cannot be changed later.
8921
8922 The list of all storage formats supported by this VirtualBox
8923 installation can be obtained using
8924 <link to="ISystemProperties::mediumFormats"/>.
8925 </desc>
8926 </attribute>
8927
8928 <attribute name="mediumFormat" type="IMediumFormat" readonly="yes">
8929 <desc>
8930 Storage medium format object corresponding to this medium.
8931
8932 The value of this attribute is a reference to the medium format object
8933 that specifies the backend properties used to store medium data. The
8934 storage format is defined when you create a new medium or automatically
8935 detected when you open an existing medium, and cannot be changed later.
8936
8937 <note>@c null is returned if there is no associated medium format
8938 object. This can e.g. happen for medium objects representing host
8939 drives and other special medium objects.</note>
8940 </desc>
8941 </attribute>
8942
8943 <attribute name="type" type="MediumType">
8944 <desc>
8945 Type (role) of this medium.
8946
8947 The following constraints apply when changing the value of this
8948 attribute:
8949 <ul>
8950 <li>If a medium is attached to a virtual machine (either in the
8951 current state or in one of the snapshots), its type cannot be
8952 changed.
8953 </li>
8954 <li>As long as the medium has children, its type cannot be set
8955 to <link to="MediumType::Writethrough"/>.
8956 </li>
8957 <li>The type of all differencing media is
8958 <link to="MediumType::Normal"/> and cannot be changed.
8959 </li>
8960 </ul>
8961
8962 The type of a newly created or opened medium is set to
8963 <link to="MediumType::Normal"/>, except for DVD and floppy media,
8964 which have a type of <link to="MediumType::Writethrough"/>.
8965 </desc>
8966 </attribute>
8967
8968 <attribute name="parent" type="IMedium" readonly="yes">
8969 <desc>
8970 Parent of this medium (the medium this medium is directly based
8971 on).
8972
8973 Only differencing media have parents. For base (non-differencing)
8974 media, @c null is returned.
8975 </desc>
8976 </attribute>
8977
8978 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
8979 <desc>
8980 Children of this medium (all differencing media directly based
8981 on this medium). A @c null array is returned if this medium
8982 does not have any children.
8983 </desc>
8984 </attribute>
8985
8986 <attribute name="base" type="IMedium" readonly="yes">
8987 <desc>
8988 Base medium of this medium.
8989
8990 If this is a differencing medium, its base medium is the medium
8991 the given medium branch starts from. For all other types of media, this
8992 property returns the medium object itself (i.e. the same object this
8993 property is read on).
8994 </desc>
8995 </attribute>
8996
8997 <attribute name="readOnly" type="boolean" readonly="yes">
8998 <desc>
8999 Returns @c true if this medium is read-only and @c false otherwise.
9000
9001 A medium is considered to be read-only when its contents cannot be
9002 modified without breaking the integrity of other parties that depend on
9003 this medium such as its child media or snapshots of virtual machines
9004 where this medium is attached to these machines. If there are no
9005 children and no such snapshots then there is no dependency and the
9006 medium is not read-only.
9007
9008 The value of this attribute can be used to determine the kind of the
9009 attachment that will take place when attaching this medium to a
9010 virtual machine. If the value is @c false then the medium will
9011 be attached directly. If the value is @c true then the medium
9012 will be attached indirectly by creating a new differencing child
9013 medium for that. See the interface description for more information.
9014
9015 Note that all <link to="MediumType::Immutable">Immutable</link> media
9016 are always read-only while all
9017 <link to="MediumType::Writethrough">Writethrough</link> media are
9018 always not.
9019
9020 <note>
9021 The read-only condition represented by this attribute is related to
9022 the medium type and usage, not to the current
9023 <link to="IMedium::state">medium state</link> and not to the read-only
9024 state of the storage unit.
9025 </note>
9026 </desc>
9027 </attribute>
9028
9029 <attribute name="logicalSize" type="long long" readonly="yes">
9030 <desc>
9031 Logical size of this medium (in megabytes), as reported to the
9032 guest OS running inside the virtual machine this medium is
9033 attached to. The logical size is defined when the medium is created
9034 and cannot be changed later.
9035
9036 <note>
9037 Reading this property on a differencing medium will return the size
9038 of its <link to="#base"/> medium.
9039 </note>
9040 <note>
9041 For media whose state is <link to="#state"/> is <link
9042 to="MediumState::Inaccessible"/>, the value of this property is the
9043 last known logical size. For <link to="MediumState::NotCreated"/>
9044 media, the returned value is zero.
9045 </note>
9046 </desc>
9047 </attribute>
9048
9049 <attribute name="autoReset" type="boolean">
9050 <desc>
9051 Whether this differencing medium will be automatically reset each
9052 time a virtual machine it is attached to is powered up. This
9053 attribute is automatically set to @c true for the last
9054 differencing image of an "immutable" medium (see
9055 <link to="MediumType" />).
9056
9057 See <link to="#reset"/> for more information about resetting
9058 differencing media.
9059
9060 <note>
9061 Reading this property on a base (non-differencing) medium will
9062 always @c false. Changing the value of this property in this
9063 case is not supported.
9064 </note>
9065
9066 <result name="VBOX_E_NOT_SUPPORTED">
9067 This is not a differencing medium (when changing the attribute
9068 value).
9069 </result>
9070 </desc>
9071 </attribute>
9072
9073 <attribute name="lastAccessError" type="wstring" readonly="yes">
9074 <desc>
9075 Text message that represents the result of the last accessibility
9076 check performed by <link to="#refreshState"/>.
9077
9078 An empty string is returned if the last accessibility check
9079 was successful or has not yet been called. As a result, if
9080 <link to="#state" /> is "Inaccessible" and this attribute is empty,
9081 then <link to="#refreshState"/> has yet to be called; this is the
9082 default value of media after VirtualBox initialization.
9083 A non-empty string indicates a failure and should normally describe
9084 a reason of the failure (for example, a file read error).
9085 </desc>
9086 </attribute>
9087
9088 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9089 <desc>
9090 Array of UUIDs of all machines this medium is attached to.
9091
9092 A @c null array is returned if this medium is not attached to any
9093 machine or to any machine's snapshot.
9094
9095 <note>
9096 The returned array will include a machine even if this medium is not
9097 attached to that machine in the current state but attached to it in
9098 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9099 details.
9100 </note>
9101 </desc>
9102 </attribute>
9103
9104 <method name="setIDs">
9105 <desc>
9106 Changes the UUID and parent UUID for a hard disk medium.
9107 </desc>
9108 <param name="setImageId" type="boolean" dir="in">
9109 <desc>
9110 Select whether a new image UUID is set or not.
9111 </desc>
9112 </param>
9113 <param name="imageId" type="uuid" mod="string" dir="in">
9114 <desc>
9115 New UUID for the image. If an empty string is passed, then a new
9116 UUID is automatically created, provided that @a setImageId is @c true.
9117 Specifying a zero UUID is not allowed.
9118 </desc>
9119 </param>
9120 <param name="setParentId" type="boolean" dir="in">
9121 <desc>
9122 Select whether a new parent UUID is set or not.
9123 </desc>
9124 </param>
9125 <param name="parentId" type="uuid" mod="string" dir="in">
9126 <desc>
9127 New parent UUID for the image. If an empty string is passed, then a
9128 new UUID is automatically created, provided @a setParentId is
9129 @c true. A zero UUID is valid.
9130 </desc>
9131 </param>
9132 <result name="E_INVALIDARG">
9133 Invalid parameter combination.
9134 </result>
9135 <result name="VBOX_E_NOT_SUPPORTED">
9136 Medium is not a hard disk medium.
9137 </result>
9138 </method>
9139
9140 <method name="refreshState">
9141 <desc>
9142 If the current medium state (see <link to="MediumState"/>) is one of
9143 "Created", "Inaccessible" or "LockedRead", then this performs an
9144 accessibility check on the medium and sets the value of the <link to="#state"/>
9145 attribute accordingly; that value is also returned for convenience.
9146
9147 For all other state values, this does not perform a refresh but returns
9148 the state only.
9149
9150 The refresh, if performed, may take a long time (several seconds or even
9151 minutes, depending on the storage unit location and format) because it performs an
9152 accessibility check of the storage unit. This check may cause a significant
9153 delay if the storage unit of the given medium is, for example, a file located
9154 on a network share which is not currently accessible due to connectivity
9155 problems. In that case, the call will not return until a timeout
9156 interval defined by the host OS for this operation expires. For this reason,
9157 it is recommended to never read this attribute on the main UI thread to avoid
9158 making the UI unresponsive.
9159
9160 If the last known state of the medium is "Created" and the accessibility
9161 check fails, then the state would be set to "Inaccessible", and
9162 <link to="#lastAccessError"/> may be used to get more details about the
9163 failure. If the state of the medium is "LockedRead", then it remains the
9164 same, and a non-empty value of <link to="#lastAccessError"/> will
9165 indicate a failed accessibility check in this case.
9166
9167 Note that not all medium states are applicable to all medium types.
9168 </desc>
9169 <param name="state" type="MediumState" dir="return">
9170 <desc>
9171 New medium state.
9172 </desc>
9173 </param>
9174 </method>
9175
9176 <method name="getSnapshotIds">
9177 <desc>
9178 Returns an array of UUIDs of all snapshots of the given machine where
9179 this medium is attached to.
9180
9181 If the medium is attached to the machine in the current state, then the
9182 first element in the array will always be the ID of the queried machine
9183 (i.e. the value equal to the @c machineId argument), followed by
9184 snapshot IDs (if any).
9185
9186 If the medium is not attached to the machine in the current state, then
9187 the array will contain only snapshot IDs.
9188
9189 The returned array may be @c null if this medium is not attached
9190 to the given machine at all, neither in the current state nor in one of
9191 the snapshots.
9192 </desc>
9193 <param name="machineId" type="uuid" mod="string" dir="in">
9194 <desc>
9195 UUID of the machine to query.
9196 </desc>
9197 </param>
9198 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9199 <desc>
9200 Array of snapshot UUIDs of the given machine using this medium.
9201 </desc>
9202 </param>
9203 </method>
9204
9205 <method name="lockRead">
9206 <desc>
9207 Locks this medium for reading.
9208
9209 A read lock is shared: many clients can simultaneously lock the
9210 same medium for reading unless it is already locked for writing (see
9211 <link to="#lockWrite"/>) in which case an error is returned.
9212
9213 When the medium is locked for reading, it cannot be modified
9214 from within VirtualBox. This means that any method that changes
9215 the properties of this medium or contents of the storage unit
9216 will return an error (unless explicitly stated otherwise). That
9217 includes an attempt to start a virtual machine that wants to
9218 write to the the medium.
9219
9220 When the virtual machine is started up, it locks for reading all
9221 media it uses in read-only mode. If some medium cannot be locked
9222 for reading, the startup procedure will fail.
9223 A medium is typically locked for reading while it is used by a running
9224 virtual machine but has a depending differencing image that receives
9225 the actual write operations. This way one base medium can have
9226 multiple child differencing images which can be written to
9227 simultaneously. Read-only media such as DVD and floppy images are
9228 also locked for reading only (so they can be in use by multiple
9229 machines simultaneously).
9230
9231 A medium is also locked for reading when it is the source of a
9232 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9233
9234 The medium locked for reading must be unlocked using the <link
9235 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9236 can be nested and must be followed by the same number of paired
9237 <link to="#unlockRead"/> calls.
9238
9239 This method sets the medium state (see <link to="#state"/>) to
9240 "LockedRead" on success. The medium's previous state must be
9241 one of "Created", "Inaccessible" or "LockedRead".
9242
9243 Locking an inaccessible medium is not an error; this method performs
9244 a logical lock that prevents modifications of this medium through
9245 the VirtualBox API, not a physical file-system lock of the underlying
9246 storage unit.
9247
9248 This method returns the current state of the medium
9249 <i>before</i> the operation.
9250
9251 <result name="VBOX_E_INVALID_OBJECT_STATE">
9252 Invalid medium state (e.g. not created, locked, inaccessible,
9253 creating, deleting).
9254 </result>
9255
9256 </desc>
9257 <param name="state" type="MediumState" dir="return">
9258 <desc>
9259 State of the medium after the operation.
9260 </desc>
9261 </param>
9262 </method>
9263
9264 <method name="unlockRead">
9265 <desc>
9266 Cancels the read lock previously set by <link to="#lockRead"/>.
9267
9268 For both success and failure, this method returns the current state
9269 of the medium <i>after</i> the operation.
9270
9271 See <link to="#lockRead"/> for more details.
9272
9273 <result name="VBOX_E_INVALID_OBJECT_STATE">
9274 Medium not locked for reading.
9275 </result>
9276
9277 </desc>
9278 <param name="state" type="MediumState" dir="return">
9279 <desc>
9280 State of the medium after the operation.
9281 </desc>
9282 </param>
9283 </method>
9284
9285 <method name="lockWrite">
9286 <desc>
9287 Locks this medium for writing.
9288
9289 A write lock, as opposed to <link to="#lockRead"/>, is
9290 exclusive: there may be only one client holding a write lock,
9291 and there may be no read locks while the write lock is held.
9292 As a result, read-locking fails if a write lock is held, and
9293 write-locking fails if either a read or another write lock is held.
9294
9295 When a medium is locked for writing, it cannot be modified
9296 from within VirtualBox, and it is not guaranteed that the values
9297 of its properties are up-to-date. Any method that changes the
9298 properties of this medium or contents of the storage unit will
9299 return an error (unless explicitly stated otherwise).
9300
9301 When a virtual machine is started up, it locks for writing all
9302 media it uses to write data to. If any medium could not be locked
9303 for writing, the startup procedure will fail. If a medium has
9304 differencing images, then while the machine is running, only
9305 the last ("leaf") differencing image is locked for writing,
9306 whereas its parents are locked for reading only.
9307
9308 A medium is also locked for writing when it is the target of a
9309 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9310
9311 The medium locked for writing must be unlocked using the <link
9312 to="#unlockWrite"/> method. Write locks <i>cannot</i> be nested.
9313
9314 This method sets the medium state (see <link to="#state"/>) to
9315 "LockedWrite" on success. The medium's previous state must be
9316 either "Created" or "Inaccessible".
9317
9318 Locking an inaccessible medium is not an error; this method performs
9319 a logical lock that prevents modifications of this medium through
9320 the VirtualBox API, not a physical file-system lock of the underlying
9321 storage unit.
9322
9323 For both, success and failure, this method returns the current
9324 state of the medium <i>before</i> the operation.
9325
9326 <result name="VBOX_E_INVALID_OBJECT_STATE">
9327 Invalid medium state (e.g. not created, locked, inaccessible,
9328 creating, deleting).
9329 </result>
9330
9331 </desc>
9332 <param name="state" type="MediumState" dir="return">
9333 <desc>
9334 State of the medium after the operation.
9335 </desc>
9336 </param>
9337 </method>
9338
9339 <method name="unlockWrite">
9340 <desc>
9341 Cancels the write lock previously set by <link to="#lockWrite"/>.
9342
9343 For both success and failure, this method returns the current
9344 state of the medium <i>after</i> the operation.
9345
9346 See <link to="#lockWrite"/> for more details.
9347
9348 <result name="VBOX_E_INVALID_OBJECT_STATE">
9349 Medium not locked for writing.
9350 </result>
9351
9352 </desc>
9353 <param name="state" type="MediumState" dir="return">
9354 <desc>
9355 State of the medium after the operation.
9356 </desc>
9357 </param>
9358 </method>
9359
9360 <method name="close">
9361 <desc>
9362 Closes this medium.
9363
9364 The medium must not be attached to any known virtual machine
9365 and must not have any known child media, otherwise the
9366 operation will fail.
9367
9368 When the medium is successfully closed, it is removed from
9369 the list of registered media, but its storage unit is not
9370 deleted. In particular, this means that this medium can
9371 later be opened again using the <link to="IVirtualBox::openMedium"/>
9372 call.
9373
9374 Note that after this method successfully returns, the given medium
9375 object becomes uninitialized. This means that any attempt
9376 to call any of its methods or attributes will fail with the
9377 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9378
9379 <result name="VBOX_E_INVALID_OBJECT_STATE">
9380 Invalid medium state (other than not created, created or
9381 inaccessible).
9382 </result>
9383 <result name="VBOX_E_OBJECT_IN_USE">
9384 Medium attached to virtual machine.
9385 </result>
9386 <result name="VBOX_E_FILE_ERROR">
9387 Settings file not accessible.
9388 </result>
9389 <result name="VBOX_E_XML_ERROR">
9390 Could not parse the settings file.
9391 </result>
9392
9393 </desc>
9394 </method>
9395
9396 <!-- storage methods -->
9397
9398 <method name="getProperty">
9399 <desc>
9400 Returns the value of the custom medium property with the given name.
9401
9402 The list of all properties supported by the given medium format can
9403 be obtained with <link to="IMediumFormat::describeProperties"/>.
9404
9405 Note that if this method returns an empty string in @a value, the
9406 requested property is supported but currently not assigned any value.
9407
9408 <result name="VBOX_E_OBJECT_NOT_FOUND">
9409 Requested property does not exist (not supported by the format).
9410 </result>
9411 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9412 </desc>
9413 <param name="name" type="wstring" dir="in">
9414 <desc>Name of the property to get.</desc>
9415 </param>
9416 <param name="value" type="wstring" dir="return">
9417 <desc>Current property value.</desc>
9418 </param>
9419 </method>
9420
9421 <method name="setProperty">
9422 <desc>
9423 Sets the value of the custom medium property with the given name.
9424
9425 The list of all properties supported by the given medium format can
9426 be obtained with <link to="IMediumFormat::describeProperties"/>.
9427
9428 Note that setting the property value to @c null or an empty string is
9429 equivalent to deleting the existing value. A default value (if it is
9430 defined for this property) will be used by the format backend in this
9431 case.
9432
9433 <result name="VBOX_E_OBJECT_NOT_FOUND">
9434 Requested property does not exist (not supported by the format).
9435 </result>
9436 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9437 </desc>
9438 <param name="name" type="wstring" dir="in">
9439 <desc>Name of the property to set.</desc>
9440 </param>
9441 <param name="value" type="wstring" dir="in">
9442 <desc>Property value to set.</desc>
9443 </param>
9444 </method>
9445
9446 <method name="getProperties">
9447 <desc>
9448 Returns values for a group of properties in one call.
9449
9450 The names of the properties to get are specified using the @a names
9451 argument which is a list of comma-separated property names or
9452 an empty string if all properties are to be returned. Note that currently
9453 the value of this argument is ignored and the method always returns all
9454 existing properties.
9455
9456 The list of all properties supported by the given medium format can
9457 be obtained with <link to="IMediumFormat::describeProperties"/>.
9458
9459 The method returns two arrays, the array of property names corresponding
9460 to the @a names argument and the current values of these properties.
9461 Both arrays have the same number of elements with each elemend at the
9462 given index in the first array corresponds to an element at the same
9463 index in the second array.
9464
9465 Note that for properties that do not have assigned values,
9466 an empty string is returned at the appropriate index in the
9467 @a returnValues array.
9468
9469 </desc>
9470 <param name="names" type="wstring" dir="in">
9471 <desc>
9472 Names of properties to get.
9473 </desc>
9474 </param>
9475 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9476 <desc>Names of returned properties.</desc>
9477 </param>
9478 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9479 <desc>Values of returned properties.</desc>
9480 </param>
9481 </method>
9482
9483 <method name="setProperties">
9484 <desc>
9485 Sets values for a group of properties in one call.
9486
9487 The names of the properties to set are passed in the @a names
9488 array along with the new values for them in the @a values array. Both
9489 arrays have the same number of elements with each elemend at the given
9490 index in the first array corresponding to an element at the same index
9491 in the second array.
9492
9493 If there is at least one property name in @a names that is not valid,
9494 the method will fail before changing the values of any other properties
9495 from the @a names array.
9496
9497 Using this method over <link to="#setProperty"/> is preferred if you
9498 need to set several properties at once since it will result into less
9499 IPC calls.
9500
9501 The list of all properties supported by the given medium format can
9502 be obtained with <link to="IMediumFormat::describeProperties"/>.
9503
9504 Note that setting the property value to @c null or an empty string is
9505 equivalent to deleting the existing value. A default value (if it is
9506 defined for this property) will be used by the format backend in this
9507 case.
9508 </desc>
9509 <param name="names" type="wstring" safearray="yes" dir="in">
9510 <desc>Names of properties to set.</desc>
9511 </param>
9512 <param name="values" type="wstring" safearray="yes" dir="in">
9513 <desc>Values of properties to set.</desc>
9514 </param>
9515 </method>
9516
9517 <!-- storage methods -->
9518
9519 <method name="createBaseStorage">
9520 <desc>
9521 Starts creating a hard disk storage unit (fixed/dynamic, according
9522 to the variant flags) in in the background. The previous storage unit
9523 created for this object, if any, must first be deleted using
9524 <link to="#deleteStorage"/>, otherwise the operation will fail.
9525
9526 Before the operation starts, the medium is placed in
9527 <link to="MediumState::Creating"/> state. If the create operation
9528 fails, the medium will be placed back in <link to="MediumState::NotCreated"/>
9529 state.
9530
9531 After the returned progress object reports that the operation has
9532 successfully completed, the medium state will be set to <link
9533 to="MediumState::Created"/>, the medium will be remembered by this
9534 VirtualBox installation and may be attached to virtual machines.
9535
9536 <result name="VBOX_E_NOT_SUPPORTED">
9537 The variant of storage creation operation is not supported. See <link
9538 to="IMediumFormat::capabilities"/>.
9539 </result>
9540 </desc>
9541 <param name="logicalSize" type="long long" dir="in">
9542 <desc>Maximum logical size of the medium in megabytes.</desc>
9543 </param>
9544 <param name="variant" type="MediumVariant" dir="in">
9545 <desc>Exact image variant which should be created.</desc>
9546 </param>
9547 <param name="progress" type="IProgress" dir="return">
9548 <desc>Progress object to track the operation completion.</desc>
9549 </param>
9550 </method>
9551
9552 <method name="deleteStorage">
9553 <desc>
9554 Starts deleting the storage unit of this medium.
9555
9556 The medium must not be attached to any known virtual machine and must
9557 not have any known child media, otherwise the operation will fail.
9558 It will also fail if there is no storage unit to delete or if deletion
9559 is already in progress, or if the medium is being in use (locked for
9560 read or for write) or inaccessible. Therefore, the only valid state for
9561 this operation to succeed is <link to="MediumState::Created"/>.
9562
9563 Before the operation starts, the medium is placed in
9564 <link to="MediumState::Deleting"/> state and gets removed from the list
9565 of remembered hard disks (media registry). If the delete operation
9566 fails, the medium will be remembered again and placed back to
9567 <link to="MediumState::Created"/> state.
9568
9569 After the returned progress object reports that the operation is
9570 complete, the medium state will be set to
9571 <link to="MediumState::NotCreated"/> and you will be able to use one of
9572 the storage creation methods to create it again.
9573
9574 <see>#close()</see>
9575
9576 <result name="VBOX_E_OBJECT_IN_USE">
9577 Medium is attached to a virtual machine.
9578 </result>
9579 <result name="VBOX_E_NOT_SUPPORTED">
9580 Storage deletion is not allowed because neither of storage creation
9581 operations are supported. See
9582 <link to="IMediumFormat::capabilities"/>.
9583 </result>
9584
9585 <note>
9586 If the deletion operation fails, it is not guaranteed that the storage
9587 unit still exists. You may check the <link to="IMedium::state"/> value
9588 to answer this question.
9589 </note>
9590 </desc>
9591 <param name="progress" type="IProgress" dir="return">
9592 <desc>Progress object to track the operation completion.</desc>
9593 </param>
9594 </method>
9595
9596 <!-- diff methods -->
9597
9598 <method name="createDiffStorage">
9599 <desc>
9600 Starts creating an empty differencing storage unit based on this
9601 medium in the format and at the location defined by the @a target
9602 argument.
9603
9604 The target medium must be in <link to="MediumState::NotCreated"/>
9605 state (i.e. must not have an existing storage unit). Upon successful
9606 completion, this operation will set the type of the target medium to
9607 <link to="MediumType::Normal"/> and create a storage unit necessary to
9608 represent the differencing medium data in the given format (according
9609 to the storage format of the target object).
9610
9611 After the returned progress object reports that the operation is
9612 successfully complete, the target medium gets remembered by this
9613 VirtualBox installation and may be attached to virtual machines.
9614
9615 <note>
9616 The medium will be set to <link to="MediumState::LockedRead"/>
9617 state for the duration of this operation.
9618 </note>
9619 <result name="VBOX_E_OBJECT_IN_USE">
9620 Medium not in @c NotCreated state.
9621 </result>
9622 </desc>
9623 <param name="target" type="IMedium" dir="in">
9624 <desc>Target medium.</desc>
9625 </param>
9626 <param name="variant" type="MediumVariant" dir="in">
9627 <desc>Exact image variant which should be created.</desc>
9628 </param>
9629 <param name="progress" type="IProgress" dir="return">
9630 <desc>Progress object to track the operation completion.</desc>
9631 </param>
9632 </method>
9633
9634 <method name="mergeTo">
9635 <desc>
9636 Starts merging the contents of this medium and all intermediate
9637 differencing media in the chain to the given target medium.
9638
9639 The target medium must be either a descendant of this medium or
9640 its ancestor (otherwise this method will immediately return a failure).
9641 It follows that there are two logical directions of the merge operation:
9642 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9643 ancestor (<i>backward merge</i>). Let us consider the following medium
9644 chain:
9645
9646 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9647
9648 Here, calling this method on the <tt>Base</tt> medium object with
9649 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9650 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9651 merge. Note that in both cases the contents of the resulting medium
9652 will be the same, the only difference is the medium object that takes
9653 the result of the merge operation. In case of the forward merge in the
9654 above example, the result will be written to <tt>Diff_2</tt>; in case of
9655 the backward merge, the result will be written to <tt>Base</tt>. In
9656 other words, the result of the operation is always stored in the target
9657 medium.
9658
9659 Upon successful operation completion, the storage units of all media in
9660 the chain between this (source) medium and the target medium, including
9661 the source medium itself, will be automatically deleted and the
9662 relevant medium objects (including this medium) will become
9663 uninitialized. This means that any attempt to call any of
9664 their methods or attributes will fail with the
9665 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9666 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9667 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> media.
9668 Note that <tt>Diff_2</tt> in this case will become a base medium
9669 itself since it will no longer be based on any other medium.
9670
9671 Considering the above, all of the following conditions must be met in
9672 order for the merge operation to succeed:
9673 <ul>
9674 <li>
9675 Neither this (source) medium nor any intermediate
9676 differencing medium in the chain between it and the target
9677 medium is attached to any virtual machine.
9678 </li>
9679 <li>
9680 Neither the source medium nor the target medium is an
9681 <link to="MediumType::Immutable"/> medium.
9682 </li>
9683 <li>
9684 The part of the medium tree from the source medium to the
9685 target medium is a linear chain, i.e. all medium in this
9686 chain have exactly one child which is the next medium in this
9687 chain. The only exception from this rule is the target medium in
9688 the forward merge operation; it is allowed to have any number of
9689 child media because the merge operation will not change its
9690 logical contents (as it is seen by the guest OS or by children).
9691 </li>
9692 <li>
9693 None of the involved media are in
9694 <link to="MediumState::LockedRead"/> or
9695 <link to="MediumState::LockedWrite"/> state.
9696 </li>
9697 </ul>
9698
9699 <note>
9700 This (source) medium and all intermediates will be placed to <link
9701 to="MediumState::Deleting"/> state and the target medium will be
9702 placed to <link to="MediumState::LockedWrite"/> state and for the
9703 duration of this operation.
9704 </note>
9705 </desc>
9706 <param name="target" type="IMedium" dir="in">
9707 <desc>Target medium.</desc>
9708 </param>
9709 <param name="progress" type="IProgress" dir="return">
9710 <desc>Progress object to track the operation completion.</desc>
9711 </param>
9712 </method>
9713
9714 <!-- clone method -->
9715
9716 <method name="cloneTo">
9717 <desc>
9718 Starts creating a clone of this medium in the format and at the
9719 location defined by the @a target argument.
9720
9721 The target medium must be either in <link to="MediumState::NotCreated"/>
9722 state (i.e. must not have an existing storage unit) or in
9723 <link to="MediumState::Created"/> state (i.e. created and not locked, and
9724 big enough to hold the data or else the copy will be partial). Upon
9725 successful completion, the cloned medium will contain exactly the
9726 same sector data as the medium being cloned, except that in the
9727 first case a new UUID for the clone will be randomly generated, and in
9728 the second case the UUID will remain unchanged.
9729
9730 The @a parent argument defines which medium will be the parent
9731 of the clone. Passing a @c null reference indicates that the clone will
9732 be a base image, i.e. completely independent. It is possible to specify
9733 an arbitrary medium for this parameter, including the parent of the
9734 medium which is being cloned. Even cloning to a child of the source
9735 medium is possible. Note that when cloning to an existing image, the
9736 @a parent irgument is ignored.
9737
9738 After the returned progress object reports that the operation is
9739 successfully complete, the target medium gets remembered by this
9740 VirtualBox installation and may be attached to virtual machines.
9741
9742 <note>
9743 This medium will be placed to <link to="MediumState::LockedRead"/>
9744 state for the duration of this operation.
9745 </note>
9746 <result name="E_NOTIMPL">
9747 The specified cloning variant is not supported at the moment.
9748 </result>
9749 </desc>
9750 <param name="target" type="IMedium" dir="in">
9751 <desc>Target medium.</desc>
9752 </param>
9753 <param name="variant" type="MediumVariant" dir="in">
9754 <desc>Exact image variant which should be created.</desc>
9755 </param>
9756 <param name="parent" type="IMedium" dir="in">
9757 <desc>Parent of the cloned medium.</desc>
9758 </param>
9759 <param name="progress" type="IProgress" dir="return">
9760 <desc>Progress object to track the operation completion.</desc>
9761 </param>
9762 </method>
9763
9764 <!-- other methods -->
9765
9766 <method name="compact">
9767 <desc>
9768 Starts compacting of this medium. This means that the medium is
9769 transformed into a possibly more compact storage representation.
9770 This potentially creates temporary images, which can require a
9771 substantial amount of additional disk space.
9772
9773 This medium will be placed to <link to="MediumState::LockedWrite"/>
9774 state and all its parent media (if any) will be placed to
9775 <link to="MediumState::LockedRead"/> state for the duration of this
9776 operation.
9777
9778 Please note that the results can be either returned straight away,
9779 or later as the result of the background operation via the object
9780 returned via the @a progress parameter.
9781
9782 <result name="VBOX_E_NOT_SUPPORTED">
9783 Medium format does not support compacting (but potentially
9784 needs it).
9785 </result>
9786 </desc>
9787 <param name="progress" type="IProgress" dir="return">
9788 <desc>Progress object to track the operation completion.</desc>
9789 </param>
9790 </method>
9791
9792 <method name="resize">
9793 <desc>
9794 Starts resizing this medium. This means that the nominal size of the
9795 medium is set to the new value. Both increasing and decreasing the
9796 size is possible, and there are no safety checks, since VirtualBox
9797 does not make any assumptions about the medium contents.
9798
9799 Resizing usually needs additional disk space, and possibly also
9800 some temporary disk space. Note that resize does not create a full
9801 temporary copy of the medium, so the additional disk space requirement
9802 is usually much lower than using the clone operation.
9803
9804 This medium will be placed to <link to="MediumState::LockedWrite"/>
9805 state for the duration of this operation.
9806
9807 Please note that the results can be either returned straight away,
9808 or later as the result of the background operation via the object
9809 returned via the @a progress parameter.
9810
9811 <result name="VBOX_E_NOT_SUPPORTED">
9812 Medium format does not support resizing.
9813 </result>
9814 </desc>
9815 <param name="logicalSize" type="long long" dir="in">
9816 <desc>New nominal capacity of the medium in megabytes.</desc>
9817 </param>
9818 <param name="progress" type="IProgress" dir="return">
9819 <desc>Progress object to track the operation completion.</desc>
9820 </param>
9821 </method>
9822
9823 <method name="reset">
9824 <desc>
9825 Starts erasing the contents of this differencing medium.
9826
9827 This operation will reset the differencing medium to its initial
9828 state when it does not contain any sector data and any read operation is
9829 redirected to its parent medium. This automatically gets called
9830 during VM power-up for every medium whose <link to="#autoReset" />
9831 attribute is @c true.
9832
9833 The medium will be write-locked for the duration of this operation (see
9834 <link to="#lockWrite" />).
9835
9836 <result name="VBOX_E_NOT_SUPPORTED">
9837 This is not a differencing medium.
9838 </result>
9839 <result name="VBOX_E_INVALID_OBJECT_STATE">
9840 Medium is not in <link to="MediumState::Created"/> or
9841 <link to="MediumState::Inaccessible"/> state.
9842 </result>
9843 </desc>
9844 <param name="progress" type="IProgress" dir="return">
9845 <desc>Progress object to track the operation completion.</desc>
9846 </param>
9847 </method>
9848
9849 </interface>
9850
9851
9852 <!--
9853 // IMediumFormat
9854 /////////////////////////////////////////////////////////////////////////
9855 -->
9856
9857 <enum
9858 name="DataType"
9859 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9860 >
9861 <const name="Int32" value="0"/>
9862 <const name="Int8" value="1"/>
9863 <const name="String" value="2"/>
9864 </enum>
9865
9866 <enum
9867 name="DataFlags"
9868 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9869 >
9870 <const name="None" value="0x00"/>
9871 <const name="Mandatory" value="0x01"/>
9872 <const name="Expert" value="0x02"/>
9873 <const name="Array" value="0x04"/>
9874 <const name="FlagMask" value="0x07"/>
9875 </enum>
9876
9877 <enum
9878 name="MediumFormatCapabilities"
9879 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
9880 >
9881 <desc>
9882 Medium format capability flags.
9883 </desc>
9884
9885 <const name="Uuid" value="0x01">
9886 <desc>
9887 Supports UUIDs as expected by VirtualBox code.
9888 </desc>
9889 </const>
9890
9891 <const name="CreateFixed" value="0x02">
9892 <desc>
9893 Supports creating fixed size images, allocating all space instantly.
9894 </desc>
9895 </const>
9896
9897 <const name="CreateDynamic" value="0x04">
9898 <desc>
9899 Supports creating dynamically growing images, allocating space on
9900 demand.
9901 </desc>
9902 </const>
9903
9904 <const name="CreateSplit2G" value="0x08">
9905 <desc>
9906 Supports creating images split in chunks of a bit less than 2 GBytes.
9907 </desc>
9908 </const>
9909
9910 <const name="Differencing" value="0x10">
9911 <desc>
9912 Supports being used as a format for differencing media (see <link
9913 to="IMedium::createDiffStorage"/>).
9914 </desc>
9915 </const>
9916
9917 <const name="Asynchronous" value="0x20">
9918 <desc>
9919 Supports asynchronous I/O operations for at least some configurations.
9920 </desc>
9921 </const>
9922
9923 <const name="File" value="0x40">
9924 <desc>
9925 The format backend operates on files (the <link to="IMedium::location"/>
9926 attribute of the medium specifies a file used to store medium
9927 data; for a list of supported file extensions see
9928 <link to="IMediumFormat::fileExtensions"/>).
9929 </desc>
9930 </const>
9931
9932 <const name="Properties" value="0x80">
9933 <desc>
9934 The format backend uses the property interface to configure the storage
9935 location and properties (the <link to="IMediumFormat::describeProperties"/>
9936 method is used to get access to properties supported by the given medium format).
9937 </desc>
9938 </const>
9939
9940 <const name="CapabilityMask" value="0xFF"/>
9941 </enum>
9942
9943 <interface
9944 name="IMediumFormat" extends="$unknown"
9945 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
9946 wsmap="managed"
9947 >
9948 <desc>
9949 The IMediumFormat interface represents a medium format.
9950
9951 Each medium format has an associated backend which is used to handle
9952 media stored in this format. This interface provides information
9953 about the properties of the associated backend.
9954
9955 Each medium format is identified by a string represented by the
9956 <link to="#id"/> attribute. This string is used in calls like
9957 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9958 format.
9959
9960 The list of all supported medium formats can be obtained using
9961 <link to="ISystemProperties::mediumFormats"/>.
9962
9963 <see>IMedium</see>
9964 </desc>
9965
9966 <attribute name="id" type="wstring" readonly="yes">
9967 <desc>
9968 Identifier of this format.
9969
9970 The format identifier is a non-@c null non-empty ASCII string. Note that
9971 this string is case-insensitive. This means that, for example, all of
9972 the following strings:
9973 <pre>
9974 "VDI"
9975 "vdi"
9976 "VdI"</pre>
9977 refer to the same medium format.
9978
9979 This string is used in methods of other interfaces where it is necessary
9980 to specify a medium format, such as
9981 <link to="IVirtualBox::createHardDisk"/>.
9982 </desc>
9983 </attribute>
9984
9985 <attribute name="name" type="wstring" readonly="yes">
9986 <desc>
9987 Human readable description of this format.
9988
9989 Mainly for use in file open dialogs.
9990 </desc>
9991 </attribute>
9992
9993 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9994 <desc>
9995 Array of strings containing the supported file extensions.
9996
9997 The first extension in the array is the extension preferred by the
9998 backend. It is recommended to use this extension when specifying a
9999 location of the storage unit for a new medium.
10000
10001 Note that some backends do not work on files, so this array may be
10002 empty.
10003
10004 <see>IMediumFormat::capabilities</see>
10005 </desc>
10006 </attribute>
10007
10008 <attribute name="capabilities" type="unsigned long" readonly="yes">
10009 <desc>
10010 Capabilities of the format as a set of bit flags.
10011
10012 For the meaning of individual capability flags see
10013 <link to="MediumFormatCapabilities"/>.
10014 </desc>
10015 </attribute>
10016
10017 <method name="describeProperties">
10018 <desc>
10019 Returns several arrays describing the properties supported by this
10020 format.
10021
10022 An element with the given index in each array describes one
10023 property. Thus, the number of elements in each returned array is the
10024 same and corresponds to the number of supported properties.
10025
10026 The returned arrays are filled in only if the
10027 <link to="MediumFormatCapabilities::Properties"/> flag is set.
10028 All arguments must be non-@c null.
10029
10030 <see>DataType</see>
10031 <see>DataFlags</see>
10032 </desc>
10033
10034 <param name="names" type="wstring" safearray="yes" dir="out">
10035 <desc>Array of property names.</desc>
10036 </param>
10037 <param name="description" type="wstring" safearray="yes" dir="out">
10038 <desc>Array of property descriptions.</desc>
10039 </param>
10040 <param name="types" type="DataType" safearray="yes" dir="out">
10041 <desc>Array of property types.</desc>
10042 </param>
10043 <param name="flags" type="unsigned long" safearray="yes" dir="out">
10044 <desc>Array of property flags.</desc>
10045 </param>
10046 <param name="defaults" type="wstring" safearray="yes" dir="out">
10047 <desc>Array of default property values.</desc>
10048 </param>
10049 </method>
10050
10051 </interface>
10052
10053
10054 <!--
10055 // IKeyboard
10056 /////////////////////////////////////////////////////////////////////////
10057 -->
10058
10059 <interface
10060 name="IKeyboard" extends="$unknown"
10061 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10062 wsmap="managed"
10063 >
10064 <desc>
10065 The IKeyboard interface represents the virtual machine's keyboard. Used
10066 in <link to="IConsole::keyboard"/>.
10067
10068 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10069 to the virtual machine.
10070
10071 </desc>
10072 <method name="putScancode">
10073 <desc>Sends a scancode to the keyboard.
10074
10075 <result name="VBOX_E_IPRT_ERROR">
10076 Could not send scan code to virtual keyboard.
10077 </result>
10078
10079 </desc>
10080 <param name="scancode" type="long" dir="in"/>
10081 </method>
10082
10083 <method name="putScancodes">
10084 <desc>Sends an array of scancodes to the keyboard.
10085
10086 <result name="VBOX_E_IPRT_ERROR">
10087 Could not send all scan codes to virtual keyboard.
10088 </result>
10089
10090 </desc>
10091 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10092 <param name="codesStored" type="unsigned long" dir="return"/>
10093 </method>
10094
10095 <method name="putCAD">
10096 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10097 function is nothing special, it is just a convenience function
10098 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10099
10100 <result name="VBOX_E_IPRT_ERROR">
10101 Could not send all scan codes to virtual keyboard.
10102 </result>
10103
10104 </desc>
10105 </method>
10106
10107 </interface>
10108
10109
10110 <!--
10111 // IMouse
10112 /////////////////////////////////////////////////////////////////////////
10113 -->
10114
10115 <enum
10116 name="MouseButtonState"
10117 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10118 >
10119 <desc>
10120 Mouse button state.
10121 </desc>
10122
10123 <const name="LeftButton" value="0x01"/>
10124 <const name="RightButton" value="0x02"/>
10125 <const name="MiddleButton" value="0x04"/>
10126 <const name="WheelUp" value="0x08"/>
10127 <const name="WheelDown" value="0x10"/>
10128 <const name="XButton1" value="0x20"/>
10129 <const name="XButton2" value="0x40"/>
10130 <const name="MouseStateMask" value="0x7F"/>
10131 </enum>
10132
10133 <interface
10134 name="IMouse" extends="$unknown"
10135 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
10136 wsmap="managed"
10137 >
10138 <desc>
10139 The IMouse interface represents the virtual machine's mouse. Used in
10140 <link to="IConsole::mouse"/>.
10141
10142 Through this interface, the virtual machine's virtual mouse can be
10143 controlled.
10144 </desc>
10145
10146 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10147 <desc>
10148 Whether the guest OS supports absolute mouse pointer positioning
10149 or not.
10150 <note>
10151 You can use the <link to="IMouseCapabilityChangedEvent"/>
10152 event to be instantly informed about changes of this attribute
10153 during virtual machine execution.
10154 </note>
10155 <see><link to="#putMouseEventAbsolute"/></see>
10156 </desc>
10157 </attribute>
10158
10159 <attribute name="relativeSupported" type="boolean" readonly="yes">
10160 <desc>
10161 Whether the guest OS supports relative mouse pointer positioning
10162 or not.
10163 <note>
10164 You can use the <link to="IMouseCapabilityChangedEvent"/>
10165 event to be instantly informed about changes of this attribute
10166 during virtual machine execution.
10167 </note>
10168 <see><link to="#putMouseEvent"/></see>
10169 </desc>
10170 </attribute>
10171
10172 <attribute name="needsHostCursor" type="boolean" readonly="yes">
10173 <desc>
10174 Whether the guest OS can currently switch to drawing it's own mouse
10175 cursor on demand.
10176 <note>
10177 You can use the <link to="IMouseCapabilityChangedEvent"/>
10178 event to be instantly informed about changes of this attribute
10179 during virtual machine execution.
10180 </note>
10181 <see><link to="#putMouseEvent"/></see>
10182 </desc>
10183 </attribute>
10184
10185 <method name="putMouseEvent">
10186 <desc>
10187 Initiates a mouse event using relative pointer movements
10188 along x and y axis.
10189
10190 <result name="E_ACCESSDENIED">
10191 Console not powered up.
10192 </result>
10193 <result name="VBOX_E_IPRT_ERROR">
10194 Could not send mouse event to virtual mouse.
10195 </result>
10196
10197 </desc>
10198
10199 <param name="dx" type="long" dir="in">
10200 <desc>
10201 Amount of pixels the mouse should move to the right.
10202 Negative values move the mouse to the left.
10203 </desc>
10204 </param>
10205 <param name="dy" type="long" dir="in">
10206 <desc>
10207 Amount of pixels the mouse should move downwards.
10208 Negative values move the mouse upwards.
10209 </desc>
10210 </param>
10211 <param name="dz" type="long" dir="in">
10212 <desc>
10213 Amount of mouse wheel moves.
10214 Positive values describe clockwise wheel rotations,
10215 negative values describe counterclockwise rotations.
10216 </desc>
10217 </param>
10218 <param name="dw" type="long" dir="in">
10219 <desc>
10220 Amount of horizontal mouse wheel moves.
10221 Positive values describe a movement to the left,
10222 negative values describe a movement to the right.
10223 </desc>
10224 </param>
10225 <param name="buttonState" type="long" dir="in">
10226 <desc>
10227 The current state of mouse buttons. Every bit represents
10228 a mouse button as follows:
10229 <table>
10230 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10231 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10232 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10233 </table>
10234 A value of <tt>1</tt> means the corresponding button is pressed.
10235 otherwise it is released.
10236 </desc>
10237 </param>
10238 </method>
10239
10240 <method name="putMouseEventAbsolute">
10241 <desc>
10242 Positions the mouse pointer using absolute x and y coordinates.
10243 These coordinates are expressed in pixels and
10244 start from <tt>[1,1]</tt> which corresponds to the top left
10245 corner of the virtual display.
10246
10247 <result name="E_ACCESSDENIED">
10248 Console not powered up.
10249 </result>
10250 <result name="VBOX_E_IPRT_ERROR">
10251 Could not send mouse event to virtual mouse.
10252 </result>
10253
10254 <note>
10255 This method will have effect only if absolute mouse
10256 positioning is supported by the guest OS.
10257 </note>
10258
10259 <see><link to="#absoluteSupported"/></see>
10260 </desc>
10261
10262 <param name="x" type="long" dir="in">
10263 <desc>
10264 X coordinate of the pointer in pixels, starting from @c 1.
10265 </desc>
10266 </param>
10267 <param name="y" type="long" dir="in">
10268 <desc>
10269 Y coordinate of the pointer in pixels, starting from @c 1.
10270 </desc>
10271 </param>
10272 <param name="dz" type="long" dir="in">
10273 <desc>
10274 Amount of mouse wheel moves.
10275 Positive values describe clockwise wheel rotations,
10276 negative values describe counterclockwise rotations.
10277 </desc>
10278 </param>
10279 <param name="dw" type="long" dir="in">
10280 <desc>
10281 Amount of horizontal mouse wheel moves.
10282 Positive values describe a movement to the left,
10283 negative values describe a movement to the right.
10284 </desc>
10285 </param>
10286 <param name="buttonState" type="long" dir="in">
10287 <desc>
10288 The current state of mouse buttons. Every bit represents
10289 a mouse button as follows:
10290 <table>
10291 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10292 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10293 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10294 </table>
10295 A value of @c 1 means the corresponding button is pressed.
10296 otherwise it is released.
10297 </desc>
10298 </param>
10299 </method>
10300
10301 </interface>
10302
10303 <!--
10304 // IDisplay
10305 /////////////////////////////////////////////////////////////////////////
10306 -->
10307
10308 <enum
10309 name="FramebufferPixelFormat"
10310 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10311 >
10312 <desc>
10313 Format of the video memory buffer. Constants represented by this enum can
10314 be used to test for particular values of <link
10315 to="IFramebuffer::pixelFormat"/>. See also <link
10316 to="IFramebuffer::requestResize"/>.
10317
10318 See also www.fourcc.org for more information about FOURCC pixel formats.
10319 </desc>
10320
10321 <const name="Opaque" value="0">
10322 <desc>
10323 Unknown buffer format (the user may not assume any particular format of
10324 the buffer).
10325 </desc>
10326 </const>
10327 <const name="FOURCC_RGB" value="0x32424752">
10328 <desc>
10329 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10330 bit layout).
10331 </desc>
10332 </const>
10333 </enum>
10334
10335 <interface
10336 name="IFramebuffer" extends="$unknown"
10337 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10338 wsmap="suppress"
10339 >
10340 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10341 <desc>Address of the start byte of the frame buffer.</desc>
10342 </attribute>
10343
10344 <attribute name="width" type="unsigned long" readonly="yes">
10345 <desc>Frame buffer width, in pixels.</desc>
10346 </attribute>
10347
10348 <attribute name="height" type="unsigned long" readonly="yes">
10349 <desc>Frame buffer height, in pixels.</desc>
10350 </attribute>
10351
10352 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10353 <desc>
10354 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10355 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, valid values
10356 are: 8, 15, 16, 24 and 32.
10357 </desc>
10358 </attribute>
10359
10360 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10361 <desc>
10362 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10363 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, the
10364 size of the scan line must be aligned to 32 bits.
10365 </desc>
10366 </attribute>
10367
10368 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10369 <desc>
10370 Frame buffer pixel format. It's either one of the values defined by <link
10371 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10372 <note>
10373 This attribute must never return <link
10374 to="FramebufferPixelFormat::Opaque"/> -- the format of the buffer
10375 <link to="#address"/> points to must be always known.
10376 </note>
10377 </desc>
10378 </attribute>
10379
10380 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10381 <desc>
10382 Defines whether this frame buffer uses the virtual video card's memory
10383 buffer (guest VRAM) directly or not. See <link
10384 to="IFramebuffer::requestResize"/> for more information.
10385 </desc>
10386 </attribute>
10387
10388 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10389 <desc>
10390 Hint from the frame buffer about how much of the standard
10391 screen height it wants to use for itself. This information is
10392 exposed to the guest through the VESA BIOS and VMMDev interface
10393 so that it can use it for determining its video mode table. It
10394 is not guaranteed that the guest respects the value.
10395 </desc>
10396 </attribute>
10397
10398 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10399 <desc>
10400 An alpha-blended overlay which is superposed over the frame buffer.
10401 The initial purpose is to allow the display of icons providing
10402 information about the VM state, including disk activity, in front
10403 ends which do not have other means of doing that. The overlay is
10404 designed to controlled exclusively by IDisplay. It has no locking
10405 of its own, and any changes made to it are not guaranteed to be
10406 visible until the affected portion of IFramebuffer is updated. The
10407 overlay can be created lazily the first time it is requested. This
10408 attribute can also return @c null to signal that the overlay is not
10409 implemented.
10410 </desc>
10411 </attribute>
10412
10413 <attribute name="winId" type="long long" readonly="yes">
10414 <desc>
10415 Platform-dependent identifier of the window where context of this
10416 frame buffer is drawn, or zero if there's no such window.
10417 </desc>
10418 </attribute>
10419
10420 <method name="lock">
10421 <desc>
10422 Locks 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="unlock">
10429 <desc>
10430 Unlocks the frame buffer.
10431 Gets called by the IDisplay object where this frame buffer is
10432 bound to.
10433 </desc>
10434 </method>
10435
10436 <method name="notifyUpdate">
10437 <desc>
10438 Informs about an update.
10439 Gets called by the display object where this buffer is
10440 registered.
10441 </desc>
10442 <param name="x" type="unsigned long" dir="in"/>
10443 <param name="y" type="unsigned long" dir="in"/>
10444 <param name="width" type="unsigned long" dir="in"/>
10445 <param name="height" type="unsigned long" dir="in"/>
10446 </method>
10447
10448 <method name="requestResize">
10449 <desc>
10450 Requests a size and pixel format change.
10451
10452 There are two modes of working with the video buffer of the virtual
10453 machine. The <i>indirect</i> mode implies that the IFramebuffer
10454 implementation allocates a memory buffer for the requested display mode
10455 and provides it to the virtual machine. In <i>direct</i> mode, the
10456 IFramebuffer implementation uses the memory buffer allocated and owned
10457 by the virtual machine. This buffer represents the video memory of the
10458 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10459 usually faster because the implementation gets a raw pointer to the
10460 guest VRAM buffer which it can directly use for visualizing the contents
10461 of the virtual display, as opposed to the indirect mode where the
10462 contents of guest VRAM are copied to the memory buffer provided by
10463 the implementation every time a display update occurs.
10464
10465 It is important to note that the direct mode is really fast only when
10466 the implementation uses the given guest VRAM buffer directly, for
10467 example, by blitting it to the window representing the virtual machine's
10468 display, which saves at least one copy operation comparing to the
10469 indirect mode. However, using the guest VRAM buffer directly is not
10470 always possible: the format and the color depth of this buffer may be
10471 not supported by the target window, or it may be unknown (opaque) as in
10472 case of text or non-linear multi-plane VGA video modes. In this case,
10473 the indirect mode (that is always available) should be used as a
10474 fallback: when the guest VRAM contents are copied to the
10475 implementation-provided memory buffer, color and format conversion is
10476 done automatically by the underlying code.
10477
10478 The @a pixelFormat parameter defines whether the direct mode is
10479 available or not. If @a pixelFormat is <link
10480 to="FramebufferPixelFormat::Opaque"/> then direct access to the guest
10481 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10482 @a bytesPerLine parameters must be ignored and the implementation must use
10483 the indirect mode (where it provides its own buffer in one of the
10484 supported formats). In all other cases, @a pixelFormat together with
10485 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10486 buffer pointed to by the @a VRAM parameter and the implementation is
10487 free to choose which mode to use. To indicate that this frame buffer uses
10488 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10489 attribute must return @c true and <link to="#address"/> must
10490 return exactly the same address that is passed in the @a VRAM parameter
10491 of this method; otherwise it is assumed that the indirect strategy is
10492 chosen.
10493
10494 The @a width and @a height parameters represent the size of the
10495 requested display mode in both modes. In case of indirect mode, the
10496 provided memory buffer should be big enough to store data of the given
10497 display mode. In case of direct mode, it is guaranteed that the given
10498 @a VRAM buffer contains enough space to represent the display mode of the
10499 given size. Note that this frame buffer's <link to="#width"/> and <link
10500 to="#height"/> attributes must return exactly the same values as
10501 passed to this method after the resize is completed (see below).
10502
10503 The @a finished output parameter determines if the implementation has
10504 finished resizing the frame buffer or not. If, for some reason, the
10505 resize cannot be finished immediately during this call, @a finished
10506 must be set to @c false, and the implementation must call
10507 <link to="IDisplay::resizeCompleted"/> after it has returned from
10508 this method as soon as possible. If @a finished is @c false, the
10509 machine will not call any frame buffer methods until
10510 <link to="IDisplay::resizeCompleted"/> is called.
10511
10512 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10513 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10514 this frame buffer must return exactly the same values as specified in the
10515 parameters of this method, after the resize is completed. If the
10516 indirect mode is chosen, these attributes must return values describing
10517 the format of the implementation's own memory buffer <link
10518 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10519 value must always correlate with <link to="#pixelFormat"/>. Note that
10520 the <link to="#pixelFormat"/> attribute must never return <link
10521 to="FramebufferPixelFormat::Opaque"/> regardless of the selected mode.
10522
10523 <note>
10524 This method is called by the IDisplay object under the
10525 <link to="#lock"/> provided by this IFramebuffer
10526 implementation. If this method returns @c false in @a finished, then
10527 this lock is not released until
10528 <link to="IDisplay::resizeCompleted"/> is called.
10529 </note>
10530 </desc>
10531 <param name="screenId" type="unsigned long" dir="in">
10532 <desc>
10533 Logical screen number. Must be used in the corresponding call to
10534 <link to="IDisplay::resizeCompleted"/> if this call is made.
10535 </desc>
10536 </param>
10537 <param name="pixelFormat" type="unsigned long" dir="in">
10538 <desc>
10539 Pixel format of the memory buffer pointed to by @a VRAM.
10540 See also <link to="FramebufferPixelFormat"/>.
10541 </desc>
10542 </param>
10543 <param name="VRAM" type="octet" mod="ptr" dir="in">
10544 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10545 </param>
10546 <param name="bitsPerPixel" type="unsigned long" dir="in">
10547 <desc>Color depth, bits per pixel.</desc>
10548 </param>
10549 <param name="bytesPerLine" type="unsigned long" dir="in">
10550 <desc>Size of one scan line, in bytes.</desc>
10551 </param>
10552 <param name="width" type="unsigned long" dir="in">
10553 <desc>Width of the guest display, in pixels.</desc>
10554 </param>
10555 <param name="height" type="unsigned long" dir="in">
10556 <desc>Height of the guest display, in pixels.</desc>
10557 </param>
10558 <param name="finished" type="boolean" dir="return">
10559 <desc>
10560 Can the VM start using the new frame buffer immediately
10561 after this method returns or it should wait for
10562 <link to="IDisplay::resizeCompleted"/>.
10563 </desc>
10564 </param>
10565 </method>
10566
10567 <method name="videoModeSupported">
10568 <desc>
10569 Returns whether the frame buffer implementation is willing to
10570 support a given video mode. In case it is not able to render
10571 the video mode (or for some reason not willing), it should
10572 return @c false. Usually this method is called when the guest
10573 asks the VMM device whether a given video mode is supported
10574 so the information returned is directly exposed to the guest.
10575 It is important that this method returns very quickly.
10576 </desc>
10577 <param name="width" type="unsigned long" dir="in"/>
10578 <param name="height" type="unsigned long" dir="in"/>
10579 <param name="bpp" type="unsigned long" dir="in"/>
10580 <param name="supported" type="boolean" dir="return"/>
10581 </method>
10582
10583 <method name="getVisibleRegion">
10584 <desc>
10585 Returns the visible region of this frame buffer.
10586
10587 If the @a rectangles parameter is @c null then the value of the
10588 @a count parameter is ignored and the number of elements necessary to
10589 describe the current visible region is returned in @a countCopied.
10590
10591 If @a rectangles is not @c null but @a count is less
10592 than the required number of elements to store region data, the method
10593 will report a failure. If @a count is equal or greater than the
10594 required number of elements, then the actual number of elements copied
10595 to the provided array will be returned in @a countCopied.
10596
10597 <note>
10598 The address of the provided array must be in the process space of
10599 this IFramebuffer object.
10600 </note>
10601 <note>
10602 Method not yet implemented.
10603 </note>
10604 </desc>
10605 <param name="rectangles" type="octet" mod="ptr" dir="in">
10606 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10607 </param>
10608 <param name="count" type="unsigned long" dir="in">
10609 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10610 </param>
10611 <param name="countCopied" type="unsigned long" dir="return">
10612 <desc>Number of elements copied to the @a rectangles array.</desc>
10613 </param>
10614 </method>
10615
10616 <method name="setVisibleRegion">
10617 <desc>
10618 Suggests a new visible region to this frame buffer. This region
10619 represents the area of the VM display which is a union of regions of
10620 all top-level windows of the guest operating system running inside the
10621 VM (if the Guest Additions for this system support this
10622 functionality). This information may be used by the frontends to
10623 implement the seamless desktop integration feature.
10624
10625 <note>
10626 The address of the provided array must be in the process space of
10627 this IFramebuffer object.
10628 </note>
10629 <note>
10630 The IFramebuffer implementation must make a copy of the provided
10631 array of rectangles.
10632 </note>
10633 <note>
10634 Method not yet implemented.
10635 </note>
10636 </desc>
10637 <param name="rectangles" type="octet" mod="ptr" dir="in">
10638 <desc>Pointer to the @c RTRECT array.</desc>
10639 </param>
10640 <param name="count" type="unsigned long" dir="in">
10641 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10642 </param>
10643 </method>
10644
10645 <method name="processVHWACommand">
10646 <desc>
10647 Posts a Video HW Acceleration Command to the frame buffer for processing.
10648 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10649 are posted from quest to the host to be processed by the host hardware.
10650
10651 <note>
10652 The address of the provided command must be in the process space of
10653 this IFramebuffer object.
10654 </note>
10655 </desc>
10656
10657 <param name="command" type="octet" mod="ptr" dir="in">
10658 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10659 </param>
10660 </method>
10661
10662 </interface>
10663
10664 <interface
10665 name="IFramebufferOverlay" extends="IFramebuffer"
10666 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10667 wsmap="suppress"
10668 >
10669 <desc>
10670 The IFramebufferOverlay interface represents an alpha blended overlay
10671 for displaying status icons above an IFramebuffer. It is always created
10672 not visible, so that it must be explicitly shown. It only covers a
10673 portion of the IFramebuffer, determined by its width, height and
10674 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10675 that order) format, and may be written to directly. Do re-read the
10676 width though, after setting it, as it may be adjusted (increased) to
10677 make it more suitable for the front end.
10678 </desc>
10679 <attribute name="x" type="unsigned long" readonly="yes">
10680 <desc>X position of the overlay, relative to the frame buffer.</desc>
10681 </attribute>
10682
10683 <attribute name="y" type="unsigned long" readonly="yes">
10684 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10685 </attribute>
10686
10687 <attribute name="visible" type="boolean" readonly="no">
10688 <desc>
10689 Whether the overlay is currently visible.
10690 </desc>
10691 </attribute>
10692
10693 <attribute name="alpha" type="unsigned long" readonly="no">
10694 <desc>
10695 The global alpha value for the overlay. This may or may not be
10696 supported by a given front end.
10697 </desc>
10698 </attribute>
10699
10700 <method name="move">
10701 <desc>
10702 Changes the overlay's position relative to the IFramebuffer.
10703 </desc>
10704 <param name="x" type="unsigned long" dir="in"/>
10705 <param name="y" type="unsigned long" dir="in"/>
10706 </method>
10707
10708 </interface>
10709
10710 <interface
10711 name="IDisplay" extends="$unknown"
10712 uuid="09EED313-CD56-4D06-BD56-FAC0F716B5DD"
10713 wsmap="managed"
10714 >
10715 <desc>
10716 The IDisplay interface represents the virtual machine's display.
10717
10718 The object implementing this interface is contained in each
10719 <link to="IConsole::display"/> attribute and represents the visual
10720 output of the virtual machine.
10721
10722 The virtual display supports pluggable output targets represented by the
10723 IFramebuffer interface. Examples of the output target are a window on
10724 the host computer or an RDP session's display on a remote computer.
10725 </desc>
10726 <method name="getScreenResolution">
10727 <desc>Queries display width, height and color depth for given screen.</desc>
10728 <param name="screenId" type="unsigned long" dir="in"/>
10729 <param name="width" type="unsigned long" dir="out"/>
10730 <param name="height" type="unsigned long" dir="out"/>
10731 <param name="bitsPerPixel" type="unsigned long" dir="out"/>
10732 </method>
10733
10734 <method name="setFramebuffer">
10735 <desc>
10736 Sets the framebuffer for given screen.
10737 </desc>
10738 <param name="screenId" type="unsigned long" dir="in"/>
10739 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10740 </method>
10741
10742 <method name="getFramebuffer">
10743 <desc>
10744 Queries the framebuffer for given screen.
10745 </desc>
10746 <param name="screenId" type="unsigned long" dir="in"/>
10747 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10748 <param name="xOrigin" type="long" dir="out"/>
10749 <param name="yOrigin" type="long" dir="out"/>
10750 </method>
10751
10752 <method name="setVideoModeHint">
10753 <desc>
10754 Asks VirtualBox to request the given video mode from
10755 the guest. This is just a hint and it cannot be guaranteed
10756 that the requested resolution will be used. Guest Additions
10757 are required for the request to be seen by guests. The caller
10758 should issue the request and wait for a resolution change and
10759 after a timeout retry.
10760
10761 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10762 parameters means that the corresponding values should be taken from the
10763 current video mode (i.e. left unchanged).
10764
10765 If the guest OS supports multi-monitor configuration then the @a display
10766 parameter specifies the number of the guest display to send the hint to:
10767 @c 0 is the primary display, @c 1 is the first secondary and
10768 so on. If the multi-monitor configuration is not supported, @a display
10769 must be @c 0.
10770
10771 <result name="E_INVALIDARG">
10772 The @a display is not associated with any monitor.
10773 </result>
10774
10775 </desc>
10776 <param name="width" type="unsigned long" dir="in"/>
10777 <param name="height" type="unsigned long" dir="in"/>
10778 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10779 <param name="display" type="unsigned long" dir="in"/>
10780 </method>
10781
10782 <method name="setSeamlessMode">
10783 <desc>
10784 Enables or disables seamless guest display rendering (seamless desktop
10785 integration) mode.
10786 <note>
10787 Calling this method has no effect if <link
10788 to="IGuest::supportsSeamless"/> returns @c false.
10789 </note>
10790 </desc>
10791 <param name="enabled" type="boolean" dir="in"/>
10792 </method>
10793
10794 <method name="takeScreenShot">
10795 <desc>
10796 Takes a screen shot of the requested size and copies it to the
10797 32-bpp buffer allocated by the caller and pointed to by @a address.
10798 A pixel consists of 4 bytes in order: B, G, R, 0.
10799
10800 <note>This API can be used only by the COM/XPCOM C++ API as it
10801 requires pointer support. Use <link to="#takeScreenShotToArray" />
10802 with other language bindings.
10803 </note>
10804
10805 <result name="E_NOTIMPL">
10806 Feature not implemented.
10807 </result>
10808 <result name="VBOX_E_IPRT_ERROR">
10809 Could not take a screenshot.
10810 </result>
10811
10812 </desc>
10813 <param name="screenId" type="unsigned long" dir="in"/>
10814 <param name="address" type="octet" mod="ptr" dir="in"/>
10815 <param name="width" type="unsigned long" dir="in"/>
10816 <param name="height" type="unsigned long" dir="in"/>
10817 </method>
10818
10819 <method name="takeScreenShotToArray">
10820 <desc>
10821 Takes a guest screen shot of the requested size and returns it as
10822 an array of bytes in uncompressed 32-bit RGBA format.
10823 A pixel consists of 4 bytes in order: R, G, B, 0xFF.
10824
10825 This API is slow, but could be the only option to get guest screenshot
10826 for scriptable languages not allowed to manipulate with addresses
10827 directly.
10828
10829 <result name="E_NOTIMPL">
10830 Feature not implemented.
10831 </result>
10832 <result name="VBOX_E_IPRT_ERROR">
10833 Could not take a screenshot.
10834 </result>
10835 </desc>
10836 <param name="screenId" type="unsigned long" dir="in">
10837 <desc>
10838 Monitor to take screenshot from.
10839 </desc>
10840 </param>
10841 <param name="width" type="unsigned long" dir="in">
10842 <desc>
10843 Desired image width.
10844 </desc>
10845 </param>
10846 <param name="height" type="unsigned long" dir="in">
10847 <desc>
10848 Desired image height.
10849 </desc>
10850 </param>
10851 <param name="screenData" type="octet" dir="return" safearray="yes">
10852 <desc>
10853 Array with resulting screen data.
10854 </desc>
10855 </param>
10856 </method>
10857
10858 <method name="takeScreenShotPNGToArray">
10859 <desc>
10860 Takes a guest screen shot of the requested size and returns it as
10861 PNG image in array.
10862
10863 <result name="E_NOTIMPL">
10864 Feature not implemented.
10865 </result>
10866 <result name="VBOX_E_IPRT_ERROR">
10867 Could not take a screenshot.
10868 </result>
10869 </desc>
10870 <param name="screenId" type="unsigned long" dir="in">
10871 <desc>
10872 Monitor to take screenshot from.
10873 </desc>
10874 </param>
10875 <param name="width" type="unsigned long" dir="in">
10876 <desc>
10877 Desired image width.
10878 </desc>
10879 </param>
10880 <param name="height" type="unsigned long" dir="in">
10881 <desc>
10882 Desired image height.
10883 </desc>
10884 </param>
10885 <param name="screenData" type="octet" dir="return" safearray="yes">
10886 <desc>
10887 Array with resulting screen data.
10888 </desc>
10889 </param>
10890 </method>
10891
10892 <method name="drawToScreen">
10893 <desc>
10894 Draws a 32-bpp image of the specified size from the given buffer
10895 to the given point on the VM display.
10896
10897 <result name="E_NOTIMPL">
10898 Feature not implemented.
10899 </result>
10900 <result name="VBOX_E_IPRT_ERROR">
10901 Could not draw to screen.
10902 </result>
10903
10904 </desc>
10905 <param name="screenId" type="unsigned long" dir="in"/>
10906 <param name="address" type="octet" mod="ptr" dir="in"/>
10907 <param name="x" type="unsigned long" dir="in">
10908 <desc>Relative to the screen top left corner.</desc>
10909 </param>
10910 <param name="y" type="unsigned long" dir="in">
10911 <desc>Relative to the screen top left corner.</desc>
10912 </param>
10913 <param name="width" type="unsigned long" dir="in"/>
10914 <param name="height" type="unsigned long" dir="in"/>
10915 </method>
10916
10917 <method name="invalidateAndUpdate">
10918 <desc>
10919 Does a full invalidation of the VM display and instructs the VM
10920 to update it.
10921
10922 <result name="VBOX_E_IPRT_ERROR">
10923 Could not invalidate and update screen.
10924 </result>
10925
10926 </desc>
10927 </method>
10928
10929 <method name="resizeCompleted">
10930 <desc>
10931 Signals that a framebuffer has completed the resize operation.
10932
10933 <result name="VBOX_E_NOT_SUPPORTED">
10934 Operation only valid for external frame buffers.
10935 </result>
10936
10937 </desc>
10938 <param name="screenId" type="unsigned long" dir="in"/>
10939 </method>
10940
10941 <method name="completeVHWACommand">
10942 <desc>
10943 Signals that the Video HW Acceleration command has completed.
10944 </desc>
10945
10946 <param name="command" type="octet" mod="ptr" dir="in">
10947 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
10948 </param>
10949 </method>
10950
10951 </interface>
10952
10953 <!--
10954 // INetworkAdapter
10955 /////////////////////////////////////////////////////////////////////////
10956 -->
10957
10958 <enum
10959 name="NetworkAttachmentType"
10960 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10961 >
10962 <desc>
10963 Network attachment type.
10964 </desc>
10965
10966 <const name="Null" value="0">
10967 <desc>Null value, also means "not attached".</desc>
10968 </const>
10969 <const name="NAT" value="1"/>
10970 <const name="Bridged" value="2"/>
10971 <const name="Internal" value="3"/>
10972 <const name="HostOnly" value="4"/>
10973 <const name="VDE" value="5"/>
10974 </enum>
10975
10976 <enum
10977 name="NetworkAdapterType"
10978 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
10979 >
10980 <desc>
10981 Network adapter type.
10982 </desc>
10983
10984 <const name="Null" value="0">
10985 <desc>Null value (never used by the API).</desc>
10986 </const>
10987 <const name="Am79C970A" value="1">
10988 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
10989 </const>
10990 <const name="Am79C973" value="2">
10991 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
10992 </const>
10993 <const name="I82540EM" value="3">
10994 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
10995 </const>
10996 <const name="I82543GC" value="4">
10997 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
10998 </const>
10999 <const name="I82545EM" value="5">
11000 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
11001 </const>
11002 <const name="Virtio" value="6">
11003 <desc>Virtio network device.</desc>
11004 </const>
11005 </enum>
11006
11007 <interface
11008 name="INetworkAdapter" extends="$unknown"
11009 uuid="9bf58a46-c3f7-4f31-80fa-dde9a5dc0b7b"
11010 wsmap="managed"
11011 >
11012 <desc>
11013 Represents a virtual network adapter that is attached to a virtual machine.
11014 Each virtual machine has a fixed number of network adapter slots with one
11015 instance of this attached to each of them. Call
11016 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
11017 is attached to a given slot in a given machine.
11018
11019 Each network adapter can be in one of five attachment modes, which are
11020 represented by the <link to="NetworkAttachmentType" /> enumeration;
11021 see the <link to="#attachmentType" /> attribute.
11022 </desc>
11023
11024 <attribute name="adapterType" type="NetworkAdapterType">
11025 <desc>
11026 Type of the virtual network adapter. Depending on this value,
11027 VirtualBox will provide a different virtual network hardware
11028 to the guest.
11029 </desc>
11030 </attribute>
11031
11032 <attribute name="slot" type="unsigned long" readonly="yes">
11033 <desc>
11034 Slot number this adapter is plugged into. Corresponds to
11035 the value you pass to <link to="IMachine::getNetworkAdapter"/>
11036 to obtain this instance.
11037 </desc>
11038 </attribute>
11039
11040 <attribute name="enabled" type="boolean">
11041 <desc>
11042 Flag whether the network adapter is present in the
11043 guest system. If disabled, the virtual guest hardware will
11044 not contain this network adapter. Can only be changed when
11045 the VM is not running.
11046 </desc>
11047 </attribute>
11048
11049 <attribute name="MACAddress" type="wstring">
11050 <desc>
11051 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
11052 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
11053 </desc>
11054 </attribute>
11055
11056 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
11057
11058 <attribute name="hostInterface" type="wstring">
11059 <desc>
11060 Name of the host network interface the VM is attached to.
11061 </desc>
11062 </attribute>
11063
11064 <attribute name="internalNetwork" type="wstring">
11065 <desc>
11066 Name of the internal network the VM is attached to.
11067 </desc>
11068 </attribute>
11069
11070 <attribute name="NATNetwork" type="wstring">
11071 <desc>
11072 Name of the NAT network the VM is attached to.
11073 </desc>
11074 </attribute>
11075
11076 <attribute name="VDENetwork" type="wstring">
11077 <desc>
11078 Name of the VDE switch the VM is attached to.
11079 </desc>
11080 </attribute>
11081
11082 <attribute name="cableConnected" type="boolean">
11083 <desc>
11084 Flag whether the adapter reports the cable as connected or not.
11085 It can be used to report offline situations to a VM.
11086 </desc>
11087 </attribute>
11088
11089 <attribute name="lineSpeed" type="unsigned long">
11090 <desc>
11091 Line speed reported by custom drivers, in units of 1 kbps.
11092 </desc>
11093 </attribute>
11094
11095 <attribute name="traceEnabled" type="boolean">
11096 <desc>
11097 Flag whether network traffic from/to the network card should be traced.
11098 Can only be toggled when the VM is turned off.
11099 </desc>
11100 </attribute>
11101
11102 <attribute name="traceFile" type="wstring">
11103 <desc>
11104 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11105 will be used.
11106 </desc>
11107 </attribute>
11108
11109 <attribute name="natDriver" type="INATEngine" readonly="yes">
11110 <desc>
11111 Points to the NAT engine which handles the network address translation
11112 for this interface. This is active only when the interface actually uses
11113 NAT (see <link to="#attachToNAT" />).
11114 </desc>
11115 </attribute>
11116
11117 <attribute name="bootPriority" type="unsigned long">
11118 <desc>
11119 Network boot priority of the adapter. Priority 1 is highest. If not set,
11120 the priority is considered to be at the lowest possible setting.
11121 </desc>
11122 </attribute>
11123
11124 <attribute name="bandwidthLimit" type="unsigned long">
11125 <desc>
11126 Maximum throughput allowed for this network adapter, in units of 1 mbps.
11127 A zero value means uncapped/unlimited.
11128 </desc>
11129 </attribute>
11130
11131 <method name="attachToNAT">
11132 <desc>
11133 Attach the network adapter to the Network Address Translation (NAT) interface.
11134 </desc>
11135 </method>
11136
11137 <method name="attachToBridgedInterface">
11138 <desc>
11139 Attach the network adapter to a bridged host interface.
11140 </desc>
11141 </method>
11142
11143 <method name="attachToInternalNetwork">
11144 <desc>
11145 Attach the network adapter to an internal network.
11146 </desc>
11147 </method>
11148
11149 <method name="attachToHostOnlyInterface">
11150 <desc>
11151 Attach the network adapter to the host-only network.
11152 </desc>
11153 </method>
11154
11155 <method name="attachToVDE">
11156 <desc>
11157 Attach the network adapter to a VDE network.
11158 </desc>
11159 </method>
11160
11161 <method name="detach">
11162 <desc>
11163 Detach the network adapter
11164 </desc>
11165 </method>
11166 </interface>
11167
11168
11169 <!--
11170 // ISerialPort
11171 /////////////////////////////////////////////////////////////////////////
11172 -->
11173
11174 <enum
11175 name="PortMode"
11176 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11177 >
11178 <desc>
11179 The PortMode enumeration represents possible communication modes for
11180 the virtual serial port device.
11181 </desc>
11182
11183 <const name="Disconnected" value="0">
11184 <desc>Virtual device is not attached to any real host device.</desc>
11185 </const>
11186 <const name="HostPipe" value="1">
11187 <desc>Virtual device is attached to a host pipe.</desc>
11188 </const>
11189 <const name="HostDevice" value="2">
11190 <desc>Virtual device is attached to a host device.</desc>
11191 </const>
11192 <const name="RawFile" value="3">
11193 <desc>Virtual device is attached to a raw file.</desc>
11194 </const>
11195 </enum>
11196
11197 <interface
11198 name="ISerialPort" extends="$unknown"
11199 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11200 wsmap="managed"
11201 >
11202
11203 <desc>
11204 The ISerialPort interface represents the virtual serial port device.
11205
11206 The virtual serial port device acts like an ordinary serial port
11207 inside the virtual machine. This device communicates to the real
11208 serial port hardware in one of two modes: host pipe or host device.
11209
11210 In host pipe mode, the #path attribute specifies the path to the pipe on
11211 the host computer that represents a serial port. The #server attribute
11212 determines if this pipe is created by the virtual machine process at
11213 machine startup or it must already exist before starting machine
11214 execution.
11215
11216 In host device mode, the #path attribute specifies the name of the
11217 serial port device on the host computer.
11218
11219 There is also a third communication mode: the disconnected mode. In this
11220 mode, the guest OS running inside the virtual machine will be able to
11221 detect the serial port, but all port write operations will be discarded
11222 and all port read operations will return no data.
11223
11224 <see>IMachine::getSerialPort</see>
11225 </desc>
11226
11227 <attribute name="slot" type="unsigned long" readonly="yes">
11228 <desc>
11229 Slot number this serial port is plugged into. Corresponds to
11230 the value you pass to <link to="IMachine::getSerialPort"/>
11231 to obtain this instance.
11232 </desc>
11233 </attribute>
11234
11235 <attribute name="enabled" type="boolean">
11236 <desc>
11237 Flag whether the serial port is enabled. If disabled,
11238 the serial port will not be reported to the guest OS.
11239 </desc>
11240 </attribute>
11241
11242 <attribute name="IOBase" type="unsigned long">
11243 <desc>Base I/O address of the serial port.</desc>
11244 </attribute>
11245
11246 <attribute name="IRQ" type="unsigned long">
11247 <desc>IRQ number of the serial port.</desc>
11248 </attribute>
11249
11250 <attribute name="hostMode" type="PortMode">
11251 <desc>
11252 How is this port connected to the host.
11253 <note>
11254 Changing this attribute may fail if the conditions for
11255 <link to="#path"/> are not met.
11256 </note>
11257 </desc>
11258 </attribute>
11259
11260 <attribute name="server" type="boolean">
11261 <desc>
11262 Flag whether this serial port acts as a server (creates a new pipe on
11263 the host) or as a client (uses the existing pipe). This attribute is
11264 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11265 </desc>
11266 </attribute>
11267
11268 <attribute name="path" type="wstring">
11269 <desc>
11270 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11271 PortMode_HostPipe, or the host serial device name when
11272 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11273 cases, setting a @c null or empty string as the attribute's value
11274 is an error. Otherwise, the value of this property is ignored.
11275 </desc>
11276 </attribute>
11277
11278 </interface>
11279
11280 <!--
11281 // IParallelPort
11282 /////////////////////////////////////////////////////////////////////////
11283 -->
11284
11285 <interface
11286 name="IParallelPort" extends="$unknown"
11287 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11288 wsmap="managed"
11289 >
11290
11291 <desc>
11292 The IParallelPort interface represents the virtual parallel port device.
11293
11294 The virtual parallel port device acts like an ordinary parallel port
11295 inside the virtual machine. This device communicates to the real
11296 parallel port hardware using the name of the parallel device on the host
11297 computer specified in the #path attribute.
11298
11299 Each virtual parallel port device is assigned a base I/O address and an
11300 IRQ number that will be reported to the guest operating system and used
11301 to operate the given parallel port from within the virtual machine.
11302
11303 <see>IMachine::getParallelPort</see>
11304 </desc>
11305
11306 <attribute name="slot" type="unsigned long" readonly="yes">
11307 <desc>
11308 Slot number this parallel port is plugged into. Corresponds to
11309 the value you pass to <link to="IMachine::getParallelPort"/>
11310 to obtain this instance.
11311 </desc>
11312 </attribute>
11313
11314 <attribute name="enabled" type="boolean">
11315 <desc>
11316 Flag whether the parallel port is enabled. If disabled,
11317 the parallel port will not be reported to the guest OS.
11318 </desc>
11319 </attribute>
11320
11321 <attribute name="IOBase" type="unsigned long">
11322 <desc>Base I/O address of the parallel port.</desc>
11323 </attribute>
11324
11325 <attribute name="IRQ" type="unsigned long">
11326 <desc>IRQ number of the parallel port.</desc>
11327 </attribute>
11328
11329 <attribute name="path" type="wstring">
11330 <desc>
11331 Host parallel device name. If this parallel port is enabled, setting a
11332 @c null or an empty string as this attribute's value will result into
11333 an error.
11334 </desc>
11335 </attribute>
11336
11337 </interface>
11338
11339
11340 <!--
11341 // IMachineDebugger
11342 /////////////////////////////////////////////////////////////////////////
11343 -->
11344
11345 <interface
11346 name="IMachineDebugger" extends="$unknown"
11347 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11348 wsmap="suppress"
11349 >
11350 <method name="resetStats">
11351 <desc>
11352 Reset VM statistics.
11353 </desc>
11354 <param name="pattern" type="wstring" dir="in">
11355 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11356 </param>
11357 </method>
11358
11359 <method name="dumpStats">
11360 <desc>
11361 Dumps VM statistics.
11362 </desc>
11363 <param name="pattern" type="wstring" dir="in">
11364 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11365 </param>
11366 </method>
11367
11368 <method name="getStats">
11369 <desc>
11370 Get the VM statistics in a XMLish format.
11371 </desc>
11372 <param name="pattern" type="wstring" dir="in">
11373 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11374 </param>
11375 <param name="withDescriptions" type="boolean" dir="in">
11376 <desc>Whether to include the descriptions.</desc>
11377 </param>
11378 <param name="stats" type="wstring" dir="out">
11379 <desc>The XML document containing the statistics.</desc>
11380 </param>
11381 </method>
11382
11383 <method name="injectNMI">
11384 <desc>
11385 Inject an NMI into a running VT-x/AMD-V VM.
11386 </desc>
11387 </method>
11388
11389 <attribute name="singlestep" type="boolean">
11390 <desc>Switch for enabling singlestepping.</desc>
11391 </attribute>
11392
11393 <attribute name="recompileUser" type="boolean">
11394 <desc>Switch for forcing code recompilation for user mode code.</desc>
11395 </attribute>
11396
11397 <attribute name="recompileSupervisor" type="boolean">
11398 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11399 </attribute>
11400
11401 <attribute name="PATMEnabled" type="boolean">
11402 <desc>Switch for enabling and disabling the PATM component.</desc>
11403 </attribute>
11404
11405 <attribute name="CSAMEnabled" type="boolean">
11406 <desc>Switch for enabling and disabling the CSAM component.</desc>
11407 </attribute>
11408
11409 <attribute name="logEnabled" type="boolean">
11410 <desc>Switch for enabling and disabling logging.</desc>
11411 </attribute>
11412
11413 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11414 <desc>
11415 Flag indicating whether the VM is currently making use of CPU hardware
11416 virtualization extensions.
11417 </desc>
11418 </attribute>
11419
11420 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11421 <desc>
11422 Flag indicating whether the VM is currently making use of the nested paging
11423 CPU hardware virtualization extension.
11424 </desc>
11425 </attribute>
11426
11427 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11428 <desc>
11429 Flag indicating whether the VM is currently making use of the VPID
11430 VT-x extension.
11431 </desc>
11432 </attribute>
11433
11434 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11435 <desc>
11436 Flag indicating whether the VM is currently making use of the Physical
11437 Address Extension CPU feature.
11438 </desc>
11439 </attribute>
11440
11441 <attribute name="virtualTimeRate" type="unsigned long">
11442 <desc>
11443 The rate at which the virtual time runs expressed as a percentage.
11444 The accepted range is 2% to 20000%.
11445 </desc>
11446 </attribute>
11447
11448 <!-- @todo method for setting log flags, groups and destination! -->
11449
11450 <attribute name="VM" type="long long" readonly="yes">
11451 <desc>
11452 Gets the VM handle. This is only for internal use while
11453 we carve the details of this interface.
11454 </desc>
11455 </attribute>
11456
11457 </interface>
11458
11459 <!--
11460 // IUSBController
11461 /////////////////////////////////////////////////////////////////////////
11462 -->
11463
11464 <interface
11465 name="IUSBController" extends="$unknown"
11466 uuid="6fdcccc5-abd3-4fec-9387-2ad3914fc4a8"
11467 wsmap="managed"
11468 >
11469 <attribute name="enabled" type="boolean">
11470 <desc>
11471 Flag whether the USB controller is present in the
11472 guest system. If disabled, the virtual guest hardware will
11473 not contain any USB controller. Can only be changed when
11474 the VM is powered off.
11475 </desc>
11476 </attribute>
11477
11478 <attribute name="enabledEhci" type="boolean">
11479 <desc>
11480 Flag whether the USB EHCI controller is present in the
11481 guest system. If disabled, the virtual guest hardware will
11482 not contain a USB EHCI controller. Can only be changed when
11483 the VM is powered off.
11484 </desc>
11485 </attribute>
11486
11487 <attribute name="proxyAvailable" type="boolean" readonly="yes">
11488 <desc>
11489 Flag whether there is an USB proxy available.
11490 </desc>
11491 </attribute>
11492
11493 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11494 <desc>
11495 USB standard version which the controller implements.
11496 This is a BCD which means that the major version is in the
11497 high byte and minor version is in the low byte.
11498 </desc>
11499 </attribute>
11500
11501 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11502 <desc>
11503 List of USB device filters associated with the machine.
11504
11505 If the machine is currently running, these filters are activated
11506 every time a new (supported) USB device is attached to the host
11507 computer that was not ignored by global filters
11508 (<link to="IHost::USBDeviceFilters"/>).
11509
11510 These filters are also activated when the machine is powered up.
11511 They are run against a list of all currently available USB
11512 devices (in states
11513 <link to="USBDeviceState::Available"/>,
11514 <link to="USBDeviceState::Busy"/>,
11515 <link to="USBDeviceState::Held"/>) that were not previously
11516 ignored by global filters.
11517
11518 If at least one filter matches the USB device in question, this
11519 device is automatically captured (attached to) the virtual USB
11520 controller of this machine.
11521
11522 <see>IUSBDeviceFilter, ::IUSBController</see>
11523 </desc>
11524 </attribute>
11525
11526 <method name="createDeviceFilter">
11527 <desc>
11528 Creates a new USB device filter. All attributes except
11529 the filter name are set to empty (any match),
11530 <i>active</i> is @c false (the filter is not active).
11531
11532 The created filter can then be added to the list of filters using
11533 <link to="#insertDeviceFilter"/>.
11534
11535 <result name="VBOX_E_INVALID_VM_STATE">
11536 The virtual machine is not mutable.
11537 </result>
11538
11539 <see>#deviceFilters</see>
11540 </desc>
11541 <param name="name" type="wstring" dir="in">
11542 <desc>
11543 Filter name. See <link to="IUSBDeviceFilter::name"/>
11544 for more info.
11545 </desc>
11546 </param>
11547 <param name="filter" type="IUSBDeviceFilter" dir="return">
11548 <desc>Created filter object.</desc>
11549 </param>
11550 </method>
11551
11552 <method name="insertDeviceFilter">
11553 <desc>
11554 Inserts the given USB device to the specified position
11555 in the list of filters.
11556
11557 Positions are numbered starting from <tt>0</tt>. If the specified
11558 position is equal to or greater than the number of elements in
11559 the list, the filter is added to the end of the collection.
11560
11561 <note>
11562 Duplicates are not allowed, so an attempt to insert a
11563 filter that is already in the collection, will return an
11564 error.
11565 </note>
11566
11567 <result name="VBOX_E_INVALID_VM_STATE">
11568 Virtual machine is not mutable.
11569 </result>
11570 <result name="E_INVALIDARG">
11571 USB device filter not created within this VirtualBox instance.
11572 </result>
11573 <result name="VBOX_E_INVALID_OBJECT_STATE">
11574 USB device filter already in list.
11575 </result>
11576
11577 <see>#deviceFilters</see>
11578 </desc>
11579 <param name="position" type="unsigned long" dir="in">
11580 <desc>Position to insert the filter to.</desc>
11581 </param>
11582 <param name="filter" type="IUSBDeviceFilter" dir="in">
11583 <desc>USB device filter to insert.</desc>
11584 </param>
11585 </method>
11586
11587 <method name="removeDeviceFilter">
11588 <desc>
11589 Removes a USB device filter from the specified position in the
11590 list of filters.
11591
11592 Positions are numbered starting from <tt>0</tt>. Specifying a
11593 position equal to or greater than the number of elements in
11594 the list will produce an error.
11595
11596 <see>#deviceFilters</see>
11597
11598 <result name="VBOX_E_INVALID_VM_STATE">
11599 Virtual machine is not mutable.
11600 </result>
11601 <result name="E_INVALIDARG">
11602 USB device filter list empty or invalid @a position.
11603 </result>
11604
11605 </desc>
11606 <param name="position" type="unsigned long" dir="in">
11607 <desc>Position to remove the filter from.</desc>
11608 </param>
11609 <param name="filter" type="IUSBDeviceFilter" dir="return">
11610 <desc>Removed USB device filter.</desc>
11611 </param>
11612 </method>
11613
11614 </interface>
11615
11616
11617 <!--
11618 // IUSBDevice
11619 /////////////////////////////////////////////////////////////////////////
11620 -->
11621
11622 <interface
11623 name="IUSBDevice" extends="$unknown"
11624 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11625 wsmap="managed"
11626 >
11627 <desc>
11628 The IUSBDevice interface represents a virtual USB device attached to the
11629 virtual machine.
11630
11631 A collection of objects implementing this interface is stored in the
11632 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11633 attached to a running virtual machine's USB controller.
11634 </desc>
11635
11636 <attribute name="id" type="uuid" mod="string" readonly="yes">
11637 <desc>
11638 Unique USB device ID. This ID is built from #vendorId,
11639 #productId, #revision and #serialNumber.
11640 </desc>
11641 </attribute>
11642
11643 <attribute name="vendorId" type="unsigned short" readonly="yes">
11644 <desc>Vendor ID.</desc>
11645 </attribute>
11646
11647 <attribute name="productId" type="unsigned short" readonly="yes">
11648 <desc>Product ID.</desc>
11649 </attribute>
11650
11651 <attribute name="revision" type="unsigned short" readonly="yes">
11652 <desc>
11653 Product revision number. This is a packed BCD represented as
11654 unsigned short. The high byte is the integer part and the low
11655 byte is the decimal.
11656 </desc>
11657 </attribute>
11658
11659 <attribute name="manufacturer" type="wstring" readonly="yes">
11660 <desc>Manufacturer string.</desc>
11661 </attribute>
11662
11663 <attribute name="product" type="wstring" readonly="yes">
11664 <desc>Product string.</desc>
11665 </attribute>
11666
11667 <attribute name="serialNumber" type="wstring" readonly="yes">
11668 <desc>Serial number string.</desc>
11669 </attribute>
11670
11671 <attribute name="address" type="wstring" readonly="yes">
11672 <desc>Host specific address of the device.</desc>
11673 </attribute>
11674
11675 <attribute name="port" type="unsigned short" readonly="yes">
11676 <desc>
11677 Host USB port number the device is physically
11678 connected to.
11679 </desc>
11680 </attribute>
11681
11682 <attribute name="version" type="unsigned short" readonly="yes">
11683 <desc>
11684 The major USB version of the device - 1 or 2.
11685 </desc>
11686 </attribute>
11687
11688 <attribute name="portVersion" type="unsigned short" readonly="yes">
11689 <desc>
11690 The major USB version of the host USB port the device is
11691 physically connected to - 1 or 2. For devices not connected to
11692 anything this will have the same value as the version attribute.
11693 </desc>
11694 </attribute>
11695
11696 <attribute name="remote" type="boolean" readonly="yes">
11697 <desc>
11698 Whether the device is physically connected to a remote VRDP
11699 client or to a local host machine.
11700 </desc>
11701 </attribute>
11702
11703 </interface>
11704
11705
11706 <!--
11707 // IUSBDeviceFilter
11708 /////////////////////////////////////////////////////////////////////////
11709 -->
11710
11711 <interface
11712 name="IUSBDeviceFilter" extends="$unknown"
11713 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11714 wsmap="managed"
11715 >
11716 <desc>
11717 The IUSBDeviceFilter interface represents an USB device filter used
11718 to perform actions on a group of USB devices.
11719
11720 This type of filters is used by running virtual machines to
11721 automatically capture selected USB devices once they are physically
11722 attached to the host computer.
11723
11724 A USB device is matched to the given device filter if and only if all
11725 attributes of the device match the corresponding attributes of the
11726 filter (that is, attributes are joined together using the logical AND
11727 operation). On the other hand, all together, filters in the list of
11728 filters carry the semantics of the logical OR operation. So if it is
11729 desirable to create a match like "this vendor id OR this product id",
11730 one needs to create two filters and specify "any match" (see below)
11731 for unused attributes.
11732
11733 All filter attributes used for matching are strings. Each string
11734 is an expression representing a set of values of the corresponding
11735 device attribute, that will match the given filter. Currently, the
11736 following filtering expressions are supported:
11737
11738 <ul>
11739 <li><i>Interval filters</i>. Used to specify valid intervals for
11740 integer device attributes (Vendor ID, Product ID and Revision).
11741 The format of the string is:
11742
11743 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11744
11745 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11746 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11747 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11748 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11749 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11750 possible integer is assumed.
11751 </li>
11752 <li><i>Boolean filters</i>. Used to specify acceptable values for
11753 boolean device attributes. The format of the string is:
11754
11755 <tt>true|false|yes|no|0|1</tt>
11756
11757 </li>
11758 <li><i>Exact match</i>. Used to specify a single value for the given
11759 device attribute. Any string that doesn't start with <tt>int:</tt>
11760 represents the exact match. String device attributes are compared to
11761 this string including case of symbols. Integer attributes are first
11762 converted to a string (see individual filter attributes) and then
11763 compared ignoring case.
11764
11765 </li>
11766 <li><i>Any match</i>. Any value of the corresponding device attribute
11767 will match the given filter. An empty or @c null string is
11768 used to construct this type of filtering expressions.
11769
11770 </li>
11771 </ul>
11772
11773 <note>
11774 On the Windows host platform, interval filters are not currently
11775 available. Also all string filter attributes
11776 (<link to="#manufacturer"/>, <link to="#product"/>,
11777 <link to="#serialNumber"/>) are ignored, so they behave as
11778 <i>any match</i> no matter what string expression is specified.
11779 </note>
11780
11781 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11782 </desc>
11783
11784 <attribute name="name" type="wstring">
11785 <desc>
11786 Visible name for this filter.
11787 This name is used to visually distinguish one filter from another,
11788 so it can neither be @c null nor an empty string.
11789 </desc>
11790 </attribute>
11791
11792 <attribute name="active" type="boolean">
11793 <desc>Whether this filter active or has been temporarily disabled.</desc>
11794 </attribute>
11795
11796 <attribute name="vendorId" type="wstring">
11797 <desc>
11798 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11799 The string representation for the <i>exact matching</i>
11800 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11801 (including leading zeroes).
11802 </desc>
11803 </attribute>
11804
11805 <attribute name="productId" type="wstring">
11806 <desc>
11807 <link to="IUSBDevice::productId">Product ID</link> filter.
11808 The string representation for the <i>exact matching</i>
11809 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11810 (including leading zeroes).
11811 </desc>
11812 </attribute>
11813
11814 <attribute name="revision" type="wstring">
11815 <desc>
11816 <link to="IUSBDevice::productId">Product revision number</link>
11817 filter. The string representation for the <i>exact matching</i>
11818 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11819 of the integer part of the revision, and <tt>F</tt> is the
11820 decimal digit of its fractional part (including leading and
11821 trailing zeros).
11822 Note that for interval filters, it's best to use the hexadecimal
11823 form, because the revision is stored as a 16 bit packed BCD value;
11824 so the expression <tt>int:0x0100-0x0199</tt> will match any
11825 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11826 </desc>
11827 </attribute>
11828
11829 <attribute name="manufacturer" type="wstring">
11830 <desc>
11831 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11832 </desc>
11833 </attribute>
11834
11835 <attribute name="product" type="wstring">
11836 <desc>
11837 <link to="IUSBDevice::product">Product</link> filter.
11838 </desc>
11839 </attribute>
11840
11841 <attribute name="serialNumber" type="wstring">
11842 <desc>
11843 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11844 </desc>
11845 </attribute>
11846
11847 <attribute name="port" type="wstring">
11848 <desc>
11849 <link to="IUSBDevice::port">Host USB port</link> filter.
11850 </desc>
11851 </attribute>
11852
11853 <attribute name="remote" type="wstring">
11854 <desc>
11855 <link to="IUSBDevice::remote">Remote state</link> filter.
11856 <note>
11857 This filter makes sense only for machine USB filters,
11858 i.e. it is ignored by IHostUSBDeviceFilter objects.
11859 </note>
11860 </desc>
11861 </attribute>
11862
11863 <attribute name="maskedInterfaces" type="unsigned long">
11864 <desc>
11865 This is an advanced option for hiding one or more USB interfaces
11866 from the guest. The value is a bit mask where the bits that are set
11867 means the corresponding USB interface should be hidden, masked off
11868 if you like.
11869 This feature only works on Linux hosts.
11870 </desc>
11871 </attribute>
11872
11873 </interface>
11874
11875
11876 <!--
11877 // IHostUSBDevice
11878 /////////////////////////////////////////////////////////////////////////
11879 -->
11880
11881 <enum
11882 name="USBDeviceState"
11883 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11884 >
11885 <desc>
11886 USB device state. This enumeration represents all possible states
11887 of the USB device physically attached to the host computer regarding
11888 its state on the host computer and availability to guest computers
11889 (all currently running virtual machines).
11890
11891 Once a supported USB device is attached to the host, global USB
11892 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11893 either ignore the device, or put it to USBDeviceState_Held state, or do
11894 nothing. Unless the device is ignored by global filters, filters of all
11895 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11896 activated that can put it to USBDeviceState_Captured state.
11897
11898 If the device was ignored by global filters, or didn't match
11899 any filters at all (including guest ones), it is handled by the host
11900 in a normal way. In this case, the device state is determined by
11901 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11902 or USBDeviceState_Available, depending on the current device usage.
11903
11904 Besides auto-capturing based on filters, the device can be manually
11905 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11906 state is USBDeviceState_Busy, USBDeviceState_Available or
11907 USBDeviceState_Held.
11908
11909 <note>
11910 Due to differences in USB stack implementations in Linux and Win32,
11911 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11912 only to the Linux version of the product. This also means that (<link
11913 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11914 device state is USBDeviceState_Held.
11915 </note>
11916
11917 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11918 </desc>
11919
11920 <const name="NotSupported" value="0">
11921 <desc>
11922 Not supported by the VirtualBox server, not available to guests.
11923 </desc>
11924 </const>
11925 <const name="Unavailable" value="1">
11926 <desc>
11927 Being used by the host computer exclusively,
11928 not available to guests.
11929 </desc>
11930 </const>
11931 <const name="Busy" value="2">
11932 <desc>
11933 Being used by the host computer, potentially available to guests.
11934 </desc>
11935 </const>
11936 <const name="Available" value="3">
11937 <desc>
11938 Not used by the host computer, available to guests (the host computer
11939 can also start using the device at any time).
11940 </desc>
11941 </const>
11942 <const name="Held" value="4">
11943 <desc>
11944 Held by the VirtualBox server (ignored by the host computer),
11945 available to guests.
11946 </desc>
11947 </const>
11948 <const name="Captured" value="5">
11949 <desc>
11950 Captured by one of the guest computers, not available
11951 to anybody else.
11952 </desc>
11953 </const>
11954 </enum>
11955
11956 <interface
11957 name="IHostUSBDevice" extends="IUSBDevice"
11958 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11959 wsmap="managed"
11960 >
11961 <desc>
11962 The IHostUSBDevice interface represents a physical USB device attached
11963 to the host computer.
11964
11965 Besides properties inherited from IUSBDevice, this interface adds the
11966 <link to="#state"/> property that holds the current state of the USB
11967 device.
11968
11969 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11970 </desc>
11971
11972 <attribute name="state" type="USBDeviceState" readonly="yes">
11973 <desc>
11974 Current state of the device.
11975 </desc>
11976 </attribute>
11977
11978 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11979
11980 </interface>
11981
11982
11983 <!--
11984 // IHostUSBDeviceFilter
11985 /////////////////////////////////////////////////////////////////////////
11986 -->
11987
11988 <enum
11989 name="USBDeviceFilterAction"
11990 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11991 >
11992 <desc>
11993 Actions for host USB device filters.
11994 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11995 </desc>
11996
11997 <const name="Null" value="0">
11998 <desc>Null value (never used by the API).</desc>
11999 </const>
12000 <const name="Ignore" value="1">
12001 <desc>Ignore the matched USB device.</desc>
12002 </const>
12003 <const name="Hold" value="2">
12004 <desc>Hold the matched USB device.</desc>
12005 </const>
12006 </enum>
12007
12008 <interface
12009 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
12010 uuid="4cc70246-d74a-400f-8222-3900489c0374"
12011 wsmap="managed"
12012 >
12013 <desc>
12014 The IHostUSBDeviceFilter interface represents a global filter for a
12015 physical USB device used by the host computer. Used indirectly in
12016 <link to="IHost::USBDeviceFilters"/>.
12017
12018 Using filters of this type, the host computer determines the initial
12019 state of the USB device after it is physically attached to the
12020 host's USB controller.
12021
12022 <note>
12023 The <link to="IUSBDeviceFilter::remote"/> attribute is ignored by this type of
12024 filters, because it makes sense only for
12025 <link to="IUSBController::deviceFilters">machine USB filters</link>.
12026 </note>
12027
12028 <see>IHost::USBDeviceFilters</see>
12029 </desc>
12030
12031 <attribute name="action" type="USBDeviceFilterAction">
12032 <desc>
12033 Action performed by the host when an attached USB device
12034 matches this filter.
12035 </desc>
12036 </attribute>
12037
12038 </interface>
12039
12040 <!--
12041 // IAudioAdapter
12042 /////////////////////////////////////////////////////////////////////////
12043 -->
12044
12045 <enum
12046 name="AudioDriverType"
12047 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
12048 >
12049 <desc>
12050 Host audio driver type.
12051 </desc>
12052
12053 <const name="Null" value="0">
12054 <desc>Null value, also means "dummy audio driver".</desc>
12055 </const>
12056 <const name="WinMM" value="1">
12057 <desc>Windows multimedia (Windows hosts only).</desc>
12058 </const>
12059 <const name="OSS" value="2">
12060 <desc>Open Sound System (Linux hosts only).</desc>
12061 </const>
12062 <const name="ALSA" value="3">
12063 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
12064 </const>
12065 <const name="DirectSound" value="4">
12066 <desc>DirectSound (Windows hosts only).</desc>
12067 </const>
12068 <const name="CoreAudio" value="5">
12069 <desc>CoreAudio (Mac hosts only).</desc>
12070 </const>
12071 <const name="MMPM" value="6">
12072 <desc>Reserved for historical reasons.</desc>
12073 </const>
12074 <const name="Pulse" value="7">
12075 <desc>PulseAudio (Linux hosts only).</desc>
12076 </const>
12077 <const name="SolAudio" value="8">
12078 <desc>Solaris audio (Solaris hosts only).</desc>
12079 </const>
12080 </enum>
12081
12082 <enum
12083 name="AudioControllerType"
12084 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
12085 >
12086 <desc>
12087 Virtual audio controller type.
12088 </desc>
12089
12090 <const name="AC97" value="0"/>
12091 <const name="SB16" value="1"/>
12092 <const name="HDA" value="2"/>
12093 </enum>
12094
12095 <interface
12096 name="IAudioAdapter" extends="$unknown"
12097 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
12098 wsmap="managed"
12099 >
12100 <desc>
12101 The IAudioAdapter interface represents the virtual audio adapter of
12102 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
12103 </desc>
12104 <attribute name="enabled" type="boolean">
12105 <desc>
12106 Flag whether the audio adapter is present in the
12107 guest system. If disabled, the virtual guest hardware will
12108 not contain any audio adapter. Can only be changed when
12109 the VM is not running.
12110 </desc>
12111 </attribute>
12112 <attribute name="audioController" type="AudioControllerType">
12113 <desc>
12114 The audio hardware we emulate.
12115 </desc>
12116 </attribute>
12117 <attribute name="audioDriver" type="AudioDriverType">
12118 <desc>
12119 Audio driver the adapter is connected to. This setting
12120 can only be changed when the VM is not running.
12121 </desc>
12122 </attribute>
12123 </interface>
12124
12125 <!--
12126 // IVRDPServer
12127 /////////////////////////////////////////////////////////////////////////
12128 -->
12129
12130 <enum
12131 name="VRDPAuthType"
12132 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
12133 >
12134 <desc>
12135 VRDP authentication type.
12136 </desc>
12137
12138 <const name="Null" value="0">
12139 <desc>Null value, also means "no authentication".</desc>
12140 </const>
12141 <const name="External" value="1"/>
12142 <const name="Guest" value="2"/>
12143 </enum>
12144
12145 <interface
12146 name="IVRDPServer" extends="$unknown"
12147 uuid="7aeeb530-0b08-41fe-835d-9be9ec1dbe5c"
12148 wsmap="managed"
12149 >
12150 <attribute name="enabled" type="boolean">
12151 <desc>VRDP server status.</desc>
12152 </attribute>
12153
12154 <attribute name="ports" type="wstring">
12155 <desc>
12156 VRDP server port numbers. The server will try to bind to one of free ports from the list.
12157 <note>
12158 This is a string of comma separated TCP port numbers or port number ranges.
12159 Example <tt>5000,5010-5012,5015</tt>
12160 </note>
12161 </desc>
12162 </attribute>
12163
12164 <attribute name="netAddress" type="wstring">
12165 <desc>VRDP server address.</desc>
12166 </attribute>
12167
12168 <attribute name="authType" type="VRDPAuthType">
12169 <desc>VRDP authentication method.</desc>
12170 </attribute>
12171
12172 <attribute name="authTimeout" type="unsigned long">
12173 <desc>Timeout for guest authentication. Milliseconds.</desc>
12174 </attribute>
12175
12176 <attribute name="allowMultiConnection" type="boolean">
12177 <desc>
12178 Flag whether multiple simultaneous connections to the VM are permitted.
12179 Note that this will be replaced by a more powerful mechanism in the future.
12180 </desc>
12181 </attribute>
12182
12183 <attribute name="reuseSingleConnection" type="boolean">
12184 <desc>
12185 Flag whether the existing connection must be dropped and a new connection
12186 must be established by the VRDP server, when a new client connects in single
12187 connection mode.
12188 </desc>
12189 </attribute>
12190
12191 <attribute name="videoChannel" type="boolean">
12192 <desc>
12193 Flag whether RDP video channel is supported.
12194 </desc>
12195 </attribute>
12196
12197 <attribute name="videoChannelQuality" type="unsigned long">
12198 <desc>
12199 Image quality in percents.
12200 </desc>
12201 </attribute>
12202
12203 </interface>
12204
12205
12206 <!--
12207 // ISharedFolder
12208 /////////////////////////////////////////////////////////////////////////
12209 -->
12210
12211 <interface
12212 name="ISharedFolder" extends="$unknown"
12213 uuid="8388da11-b559-4574-a5b7-2bd7acd5cef8"
12214 wsmap="struct"
12215 >
12216 <desc>
12217 The ISharedFolder interface represents a folder in the host computer's
12218 file system accessible from the guest OS running inside a virtual
12219 machine using an associated logical name.
12220
12221 There are three types of shared folders:
12222 <ul>
12223 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12224 folders available to all virtual machines.</li>
12225 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12226 VM-specific shared folders available to the given virtual machine at
12227 startup.</li>
12228 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12229 VM-specific shared folders created in the session context (for
12230 example, when the virtual machine is running) and automatically
12231 discarded when the session is closed (the VM is powered off).</li>
12232 </ul>
12233
12234 Logical names of shared folders must be unique within the given scope
12235 (global, permanent or transient). However, they do not need to be unique
12236 across scopes. In this case, the definition of the shared folder in a
12237 more specific scope takes precedence over definitions in all other
12238 scopes. The order of precedence is (more specific to more general):
12239 <ol>
12240 <li>Transient definitions</li>
12241 <li>Permanent definitions</li>
12242 <li>Global definitions</li>
12243 </ol>
12244
12245 For example, if MyMachine has a shared folder named
12246 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12247 transient shared folder named <tt>C_DRIVE</tt> (that points
12248 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12249 of <tt>C_DRIVE</tt> in the guest OS so
12250 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12251 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12252 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12253 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12254 to <tt>C:\\</tt> if it still exists.
12255
12256 Note that permanent and transient shared folders of different machines
12257 are in different name spaces, so they don't overlap and don't need to
12258 have unique logical names.
12259
12260 <note>
12261 Global shared folders are not implemented in the current version of the
12262 product.
12263 </note>
12264 </desc>
12265
12266 <attribute name="name" type="wstring" readonly="yes">
12267 <desc>Logical name of the shared folder.</desc>
12268 </attribute>
12269
12270 <attribute name="hostPath" type="wstring" readonly="yes">
12271 <desc>Full path to the shared folder in the host file system.</desc>
12272 </attribute>
12273
12274 <attribute name="accessible" type="boolean" readonly="yes">
12275 <desc>
12276 Whether the folder defined by the host path is currently
12277 accessible or not.
12278 For example, the folder can be unaccessible if it is placed
12279 on the network share that is not available by the time
12280 this property is read.
12281 </desc>
12282 </attribute>
12283
12284 <attribute name="writable" type="boolean" readonly="yes">
12285 <desc>
12286 Whether the folder defined by the host path is writable or
12287 not.
12288 </desc>
12289 </attribute>
12290
12291 <attribute name="autoMount" type="boolean" readonly="yes">
12292 <desc>
12293 Whether the folder gets automatically mounted by the guest or not.
12294 </desc>
12295 </attribute>
12296
12297 <attribute name="lastAccessError" type="wstring" readonly="yes">
12298 <desc>
12299 Text message that represents the result of the last accessibility
12300 check.
12301
12302 Accessibility checks are performed each time the <link to="#accessible"/>
12303 attribute is read. An empty string is returned if the last
12304 accessibility check was successful. A non-empty string indicates a
12305 failure and should normally describe a reason of the failure (for
12306 example, a file read error).
12307 </desc>
12308 </attribute>
12309
12310 </interface>
12311
12312 <!--
12313 // ISession
12314 /////////////////////////////////////////////////////////////////////////
12315 -->
12316
12317 <interface
12318 name="IInternalSessionControl" extends="$unknown"
12319 uuid="ef059f1d-2273-4f81-9342-c152a0d2cd40"
12320 internal="yes"
12321 wsmap="suppress"
12322 >
12323 <method name="getPID">
12324 <desc>PID of the process that has created this Session object.
12325 </desc>
12326 <param name="pid" type="unsigned long" dir="return"/>
12327 </method>
12328
12329 <method name="getRemoteConsole">
12330 <desc>
12331 Returns the console object suitable for remote control.
12332
12333 <result name="VBOX_E_INVALID_VM_STATE">
12334 Session state prevents operation.
12335 </result>
12336 <result name="VBOX_E_INVALID_OBJECT_STATE">
12337 Session type prevents operation.
12338 </result>
12339
12340 </desc>
12341 <param name="console" type="IConsole" dir="return"/>
12342 </method>
12343
12344 <method name="assignMachine">
12345 <desc>
12346 Assigns the machine object associated with this direct-type
12347 session or informs the session that it will be a remote one
12348 (if @a machine == @c null).
12349
12350 <result name="VBOX_E_INVALID_VM_STATE">
12351 Session state prevents operation.
12352 </result>
12353 <result name="VBOX_E_INVALID_OBJECT_STATE">
12354 Session type prevents operation.
12355 </result>
12356
12357 </desc>
12358 <param name="machine" type="IMachine" dir="in"/>
12359 </method>
12360
12361 <method name="assignRemoteMachine">
12362 <desc>
12363 Assigns the machine and the (remote) console object associated with
12364 this remote-type session.
12365
12366 <result name="VBOX_E_INVALID_VM_STATE">
12367 Session state prevents operation.
12368 </result>
12369
12370 </desc>
12371 <param name="machine" type="IMachine" dir="in"/>
12372 <param name="console" type="IConsole" dir="in"/>
12373 </method>
12374
12375 <method name="updateMachineState">
12376 <desc>
12377 Updates the machine state in the VM process.
12378 Must be called only in certain cases
12379 (see the method implementation).
12380
12381 <result name="VBOX_E_INVALID_VM_STATE">
12382 Session state prevents operation.
12383 </result>
12384 <result name="VBOX_E_INVALID_OBJECT_STATE">
12385 Session type prevents operation.
12386 </result>
12387
12388 </desc>
12389 <param name="aMachineState" type="MachineState" dir="in"/>
12390 </method>
12391
12392 <method name="uninitialize">
12393 <desc>
12394 Uninitializes (closes) this session. Used by VirtualBox to close
12395 the corresponding remote session when the direct session dies
12396 or gets closed.
12397
12398 <result name="VBOX_E_INVALID_VM_STATE">
12399 Session state prevents operation.
12400 </result>
12401
12402 </desc>
12403 </method>
12404
12405 <method name="onNetworkAdapterChange">
12406 <desc>
12407 Triggered when settings of a network adapter of the
12408 associated virtual machine have changed.
12409
12410 <result name="VBOX_E_INVALID_VM_STATE">
12411 Session state prevents operation.
12412 </result>
12413 <result name="VBOX_E_INVALID_OBJECT_STATE">
12414 Session type prevents operation.
12415 </result>
12416
12417 </desc>
12418 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12419 <param name="changeAdapter" type="boolean" dir="in"/>
12420 </method>
12421
12422 <method name="onSerialPortChange">
12423 <desc>
12424 Triggered when settings of a serial port of the
12425 associated virtual machine have changed.
12426
12427 <result name="VBOX_E_INVALID_VM_STATE">
12428 Session state prevents operation.
12429 </result>
12430 <result name="VBOX_E_INVALID_OBJECT_STATE">
12431 Session type prevents operation.
12432 </result>
12433
12434 </desc>
12435 <param name="serialPort" type="ISerialPort" dir="in"/>
12436 </method>
12437
12438 <method name="onParallelPortChange">
12439 <desc>
12440 Triggered when settings of a parallel port of the
12441 associated virtual machine have changed.
12442
12443 <result name="VBOX_E_INVALID_VM_STATE">
12444 Session state prevents operation.
12445 </result>
12446 <result name="VBOX_E_INVALID_OBJECT_STATE">
12447 Session type prevents operation.
12448 </result>
12449
12450 </desc>
12451 <param name="parallelPort" type="IParallelPort" dir="in"/>
12452 </method>
12453
12454 <method name="onStorageControllerChange">
12455 <desc>
12456 Triggered when settings of a storage controller of the
12457 associated virtual machine have changed.
12458
12459 <result name="VBOX_E_INVALID_VM_STATE">
12460 Session state prevents operation.
12461 </result>
12462 <result name="VBOX_E_INVALID_OBJECT_STATE">
12463 Session type prevents operation.
12464 </result>
12465
12466 </desc>
12467 </method>
12468
12469 <method name="onMediumChange">
12470 <desc>
12471 Triggered when attached media of the
12472 associated virtual machine have changed.
12473
12474 <result name="VBOX_E_INVALID_VM_STATE">
12475 Session state prevents operation.
12476 </result>
12477 <result name="VBOX_E_INVALID_OBJECT_STATE">
12478 Session type prevents operation.
12479 </result>
12480
12481 </desc>
12482
12483 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12484 <param name="force" type="boolean" dir="in"/>
12485 </method>
12486
12487 <method name="onCPUChange">
12488 <desc>
12489 Notification when a CPU changes.
12490 </desc>
12491 <param name="cpu" type="unsigned long" dir="in">
12492 <desc>The CPU which changed</desc>
12493 </param>
12494 <param name="add" type="boolean" dir="in">
12495 <desc>Flag whether the CPU was added or removed</desc>
12496 </param>
12497 </method>
12498
12499 <method name="onCPUPriorityChange">
12500 <desc>
12501 Notification when the CPU priority changes.
12502 </desc>
12503 <param name="priority" type="unsigned long" dir="in">
12504 <desc>The new CPU priority value. (1-100)</desc>
12505 </param>
12506 </method>
12507
12508 <method name="onVRDPServerChange">
12509 <desc>
12510 Triggered when settings of the VRDP server object of the
12511 associated virtual machine have changed.
12512
12513 <result name="VBOX_E_INVALID_VM_STATE">
12514 Session state prevents operation.
12515 </result>
12516 <result name="VBOX_E_INVALID_OBJECT_STATE">
12517 Session type prevents operation.
12518 </result>
12519
12520 </desc>
12521 <param name="restart" type="boolean" dir="in">
12522 <desc>Flag whether the server must be restarted</desc>
12523 </param>
12524 </method>
12525
12526 <method name="onUSBControllerChange">
12527 <desc>
12528 Triggered when settings of the USB controller object of the
12529 associated virtual machine have changed.
12530
12531 <result name="VBOX_E_INVALID_VM_STATE">
12532 Session state prevents operation.
12533 </result>
12534 <result name="VBOX_E_INVALID_OBJECT_STATE">
12535 Session type prevents operation.
12536 </result>
12537
12538 </desc>
12539 </method>
12540
12541 <method name="onSharedFolderChange">
12542 <desc>
12543 Triggered when a permanent (global or machine) shared folder has been
12544 created or removed.
12545 <note>
12546 We don't pass shared folder parameters in this notification because
12547 the order in which parallel notifications are delivered is not defined,
12548 therefore it could happen that these parameters were outdated by the
12549 time of processing this notification.
12550 </note>
12551
12552 <result name="VBOX_E_INVALID_VM_STATE">
12553 Session state prevents operation.
12554 </result>
12555 <result name="VBOX_E_INVALID_OBJECT_STATE">
12556 Session type prevents operation.
12557 </result>
12558
12559 </desc>
12560 <param name="global" type="boolean" dir="in"/>
12561 </method>
12562
12563 <method name="onUSBDeviceAttach">
12564 <desc>
12565 Triggered when a request to capture a USB device (as a result
12566 of matched USB filters or direct call to
12567 <link to="IConsole::attachUSBDevice"/>) has completed.
12568 A @c null @a error object means success, otherwise it
12569 describes a failure.
12570
12571 <result name="VBOX_E_INVALID_VM_STATE">
12572 Session state prevents operation.
12573 </result>
12574 <result name="VBOX_E_INVALID_OBJECT_STATE">
12575 Session type prevents operation.
12576 </result>
12577
12578 </desc>
12579 <param name="device" type="IUSBDevice" dir="in"/>
12580 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12581 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12582 </method>
12583
12584 <method name="onUSBDeviceDetach">
12585 <desc>
12586 Triggered when a request to release the USB device (as a result
12587 of machine termination or direct call to
12588 <link to="IConsole::detachUSBDevice"/>) has completed.
12589 A @c null @a error object means success, otherwise it
12590 describes a failure.
12591
12592 <result name="VBOX_E_INVALID_VM_STATE">
12593 Session state prevents operation.
12594 </result>
12595 <result name="VBOX_E_INVALID_OBJECT_STATE">
12596 Session type prevents operation.
12597 </result>
12598
12599 </desc>
12600 <param name="id" type="uuid" mod="string" dir="in"/>
12601 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12602 </method>
12603
12604 <method name="onShowWindow">
12605 <desc>
12606 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12607 <link to="IMachine::showConsoleWindow"/> in order to notify
12608 console listeners
12609 <link to="ICanShowWindowEvent"/>
12610 and <link to="IShowWindowEvent"/>.
12611
12612 <result name="VBOX_E_INVALID_OBJECT_STATE">
12613 Session type prevents operation.
12614 </result>
12615
12616 </desc>
12617 <param name="check" type="boolean" dir="in"/>
12618 <param name="canShow" type="boolean" dir="out"/>
12619 <param name="winId" type="long long" dir="out"/>
12620 </method>
12621
12622 <method name="accessGuestProperty">
12623 <desc>
12624 Called by <link to="IMachine::getGuestProperty"/> and by
12625 <link to="IMachine::setGuestProperty"/> in order to read and
12626 modify guest properties.
12627
12628 <result name="VBOX_E_INVALID_VM_STATE">
12629 Machine session is not open.
12630 </result>
12631 <result name="VBOX_E_INVALID_OBJECT_STATE">
12632 Session type is not direct.
12633 </result>
12634
12635 </desc>
12636 <param name="name" type="wstring" dir="in"/>
12637 <param name="value" type="wstring" dir="in"/>
12638 <param name="flags" type="wstring" dir="in"/>
12639 <param name="isSetter" type="boolean" dir="in"/>
12640 <param name="retValue" type="wstring" dir="out"/>
12641 <param name="retTimestamp" type="long long" dir="out"/>
12642 <param name="retFlags" type="wstring" dir="out"/>
12643 </method>
12644
12645 <method name="enumerateGuestProperties">
12646 <desc>
12647 Return a list of the guest properties matching a set of patterns along
12648 with their values, time stamps and flags.
12649
12650 <result name="VBOX_E_INVALID_VM_STATE">
12651 Machine session is not open.
12652 </result>
12653 <result name="VBOX_E_INVALID_OBJECT_STATE">
12654 Session type is not direct.
12655 </result>
12656
12657 </desc>
12658 <param name="patterns" type="wstring" dir="in">
12659 <desc>
12660 The patterns to match the properties against as a comma-separated
12661 string. If this is empty, all properties currently set will be
12662 returned.
12663 </desc>
12664 </param>
12665 <param name="key" type="wstring" dir="out" safearray="yes">
12666 <desc>
12667 The key names of the properties returned.
12668 </desc>
12669 </param>
12670 <param name="value" type="wstring" dir="out" safearray="yes">
12671 <desc>
12672 The values of the properties returned. The array entries match the
12673 corresponding entries in the @a key array.
12674 </desc>
12675 </param>
12676 <param name="timestamp" type="long long" dir="out" safearray="yes">
12677 <desc>
12678 The time stamps of the properties returned. The array entries match
12679 the corresponding entries in the @a key array.
12680 </desc>
12681 </param>
12682 <param name="flags" type="wstring" dir="out" safearray="yes">
12683 <desc>
12684 The flags of the properties returned. The array entries match the
12685 corresponding entries in the @a key array.
12686 </desc>
12687 </param>
12688 </method>
12689
12690 <method name="onlineMergeMedium">
12691 <desc>
12692 Triggers online merging of a hard disk. Used internally when deleting
12693 a snapshot while a VM referring to the same hard disk chain is running.
12694
12695 <result name="VBOX_E_INVALID_VM_STATE">
12696 Machine session is not open.
12697 </result>
12698 <result name="VBOX_E_INVALID_OBJECT_STATE">
12699 Session type is not direct.
12700 </result>
12701
12702 </desc>
12703 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
12704 <desc>The medium attachment to identify the medium chain.</desc>
12705 </param>
12706 <param name="sourceIdx" type="unsigned long" dir="in">
12707 <desc>The index of the source image in the chain.
12708 Redundant, but drastically reduces IPC.</desc>
12709 </param>
12710 <param name="targetIdx" type="unsigned long" dir="in">
12711 <desc>The index of the target image in the chain.
12712 Redundant, but drastically reduces IPC.</desc>
12713 </param>
12714 <param name="source" type="IMedium" dir="in">
12715 <desc>Merge source medium.</desc>
12716 </param>
12717 <param name="target" type="IMedium" dir="in">
12718 <desc>Merge target medium.</desc>
12719 </param>
12720 <param name="mergeForward" type="boolean" dir="in">
12721 <desc>Merge direction.</desc>
12722 </param>
12723 <param name="parentForTarget" type="IMedium" dir="in">
12724 <desc>For forward merges: new parent for target medium.</desc>
12725 </param>
12726 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
12727 <desc>For backward merges: list of media which need their parent UUID
12728 updated.</desc>
12729 </param>
12730 <param name="progress" type="IProgress" dir="in">
12731 <desc>
12732 Progress object for this operation.
12733 </desc>
12734 </param>
12735 </method>
12736
12737 </interface>
12738
12739 <interface
12740 name="ISession" extends="$unknown"
12741 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12742 wsmap="managed"
12743 >
12744 <desc>
12745 The ISession interface represents a client process and allows for locking
12746 virtual machines (represented by IMachine objects) to prevent conflicting
12747 changes to the machine.
12748
12749 Any caller wishing to manipulate a virtual machine needs to create a session
12750 object first, which lives in its own process space. Such session objects are
12751 then associated with <link to="IMachine" /> objects living in the VirtualBox
12752 server process to coordinate such changes.
12753
12754 There are two typical scenarios in which sessions are used:
12755
12756 <ul>
12757 <li>To alter machine settings or control a running virtual machine, one
12758 needs to lock a machine for a given session (client process) by calling
12759 <link to="IMachine::lockMachine"/>.
12760
12761 Whereas multiple sessions may control a running virtual machine, only
12762 one process can obtain a write lock on the machine to prevent conflicting
12763 changes. A write lock is also needed if a process wants to actually run a
12764 virtual machine in its own context, such as the VirtualBox GUI or
12765 VBoxHeadless front-ends. They must also lock a machine for their own
12766 sessions before they are allowed to power up the virtual machine.
12767
12768 As a result, no machine settings can be altered while another process is
12769 already using it, either because that process is modifying machine settings
12770 or because the machine is running.
12771 </li>
12772 <li>
12773 To start a VM using one of the existing VirtualBox front-ends (e.g. the
12774 VirtualBox GUI or VBoxHeadless), one would use
12775 <link to="IMachine::launchVMProcess"/>, which also takes a session object
12776 as its first parameter. This session then identifies the caller and lets the
12777 caller control the started machine (for example, pause machine execution or
12778 power it down) as well as be notified about machine execution state changes.
12779 </li>
12780 </ul>
12781
12782 How sessions objects are created in a client process depends on whether you use
12783 the Main API via COM or via the webservice:
12784
12785 <ul>
12786 <li>When using the COM API directly, an object of the Session class from the
12787 VirtualBox type library needs to be created. In regular COM C++ client code,
12788 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12789 This object will then act as a local session object in further calls to open
12790 a session.
12791 </li>
12792
12793 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12794 a session object automatically whenever <link to="IWebsessionManager::logon" />
12795 is called. A managed object reference to that session object can be retrieved by
12796 calling <link to="IWebsessionManager::getSessionObject" />.
12797 </li>
12798 </ul>
12799 </desc>
12800
12801 <attribute name="state" type="SessionState" readonly="yes">
12802 <desc>Current state of this session.</desc>
12803 </attribute>
12804
12805 <attribute name="type" type="SessionType" readonly="yes">
12806 <desc>
12807 Type of this session. The value of this attribute is valid only
12808 if the session currently has a machine locked (i.e. its
12809 <link to="#state" /> is Locked), otherwise an error will be returned.
12810 </desc>
12811 </attribute>
12812
12813 <attribute name="machine" type="IMachine" readonly="yes">
12814 <desc>Machine object associated with this session.</desc>
12815 </attribute>
12816
12817 <attribute name="console" type="IConsole" readonly="yes">
12818 <desc>Console object associated with this session.</desc>
12819 </attribute>
12820
12821 <method name="unlockMachine">
12822 <desc>
12823 Unlocks a machine that was previously locked for the current session.
12824
12825 Calling this method is required every time a machine has been locked
12826 for a particular session using the <link to="IMachine::launchVMProcess" />
12827 or <link to="IMachine::lockMachine" /> calls. Otherwise the state of
12828 the machine will be set to <link to="MachineState::Aborted" /> on the
12829 server, and changes made to the machine settings will be lost.
12830
12831 Generally, it is recommended to unlock all machines explicitly
12832 before terminating the application (regardless of the reason for
12833 the termination).
12834
12835 <note>
12836 Do not expect the session state (<link to="ISession::state" />
12837 to return to "Unlocked" immediately after you invoke this method,
12838 particularly if you have started a new VM process. The session
12839 state will automatically return to "Unlocked" once the VM is no
12840 longer executing, which can of course take a very long time.
12841 </note>
12842
12843 <result name="E_UNEXPECTED">
12844 Session is not locked.
12845 </result>
12846
12847 </desc>
12848 </method>
12849
12850 </interface>
12851
12852 <!--
12853 // IStorageController
12854 /////////////////////////////////////////////////////////////////////////
12855 -->
12856
12857 <enum
12858 name="StorageBus"
12859 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
12860 >
12861 <desc>
12862 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy);
12863 see <link to="IStorageController::bus" />.
12864 </desc>
12865 <const name="Null" value="0">
12866 <desc>@c null value. Never used by the API.</desc>
12867 </const>
12868 <const name="IDE" value="1"/>
12869 <const name="SATA" value="2"/>
12870 <const name="SCSI" value="3"/>
12871 <const name="Floppy" value="4"/>
12872 <const name="SAS" value="5"/>
12873 </enum>
12874
12875 <enum
12876 name="StorageControllerType"
12877 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
12878 >
12879 <desc>
12880 The exact variant of storage controller hardware presented
12881 to the guest; see <link to="IStorageController::controllerType" />.
12882 </desc>
12883
12884 <const name="Null" value="0">
12885 <desc>@c null value. Never used by the API.</desc>
12886 </const>
12887 <const name="LsiLogic" value="1">
12888 <desc>A SCSI controller of the LsiLogic variant.</desc>
12889 </const>
12890 <const name="BusLogic" value="2">
12891 <desc>A SCSI controller of the BusLogic variant.</desc>
12892 </const>
12893 <const name="IntelAhci" value="3">
12894 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
12895 </const>
12896 <const name="PIIX3" value="4">
12897 <desc>An IDE controller of the PIIX3 variant.</desc>
12898 </const>
12899 <const name="PIIX4" value="5">
12900 <desc>An IDE controller of the PIIX4 variant.</desc>
12901 </const>
12902 <const name="ICH6" value="6">
12903 <desc>An IDE controller of the ICH6 variant.</desc>
12904 </const>
12905 <const name="I82078" value="7">
12906 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
12907 </const>
12908 <const name="LsiLogicSas" value="8">
12909 <desc>A variant of the LsiLogic controller using SAS.</desc>
12910 </const>
12911 </enum>
12912
12913 <interface
12914 name="IStorageController" extends="$unknown"
12915 uuid="fd93adc0-bbaa-4256-9e6e-00e29f9151c9"
12916 wsmap="managed"
12917 >
12918 <desc>
12919 Represents a storage controller that is attached to a virtual machine
12920 (<link to="IMachine" />). Just as drives (hard disks, DVDs, FDs) are
12921 attached to storage controllers in a real computer, virtual drives
12922 (represented by <link to="IMediumAttachment" />) are attached to virtual
12923 storage controllers, represented by this interface.
12924
12925 As opposed to physical hardware, VirtualBox has a very generic concept
12926 of a storage controller, and for purposes of the Main API, all virtual
12927 storage is attached to virtual machines via instances of this interface.
12928 There are five types of such virtual storage controllers: IDE, SCSI, SATA,
12929 SAS and Floppy (see <link to="#bus" />). Depending on which of these four
12930 is used, certain sub-types may be available and can be selected in
12931 <link to="#controllerType" />.
12932
12933 Depending on these settings, the guest operating system might see
12934 significantly different virtual hardware.
12935 </desc>
12936
12937 <attribute name="name" type="wstring" readonly="yes">
12938 <desc>
12939 Name of the storage controller, as originally specified with
12940 <link to="IMachine::addStorageController" />. This then uniquely
12941 identifies this controller with other method calls such as
12942 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
12943 </desc>
12944 </attribute>
12945
12946 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12947 <desc>
12948 Maximum number of devices which can be attached to one port.
12949 </desc>
12950 </attribute>
12951
12952 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12953 <desc>
12954 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12955 </desc>
12956 </attribute>
12957
12958 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12959 <desc>
12960 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12961 </desc>
12962 </attribute>
12963
12964 <attribute name="instance" type="unsigned long">
12965 <desc>
12966 The instance number of the device in the running VM.
12967 </desc>
12968 </attribute>
12969
12970 <attribute name="portCount" type="unsigned long">
12971 <desc>
12972 The number of currently usable ports on the controller.
12973 The minimum and maximum number of ports for one controller are
12974 stored in <link to="IStorageController::minPortCount"/>
12975 and <link to="IStorageController::maxPortCount"/>.
12976 </desc>
12977 </attribute>
12978
12979 <attribute name="bus" type="StorageBus" readonly="yes">
12980 <desc>
12981 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy).
12982 </desc>
12983 </attribute>
12984
12985 <attribute name="controllerType" type="StorageControllerType">
12986 <desc>
12987 The exact variant of storage controller hardware presented
12988 to the guest.
12989 Depending on this value, VirtualBox will provide a different
12990 virtual storage controller hardware to the guest.
12991 For SATA, SAS and floppy controllers, only one variant is
12992 available, but for IDE and SCSI, there are several.
12993
12994 For SCSI controllers, the default type is LsiLogic.
12995 </desc>
12996 </attribute>
12997
12998 <attribute name="useHostIOCache" type="boolean">
12999 <desc>
13000 If true, the storage controller emulation will use a dedicated I/O thread, enable the host I/O
13001 caches and use synchronous file APIs on the host. This was the only option in the API before
13002 VirtualBox 3.2 and is still the default for IDE controllers.
13003
13004 If false, the host I/O cache will be disabled for image files attached to this storage controller.
13005 Instead, the storage controller emulation will use asynchronous I/O APIs on the host. This makes
13006 it possible to turn off the host I/O caches because the emulation can handle unaligned access to
13007 the file. This should be used on OS X and Linux hosts if a high I/O load is expected or many
13008 virtual machines are running at the same time to prevent I/O cache related hangs.
13009 This option new with the API of VirtualBox 3.2 and is now the default for non-IDE storage controllers.
13010 </desc>
13011 </attribute>
13012
13013 <method name="getIDEEmulationPort">
13014 <desc>
13015 Gets the corresponding port number which is emulated as an IDE device.
13016 Works only with SATA controllers.
13017
13018 <result name="E_INVALIDARG">
13019 The @a devicePosition is not in the range 0 to 3.
13020 </result>
13021 <result name="E_NOTIMPL">
13022 The storage controller type is not SATAIntelAhci.
13023 </result>
13024
13025 </desc>
13026 <param name="devicePosition" type="long" dir="in"/>
13027 <param name="portNumber" type="long" dir="return"/>
13028 </method>
13029
13030 <method name="setIDEEmulationPort">
13031 <desc>
13032 Sets the port number which is emulated as an IDE device.
13033 Works only with SATA controllers.
13034
13035 <result name="E_INVALIDARG">
13036 The @a devicePosition is not in the range 0 to 3 or the
13037 @a portNumber is not in the range 0 to 29.
13038 </result>
13039 <result name="E_NOTIMPL">
13040 The storage controller type is not SATAIntelAhci.
13041 </result>
13042
13043 </desc>
13044 <param name="devicePosition" type="long" dir="in"/>
13045 <param name="portNumber" type="long" dir="in"/>
13046 </method>
13047
13048 </interface>
13049
13050<if target="wsdl">
13051
13052 <!--
13053 // IManagedObjectRef
13054 /////////////////////////////////////////////////////////////////////////
13055 -->
13056
13057 <interface
13058 name="IManagedObjectRef" extends="$unknown"
13059 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
13060 internal="yes"
13061 wsmap="managed"
13062 wscpp="hardcoded"
13063 >
13064 <desc>
13065 Managed object reference.
13066
13067 Only within the webservice, a managed object reference (which is really
13068 an opaque number) allows a webservice client to address an object
13069 that lives in the address space of the webservice server.
13070
13071 Behind each managed object reference, there is a COM object that lives
13072 in the webservice server's address space. The COM object is not freed
13073 until the managed object reference is released, either by an explicit
13074 call to <link to="IManagedObjectRef::release" /> or by logging off from
13075 the webservice (<link to="IWebsessionManager::logoff" />), which releases
13076 all objects created during the webservice session.
13077
13078 Whenever a method call of the VirtualBox API returns a COM object, the
13079 webservice representation of that method will instead return a
13080 managed object reference, which can then be used to invoke methods
13081 on that object.
13082 </desc>
13083
13084 <method name="getInterfaceName">
13085 <desc>
13086 Returns the name of the interface that this managed object represents,
13087 for example, "IMachine", as a string.
13088 </desc>
13089 <param name="return" type="wstring" dir="return"/>
13090 </method>
13091
13092 <method name="release">
13093 <desc>
13094 Releases this managed object reference and frees the resources that
13095 were allocated for it in the webservice server process. After calling
13096 this method, the identifier of the reference can no longer be used.
13097 </desc>
13098 </method>
13099
13100 </interface>
13101
13102 <!--
13103 // IWebsessionManager
13104 /////////////////////////////////////////////////////////////////////////
13105 -->
13106
13107 <interface
13108 name="IWebsessionManager" extends="$unknown"
13109 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
13110 internal="yes"
13111 wsmap="global"
13112 wscpp="hardcoded"
13113 >
13114 <desc>
13115 Websession manager. This provides essential services
13116 to webservice clients.
13117 </desc>
13118 <method name="logon">
13119 <desc>
13120 Logs a new client onto the webservice and returns a managed object reference to
13121 the IVirtualBox instance, which the client can then use as a basis to further
13122 queries, since all calls to the VirtualBox API are based on the IVirtualBox
13123 interface, in one way or the other.
13124 </desc>
13125 <param name="username" type="wstring" dir="in"/>
13126 <param name="password" type="wstring" dir="in"/>
13127 <param name="return" type="IVirtualBox" dir="return"/>
13128 </method>
13129
13130 <method name="getSessionObject">
13131 <desc>
13132 Returns a managed object reference to the internal ISession object that was created
13133 for this web service session when the client logged on.
13134
13135 <see>ISession</see>
13136 </desc>
13137 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13138 <param name="return" type="ISession" dir="return"/>
13139 </method>
13140
13141 <method name="logoff">
13142 <desc>
13143 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
13144 and destroys all resources associated with the session (most importantly, all
13145 managed objects created in the server while the session was active).
13146 </desc>
13147 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13148 </method>
13149
13150 </interface>
13151
13152</if>
13153
13154 <!--
13155 // IPerformanceCollector & friends
13156 /////////////////////////////////////////////////////////////////////////
13157 -->
13158
13159 <interface
13160 name="IPerformanceMetric" extends="$unknown"
13161 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
13162 >
13163 <desc>
13164 The IPerformanceMetric interface represents parameters of the given
13165 performance metric.
13166 </desc>
13167
13168 <attribute name="metricName" type="wstring" readonly="yes">
13169 <desc>
13170 Name of the metric.
13171 </desc>
13172 </attribute>
13173
13174 <attribute name="object" type="$unknown" readonly="yes">
13175 <desc>
13176 Object this metric belongs to.
13177 </desc>
13178 </attribute>
13179
13180 <attribute name="description" type="wstring" readonly="yes">
13181 <desc>
13182 Textual description of the metric.
13183 </desc>
13184 </attribute>
13185
13186 <attribute name="period" type="unsigned long" readonly="yes">
13187 <desc>
13188 Time interval between samples, measured in seconds.
13189 </desc>
13190 </attribute>
13191
13192 <attribute name="count" type="unsigned long" readonly="yes">
13193 <desc>
13194 Number of recent samples retained by the performance collector for this
13195 metric.
13196
13197 When the collected sample count exceeds this number, older samples
13198 are discarded.
13199 </desc>
13200 </attribute>
13201
13202 <attribute name="unit" type="wstring" readonly="yes">
13203 <desc>
13204 Unit of measurement.
13205 </desc>
13206 </attribute>
13207
13208 <attribute name="minimumValue" type="long" readonly="yes">
13209 <desc>
13210 Minimum possible value of this metric.
13211 </desc>
13212 </attribute>
13213
13214 <attribute name="maximumValue" type="long" readonly="yes">
13215 <desc>
13216 Maximum possible value of this metric.
13217 </desc>
13218 </attribute>
13219 </interface>
13220
13221 <interface
13222 name="IPerformanceCollector" extends="$unknown"
13223 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
13224 wsmap="managed"
13225 >
13226 <desc>
13227 The IPerformanceCollector interface represents a service that collects
13228 and stores performance metrics data.
13229
13230 Performance metrics are associated with objects of interfaces like IHost
13231 and IMachine. Each object has a distinct set of performance metrics. The
13232 set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
13233
13234 Metric data is collected at the specified intervals and is retained
13235 internally. The interval and the number of retained samples can be set
13236 with <link to="IPerformanceCollector::setupMetrics" />. Both metric data
13237 and collection settings are not persistent, they are discarded as soon as
13238 VBoxSVC process terminates. Moreover, metric settings and data associated
13239 with a particular VM only exist while VM is running. They disappear as
13240 soon as VM shuts down. It is not possible to set up metrics for machines
13241 that are powered off. One needs to start VM first, then set up metric
13242 collection parameters.
13243
13244 Metrics are organized hierarchically, with each level separated by a
13245 slash (/) character. Generally, the scheme for metric names is like this:
13246
13247 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
13248
13249 "Category/Metric" together form the base metric name. A base metric is
13250 the smallest unit for which a sampling interval and the number of
13251 retained samples can be set. Only base metrics can be enabled and
13252 disabled. All sub-metrics are collected when their base metric is
13253 collected. Collected values for any set of sub-metrics can be queried
13254 with <link to="IPerformanceCollector::queryMetricsData" />.
13255
13256 For example "CPU/Load/User:avg" metric name stands for the "CPU"
13257 category, "Load" metric, "User" submetric, "average" aggregate. An
13258 aggregate function is computed over all retained data. Valid aggregate
13259 functions are:
13260
13261 <ul>
13262 <li>avg -- average</li>
13263 <li>min -- minimum</li>
13264 <li>max -- maximum</li>
13265 </ul>
13266
13267 When setting up metric parameters, querying metric data, enabling or
13268 disabling metrics wildcards can be used in metric names to specify a
13269 subset of metrics. For example, to select all CPU-related metrics
13270 use <tt>CPU/*</tt>, all averages can be queried using <tt>*:avg</tt> and
13271 so on. To query metric values without aggregates <tt>*:</tt> can be used.
13272
13273 The valid names for base metrics are:
13274
13275 <ul>
13276 <li>CPU/Load</li>
13277 <li>CPU/MHz</li>
13278 <li>RAM/Usage</li>
13279 </ul>
13280
13281 The general sequence for collecting and retrieving the metrics is:
13282 <ul>
13283 <li>
13284 Obtain an instance of IPerformanceCollector with
13285 <link to="IVirtualBox::performanceCollector" />
13286 </li>
13287 <li>
13288 Allocate and populate an array with references to objects the metrics
13289 will be collected for. Use references to IHost and IMachine objects.
13290 </li>
13291 <li>
13292 Allocate and populate an array with base metric names the data will
13293 be collected for.
13294 </li>
13295 <li>
13296 Call <link to="IPerformanceCollector::setupMetrics" />. From now on
13297 the metric data will be collected and stored.
13298 </li>
13299 <li>
13300 Wait for the data to get collected.
13301 </li>
13302 <li>
13303 Allocate and populate an array with references to objects the metric
13304 values will be queried for. You can re-use the object array used for
13305 setting base metrics.
13306 </li>
13307 <li>
13308 Allocate and populate an array with metric names the data will be
13309 collected for. Note that metric names differ from base metric names.
13310 </li>
13311 <li>
13312 Call <link to="IPerformanceCollector::queryMetricsData" />. The data
13313 that have been collected so far are returned. Note that the values
13314 are still retained internally and data collection continues.
13315 </li>
13316 </ul>
13317
13318 For an example of usage refer to the following files in VirtualBox SDK:
13319 <ul>
13320 <li>
13321 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13322 </li>
13323 <li>
13324 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13325 </li>
13326 </ul>
13327 </desc>
13328
13329 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13330 <desc>
13331 Array of unique names of metrics.
13332
13333 This array represents all metrics supported by the performance
13334 collector. Individual objects do not necessarily support all of them.
13335 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13336 list of supported metrics for a particular object.
13337 </desc>
13338 </attribute>
13339
13340 <method name="getMetrics">
13341 <desc>
13342 Returns parameters of specified metrics for a set of objects.
13343 <note>
13344 @c Null metrics array means all metrics. @c Null object array means
13345 all existing objects.
13346 </note>
13347 </desc>
13348 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13349 <desc>
13350 Metric name filter. Currently, only a comma-separated list of metrics
13351 is supported.
13352 </desc>
13353 </param>
13354 <param name="objects" type="$unknown" dir="in" safearray="yes">
13355 <desc>
13356 Set of objects to return metric parameters for.
13357 </desc>
13358 </param>
13359 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13360 <desc>
13361 Array of returned metric parameters.
13362 </desc>
13363 </param>
13364 </method>
13365
13366 <method name="setupMetrics">
13367 <desc>
13368 Sets parameters of specified base metrics for a set of objects. Returns
13369 an array of <link to="IPerformanceMetric" /> describing the metrics
13370 have been affected.
13371 <note>
13372 @c Null or empty metric name array means all metrics. @c Null or
13373 empty object array means all existing objects. If metric name array
13374 contains a single element and object array contains many, the single
13375 metric name array element is applied to each object array element to
13376 form metric/object pairs.
13377 </note>
13378 </desc>
13379 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13380 <desc>
13381 Metric name filter. Comma-separated list of metrics with wildcard
13382 support.
13383 </desc>
13384 </param>
13385 <param name="objects" type="$unknown" dir="in" safearray="yes">
13386 <desc>
13387 Set of objects to setup metric parameters for.
13388 </desc>
13389 </param>
13390 <param name="period" type="unsigned long" dir="in">
13391 <desc>
13392 Time interval in seconds between two consecutive samples of
13393 performance data.
13394 </desc>
13395 </param>
13396 <param name="count" type="unsigned long" dir="in">
13397 <desc>
13398 Number of samples to retain in performance data history. Older
13399 samples get discarded.
13400 </desc>
13401 </param>
13402 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13403 <desc>
13404 Array of metrics that have been modified by the call to this method.
13405 </desc>
13406 </param>
13407 </method>
13408
13409 <method name="enableMetrics">
13410 <desc>
13411 Turns on collecting specified base metrics. Returns an array of
13412 <link to="IPerformanceMetric" /> describing the metrics have been
13413 affected.
13414 <note>
13415 @c Null or empty metric name array means all metrics. @c Null or
13416 empty object array means all existing objects. If metric name array
13417 contains a single element and object array contains many, the single
13418 metric name array element is applied to each object array element to
13419 form metric/object pairs.
13420 </note>
13421 </desc>
13422 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13423 <desc>
13424 Metric name filter. Comma-separated list of metrics with wildcard
13425 support.
13426 </desc>
13427 </param>
13428 <param name="objects" type="$unknown" dir="in" safearray="yes">
13429 <desc>
13430 Set of objects to enable metrics for.
13431 </desc>
13432 </param>
13433 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13434 <desc>
13435 Array of metrics that have been modified by the call to this method.
13436 </desc>
13437 </param>
13438 </method>
13439
13440 <method name="disableMetrics">
13441 <desc>
13442 Turns off collecting specified base metrics. Returns an array of
13443 <link to="IPerformanceMetric" /> describing the metrics have been
13444 affected.
13445 <note>
13446 @c Null or empty metric name array means all metrics. @c Null or
13447 empty object array means all existing objects. If metric name array
13448 contains a single element and object array contains many, the single
13449 metric name array element is applied to each object array element to
13450 form metric/object pairs.
13451 </note>
13452 </desc>
13453 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13454 <desc>
13455 Metric name filter. Comma-separated list of metrics with wildcard
13456 support.
13457 </desc>
13458 </param>
13459 <param name="objects" type="$unknown" dir="in" safearray="yes">
13460 <desc>
13461 Set of objects to disable metrics for.
13462 </desc>
13463 </param>
13464 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13465 <desc>
13466 Array of metrics that have been modified by the call to this method.
13467 </desc>
13468 </param>
13469 </method>
13470
13471 <method name="queryMetricsData">
13472 <desc>
13473 Queries collected metrics data for a set of objects.
13474
13475 The data itself and related metric information are returned in seven
13476 parallel and one flattened array of arrays. Elements of
13477 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13478 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13479 the same index describe one set of values corresponding to a single
13480 metric.
13481
13482 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13483 start and length of a sub-array is indicated by
13484 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13485 value for metric <tt>metricNames[i]</tt> is at
13486 <tt>returnData[returnIndices[i]]</tt>.
13487
13488 <note>
13489 @c Null or empty metric name array means all metrics. @c Null or
13490 empty object array means all existing objects. If metric name array
13491 contains a single element and object array contains many, the single
13492 metric name array element is applied to each object array element to
13493 form metric/object pairs.
13494 </note>
13495 <note>
13496 Data collection continues behind the scenes after call to @c
13497 queryMetricsData. The return data can be seen as the snapshot of the
13498 current state at the time of @c queryMetricsData call. The internally
13499 kept metric values are not cleared by the call. This makes possible
13500 querying different subsets of metrics or aggregates with subsequent
13501 calls. If periodic querying is needed it is highly suggested to query
13502 the values with @c interval*count period to avoid confusion. This way
13503 a completely new set of data values will be provided by each query.
13504 </note>
13505 </desc>
13506 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13507 <desc>
13508 Metric name filter. Comma-separated list of metrics with wildcard
13509 support.
13510 </desc>
13511 </param>
13512 <param name="objects" type="$unknown" dir="in" safearray="yes">
13513 <desc>
13514 Set of objects to query metrics for.
13515 </desc>
13516 </param>
13517 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13518 <desc>
13519 Names of metrics returned in @c returnData.
13520 </desc>
13521 </param>
13522 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13523 <desc>
13524 Objects associated with metrics returned in @c returnData.
13525 </desc>
13526 </param>
13527 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13528 <desc>
13529 Units of measurement for each returned metric.
13530 </desc>
13531 </param>
13532 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13533 <desc>
13534 Divisor that should be applied to return values in order to get
13535 floating point values. For example:
13536 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13537 will retrieve the floating point value of i-th sample of the first
13538 metric.
13539 </desc>
13540 </param>
13541 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13542 <desc>
13543 Sequence numbers of the first elements of value sequences of
13544 particular metrics returned in @c returnData. For aggregate metrics
13545 it is the sequence number of the sample the aggregate started
13546 calculation from.
13547 </desc>
13548 </param>
13549 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13550 <desc>
13551 Indices of the first elements of value sequences of particular
13552 metrics returned in @c returnData.
13553 </desc>
13554 </param>
13555 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13556 <desc>
13557 Lengths of value sequences of particular metrics.
13558 </desc>
13559 </param>
13560 <param name="returnData" type="long" dir="return" safearray="yes">
13561 <desc>
13562 Flattened array of all metric data containing sequences of values for
13563 each metric.
13564 </desc>
13565 </param>
13566 </method>
13567
13568 </interface>
13569 <enum
13570 name="NATAliasMode"
13571 uuid="67772168-50d9-11df-9669-7fb714ee4fa1">
13572 <desc></desc>
13573 <const name="AliasLog" value="0x1">
13574 <desc></desc>
13575 </const>
13576 <const name="AliasProxyOnly" value="0x02">
13577 <desc></desc>
13578 </const>
13579 <const name="AliasUseSamePorts" value="0x04">
13580 <desc></desc>
13581 </const>
13582 </enum>
13583 <enum
13584 name="NATProtocol"
13585 uuid="e90164be-eb03-11de-94af-fff9b1c1b19f"
13586 >
13587 <desc>Protocol definitions used with NAT port-forwarding rules.</desc>
13588 <const name="UDP" value="0">
13589 <desc>Port-forwarding uses UDP protocol.</desc>
13590 </const>
13591 <const name="TCP" value="1">
13592 <desc>Port-forwarding uses TCP protocol.</desc>
13593 </const>
13594 </enum>
13595
13596 <interface
13597 name="INATEngine" extends="$unknown"
13598 uuid="4b286616-eb03-11de-b0fb-1701eca42246"
13599 wsmap="managed"
13600 >
13601 <desc>Interface for managing a NAT engine which is used with a virtual machine. This
13602 allows for changing NAT behavior such as port-forwarding rules. This interface is
13603 used in the <link to="INetworkAdapter::natDriver" /> attribute.</desc>
13604 <attribute name="network" type="wstring">
13605 <desc>The network attribute of the NAT engine (the same value is used with built-in
13606 DHCP server to fill corresponding fields of DHCP leases).</desc>
13607 </attribute>
13608 <attribute name="hostIP" type="wstring">
13609 <desc>IP of host interface to bind all opened sockets to.
13610 <note>Changing this does not change binding of port forwarding.</note>
13611 </desc>
13612 </attribute>
13613 <attribute name="tftpPrefix" type="wstring">
13614 <desc>TFTP prefix attribute which is used with the built-in DHCP server to fill
13615 the corresponding fields of DHCP leases.</desc>
13616 </attribute>
13617 <attribute name="tftpBootFile" type="wstring">
13618 <desc>TFTP boot file attribute which is used with the built-in DHCP server to fill
13619 the corresponding fields of DHCP leases.</desc>
13620 </attribute>
13621 <attribute name="tftpNextServer" type="wstring">
13622 <desc>TFTP server attribute which is used with the built-in DHCP server to fill
13623 the corresponding fields of DHCP leases.
13624 <note>The preferred form is IPv4 addresses.</note>
13625 </desc>
13626 </attribute>
13627 <attribute name="aliasMode" type="unsigned long">
13628 <desc></desc>
13629 </attribute>
13630 <attribute name="dnsPassDomain" type="boolean">
13631 <desc>Whether the DHCP server should pass the DNS domain used by the host.</desc>
13632 </attribute>
13633 <attribute name="dnsProxy" type="boolean">
13634 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
13635 of the DNS proxy and process traffic using DNS servers registered on the host.</desc>
13636 </attribute>
13637 <attribute name="dnsUseHostResolver" type="boolean">
13638 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
13639 of the DNS proxy and process traffic using the host resolver mechanism.</desc>
13640 </attribute>
13641 <attribute name="redirects" type="wstring" readonly="yes" safearray="yes">
13642 <desc>Array of NAT port-forwarding rules in string representation, in the following
13643 format: "name,protocol id,host ip,host port,guest ip,guest port".</desc>
13644 </attribute>
13645 <method name="setNetworkSettings">
13646 <desc>Sets network configuration of the NAT engine.</desc>
13647 <param name="mtu" type="unsigned long" dir="in">
13648 <desc>MTU (maximum transmission unit) of the NAT engine in bytes.</desc>
13649 </param>
13650 <param name="sockSnd" type="unsigned long" dir="in">
13651 <desc>Capacity of the socket send buffer in bytes when creating a new socket.</desc>
13652 </param>
13653 <param name="sockRcv" type="unsigned long" dir="in">
13654 <desc>Capacity of the socket receive buffer in bytes when creating a new socket.</desc>
13655 </param>
13656 <param name="TcpWndSnd" type="unsigned long" dir="in">
13657 <desc>Initial size of the NAT engine's sending TCP window in bytes when
13658 establishing a new TCP connection.</desc>
13659 </param>
13660 <param name="TcpWndRcv" type="unsigned long" dir="in">
13661 <desc>Initial size of the NAT engine's receiving TCP window in bytes when
13662 establishing a new TCP connection.</desc>
13663 </param>
13664 </method>
13665 <method name="getNetworkSettings">
13666 <desc>Returns network configuration of NAT engine. See <link to="#setNetworkSettings" />
13667 for parameter descriptions.</desc>
13668 <param name="mtu" type="unsigned long" dir="out" />
13669 <param name="sockSnd" type="unsigned long" dir="out" />
13670 <param name="sockRcv" type="unsigned long" dir="out" />
13671 <param name="TcpWndSnd" type="unsigned long" dir="out" />
13672 <param name="TcpWndRcv" type="unsigned long" dir="out" />
13673 </method>
13674 <method name="addRedirect">
13675 <desc>Adds a new NAT port-forwarding rule.</desc>
13676 <param name="name" type="wstring" dir="in">
13677 <desc>The name of the rule. An empty name is acceptable, in which case the NAT engine
13678 auto-generates one using the other parameters.</desc>
13679 </param>
13680 <param name="proto" type="NATProtocol" dir="in">
13681 <desc>Protocol handled with the rule.</desc>
13682 </param>
13683 <param name="hostIp" type="wstring" dir="in">
13684 <desc>IP of the host interface to which the rule should apply. An empty ip address is
13685 acceptable, in which case the NAT engine binds the handling socket to any interface.</desc>
13686 </param>
13687 <param name="hostPort" type="unsigned short" dir="in">
13688 <desc>The port number to listen on.</desc>
13689 </param>
13690 <param name="guestIp" type="wstring" dir="in">
13691 <desc>The IP address of the guest which the NAT engine will forward matching packets
13692 to. An empty IP address is acceptable, in which case the NAT engine will forward
13693 packets to the first DHCP lease (x.x.x.15).</desc>
13694 </param>
13695 <param name="guestPort" type="unsigned short" dir="in">
13696 <desc>The port number to forward.</desc>
13697 </param>
13698 </method>
13699 <method name="removeRedirect">
13700 <desc>Removes a port-forwarding rule that was previously registered.</desc>
13701 <param name="name" type="wstring" dir="in">
13702 <desc>The name of the rule to delete.</desc>
13703 </param>
13704 </method>
13705 </interface>
13706
13707 <enum
13708 name="VBoxEventType"
13709 uuid="2c76667e-6981-4122-a71a-cdfd6a6eb575">
13710
13711 <desc>
13712 Type of an event.
13713 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
13714 </desc>
13715
13716 <const name="Invalid" value="0">
13717 <desc>
13718 Invalid event, must be first.
13719 </desc>
13720 </const>
13721
13722 <const name="Any" value="1">
13723 <desc>
13724 Wildcard for all events.
13725 Events of this type are never delivered, and only used in
13726 registerListener() call to simplify registration.
13727 </desc>
13728 </const>
13729
13730 <const name="Vetoable" value="2">
13731 <desc>
13732 Wildcard for all vetoable events. Events of this type are never delivered, and only
13733 used in registerListener() call to simplify registration.
13734 </desc>
13735 </const>
13736
13737 <const name="MachineEvent" value="3">
13738 <desc>
13739 Wildcard for all machine events. Events of this type are never delivered, and only used in
13740 registerListener() call to simplify registration.
13741 </desc>
13742 </const>
13743
13744 <const name="SnapshotEvent" value="4">
13745 <desc>
13746 Wildcard for all snapshot events. Events of this type are never delivered, and only used in
13747 registerListener() call to simplify registration.
13748 </desc>
13749 </const>
13750
13751 <const name="InputEvent" value="5">
13752 <desc>
13753 Wildcard for all input device (keyboard, mouse) events.
13754 Events of this type are never delivered, and only used in
13755 registerListener() call to simplify registration.
13756 </desc>
13757 </const>
13758
13759 <const name="LastWildcard" value="31">
13760 <desc>
13761 Last wildcard.
13762 </desc>
13763 </const>
13764
13765 <const name="OnMachineStateChanged" value="32">
13766 <desc>
13767 See <link to="IMachineStateChangedEvent">IMachineStateChangedEvent</link>.
13768 </desc>
13769 </const>
13770 <const name="OnMachineDataChanged" value="33">
13771 <desc>
13772 See <link to="IMachineDataChangedEvent">IMachineDataChangedEvent</link>.
13773 </desc>
13774 </const>
13775 <const name="OnExtraDataChanged" value="34">
13776 <desc>
13777 See <link to="IExtraDataChangedEvent">IExtraDataChangedEvent</link>.
13778 </desc>
13779 </const>
13780 <const name="OnExtraDataCanChange" value="35">
13781 <desc>
13782 See <link to="IExtraDataCanChangeEvent">IExtraDataCanChangeEvent</link>.
13783 </desc>
13784 </const>
13785 <const name="OnMediumRegistered" value="36">
13786 <desc>
13787 See <link to="IMediumRegisteredEvent">IMediumRegisteredEvent</link>.
13788 </desc>
13789 </const>
13790 <const name="OnMachineRegistered" value="37">
13791 <desc>
13792 See <link to="IMachineRegisteredEvent">IMachineRegisteredEvent</link>.
13793 </desc>
13794 </const>
13795 <const name="OnSessionStateChanged" value="38">
13796 <desc>
13797 See <link to="ISessionStateChangedEvent">ISessionStateChangedEvent</link>.
13798 </desc>
13799 </const>
13800 <const name="OnSnapshotTaken" value="39">
13801 <desc>
13802 See <link to="ISnapshotTakenEvent">ISnapshotTakenEvent</link>.
13803 </desc>
13804 </const>
13805 <const name="OnSnapshotDeleted" value="40">
13806 <desc>
13807 See <link to="ISnapshotDeletedEvent">ISnapshotDeletedEvent</link>.
13808 </desc>
13809 </const>
13810 <const name="OnSnapshotChanged" value="41">
13811 <desc>
13812 See <link to="ISnapshotChangedEvent">ISnapshotChangedEvent</link>.
13813 </desc>
13814 </const>
13815 <const name="OnGuestPropertyChanged" value="42">
13816 <desc>
13817 See <link to="IGuestPropertyChangedEvent">IGuestPropertyChangedEvent</link>.
13818 </desc>
13819 </const>
13820 <!-- Console events -->
13821 <const name="OnMousePointerShapeChanged" value="43">
13822 <desc>
13823 See <link to="IMousePointerShapeChangedEvent">IMousePointerShapeChangedEvent</link>.
13824 </desc>
13825 </const>
13826 <const name="OnMouseCapabilityChanged" value="44">
13827 <desc>
13828 See <link to="IMouseCapabilityChangedEvent">IMouseCapabilityChangedEvent</link>.
13829 </desc>
13830 </const>
13831 <const name="OnKeyboardLedsChanged" value="45">
13832 <desc>
13833 See <link to="IKeyboardLedsChangedEvent">IKeyboardLedsChangedEvent</link>.
13834 </desc>
13835 </const>
13836 <const name="OnStateChanged" value="46">
13837 <desc>
13838 See <link to="IStateChangedEvent">IStateChangedEvent</link>.
13839 </desc>
13840 </const>
13841 <const name="OnAdditionsStateChanged" value="47">
13842 <desc>
13843 See <link to="IAdditionsStateChangedEvent">IAdditionsStateChangedEvent</link>.
13844 </desc>
13845 </const>
13846 <const name="OnNetworkAdapterChanged" value="48">
13847 <desc>
13848 See <link to="INetworkAdapterChangedEvent">INetworkAdapterChangedEvent</link>.
13849 </desc>
13850 </const>
13851 <const name="OnSerialPortChanged" value="49">
13852 <desc>
13853 See <link to="ISerialPortChangedEvent">ISerialPortChangedEvent</link>.
13854 </desc>
13855 </const>
13856 <const name="OnParallelPortChanged" value="50">
13857 <desc>
13858 See <link to="IParallelPortChangedEvent">IParallelPortChangedEvent</link>.
13859 </desc>
13860 </const>
13861 <const name="OnStorageControllerChanged" value="51">
13862 <desc>
13863 See <link to="IStorageControllerChangedEvent">IStorageControllerChangedEvent</link>.
13864 </desc>
13865 </const>
13866 <const name="OnMediumChanged" value="52">
13867 <desc>
13868 See <link to="IMediumChangedEvent">IMediumChangedEvent</link>.
13869 </desc>
13870 </const>
13871 <const name="OnVRDPServerChanged" value="53">
13872 <desc>
13873 See <link to="IVRDPServerChangedEvent">IVRDPServerChangedEvent</link>.
13874 </desc>
13875 </const>
13876 <const name="OnUSBControllerChanged" value="54">
13877 <desc>
13878 See <link to="IUSBControllerChangedEvent">IUSBControllerChangedEvent</link>.
13879 </desc>
13880 </const>
13881 <const name="OnUSBDeviceStateChanged" value="55">
13882 <desc>
13883 See <link to="IUSBDeviceStateChangedEvent">IUSBDeviceStateChangedEvent</link>.
13884 </desc>
13885 </const>
13886 <const name="OnSharedFolderChanged" value="56">
13887 <desc>
13888 See <link to="ISharedFolderChangedEvent">ISharedFolderChangedEvent</link>.
13889 </desc>
13890 </const>
13891 <const name="OnRuntimeError" value="57">
13892 <desc>
13893 See <link to="IRuntimeErrorEvent">IRuntimeErrorEvent</link>.
13894 </desc>
13895 </const>
13896 <const name="OnCanShowWindow" value="58">
13897 <desc>
13898 See <link to="ICanShowWindowEvent">ICanShowWindowEvent</link>.
13899 </desc>
13900 </const>
13901 <const name="OnShowWindow" value="59">
13902 <desc>
13903 See <link to="IShowWindowEvent">IShowWindowEvent</link>.
13904 </desc>
13905 </const>
13906 <const name="OnCPUChanged" value="60">
13907 <desc>
13908 See <link to="ICPUChangedEvent">ICPUChangedEvent</link>.
13909 </desc>
13910 </const>
13911 <const name="OnRemoteDisplayInfoChanged" value="61">
13912 <desc>
13913 See <link to="IRemoteDisplayInfoChangedEvent">IRemoteDisplayInfoChangedEvent</link>.
13914 </desc>
13915 </const>
13916 <const name="OnEventSourceChanged" value="62">
13917 <desc>
13918 See <link to="IEventSourceChangedEvent">IEventSourceChangedEvent</link>.
13919 </desc>
13920 </const>
13921 <const name="OnCPUPriorityChanged" value="63">
13922 <desc>
13923 See <link to="ICPUPriorityChangedEvent">ICPUPriorityChangedEvent</link>.
13924 </desc>
13925 </const>
13926 <!-- Last event marker -->
13927 <const name="Last" value="64">
13928 <desc>
13929 Must be last event, used for iterations and structures relying on numerical event values.
13930 </desc>
13931 </const>
13932
13933 </enum>
13934
13935 <interface
13936 name="IEventSource" extends="$unknown"
13937 uuid="3c670618-f727-4fe9-94d2-8243f489a033"
13938 wsmap="managed"
13939 >
13940 <desc>
13941 Event source. Generally, any object which could generate events can be an event source,
13942 or aggregate one. To simplify using one-way protocols such as webservices running on top of HTTP(S),
13943 an event source can work with listeners in either active or passive mode. In active mode it is up to
13944 the IEventSource implementation to call <link to="IEventListener::handleEvent" />, in passive mode the
13945 event source keeps track of pending events for each listener and returns available events on demand.
13946
13947 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
13948 </desc>
13949
13950 <method name="createListener">
13951 <desc>
13952 Creates a new listener object, useful for passive mode.
13953 </desc>
13954 <param name="listener" type="IEventListener" dir="return"/>
13955 </method>
13956
13957 <method name="registerListener">
13958 <desc>
13959 Register an event listener.
13960
13961 <note>
13962 To avoid system overload, the VirtualBox server process checks if passive event
13963 listeners call <link to="IEventSource::getEvent"/> frequently enough. In the
13964 current implementation, if more than 100 pending events are detected for a passive
13965 event listener, it is forcefully unregistered by the system, and further
13966 <link to="#getEvent" /> calls will return @c VBOX_E_OBJECT_NOT_FOUND.
13967 </note>
13968 </desc>
13969 <param name="listener" type="IEventListener" dir="in">
13970 <desc>Listener to register.</desc>
13971 </param>
13972 <param name="interesting" type="VBoxEventType" dir="in" safearray="yes">
13973 <desc>
13974 Event types listener is interested in. One can use wildcards like -
13975 <link to="VBoxEventType::Any"/> to specify wildcards, matching more
13976 than one event.
13977 </desc>
13978 </param>
13979 <param name="active" type="boolean" dir="in">
13980 <desc>
13981 Which mode this listener is operating in.
13982 In active mode, <link to="IEventListener::handleEvent" /> is called directly.
13983 In passive mode, an internal event queue is created for this this IEventListener.
13984 For each event coming in, it is added to queues for all interested registered passive
13985 listeners. It is then up to the external code to call the listener's
13986 <link to="IEventListener::handleEvent" /> method. When done with an event, the
13987 external code must call <link to="#eventProcessed" />.
13988 </desc>
13989 </param>
13990 </method>
13991
13992 <method name="unregisterListener">
13993 <desc>
13994 Unregister an event listener. If listener is passive, and some waitable events are still
13995 in queue they are marked as processed automatically.
13996 </desc>
13997 <param name="listener" type="IEventListener" dir="in">
13998 <desc>Listener to unregister.</desc>
13999 </param>
14000 </method>
14001
14002 <method name="fireEvent">
14003 <desc>
14004 Fire an event for this source.
14005 </desc>
14006 <param name="event" type="IEvent" dir="in">
14007 <desc>Event to deliver.</desc>
14008 </param>
14009 <param name="timeout" type="long" dir="in">
14010 <desc>
14011 Maximum time to wait for event processing (if event is waitable), in ms;
14012 0 = no wait, -1 = indefinite wait.
14013 </desc>
14014 </param>
14015 <param name="result" type="boolean" dir="return">
14016 <desc>true if an event was delivered to all targets, or is non-waitable.</desc>
14017 </param>
14018 </method>
14019
14020 <method name="getEvent">
14021 <desc>
14022 Get events from this peer's event queue (for passive mode). Calling this method
14023 regularly is required for passive event listeners to avoid system overload;
14024 see <link to="IEventSource::registerListener" /> for details.
14025
14026 <result name="VBOX_E_OBJECT_NOT_FOUND">
14027 Listener is not registered, or autounregistered.
14028 </result>
14029 </desc>
14030 <param name="listener" type="IEventListener" dir="in">
14031 <desc>Which listener to get data for.</desc>
14032 </param>
14033 <param name="timeout" type="long" dir="in">
14034 <desc>
14035 Maximum time to wait for events, in ms;
14036 0 = no wait, -1 = indefinite wait.
14037 </desc>
14038 </param>
14039 <param name="event" type="IEvent" dir="return">
14040 <desc>Event retrieved, or null if none available.</desc>
14041 </param>
14042 </method>
14043
14044 <method name="eventProcessed">
14045 <desc>
14046 Must be called for waitable events after a particular listener finished its
14047 event processing. When all listeners of a particular event have called this
14048 method, the system will then call <link to="IEvent::setProcessed" />.
14049 </desc>
14050 <param name="listener" type="IEventListener" dir="in">
14051 <desc>Which listener processed event.</desc>
14052 </param>
14053 <param name="event" type="IEvent" dir="in">
14054 <desc>Which event.</desc>
14055 </param>
14056 </method>
14057
14058 </interface>
14059
14060 <interface
14061 name="IEventListener" extends="$unknown"
14062 uuid="67099191-32e7-4f6c-85ee-422304c71b90"
14063 wsmap="managed"
14064 >
14065 <desc>
14066 Event listener. An event listener can work in either active or passive mode, depending on the way
14067 it was registered.
14068 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
14069 </desc>
14070
14071 <method name="handleEvent">
14072 <desc>
14073 Handle event callback (called directly by IEventSource in active mode, or could be
14074 called by event processor thread in passive mode).
14075 </desc>
14076 <param name="event" type="IEvent" dir="in">
14077 <desc>Event available.</desc>
14078 </param>
14079 </method>
14080
14081 </interface>
14082
14083 <interface
14084 name="IEvent" extends="$unknown"
14085 uuid="0ca2adba-8f30-401b-a8cd-fe31dbe839c0"
14086 wsmap="managed"
14087 >
14088 <desc>
14089 Abstract parent interface for VirtualBox events. Actual events will typically implement
14090 a more specific interface which derives from this (see below).
14091
14092 <b>Introduction to VirtualBox events</b>
14093
14094 Generally speaking, an event (represented by this interface) signals that something
14095 happened, while an event listener (see <link to="IEventListener" />) represents an
14096 entity that is interested in certain events. In order for this to work with
14097 unidirectional protocols (i.e. web services), the concepts of passive and active
14098 listener are used.
14099
14100 Event consumers can register themselves as listeners, providing an array of
14101 events they are interested in (see <link to="IEventSource::registerListener" />).
14102 When an event triggers, the listener is notified about the event. The exact
14103 mechanism of the notification depends on whether the listener was registered as
14104 an active or passive listener:
14105
14106 <ul>
14107 <li>An active listener is very similar to a callback: it is a function invoked
14108 by the API. As opposed to the callbacks that were used in the API before
14109 VirtualBox 3.3 however, events are now objects with an interface hierarchy.
14110 </li>
14111
14112 <li>Passive listeners are somewhat tricker to implement, but do not require
14113 a client function to be callable, which is not an option with scripting
14114 languages or web service clients. Internally the <link to="IEventSource" />
14115 implementation maintains an event queue for each passive listener, and
14116 newly arrived events are put in this queue. When the listener calls
14117 <link to="IEventSource::getEvent"/>, first element from its internal event
14118 queue is returned. When the client completes processing of an event,
14119 the <link to="IEventSource::eventProcessed" /> function must be called,
14120 acknowledging that the event was processed. It supports implementing
14121 waitable events. On passive listener unregistration, all events from its
14122 queue are auto-acknowledged.
14123 </li>
14124 </ul>
14125
14126 Waitable events are useful in situations where the event generator wants to track
14127 delivery or a party wants to wait until all listeners have completed the event. A
14128 typical example would be a vetoable event (see <link to="IVetoEvent" />) where a
14129 listeners might veto a certain action, and thus the event producer has to make
14130 sure that all listeners have processed the event and not vetoed before taking
14131 the action.
14132
14133 A given event may have both passive and active listeners at the same time.
14134
14135 <b>Using events</b>
14136
14137 Any VirtualBox object capable of producing externally visible events provides an
14138 @c eventSource read-only attribute, which is of the type <link to="IEventSource" />.
14139 This event source object is notified by VirtualBox once something has happened, so
14140 consumers may register event listeners with this event source. To register a listener,
14141 an object implementing the <link to="IEventListener" /> interface must be provided.
14142 For active listeners, such an object is typically created by the consumer, while for
14143 passive listeners <link to="IEventSource::createListener" /> should be used. Please
14144 note that a listener created with @c createListener() must not be used as an active listener.
14145
14146 Once created, the listener must be registered to listen for the desired events
14147 (see <link to="IEventSource::registerListener" />), providing an array of
14148 <link to="VBoxEventType" /> enums. Those elements can either be the individual
14149 event IDs or wildcards matching multiple event IDs.
14150
14151 After registration, the callback's <link to="IEventListener::handleEvent" /> method is
14152 called automatically when the event is triggered, while passive listeners have to call
14153 <link to="IEventSource::getEvent" /> and <link to="IEventSource::eventProcessed" /> in
14154 an event processing loop.
14155
14156 The IEvent interface is an abstract parent interface for all such VirtualBox events
14157 coming in. As a result, the standard use pattern inside <link to="IEventListener::handleEvent" />
14158 or the event processing loop is to check the <link to="#type" /> attribute of the event and
14159 then cast to the appropriate specific interface using @c QueryInterface().
14160 </desc>
14161
14162 <attribute name="type" readonly="yes" type="VBoxEventType">
14163 <desc>
14164 Event type.
14165 </desc>
14166 </attribute>
14167
14168 <attribute name="source" readonly="yes" type="IEventSource">
14169 <desc>
14170 Source of this event.
14171 </desc>
14172 </attribute>
14173
14174 <attribute name="waitable" readonly="yes" type="boolean">
14175 <desc>
14176 If we can wait for this event being processed. If false, waitProcessed() returns immediately,
14177 and setProcessed() doesn't make sense. Non-waitable events are generally better performing,
14178 as no additional overhead associated with waitability imposed.
14179 Waitable events are needed when one need to be able to wait for particular event processed,
14180 for example for vetoable changes, or if event refers to some resource which need to be kept immutable
14181 until all consumers confirmed events.
14182 </desc>
14183 </attribute>
14184
14185 <method name="setProcessed">
14186 <desc>
14187 Internal method called by the system when all listeners of a particular event have called
14188 <link to="IEventSource::eventProcessed" />. This should not be called by client code.
14189 </desc>
14190 </method>
14191
14192 <method name="waitProcessed">
14193 <desc>
14194 Wait until time outs, or this event is processed. Event must be waitable for this operation to have
14195 described semantics, for non-waitable returns true immediately.
14196 </desc>
14197 <param name="timeout" type="long" dir="in">
14198 <desc>
14199 Maximum time to wait for event processeing, in ms;
14200 0 = no wait, -1 = indefinite wait.
14201 </desc>
14202 </param>
14203 <param name="result" type="boolean" dir="return">
14204 <desc>If this event was processed before timeout.</desc>
14205 </param>
14206 </method>
14207 </interface>
14208
14209
14210 <interface
14211 name="IReusableEvent" extends="IEvent"
14212 uuid="69bfb134-80f6-4266-8e20-16371f68fa25"
14213 wsmap="managed"
14214 >
14215 <desc>Base abstract interface for all reusable events.</desc>
14216
14217 <attribute name="generation" readonly="yes" type="unsigned long">
14218 <desc>Current generation of event, incremented on reuse.</desc>
14219 </attribute>
14220
14221 <method name="reuse">
14222 <desc>
14223 Marks an event as reused, increments 'generation', fields shall no
14224 longer be considered valid.
14225 </desc>
14226 </method>
14227 </interface>
14228
14229 <interface
14230 name="IMachineEvent" extends="IEvent"
14231 uuid="92ed7b1a-0d96-40ed-ae46-a564d484325e"
14232 wsmap="managed" id="MachineEvent"
14233 >
14234 <desc>Base abstract interface for all machine events.</desc>
14235
14236 <attribute name="machineId" readonly="yes" type="uuid" mod="string">
14237 <desc>ID of the machine this event relates to.</desc>
14238 </attribute>
14239
14240 </interface>
14241
14242 <interface
14243 name="IMachineStateChangedEvent" extends="IMachineEvent"
14244 uuid="5748F794-48DF-438D-85EB-98FFD70D18C9"
14245 wsmap="managed" autogen="VBoxEvent" id="OnMachineStateChanged"
14246 >
14247 <desc>Machine state change event.</desc>
14248
14249 <attribute name="state" readonly="yes" type="MachineState">
14250 <desc>New execution state.</desc>
14251 </attribute>
14252 </interface>
14253
14254 <interface
14255 name="IMachineDataChangedEvent" extends="IMachineEvent"
14256 uuid="6AA70A6C-0DCA-4810-8C5C-457B278E3D49"
14257 wsmap="managed" autogen="VBoxEvent" id="OnMachineDataChanged"
14258 >
14259 <desc>
14260 Any of the settings of the given machine has changed.
14261 </desc>
14262 </interface>
14263
14264 <interface
14265 name="IMediumRegisteredEvent" extends="IEvent"
14266 uuid="53fac49a-b7f1-4a5a-a4ef-a11dd9c2a458"
14267 wsmap="managed" autogen="VBoxEvent" id="OnMediumRegistered"
14268 >
14269 <desc>
14270 The given medium was registered or unregistered
14271 within this VirtualBox installation.
14272 </desc>
14273
14274 <attribute name="mediumId" readonly="yes" type="uuid" mod="string">
14275 <desc>ID of the medium this event relates to.</desc>
14276 </attribute>
14277
14278 <attribute name="mediumType" readonly="yes" type="DeviceType">
14279 <desc>Type of the medium this event relates to.</desc>
14280 </attribute>
14281
14282 <attribute name="registered" type="boolean" readonly="yes">
14283 <desc>
14284 If @c true, the medium was registered, otherwise it was
14285 unregistered.
14286 </desc>
14287 </attribute>
14288 </interface>
14289
14290 <interface
14291 name="IMachineRegisteredEvent" extends="IMachineEvent"
14292 uuid="c354a762-3ff2-4f2e-8f09-07382ee25088"
14293 wsmap="managed" autogen="VBoxEvent" id="OnMachineRegistered"
14294 >
14295 <desc>
14296 The given machine was registered or unregistered
14297 within this VirtualBox installation.
14298 </desc>
14299
14300 <attribute name="registered" type="boolean" readonly="yes">
14301 <desc>
14302 If @c true, the machine was registered, otherwise it was
14303 unregistered.
14304 </desc>
14305 </attribute>
14306 </interface>
14307
14308 <interface
14309 name="ISessionStateChangedEvent" extends="IMachineEvent"
14310 uuid="714a3eef-799a-4489-86cd-fe8e45b2ff8e"
14311 wsmap="managed" autogen="VBoxEvent" id="OnSessionStateChanged"
14312 >
14313 <desc>
14314 The state of the session for the given machine was changed.
14315 <see>IMachine::sessionState</see>
14316 </desc>
14317
14318 <attribute name="state" type="SessionState" readonly="yes">
14319 <desc>
14320 New session state.
14321 </desc>
14322 </attribute>
14323 </interface>
14324
14325 <interface
14326 name="IGuestPropertyChangedEvent" extends="IMachineEvent"
14327 uuid="3f63597a-26f1-4edb-8dd2-6bddd0912368"
14328 wsmap="managed" autogen="VBoxEvent" id="OnGuestPropertyChanged"
14329 >
14330 <desc>
14331 Notification when a guest property has changed.
14332 </desc>
14333
14334 <attribute name="name" readonly="yes" type="wstring">
14335 <desc>
14336 The name of the property that has changed.
14337 </desc>
14338 </attribute>
14339
14340 <attribute name="value" readonly="yes" type="wstring">
14341 <desc>
14342 The new property value.
14343 </desc>
14344 </attribute>
14345
14346 <attribute name="flags" readonly="yes" type="wstring">
14347 <desc>
14348 The new property flags.
14349 </desc>
14350 </attribute>
14351
14352 </interface>
14353
14354 <interface
14355 name="ISnapshotEvent" extends="IMachineEvent"
14356 uuid="21637b0e-34b8-42d3-acfb-7e96daf77c22"
14357 wsmap="managed" id="SnapshotEvent"
14358 >
14359 <desc>Base interface for all snapshot events.</desc>
14360
14361 <attribute name="snapshotId" readonly="yes" type="uuid" mod="string">
14362 <desc>ID of the snapshot this event relates to.</desc>
14363 </attribute>
14364
14365 </interface>
14366
14367 <interface
14368 name="ISnapshotTakenEvent" extends="ISnapshotEvent"
14369 uuid="d27c0b3d-6038-422c-b45e-6d4a0503d9f1"
14370 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotTaken"
14371 >
14372 <desc>
14373 A new snapshot of the machine has been taken.
14374 <see>ISnapshot</see>
14375 </desc>
14376 </interface>
14377
14378 <interface
14379 name="ISnapshotDeletedEvent" extends="ISnapshotEvent"
14380 uuid="c48f3401-4a9e-43f4-b7a7-54bd285e22f4"
14381 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotDeleted"
14382 >
14383 <desc>
14384 Snapshot of the given machine has been deleted.
14385
14386 <note>
14387 This notification is delivered <b>after</b> the snapshot
14388 object has been uninitialized on the server (so that any
14389 attempt to call its methods will return an error).
14390 </note>
14391
14392 <see>ISnapshot</see>
14393 </desc>
14394 </interface>
14395
14396 <interface
14397 name="ISnapshotChangedEvent" extends="ISnapshotEvent"
14398 uuid="07541941-8079-447a-a33e-47a69c7980db"
14399 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotChanged"
14400 >
14401 <desc>
14402 Snapshot properties (name and/or description) have been changed.
14403 <see>ISnapshot</see>
14404 </desc>
14405 </interface>
14406
14407 <interface
14408 name="IMousePointerShapeChangedEvent" extends="IEvent"
14409 uuid="a6dcf6e8-416b-4181-8c4a-45ec95177aef"
14410 wsmap="managed" autogen="VBoxEvent" id="OnMousePointerShapeChanged"
14411 >
14412 <desc>
14413 Notification when the guest mouse pointer shape has
14414 changed. The new shape data is given.
14415 </desc>
14416
14417 <attribute name="visible" type="boolean" readonly="yes">
14418 <desc>
14419 Flag whether the pointer is visible.
14420 </desc>
14421 </attribute>
14422 <attribute name="alpha" type="boolean" readonly="yes">
14423 <desc>
14424 Flag whether the pointer has an alpha channel.
14425 </desc>
14426 </attribute>
14427 <attribute name="xhot" type="unsigned long" readonly="yes">
14428 <desc>
14429 The pointer hot spot X coordinate.
14430 </desc>
14431 </attribute>
14432 <attribute name="yhot" type="unsigned long" readonly="yes">
14433 <desc>
14434 The pointer hot spot Y coordinate.
14435 </desc>
14436 </attribute>
14437 <attribute name="width" type="unsigned long" readonly="yes">
14438 <desc>
14439 Width of the pointer shape in pixels.
14440 </desc>
14441 </attribute>
14442 <attribute name="height" type="unsigned long" readonly="yes">
14443 <desc>
14444 Height of the pointer shape in pixels.
14445 </desc>
14446 </attribute>
14447 <attribute name="shape" type="octet" safearray="yes" readonly="yes">
14448 <desc>
14449 Shape buffer arrays.
14450
14451 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
14452 followed by a 32-bpp XOR (color) mask.
14453
14454 For pointers without alpha channel the XOR mask pixels are 32
14455 bit values: (lsb)BGR0(msb). For pointers with alpha channel
14456 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
14457
14458 An AND mask is used for pointers with alpha channel, so if the
14459 callback does not support alpha, the pointer could be
14460 displayed as a normal color pointer.
14461
14462 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
14463 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
14464 height</tt>. The padding bits at the end of each scanline are
14465 undefined.
14466
14467 The XOR mask follows the AND mask on the next 4-byte aligned
14468 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
14469 Bytes in the gap between the AND and the XOR mask are undefined.
14470 The XOR mask scanlines have no gap between them and the size of
14471 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
14472
14473 <note>
14474 If @a shape is 0, only the pointer visibility is changed.
14475 </note>
14476 </desc>
14477 </attribute>
14478 </interface>
14479
14480 <interface
14481 name="IMouseCapabilityChangedEvent" extends="IEvent"
14482 uuid="d633ad48-820c-4207-b46c-6bd3596640d5"
14483 wsmap="managed" autogen="VBoxEvent" id="OnMouseCapabilityChanged"
14484 >
14485 <desc>
14486 Notification when the mouse capabilities reported by the
14487 guest have changed. The new capabilities are passed.
14488 </desc>
14489 <attribute name="supportsAbsolute" type="boolean" readonly="yes">
14490 <desc>
14491 Supports absolute coordinates.
14492 </desc>
14493 </attribute>
14494 <attribute name="supportsRelative" type="boolean" readonly="yes">
14495 <desc>
14496 Supports relative coordinates.
14497 </desc>
14498 </attribute>
14499 <attribute name="needsHostCursor" type="boolean" readonly="yes">
14500 <desc>
14501 If host cursor is needed.
14502 </desc>
14503 </attribute>
14504 </interface>
14505
14506 <interface
14507 name="IKeyboardLedsChangedEvent" extends="IEvent"
14508 uuid="6DDEF35E-4737-457B-99FC-BC52C851A44F"
14509 wsmap="managed" autogen="VBoxEvent" id="OnKeyboardLedsChanged"
14510 >
14511 <desc>
14512 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
14513 to alter the state of the keyboard LEDs.
14514 </desc>
14515 <attribute name="numLock" type="boolean" readonly="yes">
14516 <desc>
14517 NumLock status.
14518 </desc>
14519 </attribute>
14520 <attribute name="capsLock" type="boolean" readonly="yes">
14521 <desc>
14522 CapsLock status.
14523 </desc>
14524 </attribute>
14525 <attribute name="scrollLock" type="boolean" readonly="yes">
14526 <desc>
14527 ScrollLock status.
14528 </desc>
14529 </attribute>
14530 </interface>
14531
14532 <interface
14533 name="IStateChangedEvent" extends="IEvent"
14534 uuid="4376693C-CF37-453B-9289-3B0F521CAF27"
14535 wsmap="managed" autogen="VBoxEvent" id="OnStateChanged"
14536 >
14537 <desc>
14538 Notification when the execution state of the machine has changed.
14539 The new state is given.
14540 </desc>
14541 <attribute name="state" type="MachineState" readonly="yes">
14542 <desc>
14543 New machine state.
14544 </desc>
14545 </attribute>
14546 </interface>
14547
14548 <interface
14549 name="IAdditionsStateChangedEvent" extends="IEvent"
14550 uuid="D70F7915-DA7C-44C8-A7AC-9F173490446A"
14551 wsmap="managed" autogen="VBoxEvent" id="OnAdditionsStateChanged"
14552 >
14553 <desc>
14554 Notification when a Guest Additions property changes.
14555 Interested callees should query IGuest attributes to
14556 find out what has changed.
14557 </desc>
14558 </interface>
14559
14560 <interface
14561 name="INetworkAdapterChangedEvent" extends="IEvent"
14562 uuid="08889892-1EC6-4883-801D-77F56CFD0103"
14563 wsmap="managed" autogen="VBoxEvent" id="OnNetworkAdapterChanged"
14564 >
14565 <desc>
14566 Notification when a property of one of the
14567 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
14568 changes. Interested callees should use INetworkAdapter methods and
14569 attributes to find out what has changed.
14570 </desc>
14571 <attribute name="networkAdapter" type="INetworkAdapter" readonly="yes">
14572 <desc>
14573 Network adapter that is subject to change.
14574 </desc>
14575 </attribute>
14576 </interface>
14577
14578 <interface
14579 name="ISerialPortChangedEvent" extends="IEvent"
14580 uuid="3BA329DC-659C-488B-835C-4ECA7AE71C6C"
14581 wsmap="managed" autogen="VBoxEvent" id="OnSerialPortChanged"
14582 >
14583 <desc>
14584 Notification when a property of one of the
14585 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
14586 Interested callees should use ISerialPort methods and attributes
14587 to find out what has changed.
14588 </desc>
14589 <attribute name="serialPort" type="ISerialPort" readonly="yes">
14590 <desc>
14591 Serial port that is subject to change.
14592 </desc>
14593 </attribute>
14594 </interface>
14595
14596 <interface
14597 name="IParallelPortChangedEvent" extends="IEvent"
14598 uuid="813C99FC-9849-4F47-813E-24A75DC85615"
14599 wsmap="managed" autogen="VBoxEvent" id="OnParallelPortChanged"
14600 >
14601 <desc>
14602 Notification when a property of one of the
14603 virtual <link to="IMachine::getParallelPort">parallel ports</link>
14604 changes. Interested callees should use ISerialPort methods and
14605 attributes to find out what has changed.
14606 </desc>
14607 <attribute name="parallelPort" type="IParallelPort" readonly="yes">
14608 <desc>
14609 Parallel port that is subject to change.
14610 </desc>
14611 </attribute>
14612 </interface>
14613
14614 <interface
14615 name="IStorageControllerChangedEvent" extends="IEvent"
14616 uuid="715212BF-DA59-426E-8230-3831FAA52C56"
14617 wsmap="managed" autogen="VBoxEvent" id="OnStorageControllerChanged"
14618 >
14619 <desc>
14620 Notification when a
14621 <link to="IMachine::mediumAttachments">medium attachment</link>
14622 changes.
14623 </desc>
14624 </interface>
14625
14626 <interface
14627 name="IMediumChangedEvent" extends="IEvent"
14628 uuid="0FE2DA40-5637-472A-9736-72019EABD7DE"
14629 wsmap="managed" autogen="VBoxEvent" id="OnMediumChanged"
14630 >
14631 <desc>
14632 Notification when a
14633 <link to="IMachine::mediumAttachments">medium attachment</link>
14634 changes.
14635 </desc>
14636 <attribute name="mediumAttachment" type="IMediumAttachment" readonly="yes">
14637 <desc>
14638 Medium attachment that is subject to change.
14639 </desc>
14640 </attribute>
14641 </interface>
14642
14643 <interface
14644 name="ICPUChangedEvent" extends="IEvent"
14645 uuid="D0F0BECC-EE17-4D17-A8CC-383B0EB55E9D"
14646 wsmap="managed" autogen="VBoxEvent" id="OnCPUChanged"
14647 >
14648 <desc>
14649 Notification when a CPU changes.
14650 </desc>
14651 <attribute name="cpu" type="unsigned long" readonly="yes">
14652 <desc>
14653 The CPU which changed.
14654 </desc>
14655 </attribute>
14656 <attribute name="add" type="boolean" readonly="yes">
14657 <desc>
14658 Flag whether the CPU was added or removed.
14659 </desc>
14660 </attribute>
14661 </interface>
14662
14663 <interface
14664 name="ICPUPriorityChangedEvent" extends="IEvent"
14665 uuid="657fe2fe-a75a-4cb6-8cf9-072aa41e7d75"
14666 wsmap="managed" autogen="VBoxEvent" id="OnCPUPriorityChanged"
14667 >
14668 <desc>
14669 Notification when the CPU priority changes.
14670 </desc>
14671 <attribute name="priority" type="unsigned long" readonly="yes">
14672 <desc>
14673 The new CPU priority value. (1-100)
14674 </desc>
14675 </attribute>
14676 </interface>
14677
14678 <interface
14679 name="IVRDPServerChangedEvent" extends="IEvent"
14680 uuid="726038B6-6279-4A7A-8037-D041693D1915"
14681 wsmap="managed" autogen="VBoxEvent" id="OnVRDPServerChanged"
14682 >
14683 <desc>
14684 Notification when a property of the
14685 <link to="IMachine::VRDPServer">VRDP server</link> changes.
14686 Interested callees should use IVRDPServer methods and attributes to
14687 find out what has changed.
14688 </desc>
14689 </interface>
14690
14691 <interface
14692 name="IRemoteDisplayInfoChangedEvent" extends="IEvent"
14693 uuid="65B556C5-2A99-47D8-B311-FC177F0914CD"
14694 wsmap="managed" autogen="VBoxEvent" id="OnRemoteDisplayInfoChanged"
14695 >
14696 <desc>
14697 Notification when the status of the VRDP server changes. Interested callees
14698 should use <link to="IConsole::remoteDisplayInfo">IRemoteDisplayInfo</link>
14699 attributes to find out what is the current status.
14700 </desc>
14701 </interface>
14702
14703 <interface
14704 name="IUSBControllerChangedEvent" extends="IEvent"
14705 uuid="93BADC0C-61D9-4940-A084-E6BB29AF3D83"
14706 wsmap="managed" autogen="VBoxEvent" id="OnUSBControllerChanged"
14707 >
14708 <desc>
14709 Notification when a property of the virtual
14710 <link to="IMachine::USBController">USB controller</link> changes.
14711 Interested callees should use IUSBController methods and attributes to
14712 find out what has changed.
14713 </desc>
14714 </interface>
14715
14716 <interface
14717 name="IUSBDeviceStateChangedEvent" extends="IEvent"
14718 uuid="806da61b-6679-422a-b629-51b06b0c6d93"
14719 wsmap="managed" autogen="VBoxEvent" id="OnUSBDeviceStateChanged"
14720 >
14721 <desc>
14722 Notification when a USB device is attached to or detached from
14723 the virtual USB controller.
14724
14725 This notification is sent as a result of the indirect
14726 request to attach the device because it matches one of the
14727 machine USB filters, or as a result of the direct request
14728 issued by <link to="IConsole::attachUSBDevice"/> or
14729 <link to="IConsole::detachUSBDevice"/>.
14730
14731 This notification is sent in case of both a succeeded and a
14732 failed request completion. When the request succeeds, the
14733 @a error parameter is @c null, and the given device has been
14734 already added to (when @a attached is @c true) or removed from
14735 (when @a attached is @c false) the collection represented by
14736 <link to="IConsole::USBDevices"/>. On failure, the collection
14737 doesn't change and the @a error parameter represents the error
14738 message describing the failure.
14739 </desc>
14740 <attribute name="device" type="IUSBDevice" readonly="yes">
14741 <desc>
14742 Device that is subject to state change.
14743 </desc>
14744 </attribute>
14745 <attribute name="attached" type="boolean" readonly="yes">
14746 <desc>
14747 @c true if the device was attached and @c false otherwise.
14748 </desc>
14749 </attribute>
14750 <attribute name="error" type="IVirtualBoxErrorInfo" readonly="yes">
14751 <desc>
14752 @c null on success or an error message object on failure.
14753 </desc>
14754 </attribute>
14755 </interface>
14756
14757 <interface
14758 name="ISharedFolderChangedEvent" extends="IEvent"
14759 uuid="B66349B5-3534-4239-B2DE-8E1535D94C0B"
14760 wsmap="managed" autogen="VBoxEvent" id="OnSharedFolderChanged"
14761 >
14762 <desc>
14763 Notification when a shared folder is added or removed.
14764 The @a scope argument defines one of three scopes:
14765 <link to="IVirtualBox::sharedFolders">global shared folders</link>
14766 (<link to="Scope::Global">Global</link>),
14767 <link to="IMachine::sharedFolders">permanent shared folders</link> of
14768 the machine (<link to="Scope::Machine">Machine</link>) or <link
14769 to="IConsole::sharedFolders">transient shared folders</link> of the
14770 machine (<link to="Scope::Session">Session</link>). Interested callees
14771 should use query the corresponding collections to find out what has
14772 changed.
14773 </desc>
14774 <attribute name="scope" type="Scope" readonly="yes">
14775 <desc>
14776 Scope of the notification.
14777 </desc>
14778 </attribute>
14779 </interface>
14780
14781 <interface
14782 name="IRuntimeErrorEvent" extends="IEvent"
14783 uuid="883DD18B-0721-4CDE-867C-1A82ABAF914C"
14784 wsmap="managed" autogen="VBoxEvent" id="OnRuntimeError"
14785 >
14786 <desc>
14787 Notification when an error happens during the virtual
14788 machine execution.
14789
14790 There are three kinds of runtime errors:
14791 <ul>
14792 <li><i>fatal</i></li>
14793 <li><i>non-fatal with retry</i></li>
14794 <li><i>non-fatal warnings</i></li>
14795 </ul>
14796
14797 <b>Fatal</b> errors are indicated by the @a fatal parameter set
14798 to @c true. In case of fatal errors, the virtual machine
14799 execution is always paused before calling this notification, and
14800 the notification handler is supposed either to immediately save
14801 the virtual machine state using <link to="IConsole::saveState"/>
14802 or power it off using <link to="IConsole::powerDown"/>.
14803 Resuming the execution can lead to unpredictable results.
14804
14805 <b>Non-fatal</b> errors and warnings are indicated by the
14806 @a fatal parameter set to @c false. If the virtual machine
14807 is in the Paused state by the time the error notification is
14808 received, it means that the user can <i>try to resume</i> the machine
14809 execution after attempting to solve the problem that caused the
14810 error. In this case, the notification handler is supposed
14811 to show an appropriate message to the user (depending on the
14812 value of the @a id parameter) that offers several actions such
14813 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
14814 wants to retry, the notification handler should continue
14815 the machine execution using the <link to="IConsole::resume"/>
14816 call. If the machine execution is not Paused during this
14817 notification, then it means this notification is a <i>warning</i>
14818 (for example, about a fatal condition that can happen very soon);
14819 no immediate action is required from the user, the machine
14820 continues its normal execution.
14821
14822 Note that in either case the notification handler
14823 <b>must not</b> perform any action directly on a thread
14824 where this notification is called. Everything it is allowed to
14825 do is to post a message to another thread that will then talk
14826 to the user and take the corresponding action.
14827
14828 Currently, the following error identifiers are known:
14829 <ul>
14830 <li><tt>"HostMemoryLow"</tt></li>
14831 <li><tt>"HostAudioNotResponding"</tt></li>
14832 <li><tt>"VDIStorageFull"</tt></li>
14833 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
14834 </ul>
14835 </desc>
14836 <attribute name="fatal" type="boolean" readonly="yes">
14837 <desc>
14838 Whether the error is fatal or not.
14839 </desc>
14840 </attribute>
14841 <attribute name="id" type="wstring" readonly="yes">
14842 <desc>
14843 Error identifier.
14844 </desc>
14845 </attribute>
14846 <attribute name="message" type="wstring" readonly="yes">
14847 <desc>
14848 Optional error message.
14849 </desc>
14850 </attribute>
14851 </interface>
14852
14853
14854 <interface
14855 name="IEventSourceChangedEvent" extends="IEvent"
14856 uuid="e7932cb8-f6d4-4ab6-9cbf-558eb8959a6a"
14857 waitable="yes"
14858 wsmap="managed" autogen="VBoxEvent" id="OnEventSourceChanged"
14859 >
14860 <desc>
14861 Notification when an event source state changes (listener added or removed).
14862 </desc>
14863
14864 <attribute name="listener" type="IEventListener" readonly="yes">
14865 <desc>
14866 Event listener which has changed.
14867 </desc>
14868 </attribute>
14869
14870 <attribute name="add" type="boolean" readonly="yes">
14871 <desc>
14872 Flag whether listener was added or removed.
14873 </desc>
14874 </attribute>
14875 </interface>
14876
14877 <interface
14878 name="IExtraDataChangedEvent" extends="IEvent"
14879 uuid="024F00CE-6E0B-492A-A8D0-968472A94DC7"
14880 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataChanged"
14881 >
14882 <desc>
14883 Notification when machine specific or global extra data
14884 has changed.
14885 </desc>
14886 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
14887 <desc>
14888 ID of the machine this event relates to.
14889 Null for global extra data changes.
14890 </desc>
14891 </attribute>
14892 <attribute name="key" type="wstring" readonly="yes">
14893 <desc>
14894 Extra data key that has changed.
14895 </desc>
14896 </attribute>
14897 <attribute name="value" type="wstring" readonly="yes">
14898 <desc>
14899 Extra data value for the given key.
14900 </desc>
14901 </attribute>
14902 </interface>
14903
14904 <interface
14905 name="IVetoEvent" extends="IEvent"
14906 uuid="9a1a4130-69fe-472f-ac10-c6fa25d75007"
14907 wsmap="managed"
14908 >
14909 <desc>Base abstract interface for veto events.</desc>
14910
14911 <method name="addVeto">
14912 <desc>
14913 Adds a veto on this event.
14914 </desc>
14915 <param name="reason" type="wstring" dir="in">
14916 <desc>
14917 Reason for veto, could be null or empty string.
14918 </desc>
14919 </param>
14920 </method>
14921
14922 <method name="isVetoed">
14923 <desc>
14924 If this event was vetoed.
14925 </desc>
14926 <param name="result" type="boolean" dir="return">
14927 <desc>
14928 Reason for veto.
14929 </desc>
14930 </param>
14931 </method>
14932
14933 <method name="getVetos">
14934 <desc>
14935 Current veto reason list, if size is 0 - no veto.
14936 </desc>
14937 <param name="result" type="wstring" dir="return" safearray="yes">
14938 <desc>
14939 Array of reasons for veto provided by different event handlers.
14940 </desc>
14941 </param>
14942 </method>
14943
14944 </interface>
14945
14946 <interface
14947 name="IExtraDataCanChangeEvent" extends="IVetoEvent"
14948 uuid="245d88bd-800a-40f8-87a6-170d02249a55"
14949 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataCanChange"
14950 waitable="true"
14951 >
14952 <desc>
14953 Notification when someone tries to change extra data for
14954 either the given machine or (if @c null) global extra data.
14955 This gives the chance to veto against changes.
14956 </desc>
14957 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
14958 <desc>
14959 ID of the machine this event relates to.
14960 Null for global extra data changes.
14961 </desc>
14962 </attribute>
14963 <attribute name="key" type="wstring" readonly="yes">
14964 <desc>
14965 Extra data key that has changed.
14966 </desc>
14967 </attribute>
14968 <attribute name="value" type="wstring" readonly="yes">
14969 <desc>
14970 Extra data value for the given key.
14971 </desc>
14972 </attribute>
14973 </interface>
14974
14975 <interface
14976 name="ICanShowWindowEvent" extends="IVetoEvent"
14977 uuid="adf292b0-92c9-4a77-9d35-e058b39fe0b9"
14978 wsmap="managed" autogen="VBoxEvent" id="OnCanShowWindow"
14979 waitable="true"
14980 >
14981 <desc>
14982 Notification when a call to
14983 <link to="IMachine::canShowConsoleWindow"/> is made by a
14984 front-end to check if a subsequent call to
14985 <link to="IMachine::showConsoleWindow"/> can succeed.
14986
14987 The callee should give an answer appropriate to the current
14988 machine state using event veto. This answer must
14989 remain valid at least until the next
14990 <link to="IConsole::state">machine state</link> change.
14991 </desc>
14992 </interface>
14993
14994 <interface
14995 name="IShowWindowEvent" extends="IEvent"
14996 uuid="B0A0904D-2F05-4D28-855F-488F96BAD2B2"
14997 wsmap="managed" autogen="VBoxEvent" id="OnShowWindow"
14998 waitable="true"
14999 >
15000 <desc>
15001 Notification when a call to
15002 <link to="IMachine::showConsoleWindow"/>
15003 requests the console window to be activated and brought to
15004 foreground on the desktop of the host PC.
15005
15006 This notification should cause the VM console process to
15007 perform the requested action as described above. If it is
15008 impossible to do it at a time of this notification, this
15009 method should return a failure.
15010
15011 Note that many modern window managers on many platforms
15012 implement some sort of focus stealing prevention logic, so
15013 that it may be impossible to activate a window without the
15014 help of the currently active application (which is supposedly
15015 an initiator of this notification). In this case, this method
15016 must return a non-zero identifier that represents the
15017 top-level window of the VM console process. The caller, if it
15018 represents a currently active process, is responsible to use
15019 this identifier (in a platform-dependent manner) to perform
15020 actual window activation.
15021
15022 This method must set @a winId to zero if it has performed all
15023 actions necessary to complete the request and the console
15024 window is now active and in foreground, to indicate that no
15025 further action is required on the caller's side.
15026 </desc>
15027 <attribute name="winId" type="long long">
15028 <desc>
15029 Platform-dependent identifier of the top-level VM console
15030 window, or zero if this method has performed all actions
15031 necessary to implement the <i>show window</i> semantics for
15032 the given platform and/or this VirtualBox front-end.
15033 </desc>
15034 </attribute>
15035 </interface>
15036
15037 <module name="VBoxSVC" context="LocalServer">
15038 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
15039 namespace="virtualbox.org">
15040 <interface name="IVirtualBox" default="yes"/>
15041 </class>
15042 </module>
15043
15044 <module name="VBoxC" context="InprocServer" threadingModel="Free">
15045 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
15046 namespace="virtualbox.org">
15047 <interface name="ISession" default="yes"/>
15048 </class>
15049
15050 <class name="Console" uuid="577230FF-164F-4CAC-8548-312D8275A4A7"
15051 namespace="virtualbox.org">
15052 <interface name="IConsole" default="yes"/>
15053 </class>
15054 </module>
15055
15056</library>
15057
15058</idl>
15059
15060<!-- 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