VirtualBox

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

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

events: vacation-time idea of reusable events (for perfomance-critical operations)

  • Property svn:eol-style set to native
File size: 553.9 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="e998d075-543a-41fc-8aa9-5ca3e92393fd"
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="DeletingSnapshotOnline" value="16">
736 <desc>
737 Like @c DeletingSnapshot, but the merging of media is ongoing in
738 the background while the machine is running.
739 </desc>
740 </const>
741 <const name="DeletingSnapshotPaused" value="17">
742 <desc>
743 Like @c DeletingSnapshotOnline, but the machine was paused when the
744 merging of differencing media was started.
745 </desc>
746 </const>
747 <const name="RestoringSnapshot" value="18">
748 <desc>
749 A machine snapshot is being restored; this typically does not take long.
750 </desc>
751 </const>
752 <const name="DeletingSnapshot" value="19">
753 <desc>
754 A machine snapshot is being deleted; this can take a long time since this
755 may require merging differencing media. This value indicates that the
756 machine is not running while the snapshot is being deleted.
757 </desc>
758 </const>
759 <const name="SettingUp" value="20">
760 <desc>
761 Lengthy setup operation is in progress.
762 </desc>
763 </const>
764
765 <const name="FirstOnline" value="5" wsmap="suppress"> <!-- Running -->
766 <desc>
767 Pseudo-state: first online state (for use in relational expressions).
768 </desc>
769 </const>
770 <const name="LastOnline" value="17" wsmap="suppress"> <!-- DeletingSnapshotPaused -->
771 <desc>
772 Pseudo-state: last online state (for use in relational expressions).
773 </desc>
774 </const>
775
776 <const name="FirstTransient" value="8" wsmap="suppress"> <!-- Teleporting -->
777 <desc>
778 Pseudo-state: first transient state (for use in relational expressions).
779 </desc>
780 </const>
781 <const name="LastTransient" value="20" wsmap="suppress"> <!-- SettingUp -->
782 <desc>
783 Pseudo-state: last transient state (for use in relational expressions).
784 </desc>
785 </const>
786
787 </enum>
788
789 <enum
790 name="SessionState"
791 uuid="cf2700c0-ea4b-47ae-9725-7810114b94d8"
792 >
793 <desc>
794 Session state. This enumeration represents possible values of
795 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
796 attributes.
797 </desc>
798
799 <const name="Null" value="0">
800 <desc>Null value (never used by the API).</desc>
801 </const>
802 <const name="Unlocked" value="1">
803 <desc>
804 In <link to="IMachine::sessionState"/>, this means that the machine
805 is not locked for any sessions.
806
807 In <link to="ISession::state"/>, this means that no machine is
808 currently locked for this session.
809 </desc>
810 </const>
811 <const name="Locked" value="2">
812 <desc>
813 In <link to="IMachine::sessionState"/>, this means that the machine
814 is currently locked for a session, whose process identifier can
815 then be found in the <link to="IMachine::sessionPid" /> attribute.
816
817 In <link to="ISession::state"/>, this means that a machine is
818 currently locked for this session, and the mutable machine object
819 can be found in the <link to="ISession::machine"/> attribute
820 (see <link to="IMachine::lockMachine" /> for details).
821 </desc>
822 </const>
823 <const name="Spawning" value="3">
824 <desc>
825 A new process is being spawned for the machine as a result of
826 <link to="IMachine::launchVMProcess"/> call. This state also occurs
827 as a short transient state during an <link to="IMachine::lockMachine"/>
828 call.
829 </desc>
830 </const>
831 <const name="Unlocking" value="4">
832 <desc>
833 The session is being unlocked.
834 </desc>
835 </const>
836 </enum>
837
838 <enum
839 name="CPUPropertyType"
840 uuid="24d356a6-2f45-4abd-b977-1cbe9c4701f5"
841 >
842 <desc>
843 Virtual CPU property type. This enumeration represents possible values of the
844 IMachine get- and setCPUProperty methods.
845 </desc>
846 <const name="Null" value="0">
847 <desc>Null value (never used by the API).</desc>
848 </const>
849 <const name="PAE" value="1">
850 <desc>
851 This setting determines whether VirtualBox will expose the Physical Address
852 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
853 is not available, it will not be reported.
854 </desc>
855 </const>
856 <const name="Synthetic" value="2">
857 <desc>
858 This setting determines whether VirtualBox will expose a synthetic CPU to the guest to allow
859 teleporting between host systems that differ significantly.
860 </desc>
861 </const>
862 </enum>
863
864
865 <enum
866 name="HWVirtExPropertyType"
867 uuid="ce81dfdd-d2b8-4a90-bbea-40ee8b7ffcee"
868 >
869 <desc>
870 Hardware virtualization property type. This enumeration represents possible values
871 for the <link to="IMachine::getHWVirtExProperty"/> and
872 <link to="IMachine::setHWVirtExProperty"/> methods.
873 </desc>
874 <const name="Null" value="0">
875 <desc>Null value (never used by the API).</desc>
876 </const>
877 <const name="Enabled" value="1">
878 <desc>
879 Whether hardware virtualization (VT-x/AMD-V) is enabled at all. If
880 such extensions are not available, they will not be used.
881 </desc>
882 </const>
883 <const name="Exclusive" value="2">
884 <desc>
885 Whether hardware virtualization is used exclusively by VirtualBox. When enabled,
886 VirtualBox assumes it can acquire full and exclusive access to the VT-x or AMD-V
887 feature of the host. To share these with other hypervisors, you must disable this property.
888 </desc>
889 </const>
890 <const name="VPID" value="3">
891 <desc>
892 Whether VT-x VPID is enabled. If this extension is not available, it will not be used.
893 </desc>
894 </const>
895 <const name="NestedPaging" value="4">
896 <desc>
897 Whether Nested Paging is enabled. If this extension is not available, it will not be used.
898 </desc>
899 </const>
900 <const name="LargePages" value="5">
901 <desc>
902 Whether large page allocation is enabled; requires nested paging and a 64 bits host.
903 </desc>
904 </const>
905 </enum>
906
907 <enum
908 name="LockType"
909 uuid="138b53f8-db4b-47c5-b32b-4ef52f769413"
910 >
911 <desc>
912 Used with <link to="IMachine::lockMachine" />.
913 </desc>
914 <const name="Write" value="2">
915 <desc>Lock the machine for writing.</desc>
916 </const>
917 <const name="Shared" value="1">
918 <desc>Request only a shared read lock for remote-controlling the machine.</desc>
919 </const>
920 </enum>
921
922 <enum
923 name="SessionType"
924 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
925 >
926 <desc>
927 Session type. This enumeration represents possible values of the
928 <link to="ISession::type"/> attribute.
929 </desc>
930
931 <const name="Null" value="0">
932 <desc>Null value (never used by the API).</desc>
933 </const>
934 <const name="WriteLock" value="1">
935 <desc>
936 Session has acquired an exclusive write lock on a machine
937 using <link to="IMachine::lockMachine"/>.
938 </desc>
939 </const>
940 <const name="Remote" value="2">
941 <desc>
942 Session has launched a VM process using
943 <link to="IMachine::launchVMProcess"/>
944 </desc>
945 </const>
946 <const name="Shared" value="3">
947 <desc>
948 Session has obtained a link to another session using
949 <link to="IMachine::lockMachine"/>
950 </desc>
951 </const>
952 </enum>
953
954 <enum
955 name="DeviceType"
956 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
957 >
958 <desc>
959 Device type.
960 </desc>
961 <const name="Null" value="0">
962 <desc>
963 Null value, may also mean "no device" (not allowed for
964 <link to="IConsole::getDeviceActivity"/>).
965 </desc>
966 </const>
967 <const name="Floppy" value="1">
968 <desc>Floppy device.</desc>
969 </const>
970 <const name="DVD" value="2">
971 <desc>CD/DVD-ROM device.</desc>
972 </const>
973 <const name="HardDisk" value="3">
974 <desc>Hard disk device.</desc>
975 </const>
976 <const name="Network" value="4">
977 <desc>Network device.</desc>
978 </const>
979 <const name="USB" value="5">
980 <desc>USB device.</desc>
981 </const>
982 <const name="SharedFolder" value="6">
983 <desc>Shared folder device.</desc>
984 </const>
985 </enum>
986
987 <enum
988 name="DeviceActivity"
989 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
990 >
991 <desc>
992 Device activity for <link to="IConsole::getDeviceActivity"/>.
993 </desc>
994
995 <const name="Null" value="0"/>
996 <const name="Idle" value="1"/>
997 <const name="Reading" value="2"/>
998 <const name="Writing" value="3"/>
999 </enum>
1000
1001 <enum
1002 name="ClipboardMode"
1003 uuid="33364716-4008-4701-8f14-be0fa3d62950"
1004 >
1005 <desc>
1006 Host-Guest clipboard interchange mode.
1007 </desc>
1008
1009 <const name="Disabled" value="0"/>
1010 <const name="HostToGuest" value="1"/>
1011 <const name="GuestToHost" value="2"/>
1012 <const name="Bidirectional" value="3"/>
1013 </enum>
1014
1015 <enum
1016 name="Scope"
1017 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
1018 >
1019 <desc>
1020 Scope of the operation.
1021
1022 A generic enumeration used in various methods to define the action or
1023 argument scope.
1024 </desc>
1025
1026 <const name="Global" value="0"/>
1027 <const name="Machine" value="1"/>
1028 <const name="Session" value="2"/>
1029 </enum>
1030
1031 <enum
1032 name="BIOSBootMenuMode"
1033 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
1034 >
1035 <desc>
1036 BIOS boot menu mode.
1037 </desc>
1038
1039 <const name="Disabled" value="0"/>
1040 <const name="MenuOnly" value="1"/>
1041 <const name="MessageAndMenu" value="2"/>
1042 </enum>
1043
1044 <enum
1045 name="ProcessorFeature"
1046 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
1047 >
1048 <desc>
1049 CPU features.
1050 </desc>
1051
1052 <const name="HWVirtEx" value="0"/>
1053 <const name="PAE" value="1"/>
1054 <const name="LongMode" value="2"/>
1055 <const name="NestedPaging" value="3"/>
1056 </enum>
1057
1058 <enum
1059 name="FirmwareType"
1060 uuid="b903f264-c230-483e-ac74-2b37ce60d371"
1061 >
1062 <desc>
1063 Firmware type.
1064 </desc>
1065 <const name="BIOS" value="1">
1066 <desc>BIOS Firmware.</desc>
1067 </const>
1068 <const name="EFI" value="2">
1069 <desc>EFI Firmware, bitness detetced basing on OS type.</desc>
1070 </const>
1071 <const name="EFI32" value="3">
1072 <desc>Efi firmware, 32-bit.</desc>
1073 </const>
1074 <const name="EFI64" value="4">
1075 <desc>Efi firmware, 64-bit.</desc>
1076 </const>
1077 <const name="EFIDUAL" value="5">
1078 <desc>Efi firmware, combined 32 and 64-bit.</desc>
1079 </const>
1080 </enum>
1081
1082 <enum
1083 name="PointingHidType"
1084 uuid="0d3c17a2-821a-4b2e-ae41-890c6c60aa97"
1085 >
1086 <desc>
1087 Type of pointing device used in a virtual machine.
1088 </desc>
1089 <const name="None" value="1">
1090 <desc>No mouse.</desc>
1091 </const>
1092 <const name="PS2Mouse" value="2">
1093 <desc>PS/2 auxillary device, a.k.a. mouse.</desc>
1094 </const>
1095 <const name="USBMouse" value="3">
1096 <desc>USB mouse (relative pointer).</desc>
1097 </const>
1098 <const name="USBTablet" value="4">
1099 <desc>USB tablet (absolute pointer).</desc>
1100 </const>
1101 <const name="ComboMouse" value="5">
1102 <desc>Combined device, working as PS/2 or USB mouse, depending on guest behavior.
1103 Using of such device can have negative performance implications. </desc>
1104 </const>
1105 </enum>
1106
1107 <enum
1108 name="KeyboardHidType"
1109 uuid="5a5b0996-3a3e-44bb-9019-56979812cbcc"
1110 >
1111 <desc>
1112 Type of keyboard device used in a virtual machine.
1113 </desc>
1114 <const name="None" value="1">
1115 <desc>No keyboard.</desc>
1116 </const>
1117 <const name="PS2Keyboard" value="2">
1118 <desc>PS/2 keyboard.</desc>
1119 </const>
1120 <const name="USBKeyboard" value="3">
1121 <desc>USB keyboard.</desc>
1122 </const>
1123 <const name="ComboKeyboard" value="4">
1124 <desc>Combined device, working as PS/2 or USB keyboard, depending on guest behavior.
1125 Using of such device can have negative performance implications. </desc>
1126 </const>
1127 </enum>
1128
1129 <!--
1130 // IVirtualBoxErrorInfo
1131 /////////////////////////////////////////////////////////////////////////
1132 -->
1133
1134 <interface
1135 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1136 uuid="e053d3c0-f493-491b-a735-3a9f0b1feed4"
1137 supportsErrorInfo="no"
1138 wsmap="managed"
1139 >
1140 <desc>
1141 The IVirtualBoxErrorInfo interface represents extended error information.
1142
1143 Extended error information can be set by VirtualBox components after
1144 unsuccessful or partially successful method invocation. This information
1145 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1146 and then shown to the client in addition to the plain 32-bit result code.
1147
1148 In MS COM, this interface extends the IErrorInfo interface,
1149 in XPCOM, it extends the nsIException interface. In both cases,
1150 it provides a set of common attributes to retrieve error
1151 information.
1152
1153 Sometimes invocation of some component's method may involve methods of
1154 other components that may also fail (independently of this method's
1155 failure), or a series of non-fatal errors may precede a fatal error that
1156 causes method failure. In cases like that, it may be desirable to preserve
1157 information about all errors happened during method invocation and deliver
1158 it to the caller. The <link to="#next"/> attribute is intended
1159 specifically for this purpose and allows to represent a chain of errors
1160 through a single IVirtualBoxErrorInfo object set after method invocation.
1161
1162 Note that errors are stored to a chain in the reverse order, i.e. the
1163 initial error object you query right after method invocation is the last
1164 error set by the callee, the object it points to in the @a next attribute
1165 is the previous error and so on, up to the first error (which is the last
1166 in the chain).
1167 </desc>
1168
1169 <attribute name="resultCode" type="long" readonly="yes">
1170 <desc>
1171 Result code of the error.
1172 Usually, it will be the same as the result code returned
1173 by the method that provided this error information, but not
1174 always. For example, on Win32, CoCreateInstance() will most
1175 likely return E_NOINTERFACE upon unsuccessful component
1176 instantiation attempt, but not the value the component factory
1177 returned. Value is typed 'long', not 'result',
1178 to make interface usable from scripting languages.
1179 <note>
1180 In MS COM, there is no equivalent.
1181 In XPCOM, it is the same as nsIException::result.
1182 </note>
1183 </desc>
1184 </attribute>
1185
1186 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1187 <desc>
1188 UUID of the interface that defined the error.
1189 <note>
1190 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1191 data type.
1192 In XPCOM, there is no equivalent.
1193 </note>
1194 </desc>
1195 </attribute>
1196
1197 <attribute name="component" type="wstring" readonly="yes">
1198 <desc>
1199 Name of the component that generated the error.
1200 <note>
1201 In MS COM, it is the same as IErrorInfo::GetSource.
1202 In XPCOM, there is no equivalent.
1203 </note>
1204 </desc>
1205 </attribute>
1206
1207 <attribute name="text" type="wstring" readonly="yes">
1208 <desc>
1209 Text description of the error.
1210 <note>
1211 In MS COM, it is the same as IErrorInfo::GetDescription.
1212 In XPCOM, it is the same as nsIException::message.
1213 </note>
1214 </desc>
1215 </attribute>
1216
1217 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1218 <desc>
1219 Next error object if there is any, or @c null otherwise.
1220 <note>
1221 In MS COM, there is no equivalent.
1222 In XPCOM, it is the same as nsIException::inner.
1223 </note>
1224 </desc>
1225 </attribute>
1226
1227 </interface>
1228
1229 <!--
1230 // IVirtualBox
1231 /////////////////////////////////////////////////////////////////////////
1232 -->
1233
1234 <interface
1235 name="IDHCPServer" extends="$unknown"
1236 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1237 wsmap="managed"
1238 >
1239 <desc>
1240 The IDHCPServer interface represents the vbox dhcp server configuration.
1241
1242 To enumerate all the dhcp servers on the host, use the
1243 <link to="IVirtualBox::DHCPServers"/> attribute.
1244 </desc>
1245
1246 <attribute name="enabled" type="boolean">
1247 <desc>
1248 specifies if the dhcp server is enabled
1249 </desc>
1250 </attribute>
1251
1252 <attribute name="IPAddress" type="wstring" readonly="yes">
1253 <desc>
1254 specifies server IP
1255 </desc>
1256 </attribute>
1257
1258 <attribute name="networkMask" type="wstring" readonly="yes">
1259 <desc>
1260 specifies server network mask
1261 </desc>
1262 </attribute>
1263
1264 <attribute name="networkName" type="wstring" readonly="yes">
1265 <desc>
1266 specifies internal network name the server is used for
1267 </desc>
1268 </attribute>
1269
1270 <attribute name="lowerIP" type="wstring" readonly="yes">
1271 <desc>
1272 specifies from IP adrres in server address range
1273 </desc>
1274 </attribute>
1275
1276 <attribute name="upperIP" type="wstring" readonly="yes">
1277 <desc>
1278 specifies to IP adrres in server address range
1279 </desc>
1280 </attribute>
1281
1282 <method name="setConfiguration">
1283 <desc>
1284 configures the server
1285 <result name="E_INVALIDARG">
1286 invalid configuration supplied
1287 </result>
1288 </desc>
1289 <param name="IPAddress" type="wstring" dir="in">
1290 <desc>
1291 server IP address
1292 </desc>
1293 </param>
1294 <param name="networkMask" type="wstring" dir="in">
1295 <desc>
1296 server network mask
1297 </desc>
1298 </param>
1299 <param name="FromIPAddress" type="wstring" dir="in">
1300 <desc>
1301 server From IP address for address range
1302 </desc>
1303 </param>
1304 <param name="ToIPAddress" type="wstring" dir="in">
1305 <desc>
1306 server To IP address for address range
1307 </desc>
1308 </param>
1309 </method>
1310
1311 <method name="start">
1312 <desc>
1313 Starts DHCP server process.
1314 <result name="E_FAIL">
1315 Failed to start the process.
1316 </result>
1317 </desc>
1318 <param name="networkName" type="wstring" dir="in">
1319 <desc>
1320 Name of internal network DHCP server should attach to.
1321 </desc>
1322 </param>
1323 <param name="trunkName" type="wstring" dir="in">
1324 <desc>
1325 Name of internal network trunk.
1326 </desc>
1327 </param>
1328 <param name="trunkType" type="wstring" dir="in">
1329 <desc>
1330 Type of internal network trunk.
1331 </desc>
1332 </param>
1333 </method>
1334
1335 <method name="stop">
1336 <desc>
1337 Stops DHCP server process.
1338 <result name="E_FAIL">
1339 Failed to stop the process.
1340 </result>
1341 </desc>
1342 </method>
1343 </interface>
1344
1345 <interface
1346 name="IVirtualBox" extends="$unknown"
1347 uuid="ec6cc7e7-06a2-4c5d-8993-1e3619c53817"
1348 wsmap="managed"
1349 >
1350 <desc>
1351 The IVirtualBox interface represents the main interface exposed by the
1352 product that provides virtual machine management.
1353
1354 An instance of IVirtualBox is required for the product to do anything
1355 useful. Even though the interface does not expose this, internally,
1356 IVirtualBox is implemented as a singleton and actually lives in the
1357 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1358 IVirtualBox can track the state of all virtual machines on a particular
1359 host, regardless of which frontend started them.
1360
1361 To enumerate all the virtual machines on the host, use the
1362 <link to="IVirtualBox::machines"/> attribute.
1363 </desc>
1364
1365 <attribute name="version" type="wstring" readonly="yes">
1366 <desc>
1367 A string representing the version number of the product. The
1368 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1369 last number represents the build number and will frequently change.
1370 </desc>
1371 </attribute>
1372
1373 <attribute name="revision" type="unsigned long" readonly="yes">
1374 <desc>
1375 The internal build revision number of the product.
1376 </desc>
1377 </attribute>
1378
1379 <attribute name="packageType" type="wstring" readonly="yes">
1380 <desc>
1381 A string representing the package type of this product. The
1382 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1383 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1384 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1385 this.
1386 </desc>
1387 </attribute>
1388
1389 <attribute name="homeFolder" type="wstring" readonly="yes">
1390 <desc>
1391 Full path to the directory where the global settings file,
1392 <tt>VirtualBox.xml</tt>, is stored.
1393
1394 In this version of VirtualBox, the value of this property is
1395 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1396 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1397 as determined by the host OS), and cannot be changed.
1398
1399 This path is also used as the base to resolve relative paths in
1400 places where relative paths are allowed (unless otherwise
1401 expressly indicated).
1402 </desc>
1403 </attribute>
1404
1405 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1406 <desc>
1407 Full name of the global settings file.
1408 The value of this property corresponds to the value of
1409 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1410 </desc>
1411 </attribute>
1412
1413 <attribute name="host" type="IHost" readonly="yes">
1414 <desc>Associated host object.</desc>
1415 </attribute>
1416
1417 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1418 <desc>Associated system information object.</desc>
1419 </attribute>
1420
1421 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1422 <desc>
1423 Array of machine objects registered within this VirtualBox instance.
1424 </desc>
1425 </attribute>
1426
1427 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1428 <desc>
1429 Array of medium objects known to this VirtualBox installation.
1430
1431 This array contains only base media. All differencing
1432 media of the given base medium can be enumerated using
1433 <link to="IMedium::children"/>.
1434 </desc>
1435 </attribute>
1436
1437 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1438 <desc>
1439 Array of CD/DVD image objects registered with this VirtualBox instance.
1440 </desc>
1441 </attribute>
1442
1443 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1444 <desc>
1445 Array of floppy image objects registered with this VirtualBox instance.
1446 </desc>
1447 </attribute>
1448
1449 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1450
1451 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1452
1453 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1454 <desc>
1455 Collection of global shared folders. Global shared folders are
1456 available to all virtual machines.
1457
1458 New shared folders are added to the collection using
1459 <link to="#createSharedFolder"/>. Existing shared folders can be
1460 removed using <link to="#removeSharedFolder"/>.
1461
1462 <note>
1463 In the current version of the product, global shared folders are not
1464 implemented and therefore this collection is always empty.
1465 </note>
1466 </desc>
1467 </attribute>
1468
1469 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1470 <desc>
1471 Associated performance collector object.
1472 </desc>
1473 </attribute>
1474
1475 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1476 <desc>
1477 dhcp server settings.
1478 </desc>
1479 </attribute>
1480
1481 <attribute name="eventSource" type="IEventSource" readonly="yes">
1482 <desc>
1483 Event source for VirtualBox events.
1484 </desc>
1485 </attribute>
1486
1487
1488 <method name="createMachine">
1489 <desc>
1490 Creates a new virtual machine.
1491
1492 The new machine is created unregistered, with the initial configuration
1493 set according to the specified guest OS type. A typical sequence of
1494 actions to create a new virtual machine is as follows:
1495
1496 <ol>
1497 <li>
1498 Call this method to have a new machine created. The returned machine
1499 object will be "mutable" allowing to change any machine property.
1500 </li>
1501
1502 <li>
1503 Configure the machine using the appropriate attributes and methods.
1504 </li>
1505
1506 <li>
1507 Call <link to="IMachine::saveSettings" /> to write the settings
1508 to the machine's XML settings file. The configuration of the newly
1509 created machine will not be saved to disk until this method is
1510 called.
1511 </li>
1512
1513 <li>
1514 Call <link to="#registerMachine" /> to add the machine to the list
1515 of machines known to VirtualBox.
1516 </li>
1517 </ol>
1518
1519 You should specify valid name for the newly created machine when calling
1520 this method. See the <link to="IMachine::name"/> attribute description
1521 for more details about the machine name.
1522
1523 The specified guest OS type identifier must match an ID of one of known
1524 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1525 array.
1526
1527 Every machine has a <i>settings file</i> that is used to store
1528 the machine configuration. This file is stored in a directory called the
1529 <i>machine settings subfolder</i>. Both the settings subfolder and file
1530 will have a name that corresponds to the name of the virtual machine.
1531 You can specify where to create the machine setting subfolder using the
1532 @a baseFolder argument. The base folder can be absolute (full path) or
1533 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1534 directory</link>.
1535
1536 If @a baseFolder is a @c null or empty string (which is recommended), the
1537 <link to="ISystemProperties::defaultMachineFolder">default machine
1538 settings folder</link> will be used as a base folder for the created
1539 machine. Otherwise the given base folder will be used. In either case,
1540 the full path to the resulting settings file has the following
1541 structure:
1542 <pre>
1543 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1544 </pre>
1545
1546 Note that if the resulting settings file already exists, this method
1547 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1548
1549 Optionally, you may specify an UUID of to assign to the created machine.
1550 However, this is not recommended and you should normally pass an empty
1551 (@c null) UUID to this method so that a new UUID will be automatically
1552 generated for every created machine. You can use UUID
1553 00000000-0000-0000-0000-000000000000 as @c null value.
1554
1555 <note>
1556 There is no way to change the name of the settings file or
1557 subfolder of the created machine directly.
1558 </note>
1559
1560 <result name="VBOX_E_OBJECT_NOT_FOUND">
1561 @a osTypeId is invalid.
1562 </result>
1563 <result name="VBOX_E_FILE_ERROR">
1564 Resulting settings file name is invalid or the settings file already
1565 exists or could not be created due to an I/O error.
1566 </result>
1567 <result name="E_INVALIDARG">
1568 @a name is empty or @c null.
1569 </result>
1570 </desc>
1571
1572 <param name="name" type="wstring" dir="in">
1573 <desc>Machine name.</desc>
1574 </param>
1575 <param name="osTypeId" type="wstring" dir="in">
1576 <desc>Guest OS Type ID.</desc>
1577 </param>
1578 <param name="baseFolder" type="wstring" dir="in">
1579 <desc>Base machine folder (optional).</desc>
1580 </param>
1581 <param name="id" type="uuid" mod="string" dir="in">
1582 <desc>Machine UUID (optional).</desc>
1583 </param>
1584 <param name="override" type="boolean" dir="in">
1585 <desc>Create the VM even if there are conflicting files.</desc>
1586 </param>
1587 <param name="machine" type="IMachine" dir="return">
1588 <desc>Created machine object.</desc>
1589 </param>
1590 </method>
1591
1592 <method name="createLegacyMachine">
1593 <desc>
1594 Creates a new virtual machine in "legacy" mode, using the specified
1595 settings file to store machine settings.
1596
1597 As opposed to machines created by <link to="#createMachine"/>,
1598 the settings file of the machine created in "legacy" mode is not
1599 automatically renamed when the machine name is changed -- it will always
1600 remain the same as specified in this method call.
1601
1602 The specified settings file name can be absolute (full path) or relative
1603 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1604 directory</link>. If the file name doesn't contain an extension, the
1605 default extension (.xml) will be appended.
1606
1607 Note that the configuration of the newly created machine is not
1608 saved to disk (and therefore no settings file is created)
1609 until <link to="IMachine::saveSettings"/> is called. If the
1610 specified settings file already exists, this method
1611 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1612
1613 See <link to="#createMachine"/> for more information.
1614
1615 @deprecated This method may be removed later. Use <link
1616 to="IVirtualBox::createMachine"/> instead.
1617
1618 <note>
1619 There is no way to change the name of the settings file
1620 of the machine created in "legacy" mode.
1621 </note>
1622
1623 <result name="VBOX_E_OBJECT_NOT_FOUND">
1624 @a osTypeId is invalid.
1625 </result>
1626 <result name="VBOX_E_FILE_ERROR">
1627 @a settingsFile is invalid or the settings file already exists or
1628 could not be created due to an I/O error.
1629 </result>
1630 <result name="E_INVALIDARG">
1631 @a name or @a settingsFile is empty or @c null.
1632 </result>
1633 </desc>
1634
1635 <param name="name" type="wstring" dir="in">
1636 <desc>Machine name.</desc>
1637 </param>
1638 <param name="osTypeId" type="wstring" dir="in">
1639 <desc>Machine OS Type ID.</desc>
1640 </param>
1641 <param name="settingsFile" type="wstring" dir="in">
1642 <desc>Name of the machine settings file.</desc>
1643 </param>
1644 <param name="id" type="uuid" mod="string" dir="in">
1645 <desc>Machine UUID (optional).</desc>
1646 </param>
1647 <param name="machine" type="IMachine" dir="return">
1648 <desc>Created machine object.</desc>
1649 </param>
1650 </method>
1651
1652 <method name="openMachine">
1653 <desc>
1654 Opens a virtual machine from the existing settings file.
1655 The opened machine remains unregistered until you call
1656 <link to="#registerMachine"/>.
1657
1658 The specified settings file name can be absolute
1659 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1660 VirtualBox home directory</link>. This file must exist
1661 and must be a valid machine settings file whose contents
1662 will be used to construct the machine object.
1663
1664 @deprecated Will be removed soon.
1665 <result name="VBOX_E_FILE_ERROR">
1666 Settings file name invalid, not found or sharing violation.
1667 </result>
1668 </desc>
1669 <param name="settingsFile" type="wstring" dir="in">
1670 <desc>
1671 Name of the machine settings file.
1672 </desc>
1673 </param>
1674 <param name="machine" type="IMachine" dir="return">
1675 <desc>Opened machine object.</desc>
1676 </param>
1677 <note>
1678 <link to="IMachine::settingsModified"/> will return
1679 @c false for the created machine, until any of machine settings
1680 are changed.
1681 </note>
1682 </method>
1683
1684 <method name="registerMachine">
1685 <desc>
1686
1687 Registers the machine previously created using
1688 <link to="#createMachine"/> or opened using
1689 <link to="#openMachine"/> within this VirtualBox installation. After
1690 successful method invocation, the
1691 <link to="IMachineRegisteredEvent"/> event is fired.
1692
1693 <note>
1694 This method implicitly calls <link to="IMachine::saveSettings"/>
1695 to save all current machine settings before registering it.
1696 </note>
1697
1698 <result name="VBOX_E_OBJECT_NOT_FOUND">
1699 No matching virtual machine found.
1700 </result>
1701 <result name="VBOX_E_INVALID_OBJECT_STATE">
1702 Virtual machine was not created within this VirtualBox instance.
1703 </result>
1704
1705 </desc>
1706 <param name="machine" type="IMachine" dir="in"/>
1707 </method>
1708
1709 <method name="getMachine">
1710 <desc>
1711 Attempts to find a virtual machine given its UUID.
1712 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1713 instead.
1714
1715 <result name="VBOX_E_OBJECT_NOT_FOUND">
1716 Could not find registered machine matching @a id.
1717 </result>
1718
1719 </desc>
1720 <param name="id" type="uuid" mod="string" dir="in"/>
1721 <param name="machine" type="IMachine" dir="return"/>
1722 </method>
1723
1724 <method name="findMachine">
1725 <desc>
1726 Attempts to find a virtual machine given its name.
1727 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1728 instead.
1729
1730 <result name="VBOX_E_OBJECT_NOT_FOUND">
1731 Could not find registered machine matching @a name.
1732 </result>
1733
1734 </desc>
1735 <param name="name" type="wstring" dir="in"/>
1736 <param name="machine" type="IMachine" dir="return"/>
1737 </method>
1738
1739 <method name="createAppliance">
1740 <desc>
1741 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1742 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1743 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1744 </desc>
1745 <param name="appliance" type="IAppliance" dir="return">
1746 <desc>New appliance.</desc>
1747 </param>
1748 </method>
1749
1750 <method name="createHardDisk">
1751 <desc>
1752 Creates a new base medium object that will use the given storage
1753 format and location for medium data.
1754
1755 Note that the actual storage unit is not created by this method. In
1756 order to do it, and before you are able to attach the created medium
1757 to virtual machines, you must call one of the following methods to
1758 allocate a format-specific storage unit at the specified location:
1759 <ul>
1760 <li><link to="IMedium::createBaseStorage"/></li>
1761 <li><link to="IMedium::createDiffStorage"/></li>
1762 </ul>
1763
1764 Some medium attributes, such as <link to="IMedium::id"/>, may
1765 remain uninitialized until the medium storage unit is successfully
1766 created by one of the above methods.
1767
1768 After the storage unit is successfully created, the medium gets
1769 remembered by this VirtualBox installation and will be accessible
1770 through the <link to="#findMedium"/> method. Remembered base medium
1771 are also returned as part of the <link to="#hardDisks"/> array.
1772 See <link to="IMedium" /> for more details.
1773
1774 The list of all storage formats supported by this VirtualBox
1775 installation can be obtained using
1776 <link to="ISystemProperties::mediumFormats"/>. If the @a format
1777 attribute is empty or @c null then the default storage format
1778 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1779 be used for creating a storage unit of the medium.
1780
1781 Note that the format of the location string is storage format specific.
1782 See <link to="IMedium::location"/>, IMedium and
1783 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1784
1785 <result name="VBOX_E_OBJECT_NOT_FOUND">
1786 @a format identifier is invalid. See
1787 <link to="ISystemProperties::mediumFormats"/>.
1788 </result>
1789 <result name="VBOX_E_FILE_ERROR">
1790 @a location is a not valid file name (for file-based formats only).
1791 </result>
1792 </desc>
1793 <param name="format" type="wstring" dir="in">
1794 <desc>
1795 Identifier of the storage format to use for the new medium.
1796 </desc>
1797 </param>
1798 <param name="location" type="wstring" dir="in">
1799 <desc>
1800 Location of the storage unit for the new medium.
1801 </desc>
1802 </param>
1803 <param name="medium" type="IMedium" dir="return">
1804 <desc>Created medium object.</desc>
1805 </param>
1806 </method>
1807
1808 <method name="openMedium">
1809 <desc>
1810 Opens a medium from an existing storage location.
1811
1812 Once a medium has been opened, VirtualBox saves the medium in a media
1813 registry. Prior to VirtualBox 3.3, this registry had to be the global
1814 media registry in the VirtualBox.xml file, which was shared between
1815 all machines and made transporting machines from one host to another
1816 difficult. Now you can optionally specify an <link to="IMachine" />
1817 instance, in which case the medium will be remembered in that machine's
1818 registry. This is the recommended procedure for machines created with
1819 VirtualBox 3.3 or later. <i>(not yet implemented)</i>
1820
1821 Depending on the given device type, the file at the storage location
1822 must be in one of the media formats understood by VirtualBox:
1823
1824 <ul>
1825 <li>With a "HardDisk" device type, the file must be a hard disk image
1826 in one of the formats supported by VirtualBox (see
1827 <link to="ISystemProperties::mediumFormats" />).
1828 After this method succeeds, if the medium is a base medium, it
1829 will be added to the <link to="#hardDisks"/> array attribute. </li>
1830 <li>With a "DVD" device type, the file must be an ISO 9960 CD/DVD image.
1831 After this method succeeds, the medium will be added to the
1832 <link to="#DVDImages"/> array attribute.</li>
1833 <li>With a "Floppy" device type, the file must be an RAW floppy image.
1834 After this method succeeds, the medium will be added to the
1835 <link to="#floppyImages"/> array attribute.</li>
1836 </ul>
1837
1838 After having been opened, the medium can be found by the <link to="#findMedium"/>
1839 method and can be attached to virtual machines. See <link to="IMedium" /> for more details.
1840
1841 The UUID of the newly opened medium will either be retrieved from the
1842 storage location, if the format supports it (e.g. for hard disk images),
1843 or a new UUID will be randomly generated (e.g. for ISO and RAW files).
1844 If for some reason you need to change the medium's UUID, use
1845 <link to="IMedium::setIDs" />.
1846
1847 If a differencing hard disk medium is to be opened by this method, the
1848 operation will succeed only if its parent medium and all ancestors,
1849 if any, are already known to this VirtualBox installation (for example,
1850 were opened by this method before).
1851
1852 This method attempts to guess the storage format of the specified medium
1853 by reading medium data at the specified location.
1854
1855 If @a accessMode is ReadWrite (which it should be for hard disks and floppies),
1856 the image is opened for read/write access and must have according permissions,
1857 as VirtualBox may actually write status information into the disk's metadata
1858 sections.
1859
1860 Note that write access is required for all typical hard disk usage in VirtualBox,
1861 since VirtualBox may need to write metadata such as a UUID into the image.
1862 The only exception is opening a source image temporarily for copying and
1863 cloning (see <link to="IMedium::cloneTo" /> when the image will be closed
1864 again soon.
1865
1866 The format of the location string is storage format specific. See
1867 <link to="IMedium::location"/>, IMedium and
1868 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1869
1870 <result name="VBOX_E_FILE_ERROR">
1871 Invalid medium storage file location or could not find the medium
1872 at the specified location.
1873 </result>
1874 <result name="VBOX_E_IPRT_ERROR">
1875 Could not get medium storage format.
1876 </result>
1877 <result name="E_INVALIDARG">
1878 Invalid medium storage format.
1879 </result>
1880 <result name="VBOX_E_INVALID_OBJECT_STATE">
1881 Medium has already been added to a media registry.
1882 </result>
1883 </desc>
1884 <param name="location" type="wstring" dir="in">
1885 <desc>
1886 Location of the storage unit that contains medium data in one of
1887 the supported storage formats.
1888 </desc>
1889 </param>
1890 <param name="deviceType" type="DeviceType" dir="in">
1891 <desc>
1892 Must be one of "HardDisk", "DVD" or "Floppy".
1893 </desc>
1894 </param>
1895 <param name="accessMode" type="AccessMode" dir="in">
1896 <desc>Whether to open the image in read/write or read-only mode. For
1897 a "DVD" device type, this is ignored and read-only mode is always assumed.</desc>
1898 </param>
1899 <param name="medium" type="IMedium" dir="return">
1900 <desc>Opened medium object.</desc>
1901 </param>
1902 </method>
1903
1904 <method name="findMedium">
1905 <desc>
1906 Returns a medium of the given type that uses the given location or
1907 UUID to store medium data.
1908
1909 The given medium must be known to this VirtualBox installation, i.e.
1910 it must be previously created by <link to="#createHardDisk"/> or opened
1911 by <link to="#openMedium"/>.
1912
1913 The search is done by comparing the value of the @a location argument to
1914 the <link to="IMedium::location"/> and <link to="IMedium::id" />
1915 attributes of each known medium.
1916
1917 For locations represented by file names in the host's file system, the
1918 requested location can be a path relative to the
1919 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1920 only a file name without any path is given, the
1921 <link to="ISystemProperties::defaultHardDiskFolder"> default medium
1922 folder</link> will be prepended to the file name before searching. Note
1923 that on case sensitive file systems, a case sensitive comparison is
1924 performed, otherwise the case of symbols in the file path is ignored.
1925
1926 <result name="VBOX_E_OBJECT_NOT_FOUND">
1927 No medium object matching @a location found.
1928 </result>
1929 </desc>
1930 <param name="location" type="wstring" dir="in">
1931 <desc>What to search for. This can either be the UUID or the location string of an open medium.</desc>
1932 </param>
1933 <param name="type" type="DeviceType" dir="in">
1934 <desc>Device type (must be HardDisk, DVD or Floppy)</desc>
1935 </param>
1936 <param name="medium" type="IMedium" dir="return">
1937 <desc>Medium object, if found.</desc>
1938 </param>
1939 </method>
1940
1941 <method name="getGuestOSType">
1942 <desc>
1943 Returns an object describing the specified guest OS type.
1944
1945 The requested guest OS type is specified using a string which is a
1946 mnemonic identifier of the guest operating system, such as
1947 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
1948 particular virtual machine can be read or set using the
1949 <link to="IMachine::OSTypeId"/> attribute.
1950
1951 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
1952 available guest OS type objects. Each object has an
1953 <link to="IGuestOSType::id"/> attribute which contains an identifier of
1954 the guest OS this object describes.
1955
1956 <result name="E_INVALIDARG">
1957 @a id is not a valid Guest OS type.
1958 </result>
1959
1960 </desc>
1961 <param name="id" type="uuid" mod="string" dir="in">
1962 <desc>Guest OS type ID string.</desc>
1963 </param>
1964 <param name="type" type="IGuestOSType" dir="return">
1965 <desc>Guest OS type object.</desc>
1966 </param>
1967 </method>
1968
1969 <method name="createSharedFolder">
1970 <desc>
1971 Creates a new global shared folder by associating the given logical
1972 name with the given host path, adds it to the collection of shared
1973 folders and starts sharing it. Refer to the description of
1974 <link to="ISharedFolder"/> to read more about logical names.
1975 <note>
1976 In the current implementation, this operation is not
1977 implemented.
1978 </note>
1979 </desc>
1980 <param name="name" type="wstring" dir="in">
1981 <desc>Unique logical name of the shared folder.</desc>
1982 </param>
1983 <param name="hostPath" type="wstring" dir="in">
1984 <desc>Full path to the shared folder in the host file system.</desc>
1985 </param>
1986 <param name="writable" type="boolean" dir="in">
1987 <desc>Whether the share is writable or readonly</desc>
1988 </param>
1989 <param name="automount" type="boolean" dir="in">
1990 <desc>Whether the share gets automatically mounted by the guest
1991 or not.</desc>
1992 </param>
1993 </method>
1994
1995 <method name="removeSharedFolder">
1996 <desc>
1997 Removes the global shared folder with the given name previously
1998 created by <link to="#createSharedFolder"/> from the collection of
1999 shared folders and stops sharing it.
2000 <note>
2001 In the current implementation, this operation is not
2002 implemented.
2003 </note>
2004 </desc>
2005 <param name="name" type="wstring" dir="in">
2006 <desc>Logical name of the shared folder to remove.</desc>
2007 </param>
2008 </method>
2009
2010 <method name="getExtraDataKeys">
2011 <desc>
2012 Returns an array representing the global extra data keys which currently
2013 have values defined.
2014 </desc>
2015 <param name="value" type="wstring" dir="return" safearray="yes">
2016 <desc>Array of extra data keys.</desc>
2017 </param>
2018 </method>
2019
2020 <method name="getExtraData">
2021 <desc>
2022 Returns associated global extra data.
2023
2024 If the requested data @a key does not exist, this function will
2025 succeed and return an empty string in the @a value argument.
2026
2027 <result name="VBOX_E_FILE_ERROR">
2028 Settings file not accessible.
2029 </result>
2030 <result name="VBOX_E_XML_ERROR">
2031 Could not parse the settings file.
2032 </result>
2033
2034 </desc>
2035 <param name="key" type="wstring" dir="in">
2036 <desc>Name of the data key to get.</desc>
2037 </param>
2038 <param name="value" type="wstring" dir="return">
2039 <desc>Value of the requested data key.</desc>
2040 </param>
2041 </method>
2042
2043 <method name="setExtraData">
2044 <desc>
2045 Sets associated global extra data.
2046
2047 If you pass @c null or empty string as a key @a value, the given @a key
2048 will be deleted.
2049
2050 <note>
2051 Before performing the actual data change, this method will ask all
2052 registered event listener using the
2053 <link to="IExtraDataCanChangeEvent"/>
2054 notification for a permission. If one of the listeners refuses the
2055 new value, the change will not be performed.
2056 </note>
2057 <note>
2058 On success, the
2059 <link to="IExtraDataChangedEvent"/> notification
2060 is called to inform all registered listeners about a successful data
2061 change.
2062 </note>
2063
2064 <result name="VBOX_E_FILE_ERROR">
2065 Settings file not accessible.
2066 </result>
2067 <result name="VBOX_E_XML_ERROR">
2068 Could not parse the settings file.
2069 </result>
2070 <result name="E_ACCESSDENIED">
2071 Modification request refused.
2072 </result>
2073
2074 </desc>
2075 <param name="key" type="wstring" dir="in">
2076 <desc>Name of the data key to set.</desc>
2077 </param>
2078 <param name="value" type="wstring" dir="in">
2079 <desc>Value to assign to the key.</desc>
2080 </param>
2081 </method>
2082
2083 <method name="waitForPropertyChange">
2084 <desc>
2085 Blocks the caller until any of the properties represented by the
2086 @a what argument changes the value or until the given timeout interval
2087 expires.
2088
2089 The @a what argument is a comma separated list of property masks that
2090 describe properties the caller is interested in. The property mask is
2091 a string in the following format:
2092
2093 <pre>
2094 [[group.]subgroup.]name
2095 </pre>
2096
2097 where @c name is the property name and @c group, @c subgroup are zero
2098 or more property group specifiers. Each element (group or name) in
2099 the property mask may be either a Latin string or an asterisk symbol
2100 (@c "*") which is used to match any string for the given element. A
2101 property mask that doesn't contain asterisk symbols represents a
2102 single fully qualified property name.
2103
2104 Groups in the fully qualified property name go from more generic (the
2105 left-most part) to more specific (the right-most part). The first
2106 element is usually a name of the object the property belongs to. The
2107 second element may be either a property name, or a child object name,
2108 or an index if the preceding element names an object which is one of
2109 many objects of the same type. This way, property names form a
2110 hierarchy of properties. Here are some examples of property names:
2111
2112 <table>
2113 <tr>
2114 <td><tt>VirtualBox.version</tt></td>
2115 <td><link to="IVirtualBox::version"/> property</td>
2116 </tr>
2117 <tr>
2118 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2119 <td><link to="IMachine::name"/> property of the machine with the
2120 given UUID</td>
2121 </tr>
2122 </table>
2123
2124 Most property names directly correspond to the properties of objects
2125 (components) provided by the VirtualBox library and may be used to
2126 track changes to these properties. However, there may be
2127 pseudo-property names that don't correspond to any existing object's
2128 property directly, as well as there may be object properties that
2129 don't have a corresponding property name that is understood by this
2130 method, and therefore changes to such properties cannot be
2131 tracked. See individual object's property descriptions to get a
2132 fully qualified property name that can be used with this method (if
2133 any).
2134
2135 There is a special property mask @c "*" (i.e. a string consisting of a
2136 single asterisk symbol) that can be used to match all properties.
2137 Below are more examples of property masks:
2138
2139 <table>
2140 <tr>
2141 <td><tt>VirtualBox.*</tt></td>
2142 <td>Track all properties of the VirtualBox object</td>
2143 </tr>
2144 <tr>
2145 <td><tt>Machine.*.name</tt></td>
2146 <td>Track changes to the <link to="IMachine::name"/> property of
2147 all registered virtual machines</td>
2148 </tr>
2149 </table>
2150
2151 <note>
2152 This function is not implemented in the current version of the
2153 product.
2154 </note>
2155 </desc>
2156 <param name="what" type="wstring" dir="in">
2157 <desc>Comma separated list of property masks.</desc>
2158 </param>
2159 <param name="timeout" type="unsigned long" dir="in">
2160 <desc>
2161 Wait timeout in milliseconds.
2162 Specify -1 for an indefinite wait.
2163 </desc>
2164 </param>
2165 <param name="changed" type="wstring" dir="out">
2166 <desc>
2167 Comma separated list of properties that have been changed and caused
2168 this method to return to the caller.
2169 </desc>
2170 </param>
2171 <param name="values" type="wstring" dir="out">
2172 <desc>Reserved, not currently used.</desc>
2173 </param>
2174 </method>
2175
2176 <!--method name="createDHCPServerForInterface">
2177 <desc>
2178 Creates a dhcp server settings to be used for the given interface
2179 <result name="E_INVALIDARG">
2180 Host network interface @a name already exists.
2181 </result>
2182 </desc>
2183 <param name="interface" type="IHostNetworkInterface" dir="in">
2184 <desc>Network Interface</desc>
2185 </param>
2186 <param name="server" type="IDHCPServer" dir="out">
2187 <desc>Dhcp server settings</desc>
2188 </param>
2189 </method-->
2190
2191 <method name="createDHCPServer">
2192 <desc>
2193 Creates a dhcp server settings to be used for the given internal network name
2194 <result name="E_INVALIDARG">
2195 Host network interface @a name already exists.
2196 </result>
2197 </desc>
2198 <param name="name" type="wstring" dir="in">
2199 <desc>server name</desc>
2200 </param>
2201 <param name="server" type="IDHCPServer" dir="return">
2202 <desc>Dhcp server settings</desc>
2203 </param>
2204 </method>
2205
2206 <method name="findDHCPServerByNetworkName">
2207 <desc>
2208 Searches a dhcp server settings to be used for the given internal network name
2209 <result name="E_INVALIDARG">
2210 Host network interface @a name already exists.
2211 </result>
2212
2213 </desc>
2214 <param name="name" type="wstring" dir="in">
2215 <desc>server name</desc>
2216 </param>
2217 <param name="server" type="IDHCPServer" dir="return">
2218 <desc>Dhcp server settings</desc>
2219 </param>
2220 </method>
2221
2222 <!--method name="findDHCPServerForInterface">
2223 <desc>
2224 Searches a dhcp server settings to be used for the given interface
2225 <result name="E_INVALIDARG">
2226 Host network interface @a name already exists.
2227 </result>
2228 </desc>
2229 <param name="interface" type="IHostNetworkInterface" dir="in">
2230 <desc>Network Interface</desc>
2231 </param>
2232 <param name="server" type="IDHCPServer" dir="out">
2233 <desc>Dhcp server settings</desc>
2234 </param>
2235 </method-->
2236
2237 <method name="removeDHCPServer">
2238 <desc>
2239 Removes the dhcp server settings
2240 <result name="E_INVALIDARG">
2241 Host network interface @a name already exists.
2242 </result>
2243 </desc>
2244 <param name="server" type="IDHCPServer" dir="in">
2245 <desc>Dhcp server settings to be removed</desc>
2246 </param>
2247 </method>
2248
2249
2250 <method name="checkFirmwarePresent">
2251 <desc>
2252 Check if this VirtualBox installation has a firmware
2253 of the given type available, either system-wide or per-user.
2254 Optionally, this may return a hint where this firmware can be
2255 downloaded from.
2256 </desc>
2257 <param name="firmwareType" type="FirmwareType" dir="in">
2258 <desc>
2259 Type of firmware to check.
2260 </desc>
2261 </param>
2262 <param name="version" type="wstring" dir="in">
2263 <desc>Expected version number, usually empty string (presently ignored).</desc>
2264 </param>
2265
2266 <param name="url" type="wstring" dir="out">
2267 <desc>
2268 Suggested URL to download this firmware from.
2269 </desc>
2270 </param>
2271
2272 <param name="file" type="wstring" dir="out">
2273 <desc>
2274 Filename of firmware, only valid if result == TRUE.
2275 </desc>
2276 </param>
2277
2278 <param name="result" type="boolean" dir="return">
2279 <desc>If firmware of this type and version is available.</desc>
2280 </param>
2281 </method>
2282
2283 </interface>
2284
2285 <!--
2286 // IVFSExplorer
2287 /////////////////////////////////////////////////////////////////////////
2288 -->
2289
2290 <enum
2291 name="VFSType"
2292 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
2293 >
2294 <desc>
2295 Virtual file systems supported by VFSExplorer.
2296 </desc>
2297
2298 <const name="File" value="1" />
2299 <const name="Cloud" value="2" />
2300 <const name="S3" value="3" />
2301 <const name="WebDav" value="4" />
2302 </enum>
2303
2304 <enum
2305 name="VFSFileType"
2306 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
2307 >
2308 <desc>
2309 File types known by VFSExplorer.
2310 </desc>
2311
2312 <const name="Unknown" value="1" />
2313 <const name="Fifo" value="2" />
2314 <const name="DevChar" value="3" />
2315 <const name="Directory" value="4" />
2316 <const name="DevBlock" value="5" />
2317 <const name="File" value="6" />
2318 <const name="SymLink" value="7" />
2319 <const name="Socket" value="8" />
2320 <const name="WhiteOut" value="9" />
2321 </enum>
2322
2323 <interface
2324 name="IVFSExplorer" extends="$unknown"
2325 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
2326 wsmap="managed"
2327 >
2328 <desc>
2329 The VFSExplorer interface unifies access to different file system
2330 types. This includes local file systems as well remote file systems like
2331 S3. For a list of supported types see <link to="VFSType" />.
2332 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
2333 </desc>
2334
2335 <attribute name="path" type="wstring" readonly="yes">
2336 <desc>Returns the current path in the virtual file system.</desc>
2337 </attribute>
2338
2339 <attribute name="type" type="VFSType" readonly="yes">
2340 <desc>Returns the file system type which is currently in use.</desc>
2341 </attribute>
2342
2343 <method name="update">
2344 <desc>Updates the internal list of files/directories from the
2345 current directory level. Use <link to="#entryList" /> to get the full list
2346 after a call to this method.</desc>
2347
2348 <param name="aProgress" type="IProgress" dir="return">
2349 <desc>Progress object to track the operation completion.</desc>
2350 </param>
2351 </method>
2352
2353 <method name="cd">
2354 <desc>Change the current directory level.</desc>
2355
2356 <param name="aDir" type="wstring" dir="in">
2357 <desc>The name of the directory to go in.</desc>
2358 </param>
2359
2360 <param name="aProgress" type="IProgress" dir="return">
2361 <desc>Progress object to track the operation completion.</desc>
2362 </param>
2363 </method>
2364
2365 <method name="cdUp">
2366 <desc>Go one directory upwards from the current directory level.</desc>
2367
2368 <param name="aProgress" type="IProgress" dir="return">
2369 <desc>Progress object to track the operation completion.</desc>
2370 </param>
2371 </method>
2372
2373 <method name="entryList">
2374 <desc>Returns a list of files/directories after a call to <link
2375 to="#update" />. The user is responsible for keeping this internal
2376 list up do date.</desc>
2377
2378 <param name="aNames" type="wstring" safearray="yes" dir="out">
2379 <desc>The list of names for the entries.</desc>
2380 </param>
2381
2382 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
2383 <desc>The list of types for the entries.</desc>
2384 </param>
2385 </method>
2386
2387 <method name="exists">
2388 <desc>Checks if the given file list exists in the current directory
2389 level.</desc>
2390
2391 <param name="aNames" type="wstring" safearray="yes" dir="in">
2392 <desc>The names to check.</desc>
2393 </param>
2394
2395 <param name="aExists" type="wstring" safearray="yes" dir="return">
2396 <desc>The names which exist.</desc>
2397 </param>
2398 </method>
2399
2400 <method name="remove">
2401 <desc>Deletes the given files in the current directory level.</desc>
2402
2403 <param name="aNames" type="wstring" safearray="yes" dir="in">
2404 <desc>The names to remove.</desc>
2405 </param>
2406
2407 <param name="aProgress" type="IProgress" dir="return">
2408 <desc>Progress object to track the operation completion.</desc>
2409 </param>
2410 </method>
2411
2412 </interface>
2413
2414 <!--
2415 // IAppliance
2416 /////////////////////////////////////////////////////////////////////////
2417 -->
2418
2419 <interface
2420 name="IAppliance" extends="$unknown"
2421 uuid="fb61a4fc-57e7-48d6-859b-71f37d484cf2"
2422 wsmap="managed"
2423 >
2424 <desc>
2425 Represents a platform-independent appliance in OVF format. An instance of this is returned
2426 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
2427 virtual machines within an appliance with VirtualBox.
2428
2429 The OVF standard suggests two different physical file formats:
2430
2431 <ol>
2432 <li>If the appliance is distributed as a set of files, there must be at least one XML descriptor
2433 file that conforms to the OVF standard and carries an <tt>.ovf</tt> file extension. If
2434 this descriptor file references other files such as disk images, as OVF appliances typically
2435 do, those additional files must be in the same directory as the descriptor file.</li>
2436
2437 <li>If the appliance is distributed as a single file, it must be in TAR format and have the
2438 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
2439 files and optionally other files.
2440
2441 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
2442 be added with a later version.</li>
2443 </ol>
2444
2445 <b>Importing</b> an OVF appliance into VirtualBox as instances of
2446 <link to="IMachine" /> involves the following sequence of API calls:
2447
2448 <ol>
2449 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
2450 </li>
2451
2452 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
2453 would like to import. So long as this file is syntactically valid, this will succeed
2454 and fill the appliance object with the parsed data from the OVF file.
2455 </li>
2456
2457 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
2458 contents of the IAppliance attributes accordingly. These can be inspected by a
2459 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
2460 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
2461 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
2462 systems (machines) in the OVF, which in turn describe the virtual hardware prescribed
2463 by the OVF (network and hardware adapters, virtual disk images, memory size and so on).
2464 The GUI can then give the user the option to confirm and/or change these suggestions.
2465 </li>
2466
2467 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
2468 virtual system (machine) to override the suggestions made by the interpret() routine.
2469 </li>
2470
2471 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
2472 VirtualBox as instances of <link to="IMachine" /> that match the information in the
2473 virtual system descriptions. After this call suceeded, the UUIDs of the machines created
2474 can be found in the <link to="#machines" /> array attribute.
2475 </li>
2476 </ol>
2477
2478 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
2479
2480 <ol>
2481 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
2482 an empty IAppliance object.
2483 </li>
2484
2485 <li>For each machine you would like to export, call <link to="IMachine::export" />
2486 with the IAppliance object you just created. Each such call creates one instance of
2487 <link to="IVirtualSystemDescription" /> inside the appliance.
2488 </li>
2489
2490 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
2491 virtual system (machine) to override the suggestions made by the export() routine.
2492 </li>
2493
2494 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
2495 file written.</li>
2496 </ol>
2497
2498 </desc>
2499
2500 <attribute name="path" type="wstring" readonly="yes">
2501 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
2502 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
2503 <link to="#write" /> (for export).
2504 This attribute is empty until one of these methods has been called.
2505 </desc>
2506 </attribute>
2507
2508 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
2509 <desc>
2510 Array of virtual disk definitions. One such description exists for each
2511 disk definition in the OVF; each string array item represents one such piece of
2512 disk information, with the information fields separated by tab (\t) characters.
2513
2514 The caller should be prepared for additional fields being appended to
2515 this string in future versions of VirtualBox and therefore check for
2516 the number of tabs in the strings returned.
2517
2518 In the current version, the following eight fields are returned per string
2519 in the array:
2520
2521 <ol>
2522 <li>Disk ID (unique string identifier given to disk)</li>
2523
2524 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
2525
2526 <li>Populated size (optional unsigned integer indicating the current size of the
2527 disk; can be approximate; -1 if unspecified)</li>
2528
2529 <li>Format (string identifying the disk format, typically
2530 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
2531
2532 <li>Reference (where to find the disk image, typically a file name; if empty,
2533 then the disk should be created on import)</li>
2534
2535 <li>Image size (optional unsigned integer indicating the size of the image,
2536 which need not necessarily be the same as the values specified above, since
2537 the image may be compressed or sparse; -1 if not specified)</li>
2538
2539 <li>Chunk size (optional unsigned integer if the image is split into chunks;
2540 presently unsupported and always -1)</li>
2541
2542 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
2543 </ol>
2544 </desc>
2545 </attribute>
2546
2547 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
2548 <desc> Array of virtual system descriptions. One such description is created
2549 for each virtual system (machine) found in the OVF.
2550 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
2551 (for export) has been called.
2552 </desc>
2553 </attribute>
2554
2555 <attribute name="machines" type="wstring" readonly="yes" safearray="yes">
2556 <desc>
2557 Contains the UUIDs of the machines created from the information in this appliances. This is only
2558 relevant for the import case, and will only contain data after a call to <link to="#importMachines" />
2559 succeeded.
2560 </desc>
2561 </attribute>
2562
2563 <method name="read">
2564 <desc>
2565 Reads an OVF file into the appliance object.
2566
2567 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
2568 mere fact that this method returns successfully does not mean that VirtualBox supports all
2569 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
2570 </desc>
2571 <param name="file" type="wstring" dir="in">
2572 <desc>
2573 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
2574 on whether the appliance is distributed as a set of files or as a single file, respectively).
2575 </desc>
2576 </param>
2577 <param name="aProgress" type="IProgress" dir="return">
2578 <desc>Progress object to track the operation completion.</desc>
2579 </param>
2580 </method>
2581
2582 <method name="interpret">
2583 <desc>
2584 Interprets the OVF data that was read when the appliance was constructed. After
2585 calling this method, one can inspect the
2586 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
2587 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
2588 the appliance.
2589
2590 Calling this method is the second step of importing an appliance into VirtualBox;
2591 see <link to="IAppliance" /> for an overview.
2592
2593 After calling this method, one should call <link to="#getWarnings" /> to find out
2594 if problems were encountered during the processing which might later lead to
2595 errors.
2596 </desc>
2597 </method>
2598
2599 <method name="importMachines">
2600 <desc>
2601 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
2602 and other interfaces that match the information contained in the appliance as
2603 closely as possible, as represented by the import instructions in the
2604 <link to="#virtualSystemDescriptions" /> array.
2605
2606 Calling this method is the final step of importing an appliance into VirtualBox;
2607 see <link to="IAppliance" /> for an overview.
2608
2609 Since importing the appliance will most probably involve copying and converting
2610 disk images, which can take a long time, this method operates asynchronously and
2611 returns an IProgress object to allow the caller to monitor the progress.
2612
2613 After the import succeeded, the UUIDs of the IMachine instances created can be
2614 retrieved from the <link to="#machines" /> array attribute.
2615 </desc>
2616
2617 <param name="aProgress" type="IProgress" dir="return">
2618 <desc>Progress object to track the operation completion.</desc>
2619 </param>
2620 </method>
2621
2622 <method name="createVFSExplorer">
2623 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
2624
2625 <param name="aUri" type="wstring" dir="in">
2626 <desc>The URI describing the file system to use.</desc>
2627 </param>
2628
2629 <param name="aExplorer" type="IVFSExplorer" dir="return">
2630 <desc></desc>
2631 </param>
2632 </method>
2633
2634 <method name="write">
2635 <desc>
2636 Writes the contents of the appliance exports into a new OVF file.
2637
2638 Calling this method is the final step of exporting an appliance from VirtualBox;
2639 see <link to="IAppliance" /> for an overview.
2640
2641 Since exporting the appliance will most probably involve copying and converting
2642 disk images, which can take a long time, this method operates asynchronously and
2643 returns an IProgress object to allow the caller to monitor the progress.
2644 </desc>
2645 <param name="format" type="wstring" dir="in">
2646 <desc>
2647 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
2648 future versions of VirtualBox may support additional formats.
2649 </desc>
2650 </param>
2651 <param name="path" type="wstring" dir="in">
2652 <desc>
2653 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
2654 on whether the appliance is distributed as a set of files or as a single file, respectively).
2655 </desc>
2656 </param>
2657 <param name="aProgress" type="IProgress" dir="return">
2658 <desc>Progress object to track the operation completion.</desc>
2659 </param>
2660 </method>
2661
2662 <method name="getWarnings">
2663 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
2664
2665 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
2666 <desc></desc>
2667 </param>
2668 </method>
2669
2670 </interface>
2671
2672 <enum
2673 name="VirtualSystemDescriptionType"
2674 uuid="c0f8f135-3a1d-417d-afa6-b38b95a91f90"
2675 >
2676 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
2677 a configuration value.</desc>
2678
2679 <const name="Ignore" value="1" />
2680 <const name="OS" value="2" />
2681 <const name="Name" value="3" />
2682 <const name="Product" value="4" />
2683 <const name="Vendor" value="5" />
2684 <const name="Version" value="6" />
2685 <const name="ProductUrl" value="7" />
2686 <const name="VendorUrl" value="8" />
2687 <const name="Description" value="9" />
2688 <const name="License" value="10" />
2689 <const name="Miscellaneous" value="11" />
2690 <const name="CPU" value="12" />
2691 <const name="Memory" value="13" />
2692 <const name="HardDiskControllerIDE" value="14" />
2693 <const name="HardDiskControllerSATA" value="15" />
2694 <const name="HardDiskControllerSCSI" value="16" />
2695 <const name="HardDiskControllerSAS" value="17" />
2696 <const name="HardDiskImage" value="18" />
2697 <const name="Floppy" value="19" />
2698 <const name="CDROM" value="20" />
2699 <const name="NetworkAdapter" value="21" />
2700 <const name="USBController" value="22" />
2701 <const name="SoundCard" value="23" />
2702
2703 </enum>
2704
2705 <enum
2706 name="VirtualSystemDescriptionValueType"
2707 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
2708 >
2709 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
2710 type to fetch.</desc>
2711
2712 <const name="Reference" value="1" />
2713 <const name="Original" value="2" />
2714 <const name="Auto" value="3" />
2715 <const name="ExtraConfig" value="4" />
2716
2717 </enum>
2718
2719 <interface
2720 name="IVirtualSystemDescription" extends="$unknown"
2721 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
2722 wsmap="managed"
2723 >
2724
2725 <desc>Represents one virtual system (machine) in an appliance. This interface is used in
2726 the <link to="IAppliance::virtualSystemDescriptions" /> array. After
2727 <link to="IAppliance::interpret" /> has been called, that array contains information
2728 about how the virtual systems described in the OVF should best be imported into
2729 VirtualBox virtual machines. See <link to="IAppliance" /> for the steps required to
2730 import an OVF into VirtualBox.
2731 </desc>
2732
2733 <attribute name="count" type="unsigned long" readonly="yes">
2734 <desc>Return the number of virtual system description entries.</desc>
2735 </attribute>
2736
2737 <method name="getDescription">
2738 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
2739 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
2740
2741 The list below identifies the value sets that are possible depending on the
2742 <link to="VirtualSystemDescriptionType" /> enum value in the array item in @a aTypes[]. In each case,
2743 the array item with the same index in @a aOvfValues[] will contain the original value as contained
2744 in the OVF file (just for informational purposes), and the corresponding item in @a aVBoxValues[]
2745 will contain a suggested value to be used for VirtualBox. Depending on the description type,
2746 the @a aExtraConfigValues[] array item may also be used.
2747
2748 <ul>
2749 <li>
2750 "OS": the guest operating system type. There must be exactly one such array item on import. The
2751 corresponding item in @a aVBoxValues[] contains the suggested guest operating system for VirtualBox.
2752 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
2753 item in @a aOvfValues[] will contain a numerical value that described the operating system in the OVF.
2754 </li>
2755 <li>
2756 "Name": the name to give to the new virtual machine. There can be at most one such array item;
2757 if none is present on import, then an automatic name will be created from the operating system
2758 type. The correponding item im @a aOvfValues[] will contain the suggested virtual machine name
2759 from the OVF file, and @a aVBoxValues[] will contain a suggestion for a unique VirtualBox
2760 <link to="IMachine" /> name that does not exist yet.
2761 </li>
2762 <li>
2763 "Description": an arbitrary description.
2764 </li>
2765 <li>
2766 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
2767 code to display such a license for agreement; the Main API does not enforce any such policy.
2768 </li>
2769 <li>
2770 Miscellaneous: reserved for future use.
2771 </li>
2772 <li>
2773 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
2774 </li>
2775 <li>
2776 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
2777 is present on import, then VirtualBox will set a meaningful default based on the operating system
2778 type.
2779 </li>
2780 <li>
2781 "HardDiskControllerIDE": an IDE hard disk controller. There can be at most two such items.
2782 An optional value in @a aOvfValues[] and @a aVBoxValues[] can be "PIIX3" or "PIIX4" to specify
2783 the type of IDE controller; this corresponds to the ResourceSubType element which VirtualBox
2784 writes into the OVF.
2785 The matching item in the @a aRefs[] array will contain an integer that items of the "Harddisk"
2786 type can use to specify which hard disk controller a virtual disk should be connected to.
2787 Note that in OVF, an IDE controller has two channels, corresponding to "master" and "slave"
2788 in traditional terminology, whereas the IDE storage controller that VirtualBox supports in
2789 its virtual machines supports four channels (primary master, primary slave, secondary master,
2790 secondary slave) and thus maps to two IDE controllers in the OVF sense.
2791 </li>
2792 <li>
2793 "HardDiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
2794 has no value in @a aOvfValues[] or @a aVBoxValues[].
2795 The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
2796 </li>
2797 <li>
2798 "HardDiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
2799 The items in @a aOvfValues[] and @a aVBoxValues[] will either be "LsiLogic", "BusLogic" or
2800 "LsiLogicSas". (Note that in OVF, the LsiLogicSas controller is treated as a SCSI controller
2801 whereas VirtualBox considers it a class of storage controllers of its own; see
2802 <link to="StorageControllerType" />).
2803 The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
2804 </li>
2805 <li>
2806 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
2807 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
2808
2809 The array item in @a aOvfValues[] will contain the file specification from the OVF file (without
2810 a path since the image file should be in the same location as the OVF file itself), whereas the
2811 item in @a aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
2812 hard disk image. This means that on import the image will be copied and converted from the
2813 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
2814 On import, the target image will also be registered with VirtualBox.
2815
2816 The matching item in the @a aExtraConfigValues[] array must contain a string of the following
2817 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
2818 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
2819 the image to. That number must be the index of an array item with one of the hard disk controller
2820 types (HardDiskControllerSCSI, HardDiskControllerSATA, HardDiskControllerIDE).
2821 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
2822 this can be 0 or 1 for master or slave, respectively. For compatibility with VirtualBox versions
2823 before 3.2, the values 2 and 3 (for secondary master and secondary slave) are also supported, but
2824 no longer exported. For SATA and SCSI controllers, the channel can range from 0-29.
2825 </li>
2826 <li>
2827 "CDROM": a virtual CD-ROM drive. The matching item in @a aExtraConfigValue[] contains the same
2828 attachment information as with "HardDiskImage" items.
2829 </li>
2830 <li>
2831 "CDROM": a virtual floppy drive. The matching item in @a aExtraConfigValue[] contains the same
2832 attachment information as with "HardDiskImage" items.
2833 </li>
2834 <li>
2835 "NetworkAdapter": a network adapter. The array item in @a aVBoxValues[] will specify the hardware
2836 for the network adapter, whereas the array item in @a aExtraConfigValues[] will have a string
2837 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
2838 </li>
2839 <li>
2840 "USBController": a USB controller. There can be at most one such item. If and only if such an
2841 item ispresent, USB support will be enabled for the new virtual machine.
2842 </li>
2843 <li>
2844 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
2845 present, sound support will be enabled for the new virtual machine. Note that the virtual
2846 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
2847 may be different from the virtual soundcard expected by the appliance.
2848 </li>
2849 </ul>
2850
2851 </desc>
2852
2853 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
2854 <desc></desc>
2855 </param>
2856
2857 <param name="aRefs" type="wstring" dir="out" safearray="yes">
2858 <desc></desc>
2859 </param>
2860
2861 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
2862 <desc></desc>
2863 </param>
2864
2865 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
2866 <desc></desc>
2867 </param>
2868
2869 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
2870 <desc></desc>
2871 </param>
2872
2873 </method>
2874
2875 <method name="getDescriptionByType">
2876 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
2877 should be returned.</desc>
2878
2879 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2880 <desc></desc>
2881 </param>
2882
2883 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
2884 <desc></desc>
2885 </param>
2886
2887 <param name="aRefs" type="wstring" dir="out" safearray="yes">
2888 <desc></desc>
2889 </param>
2890
2891 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
2892 <desc></desc>
2893 </param>
2894
2895 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
2896 <desc></desc>
2897 </param>
2898
2899 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
2900 <desc></desc>
2901 </param>
2902
2903 </method>
2904
2905 <method name="getValuesByType">
2906 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
2907 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
2908 values.</desc>
2909
2910 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2911 <desc></desc>
2912 </param>
2913
2914 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
2915 <desc></desc>
2916 </param>
2917
2918 <param name="aValues" type="wstring" dir="return" safearray="yes">
2919 <desc></desc>
2920 </param>
2921
2922 </method>
2923
2924 <method name="setFinalValues">
2925 <desc>
2926 This method allows the appliance's user to change the configuration for the virtual
2927 system descriptions. For each array item returned from <link to="#getDescription" />,
2928 you must pass in one boolean value and one configuration value.
2929
2930 Each item in the boolean array determines whether the particular configuration item
2931 should be enabled.
2932 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
2933 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
2934 and SoundCard.
2935
2936 For the "vbox" and "extra configuration" values, if you pass in the same arrays
2937 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
2938 the configuration remains unchanged. Please see the documentation for getDescription()
2939 for valid configuration values for the individual array item types. If the
2940 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
2941 </desc>
2942
2943 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
2944 <desc></desc>
2945 </param>
2946
2947 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
2948 <desc></desc>
2949 </param>
2950
2951 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
2952 <desc></desc>
2953 </param>
2954 </method>
2955
2956 <method name="addDescription">
2957 <desc>
2958 This method adds an additional description entry to the stack of already
2959 available descriptions for this virtual system. This is handy for writing
2960 values which aren't directly supported by VirtualBox. One example would
2961 be the License type of <link to="VirtualSystemDescriptionType" />.
2962 </desc>
2963
2964 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2965 <desc></desc>
2966 </param>
2967
2968 <param name="aVBoxValue" type="wstring" dir="in">
2969 <desc></desc>
2970 </param>
2971
2972 <param name="aExtraConfigValue" type="wstring" dir="in">
2973 <desc></desc>
2974 </param>
2975 </method>
2976 </interface>
2977
2978
2979 <!--
2980 // IMachine
2981 /////////////////////////////////////////////////////////////////////////
2982 -->
2983
2984 <interface
2985 name="IInternalMachineControl" extends="$unknown"
2986 uuid="e2da8b1a-2ad1-490e-b29e-c33a144791b6"
2987 internal="yes"
2988 wsmap="suppress"
2989 >
2990 <method name="updateState">
2991 <desc>
2992 Updates the VM state.
2993 <note>
2994 This operation will also update the settings file with
2995 the correct information about the saved state file
2996 and delete this file from disk when appropriate.
2997 </note>
2998 </desc>
2999 <param name="state" type="MachineState" dir="in"/>
3000 </method>
3001
3002 <method name="getIPCId">
3003 <param name="id" type="wstring" dir="return"/>
3004 </method>
3005
3006 <method name="beginPowerUp">
3007 <desc>
3008 Tells VBoxSVC that <link to="IConsole::powerUp"/> is under ways and
3009 gives it the progress object that should be part of any pending
3010 <link to="IMachine::launchVMProcess"/> operations. The progress
3011 object may be called back to reflect an early cancelation, so some care
3012 have to be taken with respect to any cancelation callbacks. The console
3013 object will call <link to="IInternalMachineControl::endPowerUp"/>
3014 to signal the completion of the progress object.
3015 </desc>
3016 <param name="aProgress" type="IProgress" dir="in" />
3017 </method>
3018
3019 <method name="endPowerUp">
3020 <desc>
3021 Tells VBoxSVC that <link to="IConsole::powerUp"/> has completed.
3022 This method may query status information from the progress object it
3023 received in <link to="IInternalMachineControl::beginPowerUp"/> and copy
3024 it over to any in-progress <link to="IMachine::launchVMProcess"/>
3025 call in order to complete that progress object.
3026 </desc>
3027 <param name="result" type="long" dir="in"/>
3028 </method>
3029
3030 <method name="runUSBDeviceFilters">
3031 <desc>
3032 Asks the server to run USB devices filters of the associated
3033 machine against the given USB device and tell if there is
3034 a match.
3035 <note>
3036 Intended to be used only for remote USB devices. Local
3037 ones don't require to call this method (this is done
3038 implicitly by the Host and USBProxyService).
3039 </note>
3040 </desc>
3041 <param name="device" type="IUSBDevice" dir="in"/>
3042 <param name="matched" type="boolean" dir="out"/>
3043 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3044 </method>
3045
3046 <method name="captureUSBDevice">
3047 <desc>
3048 Requests a capture of the given host USB device.
3049 When the request is completed, the VM process will
3050 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3051 notification.
3052 </desc>
3053 <param name="id" type="uuid" mod="string" dir="in"/>
3054 </method>
3055
3056 <method name="detachUSBDevice">
3057 <desc>
3058 Notification that a VM is going to detach (@a done = @c false) or has
3059 already detached (@a done = @c true) the given USB device.
3060 When the @a done = @c true request is completed, the VM process will
3061 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3062 notification.
3063 <note>
3064 In the @a done = @c true case, the server must run its own filters
3065 and filters of all VMs but this one on the detached device
3066 as if it were just attached to the host computer.
3067 </note>
3068 </desc>
3069 <param name="id" type="uuid" mod="string" dir="in"/>
3070 <param name="done" type="boolean" dir="in"/>
3071 </method>
3072
3073 <method name="autoCaptureUSBDevices">
3074 <desc>
3075 Requests a capture all matching USB devices attached to the host.
3076 When the request is completed, the VM process will
3077 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3078 notification per every captured device.
3079 </desc>
3080 </method>
3081
3082 <method name="detachAllUSBDevices">
3083 <desc>
3084 Notification that a VM that is being powered down. The done
3085 parameter indicates whether which stage of the power down
3086 we're at. When @a done = @c false the VM is announcing its
3087 intentions, while when @a done = @c true the VM is reporting
3088 what it has done.
3089 <note>
3090 In the @a done = @c true case, the server must run its own filters
3091 and filters of all VMs but this one on all detach devices as
3092 if they were just attached to the host computer.
3093 </note>
3094 </desc>
3095 <param name="done" type="boolean" dir="in"/>
3096 </method>
3097
3098 <method name="onSessionEnd">
3099 <desc>
3100 Triggered by the given session object when the session is about
3101 to close normally.
3102 </desc>
3103 <param name="session" type="ISession" dir="in">
3104 <desc>Session that is being closed</desc>
3105 </param>
3106 <param name="progress" type="IProgress" dir="return">
3107 <desc>
3108 Used to wait until the corresponding machine is actually
3109 dissociated from the given session on the server.
3110 Returned only when this session is a direct one.
3111 </desc>
3112 </param>
3113 </method>
3114
3115 <method name="beginSavingState">
3116 <desc>
3117 Called by the VM process to inform the server it wants to
3118 save the current state and stop the VM execution.
3119 </desc>
3120 <param name="progress" type="IProgress" dir="in">
3121 <desc>
3122 Progress object created by the VM process to wait until
3123 the state is saved.
3124 </desc>
3125 </param>
3126 <param name="stateFilePath" type="wstring" dir="out">
3127 <desc>
3128 File path the VM process must save the execution state to.
3129 </desc>
3130 </param>
3131 </method>
3132
3133 <method name="endSavingState">
3134 <desc>
3135 Called by the VM process to inform the server that saving
3136 the state previously requested by #beginSavingState is either
3137 successfully finished or there was a failure.
3138
3139 <result name="VBOX_E_FILE_ERROR">
3140 Settings file not accessible.
3141 </result>
3142 <result name="VBOX_E_XML_ERROR">
3143 Could not parse the settings file.
3144 </result>
3145
3146 </desc>
3147
3148 <param name="success" type="boolean" dir="in">
3149 <desc>@c true to indicate success and @c false otherwise.
3150 </desc>
3151 </param>
3152 </method>
3153
3154 <method name="adoptSavedState">
3155 <desc>
3156 Gets called by IConsole::adoptSavedState.
3157 <result name="VBOX_E_FILE_ERROR">
3158 Invalid saved state file path.
3159 </result>
3160 </desc>
3161 <param name="savedStateFile" type="wstring" dir="in">
3162 <desc>Path to the saved state file to adopt.</desc>
3163 </param>
3164 </method>
3165
3166 <method name="beginTakingSnapshot">
3167 <desc>
3168 Called from the VM process to request from the server to perform the
3169 server-side actions of creating a snapshot (creating differencing images
3170 and the snapshot object).
3171
3172 <result name="VBOX_E_FILE_ERROR">
3173 Settings file not accessible.
3174 </result>
3175 <result name="VBOX_E_XML_ERROR">
3176 Could not parse the settings file.
3177 </result>
3178 </desc>
3179 <param name="initiator" type="IConsole" dir="in">
3180 <desc>The console object that initiated this call.</desc>
3181 </param>
3182 <param name="name" type="wstring" dir="in">
3183 <desc>Snapshot name.</desc>
3184 </param>
3185 <param name="description" type="wstring" dir="in">
3186 <desc>Snapshot description.</desc>
3187 </param>
3188 <param name="consoleProgress" type="IProgress" dir="in">
3189 <desc>
3190 Progress object created by the VM process tracking the
3191 snapshot's progress. This has the following sub-operations:
3192 <ul>
3193 <li>setting up (weight 1);</li>
3194 <li>one for each medium attachment that needs a differencing image (weight 1 each);</li>
3195 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3196 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3197 <li>finishing up (weight 1)</li>
3198 </ul>
3199 </desc>
3200 </param>
3201 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3202 <desc>
3203 Whether this is an online snapshot (i.e. the machine is running).
3204 </desc>
3205 </param>
3206 <param name="stateFilePath" type="wstring" dir="out">
3207 <desc>
3208 File path the VM process must save the execution state to.
3209 </desc>
3210 </param>
3211 </method>
3212
3213 <method name="endTakingSnapshot">
3214 <desc>
3215 Called by the VM process to inform the server that the snapshot
3216 previously requested by #beginTakingSnapshot is either
3217 successfully taken or there was a failure.
3218 </desc>
3219
3220 <param name="success" type="boolean" dir="in">
3221 <desc>@c true to indicate success and @c false otherwise</desc>
3222 </param>
3223 </method>
3224
3225 <method name="deleteSnapshot">
3226 <desc>
3227 Gets called by IConsole::deleteSnapshot.
3228 <result name="VBOX_E_INVALID_OBJECT_STATE">
3229 Snapshot has more than one child snapshot.
3230 </result>
3231 </desc>
3232 <param name="initiator" type="IConsole" dir="in">
3233 <desc>The console object that initiated this call.</desc>
3234 </param>
3235 <param name="id" type="uuid" mod="string" dir="in">
3236 <desc>UUID of the snapshot to delete.</desc>
3237 </param>
3238 <param name="machineState" type="MachineState" dir="out">
3239 <desc>New machine state after this operation is started.</desc>
3240 </param>
3241 <param name="progress" type="IProgress" dir="return">
3242 <desc>Progress object to track the operation completion.</desc>
3243 </param>
3244 </method>
3245
3246 <method name="finishOnlineMergeMedium">
3247 <desc>
3248 Gets called by IConsole::onlineMergeMedium.
3249 </desc>
3250 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
3251 <desc>The medium attachment which needs to be cleaned up.</desc>
3252 </param>
3253 <param name="source" type="IMedium" dir="in">
3254 <desc>Merge source medium.</desc>
3255 </param>
3256 <param name="target" type="IMedium" dir="in">
3257 <desc>Merge target medium.</desc>
3258 </param>
3259 <param name="mergeForward" type="boolean" dir="in">
3260 <desc>Merge direction.</desc>
3261 </param>
3262 <param name="parentForTarget" type="IMedium" dir="in">
3263 <desc>For forward merges: new parent for target medium.</desc>
3264 </param>
3265 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
3266 <desc>For backward merges: list of media which need their parent UUID
3267 updated.</desc>
3268 </param>
3269 </method>
3270
3271 <method name="restoreSnapshot">
3272 <desc>
3273 Gets called by IConsole::RestoreSnapshot.
3274 </desc>
3275 <param name="initiator" type="IConsole" dir="in">
3276 <desc>The console object that initiated this call.</desc>
3277 </param>
3278 <param name="snapshot" type="ISnapshot" dir="in">
3279 <desc>The snapshot to restore the VM state from.</desc>
3280 </param>
3281 <param name="machineState" type="MachineState" dir="out">
3282 <desc>New machine state after this operation is started.</desc>
3283 </param>
3284 <param name="progress" type="IProgress" dir="return">
3285 <desc>Progress object to track the operation completion.</desc>
3286 </param>
3287 </method>
3288
3289 <method name="pullGuestProperties">
3290 <desc>
3291 Get the list of the guest properties matching a set of patterns along
3292 with their values, time stamps and flags and give responsibility for
3293 managing properties to the console.
3294 </desc>
3295 <param name="name" type="wstring" dir="out" safearray="yes">
3296 <desc>
3297 The names of the properties returned.
3298 </desc>
3299 </param>
3300 <param name="value" type="wstring" dir="out" safearray="yes">
3301 <desc>
3302 The values of the properties returned. The array entries match the
3303 corresponding entries in the @a name array.
3304 </desc>
3305 </param>
3306 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3307 <desc>
3308 The time stamps of the properties returned. The array entries match
3309 the corresponding entries in the @a name array.
3310 </desc>
3311 </param>
3312 <param name="flags" type="wstring" dir="out" safearray="yes">
3313 <desc>
3314 The flags of the properties returned. The array entries match the
3315 corresponding entries in the @a name array.
3316 </desc>
3317 </param>
3318 </method>
3319
3320 <method name="pushGuestProperty">
3321 <desc>
3322 Update a single guest property in IMachine.
3323 </desc>
3324 <param name="name" type="wstring" dir="in">
3325 <desc>
3326 The name of the property to be updated.
3327 </desc>
3328 </param>
3329 <param name="value" type="wstring" dir="in">
3330 <desc>
3331 The value of the property.
3332 </desc>
3333 </param>
3334 <param name="timestamp" type="unsigned long long" dir="in">
3335 <desc>
3336 The timestamp of the property.
3337 </desc>
3338 </param>
3339 <param name="flags" type="wstring" dir="in">
3340 <desc>
3341 The flags of the property.
3342 </desc>
3343 </param>
3344 </method>
3345
3346 <method name="lockMedia">
3347 <desc>
3348 Locks all media attached to the machine for writing and parents of
3349 attached differencing media (if any) for reading. This operation is
3350 atomic so that if it fails no media is actually locked.
3351
3352 This method is intended to be called when the machine is in Starting or
3353 Restoring state. The locked media will be automatically unlocked when
3354 the machine is powered off or crashed.
3355 </desc>
3356 </method>
3357 <method name="unlockMedia">
3358 <desc>
3359 Unlocks all media previously locked using
3360 <link to="IInternalMachineControl::lockMedia"/>.
3361
3362 This method is intended to be used with teleportation so that it is
3363 possible to teleport between processes on the same machine.
3364 </desc>
3365 </method>
3366 </interface>
3367
3368 <interface
3369 name="IBIOSSettings" extends="$unknown"
3370 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3371 wsmap="managed"
3372 >
3373 <desc>
3374 The IBIOSSettings interface represents BIOS settings of the virtual
3375 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3376 </desc>
3377 <attribute name="logoFadeIn" type="boolean">
3378 <desc>Fade in flag for BIOS logo animation.</desc>
3379 </attribute>
3380
3381 <attribute name="logoFadeOut" type="boolean">
3382 <desc>Fade out flag for BIOS logo animation.</desc>
3383 </attribute>
3384
3385 <attribute name="logoDisplayTime" type="unsigned long">
3386 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3387 </attribute>
3388
3389 <attribute name="logoImagePath" type="wstring">
3390 <desc>
3391 Local file system path for external BIOS splash image. Empty string
3392 means the default image is shown on boot.
3393 </desc>
3394 </attribute>
3395
3396 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3397 <desc>Mode of the BIOS boot device menu.</desc>
3398 </attribute>
3399
3400 <attribute name="ACPIEnabled" type="boolean">
3401 <desc>ACPI support flag.</desc>
3402 </attribute>
3403
3404 <attribute name="IOAPICEnabled" type="boolean">
3405 <desc>
3406 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3407 and support IRQs above 15.
3408 </desc>
3409 </attribute>
3410
3411 <attribute name="timeOffset" type="long long">
3412 <desc>
3413 Offset in milliseconds from the host system time. This allows for
3414 guests running with a different system date/time than the host.
3415 It is equivalent to setting the system date/time in the BIOS except
3416 it is not an absolute value but a relative one. Guest Additions
3417 time synchronization honors this offset.
3418 </desc>
3419 </attribute>
3420
3421 <attribute name="PXEDebugEnabled" type="boolean">
3422 <desc>
3423 PXE debug logging flag. If set, VirtualBox will write extensive
3424 PXE trace information to the release log.
3425 </desc>
3426 </attribute>
3427
3428 </interface>
3429
3430 <enum name="CleanupMode"
3431 uuid="67897c50-7cca-47a9-83f6-ce8fd8eb5441">
3432 <desc>Cleanup mode, used with <link to="IMachine::unregister" />.
3433 </desc>
3434 <const name="UnregisterOnly" value="1">
3435 <desc>Unregister only the machine, but neither delete snapshots nor detach media.</desc>
3436 </const>
3437 <const name="DetachAllReturnNone" value="2">
3438 <desc>Delete all snapshots and detach all media but return none; this will keep all media registered.</desc>
3439 </const>
3440 <const name="DetachAllReturnHardDisksOnly" value="3">
3441 <desc>Delete all snapshots, detach all media and return hard disks for closing, but not removeable media.</desc>
3442 </const>
3443 <const name="Full" value="4">
3444 <desc>Delete all snapshots, detach all media and return all media for closing.</desc>
3445 </const>
3446 </enum>
3447
3448 <interface
3449 name="IMachine" extends="$unknown"
3450 uuid="082c38ff-d9b3-4b12-b540-01516a931f17"
3451 wsmap="managed"
3452 >
3453 <desc>
3454 The IMachine interface represents a virtual machine, or guest, created
3455 in VirtualBox.
3456
3457 This interface is used in two contexts. First of all, a collection of
3458 objects implementing this interface is stored in the
3459 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
3460 machines that are currently registered with this VirtualBox
3461 installation. Also, once a session has been opened for the given virtual
3462 machine (e.g. the virtual machine is running), the machine object
3463 associated with the open session can be queried from the session object;
3464 see <link to="ISession"/> for details.
3465
3466 The main role of this interface is to expose the settings of the virtual
3467 machine and provide methods to change various aspects of the virtual
3468 machine's configuration. For machine objects stored in the
3469 <link to="IVirtualBox::machines"/> collection, all attributes are
3470 read-only unless explicitly stated otherwise in individual attribute
3471 and method descriptions.
3472
3473 In order to change a machine setting, a session for this machine must be
3474 opened using one of the <link to="IMachine::lockMachine" /> or
3475 <link to="IMachine::launchVMProcess"/> methods. After the
3476 machine has been successfully locked for a session, a mutable machine object
3477 needs to be queried from the session object and then the desired settings
3478 changes can be applied to the returned object using IMachine attributes and
3479 methods. See the <link to="ISession"/> interface description for more
3480 information about sessions.
3481
3482 Note that IMachine does not provide methods to control virtual machine
3483 execution (such as start the machine, or power it down) -- these methods
3484 are grouped in a separate interface called <link to="IConsole" />.
3485
3486 <see>ISession, IConsole</see>
3487 </desc>
3488
3489 <attribute name="parent" type="IVirtualBox" readonly="yes">
3490 <desc>Associated parent object.</desc>
3491 </attribute>
3492
3493 <attribute name="accessible" type="boolean" readonly="yes">
3494 <desc>
3495 Whether this virtual machine is currently accessible or not.
3496
3497 A machine is always deemed accessible unless it is registered <i>and</i>
3498 its settings file cannot be read or parsed (either because the file itself
3499 is unavailable or has invalid XML contents).
3500
3501 Every time this property is read, the accessibility state of
3502 this machine is re-evaluated. If the returned value is @c false,
3503 the <link to="#accessError"/> property may be used to get the
3504 detailed error information describing the reason of
3505 inaccessibility, including XML error messages.
3506
3507 When the machine is inaccessible, only the following properties
3508 can be used on it:
3509 <ul>
3510 <li><link to="#parent"/></li>
3511 <li><link to="#id"/></li>
3512 <li><link to="#settingsFilePath"/></li>
3513 <li><link to="#accessible"/></li>
3514 <li><link to="#accessError"/></li>
3515 </ul>
3516
3517 An attempt to access any other property or method will return
3518 an error.
3519
3520 The only possible action you can perform on an inaccessible
3521 machine is to unregister it using the
3522 <link to="IMachine::unregister"/> call (or, to check
3523 for the accessibility state once more by querying this
3524 property).
3525
3526 <note>
3527 In the current implementation, once this property returns
3528 @c true, the machine will never become inaccessible
3529 later, even if its settings file cannot be successfully
3530 read/written any more (at least, until the VirtualBox
3531 server is restarted). This limitation may be removed in
3532 future releases.
3533 </note>
3534 </desc>
3535 </attribute>
3536
3537 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3538 <desc>
3539 Error information describing the reason of machine
3540 inaccessibility.
3541
3542 Reading this property is only valid after the last call to
3543 <link to="#accessible"/> returned @c false (i.e. the
3544 machine is currently unaccessible). Otherwise, a @c null
3545 IVirtualBoxErrorInfo object will be returned.
3546 </desc>
3547 </attribute>
3548
3549 <attribute name="name" type="wstring">
3550 <desc>
3551 Name of the virtual machine.
3552
3553 Besides being used for human-readable identification purposes
3554 everywhere in VirtualBox, the virtual machine name is also used
3555 as a name of the machine's settings file and as a name of the
3556 subdirectory this settings file resides in. Thus, every time you
3557 change the value of this property, the settings file will be
3558 renamed once you call <link to="#saveSettings"/> to confirm the
3559 change. The containing subdirectory will be also renamed, but
3560 only if it has exactly the same name as the settings file
3561 itself prior to changing this property (for backward compatibility
3562 with previous API releases). The above implies the following
3563 limitations:
3564 <ul>
3565 <li>The machine name cannot be empty.</li>
3566 <li>The machine name can contain only characters that are valid
3567 file name characters according to the rules of the file
3568 system used to store VirtualBox configuration.</li>
3569 <li>You cannot have two or more machines with the same name
3570 if they use the same subdirectory for storing the machine
3571 settings files.</li>
3572 <li>You cannot change the name of the machine if it is running,
3573 or if any file in the directory containing the settings file
3574 is being used by another running machine or by any other
3575 process in the host operating system at a time when
3576 <link to="#saveSettings"/> is called.
3577 </li>
3578 </ul>
3579 If any of the above limitations are hit, <link to="#saveSettings"/>
3580 will return an appropriate error message explaining the exact
3581 reason and the changes you made to this machine will not be
3582 saved.
3583 <note>
3584 For "legacy" machines created using the
3585 <link to="IVirtualBox::createLegacyMachine"/> call,
3586 the above naming limitations do not apply because the
3587 machine name does not affect the settings file name.
3588 The settings file name remains the same as it was specified
3589 during machine creation and never changes.
3590 </note>
3591 </desc>
3592 </attribute>
3593
3594 <attribute name="description" type="wstring">
3595 <desc>
3596 Description of the virtual machine.
3597
3598 The description attribute can contain any text and is
3599 typically used to describe the hardware and software
3600 configuration of the virtual machine in detail (i.e. network
3601 settings, versions of the installed software and so on).
3602 </desc>
3603 </attribute>
3604
3605 <attribute name="id" type="uuid" mod="string" readonly="yes">
3606 <desc>UUID of the virtual machine.</desc>
3607 </attribute>
3608
3609 <attribute name="OSTypeId" type="wstring">
3610 <desc>
3611 User-defined identifier of the Guest OS type.
3612 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
3613 an IGuestOSType object representing details about the given
3614 Guest OS type.
3615 <note>
3616 This value may differ from the value returned by
3617 <link to="IGuest::OSTypeId"/> if Guest Additions are
3618 installed to the guest OS.
3619 </note>
3620 </desc>
3621 </attribute>
3622
3623 <attribute name="HardwareVersion" type="wstring">
3624 <desc>Hardware version identifier. Internal use only for now.</desc>
3625 </attribute>
3626
3627 <attribute name="hardwareUUID" type="uuid" mod="string">
3628 <desc>
3629 The UUID presented to the guest via memory tables, hardware and guest
3630 properties. For most VMs this is the same as the @a id, but for VMs
3631 which have been cloned or teleported it may be the same as the source
3632 VM. This latter is because the guest shouldn't notice that it was
3633 cloned or teleported.
3634 </desc>
3635 </attribute>
3636
3637 <attribute name="CPUCount" type="unsigned long">
3638 <desc>Number of virtual CPUs in the VM.</desc>
3639 </attribute>
3640
3641 <attribute name="CPUHotPlugEnabled" type="boolean">
3642 <desc>
3643 This setting determines whether VirtualBox allows CPU
3644 hotplugging for this machine.</desc>
3645 </attribute>
3646
3647 <attribute name="CPUPriority" type="unsigned long">
3648 <desc>
3649 Priority of the virtual CPUs. Means to limit the number of CPU cycles
3650 a guest can use. The unit is percentage of host CPU cycles per second.
3651 The valid range is 1 - 100. 100 (the default) implies no limit.
3652 </desc>
3653 </attribute>
3654
3655 <attribute name="memorySize" type="unsigned long">
3656 <desc>System memory size in megabytes.</desc>
3657 </attribute>
3658
3659 <attribute name="memoryBalloonSize" type="unsigned long">
3660 <desc>Memory balloon size in megabytes.</desc>
3661 </attribute>
3662
3663 <attribute name="PageFusionEnabled" type="boolean">
3664 <desc>
3665 This setting determines whether VirtualBox allows page
3666 fusion for this machine (64 bits host only).
3667 </desc>
3668 </attribute>
3669
3670 <attribute name="VRAMSize" type="unsigned long">
3671 <desc>Video memory size in megabytes.</desc>
3672 </attribute>
3673
3674 <attribute name="accelerate3DEnabled" type="boolean" default="false">
3675 <desc>
3676 This setting determines whether VirtualBox allows this machine to make
3677 use of the 3D graphics support available on the host.</desc>
3678 </attribute>
3679
3680 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
3681 <desc>
3682 This setting determines whether VirtualBox allows this machine to make
3683 use of the 2D video acceleration support available on the host.</desc>
3684 </attribute>
3685
3686 <attribute name="monitorCount" type="unsigned long">
3687 <desc>
3688 Number of virtual monitors.
3689 <note>
3690 Only effective on Windows XP and later guests with
3691 Guest Additions installed.
3692 </note>
3693 </desc>
3694 </attribute>
3695
3696 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
3697 <desc>Object containing all BIOS settings.</desc>
3698 </attribute>
3699
3700 <attribute name="firmwareType" type="FirmwareType">
3701 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
3702 bootstrap in this VM.</desc>
3703 </attribute>
3704
3705 <attribute name="pointingHidType" type="PointingHidType">
3706 <desc>Type of pointing HID (such as mouse or tablet) used in this VM.
3707 The default is typically "PS2Mouse" but can vary depending on the
3708 requirements of the guest operating system.</desc>
3709 </attribute>
3710
3711 <attribute name="keyboardHidType" type="KeyboardHidType">
3712 <desc>Type of keyboard HID used in this VM.
3713 The default is typically "PS2Keyboard" but can vary depending on the
3714 requirements of the guest operating system.</desc>
3715 </attribute>
3716
3717 <attribute name="hpetEnabled" type="boolean">
3718 <desc>This attribute controls if High Precision Event Timer (HPET) is
3719 enabled in this VM. Use this property if you want to provide guests
3720 with additional time source, or if guest requires HPET to function correctly.
3721 Default is false.</desc>
3722 </attribute>
3723
3724 <attribute name="snapshotFolder" type="wstring">
3725 <desc>
3726 Full path to the directory used to store snapshot data
3727 (differencing media and saved state files) of this machine.
3728
3729 The initial value of this property is
3730 <tt>&lt;</tt><link to="#settingsFilePath">
3731 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3732 <link to="#id">machine_uuid</link>
3733 <tt>&gt;</tt>.
3734
3735 Currently, it is an error to try to change this property on
3736 a machine that has snapshots (because this would require to
3737 move possibly large files to a different location).
3738 A separate method will be available for this purpose later.
3739
3740 <note>
3741 Setting this property to @c null or to an empty string will restore
3742 the initial value.
3743 </note>
3744 <note>
3745 When setting this property, the specified path can be
3746 absolute (full path) or relative to the directory where the
3747 <link to="#settingsFilePath">machine settings file</link>
3748 is located. When reading this property, a full path is
3749 always returned.
3750 </note>
3751 <note>
3752 The specified path may not exist, it will be created
3753 when necessary.
3754 </note>
3755 </desc>
3756 </attribute>
3757
3758 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
3759 <desc>VRDP server object.</desc>
3760 </attribute>
3761
3762 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
3763 <desc>Array of media attached to this machine.</desc>
3764 </attribute>
3765
3766 <attribute name="USBController" type="IUSBController" readonly="yes">
3767 <desc>
3768 Associated USB controller object.
3769
3770 <note>
3771 If USB functionality is not available in the given edition of
3772 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3773 </note>
3774 </desc>
3775 </attribute>
3776
3777 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3778 <desc>Associated audio adapter, always present.</desc>
3779 </attribute>
3780
3781 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
3782 <desc>Array of storage controllers attached to this machine.</desc>
3783 </attribute>
3784
3785 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3786 <desc>
3787 Full name of the file containing machine settings data.
3788 </desc>
3789 </attribute>
3790
3791 <attribute name="settingsModified" type="boolean" readonly="yes">
3792 <desc>
3793 Whether the settings of this machine have been modified
3794 (but neither yet saved nor discarded).
3795 <note>
3796 Reading this property is only valid on instances returned
3797 by <link to="ISession::machine"/> and on new machines
3798 created by <link to="IVirtualBox::createMachine"/> or opened
3799 by <link to="IVirtualBox::openMachine"/> but not
3800 yet registered, or on unregistered machines after calling
3801 <link to="IMachine::unregister"/>. For all other
3802 cases, the settings can never be modified.
3803 </note>
3804 <note>
3805 For newly created unregistered machines, the value of this
3806 property is always @c true until <link to="#saveSettings"/>
3807 is called (no matter if any machine settings have been
3808 changed after the creation or not). For opened machines
3809 the value is set to @c false (and then follows to normal rules).
3810 </note>
3811 </desc>
3812 </attribute>
3813
3814 <attribute name="sessionState" type="SessionState" readonly="yes">
3815 <desc>Current session state for this machine.</desc>
3816 </attribute>
3817
3818 <attribute name="sessionType" type="wstring" readonly="yes">
3819 <desc>
3820 Type of the session. If <link to="#sessionState"/> is
3821 Spawning or Locked, this attribute contains the
3822 same value as passed to the
3823 <link to="IMachine::launchVMProcess"/> method in the
3824 @a type parameter. If the session was used with
3825 <link to="IMachine::lockMachine" />, or if
3826 <link to="#sessionState"/> is SessionClosed, the value of this
3827 attribute is an empty string.
3828 </desc>
3829 </attribute>
3830
3831 <attribute name="sessionPid" type="unsigned long" readonly="yes">
3832 <desc>
3833 Identifier of the session process. This attribute contains the
3834 platform-dependent identifier of the process whose session was
3835 used with <link to="IMachine::lockMachine" /> call. The returned
3836 value is only valid if <link to="#sessionState"/> is Locked or
3837 Unlocking by the time this property is read.
3838 </desc>
3839 </attribute>
3840
3841 <attribute name="state" type="MachineState" readonly="yes">
3842 <desc>Current execution state of this machine.</desc>
3843 </attribute>
3844
3845 <attribute name="lastStateChange" type="long long" readonly="yes">
3846 <desc>
3847 Time stamp of the last execution state change,
3848 in milliseconds since 1970-01-01 UTC.
3849 </desc>
3850 </attribute>
3851
3852 <attribute name="stateFilePath" type="wstring" readonly="yes">
3853 <desc>
3854 Full path to the file that stores the execution state of
3855 the machine when it is in the <link to="MachineState_Saved"/> state.
3856 <note>
3857 When the machine is not in the Saved state, this attribute is
3858 an empty string.
3859 </note>
3860 </desc>
3861 </attribute>
3862
3863 <attribute name="logFolder" type="wstring" readonly="yes">
3864 <desc>
3865 Full path to the folder that stores a set of rotated log files
3866 recorded during machine execution. The most recent log file is
3867 named <tt>VBox.log</tt>, the previous log file is
3868 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
3869 in the current version).
3870 </desc>
3871 </attribute>
3872
3873 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
3874 <desc>
3875 Current snapshot of this machine. This is @c null if the machine
3876 currently has no snapshots. If it is not @c null, then it was
3877 set by one of <link to="IConsole::takeSnapshot" />,
3878 <link to="IConsole::deleteSnapshot" />
3879 or <link to="IConsole::restoreSnapshot" />, depending on which
3880 was called last. See <link to="ISnapshot"/> for details.
3881 </desc>
3882 </attribute>
3883
3884 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
3885 <desc>
3886 Number of snapshots taken on this machine. Zero means the
3887 machine doesn't have any snapshots.
3888 </desc>
3889 </attribute>
3890
3891 <attribute name="currentStateModified" type="boolean" readonly="yes">
3892 <desc>
3893 Returns @c true if the current state of the machine is not
3894 identical to the state stored in the current snapshot.
3895
3896 The current state is identical to the current snapshot only
3897 directly after one of the following calls are made:
3898
3899 <ul>
3900 <li><link to="IConsole::restoreSnapshot"/>
3901 </li>
3902 <li><link to="IConsole::takeSnapshot"/> (issued on a
3903 "powered off" or "saved" machine, for which
3904 <link to="#settingsModified"/> returns @c false)
3905 </li>
3906 <li><link to="IMachine::setCurrentSnapshot"/>
3907 </li>
3908 </ul>
3909
3910 The current state remains identical until one of the following
3911 happens:
3912 <ul>
3913 <li>settings of the machine are changed</li>
3914 <li>the saved state is deleted</li>
3915 <li>the current snapshot is deleted</li>
3916 <li>an attempt to execute the machine is made</li>
3917 </ul>
3918
3919 <note>
3920 For machines that don't have snapshots, this property is
3921 always @c false.
3922 </note>
3923 </desc>
3924 </attribute>
3925
3926 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
3927 <desc>
3928 Collection of shared folders for this machine (permanent shared
3929 folders). These folders are shared automatically at machine startup
3930 and available only to the guest OS installed within this machine.
3931
3932 New shared folders are added to the collection using
3933 <link to="#createSharedFolder"/>. Existing shared folders can be
3934 removed using <link to="#removeSharedFolder"/>.
3935 </desc>
3936 </attribute>
3937
3938 <attribute name="clipboardMode" type="ClipboardMode">
3939 <desc>
3940 Synchronization mode between the host OS clipboard
3941 and the guest OS clipboard.
3942 </desc>
3943 </attribute>
3944
3945 <attribute name="guestPropertyNotificationPatterns" type="wstring">
3946 <desc>
3947 A comma-separated list of simple glob patterns. Changes to guest
3948 properties whose name matches one of the patterns will generate an
3949 <link to="IGuestPropertyChangedEvent"/> signal.
3950 </desc>
3951 </attribute>
3952
3953 <attribute name="teleporterEnabled" type="boolean">
3954 <desc>
3955 When set to @a true, the virtual machine becomes a target teleporter
3956 the next time it is powered on. This can only set to @a true when the
3957 VM is in the @a PoweredOff or @a Aborted state.
3958
3959 <!-- This property is automatically set to @a false when the VM is powered
3960 on. (bird: This doesn't work yet ) -->
3961 </desc>
3962 </attribute>
3963
3964 <attribute name="teleporterPort" type="unsigned long">
3965 <desc>
3966 The TCP port the target teleporter will listen for incoming
3967 teleportations on.
3968
3969 0 means the port is automatically selected upon power on. The actual
3970 value can be read from this property while the machine is waiting for
3971 incoming teleportations.
3972 </desc>
3973 </attribute>
3974
3975 <attribute name="teleporterAddress" type="wstring">
3976 <desc>
3977 The address the target teleporter will listen on. If set to an empty
3978 string, it will listen on all addresses.
3979 </desc>
3980 </attribute>
3981
3982 <attribute name="teleporterPassword" type="wstring">
3983 <desc>
3984 The password the to check for on the target teleporter. This is just a
3985 very basic measure to prevent simple hacks and operators accidentally
3986 beaming a virtual machine to the wrong place.
3987 </desc>
3988 </attribute>
3989
3990 <attribute name="RTCUseUTC" type="boolean">
3991 <desc>
3992 When set to @a true, the RTC device of the virtual machine will run
3993 in UTC time, otherwise in local time. Especially Unix guests prefer
3994 the time in UTC.
3995 </desc>
3996 </attribute>
3997
3998 <attribute name="ioCacheEnabled" type="boolean">
3999 <desc>
4000 When set to @a true, the builtin I/O cache of the virtual machine
4001 will be enabled.
4002 </desc>
4003 </attribute>
4004
4005 <attribute name="ioCacheSize" type="unsigned long">
4006 <desc>
4007 Maximum size of the I/O cache in MB.
4008 </desc>
4009 </attribute>
4010
4011 <method name="lockMachine">
4012 <desc>
4013 Locks the machine for the given session to enable the caller
4014 to make changes to the machine or start the VM or control
4015 VM execution.
4016
4017 There are two ways to lock a machine for such uses:
4018
4019 <ul>
4020 <li>If you want to make changes to the machine settings,
4021 you must obtain an exclusive write lock on the machine
4022 by setting @a lockType to @c Write.
4023
4024 This will only succeed if no other process has locked
4025 the machine to prevent conflicting changes. Only after
4026 an exclusive write lock has been obtained using this method, one
4027 can change all VM settings or execute the VM in the process
4028 space of the session object. (Note that the latter is only of
4029 interest if you actually want to write a new front-end for
4030 virtual machines; but this API gets called internally by
4031 the existing front-ends such as VBoxHeadless and the VirtualBox
4032 GUI to acquire a write lock on the machine that they are running.)
4033
4034 On success, write-locking the machine for a session creates
4035 a second copy of the IMachine object. It is this second object
4036 upon which changes can be made; in VirtualBox terminology, the
4037 second copy is "mutable". It is only this second, mutable machine
4038 object upon which you can call methods that change the
4039 machine state. After having called this method, you can
4040 obtain this second, mutable machine object using the
4041 <link to="ISession::machine" /> attribute.
4042 </li>
4043 <li>If you only want to check the machine state or control
4044 machine execution without actually changing machine
4045 settings (e.g. to get access to VM statistics or take
4046 a snapshot or save the machine state), then set the
4047 @a lockType argument to @c Shared.
4048
4049 If no other session has obtained a lock, you will obtain an
4050 exclusive write lock as described above. However, if another
4051 session has already obtained such a lock, then a link to that
4052 existing session will be established which allows you
4053 to control that existing session.
4054
4055 To find out which type of lock was obtained, you can
4056 inspect <link to="ISession::type" />, which will have been
4057 set to either @c WriteLock or @c Shared.
4058 </li>
4059 </ul>
4060
4061 In either case, you can get access to the <link to="IConsole" />
4062 object which controls VM execution.
4063
4064 Also in all of the above cases, one must always call
4065 <link to="ISession::unlockMachine" /> to release the lock on the machine, or
4066 the machine's state will eventually be set to "Aborted".
4067
4068 To change settings on a machine, the following sequence is typically
4069 performed:
4070
4071 <ol>
4072 <li>Call this method to obtain an exclusive write lock for the current session.</li>
4073
4074 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
4075
4076 <li>Change the settings of the machine by invoking IMachine methods.</li>
4077
4078 <li>Call <link to="IMachine::saveSettings" />.</li>
4079
4080 <li>Release the write lock by calling <link to="ISession::unlockMachine"/>.</li>
4081 </ol>
4082
4083 <result name="E_UNEXPECTED">
4084 Virtual machine not registered.
4085 </result>
4086 <result name="E_ACCESSDENIED">
4087 Process not started by OpenRemoteSession.
4088 </result>
4089 <result name="VBOX_E_INVALID_OBJECT_STATE">
4090 Session already open or being opened.
4091 </result>
4092 <result name="VBOX_E_VM_ERROR">
4093 Failed to assign machine to session.
4094 </result>
4095 </desc>
4096 <param name="session" type="ISession" dir="in">
4097 <desc>
4098 Session object for which the machine will be locked.
4099 </desc>
4100 </param>
4101 <param name="lockType" type="LockType" dir="in">
4102 <desc>
4103 If set to @c Write, then attempt to acquire an exclusive write lock or fail.
4104 If set to @c Shared, then either acquire an exclusive write lock or establish
4105 a link to an existing session.
4106 </desc>
4107 </param>
4108 </method>
4109
4110 <method name="launchVMProcess">
4111 <desc>
4112 Spawns a new process that will execute the virtual machine and obtains a shared
4113 lock on the machine for the calling session.
4114
4115 If launching the VM succeeds, the new VM process will create its own session
4116 and write-lock the machine for it, preventing conflicting changes from other
4117 processes. If the machine is already locked (because it is already running or
4118 because another session has a write lock), launching the VM process will therefore
4119 fail. Reversely, future attempts to obtain a write lock will also fail while the
4120 machine is running.
4121
4122 The caller's session object remains separate from the session opened by the new
4123 VM process. It receives its own <link to="IConsole" /> object which can be used
4124 to control machine execution, but it cannot be used to change all VM settings
4125 which would be available after a <link to="#lockMachine" /> call.
4126
4127 The caller must eventually release the session's shared lock by calling
4128 <link to="ISession::unlockMachine" /> on the local session object once this call
4129 has returned. However, the session's state (see <link to="ISession::state" />)
4130 will not return to "Unlocked" until the remote session has also unlocked
4131 the machine (i.e. the machine has stopped running).
4132
4133 Lauching a VM process can take some time (a new VM is started in a new process,
4134 for which memory and other resources need to be set up). Because of this,
4135 an <link to="IProgress" /> object is returned to allow the caller to wait
4136 for this asynchronous operation to be completed. Until then, the caller's
4137 session object remains in the "Unlocked" state, and its <link to="ISession::machine" />
4138 and <link to="ISession::console" /> attributes cannot be accessed.
4139 It is recommended to use <link to="IProgress::waitForCompletion" /> or
4140 similar calls to wait for completion. Completion is signalled when the VM
4141 is powered on. If launching the VM fails, error messages can be queried
4142 via the progress object, if available.
4143
4144 The progress object will have at least 2 sub-operations. The first
4145 operation covers the period up to the new VM process calls powerUp.
4146 The subsequent operations mirror the <link to="IConsole::powerUp"/>
4147 progress object. Because <link to="IConsole::powerUp"/> may require
4148 some extra sub-operations, the <link to="IProgress::operationCount"/>
4149 may change at the completion of operation.
4150
4151 For details on the teleportation progress operation, see
4152 <link to="IConsole::powerUp"/>.
4153
4154 The @a environment argument is a string containing definitions of
4155 environment variables in the following format:
4156 @code
4157 NAME[=VALUE]\n
4158 NAME[=VALUE]\n
4159 ...
4160 @endcode
4161 where <tt>\\n</tt> is the new line character. These environment
4162 variables will be appended to the environment of the VirtualBox server
4163 process. If an environment variable exists both in the server process
4164 and in this list, the value from this list takes precedence over the
4165 server's variable. If the value of the environment variable is
4166 omitted, this variable will be removed from the resulting environment.
4167 If the environment string is @c null or empty, the server environment
4168 is inherited by the started process as is.
4169
4170 <result name="E_UNEXPECTED">
4171 Virtual machine not registered.
4172 </result>
4173 <result name="E_INVALIDARG">
4174 Invalid session type @a type.
4175 </result>
4176 <result name="VBOX_E_OBJECT_NOT_FOUND">
4177 No machine matching @a machineId found.
4178 </result>
4179 <result name="VBOX_E_INVALID_OBJECT_STATE">
4180 Session already open or being opened.
4181 </result>
4182 <result name="VBOX_E_IPRT_ERROR">
4183 Launching process for machine failed.
4184 </result>
4185 <result name="VBOX_E_VM_ERROR">
4186 Failed to assign machine to session.
4187 </result>
4188 </desc>
4189 <param name="session" type="ISession" dir="in">
4190 <desc>
4191 Client session object to which the VM process will be connected (this
4192 must be in "Unlocked" state).
4193 </desc>
4194 </param>
4195 <param name="type" type="wstring" dir="in">
4196 <desc>
4197 Front-end to use for the new VM process. The following are currently supported:
4198 <ul>
4199 <li><tt>"gui"</tt>: VirtualBox Qt GUI front-end</li>
4200 <li><tt>"vrdp"</tt>: VBoxHeadless (VRDP Server) front-end</li>
4201 <li><tt>"sdl"</tt>: VirtualBox SDL front-end</li>
4202 </ul>
4203 </desc>
4204 </param>
4205 <param name="environment" type="wstring" dir="in">
4206 <desc>
4207 Environment to pass to the VM process.
4208 </desc>
4209 </param>
4210 <param name="progress" type="IProgress" dir="return">
4211 <desc>Progress object to track the operation completion.</desc>
4212 </param>
4213 </method>
4214
4215 <method name="setBootOrder">
4216 <desc>
4217 Puts the given device to the specified position in
4218 the boot order.
4219
4220 To indicate that no device is associated with the given position,
4221 <link to="DeviceType_Null"/> should be used.
4222
4223 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4224
4225 <result name="E_INVALIDARG">
4226 Boot @a position out of range.
4227 </result>
4228 <result name="E_NOTIMPL">
4229 Booting from USB @a device currently not supported.
4230 </result>
4231
4232 </desc>
4233 <param name="position" type="unsigned long" dir="in">
4234 <desc>
4235 Position in the boot order (@c 1 to the total number of
4236 devices the machine can boot from, as returned by
4237 <link to="ISystemProperties::maxBootPosition"/>).
4238 </desc>
4239 </param>
4240 <param name="device" type="DeviceType" dir="in">
4241 <desc>
4242 The type of the device used to boot at the given position.
4243 </desc>
4244 </param>
4245 </method>
4246
4247 <method name="getBootOrder" const="yes">
4248 <desc>
4249 Returns the device type that occupies the specified
4250 position in the boot order.
4251
4252 @todo [remove?]
4253 If the machine can have more than one device of the returned type
4254 (such as hard disks), then a separate method should be used to
4255 retrieve the individual device that occupies the given position.
4256
4257 If here are no devices at the given position, then
4258 <link to="DeviceType_Null"/> is returned.
4259
4260 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4261
4262 <result name="E_INVALIDARG">
4263 Boot @a position out of range.
4264 </result>
4265
4266 </desc>
4267 <param name="position" type="unsigned long" dir="in">
4268 <desc>
4269 Position in the boot order (@c 1 to the total number of
4270 devices the machine can boot from, as returned by
4271 <link to="ISystemProperties::maxBootPosition"/>).
4272 </desc>
4273 </param>
4274 <param name="device" type="DeviceType" dir="return">
4275 <desc>
4276 Device at the given position.
4277 </desc>
4278 </param>
4279 </method>
4280
4281 <method name="attachDevice">
4282 <desc>
4283 Attaches a device and optionally mounts a medium to the given storage
4284 controller (<link to="IStorageController" />, identified by @a name),
4285 at the indicated port and device.
4286
4287 This method is intended for managing storage devices in general (it works
4288 for both fixed and removable media) while a machine is powered off.
4289 In a VM's default configuration of virtual machines, the secondary
4290 master of the IDE controller is used for a CD/DVD drive.
4291
4292 For fixed media such as hard disks, the given medium identifier cannot
4293 be a zero UUID.
4294
4295 For storage devices supporting removable media (such as DVDs and floppies),
4296 you can also use <link to="IMachine::mountMedium"/> for changing the media
4297 while the machine is running. For those devices, you can also specify
4298 a zero UUID to indicate an empty drive or the UUID of a host drive;
4299 see <link to="IMediumAttachment" /> for details.
4300
4301 After calling this returns successfully, a new instance of
4302 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4303 attachments (see <link to="IMachine::mediumAttachments"/>).
4304
4305 The specified device slot must not have a device attached to it,
4306 or this method will fail.
4307
4308 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4309 information about attaching media.
4310
4311 <note>
4312 You cannot attach a device to a running machine. Also, you cannot
4313 attach a device to a newly created machine until this machine's
4314 settings are saved to disk using <link to="#saveSettings"/>.
4315 </note>
4316 <note>
4317 If the medium is being attached indirectly, a new differencing medium
4318 will implicitly be created for it and attached instead. If the
4319 changes made to the machine settings (including this indirect
4320 attachment) are later cancelled using <link to="#discardSettings"/>,
4321 this implicitly created differencing medium will implicitly
4322 be deleted.
4323 </note>
4324
4325 <result name="E_INVALIDARG">
4326 SATA device, SATA port, IDE port or IDE slot out of range.
4327 </result>
4328 <result name="VBOX_E_INVALID_OBJECT_STATE">
4329 Machine must be registered before media can be attached.
4330 </result>
4331 <result name="VBOX_E_INVALID_VM_STATE">
4332 Invalid machine state.
4333 </result>
4334 <result name="VBOX_E_OBJECT_IN_USE">
4335 A medium is already attached to this or another virtual machine.
4336 </result>
4337
4338 </desc>
4339 <param name="name" type="wstring" dir="in">
4340 <desc>Name of the storage controller to attach the device to.</desc>
4341 </param>
4342 <param name="controllerPort" type="long" dir="in">
4343 <desc>Port to attach the device to. For an IDE controller, 0 specifies
4344 the primary controller and 1 specifies the secondary controller.
4345 For a SCSI controller, this must range from 0 to 15; for a SATA controller,
4346 from 0 to 29; for an SAS controller, from 0 to 7.</desc>
4347 </param>
4348 <param name="device" type="long" dir="in">
4349 <desc>Device slot in the given port to attach the device to. This is only
4350 relevant for IDE controllers, for which 0 specifies the master device and
4351 1 specifies the slave device. For all other controller types, this must
4352 be 0.</desc>
4353 </param>
4354 <param name="type" type="DeviceType" dir="in">
4355 <desc>Device type of the attached device.</desc>
4356 </param>
4357 <param name="id" type="uuid" mod="string" dir="in">
4358 <desc>UUID of the medium to mount. Can be a zero UUID or the UUID of
4359 a host drive for removeable media; see <link to="IMediumAttachment" />
4360 for details.</desc>
4361 </param>
4362 </method>
4363
4364 <method name="detachDevice">
4365 <desc>
4366 Detaches the device attached to a device slot of the specified bus.
4367
4368 Detaching the device from the virtual machine is deferred. This means
4369 that the medium remains associated with the machine when this method
4370 returns and gets actually de-associated only after a successful
4371 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4372 for more detailed information about attaching media.
4373
4374 <note>
4375 You cannot detach a device from a running machine.
4376 </note>
4377 <note>
4378 Detaching differencing media implicitly created by <link
4379 to="#attachDevice"/> for the indirect attachment using this
4380 method will <b>not</b> implicitly delete them. The
4381 <link to="IMedium::deleteStorage"/> operation should be
4382 explicitly performed by the caller after the medium is successfully
4383 detached and the settings are saved with
4384 <link to="#saveSettings"/>, if it is the desired action.
4385 </note>
4386
4387 <result name="VBOX_E_INVALID_VM_STATE">
4388 Attempt to detach medium from a running virtual machine.
4389 </result>
4390 <result name="VBOX_E_OBJECT_NOT_FOUND">
4391 No medium attached to given slot/bus.
4392 </result>
4393 <result name="VBOX_E_NOT_SUPPORTED">
4394 Medium format does not support storage deletion.
4395 </result>
4396
4397 </desc>
4398 <param name="name" type="wstring" dir="in">
4399 <desc>Name of the storage controller to detach the medium from.</desc>
4400 </param>
4401 <param name="controllerPort" type="long" dir="in">
4402 <desc>Port number to detach the medium from.</desc>
4403 </param>
4404 <param name="device" type="long" dir="in">
4405 <desc>Device slot number to detach the medium from.</desc>
4406 </param>
4407 </method>
4408
4409 <method name="passthroughDevice">
4410 <desc>
4411 Sets the passthrough mode of an existing DVD device. Changing the
4412 setting while the VM is running is forbidden. The setting is only used
4413 if at VM start the device is configured as a host DVD drive, in all
4414 other cases it is ignored. The device must already exist; see
4415 <link to="IMachine::attachDevice"/> for how to attach a new device.
4416
4417 The @a controllerPort and @a device parameters specify the device slot and
4418 have have the same meaning as with <link to="IMachine::attachDevice" />.
4419
4420 <result name="E_INVALIDARG">
4421 SATA device, SATA port, IDE port or IDE slot out of range.
4422 </result>
4423 <result name="VBOX_E_INVALID_OBJECT_STATE">
4424 Attempt to modify an unregistered virtual machine.
4425 </result>
4426 <result name="VBOX_E_INVALID_VM_STATE">
4427 Invalid machine state.
4428 </result>
4429
4430 </desc>
4431 <param name="name" type="wstring" dir="in">
4432 <desc>Name of the storage controller.</desc>
4433 </param>
4434 <param name="controllerPort" type="long" dir="in">
4435 <desc>Storage controller port.</desc>
4436 </param>
4437 <param name="device" type="long" dir="in">
4438 <desc>Device slot in the given port.</desc>
4439 </param>
4440 <param name="passthrough" type="boolean" dir="in">
4441 <desc>New value for the passthrough setting.</desc>
4442 </param>
4443 </method>
4444
4445 <method name="mountMedium">
4446 <desc>
4447 Mounts a medium (<link to="IMedium" />, identified
4448 by the given UUID @a id) to the given storage controller
4449 (<link to="IStorageController" />, identified by @a name),
4450 at the indicated port and device. The device must already exist;
4451 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4452
4453 This method is intended only for managing removable media, where the
4454 device is fixed but media is changeable at runtime (such as DVDs
4455 and floppies). It cannot be used for fixed media such as hard disks.
4456
4457 The @a controllerPort and @a device parameters specify the device slot and
4458 have have the same meaning as with <link to="IMachine::attachDevice" />.
4459
4460 The specified device slot can have a medium mounted, which will be
4461 unmounted first. Specifying a zero UUID (or an empty string) for
4462 @a medium does just an unmount.
4463
4464 See <link to="IMedium"/> for more detailed information about
4465 attaching media.
4466
4467 <result name="E_INVALIDARG">
4468 SATA device, SATA port, IDE port or IDE slot out of range.
4469 </result>
4470 <result name="VBOX_E_INVALID_OBJECT_STATE">
4471 Attempt to attach medium to an unregistered virtual machine.
4472 </result>
4473 <result name="VBOX_E_INVALID_VM_STATE">
4474 Invalid machine state.
4475 </result>
4476 <result name="VBOX_E_OBJECT_IN_USE">
4477 Medium already attached to this or another virtual machine.
4478 </result>
4479
4480 </desc>
4481 <param name="name" type="wstring" dir="in">
4482 <desc>Name of the storage controller to attach the medium to.</desc>
4483 </param>
4484 <param name="controllerPort" type="long" dir="in">
4485 <desc>Port to attach the medium to.</desc>
4486 </param>
4487 <param name="device" type="long" dir="in">
4488 <desc>Device slot in the given port to attach the medium to.</desc>
4489 </param>
4490 <param name="medium" type="uuid" mod="string" dir="in">
4491 <desc>UUID of the medium to attach. A zero UUID means unmount the
4492 currently mounted medium.</desc>
4493 </param>
4494 <param name="force" type="boolean" dir="in">
4495 <desc>Allows to force unmount/mount of a medium which is locked by
4496 theDevice slot in the given port to attach the medium to.</desc>
4497 </param>
4498 </method>
4499
4500 <method name="getMedium" const="yes">
4501 <desc>
4502 Returns the virtual medium attached to a device slot of the specified
4503 bus.
4504
4505 Note that if the medium was indirectly attached by
4506 <link to="#mountMedium"/> to the given device slot then this
4507 method will return not the same object as passed to the
4508 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4509 more detailed information about mounting a medium.
4510
4511 <result name="VBOX_E_OBJECT_NOT_FOUND">
4512 No medium attached to given slot/bus.
4513 </result>
4514
4515 </desc>
4516 <param name="name" type="wstring" dir="in">
4517 <desc>Name of the storage controller the medium is attached to.</desc>
4518 </param>
4519 <param name="controllerPort" type="long" dir="in">
4520 <desc>Port to query.</desc>
4521 </param>
4522 <param name="device" type="long" dir="in">
4523 <desc>Device slot in the given port to query.</desc>
4524 </param>
4525 <param name="medium" type="IMedium" dir="return">
4526 <desc>Attached medium object.</desc>
4527 </param>
4528 </method>
4529
4530 <method name="getMediumAttachmentsOfController" const="yes">
4531 <desc>
4532 Returns an array of medium attachments which are attached to the
4533 the controller with the given name.
4534
4535 <result name="VBOX_E_OBJECT_NOT_FOUND">
4536 A storage controller with given name doesn't exist.
4537 </result>
4538 </desc>
4539 <param name="name" type="wstring" dir="in"/>
4540 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4541 </method>
4542
4543 <method name="getMediumAttachment" const="yes">
4544 <desc>
4545 Returns a medium attachment which corresponds to the controller with
4546 the given name, on the given port and device slot.
4547
4548 <result name="VBOX_E_OBJECT_NOT_FOUND">
4549 No attachment exists for the given controller/port/device combination.
4550 </result>
4551 </desc>
4552 <param name="name" type="wstring" dir="in"/>
4553 <param name="controllerPort" type="long" dir="in"/>
4554 <param name="device" type="long" dir="in"/>
4555 <param name="attachment" type="IMediumAttachment" dir="return"/>
4556 </method>
4557
4558 <method name="getNetworkAdapter" const="yes">
4559 <desc>
4560 Returns the network adapter associated with the given slot.
4561 Slots are numbered sequentially, starting with zero. The total
4562 number of adapters per machine is defined by the
4563 <link to="ISystemProperties::networkAdapterCount"/> property,
4564 so the maximum slot number is one less than that property's value.
4565
4566 <result name="E_INVALIDARG">
4567 Invalid @a slot number.
4568 </result>
4569
4570 </desc>
4571 <param name="slot" type="unsigned long" dir="in"/>
4572 <param name="adapter" type="INetworkAdapter" dir="return"/>
4573 </method>
4574
4575 <method name="addStorageController">
4576 <desc>
4577 Adds a new storage controller (SCSI, SAS or SATA controller) to the
4578 machine and returns it as an instance of
4579 <link to="IStorageController" />.
4580
4581 @a name identifies the controller for subsequent calls such as
4582 <link to="#getStorageControllerByName" />,
4583 <link to="#getStorageControllerByInstance" />,
4584 <link to="#removeStorageController" />,
4585 <link to="#attachDevice" /> or <link to="#mountMedium" />.
4586
4587 After the controller has been added, you can set its exact
4588 type by setting the <link to="IStorageController::controllerType" />.
4589
4590 <result name="VBOX_E_OBJECT_IN_USE">
4591 A storage controller with given name exists already.
4592 </result>
4593 <result name="E_INVALIDARG">
4594 Invalid @a controllerType.
4595 </result>
4596 </desc>
4597 <param name="name" type="wstring" dir="in"/>
4598 <param name="connectionType" type="StorageBus" dir="in"/>
4599 <param name="controller" type="IStorageController" dir="return"/>
4600 </method>
4601
4602 <method name="getStorageControllerByName" const="yes">
4603 <desc>
4604 Returns a storage controller with the given name.
4605
4606 <result name="VBOX_E_OBJECT_NOT_FOUND">
4607 A storage controller with given name doesn't exist.
4608 </result>
4609 </desc>
4610 <param name="name" type="wstring" dir="in"/>
4611 <param name="storageController" type="IStorageController" dir="return"/>
4612 </method>
4613
4614 <method name="getStorageControllerByInstance" const="yes">
4615 <desc>
4616 Returns a storage controller with the given instance number.
4617
4618 <result name="VBOX_E_OBJECT_NOT_FOUND">
4619 A storage controller with given instance number doesn't exist.
4620 </result>
4621 </desc>
4622 <param name="instance" type="unsigned long" dir="in"/>
4623 <param name="storageController" type="IStorageController" dir="return"/>
4624 </method>
4625
4626 <method name="removeStorageController">
4627 <desc>
4628 Removes a storage controller from the machine.
4629
4630 <result name="VBOX_E_OBJECT_NOT_FOUND">
4631 A storage controller with given name doesn't exist.
4632 </result>
4633 </desc>
4634 <param name="name" type="wstring" dir="in"/>
4635 </method>
4636
4637 <method name="getSerialPort" const="yes">
4638 <desc>
4639 Returns the serial port associated with the given slot.
4640 Slots are numbered sequentially, starting with zero. The total
4641 number of serial ports per machine is defined by the
4642 <link to="ISystemProperties::serialPortCount"/> property,
4643 so the maximum slot number is one less than that property's value.
4644
4645 <result name="E_INVALIDARG">
4646 Invalid @a slot number.
4647 </result>
4648
4649 </desc>
4650 <param name="slot" type="unsigned long" dir="in"/>
4651 <param name="port" type="ISerialPort" dir="return"/>
4652 </method>
4653
4654 <method name="getParallelPort" const="yes">
4655 <desc>
4656 Returns the parallel port associated with the given slot.
4657 Slots are numbered sequentially, starting with zero. The total
4658 number of parallel ports per machine is defined by the
4659 <link to="ISystemProperties::parallelPortCount"/> property,
4660 so the maximum slot number is one less than that property's value.
4661
4662 <result name="E_INVALIDARG">
4663 Invalid @a slot number.
4664 </result>
4665
4666 </desc>
4667 <param name="slot" type="unsigned long" dir="in"/>
4668 <param name="port" type="IParallelPort" dir="return"/>
4669 </method>
4670
4671 <method name="getExtraDataKeys">
4672 <desc>
4673 Returns an array representing the machine-specific extra data keys
4674 which currently have values defined.
4675 </desc>
4676 <param name="value" type="wstring" dir="return" safearray="yes">
4677 <desc>Array of extra data keys.</desc>
4678 </param>
4679 </method>
4680
4681 <method name="getExtraData">
4682 <desc>
4683 Returns associated machine-specific extra data.
4684
4685 If the requested data @a key does not exist, this function will
4686 succeed and return an empty string in the @a value argument.
4687
4688 <result name="VBOX_E_FILE_ERROR">
4689 Settings file not accessible.
4690 </result>
4691 <result name="VBOX_E_XML_ERROR">
4692 Could not parse the settings file.
4693 </result>
4694
4695 </desc>
4696 <param name="key" type="wstring" dir="in">
4697 <desc>Name of the data key to get.</desc>
4698 </param>
4699 <param name="value" type="wstring" dir="return">
4700 <desc>Value of the requested data key.</desc>
4701 </param>
4702 </method>
4703
4704 <method name="setExtraData">
4705 <desc>
4706 Sets associated machine-specific extra data.
4707
4708 If you pass @c null or an empty string as a key @a value, the given
4709 @a key will be deleted.
4710
4711 <note>
4712 Before performing the actual data change, this method will ask all
4713 registered listeners using the
4714 <link to="IExtraDataCanChangeEvent"/>
4715 notification for a permission. If one of the listeners refuses the
4716 new value, the change will not be performed.
4717 </note>
4718 <note>
4719 On success, the
4720 <link to="IExtraDataChangedEvent"/> notification
4721 is called to inform all registered listeners about a successful data
4722 change.
4723 </note>
4724 <note>
4725 This method can be called outside the machine session and therefore
4726 it's a caller's responsibility to handle possible race conditions
4727 when several clients change the same key at the same time.
4728 </note>
4729
4730 <result name="VBOX_E_FILE_ERROR">
4731 Settings file not accessible.
4732 </result>
4733 <result name="VBOX_E_XML_ERROR">
4734 Could not parse the settings file.
4735 </result>
4736
4737 </desc>
4738 <param name="key" type="wstring" dir="in">
4739 <desc>Name of the data key to set.</desc>
4740 </param>
4741 <param name="value" type="wstring" dir="in">
4742 <desc>Value to assign to the key.</desc>
4743 </param>
4744 </method>
4745
4746 <method name="getCPUProperty" const="yes">
4747 <desc>
4748 Returns the virtual CPU boolean value of the specified property.
4749
4750 <result name="E_INVALIDARG">
4751 Invalid property.
4752 </result>
4753
4754 </desc>
4755 <param name="property" type="CPUPropertyType" dir="in">
4756 <desc>
4757 Property type to query.
4758 </desc>
4759 </param>
4760 <param name="value" type="boolean" dir="return">
4761 <desc>
4762 Property value.
4763 </desc>
4764 </param>
4765 </method>
4766
4767 <method name="setCPUProperty">
4768 <desc>
4769 Sets the virtual CPU boolean value of the specified property.
4770
4771 <result name="E_INVALIDARG">
4772 Invalid property.
4773 </result>
4774
4775 </desc>
4776 <param name="property" type="CPUPropertyType" dir="in">
4777 <desc>
4778 Property type to query.
4779 </desc>
4780 </param>
4781 <param name="value" type="boolean" dir="in">
4782 <desc>
4783 Property value.
4784 </desc>
4785 </param>
4786 </method>
4787
4788 <method name="getCPUIDLeaf" const="yes">
4789 <desc>
4790 Returns the virtual CPU cpuid information for the specified leaf.
4791
4792 Currently supported index values for cpuid:
4793 Standard CPUID leafs: 0 - 0xA
4794 Extended CPUID leafs: 0x80000000 - 0x8000000A
4795
4796 See the Intel and AMD programmer's manuals for detailed information
4797 about the cpuid instruction and its leafs.
4798 <result name="E_INVALIDARG">
4799 Invalid id.
4800 </result>
4801
4802 </desc>
4803 <param name="id" type="unsigned long" dir="in">
4804 <desc>
4805 CPUID leaf index.
4806 </desc>
4807 </param>
4808 <param name="valEax" type="unsigned long" dir="out">
4809 <desc>
4810 CPUID leaf value for register eax.
4811 </desc>
4812 </param>
4813 <param name="valEbx" type="unsigned long" dir="out">
4814 <desc>
4815 CPUID leaf value for register ebx.
4816 </desc>
4817 </param>
4818 <param name="valEcx" type="unsigned long" dir="out">
4819 <desc>
4820 CPUID leaf value for register ecx.
4821 </desc>
4822 </param>
4823 <param name="valEdx" type="unsigned long" dir="out">
4824 <desc>
4825 CPUID leaf value for register edx.
4826 </desc>
4827 </param>
4828 </method>
4829
4830 <method name="setCPUIDLeaf">
4831 <desc>
4832 Sets the virtual CPU cpuid information for the specified leaf. Note that these values
4833 are not passed unmodified. VirtualBox clears features that it doesn't support.
4834
4835 Currently supported index values for cpuid:
4836 Standard CPUID leafs: 0 - 0xA
4837 Extended CPUID leafs: 0x80000000 - 0x8000000A
4838
4839 See the Intel and AMD programmer's manuals for detailed information
4840 about the cpuid instruction and its leafs.
4841
4842 Do not use this method unless you know exactly what you're doing. Misuse can lead to
4843 random crashes inside VMs.
4844 <result name="E_INVALIDARG">
4845 Invalid id.
4846 </result>
4847
4848 </desc>
4849 <param name="id" type="unsigned long" dir="in">
4850 <desc>
4851 CPUID leaf index.
4852 </desc>
4853 </param>
4854 <param name="valEax" type="unsigned long" dir="in">
4855 <desc>
4856 CPUID leaf value for register eax.
4857 </desc>
4858 </param>
4859 <param name="valEbx" type="unsigned long" dir="in">
4860 <desc>
4861 CPUID leaf value for register ebx.
4862 </desc>
4863 </param>
4864 <param name="valEcx" type="unsigned long" dir="in">
4865 <desc>
4866 CPUID leaf value for register ecx.
4867 </desc>
4868 </param>
4869 <param name="valEdx" type="unsigned long" dir="in">
4870 <desc>
4871 CPUID leaf value for register edx.
4872 </desc>
4873 </param>
4874 </method>
4875
4876 <method name="removeCPUIDLeaf">
4877 <desc>
4878 Removes the virtual CPU cpuid leaf for the specified index
4879
4880 <result name="E_INVALIDARG">
4881 Invalid id.
4882 </result>
4883
4884 </desc>
4885 <param name="id" type="unsigned long" dir="in">
4886 <desc>
4887 CPUID leaf index.
4888 </desc>
4889 </param>
4890 </method>
4891
4892 <method name="removeAllCPUIDLeaves">
4893 <desc>
4894 Removes all the virtual CPU cpuid leaves
4895 </desc>
4896 </method>
4897
4898 <method name="getHWVirtExProperty" const="yes">
4899 <desc>
4900 Returns the value of the specified hardware virtualization boolean property.
4901
4902 <result name="E_INVALIDARG">
4903 Invalid property.
4904 </result>
4905
4906 </desc>
4907 <param name="property" type="HWVirtExPropertyType" dir="in">
4908 <desc>
4909 Property type to query.
4910 </desc>
4911 </param>
4912 <param name="value" type="boolean" dir="return">
4913 <desc>
4914 Property value.
4915 </desc>
4916 </param>
4917 </method>
4918
4919 <method name="setHWVirtExProperty">
4920 <desc>
4921 Sets a new value for the specified hardware virtualization boolean property.
4922
4923 <result name="E_INVALIDARG">
4924 Invalid property.
4925 </result>
4926
4927 </desc>
4928 <param name="property" type="HWVirtExPropertyType" dir="in">
4929 <desc>
4930 Property type to set.
4931 </desc>
4932 </param>
4933 <param name="value" type="boolean" dir="in">
4934 <desc>
4935 New property value.
4936 </desc>
4937 </param>
4938 </method>
4939
4940 <method name="saveSettings">
4941 <desc>
4942 Saves any changes to machine settings made since the session
4943 has been opened or a new machine has been created, or since the
4944 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
4945 For registered machines, new settings become visible to all
4946 other VirtualBox clients after successful invocation of this
4947 method.
4948 <note>
4949 The method sends <link to="IMachineDataChangedEvent"/>
4950 notification event after the configuration has been successfully
4951 saved (only for registered machines).
4952 </note>
4953 <note>
4954 Calling this method is only valid on instances returned
4955 by <link to="ISession::machine"/> and on new machines
4956 created by <link to="IVirtualBox::createMachine"/> but not
4957 yet registered, or on unregistered machines after calling
4958 <link to="IMachine::unregister"/>.
4959 </note>
4960
4961 <result name="VBOX_E_FILE_ERROR">
4962 Settings file not accessible.
4963 </result>
4964 <result name="VBOX_E_XML_ERROR">
4965 Could not parse the settings file.
4966 </result>
4967 <result name="E_ACCESSDENIED">
4968 Modification request refused.
4969 </result>
4970
4971 </desc>
4972 </method>
4973
4974 <method name="discardSettings">
4975 <desc>
4976 Discards any changes to the machine settings made since the session
4977 has been opened or since the last call to <link to="#saveSettings"/>
4978 or <link to="#discardSettings"/>.
4979 <note>
4980 Calling this method is only valid on instances returned
4981 by <link to="ISession::machine"/> and on new machines
4982 created by <link to="IVirtualBox::createMachine"/> or
4983 opened by <link to="IVirtualBox::openMachine"/> but not
4984 yet registered, or on unregistered machines after calling
4985 <link to="IMachine::unregister"/>.
4986 </note>
4987
4988 <result name="VBOX_E_INVALID_VM_STATE">
4989 Virtual machine is not mutable.
4990 </result>
4991
4992 </desc>
4993 </method>
4994
4995 <method name="unregister">
4996 <desc>
4997 Unregisters the machine, which must have been previously registered using
4998 <link to="IVirtualBox::registerMachine"/>, and optionally do additional
4999 cleanup before the machine is unregistered.
5000
5001 This method does not delete any files. It only changes the machine configuration and
5002 the list of registered machines in the VirtualBox object. To delete the files which
5003 belonged to the machine, including the XML file of the machine itself, call
5004 <link to="#delete"/>, optionally with the array of IMedium objects which was returned
5005 from this method.
5006
5007 How thoroughly this method cleans up the machine configuration before unregistering
5008 the machine depends on the @a cleanupMode argument.
5009
5010 <ul>
5011 <li>With "UnregisterOnly", the machine will only be unregistered, but no additional
5012 cleanup will be performed. The call will fail if the machine is in "Saved" state
5013 or has any snapshots or any media attached (see <link to="IMediumAttachment" />.
5014 It is the responsibility of the caller to delete all such configuration in this mode.
5015 In this mode, the API behaves like the former @c IVirtualBox::unregisterMachine() API
5016 which it replaces.</li>
5017 <li>With "DetachAllReturnNone", the call will succeed even if the machine is in "Saved"
5018 state or if it has snapshots or media attached. All media attached to the current machine
5019 state or in snapshots will be detached. No medium objects will be returned; all of the
5020 machine's media will remain open.</li>
5021 <li>With "DetachAllReturnHardDisksOnly", the call will behave like with "DetachAllReturnNone",
5022 except that all the hard disk medium objects which were detached from the machine will
5023 be returned as an array. This allows for quickly passing them to the <link to="#delete" />
5024 API for closing and deletion.</li>
5025 <li>With "Full", the call will behave like with "DetachAllReturnHardDisksOnly", except
5026 that all media will be returned in the array, including removeable media like DVDs and
5027 floppies. This might be useful if the user wants to inspect in detail which media were
5028 attached to the machine. Be careful when passing the media array to <link to="#delete" />
5029 in that case because users will typically want to preserve ISO and RAW image files.</li>
5030 </ul>
5031
5032 This API does not verify whether the media files returned in the array are still
5033 attached to other machines (i.e. shared between several machines). If such a shared
5034 image is passed to <link to="#delete" /> however, closing the image will fail there
5035 and the image will be silently skipped.
5036
5037 A typical implementation will use "DetachAllReturnHardDisksOnly" and then pass the
5038 resulting IMedia array to <link to="#delete"/>. This way, the machine is completely
5039 deleted with all its saved states and hard disk images, but images for removeable
5040 drives (such as ISO and RAW files) will remain on disk.
5041
5042 The call will fail if the machine is currently locked (see <link to="ISession" />).
5043 It implicitly calls <link to="#saveSettings"/> to save all current machine settings
5044 before unregistering it.
5045
5046 After successful method invocation, the <link to="IMachineRegisteredEvent"/> event
5047 is fired.
5048
5049 <note>
5050 If the given machine is inaccessible (see <link to="#accessible"/>), it
5051 will be unregistered and fully uninitialized right afterwards. As a result,
5052 the returned machine object will be unusable and an attempt to call
5053 <b>any</b> method will return the "Object not ready" error.
5054 </note>
5055
5056 <result name="VBOX_E_INVALID_OBJECT_STATE">
5057 Machine is currently locked for a session.
5058 </result>
5059 </desc>
5060
5061 <param name="cleanupMode" type="CleanupMode" dir="in">
5062 <desc>How to clean up after the machine has been unregistered.</desc>
5063 </param>
5064 <param name="aMedia" type="IMedium" safearray="yes" dir="return">
5065 <desc>List of media detached from the machine, depending on the @a cleanupMode parameter.</desc>
5066 </param>
5067 </method>
5068
5069 <method name="delete">
5070 <desc>
5071 Deletes the files associated with this machine from disk. If medium objects are passed
5072 in with the @a aMedia argument, they are closed and, if closing was succesful, their
5073 storage files are deleted as well. For convenience, this array of media files can be
5074 the same as the one returned from a previous <link to="#unregister" /> call.
5075
5076 This method must only be called on machines which are either write-locked (i.e. on instances
5077 returned by <link to="ISession::machine"/>) or on unregistered machines (i.e. not yet
5078 registered machines created by <link to="IVirtualBox::createMachine"/> or opened by
5079 <link to="IVirtualBox::openMachine"/>, or after having called <link to="#unregister"/>).
5080
5081 The following files will be deleted by this method:
5082 <ul>
5083 <li>If <link to="#unregister" /> had been previously called with a @a cleanupMode
5084 argument other than "UnregisterOnly", this will delete all saved state files that
5085 the machine had in use; possibly one if the machine was in "Saved" state and one
5086 for each online snapshot that the machine had.</li>
5087 <li>On each medium object passed in the @a aMedia array, this will call
5088 <link to="IMedium::close" />. If that succeeds, this will attempt to delete the
5089 medium's storage on disk. Since the close() call will fail if the medium is still
5090 in use, e.g. because it is still attached to a second machine; in that case the
5091 storage will not be deleted.</li>
5092 <li>Finally, the machine's own XML file will be deleted.</li>
5093 </ul>
5094
5095 Since deleting large disk image files can be a time-consuming I/O operation, this
5096 method operates asynchronously and returns an IProgress object to allow the caller
5097 to monitor the progress. There will be one sub-operation for each file that is
5098 being deleted (saved state or medium storage file).
5099
5100 <note>
5101 <link to="#settingsModified"/> will return @c true after this
5102 method successfully returns.
5103 </note>
5104
5105 <result name="VBOX_E_INVALID_VM_STATE">
5106 Machine is registered but not write-locked.
5107 </result>
5108 <result name="VBOX_E_IPRT_ERROR">
5109 Could not delete the settings file.
5110 </result>
5111 </desc>
5112 <param name="aMedia" type="IMedium" safearray="yes" dir="in">
5113 <desc>List of media to be closed and whose storage files will be deleted.</desc>
5114 </param>
5115 <param name="aProgress" type="IProgress" dir="return">
5116 <desc>Progress object to track the operation completion.</desc>
5117 </param>
5118 </method>
5119
5120 <method name="export">
5121 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5122 steps required to export VirtualBox machines to OVF.
5123 </desc>
5124
5125 <param name="aAppliance" type="IAppliance" dir="in">
5126 <desc>Appliance to export this machine to.</desc>
5127 </param>
5128 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5129 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5130 </param>
5131 </method >
5132
5133 <method name="getSnapshot">
5134 <desc>
5135 Returns a snapshot of this machine with the given UUID.
5136 A @c null UUID can be used to obtain the first snapshot
5137 taken on this machine. This is useful if you want to traverse
5138 the whole tree of snapshots starting from the root.
5139
5140 <result name="VBOX_E_OBJECT_NOT_FOUND">
5141 Virtual machine has no snapshots or snapshot not found.
5142 </result>
5143
5144 </desc>
5145 <param name="id" type="uuid" mod="string" dir="in">
5146 <desc>UUID of the snapshot to get</desc>
5147 </param>
5148 <param name="snapshot" type="ISnapshot" dir="return">
5149 <desc>Snapshot object with the given UUID.</desc>
5150 </param>
5151 </method>
5152
5153 <method name="findSnapshot">
5154 <desc>
5155 Returns a snapshot of this machine with the given name.
5156
5157 <result name="VBOX_E_OBJECT_NOT_FOUND">
5158 Virtual machine has no snapshots or snapshot not found.
5159 </result>
5160
5161 </desc>
5162 <param name="name" type="wstring" dir="in">
5163 <desc>Name of the snapshot to find</desc>
5164 </param>
5165 <param name="snapshot" type="ISnapshot" dir="return">
5166 <desc>Snapshot object with the given name.</desc>
5167 </param>
5168 </method>
5169
5170 <method name="setCurrentSnapshot">
5171 <desc>
5172 Sets the current snapshot of this machine.
5173 <note>
5174 In the current implementation, this operation is not
5175 implemented.
5176 </note>
5177 </desc>
5178 <param name="id" type="uuid" mod="string" dir="in">
5179 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5180 </param>
5181 </method>
5182
5183 <method name="createSharedFolder">
5184 <desc>
5185 Creates a new permanent shared folder by associating the given logical
5186 name with the given host path, adds it to the collection of shared
5187 folders and starts sharing it. Refer to the description of
5188 <link to="ISharedFolder"/> to read more about logical names.
5189
5190 <result name="VBOX_E_OBJECT_IN_USE">
5191 Shared folder already exists.
5192 </result>
5193 <result name="VBOX_E_FILE_ERROR">
5194 Shared folder @a hostPath not accessible.
5195 </result>
5196
5197 </desc>
5198 <param name="name" type="wstring" dir="in">
5199 <desc>Unique logical name of the shared folder.</desc>
5200 </param>
5201 <param name="hostPath" type="wstring" dir="in">
5202 <desc>Full path to the shared folder in the host file system.</desc>
5203 </param>
5204 <param name="writable" type="boolean" dir="in">
5205 <desc>Whether the share is writable or readonly.</desc>
5206 </param>
5207 <param name="automount" type="boolean" dir="in">
5208 <desc>Whether the share gets automatically mounted by the guest
5209 or not.</desc>
5210 </param>
5211 </method>
5212
5213 <method name="removeSharedFolder">
5214 <desc>
5215 Removes the permanent shared folder with the given name previously
5216 created by <link to="#createSharedFolder"/> from the collection of
5217 shared folders and stops sharing it.
5218
5219 <result name="VBOX_E_INVALID_VM_STATE">
5220 Virtual machine is not mutable.
5221 </result>
5222 <result name="VBOX_E_OBJECT_NOT_FOUND">
5223 Shared folder @a name does not exist.
5224 </result>
5225
5226 </desc>
5227 <param name="name" type="wstring" dir="in">
5228 <desc>Logical name of the shared folder to remove.</desc>
5229 </param>
5230 </method>
5231
5232 <method name="canShowConsoleWindow">
5233 <desc>
5234 Returns @c true if the VM console process can activate the
5235 console window and bring it to foreground on the desktop of
5236 the host PC.
5237 <note>
5238 This method will fail if a session for this machine is not
5239 currently open.
5240 </note>
5241
5242 <result name="VBOX_E_INVALID_VM_STATE">
5243 Machine session is not open.
5244 </result>
5245
5246 </desc>
5247 <param name="canShow" type="boolean" dir="return">
5248 <desc>
5249 @c true if the console window can be shown and @c false otherwise.
5250 </desc>
5251 </param>
5252 </method>
5253
5254 <method name="showConsoleWindow">
5255 <desc>
5256 Activates the console window and brings it to foreground on
5257 the desktop of the host PC. Many modern window managers on
5258 many platforms implement some sort of focus stealing
5259 prevention logic, so that it may be impossible to activate
5260 a window without the help of the currently active
5261 application. In this case, this method will return a non-zero
5262 identifier that represents the top-level window of the VM
5263 console process. The caller, if it represents a currently
5264 active process, is responsible to use this identifier (in a
5265 platform-dependent manner) to perform actual window
5266 activation.
5267 <note>
5268 This method will fail if a session for this machine is not
5269 currently open.
5270 </note>
5271
5272 <result name="VBOX_E_INVALID_VM_STATE">
5273 Machine session is not open.
5274 </result>
5275
5276 </desc>
5277 <param name="winId" type="unsigned long long" dir="return">
5278 <desc>
5279 Platform-dependent identifier of the top-level VM console
5280 window, or zero if this method has performed all actions
5281 necessary to implement the <i>show window</i> semantics for
5282 the given platform and/or VirtualBox front-end.
5283 </desc>
5284 </param>
5285 </method>
5286
5287 <method name="getGuestProperty" const="yes">
5288 <desc>
5289 Reads an entry from the machine's guest property store.
5290
5291 <result name="VBOX_E_INVALID_VM_STATE">
5292 Machine session is not open.
5293 </result>
5294
5295 </desc>
5296 <param name="name" type="wstring" dir="in">
5297 <desc>
5298 The name of the property to read.
5299 </desc>
5300 </param>
5301 <param name="value" type="wstring" dir="out">
5302 <desc>
5303 The value of the property. If the property does not exist then this
5304 will be empty.
5305 </desc>
5306 </param>
5307 <param name="timestamp" type="unsigned long long" dir="out">
5308 <desc>
5309 The time at which the property was last modified, as seen by the
5310 server process.
5311 </desc>
5312 </param>
5313 <param name="flags" type="wstring" dir="out">
5314 <desc>
5315 Additional property parameters, passed as a comma-separated list of
5316 "name=value" type entries.
5317 </desc>
5318 </param>
5319 </method>
5320
5321 <method name="getGuestPropertyValue" const="yes">
5322 <desc>
5323 Reads a value from the machine's guest property store.
5324
5325 <result name="VBOX_E_INVALID_VM_STATE">
5326 Machine session is not open.
5327 </result>
5328
5329 </desc>
5330 <param name="property" type="wstring" dir="in">
5331 <desc>
5332 The name of the property to read.
5333 </desc>
5334 </param>
5335 <param name="value" type="wstring" dir="return">
5336 <desc>
5337 The value of the property. If the property does not exist then this
5338 will be empty.
5339 </desc>
5340 </param>
5341 </method>
5342
5343 <method name="getGuestPropertyTimestamp" const="yes">
5344 <desc>
5345 Reads a property timestamp from the machine's guest property store.
5346
5347 <result name="VBOX_E_INVALID_VM_STATE">
5348 Machine session is not open.
5349 </result>
5350
5351 </desc>
5352 <param name="property" type="wstring" dir="in">
5353 <desc>
5354 The name of the property to read.
5355 </desc>
5356 </param>
5357 <param name="value" type="unsigned long long" dir="return">
5358 <desc>
5359 The timestamp. If the property does not exist then this will be
5360 empty.
5361 </desc>
5362 </param>
5363 </method>
5364
5365 <method name="setGuestProperty">
5366 <desc>
5367 Sets, changes or deletes an entry in the machine's guest property
5368 store.
5369
5370 <result name="E_ACCESSDENIED">
5371 Property cannot be changed.
5372 </result>
5373 <result name="E_INVALIDARG">
5374 Invalid @a flags.
5375 </result>
5376 <result name="VBOX_E_INVALID_VM_STATE">
5377 Virtual machine is not mutable or session not open.
5378 </result>
5379 <result name="VBOX_E_INVALID_OBJECT_STATE">
5380 Cannot set transient property when machine not running.
5381 </result>
5382
5383 </desc>
5384 <param name="property" type="wstring" dir="in">
5385 <desc>
5386 The name of the property to set, change or delete.
5387 </desc>
5388 </param>
5389 <param name="value" type="wstring" dir="in">
5390 <desc>
5391 The new value of the property to set, change or delete. If the
5392 property does not yet exist and value is non-empty, it will be
5393 created. If the value is @c null or empty, the property will be
5394 deleted if it exists.
5395 </desc>
5396 </param>
5397 <param name="flags" type="wstring" dir="in">
5398 <desc>
5399 Additional property parameters, passed as a comma-separated list of
5400 "name=value" type entries.
5401 </desc>
5402 </param>
5403 </method>
5404
5405 <method name="setGuestPropertyValue">
5406 <desc>
5407 Sets, changes or deletes a value in the machine's guest property
5408 store. The flags field will be left unchanged or created empty for a
5409 new property.
5410
5411 <result name="E_ACCESSDENIED">
5412 Property cannot be changed.
5413 </result>
5414 <result name="VBOX_E_INVALID_VM_STATE">
5415 Virtual machine is not mutable or session not open.
5416 </result>
5417 <result name="VBOX_E_INVALID_OBJECT_STATE">
5418 Cannot set transient property when machine not running.
5419 </result>
5420 </desc>
5421
5422 <param name="property" type="wstring" dir="in">
5423 <desc>
5424 The name of the property to set, change or delete.
5425 </desc>
5426 </param>
5427 <param name="value" type="wstring" dir="in">
5428 <desc>
5429 The new value of the property to set, change or delete. If the
5430 property does not yet exist and value is non-empty, it will be
5431 created. If the value is @c null or empty, the property will be
5432 deleted if it exists.
5433 </desc>
5434 </param>
5435 </method>
5436
5437 <method name="enumerateGuestProperties">
5438 <desc>
5439 Return a list of the guest properties matching a set of patterns along
5440 with their values, time stamps and flags.
5441 </desc>
5442 <param name="patterns" type="wstring" dir="in">
5443 <desc>
5444 The patterns to match the properties against, separated by '|'
5445 characters. If this is empty or @c null, all properties will match.
5446 </desc>
5447 </param>
5448 <param name="name" type="wstring" dir="out" safearray="yes">
5449 <desc>
5450 The names of the properties returned.
5451 </desc>
5452 </param>
5453 <param name="value" type="wstring" dir="out" safearray="yes">
5454 <desc>
5455 The values of the properties returned. The array entries match the
5456 corresponding entries in the @a name array.
5457 </desc>
5458 </param>
5459 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5460 <desc>
5461 The time stamps of the properties returned. The array entries match
5462 the corresponding entries in the @a name array.
5463 </desc>
5464 </param>
5465 <param name="flags" type="wstring" dir="out" safearray="yes">
5466 <desc>
5467 The flags of the properties returned. The array entries match the
5468 corresponding entries in the @a name array.
5469 </desc>
5470 </param>
5471 </method>
5472
5473 <method name="querySavedThumbnailSize">
5474 <desc>
5475 Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.
5476 </desc>
5477 <param name="screenId" type="unsigned long" dir="in">
5478 <desc>
5479 Saved guest screen to query info from.
5480 </desc>
5481 </param>
5482 <param name="size" type="unsigned long" dir="out">
5483 <desc>
5484 Size of buffer required to store the bitmap.
5485 </desc>
5486 </param>
5487 <param name="width" type="unsigned long" dir="out">
5488 <desc>
5489 Bitmap width.
5490 </desc>
5491 </param>
5492 <param name="height" type="unsigned long" dir="out">
5493 <desc>
5494 Bitmap height.
5495 </desc>
5496 </param>
5497 </method>
5498
5499 <method name="readSavedThumbnailToArray">
5500 <desc>
5501 Thumbnail is retrieved to an array of bytes in uncompressed 32-bit BGRA or RGBA format.
5502 </desc>
5503 <param name="screenId" type="unsigned long" dir="in">
5504 <desc>
5505 Saved guest screen to read from.
5506 </desc>
5507 </param>
5508 <param name="BGR" type="boolean" dir="in">
5509 <desc>
5510 How to order bytes in the pixel. A pixel consists of 4 bytes. If this parameter is true, then
5511 bytes order is: B, G, R, 0xFF. If this parameter is false, then bytes order is: R, G, B, 0xFF.
5512 </desc>
5513 </param>
5514 <param name="width" type="unsigned long" dir="out">
5515 <desc>
5516 Bitmap width.
5517 </desc>
5518 </param>
5519 <param name="height" type="unsigned long" dir="out">
5520 <desc>
5521 Bitmap height.
5522 </desc>
5523 </param>
5524 <param name="data" type="octet" dir="return" safearray="yes">
5525 <desc>
5526 Array with resulting bitmap data.
5527 </desc>
5528 </param>
5529 </method>
5530
5531 <method name="querySavedScreenshotPNGSize">
5532 <desc>
5533 Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.
5534 </desc>
5535 <param name="screenId" type="unsigned long" dir="in">
5536 <desc>
5537 Saved guest screen to query info from.
5538 </desc>
5539 </param>
5540 <param name="size" type="unsigned long" dir="out">
5541 <desc>
5542 Size of buffer required to store the PNG binary data.
5543 </desc>
5544 </param>
5545 <param name="width" type="unsigned long" dir="out">
5546 <desc>
5547 Image width.
5548 </desc>
5549 </param>
5550 <param name="height" type="unsigned long" dir="out">
5551 <desc>
5552 Image height.
5553 </desc>
5554 </param>
5555 </method>
5556
5557 <method name="readSavedScreenshotPNGToArray">
5558 <desc>
5559 Screenshot in PNG format is retrieved to an array of bytes.
5560 </desc>
5561 <param name="screenId" type="unsigned long" dir="in">
5562 <desc>
5563 Saved guest screen to read from.
5564 </desc>
5565 </param>
5566 <param name="width" type="unsigned long" dir="out">
5567 <desc>
5568 Image width.
5569 </desc>
5570 </param>
5571 <param name="height" type="unsigned long" dir="out">
5572 <desc>
5573 Image height.
5574 </desc>
5575 </param>
5576 <param name="data" type="octet" dir="return" safearray="yes">
5577 <desc>
5578 Array with resulting PNG data.
5579 </desc>
5580 </param>
5581 </method>
5582
5583 <method name="hotPlugCPU">
5584 <desc>
5585 Plugs a CPU into the machine.
5586 </desc>
5587 <param name="cpu" type="unsigned long" dir="in">
5588 <desc>
5589 The CPU id to insert.
5590 </desc>
5591 </param>
5592 </method>
5593
5594 <method name="hotUnplugCPU">
5595 <desc>
5596 Removes a CPU from the machine.
5597 </desc>
5598 <param name="cpu" type="unsigned long" dir="in">
5599 <desc>
5600 The CPU id to remove.
5601 </desc>
5602 </param>
5603 </method>
5604
5605 <method name="getCPUStatus">
5606 <desc>
5607 Returns the current status of the given CPU.
5608 </desc>
5609 <param name="cpu" type="unsigned long" dir="in">
5610 <desc>
5611 The CPU id to check for.
5612 </desc>
5613 </param>
5614 <param name="attached" type="boolean" dir="return">
5615 <desc>
5616 Status of the CPU.
5617 </desc>
5618 </param>
5619 </method>
5620
5621 <method name="queryLogFilename">
5622 <desc>
5623 Queries for the VM log file name of an given index. Returns an empty
5624 string if a log file with that index doesn't exists.
5625 </desc>
5626 <param name="idx" type="unsigned long" dir="in">
5627 <desc>
5628 Which log file name to query. 0=current log file.
5629 </desc>
5630 </param>
5631 <param name="filename" type="wstring" dir="return">
5632 <desc>
5633 On return the full path to the log file or an empty string on error.
5634 </desc>
5635 </param>
5636 </method>
5637
5638 <method name="readLog">
5639 <desc>
5640 Reads the VM log file. The chunk size is limited, so even if you
5641 ask for a big piece there might be less data returned.
5642 </desc>
5643 <param name="idx" type="unsigned long" dir="in">
5644 <desc>
5645 Which log file to read. 0=current log file.
5646 </desc>
5647 </param>
5648 <param name="offset" type="unsigned long long" dir="in">
5649 <desc>
5650 Offset in the log file.
5651 </desc>
5652 </param>
5653 <param name="size" type="unsigned long long" dir="in">
5654 <desc>
5655 Chunk size to read in the log file.
5656 </desc>
5657 </param>
5658 <param name="data" type="octet" dir="return" safearray="yes">
5659 <desc>
5660 Data read from the log file. A data size of 0 means end of file
5661 if the requested chunk size was not 0. This is the unprocessed
5662 file data, i.e. the line ending style depends on the platform of
5663 the system the server is running on.
5664 </desc>
5665 </param>
5666 </method>
5667 </interface>
5668
5669 <!--
5670 // IConsole
5671 /////////////////////////////////////////////////////////////////////////
5672 -->
5673
5674 <interface
5675 name="IRemoteDisplayInfo" extends="$unknown"
5676 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
5677 wsmap="struct"
5678 >
5679 <desc>
5680 Contains information about the remote display (VRDP) capabilities and status.
5681 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5682 </desc>
5683
5684 <attribute name="active" type="boolean" readonly="yes">
5685 <desc>
5686 Whether the remote display connection is active.
5687 </desc>
5688 </attribute>
5689
5690 <attribute name="port" type="long" readonly="yes">
5691 <desc>
5692 VRDP server port number. If this property is equal to <tt>0</tt>, then
5693 the VRDP server failed to start, usually because there are no free TCP
5694 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
5695 server has not yet been started.
5696 </desc>
5697 </attribute>
5698
5699 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5700 <desc>
5701 How many times a client connected.
5702 </desc>
5703 </attribute>
5704
5705 <attribute name="beginTime" type="long long" readonly="yes">
5706 <desc>
5707 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5708 </desc>
5709 </attribute>
5710
5711 <attribute name="endTime" type="long long" readonly="yes">
5712 <desc>
5713 When the last connection was terminated or the current time, if
5714 connection is still active, in milliseconds since 1970-01-01 UTC.
5715 </desc>
5716 </attribute>
5717
5718 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5719 <desc>
5720 How many bytes were sent in last or current, if still active, connection.
5721 </desc>
5722 </attribute>
5723
5724 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5725 <desc>
5726 How many bytes were sent in all connections.
5727 </desc>
5728 </attribute>
5729
5730 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5731 <desc>
5732 How many bytes were received in last or current, if still active, connection.
5733 </desc>
5734 </attribute>
5735
5736 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5737 <desc>
5738 How many bytes were received in all connections.
5739 </desc>
5740 </attribute>
5741
5742 <attribute name="user" type="wstring" readonly="yes">
5743 <desc>
5744 Login user name supplied by the client.
5745 </desc>
5746 </attribute>
5747
5748 <attribute name="domain" type="wstring" readonly="yes">
5749 <desc>
5750 Login domain name supplied by the client.
5751 </desc>
5752 </attribute>
5753
5754 <attribute name="clientName" type="wstring" readonly="yes">
5755 <desc>
5756 The client name supplied by the client.
5757 </desc>
5758 </attribute>
5759
5760 <attribute name="clientIP" type="wstring" readonly="yes">
5761 <desc>
5762 The IP address of the client.
5763 </desc>
5764 </attribute>
5765
5766 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5767 <desc>
5768 The client software version number.
5769 </desc>
5770 </attribute>
5771
5772 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5773 <desc>
5774 Public key exchange method used when connection was established.
5775 Values: 0 - RDP4 public key exchange scheme.
5776 1 - X509 certificates were sent to client.
5777 </desc>
5778 </attribute>
5779
5780 </interface>
5781
5782 <interface
5783 name="IConsole" extends="$unknown"
5784 uuid="03cb7897-ea17-4e6c-81ae-4bd90be2fde2"
5785 wsmap="managed"
5786 >
5787 <desc>
5788 The IConsole interface represents an interface to control virtual
5789 machine execution.
5790
5791 A console object gets created when a machine has been locked for a
5792 particular session (client process) using <link to="IMachine::lockMachine" />
5793 or <link to="IMachine::launchVMProcess"/>. The console object can
5794 then be found in the session's <link to="ISession::console" /> attribute.
5795
5796 Methods of the IConsole interface allow the caller to query the current
5797 virtual machine execution state, pause the machine or power it down, save
5798 the machine state or take a snapshot, attach and detach removable media
5799 and so on.
5800
5801 <see>ISession</see>
5802 </desc>
5803
5804 <attribute name="machine" type="IMachine" readonly="yes">
5805 <desc>
5806 Machine object this console is sessioned with.
5807 <note>
5808 This is a convenience property, it has the same value as
5809 <link to="ISession::machine"/> of the corresponding session
5810 object.
5811 </note>
5812 </desc>
5813 </attribute>
5814
5815 <attribute name="state" type="MachineState" readonly="yes">
5816 <desc>
5817 Current execution state of the machine.
5818 <note>
5819 This property always returns the same value as the corresponding
5820 property of the IMachine object this console is sessioned with.
5821 For the process that owns (executes) the VM, this is the
5822 preferable way of querying the VM state, because no IPC
5823 calls are made.
5824 </note>
5825 </desc>
5826 </attribute>
5827
5828 <attribute name="guest" type="IGuest" readonly="yes">
5829 <desc>Guest object.</desc>
5830 </attribute>
5831
5832 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5833 <desc>
5834 Virtual keyboard object.
5835 <note>
5836 If the machine is not running, any attempt to use
5837 the returned object will result in an error.
5838 </note>
5839 </desc>
5840 </attribute>
5841
5842 <attribute name="mouse" type="IMouse" readonly="yes">
5843 <desc>
5844 Virtual mouse object.
5845 <note>
5846 If the machine is not running, any attempt to use
5847 the returned object will result in an error.
5848 </note>
5849 </desc>
5850 </attribute>
5851
5852 <attribute name="display" type="IDisplay" readonly="yes">
5853 <desc>Virtual display 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="debugger" type="IMachineDebugger" readonly="yes">
5862 <desc>Debugging interface.</desc>
5863 </attribute>
5864
5865 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
5866 <desc>
5867 Collection of USB devices currently attached to the virtual
5868 USB controller.
5869 <note>
5870 The collection is empty if the machine is not running.
5871 </note>
5872 </desc>
5873 </attribute>
5874
5875 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
5876 <desc>
5877 List of USB devices currently attached to the remote VRDP client.
5878 Once a new device is physically attached to the remote host computer,
5879 it appears in this list and remains there until detached.
5880 </desc>
5881 </attribute>
5882
5883 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
5884 <desc>
5885 Collection of shared folders for the current session. These folders
5886 are called transient shared folders because they are available to the
5887 guest OS running inside the associated virtual machine only for the
5888 duration of the session (as opposed to
5889 <link to="IMachine::sharedFolders"/> which represent permanent shared
5890 folders). When the session is closed (e.g. the machine is powered down),
5891 these folders are automatically discarded.
5892
5893 New shared folders are added to the collection using
5894 <link to="#createSharedFolder"/>. Existing shared folders can be
5895 removed using <link to="#removeSharedFolder"/>.
5896 </desc>
5897 </attribute>
5898
5899 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5900 <desc>
5901 Interface that provides information on Remote Display (VRDP) connection.
5902 </desc>
5903 </attribute>
5904
5905 <attribute name="eventSource" type="IEventSource" readonly="yes">
5906 <desc>
5907 Event source for console events.
5908 </desc>
5909 </attribute>
5910
5911 <method name="powerUp">
5912 <desc>
5913 Starts the virtual machine execution using the current machine
5914 state (that is, its current execution state, current settings and
5915 current storage devices).
5916
5917 <note>
5918 This method is only useful for front-ends that want to actually
5919 execute virtual machines in their own process (like the VirtualBox
5920 or VBoxSDL front-ends). Unless you are intending to write such a
5921 front-end, do not call this method. If you simply want to
5922 start virtual machine execution using one of the existing front-ends
5923 (for example the VirtualBox GUI or headless server), use
5924 <link to="IMachine::launchVMProcess"/> instead; these
5925 front-ends will power up the machine automatically for you.
5926 </note>
5927
5928 If the machine is powered off or aborted, the execution will
5929 start from the beginning (as if the real hardware were just
5930 powered on).
5931
5932 If the machine is in the <link to="MachineState_Saved"/> state,
5933 it will continue its execution the point where the state has
5934 been saved.
5935
5936 If the machine <link to="IMachine::teleporterEnabled"/> property is
5937 enabled on the machine being powered up, the machine will wait for an
5938 incoming teleportation in the <link to="MachineState_TeleportingIn"/>
5939 state. The returned progress object will have at least three
5940 operations where the last three are defined as: (1) powering up and
5941 starting TCP server, (2) waiting for incoming teleportations, and
5942 (3) perform teleportation. These operations will be reflected as the
5943 last three operations of the progress objected returned by
5944 <link to="IMachine::launchVMProcess"/> as well.
5945
5946 <see>#saveState</see>
5947
5948 <result name="VBOX_E_INVALID_VM_STATE">
5949 Virtual machine already running.
5950 </result>
5951 <result name="VBOX_E_HOST_ERROR">
5952 Host interface does not exist or name not set.
5953 </result>
5954 <result name="VBOX_E_FILE_ERROR">
5955 Invalid saved state file.
5956 </result>
5957 </desc>
5958 <param name="progress" type="IProgress" dir="return">
5959 <desc>Progress object to track the operation completion.</desc>
5960 </param>
5961 </method>
5962
5963 <method name="powerUpPaused">
5964 <desc>
5965 Identical to powerUp except that the VM will enter the
5966 <link to="MachineState_Paused"/> state, instead of
5967 <link to="MachineState_Running"/>.
5968
5969 <see>#powerUp</see>
5970 <result name="VBOX_E_INVALID_VM_STATE">
5971 Virtual machine already running.
5972 </result>
5973 <result name="VBOX_E_HOST_ERROR">
5974 Host interface does not exist or name not set.
5975 </result>
5976 <result name="VBOX_E_FILE_ERROR">
5977 Invalid saved state file.
5978 </result>
5979 </desc>
5980 <param name="progress" type="IProgress" dir="return">
5981 <desc>Progress object to track the operation completion.</desc>
5982 </param>
5983 </method>
5984
5985 <method name="powerDown">
5986 <desc>
5987 Initiates the power down procedure to stop the virtual machine
5988 execution.
5989
5990 The completion of the power down procedure is tracked using the returned
5991 IProgress object. After the operation is complete, the machine will go
5992 to the PoweredOff state.
5993 <result name="VBOX_E_INVALID_VM_STATE">
5994 Virtual machine must be Running, Paused or Stuck to be powered down.
5995 </result>
5996 </desc>
5997 <param name="progress" type="IProgress" dir="return">
5998 <desc>Progress object to track the operation completion.</desc>
5999 </param>
6000 </method>
6001
6002 <method name="reset">
6003 <desc>Resets the virtual machine.
6004 <result name="VBOX_E_INVALID_VM_STATE">
6005 Virtual machine not in Running state.
6006 </result>
6007 <result name="VBOX_E_VM_ERROR">
6008 Virtual machine error in reset operation.
6009 </result>
6010 </desc>
6011 </method>
6012
6013 <method name="pause">
6014 <desc>Pauses the virtual machine execution.
6015 <result name="VBOX_E_INVALID_VM_STATE">
6016 Virtual machine not in Running state.
6017 </result>
6018 <result name="VBOX_E_VM_ERROR">
6019 Virtual machine error in suspend operation.
6020 </result>
6021 </desc>
6022 </method>
6023
6024 <method name="resume">
6025 <desc>Resumes the virtual machine execution.
6026 <result name="VBOX_E_INVALID_VM_STATE">
6027 Virtual machine not in Paused state.
6028 </result>
6029 <result name="VBOX_E_VM_ERROR">
6030 Virtual machine error in resume operation.
6031 </result>
6032 </desc>
6033 </method>
6034
6035 <method name="powerButton">
6036 <desc>Sends the ACPI power button event to the guest.
6037 <result name="VBOX_E_INVALID_VM_STATE">
6038 Virtual machine not in Running state.
6039 </result>
6040 <result name="VBOX_E_PDM_ERROR">
6041 Controlled power off failed.
6042 </result>
6043 </desc>
6044 </method>
6045
6046 <method name="sleepButton">
6047 <desc>Sends the ACPI sleep button event to the guest.
6048 <result name="VBOX_E_INVALID_VM_STATE">
6049 Virtual machine not in Running state.
6050 </result>
6051 <result name="VBOX_E_PDM_ERROR">
6052 Sending sleep button event failed.
6053 </result>
6054 </desc>
6055 </method>
6056
6057 <method name="getPowerButtonHandled">
6058 <desc>Checks if the last power button event was handled by guest.
6059 <result name="VBOX_E_PDM_ERROR">
6060 Checking if the event was handled by the guest OS failed.
6061 </result>
6062 </desc>
6063 <param name="handled" type="boolean" dir="return"/>
6064 </method>
6065
6066 <method name="getGuestEnteredACPIMode">
6067 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6068 G1 (sleeping). If this method returns @c false, the guest will
6069 most likely not respond to external ACPI events.
6070 <result name="VBOX_E_INVALID_VM_STATE">
6071 Virtual machine not in Running state.
6072 </result>
6073 </desc>
6074 <param name="entered" type="boolean" dir="return"/>
6075 </method>
6076
6077 <method name="saveState">
6078 <desc>
6079 Saves the current execution state of a running virtual machine
6080 and stops its execution.
6081
6082 After this operation completes, the machine will go to the
6083 Saved state. Next time it is powered up, this state will
6084 be restored and the machine will continue its execution from
6085 the place where it was saved.
6086
6087 This operation differs from taking a snapshot to the effect
6088 that it doesn't create new differencing media. Also, once
6089 the machine is powered up from the state saved using this method,
6090 the saved state is deleted, so it will be impossible to return
6091 to this state later.
6092
6093 <note>
6094 On success, this method implicitly calls
6095 <link to="IMachine::saveSettings"/> to save all current machine
6096 settings (including runtime changes to the DVD medium, etc.).
6097 Together with the impossibility to change any VM settings when it is
6098 in the Saved state, this guarantees adequate hardware
6099 configuration of the machine when it is restored from the saved
6100 state file.
6101 </note>
6102
6103 <note>
6104 The machine must be in the Running or Paused state, otherwise
6105 the operation will fail.
6106 </note>
6107 <result name="VBOX_E_INVALID_VM_STATE">
6108 Virtual machine state neither Running nor Paused.
6109 </result>
6110 <result name="VBOX_E_FILE_ERROR">
6111 Failed to create directory for saved state file.
6112 </result>
6113
6114 <see><link to="#takeSnapshot"/></see>
6115 </desc>
6116 <param name="progress" type="IProgress" dir="return">
6117 <desc>Progress object to track the operation completion.</desc>
6118 </param>
6119 </method>
6120
6121 <method name="adoptSavedState">
6122 <desc>
6123 Associates the given saved state file to the virtual machine.
6124
6125 On success, the machine will go to the Saved state. Next time it is
6126 powered up, it will be restored from the adopted saved state and
6127 continue execution from the place where the saved state file was
6128 created.
6129
6130 The specified saved state file path may be absolute or relative to the
6131 folder the VM normally saves the state to (usually,
6132 <link to="IMachine::snapshotFolder"/>).
6133
6134 <note>
6135 It's a caller's responsibility to make sure the given saved state
6136 file is compatible with the settings of this virtual machine that
6137 represent its virtual hardware (memory size, storage disk configuration
6138 etc.). If there is a mismatch, the behavior of the virtual machine
6139 is undefined.
6140 </note>
6141 <result name="VBOX_E_INVALID_VM_STATE">
6142 Virtual machine state neither PoweredOff nor Aborted.
6143 </result>
6144 </desc>
6145 <param name="savedStateFile" type="wstring" dir="in">
6146 <desc>Path to the saved state file to adopt.</desc>
6147 </param>
6148 </method>
6149
6150 <method name="discardSavedState">
6151 <desc>
6152 Forcibly resets the machine to "Powered Off" state if it is
6153 currently in the "Saved" state (previously created by <link to="#saveState"/>)
6154 and deletes the file into which the machine state was saved.
6155 Next time the machine is powered up, a clean boot will occur.
6156 <note>
6157 This operation is equivalent to resetting or powering off
6158 the machine without doing a proper shutdown of the guest
6159 operating system; as with resetting a running phyiscal
6160 computer, it can can lead to data loss.
6161 </note>
6162 <result name="VBOX_E_INVALID_VM_STATE">
6163 Virtual machine not in state Saved.
6164 </result>
6165 </desc>
6166 </method>
6167
6168 <method name="getDeviceActivity">
6169 <desc>
6170 Gets the current activity type of a given device or device group.
6171 <result name="E_INVALIDARG">
6172 Invalid device type.
6173 </result>
6174 </desc>
6175 <param name="type" type="DeviceType" dir="in"/>
6176 <param name="activity" type="DeviceActivity" dir="return"/>
6177 </method>
6178
6179 <method name="attachUSBDevice">
6180 <desc>
6181 Attaches a host USB device with the given UUID to the
6182 USB controller of the virtual machine.
6183
6184 The device needs to be in one of the following states:
6185 <link to="USBDeviceState_Busy"/>,
6186 <link to="USBDeviceState_Available"/> or
6187 <link to="USBDeviceState_Held"/>,
6188 otherwise an error is immediately returned.
6189
6190 When the device state is
6191 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6192 be returned if the host computer refuses to release it for some reason.
6193
6194 <see>IUSBController::deviceFilters, USBDeviceState</see>
6195 <result name="VBOX_E_INVALID_VM_STATE">
6196 Virtual machine state neither Running nor Paused.
6197 </result>
6198 <result name="VBOX_E_PDM_ERROR">
6199 Virtual machine does not have a USB controller.
6200 </result>
6201 </desc>
6202 <param name="id" type="uuid" mod="string" dir="in">
6203 <desc>UUID of the host USB device to attach.</desc>
6204 </param>
6205 </method>
6206
6207 <method name="detachUSBDevice">
6208 <desc>
6209 Detaches an USB device with the given UUID from the USB controller
6210 of the virtual machine.
6211
6212 After this method succeeds, the VirtualBox server re-initiates
6213 all USB filters as if the device were just physically attached
6214 to the host, but filters of this machine are ignored to avoid
6215 a possible automatic re-attachment.
6216
6217 <see>IUSBController::deviceFilters, USBDeviceState</see>
6218
6219 <result name="VBOX_E_PDM_ERROR">
6220 Virtual machine does not have a USB controller.
6221 </result>
6222 <result name="E_INVALIDARG">
6223 USB device not attached to this virtual machine.
6224 </result>
6225 </desc>
6226 <param name="id" type="uuid" mod="string" dir="in">
6227 <desc>UUID of the USB device to detach.</desc>
6228 </param>
6229 <param name="device" type="IUSBDevice" dir="return">
6230 <desc>Detached USB device.</desc>
6231 </param>
6232 </method>
6233
6234 <method name="findUSBDeviceByAddress">
6235 <desc>
6236 Searches for a USB device with the given host address.
6237
6238 <result name="VBOX_E_OBJECT_NOT_FOUND">
6239 Given @c name does not correspond to any USB device.
6240 </result>
6241
6242 <see>IUSBDevice::address</see>
6243 </desc>
6244 <param name="name" type="wstring" dir="in">
6245 <desc>
6246 Address of the USB device (as assigned by the host) to
6247 search for.
6248 </desc>
6249 </param>
6250 <param name="device" type="IUSBDevice" dir="return">
6251 <desc>Found USB device object.</desc>
6252 </param>
6253 </method>
6254
6255 <method name="findUSBDeviceById">
6256 <desc>
6257 Searches for a USB device with the given UUID.
6258
6259 <result name="VBOX_E_OBJECT_NOT_FOUND">
6260 Given @c id does not correspond to any USB device.
6261 </result>
6262
6263 <see>IUSBDevice::id</see>
6264 </desc>
6265 <param name="id" type="uuid" mod="string" dir="in">
6266 <desc>UUID of the USB device to search for.</desc>
6267 </param>
6268 <param name="device" type="IUSBDevice" dir="return">
6269 <desc>Found USB device object.</desc>
6270 </param>
6271 </method>
6272
6273 <method name="createSharedFolder">
6274 <desc>
6275 Creates a transient new shared folder by associating the given logical
6276 name with the given host path, adds it to the collection of shared
6277 folders and starts sharing it. Refer to the description of
6278 <link to="ISharedFolder"/> to read more about logical names.
6279
6280 <result name="VBOX_E_INVALID_VM_STATE">
6281 Virtual machine in Saved state or currently changing state.
6282 </result>
6283 <result name="VBOX_E_FILE_ERROR">
6284 Shared folder already exists or not accessible.
6285 </result>
6286 </desc>
6287 <param name="name" type="wstring" dir="in">
6288 <desc>Unique logical name of the shared folder.</desc>
6289 </param>
6290 <param name="hostPath" type="wstring" dir="in">
6291 <desc>Full path to the shared folder in the host file system.</desc>
6292 </param>
6293 <param name="writable" type="boolean" dir="in">
6294 <desc>Whether the share is writable or readonly</desc>
6295 </param>
6296 <param name="automount" type="boolean" dir="in">
6297 <desc>Whether the share gets automatically mounted by the guest
6298 or not.</desc>
6299 </param>
6300 </method>
6301
6302 <method name="removeSharedFolder">
6303 <desc>
6304 Removes a transient shared folder with the given name previously
6305 created by <link to="#createSharedFolder"/> from the collection of
6306 shared folders and stops sharing it.
6307 <result name="VBOX_E_INVALID_VM_STATE">
6308 Virtual machine in Saved state or currently changing state.
6309 </result>
6310 <result name="VBOX_E_FILE_ERROR">
6311 Shared folder does not exists.
6312 </result>
6313 </desc>
6314 <param name="name" type="wstring" dir="in">
6315 <desc>Logical name of the shared folder to remove.</desc>
6316 </param>
6317 </method>
6318
6319 <method name="takeSnapshot">
6320 <desc>
6321 Saves the current execution state
6322 and all settings of the machine and creates differencing images
6323 for all normal (non-independent) media.
6324 See <link to="ISnapshot" /> for an introduction to snapshots.
6325
6326 This method can be called for a PoweredOff, Saved (see
6327 <link to="#saveState"/>), Running or
6328 Paused virtual machine. When the machine is PoweredOff, an
6329 offline snapshot is created. When the machine is Running a live
6330 snapshot is created, and an online snapshot is is created when Paused.
6331
6332 The taken snapshot is always based on the
6333 <link to="IMachine::currentSnapshot">current snapshot</link>
6334 of the associated virtual machine and becomes a new current snapshot.
6335
6336 <note>
6337 This method implicitly calls <link to="IMachine::saveSettings"/> to
6338 save all current machine settings before taking an offline snapshot.
6339 </note>
6340
6341 <result name="VBOX_E_INVALID_VM_STATE">
6342 Virtual machine currently changing state.
6343 </result>
6344 </desc>
6345 <param name="name" type="wstring" dir="in">
6346 <desc>Short name for the snapshot.</desc>
6347 </param>
6348 <param name="description" type="wstring" dir="in">
6349 <desc>Optional description of the snapshot.</desc>
6350 </param>
6351 <param name="progress" type="IProgress" dir="return">
6352 <desc>Progress object to track the operation completion.</desc>
6353 </param>
6354 </method>
6355
6356 <method name="deleteSnapshot">
6357 <desc>
6358 Starts deleting the specified snapshot asynchronously.
6359 See <link to="ISnapshot" /> for an introduction to snapshots.
6360
6361 The execution state and settings of the associated machine stored in
6362 the snapshot will be deleted. The contents of all differencing media of
6363 this snapshot will be merged with the contents of their dependent child
6364 media to keep the medium chain valid (in other words, all changes
6365 represented by media being deleted will be propagated to their child
6366 medium). After that, this snapshot's differencing medium will be
6367 deleted. The parent of this snapshot will become a new parent for all
6368 its child snapshots.
6369
6370 If the deleted snapshot is the current one, its parent snapshot will
6371 become a new current snapshot. The current machine state is not directly
6372 affected in this case, except that currently attached differencing
6373 media based on media of the deleted snapshot will be also merged as
6374 described above.
6375
6376 If the deleted snapshot is the first or current snapshot, then the
6377 respective IMachine attributes will be adjusted. Deleting the current
6378 snapshot will also implicitly call <link to="IMachine::saveSettings"/>
6379 to make all current machine settings permanent.
6380
6381 Deleting a snapshot has the following preconditions:
6382
6383 <ul>
6384 <li>Child media of all normal media of the deleted snapshot
6385 must be accessible (see <link to="IMedium::state"/>) for this
6386 operation to succeed. In particular, this means that all virtual
6387 machines, whose media are directly or indirectly based on the
6388 media of deleted snapshot, must be powered off.</li>
6389
6390 <li>You cannot delete the snapshot if a medium attached to it has
6391 more than once child medium (differencing images) because otherwise
6392 merging would be impossible. This might be the case if there is
6393 more than one child snapshot or differencing images were created
6394 for other reason (e.g. implicitly because of multiple machine
6395 attachments).</li>
6396 </ul>
6397
6398
6399 The virtual machine's <link to="IMachine::state">state</link> is
6400 changed to "DeletingSnapshot", "DeletingSnapshotOnline" or
6401 "DeletingSnapshotPaused" while this operation is in progress.
6402
6403 <note>
6404 Merging medium contents can be very time and disk space
6405 consuming, if these media are big in size and have many
6406 children. However, if the snapshot being deleted is the last
6407 (head) snapshot on the branch, the operation will be rather
6408 quick.
6409 </note>
6410 <result name="VBOX_E_INVALID_VM_STATE">
6411 The running virtual machine prevents deleting this snapshot. This
6412 happens only in very specific situations, usually snapshots can be
6413 deleted without trouble while a VM is running. The error message
6414 text explains the reason for the failure.
6415 </result>
6416 </desc>
6417 <param name="id" type="uuid" mod="string" dir="in">
6418 <desc>UUID of the snapshot to delete.</desc>
6419 </param>
6420 <param name="progress" type="IProgress" dir="return">
6421 <desc>Progress object to track the operation completion.</desc>
6422 </param>
6423 </method>
6424
6425 <method name="restoreSnapshot">
6426 <desc>
6427 Starts resetting the machine's current state to the state contained
6428 in the given snapshot, asynchronously. All current settings of the
6429 machine will be reset and changes stored in differencing media
6430 will be lost.
6431 See <link to="ISnapshot" /> for an introduction to snapshots.
6432
6433 After this operation is successfully completed, new empty differencing
6434 media are created for all normal media of the machine.
6435
6436 If the given snapshot is an online snapshot, the machine will go to
6437 the <link to="MachineState_Saved"> saved state</link>, so that the
6438 next time it is powered on, the execution state will be restored
6439 from the state of the snapshot.
6440
6441 <note>
6442 The machine must not be running, otherwise the operation will fail.
6443 </note>
6444
6445 <note>
6446 If the machine state is <link to="MachineState_Saved">Saved</link>
6447 prior to this operation, the saved state file will be implicitly
6448 deleted (as if <link to="IConsole::discardSavedState"/> were
6449 called).
6450 </note>
6451
6452 <result name="VBOX_E_INVALID_VM_STATE">
6453 Virtual machine is running.
6454 </result>
6455 </desc>
6456 <param name="snapshot" type="ISnapshot" dir="in">
6457 <desc>The snapshot to restore the VM state from.</desc>
6458 </param>
6459 <param name="progress" type="IProgress" dir="return">
6460 <desc>Progress object to track the operation completion.</desc>
6461 </param>
6462 </method>
6463
6464 <method name="teleport">
6465 <desc>
6466 Teleport the VM to a different host machine or process.
6467
6468 TODO explain the details.
6469
6470 <result name="VBOX_E_INVALID_VM_STATE">
6471 Virtual machine not running or paused.
6472 </result>
6473 </desc>
6474 <param name="hostname" type="wstring" dir="in">
6475 <desc>The name or IP of the host to teleport to.</desc>
6476 </param>
6477 <param name="tcpport" type="unsigned long" dir="in">
6478 <desc>The TCP port to connect to (1..65535).</desc>
6479 </param>
6480 <param name="password" type="wstring" dir="in">
6481 <desc>The password.</desc>
6482 </param>
6483 <param name="maxDowntime" type="unsigned long" dir="in">
6484 <desc>
6485 The maximum allowed downtime given as milliseconds. 0 is not a valid
6486 value. Recommended value: 250 ms.
6487
6488 The higher the value is, the greater the chance for a successful
6489 teleportation. A small value may easily result in the teleportation
6490 process taking hours and eventually fail.
6491
6492 <note>
6493 The current implementation treats this a guideline, not as an
6494 absolute rule.
6495 </note>
6496 </desc>
6497 </param>
6498 <param name="progress" type="IProgress" dir="return">
6499 <desc>Progress object to track the operation completion.</desc>
6500 </param>
6501 </method>
6502
6503 </interface>
6504
6505 <!--
6506 // IHost
6507 /////////////////////////////////////////////////////////////////////////
6508 -->
6509
6510 <enum
6511 name="HostNetworkInterfaceMediumType"
6512 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6513 >
6514 <desc>
6515 Type of encapsulation. Ethernet encapsulation includes both wired and
6516 wireless Ethernet connections.
6517 <see>IHostNetworkInterface</see>
6518 </desc>
6519
6520 <const name="Unknown" value="0">
6521 <desc>
6522 The type of interface cannot be determined.
6523 </desc>
6524 </const>
6525 <const name="Ethernet" value="1">
6526 <desc>
6527 Ethernet frame encapsulation.
6528 </desc>
6529 </const>
6530 <const name="PPP" value="2">
6531 <desc>
6532 Point-to-point protocol encapsulation.
6533 </desc>
6534 </const>
6535 <const name="SLIP" value="3">
6536 <desc>
6537 Serial line IP encapsulation.
6538 </desc>
6539 </const>
6540 </enum>
6541
6542 <enum
6543 name="HostNetworkInterfaceStatus"
6544 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6545 >
6546 <desc>
6547 Current status of the interface.
6548 <see>IHostNetworkInterface</see>
6549 </desc>
6550
6551 <const name="Unknown" value="0">
6552 <desc>
6553 The state of interface cannot be determined.
6554 </desc>
6555 </const>
6556 <const name="Up" value="1">
6557 <desc>
6558 The interface is fully operational.
6559 </desc>
6560 </const>
6561 <const name="Down" value="2">
6562 <desc>
6563 The interface is not functioning.
6564 </desc>
6565 </const>
6566 </enum>
6567
6568 <enum
6569 name="HostNetworkInterfaceType"
6570 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6571 >
6572 <desc>
6573 Network interface type.
6574 </desc>
6575 <const name="Bridged" value="1"/>
6576 <const name="HostOnly" value="2"/>
6577 </enum>
6578
6579 <interface
6580 name="IHostNetworkInterface" extends="$unknown"
6581 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6582 wsmap="managed"
6583 >
6584 <desc>
6585 Represents one of host's network interfaces. IP V6 address and network
6586 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6587 separated by colons.
6588 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6589 </desc>
6590 <attribute name="name" type="wstring" readonly="yes">
6591 <desc>Returns the host network interface name.</desc>
6592 </attribute>
6593
6594 <attribute name="id" type="uuid" mod="string" readonly="yes">
6595 <desc>Returns the interface UUID.</desc>
6596 </attribute>
6597
6598 <attribute name="networkName" type="wstring" readonly="yes">
6599 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6600 </attribute>
6601
6602 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6603 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6604 </attribute>
6605
6606 <attribute name="IPAddress" type="wstring" readonly="yes">
6607 <desc>Returns the IP V4 address of the interface.</desc>
6608 </attribute>
6609
6610 <attribute name="networkMask" type="wstring" readonly="yes">
6611 <desc>Returns the network mask of the interface.</desc>
6612 </attribute>
6613
6614 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6615 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6616 </attribute>
6617
6618 <attribute name="IPV6Address" type="wstring" readonly="yes">
6619 <desc>Returns the IP V6 address of the interface.</desc>
6620 </attribute>
6621
6622 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6623 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6624 </attribute>
6625
6626 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6627 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6628 </attribute>
6629
6630 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6631 <desc>Type of protocol encapsulation used.</desc>
6632 </attribute>
6633
6634 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6635 <desc>Status of the interface.</desc>
6636 </attribute>
6637
6638 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6639 <desc>specifies the host interface type.</desc>
6640 </attribute>
6641
6642 <method name="enableStaticIpConfig">
6643 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6644 <param name="IPAddress" type="wstring" dir="in">
6645 <desc>
6646 IP address.
6647 </desc>
6648 </param>
6649 <param name="networkMask" type="wstring" dir="in">
6650 <desc>
6651 network mask.
6652 </desc>
6653 </param>
6654 </method>
6655
6656 <method name="enableStaticIpConfigV6">
6657 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6658 <param name="IPV6Address" type="wstring" dir="in">
6659 <desc>
6660 IP address.
6661 </desc>
6662 </param>
6663 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6664 <desc>
6665 network mask.
6666 </desc>
6667 </param>
6668 </method>
6669
6670 <method name="enableDynamicIpConfig">
6671 <desc>enables the dynamic IP configuration.</desc>
6672 </method>
6673
6674 <method name="dhcpRediscover">
6675 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6676 </method>
6677
6678 </interface>
6679
6680 <interface
6681 name="IHost" extends="$unknown"
6682 uuid="35b004f4-7806-4009-bfa8-d1308adba7e5"
6683 wsmap="managed"
6684 >
6685 <desc>
6686 The IHost interface represents the physical machine that this VirtualBox
6687 installation runs on.
6688
6689 An object implementing this interface is returned by the
6690 <link to="IVirtualBox::host" /> attribute. This interface contains
6691 read-only information about the host's physical hardware (such as what
6692 processors and disks are available, what the host operating system is,
6693 and so on) and also allows for manipulating some of the host's hardware,
6694 such as global USB device filters and host interface networking.
6695
6696 </desc>
6697 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
6698 <desc>List of DVD drives available on the host.</desc>
6699 </attribute>
6700
6701 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
6702 <desc>List of floppy drives available on the host.</desc>
6703 </attribute>
6704
6705 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6706 <desc>
6707 List of USB devices currently attached to the host.
6708 Once a new device is physically attached to the host computer,
6709 it appears in this list and remains there until detached.
6710
6711 <note>
6712 If USB functionality is not available in the given edition of
6713 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6714 </note>
6715 </desc>
6716 </attribute>
6717
6718 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
6719 <desc>
6720 List of USB device filters in action.
6721 When a new device is physically attached to the host computer,
6722 filters from this list are applied to it (in order they are stored
6723 in the list). The first matched filter will determine the
6724 <link to="IHostUSBDeviceFilter::action">action</link>
6725 performed on the device.
6726
6727 Unless the device is ignored by these filters, filters of all
6728 currently running virtual machines
6729 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6730
6731 <note>
6732 If USB functionality is not available in the given edition of
6733 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6734 </note>
6735
6736 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6737 </desc>
6738 </attribute>
6739
6740 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6741 <desc>List of host network interfaces currently defined on the host.</desc>
6742 </attribute>
6743
6744 <attribute name="processorCount" type="unsigned long" readonly="yes">
6745 <desc>Number of (logical) CPUs installed in the host system.</desc>
6746 </attribute>
6747
6748 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6749 <desc>Number of (logical) CPUs online in the host system.</desc>
6750 </attribute>
6751
6752 <attribute name="processorCoreCount" type="unsigned long" readonly="yes">
6753 <desc>Number of physical processor cores installed in the host system.</desc>
6754 </attribute>
6755
6756 <method name="getProcessorSpeed">
6757 <desc>Query the (approximate) maximum speed of a specified host CPU in
6758 Megahertz.
6759 </desc>
6760 <param name="cpuId" type="unsigned long" dir="in">
6761 <desc>
6762 Identifier of the CPU.
6763 </desc>
6764 </param>
6765 <param name="speed" type="unsigned long" dir="return">
6766 <desc>
6767 Speed value. 0 is returned if value is not known or @a cpuId is
6768 invalid.
6769 </desc>
6770 </param>
6771 </method>
6772
6773 <method name="getProcessorFeature">
6774 <desc>Query whether a CPU feature is supported or not.</desc>
6775 <param name="feature" type="ProcessorFeature" dir="in">
6776 <desc>
6777 CPU Feature identifier.
6778 </desc>
6779 </param>
6780 <param name="supported" type="boolean" dir="return">
6781 <desc>
6782 Feature is supported or not.
6783 </desc>
6784 </param>
6785 </method>
6786
6787 <method name="getProcessorDescription">
6788 <desc>Query the model string of a specified host CPU.
6789 </desc>
6790 <param name="cpuId" type="unsigned long" dir="in">
6791 <desc>
6792 Identifier of the CPU.
6793 <note>
6794 The current implementation might not necessarily return the
6795 description for this exact CPU.
6796 </note>
6797 </desc>
6798 </param>
6799 <param name="description" type="wstring" dir="return">
6800 <desc>
6801 Model string. An empty string is returned if value is not known or
6802 @a cpuId is invalid.
6803 </desc>
6804 </param>
6805 </method>
6806
6807 <method name="getProcessorCPUIDLeaf">
6808 <desc>
6809 Returns the CPU cpuid information for the specified leaf.
6810 </desc>
6811 <param name="cpuId" type="unsigned long" dir="in">
6812 <desc>
6813 Identifier of the CPU. The CPU most be online.
6814 <note>
6815 The current implementation might not necessarily return the
6816 description for this exact CPU.
6817 </note>
6818 </desc>
6819 </param>
6820 <param name="leaf" type="unsigned long" dir="in">
6821 <desc>
6822 CPUID leaf index (eax).
6823 </desc>
6824 </param>
6825 <param name="subLeaf" type="unsigned long" dir="in">
6826 <desc>
6827 CPUID leaf sub index (ecx). This currently only applies to cache
6828 information on Intel CPUs. Use 0 if retriving values for
6829 <link to="IMachine::setCPUIDLeaf"/>.
6830 </desc>
6831 </param>
6832 <param name="valEax" type="unsigned long" dir="out">
6833 <desc>
6834 CPUID leaf value for register eax.
6835 </desc>
6836 </param>
6837 <param name="valEbx" type="unsigned long" dir="out">
6838 <desc>
6839 CPUID leaf value for register ebx.
6840 </desc>
6841 </param>
6842 <param name="valEcx" type="unsigned long" dir="out">
6843 <desc>
6844 CPUID leaf value for register ecx.
6845 </desc>
6846 </param>
6847 <param name="valEdx" type="unsigned long" dir="out">
6848 <desc>
6849 CPUID leaf value for register edx.
6850 </desc>
6851 </param>
6852 </method>
6853
6854 <attribute name="memorySize" type="unsigned long" readonly="yes">
6855 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6856 </attribute>
6857
6858 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6859 <desc>Available system memory in the host system.</desc>
6860 </attribute>
6861
6862 <attribute name="operatingSystem" type="wstring" readonly="yes">
6863 <desc>Name of the host system's operating system.</desc>
6864 </attribute>
6865
6866 <attribute name="OSVersion" type="wstring" readonly="yes">
6867 <desc>Host operating system's version string.</desc>
6868 </attribute>
6869
6870 <attribute name="UTCTime" type="long long" readonly="yes">
6871 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6872 </attribute>
6873
6874 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
6875 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
6876 </attribute>
6877
6878 <method name="createHostOnlyNetworkInterface">
6879 <desc>
6880 Creates a new adapter for Host Only Networking.
6881 <result name="E_INVALIDARG">
6882 Host network interface @a name already exists.
6883 </result>
6884 </desc>
6885 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6886 <desc>
6887 Created host interface object.
6888 </desc>
6889 </param>
6890 <param name="progress" type="IProgress" dir="return">
6891 <desc>
6892 Progress object to track the operation completion.
6893 </desc>
6894 </param>
6895 </method>
6896
6897 <method name="removeHostOnlyNetworkInterface">
6898 <desc>
6899 Removes the given Host Only Networking interface.
6900 <result name="VBOX_E_OBJECT_NOT_FOUND">
6901 No host network interface matching @a id found.
6902 </result>
6903 </desc>
6904 <param name="id" type="uuid" mod="string" dir="in">
6905 <desc>
6906 Adapter GUID.
6907 </desc>
6908 </param>
6909 <param name="progress" type="IProgress" dir="return">
6910 <desc>
6911 Progress object to track the operation completion.
6912 </desc>
6913 </param>
6914 </method>
6915
6916 <method name="createUSBDeviceFilter">
6917 <desc>
6918 Creates a new USB device filter. All attributes except
6919 the filter name are set to empty (any match),
6920 <i>active</i> is @c false (the filter is not active).
6921
6922 The created filter can be added to the list of filters using
6923 <link to="#insertUSBDeviceFilter"/>.
6924
6925 <see>#USBDeviceFilters</see>
6926 </desc>
6927 <param name="name" type="wstring" dir="in">
6928 <desc>
6929 Filter name. See <link to="IUSBDeviceFilter::name"/> for more information.
6930 </desc>
6931 </param>
6932 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6933 <desc>Created filter object.</desc>
6934 </param>
6935 </method>
6936
6937 <method name="insertUSBDeviceFilter">
6938 <desc>
6939 Inserts the given USB device to the specified position
6940 in the list of filters.
6941
6942 Positions are numbered starting from @c 0. If the specified
6943 position is equal to or greater than the number of elements in
6944 the list, the filter is added at the end of the collection.
6945
6946 <note>
6947 Duplicates are not allowed, so an attempt to insert a
6948 filter already in the list is an error.
6949 </note>
6950 <note>
6951 If USB functionality is not available in the given edition of
6952 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6953 </note>
6954
6955 <see>#USBDeviceFilters</see>
6956
6957 <result name="VBOX_E_INVALID_OBJECT_STATE">
6958 USB device filter is not created within this VirtualBox instance.
6959 </result>
6960 <result name="E_INVALIDARG">
6961 USB device filter already in list.
6962 </result>
6963
6964 </desc>
6965 <param name="position" type="unsigned long" dir="in">
6966 <desc>Position to insert the filter to.</desc>
6967 </param>
6968 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
6969 <desc>USB device filter to insert.</desc>
6970 </param>
6971 </method>
6972
6973 <method name="removeUSBDeviceFilter">
6974 <desc>
6975 Removes a USB device filter from the specified position in the
6976 list of filters.
6977
6978 Positions are numbered starting from @c 0. Specifying a
6979 position equal to or greater than the number of elements in
6980 the list will produce an error.
6981
6982 <note>
6983 If USB functionality is not available in the given edition of
6984 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6985 </note>
6986
6987 <see>#USBDeviceFilters</see>
6988
6989 <result name="E_INVALIDARG">
6990 USB device filter list empty or invalid @a position.
6991 </result>
6992
6993 </desc>
6994 <param name="position" type="unsigned long" dir="in">
6995 <desc>Position to remove the filter from.</desc>
6996 </param>
6997 </method>
6998
6999 <method name="findHostDVDDrive">
7000 <desc>
7001 Searches for a host DVD drive with the given @c name.
7002
7003 <result name="VBOX_E_OBJECT_NOT_FOUND">
7004 Given @c name does not correspond to any host drive.
7005 </result>
7006
7007 </desc>
7008 <param name="name" type="wstring" dir="in">
7009 <desc>Name of the host drive to search for</desc>
7010 </param>
7011 <param name="drive" type="IMedium" dir="return">
7012 <desc>Found host drive object</desc>
7013 </param>
7014 </method>
7015
7016 <method name="findHostFloppyDrive">
7017 <desc>
7018 Searches for a host floppy 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 floppy drive.
7022 </result>
7023
7024 </desc>
7025 <param name="name" type="wstring" dir="in">
7026 <desc>Name of the host floppy drive to search for</desc>
7027 </param>
7028 <param name="drive" type="IMedium" dir="return">
7029 <desc>Found host floppy drive object</desc>
7030 </param>
7031 </method>
7032
7033 <method name="findHostNetworkInterfaceByName">
7034 <desc>
7035 Searches through all host network interfaces for an interface with
7036 the given @c name.
7037 <note>
7038 The method returns an error if the given @c name does not
7039 correspond to any host network interface.
7040 </note>
7041 </desc>
7042 <param name="name" type="wstring" dir="in">
7043 <desc>Name of the host network interface to search for.</desc>
7044 </param>
7045 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7046 <desc>Found host network interface object.</desc>
7047 </param>
7048 </method>
7049 <method name="findHostNetworkInterfaceById">
7050 <desc>
7051 Searches through all host network interfaces for an interface with
7052 the given GUID.
7053 <note>
7054 The method returns an error if the given GUID does not
7055 correspond to any host network interface.
7056 </note>
7057 </desc>
7058 <param name="id" type="uuid" mod="string" dir="in">
7059 <desc>GUID of the host network interface to search for.</desc>
7060 </param>
7061 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7062 <desc>Found host network interface object.</desc>
7063 </param>
7064 </method>
7065 <method name="findHostNetworkInterfacesOfType">
7066 <desc>
7067 Searches through all host network interfaces and returns a list of interfaces of the specified type
7068 </desc>
7069 <param name="type" type="HostNetworkInterfaceType" dir="in">
7070 <desc>type of the host network interfaces to search for.</desc>
7071 </param>
7072 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7073 <desc>Found host network interface objects.</desc>
7074 </param>
7075 </method>
7076
7077 <method name="findUSBDeviceById">
7078 <desc>
7079 Searches for a USB device with the given UUID.
7080
7081 <result name="VBOX_E_OBJECT_NOT_FOUND">
7082 Given @c id does not correspond to any USB device.
7083 </result>
7084
7085 <see>IHostUSBDevice::id</see>
7086 </desc>
7087 <param name="id" type="uuid" mod="string" dir="in">
7088 <desc>UUID of the USB device to search for.</desc>
7089 </param>
7090 <param name="device" type="IHostUSBDevice" dir="return">
7091 <desc>Found USB device object.</desc>
7092 </param>
7093 </method>
7094
7095 <method name="findUSBDeviceByAddress">
7096 <desc>
7097 Searches for a USB device with the given host address.
7098
7099 <result name="VBOX_E_OBJECT_NOT_FOUND">
7100 Given @c name does not correspond to any USB device.
7101 </result>
7102
7103 <see>IHostUSBDevice::address</see>
7104 </desc>
7105 <param name="name" type="wstring" dir="in">
7106 <desc>
7107 Address of the USB device (as assigned by the host) to
7108 search for.
7109 </desc>
7110 </param>
7111 <param name="device" type="IHostUSBDevice" dir="return">
7112 <desc>Found USB device object.</desc>
7113 </param>
7114 </method>
7115
7116 </interface>
7117
7118 <!--
7119 // ISystemProperties
7120 /////////////////////////////////////////////////////////////////////////
7121 -->
7122
7123 <interface
7124 name="ISystemProperties"
7125 extends="$unknown"
7126 uuid="07c3ffd8-8f59-49cc-b608-53a332e85cc3"
7127 wsmap="managed"
7128 >
7129 <desc>
7130 The ISystemProperties interface represents global properties of the given
7131 VirtualBox installation.
7132
7133 These properties define limits and default values for various attributes
7134 and parameters. Most of the properties are read-only, but some can be
7135 changed by a user.
7136 </desc>
7137
7138 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7139 <desc>Minimum guest system memory in Megabytes.</desc>
7140 </attribute>
7141
7142 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7143 <desc>Maximum guest system memory in Megabytes.</desc>
7144 </attribute>
7145
7146 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7147 <desc>Minimum guest video memory in Megabytes.</desc>
7148 </attribute>
7149
7150 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7151 <desc>Maximum guest video memory in Megabytes.</desc>
7152 </attribute>
7153
7154 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7155 <desc>Minimum CPU count.</desc>
7156 </attribute>
7157
7158 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7159 <desc>Maximum CPU count.</desc>
7160 </attribute>
7161
7162 <attribute name="maxGuestMonitors" type="unsigned long" readonly="yes">
7163 <desc>Maximum of monitors which could be connected.</desc>
7164 </attribute>
7165
7166 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7167 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7168 </attribute>
7169
7170 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7171 <desc>
7172 Number of network adapters associated with every
7173 <link to="IMachine"/> instance.
7174 </desc>
7175 </attribute>
7176
7177 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7178 <desc>
7179 Number of serial ports associated with every
7180 <link to="IMachine"/> instance.
7181 </desc>
7182 </attribute>
7183
7184 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7185 <desc>
7186 Number of parallel ports associated with every
7187 <link to="IMachine"/> instance.
7188 </desc>
7189 </attribute>
7190
7191 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7192 <desc>
7193 Maximum device position in the boot order. This value corresponds
7194 to the total number of devices a machine can boot from, to make it
7195 possible to include all possible devices to the boot list.
7196 <see><link to="IMachine::setBootOrder"/></see>
7197 </desc>
7198 </attribute>
7199
7200 <attribute name="defaultMachineFolder" type="wstring">
7201 <desc>
7202 Full path to the default directory used to create new or open
7203 existing machines when a settings file name contains no
7204 path.
7205
7206 The initial value of this property is
7207 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7208 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7209
7210 <note>
7211 Setting this property to @c null or an empty string will restore the
7212 initial value.
7213 </note>
7214 <note>
7215 When settings this property, the specified path can be
7216 absolute (full path) or relative
7217 to the <link to="IVirtualBox::homeFolder">
7218 VirtualBox home directory</link>.
7219 When reading this property, a full path is
7220 always returned.
7221 </note>
7222 <note>
7223 The specified path may not exist, it will be created
7224 when necessary.
7225 </note>
7226
7227 <see>
7228 <link to="IVirtualBox::createMachine"/>,
7229 <link to="IVirtualBox::openMachine"/>
7230 </see>
7231 </desc>
7232 </attribute>
7233
7234 <attribute name="defaultHardDiskFolder" type="wstring">
7235 <desc>
7236 Full path to the default directory used to create new or open existing
7237 virtual disks.
7238
7239 This path is used when the storage unit of a hard disk is a regular file
7240 in the host's file system and only a file name that contains no path is
7241 given.
7242
7243 The initial value of this property is
7244 <tt>&lt;</tt>
7245 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7246 <tt>&gt;/HardDisks</tt>.
7247
7248 <note>
7249 Setting this property to @c null or empty string will restore the
7250 initial value.
7251 </note>
7252 <note>
7253 When settings this property, the specified path can be relative
7254 to the
7255 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7256 absolute. When reading this property, a full path is
7257 always returned.
7258 </note>
7259 <note>
7260 The specified path may not exist, it will be created
7261 when necessary.
7262 </note>
7263
7264 <see>
7265 IMedium,
7266 <link to="IVirtualBox::createHardDisk"/>,
7267 <link to="IVirtualBox::openMedium"/>,
7268 <link to="IMedium::location"/>
7269 </see>
7270 </desc>
7271 </attribute>
7272
7273 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7274 <desc>
7275 List of all medium storage formats supported by this VirtualBox
7276 installation.
7277
7278 Keep in mind that the medium format identifier
7279 (<link to="IMediumFormat::id"/>) used in other API calls like
7280 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7281 medium format is a case-insensitive string. This means that, for
7282 example, all of the following strings:
7283 <pre>
7284 "VDI"
7285 "vdi"
7286 "VdI"</pre>
7287 refer to the same medium format.
7288
7289 Note that the virtual medium framework is backend-based, therefore
7290 the list of supported formats depends on what backends are currently
7291 installed.
7292
7293 <see>
7294 <link to="IMediumFormat"/>,
7295 </see>
7296 </desc>
7297 </attribute>
7298
7299 <attribute name="defaultHardDiskFormat" type="wstring">
7300 <desc>
7301 Identifier of the default medium format used by VirtualBox.
7302
7303 The medium format set by this attribute is used by VirtualBox
7304 when the medium format was not specified explicitly. One example is
7305 <link to="IVirtualBox::createHardDisk"/> with the empty
7306 format argument. A more complex example is implicit creation of
7307 differencing media when taking a snapshot of a virtual machine:
7308 this operation will try to use a format of the parent medium first
7309 and if this format does not support differencing media the default
7310 format specified by this argument will be used.
7311
7312 The list of supported medium formats may be obtained by the
7313 <link to="#mediumFormats"/> call. Note that the default medium
7314 format must have a capability to create differencing media;
7315 otherwise operations that create media implicitly may fail
7316 unexpectedly.
7317
7318 The initial value of this property is <tt>"VDI"</tt> in the current
7319 version of the VirtualBox product, but may change in the future.
7320
7321 <note>
7322 Setting this property to @c null or empty string will restore the
7323 initial value.
7324 </note>
7325
7326 <see>
7327 <link to="#mediumFormats"/>,
7328 <link to="IMediumFormat::id"/>,
7329 <link to="IVirtualBox::createHardDisk"/>
7330 </see>
7331 </desc>
7332 </attribute>
7333
7334 <attribute name="freeDiskSpaceWarning" type="unsigned long long">
7335 <desc>Issue a warning if the free disk space is below (or in some disk
7336 intensive operation is expected to go below) the given size in
7337 Megabytes.</desc>
7338 </attribute>
7339
7340 <attribute name="freeDiskSpacePercentWarning" type="unsigned long">
7341 <desc>Issue a warning if the free disk space is below (or in some disk
7342 intensive operation is expected to go below) the given percentage.</desc>
7343 </attribute>
7344
7345 <attribute name="freeDiskSpaceError" type="unsigned long long">
7346 <desc>Issue an error if the free disk space is below (or in some disk
7347 intensive operation is expected to go below) the given size in
7348 Megabytes.</desc>
7349 </attribute>
7350
7351 <attribute name="freeDiskSpacePercentError" type="unsigned long">
7352 <desc>Issue an error if the free disk space is below (or in some disk
7353 intensive operation is expected to go below) the given percentage.</desc>
7354 </attribute>
7355
7356 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7357 <desc>
7358 Library that provides authentication for VRDP clients. The library
7359 is used if a virtual machine's authentication type is set to "external"
7360 in the VM RemoteDisplay configuration.
7361
7362 The system library extension (".DLL" or ".so") must be omitted.
7363 A full path can be specified; if not, then the library must reside on the
7364 system's default library path.
7365
7366 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7367 of that name in one of the default VirtualBox library directories.
7368
7369 For details about VirtualBox authentication libraries and how to implement
7370 them, please refer to the VirtualBox manual.
7371
7372 <note>
7373 Setting this property to @c null or empty string will restore the
7374 initial value.
7375 </note>
7376 </desc>
7377 </attribute>
7378
7379 <attribute name="webServiceAuthLibrary" type="wstring">
7380 <desc>
7381 Library that provides authentication for webservice clients. The library
7382 is used if a virtual machine's authentication type is set to "external"
7383 in the VM RemoteDisplay configuration and will be called from
7384 within the <link to="IWebsessionManager::logon" /> implementation.
7385
7386 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7387 there is no per-VM setting for this, as the webservice is a global
7388 resource (if it is running). Only for this setting (for the webservice),
7389 setting this value to a literal <tt>"null"</tt> string disables authentication,
7390 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7391 no matter what user name and password are supplied.
7392
7393 The initial value of this property is <tt>"VRDPAuth"</tt>,
7394 meaning that the webservice will use the same authentication
7395 library that is used by default for VBoxVRDP (again, see
7396 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7397 The format and calling convention of authentication libraries
7398 is the same for the webservice as it is for VBoxVRDP.
7399
7400 <note>
7401 Setting this property to @c null or empty string will restore the
7402 initial value.
7403 </note>
7404 </desc>
7405 </attribute>
7406
7407 <attribute name="LogHistoryCount" type="unsigned long">
7408 <desc>
7409 This value specifies how many old release log files are kept.
7410 </desc>
7411 </attribute>
7412
7413 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7414 <desc>This value hold the default audio driver for the current
7415 system.</desc>
7416 </attribute>
7417
7418 <method name="getMaxDevicesPerPortForStorageBus">
7419 <desc>Returns the maximum number of devices which can be attached to a port
7420 for the given storage bus.</desc>
7421
7422 <param name="bus" type="StorageBus" dir="in">
7423 <desc>The storage bus type to get the value for.</desc>
7424 </param>
7425
7426 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
7427 <desc>The maximum number of devices which can eb attached to the port for the given
7428 storage bus.</desc>
7429 </param>
7430 </method>
7431
7432 <method name="getMinPortCountForStorageBus">
7433 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
7434
7435 <param name="bus" type="StorageBus" dir="in">
7436 <desc>The storage bus type to get the value for.</desc>
7437 </param>
7438
7439 <param name="minPortCount" type="unsigned long" dir="return">
7440 <desc>The minimum number of ports for the given storage bus.</desc>
7441 </param>
7442 </method>
7443
7444 <method name="getMaxPortCountForStorageBus">
7445 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
7446
7447 <param name="bus" type="StorageBus" dir="in">
7448 <desc>The storage bus type to get the value for.</desc>
7449 </param>
7450
7451 <param name="maxPortCount" type="unsigned long" dir="return">
7452 <desc>The maximum number of ports for the given storage bus.</desc>
7453 </param>
7454 </method>
7455
7456 <method name="getMaxInstancesOfStorageBus">
7457 <desc>Returns the maximum number of storage bus instances which
7458 can be configured for each VM. This corresponds to the number of
7459 storage controllers one can have.</desc>
7460
7461 <param name="bus" type="StorageBus" dir="in">
7462 <desc>The storage bus type to get the value for.</desc>
7463 </param>
7464
7465 <param name="maxInstances" type="unsigned long" dir="return">
7466 <desc>The maximum number of instances for the given storage bus.</desc>
7467 </param>
7468 </method>
7469
7470 <method name="getDeviceTypesForStorageBus">
7471 <desc>Returns list of all the supported device types
7472 (<link to="DeviceType"/>) for the given type of storage
7473 bus.</desc>
7474
7475 <param name="bus" type="StorageBus" dir="in">
7476 <desc>The storage bus type to get the value for.</desc>
7477 </param>
7478
7479 <param name="deviceTypes" type="DeviceType" safearray="yes" dir="return">
7480 <desc>The list of all supported device types for the given storage bus.</desc>
7481 </param>
7482 </method>
7483 </interface>
7484
7485 <!--
7486 // IGuest
7487 /////////////////////////////////////////////////////////////////////////
7488 -->
7489
7490 <interface
7491 name="IGuestOSType" extends="$unknown"
7492 uuid="e3f6727e-a09b-41ea-a824-864a176472f3"
7493 wsmap="struct"
7494 >
7495 <desc>
7496 </desc>
7497
7498 <attribute name="familyId" type="wstring" readonly="yes">
7499 <desc>Guest OS family identifier string.</desc>
7500 </attribute>
7501
7502 <attribute name="familyDescription" type="wstring" readonly="yes">
7503 <desc>Human readable description of the guest OS family.</desc>
7504 </attribute>
7505
7506 <attribute name="id" type="wstring" readonly="yes">
7507 <desc>Guest OS identifier string.</desc>
7508 </attribute>
7509
7510 <attribute name="description" type="wstring" readonly="yes">
7511 <desc>Human readable description of the guest OS.</desc>
7512 </attribute>
7513
7514 <attribute name="is64Bit" type="boolean" readonly="yes">
7515 <desc>Returns @c true if the given OS is 64-bit</desc>
7516 </attribute>
7517
7518 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7519 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7520 </attribute>
7521
7522 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7523 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7524 </attribute>
7525
7526 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7527 <desc>Recommended RAM size in Megabytes.</desc>
7528 </attribute>
7529
7530 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7531 <desc>Recommended video RAM size in Megabytes.</desc>
7532 </attribute>
7533
7534 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7535 <desc>Recommended hard disk size in Megabytes.</desc>
7536 </attribute>
7537
7538 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7539 <desc>Returns recommended network adapter for this OS type.</desc>
7540 </attribute>
7541
7542 <attribute name="recommendedPae" type="boolean" readonly="yes">
7543 <desc>Returns @c true if using PAE is recommended for this OS type.</desc>
7544 </attribute>
7545
7546 <attribute name="recommendedDvdStorageController" type="StorageControllerType" readonly="yes">
7547 <desc>Recommended storage controller type for DVD/CD drives.</desc>
7548 </attribute>
7549
7550 <attribute name="recommendedDvdStorageBus" type="StorageBus" readonly="yes">
7551 <desc>Recommended storage bus type for DVD/CD drives.</desc>
7552 </attribute>
7553
7554 <attribute name="recommendedHdStorageController" type="StorageControllerType" readonly="yes">
7555 <desc>Recommended storage controller type for HD drives.</desc>
7556 </attribute>
7557
7558 <attribute name="recommendedHdStorageBus" type="StorageBus" readonly="yes">
7559 <desc>Recommended storage bus type for HD drives.</desc>
7560 </attribute>
7561
7562 <attribute name="recommendedFirmware" type="FirmwareType" readonly="yes">
7563 <desc>Recommended firmware type.</desc>
7564 </attribute>
7565
7566 <attribute name="recommendedUsbHid" type="boolean" readonly="yes">
7567 <desc>Returns @c true if using USB Human Interface Devices, such as keyboard and mouse recommended.</desc>
7568 </attribute>
7569
7570 <attribute name="recommendedHpet" type="boolean" readonly="yes">
7571 <desc>Returns @c true if using HPET is recommended for this OS type.</desc>
7572 </attribute>
7573
7574 <attribute name="recommendedUsbTablet" type="boolean" readonly="yes">
7575 <desc>Returns @c true if using a USB Tablet is recommended.</desc>
7576 </attribute>
7577
7578 <attribute name="recommendedRtcUseUtc" type="boolean" readonly="yes">
7579 <desc>Returns @c true if the RTC of this VM should be set to UTC</desc>
7580 </attribute>
7581
7582 </interface>
7583
7584 <interface
7585 name="IGuest" extends="$unknown"
7586 uuid="d915dff1-ed38-495a-91f1-ab6c53932468"
7587 wsmap="managed"
7588 >
7589 <desc>
7590 The IGuest interface represents information about the operating system
7591 running inside the virtual machine. Used in
7592 <link to="IConsole::guest"/>.
7593
7594 IGuest provides information about the guest operating system, whether
7595 Guest Additions are installed and other OS-specific virtual machine
7596 properties.
7597 </desc>
7598
7599 <attribute name="OSTypeId" type="wstring" readonly="yes">
7600 <desc>
7601 Identifier of the Guest OS type as reported by the Guest
7602 Additions.
7603 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7604 an IGuestOSType object representing details about the given
7605 Guest OS type.
7606 <note>
7607 If Guest Additions are not installed, this value will be
7608 the same as <link to="IMachine::OSTypeId"/>.
7609 </note>
7610 </desc>
7611 </attribute>
7612
7613 <attribute name="additionsActive" type="boolean" readonly="yes">
7614 <desc>
7615 Flag whether the Guest Additions are installed and active
7616 in which case their version will be returned by the
7617 <link to="#additionsVersion"/> property.
7618 </desc>
7619 </attribute>
7620
7621 <attribute name="additionsVersion" type="wstring" readonly="yes">
7622 <desc>
7623 Version of the Guest Additions including the revision (3 decimal numbers
7624 separated by dots + revision number) installed on the guest or empty
7625 when the Additions are not installed.
7626 </desc>
7627 </attribute>
7628
7629 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7630 <desc>
7631 Flag whether seamless guest display rendering (seamless desktop
7632 integration) is supported.
7633 </desc>
7634 </attribute>
7635
7636 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7637 <desc>
7638 Flag whether the guest is in graphics mode. If it is not, then
7639 seamless rendering will not work, resize hints are not immediately
7640 acted on and guest display resizes are probably not initiated by
7641 the guest additions.
7642 </desc>
7643 </attribute>
7644
7645 <attribute name="memoryBalloonSize" type="unsigned long">
7646 <desc>Guest system memory balloon size in megabytes (transient property).</desc>
7647 </attribute>
7648
7649 <attribute name="pageFusionEnabled" type="boolean">
7650 <desc>Flag whether page fusion is enabled or not.</desc>
7651 </attribute>
7652
7653 <attribute name="statisticsUpdateInterval" type="unsigned long">
7654 <desc>Interval to update guest statistics in seconds.</desc>
7655 </attribute>
7656
7657 <method name="internalGetStatistics">
7658 <desc>
7659 Internal method; do not use as it might change at any time
7660 </desc>
7661 <param name="cpuUser" type="unsigned long" dir="out">
7662 <desc>Percentage of processor time spent in user mode as seen by the guest</desc>
7663 </param>
7664 <param name="cpuKernel" type="unsigned long" dir="out">
7665 <desc>Percentage of processor time spent in kernel mode as seen by the guest</desc>
7666 </param>
7667 <param name="cpuIdle" type="unsigned long" dir="out">
7668 <desc>Percentage of processor time spent idling as seen by the guest</desc>
7669 </param>
7670 <param name="memTotal" type="unsigned long" dir="out">
7671 <desc>Total amount of physical guest RAM</desc>
7672 </param>
7673 <param name="memFree" type="unsigned long" dir="out">
7674 <desc>Free amount of physical guest RAM</desc>
7675 </param>
7676 <param name="memBalloon" type="unsigned long" dir="out">
7677 <desc>Amount of ballooned physical guest RAM</desc>
7678 </param>
7679 <param name="memShared" type="unsigned long" dir="out">
7680 <desc>Amount of shared physical guest RAM</desc>
7681 </param>
7682 <param name="memCache" type="unsigned long" dir="out">
7683 <desc>Total amount of guest (disk) cache memory</desc>
7684 </param>
7685 <param name="pagedTotal" type="unsigned long" dir="out">
7686 <desc>Total amount of space in the page file</desc>
7687 </param>
7688 <param name="memAllocTotal" type="unsigned long" dir="out">
7689 <desc>Total amount of memory allocated by the hypervisor</desc>
7690 </param>
7691 <param name="memFreeTotal" type="unsigned long" dir="out">
7692 <desc>Total amount of free memory available in the hypervisor</desc>
7693 </param>
7694 <param name="memBalloonTotal" type="unsigned long" dir="out">
7695 <desc>Total amount of memory ballooned by the hypervisor</desc>
7696 </param>
7697 <param name="memSharedTotal" type="unsigned long" dir="out">
7698 <desc>Total amount of shared memory in the hypervisor</desc>
7699 </param>
7700 </method>
7701
7702 <method name="setCredentials">
7703 <desc>
7704 Store login credentials that can be queried by guest operating
7705 systems with Additions installed. The credentials are transient
7706 to the session and the guest may also choose to erase them. Note
7707 that the caller cannot determine whether the guest operating system
7708 has queried or made use of the credentials.
7709
7710 <result name="VBOX_E_VM_ERROR">
7711 VMM device is not available.
7712 </result>
7713
7714 </desc>
7715 <param name="userName" type="wstring" dir="in">
7716 <desc>User name string, can be empty</desc>
7717 </param>
7718 <param name="password" type="wstring" dir="in">
7719 <desc>Password string, can be empty</desc>
7720 </param>
7721 <param name="domain" type="wstring" dir="in">
7722 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7723 </param>
7724 <param name="allowInteractiveLogon" type="boolean" dir="in">
7725 <desc>
7726 Flag whether the guest should alternatively allow the user to
7727 interactively specify different credentials. This flag might
7728 not be supported by all versions of the Additions.
7729 </desc>
7730 </param>
7731 </method>
7732
7733 <method name="executeProcess">
7734 <desc>
7735 Executes an existing program inside the guest VM.
7736
7737 <result name="VBOX_E_IPRT_ERROR">
7738 Could not execute process.
7739 </result>
7740
7741 </desc>
7742 <param name="execName" type="wstring" dir="in">
7743 <desc>
7744 Full path name of the command to execute on the guest; the
7745 commands has to exists in the guest VM in order to be executed.
7746 </desc>
7747 </param>
7748 <param name="flags" type="unsigned long" dir="in">
7749 <desc>
7750 Execution flags - currently not supported and therefore
7751 has to be set to 0.
7752 </desc>
7753 </param>
7754 <param name="arguments" type="wstring" safearray="yes" dir="in">
7755 <desc>
7756 Array of arguments passed to the execution command.
7757 </desc>
7758 </param>
7759 <param name="environment" type="wstring" safearray="yes" dir="in">
7760 <desc>
7761 Environment variables that can be set while the command is being
7762 executed, in form of "NAME=VALUE"; one pair per entry. To unset a
7763 variable just set its name ("NAME") without a value.
7764 </desc>
7765 </param>
7766 <param name="userName" type="wstring" dir="in">
7767 <desc>
7768 User name under which the command will be executed; has to exist
7769 and have the appropriate rights to execute programs in the VM.
7770 </desc>
7771 </param>
7772 <param name="password" type="wstring" dir="in">
7773 <desc>
7774 Password of the user account specified.
7775 </desc>
7776 </param>
7777 <param name="timeoutMS" type="unsigned long" dir="in">
7778 <desc>
7779 The maximum timeout value (in msec) to wait for finished program
7780 execution. Pass 0 for an infinite timeout.
7781 </desc>
7782 </param>
7783 <param name="pid" type="unsigned long" dir="out">
7784 <desc>
7785 The PID (process ID) of the started command for later reference.
7786 </desc>
7787 </param>
7788 <param name="progress" type="IProgress" dir="return">
7789 <desc>Progress object to track the operation completion.</desc>
7790 </param>
7791 </method>
7792
7793 <method name="getProcessOutput">
7794 <desc>
7795 Retrieves output of a formerly started process.
7796
7797 <result name="VBOX_E_IPRT_ERROR">
7798 Could not retrieve output.
7799 </result>
7800
7801 </desc>
7802 <param name="pid" type="unsigned long" dir="in">
7803 <desc>
7804 Process id returned by earlier executeProcess() call.
7805 </desc>
7806 </param>
7807 <param name="flags" type="unsigned long" dir="in">
7808 <desc>
7809 Flags describing which output to retrieve.
7810 </desc>
7811 </param>
7812 <param name="timeoutMS" type="unsigned long" dir="in">
7813 <desc>
7814 The maximum timeout value (in msec) to wait for output
7815 data. Pass 0 for an infinite timeout.
7816 </desc>
7817 </param>
7818 <param name="size" type="unsigned long long" dir="in">
7819 <desc>
7820 Size in bytes to read in the buffer.
7821 </desc>
7822 </param>
7823 <param name="data" type="octet" dir="return" safearray="yes">
7824 <desc>
7825 Buffer for retrieving the actual output. A data size of 0 means end of file
7826 if the requested size was not 0. This is the unprocessed
7827 output data, i.e. the line ending style depends on the platform of
7828 the system the server is running on.
7829 </desc>
7830 </param>
7831 </method>
7832
7833 <method name="getProcessStatus">
7834 <desc>
7835 Retrieves status, exit code and the exit reason of a formerly started process.
7836
7837 <result name="VBOX_E_IPRT_ERROR">
7838 Process with specified PID was not found.
7839 </result>
7840
7841 </desc>
7842 <param name="pid" type="unsigned long" dir="in">
7843 <desc>
7844 Process id returned by earlier executeProcess() call.
7845 </desc>
7846 </param>
7847 <param name="exitcode" type="unsigned long" dir="out">
7848 <desc>
7849 The exit code (if available).
7850 </desc>
7851 </param>
7852 <param name="flags" type="unsigned long" dir="out">
7853 <desc>
7854 Additional flags of process status (not used at the moment).
7855 </desc>
7856 </param>
7857 <param name="reason" type="unsigned long" dir="return">
7858 <desc>
7859 The current process status.
7860 </desc>
7861 </param>
7862 </method>
7863
7864 </interface>
7865
7866
7867 <!--
7868 // IProgress
7869 /////////////////////////////////////////////////////////////////////////
7870 -->
7871
7872 <interface
7873 name="IProgress" extends="$unknown"
7874 uuid="856aa038-853f-42e2-acf7-6e7b02dbe294"
7875 wsmap="managed"
7876 >
7877 <desc>
7878 The IProgress interface is used to track and control
7879 asynchronous tasks within VirtualBox.
7880
7881 An instance of this is returned every time VirtualBox starts
7882 an asynchronous task (in other words, a separate thread) which
7883 continues to run after a method call returns. For example,
7884 <link to="IConsole::saveState" />, which saves the state of
7885 a running virtual machine, can take a long time to complete.
7886 To be able to display a progress bar, a user interface such as
7887 the VirtualBox graphical user interface can use the IProgress
7888 object returned by that method.
7889
7890 Note that IProgress is a "read-only" interface in the sense
7891 that only the VirtualBox internals behind the Main API can
7892 create and manipulate progress objects, whereas client code
7893 can only use the IProgress object to monitor a task's
7894 progress and, if <link to="#cancelable" /> is @c true,
7895 cancel the task by calling <link to="#cancel" />.
7896
7897 A task represented by IProgress consists of either one or
7898 several sub-operations that run sequentially, one by one (see
7899 <link to="#operation" /> and <link to="#operationCount" />).
7900 Every operation is identified by a number (starting from 0)
7901 and has a separate description.
7902
7903 You can find the individual percentage of completion of the current
7904 operation in <link to="#operationPercent" /> and the
7905 percentage of completion of the task as a whole
7906 in <link to="#percent" />.
7907
7908 Similarly, you can wait for the completion of a particular
7909 operation via <link to="#waitForOperationCompletion" /> or
7910 for the completion of the whole task via
7911 <link to="#waitForCompletion" />.
7912 </desc>
7913
7914 <attribute name="id" type="uuid" mod="string" readonly="yes">
7915 <desc>ID of the task.</desc>
7916 </attribute>
7917
7918 <attribute name="description" type="wstring" readonly="yes">
7919 <desc>Description of the task.</desc>
7920 </attribute>
7921
7922 <attribute name="initiator" type="$unknown" readonly="yes">
7923 <desc>Initiator of the task.</desc>
7924 </attribute>
7925
7926 <attribute name="cancelable" type="boolean" readonly="yes">
7927 <desc>Whether the task can be interrupted.</desc>
7928 </attribute>
7929
7930 <attribute name="percent" type="unsigned long" readonly="yes">
7931 <desc>
7932 Current progress value of the task as a whole, in percent.
7933 This value depends on how many operations are already complete.
7934 Returns 100 if <link to="#completed" /> is @c true.
7935 </desc>
7936 </attribute>
7937
7938 <attribute name="timeRemaining" type="long" readonly="yes">
7939 <desc>
7940 Estimated remaining time until the task completes, in
7941 seconds. Returns 0 once the task has completed; returns -1
7942 if the remaining time cannot be computed, in particular if
7943 the current progress is 0.
7944
7945 Even if a value is returned, the estimate will be unreliable
7946 for low progress values. It will become more reliable as the
7947 task progresses; it is not recommended to display an ETA
7948 before at least 20% of a task have completed.
7949 </desc>
7950 </attribute>
7951
7952 <attribute name="completed" type="boolean" readonly="yes">
7953 <desc>Whether the task has been completed.</desc>
7954 </attribute>
7955
7956 <attribute name="canceled" type="boolean" readonly="yes">
7957 <desc>Whether the task has been canceled.</desc>
7958 </attribute>
7959
7960 <attribute name="resultCode" type="long" readonly="yes">
7961 <desc>
7962 Result code of the progress task.
7963 Valid only if <link to="#completed"/> is @c true.
7964 </desc>
7965 </attribute>
7966
7967 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7968 <desc>
7969 Extended information about the unsuccessful result of the
7970 progress operation. May be @c null if no extended information
7971 is available.
7972 Valid only if <link to="#completed"/> is @c true and
7973 <link to="#resultCode"/> indicates a failure.
7974 </desc>
7975 </attribute>
7976
7977 <attribute name="operationCount" type="unsigned long" readonly="yes">
7978 <desc>
7979 Number of sub-operations this task is divided into.
7980 Every task consists of at least one suboperation.
7981 </desc>
7982 </attribute>
7983
7984 <attribute name="operation" type="unsigned long" readonly="yes">
7985 <desc>Number of the sub-operation being currently executed.</desc>
7986 </attribute>
7987
7988 <attribute name="operationDescription" type="wstring" readonly="yes">
7989 <desc>
7990 Description of the sub-operation being currently executed.
7991 </desc>
7992 </attribute>
7993
7994 <attribute name="operationPercent" type="unsigned long" readonly="yes">
7995 <desc>Progress value of the current sub-operation only, in percent.</desc>
7996 </attribute>
7997
7998 <attribute name="timeout" type="unsigned long">
7999 <desc>
8000 When non-zero, this specifies the number of milliseconds after which
8001 the operation will automatically be canceled. This can only be set on
8002 cancelable objects.
8003 </desc>
8004 </attribute>
8005
8006 <method name="setCurrentOperationProgress">
8007 <desc>Internal method, not to be called externally.</desc>
8008 <param name="percent" type="unsigned long" dir="in" />
8009 </method>
8010 <method name="setNextOperation">
8011 <desc>Internal method, not to be called externally.</desc>
8012 <param name="nextOperationDescription" type="wstring" dir="in" />
8013 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8014 </method>
8015
8016 <method name="waitForCompletion">
8017 <desc>
8018 Waits until the task is done (including all sub-operations)
8019 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8020
8021 Note that the VirtualBox/XPCOM/COM/native event queues of the calling
8022 thread are not processed while waiting. Neglecting event queues may
8023 have dire consequences (degrade performance, resource hogs,
8024 deadlocks, etc.), this is specially so for the main thread on
8025 platforms using XPCOM. Callers are adviced wait for short periods
8026 and service their event queues between calls, or to create a worker
8027 thread to do the waiting.
8028
8029 <result name="VBOX_E_IPRT_ERROR">
8030 Failed to wait for task completion.
8031 </result>
8032 </desc>
8033
8034 <param name="timeout" type="long" dir="in">
8035 <desc>
8036 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8037 </desc>
8038 </param>
8039 </method>
8040
8041 <method name="waitForOperationCompletion">
8042 <desc>
8043 Waits until the given operation is done with a given timeout in
8044 milliseconds; specify -1 for an indefinite wait.
8045
8046 See <link to="#waitForCompletion"> for event queue considerations.</link>
8047
8048 <result name="VBOX_E_IPRT_ERROR">
8049 Failed to wait for operation completion.
8050 </result>
8051
8052 </desc>
8053 <param name="operation" type="unsigned long" dir="in">
8054 <desc>
8055 Number of the operation to wait for.
8056 Must be less than <link to="#operationCount"/>.
8057 </desc>
8058 </param>
8059 <param name="timeout" type="long" dir="in">
8060 <desc>
8061 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8062 </desc>
8063 </param>
8064 </method>
8065
8066 <method name="cancel">
8067 <desc>
8068 Cancels the task.
8069 <note>
8070 If <link to="#cancelable"/> is @c false, then this method will fail.
8071 </note>
8072
8073 <result name="VBOX_E_INVALID_OBJECT_STATE">
8074 Operation cannot be canceled.
8075 </result>
8076
8077 </desc>
8078 </method>
8079
8080 </interface>
8081
8082 <!--
8083 // ISnapshot
8084 /////////////////////////////////////////////////////////////////////////
8085 -->
8086
8087 <interface
8088 name="ISnapshot" extends="$unknown"
8089 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8090 wsmap="managed"
8091 >
8092 <desc>
8093 The ISnapshot interface represents a snapshot of the virtual
8094 machine.
8095
8096 Together with the differencing media that are created
8097 when a snapshot is taken, a machine can be brought back to
8098 the exact state it was in when the snapshot was taken.
8099
8100 The ISnapshot interface has no methods, only attributes; snapshots
8101 are controlled through methods of the <link to="IConsole" /> interface
8102 which also manage the media associated with the snapshot.
8103 The following operations exist:
8104
8105 <ul>
8106 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8107 by creating new, empty differencing images for the machine's
8108 media and saving the VM settings and (if the VM is running)
8109 the current VM state in the snapshot.
8110
8111 The differencing images will then receive all data written to
8112 the machine's media, while their parent (base) images
8113 remain unmodified after the snapshot has been taken (see
8114 <link to="IMedium" /> for details about differencing images).
8115 This simplifies restoring a machine to the state of a snapshot:
8116 only the differencing images need to be deleted.
8117
8118 The current machine state is not changed by taking a snapshot.
8119 If the machine is running, it will resume execution after the
8120 snapshot has been taken.
8121 </li>
8122
8123 <li><link to="IConsole::restoreSnapshot"/>: this goes back to
8124 a previous snapshot. This resets the machine's state to that of
8125 the previous snapshot by deleting the differencing image of each
8126 of the machine's media and setting the machine's settings
8127 and state to the state that was saved in the snapshot (if any).
8128
8129 This destroys the machine's current state.
8130 </li>
8131
8132 <li><link to="IConsole::deleteSnapshot"/>: deletes a snapshot
8133 without affecting the current machine state.
8134
8135 This does not change the machine, but instead frees the resources
8136 allocated when the snapshot was taken: the settings and machine state
8137 is deleted (if any), and the snapshot's differencing image for each
8138 of the machine's media gets merged with its parent image.
8139
8140 Neither the current machine state nor other snapshots are affected
8141 by this operation, except that parent media will be modified
8142 to contain the disk data associated with the snapshot being deleted.
8143 </li>
8144 </ul>
8145
8146 Each snapshot contains the settings of the virtual machine (hardware
8147 configuration etc.). In addition, if the machine was running when the
8148 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8149 the current VM state is saved in the snapshot (similarly to what happens
8150 when a VM's state is saved). The snapshot is then said to
8151 be <i>online</i> because when restoring it, the VM will be running.
8152
8153 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8154 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8155
8156 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8157 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8158 it then contains a so-called "zero execution state", representing a
8159 machine that is powered off.
8160
8161 <h3>Snapshot branches and the "current" snapshot</h3>
8162
8163 Snapshots can be chained, whereby every next snapshot is based on the
8164 previous one. This chaining is related to medium branching
8165 (see the <link to="IMedium"/> description) in that every time
8166 a new snapshot is created, a new differencing medium is implicitly
8167 created for all normal media attached to the machine.
8168
8169 Each virtual machine has a "current snapshot", identified by
8170 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8171 to the last snapshot in the chain. In a future version of VirtualBox,
8172 it will be possible to reset a machine's current state to that of an
8173 earlier snapshot without deleting the current state so that it will be
8174 possible to create alternative snapshot paths in a snapshot tree.
8175
8176 In the current implementation, multiple snapshot branches within one
8177 virtual machine are not allowed. Every machine has a single branch,
8178 and <link to="IConsole::takeSnapshot"/> operation adds a new
8179 snapshot to the top of that branch.
8180 </desc>
8181
8182 <attribute name="id" type="uuid" mod="string" readonly="yes">
8183 <desc>UUID of the snapshot.</desc>
8184 </attribute>
8185
8186 <attribute name="name" type="wstring">
8187 <desc>Short name of the snapshot.</desc>
8188 </attribute>
8189
8190 <attribute name="description" type="wstring">
8191 <desc>Optional description of the snapshot.</desc>
8192 </attribute>
8193
8194 <attribute name="timeStamp" type="long long" readonly="yes">
8195 <desc>
8196 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8197 </desc>
8198 </attribute>
8199
8200 <attribute name="online" type="boolean" readonly="yes">
8201 <desc>
8202 @c true if this snapshot is an online snapshot and @c false otherwise.
8203
8204 When this attribute is @c true, the
8205 <link to="IMachine::stateFilePath"/> attribute of the
8206 <link to="#machine"/> object associated with this snapshot
8207 will point to the saved state file. Otherwise, it will be
8208 an empty string.
8209 </desc>
8210 </attribute>
8211
8212 <attribute name="machine" type="IMachine" readonly="yes">
8213 <desc>
8214 Virtual machine this snapshot is taken on. This object
8215 stores all settings the machine had when taking this snapshot.
8216 <note>
8217 The returned machine object is immutable, i.e. no
8218 any settings can be changed.
8219 </note>
8220 </desc>
8221 </attribute>
8222
8223 <attribute name="parent" type="ISnapshot" readonly="yes">
8224 <desc>
8225 Parent snapshot (a snapshot this one is based on), or
8226 @c null if the snapshot has no parent (i.e. is the first snapshot).
8227 </desc>
8228 </attribute>
8229
8230 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8231 <desc>
8232 Child snapshots (all snapshots having this one as a parent).
8233 </desc>
8234 </attribute>
8235
8236 </interface>
8237
8238
8239 <!--
8240 // IMedium
8241 /////////////////////////////////////////////////////////////////////////
8242 -->
8243
8244 <enum
8245 name="MediumState"
8246 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8247 >
8248 <desc>
8249 Virtual medium state.
8250 <see>IMedium</see>
8251 </desc>
8252
8253 <const name="NotCreated" value="0">
8254 <desc>
8255 Associated medium storage does not exist (either was not created yet or
8256 was deleted).
8257 </desc>
8258 </const>
8259 <const name="Created" value="1">
8260 <desc>
8261 Associated storage exists and accessible; this gets set if the
8262 accessibility check performed by <link to="IMedium::refreshState" />
8263 was successful.
8264 </desc>
8265 </const>
8266 <const name="LockedRead" value="2">
8267 <desc>
8268 Medium is locked for reading (see <link to="IMedium::lockRead"/>),
8269 no data modification is possible.
8270 </desc>
8271 </const>
8272 <const name="LockedWrite" value="3">
8273 <desc>
8274 Medium is locked for writing (see <link to="IMedium::lockWrite"/>),
8275 no concurrent data reading or modification is possible.
8276 </desc>
8277 </const>
8278 <const name="Inaccessible" value="4">
8279 <desc>
8280 Medium accessiblity check (see <link to="IMedium::refreshState" />) has
8281 not yet been performed, or else, associated medium storage is not
8282 accessible. In the first case, <link to="IMedium::lastAccessError"/>
8283 is empty, in the second case, it describes the error that occured.
8284 </desc>
8285 </const>
8286 <const name="Creating" value="5">
8287 <desc>
8288 Associated medium storage is being created.
8289 </desc>
8290 </const>
8291 <const name="Deleting" value="6">
8292 <desc>
8293 Associated medium storage is being deleted.
8294 </desc>
8295 </const>
8296 </enum>
8297
8298 <enum
8299 name="MediumType"
8300 uuid="46bf1fd4-ad86-4ded-8c49-28bd2d148e5a"
8301 >
8302 <desc>
8303 Virtual medium type.
8304 <see>IMedium</see>
8305 </desc>
8306
8307 <const name="Normal" value="0">
8308 <desc>
8309 Normal medium (attached directly or indirectly, preserved
8310 when taking snapshots).
8311 </desc>
8312 </const>
8313 <const name="Immutable" value="1">
8314 <desc>
8315 Immutable medium (attached indirectly, changes are wiped out
8316 the next time the virtual machine is started).
8317 </desc>
8318 </const>
8319 <const name="Writethrough" value="2">
8320 <desc>
8321 Write through medium (attached directly, ignored when
8322 taking snapshots).
8323 </desc>
8324 </const>
8325 <const name="Shareable" value="3">
8326 <desc>
8327 Allow using this medium concurrently by several machines.
8328 <note>Present since VirtualBox 3.2.0, and accepted since 3.2.8.</note>
8329 </desc>
8330 </const>
8331 </enum>
8332
8333 <enum
8334 name="MediumVariant"
8335 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8336 >
8337 <desc>
8338 Virtual medium image variant. More than one flag may be set.
8339 <see>IMedium</see>
8340 </desc>
8341
8342 <const name="Standard" value="0">
8343 <desc>
8344 No particular variant requested, results in using the backend default.
8345 </desc>
8346 </const>
8347 <const name="VmdkSplit2G" value="0x01">
8348 <desc>
8349 VMDK image split in chunks of less than 2GByte.
8350 </desc>
8351 </const>
8352 <const name="VmdkStreamOptimized" value="0x04">
8353 <desc>
8354 VMDK streamOptimized image. Special import/export format which is
8355 read-only/append-only.
8356 </desc>
8357 </const>
8358 <const name="VmdkESX" value="0x08">
8359 <desc>
8360 VMDK format variant used on ESX products.
8361 </desc>
8362 </const>
8363 <const name="Fixed" value="0x10000">
8364 <desc>
8365 Fixed image. Only allowed for base images.
8366 </desc>
8367 </const>
8368 <const name="Diff" value="0x20000">
8369 <desc>
8370 Differencing image. Only allowed for child images.
8371 </desc>
8372 </const>
8373 </enum>
8374
8375 <interface
8376 name="IMediumAttachment" extends="$unknown"
8377 uuid="c29452cc-ca72-404b-9261-cfc514f1e412"
8378 wsmap="struct"
8379 >
8380 <desc>
8381 The IMediumAttachment interface links storage media to virtual machines.
8382 For each medium (<link to="IMedium"/>) which has been attached to a
8383 storage controller (<link to="IStorageController"/>) of a machine
8384 (<link to="IMachine"/>) via the <link to="IMachine::attachDevice" />
8385 method, one instance of IMediumAttachment is added to the machine's
8386 <link to="IMachine::mediumAttachments"/> array attribute.
8387
8388 Each medium attachment specifies the storage controller as well as a
8389 port and device number and the IMedium instance representing a virtual
8390 hard disk or floppy or DVD image.
8391
8392 For removeable media (DVDs or floppies), there are two additional
8393 options. For one, the IMedium instance can be @c null to represent
8394 an empty drive with no media inserted (see <link to="IMachine::mountMedium" />);
8395 secondly, the medium can be one of the pseudo-media for host drives
8396 listed in <link to="IHost::DVDDrives"/> or <link to="IHost::floppyDrives"/>.
8397 </desc>
8398
8399 <attribute name="medium" type="IMedium" readonly="yes">
8400 <desc>Medium object associated with this attachment; it
8401 can be @c null for removable devices.</desc>
8402 </attribute>
8403
8404 <attribute name="controller" type="wstring" readonly="yes">
8405 <desc>Name of the storage controller of this attachment; this
8406 refers to one of the controllers in <link to="IMachine::storageControllers" />
8407 by name.</desc>
8408 </attribute>
8409
8410 <attribute name="port" type="long" readonly="yes">
8411 <desc>Port number of this attachment.
8412 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8413 </desc>
8414 </attribute>
8415
8416 <attribute name="device" type="long" readonly="yes">
8417 <desc>Device slot number of this attachment.
8418 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8419 </desc>
8420 </attribute>
8421
8422 <attribute name="type" type="DeviceType" readonly="yes">
8423 <desc>Device type of this attachment.</desc>
8424 </attribute>
8425
8426 <attribute name="passthrough" type="boolean" readonly="yes">
8427 <desc>Pass I/O requests through to a device on the host.</desc>
8428 </attribute>
8429
8430 <attribute name="bandwidthLimit" type="unsigned long">
8431 <desc>
8432 Maximum throughput allowed for this medium attachment, in units of 1 mbps.
8433 A zero value means uncapped/unlimited.
8434 </desc>
8435 </attribute>
8436
8437 </interface>
8438
8439 <interface
8440 name="IMedium" extends="$unknown"
8441 uuid="858ea9d3-9ade-4aa7-91b7-d8a40f8f9b16"
8442 wsmap="managed"
8443 >
8444 <desc>
8445 The IMedium interface represents virtual storage for a machine's
8446 hard disks, CD/DVD or floppy drives. It will typically represent
8447 a disk image on the host, for example a VDI or VMDK file representing
8448 a virtual hard disk, or an ISO or RAW file representing virtual
8449 removable media, but can also point to a network location (e.g.
8450 for iSCSI targets).
8451
8452 Instances of IMedium are connected to virtual machines by way of
8453 medium attachments (see <link to="IMediumAttachment" />), which link
8454 the storage medium to a particular device slot of a storage controller
8455 of the virtual machine.
8456 In the VirtualBox API, virtual storage is therefore always represented
8457 by the following chain of object links:
8458
8459 <ul>
8460 <li><link to="IMachine::storageControllers"/> contains an array of
8461 storage controllers (IDE, SATA, SCSI, SAS or a floppy controller;
8462 these are instances of <link to="IStorageController"/>).</li>
8463 <li><link to="IMachine::mediumAttachments"/> contains an array of
8464 medium attachments (instances of <link to="IMediumAttachment"/>),
8465 each containing a storage controller from the above array, a
8466 port/device specification, and an instance of IMedium representing
8467 the medium storage (image file).
8468
8469 For removable media, the storage medium is optional; a medium
8470 attachment with no medium represents a CD/DVD or floppy drive
8471 with no medium inserted. By contrast, hard disk attachments
8472 will always have an IMedium object attached.</li>
8473 <li>Each IMedium in turn points to a storage unit (such as a file
8474 on the host computer or a network resource) that holds actual
8475 data. This location is represented by the <link to="#location"/>
8476 attribute.</li>
8477 </ul>
8478
8479 Existing media are opened using <link to="IVirtualBox::openMedium"/>;
8480 new hard disk media can be created with the VirtualBox API using the
8481 <link to="IVirtualBox::createHardDisk"/> method.
8482
8483 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8484 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8485 type in a regular file.
8486
8487 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8488 drive; in that case the <link to="#id" /> attribute contains the UUID of
8489 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8490
8491 <h3>Known media</h3>
8492
8493 When an existing medium is opened for the first time, it is automatically
8494 remembered by the given VirtualBox installation or, in other words, becomes
8495 a <i>known medium</i>. Known media are stored in the media
8496 registry transparently maintained by VirtualBox and stored in settings
8497 files so that this registry is preserved when VirtualBox is not running.
8498
8499 Newly created virtual media are remembered only when the associated
8500 storage unit is actually created.
8501
8502 All known media can be enumerated using
8503 <link to="IVirtualBox::hardDisks"/>,
8504 <link to="IVirtualBox::DVDImages"/> and
8505 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8506 quickly found using the <link to="IVirtualBox::findMedium"/> method.
8507
8508 Only known media can be attached to virtual machines.
8509
8510 Removing known media from the media registry is performed when the given
8511 medium is closed using the <link to="#close"/> method or when its
8512 associated storage unit is deleted.
8513
8514 <h3>Accessibility checks</h3>
8515
8516 VirtualBox defers media accessibility checks until the <link to="#refreshState" />
8517 method is called explicitly on a medium. This is done to make the VirtualBox object
8518 ready for serving requests as fast as possible and let the end-user
8519 application decide if it needs to check media accessibility right away or not.
8520
8521 As a result, when VirtualBox starts up (e.g. the VirtualBox
8522 object gets created for the first time), all known media are in the
8523 "Inaccessible" state, but the value of the <link to="#lastAccessError"/>
8524 attribute is an empty string because no actual accessibility check has
8525 been made yet.
8526
8527 After calling <link to="#refreshState" />, a medium is considered
8528 <i>accessible</i> if its storage unit can be read. In that case, the
8529 <link to="#state"/> attribute has a value of "Created". If the storage
8530 unit cannot be read (for example, because it is located on a disconnected
8531 network resource, or was accidentally deleted outside VirtualBox),
8532 the medium is considered <i>inaccessible</i>, which is indicated by the
8533 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8534 obtained by reading the <link to="#lastAccessError"/> attribute.
8535
8536 <h3>Medium types</h3>
8537
8538 There are four types of medium behavior (see <link to="MediumType" />):
8539 "normal", "immutable", "writethrough" and "shareable", represented by the
8540 <link to="#type"/> attribute. The type of the medium defines how the
8541 medium is attached to a virtual machine and what happens when a
8542 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8543 attached medium is taken. At the moment DVD and floppy media are always
8544 of type "writethrough".
8545
8546 All media can be also divided in two groups: <i>base</i> media and
8547 <i>differencing</i> media. A base medium contains all sectors of the
8548 medium data in its own storage and therefore can be used independently.
8549 In contrast, a differencing mediun is a "delta" to some other medium and
8550 contains only those sectors which differ from that other medium, which is
8551 then called a <i>parent</i>. The differencing medium is said to be
8552 <i>linked to</i> that parent. The parent may be itself a differencing
8553 medium, thus forming a chain of linked media. The last element in that
8554 chain must always be a base medium. Note that several differencing
8555 media may be linked to the same parent medium.
8556
8557 Differencing media can be distinguished from base media by querying the
8558 <link to="#parent"/> attribute: base media do not have parents they would
8559 depend on, so the value of this attribute is always @c null for them.
8560 Using this attribute, it is possible to walk up the medium tree (from the
8561 child medium to its parent). It is also possible to walk down the tree
8562 using the <link to="#children"/> attribute.
8563
8564 Note that the type of all differencing media is "normal"; all other
8565 values are meaningless for them. Base media may be of any type.
8566
8567 <h3>Creating hard disks</h3>
8568
8569 New base hard disks are created using
8570 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8571 opened using <link to="IVirtualBox::openMedium"/>. Differencing hard
8572 disks are usually implicitly created by VirtualBox when needed but may
8573 also be created explicitly using <link to="#createDiffStorage"/>.
8574
8575 After the hard disk is successfully created (including the storage unit)
8576 or opened, it becomes a known hard disk (remembered in the internal media
8577 registry). Known hard disks can be attached to a virtual machine, accessed
8578 through <link to="IVirtualBox::findMedium"/> or enumerated using the
8579 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8580
8581 The following methods, besides <link to="IMedium::close"/>,
8582 automatically remove the hard disk from the media registry:
8583 <ul>
8584 <li><link to="#deleteStorage"/></li>
8585 <li><link to="#mergeTo"/></li>
8586 </ul>
8587
8588 If the storage unit of the hard disk is a regular file in the host's
8589 file system then the rules stated in the description of the
8590 <link to="IMedium::location"/> attribute apply when setting its value. In
8591 addition, a plain file name without any path may be given, in which case
8592 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8593 folder</link> will be prepended to it.
8594
8595 <h4>Automatic composition of the file name part</h4>
8596
8597 Another extension to the <link to="IMedium::location"/> attribute is that
8598 there is a possibility to cause VirtualBox to compose a unique value for
8599 the file name part of the location using the UUID of the hard disk. This
8600 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
8601 e.g. before the storage unit is created, and works as follows. You set the
8602 value of the <link to="IMedium::location"/> attribute to a location
8603 specification which only contains the path specification but not the file
8604 name part and ends with either a forward slash or a backslash character.
8605 In response, VirtualBox will generate a new UUID for the hard disk and
8606 compose the file name using the following pattern:
8607 <pre>
8608 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8609 </pre>
8610 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8611 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8612 is the default extension for the storage format of this hard disk. After
8613 that, you may call any of the methods that create a new hard disk storage
8614 unit and they will use the generated UUID and file name.
8615
8616 <h3>Attaching Hard Disks</h3>
8617
8618 Hard disks are attached to virtual machines using the
8619 <link to="IMachine::attachDevice"/> method and detached using the
8620 <link to="IMachine::detachDevice"/> method. Depending on their
8621 <link to="#type"/>, hard disks are attached either
8622 <i>directly</i> or <i>indirectly</i>.
8623
8624 When a hard disk is being attached directly, it is associated with the
8625 virtual machine and used for hard disk operations when the machine is
8626 running. When a hard disk is being attached indirectly, a new differencing
8627 hard disk linked to it is implicitly created and this differencing hard
8628 disk is associated with the machine and used for hard disk operations.
8629 This also means that if <link to="IMachine::attachDevice"/> performs
8630 a direct attachment then the same hard disk will be returned in response
8631 to the subsequent <link to="IMachine::getMedium"/> call; however if
8632 an indirect attachment is performed then
8633 <link to="IMachine::getMedium"/> will return the implicitly created
8634 differencing hard disk, not the original one passed to <link
8635 to="IMachine::attachDevice"/>. In detail:
8636
8637 <ul>
8638 <li><b>Normal base</b> hard disks that do not have children (i.e.
8639 differencing hard disks linked to them) and that are not already
8640 attached to virtual machines in snapshots are attached <b>directly</b>.
8641 Otherwise, they are attached <b>indirectly</b> because having
8642 dependent children or being part of the snapshot makes it impossible
8643 to modify hard disk contents without breaking the integrity of the
8644 dependent party. The <link to="#readOnly"/> attribute allows to
8645 quickly determine the kind of the attachment for the given hard
8646 disk. Note that if a normal base hard disk is to be indirectly
8647 attached to a virtual machine with snapshots then a special
8648 procedure called <i>smart attachment</i> is performed (see below).</li>
8649 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
8650 they are attached <b>directly</b> if they do not have children and are
8651 not attached to virtual machines in snapshots, and <b>indirectly</b>
8652 otherwise. Note that the smart attachment procedure is never performed
8653 for differencing hard disks.</li>
8654 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
8655 they are designed to be non-writable. If an immutable hard disk is
8656 attached to a virtual machine with snapshots then a special
8657 procedure called smart attachment is performed (see below).</li>
8658 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
8659 also as designed. This also means that writethrough hard disks cannot
8660 have other hard disks linked to them at all.</li>
8661 <li><b>Shareable</b> hard disks are always attached <b>directly</b>,
8662 also as designed. This also means that shareable hard disks cannot
8663 have other hard disks linked to them at all. They behave almost
8664 like writethrough hard disks, except that shareable hard disks can
8665 be attached to several virtual machines which are running, allowing
8666 concurrent accesses. You need special cluster software running in
8667 the virtual machines to make use of such disks.</li>
8668 </ul>
8669
8670 Note that the same hard disk, regardless of its type, may be attached to
8671 more than one virtual machine at a time. In this case, the machine that is
8672 started first gains exclusive access to the hard disk and attempts to
8673 start other machines having this hard disk attached will fail until the
8674 first machine is powered down.
8675
8676 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8677 that the given hard disk remains associated with the given machine after a
8678 successful <link to="IMachine::detachDevice"/> call until
8679 <link to="IMachine::saveSettings"/> is called to save all changes to
8680 machine settings to disk. This deferring is necessary to guarantee that
8681 the hard disk configuration may be restored at any time by a call to
8682 <link to="IMachine::discardSettings"/> before the settings
8683 are saved (committed).
8684
8685 Note that if <link to="IMachine::discardSettings"/> is called after
8686 indirectly attaching some hard disks to the machine but before a call to
8687 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8688 all differencing hard disks implicitly created by
8689 <link to="IMachine::attachDevice"/> for these indirect attachments.
8690 Such implicitly created hard disks will also be immediately deleted when
8691 detached explicitly using the <link to="IMachine::detachDevice"/>
8692 call if it is made before <link to="IMachine::saveSettings"/>. This
8693 implicit deletion is safe because newly created differencing hard
8694 disks do not contain any user data.
8695
8696 However, keep in mind that detaching differencing hard disks that were
8697 implicitly created by <link to="IMachine::attachDevice"/>
8698 before the last <link to="IMachine::saveSettings"/> call will
8699 <b>not</b> implicitly delete them as they may already contain some data
8700 (for example, as a result of virtual machine execution). If these hard
8701 disks are no more necessary, the caller can always delete them explicitly
8702 using <link to="#deleteStorage"/> after they are actually de-associated
8703 from this machine by the <link to="IMachine::saveSettings"/> call.
8704
8705 <h3>Smart Attachment</h3>
8706
8707 When normal base or immutable hard disks are indirectly attached to a
8708 virtual machine then some additional steps are performed to make sure the
8709 virtual machine will have the most recent "view" of the hard disk being
8710 attached. These steps include walking through the machine's snapshots
8711 starting from the current one and going through ancestors up to the first
8712 snapshot. Hard disks attached to the virtual machine in all
8713 of the encountered snapshots are checked whether they are descendants of
8714 the given normal base or immutable hard disk. The first found child (which
8715 is the differencing hard disk) will be used instead of the normal base or
8716 immutable hard disk as a parent for creating a new differencing hard disk
8717 that will be actually attached to the machine. And only if no descendants
8718 are found or if the virtual machine does not have any snapshots then the
8719 normal base or immutable hard disk will be used itself as a parent for
8720 this differencing hard disk.
8721
8722 It is easier to explain what smart attachment does using the
8723 following example:
8724 <pre>
8725BEFORE attaching B.vdi: AFTER attaching B.vdi:
8726
8727Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8728 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8729 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8730 Snapshot 4 (none) Snapshot 4 (none)
8731 CurState (none) CurState (D3->D2.vdi)
8732
8733 NOT
8734 ...
8735 CurState (D3->B.vdi)
8736 </pre>
8737 The first column is the virtual machine configuration before the base hard
8738 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8739 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8740 mean that the hard disk that is actually attached to the machine is a
8741 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8742 another hard disk, <tt>B.vdi</tt>.
8743
8744 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8745 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8746 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8747 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8748 it cannot be attached directly and needs an indirect attachment (i.e.
8749 implicit creation of a new differencing hard disk). Due to the smart
8750 attachment procedure, the new differencing hard disk
8751 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8752 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8753 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8754 machine.
8755
8756 Note that if there is more than one descendant hard disk of the given base
8757 hard disk found in a snapshot, and there is an exact device, channel and
8758 bus match, then this exact match will be used. Otherwise, the youngest
8759 descendant will be picked up.
8760
8761 There is one more important aspect of the smart attachment procedure which
8762 is not related to snapshots at all. Before walking through the snapshots
8763 as described above, the backup copy of the current list of hard disk
8764 attachment is searched for descendants. This backup copy is created when
8765 the hard disk configuration is changed for the first time after the last
8766 <link to="IMachine::saveSettings"/> call and used by
8767 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8768 changes. When such a descendant is found in this backup copy, it will be
8769 simply re-attached back, without creating a new differencing hard disk for
8770 it. This optimization is necessary to make it possible to re-attach the
8771 base or immutable hard disk to a different bus, channel or device slot
8772 without losing the contents of the differencing hard disk actually
8773 attached to the machine in place of it.
8774 </desc>
8775
8776 <attribute name="id" type="uuid" mod="string" readonly="yes">
8777 <desc>
8778 UUID of the medium. For a newly created medium, this value is a randomly
8779 generated UUID.
8780
8781 <note>
8782 For media in one of MediumState_NotCreated, MediumState_Creating or
8783 MediumState_Deleting states, the value of this property is undefined
8784 and will most likely be an empty UUID.
8785 </note>
8786 </desc>
8787 </attribute>
8788
8789 <attribute name="description" type="wstring">
8790 <desc>
8791 Optional description of the medium. For a newly created medium the value
8792 of this attribute is an empty string.
8793
8794 Medium types that don't support this attribute will return E_NOTIMPL in
8795 attempt to get or set this attribute's value.
8796
8797 <note>
8798 For some storage types, reading this attribute may return an outdated
8799 (last known) value when <link to="#state"/> is <link
8800 to="MediumState_Inaccessible"/> or <link
8801 to="MediumState_LockedWrite"/> because the value of this attribute is
8802 stored within the storage unit itself. Also note that changing the
8803 attribute value is not possible in such case, as well as when the
8804 medium is the <link to="MediumState_LockedRead"/> state.
8805 </note>
8806 </desc>
8807 </attribute>
8808
8809 <attribute name="state" type="MediumState" readonly="yes">
8810 <desc>
8811 Returns the current medium state, which is the last state set by
8812 the accessibility check performed by <link to="#refreshState"/>.
8813 If that method has not yet been called on the medium, the state
8814 is "Inaccessible"; as opposed to truly inaccessible media, the
8815 value of <link to="#lastAccessError"/> will be an empty string in
8816 that case.
8817
8818 <note>As of version 3.1, this no longer performs an accessibility check
8819 automatically; call <link to="#refreshState"/> for that.
8820 </note>
8821 </desc>
8822 </attribute>
8823
8824 <attribute name="variant" type="MediumVariant" readonly="yes">
8825 <desc>
8826 Returns the storage format variant information for this medium.
8827 Before <link to="#refreshState"/> is called this method returns
8828 an undefined value.
8829 </desc>
8830 </attribute>
8831
8832 <attribute name="location" type="wstring">
8833 <desc>
8834 Location of the storage unit holding medium data.
8835
8836 The format of the location string is medium type specific. For medium
8837 types using regular files in a host's file system, the location
8838 string is the full file name.
8839
8840 Some medium types may support changing the storage unit location by
8841 simply changing the value of this property. If this operation is not
8842 supported, the implementation will return E_NOTIMPL in attempt to set
8843 this attribute's value.
8844
8845 When setting a value of the location attribute which is a regular file
8846 in the host's file system, the given file name may be either relative to
8847 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8848 absolute. Note that if the given location specification does not contain
8849 the file extension part then a proper default extension will be
8850 automatically appended by the implementation depending on the medium type.
8851 </desc>
8852 </attribute>
8853
8854 <attribute name="name" type="wstring" readonly="yes">
8855 <desc>
8856 Name of the storage unit holding medium data.
8857
8858 The returned string is a short version of the <link to="#location"/>
8859 attribute that is suitable for representing the medium in situations
8860 where the full location specification is too long (such as lists
8861 and comboboxes in GUI frontends). This string is also used by frontends
8862 to sort the media list alphabetically when needed.
8863
8864 For example, for locations that are regular files in the host's file
8865 system, the value of this attribute is just the file name (+ extension),
8866 without the path specification.
8867
8868 Note that as opposed to the <link to="#location"/> attribute, the name
8869 attribute will not necessary be unique for a list of media of the
8870 given type and format.
8871 </desc>
8872 </attribute>
8873
8874 <attribute name="deviceType" type="DeviceType" readonly="yes">
8875 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
8876 medium.</desc>
8877 </attribute>
8878
8879 <attribute name="hostDrive" type="boolean" readonly="yes">
8880 <desc>True if this corresponds to a drive on the host.</desc>
8881 </attribute>
8882
8883 <attribute name="size" type="unsigned long long" readonly="yes">
8884 <desc>
8885 Physical size of the storage unit used to hold medium data (in bytes).
8886
8887 <note>
8888 For media whose <link to="#state"/> is <link
8889 to="MediumState_Inaccessible"/>, the value of this property is the
8890 last known size. For <link to="MediumState_NotCreated"/> media,
8891 the returned value is zero.
8892 </note>
8893 </desc>
8894 </attribute>
8895
8896 <attribute name="format" type="wstring" readonly="yes">
8897 <desc>
8898 Storage format of this medium.
8899
8900 The value of this attribute is a string that specifies a backend used
8901 to store medium data. The storage format is defined when you create a
8902 new medium or automatically detected when you open an existing medium,
8903 and cannot be changed later.
8904
8905 The list of all storage formats supported by this VirtualBox
8906 installation can be obtained using
8907 <link to="ISystemProperties::mediumFormats"/>.
8908 </desc>
8909 </attribute>
8910
8911 <attribute name="mediumFormat" type="IMediumFormat" readonly="yes">
8912 <desc>
8913 Storage medium format object corresponding to this medium.
8914
8915 The value of this attribute is a reference to the medium format object
8916 that specifies the backend properties used to store medium data. The
8917 storage format is defined when you create a new medium or automatically
8918 detected when you open an existing medium, and cannot be changed later.
8919
8920 <note>@c null is returned if there is no associated medium format
8921 object. This can e.g. happen for medium objects representing host
8922 drives and other special medium objects.</note>
8923 </desc>
8924 </attribute>
8925
8926 <attribute name="type" type="MediumType">
8927 <desc>
8928 Type (role) of this medium.
8929
8930 The following constraints apply when changing the value of this
8931 attribute:
8932 <ul>
8933 <li>If a medium is attached to a virtual machine (either in the
8934 current state or in one of the snapshots), its type cannot be
8935 changed.
8936 </li>
8937 <li>As long as the medium has children, its type cannot be set
8938 to <link to="MediumType_Writethrough"/>.
8939 </li>
8940 <li>The type of all differencing media is
8941 <link to="MediumType_Normal"/> and cannot be changed.
8942 </li>
8943 </ul>
8944
8945 The type of a newly created or opened medium is set to
8946 <link to="MediumType_Normal"/>, except for DVD and floppy media,
8947 which have a type of <link to="MediumType_Writethrough"/>.
8948 </desc>
8949 </attribute>
8950
8951 <attribute name="parent" type="IMedium" readonly="yes">
8952 <desc>
8953 Parent of this medium (the medium this medium is directly based
8954 on).
8955
8956 Only differencing media have parents. For base (non-differencing)
8957 media, @c null is returned.
8958 </desc>
8959 </attribute>
8960
8961 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
8962 <desc>
8963 Children of this medium (all differencing media directly based
8964 on this medium). A @c null array is returned if this medium
8965 does not have any children.
8966 </desc>
8967 </attribute>
8968
8969 <attribute name="base" type="IMedium" readonly="yes">
8970 <desc>
8971 Base medium of this medium.
8972
8973 If this is a differencing medium, its base medium is the medium
8974 the given medium branch starts from. For all other types of media, this
8975 property returns the medium object itself (i.e. the same object this
8976 property is read on).
8977 </desc>
8978 </attribute>
8979
8980 <attribute name="readOnly" type="boolean" readonly="yes">
8981 <desc>
8982 Returns @c true if this medium is read-only and @c false otherwise.
8983
8984 A medium is considered to be read-only when its contents cannot be
8985 modified without breaking the integrity of other parties that depend on
8986 this medium such as its child media or snapshots of virtual machines
8987 where this medium is attached to these machines. If there are no
8988 children and no such snapshots then there is no dependency and the
8989 medium is not read-only.
8990
8991 The value of this attribute can be used to determine the kind of the
8992 attachment that will take place when attaching this medium to a
8993 virtual machine. If the value is @c false then the medium will
8994 be attached directly. If the value is @c true then the medium
8995 will be attached indirectly by creating a new differencing child
8996 medium for that. See the interface description for more information.
8997
8998 Note that all <link to="MediumType_Immutable">Immutable</link> media
8999 are always read-only while all
9000 <link to="MediumType_Writethrough">Writethrough</link> media are
9001 always not.
9002
9003 <note>
9004 The read-only condition represented by this attribute is related to
9005 the medium type and usage, not to the current
9006 <link to="IMedium::state">medium state</link> and not to the read-only
9007 state of the storage unit.
9008 </note>
9009 </desc>
9010 </attribute>
9011
9012 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9013 <desc>
9014 Logical size of this medium (in megabytes), as reported to the
9015 guest OS running inside the virtual machine this medium is
9016 attached to. The logical size is defined when the medium is created
9017 and cannot be changed later.
9018
9019 <note>
9020 Reading this property on a differencing medium will return the size
9021 of its <link to="#base"/> medium.
9022 </note>
9023 <note>
9024 For media whose state is <link to="#state"/> is <link
9025 to="MediumState_Inaccessible"/>, the value of this property is the
9026 last known logical size. For <link to="MediumState_NotCreated"/>
9027 media, the returned value is zero.
9028 </note>
9029 </desc>
9030 </attribute>
9031
9032 <attribute name="autoReset" type="boolean">
9033 <desc>
9034 Whether this differencing medium will be automatically reset each
9035 time a virtual machine it is attached to is powered up. This
9036 attribute is automatically set to @c true for the last
9037 differencing image of an "immutable" medium (see
9038 <link to="MediumType" />).
9039
9040 See <link to="#reset"/> for more information about resetting
9041 differencing media.
9042
9043 <note>
9044 Reading this property on a base (non-differencing) medium will
9045 always @c false. Changing the value of this property in this
9046 case is not supported.
9047 </note>
9048
9049 <result name="VBOX_E_NOT_SUPPORTED">
9050 This is not a differencing medium (when changing the attribute
9051 value).
9052 </result>
9053 </desc>
9054 </attribute>
9055
9056 <attribute name="lastAccessError" type="wstring" readonly="yes">
9057 <desc>
9058 Text message that represents the result of the last accessibility
9059 check performed by <link to="#refreshState"/>.
9060
9061 An empty string is returned if the last accessibility check
9062 was successful or has not yet been called. As a result, if
9063 <link to="#state" /> is "Inaccessible" and this attribute is empty,
9064 then <link to="#refreshState"/> has yet to be called; this is the
9065 default value of media after VirtualBox initialization.
9066 A non-empty string indicates a failure and should normally describe
9067 a reason of the failure (for example, a file read error).
9068 </desc>
9069 </attribute>
9070
9071 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9072 <desc>
9073 Array of UUIDs of all machines this medium is attached to.
9074
9075 A @c null array is returned if this medium is not attached to any
9076 machine or to any machine's snapshot.
9077
9078 <note>
9079 The returned array will include a machine even if this medium is not
9080 attached to that machine in the current state but attached to it in
9081 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9082 details.
9083 </note>
9084 </desc>
9085 </attribute>
9086
9087 <method name="setIDs">
9088 <desc>
9089 Changes the UUID and parent UUID for a hard disk medium.
9090 </desc>
9091 <param name="setImageId" type="boolean" dir="in">
9092 <desc>
9093 Select whether a new image UUID is set or not.
9094 </desc>
9095 </param>
9096 <param name="imageId" type="uuid" mod="string" dir="in">
9097 <desc>
9098 New UUID for the image. If an empty string is passed, then a new
9099 UUID is automatically created, provided that @a setImageId is @c true.
9100 Specifying a zero UUID is not allowed.
9101 </desc>
9102 </param>
9103 <param name="setParentId" type="boolean" dir="in">
9104 <desc>
9105 Select whether a new parent UUID is set or not.
9106 </desc>
9107 </param>
9108 <param name="parentId" type="uuid" mod="string" dir="in">
9109 <desc>
9110 New parent UUID for the image. If an empty string is passed, then a
9111 new UUID is automatically created, provided @a setParentId is
9112 @c true. A zero UUID is valid.
9113 </desc>
9114 </param>
9115 <result name="E_INVALIDARG">
9116 Invalid parameter combination.
9117 </result>
9118 <result name="VBOX_E_NOT_SUPPORTED">
9119 Medium is not a hard disk medium.
9120 </result>
9121 </method>
9122
9123 <method name="refreshState">
9124 <desc>
9125 If the current medium state (see <link to="MediumState"/>) is one of
9126 "Created", "Inaccessible" or "LockedRead", then this performs an
9127 accessibility check on the medium and sets the value of the <link to="#state"/>
9128 attribute accordingly; that value is also returned for convenience.
9129
9130 For all other state values, this does not perform a refresh but returns
9131 the state only.
9132
9133 The refresh, if performed, may take a long time (several seconds or even
9134 minutes, depending on the storage unit location and format) because it performs an
9135 accessibility check of the storage unit. This check may cause a significant
9136 delay if the storage unit of the given medium is, for example, a file located
9137 on a network share which is not currently accessible due to connectivity
9138 problems. In that case, the call will not return until a timeout
9139 interval defined by the host OS for this operation expires. For this reason,
9140 it is recommended to never read this attribute on the main UI thread to avoid
9141 making the UI unresponsive.
9142
9143 If the last known state of the medium is "Created" and the accessibility
9144 check fails, then the state would be set to "Inaccessible", and
9145 <link to="#lastAccessError"/> may be used to get more details about the
9146 failure. If the state of the medium is "LockedRead", then it remains the
9147 same, and a non-empty value of <link to="#lastAccessError"/> will
9148 indicate a failed accessibility check in this case.
9149
9150 Note that not all medium states are applicable to all medium types.
9151 </desc>
9152 <param name="state" type="MediumState" dir="return">
9153 <desc>
9154 New medium state.
9155 </desc>
9156 </param>
9157 </method>
9158
9159 <method name="getSnapshotIds">
9160 <desc>
9161 Returns an array of UUIDs of all snapshots of the given machine where
9162 this medium is attached to.
9163
9164 If the medium is attached to the machine in the current state, then the
9165 first element in the array will always be the ID of the queried machine
9166 (i.e. the value equal to the @c machineId argument), followed by
9167 snapshot IDs (if any).
9168
9169 If the medium is not attached to the machine in the current state, then
9170 the array will contain only snapshot IDs.
9171
9172 The returned array may be @c null if this medium is not attached
9173 to the given machine at all, neither in the current state nor in one of
9174 the snapshots.
9175 </desc>
9176 <param name="machineId" type="uuid" mod="string" dir="in">
9177 <desc>
9178 UUID of the machine to query.
9179 </desc>
9180 </param>
9181 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9182 <desc>
9183 Array of snapshot UUIDs of the given machine using this medium.
9184 </desc>
9185 </param>
9186 </method>
9187
9188 <method name="lockRead">
9189 <desc>
9190 Locks this medium for reading.
9191
9192 A read lock is shared: many clients can simultaneously lock the
9193 same medium for reading unless it is already locked for writing (see
9194 <link to="#lockWrite"/>) in which case an error is returned.
9195
9196 When the medium is locked for reading, it cannot be modified
9197 from within VirtualBox. This means that any method that changes
9198 the properties of this medium or contents of the storage unit
9199 will return an error (unless explicitly stated otherwise). That
9200 includes an attempt to start a virtual machine that wants to
9201 write to the the medium.
9202
9203 When the virtual machine is started up, it locks for reading all
9204 media it uses in read-only mode. If some medium cannot be locked
9205 for reading, the startup procedure will fail.
9206 A medium is typically locked for reading while it is used by a running
9207 virtual machine but has a depending differencing image that receives
9208 the actual write operations. This way one base medium can have
9209 multiple child differencing images which can be written to
9210 simultaneously. Read-only media such as DVD and floppy images are
9211 also locked for reading only (so they can be in use by multiple
9212 machines simultaneously).
9213
9214 A medium is also locked for reading when it is the source of a
9215 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9216
9217 The medium locked for reading must be unlocked using the <link
9218 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9219 can be nested and must be followed by the same number of paired
9220 <link to="#unlockRead"/> calls.
9221
9222 This method sets the medium state (see <link to="#state"/>) to
9223 "LockedRead" on success. The medium's previous state must be
9224 one of "Created", "Inaccessible" or "LockedRead".
9225
9226 Locking an inaccessible medium is not an error; this method performs
9227 a logical lock that prevents modifications of this medium through
9228 the VirtualBox API, not a physical file-system lock of the underlying
9229 storage unit.
9230
9231 This method returns the current state of the medium
9232 <i>before</i> the operation.
9233
9234 <result name="VBOX_E_INVALID_OBJECT_STATE">
9235 Invalid medium state (e.g. not created, locked, inaccessible,
9236 creating, deleting).
9237 </result>
9238
9239 </desc>
9240 <param name="state" type="MediumState" dir="return">
9241 <desc>
9242 State of the medium after the operation.
9243 </desc>
9244 </param>
9245 </method>
9246
9247 <method name="unlockRead">
9248 <desc>
9249 Cancels the read lock previously set by <link to="#lockRead"/>.
9250
9251 For both success and failure, this method returns the current state
9252 of the medium <i>after</i> the operation.
9253
9254 See <link to="#lockRead"/> for more details.
9255
9256 <result name="VBOX_E_INVALID_OBJECT_STATE">
9257 Medium not locked for reading.
9258 </result>
9259
9260 </desc>
9261 <param name="state" type="MediumState" dir="return">
9262 <desc>
9263 State of the medium after the operation.
9264 </desc>
9265 </param>
9266 </method>
9267
9268 <method name="lockWrite">
9269 <desc>
9270 Locks this medium for writing.
9271
9272 A write lock, as opposed to <link to="#lockRead"/>, is
9273 exclusive: there may be only one client holding a write lock,
9274 and there may be no read locks while the write lock is held.
9275 As a result, read-locking fails if a write lock is held, and
9276 write-locking fails if either a read or another write lock is held.
9277
9278 When a medium is locked for writing, it cannot be modified
9279 from within VirtualBox, and it is not guaranteed that the values
9280 of its properties are up-to-date. Any method that changes the
9281 properties of this medium or contents of the storage unit will
9282 return an error (unless explicitly stated otherwise).
9283
9284 When a virtual machine is started up, it locks for writing all
9285 media it uses to write data to. If any medium could not be locked
9286 for writing, the startup procedure will fail. If a medium has
9287 differencing images, then while the machine is running, only
9288 the last ("leaf") differencing image is locked for writing,
9289 whereas its parents are locked for reading only.
9290
9291 A medium is also locked for writing when it is the target of a
9292 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9293
9294 The medium locked for writing must be unlocked using the <link
9295 to="#unlockWrite"/> method. Write locks <i>cannot</i> be nested.
9296
9297 This method sets the medium state (see <link to="#state"/>) to
9298 "LockedWrite" on success. The medium's previous state must be
9299 either "Created" or "Inaccessible".
9300
9301 Locking an inaccessible medium is not an error; this method performs
9302 a logical lock that prevents modifications of this medium through
9303 the VirtualBox API, not a physical file-system lock of the underlying
9304 storage unit.
9305
9306 For both, success and failure, this method returns the current
9307 state of the medium <i>before</i> the operation.
9308
9309 <result name="VBOX_E_INVALID_OBJECT_STATE">
9310 Invalid medium state (e.g. not created, locked, inaccessible,
9311 creating, deleting).
9312 </result>
9313
9314 </desc>
9315 <param name="state" type="MediumState" dir="return">
9316 <desc>
9317 State of the medium after the operation.
9318 </desc>
9319 </param>
9320 </method>
9321
9322 <method name="unlockWrite">
9323 <desc>
9324 Cancels the write lock previously set by <link to="#lockWrite"/>.
9325
9326 For both success and failure, this method returns the current
9327 state of the medium <i>after</i> the operation.
9328
9329 See <link to="#lockWrite"/> for more details.
9330
9331 <result name="VBOX_E_INVALID_OBJECT_STATE">
9332 Medium not locked for writing.
9333 </result>
9334
9335 </desc>
9336 <param name="state" type="MediumState" dir="return">
9337 <desc>
9338 State of the medium after the operation.
9339 </desc>
9340 </param>
9341 </method>
9342
9343 <method name="close">
9344 <desc>
9345 Closes this medium.
9346
9347 The medium must not be attached to any known virtual machine
9348 and must not have any known child media, otherwise the
9349 operation will fail.
9350
9351 When the medium is successfully closed, it is removed from
9352 the list of registered media, but its storage unit is not
9353 deleted. In particular, this means that this medium can
9354 later be opened again using the <link to="IVirtualBox::openMedium"/>
9355 call.
9356
9357 Note that after this method successfully returns, the given medium
9358 object becomes uninitialized. This means that any attempt
9359 to call any of its methods or attributes will fail with the
9360 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9361
9362 <result name="VBOX_E_INVALID_OBJECT_STATE">
9363 Invalid medium state (other than not created, created or
9364 inaccessible).
9365 </result>
9366 <result name="VBOX_E_OBJECT_IN_USE">
9367 Medium attached to virtual machine.
9368 </result>
9369 <result name="VBOX_E_FILE_ERROR">
9370 Settings file not accessible.
9371 </result>
9372 <result name="VBOX_E_XML_ERROR">
9373 Could not parse the settings file.
9374 </result>
9375
9376 </desc>
9377 </method>
9378
9379 <!-- storage methods -->
9380
9381 <method name="getProperty">
9382 <desc>
9383 Returns the value of the custom medium property with the given name.
9384
9385 The list of all properties supported by the given medium format can
9386 be obtained with <link to="IMediumFormat::describeProperties"/>.
9387
9388 Note that if this method returns an empty string in @a value, the
9389 requested property is supported but currently not assigned any value.
9390
9391 <result name="VBOX_E_OBJECT_NOT_FOUND">
9392 Requested property does not exist (not supported by the format).
9393 </result>
9394 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9395 </desc>
9396 <param name="name" type="wstring" dir="in">
9397 <desc>Name of the property to get.</desc>
9398 </param>
9399 <param name="value" type="wstring" dir="return">
9400 <desc>Current property value.</desc>
9401 </param>
9402 </method>
9403
9404 <method name="setProperty">
9405 <desc>
9406 Sets the value of the custom medium property with the given name.
9407
9408 The list of all properties supported by the given medium format can
9409 be obtained with <link to="IMediumFormat::describeProperties"/>.
9410
9411 Note that setting the property value to @c null or an empty string is
9412 equivalent to deleting the existing value. A default value (if it is
9413 defined for this property) will be used by the format backend in this
9414 case.
9415
9416 <result name="VBOX_E_OBJECT_NOT_FOUND">
9417 Requested property does not exist (not supported by the format).
9418 </result>
9419 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9420 </desc>
9421 <param name="name" type="wstring" dir="in">
9422 <desc>Name of the property to set.</desc>
9423 </param>
9424 <param name="value" type="wstring" dir="in">
9425 <desc>Property value to set.</desc>
9426 </param>
9427 </method>
9428
9429 <method name="getProperties">
9430 <desc>
9431 Returns values for a group of properties in one call.
9432
9433 The names of the properties to get are specified using the @a names
9434 argument which is a list of comma-separated property names or
9435 an empty string if all properties are to be returned. Note that currently
9436 the value of this argument is ignored and the method always returns all
9437 existing properties.
9438
9439 The list of all properties supported by the given medium format can
9440 be obtained with <link to="IMediumFormat::describeProperties"/>.
9441
9442 The method returns two arrays, the array of property names corresponding
9443 to the @a names argument and the current values of these properties.
9444 Both arrays have the same number of elements with each elemend at the
9445 given index in the first array corresponds to an element at the same
9446 index in the second array.
9447
9448 Note that for properties that do not have assigned values,
9449 an empty string is returned at the appropriate index in the
9450 @a returnValues array.
9451
9452 </desc>
9453 <param name="names" type="wstring" dir="in">
9454 <desc>
9455 Names of properties to get.
9456 </desc>
9457 </param>
9458 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9459 <desc>Names of returned properties.</desc>
9460 </param>
9461 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9462 <desc>Values of returned properties.</desc>
9463 </param>
9464 </method>
9465
9466 <method name="setProperties">
9467 <desc>
9468 Sets values for a group of properties in one call.
9469
9470 The names of the properties to set are passed in the @a names
9471 array along with the new values for them in the @a values array. Both
9472 arrays have the same number of elements with each elemend at the given
9473 index in the first array corresponding to an element at the same index
9474 in the second array.
9475
9476 If there is at least one property name in @a names that is not valid,
9477 the method will fail before changing the values of any other properties
9478 from the @a names array.
9479
9480 Using this method over <link to="#setProperty"/> is preferred if you
9481 need to set several properties at once since it will result into less
9482 IPC calls.
9483
9484 The list of all properties supported by the given medium format can
9485 be obtained with <link to="IMediumFormat::describeProperties"/>.
9486
9487 Note that setting the property value to @c null or an empty string is
9488 equivalent to deleting the existing value. A default value (if it is
9489 defined for this property) will be used by the format backend in this
9490 case.
9491 </desc>
9492 <param name="names" type="wstring" safearray="yes" dir="in">
9493 <desc>Names of properties to set.</desc>
9494 </param>
9495 <param name="values" type="wstring" safearray="yes" dir="in">
9496 <desc>Values of properties to set.</desc>
9497 </param>
9498 </method>
9499
9500 <!-- storage methods -->
9501
9502 <method name="createBaseStorage">
9503 <desc>
9504 Starts creating a hard disk storage unit (fixed/dynamic, according
9505 to the variant flags) in in the background. The previous storage unit
9506 created for this object, if any, must first be deleted using
9507 <link to="#deleteStorage"/>, otherwise the operation will fail.
9508
9509 Before the operation starts, the medium is placed in
9510 <link to="MediumState_Creating"/> state. If the create operation
9511 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
9512 state.
9513
9514 After the returned progress object reports that the operation has
9515 successfully completed, the medium state will be set to <link
9516 to="MediumState_Created"/>, the medium will be remembered by this
9517 VirtualBox installation and may be attached to virtual machines.
9518
9519 <result name="VBOX_E_NOT_SUPPORTED">
9520 The variant of storage creation operation is not supported. See <link
9521 to="IMediumFormat::capabilities"/>.
9522 </result>
9523 </desc>
9524 <param name="logicalSize" type="unsigned long long" dir="in">
9525 <desc>Maximum logical size of the medium in megabytes.</desc>
9526 </param>
9527 <param name="variant" type="MediumVariant" dir="in">
9528 <desc>Exact image variant which should be created.</desc>
9529 </param>
9530 <param name="progress" type="IProgress" dir="return">
9531 <desc>Progress object to track the operation completion.</desc>
9532 </param>
9533 </method>
9534
9535 <method name="deleteStorage">
9536 <desc>
9537 Starts deleting the storage unit of this medium.
9538
9539 The medium must not be attached to any known virtual machine and must
9540 not have any known child media, otherwise the operation will fail.
9541 It will also fail if there is no storage unit to delete or if deletion
9542 is already in progress, or if the medium is being in use (locked for
9543 read or for write) or inaccessible. Therefore, the only valid state for
9544 this operation to succeed is <link to="MediumState_Created"/>.
9545
9546 Before the operation starts, the medium is placed in
9547 <link to="MediumState_Deleting"/> state and gets removed from the list
9548 of remembered hard disks (media registry). If the delete operation
9549 fails, the medium will be remembered again and placed back to
9550 <link to="MediumState_Created"/> state.
9551
9552 After the returned progress object reports that the operation is
9553 complete, the medium state will be set to
9554 <link to="MediumState_NotCreated"/> and you will be able to use one of
9555 the storage creation methods to create it again.
9556
9557 <see>#close()</see>
9558
9559 <result name="VBOX_E_OBJECT_IN_USE">
9560 Medium is attached to a virtual machine.
9561 </result>
9562 <result name="VBOX_E_NOT_SUPPORTED">
9563 Storage deletion is not allowed because neither of storage creation
9564 operations are supported. See
9565 <link to="IMediumFormat::capabilities"/>.
9566 </result>
9567
9568 <note>
9569 If the deletion operation fails, it is not guaranteed that the storage
9570 unit still exists. You may check the <link to="IMedium::state"/> value
9571 to answer this question.
9572 </note>
9573 </desc>
9574 <param name="progress" type="IProgress" dir="return">
9575 <desc>Progress object to track the operation completion.</desc>
9576 </param>
9577 </method>
9578
9579 <!-- diff methods -->
9580
9581 <method name="createDiffStorage">
9582 <desc>
9583 Starts creating an empty differencing storage unit based on this
9584 medium in the format and at the location defined by the @a target
9585 argument.
9586
9587 The target medium must be in <link to="MediumState_NotCreated"/>
9588 state (i.e. must not have an existing storage unit). Upon successful
9589 completion, this operation will set the type of the target medium to
9590 <link to="MediumType_Normal"/> and create a storage unit necessary to
9591 represent the differencing medium data in the given format (according
9592 to the storage format of the target object).
9593
9594 After the returned progress object reports that the operation is
9595 successfully complete, the target medium gets remembered by this
9596 VirtualBox installation and may be attached to virtual machines.
9597
9598 <note>
9599 The medium will be set to <link to="MediumState_LockedRead"/>
9600 state for the duration of this operation.
9601 </note>
9602 <result name="VBOX_E_OBJECT_IN_USE">
9603 Medium not in @c NotCreated state.
9604 </result>
9605 </desc>
9606 <param name="target" type="IMedium" dir="in">
9607 <desc>Target medium.</desc>
9608 </param>
9609 <param name="variant" type="MediumVariant" dir="in">
9610 <desc>Exact image variant which should be created.</desc>
9611 </param>
9612 <param name="progress" type="IProgress" dir="return">
9613 <desc>Progress object to track the operation completion.</desc>
9614 </param>
9615 </method>
9616
9617 <method name="mergeTo">
9618 <desc>
9619 Starts merging the contents of this medium and all intermediate
9620 differencing media in the chain to the given target medium.
9621
9622 The target medium must be either a descendant of this medium or
9623 its ancestor (otherwise this method will immediately return a failure).
9624 It follows that there are two logical directions of the merge operation:
9625 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9626 ancestor (<i>backward merge</i>). Let us consider the following medium
9627 chain:
9628
9629 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9630
9631 Here, calling this method on the <tt>Base</tt> medium object with
9632 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9633 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9634 merge. Note that in both cases the contents of the resulting medium
9635 will be the same, the only difference is the medium object that takes
9636 the result of the merge operation. In case of the forward merge in the
9637 above example, the result will be written to <tt>Diff_2</tt>; in case of
9638 the backward merge, the result will be written to <tt>Base</tt>. In
9639 other words, the result of the operation is always stored in the target
9640 medium.
9641
9642 Upon successful operation completion, the storage units of all media in
9643 the chain between this (source) medium and the target medium, including
9644 the source medium itself, will be automatically deleted and the
9645 relevant medium objects (including this medium) will become
9646 uninitialized. This means that any attempt to call any of
9647 their methods or attributes will fail with the
9648 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9649 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9650 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> media.
9651 Note that <tt>Diff_2</tt> in this case will become a base medium
9652 itself since it will no longer be based on any other medium.
9653
9654 Considering the above, all of the following conditions must be met in
9655 order for the merge operation to succeed:
9656 <ul>
9657 <li>
9658 Neither this (source) medium nor any intermediate
9659 differencing medium in the chain between it and the target
9660 medium is attached to any virtual machine.
9661 </li>
9662 <li>
9663 Neither the source medium nor the target medium is an
9664 <link to="MediumType_Immutable"/> medium.
9665 </li>
9666 <li>
9667 The part of the medium tree from the source medium to the
9668 target medium is a linear chain, i.e. all medium in this
9669 chain have exactly one child which is the next medium in this
9670 chain. The only exception from this rule is the target medium in
9671 the forward merge operation; it is allowed to have any number of
9672 child media because the merge operation will not change its
9673 logical contents (as it is seen by the guest OS or by children).
9674 </li>
9675 <li>
9676 None of the involved media are in
9677 <link to="MediumState_LockedRead"/> or
9678 <link to="MediumState_LockedWrite"/> state.
9679 </li>
9680 </ul>
9681
9682 <note>
9683 This (source) medium and all intermediates will be placed to <link
9684 to="MediumState_Deleting"/> state and the target medium will be
9685 placed to <link to="MediumState_LockedWrite"/> state and for the
9686 duration of this operation.
9687 </note>
9688 </desc>
9689 <param name="target" type="IMedium" dir="in">
9690 <desc>Target medium.</desc>
9691 </param>
9692 <param name="progress" type="IProgress" dir="return">
9693 <desc>Progress object to track the operation completion.</desc>
9694 </param>
9695 </method>
9696
9697 <!-- clone method -->
9698
9699 <method name="cloneTo">
9700 <desc>
9701 Starts creating a clone of this medium in the format and at the
9702 location defined by the @a target argument.
9703
9704 The target medium must be either in <link to="MediumState_NotCreated"/>
9705 state (i.e. must not have an existing storage unit) or in
9706 <link to="MediumState_Created"/> state (i.e. created and not locked, and
9707 big enough to hold the data or else the copy will be partial). Upon
9708 successful completion, the cloned medium will contain exactly the
9709 same sector data as the medium being cloned, except that in the
9710 first case a new UUID for the clone will be randomly generated, and in
9711 the second case the UUID will remain unchanged.
9712
9713 The @a parent argument defines which medium will be the parent
9714 of the clone. Passing a @c null reference indicates that the clone will
9715 be a base image, i.e. completely independent. It is possible to specify
9716 an arbitrary medium for this parameter, including the parent of the
9717 medium which is being cloned. Even cloning to a child of the source
9718 medium is possible. Note that when cloning to an existing image, the
9719 @a parent irgument is ignored.
9720
9721 After the returned progress object reports that the operation is
9722 successfully complete, the target medium gets remembered by this
9723 VirtualBox installation and may be attached to virtual machines.
9724
9725 <note>
9726 This medium will be placed to <link to="MediumState_LockedRead"/>
9727 state for the duration of this operation.
9728 </note>
9729 <result name="E_NOTIMPL">
9730 The specified cloning variant is not supported at the moment.
9731 </result>
9732 </desc>
9733 <param name="target" type="IMedium" dir="in">
9734 <desc>Target medium.</desc>
9735 </param>
9736 <param name="variant" type="MediumVariant" dir="in">
9737 <desc>Exact image variant which should be created.</desc>
9738 </param>
9739 <param name="parent" type="IMedium" dir="in">
9740 <desc>Parent of the cloned medium.</desc>
9741 </param>
9742 <param name="progress" type="IProgress" dir="return">
9743 <desc>Progress object to track the operation completion.</desc>
9744 </param>
9745 </method>
9746
9747 <!-- other methods -->
9748
9749 <method name="compact">
9750 <desc>
9751 Starts compacting of this medium. This means that the medium is
9752 transformed into a possibly more compact storage representation.
9753 This potentially creates temporary images, which can require a
9754 substantial amount of additional disk space.
9755
9756 This medium will be placed to <link to="MediumState_LockedWrite"/>
9757 state and all its parent media (if any) will be placed to
9758 <link to="MediumState_LockedRead"/> state for the duration of this
9759 operation.
9760
9761 Please note that the results can be either returned straight away,
9762 or later as the result of the background operation via the object
9763 returned via the @a progress parameter.
9764
9765 <result name="VBOX_E_NOT_SUPPORTED">
9766 Medium format does not support compacting (but potentially
9767 needs it).
9768 </result>
9769 </desc>
9770 <param name="progress" type="IProgress" dir="return">
9771 <desc>Progress object to track the operation completion.</desc>
9772 </param>
9773 </method>
9774
9775 <method name="resize">
9776 <desc>
9777 Starts resizing this medium. This means that the nominal size of the
9778 medium is set to the new value. Both increasing and decreasing the
9779 size is possible, and there are no safety checks, since VirtualBox
9780 does not make any assumptions about the medium contents.
9781
9782 Resizing usually needs additional disk space, and possibly also
9783 some temporary disk space. Note that resize does not create a full
9784 temporary copy of the medium, so the additional disk space requirement
9785 is usually much lower than using the clone operation.
9786
9787 This medium will be placed to <link to="MediumState_LockedWrite"/>
9788 state for the duration of this operation.
9789
9790 Please note that the results can be either returned straight away,
9791 or later as the result of the background operation via the object
9792 returned via the @a progress parameter.
9793
9794 <result name="VBOX_E_NOT_SUPPORTED">
9795 Medium format does not support resizing.
9796 </result>
9797 </desc>
9798 <param name="logicalSize" type="unsigned long long" dir="in">
9799 <desc>New nominal capacity of the medium in megabytes.</desc>
9800 </param>
9801 <param name="progress" type="IProgress" dir="return">
9802 <desc>Progress object to track the operation completion.</desc>
9803 </param>
9804 </method>
9805
9806 <method name="reset">
9807 <desc>
9808 Starts erasing the contents of this differencing medium.
9809
9810 This operation will reset the differencing medium to its initial
9811 state when it does not contain any sector data and any read operation is
9812 redirected to its parent medium. This automatically gets called
9813 during VM power-up for every medium whose <link to="#autoReset" />
9814 attribute is @c true.
9815
9816 The medium will be write-locked for the duration of this operation (see
9817 <link to="#lockWrite" />).
9818
9819 <result name="VBOX_E_NOT_SUPPORTED">
9820 This is not a differencing medium.
9821 </result>
9822 <result name="VBOX_E_INVALID_OBJECT_STATE">
9823 Medium is not in <link to="MediumState_Created"/> or
9824 <link to="MediumState_Inaccessible"/> state.
9825 </result>
9826 </desc>
9827 <param name="progress" type="IProgress" dir="return">
9828 <desc>Progress object to track the operation completion.</desc>
9829 </param>
9830 </method>
9831
9832 </interface>
9833
9834
9835 <!--
9836 // IMediumFormat
9837 /////////////////////////////////////////////////////////////////////////
9838 -->
9839
9840 <enum
9841 name="DataType"
9842 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9843 >
9844 <const name="Int32" value="0"/>
9845 <const name="Int8" value="1"/>
9846 <const name="String" value="2"/>
9847 </enum>
9848
9849 <enum
9850 name="DataFlags"
9851 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9852 >
9853 <const name="None" value="0x00"/>
9854 <const name="Mandatory" value="0x01"/>
9855 <const name="Expert" value="0x02"/>
9856 <const name="Array" value="0x04"/>
9857 <const name="FlagMask" value="0x07"/>
9858 </enum>
9859
9860 <enum
9861 name="MediumFormatCapabilities"
9862 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
9863 >
9864 <desc>
9865 Medium format capability flags.
9866 </desc>
9867
9868 <const name="Uuid" value="0x01">
9869 <desc>
9870 Supports UUIDs as expected by VirtualBox code.
9871 </desc>
9872 </const>
9873
9874 <const name="CreateFixed" value="0x02">
9875 <desc>
9876 Supports creating fixed size images, allocating all space instantly.
9877 </desc>
9878 </const>
9879
9880 <const name="CreateDynamic" value="0x04">
9881 <desc>
9882 Supports creating dynamically growing images, allocating space on
9883 demand.
9884 </desc>
9885 </const>
9886
9887 <const name="CreateSplit2G" value="0x08">
9888 <desc>
9889 Supports creating images split in chunks of a bit less than 2 GBytes.
9890 </desc>
9891 </const>
9892
9893 <const name="Differencing" value="0x10">
9894 <desc>
9895 Supports being used as a format for differencing media (see <link
9896 to="IMedium::createDiffStorage"/>).
9897 </desc>
9898 </const>
9899
9900 <const name="Asynchronous" value="0x20">
9901 <desc>
9902 Supports asynchronous I/O operations for at least some configurations.
9903 </desc>
9904 </const>
9905
9906 <const name="File" value="0x40">
9907 <desc>
9908 The format backend operates on files (the <link to="IMedium::location"/>
9909 attribute of the medium specifies a file used to store medium
9910 data; for a list of supported file extensions see
9911 <link to="IMediumFormat::fileExtensions"/>).
9912 </desc>
9913 </const>
9914
9915 <const name="Properties" value="0x80">
9916 <desc>
9917 The format backend uses the property interface to configure the storage
9918 location and properties (the <link to="IMediumFormat::describeProperties"/>
9919 method is used to get access to properties supported by the given medium format).
9920 </desc>
9921 </const>
9922
9923 <const name="CapabilityMask" value="0xFF"/>
9924 </enum>
9925
9926 <interface
9927 name="IMediumFormat" extends="$unknown"
9928 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
9929 wsmap="managed"
9930 >
9931 <desc>
9932 The IMediumFormat interface represents a medium format.
9933
9934 Each medium format has an associated backend which is used to handle
9935 media stored in this format. This interface provides information
9936 about the properties of the associated backend.
9937
9938 Each medium format is identified by a string represented by the
9939 <link to="#id"/> attribute. This string is used in calls like
9940 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9941 format.
9942
9943 The list of all supported medium formats can be obtained using
9944 <link to="ISystemProperties::mediumFormats"/>.
9945
9946 <see>IMedium</see>
9947 </desc>
9948
9949 <attribute name="id" type="wstring" readonly="yes">
9950 <desc>
9951 Identifier of this format.
9952
9953 The format identifier is a non-@c null non-empty ASCII string. Note that
9954 this string is case-insensitive. This means that, for example, all of
9955 the following strings:
9956 <pre>
9957 "VDI"
9958 "vdi"
9959 "VdI"</pre>
9960 refer to the same medium format.
9961
9962 This string is used in methods of other interfaces where it is necessary
9963 to specify a medium format, such as
9964 <link to="IVirtualBox::createHardDisk"/>.
9965 </desc>
9966 </attribute>
9967
9968 <attribute name="name" type="wstring" readonly="yes">
9969 <desc>
9970 Human readable description of this format.
9971
9972 Mainly for use in file open dialogs.
9973 </desc>
9974 </attribute>
9975
9976 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9977 <desc>
9978 Array of strings containing the supported file extensions.
9979
9980 The first extension in the array is the extension preferred by the
9981 backend. It is recommended to use this extension when specifying a
9982 location of the storage unit for a new medium.
9983
9984 Note that some backends do not work on files, so this array may be
9985 empty.
9986
9987 <see>IMediumFormat::capabilities</see>
9988 </desc>
9989 </attribute>
9990
9991 <attribute name="capabilities" type="unsigned long" readonly="yes">
9992 <desc>
9993 Capabilities of the format as a set of bit flags.
9994
9995 For the meaning of individual capability flags see
9996 <link to="MediumFormatCapabilities"/>.
9997 </desc>
9998 </attribute>
9999
10000 <method name="describeProperties">
10001 <desc>
10002 Returns several arrays describing the properties supported by this
10003 format.
10004
10005 An element with the given index in each array describes one
10006 property. Thus, the number of elements in each returned array is the
10007 same and corresponds to the number of supported properties.
10008
10009 The returned arrays are filled in only if the
10010 <link to="MediumFormatCapabilities_Properties"/> flag is set.
10011 All arguments must be non-@c null.
10012
10013 <see>DataType</see>
10014 <see>DataFlags</see>
10015 </desc>
10016
10017 <param name="names" type="wstring" safearray="yes" dir="out">
10018 <desc>Array of property names.</desc>
10019 </param>
10020 <param name="description" type="wstring" safearray="yes" dir="out">
10021 <desc>Array of property descriptions.</desc>
10022 </param>
10023 <param name="types" type="DataType" safearray="yes" dir="out">
10024 <desc>Array of property types.</desc>
10025 </param>
10026 <param name="flags" type="unsigned long" safearray="yes" dir="out">
10027 <desc>Array of property flags.</desc>
10028 </param>
10029 <param name="defaults" type="wstring" safearray="yes" dir="out">
10030 <desc>Array of default property values.</desc>
10031 </param>
10032 </method>
10033
10034 </interface>
10035
10036
10037 <!--
10038 // IKeyboard
10039 /////////////////////////////////////////////////////////////////////////
10040 -->
10041
10042 <interface
10043 name="IKeyboard" extends="$unknown"
10044 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10045 wsmap="managed"
10046 >
10047 <desc>
10048 The IKeyboard interface represents the virtual machine's keyboard. Used
10049 in <link to="IConsole::keyboard"/>.
10050
10051 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10052 to the virtual machine.
10053
10054 </desc>
10055 <method name="putScancode">
10056 <desc>Sends a scancode to the keyboard.
10057
10058 <result name="VBOX_E_IPRT_ERROR">
10059 Could not send scan code to virtual keyboard.
10060 </result>
10061
10062 </desc>
10063 <param name="scancode" type="long" dir="in"/>
10064 </method>
10065
10066 <method name="putScancodes">
10067 <desc>Sends an array of scancodes to the keyboard.
10068
10069 <result name="VBOX_E_IPRT_ERROR">
10070 Could not send all scan codes to virtual keyboard.
10071 </result>
10072
10073 </desc>
10074 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10075 <param name="codesStored" type="unsigned long" dir="return"/>
10076 </method>
10077
10078 <method name="putCAD">
10079 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10080 function is nothing special, it is just a convenience function
10081 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10082
10083 <result name="VBOX_E_IPRT_ERROR">
10084 Could not send all scan codes to virtual keyboard.
10085 </result>
10086
10087 </desc>
10088 </method>
10089
10090 </interface>
10091
10092
10093 <!--
10094 // IMouse
10095 /////////////////////////////////////////////////////////////////////////
10096 -->
10097
10098 <enum
10099 name="MouseButtonState"
10100 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10101 >
10102 <desc>
10103 Mouse button state.
10104 </desc>
10105
10106 <const name="LeftButton" value="0x01"/>
10107 <const name="RightButton" value="0x02"/>
10108 <const name="MiddleButton" value="0x04"/>
10109 <const name="WheelUp" value="0x08"/>
10110 <const name="WheelDown" value="0x10"/>
10111 <const name="XButton1" value="0x20"/>
10112 <const name="XButton2" value="0x40"/>
10113 <const name="MouseStateMask" value="0x7F"/>
10114 </enum>
10115
10116 <interface
10117 name="IMouse" extends="$unknown"
10118 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
10119 wsmap="managed"
10120 >
10121 <desc>
10122 The IMouse interface represents the virtual machine's mouse. Used in
10123 <link to="IConsole::mouse"/>.
10124
10125 Through this interface, the virtual machine's virtual mouse can be
10126 controlled.
10127 </desc>
10128
10129 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10130 <desc>
10131 Whether the guest OS supports absolute mouse pointer positioning
10132 or not.
10133 <note>
10134 You can use the <link to="IMouseCapabilityChangedEvent"/>
10135 event to be instantly informed about changes of this attribute
10136 during virtual machine execution.
10137 </note>
10138 <see><link to="#putMouseEventAbsolute"/></see>
10139 </desc>
10140 </attribute>
10141
10142 <attribute name="relativeSupported" type="boolean" readonly="yes">
10143 <desc>
10144 Whether the guest OS supports relative mouse pointer positioning
10145 or not.
10146 <note>
10147 You can use the <link to="IMouseCapabilityChangedEvent"/>
10148 event to be instantly informed about changes of this attribute
10149 during virtual machine execution.
10150 </note>
10151 <see><link to="#putMouseEvent"/></see>
10152 </desc>
10153 </attribute>
10154
10155 <attribute name="needsHostCursor" type="boolean" readonly="yes">
10156 <desc>
10157 Whether the guest OS can currently switch to drawing it's own mouse
10158 cursor on demand.
10159 <note>
10160 You can use the <link to="IMouseCapabilityChangedEvent"/>
10161 event to be instantly informed about changes of this attribute
10162 during virtual machine execution.
10163 </note>
10164 <see><link to="#putMouseEvent"/></see>
10165 </desc>
10166 </attribute>
10167
10168 <method name="putMouseEvent">
10169 <desc>
10170 Initiates a mouse event using relative pointer movements
10171 along x and y axis.
10172
10173 <result name="E_ACCESSDENIED">
10174 Console not powered up.
10175 </result>
10176 <result name="VBOX_E_IPRT_ERROR">
10177 Could not send mouse event to virtual mouse.
10178 </result>
10179
10180 </desc>
10181
10182 <param name="dx" type="long" dir="in">
10183 <desc>
10184 Amount of pixels the mouse should move to the right.
10185 Negative values move the mouse to the left.
10186 </desc>
10187 </param>
10188 <param name="dy" type="long" dir="in">
10189 <desc>
10190 Amount of pixels the mouse should move downwards.
10191 Negative values move the mouse upwards.
10192 </desc>
10193 </param>
10194 <param name="dz" type="long" dir="in">
10195 <desc>
10196 Amount of mouse wheel moves.
10197 Positive values describe clockwise wheel rotations,
10198 negative values describe counterclockwise rotations.
10199 </desc>
10200 </param>
10201 <param name="dw" type="long" dir="in">
10202 <desc>
10203 Amount of horizontal mouse wheel moves.
10204 Positive values describe a movement to the left,
10205 negative values describe a movement to the right.
10206 </desc>
10207 </param>
10208 <param name="buttonState" type="long" dir="in">
10209 <desc>
10210 The current state of mouse buttons. Every bit represents
10211 a mouse button as follows:
10212 <table>
10213 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10214 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10215 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10216 </table>
10217 A value of <tt>1</tt> means the corresponding button is pressed.
10218 otherwise it is released.
10219 </desc>
10220 </param>
10221 </method>
10222
10223 <method name="putMouseEventAbsolute">
10224 <desc>
10225 Positions the mouse pointer using absolute x and y coordinates.
10226 These coordinates are expressed in pixels and
10227 start from <tt>[1,1]</tt> which corresponds to the top left
10228 corner of the virtual display.
10229
10230 <result name="E_ACCESSDENIED">
10231 Console not powered up.
10232 </result>
10233 <result name="VBOX_E_IPRT_ERROR">
10234 Could not send mouse event to virtual mouse.
10235 </result>
10236
10237 <note>
10238 This method will have effect only if absolute mouse
10239 positioning is supported by the guest OS.
10240 </note>
10241
10242 <see><link to="#absoluteSupported"/></see>
10243 </desc>
10244
10245 <param name="x" type="long" dir="in">
10246 <desc>
10247 X coordinate of the pointer in pixels, starting from @c 1.
10248 </desc>
10249 </param>
10250 <param name="y" type="long" dir="in">
10251 <desc>
10252 Y coordinate of the pointer in pixels, starting from @c 1.
10253 </desc>
10254 </param>
10255 <param name="dz" type="long" dir="in">
10256 <desc>
10257 Amount of mouse wheel moves.
10258 Positive values describe clockwise wheel rotations,
10259 negative values describe counterclockwise rotations.
10260 </desc>
10261 </param>
10262 <param name="dw" type="long" dir="in">
10263 <desc>
10264 Amount of horizontal mouse wheel moves.
10265 Positive values describe a movement to the left,
10266 negative values describe a movement to the right.
10267 </desc>
10268 </param>
10269 <param name="buttonState" type="long" dir="in">
10270 <desc>
10271 The current state of mouse buttons. Every bit represents
10272 a mouse button as follows:
10273 <table>
10274 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10275 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10276 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10277 </table>
10278 A value of @c 1 means the corresponding button is pressed.
10279 otherwise it is released.
10280 </desc>
10281 </param>
10282 </method>
10283
10284 </interface>
10285
10286 <!--
10287 // IDisplay
10288 /////////////////////////////////////////////////////////////////////////
10289 -->
10290
10291 <enum
10292 name="FramebufferPixelFormat"
10293 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10294 >
10295 <desc>
10296 Format of the video memory buffer. Constants represented by this enum can
10297 be used to test for particular values of <link
10298 to="IFramebuffer::pixelFormat"/>. See also <link
10299 to="IFramebuffer::requestResize"/>.
10300
10301 See also www.fourcc.org for more information about FOURCC pixel formats.
10302 </desc>
10303
10304 <const name="Opaque" value="0">
10305 <desc>
10306 Unknown buffer format (the user may not assume any particular format of
10307 the buffer).
10308 </desc>
10309 </const>
10310 <const name="FOURCC_RGB" value="0x32424752">
10311 <desc>
10312 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10313 bit layout).
10314 </desc>
10315 </const>
10316 </enum>
10317
10318 <interface
10319 name="IFramebuffer" extends="$unknown"
10320 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10321 wsmap="suppress"
10322 >
10323 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10324 <desc>Address of the start byte of the frame buffer.</desc>
10325 </attribute>
10326
10327 <attribute name="width" type="unsigned long" readonly="yes">
10328 <desc>Frame buffer width, in pixels.</desc>
10329 </attribute>
10330
10331 <attribute name="height" type="unsigned long" readonly="yes">
10332 <desc>Frame buffer height, in pixels.</desc>
10333 </attribute>
10334
10335 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10336 <desc>
10337 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10338 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10339 are: 8, 15, 16, 24 and 32.
10340 </desc>
10341 </attribute>
10342
10343 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10344 <desc>
10345 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10346 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10347 size of the scan line must be aligned to 32 bits.
10348 </desc>
10349 </attribute>
10350
10351 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10352 <desc>
10353 Frame buffer pixel format. It's either one of the values defined by <link
10354 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10355 <note>
10356 This attribute must never return <link
10357 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10358 <link to="#address"/> points to must be always known.
10359 </note>
10360 </desc>
10361 </attribute>
10362
10363 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10364 <desc>
10365 Defines whether this frame buffer uses the virtual video card's memory
10366 buffer (guest VRAM) directly or not. See <link
10367 to="IFramebuffer::requestResize"/> for more information.
10368 </desc>
10369 </attribute>
10370
10371 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10372 <desc>
10373 Hint from the frame buffer about how much of the standard
10374 screen height it wants to use for itself. This information is
10375 exposed to the guest through the VESA BIOS and VMMDev interface
10376 so that it can use it for determining its video mode table. It
10377 is not guaranteed that the guest respects the value.
10378 </desc>
10379 </attribute>
10380
10381 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10382 <desc>
10383 An alpha-blended overlay which is superposed over the frame buffer.
10384 The initial purpose is to allow the display of icons providing
10385 information about the VM state, including disk activity, in front
10386 ends which do not have other means of doing that. The overlay is
10387 designed to controlled exclusively by IDisplay. It has no locking
10388 of its own, and any changes made to it are not guaranteed to be
10389 visible until the affected portion of IFramebuffer is updated. The
10390 overlay can be created lazily the first time it is requested. This
10391 attribute can also return @c null to signal that the overlay is not
10392 implemented.
10393 </desc>
10394 </attribute>
10395
10396 <attribute name="winId" type="unsigned long long" readonly="yes">
10397 <desc>
10398 Platform-dependent identifier of the window where context of this
10399 frame buffer is drawn, or zero if there's no such window.
10400 </desc>
10401 </attribute>
10402
10403 <method name="lock">
10404 <desc>
10405 Locks the frame buffer.
10406 Gets called by the IDisplay object where this frame buffer is
10407 bound to.
10408 </desc>
10409 </method>
10410
10411 <method name="unlock">
10412 <desc>
10413 Unlocks the frame buffer.
10414 Gets called by the IDisplay object where this frame buffer is
10415 bound to.
10416 </desc>
10417 </method>
10418
10419 <method name="notifyUpdate">
10420 <desc>
10421 Informs about an update.
10422 Gets called by the display object where this buffer is
10423 registered.
10424 </desc>
10425 <param name="x" type="unsigned long" dir="in"/>
10426 <param name="y" type="unsigned long" dir="in"/>
10427 <param name="width" type="unsigned long" dir="in"/>
10428 <param name="height" type="unsigned long" dir="in"/>
10429 </method>
10430
10431 <method name="requestResize">
10432 <desc>
10433 Requests a size and pixel format change.
10434
10435 There are two modes of working with the video buffer of the virtual
10436 machine. The <i>indirect</i> mode implies that the IFramebuffer
10437 implementation allocates a memory buffer for the requested display mode
10438 and provides it to the virtual machine. In <i>direct</i> mode, the
10439 IFramebuffer implementation uses the memory buffer allocated and owned
10440 by the virtual machine. This buffer represents the video memory of the
10441 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10442 usually faster because the implementation gets a raw pointer to the
10443 guest VRAM buffer which it can directly use for visualizing the contents
10444 of the virtual display, as opposed to the indirect mode where the
10445 contents of guest VRAM are copied to the memory buffer provided by
10446 the implementation every time a display update occurs.
10447
10448 It is important to note that the direct mode is really fast only when
10449 the implementation uses the given guest VRAM buffer directly, for
10450 example, by blitting it to the window representing the virtual machine's
10451 display, which saves at least one copy operation comparing to the
10452 indirect mode. However, using the guest VRAM buffer directly is not
10453 always possible: the format and the color depth of this buffer may be
10454 not supported by the target window, or it may be unknown (opaque) as in
10455 case of text or non-linear multi-plane VGA video modes. In this case,
10456 the indirect mode (that is always available) should be used as a
10457 fallback: when the guest VRAM contents are copied to the
10458 implementation-provided memory buffer, color and format conversion is
10459 done automatically by the underlying code.
10460
10461 The @a pixelFormat parameter defines whether the direct mode is
10462 available or not. If @a pixelFormat is <link
10463 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10464 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10465 @a bytesPerLine parameters must be ignored and the implementation must use
10466 the indirect mode (where it provides its own buffer in one of the
10467 supported formats). In all other cases, @a pixelFormat together with
10468 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10469 buffer pointed to by the @a VRAM parameter and the implementation is
10470 free to choose which mode to use. To indicate that this frame buffer uses
10471 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10472 attribute must return @c true and <link to="#address"/> must
10473 return exactly the same address that is passed in the @a VRAM parameter
10474 of this method; otherwise it is assumed that the indirect strategy is
10475 chosen.
10476
10477 The @a width and @a height parameters represent the size of the
10478 requested display mode in both modes. In case of indirect mode, the
10479 provided memory buffer should be big enough to store data of the given
10480 display mode. In case of direct mode, it is guaranteed that the given
10481 @a VRAM buffer contains enough space to represent the display mode of the
10482 given size. Note that this frame buffer's <link to="#width"/> and <link
10483 to="#height"/> attributes must return exactly the same values as
10484 passed to this method after the resize is completed (see below).
10485
10486 The @a finished output parameter determines if the implementation has
10487 finished resizing the frame buffer or not. If, for some reason, the
10488 resize cannot be finished immediately during this call, @a finished
10489 must be set to @c false, and the implementation must call
10490 <link to="IDisplay::resizeCompleted"/> after it has returned from
10491 this method as soon as possible. If @a finished is @c false, the
10492 machine will not call any frame buffer methods until
10493 <link to="IDisplay::resizeCompleted"/> is called.
10494
10495 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10496 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10497 this frame buffer must return exactly the same values as specified in the
10498 parameters of this method, after the resize is completed. If the
10499 indirect mode is chosen, these attributes must return values describing
10500 the format of the implementation's own memory buffer <link
10501 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10502 value must always correlate with <link to="#pixelFormat"/>. Note that
10503 the <link to="#pixelFormat"/> attribute must never return <link
10504 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10505
10506 <note>
10507 This method is called by the IDisplay object under the
10508 <link to="#lock"/> provided by this IFramebuffer
10509 implementation. If this method returns @c false in @a finished, then
10510 this lock is not released until
10511 <link to="IDisplay::resizeCompleted"/> is called.
10512 </note>
10513 </desc>
10514 <param name="screenId" type="unsigned long" dir="in">
10515 <desc>
10516 Logical screen number. Must be used in the corresponding call to
10517 <link to="IDisplay::resizeCompleted"/> if this call is made.
10518 </desc>
10519 </param>
10520 <param name="pixelFormat" type="unsigned long" dir="in">
10521 <desc>
10522 Pixel format of the memory buffer pointed to by @a VRAM.
10523 See also <link to="FramebufferPixelFormat"/>.
10524 </desc>
10525 </param>
10526 <param name="VRAM" type="octet" mod="ptr" dir="in">
10527 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10528 </param>
10529 <param name="bitsPerPixel" type="unsigned long" dir="in">
10530 <desc>Color depth, bits per pixel.</desc>
10531 </param>
10532 <param name="bytesPerLine" type="unsigned long" dir="in">
10533 <desc>Size of one scan line, in bytes.</desc>
10534 </param>
10535 <param name="width" type="unsigned long" dir="in">
10536 <desc>Width of the guest display, in pixels.</desc>
10537 </param>
10538 <param name="height" type="unsigned long" dir="in">
10539 <desc>Height of the guest display, in pixels.</desc>
10540 </param>
10541 <param name="finished" type="boolean" dir="return">
10542 <desc>
10543 Can the VM start using the new frame buffer immediately
10544 after this method returns or it should wait for
10545 <link to="IDisplay::resizeCompleted"/>.
10546 </desc>
10547 </param>
10548 </method>
10549
10550 <method name="videoModeSupported">
10551 <desc>
10552 Returns whether the frame buffer implementation is willing to
10553 support a given video mode. In case it is not able to render
10554 the video mode (or for some reason not willing), it should
10555 return @c false. Usually this method is called when the guest
10556 asks the VMM device whether a given video mode is supported
10557 so the information returned is directly exposed to the guest.
10558 It is important that this method returns very quickly.
10559 </desc>
10560 <param name="width" type="unsigned long" dir="in"/>
10561 <param name="height" type="unsigned long" dir="in"/>
10562 <param name="bpp" type="unsigned long" dir="in"/>
10563 <param name="supported" type="boolean" dir="return"/>
10564 </method>
10565
10566 <method name="getVisibleRegion">
10567 <desc>
10568 Returns the visible region of this frame buffer.
10569
10570 If the @a rectangles parameter is @c null then the value of the
10571 @a count parameter is ignored and the number of elements necessary to
10572 describe the current visible region is returned in @a countCopied.
10573
10574 If @a rectangles is not @c null but @a count is less
10575 than the required number of elements to store region data, the method
10576 will report a failure. If @a count is equal or greater than the
10577 required number of elements, then the actual number of elements copied
10578 to the provided array will be returned in @a countCopied.
10579
10580 <note>
10581 The address of the provided array must be in the process space of
10582 this IFramebuffer object.
10583 </note>
10584 <note>
10585 Method not yet implemented.
10586 </note>
10587 </desc>
10588 <param name="rectangles" type="octet" mod="ptr" dir="in">
10589 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10590 </param>
10591 <param name="count" type="unsigned long" dir="in">
10592 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10593 </param>
10594 <param name="countCopied" type="unsigned long" dir="return">
10595 <desc>Number of elements copied to the @a rectangles array.</desc>
10596 </param>
10597 </method>
10598
10599 <method name="setVisibleRegion">
10600 <desc>
10601 Suggests a new visible region to this frame buffer. This region
10602 represents the area of the VM display which is a union of regions of
10603 all top-level windows of the guest operating system running inside the
10604 VM (if the Guest Additions for this system support this
10605 functionality). This information may be used by the frontends to
10606 implement the seamless desktop integration feature.
10607
10608 <note>
10609 The address of the provided array must be in the process space of
10610 this IFramebuffer object.
10611 </note>
10612 <note>
10613 The IFramebuffer implementation must make a copy of the provided
10614 array of rectangles.
10615 </note>
10616 <note>
10617 Method not yet implemented.
10618 </note>
10619 </desc>
10620 <param name="rectangles" type="octet" mod="ptr" dir="in">
10621 <desc>Pointer to the @c RTRECT array.</desc>
10622 </param>
10623 <param name="count" type="unsigned long" dir="in">
10624 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10625 </param>
10626 </method>
10627
10628 <method name="processVHWACommand">
10629 <desc>
10630 Posts a Video HW Acceleration Command to the frame buffer for processing.
10631 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10632 are posted from quest to the host to be processed by the host hardware.
10633
10634 <note>
10635 The address of the provided command must be in the process space of
10636 this IFramebuffer object.
10637 </note>
10638 </desc>
10639
10640 <param name="command" type="octet" mod="ptr" dir="in">
10641 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10642 </param>
10643 </method>
10644
10645 </interface>
10646
10647 <interface
10648 name="IFramebufferOverlay" extends="IFramebuffer"
10649 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10650 wsmap="suppress"
10651 >
10652 <desc>
10653 The IFramebufferOverlay interface represents an alpha blended overlay
10654 for displaying status icons above an IFramebuffer. It is always created
10655 not visible, so that it must be explicitly shown. It only covers a
10656 portion of the IFramebuffer, determined by its width, height and
10657 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10658 that order) format, and may be written to directly. Do re-read the
10659 width though, after setting it, as it may be adjusted (increased) to
10660 make it more suitable for the front end.
10661 </desc>
10662 <attribute name="x" type="unsigned long" readonly="yes">
10663 <desc>X position of the overlay, relative to the frame buffer.</desc>
10664 </attribute>
10665
10666 <attribute name="y" type="unsigned long" readonly="yes">
10667 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10668 </attribute>
10669
10670 <attribute name="visible" type="boolean" readonly="no">
10671 <desc>
10672 Whether the overlay is currently visible.
10673 </desc>
10674 </attribute>
10675
10676 <attribute name="alpha" type="unsigned long" readonly="no">
10677 <desc>
10678 The global alpha value for the overlay. This may or may not be
10679 supported by a given front end.
10680 </desc>
10681 </attribute>
10682
10683 <method name="move">
10684 <desc>
10685 Changes the overlay's position relative to the IFramebuffer.
10686 </desc>
10687 <param name="x" type="unsigned long" dir="in"/>
10688 <param name="y" type="unsigned long" dir="in"/>
10689 </method>
10690
10691 </interface>
10692
10693 <interface
10694 name="IDisplay" extends="$unknown"
10695 uuid="1fa79e39-0cc9-4ab3-9df3-ed3e96b42496"
10696 wsmap="managed"
10697 >
10698 <desc>
10699 The IDisplay interface represents the virtual machine's display.
10700
10701 The object implementing this interface is contained in each
10702 <link to="IConsole::display"/> attribute and represents the visual
10703 output of the virtual machine.
10704
10705 The virtual display supports pluggable output targets represented by the
10706 IFramebuffer interface. Examples of the output target are a window on
10707 the host computer or an RDP session's display on a remote computer.
10708 </desc>
10709 <method name="getScreenResolution">
10710 <desc>Queries display width, height and color depth for given screen.</desc>
10711 <param name="screenId" type="unsigned long" dir="in"/>
10712 <param name="width" type="unsigned long" dir="out"/>
10713 <param name="height" type="unsigned long" dir="out"/>
10714 <param name="bitsPerPixel" type="unsigned long" dir="out"/>
10715 </method>
10716
10717 <method name="setFramebuffer">
10718 <desc>
10719 Sets the framebuffer for given screen.
10720 </desc>
10721 <param name="screenId" type="unsigned long" dir="in"/>
10722 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10723 </method>
10724
10725 <method name="getFramebuffer">
10726 <desc>
10727 Queries the framebuffer for given screen.
10728 </desc>
10729 <param name="screenId" type="unsigned long" dir="in"/>
10730 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10731 <param name="xOrigin" type="long" dir="out"/>
10732 <param name="yOrigin" type="long" dir="out"/>
10733 </method>
10734
10735 <method name="setVideoModeHint">
10736 <desc>
10737 Asks VirtualBox to request the given video mode from
10738 the guest. This is just a hint and it cannot be guaranteed
10739 that the requested resolution will be used. Guest Additions
10740 are required for the request to be seen by guests. The caller
10741 should issue the request and wait for a resolution change and
10742 after a timeout retry.
10743
10744 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10745 parameters means that the corresponding values should be taken from the
10746 current video mode (i.e. left unchanged).
10747
10748 If the guest OS supports multi-monitor configuration then the @a display
10749 parameter specifies the number of the guest display to send the hint to:
10750 @c 0 is the primary display, @c 1 is the first secondary and
10751 so on. If the multi-monitor configuration is not supported, @a display
10752 must be @c 0.
10753
10754 <result name="E_INVALIDARG">
10755 The @a display is not associated with any monitor.
10756 </result>
10757
10758 </desc>
10759 <param name="width" type="unsigned long" dir="in"/>
10760 <param name="height" type="unsigned long" dir="in"/>
10761 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10762 <param name="display" type="unsigned long" dir="in"/>
10763 </method>
10764
10765 <method name="setSeamlessMode">
10766 <desc>
10767 Enables or disables seamless guest display rendering (seamless desktop
10768 integration) mode.
10769 <note>
10770 Calling this method has no effect if <link
10771 to="IGuest::supportsSeamless"/> returns @c false.
10772 </note>
10773 </desc>
10774 <param name="enabled" type="boolean" dir="in"/>
10775 </method>
10776
10777 <method name="takeScreenShot">
10778 <desc>
10779 Takes a screen shot of the requested size and copies it to the
10780 32-bpp buffer allocated by the caller and pointed to by @a address.
10781 A pixel consists of 4 bytes in order: B, G, R, 0.
10782
10783 <note>This API can be used only by the COM/XPCOM C++ API as it
10784 requires pointer support. Use <link to="#takeScreenShotToArray" />
10785 with other language bindings.
10786 </note>
10787
10788 <result name="E_NOTIMPL">
10789 Feature not implemented.
10790 </result>
10791 <result name="VBOX_E_IPRT_ERROR">
10792 Could not take a screenshot.
10793 </result>
10794
10795 </desc>
10796 <param name="screenId" type="unsigned long" dir="in"/>
10797 <param name="address" type="octet" mod="ptr" dir="in"/>
10798 <param name="width" type="unsigned long" dir="in"/>
10799 <param name="height" type="unsigned long" dir="in"/>
10800 </method>
10801
10802 <method name="takeScreenShotToArray">
10803 <desc>
10804 Takes a guest screen shot of the requested size and returns it as
10805 an array of bytes in uncompressed 32-bit RGBA format.
10806 A pixel consists of 4 bytes in order: R, G, B, 0xFF.
10807
10808 This API is slow, but could be the only option to get guest screenshot
10809 for scriptable languages not allowed to manipulate with addresses
10810 directly.
10811
10812 <result name="E_NOTIMPL">
10813 Feature not implemented.
10814 </result>
10815 <result name="VBOX_E_IPRT_ERROR">
10816 Could not take a screenshot.
10817 </result>
10818 </desc>
10819 <param name="screenId" type="unsigned long" dir="in">
10820 <desc>
10821 Monitor to take screenshot from.
10822 </desc>
10823 </param>
10824 <param name="width" type="unsigned long" dir="in">
10825 <desc>
10826 Desired image width.
10827 </desc>
10828 </param>
10829 <param name="height" type="unsigned long" dir="in">
10830 <desc>
10831 Desired image height.
10832 </desc>
10833 </param>
10834 <param name="screenData" type="octet" dir="return" safearray="yes">
10835 <desc>
10836 Array with resulting screen data.
10837 </desc>
10838 </param>
10839 </method>
10840
10841 <method name="drawToScreen">
10842 <desc>
10843 Draws a 32-bpp image of the specified size from the given buffer
10844 to the given point on the VM display.
10845
10846 <result name="E_NOTIMPL">
10847 Feature not implemented.
10848 </result>
10849 <result name="VBOX_E_IPRT_ERROR">
10850 Could not draw to screen.
10851 </result>
10852
10853 </desc>
10854 <param name="screenId" type="unsigned long" dir="in"/>
10855 <param name="address" type="octet" mod="ptr" dir="in"/>
10856 <param name="x" type="unsigned long" dir="in">
10857 <desc>Relative to the screen top left corner.</desc>
10858 </param>
10859 <param name="y" type="unsigned long" dir="in">
10860 <desc>Relative to the screen top left corner.</desc>
10861 </param>
10862 <param name="width" type="unsigned long" dir="in"/>
10863 <param name="height" type="unsigned long" dir="in"/>
10864 </method>
10865
10866 <method name="invalidateAndUpdate">
10867 <desc>
10868 Does a full invalidation of the VM display and instructs the VM
10869 to update it.
10870
10871 <result name="VBOX_E_IPRT_ERROR">
10872 Could not invalidate and update screen.
10873 </result>
10874
10875 </desc>
10876 </method>
10877
10878 <method name="resizeCompleted">
10879 <desc>
10880 Signals that a framebuffer has completed the resize operation.
10881
10882 <result name="VBOX_E_NOT_SUPPORTED">
10883 Operation only valid for external frame buffers.
10884 </result>
10885
10886 </desc>
10887 <param name="screenId" type="unsigned long" dir="in"/>
10888 </method>
10889
10890 <method name="completeVHWACommand">
10891 <desc>
10892 Signals that the Video HW Acceleration command has completed.
10893 </desc>
10894
10895 <param name="command" type="octet" mod="ptr" dir="in">
10896 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
10897 </param>
10898 </method>
10899
10900 </interface>
10901
10902 <!--
10903 // INetworkAdapter
10904 /////////////////////////////////////////////////////////////////////////
10905 -->
10906
10907 <enum
10908 name="NetworkAttachmentType"
10909 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10910 >
10911 <desc>
10912 Network attachment type.
10913 </desc>
10914
10915 <const name="Null" value="0">
10916 <desc>Null value, also means "not attached".</desc>
10917 </const>
10918 <const name="NAT" value="1"/>
10919 <const name="Bridged" value="2"/>
10920 <const name="Internal" value="3"/>
10921 <const name="HostOnly" value="4"/>
10922 <const name="VDE" value="5"/>
10923 </enum>
10924
10925 <enum
10926 name="NetworkAdapterType"
10927 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
10928 >
10929 <desc>
10930 Network adapter type.
10931 </desc>
10932
10933 <const name="Null" value="0">
10934 <desc>Null value (never used by the API).</desc>
10935 </const>
10936 <const name="Am79C970A" value="1">
10937 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
10938 </const>
10939 <const name="Am79C973" value="2">
10940 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
10941 </const>
10942 <const name="I82540EM" value="3">
10943 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
10944 </const>
10945 <const name="I82543GC" value="4">
10946 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
10947 </const>
10948 <const name="I82545EM" value="5">
10949 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
10950 </const>
10951 <const name="Virtio" value="6">
10952 <desc>Virtio network device.</desc>
10953 </const>
10954 </enum>
10955
10956 <interface
10957 name="INetworkAdapter" extends="$unknown"
10958 uuid="9bf58a46-c3f7-4f31-80fa-dde9a5dc0b7b"
10959 wsmap="managed"
10960 >
10961 <desc>
10962 Represents a virtual network adapter that is attached to a virtual machine.
10963 Each virtual machine has a fixed number of network adapter slots with one
10964 instance of this attached to each of them. Call
10965 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10966 is attached to a given slot in a given machine.
10967
10968 Each network adapter can be in one of five attachment modes, which are
10969 represented by the <link to="NetworkAttachmentType" /> enumeration;
10970 see the <link to="#attachmentType" /> attribute.
10971 </desc>
10972
10973 <attribute name="adapterType" type="NetworkAdapterType">
10974 <desc>
10975 Type of the virtual network adapter. Depending on this value,
10976 VirtualBox will provide a different virtual network hardware
10977 to the guest.
10978 </desc>
10979 </attribute>
10980
10981 <attribute name="slot" type="unsigned long" readonly="yes">
10982 <desc>
10983 Slot number this adapter is plugged into. Corresponds to
10984 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10985 to obtain this instance.
10986 </desc>
10987 </attribute>
10988
10989 <attribute name="enabled" type="boolean">
10990 <desc>
10991 Flag whether the network adapter is present in the
10992 guest system. If disabled, the virtual guest hardware will
10993 not contain this network adapter. Can only be changed when
10994 the VM is not running.
10995 </desc>
10996 </attribute>
10997
10998 <attribute name="MACAddress" type="wstring">
10999 <desc>
11000 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
11001 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
11002 </desc>
11003 </attribute>
11004
11005 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
11006
11007 <attribute name="hostInterface" type="wstring">
11008 <desc>
11009 Name of the host network interface the VM is attached to.
11010 </desc>
11011 </attribute>
11012
11013 <attribute name="internalNetwork" type="wstring">
11014 <desc>
11015 Name of the internal network the VM is attached to.
11016 </desc>
11017 </attribute>
11018
11019 <attribute name="NATNetwork" type="wstring">
11020 <desc>
11021 Name of the NAT network the VM is attached to.
11022 </desc>
11023 </attribute>
11024
11025 <attribute name="VDENetwork" type="wstring">
11026 <desc>
11027 Name of the VDE switch the VM is attached to.
11028 </desc>
11029 </attribute>
11030
11031 <attribute name="cableConnected" type="boolean">
11032 <desc>
11033 Flag whether the adapter reports the cable as connected or not.
11034 It can be used to report offline situations to a VM.
11035 </desc>
11036 </attribute>
11037
11038 <attribute name="lineSpeed" type="unsigned long">
11039 <desc>
11040 Line speed reported by custom drivers, in units of 1 kbps.
11041 </desc>
11042 </attribute>
11043
11044 <attribute name="traceEnabled" type="boolean">
11045 <desc>
11046 Flag whether network traffic from/to the network card should be traced.
11047 Can only be toggled when the VM is turned off.
11048 </desc>
11049 </attribute>
11050
11051 <attribute name="traceFile" type="wstring">
11052 <desc>
11053 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11054 will be used.
11055 </desc>
11056 </attribute>
11057
11058 <attribute name="natDriver" type="INATEngine" readonly="yes">
11059 <desc>
11060 Points to the NAT engine which handles the network address translation
11061 for this interface. This is active only when the interface actually uses
11062 NAT (see <link to="#attachToNAT" />).
11063 </desc>
11064 </attribute>
11065
11066 <attribute name="bootPriority" type="unsigned long">
11067 <desc>
11068 Network boot priority of the adapter. Priority 1 is highest. If not set,
11069 the priority is considered to be at the lowest possible setting.
11070 </desc>
11071 </attribute>
11072
11073 <attribute name="bandwidthLimit" type="unsigned long">
11074 <desc>
11075 Maximum throughput allowed for this network adapter, in units of 1 mbps.
11076 A zero value means uncapped/unlimited.
11077 </desc>
11078 </attribute>
11079
11080 <method name="attachToNAT">
11081 <desc>
11082 Attach the network adapter to the Network Address Translation (NAT) interface.
11083 </desc>
11084 </method>
11085
11086 <method name="attachToBridgedInterface">
11087 <desc>
11088 Attach the network adapter to a bridged host interface.
11089 </desc>
11090 </method>
11091
11092 <method name="attachToInternalNetwork">
11093 <desc>
11094 Attach the network adapter to an internal network.
11095 </desc>
11096 </method>
11097
11098 <method name="attachToHostOnlyInterface">
11099 <desc>
11100 Attach the network adapter to the host-only network.
11101 </desc>
11102 </method>
11103
11104 <method name="attachToVDE">
11105 <desc>
11106 Attach the network adapter to a VDE network.
11107 </desc>
11108 </method>
11109
11110 <method name="detach">
11111 <desc>
11112 Detach the network adapter
11113 </desc>
11114 </method>
11115 </interface>
11116
11117
11118 <!--
11119 // ISerialPort
11120 /////////////////////////////////////////////////////////////////////////
11121 -->
11122
11123 <enum
11124 name="PortMode"
11125 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11126 >
11127 <desc>
11128 The PortMode enumeration represents possible communication modes for
11129 the virtual serial port device.
11130 </desc>
11131
11132 <const name="Disconnected" value="0">
11133 <desc>Virtual device is not attached to any real host device.</desc>
11134 </const>
11135 <const name="HostPipe" value="1">
11136 <desc>Virtual device is attached to a host pipe.</desc>
11137 </const>
11138 <const name="HostDevice" value="2">
11139 <desc>Virtual device is attached to a host device.</desc>
11140 </const>
11141 <const name="RawFile" value="3">
11142 <desc>Virtual device is attached to a raw file.</desc>
11143 </const>
11144 </enum>
11145
11146 <interface
11147 name="ISerialPort" extends="$unknown"
11148 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11149 wsmap="managed"
11150 >
11151
11152 <desc>
11153 The ISerialPort interface represents the virtual serial port device.
11154
11155 The virtual serial port device acts like an ordinary serial port
11156 inside the virtual machine. This device communicates to the real
11157 serial port hardware in one of two modes: host pipe or host device.
11158
11159 In host pipe mode, the #path attribute specifies the path to the pipe on
11160 the host computer that represents a serial port. The #server attribute
11161 determines if this pipe is created by the virtual machine process at
11162 machine startup or it must already exist before starting machine
11163 execution.
11164
11165 In host device mode, the #path attribute specifies the name of the
11166 serial port device on the host computer.
11167
11168 There is also a third communication mode: the disconnected mode. In this
11169 mode, the guest OS running inside the virtual machine will be able to
11170 detect the serial port, but all port write operations will be discarded
11171 and all port read operations will return no data.
11172
11173 <see>IMachine::getSerialPort</see>
11174 </desc>
11175
11176 <attribute name="slot" type="unsigned long" readonly="yes">
11177 <desc>
11178 Slot number this serial port is plugged into. Corresponds to
11179 the value you pass to <link to="IMachine::getSerialPort"/>
11180 to obtain this instance.
11181 </desc>
11182 </attribute>
11183
11184 <attribute name="enabled" type="boolean">
11185 <desc>
11186 Flag whether the serial port is enabled. If disabled,
11187 the serial port will not be reported to the guest OS.
11188 </desc>
11189 </attribute>
11190
11191 <attribute name="IOBase" type="unsigned long">
11192 <desc>Base I/O address of the serial port.</desc>
11193 </attribute>
11194
11195 <attribute name="IRQ" type="unsigned long">
11196 <desc>IRQ number of the serial port.</desc>
11197 </attribute>
11198
11199 <attribute name="hostMode" type="PortMode">
11200 <desc>
11201 How is this port connected to the host.
11202 <note>
11203 Changing this attribute may fail if the conditions for
11204 <link to="#path"/> are not met.
11205 </note>
11206 </desc>
11207 </attribute>
11208
11209 <attribute name="server" type="boolean">
11210 <desc>
11211 Flag whether this serial port acts as a server (creates a new pipe on
11212 the host) or as a client (uses the existing pipe). This attribute is
11213 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11214 </desc>
11215 </attribute>
11216
11217 <attribute name="path" type="wstring">
11218 <desc>
11219 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11220 PortMode_HostPipe, or the host serial device name when
11221 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11222 cases, setting a @c null or empty string as the attribute's value
11223 is an error. Otherwise, the value of this property is ignored.
11224 </desc>
11225 </attribute>
11226
11227 </interface>
11228
11229 <!--
11230 // IParallelPort
11231 /////////////////////////////////////////////////////////////////////////
11232 -->
11233
11234 <interface
11235 name="IParallelPort" extends="$unknown"
11236 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11237 wsmap="managed"
11238 >
11239
11240 <desc>
11241 The IParallelPort interface represents the virtual parallel port device.
11242
11243 The virtual parallel port device acts like an ordinary parallel port
11244 inside the virtual machine. This device communicates to the real
11245 parallel port hardware using the name of the parallel device on the host
11246 computer specified in the #path attribute.
11247
11248 Each virtual parallel port device is assigned a base I/O address and an
11249 IRQ number that will be reported to the guest operating system and used
11250 to operate the given parallel port from within the virtual machine.
11251
11252 <see>IMachine::getParallelPort</see>
11253 </desc>
11254
11255 <attribute name="slot" type="unsigned long" readonly="yes">
11256 <desc>
11257 Slot number this parallel port is plugged into. Corresponds to
11258 the value you pass to <link to="IMachine::getParallelPort"/>
11259 to obtain this instance.
11260 </desc>
11261 </attribute>
11262
11263 <attribute name="enabled" type="boolean">
11264 <desc>
11265 Flag whether the parallel port is enabled. If disabled,
11266 the parallel port will not be reported to the guest OS.
11267 </desc>
11268 </attribute>
11269
11270 <attribute name="IOBase" type="unsigned long">
11271 <desc>Base I/O address of the parallel port.</desc>
11272 </attribute>
11273
11274 <attribute name="IRQ" type="unsigned long">
11275 <desc>IRQ number of the parallel port.</desc>
11276 </attribute>
11277
11278 <attribute name="path" type="wstring">
11279 <desc>
11280 Host parallel device name. If this parallel port is enabled, setting a
11281 @c null or an empty string as this attribute's value will result into
11282 an error.
11283 </desc>
11284 </attribute>
11285
11286 </interface>
11287
11288
11289 <!--
11290 // IMachineDebugger
11291 /////////////////////////////////////////////////////////////////////////
11292 -->
11293
11294 <interface
11295 name="IMachineDebugger" extends="$unknown"
11296 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11297 wsmap="suppress"
11298 >
11299 <method name="resetStats">
11300 <desc>
11301 Reset VM statistics.
11302 </desc>
11303 <param name="pattern" type="wstring" dir="in">
11304 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11305 </param>
11306 </method>
11307
11308 <method name="dumpStats">
11309 <desc>
11310 Dumps VM statistics.
11311 </desc>
11312 <param name="pattern" type="wstring" dir="in">
11313 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11314 </param>
11315 </method>
11316
11317 <method name="getStats">
11318 <desc>
11319 Get the VM statistics in a XMLish format.
11320 </desc>
11321 <param name="pattern" type="wstring" dir="in">
11322 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11323 </param>
11324 <param name="withDescriptions" type="boolean" dir="in">
11325 <desc>Whether to include the descriptions.</desc>
11326 </param>
11327 <param name="stats" type="wstring" dir="out">
11328 <desc>The XML document containing the statistics.</desc>
11329 </param>
11330 </method>
11331
11332 <method name="injectNMI">
11333 <desc>
11334 Inject an NMI into a running VT-x/AMD-V VM.
11335 </desc>
11336 </method>
11337
11338 <attribute name="singlestep" type="boolean">
11339 <desc>Switch for enabling singlestepping.</desc>
11340 </attribute>
11341
11342 <attribute name="recompileUser" type="boolean">
11343 <desc>Switch for forcing code recompilation for user mode code.</desc>
11344 </attribute>
11345
11346 <attribute name="recompileSupervisor" type="boolean">
11347 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11348 </attribute>
11349
11350 <attribute name="PATMEnabled" type="boolean">
11351 <desc>Switch for enabling and disabling the PATM component.</desc>
11352 </attribute>
11353
11354 <attribute name="CSAMEnabled" type="boolean">
11355 <desc>Switch for enabling and disabling the CSAM component.</desc>
11356 </attribute>
11357
11358 <attribute name="logEnabled" type="boolean">
11359 <desc>Switch for enabling and disabling logging.</desc>
11360 </attribute>
11361
11362 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11363 <desc>
11364 Flag indicating whether the VM is currently making use of CPU hardware
11365 virtualization extensions.
11366 </desc>
11367 </attribute>
11368
11369 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11370 <desc>
11371 Flag indicating whether the VM is currently making use of the nested paging
11372 CPU hardware virtualization extension.
11373 </desc>
11374 </attribute>
11375
11376 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11377 <desc>
11378 Flag indicating whether the VM is currently making use of the VPID
11379 VT-x extension.
11380 </desc>
11381 </attribute>
11382
11383 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11384 <desc>
11385 Flag indicating whether the VM is currently making use of the Physical
11386 Address Extension CPU feature.
11387 </desc>
11388 </attribute>
11389
11390 <attribute name="virtualTimeRate" type="unsigned long">
11391 <desc>
11392 The rate at which the virtual time runs expressed as a percentage.
11393 The accepted range is 2% to 20000%.
11394 </desc>
11395 </attribute>
11396
11397 <!-- @todo method for setting log flags, groups and destination! -->
11398
11399 <attribute name="VM" type="unsigned long long" readonly="yes">
11400 <desc>
11401 Gets the VM handle. This is only for internal use while
11402 we carve the details of this interface.
11403 </desc>
11404 </attribute>
11405
11406 </interface>
11407
11408 <!--
11409 // IUSBController
11410 /////////////////////////////////////////////////////////////////////////
11411 -->
11412
11413 <interface
11414 name="IUSBController" extends="$unknown"
11415 uuid="6fdcccc5-abd3-4fec-9387-2ad3914fc4a8"
11416 wsmap="managed"
11417 >
11418 <attribute name="enabled" type="boolean">
11419 <desc>
11420 Flag whether the USB controller is present in the
11421 guest system. If disabled, the virtual guest hardware will
11422 not contain any USB controller. Can only be changed when
11423 the VM is powered off.
11424 </desc>
11425 </attribute>
11426
11427 <attribute name="enabledEhci" type="boolean">
11428 <desc>
11429 Flag whether the USB EHCI controller is present in the
11430 guest system. If disabled, the virtual guest hardware will
11431 not contain a USB EHCI controller. Can only be changed when
11432 the VM is powered off.
11433 </desc>
11434 </attribute>
11435
11436 <attribute name="proxyAvailable" type="boolean" readonly="yes">
11437 <desc>
11438 Flag whether there is an USB proxy available.
11439 </desc>
11440 </attribute>
11441
11442 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11443 <desc>
11444 USB standard version which the controller implements.
11445 This is a BCD which means that the major version is in the
11446 high byte and minor version is in the low byte.
11447 </desc>
11448 </attribute>
11449
11450 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11451 <desc>
11452 List of USB device filters associated with the machine.
11453
11454 If the machine is currently running, these filters are activated
11455 every time a new (supported) USB device is attached to the host
11456 computer that was not ignored by global filters
11457 (<link to="IHost::USBDeviceFilters"/>).
11458
11459 These filters are also activated when the machine is powered up.
11460 They are run against a list of all currently available USB
11461 devices (in states
11462 <link to="USBDeviceState_Available"/>,
11463 <link to="USBDeviceState_Busy"/>,
11464 <link to="USBDeviceState_Held"/>) that were not previously
11465 ignored by global filters.
11466
11467 If at least one filter matches the USB device in question, this
11468 device is automatically captured (attached to) the virtual USB
11469 controller of this machine.
11470
11471 <see>IUSBDeviceFilter, ::IUSBController</see>
11472 </desc>
11473 </attribute>
11474
11475 <method name="createDeviceFilter">
11476 <desc>
11477 Creates a new USB device filter. All attributes except
11478 the filter name are set to empty (any match),
11479 <i>active</i> is @c false (the filter is not active).
11480
11481 The created filter can then be added to the list of filters using
11482 <link to="#insertDeviceFilter"/>.
11483
11484 <result name="VBOX_E_INVALID_VM_STATE">
11485 The virtual machine is not mutable.
11486 </result>
11487
11488 <see>#deviceFilters</see>
11489 </desc>
11490 <param name="name" type="wstring" dir="in">
11491 <desc>
11492 Filter name. See <link to="IUSBDeviceFilter::name"/>
11493 for more info.
11494 </desc>
11495 </param>
11496 <param name="filter" type="IUSBDeviceFilter" dir="return">
11497 <desc>Created filter object.</desc>
11498 </param>
11499 </method>
11500
11501 <method name="insertDeviceFilter">
11502 <desc>
11503 Inserts the given USB device to the specified position
11504 in the list of filters.
11505
11506 Positions are numbered starting from <tt>0</tt>. If the specified
11507 position is equal to or greater than the number of elements in
11508 the list, the filter is added to the end of the collection.
11509
11510 <note>
11511 Duplicates are not allowed, so an attempt to insert a
11512 filter that is already in the collection, will return an
11513 error.
11514 </note>
11515
11516 <result name="VBOX_E_INVALID_VM_STATE">
11517 Virtual machine is not mutable.
11518 </result>
11519 <result name="E_INVALIDARG">
11520 USB device filter not created within this VirtualBox instance.
11521 </result>
11522 <result name="VBOX_E_INVALID_OBJECT_STATE">
11523 USB device filter already in list.
11524 </result>
11525
11526 <see>#deviceFilters</see>
11527 </desc>
11528 <param name="position" type="unsigned long" dir="in">
11529 <desc>Position to insert the filter to.</desc>
11530 </param>
11531 <param name="filter" type="IUSBDeviceFilter" dir="in">
11532 <desc>USB device filter to insert.</desc>
11533 </param>
11534 </method>
11535
11536 <method name="removeDeviceFilter">
11537 <desc>
11538 Removes a USB device filter from the specified position in the
11539 list of filters.
11540
11541 Positions are numbered starting from <tt>0</tt>. Specifying a
11542 position equal to or greater than the number of elements in
11543 the list will produce an error.
11544
11545 <see>#deviceFilters</see>
11546
11547 <result name="VBOX_E_INVALID_VM_STATE">
11548 Virtual machine is not mutable.
11549 </result>
11550 <result name="E_INVALIDARG">
11551 USB device filter list empty or invalid @a position.
11552 </result>
11553
11554 </desc>
11555 <param name="position" type="unsigned long" dir="in">
11556 <desc>Position to remove the filter from.</desc>
11557 </param>
11558 <param name="filter" type="IUSBDeviceFilter" dir="return">
11559 <desc>Removed USB device filter.</desc>
11560 </param>
11561 </method>
11562
11563 </interface>
11564
11565
11566 <!--
11567 // IUSBDevice
11568 /////////////////////////////////////////////////////////////////////////
11569 -->
11570
11571 <interface
11572 name="IUSBDevice" extends="$unknown"
11573 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11574 wsmap="managed"
11575 >
11576 <desc>
11577 The IUSBDevice interface represents a virtual USB device attached to the
11578 virtual machine.
11579
11580 A collection of objects implementing this interface is stored in the
11581 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11582 attached to a running virtual machine's USB controller.
11583 </desc>
11584
11585 <attribute name="id" type="uuid" mod="string" readonly="yes">
11586 <desc>
11587 Unique USB device ID. This ID is built from #vendorId,
11588 #productId, #revision and #serialNumber.
11589 </desc>
11590 </attribute>
11591
11592 <attribute name="vendorId" type="unsigned short" readonly="yes">
11593 <desc>Vendor ID.</desc>
11594 </attribute>
11595
11596 <attribute name="productId" type="unsigned short" readonly="yes">
11597 <desc>Product ID.</desc>
11598 </attribute>
11599
11600 <attribute name="revision" type="unsigned short" readonly="yes">
11601 <desc>
11602 Product revision number. This is a packed BCD represented as
11603 unsigned short. The high byte is the integer part and the low
11604 byte is the decimal.
11605 </desc>
11606 </attribute>
11607
11608 <attribute name="manufacturer" type="wstring" readonly="yes">
11609 <desc>Manufacturer string.</desc>
11610 </attribute>
11611
11612 <attribute name="product" type="wstring" readonly="yes">
11613 <desc>Product string.</desc>
11614 </attribute>
11615
11616 <attribute name="serialNumber" type="wstring" readonly="yes">
11617 <desc>Serial number string.</desc>
11618 </attribute>
11619
11620 <attribute name="address" type="wstring" readonly="yes">
11621 <desc>Host specific address of the device.</desc>
11622 </attribute>
11623
11624 <attribute name="port" type="unsigned short" readonly="yes">
11625 <desc>
11626 Host USB port number the device is physically
11627 connected to.
11628 </desc>
11629 </attribute>
11630
11631 <attribute name="version" type="unsigned short" readonly="yes">
11632 <desc>
11633 The major USB version of the device - 1 or 2.
11634 </desc>
11635 </attribute>
11636
11637 <attribute name="portVersion" type="unsigned short" readonly="yes">
11638 <desc>
11639 The major USB version of the host USB port the device is
11640 physically connected to - 1 or 2. For devices not connected to
11641 anything this will have the same value as the version attribute.
11642 </desc>
11643 </attribute>
11644
11645 <attribute name="remote" type="boolean" readonly="yes">
11646 <desc>
11647 Whether the device is physically connected to a remote VRDP
11648 client or to a local host machine.
11649 </desc>
11650 </attribute>
11651
11652 </interface>
11653
11654
11655 <!--
11656 // IUSBDeviceFilter
11657 /////////////////////////////////////////////////////////////////////////
11658 -->
11659
11660 <interface
11661 name="IUSBDeviceFilter" extends="$unknown"
11662 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11663 wsmap="managed"
11664 >
11665 <desc>
11666 The IUSBDeviceFilter interface represents an USB device filter used
11667 to perform actions on a group of USB devices.
11668
11669 This type of filters is used by running virtual machines to
11670 automatically capture selected USB devices once they are physically
11671 attached to the host computer.
11672
11673 A USB device is matched to the given device filter if and only if all
11674 attributes of the device match the corresponding attributes of the
11675 filter (that is, attributes are joined together using the logical AND
11676 operation). On the other hand, all together, filters in the list of
11677 filters carry the semantics of the logical OR operation. So if it is
11678 desirable to create a match like "this vendor id OR this product id",
11679 one needs to create two filters and specify "any match" (see below)
11680 for unused attributes.
11681
11682 All filter attributes used for matching are strings. Each string
11683 is an expression representing a set of values of the corresponding
11684 device attribute, that will match the given filter. Currently, the
11685 following filtering expressions are supported:
11686
11687 <ul>
11688 <li><i>Interval filters</i>. Used to specify valid intervals for
11689 integer device attributes (Vendor ID, Product ID and Revision).
11690 The format of the string is:
11691
11692 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11693
11694 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11695 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11696 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11697 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11698 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11699 possible integer is assumed.
11700 </li>
11701 <li><i>Boolean filters</i>. Used to specify acceptable values for
11702 boolean device attributes. The format of the string is:
11703
11704 <tt>true|false|yes|no|0|1</tt>
11705
11706 </li>
11707 <li><i>Exact match</i>. Used to specify a single value for the given
11708 device attribute. Any string that doesn't start with <tt>int:</tt>
11709 represents the exact match. String device attributes are compared to
11710 this string including case of symbols. Integer attributes are first
11711 converted to a string (see individual filter attributes) and then
11712 compared ignoring case.
11713
11714 </li>
11715 <li><i>Any match</i>. Any value of the corresponding device attribute
11716 will match the given filter. An empty or @c null string is
11717 used to construct this type of filtering expressions.
11718
11719 </li>
11720 </ul>
11721
11722 <note>
11723 On the Windows host platform, interval filters are not currently
11724 available. Also all string filter attributes
11725 (<link to="#manufacturer"/>, <link to="#product"/>,
11726 <link to="#serialNumber"/>) are ignored, so they behave as
11727 <i>any match</i> no matter what string expression is specified.
11728 </note>
11729
11730 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11731 </desc>
11732
11733 <attribute name="name" type="wstring">
11734 <desc>
11735 Visible name for this filter.
11736 This name is used to visually distinguish one filter from another,
11737 so it can neither be @c null nor an empty string.
11738 </desc>
11739 </attribute>
11740
11741 <attribute name="active" type="boolean">
11742 <desc>Whether this filter active or has been temporarily disabled.</desc>
11743 </attribute>
11744
11745 <attribute name="vendorId" type="wstring">
11746 <desc>
11747 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11748 The string representation for the <i>exact matching</i>
11749 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11750 (including leading zeroes).
11751 </desc>
11752 </attribute>
11753
11754 <attribute name="productId" type="wstring">
11755 <desc>
11756 <link to="IUSBDevice::productId">Product ID</link> filter.
11757 The string representation for the <i>exact matching</i>
11758 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11759 (including leading zeroes).
11760 </desc>
11761 </attribute>
11762
11763 <attribute name="revision" type="wstring">
11764 <desc>
11765 <link to="IUSBDevice::productId">Product revision number</link>
11766 filter. The string representation for the <i>exact matching</i>
11767 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11768 of the integer part of the revision, and <tt>F</tt> is the
11769 decimal digit of its fractional part (including leading and
11770 trailing zeros).
11771 Note that for interval filters, it's best to use the hexadecimal
11772 form, because the revision is stored as a 16 bit packed BCD value;
11773 so the expression <tt>int:0x0100-0x0199</tt> will match any
11774 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11775 </desc>
11776 </attribute>
11777
11778 <attribute name="manufacturer" type="wstring">
11779 <desc>
11780 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11781 </desc>
11782 </attribute>
11783
11784 <attribute name="product" type="wstring">
11785 <desc>
11786 <link to="IUSBDevice::product">Product</link> filter.
11787 </desc>
11788 </attribute>
11789
11790 <attribute name="serialNumber" type="wstring">
11791 <desc>
11792 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11793 </desc>
11794 </attribute>
11795
11796 <attribute name="port" type="wstring">
11797 <desc>
11798 <link to="IUSBDevice::port">Host USB port</link> filter.
11799 </desc>
11800 </attribute>
11801
11802 <attribute name="remote" type="wstring">
11803 <desc>
11804 <link to="IUSBDevice::remote">Remote state</link> filter.
11805 <note>
11806 This filter makes sense only for machine USB filters,
11807 i.e. it is ignored by IHostUSBDeviceFilter objects.
11808 </note>
11809 </desc>
11810 </attribute>
11811
11812 <attribute name="maskedInterfaces" type="unsigned long">
11813 <desc>
11814 This is an advanced option for hiding one or more USB interfaces
11815 from the guest. The value is a bit mask where the bits that are set
11816 means the corresponding USB interface should be hidden, masked off
11817 if you like.
11818 This feature only works on Linux hosts.
11819 </desc>
11820 </attribute>
11821
11822 </interface>
11823
11824
11825 <!--
11826 // IHostUSBDevice
11827 /////////////////////////////////////////////////////////////////////////
11828 -->
11829
11830 <enum
11831 name="USBDeviceState"
11832 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11833 >
11834 <desc>
11835 USB device state. This enumeration represents all possible states
11836 of the USB device physically attached to the host computer regarding
11837 its state on the host computer and availability to guest computers
11838 (all currently running virtual machines).
11839
11840 Once a supported USB device is attached to the host, global USB
11841 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11842 either ignore the device, or put it to USBDeviceState_Held state, or do
11843 nothing. Unless the device is ignored by global filters, filters of all
11844 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11845 activated that can put it to USBDeviceState_Captured state.
11846
11847 If the device was ignored by global filters, or didn't match
11848 any filters at all (including guest ones), it is handled by the host
11849 in a normal way. In this case, the device state is determined by
11850 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11851 or USBDeviceState_Available, depending on the current device usage.
11852
11853 Besides auto-capturing based on filters, the device can be manually
11854 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11855 state is USBDeviceState_Busy, USBDeviceState_Available or
11856 USBDeviceState_Held.
11857
11858 <note>
11859 Due to differences in USB stack implementations in Linux and Win32,
11860 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11861 only to the Linux version of the product. This also means that (<link
11862 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11863 device state is USBDeviceState_Held.
11864 </note>
11865
11866 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11867 </desc>
11868
11869 <const name="NotSupported" value="0">
11870 <desc>
11871 Not supported by the VirtualBox server, not available to guests.
11872 </desc>
11873 </const>
11874 <const name="Unavailable" value="1">
11875 <desc>
11876 Being used by the host computer exclusively,
11877 not available to guests.
11878 </desc>
11879 </const>
11880 <const name="Busy" value="2">
11881 <desc>
11882 Being used by the host computer, potentially available to guests.
11883 </desc>
11884 </const>
11885 <const name="Available" value="3">
11886 <desc>
11887 Not used by the host computer, available to guests (the host computer
11888 can also start using the device at any time).
11889 </desc>
11890 </const>
11891 <const name="Held" value="4">
11892 <desc>
11893 Held by the VirtualBox server (ignored by the host computer),
11894 available to guests.
11895 </desc>
11896 </const>
11897 <const name="Captured" value="5">
11898 <desc>
11899 Captured by one of the guest computers, not available
11900 to anybody else.
11901 </desc>
11902 </const>
11903 </enum>
11904
11905 <interface
11906 name="IHostUSBDevice" extends="IUSBDevice"
11907 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11908 wsmap="managed"
11909 >
11910 <desc>
11911 The IHostUSBDevice interface represents a physical USB device attached
11912 to the host computer.
11913
11914 Besides properties inherited from IUSBDevice, this interface adds the
11915 <link to="#state"/> property that holds the current state of the USB
11916 device.
11917
11918 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11919 </desc>
11920
11921 <attribute name="state" type="USBDeviceState" readonly="yes">
11922 <desc>
11923 Current state of the device.
11924 </desc>
11925 </attribute>
11926
11927 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11928
11929 </interface>
11930
11931
11932 <!--
11933 // IHostUSBDeviceFilter
11934 /////////////////////////////////////////////////////////////////////////
11935 -->
11936
11937 <enum
11938 name="USBDeviceFilterAction"
11939 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11940 >
11941 <desc>
11942 Actions for host USB device filters.
11943 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11944 </desc>
11945
11946 <const name="Null" value="0">
11947 <desc>Null value (never used by the API).</desc>
11948 </const>
11949 <const name="Ignore" value="1">
11950 <desc>Ignore the matched USB device.</desc>
11951 </const>
11952 <const name="Hold" value="2">
11953 <desc>Hold the matched USB device.</desc>
11954 </const>
11955 </enum>
11956
11957 <interface
11958 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11959 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11960 wsmap="managed"
11961 >
11962 <desc>
11963 The IHostUSBDeviceFilter interface represents a global filter for a
11964 physical USB device used by the host computer. Used indirectly in
11965 <link to="IHost::USBDeviceFilters"/>.
11966
11967 Using filters of this type, the host computer determines the initial
11968 state of the USB device after it is physically attached to the
11969 host's USB controller.
11970
11971 <note>
11972 The <link to="IUSBDeviceFilter::remote"/> attribute is ignored by this type of
11973 filters, because it makes sense only for
11974 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11975 </note>
11976
11977 <see>IHost::USBDeviceFilters</see>
11978 </desc>
11979
11980 <attribute name="action" type="USBDeviceFilterAction">
11981 <desc>
11982 Action performed by the host when an attached USB device
11983 matches this filter.
11984 </desc>
11985 </attribute>
11986
11987 </interface>
11988
11989 <!--
11990 // IAudioAdapter
11991 /////////////////////////////////////////////////////////////////////////
11992 -->
11993
11994 <enum
11995 name="AudioDriverType"
11996 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11997 >
11998 <desc>
11999 Host audio driver type.
12000 </desc>
12001
12002 <const name="Null" value="0">
12003 <desc>Null value, also means "dummy audio driver".</desc>
12004 </const>
12005 <const name="WinMM" value="1">
12006 <desc>Windows multimedia (Windows hosts only).</desc>
12007 </const>
12008 <const name="OSS" value="2">
12009 <desc>Open Sound System (Linux hosts only).</desc>
12010 </const>
12011 <const name="ALSA" value="3">
12012 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
12013 </const>
12014 <const name="DirectSound" value="4">
12015 <desc>DirectSound (Windows hosts only).</desc>
12016 </const>
12017 <const name="CoreAudio" value="5">
12018 <desc>CoreAudio (Mac hosts only).</desc>
12019 </const>
12020 <const name="MMPM" value="6">
12021 <desc>Reserved for historical reasons.</desc>
12022 </const>
12023 <const name="Pulse" value="7">
12024 <desc>PulseAudio (Linux hosts only).</desc>
12025 </const>
12026 <const name="SolAudio" value="8">
12027 <desc>Solaris audio (Solaris hosts only).</desc>
12028 </const>
12029 </enum>
12030
12031 <enum
12032 name="AudioControllerType"
12033 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
12034 >
12035 <desc>
12036 Virtual audio controller type.
12037 </desc>
12038
12039 <const name="AC97" value="0"/>
12040 <const name="SB16" value="1"/>
12041 <const name="HDA" value="2"/>
12042 </enum>
12043
12044 <interface
12045 name="IAudioAdapter" extends="$unknown"
12046 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
12047 wsmap="managed"
12048 >
12049 <desc>
12050 The IAudioAdapter interface represents the virtual audio adapter of
12051 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
12052 </desc>
12053 <attribute name="enabled" type="boolean">
12054 <desc>
12055 Flag whether the audio adapter is present in the
12056 guest system. If disabled, the virtual guest hardware will
12057 not contain any audio adapter. Can only be changed when
12058 the VM is not running.
12059 </desc>
12060 </attribute>
12061 <attribute name="audioController" type="AudioControllerType">
12062 <desc>
12063 The audio hardware we emulate.
12064 </desc>
12065 </attribute>
12066 <attribute name="audioDriver" type="AudioDriverType">
12067 <desc>
12068 Audio driver the adapter is connected to. This setting
12069 can only be changed when the VM is not running.
12070 </desc>
12071 </attribute>
12072 </interface>
12073
12074 <!--
12075 // IVRDPServer
12076 /////////////////////////////////////////////////////////////////////////
12077 -->
12078
12079 <enum
12080 name="VRDPAuthType"
12081 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
12082 >
12083 <desc>
12084 VRDP authentication type.
12085 </desc>
12086
12087 <const name="Null" value="0">
12088 <desc>Null value, also means "no authentication".</desc>
12089 </const>
12090 <const name="External" value="1"/>
12091 <const name="Guest" value="2"/>
12092 </enum>
12093
12094 <interface
12095 name="IVRDPServer" extends="$unknown"
12096 uuid="7aeeb530-0b08-41fe-835d-9be9ec1dbe5c"
12097 wsmap="managed"
12098 >
12099 <attribute name="enabled" type="boolean">
12100 <desc>VRDP server status.</desc>
12101 </attribute>
12102
12103 <attribute name="ports" type="wstring">
12104 <desc>
12105 VRDP server port numbers. The server will try to bind to one of free ports from the list.
12106 <note>
12107 This is a string of comma separated TCP port numbers or port number ranges.
12108 Example <tt>5000,5010-5012,5015</tt>
12109 </note>
12110 </desc>
12111 </attribute>
12112
12113 <attribute name="netAddress" type="wstring">
12114 <desc>VRDP server address.</desc>
12115 </attribute>
12116
12117 <attribute name="authType" type="VRDPAuthType">
12118 <desc>VRDP authentication method.</desc>
12119 </attribute>
12120
12121 <attribute name="authTimeout" type="unsigned long">
12122 <desc>Timeout for guest authentication. Milliseconds.</desc>
12123 </attribute>
12124
12125 <attribute name="allowMultiConnection" type="boolean">
12126 <desc>
12127 Flag whether multiple simultaneous connections to the VM are permitted.
12128 Note that this will be replaced by a more powerful mechanism in the future.
12129 </desc>
12130 </attribute>
12131
12132 <attribute name="reuseSingleConnection" type="boolean">
12133 <desc>
12134 Flag whether the existing connection must be dropped and a new connection
12135 must be established by the VRDP server, when a new client connects in single
12136 connection mode.
12137 </desc>
12138 </attribute>
12139
12140 <attribute name="videoChannel" type="boolean">
12141 <desc>
12142 Flag whether RDP video channel is supported.
12143 </desc>
12144 </attribute>
12145
12146 <attribute name="videoChannelQuality" type="unsigned long">
12147 <desc>
12148 Image quality in percents.
12149 </desc>
12150 </attribute>
12151
12152 </interface>
12153
12154
12155 <!--
12156 // ISharedFolder
12157 /////////////////////////////////////////////////////////////////////////
12158 -->
12159
12160 <interface
12161 name="ISharedFolder" extends="$unknown"
12162 uuid="8388da11-b559-4574-a5b7-2bd7acd5cef8"
12163 wsmap="struct"
12164 >
12165 <desc>
12166 The ISharedFolder interface represents a folder in the host computer's
12167 file system accessible from the guest OS running inside a virtual
12168 machine using an associated logical name.
12169
12170 There are three types of shared folders:
12171 <ul>
12172 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12173 folders available to all virtual machines.</li>
12174 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12175 VM-specific shared folders available to the given virtual machine at
12176 startup.</li>
12177 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12178 VM-specific shared folders created in the session context (for
12179 example, when the virtual machine is running) and automatically
12180 discarded when the session is closed (the VM is powered off).</li>
12181 </ul>
12182
12183 Logical names of shared folders must be unique within the given scope
12184 (global, permanent or transient). However, they do not need to be unique
12185 across scopes. In this case, the definition of the shared folder in a
12186 more specific scope takes precedence over definitions in all other
12187 scopes. The order of precedence is (more specific to more general):
12188 <ol>
12189 <li>Transient definitions</li>
12190 <li>Permanent definitions</li>
12191 <li>Global definitions</li>
12192 </ol>
12193
12194 For example, if MyMachine has a shared folder named
12195 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12196 transient shared folder named <tt>C_DRIVE</tt> (that points
12197 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12198 of <tt>C_DRIVE</tt> in the guest OS so
12199 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12200 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12201 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12202 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12203 to <tt>C:\\</tt> if it still exists.
12204
12205 Note that permanent and transient shared folders of different machines
12206 are in different name spaces, so they don't overlap and don't need to
12207 have unique logical names.
12208
12209 <note>
12210 Global shared folders are not implemented in the current version of the
12211 product.
12212 </note>
12213 </desc>
12214
12215 <attribute name="name" type="wstring" readonly="yes">
12216 <desc>Logical name of the shared folder.</desc>
12217 </attribute>
12218
12219 <attribute name="hostPath" type="wstring" readonly="yes">
12220 <desc>Full path to the shared folder in the host file system.</desc>
12221 </attribute>
12222
12223 <attribute name="accessible" type="boolean" readonly="yes">
12224 <desc>
12225 Whether the folder defined by the host path is currently
12226 accessible or not.
12227 For example, the folder can be unaccessible if it is placed
12228 on the network share that is not available by the time
12229 this property is read.
12230 </desc>
12231 </attribute>
12232
12233 <attribute name="writable" type="boolean" readonly="yes">
12234 <desc>
12235 Whether the folder defined by the host path is writable or
12236 not.
12237 </desc>
12238 </attribute>
12239
12240 <attribute name="autoMount" type="boolean" readonly="yes">
12241 <desc>
12242 Whether the folder gets automatically mounted by the guest or not.
12243 </desc>
12244 </attribute>
12245
12246 <attribute name="lastAccessError" type="wstring" readonly="yes">
12247 <desc>
12248 Text message that represents the result of the last accessibility
12249 check.
12250
12251 Accessibility checks are performed each time the <link to="#accessible"/>
12252 attribute is read. An empty string is returned if the last
12253 accessibility check was successful. A non-empty string indicates a
12254 failure and should normally describe a reason of the failure (for
12255 example, a file read error).
12256 </desc>
12257 </attribute>
12258
12259 </interface>
12260
12261 <!--
12262 // ISession
12263 /////////////////////////////////////////////////////////////////////////
12264 -->
12265
12266 <interface
12267 name="IInternalSessionControl" extends="$unknown"
12268 uuid="ef059f1d-2273-4f81-9342-c152a0d2cd40"
12269 internal="yes"
12270 wsmap="suppress"
12271 >
12272 <method name="getPID">
12273 <desc>PID of the process that has created this Session object.
12274 </desc>
12275 <param name="pid" type="unsigned long" dir="return"/>
12276 </method>
12277
12278 <method name="getRemoteConsole">
12279 <desc>
12280 Returns the console object suitable for remote control.
12281
12282 <result name="VBOX_E_INVALID_VM_STATE">
12283 Session state prevents operation.
12284 </result>
12285 <result name="VBOX_E_INVALID_OBJECT_STATE">
12286 Session type prevents operation.
12287 </result>
12288
12289 </desc>
12290 <param name="console" type="IConsole" dir="return"/>
12291 </method>
12292
12293 <method name="assignMachine">
12294 <desc>
12295 Assigns the machine object associated with this direct-type
12296 session or informs the session that it will be a remote one
12297 (if @a machine == @c null).
12298
12299 <result name="VBOX_E_INVALID_VM_STATE">
12300 Session state prevents operation.
12301 </result>
12302 <result name="VBOX_E_INVALID_OBJECT_STATE">
12303 Session type prevents operation.
12304 </result>
12305
12306 </desc>
12307 <param name="machine" type="IMachine" dir="in"/>
12308 </method>
12309
12310 <method name="assignRemoteMachine">
12311 <desc>
12312 Assigns the machine and the (remote) console object associated with
12313 this remote-type session.
12314
12315 <result name="VBOX_E_INVALID_VM_STATE">
12316 Session state prevents operation.
12317 </result>
12318
12319 </desc>
12320 <param name="machine" type="IMachine" dir="in"/>
12321 <param name="console" type="IConsole" dir="in"/>
12322 </method>
12323
12324 <method name="updateMachineState">
12325 <desc>
12326 Updates the machine state in the VM process.
12327 Must be called only in certain cases
12328 (see the method implementation).
12329
12330 <result name="VBOX_E_INVALID_VM_STATE">
12331 Session state prevents operation.
12332 </result>
12333 <result name="VBOX_E_INVALID_OBJECT_STATE">
12334 Session type prevents operation.
12335 </result>
12336
12337 </desc>
12338 <param name="aMachineState" type="MachineState" dir="in"/>
12339 </method>
12340
12341 <method name="uninitialize">
12342 <desc>
12343 Uninitializes (closes) this session. Used by VirtualBox to close
12344 the corresponding remote session when the direct session dies
12345 or gets closed.
12346
12347 <result name="VBOX_E_INVALID_VM_STATE">
12348 Session state prevents operation.
12349 </result>
12350
12351 </desc>
12352 </method>
12353
12354 <method name="onNetworkAdapterChange">
12355 <desc>
12356 Triggered when settings of a network adapter of the
12357 associated virtual machine have changed.
12358
12359 <result name="VBOX_E_INVALID_VM_STATE">
12360 Session state prevents operation.
12361 </result>
12362 <result name="VBOX_E_INVALID_OBJECT_STATE">
12363 Session type prevents operation.
12364 </result>
12365
12366 </desc>
12367 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12368 <param name="changeAdapter" type="boolean" dir="in"/>
12369 </method>
12370
12371 <method name="onSerialPortChange">
12372 <desc>
12373 Triggered when settings of a serial port of the
12374 associated virtual machine have changed.
12375
12376 <result name="VBOX_E_INVALID_VM_STATE">
12377 Session state prevents operation.
12378 </result>
12379 <result name="VBOX_E_INVALID_OBJECT_STATE">
12380 Session type prevents operation.
12381 </result>
12382
12383 </desc>
12384 <param name="serialPort" type="ISerialPort" dir="in"/>
12385 </method>
12386
12387 <method name="onParallelPortChange">
12388 <desc>
12389 Triggered when settings of a parallel port of the
12390 associated virtual machine have changed.
12391
12392 <result name="VBOX_E_INVALID_VM_STATE">
12393 Session state prevents operation.
12394 </result>
12395 <result name="VBOX_E_INVALID_OBJECT_STATE">
12396 Session type prevents operation.
12397 </result>
12398
12399 </desc>
12400 <param name="parallelPort" type="IParallelPort" dir="in"/>
12401 </method>
12402
12403 <method name="onStorageControllerChange">
12404 <desc>
12405 Triggered when settings of a storage controller of the
12406 associated virtual machine have changed.
12407
12408 <result name="VBOX_E_INVALID_VM_STATE">
12409 Session state prevents operation.
12410 </result>
12411 <result name="VBOX_E_INVALID_OBJECT_STATE">
12412 Session type prevents operation.
12413 </result>
12414
12415 </desc>
12416 </method>
12417
12418 <method name="onMediumChange">
12419 <desc>
12420 Triggered when attached media of the
12421 associated virtual machine have changed.
12422
12423 <result name="VBOX_E_INVALID_VM_STATE">
12424 Session state prevents operation.
12425 </result>
12426 <result name="VBOX_E_INVALID_OBJECT_STATE">
12427 Session type prevents operation.
12428 </result>
12429
12430 </desc>
12431
12432 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12433 <param name="force" type="boolean" dir="in"/>
12434 </method>
12435
12436 <method name="onCPUChange">
12437 <desc>
12438 Notification when a CPU changes.
12439 </desc>
12440 <param name="cpu" type="unsigned long" dir="in">
12441 <desc>The CPU which changed</desc>
12442 </param>
12443 <param name="add" type="boolean" dir="in">
12444 <desc>Flag whether the CPU was added or removed</desc>
12445 </param>
12446 </method>
12447
12448 <method name="onCPUPriorityChange">
12449 <desc>
12450 Notification when the CPU priority changes.
12451 </desc>
12452 <param name="priority" type="unsigned long" dir="in">
12453 <desc>The new CPU priority value. (1-100)</desc>
12454 </param>
12455 </method>
12456
12457 <method name="onVRDPServerChange">
12458 <desc>
12459 Triggered when settings of the VRDP server object of the
12460 associated virtual machine have changed.
12461
12462 <result name="VBOX_E_INVALID_VM_STATE">
12463 Session state prevents operation.
12464 </result>
12465 <result name="VBOX_E_INVALID_OBJECT_STATE">
12466 Session type prevents operation.
12467 </result>
12468
12469 </desc>
12470 <param name="restart" type="boolean" dir="in">
12471 <desc>Flag whether the server must be restarted</desc>
12472 </param>
12473 </method>
12474
12475 <method name="onUSBControllerChange">
12476 <desc>
12477 Triggered when settings of the USB controller object of the
12478 associated virtual machine have changed.
12479
12480 <result name="VBOX_E_INVALID_VM_STATE">
12481 Session state prevents operation.
12482 </result>
12483 <result name="VBOX_E_INVALID_OBJECT_STATE">
12484 Session type prevents operation.
12485 </result>
12486
12487 </desc>
12488 </method>
12489
12490 <method name="onSharedFolderChange">
12491 <desc>
12492 Triggered when a permanent (global or machine) shared folder has been
12493 created or removed.
12494 <note>
12495 We don't pass shared folder parameters in this notification because
12496 the order in which parallel notifications are delivered is not defined,
12497 therefore it could happen that these parameters were outdated by the
12498 time of processing this notification.
12499 </note>
12500
12501 <result name="VBOX_E_INVALID_VM_STATE">
12502 Session state prevents operation.
12503 </result>
12504 <result name="VBOX_E_INVALID_OBJECT_STATE">
12505 Session type prevents operation.
12506 </result>
12507
12508 </desc>
12509 <param name="global" type="boolean" dir="in"/>
12510 </method>
12511
12512 <method name="onUSBDeviceAttach">
12513 <desc>
12514 Triggered when a request to capture a USB device (as a result
12515 of matched USB filters or direct call to
12516 <link to="IConsole::attachUSBDevice"/>) has completed.
12517 A @c null @a error object means success, otherwise it
12518 describes a failure.
12519
12520 <result name="VBOX_E_INVALID_VM_STATE">
12521 Session state prevents operation.
12522 </result>
12523 <result name="VBOX_E_INVALID_OBJECT_STATE">
12524 Session type prevents operation.
12525 </result>
12526
12527 </desc>
12528 <param name="device" type="IUSBDevice" dir="in"/>
12529 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12530 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12531 </method>
12532
12533 <method name="onUSBDeviceDetach">
12534 <desc>
12535 Triggered when a request to release the USB device (as a result
12536 of machine termination or direct call to
12537 <link to="IConsole::detachUSBDevice"/>) has completed.
12538 A @c null @a error object means success, otherwise it
12539 describes a failure.
12540
12541 <result name="VBOX_E_INVALID_VM_STATE">
12542 Session state prevents operation.
12543 </result>
12544 <result name="VBOX_E_INVALID_OBJECT_STATE">
12545 Session type prevents operation.
12546 </result>
12547
12548 </desc>
12549 <param name="id" type="uuid" mod="string" dir="in"/>
12550 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12551 </method>
12552
12553 <method name="onShowWindow">
12554 <desc>
12555 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12556 <link to="IMachine::showConsoleWindow"/> in order to notify
12557 console listeners
12558 <link to="ICanShowWindowEvent"/>
12559 and <link to="IShowWindowEvent"/>.
12560
12561 <result name="VBOX_E_INVALID_OBJECT_STATE">
12562 Session type prevents operation.
12563 </result>
12564
12565 </desc>
12566 <param name="check" type="boolean" dir="in"/>
12567 <param name="canShow" type="boolean" dir="out"/>
12568 <param name="winId" type="unsigned long long" dir="out"/>
12569 </method>
12570
12571 <method name="accessGuestProperty">
12572 <desc>
12573 Called by <link to="IMachine::getGuestProperty"/> and by
12574 <link to="IMachine::setGuestProperty"/> in order to read and
12575 modify guest properties.
12576
12577 <result name="VBOX_E_INVALID_VM_STATE">
12578 Machine session is not open.
12579 </result>
12580 <result name="VBOX_E_INVALID_OBJECT_STATE">
12581 Session type is not direct.
12582 </result>
12583
12584 </desc>
12585 <param name="name" type="wstring" dir="in"/>
12586 <param name="value" type="wstring" dir="in"/>
12587 <param name="flags" type="wstring" dir="in"/>
12588 <param name="isSetter" type="boolean" dir="in"/>
12589 <param name="retValue" type="wstring" dir="out"/>
12590 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12591 <param name="retFlags" type="wstring" dir="out"/>
12592 </method>
12593
12594 <method name="enumerateGuestProperties">
12595 <desc>
12596 Return a list of the guest properties matching a set of patterns along
12597 with their values, time stamps and flags.
12598
12599 <result name="VBOX_E_INVALID_VM_STATE">
12600 Machine session is not open.
12601 </result>
12602 <result name="VBOX_E_INVALID_OBJECT_STATE">
12603 Session type is not direct.
12604 </result>
12605
12606 </desc>
12607 <param name="patterns" type="wstring" dir="in">
12608 <desc>
12609 The patterns to match the properties against as a comma-separated
12610 string. If this is empty, all properties currently set will be
12611 returned.
12612 </desc>
12613 </param>
12614 <param name="key" type="wstring" dir="out" safearray="yes">
12615 <desc>
12616 The key names of the properties returned.
12617 </desc>
12618 </param>
12619 <param name="value" type="wstring" dir="out" safearray="yes">
12620 <desc>
12621 The values of the properties returned. The array entries match the
12622 corresponding entries in the @a key array.
12623 </desc>
12624 </param>
12625 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12626 <desc>
12627 The time stamps of the properties returned. The array entries match
12628 the corresponding entries in the @a key array.
12629 </desc>
12630 </param>
12631 <param name="flags" type="wstring" dir="out" safearray="yes">
12632 <desc>
12633 The flags of the properties returned. The array entries match the
12634 corresponding entries in the @a key array.
12635 </desc>
12636 </param>
12637 </method>
12638
12639 <method name="onlineMergeMedium">
12640 <desc>
12641 Triggers online merging of a hard disk. Used internally when deleting
12642 a snapshot while a VM referring to the same hard disk chain is running.
12643
12644 <result name="VBOX_E_INVALID_VM_STATE">
12645 Machine session is not open.
12646 </result>
12647 <result name="VBOX_E_INVALID_OBJECT_STATE">
12648 Session type is not direct.
12649 </result>
12650
12651 </desc>
12652 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
12653 <desc>The medium attachment to identify the medium chain.</desc>
12654 </param>
12655 <param name="sourceIdx" type="unsigned long" dir="in">
12656 <desc>The index of the source image in the chain.
12657 Redundant, but drastically reduces IPC.</desc>
12658 </param>
12659 <param name="targetIdx" type="unsigned long" dir="in">
12660 <desc>The index of the target image in the chain.
12661 Redundant, but drastically reduces IPC.</desc>
12662 </param>
12663 <param name="source" type="IMedium" dir="in">
12664 <desc>Merge source medium.</desc>
12665 </param>
12666 <param name="target" type="IMedium" dir="in">
12667 <desc>Merge target medium.</desc>
12668 </param>
12669 <param name="mergeForward" type="boolean" dir="in">
12670 <desc>Merge direction.</desc>
12671 </param>
12672 <param name="parentForTarget" type="IMedium" dir="in">
12673 <desc>For forward merges: new parent for target medium.</desc>
12674 </param>
12675 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
12676 <desc>For backward merges: list of media which need their parent UUID
12677 updated.</desc>
12678 </param>
12679 <param name="progress" type="IProgress" dir="in">
12680 <desc>
12681 Progress object for this operation.
12682 </desc>
12683 </param>
12684 </method>
12685
12686 </interface>
12687
12688 <interface
12689 name="ISession" extends="$unknown"
12690 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12691 wsmap="managed"
12692 >
12693 <desc>
12694 The ISession interface represents a client process and allows for locking
12695 virtual machines (represented by IMachine objects) to prevent conflicting
12696 changes to the machine.
12697
12698 Any caller wishing to manipulate a virtual machine needs to create a session
12699 object first, which lives in its own process space. Such session objects are
12700 then associated with <link to="IMachine" /> objects living in the VirtualBox
12701 server process to coordinate such changes.
12702
12703 There are two typical scenarios in which sessions are used:
12704
12705 <ul>
12706 <li>To alter machine settings or control a running virtual machine, one
12707 needs to lock a machine for a given session (client process) by calling
12708 <link to="IMachine::lockMachine"/>.
12709
12710 Whereas multiple sessions may control a running virtual machine, only
12711 one process can obtain a write lock on the machine to prevent conflicting
12712 changes. A write lock is also needed if a process wants to actually run a
12713 virtual machine in its own context, such as the VirtualBox GUI or
12714 VBoxHeadless front-ends. They must also lock a machine for their own
12715 sessions before they are allowed to power up the virtual machine.
12716
12717 As a result, no machine settings can be altered while another process is
12718 already using it, either because that process is modifying machine settings
12719 or because the machine is running.
12720 </li>
12721 <li>
12722 To start a VM using one of the existing VirtualBox front-ends (e.g. the
12723 VirtualBox GUI or VBoxHeadless), one would use
12724 <link to="IMachine::launchVMProcess"/>, which also takes a session object
12725 as its first parameter. This session then identifies the caller and lets the
12726 caller control the started machine (for example, pause machine execution or
12727 power it down) as well as be notified about machine execution state changes.
12728 </li>
12729 </ul>
12730
12731 How sessions objects are created in a client process depends on whether you use
12732 the Main API via COM or via the webservice:
12733
12734 <ul>
12735 <li>When using the COM API directly, an object of the Session class from the
12736 VirtualBox type library needs to be created. In regular COM C++ client code,
12737 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12738 This object will then act as a local session object in further calls to open
12739 a session.
12740 </li>
12741
12742 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12743 a session object automatically whenever <link to="IWebsessionManager::logon" />
12744 is called. A managed object reference to that session object can be retrieved by
12745 calling <link to="IWebsessionManager::getSessionObject" />.
12746 </li>
12747 </ul>
12748 </desc>
12749
12750 <attribute name="state" type="SessionState" readonly="yes">
12751 <desc>Current state of this session.</desc>
12752 </attribute>
12753
12754 <attribute name="type" type="SessionType" readonly="yes">
12755 <desc>
12756 Type of this session. The value of this attribute is valid only
12757 if the session currently has a machine locked (i.e. its
12758 <link to="#state" /> is Locked), otherwise an error will be returned.
12759 </desc>
12760 </attribute>
12761
12762 <attribute name="machine" type="IMachine" readonly="yes">
12763 <desc>Machine object associated with this session.</desc>
12764 </attribute>
12765
12766 <attribute name="console" type="IConsole" readonly="yes">
12767 <desc>Console object associated with this session.</desc>
12768 </attribute>
12769
12770 <method name="unlockMachine">
12771 <desc>
12772 Unlocks a machine that was previously locked for the current session.
12773
12774 Calling this method is required every time a machine has been locked
12775 for a particular session using the <link to="IMachine::launchVMProcess" />
12776 or <link to="IMachine::lockMachine" /> calls. Otherwise the state of
12777 the machine will be set to <link to="MachineState_Aborted" /> on the
12778 server, and changes made to the machine settings will be lost.
12779
12780 Generally, it is recommended to unlock all machines explicitly
12781 before terminating the application (regardless of the reason for
12782 the termination).
12783
12784 <note>
12785 Do not expect the session state (<link to="ISession::state" />
12786 to return to "Unlocked" immediately after you invoke this method,
12787 particularly if you have started a new VM process. The session
12788 state will automatically return to "Unlocked" once the VM is no
12789 longer executing, which can of course take a very long time.
12790 </note>
12791
12792 <result name="E_UNEXPECTED">
12793 Session is not locked.
12794 </result>
12795
12796 </desc>
12797 </method>
12798
12799 </interface>
12800
12801 <!--
12802 // IStorageController
12803 /////////////////////////////////////////////////////////////////////////
12804 -->
12805
12806 <enum
12807 name="StorageBus"
12808 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
12809 >
12810 <desc>
12811 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy);
12812 see <link to="IStorageController::bus" />.
12813 </desc>
12814 <const name="Null" value="0">
12815 <desc>@c null value. Never used by the API.</desc>
12816 </const>
12817 <const name="IDE" value="1"/>
12818 <const name="SATA" value="2"/>
12819 <const name="SCSI" value="3"/>
12820 <const name="Floppy" value="4"/>
12821 <const name="SAS" value="5"/>
12822 </enum>
12823
12824 <enum
12825 name="StorageControllerType"
12826 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
12827 >
12828 <desc>
12829 The exact variant of storage controller hardware presented
12830 to the guest; see <link to="IStorageController::controllerType" />.
12831 </desc>
12832
12833 <const name="Null" value="0">
12834 <desc>@c null value. Never used by the API.</desc>
12835 </const>
12836 <const name="LsiLogic" value="1">
12837 <desc>A SCSI controller of the LsiLogic variant.</desc>
12838 </const>
12839 <const name="BusLogic" value="2">
12840 <desc>A SCSI controller of the BusLogic variant.</desc>
12841 </const>
12842 <const name="IntelAhci" value="3">
12843 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
12844 </const>
12845 <const name="PIIX3" value="4">
12846 <desc>An IDE controller of the PIIX3 variant.</desc>
12847 </const>
12848 <const name="PIIX4" value="5">
12849 <desc>An IDE controller of the PIIX4 variant.</desc>
12850 </const>
12851 <const name="ICH6" value="6">
12852 <desc>An IDE controller of the ICH6 variant.</desc>
12853 </const>
12854 <const name="I82078" value="7">
12855 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
12856 </const>
12857 <const name="LsiLogicSas" value="8">
12858 <desc>A variant of the LsiLogic controller using SAS.</desc>
12859 </const>
12860 </enum>
12861
12862 <interface
12863 name="IStorageController" extends="$unknown"
12864 uuid="fd93adc0-bbaa-4256-9e6e-00e29f9151c9"
12865 wsmap="managed"
12866 >
12867 <desc>
12868 Represents a storage controller that is attached to a virtual machine
12869 (<link to="IMachine" />). Just as drives (hard disks, DVDs, FDs) are
12870 attached to storage controllers in a real computer, virtual drives
12871 (represented by <link to="IMediumAttachment" />) are attached to virtual
12872 storage controllers, represented by this interface.
12873
12874 As opposed to physical hardware, VirtualBox has a very generic concept
12875 of a storage controller, and for purposes of the Main API, all virtual
12876 storage is attached to virtual machines via instances of this interface.
12877 There are five types of such virtual storage controllers: IDE, SCSI, SATA,
12878 SAS and Floppy (see <link to="#bus" />). Depending on which of these four
12879 is used, certain sub-types may be available and can be selected in
12880 <link to="#controllerType" />.
12881
12882 Depending on these settings, the guest operating system might see
12883 significantly different virtual hardware.
12884 </desc>
12885
12886 <attribute name="name" type="wstring" readonly="yes">
12887 <desc>
12888 Name of the storage controller, as originally specified with
12889 <link to="IMachine::addStorageController" />. This then uniquely
12890 identifies this controller with other method calls such as
12891 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
12892 </desc>
12893 </attribute>
12894
12895 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12896 <desc>
12897 Maximum number of devices which can be attached to one port.
12898 </desc>
12899 </attribute>
12900
12901 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12902 <desc>
12903 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12904 </desc>
12905 </attribute>
12906
12907 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12908 <desc>
12909 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12910 </desc>
12911 </attribute>
12912
12913 <attribute name="instance" type="unsigned long">
12914 <desc>
12915 The instance number of the device in the running VM.
12916 </desc>
12917 </attribute>
12918
12919 <attribute name="portCount" type="unsigned long">
12920 <desc>
12921 The number of currently usable ports on the controller.
12922 The minimum and maximum number of ports for one controller are
12923 stored in <link to="IStorageController::minPortCount"/>
12924 and <link to="IStorageController::maxPortCount"/>.
12925 </desc>
12926 </attribute>
12927
12928 <attribute name="bus" type="StorageBus" readonly="yes">
12929 <desc>
12930 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy).
12931 </desc>
12932 </attribute>
12933
12934 <attribute name="controllerType" type="StorageControllerType">
12935 <desc>
12936 The exact variant of storage controller hardware presented
12937 to the guest.
12938 Depending on this value, VirtualBox will provide a different
12939 virtual storage controller hardware to the guest.
12940 For SATA, SAS and floppy controllers, only one variant is
12941 available, but for IDE and SCSI, there are several.
12942
12943 For SCSI controllers, the default type is LsiLogic.
12944 </desc>
12945 </attribute>
12946
12947 <attribute name="useHostIOCache" type="boolean">
12948 <desc>
12949 If true, the storage controller emulation will use a dedicated I/O thread, enable the host I/O
12950 caches and use synchronous file APIs on the host. This was the only option in the API before
12951 VirtualBox 3.2 and is still the default for IDE controllers.
12952
12953 If false, the host I/O cache will be disabled for image files attached to this storage controller.
12954 Instead, the storage controller emulation will use asynchronous I/O APIs on the host. This makes
12955 it possible to turn off the host I/O caches because the emulation can handle unaligned access to
12956 the file. This should be used on OS X and Linux hosts if a high I/O load is expected or many
12957 virtual machines are running at the same time to prevent I/O cache related hangs.
12958 This option new with the API of VirtualBox 3.2 and is now the default for non-IDE storage controllers.
12959 </desc>
12960 </attribute>
12961
12962 <method name="getIDEEmulationPort">
12963 <desc>
12964 Gets the corresponding port number which is emulated as an IDE device.
12965 Works only with SATA controllers.
12966
12967 <result name="E_INVALIDARG">
12968 The @a devicePosition is not in the range 0 to 3.
12969 </result>
12970 <result name="E_NOTIMPL">
12971 The storage controller type is not SATAIntelAhci.
12972 </result>
12973
12974 </desc>
12975 <param name="devicePosition" type="long" dir="in"/>
12976 <param name="portNumber" type="long" dir="return"/>
12977 </method>
12978
12979 <method name="setIDEEmulationPort">
12980 <desc>
12981 Sets the port number which is emulated as an IDE device.
12982 Works only with SATA controllers.
12983
12984 <result name="E_INVALIDARG">
12985 The @a devicePosition is not in the range 0 to 3 or the
12986 @a portNumber is not in the range 0 to 29.
12987 </result>
12988 <result name="E_NOTIMPL">
12989 The storage controller type is not SATAIntelAhci.
12990 </result>
12991
12992 </desc>
12993 <param name="devicePosition" type="long" dir="in"/>
12994 <param name="portNumber" type="long" dir="in"/>
12995 </method>
12996
12997 </interface>
12998
12999<if target="wsdl">
13000
13001 <!--
13002 // IManagedObjectRef
13003 /////////////////////////////////////////////////////////////////////////
13004 -->
13005
13006 <interface
13007 name="IManagedObjectRef" extends="$unknown"
13008 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
13009 internal="yes"
13010 wsmap="managed"
13011 wscpp="hardcoded"
13012 >
13013 <desc>
13014 Managed object reference.
13015
13016 Only within the webservice, a managed object reference (which is really
13017 an opaque number) allows a webservice client to address an object
13018 that lives in the address space of the webservice server.
13019
13020 Behind each managed object reference, there is a COM object that lives
13021 in the webservice server's address space. The COM object is not freed
13022 until the managed object reference is released, either by an explicit
13023 call to <link to="IManagedObjectRef::release" /> or by logging off from
13024 the webservice (<link to="IWebsessionManager::logoff" />), which releases
13025 all objects created during the webservice session.
13026
13027 Whenever a method call of the VirtualBox API returns a COM object, the
13028 webservice representation of that method will instead return a
13029 managed object reference, which can then be used to invoke methods
13030 on that object.
13031 </desc>
13032
13033 <method name="getInterfaceName">
13034 <desc>
13035 Returns the name of the interface that this managed object represents,
13036 for example, "IMachine", as a string.
13037 </desc>
13038 <param name="return" type="wstring" dir="return"/>
13039 </method>
13040
13041 <method name="release">
13042 <desc>
13043 Releases this managed object reference and frees the resources that
13044 were allocated for it in the webservice server process. After calling
13045 this method, the identifier of the reference can no longer be used.
13046 </desc>
13047 </method>
13048
13049 </interface>
13050
13051 <!--
13052 // IWebsessionManager
13053 /////////////////////////////////////////////////////////////////////////
13054 -->
13055
13056 <interface
13057 name="IWebsessionManager" extends="$unknown"
13058 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
13059 internal="yes"
13060 wsmap="global"
13061 wscpp="hardcoded"
13062 >
13063 <desc>
13064 Websession manager. This provides essential services
13065 to webservice clients.
13066 </desc>
13067 <method name="logon">
13068 <desc>
13069 Logs a new client onto the webservice and returns a managed object reference to
13070 the IVirtualBox instance, which the client can then use as a basis to further
13071 queries, since all calls to the VirtualBox API are based on the IVirtualBox
13072 interface, in one way or the other.
13073 </desc>
13074 <param name="username" type="wstring" dir="in"/>
13075 <param name="password" type="wstring" dir="in"/>
13076 <param name="return" type="IVirtualBox" dir="return"/>
13077 </method>
13078
13079 <method name="getSessionObject">
13080 <desc>
13081 Returns a managed object reference to the internal ISession object that was created
13082 for this web service session when the client logged on.
13083
13084 <see>ISession</see>
13085 </desc>
13086 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13087 <param name="return" type="ISession" dir="return"/>
13088 </method>
13089
13090 <method name="logoff">
13091 <desc>
13092 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
13093 and destroys all resources associated with the session (most importantly, all
13094 managed objects created in the server while the session was active).
13095 </desc>
13096 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13097 </method>
13098
13099 </interface>
13100
13101</if>
13102
13103 <!--
13104 // IPerformanceCollector & friends
13105 /////////////////////////////////////////////////////////////////////////
13106 -->
13107
13108 <interface
13109 name="IPerformanceMetric" extends="$unknown"
13110 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
13111 >
13112 <desc>
13113 The IPerformanceMetric interface represents parameters of the given
13114 performance metric.
13115 </desc>
13116
13117 <attribute name="metricName" type="wstring" readonly="yes">
13118 <desc>
13119 Name of the metric.
13120 </desc>
13121 </attribute>
13122
13123 <attribute name="object" type="$unknown" readonly="yes">
13124 <desc>
13125 Object this metric belongs to.
13126 </desc>
13127 </attribute>
13128
13129 <attribute name="description" type="wstring" readonly="yes">
13130 <desc>
13131 Textual description of the metric.
13132 </desc>
13133 </attribute>
13134
13135 <attribute name="period" type="unsigned long" readonly="yes">
13136 <desc>
13137 Time interval between samples, measured in seconds.
13138 </desc>
13139 </attribute>
13140
13141 <attribute name="count" type="unsigned long" readonly="yes">
13142 <desc>
13143 Number of recent samples retained by the performance collector for this
13144 metric.
13145
13146 When the collected sample count exceeds this number, older samples
13147 are discarded.
13148 </desc>
13149 </attribute>
13150
13151 <attribute name="unit" type="wstring" readonly="yes">
13152 <desc>
13153 Unit of measurement.
13154 </desc>
13155 </attribute>
13156
13157 <attribute name="minimumValue" type="long" readonly="yes">
13158 <desc>
13159 Minimum possible value of this metric.
13160 </desc>
13161 </attribute>
13162
13163 <attribute name="maximumValue" type="long" readonly="yes">
13164 <desc>
13165 Maximum possible value of this metric.
13166 </desc>
13167 </attribute>
13168 </interface>
13169
13170 <interface
13171 name="IPerformanceCollector" extends="$unknown"
13172 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
13173 wsmap="managed"
13174 >
13175 <desc>
13176 The IPerformanceCollector interface represents a service that collects
13177 and stores performance metrics data.
13178
13179 Performance metrics are associated with objects of interfaces like IHost
13180 and IMachine. Each object has a distinct set of performance metrics. The
13181 set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
13182
13183 Metric data is collected at the specified intervals and is retained
13184 internally. The interval and the number of retained samples can be set
13185 with <link to="IPerformanceCollector::setupMetrics" />. Both metric data
13186 and collection settings are not persistent, they are discarded as soon as
13187 VBoxSVC process terminates. Moreover, metric settings and data associated
13188 with a particular VM only exist while VM is running. They disappear as
13189 soon as VM shuts down. It is not possible to set up metrics for machines
13190 that are powered off. One needs to start VM first, then set up metric
13191 collection parameters.
13192
13193 Metrics are organized hierarchically, with each level separated by a
13194 slash (/) character. Generally, the scheme for metric names is like this:
13195
13196 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
13197
13198 "Category/Metric" together form the base metric name. A base metric is
13199 the smallest unit for which a sampling interval and the number of
13200 retained samples can be set. Only base metrics can be enabled and
13201 disabled. All sub-metrics are collected when their base metric is
13202 collected. Collected values for any set of sub-metrics can be queried
13203 with <link to="IPerformanceCollector::queryMetricsData" />.
13204
13205 For example "CPU/Load/User:avg" metric name stands for the "CPU"
13206 category, "Load" metric, "User" submetric, "average" aggregate. An
13207 aggregate function is computed over all retained data. Valid aggregate
13208 functions are:
13209
13210 <ul>
13211 <li>avg -- average</li>
13212 <li>min -- minimum</li>
13213 <li>max -- maximum</li>
13214 </ul>
13215
13216 When setting up metric parameters, querying metric data, enabling or
13217 disabling metrics wildcards can be used in metric names to specify a
13218 subset of metrics. For example, to select all CPU-related metrics
13219 use <tt>CPU/*</tt>, all averages can be queried using <tt>*:avg</tt> and
13220 so on. To query metric values without aggregates <tt>*:</tt> can be used.
13221
13222 The valid names for base metrics are:
13223
13224 <ul>
13225 <li>CPU/Load</li>
13226 <li>CPU/MHz</li>
13227 <li>RAM/Usage</li>
13228 </ul>
13229
13230 The general sequence for collecting and retrieving the metrics is:
13231 <ul>
13232 <li>
13233 Obtain an instance of IPerformanceCollector with
13234 <link to="IVirtualBox::performanceCollector" />
13235 </li>
13236 <li>
13237 Allocate and populate an array with references to objects the metrics
13238 will be collected for. Use references to IHost and IMachine objects.
13239 </li>
13240 <li>
13241 Allocate and populate an array with base metric names the data will
13242 be collected for.
13243 </li>
13244 <li>
13245 Call <link to="IPerformanceCollector::setupMetrics" />. From now on
13246 the metric data will be collected and stored.
13247 </li>
13248 <li>
13249 Wait for the data to get collected.
13250 </li>
13251 <li>
13252 Allocate and populate an array with references to objects the metric
13253 values will be queried for. You can re-use the object array used for
13254 setting base metrics.
13255 </li>
13256 <li>
13257 Allocate and populate an array with metric names the data will be
13258 collected for. Note that metric names differ from base metric names.
13259 </li>
13260 <li>
13261 Call <link to="IPerformanceCollector::queryMetricsData" />. The data
13262 that have been collected so far are returned. Note that the values
13263 are still retained internally and data collection continues.
13264 </li>
13265 </ul>
13266
13267 For an example of usage refer to the following files in VirtualBox SDK:
13268 <ul>
13269 <li>
13270 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13271 </li>
13272 <li>
13273 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13274 </li>
13275 </ul>
13276 </desc>
13277
13278 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13279 <desc>
13280 Array of unique names of metrics.
13281
13282 This array represents all metrics supported by the performance
13283 collector. Individual objects do not necessarily support all of them.
13284 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13285 list of supported metrics for a particular object.
13286 </desc>
13287 </attribute>
13288
13289 <method name="getMetrics">
13290 <desc>
13291 Returns parameters of specified metrics for a set of objects.
13292 <note>
13293 @c Null metrics array means all metrics. @c Null object array means
13294 all existing objects.
13295 </note>
13296 </desc>
13297 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13298 <desc>
13299 Metric name filter. Currently, only a comma-separated list of metrics
13300 is supported.
13301 </desc>
13302 </param>
13303 <param name="objects" type="$unknown" dir="in" safearray="yes">
13304 <desc>
13305 Set of objects to return metric parameters for.
13306 </desc>
13307 </param>
13308 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13309 <desc>
13310 Array of returned metric parameters.
13311 </desc>
13312 </param>
13313 </method>
13314
13315 <method name="setupMetrics">
13316 <desc>
13317 Sets parameters of specified base metrics for a set of objects. Returns
13318 an array of <link to="IPerformanceMetric" /> describing the metrics
13319 have been affected.
13320 <note>
13321 @c Null or empty metric name array means all metrics. @c Null or
13322 empty object array means all existing objects. If metric name array
13323 contains a single element and object array contains many, the single
13324 metric name array element is applied to each object array element to
13325 form metric/object pairs.
13326 </note>
13327 </desc>
13328 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13329 <desc>
13330 Metric name filter. Comma-separated list of metrics with wildcard
13331 support.
13332 </desc>
13333 </param>
13334 <param name="objects" type="$unknown" dir="in" safearray="yes">
13335 <desc>
13336 Set of objects to setup metric parameters for.
13337 </desc>
13338 </param>
13339 <param name="period" type="unsigned long" dir="in">
13340 <desc>
13341 Time interval in seconds between two consecutive samples of
13342 performance data.
13343 </desc>
13344 </param>
13345 <param name="count" type="unsigned long" dir="in">
13346 <desc>
13347 Number of samples to retain in performance data history. Older
13348 samples get discarded.
13349 </desc>
13350 </param>
13351 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13352 <desc>
13353 Array of metrics that have been modified by the call to this method.
13354 </desc>
13355 </param>
13356 </method>
13357
13358 <method name="enableMetrics">
13359 <desc>
13360 Turns on collecting specified base metrics. Returns an array of
13361 <link to="IPerformanceMetric" /> describing the metrics have been
13362 affected.
13363 <note>
13364 @c Null or empty metric name array means all metrics. @c Null or
13365 empty object array means all existing objects. If metric name array
13366 contains a single element and object array contains many, the single
13367 metric name array element is applied to each object array element to
13368 form metric/object pairs.
13369 </note>
13370 </desc>
13371 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13372 <desc>
13373 Metric name filter. Comma-separated list of metrics with wildcard
13374 support.
13375 </desc>
13376 </param>
13377 <param name="objects" type="$unknown" dir="in" safearray="yes">
13378 <desc>
13379 Set of objects to enable metrics for.
13380 </desc>
13381 </param>
13382 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13383 <desc>
13384 Array of metrics that have been modified by the call to this method.
13385 </desc>
13386 </param>
13387 </method>
13388
13389 <method name="disableMetrics">
13390 <desc>
13391 Turns off collecting specified base metrics. Returns an array of
13392 <link to="IPerformanceMetric" /> describing the metrics have been
13393 affected.
13394 <note>
13395 @c Null or empty metric name array means all metrics. @c Null or
13396 empty object array means all existing objects. If metric name array
13397 contains a single element and object array contains many, the single
13398 metric name array element is applied to each object array element to
13399 form metric/object pairs.
13400 </note>
13401 </desc>
13402 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13403 <desc>
13404 Metric name filter. Comma-separated list of metrics with wildcard
13405 support.
13406 </desc>
13407 </param>
13408 <param name="objects" type="$unknown" dir="in" safearray="yes">
13409 <desc>
13410 Set of objects to disable metrics for.
13411 </desc>
13412 </param>
13413 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13414 <desc>
13415 Array of metrics that have been modified by the call to this method.
13416 </desc>
13417 </param>
13418 </method>
13419
13420 <method name="queryMetricsData">
13421 <desc>
13422 Queries collected metrics data for a set of objects.
13423
13424 The data itself and related metric information are returned in seven
13425 parallel and one flattened array of arrays. Elements of
13426 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13427 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13428 the same index describe one set of values corresponding to a single
13429 metric.
13430
13431 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13432 start and length of a sub-array is indicated by
13433 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13434 value for metric <tt>metricNames[i]</tt> is at
13435 <tt>returnData[returnIndices[i]]</tt>.
13436
13437 <note>
13438 @c Null or empty metric name array means all metrics. @c Null or
13439 empty object array means all existing objects. If metric name array
13440 contains a single element and object array contains many, the single
13441 metric name array element is applied to each object array element to
13442 form metric/object pairs.
13443 </note>
13444 <note>
13445 Data collection continues behind the scenes after call to @c
13446 queryMetricsData. The return data can be seen as the snapshot of the
13447 current state at the time of @c queryMetricsData call. The internally
13448 kept metric values are not cleared by the call. This makes possible
13449 querying different subsets of metrics or aggregates with subsequent
13450 calls. If periodic querying is needed it is highly suggested to query
13451 the values with @c interval*count period to avoid confusion. This way
13452 a completely new set of data values will be provided by each query.
13453 </note>
13454 </desc>
13455 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13456 <desc>
13457 Metric name filter. Comma-separated list of metrics with wildcard
13458 support.
13459 </desc>
13460 </param>
13461 <param name="objects" type="$unknown" dir="in" safearray="yes">
13462 <desc>
13463 Set of objects to query metrics for.
13464 </desc>
13465 </param>
13466 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13467 <desc>
13468 Names of metrics returned in @c returnData.
13469 </desc>
13470 </param>
13471 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13472 <desc>
13473 Objects associated with metrics returned in @c returnData.
13474 </desc>
13475 </param>
13476 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13477 <desc>
13478 Units of measurement for each returned metric.
13479 </desc>
13480 </param>
13481 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13482 <desc>
13483 Divisor that should be applied to return values in order to get
13484 floating point values. For example:
13485 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13486 will retrieve the floating point value of i-th sample of the first
13487 metric.
13488 </desc>
13489 </param>
13490 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13491 <desc>
13492 Sequence numbers of the first elements of value sequences of
13493 particular metrics returned in @c returnData. For aggregate metrics
13494 it is the sequence number of the sample the aggregate started
13495 calculation from.
13496 </desc>
13497 </param>
13498 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13499 <desc>
13500 Indices of the first elements of value sequences of particular
13501 metrics returned in @c returnData.
13502 </desc>
13503 </param>
13504 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13505 <desc>
13506 Lengths of value sequences of particular metrics.
13507 </desc>
13508 </param>
13509 <param name="returnData" type="long" dir="return" safearray="yes">
13510 <desc>
13511 Flattened array of all metric data containing sequences of values for
13512 each metric.
13513 </desc>
13514 </param>
13515 </method>
13516
13517 </interface>
13518 <enum
13519 name="NATAliasMode"
13520 uuid="67772168-50d9-11df-9669-7fb714ee4fa1">
13521 <desc></desc>
13522 <const name="AliasLog" value="0x1">
13523 <desc></desc>
13524 </const>
13525 <const name="AliasProxyOnly" value="0x02">
13526 <desc></desc>
13527 </const>
13528 <const name="AliasUseSamePorts" value="0x04">
13529 <desc></desc>
13530 </const>
13531 </enum>
13532 <enum
13533 name="NATProtocol"
13534 uuid="e90164be-eb03-11de-94af-fff9b1c1b19f"
13535 >
13536 <desc>Protocol definitions used with NAT port-forwarding rules.</desc>
13537 <const name="UDP" value="0">
13538 <desc>Port-forwarding uses UDP protocol.</desc>
13539 </const>
13540 <const name="TCP" value="1">
13541 <desc>Port-forwarding uses TCP protocol.</desc>
13542 </const>
13543 </enum>
13544
13545 <interface
13546 name="INATEngine" extends="$unknown"
13547 uuid="4b286616-eb03-11de-b0fb-1701eca42246"
13548 wsmap="managed"
13549 >
13550 <desc>Interface for managing a NAT engine which is used with a virtual machine. This
13551 allows for changing NAT behavior such as port-forwarding rules. This interface is
13552 used in the <link to="INetworkAdapter::natDriver" /> attribute.</desc>
13553 <attribute name="network" type="wstring">
13554 <desc>The network attribute of the NAT engine (the same value is used with built-in
13555 DHCP server to fill corresponding fields of DHCP leases).</desc>
13556 </attribute>
13557 <attribute name="hostIP" type="wstring">
13558 <desc>IP of host interface to bind all opened sockets to.
13559 <note>Changing this does not change binding of port forwarding.</note>
13560 </desc>
13561 </attribute>
13562 <attribute name="tftpPrefix" type="wstring">
13563 <desc>TFTP prefix attribute which is used with the built-in DHCP server to fill
13564 the corresponding fields of DHCP leases.</desc>
13565 </attribute>
13566 <attribute name="tftpBootFile" type="wstring">
13567 <desc>TFTP boot file attribute which is used with the built-in DHCP server to fill
13568 the corresponding fields of DHCP leases.</desc>
13569 </attribute>
13570 <attribute name="tftpNextServer" type="wstring">
13571 <desc>TFTP server attribute which is used with the built-in DHCP server to fill
13572 the corresponding fields of DHCP leases.
13573 <note>The preferred form is IPv4 addresses.</note>
13574 </desc>
13575 </attribute>
13576 <attribute name="aliasMode" type="unsigned long">
13577 <desc></desc>
13578 </attribute>
13579 <attribute name="dnsPassDomain" type="boolean">
13580 <desc>Whether the DHCP server should pass the DNS domain used by the host.</desc>
13581 </attribute>
13582 <attribute name="dnsProxy" type="boolean">
13583 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
13584 of the DNS proxy and process traffic using DNS servers registered on the host.</desc>
13585 </attribute>
13586 <attribute name="dnsUseHostResolver" type="boolean">
13587 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
13588 of the DNS proxy and process traffic using the host resolver mechanism.</desc>
13589 </attribute>
13590 <attribute name="redirects" type="wstring" readonly="yes" safearray="yes">
13591 <desc>Array of NAT port-forwarding rules in string representation, in the following
13592 format: "name,protocol id,host ip,host port,guest ip,guest port".</desc>
13593 </attribute>
13594 <method name="setNetworkSettings">
13595 <desc>Sets network configuration of the NAT engine.</desc>
13596 <param name="mtu" type="unsigned long" dir="in">
13597 <desc>MTU (maximum transmission unit) of the NAT engine in bytes.</desc>
13598 </param>
13599 <param name="sockSnd" type="unsigned long" dir="in">
13600 <desc>Capacity of the socket send buffer in bytes when creating a new socket.</desc>
13601 </param>
13602 <param name="sockRcv" type="unsigned long" dir="in">
13603 <desc>Capacity of the socket receive buffer in bytes when creating a new socket.</desc>
13604 </param>
13605 <param name="TcpWndSnd" type="unsigned long" dir="in">
13606 <desc>Initial size of the NAT engine's sending TCP window in bytes when
13607 establishing a new TCP connection.</desc>
13608 </param>
13609 <param name="TcpWndRcv" type="unsigned long" dir="in">
13610 <desc>Initial size of the NAT engine's receiving TCP window in bytes when
13611 establishing a new TCP connection.</desc>
13612 </param>
13613 </method>
13614 <method name="getNetworkSettings">
13615 <desc>Returns network configuration of NAT engine. See <link to="#setNetworkSettings" />
13616 for parameter descriptions.</desc>
13617 <param name="mtu" type="unsigned long" dir="out" />
13618 <param name="sockSnd" type="unsigned long" dir="out" />
13619 <param name="sockRcv" type="unsigned long" dir="out" />
13620 <param name="TcpWndSnd" type="unsigned long" dir="out" />
13621 <param name="TcpWndRcv" type="unsigned long" dir="out" />
13622 </method>
13623 <method name="addRedirect">
13624 <desc>Adds a new NAT port-forwarding rule.</desc>
13625 <param name="name" type="wstring" dir="in">
13626 <desc>The name of the rule. An empty name is acceptable, in which case the NAT engine
13627 auto-generates one using the other parameters.</desc>
13628 </param>
13629 <param name="proto" type="NATProtocol" dir="in">
13630 <desc>Protocol handled with the rule.</desc>
13631 </param>
13632 <param name="hostIp" type="wstring" dir="in">
13633 <desc>IP of the host interface to which the rule should apply. An empty ip address is
13634 acceptable, in which case the NAT engine binds the handling socket to any interface.</desc>
13635 </param>
13636 <param name="hostPort" type="unsigned short" dir="in">
13637 <desc>The port number to listen on.</desc>
13638 </param>
13639 <param name="guestIp" type="wstring" dir="in">
13640 <desc>The IP address of the guest which the NAT engine will forward matching packets
13641 to. An empty IP address is acceptable, in which case the NAT engine will forward
13642 packets to the first DHCP lease (x.x.x.15).</desc>
13643 </param>
13644 <param name="guestPort" type="unsigned short" dir="in">
13645 <desc>The port number to forward.</desc>
13646 </param>
13647 </method>
13648 <method name="removeRedirect">
13649 <desc>Removes a port-forwarding rule that was previously registered.</desc>
13650 <param name="name" type="wstring" dir="in">
13651 <desc>The name of the rule to delete.</desc>
13652 </param>
13653 </method>
13654 </interface>
13655
13656 <enum
13657 name="VBoxEventType"
13658 uuid="2c76667e-6981-4122-a71a-cdfd6a6eb575">
13659
13660 <desc>
13661 Type of an event.
13662 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
13663 </desc>
13664
13665 <const name="Invalid" value="0">
13666 <desc>
13667 Invalid event, must be first.
13668 </desc>
13669 </const>
13670
13671 <const name="Any" value="1">
13672 <desc>
13673 Wildcard for all events.
13674 Events of this type are never delivered, and only used in
13675 registerListener() call to simplify registration.
13676 </desc>
13677 </const>
13678
13679 <const name="Vetoable" value="2">
13680 <desc>
13681 Wildcard for all vetoable events. Events of this type are never delivered, and only
13682 used in registerListener() call to simplify registration.
13683 </desc>
13684 </const>
13685
13686 <const name="MachineEvent" value="3">
13687 <desc>
13688 Wildcard for all machine events. Events of this type are never delivered, and only used in
13689 registerListener() call to simplify registration.
13690 </desc>
13691 </const>
13692
13693 <const name="SnapshotEvent" value="4">
13694 <desc>
13695 Wildcard for all snapshot events. Events of this type are never delivered, and only used in
13696 registerListener() call to simplify registration.
13697 </desc>
13698 </const>
13699
13700 <const name="InputEvent" value="5">
13701 <desc>
13702 Wildcard for all input device (keyboard, mouse) events.
13703 Events of this type are never delivered, and only used in
13704 registerListener() call to simplify registration.
13705 </desc>
13706 </const>
13707
13708 <const name="LastWildcard" value="31">
13709 <desc>
13710 Last wildcard.
13711 </desc>
13712 </const>
13713
13714 <const name="OnMachineStateChanged" value="32">
13715 <desc>
13716 <see>IMachineStateChangedEvent</see>
13717 </desc>
13718 </const>
13719 <const name="OnMachineDataChanged" value="33">
13720 <desc>
13721 <see>IMachineDataChangedEvent</see>
13722 </desc>
13723 </const>
13724 <const name="OnExtraDataChanged" value="34">
13725 <desc>
13726 <see>IExtraDataChangedEvent</see>
13727 </desc>
13728 </const>
13729 <const name="OnExtraDataCanChange" value="35">
13730 <desc>
13731 <see>IExtraDataCanChangeEvent</see>
13732 </desc>
13733 </const>
13734 <const name="OnMediumRegistered" value="36">
13735 <desc>
13736 <see>IMediumRegistered</see>
13737 </desc>
13738 </const>
13739 <const name="OnMachineRegistered" value="37">
13740 <desc>
13741 <see>IMachineRegisteredEvent</see>
13742 </desc>
13743 </const>
13744 <const name="OnSessionStateChanged" value="38">
13745 <desc>
13746 <see>ISessionStateChangedEvent</see>
13747 </desc>
13748 </const>
13749 <const name="OnSnapshotTaken" value="39">
13750 <desc>
13751 <see>ISnapshotTakenEvent</see>
13752 </desc>
13753 </const>
13754 <const name="OnSnapshotDeleted" value="40">
13755 <desc>
13756 <see>ISnapshotDeletedEvent</see>
13757 </desc>
13758 </const>
13759 <const name="OnSnapshotChanged" value="41">
13760 <desc>
13761 <see>ISnapshotChangedEvent</see>
13762 </desc>
13763 </const>
13764 <const name="OnGuestPropertyChanged" value="42">
13765 <desc>
13766 <see>IGuestPropertyChangedEvent</see>
13767 </desc>
13768 </const>
13769 <!-- Console events -->
13770 <const name="OnMousePointerShapeChanged" value="43">
13771 <desc>
13772 <see>IMousePointerShapeChangedEvent</see>
13773 </desc>
13774 </const>
13775 <const name="OnMouseCapabilityChanged" value="44">
13776 <desc>
13777 <see>IMouseCapabilityChangedEvent</see>
13778 </desc>
13779 </const>
13780 <const name="OnKeyboardLedsChanged" value="45">
13781 <desc>
13782 <see>IKeyboardLedsChangedEvent</see>
13783 </desc>
13784 </const>
13785 <const name="OnStateChanged" value="46">
13786 <desc>
13787 <see>IStateChangedEvent</see>
13788 </desc>
13789 </const>
13790 <const name="OnAdditionsStateChanged" value="47">
13791 <desc>
13792 <see>IAdditionsStateChangedEvent</see>
13793 </desc>
13794 </const>
13795 <const name="OnNetworkAdapterChanged" value="48">
13796 <desc>
13797 <see>INetworkAdapterChangedEvent</see>
13798 </desc>
13799 </const>
13800 <const name="OnSerialPortChanged" value="49">
13801 <desc>
13802 <see>ISerialPortChangedEvent</see>
13803 </desc>
13804 </const>
13805 <const name="OnParallelPortChanged" value="50">
13806 <desc>
13807 <see>IParallelPortChangedEvent</see>
13808 </desc>
13809 </const>
13810 <const name="OnStorageControllerChanged" value="51">
13811 <desc>
13812 <see>IStorageControllerChangedEvent</see>
13813 </desc>
13814 </const>
13815 <const name="OnMediumChanged" value="52">
13816 <desc>
13817 <see>IMediumChangedEvent</see>
13818 </desc>
13819 </const>
13820 <const name="OnVRDPServerChanged" value="53">
13821 <desc>
13822 <see>IVRDPServerChangedEvent</see>
13823 </desc>
13824 </const>
13825 <const name="OnUSBControllerChanged" value="54">
13826 <desc>
13827 <see>IUSBControllerChangedEvent</see>
13828 </desc>
13829 </const>
13830 <const name="OnUSBDeviceStateChanged" value="55">
13831 <desc>
13832 <see>IUSBDeviceStateChangedEvent</see>
13833 </desc>
13834 </const>
13835 <const name="OnSharedFolderChanged" value="56">
13836 <desc>
13837 <see>ISharedFolderChangedEvent</see>
13838 </desc>
13839 </const>
13840 <const name="OnRuntimeError" value="57">
13841 <desc>
13842 <see>IRuntimeErrorEvent</see>
13843 </desc>
13844 </const>
13845 <const name="OnCanShowWindow" value="58">
13846 <desc>
13847 <see>ICanShowWindowEvent</see>
13848 </desc>
13849 </const>
13850 <const name="OnShowWindow" value="59">
13851 <desc>
13852 <see>IShowWindowEvent</see>
13853 </desc>
13854 </const>
13855 <const name="OnCPUChanged" value="60">
13856 <desc>
13857 <see>ICPUChangedEvent</see>
13858 </desc>
13859 </const>
13860 <const name="OnRemoteDisplayInfoChanged" value="61">
13861 <desc>
13862 <see>IRemoteDisplayInfoChangedEvent</see>
13863 </desc>
13864 </const>
13865 <const name="OnEventSourceChanged" value="62">
13866 <desc>
13867 <see>IEventSourceChangedEvent</see>
13868 </desc>
13869 </const>
13870 <const name="OnCPUPriorityChanged" value="63">
13871 <desc>
13872 <see>ICPUPriorityChangedEvent</see>
13873 </desc>
13874 </const>
13875 <!-- Last event marker -->
13876 <const name="Last" value="64">
13877 <desc>
13878 Must be last event, used for iterations and structures relying on numerical event values.
13879 </desc>
13880 </const>
13881
13882 </enum>
13883
13884 <interface
13885 name="IEventSource" extends="$unknown"
13886 uuid="3c670618-f727-4fe9-94d2-8243f489a033"
13887 wsmap="managed"
13888 >
13889 <desc>
13890 Event source. Generally, any object which could generate events can be an event source,
13891 or aggregate one. To simplify using one-way protocols such as webservices running on top of HTTP(S),
13892 an event source can work with listeners in either active or passive mode. In active mode it is up to
13893 the IEventSource implementation to call <link to="IEventListener::handleEvent" />, in passive mode the
13894 event source keeps track of pending events for each listener and returns available events on demand.
13895
13896 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
13897 </desc>
13898
13899 <method name="createListener">
13900 <desc>
13901 Creates a new listener object, useful for passive mode.
13902 </desc>
13903 <param name="listener" type="IEventListener" dir="return"/>
13904 </method>
13905
13906 <method name="registerListener">
13907 <desc>
13908 Register an event listener.
13909
13910 <note>
13911 To avoid system overload, the VirtualBox server process checks if passive event
13912 listeners call <link to="IEventSource::getEvent"/> frequently enough. In the
13913 current implementation, if more than 100 pending events are detected for a passive
13914 event listener, it is forcefully unregistered by the system, and further
13915 <link to="#getEvent" /> calls will return @c VBOX_E_OBJECT_NOT_FOUND.
13916 </note>
13917 </desc>
13918 <param name="listener" type="IEventListener" dir="in">
13919 <desc>Listener to register.</desc>
13920 </param>
13921 <param name="interesting" type="VBoxEventType" dir="in" safearray="yes">
13922 <desc>
13923 Event types listener is interested in. One can use wildcards like -
13924 <link to="VBoxEventType::Any"/> to specify wildcards, matching more
13925 than one event.
13926 </desc>
13927 </param>
13928 <param name="active" type="boolean" dir="in">
13929 <desc>
13930 Which mode this listener is operating in.
13931 In active mode, <link to="IEventListener::handleEvent" /> is called directly.
13932 In passive mode, an internal event queue is created for this this IEventListener.
13933 For each event coming in, it is added to queues for all interested registered passive
13934 listeners. It is then up to the external code to call the listener's
13935 <link to="IEventListener::handleEvent" /> method. When done with an event, the
13936 external code must call <link to="#eventProcessed" />.
13937 </desc>
13938 </param>
13939 </method>
13940
13941 <method name="unregisterListener">
13942 <desc>
13943 Unregister an event listener. If listener is passive, and some waitable events are still
13944 in queue they are marked as processed automatically.
13945 </desc>
13946 <param name="listener" type="IEventListener" dir="in">
13947 <desc>Listener to unregister.</desc>
13948 </param>
13949 </method>
13950
13951 <method name="fireEvent">
13952 <desc>
13953 Fire an event for this source.
13954 </desc>
13955 <param name="event" type="IEvent" dir="in">
13956 <desc>Event to deliver.</desc>
13957 </param>
13958 <param name="timeout" type="long" dir="in">
13959 <desc>
13960 Maximum time to wait for event processing (if event is waitable), in ms;
13961 0 = no wait, -1 = indefinite wait.
13962 </desc>
13963 </param>
13964 <param name="result" type="boolean" dir="return">
13965 <desc>true if an event was delivered to all targets, or is non-waitable.</desc>
13966 </param>
13967 </method>
13968
13969 <method name="getEvent">
13970 <desc>
13971 Get events from this peer's event queue (for passive mode). Calling this method
13972 regularly is required for passive event listeners to avoid system overload;
13973 see <link to="IEventSource::registerListener" /> for details.
13974
13975 <result name="VBOX_E_OBJECT_NOT_FOUND">
13976 Listener is not registered, or autounregistered.
13977 </result>
13978 </desc>
13979 <param name="listener" type="IEventListener" dir="in">
13980 <desc>Which listener to get data for.</desc>
13981 </param>
13982 <param name="timeout" type="long" dir="in">
13983 <desc>
13984 Maximum time to wait for events, in ms;
13985 0 = no wait, -1 = indefinite wait.
13986 </desc>
13987 </param>
13988 <param name="event" type="IEvent" dir="return">
13989 <desc>Event retrieved, or null if none available.</desc>
13990 </param>
13991 </method>
13992
13993 <method name="eventProcessed">
13994 <desc>
13995 Must be called for waitable events after a particular listener finished its
13996 event processing. When all listeners of a particular event have called this
13997 method, the system will then call <link to="IEvent::setProcessed" />.
13998 </desc>
13999 <param name="listener" type="IEventListener" dir="in">
14000 <desc>Which listener processed event.</desc>
14001 </param>
14002 <param name="event" type="IEvent" dir="in">
14003 <desc>Which event.</desc>
14004 </param>
14005 </method>
14006
14007 </interface>
14008
14009 <interface
14010 name="IEventListener" extends="$unknown"
14011 uuid="67099191-32e7-4f6c-85ee-422304c71b90"
14012 wsmap="managed"
14013 >
14014 <desc>
14015 Event listener. An event listener can work in either active or passive mode, depending on the way
14016 it was registered.
14017 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
14018 </desc>
14019
14020 <method name="handleEvent">
14021 <desc>
14022 Handle event callback (called directly by IEventSource in active mode, or could be
14023 called by event processor thread in passive mode).
14024 </desc>
14025 <param name="event" type="IEvent" dir="in">
14026 <desc>Event available.</desc>
14027 </param>
14028 </method>
14029
14030 </interface>
14031
14032 <interface
14033 name="IEvent" extends="$unknown"
14034 uuid="0ca2adba-8f30-401b-a8cd-fe31dbe839c0"
14035 wsmap="managed"
14036 >
14037 <desc>
14038 Abstract parent interface for VirtualBox events. Actual events will typically implement
14039 a more specific interface which derives from this (see below).
14040
14041 <b>Introduction to VirtualBox events</b>
14042
14043 Generally speaking, an event (represented by this interface) signals that something
14044 happened, while an event listener (see <link to="IEventListener" /> represents an
14045 entity that is interested in certain events. In order for this to work with
14046 unidirectional protocols (i.e. web services), the concepts of passive and active
14047 listener are used.
14048
14049 Event consumers can register themselves as listeners, providing an array of
14050 events they are interested in (see <link to="IEventSource::registerListener" />).
14051 When an event triggers, the listener is notified about the event. The exact
14052 mechanism of the notification depends on whether the listener was registered as
14053 an active or passive listener:
14054
14055 <ul>
14056 <li>An active listener is very similar to a callback: it is a function invoked
14057 by the API. As opposed to the callbacks that were used in the API before
14058 VirtualBox 3.3 however, events are now objects with an interface hierarchy.
14059 </li>
14060
14061 <li>Passive listeners are somewhat tricker to implement, but do not require
14062 a client function to be callable, which is not an option with scripting
14063 languages or web service clients. Internally the <link to="IEventSource" />
14064 implementation maintains an event queue for each passive listener, and
14065 newly arrived events are put in this queue. When the listener calls
14066 <link to="IEventSource::getEvent"/>, all elements from its internal event
14067 queue are returned. When the client completes processing of an event,
14068 the <link to="IEventSource::eventProcessed" /> function must be called,
14069 acknowledging that the events were processed. It supports implementing
14070 waitable events. On passive listener unregistration, all events from its
14071 queue are auto-acknowledged.
14072 </li>
14073 </ul>
14074
14075 Waitable events are useful in situations where the event generator wants to track
14076 delivery or a party wants to wait until all listeners have completed the event. A
14077 typical example would be a vetoable event (see <link to="IVetoEvent" />) where a
14078 listeners might veto a certain action, and thus the event producer has to make
14079 sure that all listeners have processed the event and not vetoed before taking
14080 the action.
14081
14082 A given event may have both passive and active listeners at the same time.
14083
14084 <b>Using events</b>
14085
14086 Any VirtualBox object capable of producing externally visible events provides an
14087 @c eventSource read-only attribute, which is of the type <link to="IEventSource" />.
14088 This event source object is notified by VirtualBox once something has happened, so
14089 consumers may register event listeners with this event source. To register a listener,
14090 an object implementing the <link to="IEventListener" /> interface must be provided.
14091 For active listeners, such an object is typically created by the consumer, while for
14092 passive listeners <link to="IEventSource::createListener" /> should be used. Please
14093 note that a listener created with @c createListener() must not be used as an active listener.
14094
14095 Once created, the listener must be registered to listen for the desired events
14096 (see <link to="IEventSource::registerListener" />), providing an array of
14097 <link to="VBoxEventType" /> enums. Those elements can either be the individual
14098 event IDs or wildcards matching multiple event IDs.
14099
14100 After registration, the callback's <link to="IEventListener::handleEvent" /> method is
14101 called automatically when the event is triggered, while passive listeners have to call
14102 <link to="IEventSource::getEvent" /> and <link to="IEventSource::eventProcessed" /> in
14103 an event processing loop.
14104
14105 The IEvent interface is an abstract parent interface for all such VirtualBox events
14106 coming in. As a result, the standard use pattern inside <link to="IEventListener::handleEvent" />
14107 or the event processing loop is to check the <link to="#type" /> attribute of the event and
14108 then cast to the appropriate specific interface using @c QueryInterface().
14109 </desc>
14110
14111 <attribute name="type" readonly="yes" type="VBoxEventType">
14112 <desc>
14113 Event type.
14114 </desc>
14115 </attribute>
14116
14117 <attribute name="source" readonly="yes" type="IEventSource">
14118 <desc>
14119 Source of this event.
14120 </desc>
14121 </attribute>
14122
14123 <attribute name="waitable" readonly="yes" type="boolean">
14124 <desc>
14125 If we can wait for this event being processed. If false, waitProcessed() returns immediately,
14126 and setProcessed() doesn't make sense. Non-waitable events are generally better performing,
14127 as no additional overhead associated with waitability imposed.
14128 Waitable events are needed when one need to be able to wait for particular event processed,
14129 for example for vetoable changes, or if event refers to some resource which need to be kept immutable
14130 until all consumers confirmed events.
14131 </desc>
14132 </attribute>
14133
14134 <method name="setProcessed">
14135 <desc>
14136 Internal method called by the system when all listeners of a particular event have called
14137 <link to="IEventSource::eventProcessed" />. This should not be called by client code.
14138 </desc>
14139 </method>
14140
14141 <method name="waitProcessed">
14142 <desc>
14143 Wait until time outs, or this event is processed. Event must be waitable for this operation to have
14144 described semantics, for non-waitable returns true immediately.
14145 </desc>
14146 <param name="timeout" type="long" dir="in">
14147 <desc>
14148 Maximum time to wait for event processeing, in ms;
14149 0 = no wait, -1 = indefinite wait.
14150 </desc>
14151 </param>
14152 <param name="result" type="boolean" dir="return">
14153 <desc>If this event was processed before timeout.</desc>
14154 </param>
14155 </method>
14156 </interface>
14157
14158
14159 <interface
14160 name="IMachineEvent" extends="IEvent"
14161 uuid="92ed7b1a-0d96-40ed-ae46-a564d484325e"
14162 wsmap="managed" id="MachineEvent"
14163 >
14164 <desc>Base abstract interface for all machine events.</desc>
14165
14166 <attribute name="machineId" readonly="yes" type="uuid" mod="string">
14167 <desc>ID of the machine this event relates to.</desc>
14168 </attribute>
14169
14170 </interface>
14171
14172 <interface
14173 name="IMachineStateChangedEvent" extends="IMachineEvent"
14174 uuid="5748F794-48DF-438D-85EB-98FFD70D18C9"
14175 wsmap="managed" autogen="VBoxEvent" id="OnMachineStateChanged"
14176 >
14177 <desc>Machine state change event.</desc>
14178
14179 <attribute name="state" readonly="yes" type="MachineState">
14180 <desc>New execution state.</desc>
14181 </attribute>
14182 </interface>
14183
14184 <interface
14185 name="IMachineDataChangedEvent" extends="IMachineEvent"
14186 uuid="6AA70A6C-0DCA-4810-8C5C-457B278E3D49"
14187 wsmap="managed" autogen="VBoxEvent" id="OnMachineDataChanged"
14188 >
14189 <desc>
14190 Any of the settings of the given machine has changed.
14191 </desc>
14192 </interface>
14193
14194 <interface
14195 name="IMachineRegisteredEvent" extends="IMachineEvent"
14196 uuid="c354a762-3ff2-4f2e-8f09-07382ee25088"
14197 wsmap="managed" autogen="VBoxEvent" id="OnMachineRegistered"
14198 >
14199 <desc>
14200 The given machine was registered or unregistered
14201 within this VirtualBox installation.
14202 </desc>
14203
14204 <attribute name="registered" type="boolean" readonly="yes">
14205 <desc>
14206 If @c true, the machine was registered, otherwise it was
14207 unregistered.
14208 </desc>
14209 </attribute>
14210 </interface>
14211
14212 <interface
14213 name="ISessionStateChangedEvent" extends="IMachineEvent"
14214 uuid="714a3eef-799a-4489-86cd-fe8e45b2ff8e"
14215 wsmap="managed" autogen="VBoxEvent" id="OnSessionStateChanged"
14216 >
14217 <desc>
14218 The state of the session for the given machine was changed.
14219 <see>IMachine::sessionState</see>
14220 </desc>
14221
14222 <attribute name="state" type="SessionState" readonly="yes">
14223 <desc>
14224 New session state.
14225 </desc>
14226 </attribute>
14227 </interface>
14228
14229 <interface
14230 name="IGuestPropertyChangedEvent" extends="IMachineEvent"
14231 uuid="3f63597a-26f1-4edb-8dd2-6bddd0912368"
14232 wsmap="managed" autogen="VBoxEvent" id="OnGuestPropertyChanged"
14233 >
14234 <desc>
14235 Notification when a guest property has changed.
14236 </desc>
14237
14238 <attribute name="name" readonly="yes" type="wstring">
14239 <desc>
14240 The name of the property that has changed.
14241 </desc>
14242 </attribute>
14243
14244 <attribute name="value" readonly="yes" type="wstring">
14245 <desc>
14246 The new property value.
14247 </desc>
14248 </attribute>
14249
14250 <attribute name="flags" readonly="yes" type="wstring">
14251 <desc>
14252 The new property flags.
14253 </desc>
14254 </attribute>
14255
14256 </interface>
14257
14258 <interface
14259 name="ISnapshotEvent" extends="IMachineEvent"
14260 uuid="21637b0e-34b8-42d3-acfb-7e96daf77c22"
14261 wsmap="managed" id="SnapshotEvent"
14262 >
14263 <desc>Base interface for all snapshot events.</desc>
14264
14265 <attribute name="snapshotId" readonly="yes" type="uuid" mod="string">
14266 <desc>ID of the snapshot this event relates to.</desc>
14267 </attribute>
14268
14269 </interface>
14270
14271 <interface
14272 name="ISnapshotTakenEvent" extends="ISnapshotEvent"
14273 uuid="d27c0b3d-6038-422c-b45e-6d4a0503d9f1"
14274 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotTaken"
14275 >
14276 <desc>
14277 A new snapshot of the machine has been taken.
14278 <see>ISnapshot</see>
14279 </desc>
14280 </interface>
14281
14282 <interface
14283 name="ISnapshotDeletedEvent" extends="ISnapshotEvent"
14284 uuid="c48f3401-4a9e-43f4-b7a7-54bd285e22f4"
14285 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotDeleted"
14286 >
14287 <desc>
14288 Snapshot of the given machine has been deleted.
14289
14290 <note>
14291 This notification is delivered <b>after</b> the snapshot
14292 object has been uninitialized on the server (so that any
14293 attempt to call its methods will return an error).
14294 </note>
14295
14296 <see>ISnapshot</see>
14297 </desc>
14298 </interface>
14299
14300 <interface
14301 name="ISnapshotChangedEvent" extends="ISnapshotEvent"
14302 uuid="07541941-8079-447a-a33e-47a69c7980db"
14303 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotChanged"
14304 >
14305 <desc>
14306 Snapshot properties (name and/or description) have been changed.
14307 <see>ISnapshot</see>
14308 </desc>
14309 </interface>
14310
14311 <interface
14312 name="IMousePointerShapeChangedEvent" extends="IEvent"
14313 uuid="a6dcf6e8-416b-4181-8c4a-45ec95177aef"
14314 wsmap="managed" autogen="VBoxEvent" id="OnMousePointerShapeChanged"
14315 >
14316 <desc>
14317 Notification when the guest mouse pointer shape has
14318 changed. The new shape data is given.
14319 </desc>
14320
14321 <attribute name="visible" type="boolean" readonly="yes">
14322 <desc>
14323 Flag whether the pointer is visible.
14324 </desc>
14325 </attribute>
14326 <attribute name="alpha" type="boolean" readonly="yes">
14327 <desc>
14328 Flag whether the pointer has an alpha channel.
14329 </desc>
14330 </attribute>
14331 <attribute name="xhot" type="unsigned long" readonly="yes">
14332 <desc>
14333 The pointer hot spot X coordinate.
14334 </desc>
14335 </attribute>
14336 <attribute name="yhot" type="unsigned long" readonly="yes">
14337 <desc>
14338 The pointer hot spot Y coordinate.
14339 </desc>
14340 </attribute>
14341 <attribute name="width" type="unsigned long" readonly="yes">
14342 <desc>
14343 Width of the pointer shape in pixels.
14344 </desc>
14345 </attribute>
14346 <attribute name="height" type="unsigned long" readonly="yes">
14347 <desc>
14348 Height of the pointer shape in pixels.
14349 </desc>
14350 </attribute>
14351 <attribute name="shape" type="octet" safearray="yes" readonly="yes">
14352 <desc>
14353 Shape buffer arrays.
14354
14355 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
14356 followed by a 32-bpp XOR (color) mask.
14357
14358 For pointers without alpha channel the XOR mask pixels are 32
14359 bit values: (lsb)BGR0(msb). For pointers with alpha channel
14360 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
14361
14362 An AND mask is used for pointers with alpha channel, so if the
14363 callback does not support alpha, the pointer could be
14364 displayed as a normal color pointer.
14365
14366 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
14367 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
14368 height</tt>. The padding bits at the end of each scanline are
14369 undefined.
14370
14371 The XOR mask follows the AND mask on the next 4-byte aligned
14372 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
14373 Bytes in the gap between the AND and the XOR mask are undefined.
14374 The XOR mask scanlines have no gap between them and the size of
14375 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
14376
14377 <note>
14378 If @a shape is 0, only the pointer visibility is changed.
14379 </note>
14380 </desc>
14381 </attribute>
14382 </interface>
14383
14384 <interface
14385 name="IMouseCapabilityChangedEvent" extends="IEvent"
14386 uuid="d633ad48-820c-4207-b46c-6bd3596640d5"
14387 wsmap="managed" autogen="VBoxEvent" id="OnMouseCapabilityChanged"
14388 >
14389 <desc>
14390 Notification when the mouse capabilities reported by the
14391 guest have changed. The new capabilities are passed.
14392 </desc>
14393 <attribute name="supportsAbsolute" type="boolean" readonly="yes">
14394 <desc>
14395 Supports absolute coordinates.
14396 </desc>
14397 </attribute>
14398 <attribute name="supportsRelative" type="boolean" readonly="yes">
14399 <desc>
14400 Supports relative coordinates.
14401 </desc>
14402 </attribute>
14403 <attribute name="needsHostCursor" type="boolean" readonly="yes">
14404 <desc>
14405 If host cursor is needed.
14406 </desc>
14407 </attribute>
14408 </interface>
14409
14410 <interface
14411 name="IKeyboardLedsChangedEvent" extends="IEvent"
14412 uuid="6DDEF35E-4737-457B-99FC-BC52C851A44F"
14413 wsmap="managed" autogen="VBoxEvent" id="OnKeyboardLedsChanged"
14414 >
14415 <desc>
14416 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
14417 to alter the state of the keyboard LEDs.
14418 </desc>
14419 <attribute name="numLock" type="boolean" readonly="yes">
14420 <desc>
14421 NumLock status.
14422 </desc>
14423 </attribute>
14424 <attribute name="capsLock" type="boolean" readonly="yes">
14425 <desc>
14426 CapsLock status.
14427 </desc>
14428 </attribute>
14429 <attribute name="scrollLock" type="boolean" readonly="yes">
14430 <desc>
14431 ScrollLock status.
14432 </desc>
14433 </attribute>
14434 </interface>
14435
14436 <interface
14437 name="IStateChangedEvent" extends="IEvent"
14438 uuid="4376693C-CF37-453B-9289-3B0F521CAF27"
14439 wsmap="managed" autogen="VBoxEvent" id="OnStateChanged"
14440 >
14441 <desc>
14442 Notification when the execution state of the machine has changed.
14443 The new state is given.
14444 </desc>
14445 <attribute name="state" type="MachineState" readonly="yes">
14446 <desc>
14447 New machine state.
14448 </desc>
14449 </attribute>
14450 </interface>
14451
14452 <interface
14453 name="IAdditionsStateChangedEvent" extends="IEvent"
14454 uuid="D70F7915-DA7C-44C8-A7AC-9F173490446A"
14455 wsmap="managed" autogen="VBoxEvent" id="OnAdditionsStateChanged"
14456 >
14457 <desc>
14458 Notification when a Guest Additions property changes.
14459 Interested callees should query IGuest attributes to
14460 find out what has changed.
14461 </desc>
14462 </interface>
14463
14464 <interface
14465 name="INetworkAdapterChangedEvent" extends="IEvent"
14466 uuid="08889892-1EC6-4883-801D-77F56CFD0103"
14467 wsmap="managed" autogen="VBoxEvent" id="OnNetworkAdapterChanged"
14468 >
14469 <desc>
14470 Notification when a property of one of the
14471 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
14472 changes. Interested callees should use INetworkAdapter methods and
14473 attributes to find out what has changed.
14474 </desc>
14475 <attribute name="networkAdapter" type="INetworkAdapter" readonly="yes">
14476 <desc>
14477 Network adapter that is subject to change.
14478 </desc>
14479 </attribute>
14480 </interface>
14481
14482 <interface
14483 name="ISerialPortChangedEvent" extends="IEvent"
14484 uuid="3BA329DC-659C-488B-835C-4ECA7AE71C6C"
14485 wsmap="managed" autogen="VBoxEvent" id="OnSerialPortChanged"
14486 >
14487 <desc>
14488 Notification when a property of one of the
14489 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
14490 Interested callees should use ISerialPort methods and attributes
14491 to find out what has changed.
14492 </desc>
14493 <attribute name="serialPort" type="ISerialPort" readonly="yes">
14494 <desc>
14495 Serial port that is subject to change.
14496 </desc>
14497 </attribute>
14498 </interface>
14499
14500 <interface
14501 name="IParallelPortChangedEvent" extends="IEvent"
14502 uuid="813C99FC-9849-4F47-813E-24A75DC85615"
14503 wsmap="managed" autogen="VBoxEvent" id="OnParallelPortChanged"
14504 >
14505 <desc>
14506 Notification when a property of one of the
14507 virtual <link to="IMachine::getParallelPort">parallel ports</link>
14508 changes. Interested callees should use ISerialPort methods and
14509 attributes to find out what has changed.
14510 </desc>
14511 <attribute name="parallelPort" type="IParallelPort" readonly="yes">
14512 <desc>
14513 Parallel port that is subject to change.
14514 </desc>
14515 </attribute>
14516 </interface>
14517
14518 <interface
14519 name="IStorageControllerChangedEvent" extends="IEvent"
14520 uuid="715212BF-DA59-426E-8230-3831FAA52C56"
14521 wsmap="managed" autogen="VBoxEvent" id="OnStorageControllerChanged"
14522 >
14523 <desc>
14524 Notification when a
14525 <link to="IMachine::mediumAttachments">medium attachment</link>
14526 changes.
14527 </desc>
14528 </interface>
14529
14530 <interface
14531 name="IMediumChangedEvent" extends="IEvent"
14532 uuid="0FE2DA40-5637-472A-9736-72019EABD7DE"
14533 wsmap="managed" autogen="VBoxEvent" id="OnMediumChanged"
14534 >
14535 <desc>
14536 Notification when a
14537 <link to="IMachine::mediumAttachments">medium attachment</link>
14538 changes.
14539 </desc>
14540 <attribute name="mediumAttachment" type="IMediumAttachment" readonly="yes">
14541 <desc>
14542 Medium attachment that is subject to change.
14543 </desc>
14544 </attribute>
14545 </interface>
14546
14547 <interface
14548 name="ICPUChangedEvent" extends="IEvent"
14549 uuid="D0F0BECC-EE17-4D17-A8CC-383B0EB55E9D"
14550 wsmap="managed" autogen="VBoxEvent" id="OnCPUChanged"
14551 >
14552 <desc>
14553 Notification when a CPU changes.
14554 </desc>
14555 <attribute name="cpu" type="unsigned long" readonly="yes">
14556 <desc>
14557 The CPU which changed.
14558 </desc>
14559 </attribute>
14560 <attribute name="add" type="boolean" readonly="yes">
14561 <desc>
14562 Flag whether the CPU was added or removed.
14563 </desc>
14564 </attribute>
14565 </interface>
14566
14567 <interface
14568 name="ICPUPriorityChangedEvent" extends="IEvent"
14569 uuid="657fe2fe-a75a-4cb6-8cf9-072aa41e7d75"
14570 wsmap="managed" autogen="VBoxEvent" id="OnCPUPriorityChanged"
14571 >
14572 <desc>
14573 Notification when the CPU priority changes.
14574 </desc>
14575 <attribute name="priority" type="unsigned long" readonly="yes">
14576 <desc>
14577 The new CPU priority value. (1-100)
14578 </desc>
14579 </attribute>
14580 </interface>
14581
14582 <interface
14583 name="IVRDPServerChangedEvent" extends="IEvent"
14584 uuid="726038B6-6279-4A7A-8037-D041693D1915"
14585 wsmap="managed" autogen="VBoxEvent" id="OnVRDPServerChanged"
14586 >
14587 <desc>
14588 Notification when a property of the
14589 <link to="IMachine::VRDPServer">VRDP server</link> changes.
14590 Interested callees should use IVRDPServer methods and attributes to
14591 find out what has changed.
14592 </desc>
14593 </interface>
14594
14595 <interface
14596 name="IRemoteDisplayInfoChangedEvent" extends="IEvent"
14597 uuid="65B556C5-2A99-47D8-B311-FC177F0914CD"
14598 wsmap="managed" autogen="VBoxEvent" id="OnRemoteDisplayInfoChanged"
14599 >
14600 <desc>
14601 Notification when the status of the VRDP server changes. Interested callees
14602 should use <link to="IConsole::remoteDisplayInfo">IRemoteDisplayInfo</link>
14603 attributes to find out what is the current status.
14604 </desc>
14605 </interface>
14606
14607 <interface
14608 name="IUSBControllerChangedEvent" extends="IEvent"
14609 uuid="93BADC0C-61D9-4940-A084-E6BB29AF3D83"
14610 wsmap="managed" autogen="VBoxEvent" id="OnUSBControllerChanged"
14611 >
14612 <desc>
14613 Notification when a property of the virtual
14614 <link to="IMachine::USBController">USB controller</link> changes.
14615 Interested callees should use IUSBController methods and attributes to
14616 find out what has changed.
14617 </desc>
14618 </interface>
14619
14620 <interface
14621 name="IUSBDeviceStateChangedEvent" extends="IEvent"
14622 uuid="806da61b-6679-422a-b629-51b06b0c6d93"
14623 wsmap="managed" autogen="VBoxEvent" id="OnUSBDeviceStateChanged"
14624 >
14625 <desc>
14626 Notification when a USB device is attached to or detached from
14627 the virtual USB controller.
14628
14629 This notification is sent as a result of the indirect
14630 request to attach the device because it matches one of the
14631 machine USB filters, or as a result of the direct request
14632 issued by <link to="IConsole::attachUSBDevice"/> or
14633 <link to="IConsole::detachUSBDevice"/>.
14634
14635 This notification is sent in case of both a succeeded and a
14636 failed request completion. When the request succeeds, the
14637 @a error parameter is @c null, and the given device has been
14638 already added to (when @a attached is @c true) or removed from
14639 (when @a attached is @c false) the collection represented by
14640 <link to="IConsole::USBDevices"/>. On failure, the collection
14641 doesn't change and the @a error parameter represents the error
14642 message describing the failure.
14643 </desc>
14644 <attribute name="device" type="IUSBDevice" readonly="yes">
14645 <desc>
14646 Device that is subject to state change.
14647 </desc>
14648 </attribute>
14649 <attribute name="attached" type="boolean" readonly="yes">
14650 <desc>
14651 @c true if the device was attached and @c false otherwise.
14652 </desc>
14653 </attribute>
14654 <attribute name="error" type="IVirtualBoxErrorInfo" readonly="yes">
14655 <desc>
14656 @c null on success or an error message object on failure.
14657 </desc>
14658 </attribute>
14659 </interface>
14660
14661 <interface
14662 name="ISharedFolderChangedEvent" extends="IEvent"
14663 uuid="B66349B5-3534-4239-B2DE-8E1535D94C0B"
14664 wsmap="managed" autogen="VBoxEvent" id="OnSharedFolderChanged"
14665 >
14666 <desc>
14667 Notification when a shared folder is added or removed.
14668 The @a scope argument defines one of three scopes:
14669 <link to="IVirtualBox::sharedFolders">global shared folders</link>
14670 (<link to="Scope_Global">Global</link>),
14671 <link to="IMachine::sharedFolders">permanent shared folders</link> of
14672 the machine (<link to="Scope_Machine">Machine</link>) or <link
14673 to="IConsole::sharedFolders">transient shared folders</link> of the
14674 machine (<link to="Scope_Session">Session</link>). Interested callees
14675 should use query the corresponding collections to find out what has
14676 changed.
14677 </desc>
14678 <attribute name="scope" type="Scope" readonly="yes">
14679 <desc>
14680 Scope of the notification.
14681 </desc>
14682 </attribute>
14683 </interface>
14684
14685 <interface
14686 name="IRuntimeErrorEvent" extends="IEvent"
14687 uuid="883DD18B-0721-4CDE-867C-1A82ABAF914C"
14688 wsmap="managed" autogen="VBoxEvent" id="OnRuntimeError"
14689 >
14690 <desc>
14691 Notification when an error happens during the virtual
14692 machine execution.
14693
14694 There are three kinds of runtime errors:
14695 <ul>
14696 <li><i>fatal</i></li>
14697 <li><i>non-fatal with retry</i></li>
14698 <li><i>non-fatal warnings</i></li>
14699 </ul>
14700
14701 <b>Fatal</b> errors are indicated by the @a fatal parameter set
14702 to @c true. In case of fatal errors, the virtual machine
14703 execution is always paused before calling this notification, and
14704 the notification handler is supposed either to immediately save
14705 the virtual machine state using <link to="IConsole::saveState"/>
14706 or power it off using <link to="IConsole::powerDown"/>.
14707 Resuming the execution can lead to unpredictable results.
14708
14709 <b>Non-fatal</b> errors and warnings are indicated by the
14710 @a fatal parameter set to @c false. If the virtual machine
14711 is in the Paused state by the time the error notification is
14712 received, it means that the user can <i>try to resume</i> the machine
14713 execution after attempting to solve the problem that caused the
14714 error. In this case, the notification handler is supposed
14715 to show an appropriate message to the user (depending on the
14716 value of the @a id parameter) that offers several actions such
14717 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
14718 wants to retry, the notification handler should continue
14719 the machine execution using the <link to="IConsole::resume"/>
14720 call. If the machine execution is not Paused during this
14721 notification, then it means this notification is a <i>warning</i>
14722 (for example, about a fatal condition that can happen very soon);
14723 no immediate action is required from the user, the machine
14724 continues its normal execution.
14725
14726 Note that in either case the notification handler
14727 <b>must not</b> perform any action directly on a thread
14728 where this notification is called. Everything it is allowed to
14729 do is to post a message to another thread that will then talk
14730 to the user and take the corresponding action.
14731
14732 Currently, the following error identifiers are known:
14733 <ul>
14734 <li><tt>"HostMemoryLow"</tt></li>
14735 <li><tt>"HostAudioNotResponding"</tt></li>
14736 <li><tt>"VDIStorageFull"</tt></li>
14737 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
14738 </ul>
14739 </desc>
14740 <attribute name="fatal" type="boolean" readonly="yes">
14741 <desc>
14742 Whether the error is fatal or not.
14743 </desc>
14744 </attribute>
14745 <attribute name="id" type="wstring" readonly="yes">
14746 <desc>
14747 Error identifier.
14748 </desc>
14749 </attribute>
14750 <attribute name="message" type="wstring" readonly="yes">
14751 <desc>
14752 Optional error message.
14753 </desc>
14754 </attribute>
14755 </interface>
14756
14757
14758 <interface
14759 name="IEventSourceChangedEvent" extends="IEvent"
14760 uuid="e7932cb8-f6d4-4ab6-9cbf-558eb8959a6a"
14761 waitable="yes"
14762 wsmap="managed" autogen="VBoxEvent" id="OnEventSourceChanged"
14763 >
14764 <desc>
14765 Notification when an event source state changes (listener added or removed).
14766 </desc>
14767
14768 <attribute name="listener" type="IEventListener" readonly="yes">
14769 <desc>
14770 Event listener which has changed.
14771 </desc>
14772 </attribute>
14773
14774 <attribute name="add" type="boolean" readonly="yes">
14775 <desc>
14776 Flag whether listener was added or removed.
14777 </desc>
14778 </attribute>
14779 </interface>
14780
14781 <interface
14782 name="IExtraDataChangedEvent" extends="IEvent"
14783 uuid="024F00CE-6E0B-492A-A8D0-968472A94DC7"
14784 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataChanged"
14785 >
14786 <desc>
14787 Notification when machine specific or global extra data
14788 has changed.
14789 </desc>
14790 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
14791 <desc>
14792 ID of the machine this event relates to.
14793 Null for global extra data changes.
14794 </desc>
14795 </attribute>
14796 <attribute name="key" type="wstring" readonly="yes">
14797 <desc>
14798 Extra data key that has changed.
14799 </desc>
14800 </attribute>
14801 <attribute name="value" type="wstring" readonly="yes">
14802 <desc>
14803 Extra data value for the given key.
14804 </desc>
14805 </attribute>
14806 </interface>
14807
14808 <interface
14809 name="IVetoEvent" extends="IEvent"
14810 uuid="9a1a4130-69fe-472f-ac10-c6fa25d75007"
14811 wsmap="managed"
14812 >
14813 <desc>Base abstract interface for veto events.</desc>
14814
14815 <method name="addVeto">
14816 <desc>
14817 Adds a veto on this event.
14818 </desc>
14819 <param name="reason" type="wstring" dir="in">
14820 <desc>
14821 Reason for veto, could be null or empty string.
14822 </desc>
14823 </param>
14824 </method>
14825
14826 <method name="isVetoed">
14827 <desc>
14828 If this event was vetoed.
14829 </desc>
14830 <param name="result" type="boolean" dir="return">
14831 <desc>
14832 Reason for veto.
14833 </desc>
14834 </param>
14835 </method>
14836
14837 <method name="getVetos">
14838 <desc>
14839 Current veto reason list, if size is 0 - no veto.
14840 </desc>
14841 <param name="result" type="wstring" dir="return" safearray="yes">
14842 <desc>
14843 Array of reasons for veto provided by different event handlers.
14844 </desc>
14845 </param>
14846 </method>
14847
14848 </interface>
14849
14850 <interface
14851 name="IExtraDataCanChangeEvent" extends="IVetoEvent"
14852 uuid="245d88bd-800a-40f8-87a6-170d02249a55"
14853 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataCanChange"
14854 waitable="true"
14855 >
14856 <desc>
14857 Notification when someone tries to change extra data for
14858 either the given machine or (if @c null) global extra data.
14859 This gives the chance to veto against changes.
14860 </desc>
14861 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
14862 <desc>
14863 ID of the machine this event relates to.
14864 Null for global extra data changes.
14865 </desc>
14866 </attribute>
14867 <attribute name="key" type="wstring" readonly="yes">
14868 <desc>
14869 Extra data key that has changed.
14870 </desc>
14871 </attribute>
14872 <attribute name="value" type="wstring" readonly="yes">
14873 <desc>
14874 Extra data value for the given key.
14875 </desc>
14876 </attribute>
14877 </interface>
14878
14879 <interface
14880 name="ICanShowWindowEvent" extends="IVetoEvent"
14881 uuid="adf292b0-92c9-4a77-9d35-e058b39fe0b9"
14882 wsmap="managed" autogen="VBoxEvent" id="OnCanShowWindow"
14883 waitable="true"
14884 >
14885 <desc>
14886 Notification when a call to
14887 <link to="IMachine::canShowConsoleWindow"/> is made by a
14888 front-end to check if a subsequent call to
14889 <link to="IMachine::showConsoleWindow"/> can succeed.
14890
14891 The callee should give an answer appropriate to the current
14892 machine state using event veto. This answer must
14893 remain valid at least until the next
14894 <link to="IConsole::state">machine state</link> change.
14895 </desc>
14896 </interface>
14897
14898 <interface
14899 name="IShowWindowEvent" extends="IEvent"
14900 uuid="B0A0904D-2F05-4D28-855F-488F96BAD2B2"
14901 wsmap="managed" autogen="VBoxEvent" id="OnShowWindow"
14902 waitable="true"
14903 >
14904 <desc>
14905 Notification when a call to
14906 <link to="IMachine::showConsoleWindow"/>
14907 requests the console window to be activated and brought to
14908 foreground on the desktop of the host PC.
14909
14910 This notification should cause the VM console process to
14911 perform the requested action as described above. If it is
14912 impossible to do it at a time of this notification, this
14913 method should return a failure.
14914
14915 Note that many modern window managers on many platforms
14916 implement some sort of focus stealing prevention logic, so
14917 that it may be impossible to activate a window without the
14918 help of the currently active application (which is supposedly
14919 an initiator of this notification). In this case, this method
14920 must return a non-zero identifier that represents the
14921 top-level window of the VM console process. The caller, if it
14922 represents a currently active process, is responsible to use
14923 this identifier (in a platform-dependent manner) to perform
14924 actual window activation.
14925
14926 This method must set @a winId to zero if it has performed all
14927 actions necessary to complete the request and the console
14928 window is now active and in foreground, to indicate that no
14929 further action is required on the caller's side.
14930 </desc>
14931 <attribute name="winId" type="unsigned long long">
14932 <desc>
14933 Platform-dependent identifier of the top-level VM console
14934 window, or zero if this method has performed all actions
14935 necessary to implement the <i>show window</i> semantics for
14936 the given platform and/or this VirtualBox front-end.
14937 </desc>
14938 </attribute>
14939 </interface>
14940
14941 <module name="VBoxSVC" context="LocalServer">
14942 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
14943 namespace="virtualbox.org">
14944 <interface name="IVirtualBox" default="yes"/>
14945 </class>
14946 </module>
14947
14948 <module name="VBoxC" context="InprocServer" threadingModel="Free">
14949 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
14950 namespace="virtualbox.org">
14951 <interface name="ISession" default="yes"/>
14952 </class>
14953
14954 <class name="Console" uuid="577230FF-164F-4CAC-8548-312D8275A4A7"
14955 namespace="virtualbox.org">
14956 <interface name="IConsole" default="yes"/>
14957 </class>
14958 </module>
14959
14960</library>
14961
14962</idl>
14963
14964<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
Note: See TracBrowser for help on using the repository browser.

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