VirtualBox

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

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

Main: convert MediumVariant uses into unsigned long for the 4.0 API to make them callable from web service clients (SOAP enums do not know numerical values behind enums)

  • Property svn:eol-style set to native
File size: 606.8 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 and the VBoxManage command-line interface) 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
388 name="SettingsVersion"
389 uuid="52bd6f5f-1adb-4493-975d-581a9c4b803f"
390 >
391 <desc>
392 Settings version of VirtualBox settings files. This is written to
393 the "version" attribute of the root "VirtualBox" element in the settings
394 file XML and indicates which VirtualBox version wrote the file.
395 </desc>
396
397 <const name="Null" value="0">
398 <desc>Null value, indicates invalid version.</desc>
399 </const>
400 <const name="v1_0" value="1">
401 <desc>Legacy settings version, not currently supported.</desc>
402 </const>
403 <const name="v1_1" value="2">
404 <desc>Legacy settings version, not currently supported.</desc>
405 </const>
406 <const name="v1_2" value="3">
407 <desc>Legacy settings version, not currently supported.</desc>
408 </const>
409 <const name="v1_3pre" value="4">
410 <desc>Legacy settings version, not currently supported.</desc>
411 </const>
412 <const name="v1_3" value="5">
413 <desc>Settings version "1.3", written by VirtualBox 2.0.12.</desc>
414 <!--
415 Machine XML: Capitalization of Uart, Lpt elements and many attributes changed.
416 -->
417 </const>
418 <const name="v1_4" value="6">
419 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
420 <!--
421 VirtualBox.xml: big DiskRegistry -> MediaRegistry revamp, various HardDisk types merged
422 (was VirtualDiskImage, VMDKImage, VHDImage, ISCSIHardDisk, CustomHardDisk, DiffHardDisk)
423 -->
424 </const>
425 <const name="v1_5" value="7">
426 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
427 <!--
428 2008-09-04: 2.0.0 released
429 2008-11-20: settings version 1.5 introduced
430 2008-12-17: 2.1.0 released
431 Machine changes:
432 guest OS identifiers changed;
433 Machine/Hardware/Display/MonitorCount renamed to monitorCount;
434 Machine/Hardware/Display/Accelerate3D renamed to accelerate3D;
435 Machine/Hardware/CPU/CPUCount/@count changed to CPU/@count
436 -->
437 </const>
438 <const name="v1_6" value="8">
439 <desc>Settings version "1.6", written by VirtualBox 2.1.4 (at least).</desc>
440 <!--
441 2008-12-17: 2.1.0 released
442 2008-12-19: settings version 1.6 introduced (is in 2.1 branch)
443 2009-04-08: 2.2.0 released
444 Machine changes: remove all Machine/Hardware/Network/Adapter/HostInterface[@TAPSetup or @TAPTerminate]/ attributes (done)
445 -->
446 </const>
447 <const name="v1_7" value="9">
448 <desc>Settings version "1.7", written by VirtualBox 2.2.x and 3.0.x.</desc>
449 <!--
450 2008-12-17: 2.1.0 released
451 2009-03-11: settings version 1.7 introduced (is in 2.2 branch)
452 2009-04-08: 2.2.0 released
453 VirtualBox.xml additions: NetserviceRegistry with DHCPServers (done)
454 Machine changes: HardDiskAttachments is now StorageControllers (done)
455 -->
456 </const>
457 <const name="v1_8" value="10">
458 <desc>Intermediate settings version "1.8", understood by VirtualBox 3.1.x.</desc>
459 <!--
460 Machine additions: Display/@accelerate2DVideo (done)
461 -->
462 </const>
463 <const name="v1_9" value="11">
464 <desc>Settings version "1.9", written by VirtualBox 3.1.x.</desc>
465 <!--
466 The big storage controller / DVD / Floppy rework (done)
467 -->
468 </const>
469 <const name="v1_10" value="12">
470 <desc>Settings version "1.10", written by VirtualBox 3.2.x.</desc>
471 <!--
472 Machine changes: RTC localOrUTC (done)
473 CPU hot-plug support
474 -->
475 </const>
476 <const name="v1_11" value="13">
477 <desc>Settings version "1.11", written by VirtualBox 4.0.x.</desc>
478 <!--
479 Machine changes: HD Audio controller, per-machine disk registries,
480 /@format attribute for DVD and floppy images.
481 -->
482 </const>
483 <const name="Future" value="99999">
484 <desc>Settings version greater than "1.11", written by a future VirtualBox version.</desc>
485 </const>
486 </enum>
487
488 <enum
489 name="AccessMode"
490 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
491 >
492 <desc>
493 Access mode for opening files.
494 </desc>
495
496 <const name="ReadOnly" value="1"/>
497 <const name="ReadWrite" value="2"/>
498 </enum>
499
500 <enum
501 name="MachineState"
502 uuid="ec6c6a9e-113d-4ff4-b44f-0b69f21c97fe"
503 >
504 <desc>
505 Virtual machine execution state.
506
507 This enumeration represents possible values of the <link
508 to="IMachine::state"/> attribute.
509
510 Below is the basic virtual machine state diagram. It shows how the state
511 changes during virtual machine execution. The text in square braces shows
512 a method of the IConsole interface that performs the given state
513 transition.
514
515 <pre>
516 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
517 V |
518 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
519 | | | | V |
520 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
521 | | ^ | ^ |
522 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
523 | ^ | | | |
524 | | +-----------------------------------------+-|-------------------+ +
525 | | | | |
526 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
527 | | | |
528 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
529 | | |
530 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
531 </pre>
532
533 Note that states to the right from PoweredOff, Aborted and Saved in the
534 above diagram are called <i>online VM states</i>. These states
535 represent the virtual machine which is being executed in a dedicated
536 process (usually with a GUI window attached to it where you can see the
537 activity of the virtual machine and interact with it). There are two
538 special pseudo-states, FirstOnline and LastOnline, that can be used in
539 relational expressions to detect if the given machine state is online or
540 not:
541
542 <pre>
543 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
544 machine.GetState() &lt;= MachineState_LastOnline)
545 {
546 ...the machine is being executed...
547 }
548 </pre>
549
550 When the virtual machine is in one of the online VM states (that is, being
551 executed), only a few machine settings can be modified. Methods working
552 with such settings contain an explicit note about that. An attempt to
553 change any oter setting or perform a modifying operation during this time
554 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
555
556 All online states except Running, Paused and Stuck are transitional: they
557 represent temporary conditions of the virtual machine that will last as
558 long as the operation that initiated such a condition.
559
560 The Stuck state is a special case. It means that execution of the machine
561 has reached the "Guru Meditation" condition. This condition indicates an
562 internal VMM (virtual machine manager) failure which may happen as a
563 result of either an unhandled low-level virtual hardware exception or one
564 of the recompiler exceptions (such as the <i>too-many-traps</i>
565 condition).
566
567 Note also that any online VM state may transit to the Aborted state. This
568 happens if the process that is executing the virtual machine terminates
569 unexpectedly (for example, crashes). Other than that, the Aborted state is
570 equivalent to PoweredOff.
571
572 There are also a few additional state diagrams that do not deal with
573 virtual machine execution and therefore are shown separately. The states
574 shown on these diagrams are called <i>offline VM states</i> (this includes
575 PoweredOff, Aborted and Saved too).
576
577 The first diagram shows what happens when a lengthy setup operation is
578 being executed (such as <link to="IMachine::attachDevice"/>).
579
580 <pre>
581 +----------------------------------(same state as before the call)------+
582 | |
583 +-&gt; PoweredOff --+ |
584 | | |
585 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
586 | |
587 +-&gt; Saved -------+
588 </pre>
589
590 The next two diagrams demonstrate the process of taking a snapshot of a
591 powered off virtual machine, restoring the state to that as of a snapshot
592 or deleting a snapshot, respectively.
593
594 <pre>
595 +----------------------------------(same state as before the call)------+
596 | |
597 +-&gt; PoweredOff --+ |
598 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
599 +-&gt; Aborted -----+
600
601 +-&gt; PoweredOff --+
602 | |
603 | Aborted -----+--&gt;[restoreSnapshot() ]-------&gt; RestoringSnapshot -+
604 | | [deleteSnapshot() ]-------&gt; DeletingSnapshot --+
605 +-&gt; Saved -------+ |
606 | |
607 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
608 </pre>
609
610 Note that the Saving state is present in both the offline state group and
611 online state group. Currently, the only way to determine what group is
612 assumed in a particular case is to remember the previous machine state: if
613 it was Running or Paused, then Saving is an online state, otherwise it is
614 an offline state. This inconsistency may be removed in one of the future
615 versions of VirtualBox by adding a new state.
616
617 <note internal="yes">
618 For whoever decides to touch this enum: In order to keep the
619 comparisons involving FirstOnline and LastOnline pseudo-states valid,
620 the numeric values of these states must be correspondingly updated if
621 needed: for any online VM state, the condition
622 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
623 @c true. The same relates to transient states for which
624 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
625 @c true.
626 </note>
627 </desc>
628
629 <const name="Null" value="0">
630 <desc>Null value (never used by the API).</desc>
631 </const>
632 <const name="PoweredOff" value="1">
633 <desc>
634 The machine is not running and has no saved execution state; it has
635 either never been started or been shut down successfully.
636 </desc>
637 </const>
638 <const name="Saved" value="2">
639 <desc>
640 The machine is not currently running, but the execution state of the machine
641 has been saved to an external file when it was running, from where
642 it can be resumed.
643 </desc>
644 </const>
645 <const name="Teleported" value="3">
646 <desc>
647 The machine was teleported to a different host (or process) and then
648 powered off. Take care when powering it on again may corrupt resources
649 it shares with the teleportation target (e.g. disk and network).
650 </desc>
651 </const>
652 <const name="Aborted" value="4">
653 <desc>
654 The process running the machine has terminated abnormally. This may
655 indicate a crash of the VM process in host execution context, or
656 the VM process has been terminated externally.
657 </desc>
658 </const>
659 <const name="Running" value="5">
660 <desc>
661 The machine is currently being executed.
662 <note internal="yes">
663 For whoever decides to touch this enum: In order to keep the
664 comparisons in the old source code valid, this state must immediately
665 precede the Paused state.
666 TODO: Lift this spectacularly wonderful restriction.
667 </note>
668 </desc>
669 </const>
670 <const name="Paused" value="6">
671 <desc>
672 Execution of the machine has been paused.
673 <note internal="yes">
674 For whoever decides to touch this enum: In order to keep the
675 comparisons in the old source code valid, this state must immediately
676 follow the Running state.
677 TODO: Lift this spectacularly wonderful restriction.
678 </note>
679 </desc>
680 </const>
681 <const name="Stuck" value="7">
682 <desc>
683 Execution of the machine has reached the "Guru Meditation"
684 condition. This indicates a severe error in the hypervisor itself.
685 <note internal="yes">
686 bird: Why this uncool name? Could we rename it to "GuruMeditation" or
687 "Guru", perhaps? Or are there some other VMM states that are
688 intended to be lumped in here as well?
689 </note>
690 </desc>
691 </const>
692 <const name="Teleporting" value="8">
693 <desc>
694 The machine is about to be teleported to a different host or process.
695 It is possible to pause a machine in this state, but it will go to the
696 @c TeleportingPausedVM state and it will not be
697 possible to resume it again unless the teleportation fails.
698 </desc>
699 </const>
700 <const name="LiveSnapshotting" value="9">
701 <desc>
702 A live snapshot is being taken. The machine is running normally, but
703 some of the runtime configuration options are inaccessible. Also, if
704 paused while in this state it will transition to
705 @c Saving and it will not be resume the
706 execution until the snapshot operation has completed.
707 </desc>
708 </const>
709 <const name="Starting" value="10">
710 <desc>
711 Machine is being started after powering it on from a
712 zero execution state.
713 </desc>
714 </const>
715 <const name="Stopping" value="11">
716 <desc>
717 Machine is being normally stopped powering it off, or after the guest OS
718 has initiated a shutdown sequence.
719 </desc>
720 </const>
721 <const name="Saving" value="12">
722 <desc>
723 Machine is saving its execution state to a file, or an online
724 snapshot of the machine is being taken.
725 </desc>
726 </const>
727 <const name="Restoring" value="13">
728 <desc>
729 Execution state of the machine is being restored from a file
730 after powering it on from the saved execution state.
731 </desc>
732 </const>
733 <const name="TeleportingPausedVM" value="14">
734 <desc>
735 The machine is being teleported to another host or process, but it is
736 not running. This is the paused variant of the
737 @c state.
738 </desc>
739 </const>
740 <const name="TeleportingIn" value="15">
741 <desc>
742 Teleporting the machine state in from another host or process.
743 </desc>
744 </const>
745 <const name="FaultTolerantSyncing" value="16">
746 <desc>
747 The machine is being synced with a fault tolerant VM running elsewhere.
748 </desc>
749 </const>
750 <const name="DeletingSnapshotOnline" value="17">
751 <desc>
752 Like @c DeletingSnapshot, but the merging of media is ongoing in
753 the background while the machine is running.
754 </desc>
755 </const>
756 <const name="DeletingSnapshotPaused" value="18">
757 <desc>
758 Like @c DeletingSnapshotOnline, but the machine was paused when the
759 merging of differencing media was started.
760 </desc>
761 </const>
762 <const name="RestoringSnapshot" value="19">
763 <desc>
764 A machine snapshot is being restored; this typically does not take long.
765 </desc>
766 </const>
767 <const name="DeletingSnapshot" value="20">
768 <desc>
769 A machine snapshot is being deleted; this can take a long time since this
770 may require merging differencing media. This value indicates that the
771 machine is not running while the snapshot is being deleted.
772 </desc>
773 </const>
774 <const name="SettingUp" value="21">
775 <desc>
776 Lengthy setup operation is in progress.
777 </desc>
778 </const>
779
780 <const name="FirstOnline" value="5" wsmap="suppress"> <!-- Running -->
781 <desc>
782 Pseudo-state: first online state (for use in relational expressions).
783 </desc>
784 </const>
785 <const name="LastOnline" value="18" wsmap="suppress"> <!-- DeletingSnapshotPaused -->
786 <desc>
787 Pseudo-state: last online state (for use in relational expressions).
788 </desc>
789 </const>
790
791 <const name="FirstTransient" value="8" wsmap="suppress"> <!-- Teleporting -->
792 <desc>
793 Pseudo-state: first transient state (for use in relational expressions).
794 </desc>
795 </const>
796 <const name="LastTransient" value="21" wsmap="suppress"> <!-- SettingUp -->
797 <desc>
798 Pseudo-state: last transient state (for use in relational expressions).
799 </desc>
800 </const>
801
802 </enum>
803
804 <enum
805 name="SessionState"
806 uuid="cf2700c0-ea4b-47ae-9725-7810114b94d8"
807 >
808 <desc>
809 Session state. This enumeration represents possible values of
810 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
811 attributes.
812 </desc>
813
814 <const name="Null" value="0">
815 <desc>Null value (never used by the API).</desc>
816 </const>
817 <const name="Unlocked" value="1">
818 <desc>
819 In <link to="IMachine::sessionState"/>, this means that the machine
820 is not locked for any sessions.
821
822 In <link to="ISession::state"/>, this means that no machine is
823 currently locked for this session.
824 </desc>
825 </const>
826 <const name="Locked" value="2">
827 <desc>
828 In <link to="IMachine::sessionState"/>, this means that the machine
829 is currently locked for a session, whose process identifier can
830 then be found in the <link to="IMachine::sessionPid" /> attribute.
831
832 In <link to="ISession::state"/>, this means that a machine is
833 currently locked for this session, and the mutable machine object
834 can be found in the <link to="ISession::machine"/> attribute
835 (see <link to="IMachine::lockMachine" /> for details).
836 </desc>
837 </const>
838 <const name="Spawning" value="3">
839 <desc>
840 A new process is being spawned for the machine as a result of
841 <link to="IMachine::launchVMProcess"/> call. This state also occurs
842 as a short transient state during an <link to="IMachine::lockMachine"/>
843 call.
844 </desc>
845 </const>
846 <const name="Unlocking" value="4">
847 <desc>
848 The session is being unlocked.
849 </desc>
850 </const>
851 </enum>
852
853 <enum
854 name="CPUPropertyType"
855 uuid="24d356a6-2f45-4abd-b977-1cbe9c4701f5"
856 >
857 <desc>
858 Virtual CPU property type. This enumeration represents possible values of the
859 IMachine get- and setCPUProperty methods.
860 </desc>
861 <const name="Null" value="0">
862 <desc>Null value (never used by the API).</desc>
863 </const>
864 <const name="PAE" value="1">
865 <desc>
866 This setting determines whether VirtualBox will expose the Physical Address
867 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
868 is not available, it will not be reported.
869 </desc>
870 </const>
871 <const name="Synthetic" value="2">
872 <desc>
873 This setting determines whether VirtualBox will expose a synthetic CPU to the guest to allow
874 teleporting between host systems that differ significantly.
875 </desc>
876 </const>
877 </enum>
878
879
880 <enum
881 name="HWVirtExPropertyType"
882 uuid="ce81dfdd-d2b8-4a90-bbea-40ee8b7ffcee"
883 >
884 <desc>
885 Hardware virtualization property type. This enumeration represents possible values
886 for the <link to="IMachine::getHWVirtExProperty"/> and
887 <link to="IMachine::setHWVirtExProperty"/> methods.
888 </desc>
889 <const name="Null" value="0">
890 <desc>Null value (never used by the API).</desc>
891 </const>
892 <const name="Enabled" value="1">
893 <desc>
894 Whether hardware virtualization (VT-x/AMD-V) is enabled at all. If
895 such extensions are not available, they will not be used.
896 </desc>
897 </const>
898 <const name="Exclusive" value="2">
899 <desc>
900 Whether hardware virtualization is used exclusively by VirtualBox. When enabled,
901 VirtualBox assumes it can acquire full and exclusive access to the VT-x or AMD-V
902 feature of the host. To share these with other hypervisors, you must disable this property.
903 </desc>
904 </const>
905 <const name="VPID" value="3">
906 <desc>
907 Whether VT-x VPID is enabled. If this extension is not available, it will not be used.
908 </desc>
909 </const>
910 <const name="NestedPaging" value="4">
911 <desc>
912 Whether Nested Paging is enabled. If this extension is not available, it will not be used.
913 </desc>
914 </const>
915 <const name="LargePages" value="5">
916 <desc>
917 Whether large page allocation is enabled; requires nested paging and a 64 bits host.
918 </desc>
919 </const>
920 <const name="Force" value="6">
921 <desc>
922 Whether the VM should fail to start if hardware virtualization (VT-x/AMD-V) cannot be used. If
923 not set, there will be an automatic fallback to software virtualization.
924 </desc>
925 </const>
926 </enum>
927
928 <enum
929 name="FaultToleranceState"
930 uuid="5124f7ec-6b67-493c-9dee-ee45a44114e1"
931 >
932 <desc>
933 Used with <link to="IMachine::faultToleranceState" />.
934 </desc>
935 <const name="Inactive" value="1">
936 <desc>No fault tolerance enabled.</desc>
937 </const>
938 <const name="Master" value="2">
939 <desc>Fault tolerant master VM.</desc>
940 </const>
941 <const name="Standby" value="3">
942 <desc>Fault tolerant standby VM.</desc>
943 </const>
944 </enum>
945
946 <enum
947 name="LockType"
948 uuid="138b53f8-db4b-47c5-b32b-4ef52f769413"
949 >
950 <desc>
951 Used with <link to="IMachine::lockMachine" />.
952 </desc>
953 <const name="Write" value="2">
954 <desc>Lock the machine for writing.</desc>
955 </const>
956 <const name="Shared" value="1">
957 <desc>Request only a shared read lock for remote-controlling the machine.</desc>
958 </const>
959 </enum>
960
961 <enum
962 name="SessionType"
963 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
964 >
965 <desc>
966 Session type. This enumeration represents possible values of the
967 <link to="ISession::type"/> attribute.
968 </desc>
969
970 <const name="Null" value="0">
971 <desc>Null value (never used by the API).</desc>
972 </const>
973 <const name="WriteLock" value="1">
974 <desc>
975 Session has acquired an exclusive write lock on a machine
976 using <link to="IMachine::lockMachine"/>.
977 </desc>
978 </const>
979 <const name="Remote" value="2">
980 <desc>
981 Session has launched a VM process using
982 <link to="IMachine::launchVMProcess"/>
983 </desc>
984 </const>
985 <const name="Shared" value="3">
986 <desc>
987 Session has obtained a link to another session using
988 <link to="IMachine::lockMachine"/>
989 </desc>
990 </const>
991 </enum>
992
993 <enum
994 name="DeviceType"
995 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
996 >
997 <desc>
998 Device type.
999 </desc>
1000 <const name="Null" value="0">
1001 <desc>
1002 Null value, may also mean "no device" (not allowed for
1003 <link to="IConsole::getDeviceActivity"/>).
1004 </desc>
1005 </const>
1006 <const name="Floppy" value="1">
1007 <desc>Floppy device.</desc>
1008 </const>
1009 <const name="DVD" value="2">
1010 <desc>CD/DVD-ROM device.</desc>
1011 </const>
1012 <const name="HardDisk" value="3">
1013 <desc>Hard disk device.</desc>
1014 </const>
1015 <const name="Network" value="4">
1016 <desc>Network device.</desc>
1017 </const>
1018 <const name="USB" value="5">
1019 <desc>USB device.</desc>
1020 </const>
1021 <const name="SharedFolder" value="6">
1022 <desc>Shared folder device.</desc>
1023 </const>
1024 </enum>
1025
1026 <enum
1027 name="DeviceActivity"
1028 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
1029 >
1030 <desc>
1031 Device activity for <link to="IConsole::getDeviceActivity"/>.
1032 </desc>
1033
1034 <const name="Null" value="0"/>
1035 <const name="Idle" value="1"/>
1036 <const name="Reading" value="2"/>
1037 <const name="Writing" value="3"/>
1038 </enum>
1039
1040 <enum
1041 name="ClipboardMode"
1042 uuid="33364716-4008-4701-8f14-be0fa3d62950"
1043 >
1044 <desc>
1045 Host-Guest clipboard interchange mode.
1046 </desc>
1047
1048 <const name="Disabled" value="0"/>
1049 <const name="HostToGuest" value="1"/>
1050 <const name="GuestToHost" value="2"/>
1051 <const name="Bidirectional" value="3"/>
1052 </enum>
1053
1054 <enum
1055 name="Scope"
1056 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
1057 >
1058 <desc>
1059 Scope of the operation.
1060
1061 A generic enumeration used in various methods to define the action or
1062 argument scope.
1063 </desc>
1064
1065 <const name="Global" value="0"/>
1066 <const name="Machine" value="1"/>
1067 <const name="Session" value="2"/>
1068 </enum>
1069
1070 <enum
1071 name="BIOSBootMenuMode"
1072 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
1073 >
1074 <desc>
1075 BIOS boot menu mode.
1076 </desc>
1077
1078 <const name="Disabled" value="0"/>
1079 <const name="MenuOnly" value="1"/>
1080 <const name="MessageAndMenu" value="2"/>
1081 </enum>
1082
1083 <enum
1084 name="ProcessorFeature"
1085 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
1086 >
1087 <desc>
1088 CPU features.
1089 </desc>
1090
1091 <const name="HWVirtEx" value="0"/>
1092 <const name="PAE" value="1"/>
1093 <const name="LongMode" value="2"/>
1094 <const name="NestedPaging" value="3"/>
1095 </enum>
1096
1097 <enum
1098 name="FirmwareType"
1099 uuid="b903f264-c230-483e-ac74-2b37ce60d371"
1100 >
1101 <desc>
1102 Firmware type.
1103 </desc>
1104 <const name="BIOS" value="1">
1105 <desc>BIOS Firmware.</desc>
1106 </const>
1107 <const name="EFI" value="2">
1108 <desc>EFI Firmware, bitness detected basing on OS type.</desc>
1109 </const>
1110 <const name="EFI32" value="3">
1111 <desc>Efi firmware, 32-bit.</desc>
1112 </const>
1113 <const name="EFI64" value="4">
1114 <desc>Efi firmware, 64-bit.</desc>
1115 </const>
1116 <const name="EFIDUAL" value="5">
1117 <desc>Efi firmware, combined 32 and 64-bit.</desc>
1118 </const>
1119 </enum>
1120
1121 <enum
1122 name="PointingHidType"
1123 uuid="0d3c17a2-821a-4b2e-ae41-890c6c60aa97"
1124 >
1125 <desc>
1126 Type of pointing device used in a virtual machine.
1127 </desc>
1128 <const name="None" value="1">
1129 <desc>No mouse.</desc>
1130 </const>
1131 <const name="PS2Mouse" value="2">
1132 <desc>PS/2 auxiliary device, a.k.a. mouse.</desc>
1133 </const>
1134 <const name="USBMouse" value="3">
1135 <desc>USB mouse (relative pointer).</desc>
1136 </const>
1137 <const name="USBTablet" value="4">
1138 <desc>USB tablet (absolute pointer).</desc>
1139 </const>
1140 <const name="ComboMouse" value="5">
1141 <desc>Combined device, working as PS/2 or USB mouse, depending on guest behavior.
1142 Using of such device can have negative performance implications. </desc>
1143 </const>
1144 </enum>
1145
1146 <enum
1147 name="KeyboardHidType"
1148 uuid="5a5b0996-3a3e-44bb-9019-56979812cbcc"
1149 >
1150 <desc>
1151 Type of keyboard device used in a virtual machine.
1152 </desc>
1153 <const name="None" value="1">
1154 <desc>No keyboard.</desc>
1155 </const>
1156 <const name="PS2Keyboard" value="2">
1157 <desc>PS/2 keyboard.</desc>
1158 </const>
1159 <const name="USBKeyboard" value="3">
1160 <desc>USB keyboard.</desc>
1161 </const>
1162 <const name="ComboKeyboard" value="4">
1163 <desc>Combined device, working as PS/2 or USB keyboard, depending on guest behavior.
1164 Using of such device can have negative performance implications. </desc>
1165 </const>
1166 </enum>
1167
1168 <!--
1169 // IVirtualBoxErrorInfo
1170 /////////////////////////////////////////////////////////////////////////
1171 -->
1172
1173 <interface
1174 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1175 uuid="e053d3c0-f493-491b-a735-3a9f0b1feed4"
1176 supportsErrorInfo="no"
1177 wsmap="managed"
1178 >
1179 <desc>
1180 The IVirtualBoxErrorInfo interface represents extended error information.
1181
1182 Extended error information can be set by VirtualBox components after
1183 unsuccessful or partially successful method invocation. This information
1184 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1185 and then shown to the client in addition to the plain 32-bit result code.
1186
1187 In MS COM, this interface extends the IErrorInfo interface,
1188 in XPCOM, it extends the nsIException interface. In both cases,
1189 it provides a set of common attributes to retrieve error
1190 information.
1191
1192 Sometimes invocation of some component's method may involve methods of
1193 other components that may also fail (independently of this method's
1194 failure), or a series of non-fatal errors may precede a fatal error that
1195 causes method failure. In cases like that, it may be desirable to preserve
1196 information about all errors happened during method invocation and deliver
1197 it to the caller. The <link to="#next"/> attribute is intended
1198 specifically for this purpose and allows to represent a chain of errors
1199 through a single IVirtualBoxErrorInfo object set after method invocation.
1200
1201 Note that errors are stored to a chain in the reverse order, i.e. the
1202 initial error object you query right after method invocation is the last
1203 error set by the callee, the object it points to in the @a next attribute
1204 is the previous error and so on, up to the first error (which is the last
1205 in the chain).
1206 </desc>
1207
1208 <attribute name="resultCode" type="long" readonly="yes">
1209 <desc>
1210 Result code of the error.
1211 Usually, it will be the same as the result code returned
1212 by the method that provided this error information, but not
1213 always. For example, on Win32, CoCreateInstance() will most
1214 likely return E_NOINTERFACE upon unsuccessful component
1215 instantiation attempt, but not the value the component factory
1216 returned. Value is typed 'long', not 'result',
1217 to make interface usable from scripting languages.
1218 <note>
1219 In MS COM, there is no equivalent.
1220 In XPCOM, it is the same as nsIException::result.
1221 </note>
1222 </desc>
1223 </attribute>
1224
1225 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1226 <desc>
1227 UUID of the interface that defined the error.
1228 <note>
1229 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1230 data type.
1231 In XPCOM, there is no equivalent.
1232 </note>
1233 </desc>
1234 </attribute>
1235
1236 <attribute name="component" type="wstring" readonly="yes">
1237 <desc>
1238 Name of the component that generated the error.
1239 <note>
1240 In MS COM, it is the same as IErrorInfo::GetSource.
1241 In XPCOM, there is no equivalent.
1242 </note>
1243 </desc>
1244 </attribute>
1245
1246 <attribute name="text" type="wstring" readonly="yes">
1247 <desc>
1248 Text description of the error.
1249 <note>
1250 In MS COM, it is the same as IErrorInfo::GetDescription.
1251 In XPCOM, it is the same as nsIException::message.
1252 </note>
1253 </desc>
1254 </attribute>
1255
1256 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1257 <desc>
1258 Next error object if there is any, or @c null otherwise.
1259 <note>
1260 In MS COM, there is no equivalent.
1261 In XPCOM, it is the same as nsIException::inner.
1262 </note>
1263 </desc>
1264 </attribute>
1265
1266 </interface>
1267
1268 <!--
1269 // IVirtualBox
1270 /////////////////////////////////////////////////////////////////////////
1271 -->
1272
1273 <interface
1274 name="IDHCPServer" extends="$unknown"
1275 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1276 wsmap="managed"
1277 >
1278 <desc>
1279 The IDHCPServer interface represents the vbox dhcp server configuration.
1280
1281 To enumerate all the dhcp servers on the host, use the
1282 <link to="IVirtualBox::DHCPServers"/> attribute.
1283 </desc>
1284
1285 <attribute name="enabled" type="boolean">
1286 <desc>
1287 specifies if the dhcp server is enabled
1288 </desc>
1289 </attribute>
1290
1291 <attribute name="IPAddress" type="wstring" readonly="yes">
1292 <desc>
1293 specifies server IP
1294 </desc>
1295 </attribute>
1296
1297 <attribute name="networkMask" type="wstring" readonly="yes">
1298 <desc>
1299 specifies server network mask
1300 </desc>
1301 </attribute>
1302
1303 <attribute name="networkName" type="wstring" readonly="yes">
1304 <desc>
1305 specifies internal network name the server is used for
1306 </desc>
1307 </attribute>
1308
1309 <attribute name="lowerIP" type="wstring" readonly="yes">
1310 <desc>
1311 specifies from IP address in server address range
1312 </desc>
1313 </attribute>
1314
1315 <attribute name="upperIP" type="wstring" readonly="yes">
1316 <desc>
1317 specifies to IP address in server address range
1318 </desc>
1319 </attribute>
1320
1321 <method name="setConfiguration">
1322 <desc>
1323 configures the server
1324 <result name="E_INVALIDARG">
1325 invalid configuration supplied
1326 </result>
1327 </desc>
1328 <param name="IPAddress" type="wstring" dir="in">
1329 <desc>
1330 server IP address
1331 </desc>
1332 </param>
1333 <param name="networkMask" type="wstring" dir="in">
1334 <desc>
1335 server network mask
1336 </desc>
1337 </param>
1338 <param name="FromIPAddress" type="wstring" dir="in">
1339 <desc>
1340 server From IP address for address range
1341 </desc>
1342 </param>
1343 <param name="ToIPAddress" type="wstring" dir="in">
1344 <desc>
1345 server To IP address for address range
1346 </desc>
1347 </param>
1348 </method>
1349
1350 <method name="start">
1351 <desc>
1352 Starts DHCP server process.
1353 <result name="E_FAIL">
1354 Failed to start the process.
1355 </result>
1356 </desc>
1357 <param name="networkName" type="wstring" dir="in">
1358 <desc>
1359 Name of internal network DHCP server should attach to.
1360 </desc>
1361 </param>
1362 <param name="trunkName" type="wstring" dir="in">
1363 <desc>
1364 Name of internal network trunk.
1365 </desc>
1366 </param>
1367 <param name="trunkType" type="wstring" dir="in">
1368 <desc>
1369 Type of internal network trunk.
1370 </desc>
1371 </param>
1372 </method>
1373
1374 <method name="stop">
1375 <desc>
1376 Stops DHCP server process.
1377 <result name="E_FAIL">
1378 Failed to stop the process.
1379 </result>
1380 </desc>
1381 </method>
1382 </interface>
1383
1384 <interface
1385 name="IVirtualBox" extends="$unknown"
1386 uuid="d2de270c-1d4b-4c9e-843f-bbb9b47269ff"
1387 wsmap="managed"
1388 >
1389 <desc>
1390 The IVirtualBox interface represents the main interface exposed by the
1391 product that provides virtual machine management.
1392
1393 An instance of IVirtualBox is required for the product to do anything
1394 useful. Even though the interface does not expose this, internally,
1395 IVirtualBox is implemented as a singleton and actually lives in the
1396 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1397 IVirtualBox can track the state of all virtual machines on a particular
1398 host, regardless of which frontend started them.
1399
1400 To enumerate all the virtual machines on the host, use the
1401 <link to="IVirtualBox::machines"/> attribute.
1402 </desc>
1403
1404 <attribute name="version" type="wstring" readonly="yes">
1405 <desc>
1406 A string representing the version number of the product. The
1407 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1408 last number represents the build number and will frequently change.
1409 </desc>
1410 </attribute>
1411
1412 <attribute name="revision" type="unsigned long" readonly="yes">
1413 <desc>
1414 The internal build revision number of the product.
1415 </desc>
1416 </attribute>
1417
1418 <attribute name="packageType" type="wstring" readonly="yes">
1419 <desc>
1420 A string representing the package type of this product. The
1421 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1422 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1423 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1424 this.
1425 </desc>
1426 </attribute>
1427
1428 <attribute name="homeFolder" type="wstring" readonly="yes">
1429 <desc>
1430 Full path to the directory where the global settings file,
1431 <tt>VirtualBox.xml</tt>, is stored.
1432
1433 In this version of VirtualBox, the value of this property is
1434 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1435 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1436 as determined by the host OS), and cannot be changed.
1437
1438 This path is also used as the base to resolve relative paths in
1439 places where relative paths are allowed (unless otherwise
1440 expressly indicated).
1441 </desc>
1442 </attribute>
1443
1444 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1445 <desc>
1446 Full name of the global settings file.
1447 The value of this property corresponds to the value of
1448 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1449 </desc>
1450 </attribute>
1451
1452 <attribute name="host" type="IHost" readonly="yes">
1453 <desc>Associated host object.</desc>
1454 </attribute>
1455
1456 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1457 <desc>Associated system information object.</desc>
1458 </attribute>
1459
1460 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1461 <desc>
1462 Array of machine objects registered within this VirtualBox instance.
1463 </desc>
1464 </attribute>
1465
1466 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1467 <desc>
1468 Array of medium objects known to this VirtualBox installation.
1469
1470 This array contains only base media. All differencing
1471 media of the given base medium can be enumerated using
1472 <link to="IMedium::children"/>.
1473 </desc>
1474 </attribute>
1475
1476 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1477 <desc>
1478 Array of CD/DVD image objects currently in use by this VirtualBox instance.
1479 </desc>
1480 </attribute>
1481
1482 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1483 <desc>
1484 Array of floppy image objects currently in use by this VirtualBox instance.
1485 </desc>
1486 </attribute>
1487
1488 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1489
1490 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1491
1492 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1493 <desc>
1494 Collection of global shared folders. Global shared folders are
1495 available to all virtual machines.
1496
1497 New shared folders are added to the collection using
1498 <link to="#createSharedFolder"/>. Existing shared folders can be
1499 removed using <link to="#removeSharedFolder"/>.
1500
1501 <note>
1502 In the current version of the product, global shared folders are not
1503 implemented and therefore this collection is always empty.
1504 </note>
1505 </desc>
1506 </attribute>
1507
1508 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1509 <desc>
1510 Associated performance collector object.
1511 </desc>
1512 </attribute>
1513
1514 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1515 <desc>
1516 DHCP servers.
1517 </desc>
1518 </attribute>
1519
1520 <attribute name="eventSource" type="IEventSource" readonly="yes">
1521 <desc>
1522 Event source for VirtualBox events.
1523 </desc>
1524 </attribute>
1525
1526 <attribute name="extensionPackManager" type="IExtPackManager" readonly="yes">
1527 <desc>
1528 The extension pack manager.
1529 </desc>
1530 </attribute>
1531
1532
1533 <method name="composeMachineFilename">
1534 <desc>
1535 Returns a recommended full path of the settings file name for a new virtual
1536 machine.
1537
1538 This API serves two purposes:
1539
1540 <ul>
1541 <li>It gets called by <link to="#createMachine" /> if NULL is specified
1542 for the @a settingsFile argument there, which means that API should use
1543 a recommended default file name.</li>
1544
1545 <li>It can be called manually by a client software before creating a machine,
1546 e.g. if that client wants to pre-create the machine directory to create
1547 virtual hard disks in that directory together with the new machine
1548 settings file. In that case, the file name should be stripped from the
1549 full settings file path returned by this function to obtain the
1550 machine directory.</li>
1551 </ul>
1552
1553 See <link to="IMachine::name"/> and <link to="#createMachine"/> for more
1554 details about the machine name.
1555
1556 If @a baseFolder is a @c null or empty string (which is recommended), the
1557 default machine settings folder
1558 (see <link to="ISystemProperties::defaultMachineFolder" />) will be used as
1559 a base folder for the created machine, resulting in a file name like
1560 "/home/user/VirtualBox VMs/name/name.vbox". Otherwise the given base folder
1561 will be used.
1562
1563 This method does not access the host disks. In particular, it does not check
1564 for whether a machine of this name already exists.
1565 </desc>
1566 <param name="name" type="wstring" dir="in">
1567 <desc>Suggested machine name.</desc>
1568 </param>
1569 <param name="baseFolder" type="wstring" dir="in">
1570 <desc>Base machine folder (optional).</desc>
1571 </param>
1572 <param name="file" type="wstring" dir="return">
1573 <desc>Fully qualified path where the machine would be created.</desc>
1574 </param>
1575 </method>
1576
1577 <method name="createMachine">
1578 <desc>
1579 Creates a new virtual machine by creating a machine settings file at
1580 the given location.
1581
1582 VirtualBox machine settings files use a custom XML dialect. Starting
1583 with VirtualBox 4.0, a ".vbox" extension is recommended, but not enforced,
1584 and machine files can be created at arbitrary locations.
1585
1586 However, it is is recommended that machines be created in the default
1587 machine folder (e.g. "/home/user/VirtualBox VMs/name/name.vbox"; see
1588 <link to="ISystemProperties::defaultMachineFolder" />). If you specify
1589 NULL for the @a settingsFile argument, <link to="#composeMachineFilename" />
1590 is called automatically to have such a recommended name composed based
1591 on the machine name given in the @a name argument.
1592
1593 If the resulting settings file already exists, this method will fail,
1594 unless @a forceOverwrite is set.
1595
1596 The new machine is created unregistered, with the initial configuration
1597 set according to the specified guest OS type. A typical sequence of
1598 actions to create a new virtual machine is as follows:
1599
1600 <ol>
1601 <li>
1602 Call this method to have a new machine created. The returned machine
1603 object will be "mutable" allowing to change any machine property.
1604 </li>
1605
1606 <li>
1607 Configure the machine using the appropriate attributes and methods.
1608 </li>
1609
1610 <li>
1611 Call <link to="IMachine::saveSettings" /> to write the settings
1612 to the machine's XML settings file. The configuration of the newly
1613 created machine will not be saved to disk until this method is
1614 called.
1615 </li>
1616
1617 <li>
1618 Call <link to="#registerMachine" /> to add the machine to the list
1619 of machines known to VirtualBox.
1620 </li>
1621 </ol>
1622
1623 The specified guest OS type identifier must match an ID of one of known
1624 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1625 array.
1626
1627 Optionally, you may specify an UUID of to assign to the created machine.
1628 However, this is not recommended and you should normally pass an empty
1629 (@c null) UUID to this method so that a new UUID will be automatically
1630 generated for every created machine. You can use UUID
1631 00000000-0000-0000-0000-000000000000 as @c null value.
1632
1633 <note>
1634 There is no way to change the name of the settings file or
1635 subfolder of the created machine directly.
1636 </note>
1637
1638 <result name="VBOX_E_OBJECT_NOT_FOUND">
1639 @a osTypeId is invalid.
1640 </result>
1641 <result name="VBOX_E_FILE_ERROR">
1642 Resulting settings file name is invalid or the settings file already
1643 exists or could not be created due to an I/O error.
1644 </result>
1645 <result name="E_INVALIDARG">
1646 @a name is empty or @c null.
1647 </result>
1648 </desc>
1649
1650 <param name="settingsFile" type="wstring" dir="in">
1651 <desc>Fully qualified path where the settings file should be created,
1652 or NULL for a default folder and file based on the @a name argument
1653 (see <link to="#composeMachineFilename" />).</desc>
1654 </param>
1655 <param name="name" type="wstring" dir="in">
1656 <desc>Machine name.</desc>
1657 </param>
1658 <param name="osTypeId" type="wstring" dir="in">
1659 <desc>Guest OS Type ID.</desc>
1660 </param>
1661 <param name="id" type="uuid" mod="string" dir="in">
1662 <desc>Machine UUID (optional).</desc>
1663 </param>
1664 <param name="forceOverwrite" type="boolean" dir="in">
1665 <desc>If true, an existing machine settings file will be overwritten.</desc>
1666 </param>
1667 <param name="machine" type="IMachine" dir="return">
1668 <desc>Created machine object.</desc>
1669 </param>
1670 </method>
1671
1672 <method name="openMachine">
1673 <desc>
1674 Opens a virtual machine from the existing settings file.
1675 The opened machine remains unregistered until you call
1676 <link to="#registerMachine"/>.
1677
1678 The specified settings file name must be fully qualified.
1679 The file must exist and be a valid machine XML settings file
1680 whose contents will be used to construct the machine object.
1681
1682 <result name="VBOX_E_FILE_ERROR">
1683 Settings file name invalid, not found or sharing violation.
1684 </result>
1685 </desc>
1686 <param name="settingsFile" type="wstring" dir="in">
1687 <desc>
1688 Name of the machine settings file.
1689 </desc>
1690 </param>
1691 <param name="machine" type="IMachine" dir="return">
1692 <desc>Opened machine object.</desc>
1693 </param>
1694 <note>
1695 <link to="IMachine::settingsModified"/> will return
1696 @c false for the created machine, until any of machine settings
1697 are changed.
1698 </note>
1699 </method>
1700
1701 <method name="registerMachine">
1702 <desc>
1703
1704 Registers the machine previously created using
1705 <link to="#createMachine"/> or opened using
1706 <link to="#openMachine"/> within this VirtualBox installation. After
1707 successful method invocation, the
1708 <link to="IMachineRegisteredEvent"/> event is fired.
1709
1710 <note>
1711 This method implicitly calls <link to="IMachine::saveSettings"/>
1712 to save all current machine settings before registering it.
1713 </note>
1714
1715 <result name="VBOX_E_OBJECT_NOT_FOUND">
1716 No matching virtual machine found.
1717 </result>
1718 <result name="VBOX_E_INVALID_OBJECT_STATE">
1719 Virtual machine was not created within this VirtualBox instance.
1720 </result>
1721
1722 </desc>
1723 <param name="machine" type="IMachine" dir="in"/>
1724 </method>
1725
1726 <method name="findMachine">
1727 <desc>
1728 Attempts to find a virtual machine given its name or UUID.
1729
1730 <note>Inaccessible machines cannot be found by name, only by UUID, because their name
1731 cannot safely be determined.</note>
1732
1733 <result name="VBOX_E_OBJECT_NOT_FOUND">
1734 Could not find registered machine matching @a nameOrId.
1735 </result>
1736
1737 </desc>
1738 <param name="nameOrId" type="wstring" dir="in">
1739 <desc>What to search for. This can either be the UUID or the name of a virtual machine.</desc>
1740 </param>
1741 <param name="machine" type="IMachine" dir="return">
1742 <desc>Machine object, if found.</desc>
1743 </param>
1744 </method>
1745
1746 <method name="createAppliance">
1747 <desc>
1748 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1749 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1750 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1751 </desc>
1752 <param name="appliance" type="IAppliance" dir="return">
1753 <desc>New appliance.</desc>
1754 </param>
1755 </method>
1756
1757 <method name="createHardDisk">
1758 <desc>
1759 Creates a new base medium object that will use the given storage
1760 format and location for medium data.
1761
1762 Note that the actual storage unit is not created by this method. In
1763 order to do it, and before you are able to attach the created medium
1764 to virtual machines, you must call one of the following methods to
1765 allocate a format-specific storage unit at the specified location:
1766 <ul>
1767 <li><link to="IMedium::createBaseStorage"/></li>
1768 <li><link to="IMedium::createDiffStorage"/></li>
1769 </ul>
1770
1771 Some medium attributes, such as <link to="IMedium::id"/>, may
1772 remain uninitialized until the medium storage unit is successfully
1773 created by one of the above methods.
1774
1775 After the storage unit is successfully created, it will be
1776 accessible through the <link to="#findMedium"/> method and can
1777 be found in the <link to="#hardDisks"/> array.
1778
1779 The list of all storage formats supported by this VirtualBox
1780 installation can be obtained using
1781 <link to="ISystemProperties::mediumFormats"/>. If the @a format
1782 attribute is empty or @c null then the default storage format
1783 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1784 be used for creating a storage unit of the medium.
1785
1786 Note that the format of the location string is storage format specific.
1787 See <link to="IMedium::location"/> and IMedium for more details.
1788
1789 <result name="VBOX_E_OBJECT_NOT_FOUND">
1790 @a format identifier is invalid. See
1791 <link to="ISystemProperties::mediumFormats"/>.
1792 </result>
1793 <result name="VBOX_E_FILE_ERROR">
1794 @a location is a not valid file name (for file-based formats only).
1795 </result>
1796 </desc>
1797 <param name="format" type="wstring" dir="in">
1798 <desc>
1799 Identifier of the storage format to use for the new medium.
1800 </desc>
1801 </param>
1802 <param name="location" type="wstring" dir="in">
1803 <desc>
1804 Location of the storage unit for the new medium.
1805 </desc>
1806 </param>
1807 <param name="medium" type="IMedium" dir="return">
1808 <desc>Created medium object.</desc>
1809 </param>
1810 </method>
1811
1812 <method name="openMedium">
1813 <desc>
1814 Opens a medium from an existing storage location.
1815
1816 Once a medium has been opened, it can be passed to other VirtualBox
1817 methods, in particular to <link to="IMachine::attachDevice" />.
1818
1819 Depending on the given device type, the file at the storage location
1820 must be in one of the media formats understood by VirtualBox:
1821
1822 <ul>
1823 <li>With a "HardDisk" device type, the file must be a hard disk image
1824 in one of the formats supported by VirtualBox (see
1825 <link to="ISystemProperties::mediumFormats" />).
1826 After this method succeeds, if the medium is a base medium, it
1827 will be added to the <link to="#hardDisks"/> array attribute. </li>
1828 <li>With a "DVD" device type, the file must be an ISO 9960 CD/DVD image.
1829 After this method succeeds, the medium will be added to the
1830 <link to="#DVDImages"/> array attribute.</li>
1831 <li>With a "Floppy" device type, the file must be an RAW floppy image.
1832 After this method succeeds, the medium will be added to the
1833 <link to="#floppyImages"/> array attribute.</li>
1834 </ul>
1835
1836 After having been opened, the medium can be found by the <link to="#findMedium"/>
1837 method and can be attached to virtual machines. See <link to="IMedium" /> for more details.
1838
1839 The UUID of the newly opened medium will either be retrieved from the
1840 storage location, if the format supports it (e.g. for hard disk images),
1841 or a new UUID will be randomly generated (e.g. for ISO and RAW files).
1842 If for some reason you need to change the medium's UUID, use
1843 <link to="IMedium::setIDs" />.
1844
1845 If a differencing hard disk medium is to be opened by this method, the
1846 operation will succeed only if its parent medium and all ancestors,
1847 if any, are already known to this VirtualBox installation (for example,
1848 were opened by this method before).
1849
1850 This method attempts to guess the storage format of the specified medium
1851 by reading medium data at the specified location.
1852
1853 If @a accessMode is ReadWrite (which it should be for hard disks and floppies),
1854 the image is opened for read/write access and must have according permissions,
1855 as VirtualBox may actually write status information into the disk's metadata
1856 sections.
1857
1858 Note that write access is required for all typical hard disk usage in VirtualBox,
1859 since VirtualBox may need to write metadata such as a UUID into the image.
1860 The only exception is opening a source image temporarily for copying and
1861 cloning (see <link to="IMedium::cloneTo" /> when the image will be closed
1862 again soon.
1863
1864 The format of the location string is storage format specific. See
1865 <link to="IMedium::location"/> and IMedium for more details.
1866
1867 Prior to VirtualBox 4.0, opening a medium added it to a global media
1868 registry in the VirtualBox.xml file, which was shared between all machines
1869 and made transporting machines and their media from one host to another
1870 difficult.
1871
1872 Starting with VirtualBox 4.0, media are only added to a registry when
1873 they are attached to a machine. Machines created with VirtualBox 4.0
1874 or later can have their own media registry. As a result, a medium attached
1875 to such a machine will be remembered in that machine's XML settings file.
1876 Media attached to older machines will continue to be added to the global
1877 registry.
1878
1879 <result name="VBOX_E_FILE_ERROR">
1880 Invalid medium storage file location or could not find the medium
1881 at the specified location.
1882 </result>
1883 <result name="VBOX_E_IPRT_ERROR">
1884 Could not get medium storage format.
1885 </result>
1886 <result name="E_INVALIDARG">
1887 Invalid medium storage format.
1888 </result>
1889 <result name="VBOX_E_INVALID_OBJECT_STATE">
1890 Medium has already been added to a media registry.
1891 </result>
1892 </desc>
1893 <param name="location" type="wstring" dir="in">
1894 <desc>
1895 Location of the storage unit that contains medium data in one of
1896 the supported storage formats.
1897 </desc>
1898 </param>
1899 <param name="deviceType" type="DeviceType" dir="in">
1900 <desc>
1901 Must be one of "HardDisk", "DVD" or "Floppy".
1902 </desc>
1903 </param>
1904 <param name="accessMode" type="AccessMode" dir="in">
1905 <desc>Whether to open the image in read/write or read-only mode. For
1906 a "DVD" device type, this is ignored and read-only mode is always assumed.</desc>
1907 </param>
1908 <param name="medium" type="IMedium" dir="return">
1909 <desc>Opened medium object.</desc>
1910 </param>
1911 </method>
1912
1913 <method name="findMedium">
1914 <desc>
1915 Returns a medium of the given type that uses the given fully qualified
1916 location or UUID to store medium data.
1917
1918 The given medium must be known to this VirtualBox installation, i.e.
1919 it must be previously created by <link to="#createHardDisk"/> or opened
1920 by <link to="#openMedium"/>.
1921
1922 The search is done by comparing the value of the @a location argument to
1923 the <link to="IMedium::location"/> and <link to="IMedium::id" />
1924 attributes of each known medium.
1925
1926 On case sensitive file systems, a case sensitive comparison is performed,
1927 otherwise the case of symbols in the file path is ignored.
1928
1929 <result name="VBOX_E_OBJECT_NOT_FOUND">
1930 No medium object matching @a location found.
1931 </result>
1932 </desc>
1933 <param name="location" type="wstring" dir="in">
1934 <desc>What to search for. This can either be the UUID or the location string of an open medium.</desc>
1935 </param>
1936 <param name="type" type="DeviceType" dir="in">
1937 <desc>Device type (must be HardDisk, DVD or Floppy)</desc>
1938 </param>
1939 <param name="medium" type="IMedium" dir="return">
1940 <desc>Medium object, if found.</desc>
1941 </param>
1942 </method>
1943
1944 <method name="getGuestOSType">
1945 <desc>
1946 Returns an object describing the specified guest OS type.
1947
1948 The requested guest OS type is specified using a string which is a
1949 mnemonic identifier of the guest operating system, such as
1950 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
1951 particular virtual machine can be read or set using the
1952 <link to="IMachine::OSTypeId"/> attribute.
1953
1954 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
1955 available guest OS type objects. Each object has an
1956 <link to="IGuestOSType::id"/> attribute which contains an identifier of
1957 the guest OS this object describes.
1958
1959 <result name="E_INVALIDARG">
1960 @a id is not a valid Guest OS type.
1961 </result>
1962
1963 </desc>
1964 <param name="id" type="uuid" mod="string" dir="in">
1965 <desc>Guest OS type ID string.</desc>
1966 </param>
1967 <param name="type" type="IGuestOSType" dir="return">
1968 <desc>Guest OS type object.</desc>
1969 </param>
1970 </method>
1971
1972 <method name="createSharedFolder">
1973 <desc>
1974 Creates a new global shared folder by associating the given logical
1975 name with the given host path, adds it to the collection of shared
1976 folders and starts sharing it. Refer to the description of
1977 <link to="ISharedFolder"/> to read more about logical names.
1978 <note>
1979 In the current implementation, this operation is not
1980 implemented.
1981 </note>
1982 </desc>
1983 <param name="name" type="wstring" dir="in">
1984 <desc>Unique logical name of the shared folder.</desc>
1985 </param>
1986 <param name="hostPath" type="wstring" dir="in">
1987 <desc>Full path to the shared folder in the host file system.</desc>
1988 </param>
1989 <param name="writable" type="boolean" dir="in">
1990 <desc>Whether the share is writable or readonly</desc>
1991 </param>
1992 <param name="automount" type="boolean" dir="in">
1993 <desc>Whether the share gets automatically mounted by the guest
1994 or not.</desc>
1995 </param>
1996 </method>
1997
1998 <method name="removeSharedFolder">
1999 <desc>
2000 Removes the global shared folder with the given name previously
2001 created by <link to="#createSharedFolder"/> from the collection of
2002 shared folders and stops sharing it.
2003 <note>
2004 In the current implementation, this operation is not
2005 implemented.
2006 </note>
2007 </desc>
2008 <param name="name" type="wstring" dir="in">
2009 <desc>Logical name of the shared folder to remove.</desc>
2010 </param>
2011 </method>
2012
2013 <method name="getExtraDataKeys">
2014 <desc>
2015 Returns an array representing the global extra data keys which currently
2016 have values defined.
2017 </desc>
2018 <param name="value" type="wstring" dir="return" safearray="yes">
2019 <desc>Array of extra data keys.</desc>
2020 </param>
2021 </method>
2022
2023 <method name="getExtraData">
2024 <desc>
2025 Returns associated global extra data.
2026
2027 If the requested data @a key does not exist, this function will
2028 succeed and return an empty string in the @a value argument.
2029
2030 <result name="VBOX_E_FILE_ERROR">
2031 Settings file not accessible.
2032 </result>
2033 <result name="VBOX_E_XML_ERROR">
2034 Could not parse the settings file.
2035 </result>
2036
2037 </desc>
2038 <param name="key" type="wstring" dir="in">
2039 <desc>Name of the data key to get.</desc>
2040 </param>
2041 <param name="value" type="wstring" dir="return">
2042 <desc>Value of the requested data key.</desc>
2043 </param>
2044 </method>
2045
2046 <method name="setExtraData">
2047 <desc>
2048 Sets associated global extra data.
2049
2050 If you pass @c null or empty string as a key @a value, the given @a key
2051 will be deleted.
2052
2053 <note>
2054 Before performing the actual data change, this method will ask all
2055 registered event listener using the
2056 <link to="IExtraDataCanChangeEvent"/>
2057 notification for a permission. If one of the listeners refuses the
2058 new value, the change will not be performed.
2059 </note>
2060 <note>
2061 On success, the
2062 <link to="IExtraDataChangedEvent"/> notification
2063 is called to inform all registered listeners about a successful data
2064 change.
2065 </note>
2066
2067 <result name="VBOX_E_FILE_ERROR">
2068 Settings file not accessible.
2069 </result>
2070 <result name="VBOX_E_XML_ERROR">
2071 Could not parse the settings file.
2072 </result>
2073 <result name="E_ACCESSDENIED">
2074 Modification request refused.
2075 </result>
2076
2077 </desc>
2078 <param name="key" type="wstring" dir="in">
2079 <desc>Name of the data key to set.</desc>
2080 </param>
2081 <param name="value" type="wstring" dir="in">
2082 <desc>Value to assign to the key.</desc>
2083 </param>
2084 </method>
2085
2086 <!--method name="createDHCPServerForInterface">
2087 <desc>
2088 Creates a dhcp server settings to be used for the given interface
2089 <result name="E_INVALIDARG">
2090 Host network interface @a name already exists.
2091 </result>
2092 </desc>
2093 <param name="interface" type="IHostNetworkInterface" dir="in">
2094 <desc>Network Interface</desc>
2095 </param>
2096 <param name="server" type="IDHCPServer" dir="out">
2097 <desc>Dhcp server settings</desc>
2098 </param>
2099 </method-->
2100
2101 <method name="createDHCPServer">
2102 <desc>
2103 Creates a dhcp server settings to be used for the given internal network name
2104 <result name="E_INVALIDARG">
2105 Host network interface @a name already exists.
2106 </result>
2107 </desc>
2108 <param name="name" type="wstring" dir="in">
2109 <desc>server name</desc>
2110 </param>
2111 <param name="server" type="IDHCPServer" dir="return">
2112 <desc>Dhcp server settings</desc>
2113 </param>
2114 </method>
2115
2116 <method name="findDHCPServerByNetworkName">
2117 <desc>
2118 Searches a dhcp server settings to be used for the given internal network name
2119 <result name="E_INVALIDARG">
2120 Host network interface @a name already exists.
2121 </result>
2122
2123 </desc>
2124 <param name="name" type="wstring" dir="in">
2125 <desc>server name</desc>
2126 </param>
2127 <param name="server" type="IDHCPServer" dir="return">
2128 <desc>Dhcp server settings</desc>
2129 </param>
2130 </method>
2131
2132 <!--method name="findDHCPServerForInterface">
2133 <desc>
2134 Searches a dhcp server settings to be used for the given interface
2135 <result name="E_INVALIDARG">
2136 Host network interface @a name already exists.
2137 </result>
2138 </desc>
2139 <param name="interface" type="IHostNetworkInterface" dir="in">
2140 <desc>Network Interface</desc>
2141 </param>
2142 <param name="server" type="IDHCPServer" dir="out">
2143 <desc>Dhcp server settings</desc>
2144 </param>
2145 </method-->
2146
2147 <method name="removeDHCPServer">
2148 <desc>
2149 Removes the dhcp server settings
2150 <result name="E_INVALIDARG">
2151 Host network interface @a name already exists.
2152 </result>
2153 </desc>
2154 <param name="server" type="IDHCPServer" dir="in">
2155 <desc>Dhcp server settings to be removed</desc>
2156 </param>
2157 </method>
2158
2159
2160 <method name="checkFirmwarePresent">
2161 <desc>
2162 Check if this VirtualBox installation has a firmware
2163 of the given type available, either system-wide or per-user.
2164 Optionally, this may return a hint where this firmware can be
2165 downloaded from.
2166 </desc>
2167 <param name="firmwareType" type="FirmwareType" dir="in">
2168 <desc>
2169 Type of firmware to check.
2170 </desc>
2171 </param>
2172 <param name="version" type="wstring" dir="in">
2173 <desc>Expected version number, usually empty string (presently ignored).</desc>
2174 </param>
2175
2176 <param name="url" type="wstring" dir="out">
2177 <desc>
2178 Suggested URL to download this firmware from.
2179 </desc>
2180 </param>
2181
2182 <param name="file" type="wstring" dir="out">
2183 <desc>
2184 Filename of firmware, only valid if result == TRUE.
2185 </desc>
2186 </param>
2187
2188 <param name="result" type="boolean" dir="return">
2189 <desc>If firmware of this type and version is available.</desc>
2190 </param>
2191 </method>
2192
2193 </interface>
2194
2195 <!--
2196 // IVFSExplorer
2197 /////////////////////////////////////////////////////////////////////////
2198 -->
2199
2200 <enum
2201 name="VFSType"
2202 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
2203 >
2204 <desc>
2205 Virtual file systems supported by VFSExplorer.
2206 </desc>
2207
2208 <const name="File" value="1" />
2209 <const name="Cloud" value="2" />
2210 <const name="S3" value="3" />
2211 <const name="WebDav" value="4" />
2212 </enum>
2213
2214 <enum
2215 name="VFSFileType"
2216 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
2217 >
2218 <desc>
2219 File types known by VFSExplorer.
2220 </desc>
2221
2222 <const name="Unknown" value="1" />
2223 <const name="Fifo" value="2" />
2224 <const name="DevChar" value="3" />
2225 <const name="Directory" value="4" />
2226 <const name="DevBlock" value="5" />
2227 <const name="File" value="6" />
2228 <const name="SymLink" value="7" />
2229 <const name="Socket" value="8" />
2230 <const name="WhiteOut" value="9" />
2231 </enum>
2232
2233 <interface
2234 name="IVFSExplorer" extends="$unknown"
2235 uuid="003d7f92-d38e-487f-b790-8c5e8631cb2f"
2236 wsmap="managed"
2237 >
2238 <desc>
2239 The VFSExplorer interface unifies access to different file system
2240 types. This includes local file systems as well remote file systems like
2241 S3. For a list of supported types see <link to="VFSType" />.
2242 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
2243 </desc>
2244
2245 <attribute name="path" type="wstring" readonly="yes">
2246 <desc>Returns the current path in the virtual file system.</desc>
2247 </attribute>
2248
2249 <attribute name="type" type="VFSType" readonly="yes">
2250 <desc>Returns the file system type which is currently in use.</desc>
2251 </attribute>
2252
2253 <method name="update">
2254 <desc>Updates the internal list of files/directories from the
2255 current directory level. Use <link to="#entryList" /> to get the full list
2256 after a call to this method.</desc>
2257
2258 <param name="aProgress" type="IProgress" dir="return">
2259 <desc>Progress object to track the operation completion.</desc>
2260 </param>
2261 </method>
2262
2263 <method name="cd">
2264 <desc>Change the current directory level.</desc>
2265
2266 <param name="aDir" type="wstring" dir="in">
2267 <desc>The name of the directory to go in.</desc>
2268 </param>
2269
2270 <param name="aProgress" type="IProgress" dir="return">
2271 <desc>Progress object to track the operation completion.</desc>
2272 </param>
2273 </method>
2274
2275 <method name="cdUp">
2276 <desc>Go one directory upwards from the current directory level.</desc>
2277
2278 <param name="aProgress" type="IProgress" dir="return">
2279 <desc>Progress object to track the operation completion.</desc>
2280 </param>
2281 </method>
2282
2283 <method name="entryList">
2284 <desc>Returns a list of files/directories after a call to <link
2285 to="#update" />. The user is responsible for keeping this internal
2286 list up do date.</desc>
2287
2288 <param name="aNames" type="wstring" safearray="yes" dir="out">
2289 <desc>The list of names for the entries.</desc>
2290 </param>
2291
2292 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
2293 <desc>The list of types for the entries.</desc>
2294 </param>
2295
2296 <param name="aSizes" type="unsigned long" safearray="yes" dir="out">
2297 <desc>The list of sizes (in bytes) for the entries.</desc>
2298 </param>
2299
2300 <param name="aModes" type="unsigned long" safearray="yes" dir="out">
2301 <desc>The list of file modes (in octal form) for the entries.</desc>
2302 </param>
2303 </method>
2304
2305 <method name="exists">
2306 <desc>Checks if the given file list exists in the current directory
2307 level.</desc>
2308
2309 <param name="aNames" type="wstring" safearray="yes" dir="in">
2310 <desc>The names to check.</desc>
2311 </param>
2312
2313 <param name="aExists" type="wstring" safearray="yes" dir="return">
2314 <desc>The names which exist.</desc>
2315 </param>
2316 </method>
2317
2318 <method name="remove">
2319 <desc>Deletes the given files in the current directory level.</desc>
2320
2321 <param name="aNames" type="wstring" safearray="yes" dir="in">
2322 <desc>The names to remove.</desc>
2323 </param>
2324
2325 <param name="aProgress" type="IProgress" dir="return">
2326 <desc>Progress object to track the operation completion.</desc>
2327 </param>
2328 </method>
2329
2330 </interface>
2331
2332 <!--
2333 // IAppliance
2334 /////////////////////////////////////////////////////////////////////////
2335 -->
2336
2337 <interface
2338 name="IAppliance" extends="$unknown"
2339 uuid="7b148032-4124-4f46-b56a-b48ac1273f5a"
2340 wsmap="managed"
2341 >
2342 <desc>
2343 Represents a platform-independent appliance in OVF format. An instance of this is returned
2344 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
2345 virtual machines within an appliance with VirtualBox.
2346
2347 The OVF standard suggests two different physical file formats:
2348
2349 <ol>
2350 <li>If the appliance is distributed as a set of files, there must be at least one XML descriptor
2351 file that conforms to the OVF standard and carries an <tt>.ovf</tt> file extension. If
2352 this descriptor file references other files such as disk images, as OVF appliances typically
2353 do, those additional files must be in the same directory as the descriptor file.</li>
2354
2355 <li>If the appliance is distributed as a single file, it must be in TAR format and have the
2356 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
2357 files and optionally other files.
2358
2359 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
2360 be added with a later version.</li>
2361 </ol>
2362
2363 <b>Importing</b> an OVF appliance into VirtualBox as instances of
2364 <link to="IMachine" /> involves the following sequence of API calls:
2365
2366 <ol>
2367 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
2368 </li>
2369
2370 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
2371 would like to import. So long as this file is syntactically valid, this will succeed
2372 and fill the appliance object with the parsed data from the OVF file.
2373 </li>
2374
2375 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
2376 contents of the IAppliance attributes accordingly. These can be inspected by a
2377 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
2378 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
2379 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
2380 systems (machines) in the OVF, which in turn describe the virtual hardware prescribed
2381 by the OVF (network and hardware adapters, virtual disk images, memory size and so on).
2382 The GUI can then give the user the option to confirm and/or change these suggestions.
2383 </li>
2384
2385 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
2386 virtual system (machine) to override the suggestions made by the interpret() routine.
2387 </li>
2388
2389 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
2390 VirtualBox as instances of <link to="IMachine" /> that match the information in the
2391 virtual system descriptions. After this call succeeded, the UUIDs of the machines created
2392 can be found in the <link to="#machines" /> array attribute.
2393 </li>
2394 </ol>
2395
2396 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
2397
2398 <ol>
2399 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
2400 an empty IAppliance object.
2401 </li>
2402
2403 <li>For each machine you would like to export, call <link to="IMachine::export" />
2404 with the IAppliance object you just created. Each such call creates one instance of
2405 <link to="IVirtualSystemDescription" /> inside the appliance.
2406 </li>
2407
2408 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
2409 virtual system (machine) to override the suggestions made by the export() routine.
2410 </li>
2411
2412 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
2413 file written.</li>
2414 </ol>
2415
2416 </desc>
2417
2418 <attribute name="path" type="wstring" readonly="yes">
2419 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
2420 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
2421 <link to="#write" /> (for export).
2422 This attribute is empty until one of these methods has been called.
2423 </desc>
2424 </attribute>
2425
2426 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
2427 <desc>
2428 Array of virtual disk definitions. One such description exists for each
2429 disk definition in the OVF; each string array item represents one such piece of
2430 disk information, with the information fields separated by tab (\t) characters.
2431
2432 The caller should be prepared for additional fields being appended to
2433 this string in future versions of VirtualBox and therefore check for
2434 the number of tabs in the strings returned.
2435
2436 In the current version, the following eight fields are returned per string
2437 in the array:
2438
2439 <ol>
2440 <li>Disk ID (unique string identifier given to disk)</li>
2441
2442 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
2443
2444 <li>Populated size (optional unsigned integer indicating the current size of the
2445 disk; can be approximate; -1 if unspecified)</li>
2446
2447 <li>Format (string identifying the disk format, typically
2448 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
2449
2450 <li>Reference (where to find the disk image, typically a file name; if empty,
2451 then the disk should be created on import)</li>
2452
2453 <li>Image size (optional unsigned integer indicating the size of the image,
2454 which need not necessarily be the same as the values specified above, since
2455 the image may be compressed or sparse; -1 if not specified)</li>
2456
2457 <li>Chunk size (optional unsigned integer if the image is split into chunks;
2458 presently unsupported and always -1)</li>
2459
2460 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
2461 </ol>
2462 </desc>
2463 </attribute>
2464
2465 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
2466 <desc> Array of virtual system descriptions. One such description is created
2467 for each virtual system (machine) found in the OVF.
2468 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
2469 (for export) has been called.
2470 </desc>
2471 </attribute>
2472
2473 <attribute name="machines" type="wstring" readonly="yes" safearray="yes">
2474 <desc>
2475 Contains the UUIDs of the machines created from the information in this appliances. This is only
2476 relevant for the import case, and will only contain data after a call to <link to="#importMachines" />
2477 succeeded.
2478 </desc>
2479 </attribute>
2480
2481 <method name="read">
2482 <desc>
2483 Reads an OVF file into the appliance object.
2484
2485 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
2486 mere fact that this method returns successfully does not mean that VirtualBox supports all
2487 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
2488 </desc>
2489 <param name="file" type="wstring" dir="in">
2490 <desc>
2491 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
2492 on whether the appliance is distributed as a set of files or as a single file, respectively).
2493 </desc>
2494 </param>
2495 <param name="aProgress" type="IProgress" dir="return">
2496 <desc>Progress object to track the operation completion.</desc>
2497 </param>
2498 </method>
2499
2500 <method name="interpret">
2501 <desc>
2502 Interprets the OVF data that was read when the appliance was constructed. After
2503 calling this method, one can inspect the
2504 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
2505 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
2506 the appliance.
2507
2508 Calling this method is the second step of importing an appliance into VirtualBox;
2509 see <link to="IAppliance" /> for an overview.
2510
2511 After calling this method, one should call <link to="#getWarnings" /> to find out
2512 if problems were encountered during the processing which might later lead to
2513 errors.
2514 </desc>
2515 </method>
2516
2517 <method name="importMachines">
2518 <desc>
2519 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
2520 and other interfaces that match the information contained in the appliance as
2521 closely as possible, as represented by the import instructions in the
2522 <link to="#virtualSystemDescriptions" /> array.
2523
2524 Calling this method is the final step of importing an appliance into VirtualBox;
2525 see <link to="IAppliance" /> for an overview.
2526
2527 Since importing the appliance will most probably involve copying and converting
2528 disk images, which can take a long time, this method operates asynchronously and
2529 returns an IProgress object to allow the caller to monitor the progress.
2530
2531 After the import succeeded, the UUIDs of the IMachine instances created can be
2532 retrieved from the <link to="#machines" /> array attribute.
2533 </desc>
2534
2535 <param name="aProgress" type="IProgress" dir="return">
2536 <desc>Progress object to track the operation completion.</desc>
2537 </param>
2538 </method>
2539
2540 <method name="createVFSExplorer">
2541 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
2542
2543 <param name="aUri" type="wstring" dir="in">
2544 <desc>The URI describing the file system to use.</desc>
2545 </param>
2546
2547 <param name="aExplorer" type="IVFSExplorer" dir="return">
2548 <desc></desc>
2549 </param>
2550 </method>
2551
2552 <method name="write">
2553 <desc>
2554 Writes the contents of the appliance exports into a new OVF file.
2555
2556 Calling this method is the final step of exporting an appliance from VirtualBox;
2557 see <link to="IAppliance" /> for an overview.
2558
2559 Since exporting the appliance will most probably involve copying and converting
2560 disk images, which can take a long time, this method operates asynchronously and
2561 returns an IProgress object to allow the caller to monitor the progress.
2562 </desc>
2563 <param name="format" type="wstring" dir="in">
2564 <desc>
2565 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
2566 future versions of VirtualBox may support additional formats.
2567 </desc>
2568 </param>
2569 <param name="manifest" type="boolean" dir="in">
2570 <desc>
2571 Indicate if the optional manifest file (.mf) should be written. The manifest file
2572 is used for integrity checks prior import.
2573 </desc>
2574 </param>
2575 <param name="path" type="wstring" dir="in">
2576 <desc>
2577 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
2578 on whether the appliance is distributed as a set of files or as a single file, respectively).
2579 </desc>
2580 </param>
2581 <param name="progress" type="IProgress" dir="return">
2582 <desc>Progress object to track the operation completion.</desc>
2583 </param>
2584 </method>
2585
2586 <method name="getWarnings">
2587 <desc>Returns textual warnings which occurred during execution of <link to="#interpret" />.</desc>
2588
2589 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
2590 <desc></desc>
2591 </param>
2592 </method>
2593
2594 </interface>
2595
2596 <enum
2597 name="VirtualSystemDescriptionType"
2598 uuid="c0f8f135-3a1d-417d-afa6-b38b95a91f90"
2599 >
2600 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
2601 a configuration value.</desc>
2602
2603 <const name="Ignore" value="1" />
2604 <const name="OS" value="2" />
2605 <const name="Name" value="3" />
2606 <const name="Product" value="4" />
2607 <const name="Vendor" value="5" />
2608 <const name="Version" value="6" />
2609 <const name="ProductUrl" value="7" />
2610 <const name="VendorUrl" value="8" />
2611 <const name="Description" value="9" />
2612 <const name="License" value="10" />
2613 <const name="Miscellaneous" value="11" />
2614 <const name="CPU" value="12" />
2615 <const name="Memory" value="13" />
2616 <const name="HardDiskControllerIDE" value="14" />
2617 <const name="HardDiskControllerSATA" value="15" />
2618 <const name="HardDiskControllerSCSI" value="16" />
2619 <const name="HardDiskControllerSAS" value="17" />
2620 <const name="HardDiskImage" value="18" />
2621 <const name="Floppy" value="19" />
2622 <const name="CDROM" value="20" />
2623 <const name="NetworkAdapter" value="21" />
2624 <const name="USBController" value="22" />
2625 <const name="SoundCard" value="23" />
2626
2627 </enum>
2628
2629 <enum
2630 name="VirtualSystemDescriptionValueType"
2631 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
2632 >
2633 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
2634 type to fetch.</desc>
2635
2636 <const name="Reference" value="1" />
2637 <const name="Original" value="2" />
2638 <const name="Auto" value="3" />
2639 <const name="ExtraConfig" value="4" />
2640
2641 </enum>
2642
2643 <interface
2644 name="IVirtualSystemDescription" extends="$unknown"
2645 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
2646 wsmap="managed"
2647 >
2648
2649 <desc>Represents one virtual system (machine) in an appliance. This interface is used in
2650 the <link to="IAppliance::virtualSystemDescriptions" /> array. After
2651 <link to="IAppliance::interpret" /> has been called, that array contains information
2652 about how the virtual systems described in the OVF should best be imported into
2653 VirtualBox virtual machines. See <link to="IAppliance" /> for the steps required to
2654 import an OVF into VirtualBox.
2655 </desc>
2656
2657 <attribute name="count" type="unsigned long" readonly="yes">
2658 <desc>Return the number of virtual system description entries.</desc>
2659 </attribute>
2660
2661 <method name="getDescription">
2662 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
2663 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
2664
2665 The list below identifies the value sets that are possible depending on the
2666 <link to="VirtualSystemDescriptionType" /> enum value in the array item in @a aTypes[]. In each case,
2667 the array item with the same index in @a aOvfValues[] will contain the original value as contained
2668 in the OVF file (just for informational purposes), and the corresponding item in @a aVBoxValues[]
2669 will contain a suggested value to be used for VirtualBox. Depending on the description type,
2670 the @a aExtraConfigValues[] array item may also be used.
2671
2672 <ul>
2673 <li>
2674 "OS": the guest operating system type. There must be exactly one such array item on import. The
2675 corresponding item in @a aVBoxValues[] contains the suggested guest operating system for VirtualBox.
2676 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
2677 item in @a aOvfValues[] will contain a numerical value that described the operating system in the OVF.
2678 </li>
2679 <li>
2680 "Name": the name to give to the new virtual machine. There can be at most one such array item;
2681 if none is present on import, then an automatic name will be created from the operating system
2682 type. The corresponding item im @a aOvfValues[] will contain the suggested virtual machine name
2683 from the OVF file, and @a aVBoxValues[] will contain a suggestion for a unique VirtualBox
2684 <link to="IMachine" /> name that does not exist yet.
2685 </li>
2686 <li>
2687 "Description": an arbitrary description.
2688 </li>
2689 <li>
2690 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
2691 code to display such a license for agreement; the Main API does not enforce any such policy.
2692 </li>
2693 <li>
2694 Miscellaneous: reserved for future use.
2695 </li>
2696 <li>
2697 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
2698 </li>
2699 <li>
2700 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
2701 is present on import, then VirtualBox will set a meaningful default based on the operating system
2702 type.
2703 </li>
2704 <li>
2705 "HardDiskControllerIDE": an IDE hard disk controller. There can be at most two such items.
2706 An optional value in @a aOvfValues[] and @a aVBoxValues[] can be "PIIX3" or "PIIX4" to specify
2707 the type of IDE controller; this corresponds to the ResourceSubType element which VirtualBox
2708 writes into the OVF.
2709 The matching item in the @a aRefs[] array will contain an integer that items of the "Harddisk"
2710 type can use to specify which hard disk controller a virtual disk should be connected to.
2711 Note that in OVF, an IDE controller has two channels, corresponding to "master" and "slave"
2712 in traditional terminology, whereas the IDE storage controller that VirtualBox supports in
2713 its virtual machines supports four channels (primary master, primary slave, secondary master,
2714 secondary slave) and thus maps to two IDE controllers in the OVF sense.
2715 </li>
2716 <li>
2717 "HardDiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
2718 has no value in @a aOvfValues[] or @a aVBoxValues[].
2719 The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
2720 </li>
2721 <li>
2722 "HardDiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
2723 The items in @a aOvfValues[] and @a aVBoxValues[] will either be "LsiLogic", "BusLogic" or
2724 "LsiLogicSas". (Note that in OVF, the LsiLogicSas controller is treated as a SCSI controller
2725 whereas VirtualBox considers it a class of storage controllers of its own; see
2726 <link to="StorageControllerType" />).
2727 The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
2728 </li>
2729 <li>
2730 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
2731 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
2732
2733 The array item in @a aOvfValues[] will contain the file specification from the OVF file (without
2734 a path since the image file should be in the same location as the OVF file itself), whereas the
2735 item in @a aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
2736 hard disk image. This means that on import the image will be copied and converted from the
2737 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
2738
2739 The matching item in the @a aExtraConfigValues[] array must contain a string of the following
2740 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
2741 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
2742 the image to. That number must be the index of an array item with one of the hard disk controller
2743 types (HardDiskControllerSCSI, HardDiskControllerSATA, HardDiskControllerIDE).
2744 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
2745 this can be 0 or 1 for master or slave, respectively. For compatibility with VirtualBox versions
2746 before 3.2, the values 2 and 3 (for secondary master and secondary slave) are also supported, but
2747 no longer exported. For SATA and SCSI controllers, the channel can range from 0-29.
2748 </li>
2749 <li>
2750 "CDROM": a virtual CD-ROM drive. The matching item in @a aExtraConfigValue[] contains the same
2751 attachment information as with "HardDiskImage" items.
2752 </li>
2753 <li>
2754 "CDROM": a virtual floppy drive. The matching item in @a aExtraConfigValue[] contains the same
2755 attachment information as with "HardDiskImage" items.
2756 </li>
2757 <li>
2758 "NetworkAdapter": a network adapter. The array item in @a aVBoxValues[] will specify the hardware
2759 for the network adapter, whereas the array item in @a aExtraConfigValues[] will have a string
2760 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
2761 </li>
2762 <li>
2763 "USBController": a USB controller. There can be at most one such item. If and only if such an
2764 item ispresent, USB support will be enabled for the new virtual machine.
2765 </li>
2766 <li>
2767 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
2768 present, sound support will be enabled for the new virtual machine. Note that the virtual
2769 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
2770 may be different from the virtual soundcard expected by the appliance.
2771 </li>
2772 </ul>
2773
2774 </desc>
2775
2776 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
2777 <desc></desc>
2778 </param>
2779
2780 <param name="aRefs" type="wstring" dir="out" safearray="yes">
2781 <desc></desc>
2782 </param>
2783
2784 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
2785 <desc></desc>
2786 </param>
2787
2788 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
2789 <desc></desc>
2790 </param>
2791
2792 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
2793 <desc></desc>
2794 </param>
2795
2796 </method>
2797
2798 <method name="getDescriptionByType">
2799 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
2800 should be returned.</desc>
2801
2802 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2803 <desc></desc>
2804 </param>
2805
2806 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
2807 <desc></desc>
2808 </param>
2809
2810 <param name="aRefs" type="wstring" dir="out" safearray="yes">
2811 <desc></desc>
2812 </param>
2813
2814 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
2815 <desc></desc>
2816 </param>
2817
2818 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
2819 <desc></desc>
2820 </param>
2821
2822 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
2823 <desc></desc>
2824 </param>
2825
2826 </method>
2827
2828 <method name="getValuesByType">
2829 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
2830 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
2831 values.</desc>
2832
2833 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2834 <desc></desc>
2835 </param>
2836
2837 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
2838 <desc></desc>
2839 </param>
2840
2841 <param name="aValues" type="wstring" dir="return" safearray="yes">
2842 <desc></desc>
2843 </param>
2844
2845 </method>
2846
2847 <method name="setFinalValues">
2848 <desc>
2849 This method allows the appliance's user to change the configuration for the virtual
2850 system descriptions. For each array item returned from <link to="#getDescription" />,
2851 you must pass in one boolean value and one configuration value.
2852
2853 Each item in the boolean array determines whether the particular configuration item
2854 should be enabled.
2855 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
2856 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
2857 and SoundCard.
2858
2859 For the "vbox" and "extra configuration" values, if you pass in the same arrays
2860 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
2861 the configuration remains unchanged. Please see the documentation for getDescription()
2862 for valid configuration values for the individual array item types. If the
2863 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
2864 </desc>
2865
2866 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
2867 <desc></desc>
2868 </param>
2869
2870 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
2871 <desc></desc>
2872 </param>
2873
2874 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
2875 <desc></desc>
2876 </param>
2877 </method>
2878
2879 <method name="addDescription">
2880 <desc>
2881 This method adds an additional description entry to the stack of already
2882 available descriptions for this virtual system. This is handy for writing
2883 values which aren't directly supported by VirtualBox. One example would
2884 be the License type of <link to="VirtualSystemDescriptionType" />.
2885 </desc>
2886
2887 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2888 <desc></desc>
2889 </param>
2890
2891 <param name="aVBoxValue" type="wstring" dir="in">
2892 <desc></desc>
2893 </param>
2894
2895 <param name="aExtraConfigValue" type="wstring" dir="in">
2896 <desc></desc>
2897 </param>
2898 </method>
2899 </interface>
2900
2901
2902 <!--
2903 // IMachine
2904 /////////////////////////////////////////////////////////////////////////
2905 -->
2906
2907 <interface
2908 name="IInternalMachineControl" extends="$unknown"
2909 uuid="476126af-e223-4490-a8a0-b1f1575be013"
2910 internal="yes"
2911 wsmap="suppress"
2912 >
2913 <method name="setRemoveSavedStateFile">
2914 <desc>
2915 Updates the flag whether the saved state file is removed on a
2916 machine state change from Saved to PoweredOff.
2917 </desc>
2918 <param name="aRemove" type="boolean" dir="in"/>
2919 </method>
2920
2921 <method name="updateState">
2922 <desc>
2923 Updates the VM state.
2924 <note>
2925 This operation will also update the settings file with the correct
2926 information about the saved state file and delete this file from disk
2927 when appropriate.
2928 </note>
2929 </desc>
2930 <param name="state" type="MachineState" dir="in"/>
2931 </method>
2932
2933 <method name="getIPCId">
2934 <param name="id" type="wstring" dir="return"/>
2935 </method>
2936
2937 <method name="beginPowerUp">
2938 <desc>
2939 Tells VBoxSVC that <link to="IConsole::powerUp"/> is under ways and
2940 gives it the progress object that should be part of any pending
2941 <link to="IMachine::launchVMProcess"/> operations. The progress
2942 object may be called back to reflect an early cancelation, so some care
2943 have to be taken with respect to any cancelation callbacks. The console
2944 object will call <link to="IInternalMachineControl::endPowerUp"/>
2945 to signal the completion of the progress object.
2946 </desc>
2947 <param name="aProgress" type="IProgress" dir="in" />
2948 </method>
2949
2950 <method name="endPowerUp">
2951 <desc>
2952 Tells VBoxSVC that <link to="IConsole::powerUp"/> has completed.
2953 This method may query status information from the progress object it
2954 received in <link to="IInternalMachineControl::beginPowerUp"/> and copy
2955 it over to any in-progress <link to="IMachine::launchVMProcess"/>
2956 call in order to complete that progress object.
2957 </desc>
2958 <param name="result" type="long" dir="in"/>
2959 </method>
2960
2961 <method name="runUSBDeviceFilters">
2962 <desc>
2963 Asks the server to run USB devices filters of the associated
2964 machine against the given USB device and tell if there is
2965 a match.
2966 <note>
2967 Intended to be used only for remote USB devices. Local
2968 ones don't require to call this method (this is done
2969 implicitly by the Host and USBProxyService).
2970 </note>
2971 </desc>
2972 <param name="device" type="IUSBDevice" dir="in"/>
2973 <param name="matched" type="boolean" dir="out"/>
2974 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
2975 </method>
2976
2977 <method name="captureUSBDevice">
2978 <desc>
2979 Requests a capture of the given host USB device.
2980 When the request is completed, the VM process will
2981 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2982 notification.
2983 </desc>
2984 <param name="id" type="uuid" mod="string" dir="in"/>
2985 </method>
2986
2987 <method name="detachUSBDevice">
2988 <desc>
2989 Notification that a VM is going to detach (@a done = @c false) or has
2990 already detached (@a done = @c true) the given USB device.
2991 When the @a done = @c true request is completed, the VM process will
2992 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
2993 notification.
2994 <note>
2995 In the @a done = @c true case, the server must run its own filters
2996 and filters of all VMs but this one on the detached device
2997 as if it were just attached to the host computer.
2998 </note>
2999 </desc>
3000 <param name="id" type="uuid" mod="string" dir="in"/>
3001 <param name="done" type="boolean" dir="in"/>
3002 </method>
3003
3004 <method name="autoCaptureUSBDevices">
3005 <desc>
3006 Requests a capture all matching USB devices attached to the host.
3007 When the request is completed, the VM process will
3008 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3009 notification per every captured device.
3010 </desc>
3011 </method>
3012
3013 <method name="detachAllUSBDevices">
3014 <desc>
3015 Notification that a VM that is being powered down. The done
3016 parameter indicates whether which stage of the power down
3017 we're at. When @a done = @c false the VM is announcing its
3018 intentions, while when @a done = @c true the VM is reporting
3019 what it has done.
3020 <note>
3021 In the @a done = @c true case, the server must run its own filters
3022 and filters of all VMs but this one on all detach devices as
3023 if they were just attached to the host computer.
3024 </note>
3025 </desc>
3026 <param name="done" type="boolean" dir="in"/>
3027 </method>
3028
3029 <method name="onSessionEnd">
3030 <desc>
3031 Triggered by the given session object when the session is about
3032 to close normally.
3033 </desc>
3034 <param name="session" type="ISession" dir="in">
3035 <desc>Session that is being closed</desc>
3036 </param>
3037 <param name="progress" type="IProgress" dir="return">
3038 <desc>
3039 Used to wait until the corresponding machine is actually
3040 dissociated from the given session on the server.
3041 Returned only when this session is a direct one.
3042 </desc>
3043 </param>
3044 </method>
3045
3046 <method name="beginSavingState">
3047 <desc>
3048 Called by the VM process to inform the server it wants to
3049 save the current state and stop the VM execution.
3050 </desc>
3051 <param name="progress" type="IProgress" dir="out">
3052 <desc>
3053 Progress object created by VBoxSVC to wait until
3054 the state is saved.
3055 </desc>
3056 </param>
3057 <param name="stateFilePath" type="wstring" dir="out">
3058 <desc>
3059 File path the VM process must save the execution state to.
3060 </desc>
3061 </param>
3062 </method>
3063
3064 <method name="endSavingState">
3065 <desc>
3066 Called by the VM process to inform the server that saving
3067 the state previously requested by #beginSavingState is either
3068 successfully finished or there was a failure.
3069
3070 <result name="VBOX_E_FILE_ERROR">
3071 Settings file not accessible.
3072 </result>
3073 <result name="VBOX_E_XML_ERROR">
3074 Could not parse the settings file.
3075 </result>
3076
3077 </desc>
3078
3079 <param name="result" type="long" dir="in">
3080 <desc>@c S_OK to indicate success.
3081 </desc>
3082 </param>
3083 <param name="errMsg" type="wstring" dir="in">
3084 <desc>@c human readable error message in case of failure.
3085 </desc>
3086 </param>
3087 </method>
3088
3089 <method name="adoptSavedState">
3090 <desc>
3091 Gets called by IConsole::adoptSavedState.
3092 <result name="VBOX_E_FILE_ERROR">
3093 Invalid saved state file path.
3094 </result>
3095 </desc>
3096 <param name="savedStateFile" type="wstring" dir="in">
3097 <desc>Path to the saved state file to adopt.</desc>
3098 </param>
3099 </method>
3100
3101 <method name="beginTakingSnapshot">
3102 <desc>
3103 Called from the VM process to request from the server to perform the
3104 server-side actions of creating a snapshot (creating differencing images
3105 and the snapshot object).
3106
3107 <result name="VBOX_E_FILE_ERROR">
3108 Settings file not accessible.
3109 </result>
3110 <result name="VBOX_E_XML_ERROR">
3111 Could not parse the settings file.
3112 </result>
3113 </desc>
3114 <param name="initiator" type="IConsole" dir="in">
3115 <desc>The console object that initiated this call.</desc>
3116 </param>
3117 <param name="name" type="wstring" dir="in">
3118 <desc>Snapshot name.</desc>
3119 </param>
3120 <param name="description" type="wstring" dir="in">
3121 <desc>Snapshot description.</desc>
3122 </param>
3123 <param name="consoleProgress" type="IProgress" dir="in">
3124 <desc>
3125 Progress object created by the VM process tracking the
3126 snapshot's progress. This has the following sub-operations:
3127 <ul>
3128 <li>setting up (weight 1);</li>
3129 <li>one for each medium attachment that needs a differencing image (weight 1 each);</li>
3130 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3131 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3132 <li>finishing up (weight 1)</li>
3133 </ul>
3134 </desc>
3135 </param>
3136 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3137 <desc>
3138 Whether this is an online snapshot (i.e. the machine is running).
3139 </desc>
3140 </param>
3141 <param name="stateFilePath" type="wstring" dir="out">
3142 <desc>
3143 File path the VM process must save the execution state to.
3144 </desc>
3145 </param>
3146 </method>
3147
3148 <method name="endTakingSnapshot">
3149 <desc>
3150 Called by the VM process to inform the server that the snapshot
3151 previously requested by #beginTakingSnapshot is either
3152 successfully taken or there was a failure.
3153 </desc>
3154
3155 <param name="success" type="boolean" dir="in">
3156 <desc>@c true to indicate success and @c false otherwise</desc>
3157 </param>
3158 </method>
3159
3160 <method name="deleteSnapshot">
3161 <desc>
3162 Gets called by IConsole::deleteSnapshot.
3163 <result name="VBOX_E_INVALID_OBJECT_STATE">
3164 Snapshot has more than one child snapshot.
3165 </result>
3166 </desc>
3167 <param name="initiator" type="IConsole" dir="in">
3168 <desc>The console object that initiated this call.</desc>
3169 </param>
3170 <param name="id" type="uuid" mod="string" dir="in">
3171 <desc>UUID of the snapshot to delete.</desc>
3172 </param>
3173 <param name="machineState" type="MachineState" dir="out">
3174 <desc>New machine state after this operation is started.</desc>
3175 </param>
3176 <param name="progress" type="IProgress" dir="return">
3177 <desc>Progress object to track the operation completion.</desc>
3178 </param>
3179 </method>
3180
3181 <method name="finishOnlineMergeMedium">
3182 <desc>
3183 Gets called by IConsole::onlineMergeMedium.
3184 </desc>
3185 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
3186 <desc>The medium attachment which needs to be cleaned up.</desc>
3187 </param>
3188 <param name="source" type="IMedium" dir="in">
3189 <desc>Merge source medium.</desc>
3190 </param>
3191 <param name="target" type="IMedium" dir="in">
3192 <desc>Merge target medium.</desc>
3193 </param>
3194 <param name="mergeForward" type="boolean" dir="in">
3195 <desc>Merge direction.</desc>
3196 </param>
3197 <param name="parentForTarget" type="IMedium" dir="in">
3198 <desc>For forward merges: new parent for target medium.</desc>
3199 </param>
3200 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
3201 <desc>For backward merges: list of media which need their parent UUID
3202 updated.</desc>
3203 </param>
3204 </method>
3205
3206 <method name="restoreSnapshot">
3207 <desc>
3208 Gets called by IConsole::RestoreSnapshot.
3209 </desc>
3210 <param name="initiator" type="IConsole" dir="in">
3211 <desc>The console object that initiated this call.</desc>
3212 </param>
3213 <param name="snapshot" type="ISnapshot" dir="in">
3214 <desc>The snapshot to restore the VM state from.</desc>
3215 </param>
3216 <param name="machineState" type="MachineState" dir="out">
3217 <desc>New machine state after this operation is started.</desc>
3218 </param>
3219 <param name="progress" type="IProgress" dir="return">
3220 <desc>Progress object to track the operation completion.</desc>
3221 </param>
3222 </method>
3223
3224 <method name="pullGuestProperties">
3225 <desc>
3226 Get the list of the guest properties matching a set of patterns along
3227 with their values, time stamps and flags and give responsibility for
3228 managing properties to the console.
3229 </desc>
3230 <param name="name" type="wstring" dir="out" safearray="yes">
3231 <desc>
3232 The names of the properties returned.
3233 </desc>
3234 </param>
3235 <param name="value" type="wstring" dir="out" safearray="yes">
3236 <desc>
3237 The values of the properties returned. The array entries match the
3238 corresponding entries in the @a name array.
3239 </desc>
3240 </param>
3241 <param name="timestamp" type="long long" dir="out" safearray="yes">
3242 <desc>
3243 The time stamps of the properties returned. The array entries match
3244 the corresponding entries in the @a name array.
3245 </desc>
3246 </param>
3247 <param name="flags" type="wstring" dir="out" safearray="yes">
3248 <desc>
3249 The flags of the properties returned. The array entries match the
3250 corresponding entries in the @a name array.
3251 </desc>
3252 </param>
3253 </method>
3254
3255 <method name="pushGuestProperty">
3256 <desc>
3257 Update a single guest property in IMachine.
3258 </desc>
3259 <param name="name" type="wstring" dir="in">
3260 <desc>
3261 The name of the property to be updated.
3262 </desc>
3263 </param>
3264 <param name="value" type="wstring" dir="in">
3265 <desc>
3266 The value of the property.
3267 </desc>
3268 </param>
3269 <param name="timestamp" type="long long" dir="in">
3270 <desc>
3271 The timestamp of the property.
3272 </desc>
3273 </param>
3274 <param name="flags" type="wstring" dir="in">
3275 <desc>
3276 The flags of the property.
3277 </desc>
3278 </param>
3279 </method>
3280
3281 <method name="lockMedia">
3282 <desc>
3283 Locks all media attached to the machine for writing and parents of
3284 attached differencing media (if any) for reading. This operation is
3285 atomic so that if it fails no media is actually locked.
3286
3287 This method is intended to be called when the machine is in Starting or
3288 Restoring state. The locked media will be automatically unlocked when
3289 the machine is powered off or crashed.
3290 </desc>
3291 </method>
3292 <method name="unlockMedia">
3293 <desc>
3294 Unlocks all media previously locked using
3295 <link to="IInternalMachineControl::lockMedia"/>.
3296
3297 This method is intended to be used with teleportation so that it is
3298 possible to teleport between processes on the same machine.
3299 </desc>
3300 </method>
3301 </interface>
3302
3303 <interface
3304 name="IBIOSSettings" extends="$unknown"
3305 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3306 wsmap="managed"
3307 >
3308 <desc>
3309 The IBIOSSettings interface represents BIOS settings of the virtual
3310 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3311 </desc>
3312 <attribute name="logoFadeIn" type="boolean">
3313 <desc>Fade in flag for BIOS logo animation.</desc>
3314 </attribute>
3315
3316 <attribute name="logoFadeOut" type="boolean">
3317 <desc>Fade out flag for BIOS logo animation.</desc>
3318 </attribute>
3319
3320 <attribute name="logoDisplayTime" type="unsigned long">
3321 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3322 </attribute>
3323
3324 <attribute name="logoImagePath" type="wstring">
3325 <desc>
3326 Local file system path for external BIOS splash image. Empty string
3327 means the default image is shown on boot.
3328 </desc>
3329 </attribute>
3330
3331 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3332 <desc>Mode of the BIOS boot device menu.</desc>
3333 </attribute>
3334
3335 <attribute name="ACPIEnabled" type="boolean">
3336 <desc>ACPI support flag.</desc>
3337 </attribute>
3338
3339 <attribute name="IOAPICEnabled" type="boolean">
3340 <desc>
3341 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3342 and support IRQs above 15.
3343 </desc>
3344 </attribute>
3345
3346 <attribute name="timeOffset" type="long long">
3347 <desc>
3348 Offset in milliseconds from the host system time. This allows for
3349 guests running with a different system date/time than the host.
3350 It is equivalent to setting the system date/time in the BIOS except
3351 it is not an absolute value but a relative one. Guest Additions
3352 time synchronization honors this offset.
3353 </desc>
3354 </attribute>
3355
3356 <attribute name="PXEDebugEnabled" type="boolean">
3357 <desc>
3358 PXE debug logging flag. If set, VirtualBox will write extensive
3359 PXE trace information to the release log.
3360 </desc>
3361 </attribute>
3362
3363 </interface>
3364
3365 <enum
3366 name="CleanupMode"
3367 uuid="67897c50-7cca-47a9-83f6-ce8fd8eb5441"
3368 >
3369 <desc>Cleanup mode, used with <link to="IMachine::unregister" />.
3370 </desc>
3371 <const name="UnregisterOnly" value="1">
3372 <desc>Unregister only the machine, but neither delete snapshots nor detach media.</desc>
3373 </const>
3374 <const name="DetachAllReturnNone" value="2">
3375 <desc>Delete all snapshots and detach all media but return none; this will keep all media registered.</desc>
3376 </const>
3377 <const name="DetachAllReturnHardDisksOnly" value="3">
3378 <desc>Delete all snapshots, detach all media and return hard disks for closing, but not removeable media.</desc>
3379 </const>
3380 <const name="Full" value="4">
3381 <desc>Delete all snapshots, detach all media and return all media for closing.</desc>
3382 </const>
3383 </enum>
3384
3385 <interface
3386 name="IEventContext" extends="$unknown"
3387 uuid="7563F4E7-1583-40F7-B4C4-C9BA02CB0AE3"
3388 wsmap="managed"
3389 >
3390 <desc>
3391 Placeholder class for event contexts.
3392 </desc>
3393 </interface>
3394
3395
3396 <interface
3397 name="IPciAddress" extends="$unknown"
3398 uuid="D88B324F-DB19-4D3B-A1A9-BF5B127199A8"
3399 wsmap="struct"
3400 >
3401
3402 <desc>
3403 Address on the PCI bus.
3404 </desc>
3405
3406 <attribute name="bus" type="short">
3407 <desc>
3408 Bus number.
3409 </desc>
3410 </attribute>
3411
3412 <attribute name="device" type="short">
3413 <desc>
3414 Device number.
3415 </desc>
3416 </attribute>
3417
3418 <attribute name="devFunction" type="short">
3419 <desc>
3420 Device function number.
3421 </desc>
3422 </attribute>
3423
3424 <method name="asLong">
3425 <desc>
3426 Convert PCI address into long.
3427 </desc>
3428 <param name="result" type="long" dir="return" />
3429 </method>
3430
3431 <method name="fromLong">
3432 <desc>
3433 Make PCI address from long.
3434 </desc>
3435 <param name="number" type="long" dir="in" />
3436 </method>
3437 </interface>
3438
3439 <interface
3440 name="IPciDeviceAttachment" extends="$unknown"
3441 uuid="91f33d6f-e621-4f70-a77e-15f0e3c714d5"
3442 wsmap="struct"
3443 >
3444
3445 <desc>
3446 Information about PCI attachments.
3447 </desc>
3448
3449 <attribute name="name" type="wstring" readonly="yes">
3450 <desc>
3451 Device name.
3452 </desc>
3453 </attribute>
3454
3455 <attribute name="isPhysicalDevice" type="boolean" readonly="yes">
3456 <desc>
3457 If this is physical or virtual device.
3458 </desc>
3459 </attribute>
3460
3461 <attribute name="hostAddress" type="long" readonly="yes">
3462 <desc>
3463 Address of device on the host, applicable only to host devices.
3464 </desc>
3465 </attribute>
3466
3467 <attribute name="guestAddress" type="long" readonly="yes">
3468 <desc>
3469 Address of device on the guest.
3470 </desc>
3471 </attribute>
3472
3473 </interface>
3474
3475
3476 <interface
3477 name="IMachine" extends="$unknown"
3478 uuid="662c175e-a69d-40b8-a77a-1d719d0ab062"
3479 wsmap="managed"
3480 >
3481 <desc>
3482 The IMachine interface represents a virtual machine, or guest, created
3483 in VirtualBox.
3484
3485 This interface is used in two contexts. First of all, a collection of
3486 objects implementing this interface is stored in the
3487 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
3488 machines that are currently registered with this VirtualBox
3489 installation. Also, once a session has been opened for the given virtual
3490 machine (e.g. the virtual machine is running), the machine object
3491 associated with the open session can be queried from the session object;
3492 see <link to="ISession"/> for details.
3493
3494 The main role of this interface is to expose the settings of the virtual
3495 machine and provide methods to change various aspects of the virtual
3496 machine's configuration. For machine objects stored in the
3497 <link to="IVirtualBox::machines"/> collection, all attributes are
3498 read-only unless explicitly stated otherwise in individual attribute
3499 and method descriptions.
3500
3501 In order to change a machine setting, a session for this machine must be
3502 opened using one of the <link to="IMachine::lockMachine" /> or
3503 <link to="IMachine::launchVMProcess"/> methods. After the
3504 machine has been successfully locked for a session, a mutable machine object
3505 needs to be queried from the session object and then the desired settings
3506 changes can be applied to the returned object using IMachine attributes and
3507 methods. See the <link to="ISession"/> interface description for more
3508 information about sessions.
3509
3510 Note that IMachine does not provide methods to control virtual machine
3511 execution (such as start the machine, or power it down) -- these methods
3512 are grouped in a separate interface called <link to="IConsole" />.
3513
3514 <see>ISession, IConsole</see>
3515 </desc>
3516
3517 <attribute name="parent" type="IVirtualBox" readonly="yes">
3518 <desc>Associated parent object.</desc>
3519 </attribute>
3520
3521 <attribute name="accessible" type="boolean" readonly="yes">
3522 <desc>
3523 Whether this virtual machine is currently accessible or not.
3524
3525 A machine is always deemed accessible unless it is registered <i>and</i>
3526 its settings file cannot be read or parsed (either because the file itself
3527 is unavailable or has invalid XML contents).
3528
3529 Every time this property is read, the accessibility state of
3530 this machine is re-evaluated. If the returned value is @c false,
3531 the <link to="#accessError"/> property may be used to get the
3532 detailed error information describing the reason of
3533 inaccessibility, including XML error messages.
3534
3535 When the machine is inaccessible, only the following properties
3536 can be used on it:
3537 <ul>
3538 <li><link to="#parent"/></li>
3539 <li><link to="#id"/></li>
3540 <li><link to="#settingsFilePath"/></li>
3541 <li><link to="#accessible"/></li>
3542 <li><link to="#accessError"/></li>
3543 </ul>
3544
3545 An attempt to access any other property or method will return
3546 an error.
3547
3548 The only possible action you can perform on an inaccessible
3549 machine is to unregister it using the
3550 <link to="IMachine::unregister"/> call (or, to check
3551 for the accessibility state once more by querying this
3552 property).
3553
3554 <note>
3555 In the current implementation, once this property returns
3556 @c true, the machine will never become inaccessible
3557 later, even if its settings file cannot be successfully
3558 read/written any more (at least, until the VirtualBox
3559 server is restarted). This limitation may be removed in
3560 future releases.
3561 </note>
3562 </desc>
3563 </attribute>
3564
3565 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3566 <desc>
3567 Error information describing the reason of machine
3568 inaccessibility.
3569
3570 Reading this property is only valid after the last call to
3571 <link to="#accessible"/> returned @c false (i.e. the
3572 machine is currently inaccessible). Otherwise, a @c null
3573 IVirtualBoxErrorInfo object will be returned.
3574 </desc>
3575 </attribute>
3576
3577 <attribute name="name" type="wstring">
3578 <desc>
3579 Name of the virtual machine.
3580
3581 Besides being used for human-readable identification purposes
3582 everywhere in VirtualBox, the virtual machine name is also used
3583 as a name of the machine's settings file and as a name of the
3584 subdirectory this settings file resides in. Thus, every time you
3585 change the value of this property, the settings file will be
3586 renamed once you call <link to="#saveSettings"/> to confirm the
3587 change. The containing subdirectory will be also renamed, but
3588 only if it has exactly the same name as the settings file
3589 itself prior to changing this property (for backward compatibility
3590 with previous API releases). The above implies the following
3591 limitations:
3592 <ul>
3593 <li>The machine name cannot be empty.</li>
3594 <li>The machine name can contain only characters that are valid
3595 file name characters according to the rules of the file
3596 system used to store VirtualBox configuration.</li>
3597 <li>You cannot have two or more machines with the same name
3598 if they use the same subdirectory for storing the machine
3599 settings files.</li>
3600 <li>You cannot change the name of the machine if it is running,
3601 or if any file in the directory containing the settings file
3602 is being used by another running machine or by any other
3603 process in the host operating system at a time when
3604 <link to="#saveSettings"/> is called.
3605 </li>
3606 </ul>
3607 If any of the above limitations are hit, <link to="#saveSettings"/>
3608 will return an appropriate error message explaining the exact
3609 reason and the changes you made to this machine will not be saved.
3610
3611 Starting with VirtualBox 4.0, a “.vbox” extension of the settings
3612 file is recommended, but not enforced. (Previous versions always
3613 used a generic ".xml" extension.)
3614 </desc>
3615 </attribute>
3616
3617 <attribute name="description" type="wstring">
3618 <desc>
3619 Description of the virtual machine.
3620
3621 The description attribute can contain any text and is
3622 typically used to describe the hardware and software
3623 configuration of the virtual machine in detail (i.e. network
3624 settings, versions of the installed software and so on).
3625 </desc>
3626 </attribute>
3627
3628 <attribute name="id" type="uuid" mod="string" readonly="yes">
3629 <desc>UUID of the virtual machine.</desc>
3630 </attribute>
3631
3632 <attribute name="OSTypeId" type="wstring">
3633 <desc>
3634 User-defined identifier of the Guest OS type.
3635 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
3636 an IGuestOSType object representing details about the given
3637 Guest OS type.
3638 <note>
3639 This value may differ from the value returned by
3640 <link to="IGuest::OSTypeId"/> if Guest Additions are
3641 installed to the guest OS.
3642 </note>
3643 </desc>
3644 </attribute>
3645
3646 <attribute name="HardwareVersion" type="wstring">
3647 <desc>Hardware version identifier. Internal use only for now.</desc>
3648 </attribute>
3649
3650 <attribute name="hardwareUUID" type="uuid" mod="string">
3651 <desc>
3652 The UUID presented to the guest via memory tables, hardware and guest
3653 properties. For most VMs this is the same as the @a id, but for VMs
3654 which have been cloned or teleported it may be the same as the source
3655 VM. This latter is because the guest shouldn't notice that it was
3656 cloned or teleported.
3657 </desc>
3658 </attribute>
3659
3660 <attribute name="CPUCount" type="unsigned long">
3661 <desc>Number of virtual CPUs in the VM.</desc>
3662 </attribute>
3663
3664 <attribute name="CPUHotPlugEnabled" type="boolean">
3665 <desc>
3666 This setting determines whether VirtualBox allows CPU
3667 hotplugging for this machine.</desc>
3668 </attribute>
3669
3670 <attribute name="CPUExecutionCap" type="unsigned long">
3671 <desc>
3672 Means to limit the number of CPU cycles a guest can use. The unit
3673 is percentage of host CPU cycles per second. The valid range
3674 is 1 - 100. 100 (the default) implies no limit.
3675 </desc>
3676 </attribute>
3677
3678 <attribute name="memorySize" type="unsigned long">
3679 <desc>System memory size in megabytes.</desc>
3680 </attribute>
3681
3682 <attribute name="memoryBalloonSize" type="unsigned long">
3683 <desc>Memory balloon size in megabytes.</desc>
3684 </attribute>
3685
3686 <attribute name="PageFusionEnabled" type="boolean">
3687 <desc>
3688 This setting determines whether VirtualBox allows page
3689 fusion for this machine (64 bits host only).
3690 </desc>
3691 </attribute>
3692
3693 <attribute name="VRAMSize" type="unsigned long">
3694 <desc>Video memory size in megabytes.</desc>
3695 </attribute>
3696
3697 <attribute name="accelerate3DEnabled" type="boolean" default="false">
3698 <desc>
3699 This setting determines whether VirtualBox allows this machine to make
3700 use of the 3D graphics support available on the host.</desc>
3701 </attribute>
3702
3703 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
3704 <desc>
3705 This setting determines whether VirtualBox allows this machine to make
3706 use of the 2D video acceleration support available on the host.</desc>
3707 </attribute>
3708
3709 <attribute name="monitorCount" type="unsigned long">
3710 <desc>
3711 Number of virtual monitors.
3712 <note>
3713 Only effective on Windows XP and later guests with
3714 Guest Additions installed.
3715 </note>
3716 </desc>
3717 </attribute>
3718
3719 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
3720 <desc>Object containing all BIOS settings.</desc>
3721 </attribute>
3722
3723 <attribute name="firmwareType" type="FirmwareType">
3724 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
3725 bootstrap in this VM.</desc>
3726 </attribute>
3727
3728 <attribute name="pointingHidType" type="PointingHidType">
3729 <desc>Type of pointing HID (such as mouse or tablet) used in this VM.
3730 The default is typically "PS2Mouse" but can vary depending on the
3731 requirements of the guest operating system.</desc>
3732 </attribute>
3733
3734 <attribute name="keyboardHidType" type="KeyboardHidType">
3735 <desc>Type of keyboard HID used in this VM.
3736 The default is typically "PS2Keyboard" but can vary depending on the
3737 requirements of the guest operating system.</desc>
3738 </attribute>
3739
3740 <attribute name="hpetEnabled" type="boolean">
3741 <desc>This attribute controls if High Precision Event Timer (HPET) is
3742 enabled in this VM. Use this property if you want to provide guests
3743 with additional time source, or if guest requires HPET to function correctly.
3744 Default is false.</desc>
3745 </attribute>
3746
3747 <attribute name="chipsetType" type="ChipsetType">
3748 <desc>Chipset type used in this VM.</desc>
3749 </attribute>
3750
3751 <attribute name="snapshotFolder" type="wstring">
3752 <desc>
3753 Full path to the directory used to store snapshot data
3754 (differencing media and saved state files) of this machine.
3755
3756 The initial value of this property is
3757 <tt>&lt;</tt><link to="#settingsFilePath">
3758 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3759 <link to="#id">machine_uuid</link>
3760 <tt>&gt;</tt>.
3761
3762 Currently, it is an error to try to change this property on
3763 a machine that has snapshots (because this would require to
3764 move possibly large files to a different location).
3765 A separate method will be available for this purpose later.
3766
3767 <note>
3768 Setting this property to @c null or to an empty string will restore
3769 the initial value.
3770 </note>
3771 <note>
3772 When setting this property, the specified path can be
3773 absolute (full path) or relative to the directory where the
3774 <link to="#settingsFilePath">machine settings file</link>
3775 is located. When reading this property, a full path is
3776 always returned.
3777 </note>
3778 <note>
3779 The specified path may not exist, it will be created
3780 when necessary.
3781 </note>
3782 </desc>
3783 </attribute>
3784
3785 <attribute name="VRDEServer" type="IVRDEServer" readonly="yes">
3786 <desc>VirtualBox Remote Desktop Extension (VRDE) server object.</desc>
3787 </attribute>
3788
3789 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
3790 <desc>Array of media attached to this machine.</desc>
3791 </attribute>
3792
3793 <attribute name="USBController" type="IUSBController" readonly="yes">
3794 <desc>
3795 Associated USB controller object.
3796
3797 <note>
3798 If USB functionality is not available in the given edition of
3799 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3800 </note>
3801 </desc>
3802 </attribute>
3803
3804 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3805 <desc>Associated audio adapter, always present.</desc>
3806 </attribute>
3807
3808 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
3809 <desc>Array of storage controllers attached to this machine.</desc>
3810 </attribute>
3811
3812 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3813 <desc>
3814 Full name of the file containing machine settings data.
3815 </desc>
3816 </attribute>
3817
3818 <attribute name="settingsModified" type="boolean" readonly="yes">
3819 <desc>
3820 Whether the settings of this machine have been modified
3821 (but neither yet saved nor discarded).
3822 <note>
3823 Reading this property is only valid on instances returned
3824 by <link to="ISession::machine"/> and on new machines
3825 created by <link to="IVirtualBox::createMachine"/> or opened
3826 by <link to="IVirtualBox::openMachine"/> but not
3827 yet registered, or on unregistered machines after calling
3828 <link to="IMachine::unregister"/>. For all other
3829 cases, the settings can never be modified.
3830 </note>
3831 <note>
3832 For newly created unregistered machines, the value of this
3833 property is always @c true until <link to="#saveSettings"/>
3834 is called (no matter if any machine settings have been
3835 changed after the creation or not). For opened machines
3836 the value is set to @c false (and then follows to normal rules).
3837 </note>
3838 </desc>
3839 </attribute>
3840
3841 <attribute name="sessionState" type="SessionState" readonly="yes">
3842 <desc>Current session state for this machine.</desc>
3843 </attribute>
3844
3845 <attribute name="sessionType" type="wstring" readonly="yes">
3846 <desc>
3847 Type of the session. If <link to="#sessionState"/> is
3848 Spawning or Locked, this attribute contains the
3849 same value as passed to the
3850 <link to="IMachine::launchVMProcess"/> method in the
3851 @a type parameter. If the session was used with
3852 <link to="IMachine::lockMachine" />, or if
3853 <link to="#sessionState"/> is SessionClosed, the value of this
3854 attribute is an empty string.
3855 </desc>
3856 </attribute>
3857
3858 <attribute name="sessionPid" type="unsigned long" readonly="yes">
3859 <desc>
3860 Identifier of the session process. This attribute contains the
3861 platform-dependent identifier of the process whose session was
3862 used with <link to="IMachine::lockMachine" /> call. The returned
3863 value is only valid if <link to="#sessionState"/> is Locked or
3864 Unlocking by the time this property is read.
3865 </desc>
3866 </attribute>
3867
3868 <attribute name="state" type="MachineState" readonly="yes">
3869 <desc>Current execution state of this machine.</desc>
3870 </attribute>
3871
3872 <attribute name="lastStateChange" type="long long" readonly="yes">
3873 <desc>
3874 Time stamp of the last execution state change,
3875 in milliseconds since 1970-01-01 UTC.
3876 </desc>
3877 </attribute>
3878
3879 <attribute name="stateFilePath" type="wstring" readonly="yes">
3880 <desc>
3881 Full path to the file that stores the execution state of
3882 the machine when it is in the <link to="MachineState_Saved"/> state.
3883 <note>
3884 When the machine is not in the Saved state, this attribute is
3885 an empty string.
3886 </note>
3887 </desc>
3888 </attribute>
3889
3890 <attribute name="logFolder" type="wstring" readonly="yes">
3891 <desc>
3892 Full path to the folder that stores a set of rotated log files
3893 recorded during machine execution. The most recent log file is
3894 named <tt>VBox.log</tt>, the previous log file is
3895 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
3896 in the current version).
3897 </desc>
3898 </attribute>
3899
3900 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
3901 <desc>
3902 Current snapshot of this machine. This is @c null if the machine
3903 currently has no snapshots. If it is not @c null, then it was
3904 set by one of <link to="IConsole::takeSnapshot" />,
3905 <link to="IConsole::deleteSnapshot" />
3906 or <link to="IConsole::restoreSnapshot" />, depending on which
3907 was called last. See <link to="ISnapshot"/> for details.
3908 </desc>
3909 </attribute>
3910
3911 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
3912 <desc>
3913 Number of snapshots taken on this machine. Zero means the
3914 machine doesn't have any snapshots.
3915 </desc>
3916 </attribute>
3917
3918 <attribute name="currentStateModified" type="boolean" readonly="yes">
3919 <desc>
3920 Returns @c true if the current state of the machine is not
3921 identical to the state stored in the current snapshot.
3922
3923 The current state is identical to the current snapshot only
3924 directly after one of the following calls are made:
3925
3926 <ul>
3927 <li><link to="IConsole::restoreSnapshot"/>
3928 </li>
3929 <li><link to="IConsole::takeSnapshot"/> (issued on a
3930 "powered off" or "saved" machine, for which
3931 <link to="#settingsModified"/> returns @c false)
3932 </li>
3933 </ul>
3934
3935 The current state remains identical until one of the following
3936 happens:
3937 <ul>
3938 <li>settings of the machine are changed</li>
3939 <li>the saved state is deleted</li>
3940 <li>the current snapshot is deleted</li>
3941 <li>an attempt to execute the machine is made</li>
3942 </ul>
3943
3944 <note>
3945 For machines that don't have snapshots, this property is
3946 always @c false.
3947 </note>
3948 </desc>
3949 </attribute>
3950
3951 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
3952 <desc>
3953 Collection of shared folders for this machine (permanent shared
3954 folders). These folders are shared automatically at machine startup
3955 and available only to the guest OS installed within this machine.
3956
3957 New shared folders are added to the collection using
3958 <link to="#createSharedFolder"/>. Existing shared folders can be
3959 removed using <link to="#removeSharedFolder"/>.
3960 </desc>
3961 </attribute>
3962
3963 <attribute name="clipboardMode" type="ClipboardMode">
3964 <desc>
3965 Synchronization mode between the host OS clipboard
3966 and the guest OS clipboard.
3967 </desc>
3968 </attribute>
3969
3970 <attribute name="guestPropertyNotificationPatterns" type="wstring">
3971 <desc>
3972 A comma-separated list of simple glob patterns. Changes to guest
3973 properties whose name matches one of the patterns will generate an
3974 <link to="IGuestPropertyChangedEvent"/> signal.
3975 </desc>
3976 </attribute>
3977
3978 <attribute name="teleporterEnabled" type="boolean">
3979 <desc>
3980 When set to @a true, the virtual machine becomes a target teleporter
3981 the next time it is powered on. This can only set to @a true when the
3982 VM is in the @a PoweredOff or @a Aborted state.
3983
3984 <!-- This property is automatically set to @a false when the VM is powered
3985 on. (bird: This doesn't work yet ) -->
3986 </desc>
3987 </attribute>
3988
3989 <attribute name="teleporterPort" type="unsigned long">
3990 <desc>
3991 The TCP port the target teleporter will listen for incoming
3992 teleportations on.
3993
3994 0 means the port is automatically selected upon power on. The actual
3995 value can be read from this property while the machine is waiting for
3996 incoming teleportations.
3997 </desc>
3998 </attribute>
3999
4000 <attribute name="teleporterAddress" type="wstring">
4001 <desc>
4002 The address the target teleporter will listen on. If set to an empty
4003 string, it will listen on all addresses.
4004 </desc>
4005 </attribute>
4006
4007 <attribute name="teleporterPassword" type="wstring">
4008 <desc>
4009 The password to check for on the target teleporter. This is just a
4010 very basic measure to prevent simple hacks and operators accidentally
4011 beaming a virtual machine to the wrong place.
4012 </desc>
4013 </attribute>
4014
4015 <attribute name="faultToleranceState" type="FaultToleranceState">
4016 <desc>
4017 Fault tolerance state; disabled, source or target.
4018 This property can be changed at any time. If you change it for a running
4019 VM, then the fault tolerance address and port must be set beforehand.
4020 </desc>
4021 </attribute>
4022
4023 <attribute name="faultTolerancePort" type="unsigned long">
4024 <desc>
4025 The TCP port the fault tolerance source or target will use for
4026 communication.
4027 </desc>
4028 </attribute>
4029
4030 <attribute name="faultToleranceAddress" type="wstring">
4031 <desc>
4032 The address the fault tolerance source or target.
4033 </desc>
4034 </attribute>
4035
4036 <attribute name="faultTolerancePassword" type="wstring">
4037 <desc>
4038 The password to check for on the standby VM. This is just a
4039 very basic measure to prevent simple hacks and operators accidentally
4040 choosing the wrong standby VM.
4041 </desc>
4042 </attribute>
4043
4044 <attribute name="faultToleranceSyncInterval" type="unsigned long">
4045 <desc>
4046 The interval in ms used for syncing the state between source and target.
4047 </desc>
4048 </attribute>
4049
4050 <attribute name="RTCUseUTC" type="boolean">
4051 <desc>
4052 When set to @a true, the RTC device of the virtual machine will run
4053 in UTC time, otherwise in local time. Especially Unix guests prefer
4054 the time in UTC.
4055 </desc>
4056 </attribute>
4057
4058 <attribute name="ioCacheEnabled" type="boolean">
4059 <desc>
4060 When set to @a true, the builtin I/O cache of the virtual machine
4061 will be enabled.
4062 </desc>
4063 </attribute>
4064
4065 <attribute name="ioCacheSize" type="unsigned long">
4066 <desc>
4067 Maximum size of the I/O cache in MB.
4068 </desc>
4069 </attribute>
4070
4071 <attribute name="bandwidthControl" type="IBandwidthControl" readonly="yes">
4072 <desc>
4073 Bandwidth control manager.
4074 </desc>
4075 </attribute>
4076
4077 <attribute name="pciDeviceAssignments" type="IPciDeviceAttachment" readonly="yes" safearray="yes">
4078 <desc>Array of PCI devices assigned to this machine, to get list of all PCI devices
4079 attached to the machine use IConsole::attachedPciDevices attribute, as
4080 this attribute is intended to list only devices additional to what
4081 described in virtual hardware config. Usually, this list keeps host's
4082 physical devices assigned to the particular machine.
4083 </desc>
4084 </attribute>
4085
4086 <method name="lockMachine">
4087 <desc>
4088 Locks the machine for the given session to enable the caller
4089 to make changes to the machine or start the VM or control
4090 VM execution.
4091
4092 There are two ways to lock a machine for such uses:
4093
4094 <ul>
4095 <li>If you want to make changes to the machine settings,
4096 you must obtain an exclusive write lock on the machine
4097 by setting @a lockType to @c Write.
4098
4099 This will only succeed if no other process has locked
4100 the machine to prevent conflicting changes. Only after
4101 an exclusive write lock has been obtained using this method, one
4102 can change all VM settings or execute the VM in the process
4103 space of the session object. (Note that the latter is only of
4104 interest if you actually want to write a new front-end for
4105 virtual machines; but this API gets called internally by
4106 the existing front-ends such as VBoxHeadless and the VirtualBox
4107 GUI to acquire a write lock on the machine that they are running.)
4108
4109 On success, write-locking the machine for a session creates
4110 a second copy of the IMachine object. It is this second object
4111 upon which changes can be made; in VirtualBox terminology, the
4112 second copy is "mutable". It is only this second, mutable machine
4113 object upon which you can call methods that change the
4114 machine state. After having called this method, you can
4115 obtain this second, mutable machine object using the
4116 <link to="ISession::machine" /> attribute.
4117 </li>
4118 <li>If you only want to check the machine state or control
4119 machine execution without actually changing machine
4120 settings (e.g. to get access to VM statistics or take
4121 a snapshot or save the machine state), then set the
4122 @a lockType argument to @c Shared.
4123
4124 If no other session has obtained a lock, you will obtain an
4125 exclusive write lock as described above. However, if another
4126 session has already obtained such a lock, then a link to that
4127 existing session will be established which allows you
4128 to control that existing session.
4129
4130 To find out which type of lock was obtained, you can
4131 inspect <link to="ISession::type" />, which will have been
4132 set to either @c WriteLock or @c Shared.
4133 </li>
4134 </ul>
4135
4136 In either case, you can get access to the <link to="IConsole" />
4137 object which controls VM execution.
4138
4139 Also in all of the above cases, one must always call
4140 <link to="ISession::unlockMachine" /> to release the lock on the machine, or
4141 the machine's state will eventually be set to "Aborted".
4142
4143 To change settings on a machine, the following sequence is typically
4144 performed:
4145
4146 <ol>
4147 <li>Call this method to obtain an exclusive write lock for the current session.</li>
4148
4149 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
4150
4151 <li>Change the settings of the machine by invoking IMachine methods.</li>
4152
4153 <li>Call <link to="IMachine::saveSettings" />.</li>
4154
4155 <li>Release the write lock by calling <link to="ISession::unlockMachine"/>.</li>
4156 </ol>
4157
4158 <result name="E_UNEXPECTED">
4159 Virtual machine not registered.
4160 </result>
4161 <result name="E_ACCESSDENIED">
4162 Process not started by OpenRemoteSession.
4163 </result>
4164 <result name="VBOX_E_INVALID_OBJECT_STATE">
4165 Session already open or being opened.
4166 </result>
4167 <result name="VBOX_E_VM_ERROR">
4168 Failed to assign machine to session.
4169 </result>
4170 </desc>
4171 <param name="session" type="ISession" dir="in">
4172 <desc>
4173 Session object for which the machine will be locked.
4174 </desc>
4175 </param>
4176 <param name="lockType" type="LockType" dir="in">
4177 <desc>
4178 If set to @c Write, then attempt to acquire an exclusive write lock or fail.
4179 If set to @c Shared, then either acquire an exclusive write lock or establish
4180 a link to an existing session.
4181 </desc>
4182 </param>
4183 </method>
4184
4185 <method name="launchVMProcess">
4186 <desc>
4187 Spawns a new process that will execute the virtual machine and obtains a shared
4188 lock on the machine for the calling session.
4189
4190 If launching the VM succeeds, the new VM process will create its own session
4191 and write-lock the machine for it, preventing conflicting changes from other
4192 processes. If the machine is already locked (because it is already running or
4193 because another session has a write lock), launching the VM process will therefore
4194 fail. Reversely, future attempts to obtain a write lock will also fail while the
4195 machine is running.
4196
4197 The caller's session object remains separate from the session opened by the new
4198 VM process. It receives its own <link to="IConsole" /> object which can be used
4199 to control machine execution, but it cannot be used to change all VM settings
4200 which would be available after a <link to="#lockMachine" /> call.
4201
4202 The caller must eventually release the session's shared lock by calling
4203 <link to="ISession::unlockMachine" /> on the local session object once this call
4204 has returned. However, the session's state (see <link to="ISession::state" />)
4205 will not return to "Unlocked" until the remote session has also unlocked
4206 the machine (i.e. the machine has stopped running).
4207
4208 Launching a VM process can take some time (a new VM is started in a new process,
4209 for which memory and other resources need to be set up). Because of this,
4210 an <link to="IProgress" /> object is returned to allow the caller to wait
4211 for this asynchronous operation to be completed. Until then, the caller's
4212 session object remains in the "Unlocked" state, and its <link to="ISession::machine" />
4213 and <link to="ISession::console" /> attributes cannot be accessed.
4214 It is recommended to use <link to="IProgress::waitForCompletion" /> or
4215 similar calls to wait for completion. Completion is signalled when the VM
4216 is powered on. If launching the VM fails, error messages can be queried
4217 via the progress object, if available.
4218
4219 The progress object will have at least 2 sub-operations. The first
4220 operation covers the period up to the new VM process calls powerUp.
4221 The subsequent operations mirror the <link to="IConsole::powerUp"/>
4222 progress object. Because <link to="IConsole::powerUp"/> may require
4223 some extra sub-operations, the <link to="IProgress::operationCount"/>
4224 may change at the completion of operation.
4225
4226 For details on the teleportation progress operation, see
4227 <link to="IConsole::powerUp"/>.
4228
4229 The @a environment argument is a string containing definitions of
4230 environment variables in the following format:
4231 @code
4232 NAME[=VALUE]\n
4233 NAME[=VALUE]\n
4234 ...
4235 @endcode
4236 where <tt>\\n</tt> is the new line character. These environment
4237 variables will be appended to the environment of the VirtualBox server
4238 process. If an environment variable exists both in the server process
4239 and in this list, the value from this list takes precedence over the
4240 server's variable. If the value of the environment variable is
4241 omitted, this variable will be removed from the resulting environment.
4242 If the environment string is @c null or empty, the server environment
4243 is inherited by the started process as is.
4244
4245 <result name="E_UNEXPECTED">
4246 Virtual machine not registered.
4247 </result>
4248 <result name="E_INVALIDARG">
4249 Invalid session type @a type.
4250 </result>
4251 <result name="VBOX_E_OBJECT_NOT_FOUND">
4252 No machine matching @a machineId found.
4253 </result>
4254 <result name="VBOX_E_INVALID_OBJECT_STATE">
4255 Session already open or being opened.
4256 </result>
4257 <result name="VBOX_E_IPRT_ERROR">
4258 Launching process for machine failed.
4259 </result>
4260 <result name="VBOX_E_VM_ERROR">
4261 Failed to assign machine to session.
4262 </result>
4263 </desc>
4264 <param name="session" type="ISession" dir="in">
4265 <desc>
4266 Client session object to which the VM process will be connected (this
4267 must be in "Unlocked" state).
4268 </desc>
4269 </param>
4270 <param name="type" type="wstring" dir="in">
4271 <desc>
4272 Front-end to use for the new VM process. The following are currently supported:
4273 <ul>
4274 <li><tt>"gui"</tt>: VirtualBox Qt GUI front-end</li>
4275 <li><tt>"headless"</tt>: VBoxHeadless (VRDE Server) front-end</li>
4276 <li><tt>"sdl"</tt>: VirtualBox SDL front-end</li>
4277 </ul>
4278 </desc>
4279 </param>
4280 <param name="environment" type="wstring" dir="in">
4281 <desc>
4282 Environment to pass to the VM process.
4283 </desc>
4284 </param>
4285 <param name="progress" type="IProgress" dir="return">
4286 <desc>Progress object to track the operation completion.</desc>
4287 </param>
4288 </method>
4289
4290 <method name="setBootOrder">
4291 <desc>
4292 Puts the given device to the specified position in
4293 the boot order.
4294
4295 To indicate that no device is associated with the given position,
4296 <link to="DeviceType_Null"/> should be used.
4297
4298 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4299
4300 <result name="E_INVALIDARG">
4301 Boot @a position out of range.
4302 </result>
4303 <result name="E_NOTIMPL">
4304 Booting from USB @a device currently not supported.
4305 </result>
4306
4307 </desc>
4308 <param name="position" type="unsigned long" dir="in">
4309 <desc>
4310 Position in the boot order (@c 1 to the total number of
4311 devices the machine can boot from, as returned by
4312 <link to="ISystemProperties::maxBootPosition"/>).
4313 </desc>
4314 </param>
4315 <param name="device" type="DeviceType" dir="in">
4316 <desc>
4317 The type of the device used to boot at the given position.
4318 </desc>
4319 </param>
4320 </method>
4321
4322 <method name="getBootOrder" const="yes">
4323 <desc>
4324 Returns the device type that occupies the specified
4325 position in the boot order.
4326
4327 @todo [remove?]
4328 If the machine can have more than one device of the returned type
4329 (such as hard disks), then a separate method should be used to
4330 retrieve the individual device that occupies the given position.
4331
4332 If here are no devices at the given position, then
4333 <link to="DeviceType_Null"/> is returned.
4334
4335 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4336
4337 <result name="E_INVALIDARG">
4338 Boot @a position out of range.
4339 </result>
4340
4341 </desc>
4342 <param name="position" type="unsigned long" dir="in">
4343 <desc>
4344 Position in the boot order (@c 1 to the total number of
4345 devices the machine can boot from, as returned by
4346 <link to="ISystemProperties::maxBootPosition"/>).
4347 </desc>
4348 </param>
4349 <param name="device" type="DeviceType" dir="return">
4350 <desc>
4351 Device at the given position.
4352 </desc>
4353 </param>
4354 </method>
4355
4356 <method name="attachDevice">
4357 <desc>
4358 Attaches a device and optionally mounts a medium to the given storage
4359 controller (<link to="IStorageController" />, identified by @a name),
4360 at the indicated port and device.
4361
4362 This method is intended for managing storage devices in general while a
4363 machine is powered off. It can be used to attach and detach fixed
4364 and removeable media. The following kind of media can be attached
4365 to a machine:
4366
4367 <ul>
4368 <li>For fixed and removable media, you can pass in a medium that was
4369 previously opened using <link to="IVirtualBox::openMedium" />.
4370 </li>
4371
4372 <li>Only for storage devices supporting removable media (such as
4373 DVDs and floppies), you can also specify a null pointer to
4374 indicate an empty drive or one of the medium objects listed
4375 in the <link to="IHost::DVDDrives" /> and <link to="IHost::floppyDrives"/>
4376 arrays to indicate a host drive.
4377 For removeable devices, you can also use <link to="IMachine::mountMedium"/>
4378 to change the media while the machine is running.
4379 </li>
4380 </ul>
4381
4382 In a VM's default configuration of virtual machines, the secondary
4383 master of the IDE controller is used for a CD/DVD drive.
4384
4385 After calling this returns successfully, a new instance of
4386 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4387 attachments (see <link to="IMachine::mediumAttachments"/>).
4388
4389 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4390 information about attaching media.
4391
4392 The specified device slot must not have a device attached to it,
4393 or this method will fail.
4394
4395 <note>
4396 You cannot attach a device to a newly created machine until
4397 this machine's settings are saved to disk using
4398 <link to="#saveSettings"/>.
4399 </note>
4400 <note>
4401 If the medium is being attached indirectly, a new differencing medium
4402 will implicitly be created for it and attached instead. If the
4403 changes made to the machine settings (including this indirect
4404 attachment) are later cancelled using <link to="#discardSettings"/>,
4405 this implicitly created differencing medium will implicitly
4406 be deleted.
4407 </note>
4408
4409 <result name="E_INVALIDARG">
4410 SATA device, SATA port, IDE port or IDE slot out of range, or
4411 file or UUID not found.
4412 </result>
4413 <result name="VBOX_E_INVALID_OBJECT_STATE">
4414 Machine must be registered before media can be attached.
4415 </result>
4416 <result name="VBOX_E_INVALID_VM_STATE">
4417 Invalid machine state.
4418 </result>
4419 <result name="VBOX_E_OBJECT_IN_USE">
4420 A medium is already attached to this or another virtual machine.
4421 </result>
4422
4423 </desc>
4424 <param name="name" type="wstring" dir="in">
4425 <desc>Name of the storage controller to attach the device to.</desc>
4426 </param>
4427 <param name="controllerPort" type="long" dir="in">
4428 <desc>Port to attach the device to. For an IDE controller, 0 specifies
4429 the primary controller and 1 specifies the secondary controller.
4430 For a SCSI controller, this must range from 0 to 15; for a SATA controller,
4431 from 0 to 29; for an SAS controller, from 0 to 7.</desc>
4432 </param>
4433 <param name="device" type="long" dir="in">
4434 <desc>Device slot in the given port to attach the device to. This is only
4435 relevant for IDE controllers, for which 0 specifies the master device and
4436 1 specifies the slave device. For all other controller types, this must
4437 be 0.</desc>
4438 </param>
4439 <param name="type" type="DeviceType" dir="in">
4440 <desc>Device type of the attached device. For media opened by
4441 <link to="IVirtualBox::openMedium" />, this must match the device type
4442 specified there.</desc>
4443 </param>
4444 <param name="medium" type="IMedium" dir="in">
4445 <desc>Medium to mount or NULL for an empty drive.</desc>
4446 </param>
4447 </method>
4448
4449 <method name="detachDevice">
4450 <desc>
4451 Detaches the device attached to a device slot of the specified bus.
4452
4453 Detaching the device from the virtual machine is deferred. This means
4454 that the medium remains associated with the machine when this method
4455 returns and gets actually de-associated only after a successful
4456 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4457 for more detailed information about attaching media.
4458
4459 <note>
4460 You cannot detach a device from a running machine.
4461 </note>
4462 <note>
4463 Detaching differencing media implicitly created by <link
4464 to="#attachDevice"/> for the indirect attachment using this
4465 method will <b>not</b> implicitly delete them. The
4466 <link to="IMedium::deleteStorage"/> operation should be
4467 explicitly performed by the caller after the medium is successfully
4468 detached and the settings are saved with
4469 <link to="#saveSettings"/>, if it is the desired action.
4470 </note>
4471
4472 <result name="VBOX_E_INVALID_VM_STATE">
4473 Attempt to detach medium from a running virtual machine.
4474 </result>
4475 <result name="VBOX_E_OBJECT_NOT_FOUND">
4476 No medium attached to given slot/bus.
4477 </result>
4478 <result name="VBOX_E_NOT_SUPPORTED">
4479 Medium format does not support storage deletion.
4480 </result>
4481
4482 </desc>
4483 <param name="name" type="wstring" dir="in">
4484 <desc>Name of the storage controller to detach the medium from.</desc>
4485 </param>
4486 <param name="controllerPort" type="long" dir="in">
4487 <desc>Port number to detach the medium from.</desc>
4488 </param>
4489 <param name="device" type="long" dir="in">
4490 <desc>Device slot number to detach the medium from.</desc>
4491 </param>
4492 </method>
4493
4494 <method name="passthroughDevice">
4495 <desc>
4496 Sets the passthrough mode of an existing DVD device. Changing the
4497 setting while the VM is running is forbidden. The setting is only used
4498 if at VM start the device is configured as a host DVD drive, in all
4499 other cases it is ignored. The device must already exist; see
4500 <link to="IMachine::attachDevice"/> for how to attach a new device.
4501
4502 The @a controllerPort and @a device parameters specify the device slot and
4503 have have the same meaning as with <link to="IMachine::attachDevice" />.
4504
4505 <result name="E_INVALIDARG">
4506 SATA device, SATA port, IDE port or IDE slot out of range.
4507 </result>
4508 <result name="VBOX_E_INVALID_OBJECT_STATE">
4509 Attempt to modify an unregistered virtual machine.
4510 </result>
4511 <result name="VBOX_E_INVALID_VM_STATE">
4512 Invalid machine state.
4513 </result>
4514
4515 </desc>
4516 <param name="name" type="wstring" dir="in">
4517 <desc>Name of the storage controller.</desc>
4518 </param>
4519 <param name="controllerPort" type="long" dir="in">
4520 <desc>Storage controller port.</desc>
4521 </param>
4522 <param name="device" type="long" dir="in">
4523 <desc>Device slot in the given port.</desc>
4524 </param>
4525 <param name="passthrough" type="boolean" dir="in">
4526 <desc>New value for the passthrough setting.</desc>
4527 </param>
4528 </method>
4529
4530 <method name="setBandwidthGroupForDevice">
4531 <desc>
4532 Sets the passthrough mode of an existing DVD device. Changing the
4533 setting while the VM is running is forbidden. The setting is only used
4534 if at VM start the device is configured as a host DVD drive, in all
4535 other cases it is ignored. The device must already exist; see
4536 <link to="IMachine::attachDevice"/> for how to attach a new device.
4537
4538 The @a controllerPort and @a device parameters specify the device slot and
4539 have have the same meaning as with <link to="IMachine::attachDevice" />.
4540
4541 <result name="E_INVALIDARG">
4542 SATA device, SATA port, IDE port or IDE slot out of range.
4543 </result>
4544 <result name="VBOX_E_INVALID_OBJECT_STATE">
4545 Attempt to modify an unregistered virtual machine.
4546 </result>
4547 <result name="VBOX_E_INVALID_VM_STATE">
4548 Invalid machine state.
4549 </result>
4550
4551 </desc>
4552 <param name="name" type="wstring" dir="in">
4553 <desc>Name of the storage controller.</desc>
4554 </param>
4555 <param name="controllerPort" type="long" dir="in">
4556 <desc>Storage controller port.</desc>
4557 </param>
4558 <param name="device" type="long" dir="in">
4559 <desc>Device slot in the given port.</desc>
4560 </param>
4561 <param name="bandwidthGroup" type="IBandwidthGroup" dir="in">
4562 <desc>New value for the bandwidth group or NULL for no group.</desc>
4563 </param>
4564 </method>
4565
4566 <method name="mountMedium">
4567 <desc>
4568 Mounts a medium (<link to="IMedium" />, identified
4569 by the given UUID @a id) to the given storage controller
4570 (<link to="IStorageController" />, identified by @a name),
4571 at the indicated port and device. The device must already exist;
4572 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4573
4574 This method is intended only for managing removable media, where the
4575 device is fixed but media is changeable at runtime (such as DVDs
4576 and floppies). It cannot be used for fixed media such as hard disks.
4577
4578 The @a controllerPort and @a device parameters specify the device slot and
4579 have have the same meaning as with <link to="IMachine::attachDevice" />.
4580
4581 The specified device slot can have a medium mounted, which will be
4582 unmounted first. Specifying a zero UUID (or an empty string) for
4583 @a medium does just an unmount.
4584
4585 See <link to="IMedium"/> for more detailed information about
4586 attaching media.
4587
4588 <result name="E_INVALIDARG">
4589 SATA device, SATA port, IDE port or IDE slot out of range.
4590 </result>
4591 <result name="VBOX_E_INVALID_OBJECT_STATE">
4592 Attempt to attach medium to an unregistered virtual machine.
4593 </result>
4594 <result name="VBOX_E_INVALID_VM_STATE">
4595 Invalid machine state.
4596 </result>
4597 <result name="VBOX_E_OBJECT_IN_USE">
4598 Medium already attached to this or another virtual machine.
4599 </result>
4600
4601 </desc>
4602 <param name="name" type="wstring" dir="in">
4603 <desc>Name of the storage controller to attach the medium to.</desc>
4604 </param>
4605 <param name="controllerPort" type="long" dir="in">
4606 <desc>Port to attach the medium to.</desc>
4607 </param>
4608 <param name="device" type="long" dir="in">
4609 <desc>Device slot in the given port to attach the medium to.</desc>
4610 </param>
4611 <param name="medium" type="IMedium" dir="in">
4612 <desc>Medium to mount or NULL for an empty drive.</desc>
4613 </param>
4614 <param name="force" type="boolean" dir="in">
4615 <desc>Allows to force unmount/mount of a medium which is locked by
4616 the device slot in the given port to attach the medium to.</desc>
4617 </param>
4618 </method>
4619
4620 <method name="getMedium" const="yes">
4621 <desc>
4622 Returns the virtual medium attached to a device slot of the specified
4623 bus.
4624
4625 Note that if the medium was indirectly attached by
4626 <link to="#mountMedium"/> to the given device slot then this
4627 method will return not the same object as passed to the
4628 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4629 more detailed information about mounting a medium.
4630
4631 <result name="VBOX_E_OBJECT_NOT_FOUND">
4632 No medium attached to given slot/bus.
4633 </result>
4634
4635 </desc>
4636 <param name="name" type="wstring" dir="in">
4637 <desc>Name of the storage controller the medium is attached to.</desc>
4638 </param>
4639 <param name="controllerPort" type="long" dir="in">
4640 <desc>Port to query.</desc>
4641 </param>
4642 <param name="device" type="long" dir="in">
4643 <desc>Device slot in the given port to query.</desc>
4644 </param>
4645 <param name="medium" type="IMedium" dir="return">
4646 <desc>Attached medium object.</desc>
4647 </param>
4648 </method>
4649
4650 <method name="getMediumAttachmentsOfController" const="yes">
4651 <desc>
4652 Returns an array of medium attachments which are attached to the
4653 the controller with the given name.
4654
4655 <result name="VBOX_E_OBJECT_NOT_FOUND">
4656 A storage controller with given name doesn't exist.
4657 </result>
4658 </desc>
4659 <param name="name" type="wstring" dir="in"/>
4660 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4661 </method>
4662
4663 <method name="getMediumAttachment" const="yes">
4664 <desc>
4665 Returns a medium attachment which corresponds to the controller with
4666 the given name, on the given port and device slot.
4667
4668 <result name="VBOX_E_OBJECT_NOT_FOUND">
4669 No attachment exists for the given controller/port/device combination.
4670 </result>
4671 </desc>
4672 <param name="name" type="wstring" dir="in"/>
4673 <param name="controllerPort" type="long" dir="in"/>
4674 <param name="device" type="long" dir="in"/>
4675 <param name="attachment" type="IMediumAttachment" dir="return"/>
4676 </method>
4677
4678 <method name="attachHostPciDevice">
4679 <desc>
4680 Attaches host PCI device with the given (host) PCI address to the
4681 PCI bus of the virtual machine. Please note, that this operation
4682 is two phase, as real attachment will happen when VM will start,
4683 and most information will be delivered as IHostPciDevicePlugEvent
4684 on IVirtualBox event source.
4685 <note>
4686 Not yet implemented.
4687 </note>
4688
4689 <see>IHostPciDevicePlugEvent</see>
4690
4691 <result name="VBOX_E_INVALID_VM_STATE">
4692 Virtual machine state is not stopped (PCI hotplug not yet implemented).
4693 </result>
4694 <result name="VBOX_E_PDM_ERROR">
4695 Virtual machine does not have a PCI controller allowing attachment of physical devices.
4696 </result>
4697 <result name="VBOX_E_NOT_SUPPORTED">
4698 Hardware or host OS doesn't allow PCI device passthrought.
4699 </result>
4700 </desc>
4701 <param name="hostAddress" type="long" dir="in">
4702 <desc>Address of the host PCI device.</desc>
4703 </param>
4704 <param name="desiredGuestAddress" type="long" dir="in">
4705 <desc>Desired position of this device on guest PCI bus.</desc>
4706 </param>
4707 <param name="eventContext" type="IEventContext" dir="in">
4708 <desc>Context passed into IHostPciDevicePlugEvent event.</desc>
4709 </param>
4710 <param name="tryToUnbind" type="boolean" dir="in">
4711 <desc>If VMM shall try to unbind existing drivers from the
4712 device before attaching it to the guest.</desc>
4713 </param>
4714 </method>
4715
4716 <method name="detachHostPciDevice">
4717 <desc>
4718 Detach host PCI device from the virtual machine.
4719 Also HostPciDevicePlugEvent on IVirtualBox event source
4720 will be delivered.
4721
4722 <note>
4723 Not yet implemented.
4724 </note>
4725
4726 <see>IHostPciDevicePlugEvent</see>
4727
4728 <result name="VBOX_E_INVALID_VM_STATE">
4729 Virtual machine state is not stopped (PCI hotplug not yet implemented).
4730 </result>
4731 <result name="VBOX_E_OBJECT_NOT_FOUND">
4732 This host device is not attached to this machine.
4733 </result>
4734 <result name="VBOX_E_PDM_ERROR">
4735 Virtual machine does not have a PCI controller allowing attachment of physical devices.
4736 </result>
4737 <result name="VBOX_E_NOT_SUPPORTED">
4738 Hardware or host OS doesn't allow PCI device passthrought.
4739 </result>
4740 </desc>
4741 <param name="hostAddress" type="long" dir="in">
4742 <desc>Address of the host PCI device.</desc>
4743 </param>
4744 </method>
4745
4746 <method name="getNetworkAdapter" const="yes">
4747 <desc>
4748 Returns the network adapter associated with the given slot.
4749 Slots are numbered sequentially, starting with zero. The total
4750 number of adapters per machine is defined by the
4751 <link to="ISystemProperties::networkAdapterCount"/> property,
4752 so the maximum slot number is one less than that property's value.
4753
4754 <result name="E_INVALIDARG">
4755 Invalid @a slot number.
4756 </result>
4757
4758 </desc>
4759 <param name="slot" type="unsigned long" dir="in"/>
4760 <param name="adapter" type="INetworkAdapter" dir="return"/>
4761 </method>
4762
4763 <method name="addStorageController">
4764 <desc>
4765 Adds a new storage controller (SCSI, SAS or SATA controller) to the
4766 machine and returns it as an instance of
4767 <link to="IStorageController" />.
4768
4769 @a name identifies the controller for subsequent calls such as
4770 <link to="#getStorageControllerByName" />,
4771 <link to="#getStorageControllerByInstance" />,
4772 <link to="#removeStorageController" />,
4773 <link to="#attachDevice" /> or <link to="#mountMedium" />.
4774
4775 After the controller has been added, you can set its exact
4776 type by setting the <link to="IStorageController::controllerType" />.
4777
4778 <result name="VBOX_E_OBJECT_IN_USE">
4779 A storage controller with given name exists already.
4780 </result>
4781 <result name="E_INVALIDARG">
4782 Invalid @a controllerType.
4783 </result>
4784 </desc>
4785 <param name="name" type="wstring" dir="in"/>
4786 <param name="connectionType" type="StorageBus" dir="in"/>
4787 <param name="controller" type="IStorageController" dir="return"/>
4788 </method>
4789
4790 <method name="getStorageControllerByName" const="yes">
4791 <desc>
4792 Returns a storage controller with the given name.
4793
4794 <result name="VBOX_E_OBJECT_NOT_FOUND">
4795 A storage controller with given name doesn't exist.
4796 </result>
4797 </desc>
4798 <param name="name" type="wstring" dir="in"/>
4799 <param name="storageController" type="IStorageController" dir="return"/>
4800 </method>
4801
4802 <method name="getStorageControllerByInstance" const="yes">
4803 <desc>
4804 Returns a storage controller with the given instance number.
4805
4806 <result name="VBOX_E_OBJECT_NOT_FOUND">
4807 A storage controller with given instance number doesn't exist.
4808 </result>
4809 </desc>
4810 <param name="instance" type="unsigned long" dir="in"/>
4811 <param name="storageController" type="IStorageController" dir="return"/>
4812 </method>
4813
4814 <method name="removeStorageController">
4815 <desc>
4816 Removes a storage controller from the machine.
4817
4818 <result name="VBOX_E_OBJECT_NOT_FOUND">
4819 A storage controller with given name doesn't exist.
4820 </result>
4821 </desc>
4822 <param name="name" type="wstring" dir="in"/>
4823 </method>
4824
4825 <method name="setStorageControllerBootable">
4826 <desc>
4827 Sets the bootable flag of the storage controller with the given name.
4828
4829 <result name="VBOX_E_OBJECT_NOT_FOUND">
4830 A storage controller with given name doesn't exist.
4831 </result>
4832 <result name="VBOX_E_OBJECT_IN_USE">
4833 Another storage controller is marked as bootable already.
4834 </result>
4835 </desc>
4836 <param name="name" type="wstring" dir="in"/>
4837 <param name="bootable" type="boolean" dir="in"/>
4838 </method>
4839
4840 <method name="getSerialPort" const="yes">
4841 <desc>
4842 Returns the serial port associated with the given slot.
4843 Slots are numbered sequentially, starting with zero. The total
4844 number of serial ports per machine is defined by the
4845 <link to="ISystemProperties::serialPortCount"/> property,
4846 so the maximum slot number is one less than that property's value.
4847
4848 <result name="E_INVALIDARG">
4849 Invalid @a slot number.
4850 </result>
4851
4852 </desc>
4853 <param name="slot" type="unsigned long" dir="in"/>
4854 <param name="port" type="ISerialPort" dir="return"/>
4855 </method>
4856
4857 <method name="getParallelPort" const="yes">
4858 <desc>
4859 Returns the parallel port associated with the given slot.
4860 Slots are numbered sequentially, starting with zero. The total
4861 number of parallel ports per machine is defined by the
4862 <link to="ISystemProperties::parallelPortCount"/> property,
4863 so the maximum slot number is one less than that property's value.
4864
4865 <result name="E_INVALIDARG">
4866 Invalid @a slot number.
4867 </result>
4868
4869 </desc>
4870 <param name="slot" type="unsigned long" dir="in"/>
4871 <param name="port" type="IParallelPort" dir="return"/>
4872 </method>
4873
4874 <method name="getExtraDataKeys">
4875 <desc>
4876 Returns an array representing the machine-specific extra data keys
4877 which currently have values defined.
4878 </desc>
4879 <param name="value" type="wstring" dir="return" safearray="yes">
4880 <desc>Array of extra data keys.</desc>
4881 </param>
4882 </method>
4883
4884 <method name="getExtraData">
4885 <desc>
4886 Returns associated machine-specific extra data.
4887
4888 If the requested data @a key does not exist, this function will
4889 succeed and return an empty string in the @a value argument.
4890
4891 <result name="VBOX_E_FILE_ERROR">
4892 Settings file not accessible.
4893 </result>
4894 <result name="VBOX_E_XML_ERROR">
4895 Could not parse the settings file.
4896 </result>
4897
4898 </desc>
4899 <param name="key" type="wstring" dir="in">
4900 <desc>Name of the data key to get.</desc>
4901 </param>
4902 <param name="value" type="wstring" dir="return">
4903 <desc>Value of the requested data key.</desc>
4904 </param>
4905 </method>
4906
4907 <method name="setExtraData">
4908 <desc>
4909 Sets associated machine-specific extra data.
4910
4911 If you pass @c null or an empty string as a key @a value, the given
4912 @a key will be deleted.
4913
4914 <note>
4915 Before performing the actual data change, this method will ask all
4916 registered listeners using the
4917 <link to="IExtraDataCanChangeEvent"/>
4918 notification for a permission. If one of the listeners refuses the
4919 new value, the change will not be performed.
4920 </note>
4921 <note>
4922 On success, the
4923 <link to="IExtraDataChangedEvent"/> notification
4924 is called to inform all registered listeners about a successful data
4925 change.
4926 </note>
4927 <note>
4928 This method can be called outside the machine session and therefore
4929 it's a caller's responsibility to handle possible race conditions
4930 when several clients change the same key at the same time.
4931 </note>
4932
4933 <result name="VBOX_E_FILE_ERROR">
4934 Settings file not accessible.
4935 </result>
4936 <result name="VBOX_E_XML_ERROR">
4937 Could not parse the settings file.
4938 </result>
4939
4940 </desc>
4941 <param name="key" type="wstring" dir="in">
4942 <desc>Name of the data key to set.</desc>
4943 </param>
4944 <param name="value" type="wstring" dir="in">
4945 <desc>Value to assign to the key.</desc>
4946 </param>
4947 </method>
4948
4949 <method name="getCPUProperty" const="yes">
4950 <desc>
4951 Returns the virtual CPU boolean value of the specified property.
4952
4953 <result name="E_INVALIDARG">
4954 Invalid property.
4955 </result>
4956
4957 </desc>
4958 <param name="property" type="CPUPropertyType" dir="in">
4959 <desc>
4960 Property type to query.
4961 </desc>
4962 </param>
4963 <param name="value" type="boolean" dir="return">
4964 <desc>
4965 Property value.
4966 </desc>
4967 </param>
4968 </method>
4969
4970 <method name="setCPUProperty">
4971 <desc>
4972 Sets the virtual CPU boolean value of the specified property.
4973
4974 <result name="E_INVALIDARG">
4975 Invalid property.
4976 </result>
4977
4978 </desc>
4979 <param name="property" type="CPUPropertyType" dir="in">
4980 <desc>
4981 Property type to query.
4982 </desc>
4983 </param>
4984 <param name="value" type="boolean" dir="in">
4985 <desc>
4986 Property value.
4987 </desc>
4988 </param>
4989 </method>
4990
4991 <method name="getCPUIDLeaf" const="yes">
4992 <desc>
4993 Returns the virtual CPU cpuid information for the specified leaf.
4994
4995 Currently supported index values for cpuid:
4996 Standard CPUID leafs: 0 - 0xA
4997 Extended CPUID leafs: 0x80000000 - 0x8000000A
4998
4999 See the Intel and AMD programmer's manuals for detailed information
5000 about the cpuid instruction and its leafs.
5001 <result name="E_INVALIDARG">
5002 Invalid id.
5003 </result>
5004
5005 </desc>
5006 <param name="id" type="unsigned long" dir="in">
5007 <desc>
5008 CPUID leaf index.
5009 </desc>
5010 </param>
5011 <param name="valEax" type="unsigned long" dir="out">
5012 <desc>
5013 CPUID leaf value for register eax.
5014 </desc>
5015 </param>
5016 <param name="valEbx" type="unsigned long" dir="out">
5017 <desc>
5018 CPUID leaf value for register ebx.
5019 </desc>
5020 </param>
5021 <param name="valEcx" type="unsigned long" dir="out">
5022 <desc>
5023 CPUID leaf value for register ecx.
5024 </desc>
5025 </param>
5026 <param name="valEdx" type="unsigned long" dir="out">
5027 <desc>
5028 CPUID leaf value for register edx.
5029 </desc>
5030 </param>
5031 </method>
5032
5033 <method name="setCPUIDLeaf">
5034 <desc>
5035 Sets the virtual CPU cpuid information for the specified leaf. Note that these values
5036 are not passed unmodified. VirtualBox clears features that it doesn't support.
5037
5038 Currently supported index values for cpuid:
5039 Standard CPUID leafs: 0 - 0xA
5040 Extended CPUID leafs: 0x80000000 - 0x8000000A
5041
5042 See the Intel and AMD programmer's manuals for detailed information
5043 about the cpuid instruction and its leafs.
5044
5045 Do not use this method unless you know exactly what you're doing. Misuse can lead to
5046 random crashes inside VMs.
5047 <result name="E_INVALIDARG">
5048 Invalid id.
5049 </result>
5050
5051 </desc>
5052 <param name="id" type="unsigned long" dir="in">
5053 <desc>
5054 CPUID leaf index.
5055 </desc>
5056 </param>
5057 <param name="valEax" type="unsigned long" dir="in">
5058 <desc>
5059 CPUID leaf value for register eax.
5060 </desc>
5061 </param>
5062 <param name="valEbx" type="unsigned long" dir="in">
5063 <desc>
5064 CPUID leaf value for register ebx.
5065 </desc>
5066 </param>
5067 <param name="valEcx" type="unsigned long" dir="in">
5068 <desc>
5069 CPUID leaf value for register ecx.
5070 </desc>
5071 </param>
5072 <param name="valEdx" type="unsigned long" dir="in">
5073 <desc>
5074 CPUID leaf value for register edx.
5075 </desc>
5076 </param>
5077 </method>
5078
5079 <method name="removeCPUIDLeaf">
5080 <desc>
5081 Removes the virtual CPU cpuid leaf for the specified index
5082
5083 <result name="E_INVALIDARG">
5084 Invalid id.
5085 </result>
5086
5087 </desc>
5088 <param name="id" type="unsigned long" dir="in">
5089 <desc>
5090 CPUID leaf index.
5091 </desc>
5092 </param>
5093 </method>
5094
5095 <method name="removeAllCPUIDLeaves">
5096 <desc>
5097 Removes all the virtual CPU cpuid leaves
5098 </desc>
5099 </method>
5100
5101 <method name="getHWVirtExProperty" const="yes">
5102 <desc>
5103 Returns the value of the specified hardware virtualization boolean property.
5104
5105 <result name="E_INVALIDARG">
5106 Invalid property.
5107 </result>
5108
5109 </desc>
5110 <param name="property" type="HWVirtExPropertyType" dir="in">
5111 <desc>
5112 Property type to query.
5113 </desc>
5114 </param>
5115 <param name="value" type="boolean" dir="return">
5116 <desc>
5117 Property value.
5118 </desc>
5119 </param>
5120 </method>
5121
5122 <method name="setHWVirtExProperty">
5123 <desc>
5124 Sets a new value for the specified hardware virtualization boolean property.
5125
5126 <result name="E_INVALIDARG">
5127 Invalid property.
5128 </result>
5129
5130 </desc>
5131 <param name="property" type="HWVirtExPropertyType" dir="in">
5132 <desc>
5133 Property type to set.
5134 </desc>
5135 </param>
5136 <param name="value" type="boolean" dir="in">
5137 <desc>
5138 New property value.
5139 </desc>
5140 </param>
5141 </method>
5142
5143 <method name="saveSettings">
5144 <desc>
5145 Saves any changes to machine settings made since the session
5146 has been opened or a new machine has been created, or since the
5147 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
5148 For registered machines, new settings become visible to all
5149 other VirtualBox clients after successful invocation of this
5150 method.
5151 <note>
5152 The method sends <link to="IMachineDataChangedEvent"/>
5153 notification event after the configuration has been successfully
5154 saved (only for registered machines).
5155 </note>
5156 <note>
5157 Calling this method is only valid on instances returned
5158 by <link to="ISession::machine"/> and on new machines
5159 created by <link to="IVirtualBox::createMachine"/> but not
5160 yet registered, or on unregistered machines after calling
5161 <link to="IMachine::unregister"/>.
5162 </note>
5163
5164 <result name="VBOX_E_FILE_ERROR">
5165 Settings file not accessible.
5166 </result>
5167 <result name="VBOX_E_XML_ERROR">
5168 Could not parse the settings file.
5169 </result>
5170 <result name="E_ACCESSDENIED">
5171 Modification request refused.
5172 </result>
5173
5174 </desc>
5175 </method>
5176
5177 <method name="discardSettings">
5178 <desc>
5179 Discards any changes to the machine settings made since the session
5180 has been opened or since the last call to <link to="#saveSettings"/>
5181 or <link to="#discardSettings"/>.
5182 <note>
5183 Calling this method is only valid on instances returned
5184 by <link to="ISession::machine"/> and on new machines
5185 created by <link to="IVirtualBox::createMachine"/> or
5186 opened by <link to="IVirtualBox::openMachine"/> but not
5187 yet registered, or on unregistered machines after calling
5188 <link to="IMachine::unregister"/>.
5189 </note>
5190
5191 <result name="VBOX_E_INVALID_VM_STATE">
5192 Virtual machine is not mutable.
5193 </result>
5194
5195 </desc>
5196 </method>
5197
5198 <method name="unregister">
5199 <desc>
5200 Unregisters the machine, which must have been previously registered using
5201 <link to="IVirtualBox::registerMachine"/>, and optionally do additional
5202 cleanup before the machine is unregistered.
5203
5204 This method does not delete any files. It only changes the machine configuration and
5205 the list of registered machines in the VirtualBox object. To delete the files which
5206 belonged to the machine, including the XML file of the machine itself, call
5207 <link to="#delete"/>, optionally with the array of IMedium objects which was returned
5208 from this method.
5209
5210 How thoroughly this method cleans up the machine configuration before unregistering
5211 the machine depends on the @a cleanupMode argument.
5212
5213 <ul>
5214 <li>With "UnregisterOnly", the machine will only be unregistered, but no additional
5215 cleanup will be performed. The call will fail if the machine is in "Saved" state
5216 or has any snapshots or any media attached (see <link to="IMediumAttachment" />.
5217 It is the responsibility of the caller to delete all such configuration in this mode.
5218 In this mode, the API behaves like the former @c IVirtualBox::unregisterMachine() API
5219 which it replaces.</li>
5220 <li>With "DetachAllReturnNone", the call will succeed even if the machine is in "Saved"
5221 state or if it has snapshots or media attached. All media attached to the current machine
5222 state or in snapshots will be detached. No medium objects will be returned; all of the
5223 machine's media will remain open.</li>
5224 <li>With "DetachAllReturnHardDisksOnly", the call will behave like with "DetachAllReturnNone",
5225 except that all the hard disk medium objects which were detached from the machine will
5226 be returned as an array. This allows for quickly passing them to the <link to="#delete" />
5227 API for closing and deletion.</li>
5228 <li>With "Full", the call will behave like with "DetachAllReturnHardDisksOnly", except
5229 that all media will be returned in the array, including removeable media like DVDs and
5230 floppies. This might be useful if the user wants to inspect in detail which media were
5231 attached to the machine. Be careful when passing the media array to <link to="#delete" />
5232 in that case because users will typically want to preserve ISO and RAW image files.</li>
5233 </ul>
5234
5235 This API does not verify whether the media files returned in the array are still
5236 attached to other machines (i.e. shared between several machines). If such a shared
5237 image is passed to <link to="#delete" /> however, closing the image will fail there
5238 and the image will be silently skipped.
5239
5240 A typical implementation will use "DetachAllReturnHardDisksOnly" and then pass the
5241 resulting IMedia array to <link to="#delete"/>. This way, the machine is completely
5242 deleted with all its saved states and hard disk images, but images for removeable
5243 drives (such as ISO and RAW files) will remain on disk.
5244
5245 The call will fail if the machine is currently locked (see <link to="ISession" />).
5246 It implicitly calls <link to="#saveSettings"/> to save all current machine settings
5247 before unregistering it.
5248
5249 After successful method invocation, the <link to="IMachineRegisteredEvent"/> event
5250 is fired.
5251
5252 <note>
5253 If the given machine is inaccessible (see <link to="#accessible"/>), it
5254 will be unregistered and fully uninitialized right afterwards. As a result,
5255 the returned machine object will be unusable and an attempt to call
5256 <b>any</b> method will return the "Object not ready" error.
5257 </note>
5258
5259 <result name="VBOX_E_INVALID_OBJECT_STATE">
5260 Machine is currently locked for a session.
5261 </result>
5262 </desc>
5263
5264 <param name="cleanupMode" type="CleanupMode" dir="in">
5265 <desc>How to clean up after the machine has been unregistered.</desc>
5266 </param>
5267 <param name="aMedia" type="IMedium" safearray="yes" dir="return">
5268 <desc>List of media detached from the machine, depending on the @a cleanupMode parameter.</desc>
5269 </param>
5270 </method>
5271
5272 <method name="delete">
5273 <desc>
5274 Deletes the files associated with this machine from disk. If medium objects are passed
5275 in with the @a aMedia argument, they are closed and, if closing was successful, their
5276 storage files are deleted as well. For convenience, this array of media files can be
5277 the same as the one returned from a previous <link to="#unregister" /> call.
5278
5279 This method must only be called on machines which are either write-locked (i.e. on instances
5280 returned by <link to="ISession::machine"/>) or on unregistered machines (i.e. not yet
5281 registered machines created by <link to="IVirtualBox::createMachine"/> or opened by
5282 <link to="IVirtualBox::openMachine"/>, or after having called <link to="#unregister"/>).
5283
5284 The following files will be deleted by this method:
5285 <ul>
5286 <li>If <link to="#unregister" /> had been previously called with a @a cleanupMode
5287 argument other than "UnregisterOnly", this will delete all saved state files that
5288 the machine had in use; possibly one if the machine was in "Saved" state and one
5289 for each online snapshot that the machine had.</li>
5290 <li>On each medium object passed in the @a aMedia array, this will call
5291 <link to="IMedium::close" />. If that succeeds, this will attempt to delete the
5292 medium's storage on disk. Since the close() call will fail if the medium is still
5293 in use, e.g. because it is still attached to a second machine; in that case the
5294 storage will not be deleted.</li>
5295 <li>Finally, the machine's own XML file will be deleted.</li>
5296 </ul>
5297
5298 Since deleting large disk image files can be a time-consuming I/O operation, this
5299 method operates asynchronously and returns an IProgress object to allow the caller
5300 to monitor the progress. There will be one sub-operation for each file that is
5301 being deleted (saved state or medium storage file).
5302
5303 <note>
5304 <link to="#settingsModified"/> will return @c true after this
5305 method successfully returns.
5306 </note>
5307
5308 <result name="VBOX_E_INVALID_VM_STATE">
5309 Machine is registered but not write-locked.
5310 </result>
5311 <result name="VBOX_E_IPRT_ERROR">
5312 Could not delete the settings file.
5313 </result>
5314 </desc>
5315 <param name="aMedia" type="IMedium" safearray="yes" dir="in">
5316 <desc>List of media to be closed and whose storage files will be deleted.</desc>
5317 </param>
5318 <param name="aProgress" type="IProgress" dir="return">
5319 <desc>Progress object to track the operation completion.</desc>
5320 </param>
5321 </method>
5322
5323 <method name="export">
5324 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5325 steps required to export VirtualBox machines to OVF.
5326 </desc>
5327
5328 <param name="aAppliance" type="IAppliance" dir="in">
5329 <desc>Appliance to export this machine to.</desc>
5330 </param>
5331 <param name="location" type="wstring" dir="in">
5332 <desc>The target location.</desc>
5333 </param>
5334 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5335 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5336 </param>
5337 </method >
5338
5339 <method name="findSnapshot">
5340 <desc>
5341 Returns a snapshot of this machine with the given name or UUID.
5342
5343 Returns a snapshot of this machine with the given UUID.
5344 A @c null argument can be used to obtain the first snapshot
5345 taken on this machine. This is useful if you want to traverse
5346 the whole tree of snapshots starting from the root.
5347
5348 <result name="VBOX_E_OBJECT_NOT_FOUND">
5349 Virtual machine has no snapshots or snapshot not found.
5350 </result>
5351
5352 </desc>
5353 <param name="nameOrId" type="wstring" dir="in">
5354 <desc>What to search for. Name or UUID of the snapshot to find</desc>
5355 </param>
5356 <param name="snapshot" type="ISnapshot" dir="return">
5357 <desc>Snapshot object with the given name.</desc>
5358 </param>
5359 </method>
5360
5361 <method name="createSharedFolder">
5362 <desc>
5363 Creates a new permanent shared folder by associating the given logical
5364 name with the given host path, adds it to the collection of shared
5365 folders and starts sharing it. Refer to the description of
5366 <link to="ISharedFolder"/> to read more about logical names.
5367
5368 <result name="VBOX_E_OBJECT_IN_USE">
5369 Shared folder already exists.
5370 </result>
5371 <result name="VBOX_E_FILE_ERROR">
5372 Shared folder @a hostPath not accessible.
5373 </result>
5374
5375 </desc>
5376 <param name="name" type="wstring" dir="in">
5377 <desc>Unique logical name of the shared folder.</desc>
5378 </param>
5379 <param name="hostPath" type="wstring" dir="in">
5380 <desc>Full path to the shared folder in the host file system.</desc>
5381 </param>
5382 <param name="writable" type="boolean" dir="in">
5383 <desc>Whether the share is writable or readonly.</desc>
5384 </param>
5385 <param name="automount" type="boolean" dir="in">
5386 <desc>Whether the share gets automatically mounted by the guest
5387 or not.</desc>
5388 </param>
5389 </method>
5390
5391 <method name="removeSharedFolder">
5392 <desc>
5393 Removes the permanent shared folder with the given name previously
5394 created by <link to="#createSharedFolder"/> from the collection of
5395 shared folders and stops sharing it.
5396
5397 <result name="VBOX_E_INVALID_VM_STATE">
5398 Virtual machine is not mutable.
5399 </result>
5400 <result name="VBOX_E_OBJECT_NOT_FOUND">
5401 Shared folder @a name does not exist.
5402 </result>
5403
5404 </desc>
5405 <param name="name" type="wstring" dir="in">
5406 <desc>Logical name of the shared folder to remove.</desc>
5407 </param>
5408 </method>
5409
5410 <method name="canShowConsoleWindow">
5411 <desc>
5412 Returns @c true if the VM console process can activate the
5413 console window and bring it to foreground on the desktop of
5414 the host PC.
5415 <note>
5416 This method will fail if a session for this machine is not
5417 currently open.
5418 </note>
5419
5420 <result name="VBOX_E_INVALID_VM_STATE">
5421 Machine session is not open.
5422 </result>
5423
5424 </desc>
5425 <param name="canShow" type="boolean" dir="return">
5426 <desc>
5427 @c true if the console window can be shown and @c false otherwise.
5428 </desc>
5429 </param>
5430 </method>
5431
5432 <method name="showConsoleWindow">
5433 <desc>
5434 Activates the console window and brings it to foreground on
5435 the desktop of the host PC. Many modern window managers on
5436 many platforms implement some sort of focus stealing
5437 prevention logic, so that it may be impossible to activate
5438 a window without the help of the currently active
5439 application. In this case, this method will return a non-zero
5440 identifier that represents the top-level window of the VM
5441 console process. The caller, if it represents a currently
5442 active process, is responsible to use this identifier (in a
5443 platform-dependent manner) to perform actual window
5444 activation.
5445 <note>
5446 This method will fail if a session for this machine is not
5447 currently open.
5448 </note>
5449
5450 <result name="VBOX_E_INVALID_VM_STATE">
5451 Machine session is not open.
5452 </result>
5453
5454 </desc>
5455 <param name="winId" type="long long" dir="return">
5456 <desc>
5457 Platform-dependent identifier of the top-level VM console
5458 window, or zero if this method has performed all actions
5459 necessary to implement the <i>show window</i> semantics for
5460 the given platform and/or VirtualBox front-end.
5461 </desc>
5462 </param>
5463 </method>
5464
5465 <method name="getGuestProperty" const="yes">
5466 <desc>
5467 Reads an entry from the machine's guest property store.
5468
5469 <result name="VBOX_E_INVALID_VM_STATE">
5470 Machine session is not open.
5471 </result>
5472
5473 </desc>
5474 <param name="name" type="wstring" dir="in">
5475 <desc>
5476 The name of the property to read.
5477 </desc>
5478 </param>
5479 <param name="value" type="wstring" dir="out">
5480 <desc>
5481 The value of the property. If the property does not exist then this
5482 will be empty.
5483 </desc>
5484 </param>
5485 <param name="timestamp" type="long long" dir="out">
5486 <desc>
5487 The time at which the property was last modified, as seen by the
5488 server process.
5489 </desc>
5490 </param>
5491 <param name="flags" type="wstring" dir="out">
5492 <desc>
5493 Additional property parameters, passed as a comma-separated list of
5494 "name=value" type entries.
5495 </desc>
5496 </param>
5497 </method>
5498
5499 <method name="getGuestPropertyValue" const="yes">
5500 <desc>
5501 Reads a value from the machine's guest property store.
5502
5503 <result name="VBOX_E_INVALID_VM_STATE">
5504 Machine session is not open.
5505 </result>
5506
5507 </desc>
5508 <param name="property" type="wstring" dir="in">
5509 <desc>
5510 The name of the property to read.
5511 </desc>
5512 </param>
5513 <param name="value" type="wstring" dir="return">
5514 <desc>
5515 The value of the property. If the property does not exist then this
5516 will be empty.
5517 </desc>
5518 </param>
5519 </method>
5520
5521 <method name="getGuestPropertyTimestamp" const="yes">
5522 <desc>
5523 Reads a property timestamp from the machine's guest property store.
5524
5525 <result name="VBOX_E_INVALID_VM_STATE">
5526 Machine session is not open.
5527 </result>
5528
5529 </desc>
5530 <param name="property" type="wstring" dir="in">
5531 <desc>
5532 The name of the property to read.
5533 </desc>
5534 </param>
5535 <param name="value" type="long long" dir="return">
5536 <desc>
5537 The timestamp. If the property does not exist then this will be
5538 empty.
5539 </desc>
5540 </param>
5541 </method>
5542
5543 <method name="setGuestProperty">
5544 <desc>
5545 Sets, changes or deletes an entry in the machine's guest property
5546 store.
5547
5548 <result name="E_ACCESSDENIED">
5549 Property cannot be changed.
5550 </result>
5551 <result name="E_INVALIDARG">
5552 Invalid @a flags.
5553 </result>
5554 <result name="VBOX_E_INVALID_VM_STATE">
5555 Virtual machine is not mutable or session not open.
5556 </result>
5557 <result name="VBOX_E_INVALID_OBJECT_STATE">
5558 Cannot set transient property when machine not running.
5559 </result>
5560
5561 </desc>
5562 <param name="property" type="wstring" dir="in">
5563 <desc>
5564 The name of the property to set, change or delete.
5565 </desc>
5566 </param>
5567 <param name="value" type="wstring" dir="in">
5568 <desc>
5569 The new value of the property to set, change or delete. If the
5570 property does not yet exist and value is non-empty, it will be
5571 created. If the value is @c null or empty, the property will be
5572 deleted if it exists.
5573 </desc>
5574 </param>
5575 <param name="flags" type="wstring" dir="in">
5576 <desc>
5577 Additional property parameters, passed as a comma-separated list of
5578 "name=value" type entries.
5579 </desc>
5580 </param>
5581 </method>
5582
5583 <method name="setGuestPropertyValue">
5584 <desc>
5585 Sets, changes or deletes a value in the machine's guest property
5586 store. The flags field will be left unchanged or created empty for a
5587 new property.
5588
5589 <result name="E_ACCESSDENIED">
5590 Property cannot be changed.
5591 </result>
5592 <result name="VBOX_E_INVALID_VM_STATE">
5593 Virtual machine is not mutable or session not open.
5594 </result>
5595 <result name="VBOX_E_INVALID_OBJECT_STATE">
5596 Cannot set transient property when machine not running.
5597 </result>
5598 </desc>
5599
5600 <param name="property" type="wstring" dir="in">
5601 <desc>
5602 The name of the property to set, change or delete.
5603 </desc>
5604 </param>
5605 <param name="value" type="wstring" dir="in">
5606 <desc>
5607 The new value of the property to set, change or delete. If the
5608 property does not yet exist and value is non-empty, it will be
5609 created. If the value is @c null or empty, the property will be
5610 deleted if it exists.
5611 </desc>
5612 </param>
5613 </method>
5614
5615 <method name="enumerateGuestProperties">
5616 <desc>
5617 Return a list of the guest properties matching a set of patterns along
5618 with their values, time stamps and flags.
5619 </desc>
5620 <param name="patterns" type="wstring" dir="in">
5621 <desc>
5622 The patterns to match the properties against, separated by '|'
5623 characters. If this is empty or @c null, all properties will match.
5624 </desc>
5625 </param>
5626 <param name="name" type="wstring" dir="out" safearray="yes">
5627 <desc>
5628 The names of the properties returned.
5629 </desc>
5630 </param>
5631 <param name="value" type="wstring" dir="out" safearray="yes">
5632 <desc>
5633 The values of the properties returned. The array entries match the
5634 corresponding entries in the @a name array.
5635 </desc>
5636 </param>
5637 <param name="timestamp" type="long long" dir="out" safearray="yes">
5638 <desc>
5639 The time stamps of the properties returned. The array entries match
5640 the corresponding entries in the @a name array.
5641 </desc>
5642 </param>
5643 <param name="flags" type="wstring" dir="out" safearray="yes">
5644 <desc>
5645 The flags of the properties returned. The array entries match the
5646 corresponding entries in the @a name array.
5647 </desc>
5648 </param>
5649 </method>
5650
5651 <method name="querySavedGuestSize">
5652 <desc>
5653 Returns the guest dimensions from the saved state.
5654 </desc>
5655 <param name="screenId" type="unsigned long" dir="in">
5656 <desc>
5657 Saved guest screen to query info from.
5658 </desc>
5659 </param>
5660 <param name="width" type="unsigned long" dir="out">
5661 <desc>
5662 Guest width at the time of the saved state was taken.
5663 </desc>
5664 </param>
5665 <param name="height" type="unsigned long" dir="out">
5666 <desc>
5667 Guest height at the time of the saved state was taken.
5668 </desc>
5669 </param>
5670 </method>
5671
5672 <method name="querySavedThumbnailSize">
5673 <desc>
5674 Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.
5675 </desc>
5676 <param name="screenId" type="unsigned long" dir="in">
5677 <desc>
5678 Saved guest screen to query info from.
5679 </desc>
5680 </param>
5681 <param name="size" type="unsigned long" dir="out">
5682 <desc>
5683 Size of buffer required to store the bitmap.
5684 </desc>
5685 </param>
5686 <param name="width" type="unsigned long" dir="out">
5687 <desc>
5688 Bitmap width.
5689 </desc>
5690 </param>
5691 <param name="height" type="unsigned long" dir="out">
5692 <desc>
5693 Bitmap height.
5694 </desc>
5695 </param>
5696 </method>
5697
5698 <method name="readSavedThumbnailToArray">
5699 <desc>
5700 Thumbnail is retrieved to an array of bytes in uncompressed 32-bit BGRA or RGBA format.
5701 </desc>
5702 <param name="screenId" type="unsigned long" dir="in">
5703 <desc>
5704 Saved guest screen to read from.
5705 </desc>
5706 </param>
5707 <param name="BGR" type="boolean" dir="in">
5708 <desc>
5709 How to order bytes in the pixel. A pixel consists of 4 bytes. If this parameter is true, then
5710 bytes order is: B, G, R, 0xFF. If this parameter is false, then bytes order is: R, G, B, 0xFF.
5711 </desc>
5712 </param>
5713 <param name="width" type="unsigned long" dir="out">
5714 <desc>
5715 Bitmap width.
5716 </desc>
5717 </param>
5718 <param name="height" type="unsigned long" dir="out">
5719 <desc>
5720 Bitmap height.
5721 </desc>
5722 </param>
5723 <param name="data" type="octet" safearray="yes" dir="return">
5724 <desc>
5725 Array with resulting bitmap data.
5726 </desc>
5727 </param>
5728 </method>
5729
5730 <method name="readSavedThumbnailPNGToArray">
5731 <desc>
5732 Thumbnail in PNG format is retrieved to an array of bytes.
5733 </desc>
5734 <param name="screenId" type="unsigned long" dir="in">
5735 <desc>
5736 Saved guest screen to read from.
5737 </desc>
5738 </param>
5739 <param name="width" type="unsigned long" dir="out">
5740 <desc>
5741 Image width.
5742 </desc>
5743 </param>
5744 <param name="height" type="unsigned long" dir="out">
5745 <desc>
5746 Image height.
5747 </desc>
5748 </param>
5749 <param name="data" type="octet" dir="return" safearray="yes">
5750 <desc>
5751 Array with resulting PNG data.
5752 </desc>
5753 </param>
5754 </method>
5755
5756 <method name="querySavedScreenshotPNGSize">
5757 <desc>
5758 Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.
5759 </desc>
5760 <param name="screenId" type="unsigned long" dir="in">
5761 <desc>
5762 Saved guest screen to query info from.
5763 </desc>
5764 </param>
5765 <param name="size" type="unsigned long" dir="out">
5766 <desc>
5767 Size of buffer required to store the PNG binary data.
5768 </desc>
5769 </param>
5770 <param name="width" type="unsigned long" dir="out">
5771 <desc>
5772 Image width.
5773 </desc>
5774 </param>
5775 <param name="height" type="unsigned long" dir="out">
5776 <desc>
5777 Image height.
5778 </desc>
5779 </param>
5780 </method>
5781
5782 <method name="readSavedScreenshotPNGToArray">
5783 <desc>
5784 Screenshot in PNG format is retrieved to an array of bytes.
5785 </desc>
5786 <param name="screenId" type="unsigned long" dir="in">
5787 <desc>
5788 Saved guest screen to read from.
5789 </desc>
5790 </param>
5791 <param name="width" type="unsigned long" dir="out">
5792 <desc>
5793 Image width.
5794 </desc>
5795 </param>
5796 <param name="height" type="unsigned long" dir="out">
5797 <desc>
5798 Image height.
5799 </desc>
5800 </param>
5801 <param name="data" type="octet" dir="return" safearray="yes">
5802 <desc>
5803 Array with resulting PNG data.
5804 </desc>
5805 </param>
5806 </method>
5807
5808 <method name="hotPlugCPU">
5809 <desc>
5810 Plugs a CPU into the machine.
5811 </desc>
5812 <param name="cpu" type="unsigned long" dir="in">
5813 <desc>
5814 The CPU id to insert.
5815 </desc>
5816 </param>
5817 </method>
5818
5819 <method name="hotUnplugCPU">
5820 <desc>
5821 Removes a CPU from the machine.
5822 </desc>
5823 <param name="cpu" type="unsigned long" dir="in">
5824 <desc>
5825 The CPU id to remove.
5826 </desc>
5827 </param>
5828 </method>
5829
5830 <method name="getCPUStatus">
5831 <desc>
5832 Returns the current status of the given CPU.
5833 </desc>
5834 <param name="cpu" type="unsigned long" dir="in">
5835 <desc>
5836 The CPU id to check for.
5837 </desc>
5838 </param>
5839 <param name="attached" type="boolean" dir="return">
5840 <desc>
5841 Status of the CPU.
5842 </desc>
5843 </param>
5844 </method>
5845
5846 <method name="queryLogFilename">
5847 <desc>
5848 Queries for the VM log file name of an given index. Returns an empty
5849 string if a log file with that index doesn't exists.
5850 </desc>
5851 <param name="idx" type="unsigned long" dir="in">
5852 <desc>
5853 Which log file name to query. 0=current log file.
5854 </desc>
5855 </param>
5856 <param name="filename" type="wstring" dir="return">
5857 <desc>
5858 On return the full path to the log file or an empty string on error.
5859 </desc>
5860 </param>
5861 </method>
5862
5863 <method name="readLog">
5864 <desc>
5865 Reads the VM log file. The chunk size is limited, so even if you
5866 ask for a big piece there might be less data returned.
5867 </desc>
5868 <param name="idx" type="unsigned long" dir="in">
5869 <desc>
5870 Which log file to read. 0=current log file.
5871 </desc>
5872 </param>
5873 <param name="offset" type="long long" dir="in">
5874 <desc>
5875 Offset in the log file.
5876 </desc>
5877 </param>
5878 <param name="size" type="long long" dir="in">
5879 <desc>
5880 Chunk size to read in the log file.
5881 </desc>
5882 </param>
5883 <param name="data" type="octet" dir="return" safearray="yes">
5884 <desc>
5885 Data read from the log file. A data size of 0 means end of file
5886 if the requested chunk size was not 0. This is the unprocessed
5887 file data, i.e. the line ending style depends on the platform of
5888 the system the server is running on.
5889 </desc>
5890 </param>
5891 </method>
5892 </interface>
5893
5894 <!--
5895 // IConsole
5896 /////////////////////////////////////////////////////////////////////////
5897 -->
5898
5899 <interface
5900 name="IVRDEServerInfo" extends="$unknown"
5901 uuid="714434a1-58c3-4aab-9049-7652c5df113b"
5902 wsmap="struct"
5903 >
5904 <desc>
5905 Contains information about the remote desktop (VRDE) server capabilities and status.
5906 This is used in the <link to="IConsole::VRDEServerInfo" /> attribute.
5907 </desc>
5908
5909 <attribute name="active" type="boolean" readonly="yes">
5910 <desc>
5911 Whether the remote desktop connection is active.
5912 </desc>
5913 </attribute>
5914
5915 <attribute name="port" type="long" readonly="yes">
5916 <desc>
5917 VRDE server port number. If this property is equal to <tt>0</tt>, then
5918 the VRDE server failed to start, usually because there are no free IP
5919 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDE
5920 server has not yet been started.
5921 </desc>
5922 </attribute>
5923
5924 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5925 <desc>
5926 How many times a client connected.
5927 </desc>
5928 </attribute>
5929
5930 <attribute name="beginTime" type="long long" readonly="yes">
5931 <desc>
5932 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5933 </desc>
5934 </attribute>
5935
5936 <attribute name="endTime" type="long long" readonly="yes">
5937 <desc>
5938 When the last connection was terminated or the current time, if
5939 connection is still active, in milliseconds since 1970-01-01 UTC.
5940 </desc>
5941 </attribute>
5942
5943 <attribute name="bytesSent" type="long long" readonly="yes">
5944 <desc>
5945 How many bytes were sent in last or current, if still active, connection.
5946 </desc>
5947 </attribute>
5948
5949 <attribute name="bytesSentTotal" type="long long" readonly="yes">
5950 <desc>
5951 How many bytes were sent in all connections.
5952 </desc>
5953 </attribute>
5954
5955 <attribute name="bytesReceived" type="long long" readonly="yes">
5956 <desc>
5957 How many bytes were received in last or current, if still active, connection.
5958 </desc>
5959 </attribute>
5960
5961 <attribute name="bytesReceivedTotal" type="long long" readonly="yes">
5962 <desc>
5963 How many bytes were received in all connections.
5964 </desc>
5965 </attribute>
5966
5967 <attribute name="user" type="wstring" readonly="yes">
5968 <desc>
5969 Login user name supplied by the client.
5970 </desc>
5971 </attribute>
5972
5973 <attribute name="domain" type="wstring" readonly="yes">
5974 <desc>
5975 Login domain name supplied by the client.
5976 </desc>
5977 </attribute>
5978
5979 <attribute name="clientName" type="wstring" readonly="yes">
5980 <desc>
5981 The client name supplied by the client.
5982 </desc>
5983 </attribute>
5984
5985 <attribute name="clientIP" type="wstring" readonly="yes">
5986 <desc>
5987 The IP address of the client.
5988 </desc>
5989 </attribute>
5990
5991 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5992 <desc>
5993 The client software version number.
5994 </desc>
5995 </attribute>
5996
5997 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5998 <desc>
5999 Public key exchange method used when connection was established.
6000 Values: 0 - RDP4 public key exchange scheme.
6001 1 - X509 certificates were sent to client.
6002 </desc>
6003 </attribute>
6004
6005 </interface>
6006
6007 <interface
6008 name="IConsole" extends="$unknown"
6009 uuid="515e8e8d-f932-4d8e-9f32-79a52aead882"
6010 wsmap="managed"
6011 >
6012 <desc>
6013 The IConsole interface represents an interface to control virtual
6014 machine execution.
6015
6016 A console object gets created when a machine has been locked for a
6017 particular session (client process) using <link to="IMachine::lockMachine" />
6018 or <link to="IMachine::launchVMProcess"/>. The console object can
6019 then be found in the session's <link to="ISession::console" /> attribute.
6020
6021 Methods of the IConsole interface allow the caller to query the current
6022 virtual machine execution state, pause the machine or power it down, save
6023 the machine state or take a snapshot, attach and detach removable media
6024 and so on.
6025
6026 <see>ISession</see>
6027 </desc>
6028
6029 <attribute name="machine" type="IMachine" readonly="yes">
6030 <desc>
6031 Machine object for this console session.
6032 <note>
6033 This is a convenience property, it has the same value as
6034 <link to="ISession::machine"/> of the corresponding session
6035 object.
6036 </note>
6037 </desc>
6038 </attribute>
6039
6040 <attribute name="state" type="MachineState" readonly="yes">
6041 <desc>
6042 Current execution state of the machine.
6043 <note>
6044 This property always returns the same value as the corresponding
6045 property of the IMachine object for this console session.
6046 For the process that owns (executes) the VM, this is the
6047 preferable way of querying the VM state, because no IPC
6048 calls are made.
6049 </note>
6050 </desc>
6051 </attribute>
6052
6053 <attribute name="guest" type="IGuest" readonly="yes">
6054 <desc>Guest object.</desc>
6055 </attribute>
6056
6057 <attribute name="keyboard" type="IKeyboard" readonly="yes">
6058 <desc>
6059 Virtual keyboard object.
6060 <note>
6061 If the machine is not running, any attempt to use
6062 the returned object will result in an error.
6063 </note>
6064 </desc>
6065 </attribute>
6066
6067 <attribute name="mouse" type="IMouse" readonly="yes">
6068 <desc>
6069 Virtual mouse object.
6070 <note>
6071 If the machine is not running, any attempt to use
6072 the returned object will result in an error.
6073 </note>
6074 </desc>
6075 </attribute>
6076
6077 <attribute name="display" type="IDisplay" readonly="yes">
6078 <desc>Virtual display object.
6079 <note>
6080 If the machine is not running, any attempt to use
6081 the returned object will result in an error.
6082 </note>
6083 </desc>
6084 </attribute>
6085
6086 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6087 <desc>Debugging interface.</desc>
6088 </attribute>
6089
6090 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6091 <desc>
6092 Collection of USB devices currently attached to the virtual
6093 USB controller.
6094 <note>
6095 The collection is empty if the machine is not running.
6096 </note>
6097 </desc>
6098 </attribute>
6099
6100 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6101 <desc>
6102 List of USB devices currently attached to the remote VRDE client.
6103 Once a new device is physically attached to the remote host computer,
6104 it appears in this list and remains there until detached.
6105 </desc>
6106 </attribute>
6107
6108 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6109 <desc>
6110 Collection of shared folders for the current session. These folders
6111 are called transient shared folders because they are available to the
6112 guest OS running inside the associated virtual machine only for the
6113 duration of the session (as opposed to
6114 <link to="IMachine::sharedFolders"/> which represent permanent shared
6115 folders). When the session is closed (e.g. the machine is powered down),
6116 these folders are automatically discarded.
6117
6118 New shared folders are added to the collection using
6119 <link to="#createSharedFolder"/>. Existing shared folders can be
6120 removed using <link to="#removeSharedFolder"/>.
6121 </desc>
6122 </attribute>
6123
6124 <attribute name="VRDEServerInfo" type="IVRDEServerInfo" readonly="yes">
6125 <desc>
6126 Interface that provides information on Remote Desktop Extension (VRDE) connection.
6127 </desc>
6128 </attribute>
6129
6130 <attribute name="eventSource" type="IEventSource" readonly="yes">
6131 <desc>
6132 Event source for console events.
6133 </desc>
6134 </attribute>
6135
6136 <attribute name="attachedPciDevices" type="IPciDeviceAttachment" readonly="yes" safearray="yes">
6137 <desc>Array of PCI devices attached to this machine.</desc>
6138 </attribute>
6139
6140 <method name="powerUp">
6141 <desc>
6142 Starts the virtual machine execution using the current machine
6143 state (that is, its current execution state, current settings and
6144 current storage devices).
6145
6146 <note>
6147 This method is only useful for front-ends that want to actually
6148 execute virtual machines in their own process (like the VirtualBox
6149 or VBoxSDL front-ends). Unless you are intending to write such a
6150 front-end, do not call this method. If you simply want to
6151 start virtual machine execution using one of the existing front-ends
6152 (for example the VirtualBox GUI or headless server), use
6153 <link to="IMachine::launchVMProcess"/> instead; these
6154 front-ends will power up the machine automatically for you.
6155 </note>
6156
6157 If the machine is powered off or aborted, the execution will
6158 start from the beginning (as if the real hardware were just
6159 powered on).
6160
6161 If the machine is in the <link to="MachineState_Saved"/> state,
6162 it will continue its execution the point where the state has
6163 been saved.
6164
6165 If the machine <link to="IMachine::teleporterEnabled"/> property is
6166 enabled on the machine being powered up, the machine will wait for an
6167 incoming teleportation in the <link to="MachineState_TeleportingIn"/>
6168 state. The returned progress object will have at least three
6169 operations where the last three are defined as: (1) powering up and
6170 starting TCP server, (2) waiting for incoming teleportations, and
6171 (3) perform teleportation. These operations will be reflected as the
6172 last three operations of the progress objected returned by
6173 <link to="IMachine::launchVMProcess"/> as well.
6174
6175 <see>#saveState</see>
6176
6177 <result name="VBOX_E_INVALID_VM_STATE">
6178 Virtual machine already running.
6179 </result>
6180 <result name="VBOX_E_HOST_ERROR">
6181 Host interface does not exist or name not set.
6182 </result>
6183 <result name="VBOX_E_FILE_ERROR">
6184 Invalid saved state file.
6185 </result>
6186 </desc>
6187 <param name="progress" type="IProgress" dir="return">
6188 <desc>Progress object to track the operation completion.</desc>
6189 </param>
6190 </method>
6191
6192 <method name="powerUpPaused">
6193 <desc>
6194 Identical to powerUp except that the VM will enter the
6195 <link to="MachineState_Paused"/> state, instead of
6196 <link to="MachineState_Running"/>.
6197
6198 <see>#powerUp</see>
6199 <result name="VBOX_E_INVALID_VM_STATE">
6200 Virtual machine already running.
6201 </result>
6202 <result name="VBOX_E_HOST_ERROR">
6203 Host interface does not exist or name not set.
6204 </result>
6205 <result name="VBOX_E_FILE_ERROR">
6206 Invalid saved state file.
6207 </result>
6208 </desc>
6209 <param name="progress" type="IProgress" dir="return">
6210 <desc>Progress object to track the operation completion.</desc>
6211 </param>
6212 </method>
6213
6214 <method name="powerDown">
6215 <desc>
6216 Initiates the power down procedure to stop the virtual machine
6217 execution.
6218
6219 The completion of the power down procedure is tracked using the returned
6220 IProgress object. After the operation is complete, the machine will go
6221 to the PoweredOff state.
6222 <result name="VBOX_E_INVALID_VM_STATE">
6223 Virtual machine must be Running, Paused or Stuck to be powered down.
6224 </result>
6225 </desc>
6226 <param name="progress" type="IProgress" dir="return">
6227 <desc>Progress object to track the operation completion.</desc>
6228 </param>
6229 </method>
6230
6231 <method name="reset">
6232 <desc>Resets the virtual machine.
6233 <result name="VBOX_E_INVALID_VM_STATE">
6234 Virtual machine not in Running state.
6235 </result>
6236 <result name="VBOX_E_VM_ERROR">
6237 Virtual machine error in reset operation.
6238 </result>
6239 </desc>
6240 </method>
6241
6242 <method name="pause">
6243 <desc>Pauses the virtual machine execution.
6244 <result name="VBOX_E_INVALID_VM_STATE">
6245 Virtual machine not in Running state.
6246 </result>
6247 <result name="VBOX_E_VM_ERROR">
6248 Virtual machine error in suspend operation.
6249 </result>
6250 </desc>
6251 </method>
6252
6253 <method name="resume">
6254 <desc>Resumes the virtual machine execution.
6255 <result name="VBOX_E_INVALID_VM_STATE">
6256 Virtual machine not in Paused state.
6257 </result>
6258 <result name="VBOX_E_VM_ERROR">
6259 Virtual machine error in resume operation.
6260 </result>
6261 </desc>
6262 </method>
6263
6264 <method name="powerButton">
6265 <desc>Sends the ACPI power button event to the guest.
6266 <result name="VBOX_E_INVALID_VM_STATE">
6267 Virtual machine not in Running state.
6268 </result>
6269 <result name="VBOX_E_PDM_ERROR">
6270 Controlled power off failed.
6271 </result>
6272 </desc>
6273 </method>
6274
6275 <method name="sleepButton">
6276 <desc>Sends the ACPI sleep button event to the guest.
6277 <result name="VBOX_E_INVALID_VM_STATE">
6278 Virtual machine not in Running state.
6279 </result>
6280 <result name="VBOX_E_PDM_ERROR">
6281 Sending sleep button event failed.
6282 </result>
6283 </desc>
6284 </method>
6285
6286 <method name="getPowerButtonHandled">
6287 <desc>Checks if the last power button event was handled by guest.
6288 <result name="VBOX_E_PDM_ERROR">
6289 Checking if the event was handled by the guest OS failed.
6290 </result>
6291 </desc>
6292 <param name="handled" type="boolean" dir="return"/>
6293 </method>
6294
6295 <method name="getGuestEnteredACPIMode">
6296 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6297 G1 (sleeping). If this method returns @c false, the guest will
6298 most likely not respond to external ACPI events.
6299 <result name="VBOX_E_INVALID_VM_STATE">
6300 Virtual machine not in Running state.
6301 </result>
6302 </desc>
6303 <param name="entered" type="boolean" dir="return"/>
6304 </method>
6305
6306 <method name="saveState">
6307 <desc>
6308 Saves the current execution state of a running virtual machine
6309 and stops its execution.
6310
6311 After this operation completes, the machine will go to the
6312 Saved state. Next time it is powered up, this state will
6313 be restored and the machine will continue its execution from
6314 the place where it was saved.
6315
6316 This operation differs from taking a snapshot to the effect
6317 that it doesn't create new differencing media. Also, once
6318 the machine is powered up from the state saved using this method,
6319 the saved state is deleted, so it will be impossible to return
6320 to this state later.
6321
6322 <note>
6323 On success, this method implicitly calls
6324 <link to="IMachine::saveSettings"/> to save all current machine
6325 settings (including runtime changes to the DVD medium, etc.).
6326 Together with the impossibility to change any VM settings when it is
6327 in the Saved state, this guarantees adequate hardware
6328 configuration of the machine when it is restored from the saved
6329 state file.
6330 </note>
6331
6332 <note>
6333 The machine must be in the Running or Paused state, otherwise
6334 the operation will fail.
6335 </note>
6336 <result name="VBOX_E_INVALID_VM_STATE">
6337 Virtual machine state neither Running nor Paused.
6338 </result>
6339 <result name="VBOX_E_FILE_ERROR">
6340 Failed to create directory for saved state file.
6341 </result>
6342
6343 <see><link to="#takeSnapshot"/></see>
6344 </desc>
6345 <param name="progress" type="IProgress" dir="return">
6346 <desc>Progress object to track the operation completion.</desc>
6347 </param>
6348 </method>
6349
6350 <method name="adoptSavedState">
6351 <desc>
6352 Associates the given saved state file to the virtual machine.
6353
6354 On success, the machine will go to the Saved state. Next time it is
6355 powered up, it will be restored from the adopted saved state and
6356 continue execution from the place where the saved state file was
6357 created.
6358
6359 The specified saved state file path may be absolute or relative to the
6360 folder the VM normally saves the state to (usually,
6361 <link to="IMachine::snapshotFolder"/>).
6362
6363 <note>
6364 It's a caller's responsibility to make sure the given saved state
6365 file is compatible with the settings of this virtual machine that
6366 represent its virtual hardware (memory size, storage disk configuration
6367 etc.). If there is a mismatch, the behavior of the virtual machine
6368 is undefined.
6369 </note>
6370 <result name="VBOX_E_INVALID_VM_STATE">
6371 Virtual machine state neither PoweredOff nor Aborted.
6372 </result>
6373 </desc>
6374 <param name="savedStateFile" type="wstring" dir="in">
6375 <desc>Path to the saved state file to adopt.</desc>
6376 </param>
6377 </method>
6378
6379 <method name="discardSavedState">
6380 <desc>
6381 Forcibly resets the machine to "Powered Off" state if it is
6382 currently in the "Saved" state (previously created by <link to="#saveState"/>).
6383 Next time the machine is powered up, a clean boot will occur.
6384 <note>
6385 This operation is equivalent to resetting or powering off
6386 the machine without doing a proper shutdown of the guest
6387 operating system; as with resetting a running phyiscal
6388 computer, it can can lead to data loss.
6389 </note>
6390 If @a fRemoveFile is @c true, the file in the machine directory
6391 into which the machine state was saved is also deleted. If
6392 this is @c false, then the state can be recovered and later
6393 re-inserted into a machine using <link to="#adoptSavedState" />.
6394 The location of the file can be found in the
6395 <link to="IMachine::stateFilePath" /> attribute.
6396 <result name="VBOX_E_INVALID_VM_STATE">
6397 Virtual machine not in state Saved.
6398 </result>
6399 </desc>
6400 <param name="fRemoveFile" type="boolean" dir="in" >
6401 <desc>Whether to also remove the saved state file.</desc>
6402 </param>
6403 </method>
6404
6405 <method name="getDeviceActivity">
6406 <desc>
6407 Gets the current activity type of a given device or device group.
6408 <result name="E_INVALIDARG">
6409 Invalid device type.
6410 </result>
6411 </desc>
6412 <param name="type" type="DeviceType" dir="in"/>
6413 <param name="activity" type="DeviceActivity" dir="return"/>
6414 </method>
6415
6416 <method name="attachUSBDevice">
6417 <desc>
6418 Attaches a host USB device with the given UUID to the
6419 USB controller of the virtual machine.
6420
6421 The device needs to be in one of the following states:
6422 <link to="USBDeviceState_Busy"/>,
6423 <link to="USBDeviceState_Available"/> or
6424 <link to="USBDeviceState_Held"/>,
6425 otherwise an error is immediately returned.
6426
6427 When the device state is
6428 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6429 be returned if the host computer refuses to release it for some reason.
6430
6431 <see>IUSBController::deviceFilters, USBDeviceState</see>
6432 <result name="VBOX_E_INVALID_VM_STATE">
6433 Virtual machine state neither Running nor Paused.
6434 </result>
6435 <result name="VBOX_E_PDM_ERROR">
6436 Virtual machine does not have a USB controller.
6437 </result>
6438 </desc>
6439 <param name="id" type="uuid" mod="string" dir="in">
6440 <desc>UUID of the host USB device to attach.</desc>
6441 </param>
6442 </method>
6443
6444 <method name="detachUSBDevice">
6445 <desc>
6446 Detaches an USB device with the given UUID from the USB controller
6447 of the virtual machine.
6448
6449 After this method succeeds, the VirtualBox server re-initiates
6450 all USB filters as if the device were just physically attached
6451 to the host, but filters of this machine are ignored to avoid
6452 a possible automatic re-attachment.
6453
6454 <see>IUSBController::deviceFilters, USBDeviceState</see>
6455
6456 <result name="VBOX_E_PDM_ERROR">
6457 Virtual machine does not have a USB controller.
6458 </result>
6459 <result name="E_INVALIDARG">
6460 USB device not attached to this virtual machine.
6461 </result>
6462 </desc>
6463 <param name="id" type="uuid" mod="string" dir="in">
6464 <desc>UUID of the USB device to detach.</desc>
6465 </param>
6466 <param name="device" type="IUSBDevice" dir="return">
6467 <desc>Detached USB device.</desc>
6468 </param>
6469 </method>
6470
6471 <method name="findUSBDeviceByAddress">
6472 <desc>
6473 Searches for a USB device with the given host address.
6474
6475 <result name="VBOX_E_OBJECT_NOT_FOUND">
6476 Given @c name does not correspond to any USB device.
6477 </result>
6478
6479 <see>IUSBDevice::address</see>
6480 </desc>
6481 <param name="name" type="wstring" dir="in">
6482 <desc>
6483 Address of the USB device (as assigned by the host) to
6484 search for.
6485 </desc>
6486 </param>
6487 <param name="device" type="IUSBDevice" dir="return">
6488 <desc>Found USB device object.</desc>
6489 </param>
6490 </method>
6491
6492 <method name="findUSBDeviceById">
6493 <desc>
6494 Searches for a USB device with the given UUID.
6495
6496 <result name="VBOX_E_OBJECT_NOT_FOUND">
6497 Given @c id does not correspond to any USB device.
6498 </result>
6499
6500 <see>IUSBDevice::id</see>
6501 </desc>
6502 <param name="id" type="uuid" mod="string" dir="in">
6503 <desc>UUID of the USB device to search for.</desc>
6504 </param>
6505 <param name="device" type="IUSBDevice" dir="return">
6506 <desc>Found USB device object.</desc>
6507 </param>
6508 </method>
6509
6510 <method name="createSharedFolder">
6511 <desc>
6512 Creates a transient new shared folder by associating the given logical
6513 name with the given host path, adds it to the collection of shared
6514 folders and starts sharing it. Refer to the description of
6515 <link to="ISharedFolder"/> to read more about logical names.
6516
6517 <result name="VBOX_E_INVALID_VM_STATE">
6518 Virtual machine in Saved state or currently changing state.
6519 </result>
6520 <result name="VBOX_E_FILE_ERROR">
6521 Shared folder already exists or not accessible.
6522 </result>
6523 </desc>
6524 <param name="name" type="wstring" dir="in">
6525 <desc>Unique logical name of the shared folder.</desc>
6526 </param>
6527 <param name="hostPath" type="wstring" dir="in">
6528 <desc>Full path to the shared folder in the host file system.</desc>
6529 </param>
6530 <param name="writable" type="boolean" dir="in">
6531 <desc>Whether the share is writable or readonly</desc>
6532 </param>
6533 <param name="automount" type="boolean" dir="in">
6534 <desc>Whether the share gets automatically mounted by the guest
6535 or not.</desc>
6536 </param>
6537 </method>
6538
6539 <method name="removeSharedFolder">
6540 <desc>
6541 Removes a transient shared folder with the given name previously
6542 created by <link to="#createSharedFolder"/> from the collection of
6543 shared folders and stops sharing it.
6544 <result name="VBOX_E_INVALID_VM_STATE">
6545 Virtual machine in Saved state or currently changing state.
6546 </result>
6547 <result name="VBOX_E_FILE_ERROR">
6548 Shared folder does not exists.
6549 </result>
6550 </desc>
6551 <param name="name" type="wstring" dir="in">
6552 <desc>Logical name of the shared folder to remove.</desc>
6553 </param>
6554 </method>
6555
6556 <method name="takeSnapshot">
6557 <desc>
6558 Saves the current execution state
6559 and all settings of the machine and creates differencing images
6560 for all normal (non-independent) media.
6561 See <link to="ISnapshot" /> for an introduction to snapshots.
6562
6563 This method can be called for a PoweredOff, Saved (see
6564 <link to="#saveState"/>), Running or
6565 Paused virtual machine. When the machine is PoweredOff, an
6566 offline snapshot is created. When the machine is Running a live
6567 snapshot is created, and an online snapshot is is created when Paused.
6568
6569 The taken snapshot is always based on the
6570 <link to="IMachine::currentSnapshot">current snapshot</link>
6571 of the associated virtual machine and becomes a new current snapshot.
6572
6573 <note>
6574 This method implicitly calls <link to="IMachine::saveSettings"/> to
6575 save all current machine settings before taking an offline snapshot.
6576 </note>
6577
6578 <result name="VBOX_E_INVALID_VM_STATE">
6579 Virtual machine currently changing state.
6580 </result>
6581 </desc>
6582 <param name="name" type="wstring" dir="in">
6583 <desc>Short name for the snapshot.</desc>
6584 </param>
6585 <param name="description" type="wstring" dir="in">
6586 <desc>Optional description of the snapshot.</desc>
6587 </param>
6588 <param name="progress" type="IProgress" dir="return">
6589 <desc>Progress object to track the operation completion.</desc>
6590 </param>
6591 </method>
6592
6593 <method name="deleteSnapshot">
6594 <desc>
6595 Starts deleting the specified snapshot asynchronously.
6596 See <link to="ISnapshot" /> for an introduction to snapshots.
6597
6598 The execution state and settings of the associated machine stored in
6599 the snapshot will be deleted. The contents of all differencing media of
6600 this snapshot will be merged with the contents of their dependent child
6601 media to keep the medium chain valid (in other words, all changes
6602 represented by media being deleted will be propagated to their child
6603 medium). After that, this snapshot's differencing medium will be
6604 deleted. The parent of this snapshot will become a new parent for all
6605 its child snapshots.
6606
6607 If the deleted snapshot is the current one, its parent snapshot will
6608 become a new current snapshot. The current machine state is not directly
6609 affected in this case, except that currently attached differencing
6610 media based on media of the deleted snapshot will be also merged as
6611 described above.
6612
6613 If the deleted snapshot is the first or current snapshot, then the
6614 respective IMachine attributes will be adjusted. Deleting the current
6615 snapshot will also implicitly call <link to="IMachine::saveSettings"/>
6616 to make all current machine settings permanent.
6617
6618 Deleting a snapshot has the following preconditions:
6619
6620 <ul>
6621 <li>Child media of all normal media of the deleted snapshot
6622 must be accessible (see <link to="IMedium::state"/>) for this
6623 operation to succeed. In particular, this means that all virtual
6624 machines whose media are directly or indirectly based on the
6625 media of deleted snapshot must be powered off.</li>
6626
6627 <li>You cannot delete the snapshot if a medium attached to it has
6628 more than once child medium (differencing images) because otherwise
6629 merging would be impossible. This might be the case if there is
6630 more than one child snapshot or differencing images were created
6631 for other reason (e.g. implicitly because of multiple machine
6632 attachments).</li>
6633 </ul>
6634
6635
6636 The virtual machine's <link to="IMachine::state">state</link> is
6637 changed to "DeletingSnapshot", "DeletingSnapshotOnline" or
6638 "DeletingSnapshotPaused" while this operation is in progress.
6639
6640 <note>
6641 Merging medium contents can be very time and disk space
6642 consuming, if these media are big in size and have many
6643 children. However, if the snapshot being deleted is the last
6644 (head) snapshot on the branch, the operation will be rather
6645 quick.
6646 </note>
6647 <result name="VBOX_E_INVALID_VM_STATE">
6648 The running virtual machine prevents deleting this snapshot. This
6649 happens only in very specific situations, usually snapshots can be
6650 deleted without trouble while a VM is running. The error message
6651 text explains the reason for the failure.
6652 </result>
6653 </desc>
6654 <param name="id" type="uuid" mod="string" dir="in">
6655 <desc>UUID of the snapshot to delete.</desc>
6656 </param>
6657 <param name="progress" type="IProgress" dir="return">
6658 <desc>Progress object to track the operation completion.</desc>
6659 </param>
6660 </method>
6661
6662 <method name="restoreSnapshot">
6663 <desc>
6664 Starts resetting the machine's current state to the state contained
6665 in the given snapshot, asynchronously. All current settings of the
6666 machine will be reset and changes stored in differencing media
6667 will be lost.
6668 See <link to="ISnapshot" /> for an introduction to snapshots.
6669
6670 After this operation is successfully completed, new empty differencing
6671 media are created for all normal media of the machine.
6672
6673 If the given snapshot is an online snapshot, the machine will go to
6674 the <link to="MachineState_Saved"> saved state</link>, so that the
6675 next time it is powered on, the execution state will be restored
6676 from the state of the snapshot.
6677
6678 <note>
6679 The machine must not be running, otherwise the operation will fail.
6680 </note>
6681
6682 <note>
6683 If the machine state is <link to="MachineState_Saved">Saved</link>
6684 prior to this operation, the saved state file will be implicitly
6685 deleted (as if <link to="IConsole::discardSavedState"/> were
6686 called).
6687 </note>
6688
6689 <result name="VBOX_E_INVALID_VM_STATE">
6690 Virtual machine is running.
6691 </result>
6692 </desc>
6693 <param name="snapshot" type="ISnapshot" dir="in">
6694 <desc>The snapshot to restore the VM state from.</desc>
6695 </param>
6696 <param name="progress" type="IProgress" dir="return">
6697 <desc>Progress object to track the operation completion.</desc>
6698 </param>
6699 </method>
6700
6701 <method name="teleport">
6702 <desc>
6703 Teleport the VM to a different host machine or process.
6704
6705 TODO explain the details.
6706
6707 <result name="VBOX_E_INVALID_VM_STATE">
6708 Virtual machine not running or paused.
6709 </result>
6710 </desc>
6711 <param name="hostname" type="wstring" dir="in">
6712 <desc>The name or IP of the host to teleport to.</desc>
6713 </param>
6714 <param name="tcpport" type="unsigned long" dir="in">
6715 <desc>The TCP port to connect to (1..65535).</desc>
6716 </param>
6717 <param name="password" type="wstring" dir="in">
6718 <desc>The password.</desc>
6719 </param>
6720 <param name="maxDowntime" type="unsigned long" dir="in">
6721 <desc>
6722 The maximum allowed downtime given as milliseconds. 0 is not a valid
6723 value. Recommended value: 250 ms.
6724
6725 The higher the value is, the greater the chance for a successful
6726 teleportation. A small value may easily result in the teleportation
6727 process taking hours and eventually fail.
6728
6729 <note>
6730 The current implementation treats this a guideline, not as an
6731 absolute rule.
6732 </note>
6733 </desc>
6734 </param>
6735 <param name="progress" type="IProgress" dir="return">
6736 <desc>Progress object to track the operation completion.</desc>
6737 </param>
6738 </method>
6739
6740 </interface>
6741
6742 <!--
6743 // IHost
6744 /////////////////////////////////////////////////////////////////////////
6745 -->
6746
6747 <enum
6748 name="HostNetworkInterfaceMediumType"
6749 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6750 >
6751 <desc>
6752 Type of encapsulation. Ethernet encapsulation includes both wired and
6753 wireless Ethernet connections.
6754 <see>IHostNetworkInterface</see>
6755 </desc>
6756
6757 <const name="Unknown" value="0">
6758 <desc>
6759 The type of interface cannot be determined.
6760 </desc>
6761 </const>
6762 <const name="Ethernet" value="1">
6763 <desc>
6764 Ethernet frame encapsulation.
6765 </desc>
6766 </const>
6767 <const name="PPP" value="2">
6768 <desc>
6769 Point-to-point protocol encapsulation.
6770 </desc>
6771 </const>
6772 <const name="SLIP" value="3">
6773 <desc>
6774 Serial line IP encapsulation.
6775 </desc>
6776 </const>
6777 </enum>
6778
6779 <enum
6780 name="HostNetworkInterfaceStatus"
6781 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6782 >
6783 <desc>
6784 Current status of the interface.
6785 <see>IHostNetworkInterface</see>
6786 </desc>
6787
6788 <const name="Unknown" value="0">
6789 <desc>
6790 The state of interface cannot be determined.
6791 </desc>
6792 </const>
6793 <const name="Up" value="1">
6794 <desc>
6795 The interface is fully operational.
6796 </desc>
6797 </const>
6798 <const name="Down" value="2">
6799 <desc>
6800 The interface is not functioning.
6801 </desc>
6802 </const>
6803 </enum>
6804
6805 <enum
6806 name="HostNetworkInterfaceType"
6807 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6808 >
6809 <desc>
6810 Network interface type.
6811 </desc>
6812 <const name="Bridged" value="1"/>
6813 <const name="HostOnly" value="2"/>
6814 </enum>
6815
6816 <interface
6817 name="IHostNetworkInterface" extends="$unknown"
6818 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6819 wsmap="managed"
6820 >
6821 <desc>
6822 Represents one of host's network interfaces. IP V6 address and network
6823 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6824 separated by colons.
6825 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6826 </desc>
6827 <attribute name="name" type="wstring" readonly="yes">
6828 <desc>Returns the host network interface name.</desc>
6829 </attribute>
6830
6831 <attribute name="id" type="uuid" mod="string" readonly="yes">
6832 <desc>Returns the interface UUID.</desc>
6833 </attribute>
6834
6835 <attribute name="networkName" type="wstring" readonly="yes">
6836 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6837 </attribute>
6838
6839 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6840 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6841 </attribute>
6842
6843 <attribute name="IPAddress" type="wstring" readonly="yes">
6844 <desc>Returns the IP V4 address of the interface.</desc>
6845 </attribute>
6846
6847 <attribute name="networkMask" type="wstring" readonly="yes">
6848 <desc>Returns the network mask of the interface.</desc>
6849 </attribute>
6850
6851 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6852 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6853 </attribute>
6854
6855 <attribute name="IPV6Address" type="wstring" readonly="yes">
6856 <desc>Returns the IP V6 address of the interface.</desc>
6857 </attribute>
6858
6859 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6860 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6861 </attribute>
6862
6863 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6864 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6865 </attribute>
6866
6867 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6868 <desc>Type of protocol encapsulation used.</desc>
6869 </attribute>
6870
6871 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6872 <desc>Status of the interface.</desc>
6873 </attribute>
6874
6875 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6876 <desc>specifies the host interface type.</desc>
6877 </attribute>
6878
6879 <method name="enableStaticIpConfig">
6880 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6881 <param name="IPAddress" type="wstring" dir="in">
6882 <desc>
6883 IP address.
6884 </desc>
6885 </param>
6886 <param name="networkMask" type="wstring" dir="in">
6887 <desc>
6888 network mask.
6889 </desc>
6890 </param>
6891 </method>
6892
6893 <method name="enableStaticIpConfigV6">
6894 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6895 <param name="IPV6Address" type="wstring" dir="in">
6896 <desc>
6897 IP address.
6898 </desc>
6899 </param>
6900 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6901 <desc>
6902 network mask.
6903 </desc>
6904 </param>
6905 </method>
6906
6907 <method name="enableDynamicIpConfig">
6908 <desc>enables the dynamic IP configuration.</desc>
6909 </method>
6910
6911 <method name="dhcpRediscover">
6912 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6913 </method>
6914
6915 </interface>
6916
6917 <interface
6918 name="IHost" extends="$unknown"
6919 uuid="35b004f4-7806-4009-bfa8-d1308adba7e5"
6920 wsmap="managed"
6921 >
6922 <desc>
6923 The IHost interface represents the physical machine that this VirtualBox
6924 installation runs on.
6925
6926 An object implementing this interface is returned by the
6927 <link to="IVirtualBox::host" /> attribute. This interface contains
6928 read-only information about the host's physical hardware (such as what
6929 processors and disks are available, what the host operating system is,
6930 and so on) and also allows for manipulating some of the host's hardware,
6931 such as global USB device filters and host interface networking.
6932
6933 </desc>
6934 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
6935 <desc>List of DVD drives available on the host.</desc>
6936 </attribute>
6937
6938 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
6939 <desc>List of floppy drives available on the host.</desc>
6940 </attribute>
6941
6942 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6943 <desc>
6944 List of USB devices currently attached to the host.
6945 Once a new device is physically attached to the host computer,
6946 it appears in this list and remains there until detached.
6947
6948 <note>
6949 If USB functionality is not available in the given edition of
6950 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6951 </note>
6952 </desc>
6953 </attribute>
6954
6955 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
6956 <desc>
6957 List of USB device filters in action.
6958 When a new device is physically attached to the host computer,
6959 filters from this list are applied to it (in order they are stored
6960 in the list). The first matched filter will determine the
6961 <link to="IHostUSBDeviceFilter::action">action</link>
6962 performed on the device.
6963
6964 Unless the device is ignored by these filters, filters of all
6965 currently running virtual machines
6966 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6967
6968 <note>
6969 If USB functionality is not available in the given edition of
6970 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6971 </note>
6972
6973 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6974 </desc>
6975 </attribute>
6976
6977 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6978 <desc>List of host network interfaces currently defined on the host.</desc>
6979 </attribute>
6980
6981 <attribute name="processorCount" type="unsigned long" readonly="yes">
6982 <desc>Number of (logical) CPUs installed in the host system.</desc>
6983 </attribute>
6984
6985 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6986 <desc>Number of (logical) CPUs online in the host system.</desc>
6987 </attribute>
6988
6989 <attribute name="processorCoreCount" type="unsigned long" readonly="yes">
6990 <desc>Number of physical processor cores installed in the host system.</desc>
6991 </attribute>
6992
6993 <method name="getProcessorSpeed">
6994 <desc>Query the (approximate) maximum speed of a specified host CPU in
6995 Megahertz.
6996 </desc>
6997 <param name="cpuId" type="unsigned long" dir="in">
6998 <desc>
6999 Identifier of the CPU.
7000 </desc>
7001 </param>
7002 <param name="speed" type="unsigned long" dir="return">
7003 <desc>
7004 Speed value. 0 is returned if value is not known or @a cpuId is
7005 invalid.
7006 </desc>
7007 </param>
7008 </method>
7009
7010 <method name="getProcessorFeature">
7011 <desc>Query whether a CPU feature is supported or not.</desc>
7012 <param name="feature" type="ProcessorFeature" dir="in">
7013 <desc>
7014 CPU Feature identifier.
7015 </desc>
7016 </param>
7017 <param name="supported" type="boolean" dir="return">
7018 <desc>
7019 Feature is supported or not.
7020 </desc>
7021 </param>
7022 </method>
7023
7024 <method name="getProcessorDescription">
7025 <desc>Query the model string of a specified host CPU.
7026 </desc>
7027 <param name="cpuId" type="unsigned long" dir="in">
7028 <desc>
7029 Identifier of the CPU.
7030 <note>
7031 The current implementation might not necessarily return the
7032 description for this exact CPU.
7033 </note>
7034 </desc>
7035 </param>
7036 <param name="description" type="wstring" dir="return">
7037 <desc>
7038 Model string. An empty string is returned if value is not known or
7039 @a cpuId is invalid.
7040 </desc>
7041 </param>
7042 </method>
7043
7044 <method name="getProcessorCPUIDLeaf">
7045 <desc>
7046 Returns the CPU cpuid information for the specified leaf.
7047 </desc>
7048 <param name="cpuId" type="unsigned long" dir="in">
7049 <desc>
7050 Identifier of the CPU. The CPU most be online.
7051 <note>
7052 The current implementation might not necessarily return the
7053 description for this exact CPU.
7054 </note>
7055 </desc>
7056 </param>
7057 <param name="leaf" type="unsigned long" dir="in">
7058 <desc>
7059 CPUID leaf index (eax).
7060 </desc>
7061 </param>
7062 <param name="subLeaf" type="unsigned long" dir="in">
7063 <desc>
7064 CPUID leaf sub index (ecx). This currently only applies to cache
7065 information on Intel CPUs. Use 0 if retrieving values for
7066 <link to="IMachine::setCPUIDLeaf"/>.
7067 </desc>
7068 </param>
7069 <param name="valEax" type="unsigned long" dir="out">
7070 <desc>
7071 CPUID leaf value for register eax.
7072 </desc>
7073 </param>
7074 <param name="valEbx" type="unsigned long" dir="out">
7075 <desc>
7076 CPUID leaf value for register ebx.
7077 </desc>
7078 </param>
7079 <param name="valEcx" type="unsigned long" dir="out">
7080 <desc>
7081 CPUID leaf value for register ecx.
7082 </desc>
7083 </param>
7084 <param name="valEdx" type="unsigned long" dir="out">
7085 <desc>
7086 CPUID leaf value for register edx.
7087 </desc>
7088 </param>
7089 </method>
7090
7091 <attribute name="memorySize" type="unsigned long" readonly="yes">
7092 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7093 </attribute>
7094
7095 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7096 <desc>Available system memory in the host system.</desc>
7097 </attribute>
7098
7099 <attribute name="operatingSystem" type="wstring" readonly="yes">
7100 <desc>Name of the host system's operating system.</desc>
7101 </attribute>
7102
7103 <attribute name="OSVersion" type="wstring" readonly="yes">
7104 <desc>Host operating system's version string.</desc>
7105 </attribute>
7106
7107 <attribute name="UTCTime" type="long long" readonly="yes">
7108 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7109 </attribute>
7110
7111 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
7112 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
7113 </attribute>
7114
7115 <method name="createHostOnlyNetworkInterface">
7116 <desc>
7117 Creates a new adapter for Host Only Networking.
7118 <result name="E_INVALIDARG">
7119 Host network interface @a name already exists.
7120 </result>
7121 </desc>
7122 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7123 <desc>
7124 Created host interface object.
7125 </desc>
7126 </param>
7127 <param name="progress" type="IProgress" dir="return">
7128 <desc>
7129 Progress object to track the operation completion.
7130 </desc>
7131 </param>
7132 </method>
7133
7134 <method name="removeHostOnlyNetworkInterface">
7135 <desc>
7136 Removes the given Host Only Networking interface.
7137 <result name="VBOX_E_OBJECT_NOT_FOUND">
7138 No host network interface matching @a id found.
7139 </result>
7140 </desc>
7141 <param name="id" type="uuid" mod="string" dir="in">
7142 <desc>
7143 Adapter GUID.
7144 </desc>
7145 </param>
7146 <param name="progress" type="IProgress" dir="return">
7147 <desc>
7148 Progress object to track the operation completion.
7149 </desc>
7150 </param>
7151 </method>
7152
7153 <method name="createUSBDeviceFilter">
7154 <desc>
7155 Creates a new USB device filter. All attributes except
7156 the filter name are set to empty (any match),
7157 <i>active</i> is @c false (the filter is not active).
7158
7159 The created filter can be added to the list of filters using
7160 <link to="#insertUSBDeviceFilter"/>.
7161
7162 <see>#USBDeviceFilters</see>
7163 </desc>
7164 <param name="name" type="wstring" dir="in">
7165 <desc>
7166 Filter name. See <link to="IUSBDeviceFilter::name"/> for more information.
7167 </desc>
7168 </param>
7169 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7170 <desc>Created filter object.</desc>
7171 </param>
7172 </method>
7173
7174 <method name="insertUSBDeviceFilter">
7175 <desc>
7176 Inserts the given USB device to the specified position
7177 in the list of filters.
7178
7179 Positions are numbered starting from @c 0. If the specified
7180 position is equal to or greater than the number of elements in
7181 the list, the filter is added at the end of the collection.
7182
7183 <note>
7184 Duplicates are not allowed, so an attempt to insert a
7185 filter already in the list is an error.
7186 </note>
7187 <note>
7188 If USB functionality is not available in the given edition of
7189 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7190 </note>
7191
7192 <see>#USBDeviceFilters</see>
7193
7194 <result name="VBOX_E_INVALID_OBJECT_STATE">
7195 USB device filter is not created within this VirtualBox instance.
7196 </result>
7197 <result name="E_INVALIDARG">
7198 USB device filter already in list.
7199 </result>
7200
7201 </desc>
7202 <param name="position" type="unsigned long" dir="in">
7203 <desc>Position to insert the filter to.</desc>
7204 </param>
7205 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7206 <desc>USB device filter to insert.</desc>
7207 </param>
7208 </method>
7209
7210 <method name="removeUSBDeviceFilter">
7211 <desc>
7212 Removes a USB device filter from the specified position in the
7213 list of filters.
7214
7215 Positions are numbered starting from @c 0. Specifying a
7216 position equal to or greater than the number of elements in
7217 the list will produce an error.
7218
7219 <note>
7220 If USB functionality is not available in the given edition of
7221 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7222 </note>
7223
7224 <see>#USBDeviceFilters</see>
7225
7226 <result name="E_INVALIDARG">
7227 USB device filter list empty or invalid @a position.
7228 </result>
7229
7230 </desc>
7231 <param name="position" type="unsigned long" dir="in">
7232 <desc>Position to remove the filter from.</desc>
7233 </param>
7234 </method>
7235
7236 <method name="findHostDVDDrive">
7237 <desc>
7238 Searches for a host DVD drive with the given @c name.
7239
7240 <result name="VBOX_E_OBJECT_NOT_FOUND">
7241 Given @c name does not correspond to any host drive.
7242 </result>
7243
7244 </desc>
7245 <param name="name" type="wstring" dir="in">
7246 <desc>Name of the host drive to search for</desc>
7247 </param>
7248 <param name="drive" type="IMedium" dir="return">
7249 <desc>Found host drive object</desc>
7250 </param>
7251 </method>
7252
7253 <method name="findHostFloppyDrive">
7254 <desc>
7255 Searches for a host floppy drive with the given @c name.
7256
7257 <result name="VBOX_E_OBJECT_NOT_FOUND">
7258 Given @c name does not correspond to any host floppy drive.
7259 </result>
7260
7261 </desc>
7262 <param name="name" type="wstring" dir="in">
7263 <desc>Name of the host floppy drive to search for</desc>
7264 </param>
7265 <param name="drive" type="IMedium" dir="return">
7266 <desc>Found host floppy drive object</desc>
7267 </param>
7268 </method>
7269
7270 <method name="findHostNetworkInterfaceByName">
7271 <desc>
7272 Searches through all host network interfaces for an interface with
7273 the given @c name.
7274 <note>
7275 The method returns an error if the given @c name does not
7276 correspond to any host network interface.
7277 </note>
7278 </desc>
7279 <param name="name" type="wstring" dir="in">
7280 <desc>Name of the host network interface to search for.</desc>
7281 </param>
7282 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7283 <desc>Found host network interface object.</desc>
7284 </param>
7285 </method>
7286 <method name="findHostNetworkInterfaceById">
7287 <desc>
7288 Searches through all host network interfaces for an interface with
7289 the given GUID.
7290 <note>
7291 The method returns an error if the given GUID does not
7292 correspond to any host network interface.
7293 </note>
7294 </desc>
7295 <param name="id" type="uuid" mod="string" dir="in">
7296 <desc>GUID of the host network interface to search for.</desc>
7297 </param>
7298 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7299 <desc>Found host network interface object.</desc>
7300 </param>
7301 </method>
7302 <method name="findHostNetworkInterfacesOfType">
7303 <desc>
7304 Searches through all host network interfaces and returns a list of interfaces of the specified type
7305 </desc>
7306 <param name="type" type="HostNetworkInterfaceType" dir="in">
7307 <desc>type of the host network interfaces to search for.</desc>
7308 </param>
7309 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7310 <desc>Found host network interface objects.</desc>
7311 </param>
7312 </method>
7313
7314 <method name="findUSBDeviceById">
7315 <desc>
7316 Searches for a USB device with the given UUID.
7317
7318 <result name="VBOX_E_OBJECT_NOT_FOUND">
7319 Given @c id does not correspond to any USB device.
7320 </result>
7321
7322 <see>IHostUSBDevice::id</see>
7323 </desc>
7324 <param name="id" type="uuid" mod="string" dir="in">
7325 <desc>UUID of the USB device to search for.</desc>
7326 </param>
7327 <param name="device" type="IHostUSBDevice" dir="return">
7328 <desc>Found USB device object.</desc>
7329 </param>
7330 </method>
7331
7332 <method name="findUSBDeviceByAddress">
7333 <desc>
7334 Searches for a USB device with the given host address.
7335
7336 <result name="VBOX_E_OBJECT_NOT_FOUND">
7337 Given @c name does not correspond to any USB device.
7338 </result>
7339
7340 <see>IHostUSBDevice::address</see>
7341 </desc>
7342 <param name="name" type="wstring" dir="in">
7343 <desc>
7344 Address of the USB device (as assigned by the host) to
7345 search for.
7346 </desc>
7347 </param>
7348 <param name="device" type="IHostUSBDevice" dir="return">
7349 <desc>Found USB device object.</desc>
7350 </param>
7351 </method>
7352
7353 </interface>
7354
7355 <!--
7356 // ISystemProperties
7357 /////////////////////////////////////////////////////////////////////////
7358 -->
7359
7360 <interface
7361 name="ISystemProperties"
7362 extends="$unknown"
7363 uuid="51c81048-b261-4fa2-a44e-fd756f0db589"
7364 wsmap="managed"
7365 >
7366 <desc>
7367 The ISystemProperties interface represents global properties of the given
7368 VirtualBox installation.
7369
7370 These properties define limits and default values for various attributes
7371 and parameters. Most of the properties are read-only, but some can be
7372 changed by a user.
7373 </desc>
7374
7375 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7376 <desc>Minimum guest system memory in Megabytes.</desc>
7377 </attribute>
7378
7379 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7380 <desc>Maximum guest system memory in Megabytes.</desc>
7381 </attribute>
7382
7383 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7384 <desc>Minimum guest video memory in Megabytes.</desc>
7385 </attribute>
7386
7387 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7388 <desc>Maximum guest video memory in Megabytes.</desc>
7389 </attribute>
7390
7391 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7392 <desc>Minimum CPU count.</desc>
7393 </attribute>
7394
7395 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7396 <desc>Maximum CPU count.</desc>
7397 </attribute>
7398
7399 <attribute name="maxGuestMonitors" type="unsigned long" readonly="yes">
7400 <desc>Maximum of monitors which could be connected.</desc>
7401 </attribute>
7402
7403 <attribute name="infoVDSize" type="long long" readonly="yes">
7404 <desc>Maximum size of a virtual disk image in bytes. Informational value,
7405 does not reflect the limits of any virtual disk image format.</desc>
7406 </attribute>
7407
7408 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7409 <desc>
7410 Number of network adapters associated with every
7411 <link to="IMachine"/> instance.
7412 </desc>
7413 </attribute>
7414
7415 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7416 <desc>
7417 Number of serial ports associated with every
7418 <link to="IMachine"/> instance.
7419 </desc>
7420 </attribute>
7421
7422 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7423 <desc>
7424 Number of parallel ports associated with every
7425 <link to="IMachine"/> instance.
7426 </desc>
7427 </attribute>
7428
7429 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7430 <desc>
7431 Maximum device position in the boot order. This value corresponds
7432 to the total number of devices a machine can boot from, to make it
7433 possible to include all possible devices to the boot list.
7434 <see><link to="IMachine::setBootOrder"/></see>
7435 </desc>
7436 </attribute>
7437
7438 <attribute name="defaultMachineFolder" type="wstring">
7439 <desc>
7440 Full path to the default directory used to create new or open
7441 existing machines when a machine settings file name contains no
7442 path.
7443
7444 Starting with VirtualBox 4.0, by default, this attribute contains
7445 the full path of folder named "VirtualBox VMs" in the user's
7446 home directory, which depends on the host platform.
7447
7448 When setting this attribute, a full path must be specified.
7449 Setting this property to @c null or an empty string or the
7450 special value "Machines" (for compatibility reasons) will restore
7451 that default value.
7452
7453 If the folder specified herein does not exist, it will be created
7454 automatically as needed.
7455
7456 <see>
7457 <link to="IVirtualBox::createMachine"/>,
7458 <link to="IVirtualBox::openMachine"/>
7459 </see>
7460 </desc>
7461 </attribute>
7462
7463 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7464 <desc>
7465 List of all medium storage formats supported by this VirtualBox
7466 installation.
7467
7468 Keep in mind that the medium format identifier
7469 (<link to="IMediumFormat::id"/>) used in other API calls like
7470 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7471 medium format is a case-insensitive string. This means that, for
7472 example, all of the following strings:
7473 <pre>
7474 "VDI"
7475 "vdi"
7476 "VdI"</pre>
7477 refer to the same medium format.
7478
7479 Note that the virtual medium framework is backend-based, therefore
7480 the list of supported formats depends on what backends are currently
7481 installed.
7482
7483 <see>
7484 <link to="IMediumFormat"/>,
7485 </see>
7486 </desc>
7487 </attribute>
7488
7489 <attribute name="defaultHardDiskFormat" type="wstring">
7490 <desc>
7491 Identifier of the default medium format used by VirtualBox.
7492
7493 The medium format set by this attribute is used by VirtualBox
7494 when the medium format was not specified explicitly. One example is
7495 <link to="IVirtualBox::createHardDisk"/> with the empty
7496 format argument. A more complex example is implicit creation of
7497 differencing media when taking a snapshot of a virtual machine:
7498 this operation will try to use a format of the parent medium first
7499 and if this format does not support differencing media the default
7500 format specified by this argument will be used.
7501
7502 The list of supported medium formats may be obtained by the
7503 <link to="#mediumFormats"/> call. Note that the default medium
7504 format must have a capability to create differencing media;
7505 otherwise operations that create media implicitly may fail
7506 unexpectedly.
7507
7508 The initial value of this property is <tt>"VDI"</tt> in the current
7509 version of the VirtualBox product, but may change in the future.
7510
7511 <note>
7512 Setting this property to @c null or empty string will restore the
7513 initial value.
7514 </note>
7515
7516 <see>
7517 <link to="#mediumFormats"/>,
7518 <link to="IMediumFormat::id"/>,
7519 <link to="IVirtualBox::createHardDisk"/>
7520 </see>
7521 </desc>
7522 </attribute>
7523
7524 <attribute name="freeDiskSpaceWarning" type="long long">
7525 <desc>Issue a warning if the free disk space is below (or in some disk
7526 intensive operation is expected to go below) the given size in
7527 bytes.</desc>
7528 </attribute>
7529
7530 <attribute name="freeDiskSpacePercentWarning" type="unsigned long">
7531 <desc>Issue a warning if the free disk space is below (or in some disk
7532 intensive operation is expected to go below) the given percentage.</desc>
7533 </attribute>
7534
7535 <attribute name="freeDiskSpaceError" type="long long">
7536 <desc>Issue an error if the free disk space is below (or in some disk
7537 intensive operation is expected to go below) the given size in
7538 bytes.</desc>
7539 </attribute>
7540
7541 <attribute name="freeDiskSpacePercentError" type="unsigned long">
7542 <desc>Issue an error if the free disk space is below (or in some disk
7543 intensive operation is expected to go below) the given percentage.</desc>
7544 </attribute>
7545
7546 <attribute name="VRDEAuthLibrary" type="wstring">
7547 <desc>
7548 Library that provides authentication for Remote Desktop clients. The library
7549 is used if a virtual machine's authentication type is set to "external"
7550 in the VM RemoteDisplay configuration.
7551
7552 The system library extension (".DLL" or ".so") must be omitted.
7553 A full path can be specified; if not, then the library must reside on the
7554 system's default library path.
7555
7556 The default value of this property is <tt>"VBoxAuth"</tt>. There is a library
7557 of that name in one of the default VirtualBox library directories.
7558
7559 For details about VirtualBox authentication libraries and how to implement
7560 them, please refer to the VirtualBox manual.
7561
7562 <note>
7563 Setting this property to @c null or empty string will restore the
7564 initial value.
7565 </note>
7566 </desc>
7567 </attribute>
7568
7569 <attribute name="webServiceAuthLibrary" type="wstring">
7570 <desc>
7571 Library that provides authentication for webservice clients. The library
7572 is used if a virtual machine's authentication type is set to "external"
7573 in the VM RemoteDisplay configuration and will be called from
7574 within the <link to="IWebsessionManager::logon" /> implementation.
7575
7576 As opposed to <link to="ISystemProperties::VRDEAuthLibrary" />,
7577 there is no per-VM setting for this, as the webservice is a global
7578 resource (if it is running). Only for this setting (for the webservice),
7579 setting this value to a literal <tt>"null"</tt> string disables authentication,
7580 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7581 no matter what user name and password are supplied.
7582
7583 The initial value of this property is <tt>"VBoxAuth"</tt>,
7584 meaning that the webservice will use the same authentication
7585 library that is used by default for VRDE (again, see
7586 <link to="ISystemProperties::VRDEAuthLibrary" />).
7587 The format and calling convention of authentication libraries
7588 is the same for the webservice as it is for VRDE.
7589
7590 <note>
7591 Setting this property to @c null or empty string will restore the
7592 initial value.
7593 </note>
7594 </desc>
7595 </attribute>
7596
7597 <attribute name="defaultVRDEExtPack" type="wstring">
7598 <desc>
7599 The name of the extension pack providing the default VRDE.
7600
7601 This attribute is for choosing between multiple extension packs
7602 providing VRDE. If only one is installed, it will automatically be the
7603 default one. The attribute value can be empty if no VRDE extension
7604 pack is installed.
7605
7606 For details about VirtualBox Remote Desktop Extension and how to
7607 implement one, please refer to the VirtualBox SDK.
7608 </desc>
7609 </attribute>
7610
7611 <attribute name="LogHistoryCount" type="unsigned long">
7612 <desc>
7613 This value specifies how many old release log files are kept.
7614 </desc>
7615 </attribute>
7616
7617 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7618 <desc>This value hold the default audio driver for the current
7619 system.</desc>
7620 </attribute>
7621
7622 <method name="getMaxDevicesPerPortForStorageBus">
7623 <desc>Returns the maximum number of devices which can be attached to a port
7624 for the given storage bus.</desc>
7625
7626 <param name="bus" type="StorageBus" dir="in">
7627 <desc>The storage bus type to get the value for.</desc>
7628 </param>
7629
7630 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
7631 <desc>The maximum number of devices which can eb attached to the port for the given
7632 storage bus.</desc>
7633 </param>
7634 </method>
7635
7636 <method name="getMinPortCountForStorageBus">
7637 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
7638
7639 <param name="bus" type="StorageBus" dir="in">
7640 <desc>The storage bus type to get the value for.</desc>
7641 </param>
7642
7643 <param name="minPortCount" type="unsigned long" dir="return">
7644 <desc>The minimum number of ports for the given storage bus.</desc>
7645 </param>
7646 </method>
7647
7648 <method name="getMaxPortCountForStorageBus">
7649 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
7650
7651 <param name="bus" type="StorageBus" dir="in">
7652 <desc>The storage bus type to get the value for.</desc>
7653 </param>
7654
7655 <param name="maxPortCount" type="unsigned long" dir="return">
7656 <desc>The maximum number of ports for the given storage bus.</desc>
7657 </param>
7658 </method>
7659
7660 <method name="getMaxInstancesOfStorageBus">
7661 <desc>Returns the maximum number of storage bus instances which
7662 can be configured for each VM. This corresponds to the number of
7663 storage controllers one can have. Value may depend on chipset type
7664 used.</desc>
7665
7666 <param name="chipset" type="ChipsetType" dir="in">
7667 <desc>The chipset type to get the value for.</desc>
7668 </param>
7669
7670 <param name="bus" type="StorageBus" dir="in">
7671 <desc>The storage bus type to get the value for.</desc>
7672 </param>
7673
7674 <param name="maxInstances" type="unsigned long" dir="return">
7675 <desc>The maximum number of instances for the given storage bus.</desc>
7676 </param>
7677 </method>
7678
7679 <method name="getDeviceTypesForStorageBus">
7680 <desc>Returns list of all the supported device types
7681 (<link to="DeviceType"/>) for the given type of storage
7682 bus.</desc>
7683
7684 <param name="bus" type="StorageBus" dir="in">
7685 <desc>The storage bus type to get the value for.</desc>
7686 </param>
7687
7688 <param name="deviceTypes" type="DeviceType" safearray="yes" dir="return">
7689 <desc>The list of all supported device types for the given storage bus.</desc>
7690 </param>
7691 </method>
7692
7693 <method name="getDefaultIoCacheSettingForStorageController">
7694 <desc>Returns the default I/O cache setting for the
7695 given storage controller</desc>
7696
7697 <param name="controllerType" type="StorageControllerType" dir="in">
7698 <desc>The storage controller to the setting for.</desc>
7699 </param>
7700
7701 <param name="enabled" type="boolean" dir="return">
7702 <desc>Returned flag indicating the default value</desc>
7703 </param>
7704 </method>
7705 </interface>
7706
7707 <!--
7708 // IGuest
7709 /////////////////////////////////////////////////////////////////////////
7710 -->
7711
7712 <interface
7713 name="IGuestOSType" extends="$unknown"
7714 uuid="432c1546-1354-4abf-bf08-878a32a373f5"
7715 wsmap="struct"
7716 >
7717 <desc>
7718 </desc>
7719
7720 <attribute name="familyId" type="wstring" readonly="yes">
7721 <desc>Guest OS family identifier string.</desc>
7722 </attribute>
7723
7724 <attribute name="familyDescription" type="wstring" readonly="yes">
7725 <desc>Human readable description of the guest OS family.</desc>
7726 </attribute>
7727
7728 <attribute name="id" type="wstring" readonly="yes">
7729 <desc>Guest OS identifier string.</desc>
7730 </attribute>
7731
7732 <attribute name="description" type="wstring" readonly="yes">
7733 <desc>Human readable description of the guest OS.</desc>
7734 </attribute>
7735
7736 <attribute name="is64Bit" type="boolean" readonly="yes">
7737 <desc>Returns @c true if the given OS is 64-bit</desc>
7738 </attribute>
7739
7740 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7741 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7742 </attribute>
7743
7744 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7745 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7746 </attribute>
7747
7748 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7749 <desc>Recommended RAM size in Megabytes.</desc>
7750 </attribute>
7751
7752 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7753 <desc>Recommended video RAM size in Megabytes.</desc>
7754 </attribute>
7755
7756 <attribute name="recommendedHDD" type="long long" readonly="yes">
7757 <desc>Recommended hard disk size in bytes.</desc>
7758 </attribute>
7759
7760 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7761 <desc>Returns recommended network adapter for this OS type.</desc>
7762 </attribute>
7763
7764 <attribute name="recommendedPae" type="boolean" readonly="yes">
7765 <desc>Returns @c true if using PAE is recommended for this OS type.</desc>
7766 </attribute>
7767
7768 <attribute name="recommendedDvdStorageController" type="StorageControllerType" readonly="yes">
7769 <desc>Recommended storage controller type for DVD/CD drives.</desc>
7770 </attribute>
7771
7772 <attribute name="recommendedDvdStorageBus" type="StorageBus" readonly="yes">
7773 <desc>Recommended storage bus type for DVD/CD drives.</desc>
7774 </attribute>
7775
7776 <attribute name="recommendedHdStorageController" type="StorageControllerType" readonly="yes">
7777 <desc>Recommended storage controller type for HD drives.</desc>
7778 </attribute>
7779
7780 <attribute name="recommendedHdStorageBus" type="StorageBus" readonly="yes">
7781 <desc>Recommended storage bus type for HD drives.</desc>
7782 </attribute>
7783
7784 <attribute name="recommendedFirmware" type="FirmwareType" readonly="yes">
7785 <desc>Recommended firmware type.</desc>
7786 </attribute>
7787
7788 <attribute name="recommendedUsbHid" type="boolean" readonly="yes">
7789 <desc>Returns @c true if using USB Human Interface Devices, such as keyboard and mouse recommended.</desc>
7790 </attribute>
7791
7792 <attribute name="recommendedHpet" type="boolean" readonly="yes">
7793 <desc>Returns @c true if using HPET is recommended for this OS type.</desc>
7794 </attribute>
7795
7796 <attribute name="recommendedUsbTablet" type="boolean" readonly="yes">
7797 <desc>Returns @c true if using a USB Tablet is recommended.</desc>
7798 </attribute>
7799
7800 <attribute name="recommendedRtcUseUtc" type="boolean" readonly="yes">
7801 <desc>Returns @c true if the RTC of this VM should be set to UTC</desc>
7802 </attribute>
7803
7804 <attribute name="recommendedChipset" type="ChipsetType" readonly="yes">
7805 <desc>Recommended chipset type.</desc>
7806 </attribute>
7807
7808 <attribute name="recommendedAudioController" type="AudioControllerType" readonly="yes">
7809 <desc>Recommended audio type.</desc>
7810 </attribute>
7811
7812 </interface>
7813
7814 <enum
7815 name="AdditionsRunLevelType"
7816 uuid="a25417ee-a9dd-4f5b-b0dc-377860087754"
7817 >
7818 <desc>
7819 Guest Additions run level type.
7820 </desc>
7821
7822 <const name="None" value="0">
7823 <desc>Guest Additions are not loaded.</desc>
7824 </const>
7825 <const name="System" value="1">
7826 <desc>Guest drivers are loaded.</desc>
7827 </const>
7828 <const name="Userland" value="2">
7829 <desc>Common components (such as application services) are loaded.</desc>
7830 </const>
7831 <const name="Desktop" value="3">
7832 <desc>Per-user desktop components are loaded.</desc>
7833 </const>
7834 </enum>
7835
7836 <enum
7837 name="AdditionsUpdateFlag"
7838 uuid="726a818d-18d6-4389-94e8-3e9e6826171a"
7839 >
7840 <desc>
7841 Guest Additions update flags.
7842 </desc>
7843
7844 <const name="None" value="0">
7845 <desc>No flag set.</desc>
7846 </const>
7847 <const name="WaitForUpdateStartOnly" value="1">
7848 <desc>Only wait for the update process being started and do not
7849 wait while peforming the actual update.</desc>
7850 </const>
7851 </enum>
7852
7853 <enum
7854 name="ExecuteProcessFlag"
7855 uuid="3258e8a5-ba0c-43d5-86b5-cf91405fddc0"
7856 >
7857 <desc>
7858 Guest process execution flags.
7859 </desc>
7860
7861 <const name="None" value="0">
7862 <desc>No flag set.</desc>
7863 </const>
7864
7865 <const name="WaitForProcessStartOnly" value="1">
7866 <desc>Only use the specified timeout value to wait for starting the guest process - the guest
7867 process itself then uses an infinite timeout.</desc>
7868 </const>
7869
7870 <const name="IgnoreOrphanedProcesses" value="2">
7871 <desc>Do not report an error when executed processes are still alive when VBoxService or the guest OS is shutting down.</desc>
7872 </const>
7873
7874 <const name="Hidden" value="4">
7875 <desc>Don't show the started process according to the guest OS guidelines.</desc>
7876 </const>
7877 </enum>
7878
7879 <enum
7880 name="ProcessInputFlag"
7881 uuid="5d38c1dd-2604-4ddf-92e5-0c0cdd3bdbd5"
7882 >
7883 <desc>
7884 Guest process input flags.
7885 </desc>
7886
7887 <const name="None" value="0">
7888 <desc>No flag set.</desc>
7889 </const>
7890 <const name="EndOfFile" value="1">
7891 <desc>End of file (input) reached.</desc>
7892 </const>
7893 </enum>
7894
7895 <enum
7896 name="CopyFileFlag"
7897 uuid="23f79fdf-738a-493d-b80b-42d607c9b916"
7898 >
7899 <desc>
7900 Host/Guest copy flags. At the moment none of these flags
7901 are implemented.
7902 </desc>
7903
7904 <const name="None" value="0">
7905 <desc>No flag set.</desc>
7906 </const>
7907
7908 <const name="Recursive" value="1">
7909 <desc>Copy directories recursively.</desc>
7910 </const>
7911
7912 <const name="Update" value="2">
7913 <desc>Only copy when the source file is newer than the destination file or when the destination file is missing.</desc>
7914 </const>
7915
7916 <const name="FollowLinks" value="4">
7917 <desc>Follow symbolic links.</desc>
7918 </const>
7919 </enum>
7920
7921 <enum
7922 name="CreateDirectoryFlag"
7923 uuid="26ff5bdd-c81f-4304-857b-b8be5e3f9cd6"
7924 >
7925 <desc>
7926 Directory creation flags.
7927 </desc>
7928
7929 <const name="None" value="0">
7930 <desc>No flag set.</desc>
7931 </const>
7932
7933 <const name="Parents" value="1">
7934 <desc>No error if existing, make parent directories as needed.</desc>
7935 </const>
7936 </enum>
7937
7938 <interface
7939 name="IGuest" extends="$unknown"
7940 uuid="7ce7e4d8-cdaa-4d83-a0f4-510c8ee70aea"
7941 wsmap="managed"
7942 >
7943 <desc>
7944 The IGuest interface represents information about the operating system
7945 running inside the virtual machine. Used in
7946 <link to="IConsole::guest"/>.
7947
7948 IGuest provides information about the guest operating system, whether
7949 Guest Additions are installed and other OS-specific virtual machine
7950 properties.
7951 </desc>
7952
7953 <attribute name="OSTypeId" type="wstring" readonly="yes">
7954 <desc>
7955 Identifier of the Guest OS type as reported by the Guest
7956 Additions.
7957 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7958 an IGuestOSType object representing details about the given
7959 Guest OS type.
7960 <note>
7961 If Guest Additions are not installed, this value will be
7962 the same as <link to="IMachine::OSTypeId"/>.
7963 </note>
7964 </desc>
7965 </attribute>
7966
7967 <attribute name="additionsRunLevel" type="AdditionsRunLevelType" readonly="yes">
7968 <desc>
7969 Current run level of the Guest Additions.
7970 </desc>
7971 </attribute>
7972
7973 <attribute name="additionsVersion" type="wstring" readonly="yes">
7974 <desc>
7975 Version of the Guest Additions including the revision (3 decimal numbers
7976 separated by dots + revision number) installed on the guest or empty
7977 when the Additions are not installed.
7978 </desc>
7979 </attribute>
7980
7981 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7982 <desc>
7983 Flag whether seamless guest display rendering (seamless desktop
7984 integration) is supported.
7985 </desc>
7986 </attribute>
7987
7988 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7989 <desc>
7990 Flag whether the guest is in graphics mode. If it is not, then
7991 seamless rendering will not work, resize hints are not immediately
7992 acted on and guest display resizes are probably not initiated by
7993 the guest additions.
7994 </desc>
7995 </attribute>
7996
7997 <attribute name="memoryBalloonSize" type="unsigned long">
7998 <desc>Guest system memory balloon size in megabytes (transient property).</desc>
7999 </attribute>
8000
8001 <attribute name="statisticsUpdateInterval" type="unsigned long">
8002 <desc>Interval to update guest statistics in seconds.</desc>
8003 </attribute>
8004
8005 <method name="internalGetStatistics">
8006 <desc>
8007 Internal method; do not use as it might change at any time
8008 </desc>
8009 <param name="cpuUser" type="unsigned long" dir="out">
8010 <desc>Percentage of processor time spent in user mode as seen by the guest</desc>
8011 </param>
8012 <param name="cpuKernel" type="unsigned long" dir="out">
8013 <desc>Percentage of processor time spent in kernel mode as seen by the guest</desc>
8014 </param>
8015 <param name="cpuIdle" type="unsigned long" dir="out">
8016 <desc>Percentage of processor time spent idling as seen by the guest</desc>
8017 </param>
8018 <param name="memTotal" type="unsigned long" dir="out">
8019 <desc>Total amount of physical guest RAM</desc>
8020 </param>
8021 <param name="memFree" type="unsigned long" dir="out">
8022 <desc>Free amount of physical guest RAM</desc>
8023 </param>
8024 <param name="memBalloon" type="unsigned long" dir="out">
8025 <desc>Amount of ballooned physical guest RAM</desc>
8026 </param>
8027 <param name="memShared" type="unsigned long" dir="out">
8028 <desc>Amount of shared physical guest RAM</desc>
8029 </param>
8030 <param name="memCache" type="unsigned long" dir="out">
8031 <desc>Total amount of guest (disk) cache memory</desc>
8032 </param>
8033 <param name="pagedTotal" type="unsigned long" dir="out">
8034 <desc>Total amount of space in the page file</desc>
8035 </param>
8036 <param name="memAllocTotal" type="unsigned long" dir="out">
8037 <desc>Total amount of memory allocated by the hypervisor</desc>
8038 </param>
8039 <param name="memFreeTotal" type="unsigned long" dir="out">
8040 <desc>Total amount of free memory available in the hypervisor</desc>
8041 </param>
8042 <param name="memBalloonTotal" type="unsigned long" dir="out">
8043 <desc>Total amount of memory ballooned by the hypervisor</desc>
8044 </param>
8045 <param name="memSharedTotal" type="unsigned long" dir="out">
8046 <desc>Total amount of shared memory in the hypervisor</desc>
8047 </param>
8048 </method>
8049
8050 <method name="getAdditionsStatus">
8051 <desc>
8052 Retrieve the current status of a certain Guest Additions run level.
8053
8054 <result name="VBOX_E_NOT_SUPPORTED">
8055 Wrong status level specified.
8056 </result>
8057
8058 </desc>
8059 <param name="level" type="AdditionsRunLevelType" dir="in">
8060 <desc>Status level to check</desc>
8061 </param>
8062 <param name="active" type="boolean" dir="return">
8063 <desc>Flag whether the status level has been reached or not</desc>
8064 </param>
8065 </method>
8066
8067 <method name="setCredentials">
8068 <desc>
8069 Store login credentials that can be queried by guest operating
8070 systems with Additions installed. The credentials are transient
8071 to the session and the guest may also choose to erase them. Note
8072 that the caller cannot determine whether the guest operating system
8073 has queried or made use of the credentials.
8074
8075 <result name="VBOX_E_VM_ERROR">
8076 VMM device is not available.
8077 </result>
8078
8079 </desc>
8080 <param name="userName" type="wstring" dir="in">
8081 <desc>User name string, can be empty</desc>
8082 </param>
8083 <param name="password" type="wstring" dir="in">
8084 <desc>Password string, can be empty</desc>
8085 </param>
8086 <param name="domain" type="wstring" dir="in">
8087 <desc>Domain name (guest logon scheme specific), can be empty</desc>
8088 </param>
8089 <param name="allowInteractiveLogon" type="boolean" dir="in">
8090 <desc>
8091 Flag whether the guest should alternatively allow the user to
8092 interactively specify different credentials. This flag might
8093 not be supported by all versions of the Additions.
8094 </desc>
8095 </param>
8096 </method>
8097
8098 <method name="executeProcess">
8099 <desc>
8100 Executes an existing program inside the guest VM.
8101
8102 <result name="VBOX_E_IPRT_ERROR">
8103 Could not execute process.
8104 </result>
8105
8106 </desc>
8107 <param name="execName" type="wstring" dir="in">
8108 <desc>
8109 Full path name of the command to execute on the guest; the
8110 commands has to exists in the guest VM in order to be executed.
8111 </desc>
8112 </param>
8113 <param name="flags" type="unsigned long" dir="in">
8114 <desc>
8115 <link to="ExecuteProcessFlag"/> flags.
8116 </desc>
8117 </param>
8118 <param name="arguments" type="wstring" safearray="yes" dir="in">
8119 <desc>
8120 Array of arguments passed to the execution command.
8121 </desc>
8122 </param>
8123 <param name="environment" type="wstring" safearray="yes" dir="in">
8124 <desc>
8125 Environment variables that can be set while the command is being
8126 executed, in form of "NAME=VALUE"; one pair per entry. To unset a
8127 variable just set its name ("NAME") without a value.
8128 </desc>
8129 </param>
8130 <param name="userName" type="wstring" dir="in">
8131 <desc>
8132 User name under which the command will be executed; has to exist
8133 and have the appropriate rights to execute programs in the VM.
8134 </desc>
8135 </param>
8136 <param name="password" type="wstring" dir="in">
8137 <desc>
8138 Password of the user account specified.
8139 </desc>
8140 </param>
8141 <param name="timeoutMS" type="unsigned long" dir="in">
8142 <desc>
8143 The maximum timeout value (in msec) to wait for finished program
8144 execution. Pass 0 for an infinite timeout.
8145 </desc>
8146 </param>
8147 <param name="pid" type="unsigned long" dir="out">
8148 <desc>
8149 The PID (process ID) of the started command for later reference.
8150 </desc>
8151 </param>
8152 <param name="progress" type="IProgress" dir="return">
8153 <desc>Progress object to track the operation completion.</desc>
8154 </param>
8155 </method>
8156
8157 <method name="getProcessOutput">
8158 <desc>
8159 Retrieves output of a formerly started process.
8160
8161 <result name="VBOX_E_IPRT_ERROR">
8162 Could not retrieve output.
8163 </result>
8164
8165 </desc>
8166 <param name="pid" type="unsigned long" dir="in">
8167 <desc>
8168 Process id returned by earlier executeProcess() call.
8169 </desc>
8170 </param>
8171 <param name="flags" type="unsigned long" dir="in">
8172 <desc>
8173 Flags describing which output to retrieve.
8174 </desc>
8175 </param>
8176 <param name="timeoutMS" type="unsigned long" dir="in">
8177 <desc>
8178 The maximum timeout value (in msec) to wait for output
8179 data. Pass 0 for an infinite timeout.
8180 </desc>
8181 </param>
8182 <param name="size" type="long long" dir="in">
8183 <desc>
8184 Size in bytes to read in the buffer.
8185 </desc>
8186 </param>
8187 <param name="data" type="octet" dir="return" safearray="yes">
8188 <desc>
8189 Buffer for retrieving the actual output. A data size of 0 means end of file
8190 if the requested size was not 0. This is the unprocessed
8191 output data, i.e. the line ending style depends on the platform of
8192 the system the server is running on.
8193 </desc>
8194 </param>
8195 </method>
8196
8197 <method name="getProcessStatus">
8198 <desc>
8199 Retrieves status, exit code and the exit reason of a formerly started process.
8200
8201 <result name="VBOX_E_IPRT_ERROR">
8202 Process with specified PID was not found.
8203 </result>
8204
8205 </desc>
8206 <param name="pid" type="unsigned long" dir="in">
8207 <desc>
8208 Process id returned by earlier executeProcess() call.
8209 </desc>
8210 </param>
8211 <param name="exitcode" type="unsigned long" dir="out">
8212 <desc>
8213 The exit code (if available).
8214 </desc>
8215 </param>
8216 <param name="flags" type="unsigned long" dir="out">
8217 <desc>
8218 Additional flags of process status. Not used at the moment and
8219 must be set to 0.
8220 </desc>
8221 </param>
8222 <param name="reason" type="unsigned long" dir="return">
8223 <desc>
8224 The current process status.
8225 </desc>
8226 </param>
8227 </method>
8228
8229 <method name="copyToGuest">
8230 <desc>
8231 Copies files/directories from host to the guest.
8232
8233 <result name="VBOX_E_IPRT_ERROR">
8234 Error while copying.
8235 </result>
8236
8237 </desc>
8238 <param name="source" type="wstring" dir="in">
8239 <desc>
8240 Source file on the host to copy.
8241 </desc>
8242 </param>
8243 <param name="dest" type="wstring" dir="in">
8244 <desc>
8245 Destination path on the guest.
8246 </desc>
8247 </param>
8248 <param name="userName" type="wstring" dir="in">
8249 <desc>
8250 User name under which the copy command will be executed; the
8251 user has to exist and have the appropriate rights to write to
8252 the destination path.
8253 </desc>
8254 </param>
8255 <param name="password" type="wstring" dir="in">
8256 <desc>
8257 Password of the user account specified.
8258 </desc>
8259 </param>
8260 <param name="flags" type="unsigned long" dir="in">
8261 <desc>
8262 <link to="CopyFileFlag"/> flags. Not used at the moment and should be set to 0.
8263 </desc>
8264 </param>
8265 <param name="progress" type="IProgress" dir="return">
8266 <desc>Progress object to track the operation completion.</desc>
8267 </param>
8268 </method>
8269
8270 <method name="createDirectory">
8271 <desc>
8272 Creates a directory on the guest.
8273
8274 <result name="VBOX_E_IPRT_ERROR">
8275 Error while creating directory.
8276 </result>
8277
8278 </desc>
8279 <param name="directory" type="wstring" dir="in">
8280 <desc>
8281 Directory to create.
8282 </desc>
8283 </param>
8284 <param name="userName" type="wstring" dir="in">
8285 <desc>
8286 User name under which the directory creation will be executed; the
8287 user has to exist and have the appropriate rights to create the
8288 desired directory.
8289 </desc>
8290 </param>
8291 <param name="password" type="wstring" dir="in">
8292 <desc>
8293 Password of the user account specified.
8294 </desc>
8295 </param>
8296 <param name="mode" type="unsigned long" dir="in">
8297 <desc>
8298 File mode.
8299 </desc>
8300 </param>
8301 <param name="flags" type="unsigned long" dir="in">
8302 <desc>
8303 <link to="CreateDirectoryFlag"/> flags.
8304 </desc>
8305 </param>
8306 <param name="progress" type="IProgress" dir="return">
8307 <desc>Progress object to track the operation completion.</desc>
8308 </param>
8309 </method>
8310
8311 <method name="setProcessInput">
8312 <desc>
8313 Sends input into a formerly started process.
8314
8315 <result name="VBOX_E_IPRT_ERROR">
8316 Could not send input.
8317 </result>
8318
8319 </desc>
8320 <param name="pid" type="unsigned long" dir="in">
8321 <desc>
8322 Process id returned by earlier executeProcess() call.
8323 </desc>
8324 </param>
8325 <param name="flags" type="unsigned long" dir="in">
8326 <desc>
8327 <link to="ProcessInputFlag"/> flags.
8328 </desc>
8329 </param>
8330 <param name="timeoutMS" type="unsigned long" dir="in">
8331 <desc>
8332 The maximum timeout value (in msec) to wait for getting the
8333 data transfered to the guest. Pass 0 for an infinite timeout.
8334 </desc>
8335 </param>
8336 <param name="data" type="octet" dir="in" safearray="yes">
8337 <desc>
8338 Buffer of input data to send to the started process to.
8339 </desc>
8340 </param>
8341 <param name="written" type="unsigned long" dir="return">
8342 <desc>
8343 Number of bytes written.
8344 </desc>
8345 </param>
8346 </method>
8347
8348 <method name="updateGuestAdditions">
8349 <desc>
8350 Updates already installed Guest Additions in a VM
8351 (Windows guests only).
8352
8353 <result name="VBOX_E_IPRT_ERROR">
8354 Error while updating.
8355 </result>
8356
8357 </desc>
8358 <param name="source" type="wstring" dir="in">
8359 <desc>
8360 Path to the Guest Additions .ISO file to use for the upate.
8361 </desc>
8362 </param>
8363 <param name="flags" type="unsigned long" dir="in">
8364 <desc>
8365 <link to="AdditionsUpdateFlag"/> flags.
8366 </desc>
8367 </param>
8368 <param name="progress" type="IProgress" dir="return">
8369 <desc>Progress object to track the operation completion.</desc>
8370 </param>
8371 </method>
8372
8373 </interface>
8374
8375
8376 <!--
8377 // IProgress
8378 /////////////////////////////////////////////////////////////////////////
8379 -->
8380
8381 <interface
8382 name="IProgress" extends="$unknown"
8383 uuid="A163C98F-8635-4AA8-B770-A9941737F3EF"
8384 wsmap="managed"
8385 >
8386 <desc>
8387 The IProgress interface is used to track and control
8388 asynchronous tasks within VirtualBox.
8389
8390 An instance of this is returned every time VirtualBox starts
8391 an asynchronous task (in other words, a separate thread) which
8392 continues to run after a method call returns. For example,
8393 <link to="IConsole::saveState" />, which saves the state of
8394 a running virtual machine, can take a long time to complete.
8395 To be able to display a progress bar, a user interface such as
8396 the VirtualBox graphical user interface can use the IProgress
8397 object returned by that method.
8398
8399 Note that IProgress is a "read-only" interface in the sense
8400 that only the VirtualBox internals behind the Main API can
8401 create and manipulate progress objects, whereas client code
8402 can only use the IProgress object to monitor a task's
8403 progress and, if <link to="#cancelable" /> is @c true,
8404 cancel the task by calling <link to="#cancel" />.
8405
8406 A task represented by IProgress consists of either one or
8407 several sub-operations that run sequentially, one by one (see
8408 <link to="#operation" /> and <link to="#operationCount" />).
8409 Every operation is identified by a number (starting from 0)
8410 and has a separate description.
8411
8412 You can find the individual percentage of completion of the current
8413 operation in <link to="#operationPercent" /> and the
8414 percentage of completion of the task as a whole
8415 in <link to="#percent" />.
8416
8417 Similarly, you can wait for the completion of a particular
8418 operation via <link to="#waitForOperationCompletion" /> or
8419 for the completion of the whole task via
8420 <link to="#waitForCompletion" />.
8421 </desc>
8422
8423 <attribute name="id" type="uuid" mod="string" readonly="yes">
8424 <desc>ID of the task.</desc>
8425 </attribute>
8426
8427 <attribute name="description" type="wstring" readonly="yes">
8428 <desc>Description of the task.</desc>
8429 </attribute>
8430
8431 <attribute name="initiator" type="$unknown" readonly="yes">
8432 <desc>Initiator of the task.</desc>
8433 </attribute>
8434
8435 <attribute name="cancelable" type="boolean" readonly="yes">
8436 <desc>Whether the task can be interrupted.</desc>
8437 </attribute>
8438
8439 <attribute name="percent" type="unsigned long" readonly="yes">
8440 <desc>
8441 Current progress value of the task as a whole, in percent.
8442 This value depends on how many operations are already complete.
8443 Returns 100 if <link to="#completed" /> is @c true.
8444 </desc>
8445 </attribute>
8446
8447 <attribute name="timeRemaining" type="long" readonly="yes">
8448 <desc>
8449 Estimated remaining time until the task completes, in
8450 seconds. Returns 0 once the task has completed; returns -1
8451 if the remaining time cannot be computed, in particular if
8452 the current progress is 0.
8453
8454 Even if a value is returned, the estimate will be unreliable
8455 for low progress values. It will become more reliable as the
8456 task progresses; it is not recommended to display an ETA
8457 before at least 20% of a task have completed.
8458 </desc>
8459 </attribute>
8460
8461 <attribute name="completed" type="boolean" readonly="yes">
8462 <desc>Whether the task has been completed.</desc>
8463 </attribute>
8464
8465 <attribute name="canceled" type="boolean" readonly="yes">
8466 <desc>Whether the task has been canceled.</desc>
8467 </attribute>
8468
8469 <attribute name="resultCode" type="long" readonly="yes">
8470 <desc>
8471 Result code of the progress task.
8472 Valid only if <link to="#completed"/> is @c true.
8473 </desc>
8474 </attribute>
8475
8476 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
8477 <desc>
8478 Extended information about the unsuccessful result of the
8479 progress operation. May be @c null if no extended information
8480 is available.
8481 Valid only if <link to="#completed"/> is @c true and
8482 <link to="#resultCode"/> indicates a failure.
8483 </desc>
8484 </attribute>
8485
8486 <attribute name="operationCount" type="unsigned long" readonly="yes">
8487 <desc>
8488 Number of sub-operations this task is divided into.
8489 Every task consists of at least one suboperation.
8490 </desc>
8491 </attribute>
8492
8493 <attribute name="operation" type="unsigned long" readonly="yes">
8494 <desc>Number of the sub-operation being currently executed.</desc>
8495 </attribute>
8496
8497 <attribute name="operationDescription" type="wstring" readonly="yes">
8498 <desc>
8499 Description of the sub-operation being currently executed.
8500 </desc>
8501 </attribute>
8502
8503 <attribute name="operationPercent" type="unsigned long" readonly="yes">
8504 <desc>Progress value of the current sub-operation only, in percent.</desc>
8505 </attribute>
8506
8507 <attribute name="operationWeight" type="unsigned long" readonly="yes">
8508 <desc>Weight value of the current sub-operation only.</desc>
8509 </attribute>
8510
8511 <attribute name="timeout" type="unsigned long">
8512 <desc>
8513 When non-zero, this specifies the number of milliseconds after which
8514 the operation will automatically be canceled. This can only be set on
8515 cancelable objects.
8516 </desc>
8517 </attribute>
8518
8519 <method name="setCurrentOperationProgress">
8520 <desc>Internal method, not to be called externally.</desc>
8521 <param name="percent" type="unsigned long" dir="in" />
8522 </method>
8523 <method name="setNextOperation">
8524 <desc>Internal method, not to be called externally.</desc>
8525 <param name="nextOperationDescription" type="wstring" dir="in" />
8526 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8527 </method>
8528
8529 <method name="waitForCompletion">
8530 <desc>
8531 Waits until the task is done (including all sub-operations)
8532 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8533
8534 Note that the VirtualBox/XPCOM/COM/native event queues of the calling
8535 thread are not processed while waiting. Neglecting event queues may
8536 have dire consequences (degrade performance, resource hogs,
8537 deadlocks, etc.), this is specially so for the main thread on
8538 platforms using XPCOM. Callers are adviced wait for short periods
8539 and service their event queues between calls, or to create a worker
8540 thread to do the waiting.
8541
8542 <result name="VBOX_E_IPRT_ERROR">
8543 Failed to wait for task completion.
8544 </result>
8545 </desc>
8546
8547 <param name="timeout" type="long" dir="in">
8548 <desc>
8549 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8550 </desc>
8551 </param>
8552 </method>
8553
8554 <method name="waitForOperationCompletion">
8555 <desc>
8556 Waits until the given operation is done with a given timeout in
8557 milliseconds; specify -1 for an indefinite wait.
8558
8559 See <link to="#waitForCompletion"> for event queue considerations.</link>
8560
8561 <result name="VBOX_E_IPRT_ERROR">
8562 Failed to wait for operation completion.
8563 </result>
8564
8565 </desc>
8566 <param name="operation" type="unsigned long" dir="in">
8567 <desc>
8568 Number of the operation to wait for.
8569 Must be less than <link to="#operationCount"/>.
8570 </desc>
8571 </param>
8572 <param name="timeout" type="long" dir="in">
8573 <desc>
8574 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8575 </desc>
8576 </param>
8577 </method>
8578
8579 <method name="cancel">
8580 <desc>
8581 Cancels the task.
8582 <note>
8583 If <link to="#cancelable"/> is @c false, then this method will fail.
8584 </note>
8585
8586 <result name="VBOX_E_INVALID_OBJECT_STATE">
8587 Operation cannot be canceled.
8588 </result>
8589
8590 </desc>
8591 </method>
8592
8593 </interface>
8594
8595 <!--
8596 // ISnapshot
8597 /////////////////////////////////////////////////////////////////////////
8598 -->
8599
8600 <interface
8601 name="ISnapshot" extends="$unknown"
8602 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8603 wsmap="managed"
8604 >
8605 <desc>
8606 The ISnapshot interface represents a snapshot of the virtual
8607 machine.
8608
8609 Together with the differencing media that are created
8610 when a snapshot is taken, a machine can be brought back to
8611 the exact state it was in when the snapshot was taken.
8612
8613 The ISnapshot interface has no methods, only attributes; snapshots
8614 are controlled through methods of the <link to="IConsole" /> interface
8615 which also manage the media associated with the snapshot.
8616 The following operations exist:
8617
8618 <ul>
8619 <li><link to="IConsole::takeSnapshot"/> creates a new snapshot
8620 by creating new, empty differencing images for the machine's
8621 media and saving the VM settings and (if the VM is running)
8622 the current VM state in the snapshot.
8623
8624 The differencing images will then receive all data written to
8625 the machine's media, while their parent (base) images
8626 remain unmodified after the snapshot has been taken (see
8627 <link to="IMedium" /> for details about differencing images).
8628 This simplifies restoring a machine to the state of a snapshot:
8629 only the differencing images need to be deleted.
8630
8631 The current machine state is not changed by taking a snapshot.
8632 If the machine is running, it will resume execution after the
8633 snapshot has been taken. After calling this,
8634 <link to="IMachine::currentSnapshot" /> is set to the snapshot
8635 just created.
8636 </li>
8637
8638 <li><link to="IConsole::restoreSnapshot"/> resets a machine to
8639 the state of a previous snapshot by deleting the differencing
8640 image of each of the machine's media and setting the machine's
8641 settings and state to the state that was saved in the snapshot (if any).
8642
8643 This destroys the machine's current state. After calling this,
8644 <link to="IMachine::currentSnapshot" /> is set to the snapshot that was
8645 restored.
8646 </li>
8647
8648 <li><link to="IConsole::deleteSnapshot"/> deletes a snapshot
8649 without affecting the current machine state.
8650
8651 This does not change the current machine state, but instead frees the
8652 resources allocated when the snapshot was taken: the settings and machine
8653 state file are deleted (if any), and the snapshot's differencing image for
8654 each of the machine's media gets merged with its parent image.
8655
8656 Neither the current machine state nor other snapshots are affected
8657 by this operation, except that parent media will be modified
8658 to contain the disk data associated with the snapshot being deleted.
8659
8660 When deleting the current snapshot, the <link to="IMachine::currentSnapshot" />
8661 attribute is set to the current snapshot's parent or NULL if it
8662 has no parent. Otherwise the attribute is unchanged.
8663 </li>
8664 </ul>
8665
8666 Each snapshot contains the settings of the virtual machine (hardware
8667 configuration etc.). In addition, if the machine was running when the
8668 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8669 the current VM state is saved in the snapshot (similarly to what happens
8670 when a VM's state is saved). The snapshot is then said to
8671 be <i>online</i> because when restoring it, the VM will be running.
8672
8673 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8674 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8675
8676 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8677 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8678 it then contains a so-called "zero execution state", representing a
8679 machine that is powered off.
8680 </desc>
8681
8682 <attribute name="id" type="uuid" mod="string" readonly="yes">
8683 <desc>UUID of the snapshot.</desc>
8684 </attribute>
8685
8686 <attribute name="name" type="wstring">
8687 <desc>Short name of the snapshot.</desc>
8688 </attribute>
8689
8690 <attribute name="description" type="wstring">
8691 <desc>Optional description of the snapshot.</desc>
8692 </attribute>
8693
8694 <attribute name="timeStamp" type="long long" readonly="yes">
8695 <desc>
8696 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8697 </desc>
8698 </attribute>
8699
8700 <attribute name="online" type="boolean" readonly="yes">
8701 <desc>
8702 @c true if this snapshot is an online snapshot and @c false otherwise.
8703
8704 When this attribute is @c true, the
8705 <link to="IMachine::stateFilePath"/> attribute of the
8706 <link to="#machine"/> object associated with this snapshot
8707 will point to the saved state file. Otherwise, it will be
8708 an empty string.
8709 </desc>
8710 </attribute>
8711
8712 <attribute name="machine" type="IMachine" readonly="yes">
8713 <desc>
8714 Virtual machine this snapshot is taken on. This object
8715 stores all settings the machine had when taking this snapshot.
8716 <note>
8717 The returned machine object is immutable, i.e. no
8718 any settings can be changed.
8719 </note>
8720 </desc>
8721 </attribute>
8722
8723 <attribute name="parent" type="ISnapshot" readonly="yes">
8724 <desc>
8725 Parent snapshot (a snapshot this one is based on), or
8726 @c null if the snapshot has no parent (i.e. is the first snapshot).
8727 </desc>
8728 </attribute>
8729
8730 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8731 <desc>
8732 Child snapshots (all snapshots having this one as a parent).
8733 </desc>
8734 </attribute>
8735
8736 </interface>
8737
8738
8739 <!--
8740 // IMedium
8741 /////////////////////////////////////////////////////////////////////////
8742 -->
8743
8744 <enum
8745 name="MediumState"
8746 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8747 >
8748 <desc>
8749 Virtual medium state.
8750 <see>IMedium</see>
8751 </desc>
8752
8753 <const name="NotCreated" value="0">
8754 <desc>
8755 Associated medium storage does not exist (either was not created yet or
8756 was deleted).
8757 </desc>
8758 </const>
8759 <const name="Created" value="1">
8760 <desc>
8761 Associated storage exists and accessible; this gets set if the
8762 accessibility check performed by <link to="IMedium::refreshState" />
8763 was successful.
8764 </desc>
8765 </const>
8766 <const name="LockedRead" value="2">
8767 <desc>
8768 Medium is locked for reading (see <link to="IMedium::lockRead"/>),
8769 no data modification is possible.
8770 </desc>
8771 </const>
8772 <const name="LockedWrite" value="3">
8773 <desc>
8774 Medium is locked for writing (see <link to="IMedium::lockWrite"/>),
8775 no concurrent data reading or modification is possible.
8776 </desc>
8777 </const>
8778 <const name="Inaccessible" value="4">
8779 <desc>
8780 Medium accessibility check (see <link to="IMedium::refreshState" />) has
8781 not yet been performed, or else, associated medium storage is not
8782 accessible. In the first case, <link to="IMedium::lastAccessError"/>
8783 is empty, in the second case, it describes the error that occurred.
8784 </desc>
8785 </const>
8786 <const name="Creating" value="5">
8787 <desc>
8788 Associated medium storage is being created.
8789 </desc>
8790 </const>
8791 <const name="Deleting" value="6">
8792 <desc>
8793 Associated medium storage is being deleted.
8794 </desc>
8795 </const>
8796 </enum>
8797
8798 <enum
8799 name="MediumType"
8800 uuid="fe663fb5-c244-4e1b-9d81-c628b417dd04"
8801 >
8802 <desc>
8803 Virtual medium type.
8804 <see>IMedium</see>
8805 </desc>
8806
8807 <const name="Normal" value="0">
8808 <desc>
8809 Normal medium (attached directly or indirectly, preserved
8810 when taking snapshots).
8811 </desc>
8812 </const>
8813 <const name="Immutable" value="1">
8814 <desc>
8815 Immutable medium (attached indirectly, changes are wiped out
8816 the next time the virtual machine is started).
8817 </desc>
8818 </const>
8819 <const name="Writethrough" value="2">
8820 <desc>
8821 Write through medium (attached directly, ignored when
8822 taking snapshots).
8823 </desc>
8824 </const>
8825 <const name="Shareable" value="3">
8826 <desc>
8827 Allow using this medium concurrently by several machines.
8828 <note>Present since VirtualBox 3.2.0, and accepted since 3.2.8.</note>
8829 </desc>
8830 </const>
8831 <const name="Readonly" value="4">
8832 <desc>
8833 A readonly medium, which can of course be used by several machines.
8834 <note>Present and accepted since VirtualBox 4.0.</note>
8835 </desc>
8836 </const>
8837 <const name="MultiAttach" value="5">
8838 <desc>
8839 A medium which is is indirectly attached, so that one base medium can
8840 be used for several VMs which have their own differencing medium to
8841 store their modifications. In some sense a variant of Immutable
8842 with unset AutoReset flag in each differencing medium.
8843 <note>Present and accepted since VirtualBox 4.0.</note>
8844 </desc>
8845 </const>
8846 </enum>
8847
8848 <enum
8849 name="MediumVariant"
8850 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8851 >
8852 <desc>
8853 Virtual medium image variant. More than one flag may be set.
8854 <see>IMedium</see>
8855 </desc>
8856
8857 <const name="Standard" value="0">
8858 <desc>
8859 No particular variant requested, results in using the backend default.
8860 </desc>
8861 </const>
8862 <const name="VmdkSplit2G" value="0x01">
8863 <desc>
8864 VMDK image split in chunks of less than 2GByte.
8865 </desc>
8866 </const>
8867 <const name="VmdkStreamOptimized" value="0x04">
8868 <desc>
8869 VMDK streamOptimized image. Special import/export format which is
8870 read-only/append-only.
8871 </desc>
8872 </const>
8873 <const name="VmdkESX" value="0x08">
8874 <desc>
8875 VMDK format variant used on ESX products.
8876 </desc>
8877 </const>
8878 <const name="Fixed" value="0x10000">
8879 <desc>
8880 Fixed image. Only allowed for base images.
8881 </desc>
8882 </const>
8883 <const name="Diff" value="0x20000">
8884 <desc>
8885 Differencing image. Only allowed for child images.
8886 </desc>
8887 </const>
8888 </enum>
8889
8890 <interface
8891 name="IMediumAttachment" extends="$unknown"
8892 uuid="aa4b4840-934f-454d-9a28-23e8f4235edf"
8893 wsmap="struct"
8894 >
8895 <desc>
8896 The IMediumAttachment interface links storage media to virtual machines.
8897 For each medium (<link to="IMedium"/>) which has been attached to a
8898 storage controller (<link to="IStorageController"/>) of a machine
8899 (<link to="IMachine"/>) via the <link to="IMachine::attachDevice" />
8900 method, one instance of IMediumAttachment is added to the machine's
8901 <link to="IMachine::mediumAttachments"/> array attribute.
8902
8903 Each medium attachment specifies the storage controller as well as a
8904 port and device number and the IMedium instance representing a virtual
8905 hard disk or floppy or DVD image.
8906
8907 For removeable media (DVDs or floppies), there are two additional
8908 options. For one, the IMedium instance can be @c null to represent
8909 an empty drive with no media inserted (see <link to="IMachine::mountMedium" />);
8910 secondly, the medium can be one of the pseudo-media for host drives
8911 listed in <link to="IHost::DVDDrives"/> or <link to="IHost::floppyDrives"/>.
8912 </desc>
8913
8914 <attribute name="medium" type="IMedium" readonly="yes">
8915 <desc>Medium object associated with this attachment; it
8916 can be @c null for removable devices.</desc>
8917 </attribute>
8918
8919 <attribute name="controller" type="wstring" readonly="yes">
8920 <desc>Name of the storage controller of this attachment; this
8921 refers to one of the controllers in <link to="IMachine::storageControllers" />
8922 by name.</desc>
8923 </attribute>
8924
8925 <attribute name="port" type="long" readonly="yes">
8926 <desc>Port number of this attachment.
8927 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8928 </desc>
8929 </attribute>
8930
8931 <attribute name="device" type="long" readonly="yes">
8932 <desc>Device slot number of this attachment.
8933 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8934 </desc>
8935 </attribute>
8936
8937 <attribute name="type" type="DeviceType" readonly="yes">
8938 <desc>Device type of this attachment.</desc>
8939 </attribute>
8940
8941 <attribute name="passthrough" type="boolean" readonly="yes">
8942 <desc>Pass I/O requests through to a device on the host.</desc>
8943 </attribute>
8944
8945 <attribute name="bandwidthGroup" type="IBandwidthGroup" readonly="yes">
8946 <desc>The bandwidth group this medium attachment is assigned to.</desc>
8947 </attribute>
8948
8949 </interface>
8950
8951 <interface
8952 name="IMedium" extends="$unknown"
8953 uuid="9edda847-1279-4b0a-9af7-9d66251ccc18"
8954 wsmap="managed"
8955 >
8956 <desc>
8957 The IMedium interface represents virtual storage for a machine's
8958 hard disks, CD/DVD or floppy drives. It will typically represent
8959 a disk image on the host, for example a VDI or VMDK file representing
8960 a virtual hard disk, or an ISO or RAW file representing virtual
8961 removable media, but can also point to a network location (e.g.
8962 for iSCSI targets).
8963
8964 Instances of IMedium are connected to virtual machines by way of
8965 medium attachments (see <link to="IMediumAttachment" />), which link
8966 the storage medium to a particular device slot of a storage controller
8967 of the virtual machine.
8968 In the VirtualBox API, virtual storage is therefore always represented
8969 by the following chain of object links:
8970
8971 <ul>
8972 <li><link to="IMachine::storageControllers"/> contains an array of
8973 storage controllers (IDE, SATA, SCSI, SAS or a floppy controller;
8974 these are instances of <link to="IStorageController"/>).</li>
8975 <li><link to="IMachine::mediumAttachments"/> contains an array of
8976 medium attachments (instances of <link to="IMediumAttachment"/>),
8977 each containing a storage controller from the above array, a
8978 port/device specification, and an instance of IMedium representing
8979 the medium storage (image file).
8980
8981 For removable media, the storage medium is optional; a medium
8982 attachment with no medium represents a CD/DVD or floppy drive
8983 with no medium inserted. By contrast, hard disk attachments
8984 will always have an IMedium object attached.</li>
8985 <li>Each IMedium in turn points to a storage unit (such as a file
8986 on the host computer or a network resource) that holds actual
8987 data. This location is represented by the <link to="#location"/>
8988 attribute.</li>
8989 </ul>
8990
8991 Existing media are opened using <link to="IVirtualBox::openMedium"/>;
8992 new hard disk media can be created with the VirtualBox API using the
8993 <link to="IVirtualBox::createHardDisk"/> method.
8994
8995 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8996 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8997 type in a regular file.
8998
8999 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
9000 drive; in that case the <link to="#id" /> attribute contains the UUID of
9001 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
9002
9003 <h3>Known media</h3>
9004
9005 When an existing medium is opened and attached to a virtual machine, it
9006 is automatically added to a media registry. If the medium has first
9007 been attached to a machine which was created by VirtualBox 4.0 or later,
9008 it is added to that machine's media registry (in the machine XML settings
9009 file; this way all information about a machine's media attachments is
9010 contained in a single file). For older media attachments (i.e. if the
9011 medium was first attached to a machine which was created with a VirtualBox
9012 version before 4.0), media continue to be registered in the global
9013 VirtualBox settings file, for backwards compatibility.
9014
9015 See <link to="IVirtualBox::openMedium" /> for more information.
9016
9017 All known media can be enumerated using
9018 <link to="IVirtualBox::hardDisks"/>,
9019 <link to="IVirtualBox::DVDImages"/> and
9020 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
9021 quickly found using the <link to="IVirtualBox::findMedium"/> method.
9022
9023 Only known media can be attached to virtual machines.
9024
9025 Removing known media from the media registry is performed when the given
9026 medium is closed using the <link to="#close"/> method or when its
9027 associated storage unit is deleted.
9028
9029 <h3>Accessibility checks</h3>
9030
9031 VirtualBox defers media accessibility checks until the <link to="#refreshState" />
9032 method is called explicitly on a medium. This is done to make the VirtualBox object
9033 ready for serving requests as fast as possible and let the end-user
9034 application decide if it needs to check media accessibility right away or not.
9035
9036 As a result, when VirtualBox starts up (e.g. the VirtualBox
9037 object gets created for the first time), all known media are in the
9038 "Inaccessible" state, but the value of the <link to="#lastAccessError"/>
9039 attribute is an empty string because no actual accessibility check has
9040 been made yet.
9041
9042 After calling <link to="#refreshState" />, a medium is considered
9043 <i>accessible</i> if its storage unit can be read. In that case, the
9044 <link to="#state"/> attribute has a value of "Created". If the storage
9045 unit cannot be read (for example, because it is located on a disconnected
9046 network resource, or was accidentally deleted outside VirtualBox),
9047 the medium is considered <i>inaccessible</i>, which is indicated by the
9048 "Inaccessible" state. The exact reason why the medium is inaccessible can be
9049 obtained by reading the <link to="#lastAccessError"/> attribute.
9050
9051 <h3>Medium types</h3>
9052
9053 There are four types of medium behavior (see <link to="MediumType" />):
9054 "normal", "immutable", "writethrough" and "shareable", represented by the
9055 <link to="#type"/> attribute. The type of the medium defines how the
9056 medium is attached to a virtual machine and what happens when a
9057 <link to="ISnapshot">snapshot</link> of the virtual machine with the
9058 attached medium is taken. At the moment DVD and floppy media are always
9059 of type "writethrough".
9060
9061 All media can be also divided in two groups: <i>base</i> media and
9062 <i>differencing</i> media. A base medium contains all sectors of the
9063 medium data in its own storage and therefore can be used independently.
9064 In contrast, a differencing medium is a "delta" to some other medium and
9065 contains only those sectors which differ from that other medium, which is
9066 then called a <i>parent</i>. The differencing medium is said to be
9067 <i>linked to</i> that parent. The parent may be itself a differencing
9068 medium, thus forming a chain of linked media. The last element in that
9069 chain must always be a base medium. Note that several differencing
9070 media may be linked to the same parent medium.
9071
9072 Differencing media can be distinguished from base media by querying the
9073 <link to="#parent"/> attribute: base media do not have parents they would
9074 depend on, so the value of this attribute is always @c null for them.
9075 Using this attribute, it is possible to walk up the medium tree (from the
9076 child medium to its parent). It is also possible to walk down the tree
9077 using the <link to="#children"/> attribute.
9078
9079 Note that the type of all differencing media is "normal"; all other
9080 values are meaningless for them. Base media may be of any type.
9081
9082 <h3>Creating hard disks</h3>
9083
9084 New base hard disks are created using
9085 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
9086 opened using <link to="IVirtualBox::openMedium"/>. Differencing hard
9087 disks are usually implicitly created by VirtualBox when needed but may
9088 also be created explicitly using <link to="#createDiffStorage"/>.
9089
9090 After the hard disk is successfully created (including the storage unit)
9091 or opened, it becomes a known hard disk (remembered in the internal media
9092 registry). Known hard disks can be attached to a virtual machine, accessed
9093 through <link to="IVirtualBox::findMedium"/> or enumerated using the
9094 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
9095
9096 The following methods, besides <link to="IMedium::close"/>,
9097 automatically remove the hard disk from the media registry:
9098 <ul>
9099 <li><link to="#deleteStorage"/></li>
9100 <li><link to="#mergeTo"/></li>
9101 </ul>
9102
9103 If the storage unit of the hard disk is a regular file in the host's
9104 file system then the rules stated in the description of the
9105 <link to="IMedium::location"/> attribute apply when setting its value.
9106
9107 <h4>Automatic composition of the file name part</h4>
9108
9109 Another extension to the <link to="IMedium::location"/> attribute is that
9110 there is a possibility to cause VirtualBox to compose a unique value for
9111 the file name part of the location using the UUID of the hard disk. This
9112 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
9113 e.g. before the storage unit is created, and works as follows. You set the
9114 value of the <link to="IMedium::location"/> attribute to a location
9115 specification which only contains the path specification but not the file
9116 name part and ends with either a forward slash or a backslash character.
9117 In response, VirtualBox will generate a new UUID for the hard disk and
9118 compose the file name using the following pattern:
9119 <pre>
9120 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
9121 </pre>
9122 where <tt>&lt;path&gt;</tt> is the supplied path specification,
9123 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
9124 is the default extension for the storage format of this hard disk. After
9125 that, you may call any of the methods that create a new hard disk storage
9126 unit and they will use the generated UUID and file name.
9127
9128 <h3>Attaching Hard Disks</h3>
9129
9130 Hard disks are attached to virtual machines using the
9131 <link to="IMachine::attachDevice"/> method and detached using the
9132 <link to="IMachine::detachDevice"/> method. Depending on their
9133 <link to="#type"/>, hard disks are attached either
9134 <i>directly</i> or <i>indirectly</i>.
9135
9136 When a hard disk is being attached directly, it is associated with the
9137 virtual machine and used for hard disk operations when the machine is
9138 running. When a hard disk is being attached indirectly, a new differencing
9139 hard disk linked to it is implicitly created and this differencing hard
9140 disk is associated with the machine and used for hard disk operations.
9141 This also means that if <link to="IMachine::attachDevice"/> performs
9142 a direct attachment then the same hard disk will be returned in response
9143 to the subsequent <link to="IMachine::getMedium"/> call; however if
9144 an indirect attachment is performed then
9145 <link to="IMachine::getMedium"/> will return the implicitly created
9146 differencing hard disk, not the original one passed to <link
9147 to="IMachine::attachDevice"/>. In detail:
9148
9149 <ul>
9150 <li><b>Normal base</b> hard disks that do not have children (i.e.
9151 differencing hard disks linked to them) and that are not already
9152 attached to virtual machines in snapshots are attached <b>directly</b>.
9153 Otherwise, they are attached <b>indirectly</b> because having
9154 dependent children or being part of the snapshot makes it impossible
9155 to modify hard disk contents without breaking the integrity of the
9156 dependent party. The <link to="#readOnly"/> attribute allows to
9157 quickly determine the kind of the attachment for the given hard
9158 disk. Note that if a normal base hard disk is to be indirectly
9159 attached to a virtual machine with snapshots then a special
9160 procedure called <i>smart attachment</i> is performed (see below).</li>
9161 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
9162 they are attached <b>directly</b> if they do not have children and are
9163 not attached to virtual machines in snapshots, and <b>indirectly</b>
9164 otherwise. Note that the smart attachment procedure is never performed
9165 for differencing hard disks.</li>
9166 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
9167 they are designed to be non-writable. If an immutable hard disk is
9168 attached to a virtual machine with snapshots then a special
9169 procedure called smart attachment is performed (see below).</li>
9170 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
9171 also as designed. This also means that writethrough hard disks cannot
9172 have other hard disks linked to them at all.</li>
9173 <li><b>Shareable</b> hard disks are always attached <b>directly</b>,
9174 also as designed. This also means that shareable hard disks cannot
9175 have other hard disks linked to them at all. They behave almost
9176 like writethrough hard disks, except that shareable hard disks can
9177 be attached to several virtual machines which are running, allowing
9178 concurrent accesses. You need special cluster software running in
9179 the virtual machines to make use of such disks.</li>
9180 </ul>
9181
9182 Note that the same hard disk, regardless of its type, may be attached to
9183 more than one virtual machine at a time. In this case, the machine that is
9184 started first gains exclusive access to the hard disk and attempts to
9185 start other machines having this hard disk attached will fail until the
9186 first machine is powered down.
9187
9188 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
9189 that the given hard disk remains associated with the given machine after a
9190 successful <link to="IMachine::detachDevice"/> call until
9191 <link to="IMachine::saveSettings"/> is called to save all changes to
9192 machine settings to disk. This deferring is necessary to guarantee that
9193 the hard disk configuration may be restored at any time by a call to
9194 <link to="IMachine::discardSettings"/> before the settings
9195 are saved (committed).
9196
9197 Note that if <link to="IMachine::discardSettings"/> is called after
9198 indirectly attaching some hard disks to the machine but before a call to
9199 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
9200 all differencing hard disks implicitly created by
9201 <link to="IMachine::attachDevice"/> for these indirect attachments.
9202 Such implicitly created hard disks will also be immediately deleted when
9203 detached explicitly using the <link to="IMachine::detachDevice"/>
9204 call if it is made before <link to="IMachine::saveSettings"/>. This
9205 implicit deletion is safe because newly created differencing hard
9206 disks do not contain any user data.
9207
9208 However, keep in mind that detaching differencing hard disks that were
9209 implicitly created by <link to="IMachine::attachDevice"/>
9210 before the last <link to="IMachine::saveSettings"/> call will
9211 <b>not</b> implicitly delete them as they may already contain some data
9212 (for example, as a result of virtual machine execution). If these hard
9213 disks are no more necessary, the caller can always delete them explicitly
9214 using <link to="#deleteStorage"/> after they are actually de-associated
9215 from this machine by the <link to="IMachine::saveSettings"/> call.
9216
9217 <h3>Smart Attachment</h3>
9218
9219 When normal base or immutable hard disks are indirectly attached to a
9220 virtual machine then some additional steps are performed to make sure the
9221 virtual machine will have the most recent "view" of the hard disk being
9222 attached. These steps include walking through the machine's snapshots
9223 starting from the current one and going through ancestors up to the first
9224 snapshot. Hard disks attached to the virtual machine in all
9225 of the encountered snapshots are checked whether they are descendants of
9226 the given normal base or immutable hard disk. The first found child (which
9227 is the differencing hard disk) will be used instead of the normal base or
9228 immutable hard disk as a parent for creating a new differencing hard disk
9229 that will be actually attached to the machine. And only if no descendants
9230 are found or if the virtual machine does not have any snapshots then the
9231 normal base or immutable hard disk will be used itself as a parent for
9232 this differencing hard disk.
9233
9234 It is easier to explain what smart attachment does using the
9235 following example:
9236 <pre>
9237BEFORE attaching B.vdi: AFTER attaching B.vdi:
9238
9239Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
9240 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
9241 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
9242 Snapshot 4 (none) Snapshot 4 (none)
9243 CurState (none) CurState (D3->D2.vdi)
9244
9245 NOT
9246 ...
9247 CurState (D3->B.vdi)
9248 </pre>
9249 The first column is the virtual machine configuration before the base hard
9250 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
9251 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
9252 mean that the hard disk that is actually attached to the machine is a
9253 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
9254 another hard disk, <tt>B.vdi</tt>.
9255
9256 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
9257 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
9258 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
9259 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
9260 it cannot be attached directly and needs an indirect attachment (i.e.
9261 implicit creation of a new differencing hard disk). Due to the smart
9262 attachment procedure, the new differencing hard disk
9263 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
9264 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
9265 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
9266 machine.
9267
9268 Note that if there is more than one descendant hard disk of the given base
9269 hard disk found in a snapshot, and there is an exact device, channel and
9270 bus match, then this exact match will be used. Otherwise, the youngest
9271 descendant will be picked up.
9272
9273 There is one more important aspect of the smart attachment procedure which
9274 is not related to snapshots at all. Before walking through the snapshots
9275 as described above, the backup copy of the current list of hard disk
9276 attachment is searched for descendants. This backup copy is created when
9277 the hard disk configuration is changed for the first time after the last
9278 <link to="IMachine::saveSettings"/> call and used by
9279 <link to="IMachine::discardSettings"/> to undo the recent hard disk
9280 changes. When such a descendant is found in this backup copy, it will be
9281 simply re-attached back, without creating a new differencing hard disk for
9282 it. This optimization is necessary to make it possible to re-attach the
9283 base or immutable hard disk to a different bus, channel or device slot
9284 without losing the contents of the differencing hard disk actually
9285 attached to the machine in place of it.
9286 </desc>
9287
9288 <attribute name="id" type="uuid" mod="string" readonly="yes">
9289 <desc>
9290 UUID of the medium. For a newly created medium, this value is a randomly
9291 generated UUID.
9292
9293 <note>
9294 For media in one of MediumState_NotCreated, MediumState_Creating or
9295 MediumState_Deleting states, the value of this property is undefined
9296 and will most likely be an empty UUID.
9297 </note>
9298 </desc>
9299 </attribute>
9300
9301 <attribute name="description" type="wstring">
9302 <desc>
9303 Optional description of the medium. For a newly created medium the value
9304 of this attribute is an empty string.
9305
9306 Medium types that don't support this attribute will return E_NOTIMPL in
9307 attempt to get or set this attribute's value.
9308
9309 <note>
9310 For some storage types, reading this attribute may return an outdated
9311 (last known) value when <link to="#state"/> is <link
9312 to="MediumState_Inaccessible"/> or <link
9313 to="MediumState_LockedWrite"/> because the value of this attribute is
9314 stored within the storage unit itself. Also note that changing the
9315 attribute value is not possible in such case, as well as when the
9316 medium is the <link to="MediumState_LockedRead"/> state.
9317 </note>
9318 </desc>
9319 </attribute>
9320
9321 <attribute name="state" type="MediumState" readonly="yes">
9322 <desc>
9323 Returns the current medium state, which is the last state set by
9324 the accessibility check performed by <link to="#refreshState"/>.
9325 If that method has not yet been called on the medium, the state
9326 is "Inaccessible"; as opposed to truly inaccessible media, the
9327 value of <link to="#lastAccessError"/> will be an empty string in
9328 that case.
9329
9330 <note>As of version 3.1, this no longer performs an accessibility check
9331 automatically; call <link to="#refreshState"/> for that.
9332 </note>
9333 </desc>
9334 </attribute>
9335
9336 <attribute name="variant" type="unsigned long" readonly="yes">
9337 <desc>
9338 Returns the storage format variant information for this medium
9339 as a combination of the flags described at <link to="MediumVariant" />.
9340 Before <link to="#refreshState"/> is called this method returns
9341 an undefined value.
9342 </desc>
9343 </attribute>
9344
9345 <attribute name="location" type="wstring">
9346 <desc>
9347 Location of the storage unit holding medium data.
9348
9349 The format of the location string is medium type specific. For medium
9350 types using regular files in a host's file system, the location
9351 string is the full file name.
9352
9353 Some medium types may support changing the storage unit location by
9354 simply changing the value of this property. If this operation is not
9355 supported, the implementation will return E_NOTIMPL in attempt to set
9356 this attribute's value.
9357
9358 When setting a value of the location attribute which is a regular file
9359 in the host's file system, the given file name may be either relative to
9360 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
9361 absolute. Note that if the given location specification does not contain
9362 the file extension part then a proper default extension will be
9363 automatically appended by the implementation depending on the medium type.
9364 </desc>
9365 </attribute>
9366
9367 <attribute name="name" type="wstring" readonly="yes">
9368 <desc>
9369 Name of the storage unit holding medium data.
9370
9371 The returned string is a short version of the <link to="#location"/>
9372 attribute that is suitable for representing the medium in situations
9373 where the full location specification is too long (such as lists
9374 and comboboxes in GUI frontends). This string is also used by frontends
9375 to sort the media list alphabetically when needed.
9376
9377 For example, for locations that are regular files in the host's file
9378 system, the value of this attribute is just the file name (+ extension),
9379 without the path specification.
9380
9381 Note that as opposed to the <link to="#location"/> attribute, the name
9382 attribute will not necessary be unique for a list of media of the
9383 given type and format.
9384 </desc>
9385 </attribute>
9386
9387 <attribute name="deviceType" type="DeviceType" readonly="yes">
9388 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
9389 medium.</desc>
9390 </attribute>
9391
9392 <attribute name="hostDrive" type="boolean" readonly="yes">
9393 <desc>True if this corresponds to a drive on the host.</desc>
9394 </attribute>
9395
9396 <attribute name="size" type="long long" readonly="yes">
9397 <desc>
9398 Physical size of the storage unit used to hold medium data (in bytes).
9399
9400 <note>
9401 For media whose <link to="#state"/> is <link
9402 to="MediumState_Inaccessible"/>, the value of this property is the
9403 last known size. For <link to="MediumState_NotCreated"/> media,
9404 the returned value is zero.
9405 </note>
9406 </desc>
9407 </attribute>
9408
9409 <attribute name="format" type="wstring" readonly="yes">
9410 <desc>
9411 Storage format of this medium.
9412
9413 The value of this attribute is a string that specifies a backend used
9414 to store medium data. The storage format is defined when you create a
9415 new medium or automatically detected when you open an existing medium,
9416 and cannot be changed later.
9417
9418 The list of all storage formats supported by this VirtualBox
9419 installation can be obtained using
9420 <link to="ISystemProperties::mediumFormats"/>.
9421 </desc>
9422 </attribute>
9423
9424 <attribute name="mediumFormat" type="IMediumFormat" readonly="yes">
9425 <desc>
9426 Storage medium format object corresponding to this medium.
9427
9428 The value of this attribute is a reference to the medium format object
9429 that specifies the backend properties used to store medium data. The
9430 storage format is defined when you create a new medium or automatically
9431 detected when you open an existing medium, and cannot be changed later.
9432
9433 <note>@c null is returned if there is no associated medium format
9434 object. This can e.g. happen for medium objects representing host
9435 drives and other special medium objects.</note>
9436 </desc>
9437 </attribute>
9438
9439 <attribute name="type" type="MediumType">
9440 <desc>
9441 Type (role) of this medium.
9442
9443 The following constraints apply when changing the value of this
9444 attribute:
9445 <ul>
9446 <li>If a medium is attached to a virtual machine (either in the
9447 current state or in one of the snapshots), its type cannot be
9448 changed.
9449 </li>
9450 <li>As long as the medium has children, its type cannot be set
9451 to <link to="MediumType_Writethrough"/>.
9452 </li>
9453 <li>The type of all differencing media is
9454 <link to="MediumType_Normal"/> and cannot be changed.
9455 </li>
9456 </ul>
9457
9458 The type of a newly created or opened medium is set to
9459 <link to="MediumType_Normal"/>, except for DVD and floppy media,
9460 which have a type of <link to="MediumType_Writethrough"/>.
9461 </desc>
9462 </attribute>
9463
9464 <attribute name="parent" type="IMedium" readonly="yes">
9465 <desc>
9466 Parent of this medium (the medium this medium is directly based
9467 on).
9468
9469 Only differencing media have parents. For base (non-differencing)
9470 media, @c null is returned.
9471 </desc>
9472 </attribute>
9473
9474 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
9475 <desc>
9476 Children of this medium (all differencing media directly based
9477 on this medium). A @c null array is returned if this medium
9478 does not have any children.
9479 </desc>
9480 </attribute>
9481
9482 <attribute name="base" type="IMedium" readonly="yes">
9483 <desc>
9484 Base medium of this medium.
9485
9486 If this is a differencing medium, its base medium is the medium
9487 the given medium branch starts from. For all other types of media, this
9488 property returns the medium object itself (i.e. the same object this
9489 property is read on).
9490 </desc>
9491 </attribute>
9492
9493 <attribute name="readOnly" type="boolean" readonly="yes">
9494 <desc>
9495 Returns @c true if this medium is read-only and @c false otherwise.
9496
9497 A medium is considered to be read-only when its contents cannot be
9498 modified without breaking the integrity of other parties that depend on
9499 this medium such as its child media or snapshots of virtual machines
9500 where this medium is attached to these machines. If there are no
9501 children and no such snapshots then there is no dependency and the
9502 medium is not read-only.
9503
9504 The value of this attribute can be used to determine the kind of the
9505 attachment that will take place when attaching this medium to a
9506 virtual machine. If the value is @c false then the medium will
9507 be attached directly. If the value is @c true then the medium
9508 will be attached indirectly by creating a new differencing child
9509 medium for that. See the interface description for more information.
9510
9511 Note that all <link to="MediumType_Immutable">Immutable</link> media
9512 are always read-only while all
9513 <link to="MediumType_Writethrough">Writethrough</link> media are
9514 always not.
9515
9516 <note>
9517 The read-only condition represented by this attribute is related to
9518 the medium type and usage, not to the current
9519 <link to="IMedium::state">medium state</link> and not to the read-only
9520 state of the storage unit.
9521 </note>
9522 </desc>
9523 </attribute>
9524
9525 <attribute name="logicalSize" type="long long" readonly="yes">
9526 <desc>
9527 Logical size of this medium (in bytes), as reported to the
9528 guest OS running inside the virtual machine this medium is
9529 attached to. The logical size is defined when the medium is created
9530 and cannot be changed later.
9531
9532 <note>
9533 Reading this property on a differencing medium will return the size
9534 of its <link to="#base"/> medium.
9535 </note>
9536 <note>
9537 For media whose state is <link to="#state"/> is <link
9538 to="MediumState_Inaccessible"/>, the value of this property is the
9539 last known logical size. For <link to="MediumState_NotCreated"/>
9540 media, the returned value is zero.
9541 </note>
9542 </desc>
9543 </attribute>
9544
9545 <attribute name="autoReset" type="boolean">
9546 <desc>
9547 Whether this differencing medium will be automatically reset each
9548 time a virtual machine it is attached to is powered up. This
9549 attribute is automatically set to @c true for the last
9550 differencing image of an "immutable" medium (see
9551 <link to="MediumType" />).
9552
9553 See <link to="#reset"/> for more information about resetting
9554 differencing media.
9555
9556 <note>
9557 Reading this property on a base (non-differencing) medium will
9558 always @c false. Changing the value of this property in this
9559 case is not supported.
9560 </note>
9561
9562 <result name="VBOX_E_NOT_SUPPORTED">
9563 This is not a differencing medium (when changing the attribute
9564 value).
9565 </result>
9566 </desc>
9567 </attribute>
9568
9569 <attribute name="lastAccessError" type="wstring" readonly="yes">
9570 <desc>
9571 Text message that represents the result of the last accessibility
9572 check performed by <link to="#refreshState"/>.
9573
9574 An empty string is returned if the last accessibility check
9575 was successful or has not yet been called. As a result, if
9576 <link to="#state" /> is "Inaccessible" and this attribute is empty,
9577 then <link to="#refreshState"/> has yet to be called; this is the
9578 default value of media after VirtualBox initialization.
9579 A non-empty string indicates a failure and should normally describe
9580 a reason of the failure (for example, a file read error).
9581 </desc>
9582 </attribute>
9583
9584 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9585 <desc>
9586 Array of UUIDs of all machines this medium is attached to.
9587
9588 A @c null array is returned if this medium is not attached to any
9589 machine or to any machine's snapshot.
9590
9591 <note>
9592 The returned array will include a machine even if this medium is not
9593 attached to that machine in the current state but attached to it in
9594 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9595 details.
9596 </note>
9597 </desc>
9598 </attribute>
9599
9600 <method name="setIDs">
9601 <desc>
9602 Changes the UUID and parent UUID for a hard disk medium.
9603 </desc>
9604 <param name="setImageId" type="boolean" dir="in">
9605 <desc>
9606 Select whether a new image UUID is set or not.
9607 </desc>
9608 </param>
9609 <param name="imageId" type="uuid" mod="string" dir="in">
9610 <desc>
9611 New UUID for the image. If an empty string is passed, then a new
9612 UUID is automatically created, provided that @a setImageId is @c true.
9613 Specifying a zero UUID is not allowed.
9614 </desc>
9615 </param>
9616 <param name="setParentId" type="boolean" dir="in">
9617 <desc>
9618 Select whether a new parent UUID is set or not.
9619 </desc>
9620 </param>
9621 <param name="parentId" type="uuid" mod="string" dir="in">
9622 <desc>
9623 New parent UUID for the image. If an empty string is passed, then a
9624 new UUID is automatically created, provided @a setParentId is
9625 @c true. A zero UUID is valid.
9626 </desc>
9627 </param>
9628 <result name="E_INVALIDARG">
9629 Invalid parameter combination.
9630 </result>
9631 <result name="VBOX_E_NOT_SUPPORTED">
9632 Medium is not a hard disk medium.
9633 </result>
9634 </method>
9635
9636 <method name="refreshState">
9637 <desc>
9638 If the current medium state (see <link to="MediumState"/>) is one of
9639 "Created", "Inaccessible" or "LockedRead", then this performs an
9640 accessibility check on the medium and sets the value of the <link to="#state"/>
9641 attribute accordingly; that value is also returned for convenience.
9642
9643 For all other state values, this does not perform a refresh but returns
9644 the state only.
9645
9646 The refresh, if performed, may take a long time (several seconds or even
9647 minutes, depending on the storage unit location and format) because it performs an
9648 accessibility check of the storage unit. This check may cause a significant
9649 delay if the storage unit of the given medium is, for example, a file located
9650 on a network share which is not currently accessible due to connectivity
9651 problems. In that case, the call will not return until a timeout
9652 interval defined by the host OS for this operation expires. For this reason,
9653 it is recommended to never read this attribute on the main UI thread to avoid
9654 making the UI unresponsive.
9655
9656 If the last known state of the medium is "Created" and the accessibility
9657 check fails, then the state would be set to "Inaccessible", and
9658 <link to="#lastAccessError"/> may be used to get more details about the
9659 failure. If the state of the medium is "LockedRead", then it remains the
9660 same, and a non-empty value of <link to="#lastAccessError"/> will
9661 indicate a failed accessibility check in this case.
9662
9663 Note that not all medium states are applicable to all medium types.
9664 </desc>
9665 <param name="state" type="MediumState" dir="return">
9666 <desc>
9667 New medium state.
9668 </desc>
9669 </param>
9670 </method>
9671
9672 <method name="getSnapshotIds">
9673 <desc>
9674 Returns an array of UUIDs of all snapshots of the given machine where
9675 this medium is attached to.
9676
9677 If the medium is attached to the machine in the current state, then the
9678 first element in the array will always be the ID of the queried machine
9679 (i.e. the value equal to the @c machineId argument), followed by
9680 snapshot IDs (if any).
9681
9682 If the medium is not attached to the machine in the current state, then
9683 the array will contain only snapshot IDs.
9684
9685 The returned array may be @c null if this medium is not attached
9686 to the given machine at all, neither in the current state nor in one of
9687 the snapshots.
9688 </desc>
9689 <param name="machineId" type="uuid" mod="string" dir="in">
9690 <desc>
9691 UUID of the machine to query.
9692 </desc>
9693 </param>
9694 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9695 <desc>
9696 Array of snapshot UUIDs of the given machine using this medium.
9697 </desc>
9698 </param>
9699 </method>
9700
9701 <method name="lockRead">
9702 <desc>
9703 Locks this medium for reading.
9704
9705 A read lock is shared: many clients can simultaneously lock the
9706 same medium for reading unless it is already locked for writing (see
9707 <link to="#lockWrite"/>) in which case an error is returned.
9708
9709 When the medium is locked for reading, it cannot be modified
9710 from within VirtualBox. This means that any method that changes
9711 the properties of this medium or contents of the storage unit
9712 will return an error (unless explicitly stated otherwise). That
9713 includes an attempt to start a virtual machine that wants to
9714 write to the the medium.
9715
9716 When the virtual machine is started up, it locks for reading all
9717 media it uses in read-only mode. If some medium cannot be locked
9718 for reading, the startup procedure will fail.
9719 A medium is typically locked for reading while it is used by a running
9720 virtual machine but has a depending differencing image that receives
9721 the actual write operations. This way one base medium can have
9722 multiple child differencing images which can be written to
9723 simultaneously. Read-only media such as DVD and floppy images are
9724 also locked for reading only (so they can be in use by multiple
9725 machines simultaneously).
9726
9727 A medium is also locked for reading when it is the source of a
9728 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9729
9730 The medium locked for reading must be unlocked using the <link
9731 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9732 can be nested and must be followed by the same number of paired
9733 <link to="#unlockRead"/> calls.
9734
9735 This method sets the medium state (see <link to="#state"/>) to
9736 "LockedRead" on success. The medium's previous state must be
9737 one of "Created", "Inaccessible" or "LockedRead".
9738
9739 Locking an inaccessible medium is not an error; this method performs
9740 a logical lock that prevents modifications of this medium through
9741 the VirtualBox API, not a physical file-system lock of the underlying
9742 storage unit.
9743
9744 This method returns the current state of the medium
9745 <i>before</i> the operation.
9746
9747 <result name="VBOX_E_INVALID_OBJECT_STATE">
9748 Invalid medium state (e.g. not created, locked, inaccessible,
9749 creating, deleting).
9750 </result>
9751
9752 </desc>
9753 <param name="state" type="MediumState" dir="return">
9754 <desc>
9755 State of the medium after the operation.
9756 </desc>
9757 </param>
9758 </method>
9759
9760 <method name="unlockRead">
9761 <desc>
9762 Cancels the read lock previously set by <link to="#lockRead"/>.
9763
9764 For both success and failure, this method returns the current state
9765 of the medium <i>after</i> the operation.
9766
9767 See <link to="#lockRead"/> for more details.
9768
9769 <result name="VBOX_E_INVALID_OBJECT_STATE">
9770 Medium not locked for reading.
9771 </result>
9772
9773 </desc>
9774 <param name="state" type="MediumState" dir="return">
9775 <desc>
9776 State of the medium after the operation.
9777 </desc>
9778 </param>
9779 </method>
9780
9781 <method name="lockWrite">
9782 <desc>
9783 Locks this medium for writing.
9784
9785 A write lock, as opposed to <link to="#lockRead"/>, is
9786 exclusive: there may be only one client holding a write lock,
9787 and there may be no read locks while the write lock is held.
9788 As a result, read-locking fails if a write lock is held, and
9789 write-locking fails if either a read or another write lock is held.
9790
9791 When a medium is locked for writing, it cannot be modified
9792 from within VirtualBox, and it is not guaranteed that the values
9793 of its properties are up-to-date. Any method that changes the
9794 properties of this medium or contents of the storage unit will
9795 return an error (unless explicitly stated otherwise).
9796
9797 When a virtual machine is started up, it locks for writing all
9798 media it uses to write data to. If any medium could not be locked
9799 for writing, the startup procedure will fail. If a medium has
9800 differencing images, then while the machine is running, only
9801 the last ("leaf") differencing image is locked for writing,
9802 whereas its parents are locked for reading only.
9803
9804 A medium is also locked for writing when it is the target of a
9805 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9806
9807 The medium locked for writing must be unlocked using the <link
9808 to="#unlockWrite"/> method. Write locks <i>cannot</i> be nested.
9809
9810 This method sets the medium state (see <link to="#state"/>) to
9811 "LockedWrite" on success. The medium's previous state must be
9812 either "Created" or "Inaccessible".
9813
9814 Locking an inaccessible medium is not an error; this method performs
9815 a logical lock that prevents modifications of this medium through
9816 the VirtualBox API, not a physical file-system lock of the underlying
9817 storage unit.
9818
9819 For both, success and failure, this method returns the current
9820 state of the medium <i>before</i> the operation.
9821
9822 <result name="VBOX_E_INVALID_OBJECT_STATE">
9823 Invalid medium state (e.g. not created, locked, inaccessible,
9824 creating, deleting).
9825 </result>
9826
9827 </desc>
9828 <param name="state" type="MediumState" dir="return">
9829 <desc>
9830 State of the medium after the operation.
9831 </desc>
9832 </param>
9833 </method>
9834
9835 <method name="unlockWrite">
9836 <desc>
9837 Cancels the write lock previously set by <link to="#lockWrite"/>.
9838
9839 For both success and failure, this method returns the current
9840 state of the medium <i>after</i> the operation.
9841
9842 See <link to="#lockWrite"/> for more details.
9843
9844 <result name="VBOX_E_INVALID_OBJECT_STATE">
9845 Medium not locked for writing.
9846 </result>
9847
9848 </desc>
9849 <param name="state" type="MediumState" dir="return">
9850 <desc>
9851 State of the medium after the operation.
9852 </desc>
9853 </param>
9854 </method>
9855
9856 <method name="close">
9857 <desc>
9858 Closes this medium.
9859
9860 The medium must not be attached to any known virtual machine
9861 and must not have any known child media, otherwise the
9862 operation will fail.
9863
9864 When the medium is successfully closed, it is removed from
9865 the list of registered media, but its storage unit is not
9866 deleted. In particular, this means that this medium can
9867 later be opened again using the <link to="IVirtualBox::openMedium"/>
9868 call.
9869
9870 Note that after this method successfully returns, the given medium
9871 object becomes uninitialized. This means that any attempt
9872 to call any of its methods or attributes will fail with the
9873 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9874
9875 <result name="VBOX_E_INVALID_OBJECT_STATE">
9876 Invalid medium state (other than not created, created or
9877 inaccessible).
9878 </result>
9879 <result name="VBOX_E_OBJECT_IN_USE">
9880 Medium attached to virtual machine.
9881 </result>
9882 <result name="VBOX_E_FILE_ERROR">
9883 Settings file not accessible.
9884 </result>
9885 <result name="VBOX_E_XML_ERROR">
9886 Could not parse the settings file.
9887 </result>
9888
9889 </desc>
9890 </method>
9891
9892 <!-- storage methods -->
9893
9894 <method name="getProperty">
9895 <desc>
9896 Returns the value of the custom medium property with the given name.
9897
9898 The list of all properties supported by the given medium format can
9899 be obtained with <link to="IMediumFormat::describeProperties"/>.
9900
9901 Note that if this method returns an empty string in @a value, the
9902 requested property is supported but currently not assigned any value.
9903
9904 <result name="VBOX_E_OBJECT_NOT_FOUND">
9905 Requested property does not exist (not supported by the format).
9906 </result>
9907 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9908 </desc>
9909 <param name="name" type="wstring" dir="in">
9910 <desc>Name of the property to get.</desc>
9911 </param>
9912 <param name="value" type="wstring" dir="return">
9913 <desc>Current property value.</desc>
9914 </param>
9915 </method>
9916
9917 <method name="setProperty">
9918 <desc>
9919 Sets the value of the custom medium property with the given name.
9920
9921 The list of all properties supported by the given medium format can
9922 be obtained with <link to="IMediumFormat::describeProperties"/>.
9923
9924 Note that setting the property value to @c null or an empty string is
9925 equivalent to deleting the existing value. A default value (if it is
9926 defined for this property) will be used by the format backend in this
9927 case.
9928
9929 <result name="VBOX_E_OBJECT_NOT_FOUND">
9930 Requested property does not exist (not supported by the format).
9931 </result>
9932 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9933 </desc>
9934 <param name="name" type="wstring" dir="in">
9935 <desc>Name of the property to set.</desc>
9936 </param>
9937 <param name="value" type="wstring" dir="in">
9938 <desc>Property value to set.</desc>
9939 </param>
9940 </method>
9941
9942 <method name="getProperties">
9943 <desc>
9944 Returns values for a group of properties in one call.
9945
9946 The names of the properties to get are specified using the @a names
9947 argument which is a list of comma-separated property names or
9948 an empty string if all properties are to be returned. Note that currently
9949 the value of this argument is ignored and the method always returns all
9950 existing properties.
9951
9952 The list of all properties supported by the given medium format can
9953 be obtained with <link to="IMediumFormat::describeProperties"/>.
9954
9955 The method returns two arrays, the array of property names corresponding
9956 to the @a names argument and the current values of these properties.
9957 Both arrays have the same number of elements with each elemend at the
9958 given index in the first array corresponds to an element at the same
9959 index in the second array.
9960
9961 Note that for properties that do not have assigned values,
9962 an empty string is returned at the appropriate index in the
9963 @a returnValues array.
9964
9965 </desc>
9966 <param name="names" type="wstring" dir="in">
9967 <desc>
9968 Names of properties to get.
9969 </desc>
9970 </param>
9971 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9972 <desc>Names of returned properties.</desc>
9973 </param>
9974 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9975 <desc>Values of returned properties.</desc>
9976 </param>
9977 </method>
9978
9979 <method name="setProperties">
9980 <desc>
9981 Sets values for a group of properties in one call.
9982
9983 The names of the properties to set are passed in the @a names
9984 array along with the new values for them in the @a values array. Both
9985 arrays have the same number of elements with each elemend at the given
9986 index in the first array corresponding to an element at the same index
9987 in the second array.
9988
9989 If there is at least one property name in @a names that is not valid,
9990 the method will fail before changing the values of any other properties
9991 from the @a names array.
9992
9993 Using this method over <link to="#setProperty"/> is preferred if you
9994 need to set several properties at once since it will result into less
9995 IPC calls.
9996
9997 The list of all properties supported by the given medium format can
9998 be obtained with <link to="IMediumFormat::describeProperties"/>.
9999
10000 Note that setting the property value to @c null or an empty string is
10001 equivalent to deleting the existing value. A default value (if it is
10002 defined for this property) will be used by the format backend in this
10003 case.
10004 </desc>
10005 <param name="names" type="wstring" safearray="yes" dir="in">
10006 <desc>Names of properties to set.</desc>
10007 </param>
10008 <param name="values" type="wstring" safearray="yes" dir="in">
10009 <desc>Values of properties to set.</desc>
10010 </param>
10011 </method>
10012
10013 <!-- storage methods -->
10014
10015 <method name="createBaseStorage">
10016 <desc>
10017 Starts creating a hard disk storage unit (fixed/dynamic, according
10018 to the variant flags) in in the background. The previous storage unit
10019 created for this object, if any, must first be deleted using
10020 <link to="#deleteStorage"/>, otherwise the operation will fail.
10021
10022 Before the operation starts, the medium is placed in
10023 <link to="MediumState_Creating"/> state. If the create operation
10024 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
10025 state.
10026
10027 After the returned progress object reports that the operation has
10028 successfully completed, the medium state will be set to <link
10029 to="MediumState_Created"/>, the medium will be remembered by this
10030 VirtualBox installation and may be attached to virtual machines.
10031
10032 <result name="VBOX_E_NOT_SUPPORTED">
10033 The variant of storage creation operation is not supported. See <link
10034 to="IMediumFormat::capabilities"/>.
10035 </result>
10036 </desc>
10037 <param name="logicalSize" type="long long" dir="in">
10038 <desc>Maximum logical size of the medium in bytes.</desc>
10039 </param>
10040 <param name="variant" type="unsigned long" dir="in">
10041 <desc>Exact image variant which should be created (as a combination of
10042 <link to="MediumVariant" /> flags).</desc>
10043 </param>
10044 <param name="progress" type="IProgress" dir="return">
10045 <desc>Progress object to track the operation completion.</desc>
10046 </param>
10047 </method>
10048
10049 <method name="deleteStorage">
10050 <desc>
10051 Starts deleting the storage unit of this medium.
10052
10053 The medium must not be attached to any known virtual machine and must
10054 not have any known child media, otherwise the operation will fail.
10055 It will also fail if there is no storage unit to delete or if deletion
10056 is already in progress, or if the medium is being in use (locked for
10057 read or for write) or inaccessible. Therefore, the only valid state for
10058 this operation to succeed is <link to="MediumState_Created"/>.
10059
10060 Before the operation starts, the medium is placed in
10061 <link to="MediumState_Deleting"/> state and gets removed from the list
10062 of remembered hard disks (media registry). If the delete operation
10063 fails, the medium will be remembered again and placed back to
10064 <link to="MediumState_Created"/> state.
10065
10066 After the returned progress object reports that the operation is
10067 complete, the medium state will be set to
10068 <link to="MediumState_NotCreated"/> and you will be able to use one of
10069 the storage creation methods to create it again.
10070
10071 <see>#close()</see>
10072
10073 <result name="VBOX_E_OBJECT_IN_USE">
10074 Medium is attached to a virtual machine.
10075 </result>
10076 <result name="VBOX_E_NOT_SUPPORTED">
10077 Storage deletion is not allowed because neither of storage creation
10078 operations are supported. See
10079 <link to="IMediumFormat::capabilities"/>.
10080 </result>
10081
10082 <note>
10083 If the deletion operation fails, it is not guaranteed that the storage
10084 unit still exists. You may check the <link to="IMedium::state"/> value
10085 to answer this question.
10086 </note>
10087 </desc>
10088 <param name="progress" type="IProgress" dir="return">
10089 <desc>Progress object to track the operation completion.</desc>
10090 </param>
10091 </method>
10092
10093 <!-- diff methods -->
10094
10095 <method name="createDiffStorage">
10096 <desc>
10097 Starts creating an empty differencing storage unit based on this
10098 medium in the format and at the location defined by the @a target
10099 argument.
10100
10101 The target medium must be in <link to="MediumState_NotCreated"/>
10102 state (i.e. must not have an existing storage unit). Upon successful
10103 completion, this operation will set the type of the target medium to
10104 <link to="MediumType_Normal"/> and create a storage unit necessary to
10105 represent the differencing medium data in the given format (according
10106 to the storage format of the target object).
10107
10108 After the returned progress object reports that the operation is
10109 successfully complete, the target medium gets remembered by this
10110 VirtualBox installation and may be attached to virtual machines.
10111
10112 <note>
10113 The medium will be set to <link to="MediumState_LockedRead"/>
10114 state for the duration of this operation.
10115 </note>
10116 <result name="VBOX_E_OBJECT_IN_USE">
10117 Medium not in @c NotCreated state.
10118 </result>
10119 </desc>
10120 <param name="target" type="IMedium" dir="in">
10121 <desc>Target medium.</desc>
10122 </param>
10123 <param name="variant" type="unsigned long" dir="in">
10124 <desc>Exact image variant which should be created (as a combination of
10125 <link to="MediumVariant" /> flags).</desc>
10126 </param>
10127 <param name="progress" type="IProgress" dir="return">
10128 <desc>Progress object to track the operation completion.</desc>
10129 </param>
10130 </method>
10131
10132 <method name="mergeTo">
10133 <desc>
10134 Starts merging the contents of this medium and all intermediate
10135 differencing media in the chain to the given target medium.
10136
10137 The target medium must be either a descendant of this medium or
10138 its ancestor (otherwise this method will immediately return a failure).
10139 It follows that there are two logical directions of the merge operation:
10140 from ancestor to descendant (<i>forward merge</i>) and from descendant to
10141 ancestor (<i>backward merge</i>). Let us consider the following medium
10142 chain:
10143
10144 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
10145
10146 Here, calling this method on the <tt>Base</tt> medium object with
10147 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
10148 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
10149 merge. Note that in both cases the contents of the resulting medium
10150 will be the same, the only difference is the medium object that takes
10151 the result of the merge operation. In case of the forward merge in the
10152 above example, the result will be written to <tt>Diff_2</tt>; in case of
10153 the backward merge, the result will be written to <tt>Base</tt>. In
10154 other words, the result of the operation is always stored in the target
10155 medium.
10156
10157 Upon successful operation completion, the storage units of all media in
10158 the chain between this (source) medium and the target medium, including
10159 the source medium itself, will be automatically deleted and the
10160 relevant medium objects (including this medium) will become
10161 uninitialized. This means that any attempt to call any of
10162 their methods or attributes will fail with the
10163 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
10164 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
10165 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> media.
10166 Note that <tt>Diff_2</tt> in this case will become a base medium
10167 itself since it will no longer be based on any other medium.
10168
10169 Considering the above, all of the following conditions must be met in
10170 order for the merge operation to succeed:
10171 <ul>
10172 <li>
10173 Neither this (source) medium nor any intermediate
10174 differencing medium in the chain between it and the target
10175 medium is attached to any virtual machine.
10176 </li>
10177 <li>
10178 Neither the source medium nor the target medium is an
10179 <link to="MediumType_Immutable"/> medium.
10180 </li>
10181 <li>
10182 The part of the medium tree from the source medium to the
10183 target medium is a linear chain, i.e. all medium in this
10184 chain have exactly one child which is the next medium in this
10185 chain. The only exception from this rule is the target medium in
10186 the forward merge operation; it is allowed to have any number of
10187 child media because the merge operation will not change its
10188 logical contents (as it is seen by the guest OS or by children).
10189 </li>
10190 <li>
10191 None of the involved media are in
10192 <link to="MediumState_LockedRead"/> or
10193 <link to="MediumState_LockedWrite"/> state.
10194 </li>
10195 </ul>
10196
10197 <note>
10198 This (source) medium and all intermediates will be placed to <link
10199 to="MediumState_Deleting"/> state and the target medium will be
10200 placed to <link to="MediumState_LockedWrite"/> state and for the
10201 duration of this operation.
10202 </note>
10203 </desc>
10204 <param name="target" type="IMedium" dir="in">
10205 <desc>Target medium.</desc>
10206 </param>
10207 <param name="progress" type="IProgress" dir="return">
10208 <desc>Progress object to track the operation completion.</desc>
10209 </param>
10210 </method>
10211
10212 <!-- clone method -->
10213
10214 <method name="cloneTo">
10215 <desc>
10216 Starts creating a clone of this medium in the format and at the
10217 location defined by the @a target argument.
10218
10219 The target medium must be either in <link to="MediumState_NotCreated"/>
10220 state (i.e. must not have an existing storage unit) or in
10221 <link to="MediumState_Created"/> state (i.e. created and not locked, and
10222 big enough to hold the data or else the copy will be partial). Upon
10223 successful completion, the cloned medium will contain exactly the
10224 same sector data as the medium being cloned, except that in the
10225 first case a new UUID for the clone will be randomly generated, and in
10226 the second case the UUID will remain unchanged.
10227
10228 The @a parent argument defines which medium will be the parent
10229 of the clone. Passing a @c null reference indicates that the clone will
10230 be a base image, i.e. completely independent. It is possible to specify
10231 an arbitrary medium for this parameter, including the parent of the
10232 medium which is being cloned. Even cloning to a child of the source
10233 medium is possible. Note that when cloning to an existing image, the
10234 @a parent irgument is ignored.
10235
10236 After the returned progress object reports that the operation is
10237 successfully complete, the target medium gets remembered by this
10238 VirtualBox installation and may be attached to virtual machines.
10239
10240 <note>
10241 This medium will be placed to <link to="MediumState_LockedRead"/>
10242 state for the duration of this operation.
10243 </note>
10244 <result name="E_NOTIMPL">
10245 The specified cloning variant is not supported at the moment.
10246 </result>
10247 </desc>
10248 <param name="target" type="IMedium" dir="in">
10249 <desc>Target medium.</desc>
10250 </param>
10251 <param name="variant" type="unsigned long" dir="in">
10252 <desc>Exact image variant which should be created (as a combination of
10253 <link to="MediumVariant" /> flags).</desc>
10254 </param>
10255 <param name="parent" type="IMedium" dir="in">
10256 <desc>Parent of the cloned medium.</desc>
10257 </param>
10258 <param name="progress" type="IProgress" dir="return">
10259 <desc>Progress object to track the operation completion.</desc>
10260 </param>
10261 </method>
10262
10263 <!-- other methods -->
10264
10265 <method name="compact">
10266 <desc>
10267 Starts compacting of this medium. This means that the medium is
10268 transformed into a possibly more compact storage representation.
10269 This potentially creates temporary images, which can require a
10270 substantial amount of additional disk space.
10271
10272 This medium will be placed to <link to="MediumState_LockedWrite"/>
10273 state and all its parent media (if any) will be placed to
10274 <link to="MediumState_LockedRead"/> state for the duration of this
10275 operation.
10276
10277 Please note that the results can be either returned straight away,
10278 or later as the result of the background operation via the object
10279 returned via the @a progress parameter.
10280
10281 <result name="VBOX_E_NOT_SUPPORTED">
10282 Medium format does not support compacting (but potentially
10283 needs it).
10284 </result>
10285 </desc>
10286 <param name="progress" type="IProgress" dir="return">
10287 <desc>Progress object to track the operation completion.</desc>
10288 </param>
10289 </method>
10290
10291 <method name="resize">
10292 <desc>
10293 Starts resizing this medium. This means that the nominal size of the
10294 medium is set to the new value. Both increasing and decreasing the
10295 size is possible, and there are no safety checks, since VirtualBox
10296 does not make any assumptions about the medium contents.
10297
10298 Resizing usually needs additional disk space, and possibly also
10299 some temporary disk space. Note that resize does not create a full
10300 temporary copy of the medium, so the additional disk space requirement
10301 is usually much lower than using the clone operation.
10302
10303 This medium will be placed to <link to="MediumState_LockedWrite"/>
10304 state for the duration of this operation.
10305
10306 Please note that the results can be either returned straight away,
10307 or later as the result of the background operation via the object
10308 returned via the @a progress parameter.
10309
10310 <result name="VBOX_E_NOT_SUPPORTED">
10311 Medium format does not support resizing.
10312 </result>
10313 </desc>
10314 <param name="logicalSize" type="long long" dir="in">
10315 <desc>New nominal capacity of the medium in bytes.</desc>
10316 </param>
10317 <param name="progress" type="IProgress" dir="return">
10318 <desc>Progress object to track the operation completion.</desc>
10319 </param>
10320 </method>
10321
10322 <method name="reset">
10323 <desc>
10324 Starts erasing the contents of this differencing medium.
10325
10326 This operation will reset the differencing medium to its initial
10327 state when it does not contain any sector data and any read operation is
10328 redirected to its parent medium. This automatically gets called
10329 during VM power-up for every medium whose <link to="#autoReset" />
10330 attribute is @c true.
10331
10332 The medium will be write-locked for the duration of this operation (see
10333 <link to="#lockWrite" />).
10334
10335 <result name="VBOX_E_NOT_SUPPORTED">
10336 This is not a differencing medium.
10337 </result>
10338 <result name="VBOX_E_INVALID_OBJECT_STATE">
10339 Medium is not in <link to="MediumState_Created"/> or
10340 <link to="MediumState_Inaccessible"/> state.
10341 </result>
10342 </desc>
10343 <param name="progress" type="IProgress" dir="return">
10344 <desc>Progress object to track the operation completion.</desc>
10345 </param>
10346 </method>
10347
10348 </interface>
10349
10350
10351 <!--
10352 // IMediumFormat
10353 /////////////////////////////////////////////////////////////////////////
10354 -->
10355
10356 <enum
10357 name="DataType"
10358 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
10359 >
10360 <const name="Int32" value="0"/>
10361 <const name="Int8" value="1"/>
10362 <const name="String" value="2"/>
10363 </enum>
10364
10365 <enum
10366 name="DataFlags"
10367 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
10368 >
10369 <const name="None" value="0x00"/>
10370 <const name="Mandatory" value="0x01"/>
10371 <const name="Expert" value="0x02"/>
10372 <const name="Array" value="0x04"/>
10373 <const name="FlagMask" value="0x07"/>
10374 </enum>
10375
10376 <enum
10377 name="MediumFormatCapabilities"
10378 uuid="7342ba79-7ce0-4d94-8f86-5ed5a185d9bd"
10379 >
10380 <desc>
10381 Medium format capability flags.
10382 </desc>
10383
10384 <const name="Uuid" value="0x01">
10385 <desc>
10386 Supports UUIDs as expected by VirtualBox code.
10387 </desc>
10388 </const>
10389
10390 <const name="CreateFixed" value="0x02">
10391 <desc>
10392 Supports creating fixed size images, allocating all space instantly.
10393 </desc>
10394 </const>
10395
10396 <const name="CreateDynamic" value="0x04">
10397 <desc>
10398 Supports creating dynamically growing images, allocating space on
10399 demand.
10400 </desc>
10401 </const>
10402
10403 <const name="CreateSplit2G" value="0x08">
10404 <desc>
10405 Supports creating images split in chunks of a bit less than 2 GBytes.
10406 </desc>
10407 </const>
10408
10409 <const name="Differencing" value="0x10">
10410 <desc>
10411 Supports being used as a format for differencing media (see <link
10412 to="IMedium::createDiffStorage"/>).
10413 </desc>
10414 </const>
10415
10416 <const name="Asynchronous" value="0x20">
10417 <desc>
10418 Supports asynchronous I/O operations for at least some configurations.
10419 </desc>
10420 </const>
10421
10422 <const name="File" value="0x40">
10423 <desc>
10424 The format backend operates on files (the <link to="IMedium::location"/>
10425 attribute of the medium specifies a file used to store medium
10426 data; for a list of supported file extensions see
10427 <link to="IMediumFormat::describeFileExtensions"/>).
10428 </desc>
10429 </const>
10430
10431 <const name="Properties" value="0x80">
10432 <desc>
10433 The format backend uses the property interface to configure the storage
10434 location and properties (the <link to="IMediumFormat::describeProperties"/>
10435 method is used to get access to properties supported by the given medium format).
10436 </desc>
10437 </const>
10438
10439 <const name="TcpNetworking" value="0x100">
10440 <desc>
10441 The format backend uses the TCP networking interface for network access.
10442 </desc>
10443 </const>
10444
10445 <const name="VFS" value="0x200">
10446 <desc>
10447 The format backend supports virtual filesystem functionality.
10448 </desc>
10449 </const>
10450
10451 <const name="CapabilityMask" value="0x3FF"/>
10452 </enum>
10453
10454 <interface
10455 name="IMediumFormat" extends="$unknown"
10456 uuid="4e9a873f-0599-434a-8345-619ef3fb3111"
10457 wsmap="managed"
10458 >
10459 <desc>
10460 The IMediumFormat interface represents a medium format.
10461
10462 Each medium format has an associated backend which is used to handle
10463 media stored in this format. This interface provides information
10464 about the properties of the associated backend.
10465
10466 Each medium format is identified by a string represented by the
10467 <link to="#id"/> attribute. This string is used in calls like
10468 <link to="IVirtualBox::createHardDisk"/> to specify the desired
10469 format.
10470
10471 The list of all supported medium formats can be obtained using
10472 <link to="ISystemProperties::mediumFormats"/>.
10473
10474 <see>IMedium</see>
10475 </desc>
10476
10477 <attribute name="id" type="wstring" readonly="yes">
10478 <desc>
10479 Identifier of this format.
10480
10481 The format identifier is a non-@c null non-empty ASCII string. Note that
10482 this string is case-insensitive. This means that, for example, all of
10483 the following strings:
10484 <pre>
10485 "VDI"
10486 "vdi"
10487 "VdI"</pre>
10488 refer to the same medium format.
10489
10490 This string is used in methods of other interfaces where it is necessary
10491 to specify a medium format, such as
10492 <link to="IVirtualBox::createHardDisk"/>.
10493 </desc>
10494 </attribute>
10495
10496 <attribute name="name" type="wstring" readonly="yes">
10497 <desc>
10498 Human readable description of this format.
10499
10500 Mainly for use in file open dialogs.
10501 </desc>
10502 </attribute>
10503
10504 <attribute name="capabilities" type="unsigned long" readonly="yes">
10505 <desc>
10506 Capabilities of the format as a set of bit flags.
10507
10508 For the meaning of individual capability flags see
10509 <link to="MediumFormatCapabilities"/>.
10510 </desc>
10511 </attribute>
10512
10513 <method name="describeFileExtensions">
10514 <desc>
10515 Returns two arrays describing the supported file extensions.
10516
10517 The first array contains the supported extensions and the seconds one
10518 the type each extension supports. Both have the same size.
10519
10520 Note that some backends do not work on files, so this array may be
10521 empty.
10522
10523 <see>IMediumFormat::capabilities</see>
10524 </desc>
10525 <param name="extensions" type="wstring" safearray="yes" dir="out">
10526 <desc>The array of supported extensions.</desc>
10527 </param>
10528 <param name="type" type="DeviceType" safearray="yes" dir="out">
10529 <desc>The array which indicates the device type for every given extension.</desc>
10530 </param>
10531 </method>
10532
10533 <method name="describeProperties">
10534 <desc>
10535 Returns several arrays describing the properties supported by this
10536 format.
10537
10538 An element with the given index in each array describes one
10539 property. Thus, the number of elements in each returned array is the
10540 same and corresponds to the number of supported properties.
10541
10542 The returned arrays are filled in only if the
10543 <link to="MediumFormatCapabilities_Properties"/> flag is set.
10544 All arguments must be non-@c null.
10545
10546 <see>DataType</see>
10547 <see>DataFlags</see>
10548 </desc>
10549
10550 <param name="names" type="wstring" safearray="yes" dir="out">
10551 <desc>Array of property names.</desc>
10552 </param>
10553 <param name="description" type="wstring" safearray="yes" dir="out">
10554 <desc>Array of property descriptions.</desc>
10555 </param>
10556 <param name="types" type="DataType" safearray="yes" dir="out">
10557 <desc>Array of property types.</desc>
10558 </param>
10559 <param name="flags" type="unsigned long" safearray="yes" dir="out">
10560 <desc>Array of property flags.</desc>
10561 </param>
10562 <param name="defaults" type="wstring" safearray="yes" dir="out">
10563 <desc>Array of default property values.</desc>
10564 </param>
10565 </method>
10566
10567 </interface>
10568
10569
10570 <!--
10571 // IKeyboard
10572 /////////////////////////////////////////////////////////////////////////
10573 -->
10574
10575 <interface
10576 name="IKeyboard" extends="$unknown"
10577 uuid="f6916ec5-a881-4237-898f-7de58cf88672"
10578 wsmap="managed"
10579 >
10580 <desc>
10581 The IKeyboard interface represents the virtual machine's keyboard. Used
10582 in <link to="IConsole::keyboard"/>.
10583
10584 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10585 to the virtual machine.
10586
10587 </desc>
10588 <method name="putScancode">
10589 <desc>Sends a scancode to the keyboard.
10590
10591 <result name="VBOX_E_IPRT_ERROR">
10592 Could not send scan code to virtual keyboard.
10593 </result>
10594
10595 </desc>
10596 <param name="scancode" type="long" dir="in"/>
10597 </method>
10598
10599 <method name="putScancodes">
10600 <desc>Sends an array of scancodes to the keyboard.
10601
10602 <result name="VBOX_E_IPRT_ERROR">
10603 Could not send all scan codes to virtual keyboard.
10604 </result>
10605
10606 </desc>
10607 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10608 <param name="codesStored" type="unsigned long" dir="return"/>
10609 </method>
10610
10611 <method name="putCAD">
10612 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10613 function is nothing special, it is just a convenience function
10614 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10615
10616 <result name="VBOX_E_IPRT_ERROR">
10617 Could not send all scan codes to virtual keyboard.
10618 </result>
10619
10620 </desc>
10621 </method>
10622
10623 <attribute name="eventSource" type="IEventSource" readonly="yes">
10624 <desc>
10625 Event source for keyboard events.
10626 </desc>
10627 </attribute>
10628
10629 </interface>
10630
10631
10632 <!--
10633 // IMouse
10634 /////////////////////////////////////////////////////////////////////////
10635 -->
10636
10637 <enum
10638 name="MouseButtonState"
10639 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10640 >
10641 <desc>
10642 Mouse button state.
10643 </desc>
10644
10645 <const name="LeftButton" value="0x01"/>
10646 <const name="RightButton" value="0x02"/>
10647 <const name="MiddleButton" value="0x04"/>
10648 <const name="WheelUp" value="0x08"/>
10649 <const name="WheelDown" value="0x10"/>
10650 <const name="XButton1" value="0x20"/>
10651 <const name="XButton2" value="0x40"/>
10652 <const name="MouseStateMask" value="0x7F"/>
10653 </enum>
10654
10655 <interface
10656 name="IMouse" extends="$unknown"
10657 uuid="05044a52-7811-4f00-ae3a-0ab7ff707b10"
10658 wsmap="managed"
10659 >
10660 <desc>
10661 The IMouse interface represents the virtual machine's mouse. Used in
10662 <link to="IConsole::mouse"/>.
10663
10664 Through this interface, the virtual machine's virtual mouse can be
10665 controlled.
10666 </desc>
10667
10668 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10669 <desc>
10670 Whether the guest OS supports absolute mouse pointer positioning
10671 or not.
10672 <note>
10673 You can use the <link to="IMouseCapabilityChangedEvent"/>
10674 event to be instantly informed about changes of this attribute
10675 during virtual machine execution.
10676 </note>
10677 <see><link to="#putMouseEventAbsolute"/></see>
10678 </desc>
10679 </attribute>
10680
10681 <attribute name="relativeSupported" type="boolean" readonly="yes">
10682 <desc>
10683 Whether the guest OS supports relative mouse pointer positioning
10684 or not.
10685 <note>
10686 You can use the <link to="IMouseCapabilityChangedEvent"/>
10687 event to be instantly informed about changes of this attribute
10688 during virtual machine execution.
10689 </note>
10690 <see><link to="#putMouseEvent"/></see>
10691 </desc>
10692 </attribute>
10693
10694 <attribute name="needsHostCursor" type="boolean" readonly="yes">
10695 <desc>
10696 Whether the guest OS can currently switch to drawing it's own mouse
10697 cursor on demand.
10698 <note>
10699 You can use the <link to="IMouseCapabilityChangedEvent"/>
10700 event to be instantly informed about changes of this attribute
10701 during virtual machine execution.
10702 </note>
10703 <see><link to="#putMouseEvent"/></see>
10704 </desc>
10705 </attribute>
10706
10707 <method name="putMouseEvent">
10708 <desc>
10709 Initiates a mouse event using relative pointer movements
10710 along x and y axis.
10711
10712 <result name="E_ACCESSDENIED">
10713 Console not powered up.
10714 </result>
10715 <result name="VBOX_E_IPRT_ERROR">
10716 Could not send mouse event to virtual mouse.
10717 </result>
10718
10719 </desc>
10720
10721 <param name="dx" type="long" dir="in">
10722 <desc>
10723 Amount of pixels the mouse should move to the right.
10724 Negative values move the mouse to the left.
10725 </desc>
10726 </param>
10727 <param name="dy" type="long" dir="in">
10728 <desc>
10729 Amount of pixels the mouse should move downwards.
10730 Negative values move the mouse upwards.
10731 </desc>
10732 </param>
10733 <param name="dz" type="long" dir="in">
10734 <desc>
10735 Amount of mouse wheel moves.
10736 Positive values describe clockwise wheel rotations,
10737 negative values describe counterclockwise rotations.
10738 </desc>
10739 </param>
10740 <param name="dw" type="long" dir="in">
10741 <desc>
10742 Amount of horizontal mouse wheel moves.
10743 Positive values describe a movement to the left,
10744 negative values describe a movement to the right.
10745 </desc>
10746 </param>
10747 <param name="buttonState" type="long" dir="in">
10748 <desc>
10749 The current state of mouse buttons. Every bit represents
10750 a mouse button as follows:
10751 <table>
10752 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10753 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10754 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10755 </table>
10756 A value of <tt>1</tt> means the corresponding button is pressed.
10757 otherwise it is released.
10758 </desc>
10759 </param>
10760 </method>
10761
10762 <method name="putMouseEventAbsolute">
10763 <desc>
10764 Positions the mouse pointer using absolute x and y coordinates.
10765 These coordinates are expressed in pixels and
10766 start from <tt>[1,1]</tt> which corresponds to the top left
10767 corner of the virtual display.
10768
10769 <result name="E_ACCESSDENIED">
10770 Console not powered up.
10771 </result>
10772 <result name="VBOX_E_IPRT_ERROR">
10773 Could not send mouse event to virtual mouse.
10774 </result>
10775
10776 <note>
10777 This method will have effect only if absolute mouse
10778 positioning is supported by the guest OS.
10779 </note>
10780
10781 <see><link to="#absoluteSupported"/></see>
10782 </desc>
10783
10784 <param name="x" type="long" dir="in">
10785 <desc>
10786 X coordinate of the pointer in pixels, starting from @c 1.
10787 </desc>
10788 </param>
10789 <param name="y" type="long" dir="in">
10790 <desc>
10791 Y coordinate of the pointer in pixels, starting from @c 1.
10792 </desc>
10793 </param>
10794 <param name="dz" type="long" dir="in">
10795 <desc>
10796 Amount of mouse wheel moves.
10797 Positive values describe clockwise wheel rotations,
10798 negative values describe counterclockwise rotations.
10799 </desc>
10800 </param>
10801 <param name="dw" type="long" dir="in">
10802 <desc>
10803 Amount of horizontal mouse wheel moves.
10804 Positive values describe a movement to the left,
10805 negative values describe a movement to the right.
10806 </desc>
10807 </param>
10808 <param name="buttonState" type="long" dir="in">
10809 <desc>
10810 The current state of mouse buttons. Every bit represents
10811 a mouse button as follows:
10812 <table>
10813 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10814 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10815 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10816 </table>
10817 A value of @c 1 means the corresponding button is pressed.
10818 otherwise it is released.
10819 </desc>
10820 </param>
10821 </method>
10822
10823 <attribute name="eventSource" type="IEventSource" readonly="yes">
10824 <desc>
10825 Event source for mouse events.
10826 </desc>
10827 </attribute>
10828
10829 </interface>
10830
10831 <!--
10832 // IDisplay
10833 /////////////////////////////////////////////////////////////////////////
10834 -->
10835
10836 <enum
10837 name="FramebufferPixelFormat"
10838 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10839 >
10840 <desc>
10841 Format of the video memory buffer. Constants represented by this enum can
10842 be used to test for particular values of <link
10843 to="IFramebuffer::pixelFormat"/>. See also <link
10844 to="IFramebuffer::requestResize"/>.
10845
10846 See also www.fourcc.org for more information about FOURCC pixel formats.
10847 </desc>
10848
10849 <const name="Opaque" value="0">
10850 <desc>
10851 Unknown buffer format (the user may not assume any particular format of
10852 the buffer).
10853 </desc>
10854 </const>
10855 <const name="FOURCC_RGB" value="0x32424752">
10856 <desc>
10857 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10858 bit layout).
10859 </desc>
10860 </const>
10861 </enum>
10862
10863 <interface
10864 name="IFramebuffer" extends="$unknown"
10865 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10866 wsmap="suppress"
10867 >
10868 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10869 <desc>Address of the start byte of the frame buffer.</desc>
10870 </attribute>
10871
10872 <attribute name="width" type="unsigned long" readonly="yes">
10873 <desc>Frame buffer width, in pixels.</desc>
10874 </attribute>
10875
10876 <attribute name="height" type="unsigned long" readonly="yes">
10877 <desc>Frame buffer height, in pixels.</desc>
10878 </attribute>
10879
10880 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10881 <desc>
10882 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10883 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10884 are: 8, 15, 16, 24 and 32.
10885 </desc>
10886 </attribute>
10887
10888 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10889 <desc>
10890 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10891 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10892 size of the scan line must be aligned to 32 bits.
10893 </desc>
10894 </attribute>
10895
10896 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10897 <desc>
10898 Frame buffer pixel format. It's either one of the values defined by <link
10899 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10900 <note>
10901 This attribute must never return <link
10902 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10903 <link to="#address"/> points to must be always known.
10904 </note>
10905 </desc>
10906 </attribute>
10907
10908 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10909 <desc>
10910 Defines whether this frame buffer uses the virtual video card's memory
10911 buffer (guest VRAM) directly or not. See <link
10912 to="IFramebuffer::requestResize"/> for more information.
10913 </desc>
10914 </attribute>
10915
10916 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10917 <desc>
10918 Hint from the frame buffer about how much of the standard
10919 screen height it wants to use for itself. This information is
10920 exposed to the guest through the VESA BIOS and VMMDev interface
10921 so that it can use it for determining its video mode table. It
10922 is not guaranteed that the guest respects the value.
10923 </desc>
10924 </attribute>
10925
10926 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10927 <desc>
10928 An alpha-blended overlay which is superposed over the frame buffer.
10929 The initial purpose is to allow the display of icons providing
10930 information about the VM state, including disk activity, in front
10931 ends which do not have other means of doing that. The overlay is
10932 designed to controlled exclusively by IDisplay. It has no locking
10933 of its own, and any changes made to it are not guaranteed to be
10934 visible until the affected portion of IFramebuffer is updated. The
10935 overlay can be created lazily the first time it is requested. This
10936 attribute can also return @c null to signal that the overlay is not
10937 implemented.
10938 </desc>
10939 </attribute>
10940
10941 <attribute name="winId" type="long long" readonly="yes">
10942 <desc>
10943 Platform-dependent identifier of the window where context of this
10944 frame buffer is drawn, or zero if there's no such window.
10945 </desc>
10946 </attribute>
10947
10948 <method name="lock">
10949 <desc>
10950 Locks the frame buffer.
10951 Gets called by the IDisplay object where this frame buffer is
10952 bound to.
10953 </desc>
10954 </method>
10955
10956 <method name="unlock">
10957 <desc>
10958 Unlocks the frame buffer.
10959 Gets called by the IDisplay object where this frame buffer is
10960 bound to.
10961 </desc>
10962 </method>
10963
10964 <method name="notifyUpdate">
10965 <desc>
10966 Informs about an update.
10967 Gets called by the display object where this buffer is
10968 registered.
10969 </desc>
10970 <param name="x" type="unsigned long" dir="in"/>
10971 <param name="y" type="unsigned long" dir="in"/>
10972 <param name="width" type="unsigned long" dir="in"/>
10973 <param name="height" type="unsigned long" dir="in"/>
10974 </method>
10975
10976 <method name="requestResize">
10977 <desc>
10978 Requests a size and pixel format change.
10979
10980 There are two modes of working with the video buffer of the virtual
10981 machine. The <i>indirect</i> mode implies that the IFramebuffer
10982 implementation allocates a memory buffer for the requested display mode
10983 and provides it to the virtual machine. In <i>direct</i> mode, the
10984 IFramebuffer implementation uses the memory buffer allocated and owned
10985 by the virtual machine. This buffer represents the video memory of the
10986 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10987 usually faster because the implementation gets a raw pointer to the
10988 guest VRAM buffer which it can directly use for visualizing the contents
10989 of the virtual display, as opposed to the indirect mode where the
10990 contents of guest VRAM are copied to the memory buffer provided by
10991 the implementation every time a display update occurs.
10992
10993 It is important to note that the direct mode is really fast only when
10994 the implementation uses the given guest VRAM buffer directly, for
10995 example, by blitting it to the window representing the virtual machine's
10996 display, which saves at least one copy operation comparing to the
10997 indirect mode. However, using the guest VRAM buffer directly is not
10998 always possible: the format and the color depth of this buffer may be
10999 not supported by the target window, or it may be unknown (opaque) as in
11000 case of text or non-linear multi-plane VGA video modes. In this case,
11001 the indirect mode (that is always available) should be used as a
11002 fallback: when the guest VRAM contents are copied to the
11003 implementation-provided memory buffer, color and format conversion is
11004 done automatically by the underlying code.
11005
11006 The @a pixelFormat parameter defines whether the direct mode is
11007 available or not. If @a pixelFormat is <link
11008 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
11009 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
11010 @a bytesPerLine parameters must be ignored and the implementation must use
11011 the indirect mode (where it provides its own buffer in one of the
11012 supported formats). In all other cases, @a pixelFormat together with
11013 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
11014 buffer pointed to by the @a VRAM parameter and the implementation is
11015 free to choose which mode to use. To indicate that this frame buffer uses
11016 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
11017 attribute must return @c true and <link to="#address"/> must
11018 return exactly the same address that is passed in the @a VRAM parameter
11019 of this method; otherwise it is assumed that the indirect strategy is
11020 chosen.
11021
11022 The @a width and @a height parameters represent the size of the
11023 requested display mode in both modes. In case of indirect mode, the
11024 provided memory buffer should be big enough to store data of the given
11025 display mode. In case of direct mode, it is guaranteed that the given
11026 @a VRAM buffer contains enough space to represent the display mode of the
11027 given size. Note that this frame buffer's <link to="#width"/> and <link
11028 to="#height"/> attributes must return exactly the same values as
11029 passed to this method after the resize is completed (see below).
11030
11031 The @a finished output parameter determines if the implementation has
11032 finished resizing the frame buffer or not. If, for some reason, the
11033 resize cannot be finished immediately during this call, @a finished
11034 must be set to @c false, and the implementation must call
11035 <link to="IDisplay::resizeCompleted"/> after it has returned from
11036 this method as soon as possible. If @a finished is @c false, the
11037 machine will not call any frame buffer methods until
11038 <link to="IDisplay::resizeCompleted"/> is called.
11039
11040 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
11041 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
11042 this frame buffer must return exactly the same values as specified in the
11043 parameters of this method, after the resize is completed. If the
11044 indirect mode is chosen, these attributes must return values describing
11045 the format of the implementation's own memory buffer <link
11046 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
11047 value must always correlate with <link to="#pixelFormat"/>. Note that
11048 the <link to="#pixelFormat"/> attribute must never return <link
11049 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
11050
11051 <note>
11052 This method is called by the IDisplay object under the
11053 <link to="#lock"/> provided by this IFramebuffer
11054 implementation. If this method returns @c false in @a finished, then
11055 this lock is not released until
11056 <link to="IDisplay::resizeCompleted"/> is called.
11057 </note>
11058 </desc>
11059 <param name="screenId" type="unsigned long" dir="in">
11060 <desc>
11061 Logical screen number. Must be used in the corresponding call to
11062 <link to="IDisplay::resizeCompleted"/> if this call is made.
11063 </desc>
11064 </param>
11065 <param name="pixelFormat" type="unsigned long" dir="in">
11066 <desc>
11067 Pixel format of the memory buffer pointed to by @a VRAM.
11068 See also <link to="FramebufferPixelFormat"/>.
11069 </desc>
11070 </param>
11071 <param name="VRAM" type="octet" mod="ptr" dir="in">
11072 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
11073 </param>
11074 <param name="bitsPerPixel" type="unsigned long" dir="in">
11075 <desc>Color depth, bits per pixel.</desc>
11076 </param>
11077 <param name="bytesPerLine" type="unsigned long" dir="in">
11078 <desc>Size of one scan line, in bytes.</desc>
11079 </param>
11080 <param name="width" type="unsigned long" dir="in">
11081 <desc>Width of the guest display, in pixels.</desc>
11082 </param>
11083 <param name="height" type="unsigned long" dir="in">
11084 <desc>Height of the guest display, in pixels.</desc>
11085 </param>
11086 <param name="finished" type="boolean" dir="return">
11087 <desc>
11088 Can the VM start using the new frame buffer immediately
11089 after this method returns or it should wait for
11090 <link to="IDisplay::resizeCompleted"/>.
11091 </desc>
11092 </param>
11093 </method>
11094
11095 <method name="videoModeSupported">
11096 <desc>
11097 Returns whether the frame buffer implementation is willing to
11098 support a given video mode. In case it is not able to render
11099 the video mode (or for some reason not willing), it should
11100 return @c false. Usually this method is called when the guest
11101 asks the VMM device whether a given video mode is supported
11102 so the information returned is directly exposed to the guest.
11103 It is important that this method returns very quickly.
11104 </desc>
11105 <param name="width" type="unsigned long" dir="in"/>
11106 <param name="height" type="unsigned long" dir="in"/>
11107 <param name="bpp" type="unsigned long" dir="in"/>
11108 <param name="supported" type="boolean" dir="return"/>
11109 </method>
11110
11111 <method name="getVisibleRegion">
11112 <desc>
11113 Returns the visible region of this frame buffer.
11114
11115 If the @a rectangles parameter is @c null then the value of the
11116 @a count parameter is ignored and the number of elements necessary to
11117 describe the current visible region is returned in @a countCopied.
11118
11119 If @a rectangles is not @c null but @a count is less
11120 than the required number of elements to store region data, the method
11121 will report a failure. If @a count is equal or greater than the
11122 required number of elements, then the actual number of elements copied
11123 to the provided array will be returned in @a countCopied.
11124
11125 <note>
11126 The address of the provided array must be in the process space of
11127 this IFramebuffer object.
11128 </note>
11129 <note>
11130 Method not yet implemented.
11131 </note>
11132 </desc>
11133 <param name="rectangles" type="octet" mod="ptr" dir="in">
11134 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
11135 </param>
11136 <param name="count" type="unsigned long" dir="in">
11137 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
11138 </param>
11139 <param name="countCopied" type="unsigned long" dir="return">
11140 <desc>Number of elements copied to the @a rectangles array.</desc>
11141 </param>
11142 </method>
11143
11144 <method name="setVisibleRegion">
11145 <desc>
11146 Suggests a new visible region to this frame buffer. This region
11147 represents the area of the VM display which is a union of regions of
11148 all top-level windows of the guest operating system running inside the
11149 VM (if the Guest Additions for this system support this
11150 functionality). This information may be used by the frontends to
11151 implement the seamless desktop integration feature.
11152
11153 <note>
11154 The address of the provided array must be in the process space of
11155 this IFramebuffer object.
11156 </note>
11157 <note>
11158 The IFramebuffer implementation must make a copy of the provided
11159 array of rectangles.
11160 </note>
11161 <note>
11162 Method not yet implemented.
11163 </note>
11164 </desc>
11165 <param name="rectangles" type="octet" mod="ptr" dir="in">
11166 <desc>Pointer to the @c RTRECT array.</desc>
11167 </param>
11168 <param name="count" type="unsigned long" dir="in">
11169 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
11170 </param>
11171 </method>
11172
11173 <method name="processVHWACommand">
11174 <desc>
11175 Posts a Video HW Acceleration Command to the frame buffer for processing.
11176 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color conversion, overlaying, etc.)
11177 are posted from quest to the host to be processed by the host hardware.
11178
11179 <note>
11180 The address of the provided command must be in the process space of
11181 this IFramebuffer object.
11182 </note>
11183 </desc>
11184
11185 <param name="command" type="octet" mod="ptr" dir="in">
11186 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
11187 </param>
11188 </method>
11189
11190 </interface>
11191
11192 <interface
11193 name="IFramebufferOverlay" extends="IFramebuffer"
11194 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
11195 wsmap="suppress"
11196 >
11197 <desc>
11198 The IFramebufferOverlay interface represents an alpha blended overlay
11199 for displaying status icons above an IFramebuffer. It is always created
11200 not visible, so that it must be explicitly shown. It only covers a
11201 portion of the IFramebuffer, determined by its width, height and
11202 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
11203 that order) format, and may be written to directly. Do re-read the
11204 width though, after setting it, as it may be adjusted (increased) to
11205 make it more suitable for the front end.
11206 </desc>
11207 <attribute name="x" type="unsigned long" readonly="yes">
11208 <desc>X position of the overlay, relative to the frame buffer.</desc>
11209 </attribute>
11210
11211 <attribute name="y" type="unsigned long" readonly="yes">
11212 <desc>Y position of the overlay, relative to the frame buffer.</desc>
11213 </attribute>
11214
11215 <attribute name="visible" type="boolean" readonly="no">
11216 <desc>
11217 Whether the overlay is currently visible.
11218 </desc>
11219 </attribute>
11220
11221 <attribute name="alpha" type="unsigned long" readonly="no">
11222 <desc>
11223 The global alpha value for the overlay. This may or may not be
11224 supported by a given front end.
11225 </desc>
11226 </attribute>
11227
11228 <method name="move">
11229 <desc>
11230 Changes the overlay's position relative to the IFramebuffer.
11231 </desc>
11232 <param name="x" type="unsigned long" dir="in"/>
11233 <param name="y" type="unsigned long" dir="in"/>
11234 </method>
11235
11236 </interface>
11237
11238 <interface
11239 name="IDisplay" extends="$unknown"
11240 uuid="09EED313-CD56-4D06-BD56-FAC0F716B5DD"
11241 wsmap="managed"
11242 >
11243 <desc>
11244 The IDisplay interface represents the virtual machine's display.
11245
11246 The object implementing this interface is contained in each
11247 <link to="IConsole::display"/> attribute and represents the visual
11248 output of the virtual machine.
11249
11250 The virtual display supports pluggable output targets represented by the
11251 IFramebuffer interface. Examples of the output target are a window on
11252 the host computer or an RDP session's display on a remote computer.
11253 </desc>
11254 <method name="getScreenResolution">
11255 <desc>Queries display width, height and color depth for given screen.</desc>
11256 <param name="screenId" type="unsigned long" dir="in"/>
11257 <param name="width" type="unsigned long" dir="out"/>
11258 <param name="height" type="unsigned long" dir="out"/>
11259 <param name="bitsPerPixel" type="unsigned long" dir="out"/>
11260 </method>
11261
11262 <method name="setFramebuffer">
11263 <desc>
11264 Sets the framebuffer for given screen.
11265 </desc>
11266 <param name="screenId" type="unsigned long" dir="in"/>
11267 <param name="framebuffer" type="IFramebuffer" dir="in"/>
11268 </method>
11269
11270 <method name="getFramebuffer">
11271 <desc>
11272 Queries the framebuffer for given screen.
11273 </desc>
11274 <param name="screenId" type="unsigned long" dir="in"/>
11275 <param name="framebuffer" type="IFramebuffer" dir="out"/>
11276 <param name="xOrigin" type="long" dir="out"/>
11277 <param name="yOrigin" type="long" dir="out"/>
11278 </method>
11279
11280 <method name="setVideoModeHint">
11281 <desc>
11282 Asks VirtualBox to request the given video mode from
11283 the guest. This is just a hint and it cannot be guaranteed
11284 that the requested resolution will be used. Guest Additions
11285 are required for the request to be seen by guests. The caller
11286 should issue the request and wait for a resolution change and
11287 after a timeout retry.
11288
11289 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
11290 parameters means that the corresponding values should be taken from the
11291 current video mode (i.e. left unchanged).
11292
11293 If the guest OS supports multi-monitor configuration then the @a display
11294 parameter specifies the number of the guest display to send the hint to:
11295 @c 0 is the primary display, @c 1 is the first secondary and
11296 so on. If the multi-monitor configuration is not supported, @a display
11297 must be @c 0.
11298
11299 <result name="E_INVALIDARG">
11300 The @a display is not associated with any monitor.
11301 </result>
11302
11303 </desc>
11304 <param name="width" type="unsigned long" dir="in"/>
11305 <param name="height" type="unsigned long" dir="in"/>
11306 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
11307 <param name="display" type="unsigned long" dir="in"/>
11308 </method>
11309
11310 <method name="setSeamlessMode">
11311 <desc>
11312 Enables or disables seamless guest display rendering (seamless desktop
11313 integration) mode.
11314 <note>
11315 Calling this method has no effect if <link
11316 to="IGuest::supportsSeamless"/> returns @c false.
11317 </note>
11318 </desc>
11319 <param name="enabled" type="boolean" dir="in"/>
11320 </method>
11321
11322 <method name="takeScreenShot">
11323 <desc>
11324 Takes a screen shot of the requested size and copies it to the
11325 32-bpp buffer allocated by the caller and pointed to by @a address.
11326 A pixel consists of 4 bytes in order: B, G, R, 0.
11327
11328 <note>This API can be used only by the COM/XPCOM C++ API as it
11329 requires pointer support. Use <link to="#takeScreenShotToArray" />
11330 with other language bindings.
11331 </note>
11332
11333 <result name="E_NOTIMPL">
11334 Feature not implemented.
11335 </result>
11336 <result name="VBOX_E_IPRT_ERROR">
11337 Could not take a screenshot.
11338 </result>
11339
11340 </desc>
11341 <param name="screenId" type="unsigned long" dir="in"/>
11342 <param name="address" type="octet" mod="ptr" dir="in"/>
11343 <param name="width" type="unsigned long" dir="in"/>
11344 <param name="height" type="unsigned long" dir="in"/>
11345 </method>
11346
11347 <method name="takeScreenShotToArray">
11348 <desc>
11349 Takes a guest screen shot of the requested size and returns it as
11350 an array of bytes in uncompressed 32-bit RGBA format.
11351 A pixel consists of 4 bytes in order: R, G, B, 0xFF.
11352
11353 This API is slow, but could be the only option to get guest screenshot
11354 for scriptable languages not allowed to manipulate with addresses
11355 directly.
11356
11357 <result name="E_NOTIMPL">
11358 Feature not implemented.
11359 </result>
11360 <result name="VBOX_E_IPRT_ERROR">
11361 Could not take a screenshot.
11362 </result>
11363 </desc>
11364 <param name="screenId" type="unsigned long" dir="in">
11365 <desc>
11366 Monitor to take screenshot from.
11367 </desc>
11368 </param>
11369 <param name="width" type="unsigned long" dir="in">
11370 <desc>
11371 Desired image width.
11372 </desc>
11373 </param>
11374 <param name="height" type="unsigned long" dir="in">
11375 <desc>
11376 Desired image height.
11377 </desc>
11378 </param>
11379 <param name="screenData" type="octet" dir="return" safearray="yes">
11380 <desc>
11381 Array with resulting screen data.
11382 </desc>
11383 </param>
11384 </method>
11385
11386 <method name="takeScreenShotPNGToArray">
11387 <desc>
11388 Takes a guest screen shot of the requested size and returns it as
11389 PNG image in array.
11390
11391 <result name="E_NOTIMPL">
11392 Feature not implemented.
11393 </result>
11394 <result name="VBOX_E_IPRT_ERROR">
11395 Could not take a screenshot.
11396 </result>
11397 </desc>
11398 <param name="screenId" type="unsigned long" dir="in">
11399 <desc>
11400 Monitor to take the screenshot from.
11401 </desc>
11402 </param>
11403 <param name="width" type="unsigned long" dir="in">
11404 <desc>
11405 Desired image width.
11406 </desc>
11407 </param>
11408 <param name="height" type="unsigned long" dir="in">
11409 <desc>
11410 Desired image height.
11411 </desc>
11412 </param>
11413 <param name="screenData" type="octet" dir="return" safearray="yes">
11414 <desc>
11415 Array with resulting screen data.
11416 </desc>
11417 </param>
11418 </method>
11419
11420 <method name="drawToScreen">
11421 <desc>
11422 Draws a 32-bpp image of the specified size from the given buffer
11423 to the given point on the VM display.
11424
11425 <result name="E_NOTIMPL">
11426 Feature not implemented.
11427 </result>
11428 <result name="VBOX_E_IPRT_ERROR">
11429 Could not draw to screen.
11430 </result>
11431
11432 </desc>
11433 <param name="screenId" type="unsigned long" dir="in">
11434 <desc>
11435 Monitor to take the screenshot from.
11436 </desc>
11437 </param>
11438 <param name="address" type="octet" mod="ptr" dir="in">
11439 <desc>
11440 Address to store the screenshot to
11441 </desc>
11442 </param>
11443 <param name="x" type="unsigned long" dir="in">
11444 <desc>
11445 Relative to the screen top left corner.
11446 </desc>
11447 </param>
11448 <param name="y" type="unsigned long" dir="in">
11449 <desc>
11450 Relative to the screen top left corner.
11451 </desc>
11452 </param>
11453 <param name="width" type="unsigned long" dir="in">
11454 <desc>
11455 Desired image width.
11456 </desc>
11457 </param>
11458 <param name="height" type="unsigned long" dir="in">
11459 <desc>
11460 Desired image height.
11461 </desc>
11462 </param>
11463 </method>
11464
11465 <method name="invalidateAndUpdate">
11466 <desc>
11467 Does a full invalidation of the VM display and instructs the VM
11468 to update it.
11469
11470 <result name="VBOX_E_IPRT_ERROR">
11471 Could not invalidate and update screen.
11472 </result>
11473
11474 </desc>
11475 </method>
11476
11477 <method name="resizeCompleted">
11478 <desc>
11479 Signals that a framebuffer has completed the resize operation.
11480
11481 <result name="VBOX_E_NOT_SUPPORTED">
11482 Operation only valid for external frame buffers.
11483 </result>
11484
11485 </desc>
11486 <param name="screenId" type="unsigned long" dir="in"/>
11487 </method>
11488
11489 <method name="completeVHWACommand">
11490 <desc>
11491 Signals that the Video HW Acceleration command has completed.
11492 </desc>
11493
11494 <param name="command" type="octet" mod="ptr" dir="in">
11495 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
11496 </param>
11497 </method>
11498
11499 </interface>
11500
11501 <!--
11502 // INetworkAdapter
11503 /////////////////////////////////////////////////////////////////////////
11504 -->
11505
11506 <enum
11507 name="NetworkAttachmentType"
11508 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
11509 >
11510 <desc>
11511 Network attachment type.
11512 </desc>
11513
11514 <const name="Null" value="0">
11515 <desc>Null value, also means "not attached".</desc>
11516 </const>
11517 <const name="NAT" value="1"/>
11518 <const name="Bridged" value="2"/>
11519 <const name="Internal" value="3"/>
11520 <const name="HostOnly" value="4"/>
11521 <const name="VDE" value="5"/>
11522 </enum>
11523
11524 <enum
11525 name="NetworkAdapterType"
11526 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
11527 >
11528 <desc>
11529 Network adapter type.
11530 </desc>
11531
11532 <const name="Null" value="0">
11533 <desc>Null value (never used by the API).</desc>
11534 </const>
11535 <const name="Am79C970A" value="1">
11536 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
11537 </const>
11538 <const name="Am79C973" value="2">
11539 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
11540 </const>
11541 <const name="I82540EM" value="3">
11542 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
11543 </const>
11544 <const name="I82543GC" value="4">
11545 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
11546 </const>
11547 <const name="I82545EM" value="5">
11548 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
11549 </const>
11550 <const name="Virtio" value="6">
11551 <desc>Virtio network device.</desc>
11552 </const>
11553 </enum>
11554
11555 <interface
11556 name="INetworkAdapter" extends="$unknown"
11557 uuid="9bf58a46-c3f7-4f31-80fa-dde9a5dc0b7b"
11558 wsmap="managed"
11559 >
11560 <desc>
11561 Represents a virtual network adapter that is attached to a virtual machine.
11562 Each virtual machine has a fixed number of network adapter slots with one
11563 instance of this attached to each of them. Call
11564 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
11565 is attached to a given slot in a given machine.
11566
11567 Each network adapter can be in one of five attachment modes, which are
11568 represented by the <link to="NetworkAttachmentType" /> enumeration;
11569 see the <link to="#attachmentType" /> attribute.
11570 </desc>
11571
11572 <attribute name="adapterType" type="NetworkAdapterType">
11573 <desc>
11574 Type of the virtual network adapter. Depending on this value,
11575 VirtualBox will provide a different virtual network hardware
11576 to the guest.
11577 </desc>
11578 </attribute>
11579
11580 <attribute name="slot" type="unsigned long" readonly="yes">
11581 <desc>
11582 Slot number this adapter is plugged into. Corresponds to
11583 the value you pass to <link to="IMachine::getNetworkAdapter"/>
11584 to obtain this instance.
11585 </desc>
11586 </attribute>
11587
11588 <attribute name="enabled" type="boolean">
11589 <desc>
11590 Flag whether the network adapter is present in the
11591 guest system. If disabled, the virtual guest hardware will
11592 not contain this network adapter. Can only be changed when
11593 the VM is not running.
11594 </desc>
11595 </attribute>
11596
11597 <attribute name="MACAddress" type="wstring">
11598 <desc>
11599 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
11600 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
11601 </desc>
11602 </attribute>
11603
11604 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
11605
11606 <attribute name="hostInterface" type="wstring">
11607 <desc>
11608 Name of the host network interface the VM is attached to.
11609 </desc>
11610 </attribute>
11611
11612 <attribute name="internalNetwork" type="wstring">
11613 <desc>
11614 Name of the internal network the VM is attached to.
11615 </desc>
11616 </attribute>
11617
11618 <attribute name="NATNetwork" type="wstring">
11619 <desc>
11620 Name of the NAT network the VM is attached to.
11621 </desc>
11622 </attribute>
11623
11624 <attribute name="VDENetwork" type="wstring">
11625 <desc>
11626 Name of the VDE switch the VM is attached to.
11627 </desc>
11628 </attribute>
11629
11630 <attribute name="cableConnected" type="boolean">
11631 <desc>
11632 Flag whether the adapter reports the cable as connected or not.
11633 It can be used to report offline situations to a VM.
11634 </desc>
11635 </attribute>
11636
11637 <attribute name="lineSpeed" type="unsigned long">
11638 <desc>
11639 Line speed reported by custom drivers, in units of 1 kbps.
11640 </desc>
11641 </attribute>
11642
11643 <attribute name="traceEnabled" type="boolean">
11644 <desc>
11645 Flag whether network traffic from/to the network card should be traced.
11646 Can only be toggled when the VM is turned off.
11647 </desc>
11648 </attribute>
11649
11650 <attribute name="traceFile" type="wstring">
11651 <desc>
11652 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11653 will be used.
11654 </desc>
11655 </attribute>
11656
11657 <attribute name="natDriver" type="INATEngine" readonly="yes">
11658 <desc>
11659 Points to the NAT engine which handles the network address translation
11660 for this interface. This is active only when the interface actually uses
11661 NAT (see <link to="#attachToNAT" />).
11662 </desc>
11663 </attribute>
11664
11665 <attribute name="bootPriority" type="unsigned long">
11666 <desc>
11667 Network boot priority of the adapter. Priority 1 is highest. If not set,
11668 the priority is considered to be at the lowest possible setting.
11669 </desc>
11670 </attribute>
11671
11672 <attribute name="bandwidthLimit" type="unsigned long">
11673 <desc>
11674 Maximum throughput allowed for this network adapter, in units of 1 mbps.
11675 A zero value means uncapped/unlimited.
11676 </desc>
11677 </attribute>
11678
11679 <method name="attachToNAT">
11680 <desc>
11681 Attach the network adapter to the Network Address Translation (NAT) interface.
11682 </desc>
11683 </method>
11684
11685 <method name="attachToBridgedInterface">
11686 <desc>
11687 Attach the network adapter to a bridged host interface.
11688 </desc>
11689 </method>
11690
11691 <method name="attachToInternalNetwork">
11692 <desc>
11693 Attach the network adapter to an internal network.
11694 </desc>
11695 </method>
11696
11697 <method name="attachToHostOnlyInterface">
11698 <desc>
11699 Attach the network adapter to the host-only network.
11700 </desc>
11701 </method>
11702
11703 <method name="attachToVDE">
11704 <desc>
11705 Attach the network adapter to a VDE network.
11706 </desc>
11707 </method>
11708
11709 <method name="detach">
11710 <desc>
11711 Detach the network adapter
11712 </desc>
11713 </method>
11714 </interface>
11715
11716
11717 <!--
11718 // ISerialPort
11719 /////////////////////////////////////////////////////////////////////////
11720 -->
11721
11722 <enum
11723 name="PortMode"
11724 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11725 >
11726 <desc>
11727 The PortMode enumeration represents possible communication modes for
11728 the virtual serial port device.
11729 </desc>
11730
11731 <const name="Disconnected" value="0">
11732 <desc>Virtual device is not attached to any real host device.</desc>
11733 </const>
11734 <const name="HostPipe" value="1">
11735 <desc>Virtual device is attached to a host pipe.</desc>
11736 </const>
11737 <const name="HostDevice" value="2">
11738 <desc>Virtual device is attached to a host device.</desc>
11739 </const>
11740 <const name="RawFile" value="3">
11741 <desc>Virtual device is attached to a raw file.</desc>
11742 </const>
11743 </enum>
11744
11745 <interface
11746 name="ISerialPort" extends="$unknown"
11747 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11748 wsmap="managed"
11749 >
11750
11751 <desc>
11752 The ISerialPort interface represents the virtual serial port device.
11753
11754 The virtual serial port device acts like an ordinary serial port
11755 inside the virtual machine. This device communicates to the real
11756 serial port hardware in one of two modes: host pipe or host device.
11757
11758 In host pipe mode, the #path attribute specifies the path to the pipe on
11759 the host computer that represents a serial port. The #server attribute
11760 determines if this pipe is created by the virtual machine process at
11761 machine startup or it must already exist before starting machine
11762 execution.
11763
11764 In host device mode, the #path attribute specifies the name of the
11765 serial port device on the host computer.
11766
11767 There is also a third communication mode: the disconnected mode. In this
11768 mode, the guest OS running inside the virtual machine will be able to
11769 detect the serial port, but all port write operations will be discarded
11770 and all port read operations will return no data.
11771
11772 <see>IMachine::getSerialPort</see>
11773 </desc>
11774
11775 <attribute name="slot" type="unsigned long" readonly="yes">
11776 <desc>
11777 Slot number this serial port is plugged into. Corresponds to
11778 the value you pass to <link to="IMachine::getSerialPort"/>
11779 to obtain this instance.
11780 </desc>
11781 </attribute>
11782
11783 <attribute name="enabled" type="boolean">
11784 <desc>
11785 Flag whether the serial port is enabled. If disabled,
11786 the serial port will not be reported to the guest OS.
11787 </desc>
11788 </attribute>
11789
11790 <attribute name="IOBase" type="unsigned long">
11791 <desc>Base I/O address of the serial port.</desc>
11792 </attribute>
11793
11794 <attribute name="IRQ" type="unsigned long">
11795 <desc>IRQ number of the serial port.</desc>
11796 </attribute>
11797
11798 <attribute name="hostMode" type="PortMode">
11799 <desc>
11800 How is this port connected to the host.
11801 <note>
11802 Changing this attribute may fail if the conditions for
11803 <link to="#path"/> are not met.
11804 </note>
11805 </desc>
11806 </attribute>
11807
11808 <attribute name="server" type="boolean">
11809 <desc>
11810 Flag whether this serial port acts as a server (creates a new pipe on
11811 the host) or as a client (uses the existing pipe). This attribute is
11812 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11813 </desc>
11814 </attribute>
11815
11816 <attribute name="path" type="wstring">
11817 <desc>
11818 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11819 PortMode_HostPipe, or the host serial device name when
11820 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11821 cases, setting a @c null or empty string as the attribute's value
11822 is an error. Otherwise, the value of this property is ignored.
11823 </desc>
11824 </attribute>
11825
11826 </interface>
11827
11828 <!--
11829 // IParallelPort
11830 /////////////////////////////////////////////////////////////////////////
11831 -->
11832
11833 <interface
11834 name="IParallelPort" extends="$unknown"
11835 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11836 wsmap="managed"
11837 >
11838
11839 <desc>
11840 The IParallelPort interface represents the virtual parallel port device.
11841
11842 The virtual parallel port device acts like an ordinary parallel port
11843 inside the virtual machine. This device communicates to the real
11844 parallel port hardware using the name of the parallel device on the host
11845 computer specified in the #path attribute.
11846
11847 Each virtual parallel port device is assigned a base I/O address and an
11848 IRQ number that will be reported to the guest operating system and used
11849 to operate the given parallel port from within the virtual machine.
11850
11851 <see>IMachine::getParallelPort</see>
11852 </desc>
11853
11854 <attribute name="slot" type="unsigned long" readonly="yes">
11855 <desc>
11856 Slot number this parallel port is plugged into. Corresponds to
11857 the value you pass to <link to="IMachine::getParallelPort"/>
11858 to obtain this instance.
11859 </desc>
11860 </attribute>
11861
11862 <attribute name="enabled" type="boolean">
11863 <desc>
11864 Flag whether the parallel port is enabled. If disabled,
11865 the parallel port will not be reported to the guest OS.
11866 </desc>
11867 </attribute>
11868
11869 <attribute name="IOBase" type="unsigned long">
11870 <desc>Base I/O address of the parallel port.</desc>
11871 </attribute>
11872
11873 <attribute name="IRQ" type="unsigned long">
11874 <desc>IRQ number of the parallel port.</desc>
11875 </attribute>
11876
11877 <attribute name="path" type="wstring">
11878 <desc>
11879 Host parallel device name. If this parallel port is enabled, setting a
11880 @c null or an empty string as this attribute's value will result into
11881 an error.
11882 </desc>
11883 </attribute>
11884
11885 </interface>
11886
11887
11888 <!--
11889 // IMachineDebugger
11890 /////////////////////////////////////////////////////////////////////////
11891 -->
11892
11893 <interface
11894 name="IMachineDebugger" extends="$unknown"
11895 uuid="1bfd2fa9-0d91-44d3-9515-368dcbb3eb4d"
11896 wsmap="suppress"
11897 >
11898 <method name="dumpGuestCore">
11899 <desc>
11900 Takes a core dump of the guest.
11901
11902 See include/VBox/dbgfcorefmt.h for details on the file format.
11903 </desc>
11904 <param name="filename" type="wstring" dir="in">
11905 <desc>
11906 The name of the output file. The file must not exist.
11907 </desc>
11908 </param>
11909 <param name="compression" type="wstring" dir="in">
11910 <desc>
11911 Reserved for future compression method indicator.
11912 </desc>
11913 </param>
11914 </method>
11915
11916 <method name="dumpHostProcessCore">
11917 <desc>
11918 Takes a core dump of the VM process on the host.
11919
11920 This feature is not implemented in the 4.0.0 release but it may show up
11921 in a dot release.
11922 </desc>
11923 <param name="filename" type="wstring" dir="in">
11924 <desc>
11925 The name of the output file. The file must not exist.
11926 </desc>
11927 </param>
11928 <param name="compression" type="wstring" dir="in">
11929 <desc>
11930 Reserved for future compression method indicator.
11931 </desc>
11932 </param>
11933 </method>
11934
11935 <method name="info">
11936 <desc>
11937 Interfaces with the info dumpers (DBGFInfo).
11938
11939 This feature is not implemented in the 4.0.0 release but it may show up
11940 in a dot release.
11941 </desc>
11942 <param name="name" type="wstring" dir="in">
11943 <desc>
11944 The name of the info item.
11945 </desc>
11946 </param>
11947 <param name="args" type="wstring" dir="in">
11948 <desc>
11949 Arguments to the info dumper.
11950 </desc>
11951 </param>
11952 <param name="info" type="wstring" dir="return">
11953 <desc>
11954 The into string.
11955 </desc>
11956 </param>
11957 </method>
11958
11959 <method name="injectNMI">
11960 <desc>
11961 Inject an NMI into a running VT-x/AMD-V VM.
11962 </desc>
11963 </method>
11964
11965 <method name="modifyLogGroups">
11966 <desc>
11967 Modifies the group settings of the debug logger.
11968
11969 This feature is not implemented in the 4.0.0 release but may show up
11970 in a dot release.
11971 </desc>
11972 <param name="settings" type="wstring" dir="in">
11973 <desc>The group settings string. See iprt/log.h for details.</desc>
11974 </param>
11975 </method>
11976
11977 <method name="modifyLogFlags">
11978 <desc>
11979 Modifies the debug logger flags.
11980
11981 This feature is not implemented in the 4.0.0 release but may show up
11982 in a dot release.
11983 </desc>
11984 <param name="settings" type="wstring" dir="in">
11985 <desc>The flags settings string. See iprt/log.h for details.</desc>
11986 </param>
11987 </method>
11988
11989 <method name="modifyLogDestinations">
11990 <desc>
11991 Modifies the debug logger destinations.
11992
11993 This feature is not implemented in the 4.0.0 release but may show up
11994 in a dot release.
11995 </desc>
11996 <param name="settings" type="wstring" dir="in">
11997 <desc>The destination settings string. See iprt/log.h for details.</desc>
11998 </param>
11999 </method>
12000
12001 <method name="readPhysicalMemory">
12002 <desc>
12003 Reads guest physical memory, no side effects (MMIO++).
12004
12005 This feature is not implemented in the 4.0.0 release but may show up
12006 in a dot release.
12007 </desc>
12008 <param name="address" type="long long" dir="in">
12009 <desc>The guest physical address.</desc>
12010 </param>
12011 <param name="size" type="unsigned long" dir="in">
12012 <desc>The number of bytes to read.</desc>
12013 </param>
12014 <param name="bytes" type="octet" safearray="yes" dir="return">
12015 <desc>The bytes read.</desc>
12016 </param>
12017 </method>
12018
12019 <method name="writePhysicalMemory">
12020 <desc>
12021 Writes guest physical memory, access handles (MMIO++) are ignored.
12022
12023 This feature is not implemented in the 4.0.0 release but may show up
12024 in a dot release.
12025 </desc>
12026 <param name="address" type="long long" dir="in">
12027 <desc>The guest physical address.</desc>
12028 </param>
12029 <param name="size" type="unsigned long" dir="in">
12030 <desc>The number of bytes to read.</desc>
12031 </param>
12032 <param name="bytes" type="octet" safearray="yes" dir="in">
12033 <desc>The bytes to write.</desc>
12034 </param>
12035 </method>
12036
12037 <method name="readVirtualMemory">
12038 <desc>
12039 Reads guest virtual memory, no side effects (MMIO++).
12040
12041 This feature is not implemented in the 4.0.0 release but may show up
12042 in a dot release.
12043 </desc>
12044 <param name="cpuId" type="unsigned long" dir="in">
12045 <desc>The identifier of the Virtual CPU.</desc>
12046 </param>
12047 <param name="address" type="long long" dir="in">
12048 <desc>The guest virtual address.</desc>
12049 </param>
12050 <param name="size" type="unsigned long" dir="in">
12051 <desc>The number of bytes to read.</desc>
12052 </param>
12053 <param name="bytes" type="octet" safearray="yes" dir="return">
12054 <desc>The bytes read.</desc>
12055 </param>
12056 </method>
12057
12058 <method name="writeVirtualMemory">
12059 <desc>
12060 Writes guest virtual memory, access handles (MMIO++) are ignored.
12061
12062 This feature is not implemented in the 4.0.0 release but may show up
12063 in a dot release.
12064 </desc>
12065 <param name="cpuId" type="unsigned long" dir="in">
12066 <desc>The identifier of the Virtual CPU.</desc>
12067 </param>
12068 <param name="address" type="long long" dir="in">
12069 <desc>The guest virtual address.</desc>
12070 </param>
12071 <param name="size" type="unsigned long" dir="in">
12072 <desc>The number of bytes to read.</desc>
12073 </param>
12074 <param name="bytes" type="octet" safearray="yes" dir="in">
12075 <desc>The bytes to write.</desc>
12076 </param>
12077 </method>
12078
12079 <method name="detectOS">
12080 <desc>
12081 Tries to (re-)detect the guest OS kernel.
12082
12083 This feature is not implemented in the 4.0.0 release but may show up
12084 in a dot release.
12085 </desc>
12086 <param name="os" type="wstring" dir="return">
12087 <desc>
12088 The detected OS kernel on success.
12089 </desc>
12090 </param>
12091 </method>
12092
12093 <method name="getRegister">
12094 <desc>
12095 Gets one register.
12096
12097 This feature is not implemented in the 4.0.0 release but may show up
12098 in a dot release.
12099 </desc>
12100 <param name="cpuId" type="unsigned long" dir="in">
12101 <desc>The identifier of the Virtual CPU.</desc>
12102 </param>
12103 <param name="name" type="wstring" dir="in">
12104 <desc>The register name, case is ignored.</desc>
12105 </param>
12106 <param name="value" type="wstring" dir="return">
12107 <desc>
12108 The register value. This is usually a hex value (always 0x prefixed)
12109 but other format may be used for floating point registers (TBD).
12110 </desc>
12111 </param>
12112 </method>
12113
12114 <method name="getRegisters">
12115 <desc>
12116 Gets all the registers for the given CPU.
12117
12118 This feature is not implemented in the 4.0.0 release but may show up
12119 in a dot release.
12120 </desc>
12121 <param name="cpuId" type="unsigned long" dir="in">
12122 <desc>The identifier of the Virtual CPU.</desc>
12123 </param>
12124 <param name="names" type="wstring" dir="out" safearray="yes">
12125 <desc>Array containing the lowercase register names.</desc>
12126 </param>
12127 <param name="values" type="wstring" dir="out" safearray="yes">
12128 <desc>
12129 Array paralell to the names holding the register values as if the
12130 register was returned by <link to="IMachineDebugger::getRegister"/>.
12131 </desc>
12132 </param>
12133 </method>
12134
12135 <method name="setRegister">
12136 <desc>
12137 Gets one register.
12138
12139 This feature is not implemented in the 4.0.0 release but may show up
12140 in a dot release.
12141 </desc>
12142 <param name="cpuId" type="unsigned long" dir="in">
12143 <desc>The identifier of the Virtual CPU.</desc>
12144 </param>
12145 <param name="name" type="wstring" dir="in">
12146 <desc>The register name, case is ignored.</desc>
12147 </param>
12148 <param name="value" type="wstring" dir="in">
12149 <desc>
12150 The new register value. Hexadecimal, decimal and octal formattings
12151 are supported in addition to any special formattings returned by
12152 the getters.
12153 </desc>
12154 </param>
12155 </method>
12156
12157 <method name="setRegisters">
12158 <desc>
12159 Sets zero or more registers atomically.
12160
12161 This feature is not implemented in the 4.0.0 release but may show up
12162 in a dot release.
12163 </desc>
12164 <param name="cpuId" type="unsigned long" dir="in">
12165 <desc>The identifier of the Virtual CPU.</desc>
12166 </param>
12167 <param name="names" type="wstring" dir="in" safearray="yes">
12168 <desc>Array containing the register names, case ignored.</desc>
12169 </param>
12170 <param name="values" type="wstring" dir="in" safearray="yes">
12171 <desc>
12172 Array paralell to the names holding the register values. See
12173 <link to="IMachineDebugger::setRegister"/> for formatting
12174 guidelines.
12175 </desc>
12176 </param>
12177 </method>
12178
12179 <method name="dumpGuestStack">
12180 <desc>
12181 Produce a simple stack dump using the current guest state.
12182
12183 This feature is not implemented in the 4.0.0 release but may show up
12184 in a dot release.
12185 </desc>
12186 <param name="cpuId" type="unsigned long" dir="in">
12187 <desc>The identifier of the Virtual CPU.</desc>
12188 </param>
12189 <param name="stack" type="wstring" dir="return">
12190 <desc>String containing the formatted stack dump.</desc>
12191 </param>
12192 </method>
12193
12194 <method name="resetStats">
12195 <desc>
12196 Reset VM statistics.
12197 </desc>
12198 <param name="pattern" type="wstring" dir="in">
12199 <desc>The selection pattern. A bit similar to filename globbing.</desc>
12200 </param>
12201 </method>
12202
12203 <method name="dumpStats">
12204 <desc>
12205 Dumps VM statistics.
12206 </desc>
12207 <param name="pattern" type="wstring" dir="in">
12208 <desc>The selection pattern. A bit similar to filename globbing.</desc>
12209 </param>
12210 </method>
12211
12212 <method name="getStats">
12213 <desc>
12214 Get the VM statistics in a XMLish format.
12215 </desc>
12216 <param name="pattern" type="wstring" dir="in">
12217 <desc>The selection pattern. A bit similar to filename globbing.</desc>
12218 </param>
12219 <param name="withDescriptions" type="boolean" dir="in">
12220 <desc>Whether to include the descriptions.</desc>
12221 </param>
12222 <param name="stats" type="wstring" dir="out">
12223 <desc>The XML document containing the statistics.</desc>
12224 </param>
12225 </method>
12226
12227 <attribute name="singlestep" type="boolean">
12228 <desc>Switch for enabling singlestepping.</desc>
12229 </attribute>
12230
12231 <attribute name="recompileUser" type="boolean">
12232 <desc>Switch for forcing code recompilation for user mode code.</desc>
12233 </attribute>
12234
12235 <attribute name="recompileSupervisor" type="boolean">
12236 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
12237 </attribute>
12238
12239 <attribute name="PATMEnabled" type="boolean">
12240 <desc>Switch for enabling and disabling the PATM component.</desc>
12241 </attribute>
12242
12243 <attribute name="CSAMEnabled" type="boolean">
12244 <desc>Switch for enabling and disabling the CSAM component.</desc>
12245 </attribute>
12246
12247 <attribute name="logEnabled" type="boolean">
12248 <desc>Switch for enabling and disabling the debug logger.</desc>
12249 </attribute>
12250
12251 <attribute name="logFlags" type="wstring" readonly="yes">
12252 <desc>The debug logger flags.</desc>
12253 </attribute>
12254
12255 <attribute name="logGroups" type="wstring" readonly="yes">
12256 <desc>The debug logger's group settings.</desc>
12257 </attribute>
12258
12259 <attribute name="logDestinations" type="wstring" readonly="yes">
12260 <desc>The debug logger's destination settings.</desc>
12261 </attribute>
12262
12263 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
12264 <desc>
12265 Flag indicating whether the VM is currently making use of CPU hardware
12266 virtualization extensions.
12267 </desc>
12268 </attribute>
12269
12270 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
12271 <desc>
12272 Flag indicating whether the VM is currently making use of the nested paging
12273 CPU hardware virtualization extension.
12274 </desc>
12275 </attribute>
12276
12277 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
12278 <desc>
12279 Flag indicating whether the VM is currently making use of the VPID
12280 VT-x extension.
12281 </desc>
12282 </attribute>
12283
12284 <attribute name="OSName" type="wstring" readonly="yes">
12285 <desc>
12286 Query the guest OS kernel name as detected by the DBGF.
12287
12288 This feature is not implemented in the 4.0.0 release but may show up
12289 in a dot release.
12290 </desc>
12291 </attribute>
12292
12293 <attribute name="OSVersion" type="wstring" readonly="yes">
12294 <desc>
12295 Query the guest OS kernel version string as detected by the DBGF.
12296
12297 This feature is not implemented in the 4.0.0 release but may show up
12298 in a dot release.
12299 </desc>
12300 </attribute>
12301
12302 <attribute name="PAEEnabled" type="boolean" readonly="yes">
12303 <desc>
12304 Flag indicating whether the VM is currently making use of the Physical
12305 Address Extension CPU feature.
12306 </desc>
12307 </attribute>
12308
12309 <attribute name="virtualTimeRate" type="unsigned long">
12310 <desc>
12311 The rate at which the virtual time runs expressed as a percentage.
12312 The accepted range is 2% to 20000%.
12313 </desc>
12314 </attribute>
12315
12316 <attribute name="VM" type="long long" readonly="yes">
12317 <desc>
12318 Gets the VM handle. This is only for internal use while
12319 we carve the details of this interface.
12320 </desc>
12321 </attribute>
12322
12323 </interface>
12324
12325 <!--
12326 // IUSBController
12327 /////////////////////////////////////////////////////////////////////////
12328 -->
12329
12330 <interface
12331 name="IUSBController" extends="$unknown"
12332 uuid="6fdcccc5-abd3-4fec-9387-2ad3914fc4a8"
12333 wsmap="managed"
12334 >
12335 <attribute name="enabled" type="boolean">
12336 <desc>
12337 Flag whether the USB controller is present in the
12338 guest system. If disabled, the virtual guest hardware will
12339 not contain any USB controller. Can only be changed when
12340 the VM is powered off.
12341 </desc>
12342 </attribute>
12343
12344 <attribute name="enabledEhci" type="boolean">
12345 <desc>
12346 Flag whether the USB EHCI controller is present in the
12347 guest system. If disabled, the virtual guest hardware will
12348 not contain a USB EHCI controller. Can only be changed when
12349 the VM is powered off.
12350 </desc>
12351 </attribute>
12352
12353 <attribute name="proxyAvailable" type="boolean" readonly="yes">
12354 <desc>
12355 Flag whether there is an USB proxy available.
12356 </desc>
12357 </attribute>
12358
12359 <attribute name="USBStandard" type="unsigned short" readonly="yes">
12360 <desc>
12361 USB standard version which the controller implements.
12362 This is a BCD which means that the major version is in the
12363 high byte and minor version is in the low byte.
12364 </desc>
12365 </attribute>
12366
12367 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
12368 <desc>
12369 List of USB device filters associated with the machine.
12370
12371 If the machine is currently running, these filters are activated
12372 every time a new (supported) USB device is attached to the host
12373 computer that was not ignored by global filters
12374 (<link to="IHost::USBDeviceFilters"/>).
12375
12376 These filters are also activated when the machine is powered up.
12377 They are run against a list of all currently available USB
12378 devices (in states
12379 <link to="USBDeviceState_Available"/>,
12380 <link to="USBDeviceState_Busy"/>,
12381 <link to="USBDeviceState_Held"/>) that were not previously
12382 ignored by global filters.
12383
12384 If at least one filter matches the USB device in question, this
12385 device is automatically captured (attached to) the virtual USB
12386 controller of this machine.
12387
12388 <see>IUSBDeviceFilter, ::IUSBController</see>
12389 </desc>
12390 </attribute>
12391
12392 <method name="createDeviceFilter">
12393 <desc>
12394 Creates a new USB device filter. All attributes except
12395 the filter name are set to empty (any match),
12396 <i>active</i> is @c false (the filter is not active).
12397
12398 The created filter can then be added to the list of filters using
12399 <link to="#insertDeviceFilter"/>.
12400
12401 <result name="VBOX_E_INVALID_VM_STATE">
12402 The virtual machine is not mutable.
12403 </result>
12404
12405 <see>#deviceFilters</see>
12406 </desc>
12407 <param name="name" type="wstring" dir="in">
12408 <desc>
12409 Filter name. See <link to="IUSBDeviceFilter::name"/>
12410 for more info.
12411 </desc>
12412 </param>
12413 <param name="filter" type="IUSBDeviceFilter" dir="return">
12414 <desc>Created filter object.</desc>
12415 </param>
12416 </method>
12417
12418 <method name="insertDeviceFilter">
12419 <desc>
12420 Inserts the given USB device to the specified position
12421 in the list of filters.
12422
12423 Positions are numbered starting from <tt>0</tt>. If the specified
12424 position is equal to or greater than the number of elements in
12425 the list, the filter is added to the end of the collection.
12426
12427 <note>
12428 Duplicates are not allowed, so an attempt to insert a
12429 filter that is already in the collection, will return an
12430 error.
12431 </note>
12432
12433 <result name="VBOX_E_INVALID_VM_STATE">
12434 Virtual machine is not mutable.
12435 </result>
12436 <result name="E_INVALIDARG">
12437 USB device filter not created within this VirtualBox instance.
12438 </result>
12439 <result name="VBOX_E_INVALID_OBJECT_STATE">
12440 USB device filter already in list.
12441 </result>
12442
12443 <see>#deviceFilters</see>
12444 </desc>
12445 <param name="position" type="unsigned long" dir="in">
12446 <desc>Position to insert the filter to.</desc>
12447 </param>
12448 <param name="filter" type="IUSBDeviceFilter" dir="in">
12449 <desc>USB device filter to insert.</desc>
12450 </param>
12451 </method>
12452
12453 <method name="removeDeviceFilter">
12454 <desc>
12455 Removes a USB device filter from the specified position in the
12456 list of filters.
12457
12458 Positions are numbered starting from <tt>0</tt>. Specifying a
12459 position equal to or greater than the number of elements in
12460 the list will produce an error.
12461
12462 <see>#deviceFilters</see>
12463
12464 <result name="VBOX_E_INVALID_VM_STATE">
12465 Virtual machine is not mutable.
12466 </result>
12467 <result name="E_INVALIDARG">
12468 USB device filter list empty or invalid @a position.
12469 </result>
12470
12471 </desc>
12472 <param name="position" type="unsigned long" dir="in">
12473 <desc>Position to remove the filter from.</desc>
12474 </param>
12475 <param name="filter" type="IUSBDeviceFilter" dir="return">
12476 <desc>Removed USB device filter.</desc>
12477 </param>
12478 </method>
12479
12480 </interface>
12481
12482
12483 <!--
12484 // IUSBDevice
12485 /////////////////////////////////////////////////////////////////////////
12486 -->
12487
12488 <interface
12489 name="IUSBDevice" extends="$unknown"
12490 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
12491 wsmap="managed"
12492 >
12493 <desc>
12494 The IUSBDevice interface represents a virtual USB device attached to the
12495 virtual machine.
12496
12497 A collection of objects implementing this interface is stored in the
12498 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
12499 attached to a running virtual machine's USB controller.
12500 </desc>
12501
12502 <attribute name="id" type="uuid" mod="string" readonly="yes">
12503 <desc>
12504 Unique USB device ID. This ID is built from #vendorId,
12505 #productId, #revision and #serialNumber.
12506 </desc>
12507 </attribute>
12508
12509 <attribute name="vendorId" type="unsigned short" readonly="yes">
12510 <desc>Vendor ID.</desc>
12511 </attribute>
12512
12513 <attribute name="productId" type="unsigned short" readonly="yes">
12514 <desc>Product ID.</desc>
12515 </attribute>
12516
12517 <attribute name="revision" type="unsigned short" readonly="yes">
12518 <desc>
12519 Product revision number. This is a packed BCD represented as
12520 unsigned short. The high byte is the integer part and the low
12521 byte is the decimal.
12522 </desc>
12523 </attribute>
12524
12525 <attribute name="manufacturer" type="wstring" readonly="yes">
12526 <desc>Manufacturer string.</desc>
12527 </attribute>
12528
12529 <attribute name="product" type="wstring" readonly="yes">
12530 <desc>Product string.</desc>
12531 </attribute>
12532
12533 <attribute name="serialNumber" type="wstring" readonly="yes">
12534 <desc>Serial number string.</desc>
12535 </attribute>
12536
12537 <attribute name="address" type="wstring" readonly="yes">
12538 <desc>Host specific address of the device.</desc>
12539 </attribute>
12540
12541 <attribute name="port" type="unsigned short" readonly="yes">
12542 <desc>
12543 Host USB port number the device is physically
12544 connected to.
12545 </desc>
12546 </attribute>
12547
12548 <attribute name="version" type="unsigned short" readonly="yes">
12549 <desc>
12550 The major USB version of the device - 1 or 2.
12551 </desc>
12552 </attribute>
12553
12554 <attribute name="portVersion" type="unsigned short" readonly="yes">
12555 <desc>
12556 The major USB version of the host USB port the device is
12557 physically connected to - 1 or 2. For devices not connected to
12558 anything this will have the same value as the version attribute.
12559 </desc>
12560 </attribute>
12561
12562 <attribute name="remote" type="boolean" readonly="yes">
12563 <desc>
12564 Whether the device is physically connected to a remote VRDE
12565 client or to a local host machine.
12566 </desc>
12567 </attribute>
12568
12569 </interface>
12570
12571
12572 <!--
12573 // IUSBDeviceFilter
12574 /////////////////////////////////////////////////////////////////////////
12575 -->
12576
12577 <interface
12578 name="IUSBDeviceFilter" extends="$unknown"
12579 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
12580 wsmap="managed"
12581 >
12582 <desc>
12583 The IUSBDeviceFilter interface represents an USB device filter used
12584 to perform actions on a group of USB devices.
12585
12586 This type of filters is used by running virtual machines to
12587 automatically capture selected USB devices once they are physically
12588 attached to the host computer.
12589
12590 A USB device is matched to the given device filter if and only if all
12591 attributes of the device match the corresponding attributes of the
12592 filter (that is, attributes are joined together using the logical AND
12593 operation). On the other hand, all together, filters in the list of
12594 filters carry the semantics of the logical OR operation. So if it is
12595 desirable to create a match like "this vendor id OR this product id",
12596 one needs to create two filters and specify "any match" (see below)
12597 for unused attributes.
12598
12599 All filter attributes used for matching are strings. Each string
12600 is an expression representing a set of values of the corresponding
12601 device attribute, that will match the given filter. Currently, the
12602 following filtering expressions are supported:
12603
12604 <ul>
12605 <li><i>Interval filters</i>. Used to specify valid intervals for
12606 integer device attributes (Vendor ID, Product ID and Revision).
12607 The format of the string is:
12608
12609 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
12610
12611 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
12612 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
12613 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
12614 is omitted before a dash (<tt>-</tt>), the minimum possible integer
12615 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
12616 possible integer is assumed.
12617 </li>
12618 <li><i>Boolean filters</i>. Used to specify acceptable values for
12619 boolean device attributes. The format of the string is:
12620
12621 <tt>true|false|yes|no|0|1</tt>
12622
12623 </li>
12624 <li><i>Exact match</i>. Used to specify a single value for the given
12625 device attribute. Any string that doesn't start with <tt>int:</tt>
12626 represents the exact match. String device attributes are compared to
12627 this string including case of symbols. Integer attributes are first
12628 converted to a string (see individual filter attributes) and then
12629 compared ignoring case.
12630
12631 </li>
12632 <li><i>Any match</i>. Any value of the corresponding device attribute
12633 will match the given filter. An empty or @c null string is
12634 used to construct this type of filtering expressions.
12635
12636 </li>
12637 </ul>
12638
12639 <note>
12640 On the Windows host platform, interval filters are not currently
12641 available. Also all string filter attributes
12642 (<link to="#manufacturer"/>, <link to="#product"/>,
12643 <link to="#serialNumber"/>) are ignored, so they behave as
12644 <i>any match</i> no matter what string expression is specified.
12645 </note>
12646
12647 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
12648 </desc>
12649
12650 <attribute name="name" type="wstring">
12651 <desc>
12652 Visible name for this filter.
12653 This name is used to visually distinguish one filter from another,
12654 so it can neither be @c null nor an empty string.
12655 </desc>
12656 </attribute>
12657
12658 <attribute name="active" type="boolean">
12659 <desc>Whether this filter active or has been temporarily disabled.</desc>
12660 </attribute>
12661
12662 <attribute name="vendorId" type="wstring">
12663 <desc>
12664 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
12665 The string representation for the <i>exact matching</i>
12666 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
12667 (including leading zeroes).
12668 </desc>
12669 </attribute>
12670
12671 <attribute name="productId" type="wstring">
12672 <desc>
12673 <link to="IUSBDevice::productId">Product ID</link> filter.
12674 The string representation for the <i>exact matching</i>
12675 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
12676 (including leading zeroes).
12677 </desc>
12678 </attribute>
12679
12680 <attribute name="revision" type="wstring">
12681 <desc>
12682 <link to="IUSBDevice::productId">Product revision number</link>
12683 filter. The string representation for the <i>exact matching</i>
12684 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
12685 of the integer part of the revision, and <tt>F</tt> is the
12686 decimal digit of its fractional part (including leading and
12687 trailing zeros).
12688 Note that for interval filters, it's best to use the hexadecimal
12689 form, because the revision is stored as a 16 bit packed BCD value;
12690 so the expression <tt>int:0x0100-0x0199</tt> will match any
12691 revision from <tt>1.0</tt> to <tt>1.99</tt>.
12692 </desc>
12693 </attribute>
12694
12695 <attribute name="manufacturer" type="wstring">
12696 <desc>
12697 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
12698 </desc>
12699 </attribute>
12700
12701 <attribute name="product" type="wstring">
12702 <desc>
12703 <link to="IUSBDevice::product">Product</link> filter.
12704 </desc>
12705 </attribute>
12706
12707 <attribute name="serialNumber" type="wstring">
12708 <desc>
12709 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
12710 </desc>
12711 </attribute>
12712
12713 <attribute name="port" type="wstring">
12714 <desc>
12715 <link to="IUSBDevice::port">Host USB port</link> filter.
12716 </desc>
12717 </attribute>
12718
12719 <attribute name="remote" type="wstring">
12720 <desc>
12721 <link to="IUSBDevice::remote">Remote state</link> filter.
12722 <note>
12723 This filter makes sense only for machine USB filters,
12724 i.e. it is ignored by IHostUSBDeviceFilter objects.
12725 </note>
12726 </desc>
12727 </attribute>
12728
12729 <attribute name="maskedInterfaces" type="unsigned long">
12730 <desc>
12731 This is an advanced option for hiding one or more USB interfaces
12732 from the guest. The value is a bit mask where the bits that are set
12733 means the corresponding USB interface should be hidden, masked off
12734 if you like.
12735 This feature only works on Linux hosts.
12736 </desc>
12737 </attribute>
12738
12739 </interface>
12740
12741
12742 <!--
12743 // IHostUSBDevice
12744 /////////////////////////////////////////////////////////////////////////
12745 -->
12746
12747 <enum
12748 name="USBDeviceState"
12749 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
12750 >
12751 <desc>
12752 USB device state. This enumeration represents all possible states
12753 of the USB device physically attached to the host computer regarding
12754 its state on the host computer and availability to guest computers
12755 (all currently running virtual machines).
12756
12757 Once a supported USB device is attached to the host, global USB
12758 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
12759 either ignore the device, or put it to USBDeviceState_Held state, or do
12760 nothing. Unless the device is ignored by global filters, filters of all
12761 currently running guests (<link to="IUSBController::deviceFilters"/>) are
12762 activated that can put it to USBDeviceState_Captured state.
12763
12764 If the device was ignored by global filters, or didn't match
12765 any filters at all (including guest ones), it is handled by the host
12766 in a normal way. In this case, the device state is determined by
12767 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
12768 or USBDeviceState_Available, depending on the current device usage.
12769
12770 Besides auto-capturing based on filters, the device can be manually
12771 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
12772 state is USBDeviceState_Busy, USBDeviceState_Available or
12773 USBDeviceState_Held.
12774
12775 <note>
12776 Due to differences in USB stack implementations in Linux and Win32,
12777 states USBDeviceState_Busy and USBDeviceState_Unavailable are applicable
12778 only to the Linux version of the product. This also means that (<link
12779 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
12780 device state is USBDeviceState_Held.
12781 </note>
12782
12783 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
12784 </desc>
12785
12786 <const name="NotSupported" value="0">
12787 <desc>
12788 Not supported by the VirtualBox server, not available to guests.
12789 </desc>
12790 </const>
12791 <const name="Unavailable" value="1">
12792 <desc>
12793 Being used by the host computer exclusively,
12794 not available to guests.
12795 </desc>
12796 </const>
12797 <const name="Busy" value="2">
12798 <desc>
12799 Being used by the host computer, potentially available to guests.
12800 </desc>
12801 </const>
12802 <const name="Available" value="3">
12803 <desc>
12804 Not used by the host computer, available to guests (the host computer
12805 can also start using the device at any time).
12806 </desc>
12807 </const>
12808 <const name="Held" value="4">
12809 <desc>
12810 Held by the VirtualBox server (ignored by the host computer),
12811 available to guests.
12812 </desc>
12813 </const>
12814 <const name="Captured" value="5">
12815 <desc>
12816 Captured by one of the guest computers, not available
12817 to anybody else.
12818 </desc>
12819 </const>
12820 </enum>
12821
12822 <interface
12823 name="IHostUSBDevice" extends="IUSBDevice"
12824 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
12825 wsmap="managed"
12826 >
12827 <desc>
12828 The IHostUSBDevice interface represents a physical USB device attached
12829 to the host computer.
12830
12831 Besides properties inherited from IUSBDevice, this interface adds the
12832 <link to="#state"/> property that holds the current state of the USB
12833 device.
12834
12835 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
12836 </desc>
12837
12838 <attribute name="state" type="USBDeviceState" readonly="yes">
12839 <desc>
12840 Current state of the device.
12841 </desc>
12842 </attribute>
12843
12844 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
12845
12846 </interface>
12847
12848
12849 <!--
12850 // IHostUSBDeviceFilter
12851 /////////////////////////////////////////////////////////////////////////
12852 -->
12853
12854 <enum
12855 name="USBDeviceFilterAction"
12856 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
12857 >
12858 <desc>
12859 Actions for host USB device filters.
12860 <see>IHostUSBDeviceFilter, USBDeviceState</see>
12861 </desc>
12862
12863 <const name="Null" value="0">
12864 <desc>Null value (never used by the API).</desc>
12865 </const>
12866 <const name="Ignore" value="1">
12867 <desc>Ignore the matched USB device.</desc>
12868 </const>
12869 <const name="Hold" value="2">
12870 <desc>Hold the matched USB device.</desc>
12871 </const>
12872 </enum>
12873
12874 <interface
12875 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
12876 uuid="4cc70246-d74a-400f-8222-3900489c0374"
12877 wsmap="managed"
12878 >
12879 <desc>
12880 The IHostUSBDeviceFilter interface represents a global filter for a
12881 physical USB device used by the host computer. Used indirectly in
12882 <link to="IHost::USBDeviceFilters"/>.
12883
12884 Using filters of this type, the host computer determines the initial
12885 state of the USB device after it is physically attached to the
12886 host's USB controller.
12887
12888 <note>
12889 The <link to="IUSBDeviceFilter::remote"/> attribute is ignored by this type of
12890 filters, because it makes sense only for
12891 <link to="IUSBController::deviceFilters">machine USB filters</link>.
12892 </note>
12893
12894 <see>IHost::USBDeviceFilters</see>
12895 </desc>
12896
12897 <attribute name="action" type="USBDeviceFilterAction">
12898 <desc>
12899 Action performed by the host when an attached USB device
12900 matches this filter.
12901 </desc>
12902 </attribute>
12903
12904 </interface>
12905
12906 <!--
12907 // IAudioAdapter
12908 /////////////////////////////////////////////////////////////////////////
12909 -->
12910
12911 <enum
12912 name="AudioDriverType"
12913 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
12914 >
12915 <desc>
12916 Host audio driver type.
12917 </desc>
12918
12919 <const name="Null" value="0">
12920 <desc>Null value, also means "dummy audio driver".</desc>
12921 </const>
12922 <const name="WinMM" value="1">
12923 <desc>Windows multimedia (Windows hosts only).</desc>
12924 </const>
12925 <const name="OSS" value="2">
12926 <desc>Open Sound System (Linux hosts only).</desc>
12927 </const>
12928 <const name="ALSA" value="3">
12929 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
12930 </const>
12931 <const name="DirectSound" value="4">
12932 <desc>DirectSound (Windows hosts only).</desc>
12933 </const>
12934 <const name="CoreAudio" value="5">
12935 <desc>CoreAudio (Mac hosts only).</desc>
12936 </const>
12937 <const name="MMPM" value="6">
12938 <desc>Reserved for historical reasons.</desc>
12939 </const>
12940 <const name="Pulse" value="7">
12941 <desc>PulseAudio (Linux hosts only).</desc>
12942 </const>
12943 <const name="SolAudio" value="8">
12944 <desc>Solaris audio (Solaris hosts only).</desc>
12945 </const>
12946 </enum>
12947
12948 <enum
12949 name="AudioControllerType"
12950 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
12951 >
12952 <desc>
12953 Virtual audio controller type.
12954 </desc>
12955
12956 <const name="AC97" value="0"/>
12957 <const name="SB16" value="1"/>
12958 <const name="HDA" value="2"/>
12959 </enum>
12960
12961 <interface
12962 name="IAudioAdapter" extends="$unknown"
12963 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
12964 wsmap="managed"
12965 >
12966 <desc>
12967 The IAudioAdapter interface represents the virtual audio adapter of
12968 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
12969 </desc>
12970 <attribute name="enabled" type="boolean">
12971 <desc>
12972 Flag whether the audio adapter is present in the
12973 guest system. If disabled, the virtual guest hardware will
12974 not contain any audio adapter. Can only be changed when
12975 the VM is not running.
12976 </desc>
12977 </attribute>
12978 <attribute name="audioController" type="AudioControllerType">
12979 <desc>
12980 The audio hardware we emulate.
12981 </desc>
12982 </attribute>
12983 <attribute name="audioDriver" type="AudioDriverType">
12984 <desc>
12985 Audio driver the adapter is connected to. This setting
12986 can only be changed when the VM is not running.
12987 </desc>
12988 </attribute>
12989 </interface>
12990
12991 <enum
12992 name="AuthType"
12993 uuid="7eef6ef6-98c2-4dc2-ab35-10d2b292028d"
12994 >
12995 <desc>
12996 VirtualBox authentication type.
12997 </desc>
12998
12999 <const name="Null" value="0">
13000 <desc>Null value, also means "no authentication".</desc>
13001 </const>
13002 <const name="External" value="1"/>
13003 <const name="Guest" value="2"/>
13004 </enum>
13005
13006 <!--
13007 // IVRDEServer
13008 /////////////////////////////////////////////////////////////////////////
13009 -->
13010
13011 <interface
13012 name="IVRDEServer" extends="$unknown"
13013 uuid="be24e0db-e1d6-4d58-b85b-21053d1511b4"
13014 wsmap="managed"
13015 >
13016 <attribute name="enabled" type="boolean">
13017 <desc>VRDE server status.</desc>
13018 </attribute>
13019
13020 <attribute name="authType" type="AuthType">
13021 <desc>VRDE authentication method.</desc>
13022 </attribute>
13023
13024 <attribute name="authTimeout" type="unsigned long">
13025 <desc>Timeout for guest authentication. Milliseconds.</desc>
13026 </attribute>
13027
13028 <attribute name="allowMultiConnection" type="boolean">
13029 <desc>
13030 Flag whether multiple simultaneous connections to the VM are permitted.
13031 Note that this will be replaced by a more powerful mechanism in the future.
13032 </desc>
13033 </attribute>
13034
13035 <attribute name="reuseSingleConnection" type="boolean">
13036 <desc>
13037 Flag whether the existing connection must be dropped and a new connection
13038 must be established by the VRDE server, when a new client connects in single
13039 connection mode.
13040 </desc>
13041 </attribute>
13042
13043 <attribute name="VRDEExtPack" type="wstring">
13044 <desc>
13045 The name of Extension Pack providing VRDE for this VM. Overrides
13046 <link to="ISystemProperties::defaultVRDEExtPack"/>.
13047 </desc>
13048 </attribute>
13049
13050 <attribute name="AuthLibrary" type="wstring">
13051 <desc>
13052 Library used for authentication of RDP clients by this VM. Overrides
13053 <link to="ISystemProperties::VRDEAuthLibrary"/>.
13054 </desc>
13055 </attribute>
13056
13057 <attribute name="VRDEProperties" type="wstring" readonly="yes" safearray="yes">
13058 <desc>
13059 Array of names of properties, which are supported by this VRDE server.
13060 </desc>
13061 </attribute>
13062
13063 <method name="setVRDEProperty">
13064 <desc>
13065 Sets a VRDE specific property string.
13066
13067 If you pass @c null or empty string as a key @a value, the given @a key
13068 will be deleted.
13069
13070 </desc>
13071 <param name="key" type="wstring" dir="in">
13072 <desc>Name of the key to set.</desc>
13073 </param>
13074 <param name="value" type="wstring" dir="in">
13075 <desc>Value to assign to the key.</desc>
13076 </param>
13077 </method>
13078
13079 <method name="getVRDEProperty">
13080 <desc>
13081 Returns a VRDE specific property string.
13082
13083 If the requested data @a key does not exist, this function will
13084 succeed and return an empty string in the @a value argument.
13085
13086 </desc>
13087 <param name="key" type="wstring" dir="in">
13088 <desc>Name of the key to get.</desc>
13089 </param>
13090 <param name="value" type="wstring" dir="return">
13091 <desc>Value of the requested key.</desc>
13092 </param>
13093 </method>
13094
13095 </interface>
13096
13097
13098 <!--
13099 // ISharedFolder
13100 /////////////////////////////////////////////////////////////////////////
13101 -->
13102
13103 <interface
13104 name="ISharedFolder" extends="$unknown"
13105 uuid="8388da11-b559-4574-a5b7-2bd7acd5cef8"
13106 wsmap="struct"
13107 >
13108 <desc>
13109 The ISharedFolder interface represents a folder in the host computer's
13110 file system accessible from the guest OS running inside a virtual
13111 machine using an associated logical name.
13112
13113 There are three types of shared folders:
13114 <ul>
13115 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
13116 folders available to all virtual machines.</li>
13117 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
13118 VM-specific shared folders available to the given virtual machine at
13119 startup.</li>
13120 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
13121 VM-specific shared folders created in the session context (for
13122 example, when the virtual machine is running) and automatically
13123 discarded when the session is closed (the VM is powered off).</li>
13124 </ul>
13125
13126 Logical names of shared folders must be unique within the given scope
13127 (global, permanent or transient). However, they do not need to be unique
13128 across scopes. In this case, the definition of the shared folder in a
13129 more specific scope takes precedence over definitions in all other
13130 scopes. The order of precedence is (more specific to more general):
13131 <ol>
13132 <li>Transient definitions</li>
13133 <li>Permanent definitions</li>
13134 <li>Global definitions</li>
13135 </ol>
13136
13137 For example, if MyMachine has a shared folder named
13138 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
13139 transient shared folder named <tt>C_DRIVE</tt> (that points
13140 to <tt>C:\\\\WINDOWS</tt>) will change the definition
13141 of <tt>C_DRIVE</tt> in the guest OS so
13142 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
13143 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
13144 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
13145 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
13146 to <tt>C:\\</tt> if it still exists.
13147
13148 Note that permanent and transient shared folders of different machines
13149 are in different name spaces, so they don't overlap and don't need to
13150 have unique logical names.
13151
13152 <note>
13153 Global shared folders are not implemented in the current version of the
13154 product.
13155 </note>
13156 </desc>
13157
13158 <attribute name="name" type="wstring" readonly="yes">
13159 <desc>Logical name of the shared folder.</desc>
13160 </attribute>
13161
13162 <attribute name="hostPath" type="wstring" readonly="yes">
13163 <desc>Full path to the shared folder in the host file system.</desc>
13164 </attribute>
13165
13166 <attribute name="accessible" type="boolean" readonly="yes">
13167 <desc>
13168 Whether the folder defined by the host path is currently
13169 accessible or not.
13170 For example, the folder can be inaccessible if it is placed
13171 on the network share that is not available by the time
13172 this property is read.
13173 </desc>
13174 </attribute>
13175
13176 <attribute name="writable" type="boolean" readonly="yes">
13177 <desc>
13178 Whether the folder defined by the host path is writable or
13179 not.
13180 </desc>
13181 </attribute>
13182
13183 <attribute name="autoMount" type="boolean" readonly="yes">
13184 <desc>
13185 Whether the folder gets automatically mounted by the guest or not.
13186 </desc>
13187 </attribute>
13188
13189 <attribute name="lastAccessError" type="wstring" readonly="yes">
13190 <desc>
13191 Text message that represents the result of the last accessibility
13192 check.
13193
13194 Accessibility checks are performed each time the <link to="#accessible"/>
13195 attribute is read. An empty string is returned if the last
13196 accessibility check was successful. A non-empty string indicates a
13197 failure and should normally describe a reason of the failure (for
13198 example, a file read error).
13199 </desc>
13200 </attribute>
13201
13202 </interface>
13203
13204 <!--
13205 // ISession
13206 /////////////////////////////////////////////////////////////////////////
13207 -->
13208
13209 <interface
13210 name="IInternalSessionControl" extends="$unknown"
13211 uuid="a2fbf834-149d-41da-ae52-0dc3b0f032b3"
13212 internal="yes"
13213 wsmap="suppress"
13214 >
13215 <method name="getPID">
13216 <desc>PID of the process that has created this Session object.
13217 </desc>
13218 <param name="pid" type="unsigned long" dir="return"/>
13219 </method>
13220
13221 <method name="getRemoteConsole">
13222 <desc>
13223 Returns the console object suitable for remote control.
13224
13225 <result name="VBOX_E_INVALID_VM_STATE">
13226 Session state prevents operation.
13227 </result>
13228 <result name="VBOX_E_INVALID_OBJECT_STATE">
13229 Session type prevents operation.
13230 </result>
13231
13232 </desc>
13233 <param name="console" type="IConsole" dir="return"/>
13234 </method>
13235
13236 <method name="assignMachine">
13237 <desc>
13238 Assigns the machine object associated with this direct-type
13239 session or informs the session that it will be a remote one
13240 (if @a machine == @c null).
13241
13242 <result name="VBOX_E_INVALID_VM_STATE">
13243 Session state prevents operation.
13244 </result>
13245 <result name="VBOX_E_INVALID_OBJECT_STATE">
13246 Session type prevents operation.
13247 </result>
13248
13249 </desc>
13250 <param name="machine" type="IMachine" dir="in"/>
13251 </method>
13252
13253 <method name="assignRemoteMachine">
13254 <desc>
13255 Assigns the machine and the (remote) console object associated with
13256 this remote-type session.
13257
13258 <result name="VBOX_E_INVALID_VM_STATE">
13259 Session state prevents operation.
13260 </result>
13261
13262 </desc>
13263 <param name="machine" type="IMachine" dir="in"/>
13264 <param name="console" type="IConsole" dir="in"/>
13265 </method>
13266
13267 <method name="updateMachineState">
13268 <desc>
13269 Updates the machine state in the VM process.
13270 Must be called only in certain cases
13271 (see the method implementation).
13272
13273 <result name="VBOX_E_INVALID_VM_STATE">
13274 Session state prevents operation.
13275 </result>
13276 <result name="VBOX_E_INVALID_OBJECT_STATE">
13277 Session type prevents operation.
13278 </result>
13279
13280 </desc>
13281 <param name="aMachineState" type="MachineState" dir="in"/>
13282 </method>
13283
13284 <method name="uninitialize">
13285 <desc>
13286 Uninitializes (closes) this session. Used by VirtualBox to close
13287 the corresponding remote session when the direct session dies
13288 or gets closed.
13289
13290 <result name="VBOX_E_INVALID_VM_STATE">
13291 Session state prevents operation.
13292 </result>
13293
13294 </desc>
13295 </method>
13296
13297 <method name="onNetworkAdapterChange">
13298 <desc>
13299 Triggered when settings of a network adapter of the
13300 associated virtual machine have changed.
13301
13302 <result name="VBOX_E_INVALID_VM_STATE">
13303 Session state prevents operation.
13304 </result>
13305 <result name="VBOX_E_INVALID_OBJECT_STATE">
13306 Session type prevents operation.
13307 </result>
13308
13309 </desc>
13310 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
13311 <param name="changeAdapter" type="boolean" dir="in"/>
13312 </method>
13313
13314 <method name="onSerialPortChange">
13315 <desc>
13316 Triggered when settings of a serial port of the
13317 associated virtual machine have changed.
13318
13319 <result name="VBOX_E_INVALID_VM_STATE">
13320 Session state prevents operation.
13321 </result>
13322 <result name="VBOX_E_INVALID_OBJECT_STATE">
13323 Session type prevents operation.
13324 </result>
13325
13326 </desc>
13327 <param name="serialPort" type="ISerialPort" dir="in"/>
13328 </method>
13329
13330 <method name="onParallelPortChange">
13331 <desc>
13332 Triggered when settings of a parallel port of the
13333 associated virtual machine have changed.
13334
13335 <result name="VBOX_E_INVALID_VM_STATE">
13336 Session state prevents operation.
13337 </result>
13338 <result name="VBOX_E_INVALID_OBJECT_STATE">
13339 Session type prevents operation.
13340 </result>
13341
13342 </desc>
13343 <param name="parallelPort" type="IParallelPort" dir="in"/>
13344 </method>
13345
13346 <method name="onStorageControllerChange">
13347 <desc>
13348 Triggered when settings of a storage controller of the
13349 associated virtual machine have changed.
13350
13351 <result name="VBOX_E_INVALID_VM_STATE">
13352 Session state prevents operation.
13353 </result>
13354 <result name="VBOX_E_INVALID_OBJECT_STATE">
13355 Session type prevents operation.
13356 </result>
13357
13358 </desc>
13359 </method>
13360
13361 <method name="onMediumChange">
13362 <desc>
13363 Triggered when attached media of the
13364 associated virtual machine have changed.
13365
13366 <result name="VBOX_E_INVALID_VM_STATE">
13367 Session state prevents operation.
13368 </result>
13369 <result name="VBOX_E_INVALID_OBJECT_STATE">
13370 Session type prevents operation.
13371 </result>
13372
13373 </desc>
13374
13375 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
13376 <param name="force" type="boolean" dir="in"/>
13377 </method>
13378
13379 <method name="onCPUChange">
13380 <desc>
13381 Notification when a CPU changes.
13382 </desc>
13383 <param name="cpu" type="unsigned long" dir="in">
13384 <desc>The CPU which changed</desc>
13385 </param>
13386 <param name="add" type="boolean" dir="in">
13387 <desc>Flag whether the CPU was added or removed</desc>
13388 </param>
13389 </method>
13390
13391 <method name="onCPUExecutionCapChange">
13392 <desc>
13393 Notification when the CPU execution cap changes.
13394 </desc>
13395 <param name="executionCap" type="unsigned long" dir="in">
13396 <desc>The new CPU execution cap value. (1-100)</desc>
13397 </param>
13398 </method>
13399
13400 <method name="onVRDEServerChange">
13401 <desc>
13402 Triggered when settings of the VRDE server object of the
13403 associated virtual machine have changed.
13404
13405 <result name="VBOX_E_INVALID_VM_STATE">
13406 Session state prevents operation.
13407 </result>
13408 <result name="VBOX_E_INVALID_OBJECT_STATE">
13409 Session type prevents operation.
13410 </result>
13411
13412 </desc>
13413 <param name="restart" type="boolean" dir="in">
13414 <desc>Flag whether the server must be restarted</desc>
13415 </param>
13416 </method>
13417
13418 <method name="onUSBControllerChange">
13419 <desc>
13420 Triggered when settings of the USB controller object of the
13421 associated virtual machine have changed.
13422
13423 <result name="VBOX_E_INVALID_VM_STATE">
13424 Session state prevents operation.
13425 </result>
13426 <result name="VBOX_E_INVALID_OBJECT_STATE">
13427 Session type prevents operation.
13428 </result>
13429
13430 </desc>
13431 </method>
13432
13433 <method name="onSharedFolderChange">
13434 <desc>
13435 Triggered when a permanent (global or machine) shared folder has been
13436 created or removed.
13437 <note>
13438 We don't pass shared folder parameters in this notification because
13439 the order in which parallel notifications are delivered is not defined,
13440 therefore it could happen that these parameters were outdated by the
13441 time of processing this notification.
13442 </note>
13443
13444 <result name="VBOX_E_INVALID_VM_STATE">
13445 Session state prevents operation.
13446 </result>
13447 <result name="VBOX_E_INVALID_OBJECT_STATE">
13448 Session type prevents operation.
13449 </result>
13450
13451 </desc>
13452 <param name="global" type="boolean" dir="in"/>
13453 </method>
13454
13455 <method name="onUSBDeviceAttach">
13456 <desc>
13457 Triggered when a request to capture a USB device (as a result
13458 of matched USB filters or direct call to
13459 <link to="IConsole::attachUSBDevice"/>) has completed.
13460 A @c null @a error object means success, otherwise it
13461 describes a failure.
13462
13463 <result name="VBOX_E_INVALID_VM_STATE">
13464 Session state prevents operation.
13465 </result>
13466 <result name="VBOX_E_INVALID_OBJECT_STATE">
13467 Session type prevents operation.
13468 </result>
13469
13470 </desc>
13471 <param name="device" type="IUSBDevice" dir="in"/>
13472 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
13473 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
13474 </method>
13475
13476 <method name="onUSBDeviceDetach">
13477 <desc>
13478 Triggered when a request to release the USB device (as a result
13479 of machine termination or direct call to
13480 <link to="IConsole::detachUSBDevice"/>) has completed.
13481 A @c null @a error object means success, otherwise it
13482 describes a failure.
13483
13484 <result name="VBOX_E_INVALID_VM_STATE">
13485 Session state prevents operation.
13486 </result>
13487 <result name="VBOX_E_INVALID_OBJECT_STATE">
13488 Session type prevents operation.
13489 </result>
13490
13491 </desc>
13492 <param name="id" type="uuid" mod="string" dir="in"/>
13493 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
13494 </method>
13495
13496 <method name="onShowWindow">
13497 <desc>
13498 Called by <link to="IMachine::canShowConsoleWindow"/> and by
13499 <link to="IMachine::showConsoleWindow"/> in order to notify
13500 console listeners
13501 <link to="ICanShowWindowEvent"/>
13502 and <link to="IShowWindowEvent"/>.
13503
13504 <result name="VBOX_E_INVALID_OBJECT_STATE">
13505 Session type prevents operation.
13506 </result>
13507
13508 </desc>
13509 <param name="check" type="boolean" dir="in"/>
13510 <param name="canShow" type="boolean" dir="out"/>
13511 <param name="winId" type="long long" dir="out"/>
13512 </method>
13513
13514 <method name="onBandwidthGroupChange">
13515 <desc>
13516 Notification when one of the bandwidth groups change.
13517 </desc>
13518 <param name="bandwidthGroup" type="IBandwidthGroup" dir="in">
13519 <desc>The bandwidth group which changed.</desc>
13520 </param>
13521 </method>
13522
13523 <method name="accessGuestProperty">
13524 <desc>
13525 Called by <link to="IMachine::getGuestProperty"/> and by
13526 <link to="IMachine::setGuestProperty"/> in order to read and
13527 modify guest properties.
13528
13529 <result name="VBOX_E_INVALID_VM_STATE">
13530 Machine session is not open.
13531 </result>
13532 <result name="VBOX_E_INVALID_OBJECT_STATE">
13533 Session type is not direct.
13534 </result>
13535
13536 </desc>
13537 <param name="name" type="wstring" dir="in"/>
13538 <param name="value" type="wstring" dir="in"/>
13539 <param name="flags" type="wstring" dir="in"/>
13540 <param name="isSetter" type="boolean" dir="in"/>
13541 <param name="retValue" type="wstring" dir="out"/>
13542 <param name="retTimestamp" type="long long" dir="out"/>
13543 <param name="retFlags" type="wstring" dir="out"/>
13544 </method>
13545
13546 <method name="enumerateGuestProperties">
13547 <desc>
13548 Return a list of the guest properties matching a set of patterns along
13549 with their values, time stamps and flags.
13550
13551 <result name="VBOX_E_INVALID_VM_STATE">
13552 Machine session is not open.
13553 </result>
13554 <result name="VBOX_E_INVALID_OBJECT_STATE">
13555 Session type is not direct.
13556 </result>
13557
13558 </desc>
13559 <param name="patterns" type="wstring" dir="in">
13560 <desc>
13561 The patterns to match the properties against as a comma-separated
13562 string. If this is empty, all properties currently set will be
13563 returned.
13564 </desc>
13565 </param>
13566 <param name="key" type="wstring" dir="out" safearray="yes">
13567 <desc>
13568 The key names of the properties returned.
13569 </desc>
13570 </param>
13571 <param name="value" type="wstring" dir="out" safearray="yes">
13572 <desc>
13573 The values of the properties returned. The array entries match the
13574 corresponding entries in the @a key array.
13575 </desc>
13576 </param>
13577 <param name="timestamp" type="long long" dir="out" safearray="yes">
13578 <desc>
13579 The time stamps of the properties returned. The array entries match
13580 the corresponding entries in the @a key array.
13581 </desc>
13582 </param>
13583 <param name="flags" type="wstring" dir="out" safearray="yes">
13584 <desc>
13585 The flags of the properties returned. The array entries match the
13586 corresponding entries in the @a key array.
13587 </desc>
13588 </param>
13589 </method>
13590
13591 <method name="onlineMergeMedium">
13592 <desc>
13593 Triggers online merging of a hard disk. Used internally when deleting
13594 a snapshot while a VM referring to the same hard disk chain is running.
13595
13596 <result name="VBOX_E_INVALID_VM_STATE">
13597 Machine session is not open.
13598 </result>
13599 <result name="VBOX_E_INVALID_OBJECT_STATE">
13600 Session type is not direct.
13601 </result>
13602
13603 </desc>
13604 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
13605 <desc>The medium attachment to identify the medium chain.</desc>
13606 </param>
13607 <param name="sourceIdx" type="unsigned long" dir="in">
13608 <desc>The index of the source image in the chain.
13609 Redundant, but drastically reduces IPC.</desc>
13610 </param>
13611 <param name="targetIdx" type="unsigned long" dir="in">
13612 <desc>The index of the target image in the chain.
13613 Redundant, but drastically reduces IPC.</desc>
13614 </param>
13615 <param name="source" type="IMedium" dir="in">
13616 <desc>Merge source medium.</desc>
13617 </param>
13618 <param name="target" type="IMedium" dir="in">
13619 <desc>Merge target medium.</desc>
13620 </param>
13621 <param name="mergeForward" type="boolean" dir="in">
13622 <desc>Merge direction.</desc>
13623 </param>
13624 <param name="parentForTarget" type="IMedium" dir="in">
13625 <desc>For forward merges: new parent for target medium.</desc>
13626 </param>
13627 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
13628 <desc>For backward merges: list of media which need their parent UUID
13629 updated.</desc>
13630 </param>
13631 <param name="progress" type="IProgress" dir="in">
13632 <desc>
13633 Progress object for this operation.
13634 </desc>
13635 </param>
13636 </method>
13637
13638 </interface>
13639
13640 <interface
13641 name="ISession" extends="$unknown"
13642 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
13643 wsmap="managed"
13644 >
13645 <desc>
13646 The ISession interface represents a client process and allows for locking
13647 virtual machines (represented by IMachine objects) to prevent conflicting
13648 changes to the machine.
13649
13650 Any caller wishing to manipulate a virtual machine needs to create a session
13651 object first, which lives in its own process space. Such session objects are
13652 then associated with <link to="IMachine" /> objects living in the VirtualBox
13653 server process to coordinate such changes.
13654
13655 There are two typical scenarios in which sessions are used:
13656
13657 <ul>
13658 <li>To alter machine settings or control a running virtual machine, one
13659 needs to lock a machine for a given session (client process) by calling
13660 <link to="IMachine::lockMachine"/>.
13661
13662 Whereas multiple sessions may control a running virtual machine, only
13663 one process can obtain a write lock on the machine to prevent conflicting
13664 changes. A write lock is also needed if a process wants to actually run a
13665 virtual machine in its own context, such as the VirtualBox GUI or
13666 VBoxHeadless front-ends. They must also lock a machine for their own
13667 sessions before they are allowed to power up the virtual machine.
13668
13669 As a result, no machine settings can be altered while another process is
13670 already using it, either because that process is modifying machine settings
13671 or because the machine is running.
13672 </li>
13673 <li>
13674 To start a VM using one of the existing VirtualBox front-ends (e.g. the
13675 VirtualBox GUI or VBoxHeadless), one would use
13676 <link to="IMachine::launchVMProcess"/>, which also takes a session object
13677 as its first parameter. This session then identifies the caller and lets the
13678 caller control the started machine (for example, pause machine execution or
13679 power it down) as well as be notified about machine execution state changes.
13680 </li>
13681 </ul>
13682
13683 How sessions objects are created in a client process depends on whether you use
13684 the Main API via COM or via the webservice:
13685
13686 <ul>
13687 <li>When using the COM API directly, an object of the Session class from the
13688 VirtualBox type library needs to be created. In regular COM C++ client code,
13689 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
13690 This object will then act as a local session object in further calls to open
13691 a session.
13692 </li>
13693
13694 <li>In the webservice, the session manager (IWebsessionManager) instead creates
13695 a session object automatically whenever <link to="IWebsessionManager::logon" />
13696 is called. A managed object reference to that session object can be retrieved by
13697 calling <link to="IWebsessionManager::getSessionObject" />.
13698 </li>
13699 </ul>
13700 </desc>
13701
13702 <attribute name="state" type="SessionState" readonly="yes">
13703 <desc>Current state of this session.</desc>
13704 </attribute>
13705
13706 <attribute name="type" type="SessionType" readonly="yes">
13707 <desc>
13708 Type of this session. The value of this attribute is valid only
13709 if the session currently has a machine locked (i.e. its
13710 <link to="#state" /> is Locked), otherwise an error will be returned.
13711 </desc>
13712 </attribute>
13713
13714 <attribute name="machine" type="IMachine" readonly="yes">
13715 <desc>Machine object associated with this session.</desc>
13716 </attribute>
13717
13718 <attribute name="console" type="IConsole" readonly="yes">
13719 <desc>Console object associated with this session.</desc>
13720 </attribute>
13721
13722 <method name="unlockMachine">
13723 <desc>
13724 Unlocks a machine that was previously locked for the current session.
13725
13726 Calling this method is required every time a machine has been locked
13727 for a particular session using the <link to="IMachine::launchVMProcess" />
13728 or <link to="IMachine::lockMachine" /> calls. Otherwise the state of
13729 the machine will be set to <link to="MachineState_Aborted" /> on the
13730 server, and changes made to the machine settings will be lost.
13731
13732 Generally, it is recommended to unlock all machines explicitly
13733 before terminating the application (regardless of the reason for
13734 the termination).
13735
13736 <note>
13737 Do not expect the session state (<link to="ISession::state" />
13738 to return to "Unlocked" immediately after you invoke this method,
13739 particularly if you have started a new VM process. The session
13740 state will automatically return to "Unlocked" once the VM is no
13741 longer executing, which can of course take a very long time.
13742 </note>
13743
13744 <result name="E_UNEXPECTED">
13745 Session is not locked.
13746 </result>
13747
13748 </desc>
13749 </method>
13750
13751 </interface>
13752
13753 <!--
13754 // IStorageController
13755 /////////////////////////////////////////////////////////////////////////
13756 -->
13757
13758 <enum
13759 name="StorageBus"
13760 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
13761 >
13762 <desc>
13763 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy);
13764 see <link to="IStorageController::bus" />.
13765 </desc>
13766 <const name="Null" value="0">
13767 <desc>@c null value. Never used by the API.</desc>
13768 </const>
13769 <const name="IDE" value="1"/>
13770 <const name="SATA" value="2"/>
13771 <const name="SCSI" value="3"/>
13772 <const name="Floppy" value="4"/>
13773 <const name="SAS" value="5"/>
13774 </enum>
13775
13776 <enum
13777 name="StorageControllerType"
13778 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
13779 >
13780 <desc>
13781 The exact variant of storage controller hardware presented
13782 to the guest; see <link to="IStorageController::controllerType" />.
13783 </desc>
13784
13785 <const name="Null" value="0">
13786 <desc>@c null value. Never used by the API.</desc>
13787 </const>
13788 <const name="LsiLogic" value="1">
13789 <desc>A SCSI controller of the LsiLogic variant.</desc>
13790 </const>
13791 <const name="BusLogic" value="2">
13792 <desc>A SCSI controller of the BusLogic variant.</desc>
13793 </const>
13794 <const name="IntelAhci" value="3">
13795 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
13796 </const>
13797 <const name="PIIX3" value="4">
13798 <desc>An IDE controller of the PIIX3 variant.</desc>
13799 </const>
13800 <const name="PIIX4" value="5">
13801 <desc>An IDE controller of the PIIX4 variant.</desc>
13802 </const>
13803 <const name="ICH6" value="6">
13804 <desc>An IDE controller of the ICH6 variant.</desc>
13805 </const>
13806 <const name="I82078" value="7">
13807 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
13808 </const>
13809 <const name="LsiLogicSas" value="8">
13810 <desc>A variant of the LsiLogic controller using SAS.</desc>
13811 </const>
13812 </enum>
13813
13814 <enum
13815 name="ChipsetType"
13816 uuid="8b4096a8-a7c3-4d3b-bbb1-05a0a51ec394"
13817 >
13818 <desc>
13819 Type of emulated chipset (mostly southbridge).
13820 </desc>
13821
13822 <const name="Null" value="0">
13823 <desc>@c null value. Never used by the API.</desc>
13824 </const>
13825 <const name="PIIX3" value="1">
13826 <desc>A PIIX3 (PCI IDE ISA Xcelerator) chipset.</desc>
13827 </const>
13828 <const name="ICH9" value="2">
13829 <desc>A ICH9 (I/O Controller Hub) chipset.</desc>
13830 </const>
13831 </enum>
13832
13833 <interface
13834 name="IStorageController" extends="$unknown"
13835 uuid="a1556333-09b6-46d9-bfb7-fc239b7fbe1e"
13836 wsmap="managed"
13837 >
13838 <desc>
13839 Represents a storage controller that is attached to a virtual machine
13840 (<link to="IMachine" />). Just as drives (hard disks, DVDs, FDs) are
13841 attached to storage controllers in a real computer, virtual drives
13842 (represented by <link to="IMediumAttachment" />) are attached to virtual
13843 storage controllers, represented by this interface.
13844
13845 As opposed to physical hardware, VirtualBox has a very generic concept
13846 of a storage controller, and for purposes of the Main API, all virtual
13847 storage is attached to virtual machines via instances of this interface.
13848 There are five types of such virtual storage controllers: IDE, SCSI, SATA,
13849 SAS and Floppy (see <link to="#bus" />). Depending on which of these four
13850 is used, certain sub-types may be available and can be selected in
13851 <link to="#controllerType" />.
13852
13853 Depending on these settings, the guest operating system might see
13854 significantly different virtual hardware.
13855 </desc>
13856
13857 <attribute name="name" type="wstring" readonly="yes">
13858 <desc>
13859 Name of the storage controller, as originally specified with
13860 <link to="IMachine::addStorageController" />. This then uniquely
13861 identifies this controller with other method calls such as
13862 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
13863 </desc>
13864 </attribute>
13865
13866 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
13867 <desc>
13868 Maximum number of devices which can be attached to one port.
13869 </desc>
13870 </attribute>
13871
13872 <attribute name="minPortCount" type="unsigned long" readonly="yes">
13873 <desc>
13874 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
13875 </desc>
13876 </attribute>
13877
13878 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
13879 <desc>
13880 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
13881 </desc>
13882 </attribute>
13883
13884 <attribute name="instance" type="unsigned long">
13885 <desc>
13886 The instance number of the device in the running VM.
13887 </desc>
13888 </attribute>
13889
13890 <attribute name="portCount" type="unsigned long">
13891 <desc>
13892 The number of currently usable ports on the controller.
13893 The minimum and maximum number of ports for one controller are
13894 stored in <link to="IStorageController::minPortCount"/>
13895 and <link to="IStorageController::maxPortCount"/>.
13896 </desc>
13897 </attribute>
13898
13899 <attribute name="bus" type="StorageBus" readonly="yes">
13900 <desc>
13901 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy).
13902 </desc>
13903 </attribute>
13904
13905 <attribute name="controllerType" type="StorageControllerType">
13906 <desc>
13907 The exact variant of storage controller hardware presented
13908 to the guest.
13909 Depending on this value, VirtualBox will provide a different
13910 virtual storage controller hardware to the guest.
13911 For SATA, SAS and floppy controllers, only one variant is
13912 available, but for IDE and SCSI, there are several.
13913
13914 For SCSI controllers, the default type is LsiLogic.
13915 </desc>
13916 </attribute>
13917
13918 <attribute name="useHostIOCache" type="boolean">
13919 <desc>
13920 If true, the storage controller emulation will use a dedicated I/O thread, enable the host I/O
13921 caches and use synchronous file APIs on the host. This was the only option in the API before
13922 VirtualBox 3.2 and is still the default for IDE controllers.
13923
13924 If false, the host I/O cache will be disabled for image files attached to this storage controller.
13925 Instead, the storage controller emulation will use asynchronous I/O APIs on the host. This makes
13926 it possible to turn off the host I/O caches because the emulation can handle unaligned access to
13927 the file. This should be used on OS X and Linux hosts if a high I/O load is expected or many
13928 virtual machines are running at the same time to prevent I/O cache related hangs.
13929 This option new with the API of VirtualBox 3.2 and is now the default for non-IDE storage controllers.
13930 </desc>
13931 </attribute>
13932
13933 <attribute name="bootable" type="boolean" readonly="yes">
13934 <desc>
13935 Returns whether it is possible to boot from disks attached to this controller.
13936 </desc>
13937 </attribute>
13938
13939 <method name="getIDEEmulationPort">
13940 <desc>
13941 Gets the corresponding port number which is emulated as an IDE device.
13942 Works only with SATA controllers.
13943
13944 <result name="E_INVALIDARG">
13945 The @a devicePosition is not in the range 0 to 3.
13946 </result>
13947 <result name="E_NOTIMPL">
13948 The storage controller type is not SATAIntelAhci.
13949 </result>
13950
13951 </desc>
13952 <param name="devicePosition" type="long" dir="in"/>
13953 <param name="portNumber" type="long" dir="return"/>
13954 </method>
13955
13956 <method name="setIDEEmulationPort">
13957 <desc>
13958 Sets the port number which is emulated as an IDE device.
13959 Works only with SATA controllers.
13960
13961 <result name="E_INVALIDARG">
13962 The @a devicePosition is not in the range 0 to 3 or the
13963 @a portNumber is not in the range 0 to 29.
13964 </result>
13965 <result name="E_NOTIMPL">
13966 The storage controller type is not SATAIntelAhci.
13967 </result>
13968
13969 </desc>
13970 <param name="devicePosition" type="long" dir="in"/>
13971 <param name="portNumber" type="long" dir="in"/>
13972 </method>
13973
13974 </interface>
13975
13976<if target="wsdl">
13977
13978 <!--
13979 // IManagedObjectRef
13980 /////////////////////////////////////////////////////////////////////////
13981 -->
13982
13983 <interface
13984 name="IManagedObjectRef" extends="$unknown"
13985 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
13986 internal="yes"
13987 wsmap="managed"
13988 wscpp="hardcoded"
13989 >
13990 <desc>
13991 Managed object reference.
13992
13993 Only within the webservice, a managed object reference (which is really
13994 an opaque number) allows a webservice client to address an object
13995 that lives in the address space of the webservice server.
13996
13997 Behind each managed object reference, there is a COM object that lives
13998 in the webservice server's address space. The COM object is not freed
13999 until the managed object reference is released, either by an explicit
14000 call to <link to="IManagedObjectRef::release" /> or by logging off from
14001 the webservice (<link to="IWebsessionManager::logoff" />), which releases
14002 all objects created during the webservice session.
14003
14004 Whenever a method call of the VirtualBox API returns a COM object, the
14005 webservice representation of that method will instead return a
14006 managed object reference, which can then be used to invoke methods
14007 on that object.
14008 </desc>
14009
14010 <method name="getInterfaceName">
14011 <desc>
14012 Returns the name of the interface that this managed object represents,
14013 for example, "IMachine", as a string.
14014 </desc>
14015 <param name="return" type="wstring" dir="return"/>
14016 </method>
14017
14018 <method name="release">
14019 <desc>
14020 Releases this managed object reference and frees the resources that
14021 were allocated for it in the webservice server process. After calling
14022 this method, the identifier of the reference can no longer be used.
14023 </desc>
14024 </method>
14025
14026 </interface>
14027
14028 <!--
14029 // IWebsessionManager
14030 /////////////////////////////////////////////////////////////////////////
14031 -->
14032
14033 <interface
14034 name="IWebsessionManager" extends="$unknown"
14035 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
14036 internal="yes"
14037 wsmap="global"
14038 wscpp="hardcoded"
14039 >
14040 <desc>
14041 Websession manager. This provides essential services
14042 to webservice clients.
14043 </desc>
14044 <method name="logon">
14045 <desc>
14046 Logs a new client onto the webservice and returns a managed object reference to
14047 the IVirtualBox instance, which the client can then use as a basis to further
14048 queries, since all calls to the VirtualBox API are based on the IVirtualBox
14049 interface, in one way or the other.
14050 </desc>
14051 <param name="username" type="wstring" dir="in"/>
14052 <param name="password" type="wstring" dir="in"/>
14053 <param name="return" type="IVirtualBox" dir="return"/>
14054 </method>
14055
14056 <method name="getSessionObject">
14057 <desc>
14058 Returns a managed object reference to the internal ISession object that was created
14059 for this web service session when the client logged on.
14060
14061 <see>ISession</see>
14062 </desc>
14063 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
14064 <param name="return" type="ISession" dir="return"/>
14065 </method>
14066
14067 <method name="logoff">
14068 <desc>
14069 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
14070 and destroys all resources associated with the session (most importantly, all
14071 managed objects created in the server while the session was active).
14072 </desc>
14073 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
14074 </method>
14075
14076 </interface>
14077
14078</if>
14079
14080 <!--
14081 // IPerformanceCollector & friends
14082 /////////////////////////////////////////////////////////////////////////
14083 -->
14084
14085 <interface
14086 name="IPerformanceMetric" extends="$unknown"
14087 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
14088 >
14089 <desc>
14090 The IPerformanceMetric interface represents parameters of the given
14091 performance metric.
14092 </desc>
14093
14094 <attribute name="metricName" type="wstring" readonly="yes">
14095 <desc>
14096 Name of the metric.
14097 </desc>
14098 </attribute>
14099
14100 <attribute name="object" type="$unknown" readonly="yes">
14101 <desc>
14102 Object this metric belongs to.
14103 </desc>
14104 </attribute>
14105
14106 <attribute name="description" type="wstring" readonly="yes">
14107 <desc>
14108 Textual description of the metric.
14109 </desc>
14110 </attribute>
14111
14112 <attribute name="period" type="unsigned long" readonly="yes">
14113 <desc>
14114 Time interval between samples, measured in seconds.
14115 </desc>
14116 </attribute>
14117
14118 <attribute name="count" type="unsigned long" readonly="yes">
14119 <desc>
14120 Number of recent samples retained by the performance collector for this
14121 metric.
14122
14123 When the collected sample count exceeds this number, older samples
14124 are discarded.
14125 </desc>
14126 </attribute>
14127
14128 <attribute name="unit" type="wstring" readonly="yes">
14129 <desc>
14130 Unit of measurement.
14131 </desc>
14132 </attribute>
14133
14134 <attribute name="minimumValue" type="long" readonly="yes">
14135 <desc>
14136 Minimum possible value of this metric.
14137 </desc>
14138 </attribute>
14139
14140 <attribute name="maximumValue" type="long" readonly="yes">
14141 <desc>
14142 Maximum possible value of this metric.
14143 </desc>
14144 </attribute>
14145 </interface>
14146
14147 <interface
14148 name="IPerformanceCollector" extends="$unknown"
14149 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
14150 wsmap="managed"
14151 >
14152 <desc>
14153 The IPerformanceCollector interface represents a service that collects
14154 and stores performance metrics data.
14155
14156 Performance metrics are associated with objects of interfaces like IHost
14157 and IMachine. Each object has a distinct set of performance metrics. The
14158 set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
14159
14160 Metric data is collected at the specified intervals and is retained
14161 internally. The interval and the number of retained samples can be set
14162 with <link to="IPerformanceCollector::setupMetrics" />. Both metric data
14163 and collection settings are not persistent, they are discarded as soon as
14164 VBoxSVC process terminates. Moreover, metric settings and data associated
14165 with a particular VM only exist while VM is running. They disappear as
14166 soon as VM shuts down. It is not possible to set up metrics for machines
14167 that are powered off. One needs to start VM first, then set up metric
14168 collection parameters.
14169
14170 Metrics are organized hierarchically, with each level separated by a
14171 slash (/) character. Generally, the scheme for metric names is like this:
14172
14173 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
14174
14175 "Category/Metric" together form the base metric name. A base metric is
14176 the smallest unit for which a sampling interval and the number of
14177 retained samples can be set. Only base metrics can be enabled and
14178 disabled. All sub-metrics are collected when their base metric is
14179 collected. Collected values for any set of sub-metrics can be queried
14180 with <link to="IPerformanceCollector::queryMetricsData" />.
14181
14182 For example "CPU/Load/User:avg" metric name stands for the "CPU"
14183 category, "Load" metric, "User" submetric, "average" aggregate. An
14184 aggregate function is computed over all retained data. Valid aggregate
14185 functions are:
14186
14187 <ul>
14188 <li>avg -- average</li>
14189 <li>min -- minimum</li>
14190 <li>max -- maximum</li>
14191 </ul>
14192
14193 When setting up metric parameters, querying metric data, enabling or
14194 disabling metrics wildcards can be used in metric names to specify a
14195 subset of metrics. For example, to select all CPU-related metrics
14196 use <tt>CPU/*</tt>, all averages can be queried using <tt>*:avg</tt> and
14197 so on. To query metric values without aggregates <tt>*:</tt> can be used.
14198
14199 The valid names for base metrics are:
14200
14201 <ul>
14202 <li>CPU/Load</li>
14203 <li>CPU/MHz</li>
14204 <li>RAM/Usage</li>
14205 </ul>
14206
14207 The general sequence for collecting and retrieving the metrics is:
14208 <ul>
14209 <li>
14210 Obtain an instance of IPerformanceCollector with
14211 <link to="IVirtualBox::performanceCollector" />
14212 </li>
14213 <li>
14214 Allocate and populate an array with references to objects the metrics
14215 will be collected for. Use references to IHost and IMachine objects.
14216 </li>
14217 <li>
14218 Allocate and populate an array with base metric names the data will
14219 be collected for.
14220 </li>
14221 <li>
14222 Call <link to="IPerformanceCollector::setupMetrics" />. From now on
14223 the metric data will be collected and stored.
14224 </li>
14225 <li>
14226 Wait for the data to get collected.
14227 </li>
14228 <li>
14229 Allocate and populate an array with references to objects the metric
14230 values will be queried for. You can re-use the object array used for
14231 setting base metrics.
14232 </li>
14233 <li>
14234 Allocate and populate an array with metric names the data will be
14235 collected for. Note that metric names differ from base metric names.
14236 </li>
14237 <li>
14238 Call <link to="IPerformanceCollector::queryMetricsData" />. The data
14239 that have been collected so far are returned. Note that the values
14240 are still retained internally and data collection continues.
14241 </li>
14242 </ul>
14243
14244 For an example of usage refer to the following files in VirtualBox SDK:
14245 <ul>
14246 <li>
14247 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
14248 </li>
14249 <li>
14250 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
14251 </li>
14252 </ul>
14253 </desc>
14254
14255 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
14256 <desc>
14257 Array of unique names of metrics.
14258
14259 This array represents all metrics supported by the performance
14260 collector. Individual objects do not necessarily support all of them.
14261 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
14262 list of supported metrics for a particular object.
14263 </desc>
14264 </attribute>
14265
14266 <method name="getMetrics">
14267 <desc>
14268 Returns parameters of specified metrics for a set of objects.
14269 <note>
14270 @c Null metrics array means all metrics. @c Null object array means
14271 all existing objects.
14272 </note>
14273 </desc>
14274 <param name="metricNames" type="wstring" dir="in" safearray="yes">
14275 <desc>
14276 Metric name filter. Currently, only a comma-separated list of metrics
14277 is supported.
14278 </desc>
14279 </param>
14280 <param name="objects" type="$unknown" dir="in" safearray="yes">
14281 <desc>
14282 Set of objects to return metric parameters for.
14283 </desc>
14284 </param>
14285 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
14286 <desc>
14287 Array of returned metric parameters.
14288 </desc>
14289 </param>
14290 </method>
14291
14292 <method name="setupMetrics">
14293 <desc>
14294 Sets parameters of specified base metrics for a set of objects. Returns
14295 an array of <link to="IPerformanceMetric" /> describing the metrics
14296 have been affected.
14297 <note>
14298 @c Null or empty metric name array means all metrics. @c Null or
14299 empty object array means all existing objects. If metric name array
14300 contains a single element and object array contains many, the single
14301 metric name array element is applied to each object array element to
14302 form metric/object pairs.
14303 </note>
14304 </desc>
14305 <param name="metricNames" type="wstring" dir="in" safearray="yes">
14306 <desc>
14307 Metric name filter. Comma-separated list of metrics with wildcard
14308 support.
14309 </desc>
14310 </param>
14311 <param name="objects" type="$unknown" dir="in" safearray="yes">
14312 <desc>
14313 Set of objects to setup metric parameters for.
14314 </desc>
14315 </param>
14316 <param name="period" type="unsigned long" dir="in">
14317 <desc>
14318 Time interval in seconds between two consecutive samples of
14319 performance data.
14320 </desc>
14321 </param>
14322 <param name="count" type="unsigned long" dir="in">
14323 <desc>
14324 Number of samples to retain in performance data history. Older
14325 samples get discarded.
14326 </desc>
14327 </param>
14328 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
14329 <desc>
14330 Array of metrics that have been modified by the call to this method.
14331 </desc>
14332 </param>
14333 </method>
14334
14335 <method name="enableMetrics">
14336 <desc>
14337 Turns on collecting specified base metrics. Returns an array of
14338 <link to="IPerformanceMetric" /> describing the metrics have been
14339 affected.
14340 <note>
14341 @c Null or empty metric name array means all metrics. @c Null or
14342 empty object array means all existing objects. If metric name array
14343 contains a single element and object array contains many, the single
14344 metric name array element is applied to each object array element to
14345 form metric/object pairs.
14346 </note>
14347 </desc>
14348 <param name="metricNames" type="wstring" dir="in" safearray="yes">
14349 <desc>
14350 Metric name filter. Comma-separated list of metrics with wildcard
14351 support.
14352 </desc>
14353 </param>
14354 <param name="objects" type="$unknown" dir="in" safearray="yes">
14355 <desc>
14356 Set of objects to enable metrics for.
14357 </desc>
14358 </param>
14359 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
14360 <desc>
14361 Array of metrics that have been modified by the call to this method.
14362 </desc>
14363 </param>
14364 </method>
14365
14366 <method name="disableMetrics">
14367 <desc>
14368 Turns off collecting specified base metrics. Returns an array of
14369 <link to="IPerformanceMetric" /> describing the metrics have been
14370 affected.
14371 <note>
14372 @c Null or empty metric name array means all metrics. @c Null or
14373 empty object array means all existing objects. If metric name array
14374 contains a single element and object array contains many, the single
14375 metric name array element is applied to each object array element to
14376 form metric/object pairs.
14377 </note>
14378 </desc>
14379 <param name="metricNames" type="wstring" dir="in" safearray="yes">
14380 <desc>
14381 Metric name filter. Comma-separated list of metrics with wildcard
14382 support.
14383 </desc>
14384 </param>
14385 <param name="objects" type="$unknown" dir="in" safearray="yes">
14386 <desc>
14387 Set of objects to disable metrics for.
14388 </desc>
14389 </param>
14390 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
14391 <desc>
14392 Array of metrics that have been modified by the call to this method.
14393 </desc>
14394 </param>
14395 </method>
14396
14397 <method name="queryMetricsData">
14398 <desc>
14399 Queries collected metrics data for a set of objects.
14400
14401 The data itself and related metric information are returned in seven
14402 parallel and one flattened array of arrays. Elements of
14403 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
14404 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
14405 the same index describe one set of values corresponding to a single
14406 metric.
14407
14408 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
14409 start and length of a sub-array is indicated by
14410 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
14411 value for metric <tt>metricNames[i]</tt> is at
14412 <tt>returnData[returnIndices[i]]</tt>.
14413
14414 <note>
14415 @c Null or empty metric name array means all metrics. @c Null or
14416 empty object array means all existing objects. If metric name array
14417 contains a single element and object array contains many, the single
14418 metric name array element is applied to each object array element to
14419 form metric/object pairs.
14420 </note>
14421 <note>
14422 Data collection continues behind the scenes after call to @c
14423 queryMetricsData. The return data can be seen as the snapshot of the
14424 current state at the time of @c queryMetricsData call. The internally
14425 kept metric values are not cleared by the call. This makes possible
14426 querying different subsets of metrics or aggregates with subsequent
14427 calls. If periodic querying is needed it is highly suggested to query
14428 the values with @c interval*count period to avoid confusion. This way
14429 a completely new set of data values will be provided by each query.
14430 </note>
14431 </desc>
14432 <param name="metricNames" type="wstring" dir="in" safearray="yes">
14433 <desc>
14434 Metric name filter. Comma-separated list of metrics with wildcard
14435 support.
14436 </desc>
14437 </param>
14438 <param name="objects" type="$unknown" dir="in" safearray="yes">
14439 <desc>
14440 Set of objects to query metrics for.
14441 </desc>
14442 </param>
14443 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
14444 <desc>
14445 Names of metrics returned in @c returnData.
14446 </desc>
14447 </param>
14448 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
14449 <desc>
14450 Objects associated with metrics returned in @c returnData.
14451 </desc>
14452 </param>
14453 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
14454 <desc>
14455 Units of measurement for each returned metric.
14456 </desc>
14457 </param>
14458 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
14459 <desc>
14460 Divisor that should be applied to return values in order to get
14461 floating point values. For example:
14462 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
14463 will retrieve the floating point value of i-th sample of the first
14464 metric.
14465 </desc>
14466 </param>
14467 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
14468 <desc>
14469 Sequence numbers of the first elements of value sequences of
14470 particular metrics returned in @c returnData. For aggregate metrics
14471 it is the sequence number of the sample the aggregate started
14472 calculation from.
14473 </desc>
14474 </param>
14475 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
14476 <desc>
14477 Indices of the first elements of value sequences of particular
14478 metrics returned in @c returnData.
14479 </desc>
14480 </param>
14481 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
14482 <desc>
14483 Lengths of value sequences of particular metrics.
14484 </desc>
14485 </param>
14486 <param name="returnData" type="long" dir="return" safearray="yes">
14487 <desc>
14488 Flattened array of all metric data containing sequences of values for
14489 each metric.
14490 </desc>
14491 </param>
14492 </method>
14493
14494 </interface>
14495
14496 <enum
14497 name="NATAliasMode"
14498 uuid="67772168-50d9-11df-9669-7fb714ee4fa1"
14499 >
14500 <desc></desc>
14501 <const name="AliasLog" value="0x1">
14502 <desc></desc>
14503 </const>
14504 <const name="AliasProxyOnly" value="0x02">
14505 <desc></desc>
14506 </const>
14507 <const name="AliasUseSamePorts" value="0x04">
14508 <desc></desc>
14509 </const>
14510 </enum>
14511
14512 <enum
14513 name="NATProtocol"
14514 uuid="e90164be-eb03-11de-94af-fff9b1c1b19f"
14515 >
14516 <desc>Protocol definitions used with NAT port-forwarding rules.</desc>
14517 <const name="UDP" value="0">
14518 <desc>Port-forwarding uses UDP protocol.</desc>
14519 </const>
14520 <const name="TCP" value="1">
14521 <desc>Port-forwarding uses TCP protocol.</desc>
14522 </const>
14523 </enum>
14524
14525 <interface
14526 name="INATEngine" extends="$unknown"
14527 uuid="4b286616-eb03-11de-b0fb-1701eca42246"
14528 wsmap="managed"
14529 >
14530 <desc>Interface for managing a NAT engine which is used with a virtual machine. This
14531 allows for changing NAT behavior such as port-forwarding rules. This interface is
14532 used in the <link to="INetworkAdapter::natDriver" /> attribute.</desc>
14533 <attribute name="network" type="wstring">
14534 <desc>The network attribute of the NAT engine (the same value is used with built-in
14535 DHCP server to fill corresponding fields of DHCP leases).</desc>
14536 </attribute>
14537 <attribute name="hostIP" type="wstring">
14538 <desc>IP of host interface to bind all opened sockets to.
14539 <note>Changing this does not change binding of port forwarding.</note>
14540 </desc>
14541 </attribute>
14542 <attribute name="tftpPrefix" type="wstring">
14543 <desc>TFTP prefix attribute which is used with the built-in DHCP server to fill
14544 the corresponding fields of DHCP leases.</desc>
14545 </attribute>
14546 <attribute name="tftpBootFile" type="wstring">
14547 <desc>TFTP boot file attribute which is used with the built-in DHCP server to fill
14548 the corresponding fields of DHCP leases.</desc>
14549 </attribute>
14550 <attribute name="tftpNextServer" type="wstring">
14551 <desc>TFTP server attribute which is used with the built-in DHCP server to fill
14552 the corresponding fields of DHCP leases.
14553 <note>The preferred form is IPv4 addresses.</note>
14554 </desc>
14555 </attribute>
14556 <attribute name="aliasMode" type="unsigned long">
14557 <desc></desc>
14558 </attribute>
14559 <attribute name="dnsPassDomain" type="boolean">
14560 <desc>Whether the DHCP server should pass the DNS domain used by the host.</desc>
14561 </attribute>
14562 <attribute name="dnsProxy" type="boolean">
14563 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
14564 of the DNS proxy and process traffic using DNS servers registered on the host.</desc>
14565 </attribute>
14566 <attribute name="dnsUseHostResolver" type="boolean">
14567 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
14568 of the DNS proxy and process traffic using the host resolver mechanism.</desc>
14569 </attribute>
14570 <attribute name="redirects" type="wstring" readonly="yes" safearray="yes">
14571 <desc>Array of NAT port-forwarding rules in string representation, in the following
14572 format: "name,protocol id,host ip,host port,guest ip,guest port".</desc>
14573 </attribute>
14574 <method name="setNetworkSettings">
14575 <desc>Sets network configuration of the NAT engine.</desc>
14576 <param name="mtu" type="unsigned long" dir="in">
14577 <desc>MTU (maximum transmission unit) of the NAT engine in bytes.</desc>
14578 </param>
14579 <param name="sockSnd" type="unsigned long" dir="in">
14580 <desc>Capacity of the socket send buffer in bytes when creating a new socket.</desc>
14581 </param>
14582 <param name="sockRcv" type="unsigned long" dir="in">
14583 <desc>Capacity of the socket receive buffer in bytes when creating a new socket.</desc>
14584 </param>
14585 <param name="TcpWndSnd" type="unsigned long" dir="in">
14586 <desc>Initial size of the NAT engine's sending TCP window in bytes when
14587 establishing a new TCP connection.</desc>
14588 </param>
14589 <param name="TcpWndRcv" type="unsigned long" dir="in">
14590 <desc>Initial size of the NAT engine's receiving TCP window in bytes when
14591 establishing a new TCP connection.</desc>
14592 </param>
14593 </method>
14594 <method name="getNetworkSettings">
14595 <desc>Returns network configuration of NAT engine. See <link to="#setNetworkSettings" />
14596 for parameter descriptions.</desc>
14597 <param name="mtu" type="unsigned long" dir="out" />
14598 <param name="sockSnd" type="unsigned long" dir="out" />
14599 <param name="sockRcv" type="unsigned long" dir="out" />
14600 <param name="TcpWndSnd" type="unsigned long" dir="out" />
14601 <param name="TcpWndRcv" type="unsigned long" dir="out" />
14602 </method>
14603 <method name="addRedirect">
14604 <desc>Adds a new NAT port-forwarding rule.</desc>
14605 <param name="name" type="wstring" dir="in">
14606 <desc>The name of the rule. An empty name is acceptable, in which case the NAT engine
14607 auto-generates one using the other parameters.</desc>
14608 </param>
14609 <param name="proto" type="NATProtocol" dir="in">
14610 <desc>Protocol handled with the rule.</desc>
14611 </param>
14612 <param name="hostIp" type="wstring" dir="in">
14613 <desc>IP of the host interface to which the rule should apply. An empty ip address is
14614 acceptable, in which case the NAT engine binds the handling socket to any interface.</desc>
14615 </param>
14616 <param name="hostPort" type="unsigned short" dir="in">
14617 <desc>The port number to listen on.</desc>
14618 </param>
14619 <param name="guestIp" type="wstring" dir="in">
14620 <desc>The IP address of the guest which the NAT engine will forward matching packets
14621 to. An empty IP address is acceptable, in which case the NAT engine will forward
14622 packets to the first DHCP lease (x.x.x.15).</desc>
14623 </param>
14624 <param name="guestPort" type="unsigned short" dir="in">
14625 <desc>The port number to forward.</desc>
14626 </param>
14627 </method>
14628 <method name="removeRedirect">
14629 <desc>Removes a port-forwarding rule that was previously registered.</desc>
14630 <param name="name" type="wstring" dir="in">
14631 <desc>The name of the rule to delete.</desc>
14632 </param>
14633 </method>
14634 </interface>
14635
14636 <!--
14637 // IExtPackManager
14638 /////////////////////////////////////////////////////////////////////////
14639 -->
14640
14641 <interface
14642 name="IExtPackPlugIn" extends="$unknown"
14643 uuid="58000040-e718-4746-bbce-4b86d96da461"
14644 wsmap="suppress"
14645 >
14646 <desc>
14647 Interface for keeping information about a plug-in that ships with an
14648 extension pack.
14649 </desc>
14650 <attribute name="name" type="wstring" readonly="yes">
14651 <desc>The plug-in name.</desc>
14652 </attribute>
14653 <attribute name="description" type="wstring" readonly="yes">
14654 <desc>The plug-in description.</desc>
14655 </attribute>
14656 <attribute name="frontend" type="wstring" readonly="yes">
14657 <desc>
14658 The name of the frontend or component name this plug-in plugs into.
14659 </desc>
14660 </attribute>
14661 <attribute name="modulePath" type="wstring" readonly="yes">
14662 <desc> The module path. </desc>
14663 </attribute>
14664 </interface>
14665
14666 <interface
14667 name="IExtPackBase" extends="$unknown"
14668 uuid="5ffb0b64-0ad6-467d-af62-1157e7dc3c99"
14669 wsmap="suppress"
14670 >
14671 <desc>
14672 Interface for querying information about an extension pack as well as
14673 accessing COM objects within it.
14674 </desc>
14675 <attribute name="name" type="wstring" readonly="yes">
14676 <desc>The extension pack name. This is unique.</desc>
14677 </attribute>
14678 <attribute name="description" type="wstring" readonly="yes">
14679 <desc>The extension pack description.</desc>
14680 </attribute>
14681 <attribute name="version" type="wstring" readonly="yes">
14682 <desc>
14683 The extension pack version string. This is on the same form as
14684 other VirtualBox version strings, i.e.: "1.2.3", "1.2.3_BETA1",
14685 "1.2.3-OSE", "1.2.3r45678", "1.2.3r45678-OSE", "1.2.3_BETA1-r45678"
14686 or "1.2.3_BETA1-r45678-OSE"
14687 </desc>
14688 </attribute>
14689 <attribute name="revision" type="unsigned long" readonly="yes">
14690 <desc>The extension pack internal revision number.</desc>
14691 </attribute>
14692 <attribute name="VRDEModule" type="wstring" readonly="yes">
14693 <desc>The name of the VRDE module if the extension pack sports one.</desc>
14694 </attribute>
14695 <attribute name="plugIns" type="IExtPackPlugIn" safearray="yes" readonly="yes">
14696 <desc>Plug-ins provided by this extension pack.</desc>
14697 </attribute>
14698 <attribute name="usable" type="boolean" readonly="yes">
14699 <desc>
14700 Indicates whether the extension pack is usable or not.
14701
14702 There are a number of reasons why an extension pack might be unusable,
14703 typical examples would be broken installation/file or that it is
14704 incompatible with the current VirtualBox version.
14705 </desc>
14706 </attribute>
14707 <attribute name="whyUnusable" type="wstring" readonly="yes">
14708 <desc>
14709 String indicating why the extension pack is not usable. This is an
14710 empty string if usable and always a non-empty string if not usable.
14711 </desc>
14712 </attribute>
14713 <attribute name="showLicense" type="boolean" readonly="yes">
14714 <desc>Whether to show the license before installation</desc>
14715 </attribute>
14716 <attribute name="license" type="wstring" readonly="yes">
14717 <desc>
14718 The default HTML license text for the extension pack. Same as
14719 calling <link to="#queryLicense">queryLicense</link> with
14720 preferredLocale and preferredLanguage as empty strings and format set
14721 to html.
14722 </desc>
14723 </attribute>
14724
14725 <method name="queryLicense">
14726 <desc>
14727 Full feature version of the license attribute.
14728 </desc>
14729 <param name="preferredLocale" type="wstring" dir="in">
14730 <desc>
14731 The preferred license locale. Pass an empty string to get the default
14732 license.
14733 </desc>
14734 </param>
14735 <param name="preferredLanguage" type="wstring" dir="in">
14736 <desc>
14737 The preferred license language. Pass an empty string to get the
14738 default language for the locale.
14739 </desc>
14740 </param>
14741 <param name="format" type="wstring" dir="in">
14742 <desc>
14743 The license format: html, rtf or txt. If a license is present there
14744 will always be an HTML of it, the rich text format (RTF) and plain
14745 text (txt) versions are optional. If
14746 </desc>
14747 </param>
14748 <param name="licenseText" type="wstring" dir="return">
14749 <desc>The license text.</desc>
14750 </param>
14751 </method>
14752
14753 </interface>
14754
14755 <interface
14756 name="IExtPack" extends="IExtPackBase"
14757 uuid="431685da-3618-4ebc-b038-833ba829b4b2"
14758 wsmap="suppress"
14759 >
14760 <desc>
14761 Interface for querying information about an extension pack as well as
14762 accessing COM objects within it.
14763 </desc>
14764 <method name="queryObject">
14765 <desc>
14766 Queries the IUnknown interface to an object in the extension pack
14767 main module. This allows plug-ins and others to talk directly to an
14768 extension pack.
14769 </desc>
14770 <param name="objUuid" type="wstring" dir="in">
14771 <desc>The object ID. What exactly this is </desc>
14772 </param>
14773 <param name="returnInterface" type="$unknown" dir="return">
14774 <desc>The queried interface.</desc>
14775 </param>
14776 </method>
14777 </interface>
14778
14779 <interface
14780 name="IExtPackFile" extends="IExtPackBase"
14781 uuid="64b65bda-eedf-442c-9fd2-d179a021031a"
14782 wsmap="suppress"
14783 >
14784 <desc>
14785 Extension pack file (aka tarball, .vbox-extpack) representation returned
14786 by IExtPackManager::openExtPackFile. This provides the base extension
14787 pack information with the addition of the file name. It also provides an
14788 alternative to IExtPackManager::install.
14789 </desc>
14790 <attribute name="filePath" type="wstring" readonly="yes">
14791 <desc>
14792 The path to the extension pack file.
14793 </desc>
14794 </attribute>
14795
14796 <method name="install">
14797 <desc>
14798 Install the extension pack.
14799 </desc>
14800 <param name="replace" type="boolean" dir="in">
14801 <desc>
14802 Set this to automatically uninstall any existing extension pack with
14803 the same name as the one being installed.
14804 </desc>
14805 </param>
14806 </method>
14807 </interface>
14808
14809 <interface
14810 name="IExtPackManager" extends="$unknown"
14811 uuid="70d808a9-176f-4d45-adad-7c509b8309b3"
14812 wsmap="suppress"
14813 >
14814 <desc>
14815 Interface for managing VirtualBox Extension Packs.
14816
14817 TODO: Describe extension packs, how they are managed and how to create
14818 one.
14819 </desc>
14820
14821 <attribute name="installedExtPacks" type="IExtPack" safearray="yes" readonly="yes">
14822 <desc>
14823 List of the installed extension packs.
14824 </desc>
14825 </attribute>
14826
14827 <method name="find">
14828 <desc>
14829 Returns the extension pack with the specified name if found.
14830
14831 <result name="VBOX_E_OBJECT_NOT_FOUND">
14832 No extension pack matching @a name was found.
14833 </result>
14834 </desc>
14835 <param name="name" type="wstring" dir="in">
14836 <desc>The name of the extension pack to locate.</desc>
14837 </param>
14838 <param name="returnData" type="IExtPack" dir="return">
14839 <desc>The extension pack if found.</desc>
14840 </param>
14841 </method>
14842
14843 <method name="openExtPackFile">
14844 <desc>
14845 Attempts to open an extension pack file in preparation for
14846 installation.
14847 </desc>
14848 <param name="path" type="wstring" dir="in">
14849 <desc>The path of the extension pack tarball.</desc>
14850 </param>
14851 <param name="file" type="IExtPackFile" dir="return">
14852 <desc>The interface of the extension pack file object.</desc>
14853 </param>
14854 </method>
14855
14856 <method name="uninstall">
14857 <desc>Uninstalls an extension pack, removing all related files.</desc>
14858 <param name="name" type="wstring" dir="in">
14859 <desc>The name of the extension pack to uninstall.</desc>
14860 </param>
14861 <param name="forcedRemoval" type="boolean" dir="in">
14862 <desc>
14863 Forced removal of the extension pack. This means that the uninstall
14864 hook will not be called.
14865 </desc>
14866 </param>
14867 </method>
14868
14869 <method name="cleanup">
14870 <desc>Cleans up failed installs and uninstalls</desc>
14871 </method>
14872
14873 <method name="QueryAllPlugInsForFrontend">
14874 <desc>
14875 Gets the path to all the plug-in modules for a given frontend.
14876
14877 This is a convenience method that is intended to simplify the plug-in
14878 loading process for a frontend.
14879 </desc>
14880 <param name="frontendName" type="wstring" dir="in">
14881 <desc>The name of the frontend or component.</desc>
14882 </param>
14883 <param name="plugInModules" type="wstring" dir="return" safearray="yes">
14884 <desc>Array containing the plug-in modules (full paths).</desc>
14885 </param>
14886 </method>
14887
14888 <method name="IsExtPackUsable">
14889 <desc>Check if the given extension pack is loaded and usable.</desc>
14890 <param name="name" type="wstring" dir="in">
14891 <desc>The name of the extension pack to check for.</desc>
14892 </param>
14893 <param name="usable" type="boolean" dir="return"/>
14894 </method>
14895
14896 </interface>
14897
14898 <!--
14899 // BandwidthGroupType
14900 /////////////////////////////////////////////////////////////////////////
14901 -->
14902 <enum
14903 name="BandwidthGroupType"
14904 uuid="1d92b67d-dc69-4be9-ad4c-93a01e1e0c8e">
14905
14906 <desc>
14907 Type of a bandwidth control group.
14908 </desc>
14909
14910 <const name="Null" value="0">
14911 <desc>
14912 Null type, must be first.
14913 </desc>
14914 </const>
14915
14916 <const name="Disk" value="1">
14917 <desc>
14918 The bandwidth group controls disk I/O.
14919 </desc>
14920 </const>
14921
14922 <const name="Network" value="2">
14923 <desc>
14924 The bandwidth group controls network I/O.
14925 </desc>
14926 </const>
14927
14928 </enum>
14929
14930 <!--
14931 // IBandwidthGroup
14932 /////////////////////////////////////////////////////////////////////////
14933 -->
14934 <interface
14935 name="IBandwidthGroup" extends="$unknown"
14936 uuid="badea2d7-0261-4146-89f0-6a57cc34833d"
14937 wsmap="managed"
14938 >
14939 <desc>Represents one bandwidth group.</desc>
14940
14941 <attribute name="name" type="wstring" readonly="yes">
14942 <desc>Name of the group.</desc>
14943 </attribute>
14944
14945 <attribute name="type" type="BandwidthGroupType" readonly="yes">
14946 <desc>Type of the group.</desc>
14947 </attribute>
14948
14949 <attribute name="reference" type="unsigned long" readonly="yes">
14950 <desc>How many devices/medium attachements use this group.</desc>
14951 </attribute>
14952
14953 <attribute name="maxMbPerSec" type="unsigned long">
14954 <desc>The maximum number of MB which can be transfered by all
14955 entities attached to this group during one second.</desc>
14956 </attribute>
14957
14958 </interface>
14959
14960 <!--
14961 // IBandwidthControl
14962 /////////////////////////////////////////////////////////////////////////
14963 -->
14964 <interface
14965 name="IBandwidthControl" extends="$unknown"
14966 uuid="d0a24db0-f756-11df-98cf-0800200c9a66"
14967 wsmap="managed"
14968 >
14969 <desc>
14970 Controls the bandwidth groups of one machine used to cap I/O done by a VM.
14971 This includes network and disk I/O.
14972 </desc>
14973
14974 <attribute name="numGroups" type="unsigned long" readonly="yes">
14975 <desc>
14976 The current number of existing bandwidth groups managed.
14977 </desc>
14978 </attribute>
14979
14980 <method name="CreateBandwidthGroup">
14981 <desc>
14982 Creates a new bandwidth group.
14983 </desc>
14984
14985 <param name="name" type="wstring" dir="in">
14986 <desc>Name of the bandwidth group.</desc>
14987 </param>
14988 <param name="type" type="BandwidthGroupType" dir="in">
14989 <desc>The type of the bandwidth group (network or disk).</desc>
14990 </param>
14991 <param name="maxBytesPerSec" type="unsigned long" dir="in">
14992 <desc>The maximum number of bytes which can be transfered by all
14993 entities attached to this group during one second.</desc>
14994 </param>
14995 </method>
14996
14997 <method name="DeleteBandwidthGroup">
14998 <desc>
14999 Deletes a new bandwidth group.
15000 </desc>
15001
15002 <param name="name" type="wstring" dir="in">
15003 <desc>Name of the bandwidth group to delete.</desc>
15004 </param>
15005 </method>
15006
15007 <method name="GetBandwidthGroup" const="yes">
15008 <desc>
15009 Get a bandwidth group by name.
15010 </desc>
15011
15012 <param name="name" type="wstring" dir="in">
15013 <desc>Name of the bandwidth group to get.</desc>
15014 </param>
15015 <param name="bandwidthGroup" type="IBandwidthGroup" dir="return">
15016 <desc>Where to store the bandwidth group on success.</desc>
15017 </param>
15018 </method>
15019
15020 <method name="GetAllBandwidthGroups" const="yes">
15021 <desc>
15022 Get all managed bandwidth groups.
15023 </desc>
15024
15025 <param name="bandwidthGroups" type="IBandwidthGroup" dir="return" safearray="yes">
15026 <desc>The array of managed bandwidth groups.</desc>
15027 </param>
15028 </method>
15029 </interface>
15030
15031 <!--
15032 // IVirtualBoxClient
15033 /////////////////////////////////////////////////////////////////////////
15034 -->
15035
15036 <interface
15037 name="IVirtualBoxClient" extends="$unknown"
15038 uuid="5fe0bd48-1181-40d1-991f-3b02f269a823"
15039 wsmap="suppress"
15040 >
15041 <desc>
15042 Convenience interface for client applications. Treat this as a
15043 singleton, i.e. never create more than one instance of this interface.
15044
15045 At the moment only available for clients of the local API (not usable
15046 via the webservice). Once the session logic is redesigned this might
15047 change.
15048 </desc>
15049
15050 <attribute name="virtualBox" type="IVirtualBox" readonly="yes">
15051 <desc>
15052 Reference to the server-side API root object.
15053 </desc>
15054 </attribute>
15055
15056 <attribute name="session" type="ISession" readonly="yes">
15057 <desc>
15058 Create a new session object and return the reference to it.
15059 </desc>
15060 </attribute>
15061
15062 <attribute name="eventSource" type="IEventSource" readonly="yes">
15063 <desc>
15064 Event source for VirtualBoxClient events.
15065 </desc>
15066 </attribute>
15067
15068 </interface>
15069
15070 <!--
15071 // Events
15072 /////////////////////////////////////////////////////////////////////////
15073 -->
15074 <enum
15075 name="VBoxEventType"
15076 uuid="e71c487f-755e-46e9-a476-dd6a5d134597"
15077 >
15078
15079 <desc>
15080 Type of an event.
15081 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
15082 </desc>
15083
15084 <const name="Invalid" value="0">
15085 <desc>
15086 Invalid event, must be first.
15087 </desc>
15088 </const>
15089
15090 <const name="Any" value="1">
15091 <desc>
15092 Wildcard for all events.
15093 Events of this type are never delivered, and only used in
15094 registerListener() call to simplify registration.
15095 </desc>
15096 </const>
15097
15098 <const name="Vetoable" value="2">
15099 <desc>
15100 Wildcard for all vetoable events. Events of this type are never delivered, and only
15101 used in registerListener() call to simplify registration.
15102 </desc>
15103 </const>
15104
15105 <const name="MachineEvent" value="3">
15106 <desc>
15107 Wildcard for all machine events. Events of this type are never delivered, and only used in
15108 registerListener() call to simplify registration.
15109 </desc>
15110 </const>
15111
15112 <const name="SnapshotEvent" value="4">
15113 <desc>
15114 Wildcard for all snapshot events. Events of this type are never delivered, and only used in
15115 registerListener() call to simplify registration.
15116 </desc>
15117 </const>
15118
15119 <const name="InputEvent" value="5">
15120 <desc>
15121 Wildcard for all input device (keyboard, mouse) events.
15122 Events of this type are never delivered, and only used in
15123 registerListener() call to simplify registration.
15124 </desc>
15125 </const>
15126
15127 <const name="LastWildcard" value="31">
15128 <desc>
15129 Last wildcard.
15130 </desc>
15131 </const>
15132
15133 <const name="OnMachineStateChanged" value="32">
15134 <desc>
15135 See <link to="IMachineStateChangedEvent">IMachineStateChangedEvent</link>.
15136 </desc>
15137 </const>
15138 <const name="OnMachineDataChanged" value="33">
15139 <desc>
15140 See <link to="IMachineDataChangedEvent">IMachineDataChangedEvent</link>.
15141 </desc>
15142 </const>
15143 <const name="OnExtraDataChanged" value="34">
15144 <desc>
15145 See <link to="IExtraDataChangedEvent">IExtraDataChangedEvent</link>.
15146 </desc>
15147 </const>
15148 <const name="OnExtraDataCanChange" value="35">
15149 <desc>
15150 See <link to="IExtraDataCanChangeEvent">IExtraDataCanChangeEvent</link>.
15151 </desc>
15152 </const>
15153 <const name="OnMediumRegistered" value="36">
15154 <desc>
15155 See <link to="IMediumRegisteredEvent">IMediumRegisteredEvent</link>.
15156 </desc>
15157 </const>
15158 <const name="OnMachineRegistered" value="37">
15159 <desc>
15160 See <link to="IMachineRegisteredEvent">IMachineRegisteredEvent</link>.
15161 </desc>
15162 </const>
15163 <const name="OnSessionStateChanged" value="38">
15164 <desc>
15165 See <link to="ISessionStateChangedEvent">ISessionStateChangedEvent</link>.
15166 </desc>
15167 </const>
15168 <const name="OnSnapshotTaken" value="39">
15169 <desc>
15170 See <link to="ISnapshotTakenEvent">ISnapshotTakenEvent</link>.
15171 </desc>
15172 </const>
15173 <const name="OnSnapshotDeleted" value="40">
15174 <desc>
15175 See <link to="ISnapshotDeletedEvent">ISnapshotDeletedEvent</link>.
15176 </desc>
15177 </const>
15178 <const name="OnSnapshotChanged" value="41">
15179 <desc>
15180 See <link to="ISnapshotChangedEvent">ISnapshotChangedEvent</link>.
15181 </desc>
15182 </const>
15183 <const name="OnGuestPropertyChanged" value="42">
15184 <desc>
15185 See <link to="IGuestPropertyChangedEvent">IGuestPropertyChangedEvent</link>.
15186 </desc>
15187 </const>
15188 <!-- Console events -->
15189 <const name="OnMousePointerShapeChanged" value="43">
15190 <desc>
15191 See <link to="IMousePointerShapeChangedEvent">IMousePointerShapeChangedEvent</link>.
15192 </desc>
15193 </const>
15194 <const name="OnMouseCapabilityChanged" value="44">
15195 <desc>
15196 See <link to="IMouseCapabilityChangedEvent">IMouseCapabilityChangedEvent</link>.
15197 </desc>
15198 </const>
15199 <const name="OnKeyboardLedsChanged" value="45">
15200 <desc>
15201 See <link to="IKeyboardLedsChangedEvent">IKeyboardLedsChangedEvent</link>.
15202 </desc>
15203 </const>
15204 <const name="OnStateChanged" value="46">
15205 <desc>
15206 See <link to="IStateChangedEvent">IStateChangedEvent</link>.
15207 </desc>
15208 </const>
15209 <const name="OnAdditionsStateChanged" value="47">
15210 <desc>
15211 See <link to="IAdditionsStateChangedEvent">IAdditionsStateChangedEvent</link>.
15212 </desc>
15213 </const>
15214 <const name="OnNetworkAdapterChanged" value="48">
15215 <desc>
15216 See <link to="INetworkAdapterChangedEvent">INetworkAdapterChangedEvent</link>.
15217 </desc>
15218 </const>
15219 <const name="OnSerialPortChanged" value="49">
15220 <desc>
15221 See <link to="ISerialPortChangedEvent">ISerialPortChangedEvent</link>.
15222 </desc>
15223 </const>
15224 <const name="OnParallelPortChanged" value="50">
15225 <desc>
15226 See <link to="IParallelPortChangedEvent">IParallelPortChangedEvent</link>.
15227 </desc>
15228 </const>
15229 <const name="OnStorageControllerChanged" value="51">
15230 <desc>
15231 See <link to="IStorageControllerChangedEvent">IStorageControllerChangedEvent</link>.
15232 </desc>
15233 </const>
15234 <const name="OnMediumChanged" value="52">
15235 <desc>
15236 See <link to="IMediumChangedEvent">IMediumChangedEvent</link>.
15237 </desc>
15238 </const>
15239 <const name="OnVRDEServerChanged" value="53">
15240 <desc>
15241 See <link to="IVRDEServerChangedEvent">IVRDEServerChangedEvent</link>.
15242 </desc>
15243 </const>
15244 <const name="OnUSBControllerChanged" value="54">
15245 <desc>
15246 See <link to="IUSBControllerChangedEvent">IUSBControllerChangedEvent</link>.
15247 </desc>
15248 </const>
15249 <const name="OnUSBDeviceStateChanged" value="55">
15250 <desc>
15251 See <link to="IUSBDeviceStateChangedEvent">IUSBDeviceStateChangedEvent</link>.
15252 </desc>
15253 </const>
15254 <const name="OnSharedFolderChanged" value="56">
15255 <desc>
15256 See <link to="ISharedFolderChangedEvent">ISharedFolderChangedEvent</link>.
15257 </desc>
15258 </const>
15259 <const name="OnRuntimeError" value="57">
15260 <desc>
15261 See <link to="IRuntimeErrorEvent">IRuntimeErrorEvent</link>.
15262 </desc>
15263 </const>
15264 <const name="OnCanShowWindow" value="58">
15265 <desc>
15266 See <link to="ICanShowWindowEvent">ICanShowWindowEvent</link>.
15267 </desc>
15268 </const>
15269 <const name="OnShowWindow" value="59">
15270 <desc>
15271 See <link to="IShowWindowEvent">IShowWindowEvent</link>.
15272 </desc>
15273 </const>
15274 <const name="OnCPUChanged" value="60">
15275 <desc>
15276 See <link to="ICPUChangedEvent">ICPUChangedEvent</link>.
15277 </desc>
15278 </const>
15279 <const name="OnVRDEServerInfoChanged" value="61">
15280 <desc>
15281 See <link to="IVRDEServerInfoChangedEvent">IVRDEServerInfoChangedEvent</link>.
15282 </desc>
15283 </const>
15284 <const name="OnEventSourceChanged" value="62">
15285 <desc>
15286 See <link to="IEventSourceChangedEvent">IEventSourceChangedEvent</link>.
15287 </desc>
15288 </const>
15289 <const name="OnCPUExecutionCapChanged" value="63">
15290 <desc>
15291 See <link to="ICPUExecutionCapChangedEvent">ICPUExecutionCapChangedEvent</link>.
15292 </desc>
15293 </const>
15294 <const name="OnGuestKeyboard" value="64">
15295 <desc>
15296 See <link to="IGuestKeyboardEvent">IGuestKeyboardEvent</link>.
15297 </desc>
15298 </const>
15299 <const name="OnGuestMouse" value="65">
15300 <desc>
15301 See <link to="IGuestMouseEvent">IGuestMouseEvent</link>.
15302 </desc>
15303 </const>
15304 <const name="OnNATRedirect" value="66">
15305 <desc>
15306 See <link to="INATRedirectEvent">INATRedirectEvent</link>.
15307 </desc>
15308 </const>
15309 <const name="OnHostPciDevicePlug" value="67">
15310 <desc>
15311 See <link to="IHostPciDevicePlugEvent">IHostPciDevicePlugEvent</link>.
15312 </desc>
15313 </const>
15314 <const name="OnVBoxSVCAvailabilityChanged" value="68">
15315 <desc>
15316 See <link to="IVBoxSVCAvailabilityChangedEvent">IVBoxSVCAvailablityChangedEvent</link>.
15317 </desc>
15318 </const>
15319 <const name="OnBandwidthGroupChanged" value="69">
15320 <desc>
15321 See <link to="IBandwidthGroupChangedEvent">IBandwidthGroupChangedEvent</link>.
15322 </desc>
15323 </const>
15324 <const name="OnGuestMonitorChanged" value="70">
15325 <desc>
15326 See <link to="IGuestMonitorChangedEvent">IGuestMonitorChangedEvent</link>.
15327 </desc>
15328 </const>
15329
15330 <!-- Last event marker -->
15331 <const name="Last" value="71">
15332 <desc>
15333 Must be last event, used for iterations and structures relying on numerical event values.
15334 </desc>
15335 </const>
15336
15337 </enum>
15338
15339 <interface
15340 name="IEventSource" extends="$unknown"
15341 uuid="9b6e1aee-35f3-4f4d-b5bb-ed0ecefd8538"
15342 wsmap="managed"
15343 >
15344 <desc>
15345 Event source. Generally, any object which could generate events can be an event source,
15346 or aggregate one. To simplify using one-way protocols such as webservices running on top of HTTP(S),
15347 an event source can work with listeners in either active or passive mode. In active mode it is up to
15348 the IEventSource implementation to call <link to="IEventListener::handleEvent" />, in passive mode the
15349 event source keeps track of pending events for each listener and returns available events on demand.
15350
15351 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
15352 </desc>
15353
15354 <method name="createListener">
15355 <desc>
15356 Creates a new listener object, useful for passive mode.
15357 </desc>
15358 <param name="listener" type="IEventListener" dir="return"/>
15359 </method>
15360
15361 <method name="createAggregator">
15362 <desc>
15363 Creates an aggregator event source, collecting events from multiple sources.
15364 This way a single listener can listen for events coming from multiple sources,
15365 using a single blocking getEvent() on the returned aggregator.
15366 </desc>
15367 <param name="subordinates" type="IEventSource" dir="in" safearray="yes">
15368 <desc>
15369 Subordinate event source this one aggregatres.
15370 </desc>
15371 </param>
15372 <param name="result" type="IEventSource" dir="return"/>
15373 </method>
15374
15375 <method name="registerListener">
15376 <desc>
15377 Register an event listener.
15378
15379 <note>
15380 To avoid system overload, the VirtualBox server process checks if passive event
15381 listeners call <link to="IEventSource::getEvent"/> frequently enough. In the
15382 current implementation, if more than 500 pending events are detected for a passive
15383 event listener, it is forcefully unregistered by the system, and further
15384 <link to="#getEvent" /> calls will return @c VBOX_E_OBJECT_NOT_FOUND.
15385 </note>
15386 </desc>
15387 <param name="listener" type="IEventListener" dir="in">
15388 <desc>Listener to register.</desc>
15389 </param>
15390 <param name="interesting" type="VBoxEventType" dir="in" safearray="yes">
15391 <desc>
15392 Event types listener is interested in. One can use wildcards like -
15393 <link to="VBoxEventType_Any"/> to specify wildcards, matching more
15394 than one event.
15395 </desc>
15396 </param>
15397 <param name="active" type="boolean" dir="in">
15398 <desc>
15399 Which mode this listener is operating in.
15400 In active mode, <link to="IEventListener::handleEvent" /> is called directly.
15401 In passive mode, an internal event queue is created for this this IEventListener.
15402 For each event coming in, it is added to queues for all interested registered passive
15403 listeners. It is then up to the external code to call the listener's
15404 <link to="IEventListener::handleEvent" /> method. When done with an event, the
15405 external code must call <link to="#eventProcessed" />.
15406 </desc>
15407 </param>
15408 </method>
15409
15410 <method name="unregisterListener">
15411 <desc>
15412 Unregister an event listener. If listener is passive, and some waitable events are still
15413 in queue they are marked as processed automatically.
15414 </desc>
15415 <param name="listener" type="IEventListener" dir="in">
15416 <desc>Listener to unregister.</desc>
15417 </param>
15418 </method>
15419
15420 <method name="fireEvent">
15421 <desc>
15422 Fire an event for this source.
15423 </desc>
15424 <param name="event" type="IEvent" dir="in">
15425 <desc>Event to deliver.</desc>
15426 </param>
15427 <param name="timeout" type="long" dir="in">
15428 <desc>
15429 Maximum time to wait for event processing (if event is waitable), in ms;
15430 0 = no wait, -1 = indefinite wait.
15431 </desc>
15432 </param>
15433 <param name="result" type="boolean" dir="return">
15434 <desc>true if an event was delivered to all targets, or is non-waitable.</desc>
15435 </param>
15436 </method>
15437
15438 <method name="getEvent">
15439 <desc>
15440 Get events from this peer's event queue (for passive mode). Calling this method
15441 regularly is required for passive event listeners to avoid system overload;
15442 see <link to="IEventSource::registerListener" /> for details.
15443
15444 <result name="VBOX_E_OBJECT_NOT_FOUND">
15445 Listener is not registered, or autounregistered.
15446 </result>
15447 </desc>
15448 <param name="listener" type="IEventListener" dir="in">
15449 <desc>Which listener to get data for.</desc>
15450 </param>
15451 <param name="timeout" type="long" dir="in">
15452 <desc>
15453 Maximum time to wait for events, in ms;
15454 0 = no wait, -1 = indefinite wait.
15455 </desc>
15456 </param>
15457 <param name="event" type="IEvent" dir="return">
15458 <desc>Event retrieved, or null if none available.</desc>
15459 </param>
15460 </method>
15461
15462 <method name="eventProcessed">
15463 <desc>
15464 Must be called for waitable events after a particular listener finished its
15465 event processing. When all listeners of a particular event have called this
15466 method, the system will then call <link to="IEvent::setProcessed" />.
15467 </desc>
15468 <param name="listener" type="IEventListener" dir="in">
15469 <desc>Which listener processed event.</desc>
15470 </param>
15471 <param name="event" type="IEvent" dir="in">
15472 <desc>Which event.</desc>
15473 </param>
15474 </method>
15475
15476 </interface>
15477
15478 <interface
15479 name="IEventListener" extends="$unknown"
15480 uuid="67099191-32e7-4f6c-85ee-422304c71b90"
15481 wsmap="managed"
15482 >
15483 <desc>
15484 Event listener. An event listener can work in either active or passive mode, depending on the way
15485 it was registered.
15486 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
15487 </desc>
15488
15489 <method name="handleEvent">
15490 <desc>
15491 Handle event callback for active listeners. It is not called for passive listeners. After
15492 calling handleEvent() on all active listeners and having received acknowledgement from all
15493 passive listeners via IEventSource::eventProcessed(), the event is marked as processed and
15494 IEvent::waitProcessed() will return immediately.
15495 </desc>
15496 <param name="event" type="IEvent" dir="in">
15497 <desc>Event available.</desc>
15498 </param>
15499 </method>
15500
15501 </interface>
15502
15503 <interface
15504 name="IEvent" extends="$unknown"
15505 uuid="0ca2adba-8f30-401b-a8cd-fe31dbe839c0"
15506 wsmap="managed"
15507 >
15508 <desc>
15509 Abstract parent interface for VirtualBox events. Actual events will typically implement
15510 a more specific interface which derives from this (see below).
15511
15512 <b>Introduction to VirtualBox events</b>
15513
15514 Generally speaking, an event (represented by this interface) signals that something
15515 happened, while an event listener (see <link to="IEventListener" />) represents an
15516 entity that is interested in certain events. In order for this to work with
15517 unidirectional protocols (i.e. web services), the concepts of passive and active
15518 listener are used.
15519
15520 Event consumers can register themselves as listeners, providing an array of
15521 events they are interested in (see <link to="IEventSource::registerListener" />).
15522 When an event triggers, the listener is notified about the event. The exact
15523 mechanism of the notification depends on whether the listener was registered as
15524 an active or passive listener:
15525
15526 <ul>
15527 <li>An active listener is very similar to a callback: it is a function invoked
15528 by the API. As opposed to the callbacks that were used in the API before
15529 VirtualBox 4.0 however, events are now objects with an interface hierarchy.
15530 </li>
15531
15532 <li>Passive listeners are somewhat trickier to implement, but do not require
15533 a client function to be callable, which is not an option with scripting
15534 languages or web service clients. Internally the <link to="IEventSource" />
15535 implementation maintains an event queue for each passive listener, and
15536 newly arrived events are put in this queue. When the listener calls
15537 <link to="IEventSource::getEvent"/>, first element from its internal event
15538 queue is returned. When the client completes processing of an event,
15539 the <link to="IEventSource::eventProcessed" /> function must be called,
15540 acknowledging that the event was processed. It supports implementing
15541 waitable events. On passive listener unregistration, all events from its
15542 queue are auto-acknowledged.
15543 </li>
15544 </ul>
15545
15546 Waitable events are useful in situations where the event generator wants to track
15547 delivery or a party wants to wait until all listeners have completed the event. A
15548 typical example would be a vetoable event (see <link to="IVetoEvent" />) where a
15549 listeners might veto a certain action, and thus the event producer has to make
15550 sure that all listeners have processed the event and not vetoed before taking
15551 the action.
15552
15553 A given event may have both passive and active listeners at the same time.
15554
15555 <b>Using events</b>
15556
15557 Any VirtualBox object capable of producing externally visible events provides an
15558 @c eventSource read-only attribute, which is of the type <link to="IEventSource" />.
15559 This event source object is notified by VirtualBox once something has happened, so
15560 consumers may register event listeners with this event source. To register a listener,
15561 an object implementing the <link to="IEventListener" /> interface must be provided.
15562 For active listeners, such an object is typically created by the consumer, while for
15563 passive listeners <link to="IEventSource::createListener" /> should be used. Please
15564 note that a listener created with @c createListener() must not be used as an active listener.
15565
15566 Once created, the listener must be registered to listen for the desired events
15567 (see <link to="IEventSource::registerListener" />), providing an array of
15568 <link to="VBoxEventType" /> enums. Those elements can either be the individual
15569 event IDs or wildcards matching multiple event IDs.
15570
15571 After registration, the callback's <link to="IEventListener::handleEvent" /> method is
15572 called automatically when the event is triggered, while passive listeners have to call
15573 <link to="IEventSource::getEvent" /> and <link to="IEventSource::eventProcessed" /> in
15574 an event processing loop.
15575
15576 The IEvent interface is an abstract parent interface for all such VirtualBox events
15577 coming in. As a result, the standard use pattern inside <link to="IEventListener::handleEvent" />
15578 or the event processing loop is to check the <link to="#type" /> attribute of the event and
15579 then cast to the appropriate specific interface using @c QueryInterface().
15580 </desc>
15581
15582 <attribute name="type" readonly="yes" type="VBoxEventType">
15583 <desc>
15584 Event type.
15585 </desc>
15586 </attribute>
15587
15588 <attribute name="source" readonly="yes" type="IEventSource">
15589 <desc>
15590 Source of this event.
15591 </desc>
15592 </attribute>
15593
15594 <attribute name="waitable" readonly="yes" type="boolean">
15595 <desc>
15596 If we can wait for this event being processed. If false, waitProcessed() returns immediately,
15597 and setProcessed() doesn't make sense. Non-waitable events are generally better performing,
15598 as no additional overhead associated with waitability imposed.
15599 Waitable events are needed when one need to be able to wait for particular event processed,
15600 for example for vetoable changes, or if event refers to some resource which need to be kept immutable
15601 until all consumers confirmed events.
15602 </desc>
15603 </attribute>
15604
15605 <method name="setProcessed">
15606 <desc>
15607 Internal method called by the system when all listeners of a particular event have called
15608 <link to="IEventSource::eventProcessed" />. This should not be called by client code.
15609 </desc>
15610 </method>
15611
15612 <method name="waitProcessed">
15613 <desc>
15614 Wait until time outs, or this event is processed. Event must be waitable for this operation to have
15615 described semantics, for non-waitable returns true immediately.
15616 </desc>
15617 <param name="timeout" type="long" dir="in">
15618 <desc>
15619 Maximum time to wait for event processeing, in ms;
15620 0 = no wait, -1 = indefinite wait.
15621 </desc>
15622 </param>
15623 <param name="result" type="boolean" dir="return">
15624 <desc>If this event was processed before timeout.</desc>
15625 </param>
15626 </method>
15627 </interface>
15628
15629
15630 <interface
15631 name="IReusableEvent" extends="IEvent"
15632 uuid="69bfb134-80f6-4266-8e20-16371f68fa25"
15633 wsmap="managed"
15634 >
15635 <desc>Base abstract interface for all reusable events.</desc>
15636
15637 <attribute name="generation" readonly="yes" type="unsigned long">
15638 <desc>Current generation of event, incremented on reuse.</desc>
15639 </attribute>
15640
15641 <method name="reuse">
15642 <desc>
15643 Marks an event as reused, increments 'generation', fields shall no
15644 longer be considered valid.
15645 </desc>
15646 </method>
15647 </interface>
15648
15649 <interface
15650 name="IMachineEvent" extends="IEvent"
15651 uuid="92ed7b1a-0d96-40ed-ae46-a564d484325e"
15652 wsmap="managed" id="MachineEvent"
15653 >
15654 <desc>Base abstract interface for all machine events.</desc>
15655
15656 <attribute name="machineId" readonly="yes" type="uuid" mod="string">
15657 <desc>ID of the machine this event relates to.</desc>
15658 </attribute>
15659
15660 </interface>
15661
15662 <interface
15663 name="IMachineStateChangedEvent" extends="IMachineEvent"
15664 uuid="5748F794-48DF-438D-85EB-98FFD70D18C9"
15665 wsmap="managed" autogen="VBoxEvent" id="OnMachineStateChanged"
15666 >
15667 <desc>Machine state change event.</desc>
15668
15669 <attribute name="state" readonly="yes" type="MachineState">
15670 <desc>New execution state.</desc>
15671 </attribute>
15672 </interface>
15673
15674 <interface
15675 name="IMachineDataChangedEvent" extends="IMachineEvent"
15676 uuid="6AA70A6C-0DCA-4810-8C5C-457B278E3D49"
15677 wsmap="managed" autogen="VBoxEvent" id="OnMachineDataChanged"
15678 >
15679 <desc>
15680 Any of the settings of the given machine has changed.
15681 </desc>
15682 </interface>
15683
15684 <interface
15685 name="IMediumRegisteredEvent" extends="IEvent"
15686 uuid="53fac49a-b7f1-4a5a-a4ef-a11dd9c2a458"
15687 wsmap="managed" autogen="VBoxEvent" id="OnMediumRegistered"
15688 >
15689 <desc>
15690 The given medium was registered or unregistered
15691 within this VirtualBox installation.
15692 </desc>
15693
15694 <attribute name="mediumId" readonly="yes" type="uuid" mod="string">
15695 <desc>ID of the medium this event relates to.</desc>
15696 </attribute>
15697
15698 <attribute name="mediumType" readonly="yes" type="DeviceType">
15699 <desc>Type of the medium this event relates to.</desc>
15700 </attribute>
15701
15702 <attribute name="registered" type="boolean" readonly="yes">
15703 <desc>
15704 If @c true, the medium was registered, otherwise it was
15705 unregistered.
15706 </desc>
15707 </attribute>
15708 </interface>
15709
15710 <interface
15711 name="IMachineRegisteredEvent" extends="IMachineEvent"
15712 uuid="c354a762-3ff2-4f2e-8f09-07382ee25088"
15713 wsmap="managed" autogen="VBoxEvent" id="OnMachineRegistered"
15714 >
15715 <desc>
15716 The given machine was registered or unregistered
15717 within this VirtualBox installation.
15718 </desc>
15719
15720 <attribute name="registered" type="boolean" readonly="yes">
15721 <desc>
15722 If @c true, the machine was registered, otherwise it was
15723 unregistered.
15724 </desc>
15725 </attribute>
15726 </interface>
15727
15728 <interface
15729 name="ISessionStateChangedEvent" extends="IMachineEvent"
15730 uuid="714a3eef-799a-4489-86cd-fe8e45b2ff8e"
15731 wsmap="managed" autogen="VBoxEvent" id="OnSessionStateChanged"
15732 >
15733 <desc>
15734 The state of the session for the given machine was changed.
15735 <see>IMachine::sessionState</see>
15736 </desc>
15737
15738 <attribute name="state" type="SessionState" readonly="yes">
15739 <desc>
15740 New session state.
15741 </desc>
15742 </attribute>
15743 </interface>
15744
15745 <interface
15746 name="IGuestPropertyChangedEvent" extends="IMachineEvent"
15747 uuid="3f63597a-26f1-4edb-8dd2-6bddd0912368"
15748 wsmap="managed" autogen="VBoxEvent" id="OnGuestPropertyChanged"
15749 >
15750 <desc>
15751 Notification when a guest property has changed.
15752 </desc>
15753
15754 <attribute name="name" readonly="yes" type="wstring">
15755 <desc>
15756 The name of the property that has changed.
15757 </desc>
15758 </attribute>
15759
15760 <attribute name="value" readonly="yes" type="wstring">
15761 <desc>
15762 The new property value.
15763 </desc>
15764 </attribute>
15765
15766 <attribute name="flags" readonly="yes" type="wstring">
15767 <desc>
15768 The new property flags.
15769 </desc>
15770 </attribute>
15771
15772 </interface>
15773
15774 <interface
15775 name="ISnapshotEvent" extends="IMachineEvent"
15776 uuid="21637b0e-34b8-42d3-acfb-7e96daf77c22"
15777 wsmap="managed" id="SnapshotEvent"
15778 >
15779 <desc>Base interface for all snapshot events.</desc>
15780
15781 <attribute name="snapshotId" readonly="yes" type="uuid" mod="string">
15782 <desc>ID of the snapshot this event relates to.</desc>
15783 </attribute>
15784
15785 </interface>
15786
15787 <interface
15788 name="ISnapshotTakenEvent" extends="ISnapshotEvent"
15789 uuid="d27c0b3d-6038-422c-b45e-6d4a0503d9f1"
15790 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotTaken"
15791 >
15792 <desc>
15793 A new snapshot of the machine has been taken.
15794 <see>ISnapshot</see>
15795 </desc>
15796 </interface>
15797
15798 <interface
15799 name="ISnapshotDeletedEvent" extends="ISnapshotEvent"
15800 uuid="c48f3401-4a9e-43f4-b7a7-54bd285e22f4"
15801 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotDeleted"
15802 >
15803 <desc>
15804 Snapshot of the given machine has been deleted.
15805
15806 <note>
15807 This notification is delivered <b>after</b> the snapshot
15808 object has been uninitialized on the server (so that any
15809 attempt to call its methods will return an error).
15810 </note>
15811
15812 <see>ISnapshot</see>
15813 </desc>
15814 </interface>
15815
15816 <interface
15817 name="ISnapshotChangedEvent" extends="ISnapshotEvent"
15818 uuid="07541941-8079-447a-a33e-47a69c7980db"
15819 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotChanged"
15820 >
15821 <desc>
15822 Snapshot properties (name and/or description) have been changed.
15823 <see>ISnapshot</see>
15824 </desc>
15825 </interface>
15826
15827 <interface
15828 name="IMousePointerShapeChangedEvent" extends="IEvent"
15829 uuid="a6dcf6e8-416b-4181-8c4a-45ec95177aef"
15830 wsmap="managed" autogen="VBoxEvent" id="OnMousePointerShapeChanged"
15831 >
15832 <desc>
15833 Notification when the guest mouse pointer shape has
15834 changed. The new shape data is given.
15835 </desc>
15836
15837 <attribute name="visible" type="boolean" readonly="yes">
15838 <desc>
15839 Flag whether the pointer is visible.
15840 </desc>
15841 </attribute>
15842 <attribute name="alpha" type="boolean" readonly="yes">
15843 <desc>
15844 Flag whether the pointer has an alpha channel.
15845 </desc>
15846 </attribute>
15847 <attribute name="xhot" type="unsigned long" readonly="yes">
15848 <desc>
15849 The pointer hot spot X coordinate.
15850 </desc>
15851 </attribute>
15852 <attribute name="yhot" type="unsigned long" readonly="yes">
15853 <desc>
15854 The pointer hot spot Y coordinate.
15855 </desc>
15856 </attribute>
15857 <attribute name="width" type="unsigned long" readonly="yes">
15858 <desc>
15859 Width of the pointer shape in pixels.
15860 </desc>
15861 </attribute>
15862 <attribute name="height" type="unsigned long" readonly="yes">
15863 <desc>
15864 Height of the pointer shape in pixels.
15865 </desc>
15866 </attribute>
15867 <attribute name="shape" type="octet" safearray="yes" readonly="yes">
15868 <desc>
15869 Shape buffer arrays.
15870
15871 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
15872 followed by a 32-bpp XOR (color) mask.
15873
15874 For pointers without alpha channel the XOR mask pixels are 32
15875 bit values: (lsb)BGR0(msb). For pointers with alpha channel
15876 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
15877
15878 An AND mask is used for pointers with alpha channel, so if the
15879 callback does not support alpha, the pointer could be
15880 displayed as a normal color pointer.
15881
15882 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
15883 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
15884 height</tt>. The padding bits at the end of each scanline are
15885 undefined.
15886
15887 The XOR mask follows the AND mask on the next 4-byte aligned
15888 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
15889 Bytes in the gap between the AND and the XOR mask are undefined.
15890 The XOR mask scanlines have no gap between them and the size of
15891 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
15892
15893 <note>
15894 If @a shape is 0, only the pointer visibility is changed.
15895 </note>
15896 </desc>
15897 </attribute>
15898 </interface>
15899
15900 <interface
15901 name="IMouseCapabilityChangedEvent" extends="IEvent"
15902 uuid="d633ad48-820c-4207-b46c-6bd3596640d5"
15903 wsmap="managed" autogen="VBoxEvent" id="OnMouseCapabilityChanged"
15904 >
15905 <desc>
15906 Notification when the mouse capabilities reported by the
15907 guest have changed. The new capabilities are passed.
15908 </desc>
15909 <attribute name="supportsAbsolute" type="boolean" readonly="yes">
15910 <desc>
15911 Supports absolute coordinates.
15912 </desc>
15913 </attribute>
15914 <attribute name="supportsRelative" type="boolean" readonly="yes">
15915 <desc>
15916 Supports relative coordinates.
15917 </desc>
15918 </attribute>
15919 <attribute name="needsHostCursor" type="boolean" readonly="yes">
15920 <desc>
15921 If host cursor is needed.
15922 </desc>
15923 </attribute>
15924 </interface>
15925
15926 <interface
15927 name="IKeyboardLedsChangedEvent" extends="IEvent"
15928 uuid="6DDEF35E-4737-457B-99FC-BC52C851A44F"
15929 wsmap="managed" autogen="VBoxEvent" id="OnKeyboardLedsChanged"
15930 >
15931 <desc>
15932 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
15933 to alter the state of the keyboard LEDs.
15934 </desc>
15935 <attribute name="numLock" type="boolean" readonly="yes">
15936 <desc>
15937 NumLock status.
15938 </desc>
15939 </attribute>
15940 <attribute name="capsLock" type="boolean" readonly="yes">
15941 <desc>
15942 CapsLock status.
15943 </desc>
15944 </attribute>
15945 <attribute name="scrollLock" type="boolean" readonly="yes">
15946 <desc>
15947 ScrollLock status.
15948 </desc>
15949 </attribute>
15950 </interface>
15951
15952 <interface
15953 name="IStateChangedEvent" extends="IEvent"
15954 uuid="4376693C-CF37-453B-9289-3B0F521CAF27"
15955 wsmap="managed" autogen="VBoxEvent" id="OnStateChanged"
15956 >
15957 <desc>
15958 Notification when the execution state of the machine has changed.
15959 The new state is given.
15960 </desc>
15961 <attribute name="state" type="MachineState" readonly="yes">
15962 <desc>
15963 New machine state.
15964 </desc>
15965 </attribute>
15966 </interface>
15967
15968 <interface
15969 name="IAdditionsStateChangedEvent" extends="IEvent"
15970 uuid="D70F7915-DA7C-44C8-A7AC-9F173490446A"
15971 wsmap="managed" autogen="VBoxEvent" id="OnAdditionsStateChanged"
15972 >
15973 <desc>
15974 Notification when a Guest Additions property changes.
15975 Interested callees should query IGuest attributes to
15976 find out what has changed.
15977 </desc>
15978 </interface>
15979
15980 <interface
15981 name="INetworkAdapterChangedEvent" extends="IEvent"
15982 uuid="08889892-1EC6-4883-801D-77F56CFD0103"
15983 wsmap="managed" autogen="VBoxEvent" id="OnNetworkAdapterChanged"
15984 >
15985 <desc>
15986 Notification when a property of one of the
15987 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
15988 changes. Interested callees should use INetworkAdapter methods and
15989 attributes to find out what has changed.
15990 </desc>
15991 <attribute name="networkAdapter" type="INetworkAdapter" readonly="yes">
15992 <desc>
15993 Network adapter that is subject to change.
15994 </desc>
15995 </attribute>
15996 </interface>
15997
15998 <interface
15999 name="ISerialPortChangedEvent" extends="IEvent"
16000 uuid="3BA329DC-659C-488B-835C-4ECA7AE71C6C"
16001 wsmap="managed" autogen="VBoxEvent" id="OnSerialPortChanged"
16002 >
16003 <desc>
16004 Notification when a property of one of the
16005 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
16006 Interested callees should use ISerialPort methods and attributes
16007 to find out what has changed.
16008 </desc>
16009 <attribute name="serialPort" type="ISerialPort" readonly="yes">
16010 <desc>
16011 Serial port that is subject to change.
16012 </desc>
16013 </attribute>
16014 </interface>
16015
16016 <interface
16017 name="IParallelPortChangedEvent" extends="IEvent"
16018 uuid="813C99FC-9849-4F47-813E-24A75DC85615"
16019 wsmap="managed" autogen="VBoxEvent" id="OnParallelPortChanged"
16020 >
16021 <desc>
16022 Notification when a property of one of the
16023 virtual <link to="IMachine::getParallelPort">parallel ports</link>
16024 changes. Interested callees should use ISerialPort methods and
16025 attributes to find out what has changed.
16026 </desc>
16027 <attribute name="parallelPort" type="IParallelPort" readonly="yes">
16028 <desc>
16029 Parallel port that is subject to change.
16030 </desc>
16031 </attribute>
16032 </interface>
16033
16034 <interface
16035 name="IStorageControllerChangedEvent" extends="IEvent"
16036 uuid="715212BF-DA59-426E-8230-3831FAA52C56"
16037 wsmap="managed" autogen="VBoxEvent" id="OnStorageControllerChanged"
16038 >
16039 <desc>
16040 Notification when a
16041 <link to="IMachine::mediumAttachments">medium attachment</link>
16042 changes.
16043 </desc>
16044 </interface>
16045
16046 <interface
16047 name="IMediumChangedEvent" extends="IEvent"
16048 uuid="0FE2DA40-5637-472A-9736-72019EABD7DE"
16049 wsmap="managed" autogen="VBoxEvent" id="OnMediumChanged"
16050 >
16051 <desc>
16052 Notification when a
16053 <link to="IMachine::mediumAttachments">medium attachment</link>
16054 changes.
16055 </desc>
16056 <attribute name="mediumAttachment" type="IMediumAttachment" readonly="yes">
16057 <desc>
16058 Medium attachment that is subject to change.
16059 </desc>
16060 </attribute>
16061 </interface>
16062
16063 <interface
16064 name="ICPUChangedEvent" extends="IEvent"
16065 uuid="D0F0BECC-EE17-4D17-A8CC-383B0EB55E9D"
16066 wsmap="managed" autogen="VBoxEvent" id="OnCPUChanged"
16067 >
16068 <desc>
16069 Notification when a CPU changes.
16070 </desc>
16071 <attribute name="cpu" type="unsigned long" readonly="yes">
16072 <desc>
16073 The CPU which changed.
16074 </desc>
16075 </attribute>
16076 <attribute name="add" type="boolean" readonly="yes">
16077 <desc>
16078 Flag whether the CPU was added or removed.
16079 </desc>
16080 </attribute>
16081 </interface>
16082
16083 <interface
16084 name="ICPUExecutionCapChangedEvent" extends="IEvent"
16085 uuid="dfa7e4f5-b4a4-44ce-85a8-127ac5eb59dc"
16086 wsmap="managed" autogen="VBoxEvent" id="OnCPUExecutionCapChanged"
16087 >
16088 <desc>
16089 Notification when the CPU execution cap changes.
16090 </desc>
16091 <attribute name="executionCap" type="unsigned long" readonly="yes">
16092 <desc>
16093 The new CPU execution cap value. (1-100)
16094 </desc>
16095 </attribute>
16096 </interface>
16097
16098 <interface
16099 name="IGuestKeyboardEvent" extends="IEvent"
16100 uuid="88394258-7006-40d4-b339-472ee3801844"
16101 wsmap="managed" autogen="VBoxEvent" id="OnGuestKeyboard"
16102 >
16103 <desc>
16104 Notification when guest keyboard event happens.
16105 </desc>
16106 <attribute name="scancodes" type="long" safearray="yes" readonly="yes">
16107 <desc>
16108 Array of scancodes.
16109 </desc>
16110 </attribute>
16111 </interface>
16112
16113 <interface
16114 name="IGuestMouseEvent" extends="IReusableEvent"
16115 uuid="1f85d35c-c524-40ff-8e98-307000df0992"
16116 wsmap="managed" autogen="VBoxEvent" id="OnGuestMouse"
16117 >
16118 <desc>
16119 Notification when guest mouse event happens.
16120 </desc>
16121
16122 <attribute name="absolute" type="boolean" readonly="yes">
16123 <desc>
16124 If this event is relative or absolute.
16125 </desc>
16126 </attribute>
16127
16128 <attribute name="x" type="long" readonly="yes">
16129 <desc>
16130 New X position, or X delta.
16131 </desc>
16132 </attribute>
16133
16134 <attribute name="y" type="long" readonly="yes">
16135 <desc>
16136 New Y position, or Y delta.
16137 </desc>
16138 </attribute>
16139
16140 <attribute name="z" type="long" readonly="yes">
16141 <desc>
16142 Z delta.
16143 </desc>
16144 </attribute>
16145
16146 <attribute name="w" type="long" readonly="yes">
16147 <desc>
16148 W delta.
16149 </desc>
16150 </attribute>
16151
16152 <attribute name="buttons" type="long" readonly="yes">
16153 <desc>
16154 Button state bitmask.
16155 </desc>
16156 </attribute>
16157
16158 </interface>
16159
16160
16161 <interface
16162 name="IVRDEServerChangedEvent" extends="IEvent"
16163 uuid="a06fd66a-3188-4c8c-8756-1395e8cb691c"
16164 wsmap="managed" autogen="VBoxEvent" id="OnVRDEServerChanged"
16165 >
16166 <desc>
16167 Notification when a property of the
16168 <link to="IMachine::VRDEServer">VRDE server</link> changes.
16169 Interested callees should use IVRDEServer methods and attributes to
16170 find out what has changed.
16171 </desc>
16172 </interface>
16173
16174 <interface
16175 name="IVRDEServerInfoChangedEvent" extends="IEvent"
16176 uuid="dd6a1080-e1b7-4339-a549-f0878115596e"
16177 wsmap="managed" autogen="VBoxEvent" id="OnVRDEServerInfoChanged"
16178 >
16179 <desc>
16180 Notification when the status of the VRDE server changes. Interested callees
16181 should use <link to="IConsole::VRDEServerInfo">IVRDEServerInfo</link>
16182 attributes to find out what is the current status.
16183 </desc>
16184 </interface>
16185
16186 <interface
16187 name="IUSBControllerChangedEvent" extends="IEvent"
16188 uuid="93BADC0C-61D9-4940-A084-E6BB29AF3D83"
16189 wsmap="managed" autogen="VBoxEvent" id="OnUSBControllerChanged"
16190 >
16191 <desc>
16192 Notification when a property of the virtual
16193 <link to="IMachine::USBController">USB controller</link> changes.
16194 Interested callees should use IUSBController methods and attributes to
16195 find out what has changed.
16196 </desc>
16197 </interface>
16198
16199 <interface
16200 name="IUSBDeviceStateChangedEvent" extends="IEvent"
16201 uuid="806da61b-6679-422a-b629-51b06b0c6d93"
16202 wsmap="managed" autogen="VBoxEvent" id="OnUSBDeviceStateChanged"
16203 >
16204 <desc>
16205 Notification when a USB device is attached to or detached from
16206 the virtual USB controller.
16207
16208 This notification is sent as a result of the indirect
16209 request to attach the device because it matches one of the
16210 machine USB filters, or as a result of the direct request
16211 issued by <link to="IConsole::attachUSBDevice"/> or
16212 <link to="IConsole::detachUSBDevice"/>.
16213
16214 This notification is sent in case of both a succeeded and a
16215 failed request completion. When the request succeeds, the
16216 @a error parameter is @c null, and the given device has been
16217 already added to (when @a attached is @c true) or removed from
16218 (when @a attached is @c false) the collection represented by
16219 <link to="IConsole::USBDevices"/>. On failure, the collection
16220 doesn't change and the @a error parameter represents the error
16221 message describing the failure.
16222 </desc>
16223 <attribute name="device" type="IUSBDevice" readonly="yes">
16224 <desc>
16225 Device that is subject to state change.
16226 </desc>
16227 </attribute>
16228 <attribute name="attached" type="boolean" readonly="yes">
16229 <desc>
16230 @c true if the device was attached and @c false otherwise.
16231 </desc>
16232 </attribute>
16233 <attribute name="error" type="IVirtualBoxErrorInfo" readonly="yes">
16234 <desc>
16235 @c null on success or an error message object on failure.
16236 </desc>
16237 </attribute>
16238 </interface>
16239
16240 <interface
16241 name="ISharedFolderChangedEvent" extends="IEvent"
16242 uuid="B66349B5-3534-4239-B2DE-8E1535D94C0B"
16243 wsmap="managed" autogen="VBoxEvent" id="OnSharedFolderChanged"
16244 >
16245 <desc>
16246 Notification when a shared folder is added or removed.
16247 The @a scope argument defines one of three scopes:
16248 <link to="IVirtualBox::sharedFolders">global shared folders</link>
16249 (<link to="Scope_Global">Global</link>),
16250 <link to="IMachine::sharedFolders">permanent shared folders</link> of
16251 the machine (<link to="Scope_Machine">Machine</link>) or <link
16252 to="IConsole::sharedFolders">transient shared folders</link> of the
16253 machine (<link to="Scope_Session">Session</link>). Interested callees
16254 should use query the corresponding collections to find out what has
16255 changed.
16256 </desc>
16257 <attribute name="scope" type="Scope" readonly="yes">
16258 <desc>
16259 Scope of the notification.
16260 </desc>
16261 </attribute>
16262 </interface>
16263
16264 <interface
16265 name="IRuntimeErrorEvent" extends="IEvent"
16266 uuid="883DD18B-0721-4CDE-867C-1A82ABAF914C"
16267 wsmap="managed" autogen="VBoxEvent" id="OnRuntimeError"
16268 >
16269 <desc>
16270 Notification when an error happens during the virtual
16271 machine execution.
16272
16273 There are three kinds of runtime errors:
16274 <ul>
16275 <li><i>fatal</i></li>
16276 <li><i>non-fatal with retry</i></li>
16277 <li><i>non-fatal warnings</i></li>
16278 </ul>
16279
16280 <b>Fatal</b> errors are indicated by the @a fatal parameter set
16281 to @c true. In case of fatal errors, the virtual machine
16282 execution is always paused before calling this notification, and
16283 the notification handler is supposed either to immediately save
16284 the virtual machine state using <link to="IConsole::saveState"/>
16285 or power it off using <link to="IConsole::powerDown"/>.
16286 Resuming the execution can lead to unpredictable results.
16287
16288 <b>Non-fatal</b> errors and warnings are indicated by the
16289 @a fatal parameter set to @c false. If the virtual machine
16290 is in the Paused state by the time the error notification is
16291 received, it means that the user can <i>try to resume</i> the machine
16292 execution after attempting to solve the problem that caused the
16293 error. In this case, the notification handler is supposed
16294 to show an appropriate message to the user (depending on the
16295 value of the @a id parameter) that offers several actions such
16296 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
16297 wants to retry, the notification handler should continue
16298 the machine execution using the <link to="IConsole::resume"/>
16299 call. If the machine execution is not Paused during this
16300 notification, then it means this notification is a <i>warning</i>
16301 (for example, about a fatal condition that can happen very soon);
16302 no immediate action is required from the user, the machine
16303 continues its normal execution.
16304
16305 Note that in either case the notification handler
16306 <b>must not</b> perform any action directly on a thread
16307 where this notification is called. Everything it is allowed to
16308 do is to post a message to another thread that will then talk
16309 to the user and take the corresponding action.
16310
16311 Currently, the following error identifiers are known:
16312 <ul>
16313 <li><tt>"HostMemoryLow"</tt></li>
16314 <li><tt>"HostAudioNotResponding"</tt></li>
16315 <li><tt>"VDIStorageFull"</tt></li>
16316 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
16317 </ul>
16318 </desc>
16319 <attribute name="fatal" type="boolean" readonly="yes">
16320 <desc>
16321 Whether the error is fatal or not.
16322 </desc>
16323 </attribute>
16324 <attribute name="id" type="wstring" readonly="yes">
16325 <desc>
16326 Error identifier.
16327 </desc>
16328 </attribute>
16329 <attribute name="message" type="wstring" readonly="yes">
16330 <desc>
16331 Optional error message.
16332 </desc>
16333 </attribute>
16334 </interface>
16335
16336
16337 <interface
16338 name="IEventSourceChangedEvent" extends="IEvent"
16339 uuid="e7932cb8-f6d4-4ab6-9cbf-558eb8959a6a"
16340 waitable="yes"
16341 wsmap="managed" autogen="VBoxEvent" id="OnEventSourceChanged"
16342 >
16343 <desc>
16344 Notification when an event source state changes (listener added or removed).
16345 </desc>
16346
16347 <attribute name="listener" type="IEventListener" readonly="yes">
16348 <desc>
16349 Event listener which has changed.
16350 </desc>
16351 </attribute>
16352
16353 <attribute name="add" type="boolean" readonly="yes">
16354 <desc>
16355 Flag whether listener was added or removed.
16356 </desc>
16357 </attribute>
16358 </interface>
16359
16360 <interface
16361 name="IExtraDataChangedEvent" extends="IEvent"
16362 uuid="024F00CE-6E0B-492A-A8D0-968472A94DC7"
16363 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataChanged"
16364 >
16365 <desc>
16366 Notification when machine specific or global extra data
16367 has changed.
16368 </desc>
16369 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
16370 <desc>
16371 ID of the machine this event relates to.
16372 Null for global extra data changes.
16373 </desc>
16374 </attribute>
16375 <attribute name="key" type="wstring" readonly="yes">
16376 <desc>
16377 Extra data key that has changed.
16378 </desc>
16379 </attribute>
16380 <attribute name="value" type="wstring" readonly="yes">
16381 <desc>
16382 Extra data value for the given key.
16383 </desc>
16384 </attribute>
16385 </interface>
16386
16387 <interface
16388 name="IVetoEvent" extends="IEvent"
16389 uuid="9a1a4130-69fe-472f-ac10-c6fa25d75007"
16390 wsmap="managed"
16391 >
16392 <desc>Base abstract interface for veto events.</desc>
16393
16394 <method name="addVeto">
16395 <desc>
16396 Adds a veto on this event.
16397 </desc>
16398 <param name="reason" type="wstring" dir="in">
16399 <desc>
16400 Reason for veto, could be null or empty string.
16401 </desc>
16402 </param>
16403 </method>
16404
16405 <method name="isVetoed">
16406 <desc>
16407 If this event was vetoed.
16408 </desc>
16409 <param name="result" type="boolean" dir="return">
16410 <desc>
16411 Reason for veto.
16412 </desc>
16413 </param>
16414 </method>
16415
16416 <method name="getVetos">
16417 <desc>
16418 Current veto reason list, if size is 0 - no veto.
16419 </desc>
16420 <param name="result" type="wstring" dir="return" safearray="yes">
16421 <desc>
16422 Array of reasons for veto provided by different event handlers.
16423 </desc>
16424 </param>
16425 </method>
16426
16427 </interface>
16428
16429 <interface
16430 name="IExtraDataCanChangeEvent" extends="IVetoEvent"
16431 uuid="245d88bd-800a-40f8-87a6-170d02249a55"
16432 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataCanChange"
16433 waitable="true"
16434 >
16435 <desc>
16436 Notification when someone tries to change extra data for
16437 either the given machine or (if @c null) global extra data.
16438 This gives the chance to veto against changes.
16439 </desc>
16440 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
16441 <desc>
16442 ID of the machine this event relates to.
16443 Null for global extra data changes.
16444 </desc>
16445 </attribute>
16446 <attribute name="key" type="wstring" readonly="yes">
16447 <desc>
16448 Extra data key that has changed.
16449 </desc>
16450 </attribute>
16451 <attribute name="value" type="wstring" readonly="yes">
16452 <desc>
16453 Extra data value for the given key.
16454 </desc>
16455 </attribute>
16456 </interface>
16457
16458 <interface
16459 name="ICanShowWindowEvent" extends="IVetoEvent"
16460 uuid="adf292b0-92c9-4a77-9d35-e058b39fe0b9"
16461 wsmap="managed" autogen="VBoxEvent" id="OnCanShowWindow"
16462 waitable="true"
16463 >
16464 <desc>
16465 Notification when a call to
16466 <link to="IMachine::canShowConsoleWindow"/> is made by a
16467 front-end to check if a subsequent call to
16468 <link to="IMachine::showConsoleWindow"/> can succeed.
16469
16470 The callee should give an answer appropriate to the current
16471 machine state using event veto. This answer must
16472 remain valid at least until the next
16473 <link to="IConsole::state">machine state</link> change.
16474 </desc>
16475 </interface>
16476
16477 <interface
16478 name="IShowWindowEvent" extends="IEvent"
16479 uuid="B0A0904D-2F05-4D28-855F-488F96BAD2B2"
16480 wsmap="managed" autogen="VBoxEvent" id="OnShowWindow"
16481 waitable="true"
16482 >
16483 <desc>
16484 Notification when a call to
16485 <link to="IMachine::showConsoleWindow"/>
16486 requests the console window to be activated and brought to
16487 foreground on the desktop of the host PC.
16488
16489 This notification should cause the VM console process to
16490 perform the requested action as described above. If it is
16491 impossible to do it at a time of this notification, this
16492 method should return a failure.
16493
16494 Note that many modern window managers on many platforms
16495 implement some sort of focus stealing prevention logic, so
16496 that it may be impossible to activate a window without the
16497 help of the currently active application (which is supposedly
16498 an initiator of this notification). In this case, this method
16499 must return a non-zero identifier that represents the
16500 top-level window of the VM console process. The caller, if it
16501 represents a currently active process, is responsible to use
16502 this identifier (in a platform-dependent manner) to perform
16503 actual window activation.
16504
16505 This method must set @a winId to zero if it has performed all
16506 actions necessary to complete the request and the console
16507 window is now active and in foreground, to indicate that no
16508 further action is required on the caller's side.
16509 </desc>
16510 <attribute name="winId" type="long long">
16511 <desc>
16512 Platform-dependent identifier of the top-level VM console
16513 window, or zero if this method has performed all actions
16514 necessary to implement the <i>show window</i> semantics for
16515 the given platform and/or this VirtualBox front-end.
16516 </desc>
16517 </attribute>
16518 </interface>
16519
16520 <interface
16521 name="INATRedirectEvent" extends="IMachineEvent"
16522 uuid="57DE97D7-3CBB-42A0-888F-610D5832D16B"
16523 wsmap="managed" autogen="VBoxEvent" id="OnNATRedirect"
16524 >
16525 <desc>
16526 Notification when NAT redirect rule added or removed.
16527 </desc>
16528 <attribute name="slot" type="unsigned long" readonly="yes">
16529 <desc>
16530 Adapter which NAT attached to.
16531 </desc>
16532 </attribute>
16533 <attribute name="remove" type="boolean" readonly="yes">
16534 <desc>
16535 Whether rule remove or add.
16536 </desc>
16537 </attribute>
16538 <attribute name="name" type="wstring" readonly="yes">
16539 <desc>
16540 Name of the rule.
16541 </desc>
16542 </attribute>
16543 <attribute name="proto" type="NATProtocol" readonly="yes">
16544 <desc>
16545 Protocol (TCP or UDP) of the redirect rule.
16546 </desc>
16547 </attribute>
16548 <attribute name="hostIp" type="wstring" readonly="yes">
16549 <desc>
16550 Host ip address to bind socket on.
16551 </desc>
16552 </attribute>
16553 <attribute name="hostPort" type="long" readonly="yes">
16554 <desc>
16555 Host port to bind socket on.
16556 </desc>
16557 </attribute>
16558 <attribute name="guestIp" type="wstring" readonly="yes">
16559 <desc>
16560 Guest ip address to redirect to.
16561 </desc>
16562 </attribute>
16563 <attribute name="guestPort" type="long" readonly="yes">
16564 <desc>
16565 Guest port to redirect to.
16566 </desc>
16567 </attribute>
16568 </interface>
16569
16570 <interface
16571 name="IHostPciDevicePlugEvent" extends="IMachineEvent"
16572 waitable="yes"
16573 uuid="EDD4782B-DB74-43A0-B724-2BAA36F039CC"
16574 wsmap="managed" autogen="VBoxEvent" id="OnHostPciDevicePlug"
16575 >
16576 <desc>
16577 Notification when host PCI device is plugged/unplugged.
16578 </desc>
16579
16580 <attribute name="plugged" type="boolean" readonly="yes">
16581 <desc>
16582 If device successfully plugged or unplugged.
16583 </desc>
16584 </attribute>
16585
16586 <attribute name="success" type="boolean" readonly="yes">
16587 <desc>
16588 If operation was successful, if false - 'message' attribute
16589 may be of interest.
16590 </desc>
16591 </attribute>
16592
16593 <attribute name="attachment" type="IPciDeviceAttachment" readonly="yes">
16594 <desc>
16595 Attachment info for this device.
16596 </desc>
16597 </attribute>
16598
16599 <attribute name="eventContext" type="IEventContext" readonly="yes">
16600 <desc>
16601 Context object, passed into attachHostPciDevice() and
16602 attachHostPciDevice().
16603 </desc>
16604 </attribute>
16605
16606 <attribute name="message" type="wstring" readonly="yes">
16607 <desc>
16608 Optional error message.
16609 </desc>
16610 </attribute>
16611
16612 </interface>
16613
16614 <interface
16615 name="IVBoxSVCAvailabilityChangedEvent" extends="IEvent"
16616 uuid="97c78fcd-d4fc-485f-8613-5af88bfcfcdc"
16617 wsmap="managed" autogen="VBoxEvent" id="OnVBoxSVCAvailabilityChanged"
16618 >
16619 <desc>
16620 Notification when VBoxSVC becomes unavailable (due to a crash or similar
16621 unexpected circumstances) or available again.
16622 </desc>
16623
16624 <attribute name="available" type="boolean" readonly="yes">
16625 <desc>
16626 Whether VBoxSVC is available now.
16627 </desc>
16628 </attribute>
16629 </interface>
16630
16631 <interface
16632 name="IBandwidthGroupChangedEvent" extends="IEvent"
16633 uuid="334df94a-7556-4cbc-8c04-043096b02d82"
16634 wsmap="managed" autogen="VBoxEvent" id="OnBandwidthGroupChanged"
16635 >
16636 <desc>
16637 Notification when one of the bandwidth groups changed
16638 </desc>
16639 <attribute name="bandwidthGroup" type="IBandwidthGroup" readonly="yes">
16640 <desc>
16641 The changed bandwidth group.
16642 </desc>
16643 </attribute>
16644 </interface>
16645
16646 <enum
16647 name="GuestMonitorChangedEventType"
16648 uuid="ef172985-7e36-4297-95be-e46396968d66"
16649 >
16650
16651 <desc>
16652 How the guest monitor has been changed.
16653 </desc>
16654
16655 <const name="Enabled" value="0">
16656 <desc>
16657 The guest monitor has been enabled by the guest.
16658 </desc>
16659 </const>
16660
16661 <const name="Disabled" value="1">
16662 <desc>
16663 The guest monitor has been disabled by the guest.
16664 </desc>
16665 </const>
16666
16667 <const name="NewOrigin" value="2">
16668 <desc>
16669 The guest monitor origin has changed in the guest.
16670 </desc>
16671 </const>
16672 </enum>
16673
16674 <interface
16675 name="IGuestMonitorChangedEvent" extends="IEvent"
16676 uuid="0f7b8a22-c71f-4a36-8e5f-a77d01d76090"
16677 wsmap="managed" autogen="VBoxEvent" id="OnGuestMonitorChanged"
16678 >
16679 <desc>
16680 Notification when the guest enables one of its monitors.
16681 </desc>
16682
16683 <attribute name="changeType" type="GuestMonitorChangedEventType" readonly="yes">
16684 <desc>
16685 What was changed for this guest monitor.
16686 </desc>
16687 </attribute>
16688
16689 <attribute name="screenId" type="unsigned long" readonly="yes">
16690 <desc>
16691 The monitor which was changed.
16692 </desc>
16693 </attribute>
16694
16695 <attribute name="originX" type="unsigned long" readonly="yes">
16696 <desc>
16697 Physical X origin relative to the primary screen.
16698 Valid for Enabled and NewOrigin.
16699 </desc>
16700 </attribute>
16701
16702 <attribute name="originY" type="unsigned long" readonly="yes">
16703 <desc>
16704 Physical Y origin relative to the primary screen.
16705 Valid for Enabled and NewOrigin.
16706 </desc>
16707 </attribute>
16708
16709 <attribute name="width" type="unsigned long" readonly="yes">
16710 <desc>
16711 Width of the screen.
16712 Valid for Enabled.
16713 </desc>
16714 </attribute>
16715
16716 <attribute name="height" type="unsigned long" readonly="yes">
16717 <desc>
16718 Height of the screen.
16719 Valid for Enabled.
16720 </desc>
16721 </attribute>
16722
16723 </interface>
16724
16725 <module name="VBoxSVC" context="LocalServer">
16726 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
16727 namespace="virtualbox.org">
16728 <interface name="IVirtualBox" default="yes"/>
16729 </class>
16730 </module>
16731
16732 <module name="VBoxC" context="InprocServer" threadingModel="Free">
16733 <class name="VirtualBoxClient" uuid="dd3fc71d-26c0-4fe1-bf6f-67f633265bba"
16734 namespace="virtualbox.org">
16735 <interface name="IVirtualBoxClient" default="yes"/>
16736 </class>
16737
16738 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
16739 namespace="virtualbox.org">
16740 <interface name="ISession" default="yes"/>
16741 </class>
16742 </module>
16743
16744</library>
16745
16746</idl>
16747
16748<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
Note: See TracBrowser for help on using the repository browser.

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