VirtualBox

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

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

Initial commit of Guest Additions runlevels; this replaces the additionsActive flag to get more detailed information of the current Guest Additions state.

  • Property svn:eol-style set to native
File size: 558.6 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4
5 Copyright (C) 2006-2010 Oracle Corporation
6
7 This file is part of VirtualBox Open Source Edition (OSE), as
8 available from http://www.virtualbox.org. This file is free software;
9 you can redistribute it and/or modify it under the terms of the GNU
10 General Public License (GPL) as published by the Free Software
11 Foundation, in version 2 as it comes in the "COPYING" file of the
12 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
13 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
14-->
15
16<!--
17 This is the master declaration for VirtualBox's Main API,
18 represented by COM/XPCOM and web service interfaces.
19
20 From this document, the build system generates several files
21 via XSLT that are then used during the build process.
22
23 Below is the list of XSL templates that operate on this file and
24 output files they generate. These XSL templates must be updated
25 whenever the schema of this file changes:
26
27 1. src/VBox/Main/idl/midl.xsl =>
28 out/<platform>/bin/sdk/idl/VirtualBox.idl
29 (MS COM interface definition file for Main API)
30
31 2. src/VBox/Main/idl/xpidl.xsl =>
32 out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
33 (XPCOM interface definition file for Main API)
34
35 3. src/VBox/Main/idl/doxygen.xsl =>
36 out/<platform>/obj/src/VBox/Main/VirtualBox.idl
37 (pseudo-IDL for Doxygen to generate the official Main API
38 documentation)
39
40 4. src/VBox/Main/webservice/*.xsl =>
41 a bunch of WSDL and C++ files
42 (VirtualBox web service sources and SOAP mappers;
43 see src/VBox/Main/webservice/Makefile.kmk for details)
44
45 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
46 out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
47 (smart Qt-based C++ wrapper classes for COM interfaces
48 of the Main API)
49
50 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
51 out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
52 (Main API TypeLib block for the WiX installer)
53
54 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
55 out/<platform>/obj/Runtime/errmsgvboxcomdata.h
56 (<result> extraction for the %Rhrc format specifier)
57-->
58
59<idl>
60
61<desc>
62 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
63 describes the so-called <i>VirtualBox Main API</i> which comprises all public
64 COM interfaces and components provided by the VirtualBox server and by the
65 VirtualBox client library.
66
67 VirtualBox employs a client-server design, meaning that whenever any part of
68 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
69 interface or any virtual machine --, a dedicated server process named
70 VBoxSVC runs in the background. This allows multiple processes working with
71 VirtualBox to cooperate without conflicts. These processes communicate to each
72 other using inter-process communication facilities provided by the COM
73 implementation of the host computer.
74
75 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
76 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
77 implementation, is used.
78
79 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
80 the VBoxManage command-line interface and the VBoxVRDP server) are technically
81 front-ends to the Main API and only use the interfaces that are documented
82 in this Main API documentation. This ensures that, with any given release
83 version of VirtualBox, all capabilities of the product that could be useful
84 to an external client program are always exposed by way of this API.
85
86 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
87 contains two public component classes:
88 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
89 implement IVirtualBox and ISession interfaces respectively. These two classes
90 are of supreme importance and will be needed in order for any front-end
91 program to do anything useful. It is recommended to read the documentation of
92 the mentioned interfaces first.
93
94 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
95 there can be only one object of this class on the local machine at any given
96 time. This object is a parent of many other objects in the VirtualBox COM
97 library and lives in the VBoxSVC process. In fact, when you create an instance
98 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
99 process is already running, starts it if not, and returns you a reference to
100 the <tt>VirtualBox</tt> object created in this process. When the last reference
101 to this object is released, the VBoxSVC process ends (with a 5 second delay to
102 protect from too frequent restarts).
103
104 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
105 as many <tt>Session</tt> objects as you need but all of them will live in a
106 process which issues the object instantiation call. <tt>Session</tt> objects
107 represent virtual machine sessions which are used to configure virtual
108 machines and control their execution.
109</desc>
110
111<if target="midl">
112 <cpp line="enum {"/>
113 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
114 <cpp line=" kTypeLibraryMinorVersion = 0"/>
115 <cpp line="};"/>
116</if>
117
118<if target="xpidl">
119 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
120 <cpp>
121/* currently, nsISupportsImpl.h lacks the below-like macros */
122
123#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
124#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
125#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI NS_IMPL_QUERY_INTERFACE3_CI
126#define NS_IMPL_THREADSAFE_QUERY_INTERFACE4_CI NS_IMPL_QUERY_INTERFACE4_CI
127
128
129#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
130# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
131 NS_IMPL_THREADSAFE_ADDREF(_class) \
132 NS_IMPL_THREADSAFE_RELEASE(_class) \
133 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
134 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
135#endif
136
137#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
138# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
139 NS_IMPL_THREADSAFE_ADDREF(_class) \
140 NS_IMPL_THREADSAFE_RELEASE(_class) \
141 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
142 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
143#endif
144
145#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_CI
146# define NS_IMPL_THREADSAFE_ISUPPORTS3_CI(_class, _i1, _i2, _i3) \
147 NS_IMPL_THREADSAFE_ADDREF(_class) \
148 NS_IMPL_THREADSAFE_RELEASE(_class) \
149 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI(_class, _i1, _i2, _i3) \
150 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
151#endif
152
153#ifndef NS_IMPL_THREADSAFE_ISUPPORTS4_CI
154# define NS_IMPL_THREADSAFE_ISUPPORTS4_CI(_class, _i1, _i2, _i3, _i4) \
155 NS_IMPL_THREADSAFE_ADDREF(_class) \
156 NS_IMPL_THREADSAFE_RELEASE(_class) \
157 NS_IMPL_THREADSAFE_QUERY_INTERFACE4_CI(_class, _i1, _i2, _i3, _i4) \
158 NS_IMPL_CI_INTERFACE_GETTER4(_class, _i1, _i2, _i3, _i4)
159#endif
160
161#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
162# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
163 NS_INTERFACE_MAP_BEGIN(_class) \
164 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
165 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
166 NS_IMPL_QUERY_CLASSINFO(_class) \
167 NS_INTERFACE_MAP_END
168#endif
169
170#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
171# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
172 _i2, _ic2) \
173 NS_INTERFACE_MAP_BEGIN(_class) \
174 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
175 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
176 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
177 NS_IMPL_QUERY_CLASSINFO(_class) \
178 NS_INTERFACE_MAP_END
179#endif
180
181#ifndef NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
182# define NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
183 _i2, _ic2, _i3, _ic3) \
184 NS_INTERFACE_MAP_BEGIN(_class) \
185 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
186 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
187 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i3, _ic3) \
188 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
189 NS_IMPL_QUERY_CLASSINFO(_class) \
190 NS_INTERFACE_MAP_END
191#endif
192
193#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
194#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
195#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
196
197#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
198# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
199 NS_IMPL_THREADSAFE_ADDREF(_class) \
200 NS_IMPL_THREADSAFE_RELEASE(_class) \
201 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
202 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
203#endif
204
205#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
206# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
207 _i2, _ic2) \
208 NS_IMPL_THREADSAFE_ADDREF(_class) \
209 NS_IMPL_THREADSAFE_RELEASE(_class) \
210 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
211 _i2, _ic2) \
212 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
213#endif
214
215#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI
216# define NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI(_class, _i1, _ic1, \
217 _i2, _ic2, _i3, _ic3) \
218 NS_IMPL_THREADSAFE_ADDREF(_class) \
219 NS_IMPL_THREADSAFE_RELEASE(_class) \
220 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
221 _i2, _ic2, _i3, _ic3) \
222 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
223#endif
224
225 </cpp>
226</if>
227
228<library
229 name="VirtualBox"
230 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
231 version="1.3"
232 desc="VirtualBox Type Library"
233 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
234 supportsErrorInfo="yes"
235>
236
237
238 <!--
239 // COM result codes for VirtualBox
240 /////////////////////////////////////////////////////////////////////////
241 -->
242
243 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
244 <desc>
245 This section describes all VirtualBox-specific COM result codes that may
246 be returned by methods of VirtualBox COM interfaces in addition to
247 standard COM result codes.
248
249 Note that along with the result code, every VirtualBox method returns
250 extended error information through the IVirtualBoxErrorInfo interface on
251 failure. This interface is a preferred way to present the error to the end
252 user because it contains a human readable description of the error. Raw
253 result codes, both standard and described in this section, are intended to
254 be used by programs to analyze the reason of a failure and select an
255 appropriate course of action without involving the end user (for example,
256 retry the operation later or make a different call).
257
258 The standard COM result codes that may originate from our methods include:
259
260 <table>
261 <tr><td>E_INVALIDARG</td>
262 <td>
263 Returned when the value of the method's argument is not within the range
264 of valid values. This should not be confused with situations when the
265 value is within the range but simply doesn't suit the current object
266 state and there is a possibility that it will be accepted later (in such
267 cases VirtualBox-specific codes are returned, for example,
268 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
269 </td>
270 </tr>
271 <tr><td>E_POINTER</td>
272 <td>
273 Returned if a memory pointer for the output argument is invalid (for
274 example, @c null). Note that when pointers representing input
275 arguments (such as strings) are invalid, E_INVALIDARG is returned.
276 </td>
277 </tr>
278 <tr><td>E_ACCESSDENIED</td>
279 <td>
280 Returned when the called object is not ready. Since the lifetime of a
281 public COM object cannot be fully controlled by the implementation,
282 VirtualBox maintains the readiness state for all objects it creates and
283 returns this code in response to any method call on the object that was
284 deactivated by VirtualBox and is not functioning any more.
285 </td>
286 </tr>
287 <tr><td>E_OUTOFMEMORY</td>
288 <td>
289 Returned when a memory allocation operation fails.
290 </td>
291 </tr>
292 </table>
293 </desc>
294 </descGroup>
295
296 <!--
297 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
298 everything in <result>/<desc> after (and including) the first dot, so express
299 the matter of the error code in the first sentence and keep it short.
300 -->
301
302 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
303 <desc>
304 Object corresponding to the supplied arguments does not exist.
305 </desc>
306 </result>
307
308 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
309 <desc>
310 Current virtual machine state prevents the operation.
311 </desc>
312 </result>
313
314 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
315 <desc>
316 Virtual machine error occurred attempting the operation.
317 </desc>
318 </result>
319
320 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
321 <desc>
322 File not accessible or erroneous file contents.
323 </desc>
324 </result>
325
326 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
327 <desc>
328 Runtime subsystem error.
329 </desc>
330 </result>
331
332 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
333 <desc>
334 Pluggable Device Manager error.
335 </desc>
336 </result>
337
338 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
339 <desc>
340 Current object state prohibits operation.
341 </desc>
342 </result>
343
344 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
345 <desc>
346 Host operating system related error.
347 </desc>
348 </result>
349
350 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
351 <desc>
352 Requested operation is not supported.
353 </desc>
354 </result>
355
356 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
357 <desc>
358 Invalid XML found.
359 </desc>
360 </result>
361
362 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
363 <desc>
364 Current session state prohibits operation.
365 </desc>
366 </result>
367
368 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
369 <desc>
370 Object being in use prohibits operation.
371 </desc>
372 </result>
373
374 <!--
375 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
376 everything in <result>/<desc> after (and including) the first dot, so express
377 the matter of the error code in the first sentence and keep it short.
378 -->
379
380 <descGroup/>
381
382 <!--
383 // all common enums
384 /////////////////////////////////////////////////////////////////////////
385 -->
386
387 <enum name="SettingsVersion"
388 uuid="52bd6f5f-1adb-4493-975d-581a9c4b803f"
389 >
390 <desc>Settings version of VirtualBox settings files. This is written to
391 the "version" attribute of the root "VirtualBox" element in the settings
392 file XML and indicates which VirtualBox version wrote the file.
393 </desc>
394
395 <const name="Null" value="0">
396 <desc>Null value, indicates invalid version.</desc>
397 </const>
398 <const name="v1_0" value="1">
399 <desc>Legacy settings version, not currently supported.</desc>
400 </const>
401 <const name="v1_1" value="2">
402 <desc>Legacy settings version, not currently supported.</desc>
403 </const>
404 <const name="v1_2" value="3">
405 <desc>Legacy settings version, not currently supported.</desc>
406 </const>
407 <const name="v1_3pre" value="4">
408 <desc>Legacy settings version, not currently supported.</desc>
409 </const>
410 <const name="v1_3" value="5">
411 <desc>Settings version "1.3", written by VirtualBox 2.0.12.</desc>
412 <!--
413 Machine XML: Capitalization of Uart, Lpt elements and many attributes changed.
414 -->
415 </const>
416 <const name="v1_4" value="6">
417 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
418 <!--
419 VirtualBox.xml: big DiskRegistry -> MediaRegistry revamp, various HardDisk types merged
420 (was VirtualDiskImage, VMDKImage, VHDImage, ISCSIHardDisk, CustomHardDisk, DiffHardDisk)
421 -->
422 </const>
423 <const name="v1_5" value="7">
424 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
425 <!-- 2008-09-04: 2.0.0 released
426 2008-11-20: settings version 1.5 introduced
427 2008-12-17: 2.1.0 released
428 Machine changes:
429 guest OS identifiers changed;
430 Machine/Hardware/Display/MonitorCount renamed to monitorCount;
431 Machine/Hardware/Display/Accelerate3D renamed to accelerate3D;
432 Machine/Hardware/CPU/CPUCount/@count changed to CPU/@count
433 -->
434 </const>
435 <const name="v1_6" value="8">
436 <desc>Settings version "1.6", written by VirtualBox 2.1.4 (at least).</desc>
437 <!-- 2008-12-17: 2.1.0 released
438 2008-12-19: settings version 1.6 introduced (is in 2.1 branch)
439 2009-04-08: 2.2.0 released
440 Machine changes: remove all Machine/Hardware/Network/Adapter/HostInterface[@TAPSetup or @TAPTerminate]/ attributes (done)
441 -->
442 </const>
443 <const name="v1_7" value="9">
444 <desc>Settings version "1.7", written by VirtualBox 2.2.x and 3.0.x.</desc>
445 <!-- 2008-12-17: 2.1.0 released
446 2009-03-11: settings version 1.7 introduced (is in 2.2 branch)
447 2009-04-08: 2.2.0 released
448 VirtualBox.xml additions: NetserviceRegistry with DHCPServers (done)
449 Machine changes: HardDiskAttachments is now StorageControllers (done)
450 -->
451 </const>
452 <const name="v1_8" value="10">
453 <desc>Intermediate settings version "1.8", understood by VirtualBox 3.1.x.</desc>
454 <!-- Machine additions: Display/@accelerate2DVideo (done)
455 -->
456 </const>
457 <const name="v1_9" value="11">
458 <desc>Settings version "1.9", written by VirtualBox 3.1.x.</desc>
459 <!-- The big storage controller / DVD / Floppy rework (done)
460 -->
461 </const>
462 <const name="v1_10" value="12">
463 <desc>Settings version "1.10", written by VirtualBox 3.2.x.</desc>
464 <!-- Machine changes: RTC localOrUTC (done)
465 CPU hot-plug support
466 -->
467 </const>
468 <const name="v1_11" value="13">
469 <desc>Settings version "1.11", written by VirtualBox 3.3.x.</desc>
470 <!-- Machine changes: HD Audio controller, per-machine disk registries
471 -->
472 </const>
473 <const name="Future" value="99999">
474 <desc>Settings version greater than "1.11", written by a future VirtualBox version.</desc>
475 </const>
476 </enum>
477
478 <enum
479 name="AccessMode"
480 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
481 >
482 <desc>
483 Access mode for opening files.
484 </desc>
485
486 <const name="ReadOnly" value="1"/>
487 <const name="ReadWrite" value="2"/>
488 </enum>
489
490 <enum
491 name="MachineState"
492 uuid="ec6c6a9e-113d-4ff4-b44f-0b69f21c97fe"
493 >
494 <desc>
495 Virtual machine execution state.
496
497 This enumeration represents possible values of the <link
498 to="IMachine::state"/> attribute.
499
500 Below is the basic virtual machine state diagram. It shows how the state
501 changes during virtual machine execution. The text in square braces shows
502 a method of the IConsole interface that performs the given state
503 transition.
504
505 <pre>
506 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
507 V |
508 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
509 | | | | V |
510 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
511 | | ^ | ^ |
512 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
513 | ^ | | | |
514 | | +-----------------------------------------+-|-------------------+ +
515 | | | | |
516 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
517 | | | |
518 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
519 | | |
520 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
521 </pre>
522
523 Note that states to the right from PoweredOff, Aborted and Saved in the
524 above diagram are called <i>online VM states</i>. These states
525 represent the virtual machine which is being executed in a dedicated
526 process (usually with a GUI window attached to it where you can see the
527 activity of the virtual machine and interact with it). There are two
528 special pseudo-states, FirstOnline and LastOnline, that can be used in
529 relational expressions to detect if the given machine state is online or
530 not:
531
532 <pre>
533 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
534 machine.GetState() &lt;= MachineState_LastOnline)
535 {
536 ...the machine is being executed...
537 }
538 </pre>
539
540 When the virtual machine is in one of the online VM states (that is, being
541 executed), only a few machine settings can be modified. Methods working
542 with such settings contain an explicit note about that. An attempt to
543 change any oter setting or perform a modifying operation during this time
544 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
545
546 All online states except Running, Paused and Stuck are transitional: they
547 represent temporary conditions of the virtual machine that will last as
548 long as the operation that initiated such a condition.
549
550 The Stuck state is a special case. It means that execution of the machine
551 has reached the "Guru Meditation" condition. This condition indicates an
552 internal VMM (virtual machine manager) failure which may happen as a
553 result of either an unhandled low-level virtual hardware exception or one
554 of the recompiler exceptions (such as the <i>too-many-traps</i>
555 condition).
556
557 Note also that any online VM state may transit to the Aborted state. This
558 happens if the process that is executing the virtual machine terminates
559 unexpectedly (for example, crashes). Other than that, the Aborted state is
560 equivalent to PoweredOff.
561
562 There are also a few additional state diagrams that do not deal with
563 virtual machine execution and therefore are shown separately. The states
564 shown on these diagrams are called <i>offline VM states</i> (this includes
565 PoweredOff, Aborted and Saved too).
566
567 The first diagram shows what happens when a lengthy setup operation is
568 being executed (such as <link to="IMachine::attachDevice"/>).
569
570 <pre>
571 +----------------------------------(same state as before the call)------+
572 | |
573 +-&gt; PoweredOff --+ |
574 | | |
575 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
576 | |
577 +-&gt; Saved -------+
578 </pre>
579
580 The next two diagrams demonstrate the process of taking a snapshot of a
581 powered off virtual machine, restoring the state to that as of a snapshot
582 or deleting a snapshot, respectively.
583
584 <pre>
585 +----------------------------------(same state as before the call)------+
586 | |
587 +-&gt; PoweredOff --+ |
588 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
589 +-&gt; Aborted -----+
590
591 +-&gt; PoweredOff --+
592 | |
593 | Aborted -----+--&gt;[restoreSnapshot() ]-------&gt; RestoringSnapshot -+
594 | | [deleteSnapshot() ]-------&gt; DeletingSnapshot --+
595 +-&gt; Saved -------+ |
596 | |
597 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
598 </pre>
599
600 Note that the Saving state is present in both the offline state group and
601 online state group. Currently, the only way to determine what group is
602 assumed in a particular case is to remember the previous machine state: if
603 it was Running or Paused, then Saving is an online state, otherwise it is
604 an offline state. This inconsistency may be removed in one of the future
605 versions of VirtualBox by adding a new state.
606
607 <note internal="yes">
608 For whoever decides to touch this enum: In order to keep the
609 comparisons involving FirstOnline and LastOnline pseudo-states valid,
610 the numeric values of these states must be correspondingly updated if
611 needed: for any online VM state, the condition
612 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
613 @c true. The same relates to transient states for which
614 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
615 @c true.
616 </note>
617 </desc>
618
619 <const name="Null" value="0">
620 <desc>Null value (never used by the API).</desc>
621 </const>
622 <const name="PoweredOff" value="1">
623 <desc>
624 The machine is not running and has no saved execution state; it has
625 either never been started or been shut down successfully.
626 </desc>
627 </const>
628 <const name="Saved" value="2">
629 <desc>
630 The machine is not currently running, but the execution state of the machine
631 has been saved to an external file when it was running, from where
632 it can be resumed.
633 </desc>
634 </const>
635 <const name="Teleported" value="3">
636 <desc>
637 The machine was teleported to a different host (or process) and then
638 powered off. Take care when powering it on again may corrupt resources
639 it shares with the teleportation target (e.g. disk and network).
640 </desc>
641 </const>
642 <const name="Aborted" value="4">
643 <desc>
644 The process running the machine has terminated abnormally. This may
645 indicate a crash of the VM process in host execution context, or
646 the VM process has been terminated externally.
647 </desc>
648 </const>
649 <const name="Running" value="5">
650 <desc>
651 The machine is currently being executed.
652 <note internal="yes">
653 For whoever decides to touch this enum: In order to keep the
654 comparisons in the old source code valid, this state must immediately
655 precede the Paused state.
656 TODO: Lift this spectacularly wonderful restriction.
657 </note>
658 </desc>
659 </const>
660 <const name="Paused" value="6">
661 <desc>
662 Execution of the machine has been paused.
663 <note internal="yes">
664 For whoever decides to touch this enum: In order to keep the
665 comparisons in the old source code valid, this state must immediately
666 follow the Running state.
667 TODO: Lift this spectacularly wonderful restriction.
668 </note>
669 </desc>
670 </const>
671 <const name="Stuck" value="7">
672 <desc>
673 Execution of the machine has reached the "Guru Meditation"
674 condition. This indicates a severe error in the hypervisor itself.
675 <note internal="yes">
676 bird: Why this uncool name? Could we rename it to "GuruMeditation" or
677 "Guru", perhaps? Or are there some other VMM states that are
678 intended to be lumped in here as well?
679 </note>
680 </desc>
681 </const>
682 <const name="Teleporting" value="8">
683 <desc>
684 The machine is about to be teleported to a different host or process.
685 It is possible to pause a machine in this state, but it will go to the
686 @c TeleportingPausedVM state and it will not be
687 possible to resume it again unless the teleportation fails.
688 </desc>
689 </const>
690 <const name="LiveSnapshotting" value="9">
691 <desc>
692 A live snapshot is being taken. The machine is running normally, but
693 some of the runtime configuration options are inaccessible. Also, if
694 paused while in this state it will transition to
695 @c Saving and it will not be resume the
696 execution until the snapshot operation has completed.
697 </desc>
698 </const>
699 <const name="Starting" value="10">
700 <desc>
701 Machine is being started after powering it on from a
702 zero execution state.
703 </desc>
704 </const>
705 <const name="Stopping" value="11">
706 <desc>
707 Machine is being normally stopped powering it off, or after the guest OS
708 has initiated a shutdown sequence.
709 </desc>
710 </const>
711 <const name="Saving" value="12">
712 <desc>
713 Machine is saving its execution state to a file, or an online
714 snapshot of the machine is being taken.
715 </desc>
716 </const>
717 <const name="Restoring" value="13">
718 <desc>
719 Execution state of the machine is being restored from a file
720 after powering it on from the saved execution state.
721 </desc>
722 </const>
723 <const name="TeleportingPausedVM" value="14">
724 <desc>
725 The machine is being teleported to another host or process, but it is
726 not running. This is the paused variant of the
727 @c state.
728 </desc>
729 </const>
730 <const name="TeleportingIn" value="15">
731 <desc>
732 Teleporting the machine state in from another host or process.
733 </desc>
734 </const>
735 <const name="FaultTolerantSyncing" value="16">
736 <desc>
737 The machine is being synced with a fault tolerant VM running elsewhere.
738 </desc>
739 </const>
740 <const name="DeletingSnapshotOnline" value="17">
741 <desc>
742 Like @c DeletingSnapshot, but the merging of media is ongoing in
743 the background while the machine is running.
744 </desc>
745 </const>
746 <const name="DeletingSnapshotPaused" value="18">
747 <desc>
748 Like @c DeletingSnapshotOnline, but the machine was paused when the
749 merging of differencing media was started.
750 </desc>
751 </const>
752 <const name="RestoringSnapshot" value="19">
753 <desc>
754 A machine snapshot is being restored; this typically does not take long.
755 </desc>
756 </const>
757 <const name="DeletingSnapshot" value="20">
758 <desc>
759 A machine snapshot is being deleted; this can take a long time since this
760 may require merging differencing media. This value indicates that the
761 machine is not running while the snapshot is being deleted.
762 </desc>
763 </const>
764 <const name="SettingUp" value="21">
765 <desc>
766 Lengthy setup operation is in progress.
767 </desc>
768 </const>
769
770 <const name="FirstOnline" value="5" wsmap="suppress"> <!-- Running -->
771 <desc>
772 Pseudo-state: first online state (for use in relational expressions).
773 </desc>
774 </const>
775 <const name="LastOnline" value="18" wsmap="suppress"> <!-- DeletingSnapshotPaused -->
776 <desc>
777 Pseudo-state: last online state (for use in relational expressions).
778 </desc>
779 </const>
780
781 <const name="FirstTransient" value="8" wsmap="suppress"> <!-- Teleporting -->
782 <desc>
783 Pseudo-state: first transient state (for use in relational expressions).
784 </desc>
785 </const>
786 <const name="LastTransient" value="21" wsmap="suppress"> <!-- SettingUp -->
787 <desc>
788 Pseudo-state: last transient state (for use in relational expressions).
789 </desc>
790 </const>
791
792 </enum>
793
794 <enum
795 name="SessionState"
796 uuid="cf2700c0-ea4b-47ae-9725-7810114b94d8"
797 >
798 <desc>
799 Session state. This enumeration represents possible values of
800 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
801 attributes.
802 </desc>
803
804 <const name="Null" value="0">
805 <desc>Null value (never used by the API).</desc>
806 </const>
807 <const name="Unlocked" value="1">
808 <desc>
809 In <link to="IMachine::sessionState"/>, this means that the machine
810 is not locked for any sessions.
811
812 In <link to="ISession::state"/>, this means that no machine is
813 currently locked for this session.
814 </desc>
815 </const>
816 <const name="Locked" value="2">
817 <desc>
818 In <link to="IMachine::sessionState"/>, this means that the machine
819 is currently locked for a session, whose process identifier can
820 then be found in the <link to="IMachine::sessionPid" /> attribute.
821
822 In <link to="ISession::state"/>, this means that a machine is
823 currently locked for this session, and the mutable machine object
824 can be found in the <link to="ISession::machine"/> attribute
825 (see <link to="IMachine::lockMachine" /> for details).
826 </desc>
827 </const>
828 <const name="Spawning" value="3">
829 <desc>
830 A new process is being spawned for the machine as a result of
831 <link to="IMachine::launchVMProcess"/> call. This state also occurs
832 as a short transient state during an <link to="IMachine::lockMachine"/>
833 call.
834 </desc>
835 </const>
836 <const name="Unlocking" value="4">
837 <desc>
838 The session is being unlocked.
839 </desc>
840 </const>
841 </enum>
842
843 <enum
844 name="CPUPropertyType"
845 uuid="24d356a6-2f45-4abd-b977-1cbe9c4701f5"
846 >
847 <desc>
848 Virtual CPU property type. This enumeration represents possible values of the
849 IMachine get- and setCPUProperty methods.
850 </desc>
851 <const name="Null" value="0">
852 <desc>Null value (never used by the API).</desc>
853 </const>
854 <const name="PAE" value="1">
855 <desc>
856 This setting determines whether VirtualBox will expose the Physical Address
857 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
858 is not available, it will not be reported.
859 </desc>
860 </const>
861 <const name="Synthetic" value="2">
862 <desc>
863 This setting determines whether VirtualBox will expose a synthetic CPU to the guest to allow
864 teleporting between host systems that differ significantly.
865 </desc>
866 </const>
867 </enum>
868
869
870 <enum
871 name="HWVirtExPropertyType"
872 uuid="ce81dfdd-d2b8-4a90-bbea-40ee8b7ffcee"
873 >
874 <desc>
875 Hardware virtualization property type. This enumeration represents possible values
876 for the <link to="IMachine::getHWVirtExProperty"/> and
877 <link to="IMachine::setHWVirtExProperty"/> methods.
878 </desc>
879 <const name="Null" value="0">
880 <desc>Null value (never used by the API).</desc>
881 </const>
882 <const name="Enabled" value="1">
883 <desc>
884 Whether hardware virtualization (VT-x/AMD-V) is enabled at all. If
885 such extensions are not available, they will not be used.
886 </desc>
887 </const>
888 <const name="Exclusive" value="2">
889 <desc>
890 Whether hardware virtualization is used exclusively by VirtualBox. When enabled,
891 VirtualBox assumes it can acquire full and exclusive access to the VT-x or AMD-V
892 feature of the host. To share these with other hypervisors, you must disable this property.
893 </desc>
894 </const>
895 <const name="VPID" value="3">
896 <desc>
897 Whether VT-x VPID is enabled. If this extension is not available, it will not be used.
898 </desc>
899 </const>
900 <const name="NestedPaging" value="4">
901 <desc>
902 Whether Nested Paging is enabled. If this extension is not available, it will not be used.
903 </desc>
904 </const>
905 <const name="LargePages" value="5">
906 <desc>
907 Whether large page allocation is enabled; requires nested paging and a 64 bits host.
908 </desc>
909 </const>
910 <const name="Force" value="6">
911 <desc>
912 Whether the VM should fail to start if hardware virtualization (VT-x/AMD-V) cannot be used. If
913 not set, there will be an automatic fallback to software virtualization.
914 </desc>
915 </const>
916 </enum>
917
918 <enum
919 name="FaultToleranceState"
920 uuid="5124f7ec-6b67-493c-9dee-ee45a44114e1"
921 >
922 <desc>
923 Used with <link to="IMachine::faultToleranceState" />.
924 </desc>
925 <const name="Inactive" value="1">
926 <desc>No fault tolerance enabled.</desc>
927 </const>
928 <const name="Master" value="2">
929 <desc>Fault tolerant master VM.</desc>
930 </const>
931 <const name="Standby" value="3">
932 <desc>Fault tolerant standby VM.</desc>
933 </const>
934 </enum>
935
936 <enum
937 name="LockType"
938 uuid="138b53f8-db4b-47c5-b32b-4ef52f769413"
939 >
940 <desc>
941 Used with <link to="IMachine::lockMachine" />.
942 </desc>
943 <const name="Write" value="2">
944 <desc>Lock the machine for writing.</desc>
945 </const>
946 <const name="Shared" value="1">
947 <desc>Request only a shared read lock for remote-controlling the machine.</desc>
948 </const>
949 </enum>
950
951 <enum
952 name="SessionType"
953 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
954 >
955 <desc>
956 Session type. This enumeration represents possible values of the
957 <link to="ISession::type"/> attribute.
958 </desc>
959
960 <const name="Null" value="0">
961 <desc>Null value (never used by the API).</desc>
962 </const>
963 <const name="WriteLock" value="1">
964 <desc>
965 Session has acquired an exclusive write lock on a machine
966 using <link to="IMachine::lockMachine"/>.
967 </desc>
968 </const>
969 <const name="Remote" value="2">
970 <desc>
971 Session has launched a VM process using
972 <link to="IMachine::launchVMProcess"/>
973 </desc>
974 </const>
975 <const name="Shared" value="3">
976 <desc>
977 Session has obtained a link to another session using
978 <link to="IMachine::lockMachine"/>
979 </desc>
980 </const>
981 </enum>
982
983 <enum
984 name="DeviceType"
985 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
986 >
987 <desc>
988 Device type.
989 </desc>
990 <const name="Null" value="0">
991 <desc>
992 Null value, may also mean "no device" (not allowed for
993 <link to="IConsole::getDeviceActivity"/>).
994 </desc>
995 </const>
996 <const name="Floppy" value="1">
997 <desc>Floppy device.</desc>
998 </const>
999 <const name="DVD" value="2">
1000 <desc>CD/DVD-ROM device.</desc>
1001 </const>
1002 <const name="HardDisk" value="3">
1003 <desc>Hard disk device.</desc>
1004 </const>
1005 <const name="Network" value="4">
1006 <desc>Network device.</desc>
1007 </const>
1008 <const name="USB" value="5">
1009 <desc>USB device.</desc>
1010 </const>
1011 <const name="SharedFolder" value="6">
1012 <desc>Shared folder device.</desc>
1013 </const>
1014 </enum>
1015
1016 <enum
1017 name="DeviceActivity"
1018 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
1019 >
1020 <desc>
1021 Device activity for <link to="IConsole::getDeviceActivity"/>.
1022 </desc>
1023
1024 <const name="Null" value="0"/>
1025 <const name="Idle" value="1"/>
1026 <const name="Reading" value="2"/>
1027 <const name="Writing" value="3"/>
1028 </enum>
1029
1030 <enum
1031 name="ClipboardMode"
1032 uuid="33364716-4008-4701-8f14-be0fa3d62950"
1033 >
1034 <desc>
1035 Host-Guest clipboard interchange mode.
1036 </desc>
1037
1038 <const name="Disabled" value="0"/>
1039 <const name="HostToGuest" value="1"/>
1040 <const name="GuestToHost" value="2"/>
1041 <const name="Bidirectional" value="3"/>
1042 </enum>
1043
1044 <enum
1045 name="Scope"
1046 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
1047 >
1048 <desc>
1049 Scope of the operation.
1050
1051 A generic enumeration used in various methods to define the action or
1052 argument scope.
1053 </desc>
1054
1055 <const name="Global" value="0"/>
1056 <const name="Machine" value="1"/>
1057 <const name="Session" value="2"/>
1058 </enum>
1059
1060 <enum
1061 name="BIOSBootMenuMode"
1062 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
1063 >
1064 <desc>
1065 BIOS boot menu mode.
1066 </desc>
1067
1068 <const name="Disabled" value="0"/>
1069 <const name="MenuOnly" value="1"/>
1070 <const name="MessageAndMenu" value="2"/>
1071 </enum>
1072
1073 <enum
1074 name="ProcessorFeature"
1075 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
1076 >
1077 <desc>
1078 CPU features.
1079 </desc>
1080
1081 <const name="HWVirtEx" value="0"/>
1082 <const name="PAE" value="1"/>
1083 <const name="LongMode" value="2"/>
1084 <const name="NestedPaging" value="3"/>
1085 </enum>
1086
1087 <enum
1088 name="FirmwareType"
1089 uuid="b903f264-c230-483e-ac74-2b37ce60d371"
1090 >
1091 <desc>
1092 Firmware type.
1093 </desc>
1094 <const name="BIOS" value="1">
1095 <desc>BIOS Firmware.</desc>
1096 </const>
1097 <const name="EFI" value="2">
1098 <desc>EFI Firmware, bitness detetced basing on OS type.</desc>
1099 </const>
1100 <const name="EFI32" value="3">
1101 <desc>Efi firmware, 32-bit.</desc>
1102 </const>
1103 <const name="EFI64" value="4">
1104 <desc>Efi firmware, 64-bit.</desc>
1105 </const>
1106 <const name="EFIDUAL" value="5">
1107 <desc>Efi firmware, combined 32 and 64-bit.</desc>
1108 </const>
1109 </enum>
1110
1111 <enum
1112 name="PointingHidType"
1113 uuid="0d3c17a2-821a-4b2e-ae41-890c6c60aa97"
1114 >
1115 <desc>
1116 Type of pointing device used in a virtual machine.
1117 </desc>
1118 <const name="None" value="1">
1119 <desc>No mouse.</desc>
1120 </const>
1121 <const name="PS2Mouse" value="2">
1122 <desc>PS/2 auxillary device, a.k.a. mouse.</desc>
1123 </const>
1124 <const name="USBMouse" value="3">
1125 <desc>USB mouse (relative pointer).</desc>
1126 </const>
1127 <const name="USBTablet" value="4">
1128 <desc>USB tablet (absolute pointer).</desc>
1129 </const>
1130 <const name="ComboMouse" value="5">
1131 <desc>Combined device, working as PS/2 or USB mouse, depending on guest behavior.
1132 Using of such device can have negative performance implications. </desc>
1133 </const>
1134 </enum>
1135
1136 <enum
1137 name="KeyboardHidType"
1138 uuid="5a5b0996-3a3e-44bb-9019-56979812cbcc"
1139 >
1140 <desc>
1141 Type of keyboard device used in a virtual machine.
1142 </desc>
1143 <const name="None" value="1">
1144 <desc>No keyboard.</desc>
1145 </const>
1146 <const name="PS2Keyboard" value="2">
1147 <desc>PS/2 keyboard.</desc>
1148 </const>
1149 <const name="USBKeyboard" value="3">
1150 <desc>USB keyboard.</desc>
1151 </const>
1152 <const name="ComboKeyboard" value="4">
1153 <desc>Combined device, working as PS/2 or USB keyboard, depending on guest behavior.
1154 Using of such device can have negative performance implications. </desc>
1155 </const>
1156 </enum>
1157
1158 <!--
1159 // IVirtualBoxErrorInfo
1160 /////////////////////////////////////////////////////////////////////////
1161 -->
1162
1163 <interface
1164 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1165 uuid="e053d3c0-f493-491b-a735-3a9f0b1feed4"
1166 supportsErrorInfo="no"
1167 wsmap="managed"
1168 >
1169 <desc>
1170 The IVirtualBoxErrorInfo interface represents extended error information.
1171
1172 Extended error information can be set by VirtualBox components after
1173 unsuccessful or partially successful method invocation. This information
1174 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1175 and then shown to the client in addition to the plain 32-bit result code.
1176
1177 In MS COM, this interface extends the IErrorInfo interface,
1178 in XPCOM, it extends the nsIException interface. In both cases,
1179 it provides a set of common attributes to retrieve error
1180 information.
1181
1182 Sometimes invocation of some component's method may involve methods of
1183 other components that may also fail (independently of this method's
1184 failure), or a series of non-fatal errors may precede a fatal error that
1185 causes method failure. In cases like that, it may be desirable to preserve
1186 information about all errors happened during method invocation and deliver
1187 it to the caller. The <link to="#next"/> attribute is intended
1188 specifically for this purpose and allows to represent a chain of errors
1189 through a single IVirtualBoxErrorInfo object set after method invocation.
1190
1191 Note that errors are stored to a chain in the reverse order, i.e. the
1192 initial error object you query right after method invocation is the last
1193 error set by the callee, the object it points to in the @a next attribute
1194 is the previous error and so on, up to the first error (which is the last
1195 in the chain).
1196 </desc>
1197
1198 <attribute name="resultCode" type="long" readonly="yes">
1199 <desc>
1200 Result code of the error.
1201 Usually, it will be the same as the result code returned
1202 by the method that provided this error information, but not
1203 always. For example, on Win32, CoCreateInstance() will most
1204 likely return E_NOINTERFACE upon unsuccessful component
1205 instantiation attempt, but not the value the component factory
1206 returned. Value is typed 'long', not 'result',
1207 to make interface usable from scripting languages.
1208 <note>
1209 In MS COM, there is no equivalent.
1210 In XPCOM, it is the same as nsIException::result.
1211 </note>
1212 </desc>
1213 </attribute>
1214
1215 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1216 <desc>
1217 UUID of the interface that defined the error.
1218 <note>
1219 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1220 data type.
1221 In XPCOM, there is no equivalent.
1222 </note>
1223 </desc>
1224 </attribute>
1225
1226 <attribute name="component" type="wstring" readonly="yes">
1227 <desc>
1228 Name of the component that generated the error.
1229 <note>
1230 In MS COM, it is the same as IErrorInfo::GetSource.
1231 In XPCOM, there is no equivalent.
1232 </note>
1233 </desc>
1234 </attribute>
1235
1236 <attribute name="text" type="wstring" readonly="yes">
1237 <desc>
1238 Text description of the error.
1239 <note>
1240 In MS COM, it is the same as IErrorInfo::GetDescription.
1241 In XPCOM, it is the same as nsIException::message.
1242 </note>
1243 </desc>
1244 </attribute>
1245
1246 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1247 <desc>
1248 Next error object if there is any, or @c null otherwise.
1249 <note>
1250 In MS COM, there is no equivalent.
1251 In XPCOM, it is the same as nsIException::inner.
1252 </note>
1253 </desc>
1254 </attribute>
1255
1256 </interface>
1257
1258 <!--
1259 // IVirtualBox
1260 /////////////////////////////////////////////////////////////////////////
1261 -->
1262
1263 <interface
1264 name="IDHCPServer" extends="$unknown"
1265 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1266 wsmap="managed"
1267 >
1268 <desc>
1269 The IDHCPServer interface represents the vbox dhcp server configuration.
1270
1271 To enumerate all the dhcp servers on the host, use the
1272 <link to="IVirtualBox::DHCPServers"/> attribute.
1273 </desc>
1274
1275 <attribute name="enabled" type="boolean">
1276 <desc>
1277 specifies if the dhcp server is enabled
1278 </desc>
1279 </attribute>
1280
1281 <attribute name="IPAddress" type="wstring" readonly="yes">
1282 <desc>
1283 specifies server IP
1284 </desc>
1285 </attribute>
1286
1287 <attribute name="networkMask" type="wstring" readonly="yes">
1288 <desc>
1289 specifies server network mask
1290 </desc>
1291 </attribute>
1292
1293 <attribute name="networkName" type="wstring" readonly="yes">
1294 <desc>
1295 specifies internal network name the server is used for
1296 </desc>
1297 </attribute>
1298
1299 <attribute name="lowerIP" type="wstring" readonly="yes">
1300 <desc>
1301 specifies from IP adrres in server address range
1302 </desc>
1303 </attribute>
1304
1305 <attribute name="upperIP" type="wstring" readonly="yes">
1306 <desc>
1307 specifies to IP adrres in server address range
1308 </desc>
1309 </attribute>
1310
1311 <method name="setConfiguration">
1312 <desc>
1313 configures the server
1314 <result name="E_INVALIDARG">
1315 invalid configuration supplied
1316 </result>
1317 </desc>
1318 <param name="IPAddress" type="wstring" dir="in">
1319 <desc>
1320 server IP address
1321 </desc>
1322 </param>
1323 <param name="networkMask" type="wstring" dir="in">
1324 <desc>
1325 server network mask
1326 </desc>
1327 </param>
1328 <param name="FromIPAddress" type="wstring" dir="in">
1329 <desc>
1330 server From IP address for address range
1331 </desc>
1332 </param>
1333 <param name="ToIPAddress" type="wstring" dir="in">
1334 <desc>
1335 server To IP address for address range
1336 </desc>
1337 </param>
1338 </method>
1339
1340 <method name="start">
1341 <desc>
1342 Starts DHCP server process.
1343 <result name="E_FAIL">
1344 Failed to start the process.
1345 </result>
1346 </desc>
1347 <param name="networkName" type="wstring" dir="in">
1348 <desc>
1349 Name of internal network DHCP server should attach to.
1350 </desc>
1351 </param>
1352 <param name="trunkName" type="wstring" dir="in">
1353 <desc>
1354 Name of internal network trunk.
1355 </desc>
1356 </param>
1357 <param name="trunkType" type="wstring" dir="in">
1358 <desc>
1359 Type of internal network trunk.
1360 </desc>
1361 </param>
1362 </method>
1363
1364 <method name="stop">
1365 <desc>
1366 Stops DHCP server process.
1367 <result name="E_FAIL">
1368 Failed to stop the process.
1369 </result>
1370 </desc>
1371 </method>
1372 </interface>
1373
1374 <interface
1375 name="IVirtualBox" extends="$unknown"
1376 uuid="ec6cc7e7-06a2-4c5d-8993-1e3619c53817"
1377 wsmap="managed"
1378 >
1379 <desc>
1380 The IVirtualBox interface represents the main interface exposed by the
1381 product that provides virtual machine management.
1382
1383 An instance of IVirtualBox is required for the product to do anything
1384 useful. Even though the interface does not expose this, internally,
1385 IVirtualBox is implemented as a singleton and actually lives in the
1386 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1387 IVirtualBox can track the state of all virtual machines on a particular
1388 host, regardless of which frontend started them.
1389
1390 To enumerate all the virtual machines on the host, use the
1391 <link to="IVirtualBox::machines"/> attribute.
1392 </desc>
1393
1394 <attribute name="version" type="wstring" readonly="yes">
1395 <desc>
1396 A string representing the version number of the product. The
1397 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1398 last number represents the build number and will frequently change.
1399 </desc>
1400 </attribute>
1401
1402 <attribute name="revision" type="unsigned long" readonly="yes">
1403 <desc>
1404 The internal build revision number of the product.
1405 </desc>
1406 </attribute>
1407
1408 <attribute name="packageType" type="wstring" readonly="yes">
1409 <desc>
1410 A string representing the package type of this product. The
1411 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1412 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1413 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1414 this.
1415 </desc>
1416 </attribute>
1417
1418 <attribute name="homeFolder" type="wstring" readonly="yes">
1419 <desc>
1420 Full path to the directory where the global settings file,
1421 <tt>VirtualBox.xml</tt>, is stored.
1422
1423 In this version of VirtualBox, the value of this property is
1424 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1425 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1426 as determined by the host OS), and cannot be changed.
1427
1428 This path is also used as the base to resolve relative paths in
1429 places where relative paths are allowed (unless otherwise
1430 expressly indicated).
1431 </desc>
1432 </attribute>
1433
1434 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1435 <desc>
1436 Full name of the global settings file.
1437 The value of this property corresponds to the value of
1438 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1439 </desc>
1440 </attribute>
1441
1442 <attribute name="host" type="IHost" readonly="yes">
1443 <desc>Associated host object.</desc>
1444 </attribute>
1445
1446 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1447 <desc>Associated system information object.</desc>
1448 </attribute>
1449
1450 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1451 <desc>
1452 Array of machine objects registered within this VirtualBox instance.
1453 </desc>
1454 </attribute>
1455
1456 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1457 <desc>
1458 Array of medium objects known to this VirtualBox installation.
1459
1460 This array contains only base media. All differencing
1461 media of the given base medium can be enumerated using
1462 <link to="IMedium::children"/>.
1463 </desc>
1464 </attribute>
1465
1466 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1467 <desc>
1468 Array of CD/DVD image objects currently in use by this VirtualBox instance.
1469 </desc>
1470 </attribute>
1471
1472 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1473 <desc>
1474 Array of floppy image objects currently in use by this VirtualBox instance.
1475 </desc>
1476 </attribute>
1477
1478 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1479
1480 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1481
1482 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1483 <desc>
1484 Collection of global shared folders. Global shared folders are
1485 available to all virtual machines.
1486
1487 New shared folders are added to the collection using
1488 <link to="#createSharedFolder"/>. Existing shared folders can be
1489 removed using <link to="#removeSharedFolder"/>.
1490
1491 <note>
1492 In the current version of the product, global shared folders are not
1493 implemented and therefore this collection is always empty.
1494 </note>
1495 </desc>
1496 </attribute>
1497
1498 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1499 <desc>
1500 Associated performance collector object.
1501 </desc>
1502 </attribute>
1503
1504 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1505 <desc>
1506 dhcp server settings.
1507 </desc>
1508 </attribute>
1509
1510 <attribute name="eventSource" type="IEventSource" readonly="yes">
1511 <desc>
1512 Event source for VirtualBox events.
1513 </desc>
1514 </attribute>
1515
1516
1517 <method name="createMachine">
1518 <desc>
1519 Creates a new virtual machine.
1520
1521 The new machine is created unregistered, with the initial configuration
1522 set according to the specified guest OS type. A typical sequence of
1523 actions to create a new virtual machine is as follows:
1524
1525 <ol>
1526 <li>
1527 Call this method to have a new machine created. The returned machine
1528 object will be "mutable" allowing to change any machine property.
1529 </li>
1530
1531 <li>
1532 Configure the machine using the appropriate attributes and methods.
1533 </li>
1534
1535 <li>
1536 Call <link to="IMachine::saveSettings" /> to write the settings
1537 to the machine's XML settings file. The configuration of the newly
1538 created machine will not be saved to disk until this method is
1539 called.
1540 </li>
1541
1542 <li>
1543 Call <link to="#registerMachine" /> to add the machine to the list
1544 of machines known to VirtualBox.
1545 </li>
1546 </ol>
1547
1548 You should specify valid name for the newly created machine when calling
1549 this method. See the <link to="IMachine::name"/> attribute description
1550 for more details about the machine name.
1551
1552 The specified guest OS type identifier must match an ID of one of known
1553 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1554 array.
1555
1556 Every machine has a <i>settings file</i> that is used to store
1557 the machine configuration. This file is stored in a directory called the
1558 <i>machine settings subfolder</i>. Both the settings subfolder and file
1559 will have a name that corresponds to the name of the virtual machine.
1560 You can specify where to create the machine setting subfolder using the
1561 @a baseFolder argument. The base folder can be absolute (full path) or
1562 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1563 directory</link>.
1564
1565 If @a baseFolder is a @c null or empty string (which is recommended), the
1566 <link to="ISystemProperties::defaultMachineFolder">default machine
1567 settings folder</link> will be used as a base folder for the created
1568 machine. Otherwise the given base folder will be used. In either case,
1569 the full path to the resulting settings file has the following
1570 structure:
1571 <pre>
1572 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1573 </pre>
1574
1575 Note that if the resulting settings file already exists, this method
1576 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1577
1578 Optionally, you may specify an UUID of to assign to the created machine.
1579 However, this is not recommended and you should normally pass an empty
1580 (@c null) UUID to this method so that a new UUID will be automatically
1581 generated for every created machine. You can use UUID
1582 00000000-0000-0000-0000-000000000000 as @c null value.
1583
1584 <note>
1585 There is no way to change the name of the settings file or
1586 subfolder of the created machine directly.
1587 </note>
1588
1589 <result name="VBOX_E_OBJECT_NOT_FOUND">
1590 @a osTypeId is invalid.
1591 </result>
1592 <result name="VBOX_E_FILE_ERROR">
1593 Resulting settings file name is invalid or the settings file already
1594 exists or could not be created due to an I/O error.
1595 </result>
1596 <result name="E_INVALIDARG">
1597 @a name is empty or @c null.
1598 </result>
1599 </desc>
1600
1601 <param name="name" type="wstring" dir="in">
1602 <desc>Machine name.</desc>
1603 </param>
1604 <param name="osTypeId" type="wstring" dir="in">
1605 <desc>Guest OS Type ID.</desc>
1606 </param>
1607 <param name="baseFolder" type="wstring" dir="in">
1608 <desc>Base machine folder (optional).</desc>
1609 </param>
1610 <param name="id" type="uuid" mod="string" dir="in">
1611 <desc>Machine UUID (optional).</desc>
1612 </param>
1613 <param name="override" type="boolean" dir="in">
1614 <desc>Create the VM even if there are conflicting files.</desc>
1615 </param>
1616 <param name="machine" type="IMachine" dir="return">
1617 <desc>Created machine object.</desc>
1618 </param>
1619 </method>
1620
1621 <method name="openMachine">
1622 <desc>
1623 Opens a virtual machine from the existing settings file.
1624 The opened machine remains unregistered until you call
1625 <link to="#registerMachine"/>.
1626
1627 The specified settings file name can be absolute
1628 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1629 VirtualBox home directory</link>. This file must exist
1630 and must be a valid machine settings file whose contents
1631 will be used to construct the machine object.
1632
1633 <result name="VBOX_E_FILE_ERROR">
1634 Settings file name invalid, not found or sharing violation.
1635 </result>
1636 </desc>
1637 <param name="settingsFile" type="wstring" dir="in">
1638 <desc>
1639 Name of the machine settings file.
1640 </desc>
1641 </param>
1642 <param name="machine" type="IMachine" dir="return">
1643 <desc>Opened machine object.</desc>
1644 </param>
1645 <note>
1646 <link to="IMachine::settingsModified"/> will return
1647 @c false for the created machine, until any of machine settings
1648 are changed.
1649 </note>
1650 </method>
1651
1652 <method name="registerMachine">
1653 <desc>
1654
1655 Registers the machine previously created using
1656 <link to="#createMachine"/> or opened using
1657 <link to="#openMachine"/> within this VirtualBox installation. After
1658 successful method invocation, the
1659 <link to="IMachineRegisteredEvent"/> event is fired.
1660
1661 <note>
1662 This method implicitly calls <link to="IMachine::saveSettings"/>
1663 to save all current machine settings before registering it.
1664 </note>
1665
1666 <result name="VBOX_E_OBJECT_NOT_FOUND">
1667 No matching virtual machine found.
1668 </result>
1669 <result name="VBOX_E_INVALID_OBJECT_STATE">
1670 Virtual machine was not created within this VirtualBox instance.
1671 </result>
1672
1673 </desc>
1674 <param name="machine" type="IMachine" dir="in"/>
1675 </method>
1676
1677 <method name="getMachine">
1678 <desc>
1679 Attempts to find a virtual machine given its UUID.
1680 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1681 instead.
1682
1683 <result name="VBOX_E_OBJECT_NOT_FOUND">
1684 Could not find registered machine matching @a id.
1685 </result>
1686
1687 </desc>
1688 <param name="id" type="uuid" mod="string" dir="in"/>
1689 <param name="machine" type="IMachine" dir="return"/>
1690 </method>
1691
1692 <method name="findMachine">
1693 <desc>
1694 Attempts to find a virtual machine given its name.
1695 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1696 instead.
1697
1698 <result name="VBOX_E_OBJECT_NOT_FOUND">
1699 Could not find registered machine matching @a name.
1700 </result>
1701
1702 </desc>
1703 <param name="name" type="wstring" dir="in"/>
1704 <param name="machine" type="IMachine" dir="return"/>
1705 </method>
1706
1707 <method name="createAppliance">
1708 <desc>
1709 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1710 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1711 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1712 </desc>
1713 <param name="appliance" type="IAppliance" dir="return">
1714 <desc>New appliance.</desc>
1715 </param>
1716 </method>
1717
1718 <method name="createHardDisk">
1719 <desc>
1720 Creates a new base medium object that will use the given storage
1721 format and location for medium data.
1722
1723 Note that the actual storage unit is not created by this method. In
1724 order to do it, and before you are able to attach the created medium
1725 to virtual machines, you must call one of the following methods to
1726 allocate a format-specific storage unit at the specified location:
1727 <ul>
1728 <li><link to="IMedium::createBaseStorage"/></li>
1729 <li><link to="IMedium::createDiffStorage"/></li>
1730 </ul>
1731
1732 Some medium attributes, such as <link to="IMedium::id"/>, may
1733 remain uninitialized until the medium storage unit is successfully
1734 created by one of the above methods.
1735
1736 After the storage unit is successfully created, it will be
1737 accessible through the <link to="#findMedium"/> method and can
1738 be found in the <link to="#hardDisks"/> array.
1739
1740 The list of all storage formats supported by this VirtualBox
1741 installation can be obtained using
1742 <link to="ISystemProperties::mediumFormats"/>. If the @a format
1743 attribute is empty or @c null then the default storage format
1744 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1745 be used for creating a storage unit of the medium.
1746
1747 Note that the format of the location string is storage format specific.
1748 See <link to="IMedium::location"/>, IMedium and
1749 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1750
1751 <result name="VBOX_E_OBJECT_NOT_FOUND">
1752 @a format identifier is invalid. See
1753 <link to="ISystemProperties::mediumFormats"/>.
1754 </result>
1755 <result name="VBOX_E_FILE_ERROR">
1756 @a location is a not valid file name (for file-based formats only).
1757 </result>
1758 </desc>
1759 <param name="format" type="wstring" dir="in">
1760 <desc>
1761 Identifier of the storage format to use for the new medium.
1762 </desc>
1763 </param>
1764 <param name="location" type="wstring" dir="in">
1765 <desc>
1766 Location of the storage unit for the new medium.
1767 </desc>
1768 </param>
1769 <param name="medium" type="IMedium" dir="return">
1770 <desc>Created medium object.</desc>
1771 </param>
1772 </method>
1773
1774 <method name="openMedium">
1775 <desc>
1776 Opens a medium from an existing storage location.
1777
1778 Once a medium has been opened, it can be passed to other VirtualBox
1779 methods, in particular to <link to="IMachine::attachDevice" />.
1780
1781 Depending on the given device type, the file at the storage location
1782 must be in one of the media formats understood by VirtualBox:
1783
1784 <ul>
1785 <li>With a "HardDisk" device type, the file must be a hard disk image
1786 in one of the formats supported by VirtualBox (see
1787 <link to="ISystemProperties::mediumFormats" />).
1788 After this method succeeds, if the medium is a base medium, it
1789 will be added to the <link to="#hardDisks"/> array attribute. </li>
1790 <li>With a "DVD" device type, the file must be an ISO 9960 CD/DVD image.
1791 After this method succeeds, the medium will be added to the
1792 <link to="#DVDImages"/> array attribute.</li>
1793 <li>With a "Floppy" device type, the file must be an RAW floppy image.
1794 After this method succeeds, the medium will be added to the
1795 <link to="#floppyImages"/> array attribute.</li>
1796 </ul>
1797
1798 After having been opened, the medium can be found by the <link to="#findMedium"/>
1799 method and can be attached to virtual machines. See <link to="IMedium" /> for more details.
1800
1801 The UUID of the newly opened medium will either be retrieved from the
1802 storage location, if the format supports it (e.g. for hard disk images),
1803 or a new UUID will be randomly generated (e.g. for ISO and RAW files).
1804 If for some reason you need to change the medium's UUID, use
1805 <link to="IMedium::setIDs" />.
1806
1807 If a differencing hard disk medium is to be opened by this method, the
1808 operation will succeed only if its parent medium and all ancestors,
1809 if any, are already known to this VirtualBox installation (for example,
1810 were opened by this method before).
1811
1812 This method attempts to guess the storage format of the specified medium
1813 by reading medium data at the specified location.
1814
1815 If @a accessMode is ReadWrite (which it should be for hard disks and floppies),
1816 the image is opened for read/write access and must have according permissions,
1817 as VirtualBox may actually write status information into the disk's metadata
1818 sections.
1819
1820 Note that write access is required for all typical hard disk usage in VirtualBox,
1821 since VirtualBox may need to write metadata such as a UUID into the image.
1822 The only exception is opening a source image temporarily for copying and
1823 cloning (see <link to="IMedium::cloneTo" /> when the image will be closed
1824 again soon.
1825
1826 The format of the location string is storage format specific. See
1827 <link to="IMedium::location"/>, IMedium and
1828 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1829
1830 Prior to VirtualBox 3.3, opening a medium added it to a global media
1831 registry in the VirtualBox.xml file, which was shared between
1832 all machines and made transporting machines and their media from one
1833 host to another difficult.
1834
1835 Starting with VirtualBox 3.3, media are only added to a registry when
1836 they are attached to a machine. Machines created with VirtualBox 3.3
1837 or later can have their own media registry. As a result, a medium attached
1838 to such a machine will be remembered in that machine's XML settings file.
1839 Media attached to older machines will continue to be added to the global
1840 registry.
1841
1842 <result name="VBOX_E_FILE_ERROR">
1843 Invalid medium storage file location or could not find the medium
1844 at the specified location.
1845 </result>
1846 <result name="VBOX_E_IPRT_ERROR">
1847 Could not get medium storage format.
1848 </result>
1849 <result name="E_INVALIDARG">
1850 Invalid medium storage format.
1851 </result>
1852 <result name="VBOX_E_INVALID_OBJECT_STATE">
1853 Medium has already been added to a media registry.
1854 </result>
1855 </desc>
1856 <param name="location" type="wstring" dir="in">
1857 <desc>
1858 Location of the storage unit that contains medium data in one of
1859 the supported storage formats.
1860 </desc>
1861 </param>
1862 <param name="deviceType" type="DeviceType" dir="in">
1863 <desc>
1864 Must be one of "HardDisk", "DVD" or "Floppy".
1865 </desc>
1866 </param>
1867 <param name="accessMode" type="AccessMode" dir="in">
1868 <desc>Whether to open the image in read/write or read-only mode. For
1869 a "DVD" device type, this is ignored and read-only mode is always assumed.</desc>
1870 </param>
1871 <param name="medium" type="IMedium" dir="return">
1872 <desc>Opened medium object.</desc>
1873 </param>
1874 </method>
1875
1876 <method name="findMedium">
1877 <desc>
1878 Returns a medium of the given type that uses the given location or
1879 UUID to store medium data.
1880
1881 The given medium must be known to this VirtualBox installation, i.e.
1882 it must be previously created by <link to="#createHardDisk"/> or opened
1883 by <link to="#openMedium"/>.
1884
1885 The search is done by comparing the value of the @a location argument to
1886 the <link to="IMedium::location"/> and <link to="IMedium::id" />
1887 attributes of each known medium.
1888
1889 For locations represented by file names in the host's file system, the
1890 requested location can be a path relative to the
1891 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1892 only a file name without any path is given, the
1893 <link to="ISystemProperties::defaultHardDiskFolder"> default medium
1894 folder</link> will be prepended to the file name before searching. Note
1895 that on case sensitive file systems, a case sensitive comparison is
1896 performed, otherwise the case of symbols in the file path is ignored.
1897
1898 <result name="VBOX_E_OBJECT_NOT_FOUND">
1899 No medium object matching @a location found.
1900 </result>
1901 </desc>
1902 <param name="location" type="wstring" dir="in">
1903 <desc>What to search for. This can either be the UUID or the location string of an open medium.</desc>
1904 </param>
1905 <param name="type" type="DeviceType" dir="in">
1906 <desc>Device type (must be HardDisk, DVD or Floppy)</desc>
1907 </param>
1908 <param name="medium" type="IMedium" dir="return">
1909 <desc>Medium object, if found.</desc>
1910 </param>
1911 </method>
1912
1913 <method name="getGuestOSType">
1914 <desc>
1915 Returns an object describing the specified guest OS type.
1916
1917 The requested guest OS type is specified using a string which is a
1918 mnemonic identifier of the guest operating system, such as
1919 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
1920 particular virtual machine can be read or set using the
1921 <link to="IMachine::OSTypeId"/> attribute.
1922
1923 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
1924 available guest OS type objects. Each object has an
1925 <link to="IGuestOSType::id"/> attribute which contains an identifier of
1926 the guest OS this object describes.
1927
1928 <result name="E_INVALIDARG">
1929 @a id is not a valid Guest OS type.
1930 </result>
1931
1932 </desc>
1933 <param name="id" type="uuid" mod="string" dir="in">
1934 <desc>Guest OS type ID string.</desc>
1935 </param>
1936 <param name="type" type="IGuestOSType" dir="return">
1937 <desc>Guest OS type object.</desc>
1938 </param>
1939 </method>
1940
1941 <method name="createSharedFolder">
1942 <desc>
1943 Creates a new global shared folder by associating the given logical
1944 name with the given host path, adds it to the collection of shared
1945 folders and starts sharing it. Refer to the description of
1946 <link to="ISharedFolder"/> to read more about logical names.
1947 <note>
1948 In the current implementation, this operation is not
1949 implemented.
1950 </note>
1951 </desc>
1952 <param name="name" type="wstring" dir="in">
1953 <desc>Unique logical name of the shared folder.</desc>
1954 </param>
1955 <param name="hostPath" type="wstring" dir="in">
1956 <desc>Full path to the shared folder in the host file system.</desc>
1957 </param>
1958 <param name="writable" type="boolean" dir="in">
1959 <desc>Whether the share is writable or readonly</desc>
1960 </param>
1961 <param name="automount" type="boolean" dir="in">
1962 <desc>Whether the share gets automatically mounted by the guest
1963 or not.</desc>
1964 </param>
1965 </method>
1966
1967 <method name="removeSharedFolder">
1968 <desc>
1969 Removes the global shared folder with the given name previously
1970 created by <link to="#createSharedFolder"/> from the collection of
1971 shared folders and stops sharing it.
1972 <note>
1973 In the current implementation, this operation is not
1974 implemented.
1975 </note>
1976 </desc>
1977 <param name="name" type="wstring" dir="in">
1978 <desc>Logical name of the shared folder to remove.</desc>
1979 </param>
1980 </method>
1981
1982 <method name="getExtraDataKeys">
1983 <desc>
1984 Returns an array representing the global extra data keys which currently
1985 have values defined.
1986 </desc>
1987 <param name="value" type="wstring" dir="return" safearray="yes">
1988 <desc>Array of extra data keys.</desc>
1989 </param>
1990 </method>
1991
1992 <method name="getExtraData">
1993 <desc>
1994 Returns associated global extra data.
1995
1996 If the requested data @a key does not exist, this function will
1997 succeed and return an empty string in the @a value argument.
1998
1999 <result name="VBOX_E_FILE_ERROR">
2000 Settings file not accessible.
2001 </result>
2002 <result name="VBOX_E_XML_ERROR">
2003 Could not parse the settings file.
2004 </result>
2005
2006 </desc>
2007 <param name="key" type="wstring" dir="in">
2008 <desc>Name of the data key to get.</desc>
2009 </param>
2010 <param name="value" type="wstring" dir="return">
2011 <desc>Value of the requested data key.</desc>
2012 </param>
2013 </method>
2014
2015 <method name="setExtraData">
2016 <desc>
2017 Sets associated global extra data.
2018
2019 If you pass @c null or empty string as a key @a value, the given @a key
2020 will be deleted.
2021
2022 <note>
2023 Before performing the actual data change, this method will ask all
2024 registered event listener using the
2025 <link to="IExtraDataCanChangeEvent"/>
2026 notification for a permission. If one of the listeners refuses the
2027 new value, the change will not be performed.
2028 </note>
2029 <note>
2030 On success, the
2031 <link to="IExtraDataChangedEvent"/> notification
2032 is called to inform all registered listeners about a successful data
2033 change.
2034 </note>
2035
2036 <result name="VBOX_E_FILE_ERROR">
2037 Settings file not accessible.
2038 </result>
2039 <result name="VBOX_E_XML_ERROR">
2040 Could not parse the settings file.
2041 </result>
2042 <result name="E_ACCESSDENIED">
2043 Modification request refused.
2044 </result>
2045
2046 </desc>
2047 <param name="key" type="wstring" dir="in">
2048 <desc>Name of the data key to set.</desc>
2049 </param>
2050 <param name="value" type="wstring" dir="in">
2051 <desc>Value to assign to the key.</desc>
2052 </param>
2053 </method>
2054
2055 <method name="waitForPropertyChange">
2056 <desc>
2057 Blocks the caller until any of the properties represented by the
2058 @a what argument changes the value or until the given timeout interval
2059 expires.
2060
2061 The @a what argument is a comma separated list of property masks that
2062 describe properties the caller is interested in. The property mask is
2063 a string in the following format:
2064
2065 <pre>
2066 [[group.]subgroup.]name
2067 </pre>
2068
2069 where @c name is the property name and @c group, @c subgroup are zero
2070 or more property group specifiers. Each element (group or name) in
2071 the property mask may be either a Latin string or an asterisk symbol
2072 (@c "*") which is used to match any string for the given element. A
2073 property mask that doesn't contain asterisk symbols represents a
2074 single fully qualified property name.
2075
2076 Groups in the fully qualified property name go from more generic (the
2077 left-most part) to more specific (the right-most part). The first
2078 element is usually a name of the object the property belongs to. The
2079 second element may be either a property name, or a child object name,
2080 or an index if the preceding element names an object which is one of
2081 many objects of the same type. This way, property names form a
2082 hierarchy of properties. Here are some examples of property names:
2083
2084 <table>
2085 <tr>
2086 <td><tt>VirtualBox.version</tt></td>
2087 <td><link to="IVirtualBox::version"/> property</td>
2088 </tr>
2089 <tr>
2090 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2091 <td><link to="IMachine::name"/> property of the machine with the
2092 given UUID</td>
2093 </tr>
2094 </table>
2095
2096 Most property names directly correspond to the properties of objects
2097 (components) provided by the VirtualBox library and may be used to
2098 track changes to these properties. However, there may be
2099 pseudo-property names that don't correspond to any existing object's
2100 property directly, as well as there may be object properties that
2101 don't have a corresponding property name that is understood by this
2102 method, and therefore changes to such properties cannot be
2103 tracked. See individual object's property descriptions to get a
2104 fully qualified property name that can be used with this method (if
2105 any).
2106
2107 There is a special property mask @c "*" (i.e. a string consisting of a
2108 single asterisk symbol) that can be used to match all properties.
2109 Below are more examples of property masks:
2110
2111 <table>
2112 <tr>
2113 <td><tt>VirtualBox.*</tt></td>
2114 <td>Track all properties of the VirtualBox object</td>
2115 </tr>
2116 <tr>
2117 <td><tt>Machine.*.name</tt></td>
2118 <td>Track changes to the <link to="IMachine::name"/> property of
2119 all registered virtual machines</td>
2120 </tr>
2121 </table>
2122
2123 <note>
2124 This function is not implemented in the current version of the
2125 product.
2126 </note>
2127 </desc>
2128 <param name="what" type="wstring" dir="in">
2129 <desc>Comma separated list of property masks.</desc>
2130 </param>
2131 <param name="timeout" type="unsigned long" dir="in">
2132 <desc>
2133 Wait timeout in milliseconds.
2134 Specify -1 for an indefinite wait.
2135 </desc>
2136 </param>
2137 <param name="changed" type="wstring" dir="out">
2138 <desc>
2139 Comma separated list of properties that have been changed and caused
2140 this method to return to the caller.
2141 </desc>
2142 </param>
2143 <param name="values" type="wstring" dir="out">
2144 <desc>Reserved, not currently used.</desc>
2145 </param>
2146 </method>
2147
2148 <!--method name="createDHCPServerForInterface">
2149 <desc>
2150 Creates a dhcp server settings to be used for the given interface
2151 <result name="E_INVALIDARG">
2152 Host network interface @a name already exists.
2153 </result>
2154 </desc>
2155 <param name="interface" type="IHostNetworkInterface" dir="in">
2156 <desc>Network Interface</desc>
2157 </param>
2158 <param name="server" type="IDHCPServer" dir="out">
2159 <desc>Dhcp server settings</desc>
2160 </param>
2161 </method-->
2162
2163 <method name="createDHCPServer">
2164 <desc>
2165 Creates a dhcp server settings to be used for the given internal network name
2166 <result name="E_INVALIDARG">
2167 Host network interface @a name already exists.
2168 </result>
2169 </desc>
2170 <param name="name" type="wstring" dir="in">
2171 <desc>server name</desc>
2172 </param>
2173 <param name="server" type="IDHCPServer" dir="return">
2174 <desc>Dhcp server settings</desc>
2175 </param>
2176 </method>
2177
2178 <method name="findDHCPServerByNetworkName">
2179 <desc>
2180 Searches a dhcp server settings to be used for the given internal network name
2181 <result name="E_INVALIDARG">
2182 Host network interface @a name already exists.
2183 </result>
2184
2185 </desc>
2186 <param name="name" type="wstring" dir="in">
2187 <desc>server name</desc>
2188 </param>
2189 <param name="server" type="IDHCPServer" dir="return">
2190 <desc>Dhcp server settings</desc>
2191 </param>
2192 </method>
2193
2194 <!--method name="findDHCPServerForInterface">
2195 <desc>
2196 Searches a dhcp server settings to be used for the given interface
2197 <result name="E_INVALIDARG">
2198 Host network interface @a name already exists.
2199 </result>
2200 </desc>
2201 <param name="interface" type="IHostNetworkInterface" dir="in">
2202 <desc>Network Interface</desc>
2203 </param>
2204 <param name="server" type="IDHCPServer" dir="out">
2205 <desc>Dhcp server settings</desc>
2206 </param>
2207 </method-->
2208
2209 <method name="removeDHCPServer">
2210 <desc>
2211 Removes the dhcp server settings
2212 <result name="E_INVALIDARG">
2213 Host network interface @a name already exists.
2214 </result>
2215 </desc>
2216 <param name="server" type="IDHCPServer" dir="in">
2217 <desc>Dhcp server settings to be removed</desc>
2218 </param>
2219 </method>
2220
2221
2222 <method name="checkFirmwarePresent">
2223 <desc>
2224 Check if this VirtualBox installation has a firmware
2225 of the given type available, either system-wide or per-user.
2226 Optionally, this may return a hint where this firmware can be
2227 downloaded from.
2228 </desc>
2229 <param name="firmwareType" type="FirmwareType" dir="in">
2230 <desc>
2231 Type of firmware to check.
2232 </desc>
2233 </param>
2234 <param name="version" type="wstring" dir="in">
2235 <desc>Expected version number, usually empty string (presently ignored).</desc>
2236 </param>
2237
2238 <param name="url" type="wstring" dir="out">
2239 <desc>
2240 Suggested URL to download this firmware from.
2241 </desc>
2242 </param>
2243
2244 <param name="file" type="wstring" dir="out">
2245 <desc>
2246 Filename of firmware, only valid if result == TRUE.
2247 </desc>
2248 </param>
2249
2250 <param name="result" type="boolean" dir="return">
2251 <desc>If firmware of this type and version is available.</desc>
2252 </param>
2253 </method>
2254
2255 </interface>
2256
2257 <!--
2258 // IVFSExplorer
2259 /////////////////////////////////////////////////////////////////////////
2260 -->
2261
2262 <enum
2263 name="VFSType"
2264 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
2265 >
2266 <desc>
2267 Virtual file systems supported by VFSExplorer.
2268 </desc>
2269
2270 <const name="File" value="1" />
2271 <const name="Cloud" value="2" />
2272 <const name="S3" value="3" />
2273 <const name="WebDav" value="4" />
2274 </enum>
2275
2276 <enum
2277 name="VFSFileType"
2278 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
2279 >
2280 <desc>
2281 File types known by VFSExplorer.
2282 </desc>
2283
2284 <const name="Unknown" value="1" />
2285 <const name="Fifo" value="2" />
2286 <const name="DevChar" value="3" />
2287 <const name="Directory" value="4" />
2288 <const name="DevBlock" value="5" />
2289 <const name="File" value="6" />
2290 <const name="SymLink" value="7" />
2291 <const name="Socket" value="8" />
2292 <const name="WhiteOut" value="9" />
2293 </enum>
2294
2295 <interface
2296 name="IVFSExplorer" extends="$unknown"
2297 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
2298 wsmap="managed"
2299 >
2300 <desc>
2301 The VFSExplorer interface unifies access to different file system
2302 types. This includes local file systems as well remote file systems like
2303 S3. For a list of supported types see <link to="VFSType" />.
2304 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
2305 </desc>
2306
2307 <attribute name="path" type="wstring" readonly="yes">
2308 <desc>Returns the current path in the virtual file system.</desc>
2309 </attribute>
2310
2311 <attribute name="type" type="VFSType" readonly="yes">
2312 <desc>Returns the file system type which is currently in use.</desc>
2313 </attribute>
2314
2315 <method name="update">
2316 <desc>Updates the internal list of files/directories from the
2317 current directory level. Use <link to="#entryList" /> to get the full list
2318 after a call to this method.</desc>
2319
2320 <param name="aProgress" type="IProgress" dir="return">
2321 <desc>Progress object to track the operation completion.</desc>
2322 </param>
2323 </method>
2324
2325 <method name="cd">
2326 <desc>Change the current directory level.</desc>
2327
2328 <param name="aDir" type="wstring" dir="in">
2329 <desc>The name of the directory to go in.</desc>
2330 </param>
2331
2332 <param name="aProgress" type="IProgress" dir="return">
2333 <desc>Progress object to track the operation completion.</desc>
2334 </param>
2335 </method>
2336
2337 <method name="cdUp">
2338 <desc>Go one directory upwards from the current directory level.</desc>
2339
2340 <param name="aProgress" type="IProgress" dir="return">
2341 <desc>Progress object to track the operation completion.</desc>
2342 </param>
2343 </method>
2344
2345 <method name="entryList">
2346 <desc>Returns a list of files/directories after a call to <link
2347 to="#update" />. The user is responsible for keeping this internal
2348 list up do date.</desc>
2349
2350 <param name="aNames" type="wstring" safearray="yes" dir="out">
2351 <desc>The list of names for the entries.</desc>
2352 </param>
2353
2354 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
2355 <desc>The list of types for the entries.</desc>
2356 </param>
2357 </method>
2358
2359 <method name="exists">
2360 <desc>Checks if the given file list exists in the current directory
2361 level.</desc>
2362
2363 <param name="aNames" type="wstring" safearray="yes" dir="in">
2364 <desc>The names to check.</desc>
2365 </param>
2366
2367 <param name="aExists" type="wstring" safearray="yes" dir="return">
2368 <desc>The names which exist.</desc>
2369 </param>
2370 </method>
2371
2372 <method name="remove">
2373 <desc>Deletes the given files in the current directory level.</desc>
2374
2375 <param name="aNames" type="wstring" safearray="yes" dir="in">
2376 <desc>The names to remove.</desc>
2377 </param>
2378
2379 <param name="aProgress" type="IProgress" dir="return">
2380 <desc>Progress object to track the operation completion.</desc>
2381 </param>
2382 </method>
2383
2384 </interface>
2385
2386 <!--
2387 // IAppliance
2388 /////////////////////////////////////////////////////////////////////////
2389 -->
2390
2391 <interface
2392 name="IAppliance" extends="$unknown"
2393 uuid="fb61a4fc-57e7-48d6-859b-71f37d484cf2"
2394 wsmap="managed"
2395 >
2396 <desc>
2397 Represents a platform-independent appliance in OVF format. An instance of this is returned
2398 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
2399 virtual machines within an appliance with VirtualBox.
2400
2401 The OVF standard suggests two different physical file formats:
2402
2403 <ol>
2404 <li>If the appliance is distributed as a set of files, there must be at least one XML descriptor
2405 file that conforms to the OVF standard and carries an <tt>.ovf</tt> file extension. If
2406 this descriptor file references other files such as disk images, as OVF appliances typically
2407 do, those additional files must be in the same directory as the descriptor file.</li>
2408
2409 <li>If the appliance is distributed as a single file, it must be in TAR format and have the
2410 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
2411 files and optionally other files.
2412
2413 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
2414 be added with a later version.</li>
2415 </ol>
2416
2417 <b>Importing</b> an OVF appliance into VirtualBox as instances of
2418 <link to="IMachine" /> involves the following sequence of API calls:
2419
2420 <ol>
2421 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
2422 </li>
2423
2424 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
2425 would like to import. So long as this file is syntactically valid, this will succeed
2426 and fill the appliance object with the parsed data from the OVF file.
2427 </li>
2428
2429 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
2430 contents of the IAppliance attributes accordingly. These can be inspected by a
2431 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
2432 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
2433 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
2434 systems (machines) in the OVF, which in turn describe the virtual hardware prescribed
2435 by the OVF (network and hardware adapters, virtual disk images, memory size and so on).
2436 The GUI can then give the user the option to confirm and/or change these suggestions.
2437 </li>
2438
2439 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
2440 virtual system (machine) to override the suggestions made by the interpret() routine.
2441 </li>
2442
2443 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
2444 VirtualBox as instances of <link to="IMachine" /> that match the information in the
2445 virtual system descriptions. After this call suceeded, the UUIDs of the machines created
2446 can be found in the <link to="#machines" /> array attribute.
2447 </li>
2448 </ol>
2449
2450 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
2451
2452 <ol>
2453 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
2454 an empty IAppliance object.
2455 </li>
2456
2457 <li>For each machine you would like to export, call <link to="IMachine::export" />
2458 with the IAppliance object you just created. Each such call creates one instance of
2459 <link to="IVirtualSystemDescription" /> inside the appliance.
2460 </li>
2461
2462 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
2463 virtual system (machine) to override the suggestions made by the export() routine.
2464 </li>
2465
2466 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
2467 file written.</li>
2468 </ol>
2469
2470 </desc>
2471
2472 <attribute name="path" type="wstring" readonly="yes">
2473 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
2474 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
2475 <link to="#write" /> (for export).
2476 This attribute is empty until one of these methods has been called.
2477 </desc>
2478 </attribute>
2479
2480 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
2481 <desc>
2482 Array of virtual disk definitions. One such description exists for each
2483 disk definition in the OVF; each string array item represents one such piece of
2484 disk information, with the information fields separated by tab (\t) characters.
2485
2486 The caller should be prepared for additional fields being appended to
2487 this string in future versions of VirtualBox and therefore check for
2488 the number of tabs in the strings returned.
2489
2490 In the current version, the following eight fields are returned per string
2491 in the array:
2492
2493 <ol>
2494 <li>Disk ID (unique string identifier given to disk)</li>
2495
2496 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
2497
2498 <li>Populated size (optional unsigned integer indicating the current size of the
2499 disk; can be approximate; -1 if unspecified)</li>
2500
2501 <li>Format (string identifying the disk format, typically
2502 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
2503
2504 <li>Reference (where to find the disk image, typically a file name; if empty,
2505 then the disk should be created on import)</li>
2506
2507 <li>Image size (optional unsigned integer indicating the size of the image,
2508 which need not necessarily be the same as the values specified above, since
2509 the image may be compressed or sparse; -1 if not specified)</li>
2510
2511 <li>Chunk size (optional unsigned integer if the image is split into chunks;
2512 presently unsupported and always -1)</li>
2513
2514 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
2515 </ol>
2516 </desc>
2517 </attribute>
2518
2519 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
2520 <desc> Array of virtual system descriptions. One such description is created
2521 for each virtual system (machine) found in the OVF.
2522 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
2523 (for export) has been called.
2524 </desc>
2525 </attribute>
2526
2527 <attribute name="machines" type="wstring" readonly="yes" safearray="yes">
2528 <desc>
2529 Contains the UUIDs of the machines created from the information in this appliances. This is only
2530 relevant for the import case, and will only contain data after a call to <link to="#importMachines" />
2531 succeeded.
2532 </desc>
2533 </attribute>
2534
2535 <method name="read">
2536 <desc>
2537 Reads an OVF file into the appliance object.
2538
2539 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
2540 mere fact that this method returns successfully does not mean that VirtualBox supports all
2541 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
2542 </desc>
2543 <param name="file" type="wstring" dir="in">
2544 <desc>
2545 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
2546 on whether the appliance is distributed as a set of files or as a single file, respectively).
2547 </desc>
2548 </param>
2549 <param name="aProgress" type="IProgress" dir="return">
2550 <desc>Progress object to track the operation completion.</desc>
2551 </param>
2552 </method>
2553
2554 <method name="interpret">
2555 <desc>
2556 Interprets the OVF data that was read when the appliance was constructed. After
2557 calling this method, one can inspect the
2558 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
2559 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
2560 the appliance.
2561
2562 Calling this method is the second step of importing an appliance into VirtualBox;
2563 see <link to="IAppliance" /> for an overview.
2564
2565 After calling this method, one should call <link to="#getWarnings" /> to find out
2566 if problems were encountered during the processing which might later lead to
2567 errors.
2568 </desc>
2569 </method>
2570
2571 <method name="importMachines">
2572 <desc>
2573 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
2574 and other interfaces that match the information contained in the appliance as
2575 closely as possible, as represented by the import instructions in the
2576 <link to="#virtualSystemDescriptions" /> array.
2577
2578 Calling this method is the final step of importing an appliance into VirtualBox;
2579 see <link to="IAppliance" /> for an overview.
2580
2581 Since importing the appliance will most probably involve copying and converting
2582 disk images, which can take a long time, this method operates asynchronously and
2583 returns an IProgress object to allow the caller to monitor the progress.
2584
2585 After the import succeeded, the UUIDs of the IMachine instances created can be
2586 retrieved from the <link to="#machines" /> array attribute.
2587 </desc>
2588
2589 <param name="aProgress" type="IProgress" dir="return">
2590 <desc>Progress object to track the operation completion.</desc>
2591 </param>
2592 </method>
2593
2594 <method name="createVFSExplorer">
2595 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
2596
2597 <param name="aUri" type="wstring" dir="in">
2598 <desc>The URI describing the file system to use.</desc>
2599 </param>
2600
2601 <param name="aExplorer" type="IVFSExplorer" dir="return">
2602 <desc></desc>
2603 </param>
2604 </method>
2605
2606 <method name="write">
2607 <desc>
2608 Writes the contents of the appliance exports into a new OVF file.
2609
2610 Calling this method is the final step of exporting an appliance from VirtualBox;
2611 see <link to="IAppliance" /> for an overview.
2612
2613 Since exporting the appliance will most probably involve copying and converting
2614 disk images, which can take a long time, this method operates asynchronously and
2615 returns an IProgress object to allow the caller to monitor the progress.
2616 </desc>
2617 <param name="format" type="wstring" dir="in">
2618 <desc>
2619 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
2620 future versions of VirtualBox may support additional formats.
2621 </desc>
2622 </param>
2623 <param name="path" type="wstring" dir="in">
2624 <desc>
2625 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
2626 on whether the appliance is distributed as a set of files or as a single file, respectively).
2627 </desc>
2628 </param>
2629 <param name="aProgress" type="IProgress" dir="return">
2630 <desc>Progress object to track the operation completion.</desc>
2631 </param>
2632 </method>
2633
2634 <method name="getWarnings">
2635 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
2636
2637 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
2638 <desc></desc>
2639 </param>
2640 </method>
2641
2642 </interface>
2643
2644 <enum
2645 name="VirtualSystemDescriptionType"
2646 uuid="c0f8f135-3a1d-417d-afa6-b38b95a91f90"
2647 >
2648 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
2649 a configuration value.</desc>
2650
2651 <const name="Ignore" value="1" />
2652 <const name="OS" value="2" />
2653 <const name="Name" value="3" />
2654 <const name="Product" value="4" />
2655 <const name="Vendor" value="5" />
2656 <const name="Version" value="6" />
2657 <const name="ProductUrl" value="7" />
2658 <const name="VendorUrl" value="8" />
2659 <const name="Description" value="9" />
2660 <const name="License" value="10" />
2661 <const name="Miscellaneous" value="11" />
2662 <const name="CPU" value="12" />
2663 <const name="Memory" value="13" />
2664 <const name="HardDiskControllerIDE" value="14" />
2665 <const name="HardDiskControllerSATA" value="15" />
2666 <const name="HardDiskControllerSCSI" value="16" />
2667 <const name="HardDiskControllerSAS" value="17" />
2668 <const name="HardDiskImage" value="18" />
2669 <const name="Floppy" value="19" />
2670 <const name="CDROM" value="20" />
2671 <const name="NetworkAdapter" value="21" />
2672 <const name="USBController" value="22" />
2673 <const name="SoundCard" value="23" />
2674
2675 </enum>
2676
2677 <enum
2678 name="VirtualSystemDescriptionValueType"
2679 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
2680 >
2681 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
2682 type to fetch.</desc>
2683
2684 <const name="Reference" value="1" />
2685 <const name="Original" value="2" />
2686 <const name="Auto" value="3" />
2687 <const name="ExtraConfig" value="4" />
2688
2689 </enum>
2690
2691 <interface
2692 name="IVirtualSystemDescription" extends="$unknown"
2693 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
2694 wsmap="managed"
2695 >
2696
2697 <desc>Represents one virtual system (machine) in an appliance. This interface is used in
2698 the <link to="IAppliance::virtualSystemDescriptions" /> array. After
2699 <link to="IAppliance::interpret" /> has been called, that array contains information
2700 about how the virtual systems described in the OVF should best be imported into
2701 VirtualBox virtual machines. See <link to="IAppliance" /> for the steps required to
2702 import an OVF into VirtualBox.
2703 </desc>
2704
2705 <attribute name="count" type="unsigned long" readonly="yes">
2706 <desc>Return the number of virtual system description entries.</desc>
2707 </attribute>
2708
2709 <method name="getDescription">
2710 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
2711 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
2712
2713 The list below identifies the value sets that are possible depending on the
2714 <link to="VirtualSystemDescriptionType" /> enum value in the array item in @a aTypes[]. In each case,
2715 the array item with the same index in @a aOvfValues[] will contain the original value as contained
2716 in the OVF file (just for informational purposes), and the corresponding item in @a aVBoxValues[]
2717 will contain a suggested value to be used for VirtualBox. Depending on the description type,
2718 the @a aExtraConfigValues[] array item may also be used.
2719
2720 <ul>
2721 <li>
2722 "OS": the guest operating system type. There must be exactly one such array item on import. The
2723 corresponding item in @a aVBoxValues[] contains the suggested guest operating system for VirtualBox.
2724 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
2725 item in @a aOvfValues[] will contain a numerical value that described the operating system in the OVF.
2726 </li>
2727 <li>
2728 "Name": the name to give to the new virtual machine. There can be at most one such array item;
2729 if none is present on import, then an automatic name will be created from the operating system
2730 type. The correponding item im @a aOvfValues[] will contain the suggested virtual machine name
2731 from the OVF file, and @a aVBoxValues[] will contain a suggestion for a unique VirtualBox
2732 <link to="IMachine" /> name that does not exist yet.
2733 </li>
2734 <li>
2735 "Description": an arbitrary description.
2736 </li>
2737 <li>
2738 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
2739 code to display such a license for agreement; the Main API does not enforce any such policy.
2740 </li>
2741 <li>
2742 Miscellaneous: reserved for future use.
2743 </li>
2744 <li>
2745 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
2746 </li>
2747 <li>
2748 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
2749 is present on import, then VirtualBox will set a meaningful default based on the operating system
2750 type.
2751 </li>
2752 <li>
2753 "HardDiskControllerIDE": an IDE hard disk controller. There can be at most two such items.
2754 An optional value in @a aOvfValues[] and @a aVBoxValues[] can be "PIIX3" or "PIIX4" to specify
2755 the type of IDE controller; this corresponds to the ResourceSubType element which VirtualBox
2756 writes into the OVF.
2757 The matching item in the @a aRefs[] array will contain an integer that items of the "Harddisk"
2758 type can use to specify which hard disk controller a virtual disk should be connected to.
2759 Note that in OVF, an IDE controller has two channels, corresponding to "master" and "slave"
2760 in traditional terminology, whereas the IDE storage controller that VirtualBox supports in
2761 its virtual machines supports four channels (primary master, primary slave, secondary master,
2762 secondary slave) and thus maps to two IDE controllers in the OVF sense.
2763 </li>
2764 <li>
2765 "HardDiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
2766 has no value in @a aOvfValues[] or @a aVBoxValues[].
2767 The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
2768 </li>
2769 <li>
2770 "HardDiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
2771 The items in @a aOvfValues[] and @a aVBoxValues[] will either be "LsiLogic", "BusLogic" or
2772 "LsiLogicSas". (Note that in OVF, the LsiLogicSas controller is treated as a SCSI controller
2773 whereas VirtualBox considers it a class of storage controllers of its own; see
2774 <link to="StorageControllerType" />).
2775 The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
2776 </li>
2777 <li>
2778 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
2779 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
2780
2781 The array item in @a aOvfValues[] will contain the file specification from the OVF file (without
2782 a path since the image file should be in the same location as the OVF file itself), whereas the
2783 item in @a aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
2784 hard disk image. This means that on import the image will be copied and converted from the
2785 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
2786
2787 The matching item in the @a aExtraConfigValues[] array must contain a string of the following
2788 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
2789 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
2790 the image to. That number must be the index of an array item with one of the hard disk controller
2791 types (HardDiskControllerSCSI, HardDiskControllerSATA, HardDiskControllerIDE).
2792 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
2793 this can be 0 or 1 for master or slave, respectively. For compatibility with VirtualBox versions
2794 before 3.2, the values 2 and 3 (for secondary master and secondary slave) are also supported, but
2795 no longer exported. For SATA and SCSI controllers, the channel can range from 0-29.
2796 </li>
2797 <li>
2798 "CDROM": a virtual CD-ROM drive. The matching item in @a aExtraConfigValue[] contains the same
2799 attachment information as with "HardDiskImage" items.
2800 </li>
2801 <li>
2802 "CDROM": a virtual floppy drive. The matching item in @a aExtraConfigValue[] contains the same
2803 attachment information as with "HardDiskImage" items.
2804 </li>
2805 <li>
2806 "NetworkAdapter": a network adapter. The array item in @a aVBoxValues[] will specify the hardware
2807 for the network adapter, whereas the array item in @a aExtraConfigValues[] will have a string
2808 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
2809 </li>
2810 <li>
2811 "USBController": a USB controller. There can be at most one such item. If and only if such an
2812 item ispresent, USB support will be enabled for the new virtual machine.
2813 </li>
2814 <li>
2815 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
2816 present, sound support will be enabled for the new virtual machine. Note that the virtual
2817 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
2818 may be different from the virtual soundcard expected by the appliance.
2819 </li>
2820 </ul>
2821
2822 </desc>
2823
2824 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
2825 <desc></desc>
2826 </param>
2827
2828 <param name="aRefs" type="wstring" dir="out" safearray="yes">
2829 <desc></desc>
2830 </param>
2831
2832 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
2833 <desc></desc>
2834 </param>
2835
2836 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
2837 <desc></desc>
2838 </param>
2839
2840 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
2841 <desc></desc>
2842 </param>
2843
2844 </method>
2845
2846 <method name="getDescriptionByType">
2847 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
2848 should be returned.</desc>
2849
2850 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2851 <desc></desc>
2852 </param>
2853
2854 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
2855 <desc></desc>
2856 </param>
2857
2858 <param name="aRefs" type="wstring" dir="out" safearray="yes">
2859 <desc></desc>
2860 </param>
2861
2862 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
2863 <desc></desc>
2864 </param>
2865
2866 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
2867 <desc></desc>
2868 </param>
2869
2870 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
2871 <desc></desc>
2872 </param>
2873
2874 </method>
2875
2876 <method name="getValuesByType">
2877 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
2878 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
2879 values.</desc>
2880
2881 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2882 <desc></desc>
2883 </param>
2884
2885 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
2886 <desc></desc>
2887 </param>
2888
2889 <param name="aValues" type="wstring" dir="return" safearray="yes">
2890 <desc></desc>
2891 </param>
2892
2893 </method>
2894
2895 <method name="setFinalValues">
2896 <desc>
2897 This method allows the appliance's user to change the configuration for the virtual
2898 system descriptions. For each array item returned from <link to="#getDescription" />,
2899 you must pass in one boolean value and one configuration value.
2900
2901 Each item in the boolean array determines whether the particular configuration item
2902 should be enabled.
2903 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
2904 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
2905 and SoundCard.
2906
2907 For the "vbox" and "extra configuration" values, if you pass in the same arrays
2908 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
2909 the configuration remains unchanged. Please see the documentation for getDescription()
2910 for valid configuration values for the individual array item types. If the
2911 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
2912 </desc>
2913
2914 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
2915 <desc></desc>
2916 </param>
2917
2918 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
2919 <desc></desc>
2920 </param>
2921
2922 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
2923 <desc></desc>
2924 </param>
2925 </method>
2926
2927 <method name="addDescription">
2928 <desc>
2929 This method adds an additional description entry to the stack of already
2930 available descriptions for this virtual system. This is handy for writing
2931 values which aren't directly supported by VirtualBox. One example would
2932 be the License type of <link to="VirtualSystemDescriptionType" />.
2933 </desc>
2934
2935 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2936 <desc></desc>
2937 </param>
2938
2939 <param name="aVBoxValue" type="wstring" dir="in">
2940 <desc></desc>
2941 </param>
2942
2943 <param name="aExtraConfigValue" type="wstring" dir="in">
2944 <desc></desc>
2945 </param>
2946 </method>
2947 </interface>
2948
2949
2950 <!--
2951 // IMachine
2952 /////////////////////////////////////////////////////////////////////////
2953 -->
2954
2955 <interface
2956 name="IInternalMachineControl" extends="$unknown"
2957 uuid="e2da8b1a-2ad1-490e-b29e-c33a144791b6"
2958 internal="yes"
2959 wsmap="suppress"
2960 >
2961 <method name="setRemoveSavedStateFile">
2962 <desc>
2963 Updates the flag whether the saved state file is removed on a
2964 machine state change from Saved to PoweredOff.
2965 </desc>
2966 <param name="aRemove" type="boolean" dir="in"/>
2967 </method>
2968
2969 <method name="updateState">
2970 <desc>
2971 Updates the VM state.
2972 <note>
2973 This operation will also update the settings file with the correct
2974 information about the saved state file and delete this file from disk
2975 when appropriate.
2976 </note>
2977 </desc>
2978 <param name="state" type="MachineState" dir="in"/>
2979 </method>
2980
2981 <method name="getIPCId">
2982 <param name="id" type="wstring" dir="return"/>
2983 </method>
2984
2985 <method name="beginPowerUp">
2986 <desc>
2987 Tells VBoxSVC that <link to="IConsole::powerUp"/> is under ways and
2988 gives it the progress object that should be part of any pending
2989 <link to="IMachine::launchVMProcess"/> operations. The progress
2990 object may be called back to reflect an early cancelation, so some care
2991 have to be taken with respect to any cancelation callbacks. The console
2992 object will call <link to="IInternalMachineControl::endPowerUp"/>
2993 to signal the completion of the progress object.
2994 </desc>
2995 <param name="aProgress" type="IProgress" dir="in" />
2996 </method>
2997
2998 <method name="endPowerUp">
2999 <desc>
3000 Tells VBoxSVC that <link to="IConsole::powerUp"/> has completed.
3001 This method may query status information from the progress object it
3002 received in <link to="IInternalMachineControl::beginPowerUp"/> and copy
3003 it over to any in-progress <link to="IMachine::launchVMProcess"/>
3004 call in order to complete that progress object.
3005 </desc>
3006 <param name="result" type="long" dir="in"/>
3007 </method>
3008
3009 <method name="runUSBDeviceFilters">
3010 <desc>
3011 Asks the server to run USB devices filters of the associated
3012 machine against the given USB device and tell if there is
3013 a match.
3014 <note>
3015 Intended to be used only for remote USB devices. Local
3016 ones don't require to call this method (this is done
3017 implicitly by the Host and USBProxyService).
3018 </note>
3019 </desc>
3020 <param name="device" type="IUSBDevice" dir="in"/>
3021 <param name="matched" type="boolean" dir="out"/>
3022 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3023 </method>
3024
3025 <method name="captureUSBDevice">
3026 <desc>
3027 Requests a capture of the given host USB device.
3028 When the request is completed, the VM process will
3029 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3030 notification.
3031 </desc>
3032 <param name="id" type="uuid" mod="string" dir="in"/>
3033 </method>
3034
3035 <method name="detachUSBDevice">
3036 <desc>
3037 Notification that a VM is going to detach (@a done = @c false) or has
3038 already detached (@a done = @c true) the given USB device.
3039 When the @a done = @c true request is completed, the VM process will
3040 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3041 notification.
3042 <note>
3043 In the @a done = @c true case, the server must run its own filters
3044 and filters of all VMs but this one on the detached device
3045 as if it were just attached to the host computer.
3046 </note>
3047 </desc>
3048 <param name="id" type="uuid" mod="string" dir="in"/>
3049 <param name="done" type="boolean" dir="in"/>
3050 </method>
3051
3052 <method name="autoCaptureUSBDevices">
3053 <desc>
3054 Requests a capture all matching USB devices attached to the host.
3055 When the request is completed, the VM process will
3056 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3057 notification per every captured device.
3058 </desc>
3059 </method>
3060
3061 <method name="detachAllUSBDevices">
3062 <desc>
3063 Notification that a VM that is being powered down. The done
3064 parameter indicates whether which stage of the power down
3065 we're at. When @a done = @c false the VM is announcing its
3066 intentions, while when @a done = @c true the VM is reporting
3067 what it has done.
3068 <note>
3069 In the @a done = @c true case, the server must run its own filters
3070 and filters of all VMs but this one on all detach devices as
3071 if they were just attached to the host computer.
3072 </note>
3073 </desc>
3074 <param name="done" type="boolean" dir="in"/>
3075 </method>
3076
3077 <method name="onSessionEnd">
3078 <desc>
3079 Triggered by the given session object when the session is about
3080 to close normally.
3081 </desc>
3082 <param name="session" type="ISession" dir="in">
3083 <desc>Session that is being closed</desc>
3084 </param>
3085 <param name="progress" type="IProgress" dir="return">
3086 <desc>
3087 Used to wait until the corresponding machine is actually
3088 dissociated from the given session on the server.
3089 Returned only when this session is a direct one.
3090 </desc>
3091 </param>
3092 </method>
3093
3094 <method name="beginSavingState">
3095 <desc>
3096 Called by the VM process to inform the server it wants to
3097 save the current state and stop the VM execution.
3098 </desc>
3099 <param name="progress" type="IProgress" dir="in">
3100 <desc>
3101 Progress object created by the VM process to wait until
3102 the state is saved.
3103 </desc>
3104 </param>
3105 <param name="stateFilePath" type="wstring" dir="out">
3106 <desc>
3107 File path the VM process must save the execution state to.
3108 </desc>
3109 </param>
3110 </method>
3111
3112 <method name="endSavingState">
3113 <desc>
3114 Called by the VM process to inform the server that saving
3115 the state previously requested by #beginSavingState is either
3116 successfully finished or there was a failure.
3117
3118 <result name="VBOX_E_FILE_ERROR">
3119 Settings file not accessible.
3120 </result>
3121 <result name="VBOX_E_XML_ERROR">
3122 Could not parse the settings file.
3123 </result>
3124
3125 </desc>
3126
3127 <param name="success" type="boolean" dir="in">
3128 <desc>@c true to indicate success and @c false otherwise.
3129 </desc>
3130 </param>
3131 </method>
3132
3133 <method name="adoptSavedState">
3134 <desc>
3135 Gets called by IConsole::adoptSavedState.
3136 <result name="VBOX_E_FILE_ERROR">
3137 Invalid saved state file path.
3138 </result>
3139 </desc>
3140 <param name="savedStateFile" type="wstring" dir="in">
3141 <desc>Path to the saved state file to adopt.</desc>
3142 </param>
3143 </method>
3144
3145 <method name="beginTakingSnapshot">
3146 <desc>
3147 Called from the VM process to request from the server to perform the
3148 server-side actions of creating a snapshot (creating differencing images
3149 and the snapshot object).
3150
3151 <result name="VBOX_E_FILE_ERROR">
3152 Settings file not accessible.
3153 </result>
3154 <result name="VBOX_E_XML_ERROR">
3155 Could not parse the settings file.
3156 </result>
3157 </desc>
3158 <param name="initiator" type="IConsole" dir="in">
3159 <desc>The console object that initiated this call.</desc>
3160 </param>
3161 <param name="name" type="wstring" dir="in">
3162 <desc>Snapshot name.</desc>
3163 </param>
3164 <param name="description" type="wstring" dir="in">
3165 <desc>Snapshot description.</desc>
3166 </param>
3167 <param name="consoleProgress" type="IProgress" dir="in">
3168 <desc>
3169 Progress object created by the VM process tracking the
3170 snapshot's progress. This has the following sub-operations:
3171 <ul>
3172 <li>setting up (weight 1);</li>
3173 <li>one for each medium attachment that needs a differencing image (weight 1 each);</li>
3174 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3175 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3176 <li>finishing up (weight 1)</li>
3177 </ul>
3178 </desc>
3179 </param>
3180 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3181 <desc>
3182 Whether this is an online snapshot (i.e. the machine is running).
3183 </desc>
3184 </param>
3185 <param name="stateFilePath" type="wstring" dir="out">
3186 <desc>
3187 File path the VM process must save the execution state to.
3188 </desc>
3189 </param>
3190 </method>
3191
3192 <method name="endTakingSnapshot">
3193 <desc>
3194 Called by the VM process to inform the server that the snapshot
3195 previously requested by #beginTakingSnapshot is either
3196 successfully taken or there was a failure.
3197 </desc>
3198
3199 <param name="success" type="boolean" dir="in">
3200 <desc>@c true to indicate success and @c false otherwise</desc>
3201 </param>
3202 </method>
3203
3204 <method name="deleteSnapshot">
3205 <desc>
3206 Gets called by IConsole::deleteSnapshot.
3207 <result name="VBOX_E_INVALID_OBJECT_STATE">
3208 Snapshot has more than one child snapshot.
3209 </result>
3210 </desc>
3211 <param name="initiator" type="IConsole" dir="in">
3212 <desc>The console object that initiated this call.</desc>
3213 </param>
3214 <param name="id" type="uuid" mod="string" dir="in">
3215 <desc>UUID of the snapshot to delete.</desc>
3216 </param>
3217 <param name="machineState" type="MachineState" dir="out">
3218 <desc>New machine state after this operation is started.</desc>
3219 </param>
3220 <param name="progress" type="IProgress" dir="return">
3221 <desc>Progress object to track the operation completion.</desc>
3222 </param>
3223 </method>
3224
3225 <method name="finishOnlineMergeMedium">
3226 <desc>
3227 Gets called by IConsole::onlineMergeMedium.
3228 </desc>
3229 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
3230 <desc>The medium attachment which needs to be cleaned up.</desc>
3231 </param>
3232 <param name="source" type="IMedium" dir="in">
3233 <desc>Merge source medium.</desc>
3234 </param>
3235 <param name="target" type="IMedium" dir="in">
3236 <desc>Merge target medium.</desc>
3237 </param>
3238 <param name="mergeForward" type="boolean" dir="in">
3239 <desc>Merge direction.</desc>
3240 </param>
3241 <param name="parentForTarget" type="IMedium" dir="in">
3242 <desc>For forward merges: new parent for target medium.</desc>
3243 </param>
3244 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
3245 <desc>For backward merges: list of media which need their parent UUID
3246 updated.</desc>
3247 </param>
3248 </method>
3249
3250 <method name="restoreSnapshot">
3251 <desc>
3252 Gets called by IConsole::RestoreSnapshot.
3253 </desc>
3254 <param name="initiator" type="IConsole" dir="in">
3255 <desc>The console object that initiated this call.</desc>
3256 </param>
3257 <param name="snapshot" type="ISnapshot" dir="in">
3258 <desc>The snapshot to restore the VM state from.</desc>
3259 </param>
3260 <param name="machineState" type="MachineState" dir="out">
3261 <desc>New machine state after this operation is started.</desc>
3262 </param>
3263 <param name="progress" type="IProgress" dir="return">
3264 <desc>Progress object to track the operation completion.</desc>
3265 </param>
3266 </method>
3267
3268 <method name="pullGuestProperties">
3269 <desc>
3270 Get the list of the guest properties matching a set of patterns along
3271 with their values, time stamps and flags and give responsibility for
3272 managing properties to the console.
3273 </desc>
3274 <param name="name" type="wstring" dir="out" safearray="yes">
3275 <desc>
3276 The names of the properties returned.
3277 </desc>
3278 </param>
3279 <param name="value" type="wstring" dir="out" safearray="yes">
3280 <desc>
3281 The values of the properties returned. The array entries match the
3282 corresponding entries in the @a name array.
3283 </desc>
3284 </param>
3285 <param name="timestamp" type="long long" dir="out" safearray="yes">
3286 <desc>
3287 The time stamps of the properties returned. The array entries match
3288 the corresponding entries in the @a name array.
3289 </desc>
3290 </param>
3291 <param name="flags" type="wstring" dir="out" safearray="yes">
3292 <desc>
3293 The flags of the properties returned. The array entries match the
3294 corresponding entries in the @a name array.
3295 </desc>
3296 </param>
3297 </method>
3298
3299 <method name="pushGuestProperty">
3300 <desc>
3301 Update a single guest property in IMachine.
3302 </desc>
3303 <param name="name" type="wstring" dir="in">
3304 <desc>
3305 The name of the property to be updated.
3306 </desc>
3307 </param>
3308 <param name="value" type="wstring" dir="in">
3309 <desc>
3310 The value of the property.
3311 </desc>
3312 </param>
3313 <param name="timestamp" type="long long" dir="in">
3314 <desc>
3315 The timestamp of the property.
3316 </desc>
3317 </param>
3318 <param name="flags" type="wstring" dir="in">
3319 <desc>
3320 The flags of the property.
3321 </desc>
3322 </param>
3323 </method>
3324
3325 <method name="lockMedia">
3326 <desc>
3327 Locks all media attached to the machine for writing and parents of
3328 attached differencing media (if any) for reading. This operation is
3329 atomic so that if it fails no media is actually locked.
3330
3331 This method is intended to be called when the machine is in Starting or
3332 Restoring state. The locked media will be automatically unlocked when
3333 the machine is powered off or crashed.
3334 </desc>
3335 </method>
3336 <method name="unlockMedia">
3337 <desc>
3338 Unlocks all media previously locked using
3339 <link to="IInternalMachineControl::lockMedia"/>.
3340
3341 This method is intended to be used with teleportation so that it is
3342 possible to teleport between processes on the same machine.
3343 </desc>
3344 </method>
3345 </interface>
3346
3347 <interface
3348 name="IBIOSSettings" extends="$unknown"
3349 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3350 wsmap="managed"
3351 >
3352 <desc>
3353 The IBIOSSettings interface represents BIOS settings of the virtual
3354 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3355 </desc>
3356 <attribute name="logoFadeIn" type="boolean">
3357 <desc>Fade in flag for BIOS logo animation.</desc>
3358 </attribute>
3359
3360 <attribute name="logoFadeOut" type="boolean">
3361 <desc>Fade out flag for BIOS logo animation.</desc>
3362 </attribute>
3363
3364 <attribute name="logoDisplayTime" type="unsigned long">
3365 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3366 </attribute>
3367
3368 <attribute name="logoImagePath" type="wstring">
3369 <desc>
3370 Local file system path for external BIOS splash image. Empty string
3371 means the default image is shown on boot.
3372 </desc>
3373 </attribute>
3374
3375 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3376 <desc>Mode of the BIOS boot device menu.</desc>
3377 </attribute>
3378
3379 <attribute name="ACPIEnabled" type="boolean">
3380 <desc>ACPI support flag.</desc>
3381 </attribute>
3382
3383 <attribute name="IOAPICEnabled" type="boolean">
3384 <desc>
3385 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3386 and support IRQs above 15.
3387 </desc>
3388 </attribute>
3389
3390 <attribute name="timeOffset" type="long long">
3391 <desc>
3392 Offset in milliseconds from the host system time. This allows for
3393 guests running with a different system date/time than the host.
3394 It is equivalent to setting the system date/time in the BIOS except
3395 it is not an absolute value but a relative one. Guest Additions
3396 time synchronization honors this offset.
3397 </desc>
3398 </attribute>
3399
3400 <attribute name="PXEDebugEnabled" type="boolean">
3401 <desc>
3402 PXE debug logging flag. If set, VirtualBox will write extensive
3403 PXE trace information to the release log.
3404 </desc>
3405 </attribute>
3406
3407 </interface>
3408
3409 <enum name="CleanupMode"
3410 uuid="67897c50-7cca-47a9-83f6-ce8fd8eb5441">
3411 <desc>Cleanup mode, used with <link to="IMachine::unregister" />.
3412 </desc>
3413 <const name="UnregisterOnly" value="1">
3414 <desc>Unregister only the machine, but neither delete snapshots nor detach media.</desc>
3415 </const>
3416 <const name="DetachAllReturnNone" value="2">
3417 <desc>Delete all snapshots and detach all media but return none; this will keep all media registered.</desc>
3418 </const>
3419 <const name="DetachAllReturnHardDisksOnly" value="3">
3420 <desc>Delete all snapshots, detach all media and return hard disks for closing, but not removeable media.</desc>
3421 </const>
3422 <const name="Full" value="4">
3423 <desc>Delete all snapshots, detach all media and return all media for closing.</desc>
3424 </const>
3425 </enum>
3426
3427 <interface
3428 name="IMachine" extends="$unknown"
3429 uuid="5c3e7670-aa0d-460a-8d0b-9111b69a3906"
3430 wsmap="managed"
3431 >
3432 <desc>
3433 The IMachine interface represents a virtual machine, or guest, created
3434 in VirtualBox.
3435
3436 This interface is used in two contexts. First of all, a collection of
3437 objects implementing this interface is stored in the
3438 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
3439 machines that are currently registered with this VirtualBox
3440 installation. Also, once a session has been opened for the given virtual
3441 machine (e.g. the virtual machine is running), the machine object
3442 associated with the open session can be queried from the session object;
3443 see <link to="ISession"/> for details.
3444
3445 The main role of this interface is to expose the settings of the virtual
3446 machine and provide methods to change various aspects of the virtual
3447 machine's configuration. For machine objects stored in the
3448 <link to="IVirtualBox::machines"/> collection, all attributes are
3449 read-only unless explicitly stated otherwise in individual attribute
3450 and method descriptions.
3451
3452 In order to change a machine setting, a session for this machine must be
3453 opened using one of the <link to="IMachine::lockMachine" /> or
3454 <link to="IMachine::launchVMProcess"/> methods. After the
3455 machine has been successfully locked for a session, a mutable machine object
3456 needs to be queried from the session object and then the desired settings
3457 changes can be applied to the returned object using IMachine attributes and
3458 methods. See the <link to="ISession"/> interface description for more
3459 information about sessions.
3460
3461 Note that IMachine does not provide methods to control virtual machine
3462 execution (such as start the machine, or power it down) -- these methods
3463 are grouped in a separate interface called <link to="IConsole" />.
3464
3465 <see>ISession, IConsole</see>
3466 </desc>
3467
3468 <attribute name="parent" type="IVirtualBox" readonly="yes">
3469 <desc>Associated parent object.</desc>
3470 </attribute>
3471
3472 <attribute name="accessible" type="boolean" readonly="yes">
3473 <desc>
3474 Whether this virtual machine is currently accessible or not.
3475
3476 A machine is always deemed accessible unless it is registered <i>and</i>
3477 its settings file cannot be read or parsed (either because the file itself
3478 is unavailable or has invalid XML contents).
3479
3480 Every time this property is read, the accessibility state of
3481 this machine is re-evaluated. If the returned value is @c false,
3482 the <link to="#accessError"/> property may be used to get the
3483 detailed error information describing the reason of
3484 inaccessibility, including XML error messages.
3485
3486 When the machine is inaccessible, only the following properties
3487 can be used on it:
3488 <ul>
3489 <li><link to="#parent"/></li>
3490 <li><link to="#id"/></li>
3491 <li><link to="#settingsFilePath"/></li>
3492 <li><link to="#accessible"/></li>
3493 <li><link to="#accessError"/></li>
3494 </ul>
3495
3496 An attempt to access any other property or method will return
3497 an error.
3498
3499 The only possible action you can perform on an inaccessible
3500 machine is to unregister it using the
3501 <link to="IMachine::unregister"/> call (or, to check
3502 for the accessibility state once more by querying this
3503 property).
3504
3505 <note>
3506 In the current implementation, once this property returns
3507 @c true, the machine will never become inaccessible
3508 later, even if its settings file cannot be successfully
3509 read/written any more (at least, until the VirtualBox
3510 server is restarted). This limitation may be removed in
3511 future releases.
3512 </note>
3513 </desc>
3514 </attribute>
3515
3516 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3517 <desc>
3518 Error information describing the reason of machine
3519 inaccessibility.
3520
3521 Reading this property is only valid after the last call to
3522 <link to="#accessible"/> returned @c false (i.e. the
3523 machine is currently unaccessible). Otherwise, a @c null
3524 IVirtualBoxErrorInfo object will be returned.
3525 </desc>
3526 </attribute>
3527
3528 <attribute name="name" type="wstring">
3529 <desc>
3530 Name of the virtual machine.
3531
3532 Besides being used for human-readable identification purposes
3533 everywhere in VirtualBox, the virtual machine name is also used
3534 as a name of the machine's settings file and as a name of the
3535 subdirectory this settings file resides in. Thus, every time you
3536 change the value of this property, the settings file will be
3537 renamed once you call <link to="#saveSettings"/> to confirm the
3538 change. The containing subdirectory will be also renamed, but
3539 only if it has exactly the same name as the settings file
3540 itself prior to changing this property (for backward compatibility
3541 with previous API releases). The above implies the following
3542 limitations:
3543 <ul>
3544 <li>The machine name cannot be empty.</li>
3545 <li>The machine name can contain only characters that are valid
3546 file name characters according to the rules of the file
3547 system used to store VirtualBox configuration.</li>
3548 <li>You cannot have two or more machines with the same name
3549 if they use the same subdirectory for storing the machine
3550 settings files.</li>
3551 <li>You cannot change the name of the machine if it is running,
3552 or if any file in the directory containing the settings file
3553 is being used by another running machine or by any other
3554 process in the host operating system at a time when
3555 <link to="#saveSettings"/> is called.
3556 </li>
3557 </ul>
3558 If any of the above limitations are hit, <link to="#saveSettings"/>
3559 will return an appropriate error message explaining the exact
3560 reason and the changes you made to this machine will not be saved.
3561 </desc>
3562 </attribute>
3563
3564 <attribute name="description" type="wstring">
3565 <desc>
3566 Description of the virtual machine.
3567
3568 The description attribute can contain any text and is
3569 typically used to describe the hardware and software
3570 configuration of the virtual machine in detail (i.e. network
3571 settings, versions of the installed software and so on).
3572 </desc>
3573 </attribute>
3574
3575 <attribute name="id" type="uuid" mod="string" readonly="yes">
3576 <desc>UUID of the virtual machine.</desc>
3577 </attribute>
3578
3579 <attribute name="OSTypeId" type="wstring">
3580 <desc>
3581 User-defined identifier of the Guest OS type.
3582 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
3583 an IGuestOSType object representing details about the given
3584 Guest OS type.
3585 <note>
3586 This value may differ from the value returned by
3587 <link to="IGuest::OSTypeId"/> if Guest Additions are
3588 installed to the guest OS.
3589 </note>
3590 </desc>
3591 </attribute>
3592
3593 <attribute name="HardwareVersion" type="wstring">
3594 <desc>Hardware version identifier. Internal use only for now.</desc>
3595 </attribute>
3596
3597 <attribute name="hardwareUUID" type="uuid" mod="string">
3598 <desc>
3599 The UUID presented to the guest via memory tables, hardware and guest
3600 properties. For most VMs this is the same as the @a id, but for VMs
3601 which have been cloned or teleported it may be the same as the source
3602 VM. This latter is because the guest shouldn't notice that it was
3603 cloned or teleported.
3604 </desc>
3605 </attribute>
3606
3607 <attribute name="CPUCount" type="unsigned long">
3608 <desc>Number of virtual CPUs in the VM.</desc>
3609 </attribute>
3610
3611 <attribute name="CPUHotPlugEnabled" type="boolean">
3612 <desc>
3613 This setting determines whether VirtualBox allows CPU
3614 hotplugging for this machine.</desc>
3615 </attribute>
3616
3617 <attribute name="CPUPriority" type="unsigned long">
3618 <desc>
3619 Priority of the virtual CPUs. Means to limit the number of CPU cycles
3620 a guest can use. The unit is percentage of host CPU cycles per second.
3621 The valid range is 1 - 100. 100 (the default) implies no limit.
3622 </desc>
3623 </attribute>
3624
3625 <attribute name="memorySize" type="unsigned long">
3626 <desc>System memory size in megabytes.</desc>
3627 </attribute>
3628
3629 <attribute name="memoryBalloonSize" type="unsigned long">
3630 <desc>Memory balloon size in megabytes.</desc>
3631 </attribute>
3632
3633 <attribute name="PageFusionEnabled" type="boolean">
3634 <desc>
3635 This setting determines whether VirtualBox allows page
3636 fusion for this machine (64 bits host only).
3637 </desc>
3638 </attribute>
3639
3640 <attribute name="VRAMSize" type="unsigned long">
3641 <desc>Video memory size in megabytes.</desc>
3642 </attribute>
3643
3644 <attribute name="accelerate3DEnabled" type="boolean" default="false">
3645 <desc>
3646 This setting determines whether VirtualBox allows this machine to make
3647 use of the 3D graphics support available on the host.</desc>
3648 </attribute>
3649
3650 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
3651 <desc>
3652 This setting determines whether VirtualBox allows this machine to make
3653 use of the 2D video acceleration support available on the host.</desc>
3654 </attribute>
3655
3656 <attribute name="monitorCount" type="unsigned long">
3657 <desc>
3658 Number of virtual monitors.
3659 <note>
3660 Only effective on Windows XP and later guests with
3661 Guest Additions installed.
3662 </note>
3663 </desc>
3664 </attribute>
3665
3666 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
3667 <desc>Object containing all BIOS settings.</desc>
3668 </attribute>
3669
3670 <attribute name="firmwareType" type="FirmwareType">
3671 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
3672 bootstrap in this VM.</desc>
3673 </attribute>
3674
3675 <attribute name="pointingHidType" type="PointingHidType">
3676 <desc>Type of pointing HID (such as mouse or tablet) used in this VM.
3677 The default is typically "PS2Mouse" but can vary depending on the
3678 requirements of the guest operating system.</desc>
3679 </attribute>
3680
3681 <attribute name="keyboardHidType" type="KeyboardHidType">
3682 <desc>Type of keyboard HID used in this VM.
3683 The default is typically "PS2Keyboard" but can vary depending on the
3684 requirements of the guest operating system.</desc>
3685 </attribute>
3686
3687 <attribute name="hpetEnabled" type="boolean">
3688 <desc>This attribute controls if High Precision Event Timer (HPET) is
3689 enabled in this VM. Use this property if you want to provide guests
3690 with additional time source, or if guest requires HPET to function correctly.
3691 Default is false.</desc>
3692 </attribute>
3693
3694 <attribute name="snapshotFolder" type="wstring">
3695 <desc>
3696 Full path to the directory used to store snapshot data
3697 (differencing media and saved state files) of this machine.
3698
3699 The initial value of this property is
3700 <tt>&lt;</tt><link to="#settingsFilePath">
3701 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3702 <link to="#id">machine_uuid</link>
3703 <tt>&gt;</tt>.
3704
3705 Currently, it is an error to try to change this property on
3706 a machine that has snapshots (because this would require to
3707 move possibly large files to a different location).
3708 A separate method will be available for this purpose later.
3709
3710 <note>
3711 Setting this property to @c null or to an empty string will restore
3712 the initial value.
3713 </note>
3714 <note>
3715 When setting this property, the specified path can be
3716 absolute (full path) or relative to the directory where the
3717 <link to="#settingsFilePath">machine settings file</link>
3718 is located. When reading this property, a full path is
3719 always returned.
3720 </note>
3721 <note>
3722 The specified path may not exist, it will be created
3723 when necessary.
3724 </note>
3725 </desc>
3726 </attribute>
3727
3728 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
3729 <desc>VRDP server object.</desc>
3730 </attribute>
3731
3732 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
3733 <desc>Array of media attached to this machine.</desc>
3734 </attribute>
3735
3736 <attribute name="USBController" type="IUSBController" readonly="yes">
3737 <desc>
3738 Associated USB controller object.
3739
3740 <note>
3741 If USB functionality is not available in the given edition of
3742 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3743 </note>
3744 </desc>
3745 </attribute>
3746
3747 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3748 <desc>Associated audio adapter, always present.</desc>
3749 </attribute>
3750
3751 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
3752 <desc>Array of storage controllers attached to this machine.</desc>
3753 </attribute>
3754
3755 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3756 <desc>
3757 Full name of the file containing machine settings data.
3758 </desc>
3759 </attribute>
3760
3761 <attribute name="settingsModified" type="boolean" readonly="yes">
3762 <desc>
3763 Whether the settings of this machine have been modified
3764 (but neither yet saved nor discarded).
3765 <note>
3766 Reading this property is only valid on instances returned
3767 by <link to="ISession::machine"/> and on new machines
3768 created by <link to="IVirtualBox::createMachine"/> or opened
3769 by <link to="IVirtualBox::openMachine"/> but not
3770 yet registered, or on unregistered machines after calling
3771 <link to="IMachine::unregister"/>. For all other
3772 cases, the settings can never be modified.
3773 </note>
3774 <note>
3775 For newly created unregistered machines, the value of this
3776 property is always @c true until <link to="#saveSettings"/>
3777 is called (no matter if any machine settings have been
3778 changed after the creation or not). For opened machines
3779 the value is set to @c false (and then follows to normal rules).
3780 </note>
3781 </desc>
3782 </attribute>
3783
3784 <attribute name="sessionState" type="SessionState" readonly="yes">
3785 <desc>Current session state for this machine.</desc>
3786 </attribute>
3787
3788 <attribute name="sessionType" type="wstring" readonly="yes">
3789 <desc>
3790 Type of the session. If <link to="#sessionState"/> is
3791 Spawning or Locked, this attribute contains the
3792 same value as passed to the
3793 <link to="IMachine::launchVMProcess"/> method in the
3794 @a type parameter. If the session was used with
3795 <link to="IMachine::lockMachine" />, or if
3796 <link to="#sessionState"/> is SessionClosed, the value of this
3797 attribute is an empty string.
3798 </desc>
3799 </attribute>
3800
3801 <attribute name="sessionPid" type="unsigned long" readonly="yes">
3802 <desc>
3803 Identifier of the session process. This attribute contains the
3804 platform-dependent identifier of the process whose session was
3805 used with <link to="IMachine::lockMachine" /> call. The returned
3806 value is only valid if <link to="#sessionState"/> is Locked or
3807 Unlocking by the time this property is read.
3808 </desc>
3809 </attribute>
3810
3811 <attribute name="state" type="MachineState" readonly="yes">
3812 <desc>Current execution state of this machine.</desc>
3813 </attribute>
3814
3815 <attribute name="lastStateChange" type="long long" readonly="yes">
3816 <desc>
3817 Time stamp of the last execution state change,
3818 in milliseconds since 1970-01-01 UTC.
3819 </desc>
3820 </attribute>
3821
3822 <attribute name="stateFilePath" type="wstring" readonly="yes">
3823 <desc>
3824 Full path to the file that stores the execution state of
3825 the machine when it is in the <link to="MachineState::Saved"/> state.
3826 <note>
3827 When the machine is not in the Saved state, this attribute is
3828 an empty string.
3829 </note>
3830 </desc>
3831 </attribute>
3832
3833 <attribute name="logFolder" type="wstring" readonly="yes">
3834 <desc>
3835 Full path to the folder that stores a set of rotated log files
3836 recorded during machine execution. The most recent log file is
3837 named <tt>VBox.log</tt>, the previous log file is
3838 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
3839 in the current version).
3840 </desc>
3841 </attribute>
3842
3843 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
3844 <desc>
3845 Current snapshot of this machine. This is @c null if the machine
3846 currently has no snapshots. If it is not @c null, then it was
3847 set by one of <link to="IConsole::takeSnapshot" />,
3848 <link to="IConsole::deleteSnapshot" />
3849 or <link to="IConsole::restoreSnapshot" />, depending on which
3850 was called last. See <link to="ISnapshot"/> for details.
3851 </desc>
3852 </attribute>
3853
3854 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
3855 <desc>
3856 Number of snapshots taken on this machine. Zero means the
3857 machine doesn't have any snapshots.
3858 </desc>
3859 </attribute>
3860
3861 <attribute name="currentStateModified" type="boolean" readonly="yes">
3862 <desc>
3863 Returns @c true if the current state of the machine is not
3864 identical to the state stored in the current snapshot.
3865
3866 The current state is identical to the current snapshot only
3867 directly after one of the following calls are made:
3868
3869 <ul>
3870 <li><link to="IConsole::restoreSnapshot"/>
3871 </li>
3872 <li><link to="IConsole::takeSnapshot"/> (issued on a
3873 "powered off" or "saved" machine, for which
3874 <link to="#settingsModified"/> returns @c false)
3875 </li>
3876 <li><link to="IMachine::setCurrentSnapshot"/>
3877 </li>
3878 </ul>
3879
3880 The current state remains identical until one of the following
3881 happens:
3882 <ul>
3883 <li>settings of the machine are changed</li>
3884 <li>the saved state is deleted</li>
3885 <li>the current snapshot is deleted</li>
3886 <li>an attempt to execute the machine is made</li>
3887 </ul>
3888
3889 <note>
3890 For machines that don't have snapshots, this property is
3891 always @c false.
3892 </note>
3893 </desc>
3894 </attribute>
3895
3896 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
3897 <desc>
3898 Collection of shared folders for this machine (permanent shared
3899 folders). These folders are shared automatically at machine startup
3900 and available only to the guest OS installed within this machine.
3901
3902 New shared folders are added to the collection using
3903 <link to="#createSharedFolder"/>. Existing shared folders can be
3904 removed using <link to="#removeSharedFolder"/>.
3905 </desc>
3906 </attribute>
3907
3908 <attribute name="clipboardMode" type="ClipboardMode">
3909 <desc>
3910 Synchronization mode between the host OS clipboard
3911 and the guest OS clipboard.
3912 </desc>
3913 </attribute>
3914
3915 <attribute name="guestPropertyNotificationPatterns" type="wstring">
3916 <desc>
3917 A comma-separated list of simple glob patterns. Changes to guest
3918 properties whose name matches one of the patterns will generate an
3919 <link to="IGuestPropertyChangedEvent"/> signal.
3920 </desc>
3921 </attribute>
3922
3923 <attribute name="teleporterEnabled" type="boolean">
3924 <desc>
3925 When set to @a true, the virtual machine becomes a target teleporter
3926 the next time it is powered on. This can only set to @a true when the
3927 VM is in the @a PoweredOff or @a Aborted state.
3928
3929 <!-- This property is automatically set to @a false when the VM is powered
3930 on. (bird: This doesn't work yet ) -->
3931 </desc>
3932 </attribute>
3933
3934 <attribute name="teleporterPort" type="unsigned long">
3935 <desc>
3936 The TCP port the target teleporter will listen for incoming
3937 teleportations on.
3938
3939 0 means the port is automatically selected upon power on. The actual
3940 value can be read from this property while the machine is waiting for
3941 incoming teleportations.
3942 </desc>
3943 </attribute>
3944
3945 <attribute name="teleporterAddress" type="wstring">
3946 <desc>
3947 The address the target teleporter will listen on. If set to an empty
3948 string, it will listen on all addresses.
3949 </desc>
3950 </attribute>
3951
3952 <attribute name="teleporterPassword" type="wstring">
3953 <desc>
3954 The password to check for on the target teleporter. This is just a
3955 very basic measure to prevent simple hacks and operators accidentally
3956 beaming a virtual machine to the wrong place.
3957 </desc>
3958 </attribute>
3959
3960 <attribute name="faultToleranceState" type="FaultToleranceState">
3961 <desc>
3962 Fault tolerance state; disabled, source or target.
3963 This property can be changed at any time. If you change it for a running
3964 VM, then the fault tolerance address and port must be set beforehand.
3965 </desc>
3966 </attribute>
3967
3968 <attribute name="faultTolerancePort" type="unsigned long">
3969 <desc>
3970 The TCP port the fault tolerance source or target will use for
3971 communication.
3972 </desc>
3973 </attribute>
3974
3975 <attribute name="faultToleranceAddress" type="wstring">
3976 <desc>
3977 The address the fault tolerance source or target.
3978 </desc>
3979 </attribute>
3980
3981 <attribute name="faultTolerancePassword" type="wstring">
3982 <desc>
3983 The password to check for on the standby VM. This is just a
3984 very basic measure to prevent simple hacks and operators accidentally
3985 choosing the wrong standby VM.
3986 </desc>
3987 </attribute>
3988
3989 <attribute name="faultToleranceSyncInterval" type="unsigned long">
3990 <desc>
3991 The interval in ms used for syncing the state between source and target.
3992 </desc>
3993 </attribute>
3994
3995 <attribute name="RTCUseUTC" type="boolean">
3996 <desc>
3997 When set to @a true, the RTC device of the virtual machine will run
3998 in UTC time, otherwise in local time. Especially Unix guests prefer
3999 the time in UTC.
4000 </desc>
4001 </attribute>
4002
4003 <attribute name="ioCacheEnabled" type="boolean">
4004 <desc>
4005 When set to @a true, the builtin I/O cache of the virtual machine
4006 will be enabled.
4007 </desc>
4008 </attribute>
4009
4010 <attribute name="ioCacheSize" type="unsigned long">
4011 <desc>
4012 Maximum size of the I/O cache in MB.
4013 </desc>
4014 </attribute>
4015
4016 <method name="lockMachine">
4017 <desc>
4018 Locks the machine for the given session to enable the caller
4019 to make changes to the machine or start the VM or control
4020 VM execution.
4021
4022 There are two ways to lock a machine for such uses:
4023
4024 <ul>
4025 <li>If you want to make changes to the machine settings,
4026 you must obtain an exclusive write lock on the machine
4027 by setting @a lockType to @c Write.
4028
4029 This will only succeed if no other process has locked
4030 the machine to prevent conflicting changes. Only after
4031 an exclusive write lock has been obtained using this method, one
4032 can change all VM settings or execute the VM in the process
4033 space of the session object. (Note that the latter is only of
4034 interest if you actually want to write a new front-end for
4035 virtual machines; but this API gets called internally by
4036 the existing front-ends such as VBoxHeadless and the VirtualBox
4037 GUI to acquire a write lock on the machine that they are running.)
4038
4039 On success, write-locking the machine for a session creates
4040 a second copy of the IMachine object. It is this second object
4041 upon which changes can be made; in VirtualBox terminology, the
4042 second copy is "mutable". It is only this second, mutable machine
4043 object upon which you can call methods that change the
4044 machine state. After having called this method, you can
4045 obtain this second, mutable machine object using the
4046 <link to="ISession::machine" /> attribute.
4047 </li>
4048 <li>If you only want to check the machine state or control
4049 machine execution without actually changing machine
4050 settings (e.g. to get access to VM statistics or take
4051 a snapshot or save the machine state), then set the
4052 @a lockType argument to @c Shared.
4053
4054 If no other session has obtained a lock, you will obtain an
4055 exclusive write lock as described above. However, if another
4056 session has already obtained such a lock, then a link to that
4057 existing session will be established which allows you
4058 to control that existing session.
4059
4060 To find out which type of lock was obtained, you can
4061 inspect <link to="ISession::type" />, which will have been
4062 set to either @c WriteLock or @c Shared.
4063 </li>
4064 </ul>
4065
4066 In either case, you can get access to the <link to="IConsole" />
4067 object which controls VM execution.
4068
4069 Also in all of the above cases, one must always call
4070 <link to="ISession::unlockMachine" /> to release the lock on the machine, or
4071 the machine's state will eventually be set to "Aborted".
4072
4073 To change settings on a machine, the following sequence is typically
4074 performed:
4075
4076 <ol>
4077 <li>Call this method to obtain an exclusive write lock for the current session.</li>
4078
4079 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
4080
4081 <li>Change the settings of the machine by invoking IMachine methods.</li>
4082
4083 <li>Call <link to="IMachine::saveSettings" />.</li>
4084
4085 <li>Release the write lock by calling <link to="ISession::unlockMachine"/>.</li>
4086 </ol>
4087
4088 <result name="E_UNEXPECTED">
4089 Virtual machine not registered.
4090 </result>
4091 <result name="E_ACCESSDENIED">
4092 Process not started by OpenRemoteSession.
4093 </result>
4094 <result name="VBOX_E_INVALID_OBJECT_STATE">
4095 Session already open or being opened.
4096 </result>
4097 <result name="VBOX_E_VM_ERROR">
4098 Failed to assign machine to session.
4099 </result>
4100 </desc>
4101 <param name="session" type="ISession" dir="in">
4102 <desc>
4103 Session object for which the machine will be locked.
4104 </desc>
4105 </param>
4106 <param name="lockType" type="LockType" dir="in">
4107 <desc>
4108 If set to @c Write, then attempt to acquire an exclusive write lock or fail.
4109 If set to @c Shared, then either acquire an exclusive write lock or establish
4110 a link to an existing session.
4111 </desc>
4112 </param>
4113 </method>
4114
4115 <method name="launchVMProcess">
4116 <desc>
4117 Spawns a new process that will execute the virtual machine and obtains a shared
4118 lock on the machine for the calling session.
4119
4120 If launching the VM succeeds, the new VM process will create its own session
4121 and write-lock the machine for it, preventing conflicting changes from other
4122 processes. If the machine is already locked (because it is already running or
4123 because another session has a write lock), launching the VM process will therefore
4124 fail. Reversely, future attempts to obtain a write lock will also fail while the
4125 machine is running.
4126
4127 The caller's session object remains separate from the session opened by the new
4128 VM process. It receives its own <link to="IConsole" /> object which can be used
4129 to control machine execution, but it cannot be used to change all VM settings
4130 which would be available after a <link to="#lockMachine" /> call.
4131
4132 The caller must eventually release the session's shared lock by calling
4133 <link to="ISession::unlockMachine" /> on the local session object once this call
4134 has returned. However, the session's state (see <link to="ISession::state" />)
4135 will not return to "Unlocked" until the remote session has also unlocked
4136 the machine (i.e. the machine has stopped running).
4137
4138 Lauching a VM process can take some time (a new VM is started in a new process,
4139 for which memory and other resources need to be set up). Because of this,
4140 an <link to="IProgress" /> object is returned to allow the caller to wait
4141 for this asynchronous operation to be completed. Until then, the caller's
4142 session object remains in the "Unlocked" state, and its <link to="ISession::machine" />
4143 and <link to="ISession::console" /> attributes cannot be accessed.
4144 It is recommended to use <link to="IProgress::waitForCompletion" /> or
4145 similar calls to wait for completion. Completion is signalled when the VM
4146 is powered on. If launching the VM fails, error messages can be queried
4147 via the progress object, if available.
4148
4149 The progress object will have at least 2 sub-operations. The first
4150 operation covers the period up to the new VM process calls powerUp.
4151 The subsequent operations mirror the <link to="IConsole::powerUp"/>
4152 progress object. Because <link to="IConsole::powerUp"/> may require
4153 some extra sub-operations, the <link to="IProgress::operationCount"/>
4154 may change at the completion of operation.
4155
4156 For details on the teleportation progress operation, see
4157 <link to="IConsole::powerUp"/>.
4158
4159 The @a environment argument is a string containing definitions of
4160 environment variables in the following format:
4161 @code
4162 NAME[=VALUE]\n
4163 NAME[=VALUE]\n
4164 ...
4165 @endcode
4166 where <tt>\\n</tt> is the new line character. These environment
4167 variables will be appended to the environment of the VirtualBox server
4168 process. If an environment variable exists both in the server process
4169 and in this list, the value from this list takes precedence over the
4170 server's variable. If the value of the environment variable is
4171 omitted, this variable will be removed from the resulting environment.
4172 If the environment string is @c null or empty, the server environment
4173 is inherited by the started process as is.
4174
4175 <result name="E_UNEXPECTED">
4176 Virtual machine not registered.
4177 </result>
4178 <result name="E_INVALIDARG">
4179 Invalid session type @a type.
4180 </result>
4181 <result name="VBOX_E_OBJECT_NOT_FOUND">
4182 No machine matching @a machineId found.
4183 </result>
4184 <result name="VBOX_E_INVALID_OBJECT_STATE">
4185 Session already open or being opened.
4186 </result>
4187 <result name="VBOX_E_IPRT_ERROR">
4188 Launching process for machine failed.
4189 </result>
4190 <result name="VBOX_E_VM_ERROR">
4191 Failed to assign machine to session.
4192 </result>
4193 </desc>
4194 <param name="session" type="ISession" dir="in">
4195 <desc>
4196 Client session object to which the VM process will be connected (this
4197 must be in "Unlocked" state).
4198 </desc>
4199 </param>
4200 <param name="type" type="wstring" dir="in">
4201 <desc>
4202 Front-end to use for the new VM process. The following are currently supported:
4203 <ul>
4204 <li><tt>"gui"</tt>: VirtualBox Qt GUI front-end</li>
4205 <li><tt>"vrdp"</tt>: VBoxHeadless (VRDP Server) front-end</li>
4206 <li><tt>"sdl"</tt>: VirtualBox SDL front-end</li>
4207 </ul>
4208 </desc>
4209 </param>
4210 <param name="environment" type="wstring" dir="in">
4211 <desc>
4212 Environment to pass to the VM process.
4213 </desc>
4214 </param>
4215 <param name="progress" type="IProgress" dir="return">
4216 <desc>Progress object to track the operation completion.</desc>
4217 </param>
4218 </method>
4219
4220 <method name="setBootOrder">
4221 <desc>
4222 Puts the given device to the specified position in
4223 the boot order.
4224
4225 To indicate that no device is associated with the given position,
4226 <link to="DeviceType::Null"/> should be used.
4227
4228 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4229
4230 <result name="E_INVALIDARG">
4231 Boot @a position out of range.
4232 </result>
4233 <result name="E_NOTIMPL">
4234 Booting from USB @a device currently not supported.
4235 </result>
4236
4237 </desc>
4238 <param name="position" type="unsigned long" dir="in">
4239 <desc>
4240 Position in the boot order (@c 1 to the total number of
4241 devices the machine can boot from, as returned by
4242 <link to="ISystemProperties::maxBootPosition"/>).
4243 </desc>
4244 </param>
4245 <param name="device" type="DeviceType" dir="in">
4246 <desc>
4247 The type of the device used to boot at the given position.
4248 </desc>
4249 </param>
4250 </method>
4251
4252 <method name="getBootOrder" const="yes">
4253 <desc>
4254 Returns the device type that occupies the specified
4255 position in the boot order.
4256
4257 @todo [remove?]
4258 If the machine can have more than one device of the returned type
4259 (such as hard disks), then a separate method should be used to
4260 retrieve the individual device that occupies the given position.
4261
4262 If here are no devices at the given position, then
4263 <link to="DeviceType::Null"/> is returned.
4264
4265 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4266
4267 <result name="E_INVALIDARG">
4268 Boot @a position out of range.
4269 </result>
4270
4271 </desc>
4272 <param name="position" type="unsigned long" dir="in">
4273 <desc>
4274 Position in the boot order (@c 1 to the total number of
4275 devices the machine can boot from, as returned by
4276 <link to="ISystemProperties::maxBootPosition"/>).
4277 </desc>
4278 </param>
4279 <param name="device" type="DeviceType" dir="return">
4280 <desc>
4281 Device at the given position.
4282 </desc>
4283 </param>
4284 </method>
4285
4286 <method name="attachDevice">
4287 <desc>
4288 Attaches a device and optionally mounts a medium to the given storage
4289 controller (<link to="IStorageController" />, identified by @a name),
4290 at the indicated port and device.
4291
4292 This method is intended for managing storage devices in general while a
4293 machine is powered off. It can be used to attach and detach fixed
4294 and removeable media. The following kind of media can be attached
4295 to a machine:
4296
4297 <ul>
4298 <li>For fixed and removable media, you can pass in a medium that was
4299 previously opened using <link to="IVirtualBox::openMedium" />.
4300 </li>
4301
4302 <li>Only for storage devices supporting removable media (such as
4303 DVDs and floppies), you can also specify a null pointer to
4304 indicate an empty drive or one of the medium objects listed
4305 in the <link to="IHost::DVDDrives" /> and <link to="IHost::floppyDrives"/>
4306 arrays to indicate a host drive.
4307 For removeable devices, you can also use <link to="IMachine::mountMedium"/>
4308 to change the media while the machine is running.
4309 </li>
4310 </ul>
4311
4312 In a VM's default configuration of virtual machines, the secondary
4313 master of the IDE controller is used for a CD/DVD drive.
4314
4315 After calling this returns successfully, a new instance of
4316 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4317 attachments (see <link to="IMachine::mediumAttachments"/>).
4318
4319 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4320 information about attaching media.
4321
4322 The specified device slot must not have a device attached to it,
4323 or this method will fail.
4324
4325 <note>
4326 You cannot attach a device to a newly created machine until
4327 this machine's settings are saved to disk using
4328 <link to="#saveSettings"/>.
4329 </note>
4330 <note>
4331 If the medium is being attached indirectly, a new differencing medium
4332 will implicitly be created for it and attached instead. If the
4333 changes made to the machine settings (including this indirect
4334 attachment) are later cancelled using <link to="#discardSettings"/>,
4335 this implicitly created differencing medium will implicitly
4336 be deleted.
4337 </note>
4338
4339 <result name="E_INVALIDARG">
4340 SATA device, SATA port, IDE port or IDE slot out of range, or
4341 file or UUID not found.
4342 </result>
4343 <result name="VBOX_E_INVALID_OBJECT_STATE">
4344 Machine must be registered before media can be attached.
4345 </result>
4346 <result name="VBOX_E_INVALID_VM_STATE">
4347 Invalid machine state.
4348 </result>
4349 <result name="VBOX_E_OBJECT_IN_USE">
4350 A medium is already attached to this or another virtual machine.
4351 </result>
4352
4353 </desc>
4354 <param name="name" type="wstring" dir="in">
4355 <desc>Name of the storage controller to attach the device to.</desc>
4356 </param>
4357 <param name="controllerPort" type="long" dir="in">
4358 <desc>Port to attach the device to. For an IDE controller, 0 specifies
4359 the primary controller and 1 specifies the secondary controller.
4360 For a SCSI controller, this must range from 0 to 15; for a SATA controller,
4361 from 0 to 29; for an SAS controller, from 0 to 7.</desc>
4362 </param>
4363 <param name="device" type="long" dir="in">
4364 <desc>Device slot in the given port to attach the device to. This is only
4365 relevant for IDE controllers, for which 0 specifies the master device and
4366 1 specifies the slave device. For all other controller types, this must
4367 be 0.</desc>
4368 </param>
4369 <param name="type" type="DeviceType" dir="in">
4370 <desc>Device type of the attached device. For media opened by
4371 <link to="IVirtualBox::openMedium" />, this must match the device type
4372 specified there.</desc>
4373 </param>
4374 <param name="medium" type="IMedium" dir="in">
4375 <desc>Medium to mount or NULL for an empty drive.</desc>
4376 </param>
4377 </method>
4378
4379 <method name="detachDevice">
4380 <desc>
4381 Detaches the device attached to a device slot of the specified bus.
4382
4383 Detaching the device from the virtual machine is deferred. This means
4384 that the medium remains associated with the machine when this method
4385 returns and gets actually de-associated only after a successful
4386 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4387 for more detailed information about attaching media.
4388
4389 <note>
4390 You cannot detach a device from a running machine.
4391 </note>
4392 <note>
4393 Detaching differencing media implicitly created by <link
4394 to="#attachDevice"/> for the indirect attachment using this
4395 method will <b>not</b> implicitly delete them. The
4396 <link to="IMedium::deleteStorage"/> operation should be
4397 explicitly performed by the caller after the medium is successfully
4398 detached and the settings are saved with
4399 <link to="#saveSettings"/>, if it is the desired action.
4400 </note>
4401
4402 <result name="VBOX_E_INVALID_VM_STATE">
4403 Attempt to detach medium from a running virtual machine.
4404 </result>
4405 <result name="VBOX_E_OBJECT_NOT_FOUND">
4406 No medium attached to given slot/bus.
4407 </result>
4408 <result name="VBOX_E_NOT_SUPPORTED">
4409 Medium format does not support storage deletion.
4410 </result>
4411
4412 </desc>
4413 <param name="name" type="wstring" dir="in">
4414 <desc>Name of the storage controller to detach the medium from.</desc>
4415 </param>
4416 <param name="controllerPort" type="long" dir="in">
4417 <desc>Port number to detach the medium from.</desc>
4418 </param>
4419 <param name="device" type="long" dir="in">
4420 <desc>Device slot number to detach the medium from.</desc>
4421 </param>
4422 </method>
4423
4424 <method name="passthroughDevice">
4425 <desc>
4426 Sets the passthrough mode of an existing DVD device. Changing the
4427 setting while the VM is running is forbidden. The setting is only used
4428 if at VM start the device is configured as a host DVD drive, in all
4429 other cases it is ignored. The device must already exist; see
4430 <link to="IMachine::attachDevice"/> for how to attach a new device.
4431
4432 The @a controllerPort and @a device parameters specify the device slot and
4433 have have the same meaning as with <link to="IMachine::attachDevice" />.
4434
4435 <result name="E_INVALIDARG">
4436 SATA device, SATA port, IDE port or IDE slot out of range.
4437 </result>
4438 <result name="VBOX_E_INVALID_OBJECT_STATE">
4439 Attempt to modify an unregistered virtual machine.
4440 </result>
4441 <result name="VBOX_E_INVALID_VM_STATE">
4442 Invalid machine state.
4443 </result>
4444
4445 </desc>
4446 <param name="name" type="wstring" dir="in">
4447 <desc>Name of the storage controller.</desc>
4448 </param>
4449 <param name="controllerPort" type="long" dir="in">
4450 <desc>Storage controller port.</desc>
4451 </param>
4452 <param name="device" type="long" dir="in">
4453 <desc>Device slot in the given port.</desc>
4454 </param>
4455 <param name="passthrough" type="boolean" dir="in">
4456 <desc>New value for the passthrough setting.</desc>
4457 </param>
4458 </method>
4459
4460 <method name="mountMedium">
4461 <desc>
4462 Mounts a medium (<link to="IMedium" />, identified
4463 by the given UUID @a id) to the given storage controller
4464 (<link to="IStorageController" />, identified by @a name),
4465 at the indicated port and device. The device must already exist;
4466 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4467
4468 This method is intended only for managing removable media, where the
4469 device is fixed but media is changeable at runtime (such as DVDs
4470 and floppies). It cannot be used for fixed media such as hard disks.
4471
4472 The @a controllerPort and @a device parameters specify the device slot and
4473 have have the same meaning as with <link to="IMachine::attachDevice" />.
4474
4475 The specified device slot can have a medium mounted, which will be
4476 unmounted first. Specifying a zero UUID (or an empty string) for
4477 @a medium does just an unmount.
4478
4479 See <link to="IMedium"/> for more detailed information about
4480 attaching media.
4481
4482 <result name="E_INVALIDARG">
4483 SATA device, SATA port, IDE port or IDE slot out of range.
4484 </result>
4485 <result name="VBOX_E_INVALID_OBJECT_STATE">
4486 Attempt to attach medium to an unregistered virtual machine.
4487 </result>
4488 <result name="VBOX_E_INVALID_VM_STATE">
4489 Invalid machine state.
4490 </result>
4491 <result name="VBOX_E_OBJECT_IN_USE">
4492 Medium already attached to this or another virtual machine.
4493 </result>
4494
4495 </desc>
4496 <param name="name" type="wstring" dir="in">
4497 <desc>Name of the storage controller to attach the medium to.</desc>
4498 </param>
4499 <param name="controllerPort" type="long" dir="in">
4500 <desc>Port to attach the medium to.</desc>
4501 </param>
4502 <param name="device" type="long" dir="in">
4503 <desc>Device slot in the given port to attach the medium to.</desc>
4504 </param>
4505 <param name="medium" type="uuid" mod="string" dir="in">
4506 <desc>UUID of the medium to attach. A zero UUID means unmount the
4507 currently mounted medium.</desc>
4508 </param>
4509 <param name="force" type="boolean" dir="in">
4510 <desc>Allows to force unmount/mount of a medium which is locked by
4511 theDevice slot in the given port to attach the medium to.</desc>
4512 </param>
4513 </method>
4514
4515 <method name="getMedium" const="yes">
4516 <desc>
4517 Returns the virtual medium attached to a device slot of the specified
4518 bus.
4519
4520 Note that if the medium was indirectly attached by
4521 <link to="#mountMedium"/> to the given device slot then this
4522 method will return not the same object as passed to the
4523 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4524 more detailed information about mounting a medium.
4525
4526 <result name="VBOX_E_OBJECT_NOT_FOUND">
4527 No medium attached to given slot/bus.
4528 </result>
4529
4530 </desc>
4531 <param name="name" type="wstring" dir="in">
4532 <desc>Name of the storage controller the medium is attached to.</desc>
4533 </param>
4534 <param name="controllerPort" type="long" dir="in">
4535 <desc>Port to query.</desc>
4536 </param>
4537 <param name="device" type="long" dir="in">
4538 <desc>Device slot in the given port to query.</desc>
4539 </param>
4540 <param name="medium" type="IMedium" dir="return">
4541 <desc>Attached medium object.</desc>
4542 </param>
4543 </method>
4544
4545 <method name="getMediumAttachmentsOfController" const="yes">
4546 <desc>
4547 Returns an array of medium attachments which are attached to the
4548 the controller with the given name.
4549
4550 <result name="VBOX_E_OBJECT_NOT_FOUND">
4551 A storage controller with given name doesn't exist.
4552 </result>
4553 </desc>
4554 <param name="name" type="wstring" dir="in"/>
4555 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4556 </method>
4557
4558 <method name="getMediumAttachment" const="yes">
4559 <desc>
4560 Returns a medium attachment which corresponds to the controller with
4561 the given name, on the given port and device slot.
4562
4563 <result name="VBOX_E_OBJECT_NOT_FOUND">
4564 No attachment exists for the given controller/port/device combination.
4565 </result>
4566 </desc>
4567 <param name="name" type="wstring" dir="in"/>
4568 <param name="controllerPort" type="long" dir="in"/>
4569 <param name="device" type="long" dir="in"/>
4570 <param name="attachment" type="IMediumAttachment" dir="return"/>
4571 </method>
4572
4573 <method name="getNetworkAdapter" const="yes">
4574 <desc>
4575 Returns the network adapter associated with the given slot.
4576 Slots are numbered sequentially, starting with zero. The total
4577 number of adapters per machine is defined by the
4578 <link to="ISystemProperties::networkAdapterCount"/> property,
4579 so the maximum slot number is one less than that property's value.
4580
4581 <result name="E_INVALIDARG">
4582 Invalid @a slot number.
4583 </result>
4584
4585 </desc>
4586 <param name="slot" type="unsigned long" dir="in"/>
4587 <param name="adapter" type="INetworkAdapter" dir="return"/>
4588 </method>
4589
4590 <method name="addStorageController">
4591 <desc>
4592 Adds a new storage controller (SCSI, SAS or SATA controller) to the
4593 machine and returns it as an instance of
4594 <link to="IStorageController" />.
4595
4596 @a name identifies the controller for subsequent calls such as
4597 <link to="#getStorageControllerByName" />,
4598 <link to="#getStorageControllerByInstance" />,
4599 <link to="#removeStorageController" />,
4600 <link to="#attachDevice" /> or <link to="#mountMedium" />.
4601
4602 After the controller has been added, you can set its exact
4603 type by setting the <link to="IStorageController::controllerType" />.
4604
4605 <result name="VBOX_E_OBJECT_IN_USE">
4606 A storage controller with given name exists already.
4607 </result>
4608 <result name="E_INVALIDARG">
4609 Invalid @a controllerType.
4610 </result>
4611 </desc>
4612 <param name="name" type="wstring" dir="in"/>
4613 <param name="connectionType" type="StorageBus" dir="in"/>
4614 <param name="controller" type="IStorageController" dir="return"/>
4615 </method>
4616
4617 <method name="getStorageControllerByName" const="yes">
4618 <desc>
4619 Returns a storage controller with the given name.
4620
4621 <result name="VBOX_E_OBJECT_NOT_FOUND">
4622 A storage controller with given name doesn't exist.
4623 </result>
4624 </desc>
4625 <param name="name" type="wstring" dir="in"/>
4626 <param name="storageController" type="IStorageController" dir="return"/>
4627 </method>
4628
4629 <method name="getStorageControllerByInstance" const="yes">
4630 <desc>
4631 Returns a storage controller with the given instance number.
4632
4633 <result name="VBOX_E_OBJECT_NOT_FOUND">
4634 A storage controller with given instance number doesn't exist.
4635 </result>
4636 </desc>
4637 <param name="instance" type="unsigned long" dir="in"/>
4638 <param name="storageController" type="IStorageController" dir="return"/>
4639 </method>
4640
4641 <method name="removeStorageController">
4642 <desc>
4643 Removes a storage controller from the machine.
4644
4645 <result name="VBOX_E_OBJECT_NOT_FOUND">
4646 A storage controller with given name doesn't exist.
4647 </result>
4648 </desc>
4649 <param name="name" type="wstring" dir="in"/>
4650 </method>
4651
4652 <method name="getSerialPort" const="yes">
4653 <desc>
4654 Returns the serial port associated with the given slot.
4655 Slots are numbered sequentially, starting with zero. The total
4656 number of serial ports per machine is defined by the
4657 <link to="ISystemProperties::serialPortCount"/> property,
4658 so the maximum slot number is one less than that property's value.
4659
4660 <result name="E_INVALIDARG">
4661 Invalid @a slot number.
4662 </result>
4663
4664 </desc>
4665 <param name="slot" type="unsigned long" dir="in"/>
4666 <param name="port" type="ISerialPort" dir="return"/>
4667 </method>
4668
4669 <method name="getParallelPort" const="yes">
4670 <desc>
4671 Returns the parallel port associated with the given slot.
4672 Slots are numbered sequentially, starting with zero. The total
4673 number of parallel ports per machine is defined by the
4674 <link to="ISystemProperties::parallelPortCount"/> property,
4675 so the maximum slot number is one less than that property's value.
4676
4677 <result name="E_INVALIDARG">
4678 Invalid @a slot number.
4679 </result>
4680
4681 </desc>
4682 <param name="slot" type="unsigned long" dir="in"/>
4683 <param name="port" type="IParallelPort" dir="return"/>
4684 </method>
4685
4686 <method name="getExtraDataKeys">
4687 <desc>
4688 Returns an array representing the machine-specific extra data keys
4689 which currently have values defined.
4690 </desc>
4691 <param name="value" type="wstring" dir="return" safearray="yes">
4692 <desc>Array of extra data keys.</desc>
4693 </param>
4694 </method>
4695
4696 <method name="getExtraData">
4697 <desc>
4698 Returns associated machine-specific extra data.
4699
4700 If the requested data @a key does not exist, this function will
4701 succeed and return an empty string in the @a value argument.
4702
4703 <result name="VBOX_E_FILE_ERROR">
4704 Settings file not accessible.
4705 </result>
4706 <result name="VBOX_E_XML_ERROR">
4707 Could not parse the settings file.
4708 </result>
4709
4710 </desc>
4711 <param name="key" type="wstring" dir="in">
4712 <desc>Name of the data key to get.</desc>
4713 </param>
4714 <param name="value" type="wstring" dir="return">
4715 <desc>Value of the requested data key.</desc>
4716 </param>
4717 </method>
4718
4719 <method name="setExtraData">
4720 <desc>
4721 Sets associated machine-specific extra data.
4722
4723 If you pass @c null or an empty string as a key @a value, the given
4724 @a key will be deleted.
4725
4726 <note>
4727 Before performing the actual data change, this method will ask all
4728 registered listeners using the
4729 <link to="IExtraDataCanChangeEvent"/>
4730 notification for a permission. If one of the listeners refuses the
4731 new value, the change will not be performed.
4732 </note>
4733 <note>
4734 On success, the
4735 <link to="IExtraDataChangedEvent"/> notification
4736 is called to inform all registered listeners about a successful data
4737 change.
4738 </note>
4739 <note>
4740 This method can be called outside the machine session and therefore
4741 it's a caller's responsibility to handle possible race conditions
4742 when several clients change the same key at the same time.
4743 </note>
4744
4745 <result name="VBOX_E_FILE_ERROR">
4746 Settings file not accessible.
4747 </result>
4748 <result name="VBOX_E_XML_ERROR">
4749 Could not parse the settings file.
4750 </result>
4751
4752 </desc>
4753 <param name="key" type="wstring" dir="in">
4754 <desc>Name of the data key to set.</desc>
4755 </param>
4756 <param name="value" type="wstring" dir="in">
4757 <desc>Value to assign to the key.</desc>
4758 </param>
4759 </method>
4760
4761 <method name="getCPUProperty" const="yes">
4762 <desc>
4763 Returns the virtual CPU boolean value of the specified property.
4764
4765 <result name="E_INVALIDARG">
4766 Invalid property.
4767 </result>
4768
4769 </desc>
4770 <param name="property" type="CPUPropertyType" dir="in">
4771 <desc>
4772 Property type to query.
4773 </desc>
4774 </param>
4775 <param name="value" type="boolean" dir="return">
4776 <desc>
4777 Property value.
4778 </desc>
4779 </param>
4780 </method>
4781
4782 <method name="setCPUProperty">
4783 <desc>
4784 Sets the virtual CPU boolean value of the specified property.
4785
4786 <result name="E_INVALIDARG">
4787 Invalid property.
4788 </result>
4789
4790 </desc>
4791 <param name="property" type="CPUPropertyType" dir="in">
4792 <desc>
4793 Property type to query.
4794 </desc>
4795 </param>
4796 <param name="value" type="boolean" dir="in">
4797 <desc>
4798 Property value.
4799 </desc>
4800 </param>
4801 </method>
4802
4803 <method name="getCPUIDLeaf" const="yes">
4804 <desc>
4805 Returns the virtual CPU cpuid information for the specified leaf.
4806
4807 Currently supported index values for cpuid:
4808 Standard CPUID leafs: 0 - 0xA
4809 Extended CPUID leafs: 0x80000000 - 0x8000000A
4810
4811 See the Intel and AMD programmer's manuals for detailed information
4812 about the cpuid instruction and its leafs.
4813 <result name="E_INVALIDARG">
4814 Invalid id.
4815 </result>
4816
4817 </desc>
4818 <param name="id" type="unsigned long" dir="in">
4819 <desc>
4820 CPUID leaf index.
4821 </desc>
4822 </param>
4823 <param name="valEax" type="unsigned long" dir="out">
4824 <desc>
4825 CPUID leaf value for register eax.
4826 </desc>
4827 </param>
4828 <param name="valEbx" type="unsigned long" dir="out">
4829 <desc>
4830 CPUID leaf value for register ebx.
4831 </desc>
4832 </param>
4833 <param name="valEcx" type="unsigned long" dir="out">
4834 <desc>
4835 CPUID leaf value for register ecx.
4836 </desc>
4837 </param>
4838 <param name="valEdx" type="unsigned long" dir="out">
4839 <desc>
4840 CPUID leaf value for register edx.
4841 </desc>
4842 </param>
4843 </method>
4844
4845 <method name="setCPUIDLeaf">
4846 <desc>
4847 Sets the virtual CPU cpuid information for the specified leaf. Note that these values
4848 are not passed unmodified. VirtualBox clears features that it doesn't support.
4849
4850 Currently supported index values for cpuid:
4851 Standard CPUID leafs: 0 - 0xA
4852 Extended CPUID leafs: 0x80000000 - 0x8000000A
4853
4854 See the Intel and AMD programmer's manuals for detailed information
4855 about the cpuid instruction and its leafs.
4856
4857 Do not use this method unless you know exactly what you're doing. Misuse can lead to
4858 random crashes inside VMs.
4859 <result name="E_INVALIDARG">
4860 Invalid id.
4861 </result>
4862
4863 </desc>
4864 <param name="id" type="unsigned long" dir="in">
4865 <desc>
4866 CPUID leaf index.
4867 </desc>
4868 </param>
4869 <param name="valEax" type="unsigned long" dir="in">
4870 <desc>
4871 CPUID leaf value for register eax.
4872 </desc>
4873 </param>
4874 <param name="valEbx" type="unsigned long" dir="in">
4875 <desc>
4876 CPUID leaf value for register ebx.
4877 </desc>
4878 </param>
4879 <param name="valEcx" type="unsigned long" dir="in">
4880 <desc>
4881 CPUID leaf value for register ecx.
4882 </desc>
4883 </param>
4884 <param name="valEdx" type="unsigned long" dir="in">
4885 <desc>
4886 CPUID leaf value for register edx.
4887 </desc>
4888 </param>
4889 </method>
4890
4891 <method name="removeCPUIDLeaf">
4892 <desc>
4893 Removes the virtual CPU cpuid leaf for the specified index
4894
4895 <result name="E_INVALIDARG">
4896 Invalid id.
4897 </result>
4898
4899 </desc>
4900 <param name="id" type="unsigned long" dir="in">
4901 <desc>
4902 CPUID leaf index.
4903 </desc>
4904 </param>
4905 </method>
4906
4907 <method name="removeAllCPUIDLeaves">
4908 <desc>
4909 Removes all the virtual CPU cpuid leaves
4910 </desc>
4911 </method>
4912
4913 <method name="getHWVirtExProperty" const="yes">
4914 <desc>
4915 Returns the value of the specified hardware virtualization boolean property.
4916
4917 <result name="E_INVALIDARG">
4918 Invalid property.
4919 </result>
4920
4921 </desc>
4922 <param name="property" type="HWVirtExPropertyType" dir="in">
4923 <desc>
4924 Property type to query.
4925 </desc>
4926 </param>
4927 <param name="value" type="boolean" dir="return">
4928 <desc>
4929 Property value.
4930 </desc>
4931 </param>
4932 </method>
4933
4934 <method name="setHWVirtExProperty">
4935 <desc>
4936 Sets a new value for the specified hardware virtualization boolean property.
4937
4938 <result name="E_INVALIDARG">
4939 Invalid property.
4940 </result>
4941
4942 </desc>
4943 <param name="property" type="HWVirtExPropertyType" dir="in">
4944 <desc>
4945 Property type to set.
4946 </desc>
4947 </param>
4948 <param name="value" type="boolean" dir="in">
4949 <desc>
4950 New property value.
4951 </desc>
4952 </param>
4953 </method>
4954
4955 <method name="saveSettings">
4956 <desc>
4957 Saves any changes to machine settings made since the session
4958 has been opened or a new machine has been created, or since the
4959 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
4960 For registered machines, new settings become visible to all
4961 other VirtualBox clients after successful invocation of this
4962 method.
4963 <note>
4964 The method sends <link to="IMachineDataChangedEvent"/>
4965 notification event after the configuration has been successfully
4966 saved (only for registered machines).
4967 </note>
4968 <note>
4969 Calling this method is only valid on instances returned
4970 by <link to="ISession::machine"/> and on new machines
4971 created by <link to="IVirtualBox::createMachine"/> but not
4972 yet registered, or on unregistered machines after calling
4973 <link to="IMachine::unregister"/>.
4974 </note>
4975
4976 <result name="VBOX_E_FILE_ERROR">
4977 Settings file not accessible.
4978 </result>
4979 <result name="VBOX_E_XML_ERROR">
4980 Could not parse the settings file.
4981 </result>
4982 <result name="E_ACCESSDENIED">
4983 Modification request refused.
4984 </result>
4985
4986 </desc>
4987 </method>
4988
4989 <method name="discardSettings">
4990 <desc>
4991 Discards any changes to the machine settings made since the session
4992 has been opened or since the last call to <link to="#saveSettings"/>
4993 or <link to="#discardSettings"/>.
4994 <note>
4995 Calling this method is only valid on instances returned
4996 by <link to="ISession::machine"/> and on new machines
4997 created by <link to="IVirtualBox::createMachine"/> or
4998 opened by <link to="IVirtualBox::openMachine"/> but not
4999 yet registered, or on unregistered machines after calling
5000 <link to="IMachine::unregister"/>.
5001 </note>
5002
5003 <result name="VBOX_E_INVALID_VM_STATE">
5004 Virtual machine is not mutable.
5005 </result>
5006
5007 </desc>
5008 </method>
5009
5010 <method name="unregister">
5011 <desc>
5012 Unregisters the machine, which must have been previously registered using
5013 <link to="IVirtualBox::registerMachine"/>, and optionally do additional
5014 cleanup before the machine is unregistered.
5015
5016 This method does not delete any files. It only changes the machine configuration and
5017 the list of registered machines in the VirtualBox object. To delete the files which
5018 belonged to the machine, including the XML file of the machine itself, call
5019 <link to="#delete"/>, optionally with the array of IMedium objects which was returned
5020 from this method.
5021
5022 How thoroughly this method cleans up the machine configuration before unregistering
5023 the machine depends on the @a cleanupMode argument.
5024
5025 <ul>
5026 <li>With "UnregisterOnly", the machine will only be unregistered, but no additional
5027 cleanup will be performed. The call will fail if the machine is in "Saved" state
5028 or has any snapshots or any media attached (see <link to="IMediumAttachment" />.
5029 It is the responsibility of the caller to delete all such configuration in this mode.
5030 In this mode, the API behaves like the former @c IVirtualBox::unregisterMachine() API
5031 which it replaces.</li>
5032 <li>With "DetachAllReturnNone", the call will succeed even if the machine is in "Saved"
5033 state or if it has snapshots or media attached. All media attached to the current machine
5034 state or in snapshots will be detached. No medium objects will be returned; all of the
5035 machine's media will remain open.</li>
5036 <li>With "DetachAllReturnHardDisksOnly", the call will behave like with "DetachAllReturnNone",
5037 except that all the hard disk medium objects which were detached from the machine will
5038 be returned as an array. This allows for quickly passing them to the <link to="#delete" />
5039 API for closing and deletion.</li>
5040 <li>With "Full", the call will behave like with "DetachAllReturnHardDisksOnly", except
5041 that all media will be returned in the array, including removeable media like DVDs and
5042 floppies. This might be useful if the user wants to inspect in detail which media were
5043 attached to the machine. Be careful when passing the media array to <link to="#delete" />
5044 in that case because users will typically want to preserve ISO and RAW image files.</li>
5045 </ul>
5046
5047 This API does not verify whether the media files returned in the array are still
5048 attached to other machines (i.e. shared between several machines). If such a shared
5049 image is passed to <link to="#delete" /> however, closing the image will fail there
5050 and the image will be silently skipped.
5051
5052 A typical implementation will use "DetachAllReturnHardDisksOnly" and then pass the
5053 resulting IMedia array to <link to="#delete"/>. This way, the machine is completely
5054 deleted with all its saved states and hard disk images, but images for removeable
5055 drives (such as ISO and RAW files) will remain on disk.
5056
5057 The call will fail if the machine is currently locked (see <link to="ISession" />).
5058 It implicitly calls <link to="#saveSettings"/> to save all current machine settings
5059 before unregistering it.
5060
5061 After successful method invocation, the <link to="IMachineRegisteredEvent"/> event
5062 is fired.
5063
5064 <note>
5065 If the given machine is inaccessible (see <link to="#accessible"/>), it
5066 will be unregistered and fully uninitialized right afterwards. As a result,
5067 the returned machine object will be unusable and an attempt to call
5068 <b>any</b> method will return the "Object not ready" error.
5069 </note>
5070
5071 <result name="VBOX_E_INVALID_OBJECT_STATE">
5072 Machine is currently locked for a session.
5073 </result>
5074 </desc>
5075
5076 <param name="cleanupMode" type="CleanupMode" dir="in">
5077 <desc>How to clean up after the machine has been unregistered.</desc>
5078 </param>
5079 <param name="aMedia" type="IMedium" safearray="yes" dir="return">
5080 <desc>List of media detached from the machine, depending on the @a cleanupMode parameter.</desc>
5081 </param>
5082 </method>
5083
5084 <method name="delete">
5085 <desc>
5086 Deletes the files associated with this machine from disk. If medium objects are passed
5087 in with the @a aMedia argument, they are closed and, if closing was succesful, their
5088 storage files are deleted as well. For convenience, this array of media files can be
5089 the same as the one returned from a previous <link to="#unregister" /> call.
5090
5091 This method must only be called on machines which are either write-locked (i.e. on instances
5092 returned by <link to="ISession::machine"/>) or on unregistered machines (i.e. not yet
5093 registered machines created by <link to="IVirtualBox::createMachine"/> or opened by
5094 <link to="IVirtualBox::openMachine"/>, or after having called <link to="#unregister"/>).
5095
5096 The following files will be deleted by this method:
5097 <ul>
5098 <li>If <link to="#unregister" /> had been previously called with a @a cleanupMode
5099 argument other than "UnregisterOnly", this will delete all saved state files that
5100 the machine had in use; possibly one if the machine was in "Saved" state and one
5101 for each online snapshot that the machine had.</li>
5102 <li>On each medium object passed in the @a aMedia array, this will call
5103 <link to="IMedium::close" />. If that succeeds, this will attempt to delete the
5104 medium's storage on disk. Since the close() call will fail if the medium is still
5105 in use, e.g. because it is still attached to a second machine; in that case the
5106 storage will not be deleted.</li>
5107 <li>Finally, the machine's own XML file will be deleted.</li>
5108 </ul>
5109
5110 Since deleting large disk image files can be a time-consuming I/O operation, this
5111 method operates asynchronously and returns an IProgress object to allow the caller
5112 to monitor the progress. There will be one sub-operation for each file that is
5113 being deleted (saved state or medium storage file).
5114
5115 <note>
5116 <link to="#settingsModified"/> will return @c true after this
5117 method successfully returns.
5118 </note>
5119
5120 <result name="VBOX_E_INVALID_VM_STATE">
5121 Machine is registered but not write-locked.
5122 </result>
5123 <result name="VBOX_E_IPRT_ERROR">
5124 Could not delete the settings file.
5125 </result>
5126 </desc>
5127 <param name="aMedia" type="IMedium" safearray="yes" dir="in">
5128 <desc>List of media to be closed and whose storage files will be deleted.</desc>
5129 </param>
5130 <param name="aProgress" type="IProgress" dir="return">
5131 <desc>Progress object to track the operation completion.</desc>
5132 </param>
5133 </method>
5134
5135 <method name="export">
5136 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5137 steps required to export VirtualBox machines to OVF.
5138 </desc>
5139
5140 <param name="aAppliance" type="IAppliance" dir="in">
5141 <desc>Appliance to export this machine to.</desc>
5142 </param>
5143 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5144 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5145 </param>
5146 </method >
5147
5148 <method name="getSnapshot">
5149 <desc>
5150 Returns a snapshot of this machine with the given UUID.
5151 A @c null UUID can be used to obtain the first snapshot
5152 taken on this machine. This is useful if you want to traverse
5153 the whole tree of snapshots starting from the root.
5154
5155 <result name="VBOX_E_OBJECT_NOT_FOUND">
5156 Virtual machine has no snapshots or snapshot not found.
5157 </result>
5158
5159 </desc>
5160 <param name="id" type="uuid" mod="string" dir="in">
5161 <desc>UUID of the snapshot to get</desc>
5162 </param>
5163 <param name="snapshot" type="ISnapshot" dir="return">
5164 <desc>Snapshot object with the given UUID.</desc>
5165 </param>
5166 </method>
5167
5168 <method name="findSnapshot">
5169 <desc>
5170 Returns a snapshot of this machine with the given name.
5171
5172 <result name="VBOX_E_OBJECT_NOT_FOUND">
5173 Virtual machine has no snapshots or snapshot not found.
5174 </result>
5175
5176 </desc>
5177 <param name="name" type="wstring" dir="in">
5178 <desc>Name of the snapshot to find</desc>
5179 </param>
5180 <param name="snapshot" type="ISnapshot" dir="return">
5181 <desc>Snapshot object with the given name.</desc>
5182 </param>
5183 </method>
5184
5185 <method name="setCurrentSnapshot">
5186 <desc>
5187 Sets the current snapshot of this machine.
5188 <note>
5189 In the current implementation, this operation is not
5190 implemented.
5191 </note>
5192 </desc>
5193 <param name="id" type="uuid" mod="string" dir="in">
5194 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5195 </param>
5196 </method>
5197
5198 <method name="createSharedFolder">
5199 <desc>
5200 Creates a new permanent shared folder by associating the given logical
5201 name with the given host path, adds it to the collection of shared
5202 folders and starts sharing it. Refer to the description of
5203 <link to="ISharedFolder"/> to read more about logical names.
5204
5205 <result name="VBOX_E_OBJECT_IN_USE">
5206 Shared folder already exists.
5207 </result>
5208 <result name="VBOX_E_FILE_ERROR">
5209 Shared folder @a hostPath not accessible.
5210 </result>
5211
5212 </desc>
5213 <param name="name" type="wstring" dir="in">
5214 <desc>Unique logical name of the shared folder.</desc>
5215 </param>
5216 <param name="hostPath" type="wstring" dir="in">
5217 <desc>Full path to the shared folder in the host file system.</desc>
5218 </param>
5219 <param name="writable" type="boolean" dir="in">
5220 <desc>Whether the share is writable or readonly.</desc>
5221 </param>
5222 <param name="automount" type="boolean" dir="in">
5223 <desc>Whether the share gets automatically mounted by the guest
5224 or not.</desc>
5225 </param>
5226 </method>
5227
5228 <method name="removeSharedFolder">
5229 <desc>
5230 Removes the permanent shared folder with the given name previously
5231 created by <link to="#createSharedFolder"/> from the collection of
5232 shared folders and stops sharing it.
5233
5234 <result name="VBOX_E_INVALID_VM_STATE">
5235 Virtual machine is not mutable.
5236 </result>
5237 <result name="VBOX_E_OBJECT_NOT_FOUND">
5238 Shared folder @a name does not exist.
5239 </result>
5240
5241 </desc>
5242 <param name="name" type="wstring" dir="in">
5243 <desc>Logical name of the shared folder to remove.</desc>
5244 </param>
5245 </method>
5246
5247 <method name="canShowConsoleWindow">
5248 <desc>
5249 Returns @c true if the VM console process can activate the
5250 console window and bring it to foreground on the desktop of
5251 the host PC.
5252 <note>
5253 This method will fail if a session for this machine is not
5254 currently open.
5255 </note>
5256
5257 <result name="VBOX_E_INVALID_VM_STATE">
5258 Machine session is not open.
5259 </result>
5260
5261 </desc>
5262 <param name="canShow" type="boolean" dir="return">
5263 <desc>
5264 @c true if the console window can be shown and @c false otherwise.
5265 </desc>
5266 </param>
5267 </method>
5268
5269 <method name="showConsoleWindow">
5270 <desc>
5271 Activates the console window and brings it to foreground on
5272 the desktop of the host PC. Many modern window managers on
5273 many platforms implement some sort of focus stealing
5274 prevention logic, so that it may be impossible to activate
5275 a window without the help of the currently active
5276 application. In this case, this method will return a non-zero
5277 identifier that represents the top-level window of the VM
5278 console process. The caller, if it represents a currently
5279 active process, is responsible to use this identifier (in a
5280 platform-dependent manner) to perform actual window
5281 activation.
5282 <note>
5283 This method will fail if a session for this machine is not
5284 currently open.
5285 </note>
5286
5287 <result name="VBOX_E_INVALID_VM_STATE">
5288 Machine session is not open.
5289 </result>
5290
5291 </desc>
5292 <param name="winId" type="long long" dir="return">
5293 <desc>
5294 Platform-dependent identifier of the top-level VM console
5295 window, or zero if this method has performed all actions
5296 necessary to implement the <i>show window</i> semantics for
5297 the given platform and/or VirtualBox front-end.
5298 </desc>
5299 </param>
5300 </method>
5301
5302 <method name="getGuestProperty" const="yes">
5303 <desc>
5304 Reads an entry from the machine's guest property store.
5305
5306 <result name="VBOX_E_INVALID_VM_STATE">
5307 Machine session is not open.
5308 </result>
5309
5310 </desc>
5311 <param name="name" type="wstring" dir="in">
5312 <desc>
5313 The name of the property to read.
5314 </desc>
5315 </param>
5316 <param name="value" type="wstring" dir="out">
5317 <desc>
5318 The value of the property. If the property does not exist then this
5319 will be empty.
5320 </desc>
5321 </param>
5322 <param name="timestamp" type="long long" dir="out">
5323 <desc>
5324 The time at which the property was last modified, as seen by the
5325 server process.
5326 </desc>
5327 </param>
5328 <param name="flags" type="wstring" dir="out">
5329 <desc>
5330 Additional property parameters, passed as a comma-separated list of
5331 "name=value" type entries.
5332 </desc>
5333 </param>
5334 </method>
5335
5336 <method name="getGuestPropertyValue" const="yes">
5337 <desc>
5338 Reads a value from the machine's guest property store.
5339
5340 <result name="VBOX_E_INVALID_VM_STATE">
5341 Machine session is not open.
5342 </result>
5343
5344 </desc>
5345 <param name="property" type="wstring" dir="in">
5346 <desc>
5347 The name of the property to read.
5348 </desc>
5349 </param>
5350 <param name="value" type="wstring" dir="return">
5351 <desc>
5352 The value of the property. If the property does not exist then this
5353 will be empty.
5354 </desc>
5355 </param>
5356 </method>
5357
5358 <method name="getGuestPropertyTimestamp" const="yes">
5359 <desc>
5360 Reads a property timestamp from the machine's guest property store.
5361
5362 <result name="VBOX_E_INVALID_VM_STATE">
5363 Machine session is not open.
5364 </result>
5365
5366 </desc>
5367 <param name="property" type="wstring" dir="in">
5368 <desc>
5369 The name of the property to read.
5370 </desc>
5371 </param>
5372 <param name="value" type="long long" dir="return">
5373 <desc>
5374 The timestamp. If the property does not exist then this will be
5375 empty.
5376 </desc>
5377 </param>
5378 </method>
5379
5380 <method name="setGuestProperty">
5381 <desc>
5382 Sets, changes or deletes an entry in the machine's guest property
5383 store.
5384
5385 <result name="E_ACCESSDENIED">
5386 Property cannot be changed.
5387 </result>
5388 <result name="E_INVALIDARG">
5389 Invalid @a flags.
5390 </result>
5391 <result name="VBOX_E_INVALID_VM_STATE">
5392 Virtual machine is not mutable or session not open.
5393 </result>
5394 <result name="VBOX_E_INVALID_OBJECT_STATE">
5395 Cannot set transient property when machine not running.
5396 </result>
5397
5398 </desc>
5399 <param name="property" type="wstring" dir="in">
5400 <desc>
5401 The name of the property to set, change or delete.
5402 </desc>
5403 </param>
5404 <param name="value" type="wstring" dir="in">
5405 <desc>
5406 The new value of the property to set, change or delete. If the
5407 property does not yet exist and value is non-empty, it will be
5408 created. If the value is @c null or empty, the property will be
5409 deleted if it exists.
5410 </desc>
5411 </param>
5412 <param name="flags" type="wstring" dir="in">
5413 <desc>
5414 Additional property parameters, passed as a comma-separated list of
5415 "name=value" type entries.
5416 </desc>
5417 </param>
5418 </method>
5419
5420 <method name="setGuestPropertyValue">
5421 <desc>
5422 Sets, changes or deletes a value in the machine's guest property
5423 store. The flags field will be left unchanged or created empty for a
5424 new property.
5425
5426 <result name="E_ACCESSDENIED">
5427 Property cannot be changed.
5428 </result>
5429 <result name="VBOX_E_INVALID_VM_STATE">
5430 Virtual machine is not mutable or session not open.
5431 </result>
5432 <result name="VBOX_E_INVALID_OBJECT_STATE">
5433 Cannot set transient property when machine not running.
5434 </result>
5435 </desc>
5436
5437 <param name="property" type="wstring" dir="in">
5438 <desc>
5439 The name of the property to set, change or delete.
5440 </desc>
5441 </param>
5442 <param name="value" type="wstring" dir="in">
5443 <desc>
5444 The new value of the property to set, change or delete. If the
5445 property does not yet exist and value is non-empty, it will be
5446 created. If the value is @c null or empty, the property will be
5447 deleted if it exists.
5448 </desc>
5449 </param>
5450 </method>
5451
5452 <method name="enumerateGuestProperties">
5453 <desc>
5454 Return a list of the guest properties matching a set of patterns along
5455 with their values, time stamps and flags.
5456 </desc>
5457 <param name="patterns" type="wstring" dir="in">
5458 <desc>
5459 The patterns to match the properties against, separated by '|'
5460 characters. If this is empty or @c null, all properties will match.
5461 </desc>
5462 </param>
5463 <param name="name" type="wstring" dir="out" safearray="yes">
5464 <desc>
5465 The names of the properties returned.
5466 </desc>
5467 </param>
5468 <param name="value" type="wstring" dir="out" safearray="yes">
5469 <desc>
5470 The values of the properties returned. The array entries match the
5471 corresponding entries in the @a name array.
5472 </desc>
5473 </param>
5474 <param name="timestamp" type="long long" dir="out" safearray="yes">
5475 <desc>
5476 The time stamps of the properties returned. The array entries match
5477 the corresponding entries in the @a name array.
5478 </desc>
5479 </param>
5480 <param name="flags" type="wstring" dir="out" safearray="yes">
5481 <desc>
5482 The flags of the properties returned. The array entries match the
5483 corresponding entries in the @a name array.
5484 </desc>
5485 </param>
5486 </method>
5487
5488 <method name="querySavedThumbnailSize">
5489 <desc>
5490 Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.
5491 </desc>
5492 <param name="screenId" type="unsigned long" dir="in">
5493 <desc>
5494 Saved guest screen to query info from.
5495 </desc>
5496 </param>
5497 <param name="size" type="unsigned long" dir="out">
5498 <desc>
5499 Size of buffer required to store the bitmap.
5500 </desc>
5501 </param>
5502 <param name="width" type="unsigned long" dir="out">
5503 <desc>
5504 Bitmap width.
5505 </desc>
5506 </param>
5507 <param name="height" type="unsigned long" dir="out">
5508 <desc>
5509 Bitmap height.
5510 </desc>
5511 </param>
5512 </method>
5513
5514 <method name="readSavedThumbnailToArray">
5515 <desc>
5516 Thumbnail is retrieved to an array of bytes in uncompressed 32-bit BGRA or RGBA format.
5517 </desc>
5518 <param name="screenId" type="unsigned long" dir="in">
5519 <desc>
5520 Saved guest screen to read from.
5521 </desc>
5522 </param>
5523 <param name="BGR" type="boolean" dir="in">
5524 <desc>
5525 How to order bytes in the pixel. A pixel consists of 4 bytes. If this parameter is true, then
5526 bytes order is: B, G, R, 0xFF. If this parameter is false, then bytes order is: R, G, B, 0xFF.
5527 </desc>
5528 </param>
5529 <param name="width" type="unsigned long" dir="out">
5530 <desc>
5531 Bitmap width.
5532 </desc>
5533 </param>
5534 <param name="height" type="unsigned long" dir="out">
5535 <desc>
5536 Bitmap height.
5537 </desc>
5538 </param>
5539 <param name="data" type="octet" safearray="yes" dir="return">
5540 <desc>
5541 Array with resulting bitmap data.
5542 </desc>
5543 </param>
5544 </method>
5545
5546 <method name="readSavedThumbnailPNGToArray">
5547 <desc>
5548 Thumbnail in PNG format is retrieved to an array of bytes.
5549 </desc>
5550 <param name="screenId" type="unsigned long" dir="in">
5551 <desc>
5552 Saved guest screen to read from.
5553 </desc>
5554 </param>
5555 <param name="width" type="unsigned long" dir="out">
5556 <desc>
5557 Image width.
5558 </desc>
5559 </param>
5560 <param name="height" type="unsigned long" dir="out">
5561 <desc>
5562 Image height.
5563 </desc>
5564 </param>
5565 <param name="data" type="octet" dir="return" safearray="yes">
5566 <desc>
5567 Array with resulting PNG data.
5568 </desc>
5569 </param>
5570 </method>
5571
5572 <method name="querySavedScreenshotPNGSize">
5573 <desc>
5574 Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.
5575 </desc>
5576 <param name="screenId" type="unsigned long" dir="in">
5577 <desc>
5578 Saved guest screen to query info from.
5579 </desc>
5580 </param>
5581 <param name="size" type="unsigned long" dir="out">
5582 <desc>
5583 Size of buffer required to store the PNG binary data.
5584 </desc>
5585 </param>
5586 <param name="width" type="unsigned long" dir="out">
5587 <desc>
5588 Image width.
5589 </desc>
5590 </param>
5591 <param name="height" type="unsigned long" dir="out">
5592 <desc>
5593 Image height.
5594 </desc>
5595 </param>
5596 </method>
5597
5598 <method name="readSavedScreenshotPNGToArray">
5599 <desc>
5600 Screenshot in PNG format is retrieved to an array of bytes.
5601 </desc>
5602 <param name="screenId" type="unsigned long" dir="in">
5603 <desc>
5604 Saved guest screen to read from.
5605 </desc>
5606 </param>
5607 <param name="width" type="unsigned long" dir="out">
5608 <desc>
5609 Image width.
5610 </desc>
5611 </param>
5612 <param name="height" type="unsigned long" dir="out">
5613 <desc>
5614 Image height.
5615 </desc>
5616 </param>
5617 <param name="data" type="octet" dir="return" safearray="yes">
5618 <desc>
5619 Array with resulting PNG data.
5620 </desc>
5621 </param>
5622 </method>
5623
5624 <method name="hotPlugCPU">
5625 <desc>
5626 Plugs a CPU into the machine.
5627 </desc>
5628 <param name="cpu" type="unsigned long" dir="in">
5629 <desc>
5630 The CPU id to insert.
5631 </desc>
5632 </param>
5633 </method>
5634
5635 <method name="hotUnplugCPU">
5636 <desc>
5637 Removes a CPU from the machine.
5638 </desc>
5639 <param name="cpu" type="unsigned long" dir="in">
5640 <desc>
5641 The CPU id to remove.
5642 </desc>
5643 </param>
5644 </method>
5645
5646 <method name="getCPUStatus">
5647 <desc>
5648 Returns the current status of the given CPU.
5649 </desc>
5650 <param name="cpu" type="unsigned long" dir="in">
5651 <desc>
5652 The CPU id to check for.
5653 </desc>
5654 </param>
5655 <param name="attached" type="boolean" dir="return">
5656 <desc>
5657 Status of the CPU.
5658 </desc>
5659 </param>
5660 </method>
5661
5662 <method name="queryLogFilename">
5663 <desc>
5664 Queries for the VM log file name of an given index. Returns an empty
5665 string if a log file with that index doesn't exists.
5666 </desc>
5667 <param name="idx" type="unsigned long" dir="in">
5668 <desc>
5669 Which log file name to query. 0=current log file.
5670 </desc>
5671 </param>
5672 <param name="filename" type="wstring" dir="return">
5673 <desc>
5674 On return the full path to the log file or an empty string on error.
5675 </desc>
5676 </param>
5677 </method>
5678
5679 <method name="readLog">
5680 <desc>
5681 Reads the VM log file. The chunk size is limited, so even if you
5682 ask for a big piece there might be less data returned.
5683 </desc>
5684 <param name="idx" type="unsigned long" dir="in">
5685 <desc>
5686 Which log file to read. 0=current log file.
5687 </desc>
5688 </param>
5689 <param name="offset" type="long long" dir="in">
5690 <desc>
5691 Offset in the log file.
5692 </desc>
5693 </param>
5694 <param name="size" type="long long" dir="in">
5695 <desc>
5696 Chunk size to read in the log file.
5697 </desc>
5698 </param>
5699 <param name="data" type="octet" dir="return" safearray="yes">
5700 <desc>
5701 Data read from the log file. A data size of 0 means end of file
5702 if the requested chunk size was not 0. This is the unprocessed
5703 file data, i.e. the line ending style depends on the platform of
5704 the system the server is running on.
5705 </desc>
5706 </param>
5707 </method>
5708 </interface>
5709
5710 <!--
5711 // IConsole
5712 /////////////////////////////////////////////////////////////////////////
5713 -->
5714
5715 <interface
5716 name="IRemoteDisplayInfo" extends="$unknown"
5717 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
5718 wsmap="struct"
5719 >
5720 <desc>
5721 Contains information about the remote display (VRDP) capabilities and status.
5722 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5723 </desc>
5724
5725 <attribute name="active" type="boolean" readonly="yes">
5726 <desc>
5727 Whether the remote display connection is active.
5728 </desc>
5729 </attribute>
5730
5731 <attribute name="port" type="long" readonly="yes">
5732 <desc>
5733 VRDP server port number. If this property is equal to <tt>0</tt>, then
5734 the VRDP server failed to start, usually because there are no free TCP
5735 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
5736 server has not yet been started.
5737 </desc>
5738 </attribute>
5739
5740 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5741 <desc>
5742 How many times a client connected.
5743 </desc>
5744 </attribute>
5745
5746 <attribute name="beginTime" type="long long" readonly="yes">
5747 <desc>
5748 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5749 </desc>
5750 </attribute>
5751
5752 <attribute name="endTime" type="long long" readonly="yes">
5753 <desc>
5754 When the last connection was terminated or the current time, if
5755 connection is still active, in milliseconds since 1970-01-01 UTC.
5756 </desc>
5757 </attribute>
5758
5759 <attribute name="bytesSent" type="long long" readonly="yes">
5760 <desc>
5761 How many bytes were sent in last or current, if still active, connection.
5762 </desc>
5763 </attribute>
5764
5765 <attribute name="bytesSentTotal" type="long long" readonly="yes">
5766 <desc>
5767 How many bytes were sent in all connections.
5768 </desc>
5769 </attribute>
5770
5771 <attribute name="bytesReceived" type="long long" readonly="yes">
5772 <desc>
5773 How many bytes were received in last or current, if still active, connection.
5774 </desc>
5775 </attribute>
5776
5777 <attribute name="bytesReceivedTotal" type="long long" readonly="yes">
5778 <desc>
5779 How many bytes were received in all connections.
5780 </desc>
5781 </attribute>
5782
5783 <attribute name="user" type="wstring" readonly="yes">
5784 <desc>
5785 Login user name supplied by the client.
5786 </desc>
5787 </attribute>
5788
5789 <attribute name="domain" type="wstring" readonly="yes">
5790 <desc>
5791 Login domain name supplied by the client.
5792 </desc>
5793 </attribute>
5794
5795 <attribute name="clientName" type="wstring" readonly="yes">
5796 <desc>
5797 The client name supplied by the client.
5798 </desc>
5799 </attribute>
5800
5801 <attribute name="clientIP" type="wstring" readonly="yes">
5802 <desc>
5803 The IP address of the client.
5804 </desc>
5805 </attribute>
5806
5807 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5808 <desc>
5809 The client software version number.
5810 </desc>
5811 </attribute>
5812
5813 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5814 <desc>
5815 Public key exchange method used when connection was established.
5816 Values: 0 - RDP4 public key exchange scheme.
5817 1 - X509 certificates were sent to client.
5818 </desc>
5819 </attribute>
5820
5821 </interface>
5822
5823 <interface
5824 name="IConsole" extends="$unknown"
5825 uuid="03cb7897-ea17-4e6c-81ae-4bd90be2fde2"
5826 wsmap="managed"
5827 >
5828 <desc>
5829 The IConsole interface represents an interface to control virtual
5830 machine execution.
5831
5832 A console object gets created when a machine has been locked for a
5833 particular session (client process) using <link to="IMachine::lockMachine" />
5834 or <link to="IMachine::launchVMProcess"/>. The console object can
5835 then be found in the session's <link to="ISession::console" /> attribute.
5836
5837 Methods of the IConsole interface allow the caller to query the current
5838 virtual machine execution state, pause the machine or power it down, save
5839 the machine state or take a snapshot, attach and detach removable media
5840 and so on.
5841
5842 <see>ISession</see>
5843 </desc>
5844
5845 <attribute name="machine" type="IMachine" readonly="yes">
5846 <desc>
5847 Machine object this console is sessioned with.
5848 <note>
5849 This is a convenience property, it has the same value as
5850 <link to="ISession::machine"/> of the corresponding session
5851 object.
5852 </note>
5853 </desc>
5854 </attribute>
5855
5856 <attribute name="state" type="MachineState" readonly="yes">
5857 <desc>
5858 Current execution state of the machine.
5859 <note>
5860 This property always returns the same value as the corresponding
5861 property of the IMachine object this console is sessioned with.
5862 For the process that owns (executes) the VM, this is the
5863 preferable way of querying the VM state, because no IPC
5864 calls are made.
5865 </note>
5866 </desc>
5867 </attribute>
5868
5869 <attribute name="guest" type="IGuest" readonly="yes">
5870 <desc>Guest object.</desc>
5871 </attribute>
5872
5873 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5874 <desc>
5875 Virtual keyboard object.
5876 <note>
5877 If the machine is not running, any attempt to use
5878 the returned object will result in an error.
5879 </note>
5880 </desc>
5881 </attribute>
5882
5883 <attribute name="mouse" type="IMouse" readonly="yes">
5884 <desc>
5885 Virtual mouse object.
5886 <note>
5887 If the machine is not running, any attempt to use
5888 the returned object will result in an error.
5889 </note>
5890 </desc>
5891 </attribute>
5892
5893 <attribute name="display" type="IDisplay" readonly="yes">
5894 <desc>Virtual display object.
5895 <note>
5896 If the machine is not running, any attempt to use
5897 the returned object will result in an error.
5898 </note>
5899 </desc>
5900 </attribute>
5901
5902 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5903 <desc>Debugging interface.</desc>
5904 </attribute>
5905
5906 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
5907 <desc>
5908 Collection of USB devices currently attached to the virtual
5909 USB controller.
5910 <note>
5911 The collection is empty if the machine is not running.
5912 </note>
5913 </desc>
5914 </attribute>
5915
5916 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
5917 <desc>
5918 List of USB devices currently attached to the remote VRDP client.
5919 Once a new device is physically attached to the remote host computer,
5920 it appears in this list and remains there until detached.
5921 </desc>
5922 </attribute>
5923
5924 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
5925 <desc>
5926 Collection of shared folders for the current session. These folders
5927 are called transient shared folders because they are available to the
5928 guest OS running inside the associated virtual machine only for the
5929 duration of the session (as opposed to
5930 <link to="IMachine::sharedFolders"/> which represent permanent shared
5931 folders). When the session is closed (e.g. the machine is powered down),
5932 these folders are automatically discarded.
5933
5934 New shared folders are added to the collection using
5935 <link to="#createSharedFolder"/>. Existing shared folders can be
5936 removed using <link to="#removeSharedFolder"/>.
5937 </desc>
5938 </attribute>
5939
5940 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5941 <desc>
5942 Interface that provides information on Remote Display (VRDP) connection.
5943 </desc>
5944 </attribute>
5945
5946 <attribute name="eventSource" type="IEventSource" readonly="yes">
5947 <desc>
5948 Event source for console events.
5949 </desc>
5950 </attribute>
5951
5952 <method name="powerUp">
5953 <desc>
5954 Starts the virtual machine execution using the current machine
5955 state (that is, its current execution state, current settings and
5956 current storage devices).
5957
5958 <note>
5959 This method is only useful for front-ends that want to actually
5960 execute virtual machines in their own process (like the VirtualBox
5961 or VBoxSDL front-ends). Unless you are intending to write such a
5962 front-end, do not call this method. If you simply want to
5963 start virtual machine execution using one of the existing front-ends
5964 (for example the VirtualBox GUI or headless server), use
5965 <link to="IMachine::launchVMProcess"/> instead; these
5966 front-ends will power up the machine automatically for you.
5967 </note>
5968
5969 If the machine is powered off or aborted, the execution will
5970 start from the beginning (as if the real hardware were just
5971 powered on).
5972
5973 If the machine is in the <link to="MachineState::Saved"/> state,
5974 it will continue its execution the point where the state has
5975 been saved.
5976
5977 If the machine <link to="IMachine::teleporterEnabled"/> property is
5978 enabled on the machine being powered up, the machine will wait for an
5979 incoming teleportation in the <link to="MachineState::TeleportingIn"/>
5980 state. The returned progress object will have at least three
5981 operations where the last three are defined as: (1) powering up and
5982 starting TCP server, (2) waiting for incoming teleportations, and
5983 (3) perform teleportation. These operations will be reflected as the
5984 last three operations of the progress objected returned by
5985 <link to="IMachine::launchVMProcess"/> as well.
5986
5987 <see>#saveState</see>
5988
5989 <result name="VBOX_E_INVALID_VM_STATE">
5990 Virtual machine already running.
5991 </result>
5992 <result name="VBOX_E_HOST_ERROR">
5993 Host interface does not exist or name not set.
5994 </result>
5995 <result name="VBOX_E_FILE_ERROR">
5996 Invalid saved state file.
5997 </result>
5998 </desc>
5999 <param name="progress" type="IProgress" dir="return">
6000 <desc>Progress object to track the operation completion.</desc>
6001 </param>
6002 </method>
6003
6004 <method name="powerUpPaused">
6005 <desc>
6006 Identical to powerUp except that the VM will enter the
6007 <link to="MachineState::Paused"/> state, instead of
6008 <link to="MachineState::Running"/>.
6009
6010 <see>#powerUp</see>
6011 <result name="VBOX_E_INVALID_VM_STATE">
6012 Virtual machine already running.
6013 </result>
6014 <result name="VBOX_E_HOST_ERROR">
6015 Host interface does not exist or name not set.
6016 </result>
6017 <result name="VBOX_E_FILE_ERROR">
6018 Invalid saved state file.
6019 </result>
6020 </desc>
6021 <param name="progress" type="IProgress" dir="return">
6022 <desc>Progress object to track the operation completion.</desc>
6023 </param>
6024 </method>
6025
6026 <method name="powerDown">
6027 <desc>
6028 Initiates the power down procedure to stop the virtual machine
6029 execution.
6030
6031 The completion of the power down procedure is tracked using the returned
6032 IProgress object. After the operation is complete, the machine will go
6033 to the PoweredOff state.
6034 <result name="VBOX_E_INVALID_VM_STATE">
6035 Virtual machine must be Running, Paused or Stuck to be powered down.
6036 </result>
6037 </desc>
6038 <param name="progress" type="IProgress" dir="return">
6039 <desc>Progress object to track the operation completion.</desc>
6040 </param>
6041 </method>
6042
6043 <method name="reset">
6044 <desc>Resets the virtual machine.
6045 <result name="VBOX_E_INVALID_VM_STATE">
6046 Virtual machine not in Running state.
6047 </result>
6048 <result name="VBOX_E_VM_ERROR">
6049 Virtual machine error in reset operation.
6050 </result>
6051 </desc>
6052 </method>
6053
6054 <method name="pause">
6055 <desc>Pauses the virtual machine execution.
6056 <result name="VBOX_E_INVALID_VM_STATE">
6057 Virtual machine not in Running state.
6058 </result>
6059 <result name="VBOX_E_VM_ERROR">
6060 Virtual machine error in suspend operation.
6061 </result>
6062 </desc>
6063 </method>
6064
6065 <method name="resume">
6066 <desc>Resumes the virtual machine execution.
6067 <result name="VBOX_E_INVALID_VM_STATE">
6068 Virtual machine not in Paused state.
6069 </result>
6070 <result name="VBOX_E_VM_ERROR">
6071 Virtual machine error in resume operation.
6072 </result>
6073 </desc>
6074 </method>
6075
6076 <method name="powerButton">
6077 <desc>Sends the ACPI power button event to the guest.
6078 <result name="VBOX_E_INVALID_VM_STATE">
6079 Virtual machine not in Running state.
6080 </result>
6081 <result name="VBOX_E_PDM_ERROR">
6082 Controlled power off failed.
6083 </result>
6084 </desc>
6085 </method>
6086
6087 <method name="sleepButton">
6088 <desc>Sends the ACPI sleep button event to the guest.
6089 <result name="VBOX_E_INVALID_VM_STATE">
6090 Virtual machine not in Running state.
6091 </result>
6092 <result name="VBOX_E_PDM_ERROR">
6093 Sending sleep button event failed.
6094 </result>
6095 </desc>
6096 </method>
6097
6098 <method name="getPowerButtonHandled">
6099 <desc>Checks if the last power button event was handled by guest.
6100 <result name="VBOX_E_PDM_ERROR">
6101 Checking if the event was handled by the guest OS failed.
6102 </result>
6103 </desc>
6104 <param name="handled" type="boolean" dir="return"/>
6105 </method>
6106
6107 <method name="getGuestEnteredACPIMode">
6108 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6109 G1 (sleeping). If this method returns @c false, the guest will
6110 most likely not respond to external ACPI events.
6111 <result name="VBOX_E_INVALID_VM_STATE">
6112 Virtual machine not in Running state.
6113 </result>
6114 </desc>
6115 <param name="entered" type="boolean" dir="return"/>
6116 </method>
6117
6118 <method name="saveState">
6119 <desc>
6120 Saves the current execution state of a running virtual machine
6121 and stops its execution.
6122
6123 After this operation completes, the machine will go to the
6124 Saved state. Next time it is powered up, this state will
6125 be restored and the machine will continue its execution from
6126 the place where it was saved.
6127
6128 This operation differs from taking a snapshot to the effect
6129 that it doesn't create new differencing media. Also, once
6130 the machine is powered up from the state saved using this method,
6131 the saved state is deleted, so it will be impossible to return
6132 to this state later.
6133
6134 <note>
6135 On success, this method implicitly calls
6136 <link to="IMachine::saveSettings"/> to save all current machine
6137 settings (including runtime changes to the DVD medium, etc.).
6138 Together with the impossibility to change any VM settings when it is
6139 in the Saved state, this guarantees adequate hardware
6140 configuration of the machine when it is restored from the saved
6141 state file.
6142 </note>
6143
6144 <note>
6145 The machine must be in the Running or Paused state, otherwise
6146 the operation will fail.
6147 </note>
6148 <result name="VBOX_E_INVALID_VM_STATE">
6149 Virtual machine state neither Running nor Paused.
6150 </result>
6151 <result name="VBOX_E_FILE_ERROR">
6152 Failed to create directory for saved state file.
6153 </result>
6154
6155 <see><link to="#takeSnapshot"/></see>
6156 </desc>
6157 <param name="progress" type="IProgress" dir="return">
6158 <desc>Progress object to track the operation completion.</desc>
6159 </param>
6160 </method>
6161
6162 <method name="adoptSavedState">
6163 <desc>
6164 Associates the given saved state file to the virtual machine.
6165
6166 On success, the machine will go to the Saved state. Next time it is
6167 powered up, it will be restored from the adopted saved state and
6168 continue execution from the place where the saved state file was
6169 created.
6170
6171 The specified saved state file path may be absolute or relative to the
6172 folder the VM normally saves the state to (usually,
6173 <link to="IMachine::snapshotFolder"/>).
6174
6175 <note>
6176 It's a caller's responsibility to make sure the given saved state
6177 file is compatible with the settings of this virtual machine that
6178 represent its virtual hardware (memory size, storage disk configuration
6179 etc.). If there is a mismatch, the behavior of the virtual machine
6180 is undefined.
6181 </note>
6182 <result name="VBOX_E_INVALID_VM_STATE">
6183 Virtual machine state neither PoweredOff nor Aborted.
6184 </result>
6185 </desc>
6186 <param name="savedStateFile" type="wstring" dir="in">
6187 <desc>Path to the saved state file to adopt.</desc>
6188 </param>
6189 </method>
6190
6191 <method name="discardSavedState">
6192 <desc>
6193 Forcibly resets the machine to "Powered Off" state if it is
6194 currently in the "Saved" state (previously created by <link to="#saveState"/>).
6195 Next time the machine is powered up, a clean boot will occur.
6196 <note>
6197 This operation is equivalent to resetting or powering off
6198 the machine without doing a proper shutdown of the guest
6199 operating system; as with resetting a running phyiscal
6200 computer, it can can lead to data loss.
6201 </note>
6202 If @a fRemoveFile is @c true, the file in the machine directory
6203 into which the machine state was saved is also deleted. If
6204 this is @c false, then the state can be recovered and later
6205 re-inserted into a machine using <link to="#adoptSavedState" />.
6206 The location of the file can be found in the
6207 <link to="IMachine::stateFilePath" /> attribute.
6208 <result name="VBOX_E_INVALID_VM_STATE">
6209 Virtual machine not in state Saved.
6210 </result>
6211 </desc>
6212 <param name="fRemoveFile" type="boolean" dir="in" >
6213 <desc>Whether to also remove the saved state file.</desc>
6214 </param>
6215 </method>
6216
6217 <method name="getDeviceActivity">
6218 <desc>
6219 Gets the current activity type of a given device or device group.
6220 <result name="E_INVALIDARG">
6221 Invalid device type.
6222 </result>
6223 </desc>
6224 <param name="type" type="DeviceType" dir="in"/>
6225 <param name="activity" type="DeviceActivity" dir="return"/>
6226 </method>
6227
6228 <method name="attachUSBDevice">
6229 <desc>
6230 Attaches a host USB device with the given UUID to the
6231 USB controller of the virtual machine.
6232
6233 The device needs to be in one of the following states:
6234 <link to="USBDeviceState::Busy"/>,
6235 <link to="USBDeviceState::Available"/> or
6236 <link to="USBDeviceState::Held"/>,
6237 otherwise an error is immediately returned.
6238
6239 When the device state is
6240 <link to="USBDeviceState::Busy">Busy</link>, an error may also
6241 be returned if the host computer refuses to release it for some reason.
6242
6243 <see>IUSBController::deviceFilters, USBDeviceState</see>
6244 <result name="VBOX_E_INVALID_VM_STATE">
6245 Virtual machine state neither Running nor Paused.
6246 </result>
6247 <result name="VBOX_E_PDM_ERROR">
6248 Virtual machine does not have a USB controller.
6249 </result>
6250 </desc>
6251 <param name="id" type="uuid" mod="string" dir="in">
6252 <desc>UUID of the host USB device to attach.</desc>
6253 </param>
6254 </method>
6255
6256 <method name="detachUSBDevice">
6257 <desc>
6258 Detaches an USB device with the given UUID from the USB controller
6259 of the virtual machine.
6260
6261 After this method succeeds, the VirtualBox server re-initiates
6262 all USB filters as if the device were just physically attached
6263 to the host, but filters of this machine are ignored to avoid
6264 a possible automatic re-attachment.
6265
6266 <see>IUSBController::deviceFilters, USBDeviceState</see>
6267
6268 <result name="VBOX_E_PDM_ERROR">
6269 Virtual machine does not have a USB controller.
6270 </result>
6271 <result name="E_INVALIDARG">
6272 USB device not attached to this virtual machine.
6273 </result>
6274 </desc>
6275 <param name="id" type="uuid" mod="string" dir="in">
6276 <desc>UUID of the USB device to detach.</desc>
6277 </param>
6278 <param name="device" type="IUSBDevice" dir="return">
6279 <desc>Detached USB device.</desc>
6280 </param>
6281 </method>
6282
6283 <method name="findUSBDeviceByAddress">
6284 <desc>
6285 Searches for a USB device with the given host address.
6286
6287 <result name="VBOX_E_OBJECT_NOT_FOUND">
6288 Given @c name does not correspond to any USB device.
6289 </result>
6290
6291 <see>IUSBDevice::address</see>
6292 </desc>
6293 <param name="name" type="wstring" dir="in">
6294 <desc>
6295 Address of the USB device (as assigned by the host) to
6296 search for.
6297 </desc>
6298 </param>
6299 <param name="device" type="IUSBDevice" dir="return">
6300 <desc>Found USB device object.</desc>
6301 </param>
6302 </method>
6303
6304 <method name="findUSBDeviceById">
6305 <desc>
6306 Searches for a USB device with the given UUID.
6307
6308 <result name="VBOX_E_OBJECT_NOT_FOUND">
6309 Given @c id does not correspond to any USB device.
6310 </result>
6311
6312 <see>IUSBDevice::id</see>
6313 </desc>
6314 <param name="id" type="uuid" mod="string" dir="in">
6315 <desc>UUID of the USB device to search for.</desc>
6316 </param>
6317 <param name="device" type="IUSBDevice" dir="return">
6318 <desc>Found USB device object.</desc>
6319 </param>
6320 </method>
6321
6322 <method name="createSharedFolder">
6323 <desc>
6324 Creates a transient new shared folder by associating the given logical
6325 name with the given host path, adds it to the collection of shared
6326 folders and starts sharing it. Refer to the description of
6327 <link to="ISharedFolder"/> to read more about logical names.
6328
6329 <result name="VBOX_E_INVALID_VM_STATE">
6330 Virtual machine in Saved state or currently changing state.
6331 </result>
6332 <result name="VBOX_E_FILE_ERROR">
6333 Shared folder already exists or not accessible.
6334 </result>
6335 </desc>
6336 <param name="name" type="wstring" dir="in">
6337 <desc>Unique logical name of the shared folder.</desc>
6338 </param>
6339 <param name="hostPath" type="wstring" dir="in">
6340 <desc>Full path to the shared folder in the host file system.</desc>
6341 </param>
6342 <param name="writable" type="boolean" dir="in">
6343 <desc>Whether the share is writable or readonly</desc>
6344 </param>
6345 <param name="automount" type="boolean" dir="in">
6346 <desc>Whether the share gets automatically mounted by the guest
6347 or not.</desc>
6348 </param>
6349 </method>
6350
6351 <method name="removeSharedFolder">
6352 <desc>
6353 Removes a transient shared folder with the given name previously
6354 created by <link to="#createSharedFolder"/> from the collection of
6355 shared folders and stops sharing it.
6356 <result name="VBOX_E_INVALID_VM_STATE">
6357 Virtual machine in Saved state or currently changing state.
6358 </result>
6359 <result name="VBOX_E_FILE_ERROR">
6360 Shared folder does not exists.
6361 </result>
6362 </desc>
6363 <param name="name" type="wstring" dir="in">
6364 <desc>Logical name of the shared folder to remove.</desc>
6365 </param>
6366 </method>
6367
6368 <method name="takeSnapshot">
6369 <desc>
6370 Saves the current execution state
6371 and all settings of the machine and creates differencing images
6372 for all normal (non-independent) media.
6373 See <link to="ISnapshot" /> for an introduction to snapshots.
6374
6375 This method can be called for a PoweredOff, Saved (see
6376 <link to="#saveState"/>), Running or
6377 Paused virtual machine. When the machine is PoweredOff, an
6378 offline snapshot is created. When the machine is Running a live
6379 snapshot is created, and an online snapshot is is created when Paused.
6380
6381 The taken snapshot is always based on the
6382 <link to="IMachine::currentSnapshot">current snapshot</link>
6383 of the associated virtual machine and becomes a new current snapshot.
6384
6385 <note>
6386 This method implicitly calls <link to="IMachine::saveSettings"/> to
6387 save all current machine settings before taking an offline snapshot.
6388 </note>
6389
6390 <result name="VBOX_E_INVALID_VM_STATE">
6391 Virtual machine currently changing state.
6392 </result>
6393 </desc>
6394 <param name="name" type="wstring" dir="in">
6395 <desc>Short name for the snapshot.</desc>
6396 </param>
6397 <param name="description" type="wstring" dir="in">
6398 <desc>Optional description of the snapshot.</desc>
6399 </param>
6400 <param name="progress" type="IProgress" dir="return">
6401 <desc>Progress object to track the operation completion.</desc>
6402 </param>
6403 </method>
6404
6405 <method name="deleteSnapshot">
6406 <desc>
6407 Starts deleting the specified snapshot asynchronously.
6408 See <link to="ISnapshot" /> for an introduction to snapshots.
6409
6410 The execution state and settings of the associated machine stored in
6411 the snapshot will be deleted. The contents of all differencing media of
6412 this snapshot will be merged with the contents of their dependent child
6413 media to keep the medium chain valid (in other words, all changes
6414 represented by media being deleted will be propagated to their child
6415 medium). After that, this snapshot's differencing medium will be
6416 deleted. The parent of this snapshot will become a new parent for all
6417 its child snapshots.
6418
6419 If the deleted snapshot is the current one, its parent snapshot will
6420 become a new current snapshot. The current machine state is not directly
6421 affected in this case, except that currently attached differencing
6422 media based on media of the deleted snapshot will be also merged as
6423 described above.
6424
6425 If the deleted snapshot is the first or current snapshot, then the
6426 respective IMachine attributes will be adjusted. Deleting the current
6427 snapshot will also implicitly call <link to="IMachine::saveSettings"/>
6428 to make all current machine settings permanent.
6429
6430 Deleting a snapshot has the following preconditions:
6431
6432 <ul>
6433 <li>Child media of all normal media of the deleted snapshot
6434 must be accessible (see <link to="IMedium::state"/>) for this
6435 operation to succeed. In particular, this means that all virtual
6436 machines, whose media are directly or indirectly based on the
6437 media of deleted snapshot, must be powered off.</li>
6438
6439 <li>You cannot delete the snapshot if a medium attached to it has
6440 more than once child medium (differencing images) because otherwise
6441 merging would be impossible. This might be the case if there is
6442 more than one child snapshot or differencing images were created
6443 for other reason (e.g. implicitly because of multiple machine
6444 attachments).</li>
6445 </ul>
6446
6447
6448 The virtual machine's <link to="IMachine::state">state</link> is
6449 changed to "DeletingSnapshot", "DeletingSnapshotOnline" or
6450 "DeletingSnapshotPaused" while this operation is in progress.
6451
6452 <note>
6453 Merging medium contents can be very time and disk space
6454 consuming, if these media are big in size and have many
6455 children. However, if the snapshot being deleted is the last
6456 (head) snapshot on the branch, the operation will be rather
6457 quick.
6458 </note>
6459 <result name="VBOX_E_INVALID_VM_STATE">
6460 The running virtual machine prevents deleting this snapshot. This
6461 happens only in very specific situations, usually snapshots can be
6462 deleted without trouble while a VM is running. The error message
6463 text explains the reason for the failure.
6464 </result>
6465 </desc>
6466 <param name="id" type="uuid" mod="string" dir="in">
6467 <desc>UUID of the snapshot to delete.</desc>
6468 </param>
6469 <param name="progress" type="IProgress" dir="return">
6470 <desc>Progress object to track the operation completion.</desc>
6471 </param>
6472 </method>
6473
6474 <method name="restoreSnapshot">
6475 <desc>
6476 Starts resetting the machine's current state to the state contained
6477 in the given snapshot, asynchronously. All current settings of the
6478 machine will be reset and changes stored in differencing media
6479 will be lost.
6480 See <link to="ISnapshot" /> for an introduction to snapshots.
6481
6482 After this operation is successfully completed, new empty differencing
6483 media are created for all normal media of the machine.
6484
6485 If the given snapshot is an online snapshot, the machine will go to
6486 the <link to="MachineState::Saved"> saved state</link>, so that the
6487 next time it is powered on, the execution state will be restored
6488 from the state of the snapshot.
6489
6490 <note>
6491 The machine must not be running, otherwise the operation will fail.
6492 </note>
6493
6494 <note>
6495 If the machine state is <link to="MachineState::Saved">Saved</link>
6496 prior to this operation, the saved state file will be implicitly
6497 deleted (as if <link to="IConsole::discardSavedState"/> were
6498 called).
6499 </note>
6500
6501 <result name="VBOX_E_INVALID_VM_STATE">
6502 Virtual machine is running.
6503 </result>
6504 </desc>
6505 <param name="snapshot" type="ISnapshot" dir="in">
6506 <desc>The snapshot to restore the VM state from.</desc>
6507 </param>
6508 <param name="progress" type="IProgress" dir="return">
6509 <desc>Progress object to track the operation completion.</desc>
6510 </param>
6511 </method>
6512
6513 <method name="teleport">
6514 <desc>
6515 Teleport the VM to a different host machine or process.
6516
6517 TODO explain the details.
6518
6519 <result name="VBOX_E_INVALID_VM_STATE">
6520 Virtual machine not running or paused.
6521 </result>
6522 </desc>
6523 <param name="hostname" type="wstring" dir="in">
6524 <desc>The name or IP of the host to teleport to.</desc>
6525 </param>
6526 <param name="tcpport" type="unsigned long" dir="in">
6527 <desc>The TCP port to connect to (1..65535).</desc>
6528 </param>
6529 <param name="password" type="wstring" dir="in">
6530 <desc>The password.</desc>
6531 </param>
6532 <param name="maxDowntime" type="unsigned long" dir="in">
6533 <desc>
6534 The maximum allowed downtime given as milliseconds. 0 is not a valid
6535 value. Recommended value: 250 ms.
6536
6537 The higher the value is, the greater the chance for a successful
6538 teleportation. A small value may easily result in the teleportation
6539 process taking hours and eventually fail.
6540
6541 <note>
6542 The current implementation treats this a guideline, not as an
6543 absolute rule.
6544 </note>
6545 </desc>
6546 </param>
6547 <param name="progress" type="IProgress" dir="return">
6548 <desc>Progress object to track the operation completion.</desc>
6549 </param>
6550 </method>
6551
6552 </interface>
6553
6554 <!--
6555 // IHost
6556 /////////////////////////////////////////////////////////////////////////
6557 -->
6558
6559 <enum
6560 name="HostNetworkInterfaceMediumType"
6561 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6562 >
6563 <desc>
6564 Type of encapsulation. Ethernet encapsulation includes both wired and
6565 wireless Ethernet connections.
6566 <see>IHostNetworkInterface</see>
6567 </desc>
6568
6569 <const name="Unknown" value="0">
6570 <desc>
6571 The type of interface cannot be determined.
6572 </desc>
6573 </const>
6574 <const name="Ethernet" value="1">
6575 <desc>
6576 Ethernet frame encapsulation.
6577 </desc>
6578 </const>
6579 <const name="PPP" value="2">
6580 <desc>
6581 Point-to-point protocol encapsulation.
6582 </desc>
6583 </const>
6584 <const name="SLIP" value="3">
6585 <desc>
6586 Serial line IP encapsulation.
6587 </desc>
6588 </const>
6589 </enum>
6590
6591 <enum
6592 name="HostNetworkInterfaceStatus"
6593 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6594 >
6595 <desc>
6596 Current status of the interface.
6597 <see>IHostNetworkInterface</see>
6598 </desc>
6599
6600 <const name="Unknown" value="0">
6601 <desc>
6602 The state of interface cannot be determined.
6603 </desc>
6604 </const>
6605 <const name="Up" value="1">
6606 <desc>
6607 The interface is fully operational.
6608 </desc>
6609 </const>
6610 <const name="Down" value="2">
6611 <desc>
6612 The interface is not functioning.
6613 </desc>
6614 </const>
6615 </enum>
6616
6617 <enum
6618 name="HostNetworkInterfaceType"
6619 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6620 >
6621 <desc>
6622 Network interface type.
6623 </desc>
6624 <const name="Bridged" value="1"/>
6625 <const name="HostOnly" value="2"/>
6626 </enum>
6627
6628 <interface
6629 name="IHostNetworkInterface" extends="$unknown"
6630 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6631 wsmap="managed"
6632 >
6633 <desc>
6634 Represents one of host's network interfaces. IP V6 address and network
6635 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6636 separated by colons.
6637 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6638 </desc>
6639 <attribute name="name" type="wstring" readonly="yes">
6640 <desc>Returns the host network interface name.</desc>
6641 </attribute>
6642
6643 <attribute name="id" type="uuid" mod="string" readonly="yes">
6644 <desc>Returns the interface UUID.</desc>
6645 </attribute>
6646
6647 <attribute name="networkName" type="wstring" readonly="yes">
6648 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6649 </attribute>
6650
6651 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6652 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6653 </attribute>
6654
6655 <attribute name="IPAddress" type="wstring" readonly="yes">
6656 <desc>Returns the IP V4 address of the interface.</desc>
6657 </attribute>
6658
6659 <attribute name="networkMask" type="wstring" readonly="yes">
6660 <desc>Returns the network mask of the interface.</desc>
6661 </attribute>
6662
6663 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6664 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6665 </attribute>
6666
6667 <attribute name="IPV6Address" type="wstring" readonly="yes">
6668 <desc>Returns the IP V6 address of the interface.</desc>
6669 </attribute>
6670
6671 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6672 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6673 </attribute>
6674
6675 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6676 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6677 </attribute>
6678
6679 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6680 <desc>Type of protocol encapsulation used.</desc>
6681 </attribute>
6682
6683 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6684 <desc>Status of the interface.</desc>
6685 </attribute>
6686
6687 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6688 <desc>specifies the host interface type.</desc>
6689 </attribute>
6690
6691 <method name="enableStaticIpConfig">
6692 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6693 <param name="IPAddress" type="wstring" dir="in">
6694 <desc>
6695 IP address.
6696 </desc>
6697 </param>
6698 <param name="networkMask" type="wstring" dir="in">
6699 <desc>
6700 network mask.
6701 </desc>
6702 </param>
6703 </method>
6704
6705 <method name="enableStaticIpConfigV6">
6706 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6707 <param name="IPV6Address" type="wstring" dir="in">
6708 <desc>
6709 IP address.
6710 </desc>
6711 </param>
6712 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6713 <desc>
6714 network mask.
6715 </desc>
6716 </param>
6717 </method>
6718
6719 <method name="enableDynamicIpConfig">
6720 <desc>enables the dynamic IP configuration.</desc>
6721 </method>
6722
6723 <method name="dhcpRediscover">
6724 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6725 </method>
6726
6727 </interface>
6728
6729 <interface
6730 name="IHost" extends="$unknown"
6731 uuid="35b004f4-7806-4009-bfa8-d1308adba7e5"
6732 wsmap="managed"
6733 >
6734 <desc>
6735 The IHost interface represents the physical machine that this VirtualBox
6736 installation runs on.
6737
6738 An object implementing this interface is returned by the
6739 <link to="IVirtualBox::host" /> attribute. This interface contains
6740 read-only information about the host's physical hardware (such as what
6741 processors and disks are available, what the host operating system is,
6742 and so on) and also allows for manipulating some of the host's hardware,
6743 such as global USB device filters and host interface networking.
6744
6745 </desc>
6746 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
6747 <desc>List of DVD drives available on the host.</desc>
6748 </attribute>
6749
6750 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
6751 <desc>List of floppy drives available on the host.</desc>
6752 </attribute>
6753
6754 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6755 <desc>
6756 List of USB devices currently attached to the host.
6757 Once a new device is physically attached to the host computer,
6758 it appears in this list and remains there until detached.
6759
6760 <note>
6761 If USB functionality is not available in the given edition of
6762 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6763 </note>
6764 </desc>
6765 </attribute>
6766
6767 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
6768 <desc>
6769 List of USB device filters in action.
6770 When a new device is physically attached to the host computer,
6771 filters from this list are applied to it (in order they are stored
6772 in the list). The first matched filter will determine the
6773 <link to="IHostUSBDeviceFilter::action">action</link>
6774 performed on the device.
6775
6776 Unless the device is ignored by these filters, filters of all
6777 currently running virtual machines
6778 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6779
6780 <note>
6781 If USB functionality is not available in the given edition of
6782 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6783 </note>
6784
6785 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6786 </desc>
6787 </attribute>
6788
6789 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6790 <desc>List of host network interfaces currently defined on the host.</desc>
6791 </attribute>
6792
6793 <attribute name="processorCount" type="unsigned long" readonly="yes">
6794 <desc>Number of (logical) CPUs installed in the host system.</desc>
6795 </attribute>
6796
6797 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6798 <desc>Number of (logical) CPUs online in the host system.</desc>
6799 </attribute>
6800
6801 <attribute name="processorCoreCount" type="unsigned long" readonly="yes">
6802 <desc>Number of physical processor cores installed in the host system.</desc>
6803 </attribute>
6804
6805 <method name="getProcessorSpeed">
6806 <desc>Query the (approximate) maximum speed of a specified host CPU in
6807 Megahertz.
6808 </desc>
6809 <param name="cpuId" type="unsigned long" dir="in">
6810 <desc>
6811 Identifier of the CPU.
6812 </desc>
6813 </param>
6814 <param name="speed" type="unsigned long" dir="return">
6815 <desc>
6816 Speed value. 0 is returned if value is not known or @a cpuId is
6817 invalid.
6818 </desc>
6819 </param>
6820 </method>
6821
6822 <method name="getProcessorFeature">
6823 <desc>Query whether a CPU feature is supported or not.</desc>
6824 <param name="feature" type="ProcessorFeature" dir="in">
6825 <desc>
6826 CPU Feature identifier.
6827 </desc>
6828 </param>
6829 <param name="supported" type="boolean" dir="return">
6830 <desc>
6831 Feature is supported or not.
6832 </desc>
6833 </param>
6834 </method>
6835
6836 <method name="getProcessorDescription">
6837 <desc>Query the model string of a specified host CPU.
6838 </desc>
6839 <param name="cpuId" type="unsigned long" dir="in">
6840 <desc>
6841 Identifier of the CPU.
6842 <note>
6843 The current implementation might not necessarily return the
6844 description for this exact CPU.
6845 </note>
6846 </desc>
6847 </param>
6848 <param name="description" type="wstring" dir="return">
6849 <desc>
6850 Model string. An empty string is returned if value is not known or
6851 @a cpuId is invalid.
6852 </desc>
6853 </param>
6854 </method>
6855
6856 <method name="getProcessorCPUIDLeaf">
6857 <desc>
6858 Returns the CPU cpuid information for the specified leaf.
6859 </desc>
6860 <param name="cpuId" type="unsigned long" dir="in">
6861 <desc>
6862 Identifier of the CPU. The CPU most be online.
6863 <note>
6864 The current implementation might not necessarily return the
6865 description for this exact CPU.
6866 </note>
6867 </desc>
6868 </param>
6869 <param name="leaf" type="unsigned long" dir="in">
6870 <desc>
6871 CPUID leaf index (eax).
6872 </desc>
6873 </param>
6874 <param name="subLeaf" type="unsigned long" dir="in">
6875 <desc>
6876 CPUID leaf sub index (ecx). This currently only applies to cache
6877 information on Intel CPUs. Use 0 if retriving values for
6878 <link to="IMachine::setCPUIDLeaf"/>.
6879 </desc>
6880 </param>
6881 <param name="valEax" type="unsigned long" dir="out">
6882 <desc>
6883 CPUID leaf value for register eax.
6884 </desc>
6885 </param>
6886 <param name="valEbx" type="unsigned long" dir="out">
6887 <desc>
6888 CPUID leaf value for register ebx.
6889 </desc>
6890 </param>
6891 <param name="valEcx" type="unsigned long" dir="out">
6892 <desc>
6893 CPUID leaf value for register ecx.
6894 </desc>
6895 </param>
6896 <param name="valEdx" type="unsigned long" dir="out">
6897 <desc>
6898 CPUID leaf value for register edx.
6899 </desc>
6900 </param>
6901 </method>
6902
6903 <attribute name="memorySize" type="unsigned long" readonly="yes">
6904 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6905 </attribute>
6906
6907 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6908 <desc>Available system memory in the host system.</desc>
6909 </attribute>
6910
6911 <attribute name="operatingSystem" type="wstring" readonly="yes">
6912 <desc>Name of the host system's operating system.</desc>
6913 </attribute>
6914
6915 <attribute name="OSVersion" type="wstring" readonly="yes">
6916 <desc>Host operating system's version string.</desc>
6917 </attribute>
6918
6919 <attribute name="UTCTime" type="long long" readonly="yes">
6920 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6921 </attribute>
6922
6923 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
6924 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
6925 </attribute>
6926
6927 <method name="createHostOnlyNetworkInterface">
6928 <desc>
6929 Creates a new adapter for Host Only Networking.
6930 <result name="E_INVALIDARG">
6931 Host network interface @a name already exists.
6932 </result>
6933 </desc>
6934 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6935 <desc>
6936 Created host interface object.
6937 </desc>
6938 </param>
6939 <param name="progress" type="IProgress" dir="return">
6940 <desc>
6941 Progress object to track the operation completion.
6942 </desc>
6943 </param>
6944 </method>
6945
6946 <method name="removeHostOnlyNetworkInterface">
6947 <desc>
6948 Removes the given Host Only Networking interface.
6949 <result name="VBOX_E_OBJECT_NOT_FOUND">
6950 No host network interface matching @a id found.
6951 </result>
6952 </desc>
6953 <param name="id" type="uuid" mod="string" dir="in">
6954 <desc>
6955 Adapter GUID.
6956 </desc>
6957 </param>
6958 <param name="progress" type="IProgress" dir="return">
6959 <desc>
6960 Progress object to track the operation completion.
6961 </desc>
6962 </param>
6963 </method>
6964
6965 <method name="createUSBDeviceFilter">
6966 <desc>
6967 Creates a new USB device filter. All attributes except
6968 the filter name are set to empty (any match),
6969 <i>active</i> is @c false (the filter is not active).
6970
6971 The created filter can be added to the list of filters using
6972 <link to="#insertUSBDeviceFilter"/>.
6973
6974 <see>#USBDeviceFilters</see>
6975 </desc>
6976 <param name="name" type="wstring" dir="in">
6977 <desc>
6978 Filter name. See <link to="IUSBDeviceFilter::name"/> for more information.
6979 </desc>
6980 </param>
6981 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6982 <desc>Created filter object.</desc>
6983 </param>
6984 </method>
6985
6986 <method name="insertUSBDeviceFilter">
6987 <desc>
6988 Inserts the given USB device to the specified position
6989 in the list of filters.
6990
6991 Positions are numbered starting from @c 0. If the specified
6992 position is equal to or greater than the number of elements in
6993 the list, the filter is added at the end of the collection.
6994
6995 <note>
6996 Duplicates are not allowed, so an attempt to insert a
6997 filter already in the list is an error.
6998 </note>
6999 <note>
7000 If USB functionality is not available in the given edition of
7001 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7002 </note>
7003
7004 <see>#USBDeviceFilters</see>
7005
7006 <result name="VBOX_E_INVALID_OBJECT_STATE">
7007 USB device filter is not created within this VirtualBox instance.
7008 </result>
7009 <result name="E_INVALIDARG">
7010 USB device filter already in list.
7011 </result>
7012
7013 </desc>
7014 <param name="position" type="unsigned long" dir="in">
7015 <desc>Position to insert the filter to.</desc>
7016 </param>
7017 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7018 <desc>USB device filter to insert.</desc>
7019 </param>
7020 </method>
7021
7022 <method name="removeUSBDeviceFilter">
7023 <desc>
7024 Removes a USB device filter from the specified position in the
7025 list of filters.
7026
7027 Positions are numbered starting from @c 0. Specifying a
7028 position equal to or greater than the number of elements in
7029 the list will produce an error.
7030
7031 <note>
7032 If USB functionality is not available in the given edition of
7033 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7034 </note>
7035
7036 <see>#USBDeviceFilters</see>
7037
7038 <result name="E_INVALIDARG">
7039 USB device filter list empty or invalid @a position.
7040 </result>
7041
7042 </desc>
7043 <param name="position" type="unsigned long" dir="in">
7044 <desc>Position to remove the filter from.</desc>
7045 </param>
7046 </method>
7047
7048 <method name="findHostDVDDrive">
7049 <desc>
7050 Searches for a host DVD drive with the given @c name.
7051
7052 <result name="VBOX_E_OBJECT_NOT_FOUND">
7053 Given @c name does not correspond to any host drive.
7054 </result>
7055
7056 </desc>
7057 <param name="name" type="wstring" dir="in">
7058 <desc>Name of the host drive to search for</desc>
7059 </param>
7060 <param name="drive" type="IMedium" dir="return">
7061 <desc>Found host drive object</desc>
7062 </param>
7063 </method>
7064
7065 <method name="findHostFloppyDrive">
7066 <desc>
7067 Searches for a host floppy drive with the given @c name.
7068
7069 <result name="VBOX_E_OBJECT_NOT_FOUND">
7070 Given @c name does not correspond to any host floppy drive.
7071 </result>
7072
7073 </desc>
7074 <param name="name" type="wstring" dir="in">
7075 <desc>Name of the host floppy drive to search for</desc>
7076 </param>
7077 <param name="drive" type="IMedium" dir="return">
7078 <desc>Found host floppy drive object</desc>
7079 </param>
7080 </method>
7081
7082 <method name="findHostNetworkInterfaceByName">
7083 <desc>
7084 Searches through all host network interfaces for an interface with
7085 the given @c name.
7086 <note>
7087 The method returns an error if the given @c name does not
7088 correspond to any host network interface.
7089 </note>
7090 </desc>
7091 <param name="name" type="wstring" dir="in">
7092 <desc>Name of the host network interface to search for.</desc>
7093 </param>
7094 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7095 <desc>Found host network interface object.</desc>
7096 </param>
7097 </method>
7098 <method name="findHostNetworkInterfaceById">
7099 <desc>
7100 Searches through all host network interfaces for an interface with
7101 the given GUID.
7102 <note>
7103 The method returns an error if the given GUID does not
7104 correspond to any host network interface.
7105 </note>
7106 </desc>
7107 <param name="id" type="uuid" mod="string" dir="in">
7108 <desc>GUID of the host network interface to search for.</desc>
7109 </param>
7110 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7111 <desc>Found host network interface object.</desc>
7112 </param>
7113 </method>
7114 <method name="findHostNetworkInterfacesOfType">
7115 <desc>
7116 Searches through all host network interfaces and returns a list of interfaces of the specified type
7117 </desc>
7118 <param name="type" type="HostNetworkInterfaceType" dir="in">
7119 <desc>type of the host network interfaces to search for.</desc>
7120 </param>
7121 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7122 <desc>Found host network interface objects.</desc>
7123 </param>
7124 </method>
7125
7126 <method name="findUSBDeviceById">
7127 <desc>
7128 Searches for a USB device with the given UUID.
7129
7130 <result name="VBOX_E_OBJECT_NOT_FOUND">
7131 Given @c id does not correspond to any USB device.
7132 </result>
7133
7134 <see>IHostUSBDevice::id</see>
7135 </desc>
7136 <param name="id" type="uuid" mod="string" dir="in">
7137 <desc>UUID of the USB device to search for.</desc>
7138 </param>
7139 <param name="device" type="IHostUSBDevice" dir="return">
7140 <desc>Found USB device object.</desc>
7141 </param>
7142 </method>
7143
7144 <method name="findUSBDeviceByAddress">
7145 <desc>
7146 Searches for a USB device with the given host address.
7147
7148 <result name="VBOX_E_OBJECT_NOT_FOUND">
7149 Given @c name does not correspond to any USB device.
7150 </result>
7151
7152 <see>IHostUSBDevice::address</see>
7153 </desc>
7154 <param name="name" type="wstring" dir="in">
7155 <desc>
7156 Address of the USB device (as assigned by the host) to
7157 search for.
7158 </desc>
7159 </param>
7160 <param name="device" type="IHostUSBDevice" dir="return">
7161 <desc>Found USB device object.</desc>
7162 </param>
7163 </method>
7164
7165 </interface>
7166
7167 <!--
7168 // ISystemProperties
7169 /////////////////////////////////////////////////////////////////////////
7170 -->
7171
7172 <interface
7173 name="ISystemProperties"
7174 extends="$unknown"
7175 uuid="07c3ffd8-8f59-49cc-b608-53a332e85cc3"
7176 wsmap="managed"
7177 >
7178 <desc>
7179 The ISystemProperties interface represents global properties of the given
7180 VirtualBox installation.
7181
7182 These properties define limits and default values for various attributes
7183 and parameters. Most of the properties are read-only, but some can be
7184 changed by a user.
7185 </desc>
7186
7187 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7188 <desc>Minimum guest system memory in Megabytes.</desc>
7189 </attribute>
7190
7191 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7192 <desc>Maximum guest system memory in Megabytes.</desc>
7193 </attribute>
7194
7195 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7196 <desc>Minimum guest video memory in Megabytes.</desc>
7197 </attribute>
7198
7199 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7200 <desc>Maximum guest video memory in Megabytes.</desc>
7201 </attribute>
7202
7203 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7204 <desc>Minimum CPU count.</desc>
7205 </attribute>
7206
7207 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7208 <desc>Maximum CPU count.</desc>
7209 </attribute>
7210
7211 <attribute name="maxGuestMonitors" type="unsigned long" readonly="yes">
7212 <desc>Maximum of monitors which could be connected.</desc>
7213 </attribute>
7214
7215 <attribute name="maxVDISize" type="long long" readonly="yes">
7216 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7217 </attribute>
7218
7219 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7220 <desc>
7221 Number of network adapters associated with every
7222 <link to="IMachine"/> instance.
7223 </desc>
7224 </attribute>
7225
7226 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7227 <desc>
7228 Number of serial ports associated with every
7229 <link to="IMachine"/> instance.
7230 </desc>
7231 </attribute>
7232
7233 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7234 <desc>
7235 Number of parallel ports associated with every
7236 <link to="IMachine"/> instance.
7237 </desc>
7238 </attribute>
7239
7240 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7241 <desc>
7242 Maximum device position in the boot order. This value corresponds
7243 to the total number of devices a machine can boot from, to make it
7244 possible to include all possible devices to the boot list.
7245 <see><link to="IMachine::setBootOrder"/></see>
7246 </desc>
7247 </attribute>
7248
7249 <attribute name="defaultMachineFolder" type="wstring">
7250 <desc>
7251 Full path to the default directory used to create new or open
7252 existing machines when a settings file name contains no
7253 path.
7254
7255 The initial value of this property is
7256 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7257 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7258
7259 <note>
7260 Setting this property to @c null or an empty string will restore the
7261 initial value.
7262 </note>
7263 <note>
7264 When settings this property, the specified path can be
7265 absolute (full path) or relative
7266 to the <link to="IVirtualBox::homeFolder">
7267 VirtualBox home directory</link>.
7268 When reading this property, a full path is
7269 always returned.
7270 </note>
7271 <note>
7272 The specified path may not exist, it will be created
7273 when necessary.
7274 </note>
7275
7276 <see>
7277 <link to="IVirtualBox::createMachine"/>,
7278 <link to="IVirtualBox::openMachine"/>
7279 </see>
7280 </desc>
7281 </attribute>
7282
7283 <attribute name="defaultHardDiskFolder" type="wstring">
7284 <desc>
7285 Full path to the default directory used to create new or open existing
7286 virtual disks.
7287
7288 This path is used when the storage unit of a hard disk is a regular file
7289 in the host's file system and only a file name that contains no path is
7290 given.
7291
7292 The initial value of this property is
7293 <tt>&lt;</tt>
7294 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7295 <tt>&gt;/HardDisks</tt>.
7296
7297 <note>
7298 Setting this property to @c null or empty string will restore the
7299 initial value.
7300 </note>
7301 <note>
7302 When settings this property, the specified path can be relative
7303 to the
7304 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7305 absolute. When reading this property, a full path is
7306 always returned.
7307 </note>
7308 <note>
7309 The specified path may not exist, it will be created
7310 when necessary.
7311 </note>
7312
7313 <see>
7314 IMedium,
7315 <link to="IVirtualBox::createHardDisk"/>,
7316 <link to="IVirtualBox::openMedium"/>,
7317 <link to="IMedium::location"/>
7318 </see>
7319 </desc>
7320 </attribute>
7321
7322 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7323 <desc>
7324 List of all medium storage formats supported by this VirtualBox
7325 installation.
7326
7327 Keep in mind that the medium format identifier
7328 (<link to="IMediumFormat::id"/>) used in other API calls like
7329 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7330 medium format is a case-insensitive string. This means that, for
7331 example, all of the following strings:
7332 <pre>
7333 "VDI"
7334 "vdi"
7335 "VdI"</pre>
7336 refer to the same medium format.
7337
7338 Note that the virtual medium framework is backend-based, therefore
7339 the list of supported formats depends on what backends are currently
7340 installed.
7341
7342 <see>
7343 <link to="IMediumFormat"/>,
7344 </see>
7345 </desc>
7346 </attribute>
7347
7348 <attribute name="defaultHardDiskFormat" type="wstring">
7349 <desc>
7350 Identifier of the default medium format used by VirtualBox.
7351
7352 The medium format set by this attribute is used by VirtualBox
7353 when the medium format was not specified explicitly. One example is
7354 <link to="IVirtualBox::createHardDisk"/> with the empty
7355 format argument. A more complex example is implicit creation of
7356 differencing media when taking a snapshot of a virtual machine:
7357 this operation will try to use a format of the parent medium first
7358 and if this format does not support differencing media the default
7359 format specified by this argument will be used.
7360
7361 The list of supported medium formats may be obtained by the
7362 <link to="#mediumFormats"/> call. Note that the default medium
7363 format must have a capability to create differencing media;
7364 otherwise operations that create media implicitly may fail
7365 unexpectedly.
7366
7367 The initial value of this property is <tt>"VDI"</tt> in the current
7368 version of the VirtualBox product, but may change in the future.
7369
7370 <note>
7371 Setting this property to @c null or empty string will restore the
7372 initial value.
7373 </note>
7374
7375 <see>
7376 <link to="#mediumFormats"/>,
7377 <link to="IMediumFormat::id"/>,
7378 <link to="IVirtualBox::createHardDisk"/>
7379 </see>
7380 </desc>
7381 </attribute>
7382
7383 <attribute name="freeDiskSpaceWarning" type="long long">
7384 <desc>Issue a warning if the free disk space is below (or in some disk
7385 intensive operation is expected to go below) the given size in
7386 Megabytes.</desc>
7387 </attribute>
7388
7389 <attribute name="freeDiskSpacePercentWarning" type="unsigned long">
7390 <desc>Issue a warning if the free disk space is below (or in some disk
7391 intensive operation is expected to go below) the given percentage.</desc>
7392 </attribute>
7393
7394 <attribute name="freeDiskSpaceError" type="long long">
7395 <desc>Issue an error if the free disk space is below (or in some disk
7396 intensive operation is expected to go below) the given size in
7397 Megabytes.</desc>
7398 </attribute>
7399
7400 <attribute name="freeDiskSpacePercentError" type="unsigned long">
7401 <desc>Issue an error if the free disk space is below (or in some disk
7402 intensive operation is expected to go below) the given percentage.</desc>
7403 </attribute>
7404
7405 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7406 <desc>
7407 Library that provides authentication for VRDP clients. The library
7408 is used if a virtual machine's authentication type is set to "external"
7409 in the VM RemoteDisplay configuration.
7410
7411 The system library extension (".DLL" or ".so") must be omitted.
7412 A full path can be specified; if not, then the library must reside on the
7413 system's default library path.
7414
7415 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7416 of that name in one of the default VirtualBox library directories.
7417
7418 For details about VirtualBox authentication libraries and how to implement
7419 them, please refer to the VirtualBox manual.
7420
7421 <note>
7422 Setting this property to @c null or empty string will restore the
7423 initial value.
7424 </note>
7425 </desc>
7426 </attribute>
7427
7428 <attribute name="webServiceAuthLibrary" type="wstring">
7429 <desc>
7430 Library that provides authentication for webservice clients. The library
7431 is used if a virtual machine's authentication type is set to "external"
7432 in the VM RemoteDisplay configuration and will be called from
7433 within the <link to="IWebsessionManager::logon" /> implementation.
7434
7435 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7436 there is no per-VM setting for this, as the webservice is a global
7437 resource (if it is running). Only for this setting (for the webservice),
7438 setting this value to a literal <tt>"null"</tt> string disables authentication,
7439 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7440 no matter what user name and password are supplied.
7441
7442 The initial value of this property is <tt>"VRDPAuth"</tt>,
7443 meaning that the webservice will use the same authentication
7444 library that is used by default for VBoxVRDP (again, see
7445 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7446 The format and calling convention of authentication libraries
7447 is the same for the webservice as it is for VBoxVRDP.
7448
7449 <note>
7450 Setting this property to @c null or empty string will restore the
7451 initial value.
7452 </note>
7453 </desc>
7454 </attribute>
7455
7456 <attribute name="LogHistoryCount" type="unsigned long">
7457 <desc>
7458 This value specifies how many old release log files are kept.
7459 </desc>
7460 </attribute>
7461
7462 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7463 <desc>This value hold the default audio driver for the current
7464 system.</desc>
7465 </attribute>
7466
7467 <method name="getMaxDevicesPerPortForStorageBus">
7468 <desc>Returns the maximum number of devices which can be attached to a port
7469 for the given storage bus.</desc>
7470
7471 <param name="bus" type="StorageBus" dir="in">
7472 <desc>The storage bus type to get the value for.</desc>
7473 </param>
7474
7475 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
7476 <desc>The maximum number of devices which can eb attached to the port for the given
7477 storage bus.</desc>
7478 </param>
7479 </method>
7480
7481 <method name="getMinPortCountForStorageBus">
7482 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
7483
7484 <param name="bus" type="StorageBus" dir="in">
7485 <desc>The storage bus type to get the value for.</desc>
7486 </param>
7487
7488 <param name="minPortCount" type="unsigned long" dir="return">
7489 <desc>The minimum number of ports for the given storage bus.</desc>
7490 </param>
7491 </method>
7492
7493 <method name="getMaxPortCountForStorageBus">
7494 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
7495
7496 <param name="bus" type="StorageBus" dir="in">
7497 <desc>The storage bus type to get the value for.</desc>
7498 </param>
7499
7500 <param name="maxPortCount" type="unsigned long" dir="return">
7501 <desc>The maximum number of ports for the given storage bus.</desc>
7502 </param>
7503 </method>
7504
7505 <method name="getMaxInstancesOfStorageBus">
7506 <desc>Returns the maximum number of storage bus instances which
7507 can be configured for each VM. This corresponds to the number of
7508 storage controllers one can have.</desc>
7509
7510 <param name="bus" type="StorageBus" dir="in">
7511 <desc>The storage bus type to get the value for.</desc>
7512 </param>
7513
7514 <param name="maxInstances" type="unsigned long" dir="return">
7515 <desc>The maximum number of instances for the given storage bus.</desc>
7516 </param>
7517 </method>
7518
7519 <method name="getDeviceTypesForStorageBus">
7520 <desc>Returns list of all the supported device types
7521 (<link to="DeviceType"/>) for the given type of storage
7522 bus.</desc>
7523
7524 <param name="bus" type="StorageBus" dir="in">
7525 <desc>The storage bus type to get the value for.</desc>
7526 </param>
7527
7528 <param name="deviceTypes" type="DeviceType" safearray="yes" dir="return">
7529 <desc>The list of all supported device types for the given storage bus.</desc>
7530 </param>
7531 </method>
7532 </interface>
7533
7534 <!--
7535 // IGuest
7536 /////////////////////////////////////////////////////////////////////////
7537 -->
7538
7539 <interface
7540 name="IGuestOSType" extends="$unknown"
7541 uuid="e3f6727e-a09b-41ea-a824-864a176472f3"
7542 wsmap="struct"
7543 >
7544 <desc>
7545 </desc>
7546
7547 <attribute name="familyId" type="wstring" readonly="yes">
7548 <desc>Guest OS family identifier string.</desc>
7549 </attribute>
7550
7551 <attribute name="familyDescription" type="wstring" readonly="yes">
7552 <desc>Human readable description of the guest OS family.</desc>
7553 </attribute>
7554
7555 <attribute name="id" type="wstring" readonly="yes">
7556 <desc>Guest OS identifier string.</desc>
7557 </attribute>
7558
7559 <attribute name="description" type="wstring" readonly="yes">
7560 <desc>Human readable description of the guest OS.</desc>
7561 </attribute>
7562
7563 <attribute name="is64Bit" type="boolean" readonly="yes">
7564 <desc>Returns @c true if the given OS is 64-bit</desc>
7565 </attribute>
7566
7567 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7568 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7569 </attribute>
7570
7571 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7572 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7573 </attribute>
7574
7575 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7576 <desc>Recommended RAM size in Megabytes.</desc>
7577 </attribute>
7578
7579 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7580 <desc>Recommended video RAM size in Megabytes.</desc>
7581 </attribute>
7582
7583 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7584 <desc>Recommended hard disk size in Megabytes.</desc>
7585 </attribute>
7586
7587 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7588 <desc>Returns recommended network adapter for this OS type.</desc>
7589 </attribute>
7590
7591 <attribute name="recommendedPae" type="boolean" readonly="yes">
7592 <desc>Returns @c true if using PAE is recommended for this OS type.</desc>
7593 </attribute>
7594
7595 <attribute name="recommendedDvdStorageController" type="StorageControllerType" readonly="yes">
7596 <desc>Recommended storage controller type for DVD/CD drives.</desc>
7597 </attribute>
7598
7599 <attribute name="recommendedDvdStorageBus" type="StorageBus" readonly="yes">
7600 <desc>Recommended storage bus type for DVD/CD drives.</desc>
7601 </attribute>
7602
7603 <attribute name="recommendedHdStorageController" type="StorageControllerType" readonly="yes">
7604 <desc>Recommended storage controller type for HD drives.</desc>
7605 </attribute>
7606
7607 <attribute name="recommendedHdStorageBus" type="StorageBus" readonly="yes">
7608 <desc>Recommended storage bus type for HD drives.</desc>
7609 </attribute>
7610
7611 <attribute name="recommendedFirmware" type="FirmwareType" readonly="yes">
7612 <desc>Recommended firmware type.</desc>
7613 </attribute>
7614
7615 <attribute name="recommendedUsbHid" type="boolean" readonly="yes">
7616 <desc>Returns @c true if using USB Human Interface Devices, such as keyboard and mouse recommended.</desc>
7617 </attribute>
7618
7619 <attribute name="recommendedHpet" type="boolean" readonly="yes">
7620 <desc>Returns @c true if using HPET is recommended for this OS type.</desc>
7621 </attribute>
7622
7623 <attribute name="recommendedUsbTablet" type="boolean" readonly="yes">
7624 <desc>Returns @c true if using a USB Tablet is recommended.</desc>
7625 </attribute>
7626
7627 <attribute name="recommendedRtcUseUtc" type="boolean" readonly="yes">
7628 <desc>Returns @c true if the RTC of this VM should be set to UTC</desc>
7629 </attribute>
7630
7631 </interface>
7632
7633 <interface
7634 name="IGuest" extends="$unknown"
7635 uuid="cd80e5b8-faef-4be3-8d0e-d68fee10708d"
7636 wsmap="managed"
7637 >
7638 <desc>
7639 The IGuest interface represents information about the operating system
7640 running inside the virtual machine. Used in
7641 <link to="IConsole::guest"/>.
7642
7643 IGuest provides information about the guest operating system, whether
7644 Guest Additions are installed and other OS-specific virtual machine
7645 properties.
7646 </desc>
7647
7648 <attribute name="OSTypeId" type="wstring" readonly="yes">
7649 <desc>
7650 Identifier of the Guest OS type as reported by the Guest
7651 Additions.
7652 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7653 an IGuestOSType object representing details about the given
7654 Guest OS type.
7655 <note>
7656 If Guest Additions are not installed, this value will be
7657 the same as <link to="IMachine::OSTypeId"/>.
7658 </note>
7659 </desc>
7660 </attribute>
7661
7662 <attribute name="additionsRunLevel" type="unsigned long" readonly="yes">
7663 <desc>
7664 Current run level of the Guest Additions.
7665 </desc>
7666 </attribute>
7667
7668 <attribute name="additionsVersion" type="wstring" readonly="yes">
7669 <desc>
7670 Version of the Guest Additions including the revision (3 decimal numbers
7671 separated by dots + revision number) installed on the guest or empty
7672 when the Additions are not installed.
7673 </desc>
7674 </attribute>
7675
7676 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7677 <desc>
7678 Flag whether seamless guest display rendering (seamless desktop
7679 integration) is supported.
7680 </desc>
7681 </attribute>
7682
7683 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7684 <desc>
7685 Flag whether the guest is in graphics mode. If it is not, then
7686 seamless rendering will not work, resize hints are not immediately
7687 acted on and guest display resizes are probably not initiated by
7688 the guest additions.
7689 </desc>
7690 </attribute>
7691
7692 <attribute name="memoryBalloonSize" type="unsigned long">
7693 <desc>Guest system memory balloon size in megabytes (transient property).</desc>
7694 </attribute>
7695
7696 <attribute name="statisticsUpdateInterval" type="unsigned long">
7697 <desc>Interval to update guest statistics in seconds.</desc>
7698 </attribute>
7699
7700 <method name="internalGetStatistics">
7701 <desc>
7702 Internal method; do not use as it might change at any time
7703 </desc>
7704 <param name="cpuUser" type="unsigned long" dir="out">
7705 <desc>Percentage of processor time spent in user mode as seen by the guest</desc>
7706 </param>
7707 <param name="cpuKernel" type="unsigned long" dir="out">
7708 <desc>Percentage of processor time spent in kernel mode as seen by the guest</desc>
7709 </param>
7710 <param name="cpuIdle" type="unsigned long" dir="out">
7711 <desc>Percentage of processor time spent idling as seen by the guest</desc>
7712 </param>
7713 <param name="memTotal" type="unsigned long" dir="out">
7714 <desc>Total amount of physical guest RAM</desc>
7715 </param>
7716 <param name="memFree" type="unsigned long" dir="out">
7717 <desc>Free amount of physical guest RAM</desc>
7718 </param>
7719 <param name="memBalloon" type="unsigned long" dir="out">
7720 <desc>Amount of ballooned physical guest RAM</desc>
7721 </param>
7722 <param name="memShared" type="unsigned long" dir="out">
7723 <desc>Amount of shared physical guest RAM</desc>
7724 </param>
7725 <param name="memCache" type="unsigned long" dir="out">
7726 <desc>Total amount of guest (disk) cache memory</desc>
7727 </param>
7728 <param name="pagedTotal" type="unsigned long" dir="out">
7729 <desc>Total amount of space in the page file</desc>
7730 </param>
7731 <param name="memAllocTotal" type="unsigned long" dir="out">
7732 <desc>Total amount of memory allocated by the hypervisor</desc>
7733 </param>
7734 <param name="memFreeTotal" type="unsigned long" dir="out">
7735 <desc>Total amount of free memory available in the hypervisor</desc>
7736 </param>
7737 <param name="memBalloonTotal" type="unsigned long" dir="out">
7738 <desc>Total amount of memory ballooned by the hypervisor</desc>
7739 </param>
7740 <param name="memSharedTotal" type="unsigned long" dir="out">
7741 <desc>Total amount of shared memory in the hypervisor</desc>
7742 </param>
7743 </method>
7744
7745 <method name="getAdditionsStatus">
7746 <desc>
7747 Retrieve the current status of a certain Guest Additions run level.
7748
7749 <result name="VBOX_E_NOT_SUPPORTED">
7750 Wrong status level specified.
7751 </result>
7752
7753 </desc>
7754 <param name="level" type="unsigned long" dir="in">
7755 <desc>Status level to check</desc>
7756 </param>
7757 <param name="active" type="boolean" dir="return">
7758 <desc>Flag whether the status level has been reached or not</desc>
7759 </param>
7760 </method>
7761
7762 <method name="setCredentials">
7763 <desc>
7764 Store login credentials that can be queried by guest operating
7765 systems with Additions installed. The credentials are transient
7766 to the session and the guest may also choose to erase them. Note
7767 that the caller cannot determine whether the guest operating system
7768 has queried or made use of the credentials.
7769
7770 <result name="VBOX_E_VM_ERROR">
7771 VMM device is not available.
7772 </result>
7773
7774 </desc>
7775 <param name="userName" type="wstring" dir="in">
7776 <desc>User name string, can be empty</desc>
7777 </param>
7778 <param name="password" type="wstring" dir="in">
7779 <desc>Password string, can be empty</desc>
7780 </param>
7781 <param name="domain" type="wstring" dir="in">
7782 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7783 </param>
7784 <param name="allowInteractiveLogon" type="boolean" dir="in">
7785 <desc>
7786 Flag whether the guest should alternatively allow the user to
7787 interactively specify different credentials. This flag might
7788 not be supported by all versions of the Additions.
7789 </desc>
7790 </param>
7791 </method>
7792
7793 <method name="executeProcess">
7794 <desc>
7795 Executes an existing program inside the guest VM.
7796
7797 <result name="VBOX_E_IPRT_ERROR">
7798 Could not execute process.
7799 </result>
7800
7801 </desc>
7802 <param name="execName" type="wstring" dir="in">
7803 <desc>
7804 Full path name of the command to execute on the guest; the
7805 commands has to exists in the guest VM in order to be executed.
7806 </desc>
7807 </param>
7808 <param name="flags" type="unsigned long" dir="in">
7809 <desc>
7810 Execution flags - currently not supported and therefore
7811 has to be set to 0.
7812 </desc>
7813 </param>
7814 <param name="arguments" type="wstring" safearray="yes" dir="in">
7815 <desc>
7816 Array of arguments passed to the execution command.
7817 </desc>
7818 </param>
7819 <param name="environment" type="wstring" safearray="yes" dir="in">
7820 <desc>
7821 Environment variables that can be set while the command is being
7822 executed, in form of "NAME=VALUE"; one pair per entry. To unset a
7823 variable just set its name ("NAME") without a value.
7824 </desc>
7825 </param>
7826 <param name="userName" type="wstring" dir="in">
7827 <desc>
7828 User name under which the command will be executed; has to exist
7829 and have the appropriate rights to execute programs in the VM.
7830 </desc>
7831 </param>
7832 <param name="password" type="wstring" dir="in">
7833 <desc>
7834 Password of the user account specified.
7835 </desc>
7836 </param>
7837 <param name="timeoutMS" type="unsigned long" dir="in">
7838 <desc>
7839 The maximum timeout value (in msec) to wait for finished program
7840 execution. Pass 0 for an infinite timeout.
7841 </desc>
7842 </param>
7843 <param name="pid" type="unsigned long" dir="out">
7844 <desc>
7845 The PID (process ID) of the started command for later reference.
7846 </desc>
7847 </param>
7848 <param name="progress" type="IProgress" dir="return">
7849 <desc>Progress object to track the operation completion.</desc>
7850 </param>
7851 </method>
7852
7853 <method name="getProcessOutput">
7854 <desc>
7855 Retrieves output of a formerly started process.
7856
7857 <result name="VBOX_E_IPRT_ERROR">
7858 Could not retrieve output.
7859 </result>
7860
7861 </desc>
7862 <param name="pid" type="unsigned long" dir="in">
7863 <desc>
7864 Process id returned by earlier executeProcess() call.
7865 </desc>
7866 </param>
7867 <param name="flags" type="unsigned long" dir="in">
7868 <desc>
7869 Flags describing which output to retrieve.
7870 </desc>
7871 </param>
7872 <param name="timeoutMS" type="unsigned long" dir="in">
7873 <desc>
7874 The maximum timeout value (in msec) to wait for output
7875 data. Pass 0 for an infinite timeout.
7876 </desc>
7877 </param>
7878 <param name="size" type="long long" dir="in">
7879 <desc>
7880 Size in bytes to read in the buffer.
7881 </desc>
7882 </param>
7883 <param name="data" type="octet" dir="return" safearray="yes">
7884 <desc>
7885 Buffer for retrieving the actual output. A data size of 0 means end of file
7886 if the requested size was not 0. This is the unprocessed
7887 output data, i.e. the line ending style depends on the platform of
7888 the system the server is running on.
7889 </desc>
7890 </param>
7891 </method>
7892
7893 <method name="getProcessStatus">
7894 <desc>
7895 Retrieves status, exit code and the exit reason of a formerly started process.
7896
7897 <result name="VBOX_E_IPRT_ERROR">
7898 Process with specified PID was not found.
7899 </result>
7900
7901 </desc>
7902 <param name="pid" type="unsigned long" dir="in">
7903 <desc>
7904 Process id returned by earlier executeProcess() call.
7905 </desc>
7906 </param>
7907 <param name="exitcode" type="unsigned long" dir="out">
7908 <desc>
7909 The exit code (if available).
7910 </desc>
7911 </param>
7912 <param name="flags" type="unsigned long" dir="out">
7913 <desc>
7914 Additional flags of process status (not used at the moment).
7915 </desc>
7916 </param>
7917 <param name="reason" type="unsigned long" dir="return">
7918 <desc>
7919 The current process status.
7920 </desc>
7921 </param>
7922 </method>
7923
7924 </interface>
7925
7926
7927 <!--
7928 // IProgress
7929 /////////////////////////////////////////////////////////////////////////
7930 -->
7931
7932 <interface
7933 name="IProgress" extends="$unknown"
7934 uuid="A163C98F-8635-4AA8-B770-A9941737F3EF"
7935 wsmap="managed"
7936 >
7937 <desc>
7938 The IProgress interface is used to track and control
7939 asynchronous tasks within VirtualBox.
7940
7941 An instance of this is returned every time VirtualBox starts
7942 an asynchronous task (in other words, a separate thread) which
7943 continues to run after a method call returns. For example,
7944 <link to="IConsole::saveState" />, which saves the state of
7945 a running virtual machine, can take a long time to complete.
7946 To be able to display a progress bar, a user interface such as
7947 the VirtualBox graphical user interface can use the IProgress
7948 object returned by that method.
7949
7950 Note that IProgress is a "read-only" interface in the sense
7951 that only the VirtualBox internals behind the Main API can
7952 create and manipulate progress objects, whereas client code
7953 can only use the IProgress object to monitor a task's
7954 progress and, if <link to="#cancelable" /> is @c true,
7955 cancel the task by calling <link to="#cancel" />.
7956
7957 A task represented by IProgress consists of either one or
7958 several sub-operations that run sequentially, one by one (see
7959 <link to="#operation" /> and <link to="#operationCount" />).
7960 Every operation is identified by a number (starting from 0)
7961 and has a separate description.
7962
7963 You can find the individual percentage of completion of the current
7964 operation in <link to="#operationPercent" /> and the
7965 percentage of completion of the task as a whole
7966 in <link to="#percent" />.
7967
7968 Similarly, you can wait for the completion of a particular
7969 operation via <link to="#waitForOperationCompletion" /> or
7970 for the completion of the whole task via
7971 <link to="#waitForCompletion" />.
7972 </desc>
7973
7974 <attribute name="id" type="uuid" mod="string" readonly="yes">
7975 <desc>ID of the task.</desc>
7976 </attribute>
7977
7978 <attribute name="description" type="wstring" readonly="yes">
7979 <desc>Description of the task.</desc>
7980 </attribute>
7981
7982 <attribute name="initiator" type="$unknown" readonly="yes">
7983 <desc>Initiator of the task.</desc>
7984 </attribute>
7985
7986 <attribute name="cancelable" type="boolean" readonly="yes">
7987 <desc>Whether the task can be interrupted.</desc>
7988 </attribute>
7989
7990 <attribute name="percent" type="unsigned long" readonly="yes">
7991 <desc>
7992 Current progress value of the task as a whole, in percent.
7993 This value depends on how many operations are already complete.
7994 Returns 100 if <link to="#completed" /> is @c true.
7995 </desc>
7996 </attribute>
7997
7998 <attribute name="timeRemaining" type="long" readonly="yes">
7999 <desc>
8000 Estimated remaining time until the task completes, in
8001 seconds. Returns 0 once the task has completed; returns -1
8002 if the remaining time cannot be computed, in particular if
8003 the current progress is 0.
8004
8005 Even if a value is returned, the estimate will be unreliable
8006 for low progress values. It will become more reliable as the
8007 task progresses; it is not recommended to display an ETA
8008 before at least 20% of a task have completed.
8009 </desc>
8010 </attribute>
8011
8012 <attribute name="completed" type="boolean" readonly="yes">
8013 <desc>Whether the task has been completed.</desc>
8014 </attribute>
8015
8016 <attribute name="canceled" type="boolean" readonly="yes">
8017 <desc>Whether the task has been canceled.</desc>
8018 </attribute>
8019
8020 <attribute name="resultCode" type="long" readonly="yes">
8021 <desc>
8022 Result code of the progress task.
8023 Valid only if <link to="#completed"/> is @c true.
8024 </desc>
8025 </attribute>
8026
8027 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
8028 <desc>
8029 Extended information about the unsuccessful result of the
8030 progress operation. May be @c null if no extended information
8031 is available.
8032 Valid only if <link to="#completed"/> is @c true and
8033 <link to="#resultCode"/> indicates a failure.
8034 </desc>
8035 </attribute>
8036
8037 <attribute name="operationCount" type="unsigned long" readonly="yes">
8038 <desc>
8039 Number of sub-operations this task is divided into.
8040 Every task consists of at least one suboperation.
8041 </desc>
8042 </attribute>
8043
8044 <attribute name="operation" type="unsigned long" readonly="yes">
8045 <desc>Number of the sub-operation being currently executed.</desc>
8046 </attribute>
8047
8048 <attribute name="operationDescription" type="wstring" readonly="yes">
8049 <desc>
8050 Description of the sub-operation being currently executed.
8051 </desc>
8052 </attribute>
8053
8054 <attribute name="operationPercent" type="unsigned long" readonly="yes">
8055 <desc>Progress value of the current sub-operation only, in percent.</desc>
8056 </attribute>
8057
8058 <attribute name="operationWeight" type="unsigned long" readonly="yes">
8059 <desc>Weight value of the current sub-operation only.</desc>
8060 </attribute>
8061
8062 <attribute name="timeout" type="unsigned long">
8063 <desc>
8064 When non-zero, this specifies the number of milliseconds after which
8065 the operation will automatically be canceled. This can only be set on
8066 cancelable objects.
8067 </desc>
8068 </attribute>
8069
8070 <method name="setCurrentOperationProgress">
8071 <desc>Internal method, not to be called externally.</desc>
8072 <param name="percent" type="unsigned long" dir="in" />
8073 </method>
8074 <method name="setNextOperation">
8075 <desc>Internal method, not to be called externally.</desc>
8076 <param name="nextOperationDescription" type="wstring" dir="in" />
8077 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8078 </method>
8079
8080 <method name="waitForCompletion">
8081 <desc>
8082 Waits until the task is done (including all sub-operations)
8083 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8084
8085 Note that the VirtualBox/XPCOM/COM/native event queues of the calling
8086 thread are not processed while waiting. Neglecting event queues may
8087 have dire consequences (degrade performance, resource hogs,
8088 deadlocks, etc.), this is specially so for the main thread on
8089 platforms using XPCOM. Callers are adviced wait for short periods
8090 and service their event queues between calls, or to create a worker
8091 thread to do the waiting.
8092
8093 <result name="VBOX_E_IPRT_ERROR">
8094 Failed to wait for task completion.
8095 </result>
8096 </desc>
8097
8098 <param name="timeout" type="long" dir="in">
8099 <desc>
8100 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8101 </desc>
8102 </param>
8103 </method>
8104
8105 <method name="waitForOperationCompletion">
8106 <desc>
8107 Waits until the given operation is done with a given timeout in
8108 milliseconds; specify -1 for an indefinite wait.
8109
8110 See <link to="#waitForCompletion"> for event queue considerations.</link>
8111
8112 <result name="VBOX_E_IPRT_ERROR">
8113 Failed to wait for operation completion.
8114 </result>
8115
8116 </desc>
8117 <param name="operation" type="unsigned long" dir="in">
8118 <desc>
8119 Number of the operation to wait for.
8120 Must be less than <link to="#operationCount"/>.
8121 </desc>
8122 </param>
8123 <param name="timeout" type="long" dir="in">
8124 <desc>
8125 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8126 </desc>
8127 </param>
8128 </method>
8129
8130 <method name="cancel">
8131 <desc>
8132 Cancels the task.
8133 <note>
8134 If <link to="#cancelable"/> is @c false, then this method will fail.
8135 </note>
8136
8137 <result name="VBOX_E_INVALID_OBJECT_STATE">
8138 Operation cannot be canceled.
8139 </result>
8140
8141 </desc>
8142 </method>
8143
8144 </interface>
8145
8146 <!--
8147 // ISnapshot
8148 /////////////////////////////////////////////////////////////////////////
8149 -->
8150
8151 <interface
8152 name="ISnapshot" extends="$unknown"
8153 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8154 wsmap="managed"
8155 >
8156 <desc>
8157 The ISnapshot interface represents a snapshot of the virtual
8158 machine.
8159
8160 Together with the differencing media that are created
8161 when a snapshot is taken, a machine can be brought back to
8162 the exact state it was in when the snapshot was taken.
8163
8164 The ISnapshot interface has no methods, only attributes; snapshots
8165 are controlled through methods of the <link to="IConsole" /> interface
8166 which also manage the media associated with the snapshot.
8167 The following operations exist:
8168
8169 <ul>
8170 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8171 by creating new, empty differencing images for the machine's
8172 media and saving the VM settings and (if the VM is running)
8173 the current VM state in the snapshot.
8174
8175 The differencing images will then receive all data written to
8176 the machine's media, while their parent (base) images
8177 remain unmodified after the snapshot has been taken (see
8178 <link to="IMedium" /> for details about differencing images).
8179 This simplifies restoring a machine to the state of a snapshot:
8180 only the differencing images need to be deleted.
8181
8182 The current machine state is not changed by taking a snapshot.
8183 If the machine is running, it will resume execution after the
8184 snapshot has been taken.
8185 </li>
8186
8187 <li><link to="IConsole::restoreSnapshot"/>: this goes back to
8188 a previous snapshot. This resets the machine's state to that of
8189 the previous snapshot by deleting the differencing image of each
8190 of the machine's media and setting the machine's settings
8191 and state to the state that was saved in the snapshot (if any).
8192
8193 This destroys the machine's current state.
8194 </li>
8195
8196 <li><link to="IConsole::deleteSnapshot"/>: deletes a snapshot
8197 without affecting the current machine state.
8198
8199 This does not change the machine, but instead frees the resources
8200 allocated when the snapshot was taken: the settings and machine state
8201 is deleted (if any), and the snapshot's differencing image for each
8202 of the machine's media gets merged with its parent image.
8203
8204 Neither the current machine state nor other snapshots are affected
8205 by this operation, except that parent media will be modified
8206 to contain the disk data associated with the snapshot being deleted.
8207 </li>
8208 </ul>
8209
8210 Each snapshot contains the settings of the virtual machine (hardware
8211 configuration etc.). In addition, if the machine was running when the
8212 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState::Running"/>),
8213 the current VM state is saved in the snapshot (similarly to what happens
8214 when a VM's state is saved). The snapshot is then said to
8215 be <i>online</i> because when restoring it, the VM will be running.
8216
8217 If the machine is saved (<link to="MachineState::Saved"/>), the snapshot
8218 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8219
8220 Otherwise, if the machine was not running (<link to="MachineState::PoweredOff"/>
8221 or <link to="MachineState::Aborted"/>), the snapshot is <i>offline</i>;
8222 it then contains a so-called "zero execution state", representing a
8223 machine that is powered off.
8224
8225 <h3>Snapshot branches and the "current" snapshot</h3>
8226
8227 Snapshots can be chained, whereby every next snapshot is based on the
8228 previous one. This chaining is related to medium branching
8229 (see the <link to="IMedium"/> description) in that every time
8230 a new snapshot is created, a new differencing medium is implicitly
8231 created for all normal media attached to the machine.
8232
8233 Each virtual machine has a "current snapshot", identified by
8234 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8235 to the last snapshot in the chain. In a future version of VirtualBox,
8236 it will be possible to reset a machine's current state to that of an
8237 earlier snapshot without deleting the current state so that it will be
8238 possible to create alternative snapshot paths in a snapshot tree.
8239
8240 In the current implementation, multiple snapshot branches within one
8241 virtual machine are not allowed. Every machine has a single branch,
8242 and <link to="IConsole::takeSnapshot"/> operation adds a new
8243 snapshot to the top of that branch.
8244 </desc>
8245
8246 <attribute name="id" type="uuid" mod="string" readonly="yes">
8247 <desc>UUID of the snapshot.</desc>
8248 </attribute>
8249
8250 <attribute name="name" type="wstring">
8251 <desc>Short name of the snapshot.</desc>
8252 </attribute>
8253
8254 <attribute name="description" type="wstring">
8255 <desc>Optional description of the snapshot.</desc>
8256 </attribute>
8257
8258 <attribute name="timeStamp" type="long long" readonly="yes">
8259 <desc>
8260 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8261 </desc>
8262 </attribute>
8263
8264 <attribute name="online" type="boolean" readonly="yes">
8265 <desc>
8266 @c true if this snapshot is an online snapshot and @c false otherwise.
8267
8268 When this attribute is @c true, the
8269 <link to="IMachine::stateFilePath"/> attribute of the
8270 <link to="#machine"/> object associated with this snapshot
8271 will point to the saved state file. Otherwise, it will be
8272 an empty string.
8273 </desc>
8274 </attribute>
8275
8276 <attribute name="machine" type="IMachine" readonly="yes">
8277 <desc>
8278 Virtual machine this snapshot is taken on. This object
8279 stores all settings the machine had when taking this snapshot.
8280 <note>
8281 The returned machine object is immutable, i.e. no
8282 any settings can be changed.
8283 </note>
8284 </desc>
8285 </attribute>
8286
8287 <attribute name="parent" type="ISnapshot" readonly="yes">
8288 <desc>
8289 Parent snapshot (a snapshot this one is based on), or
8290 @c null if the snapshot has no parent (i.e. is the first snapshot).
8291 </desc>
8292 </attribute>
8293
8294 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8295 <desc>
8296 Child snapshots (all snapshots having this one as a parent).
8297 </desc>
8298 </attribute>
8299
8300 </interface>
8301
8302
8303 <!--
8304 // IMedium
8305 /////////////////////////////////////////////////////////////////////////
8306 -->
8307
8308 <enum
8309 name="MediumState"
8310 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8311 >
8312 <desc>
8313 Virtual medium state.
8314 <see>IMedium</see>
8315 </desc>
8316
8317 <const name="NotCreated" value="0">
8318 <desc>
8319 Associated medium storage does not exist (either was not created yet or
8320 was deleted).
8321 </desc>
8322 </const>
8323 <const name="Created" value="1">
8324 <desc>
8325 Associated storage exists and accessible; this gets set if the
8326 accessibility check performed by <link to="IMedium::refreshState" />
8327 was successful.
8328 </desc>
8329 </const>
8330 <const name="LockedRead" value="2">
8331 <desc>
8332 Medium is locked for reading (see <link to="IMedium::lockRead"/>),
8333 no data modification is possible.
8334 </desc>
8335 </const>
8336 <const name="LockedWrite" value="3">
8337 <desc>
8338 Medium is locked for writing (see <link to="IMedium::lockWrite"/>),
8339 no concurrent data reading or modification is possible.
8340 </desc>
8341 </const>
8342 <const name="Inaccessible" value="4">
8343 <desc>
8344 Medium accessiblity check (see <link to="IMedium::refreshState" />) has
8345 not yet been performed, or else, associated medium storage is not
8346 accessible. In the first case, <link to="IMedium::lastAccessError"/>
8347 is empty, in the second case, it describes the error that occured.
8348 </desc>
8349 </const>
8350 <const name="Creating" value="5">
8351 <desc>
8352 Associated medium storage is being created.
8353 </desc>
8354 </const>
8355 <const name="Deleting" value="6">
8356 <desc>
8357 Associated medium storage is being deleted.
8358 </desc>
8359 </const>
8360 </enum>
8361
8362 <enum
8363 name="MediumType"
8364 uuid="46bf1fd4-ad86-4ded-8c49-28bd2d148e5a"
8365 >
8366 <desc>
8367 Virtual medium type.
8368 <see>IMedium</see>
8369 </desc>
8370
8371 <const name="Normal" value="0">
8372 <desc>
8373 Normal medium (attached directly or indirectly, preserved
8374 when taking snapshots).
8375 </desc>
8376 </const>
8377 <const name="Immutable" value="1">
8378 <desc>
8379 Immutable medium (attached indirectly, changes are wiped out
8380 the next time the virtual machine is started).
8381 </desc>
8382 </const>
8383 <const name="Writethrough" value="2">
8384 <desc>
8385 Write through medium (attached directly, ignored when
8386 taking snapshots).
8387 </desc>
8388 </const>
8389 <const name="Shareable" value="3">
8390 <desc>
8391 Allow using this medium concurrently by several machines.
8392 <note>Present since VirtualBox 3.2.0, and accepted since 3.2.8.</note>
8393 </desc>
8394 </const>
8395 </enum>
8396
8397 <enum
8398 name="MediumVariant"
8399 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8400 >
8401 <desc>
8402 Virtual medium image variant. More than one flag may be set.
8403 <see>IMedium</see>
8404 </desc>
8405
8406 <const name="Standard" value="0">
8407 <desc>
8408 No particular variant requested, results in using the backend default.
8409 </desc>
8410 </const>
8411 <const name="VmdkSplit2G" value="0x01">
8412 <desc>
8413 VMDK image split in chunks of less than 2GByte.
8414 </desc>
8415 </const>
8416 <const name="VmdkStreamOptimized" value="0x04">
8417 <desc>
8418 VMDK streamOptimized image. Special import/export format which is
8419 read-only/append-only.
8420 </desc>
8421 </const>
8422 <const name="VmdkESX" value="0x08">
8423 <desc>
8424 VMDK format variant used on ESX products.
8425 </desc>
8426 </const>
8427 <const name="Fixed" value="0x10000">
8428 <desc>
8429 Fixed image. Only allowed for base images.
8430 </desc>
8431 </const>
8432 <const name="Diff" value="0x20000">
8433 <desc>
8434 Differencing image. Only allowed for child images.
8435 </desc>
8436 </const>
8437 </enum>
8438
8439 <interface
8440 name="IMediumAttachment" extends="$unknown"
8441 uuid="c29452cc-ca72-404b-9261-cfc514f1e412"
8442 wsmap="struct"
8443 >
8444 <desc>
8445 The IMediumAttachment interface links storage media to virtual machines.
8446 For each medium (<link to="IMedium"/>) which has been attached to a
8447 storage controller (<link to="IStorageController"/>) of a machine
8448 (<link to="IMachine"/>) via the <link to="IMachine::attachDevice" />
8449 method, one instance of IMediumAttachment is added to the machine's
8450 <link to="IMachine::mediumAttachments"/> array attribute.
8451
8452 Each medium attachment specifies the storage controller as well as a
8453 port and device number and the IMedium instance representing a virtual
8454 hard disk or floppy or DVD image.
8455
8456 For removeable media (DVDs or floppies), there are two additional
8457 options. For one, the IMedium instance can be @c null to represent
8458 an empty drive with no media inserted (see <link to="IMachine::mountMedium" />);
8459 secondly, the medium can be one of the pseudo-media for host drives
8460 listed in <link to="IHost::DVDDrives"/> or <link to="IHost::floppyDrives"/>.
8461 </desc>
8462
8463 <attribute name="medium" type="IMedium" readonly="yes">
8464 <desc>Medium object associated with this attachment; it
8465 can be @c null for removable devices.</desc>
8466 </attribute>
8467
8468 <attribute name="controller" type="wstring" readonly="yes">
8469 <desc>Name of the storage controller of this attachment; this
8470 refers to one of the controllers in <link to="IMachine::storageControllers" />
8471 by name.</desc>
8472 </attribute>
8473
8474 <attribute name="port" type="long" readonly="yes">
8475 <desc>Port number of this attachment.
8476 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8477 </desc>
8478 </attribute>
8479
8480 <attribute name="device" type="long" readonly="yes">
8481 <desc>Device slot number of this attachment.
8482 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8483 </desc>
8484 </attribute>
8485
8486 <attribute name="type" type="DeviceType" readonly="yes">
8487 <desc>Device type of this attachment.</desc>
8488 </attribute>
8489
8490 <attribute name="passthrough" type="boolean" readonly="yes">
8491 <desc>Pass I/O requests through to a device on the host.</desc>
8492 </attribute>
8493
8494 <attribute name="bandwidthLimit" type="unsigned long">
8495 <desc>
8496 Maximum throughput allowed for this medium attachment, in units of 1 mbps.
8497 A zero value means uncapped/unlimited.
8498 </desc>
8499 </attribute>
8500
8501 </interface>
8502
8503 <interface
8504 name="IMedium" extends="$unknown"
8505 uuid="858ea9d3-9ade-4aa7-91b7-d8a40f8f9b16"
8506 wsmap="managed"
8507 >
8508 <desc>
8509 The IMedium interface represents virtual storage for a machine's
8510 hard disks, CD/DVD or floppy drives. It will typically represent
8511 a disk image on the host, for example a VDI or VMDK file representing
8512 a virtual hard disk, or an ISO or RAW file representing virtual
8513 removable media, but can also point to a network location (e.g.
8514 for iSCSI targets).
8515
8516 Instances of IMedium are connected to virtual machines by way of
8517 medium attachments (see <link to="IMediumAttachment" />), which link
8518 the storage medium to a particular device slot of a storage controller
8519 of the virtual machine.
8520 In the VirtualBox API, virtual storage is therefore always represented
8521 by the following chain of object links:
8522
8523 <ul>
8524 <li><link to="IMachine::storageControllers"/> contains an array of
8525 storage controllers (IDE, SATA, SCSI, SAS or a floppy controller;
8526 these are instances of <link to="IStorageController"/>).</li>
8527 <li><link to="IMachine::mediumAttachments"/> contains an array of
8528 medium attachments (instances of <link to="IMediumAttachment"/>),
8529 each containing a storage controller from the above array, a
8530 port/device specification, and an instance of IMedium representing
8531 the medium storage (image file).
8532
8533 For removable media, the storage medium is optional; a medium
8534 attachment with no medium represents a CD/DVD or floppy drive
8535 with no medium inserted. By contrast, hard disk attachments
8536 will always have an IMedium object attached.</li>
8537 <li>Each IMedium in turn points to a storage unit (such as a file
8538 on the host computer or a network resource) that holds actual
8539 data. This location is represented by the <link to="#location"/>
8540 attribute.</li>
8541 </ul>
8542
8543 Existing media are opened using <link to="IVirtualBox::openMedium"/>;
8544 new hard disk media can be created with the VirtualBox API using the
8545 <link to="IVirtualBox::createHardDisk"/> method.
8546
8547 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8548 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8549 type in a regular file.
8550
8551 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8552 drive; in that case the <link to="#id" /> attribute contains the UUID of
8553 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8554
8555 <h3>Known media</h3>
8556
8557 When an existing medium is opened for the first time, it is automatically
8558 remembered by the given VirtualBox installation or, in other words, becomes
8559 a <i>known medium</i>. Known media are stored in the media
8560 registry transparently maintained by VirtualBox and stored in settings
8561 files so that this registry is preserved when VirtualBox is not running.
8562
8563 Newly created virtual media are remembered only when the associated
8564 storage unit is actually created.
8565
8566 All known media can be enumerated using
8567 <link to="IVirtualBox::hardDisks"/>,
8568 <link to="IVirtualBox::DVDImages"/> and
8569 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8570 quickly found using the <link to="IVirtualBox::findMedium"/> method.
8571
8572 Only known media can be attached to virtual machines.
8573
8574 Removing known media from the media registry is performed when the given
8575 medium is closed using the <link to="#close"/> method or when its
8576 associated storage unit is deleted.
8577
8578 <h3>Accessibility checks</h3>
8579
8580 VirtualBox defers media accessibility checks until the <link to="#refreshState" />
8581 method is called explicitly on a medium. This is done to make the VirtualBox object
8582 ready for serving requests as fast as possible and let the end-user
8583 application decide if it needs to check media accessibility right away or not.
8584
8585 As a result, when VirtualBox starts up (e.g. the VirtualBox
8586 object gets created for the first time), all known media are in the
8587 "Inaccessible" state, but the value of the <link to="#lastAccessError"/>
8588 attribute is an empty string because no actual accessibility check has
8589 been made yet.
8590
8591 After calling <link to="#refreshState" />, a medium is considered
8592 <i>accessible</i> if its storage unit can be read. In that case, the
8593 <link to="#state"/> attribute has a value of "Created". If the storage
8594 unit cannot be read (for example, because it is located on a disconnected
8595 network resource, or was accidentally deleted outside VirtualBox),
8596 the medium is considered <i>inaccessible</i>, which is indicated by the
8597 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8598 obtained by reading the <link to="#lastAccessError"/> attribute.
8599
8600 <h3>Medium types</h3>
8601
8602 There are four types of medium behavior (see <link to="MediumType" />):
8603 "normal", "immutable", "writethrough" and "shareable", represented by the
8604 <link to="#type"/> attribute. The type of the medium defines how the
8605 medium is attached to a virtual machine and what happens when a
8606 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8607 attached medium is taken. At the moment DVD and floppy media are always
8608 of type "writethrough".
8609
8610 All media can be also divided in two groups: <i>base</i> media and
8611 <i>differencing</i> media. A base medium contains all sectors of the
8612 medium data in its own storage and therefore can be used independently.
8613 In contrast, a differencing mediun is a "delta" to some other medium and
8614 contains only those sectors which differ from that other medium, which is
8615 then called a <i>parent</i>. The differencing medium is said to be
8616 <i>linked to</i> that parent. The parent may be itself a differencing
8617 medium, thus forming a chain of linked media. The last element in that
8618 chain must always be a base medium. Note that several differencing
8619 media may be linked to the same parent medium.
8620
8621 Differencing media can be distinguished from base media by querying the
8622 <link to="#parent"/> attribute: base media do not have parents they would
8623 depend on, so the value of this attribute is always @c null for them.
8624 Using this attribute, it is possible to walk up the medium tree (from the
8625 child medium to its parent). It is also possible to walk down the tree
8626 using the <link to="#children"/> attribute.
8627
8628 Note that the type of all differencing media is "normal"; all other
8629 values are meaningless for them. Base media may be of any type.
8630
8631 <h3>Creating hard disks</h3>
8632
8633 New base hard disks are created using
8634 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8635 opened using <link to="IVirtualBox::openMedium"/>. Differencing hard
8636 disks are usually implicitly created by VirtualBox when needed but may
8637 also be created explicitly using <link to="#createDiffStorage"/>.
8638
8639 After the hard disk is successfully created (including the storage unit)
8640 or opened, it becomes a known hard disk (remembered in the internal media
8641 registry). Known hard disks can be attached to a virtual machine, accessed
8642 through <link to="IVirtualBox::findMedium"/> or enumerated using the
8643 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8644
8645 The following methods, besides <link to="IMedium::close"/>,
8646 automatically remove the hard disk from the media registry:
8647 <ul>
8648 <li><link to="#deleteStorage"/></li>
8649 <li><link to="#mergeTo"/></li>
8650 </ul>
8651
8652 If the storage unit of the hard disk is a regular file in the host's
8653 file system then the rules stated in the description of the
8654 <link to="IMedium::location"/> attribute apply when setting its value. In
8655 addition, a plain file name without any path may be given, in which case
8656 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8657 folder</link> will be prepended to it.
8658
8659 <h4>Automatic composition of the file name part</h4>
8660
8661 Another extension to the <link to="IMedium::location"/> attribute is that
8662 there is a possibility to cause VirtualBox to compose a unique value for
8663 the file name part of the location using the UUID of the hard disk. This
8664 applies only to hard disks in <link to="MediumState::NotCreated"/> state,
8665 e.g. before the storage unit is created, and works as follows. You set the
8666 value of the <link to="IMedium::location"/> attribute to a location
8667 specification which only contains the path specification but not the file
8668 name part and ends with either a forward slash or a backslash character.
8669 In response, VirtualBox will generate a new UUID for the hard disk and
8670 compose the file name using the following pattern:
8671 <pre>
8672 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8673 </pre>
8674 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8675 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8676 is the default extension for the storage format of this hard disk. After
8677 that, you may call any of the methods that create a new hard disk storage
8678 unit and they will use the generated UUID and file name.
8679
8680 <h3>Attaching Hard Disks</h3>
8681
8682 Hard disks are attached to virtual machines using the
8683 <link to="IMachine::attachDevice"/> method and detached using the
8684 <link to="IMachine::detachDevice"/> method. Depending on their
8685 <link to="#type"/>, hard disks are attached either
8686 <i>directly</i> or <i>indirectly</i>.
8687
8688 When a hard disk is being attached directly, it is associated with the
8689 virtual machine and used for hard disk operations when the machine is
8690 running. When a hard disk is being attached indirectly, a new differencing
8691 hard disk linked to it is implicitly created and this differencing hard
8692 disk is associated with the machine and used for hard disk operations.
8693 This also means that if <link to="IMachine::attachDevice"/> performs
8694 a direct attachment then the same hard disk will be returned in response
8695 to the subsequent <link to="IMachine::getMedium"/> call; however if
8696 an indirect attachment is performed then
8697 <link to="IMachine::getMedium"/> will return the implicitly created
8698 differencing hard disk, not the original one passed to <link
8699 to="IMachine::attachDevice"/>. In detail:
8700
8701 <ul>
8702 <li><b>Normal base</b> hard disks that do not have children (i.e.
8703 differencing hard disks linked to them) and that are not already
8704 attached to virtual machines in snapshots are attached <b>directly</b>.
8705 Otherwise, they are attached <b>indirectly</b> because having
8706 dependent children or being part of the snapshot makes it impossible
8707 to modify hard disk contents without breaking the integrity of the
8708 dependent party. The <link to="#readOnly"/> attribute allows to
8709 quickly determine the kind of the attachment for the given hard
8710 disk. Note that if a normal base hard disk is to be indirectly
8711 attached to a virtual machine with snapshots then a special
8712 procedure called <i>smart attachment</i> is performed (see below).</li>
8713 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
8714 they are attached <b>directly</b> if they do not have children and are
8715 not attached to virtual machines in snapshots, and <b>indirectly</b>
8716 otherwise. Note that the smart attachment procedure is never performed
8717 for differencing hard disks.</li>
8718 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
8719 they are designed to be non-writable. If an immutable hard disk is
8720 attached to a virtual machine with snapshots then a special
8721 procedure called smart attachment is performed (see below).</li>
8722 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
8723 also as designed. This also means that writethrough hard disks cannot
8724 have other hard disks linked to them at all.</li>
8725 <li><b>Shareable</b> hard disks are always attached <b>directly</b>,
8726 also as designed. This also means that shareable hard disks cannot
8727 have other hard disks linked to them at all. They behave almost
8728 like writethrough hard disks, except that shareable hard disks can
8729 be attached to several virtual machines which are running, allowing
8730 concurrent accesses. You need special cluster software running in
8731 the virtual machines to make use of such disks.</li>
8732 </ul>
8733
8734 Note that the same hard disk, regardless of its type, may be attached to
8735 more than one virtual machine at a time. In this case, the machine that is
8736 started first gains exclusive access to the hard disk and attempts to
8737 start other machines having this hard disk attached will fail until the
8738 first machine is powered down.
8739
8740 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8741 that the given hard disk remains associated with the given machine after a
8742 successful <link to="IMachine::detachDevice"/> call until
8743 <link to="IMachine::saveSettings"/> is called to save all changes to
8744 machine settings to disk. This deferring is necessary to guarantee that
8745 the hard disk configuration may be restored at any time by a call to
8746 <link to="IMachine::discardSettings"/> before the settings
8747 are saved (committed).
8748
8749 Note that if <link to="IMachine::discardSettings"/> is called after
8750 indirectly attaching some hard disks to the machine but before a call to
8751 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8752 all differencing hard disks implicitly created by
8753 <link to="IMachine::attachDevice"/> for these indirect attachments.
8754 Such implicitly created hard disks will also be immediately deleted when
8755 detached explicitly using the <link to="IMachine::detachDevice"/>
8756 call if it is made before <link to="IMachine::saveSettings"/>. This
8757 implicit deletion is safe because newly created differencing hard
8758 disks do not contain any user data.
8759
8760 However, keep in mind that detaching differencing hard disks that were
8761 implicitly created by <link to="IMachine::attachDevice"/>
8762 before the last <link to="IMachine::saveSettings"/> call will
8763 <b>not</b> implicitly delete them as they may already contain some data
8764 (for example, as a result of virtual machine execution). If these hard
8765 disks are no more necessary, the caller can always delete them explicitly
8766 using <link to="#deleteStorage"/> after they are actually de-associated
8767 from this machine by the <link to="IMachine::saveSettings"/> call.
8768
8769 <h3>Smart Attachment</h3>
8770
8771 When normal base or immutable hard disks are indirectly attached to a
8772 virtual machine then some additional steps are performed to make sure the
8773 virtual machine will have the most recent "view" of the hard disk being
8774 attached. These steps include walking through the machine's snapshots
8775 starting from the current one and going through ancestors up to the first
8776 snapshot. Hard disks attached to the virtual machine in all
8777 of the encountered snapshots are checked whether they are descendants of
8778 the given normal base or immutable hard disk. The first found child (which
8779 is the differencing hard disk) will be used instead of the normal base or
8780 immutable hard disk as a parent for creating a new differencing hard disk
8781 that will be actually attached to the machine. And only if no descendants
8782 are found or if the virtual machine does not have any snapshots then the
8783 normal base or immutable hard disk will be used itself as a parent for
8784 this differencing hard disk.
8785
8786 It is easier to explain what smart attachment does using the
8787 following example:
8788 <pre>
8789BEFORE attaching B.vdi: AFTER attaching B.vdi:
8790
8791Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8792 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8793 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8794 Snapshot 4 (none) Snapshot 4 (none)
8795 CurState (none) CurState (D3->D2.vdi)
8796
8797 NOT
8798 ...
8799 CurState (D3->B.vdi)
8800 </pre>
8801 The first column is the virtual machine configuration before the base hard
8802 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8803 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8804 mean that the hard disk that is actually attached to the machine is a
8805 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8806 another hard disk, <tt>B.vdi</tt>.
8807
8808 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8809 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8810 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8811 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8812 it cannot be attached directly and needs an indirect attachment (i.e.
8813 implicit creation of a new differencing hard disk). Due to the smart
8814 attachment procedure, the new differencing hard disk
8815 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8816 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8817 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8818 machine.
8819
8820 Note that if there is more than one descendant hard disk of the given base
8821 hard disk found in a snapshot, and there is an exact device, channel and
8822 bus match, then this exact match will be used. Otherwise, the youngest
8823 descendant will be picked up.
8824
8825 There is one more important aspect of the smart attachment procedure which
8826 is not related to snapshots at all. Before walking through the snapshots
8827 as described above, the backup copy of the current list of hard disk
8828 attachment is searched for descendants. This backup copy is created when
8829 the hard disk configuration is changed for the first time after the last
8830 <link to="IMachine::saveSettings"/> call and used by
8831 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8832 changes. When such a descendant is found in this backup copy, it will be
8833 simply re-attached back, without creating a new differencing hard disk for
8834 it. This optimization is necessary to make it possible to re-attach the
8835 base or immutable hard disk to a different bus, channel or device slot
8836 without losing the contents of the differencing hard disk actually
8837 attached to the machine in place of it.
8838 </desc>
8839
8840 <attribute name="id" type="uuid" mod="string" readonly="yes">
8841 <desc>
8842 UUID of the medium. For a newly created medium, this value is a randomly
8843 generated UUID.
8844
8845 <note>
8846 For media in one of MediumState_NotCreated, MediumState_Creating or
8847 MediumState_Deleting states, the value of this property is undefined
8848 and will most likely be an empty UUID.
8849 </note>
8850 </desc>
8851 </attribute>
8852
8853 <attribute name="description" type="wstring">
8854 <desc>
8855 Optional description of the medium. For a newly created medium the value
8856 of this attribute is an empty string.
8857
8858 Medium types that don't support this attribute will return E_NOTIMPL in
8859 attempt to get or set this attribute's value.
8860
8861 <note>
8862 For some storage types, reading this attribute may return an outdated
8863 (last known) value when <link to="#state"/> is <link
8864 to="MediumState::Inaccessible"/> or <link
8865 to="MediumState::LockedWrite"/> because the value of this attribute is
8866 stored within the storage unit itself. Also note that changing the
8867 attribute value is not possible in such case, as well as when the
8868 medium is the <link to="MediumState::LockedRead"/> state.
8869 </note>
8870 </desc>
8871 </attribute>
8872
8873 <attribute name="state" type="MediumState" readonly="yes">
8874 <desc>
8875 Returns the current medium state, which is the last state set by
8876 the accessibility check performed by <link to="#refreshState"/>.
8877 If that method has not yet been called on the medium, the state
8878 is "Inaccessible"; as opposed to truly inaccessible media, the
8879 value of <link to="#lastAccessError"/> will be an empty string in
8880 that case.
8881
8882 <note>As of version 3.1, this no longer performs an accessibility check
8883 automatically; call <link to="#refreshState"/> for that.
8884 </note>
8885 </desc>
8886 </attribute>
8887
8888 <attribute name="variant" type="MediumVariant" readonly="yes">
8889 <desc>
8890 Returns the storage format variant information for this medium.
8891 Before <link to="#refreshState"/> is called this method returns
8892 an undefined value.
8893 </desc>
8894 </attribute>
8895
8896 <attribute name="location" type="wstring">
8897 <desc>
8898 Location of the storage unit holding medium data.
8899
8900 The format of the location string is medium type specific. For medium
8901 types using regular files in a host's file system, the location
8902 string is the full file name.
8903
8904 Some medium types may support changing the storage unit location by
8905 simply changing the value of this property. If this operation is not
8906 supported, the implementation will return E_NOTIMPL in attempt to set
8907 this attribute's value.
8908
8909 When setting a value of the location attribute which is a regular file
8910 in the host's file system, the given file name may be either relative to
8911 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8912 absolute. Note that if the given location specification does not contain
8913 the file extension part then a proper default extension will be
8914 automatically appended by the implementation depending on the medium type.
8915 </desc>
8916 </attribute>
8917
8918 <attribute name="name" type="wstring" readonly="yes">
8919 <desc>
8920 Name of the storage unit holding medium data.
8921
8922 The returned string is a short version of the <link to="#location"/>
8923 attribute that is suitable for representing the medium in situations
8924 where the full location specification is too long (such as lists
8925 and comboboxes in GUI frontends). This string is also used by frontends
8926 to sort the media list alphabetically when needed.
8927
8928 For example, for locations that are regular files in the host's file
8929 system, the value of this attribute is just the file name (+ extension),
8930 without the path specification.
8931
8932 Note that as opposed to the <link to="#location"/> attribute, the name
8933 attribute will not necessary be unique for a list of media of the
8934 given type and format.
8935 </desc>
8936 </attribute>
8937
8938 <attribute name="deviceType" type="DeviceType" readonly="yes">
8939 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
8940 medium.</desc>
8941 </attribute>
8942
8943 <attribute name="hostDrive" type="boolean" readonly="yes">
8944 <desc>True if this corresponds to a drive on the host.</desc>
8945 </attribute>
8946
8947 <attribute name="size" type="long long" readonly="yes">
8948 <desc>
8949 Physical size of the storage unit used to hold medium data (in bytes).
8950
8951 <note>
8952 For media whose <link to="#state"/> is <link
8953 to="MediumState::Inaccessible"/>, the value of this property is the
8954 last known size. For <link to="MediumState::NotCreated"/> media,
8955 the returned value is zero.
8956 </note>
8957 </desc>
8958 </attribute>
8959
8960 <attribute name="format" type="wstring" readonly="yes">
8961 <desc>
8962 Storage format of this medium.
8963
8964 The value of this attribute is a string that specifies a backend used
8965 to store medium data. The storage format is defined when you create a
8966 new medium or automatically detected when you open an existing medium,
8967 and cannot be changed later.
8968
8969 The list of all storage formats supported by this VirtualBox
8970 installation can be obtained using
8971 <link to="ISystemProperties::mediumFormats"/>.
8972 </desc>
8973 </attribute>
8974
8975 <attribute name="mediumFormat" type="IMediumFormat" readonly="yes">
8976 <desc>
8977 Storage medium format object corresponding to this medium.
8978
8979 The value of this attribute is a reference to the medium format object
8980 that specifies the backend properties used to store medium data. The
8981 storage format is defined when you create a new medium or automatically
8982 detected when you open an existing medium, and cannot be changed later.
8983
8984 <note>@c null is returned if there is no associated medium format
8985 object. This can e.g. happen for medium objects representing host
8986 drives and other special medium objects.</note>
8987 </desc>
8988 </attribute>
8989
8990 <attribute name="type" type="MediumType">
8991 <desc>
8992 Type (role) of this medium.
8993
8994 The following constraints apply when changing the value of this
8995 attribute:
8996 <ul>
8997 <li>If a medium is attached to a virtual machine (either in the
8998 current state or in one of the snapshots), its type cannot be
8999 changed.
9000 </li>
9001 <li>As long as the medium has children, its type cannot be set
9002 to <link to="MediumType::Writethrough"/>.
9003 </li>
9004 <li>The type of all differencing media is
9005 <link to="MediumType::Normal"/> and cannot be changed.
9006 </li>
9007 </ul>
9008
9009 The type of a newly created or opened medium is set to
9010 <link to="MediumType::Normal"/>, except for DVD and floppy media,
9011 which have a type of <link to="MediumType::Writethrough"/>.
9012 </desc>
9013 </attribute>
9014
9015 <attribute name="parent" type="IMedium" readonly="yes">
9016 <desc>
9017 Parent of this medium (the medium this medium is directly based
9018 on).
9019
9020 Only differencing media have parents. For base (non-differencing)
9021 media, @c null is returned.
9022 </desc>
9023 </attribute>
9024
9025 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
9026 <desc>
9027 Children of this medium (all differencing media directly based
9028 on this medium). A @c null array is returned if this medium
9029 does not have any children.
9030 </desc>
9031 </attribute>
9032
9033 <attribute name="base" type="IMedium" readonly="yes">
9034 <desc>
9035 Base medium of this medium.
9036
9037 If this is a differencing medium, its base medium is the medium
9038 the given medium branch starts from. For all other types of media, this
9039 property returns the medium object itself (i.e. the same object this
9040 property is read on).
9041 </desc>
9042 </attribute>
9043
9044 <attribute name="readOnly" type="boolean" readonly="yes">
9045 <desc>
9046 Returns @c true if this medium is read-only and @c false otherwise.
9047
9048 A medium is considered to be read-only when its contents cannot be
9049 modified without breaking the integrity of other parties that depend on
9050 this medium such as its child media or snapshots of virtual machines
9051 where this medium is attached to these machines. If there are no
9052 children and no such snapshots then there is no dependency and the
9053 medium is not read-only.
9054
9055 The value of this attribute can be used to determine the kind of the
9056 attachment that will take place when attaching this medium to a
9057 virtual machine. If the value is @c false then the medium will
9058 be attached directly. If the value is @c true then the medium
9059 will be attached indirectly by creating a new differencing child
9060 medium for that. See the interface description for more information.
9061
9062 Note that all <link to="MediumType::Immutable">Immutable</link> media
9063 are always read-only while all
9064 <link to="MediumType::Writethrough">Writethrough</link> media are
9065 always not.
9066
9067 <note>
9068 The read-only condition represented by this attribute is related to
9069 the medium type and usage, not to the current
9070 <link to="IMedium::state">medium state</link> and not to the read-only
9071 state of the storage unit.
9072 </note>
9073 </desc>
9074 </attribute>
9075
9076 <attribute name="logicalSize" type="long long" readonly="yes">
9077 <desc>
9078 Logical size of this medium (in megabytes), as reported to the
9079 guest OS running inside the virtual machine this medium is
9080 attached to. The logical size is defined when the medium is created
9081 and cannot be changed later.
9082
9083 <note>
9084 Reading this property on a differencing medium will return the size
9085 of its <link to="#base"/> medium.
9086 </note>
9087 <note>
9088 For media whose state is <link to="#state"/> is <link
9089 to="MediumState::Inaccessible"/>, the value of this property is the
9090 last known logical size. For <link to="MediumState::NotCreated"/>
9091 media, the returned value is zero.
9092 </note>
9093 </desc>
9094 </attribute>
9095
9096 <attribute name="autoReset" type="boolean">
9097 <desc>
9098 Whether this differencing medium will be automatically reset each
9099 time a virtual machine it is attached to is powered up. This
9100 attribute is automatically set to @c true for the last
9101 differencing image of an "immutable" medium (see
9102 <link to="MediumType" />).
9103
9104 See <link to="#reset"/> for more information about resetting
9105 differencing media.
9106
9107 <note>
9108 Reading this property on a base (non-differencing) medium will
9109 always @c false. Changing the value of this property in this
9110 case is not supported.
9111 </note>
9112
9113 <result name="VBOX_E_NOT_SUPPORTED">
9114 This is not a differencing medium (when changing the attribute
9115 value).
9116 </result>
9117 </desc>
9118 </attribute>
9119
9120 <attribute name="lastAccessError" type="wstring" readonly="yes">
9121 <desc>
9122 Text message that represents the result of the last accessibility
9123 check performed by <link to="#refreshState"/>.
9124
9125 An empty string is returned if the last accessibility check
9126 was successful or has not yet been called. As a result, if
9127 <link to="#state" /> is "Inaccessible" and this attribute is empty,
9128 then <link to="#refreshState"/> has yet to be called; this is the
9129 default value of media after VirtualBox initialization.
9130 A non-empty string indicates a failure and should normally describe
9131 a reason of the failure (for example, a file read error).
9132 </desc>
9133 </attribute>
9134
9135 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9136 <desc>
9137 Array of UUIDs of all machines this medium is attached to.
9138
9139 A @c null array is returned if this medium is not attached to any
9140 machine or to any machine's snapshot.
9141
9142 <note>
9143 The returned array will include a machine even if this medium is not
9144 attached to that machine in the current state but attached to it in
9145 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9146 details.
9147 </note>
9148 </desc>
9149 </attribute>
9150
9151 <method name="setIDs">
9152 <desc>
9153 Changes the UUID and parent UUID for a hard disk medium.
9154 </desc>
9155 <param name="setImageId" type="boolean" dir="in">
9156 <desc>
9157 Select whether a new image UUID is set or not.
9158 </desc>
9159 </param>
9160 <param name="imageId" type="uuid" mod="string" dir="in">
9161 <desc>
9162 New UUID for the image. If an empty string is passed, then a new
9163 UUID is automatically created, provided that @a setImageId is @c true.
9164 Specifying a zero UUID is not allowed.
9165 </desc>
9166 </param>
9167 <param name="setParentId" type="boolean" dir="in">
9168 <desc>
9169 Select whether a new parent UUID is set or not.
9170 </desc>
9171 </param>
9172 <param name="parentId" type="uuid" mod="string" dir="in">
9173 <desc>
9174 New parent UUID for the image. If an empty string is passed, then a
9175 new UUID is automatically created, provided @a setParentId is
9176 @c true. A zero UUID is valid.
9177 </desc>
9178 </param>
9179 <result name="E_INVALIDARG">
9180 Invalid parameter combination.
9181 </result>
9182 <result name="VBOX_E_NOT_SUPPORTED">
9183 Medium is not a hard disk medium.
9184 </result>
9185 </method>
9186
9187 <method name="refreshState">
9188 <desc>
9189 If the current medium state (see <link to="MediumState"/>) is one of
9190 "Created", "Inaccessible" or "LockedRead", then this performs an
9191 accessibility check on the medium and sets the value of the <link to="#state"/>
9192 attribute accordingly; that value is also returned for convenience.
9193
9194 For all other state values, this does not perform a refresh but returns
9195 the state only.
9196
9197 The refresh, if performed, may take a long time (several seconds or even
9198 minutes, depending on the storage unit location and format) because it performs an
9199 accessibility check of the storage unit. This check may cause a significant
9200 delay if the storage unit of the given medium is, for example, a file located
9201 on a network share which is not currently accessible due to connectivity
9202 problems. In that case, the call will not return until a timeout
9203 interval defined by the host OS for this operation expires. For this reason,
9204 it is recommended to never read this attribute on the main UI thread to avoid
9205 making the UI unresponsive.
9206
9207 If the last known state of the medium is "Created" and the accessibility
9208 check fails, then the state would be set to "Inaccessible", and
9209 <link to="#lastAccessError"/> may be used to get more details about the
9210 failure. If the state of the medium is "LockedRead", then it remains the
9211 same, and a non-empty value of <link to="#lastAccessError"/> will
9212 indicate a failed accessibility check in this case.
9213
9214 Note that not all medium states are applicable to all medium types.
9215 </desc>
9216 <param name="state" type="MediumState" dir="return">
9217 <desc>
9218 New medium state.
9219 </desc>
9220 </param>
9221 </method>
9222
9223 <method name="getSnapshotIds">
9224 <desc>
9225 Returns an array of UUIDs of all snapshots of the given machine where
9226 this medium is attached to.
9227
9228 If the medium is attached to the machine in the current state, then the
9229 first element in the array will always be the ID of the queried machine
9230 (i.e. the value equal to the @c machineId argument), followed by
9231 snapshot IDs (if any).
9232
9233 If the medium is not attached to the machine in the current state, then
9234 the array will contain only snapshot IDs.
9235
9236 The returned array may be @c null if this medium is not attached
9237 to the given machine at all, neither in the current state nor in one of
9238 the snapshots.
9239 </desc>
9240 <param name="machineId" type="uuid" mod="string" dir="in">
9241 <desc>
9242 UUID of the machine to query.
9243 </desc>
9244 </param>
9245 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9246 <desc>
9247 Array of snapshot UUIDs of the given machine using this medium.
9248 </desc>
9249 </param>
9250 </method>
9251
9252 <method name="lockRead">
9253 <desc>
9254 Locks this medium for reading.
9255
9256 A read lock is shared: many clients can simultaneously lock the
9257 same medium for reading unless it is already locked for writing (see
9258 <link to="#lockWrite"/>) in which case an error is returned.
9259
9260 When the medium is locked for reading, it cannot be modified
9261 from within VirtualBox. This means that any method that changes
9262 the properties of this medium or contents of the storage unit
9263 will return an error (unless explicitly stated otherwise). That
9264 includes an attempt to start a virtual machine that wants to
9265 write to the the medium.
9266
9267 When the virtual machine is started up, it locks for reading all
9268 media it uses in read-only mode. If some medium cannot be locked
9269 for reading, the startup procedure will fail.
9270 A medium is typically locked for reading while it is used by a running
9271 virtual machine but has a depending differencing image that receives
9272 the actual write operations. This way one base medium can have
9273 multiple child differencing images which can be written to
9274 simultaneously. Read-only media such as DVD and floppy images are
9275 also locked for reading only (so they can be in use by multiple
9276 machines simultaneously).
9277
9278 A medium is also locked for reading when it is the source of a
9279 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9280
9281 The medium locked for reading must be unlocked using the <link
9282 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9283 can be nested and must be followed by the same number of paired
9284 <link to="#unlockRead"/> calls.
9285
9286 This method sets the medium state (see <link to="#state"/>) to
9287 "LockedRead" on success. The medium's previous state must be
9288 one of "Created", "Inaccessible" or "LockedRead".
9289
9290 Locking an inaccessible medium is not an error; this method performs
9291 a logical lock that prevents modifications of this medium through
9292 the VirtualBox API, not a physical file-system lock of the underlying
9293 storage unit.
9294
9295 This method returns the current state of the medium
9296 <i>before</i> the operation.
9297
9298 <result name="VBOX_E_INVALID_OBJECT_STATE">
9299 Invalid medium state (e.g. not created, locked, inaccessible,
9300 creating, deleting).
9301 </result>
9302
9303 </desc>
9304 <param name="state" type="MediumState" dir="return">
9305 <desc>
9306 State of the medium after the operation.
9307 </desc>
9308 </param>
9309 </method>
9310
9311 <method name="unlockRead">
9312 <desc>
9313 Cancels the read lock previously set by <link to="#lockRead"/>.
9314
9315 For both success and failure, this method returns the current state
9316 of the medium <i>after</i> the operation.
9317
9318 See <link to="#lockRead"/> for more details.
9319
9320 <result name="VBOX_E_INVALID_OBJECT_STATE">
9321 Medium not locked for reading.
9322 </result>
9323
9324 </desc>
9325 <param name="state" type="MediumState" dir="return">
9326 <desc>
9327 State of the medium after the operation.
9328 </desc>
9329 </param>
9330 </method>
9331
9332 <method name="lockWrite">
9333 <desc>
9334 Locks this medium for writing.
9335
9336 A write lock, as opposed to <link to="#lockRead"/>, is
9337 exclusive: there may be only one client holding a write lock,
9338 and there may be no read locks while the write lock is held.
9339 As a result, read-locking fails if a write lock is held, and
9340 write-locking fails if either a read or another write lock is held.
9341
9342 When a medium is locked for writing, it cannot be modified
9343 from within VirtualBox, and it is not guaranteed that the values
9344 of its properties are up-to-date. Any method that changes the
9345 properties of this medium or contents of the storage unit will
9346 return an error (unless explicitly stated otherwise).
9347
9348 When a virtual machine is started up, it locks for writing all
9349 media it uses to write data to. If any medium could not be locked
9350 for writing, the startup procedure will fail. If a medium has
9351 differencing images, then while the machine is running, only
9352 the last ("leaf") differencing image is locked for writing,
9353 whereas its parents are locked for reading only.
9354
9355 A medium is also locked for writing when it is the target of a
9356 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9357
9358 The medium locked for writing must be unlocked using the <link
9359 to="#unlockWrite"/> method. Write locks <i>cannot</i> be nested.
9360
9361 This method sets the medium state (see <link to="#state"/>) to
9362 "LockedWrite" on success. The medium's previous state must be
9363 either "Created" or "Inaccessible".
9364
9365 Locking an inaccessible medium is not an error; this method performs
9366 a logical lock that prevents modifications of this medium through
9367 the VirtualBox API, not a physical file-system lock of the underlying
9368 storage unit.
9369
9370 For both, success and failure, this method returns the current
9371 state of the medium <i>before</i> the operation.
9372
9373 <result name="VBOX_E_INVALID_OBJECT_STATE">
9374 Invalid medium state (e.g. not created, locked, inaccessible,
9375 creating, deleting).
9376 </result>
9377
9378 </desc>
9379 <param name="state" type="MediumState" dir="return">
9380 <desc>
9381 State of the medium after the operation.
9382 </desc>
9383 </param>
9384 </method>
9385
9386 <method name="unlockWrite">
9387 <desc>
9388 Cancels the write lock previously set by <link to="#lockWrite"/>.
9389
9390 For both success and failure, this method returns the current
9391 state of the medium <i>after</i> the operation.
9392
9393 See <link to="#lockWrite"/> for more details.
9394
9395 <result name="VBOX_E_INVALID_OBJECT_STATE">
9396 Medium not locked for writing.
9397 </result>
9398
9399 </desc>
9400 <param name="state" type="MediumState" dir="return">
9401 <desc>
9402 State of the medium after the operation.
9403 </desc>
9404 </param>
9405 </method>
9406
9407 <method name="close">
9408 <desc>
9409 Closes this medium.
9410
9411 The medium must not be attached to any known virtual machine
9412 and must not have any known child media, otherwise the
9413 operation will fail.
9414
9415 When the medium is successfully closed, it is removed from
9416 the list of registered media, but its storage unit is not
9417 deleted. In particular, this means that this medium can
9418 later be opened again using the <link to="IVirtualBox::openMedium"/>
9419 call.
9420
9421 Note that after this method successfully returns, the given medium
9422 object becomes uninitialized. This means that any attempt
9423 to call any of its methods or attributes will fail with the
9424 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9425
9426 <result name="VBOX_E_INVALID_OBJECT_STATE">
9427 Invalid medium state (other than not created, created or
9428 inaccessible).
9429 </result>
9430 <result name="VBOX_E_OBJECT_IN_USE">
9431 Medium attached to virtual machine.
9432 </result>
9433 <result name="VBOX_E_FILE_ERROR">
9434 Settings file not accessible.
9435 </result>
9436 <result name="VBOX_E_XML_ERROR">
9437 Could not parse the settings file.
9438 </result>
9439
9440 </desc>
9441 </method>
9442
9443 <!-- storage methods -->
9444
9445 <method name="getProperty">
9446 <desc>
9447 Returns the value of the custom medium property with the given name.
9448
9449 The list of all properties supported by the given medium format can
9450 be obtained with <link to="IMediumFormat::describeProperties"/>.
9451
9452 Note that if this method returns an empty string in @a value, the
9453 requested property is supported but currently not assigned any value.
9454
9455 <result name="VBOX_E_OBJECT_NOT_FOUND">
9456 Requested property does not exist (not supported by the format).
9457 </result>
9458 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9459 </desc>
9460 <param name="name" type="wstring" dir="in">
9461 <desc>Name of the property to get.</desc>
9462 </param>
9463 <param name="value" type="wstring" dir="return">
9464 <desc>Current property value.</desc>
9465 </param>
9466 </method>
9467
9468 <method name="setProperty">
9469 <desc>
9470 Sets the value of the custom medium property with the given name.
9471
9472 The list of all properties supported by the given medium format can
9473 be obtained with <link to="IMediumFormat::describeProperties"/>.
9474
9475 Note that setting the property value to @c null or an empty string is
9476 equivalent to deleting the existing value. A default value (if it is
9477 defined for this property) will be used by the format backend in this
9478 case.
9479
9480 <result name="VBOX_E_OBJECT_NOT_FOUND">
9481 Requested property does not exist (not supported by the format).
9482 </result>
9483 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9484 </desc>
9485 <param name="name" type="wstring" dir="in">
9486 <desc>Name of the property to set.</desc>
9487 </param>
9488 <param name="value" type="wstring" dir="in">
9489 <desc>Property value to set.</desc>
9490 </param>
9491 </method>
9492
9493 <method name="getProperties">
9494 <desc>
9495 Returns values for a group of properties in one call.
9496
9497 The names of the properties to get are specified using the @a names
9498 argument which is a list of comma-separated property names or
9499 an empty string if all properties are to be returned. Note that currently
9500 the value of this argument is ignored and the method always returns all
9501 existing properties.
9502
9503 The list of all properties supported by the given medium format can
9504 be obtained with <link to="IMediumFormat::describeProperties"/>.
9505
9506 The method returns two arrays, the array of property names corresponding
9507 to the @a names argument and the current values of these properties.
9508 Both arrays have the same number of elements with each elemend at the
9509 given index in the first array corresponds to an element at the same
9510 index in the second array.
9511
9512 Note that for properties that do not have assigned values,
9513 an empty string is returned at the appropriate index in the
9514 @a returnValues array.
9515
9516 </desc>
9517 <param name="names" type="wstring" dir="in">
9518 <desc>
9519 Names of properties to get.
9520 </desc>
9521 </param>
9522 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9523 <desc>Names of returned properties.</desc>
9524 </param>
9525 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9526 <desc>Values of returned properties.</desc>
9527 </param>
9528 </method>
9529
9530 <method name="setProperties">
9531 <desc>
9532 Sets values for a group of properties in one call.
9533
9534 The names of the properties to set are passed in the @a names
9535 array along with the new values for them in the @a values array. Both
9536 arrays have the same number of elements with each elemend at the given
9537 index in the first array corresponding to an element at the same index
9538 in the second array.
9539
9540 If there is at least one property name in @a names that is not valid,
9541 the method will fail before changing the values of any other properties
9542 from the @a names array.
9543
9544 Using this method over <link to="#setProperty"/> is preferred if you
9545 need to set several properties at once since it will result into less
9546 IPC calls.
9547
9548 The list of all properties supported by the given medium format can
9549 be obtained with <link to="IMediumFormat::describeProperties"/>.
9550
9551 Note that setting the property value to @c null or an empty string is
9552 equivalent to deleting the existing value. A default value (if it is
9553 defined for this property) will be used by the format backend in this
9554 case.
9555 </desc>
9556 <param name="names" type="wstring" safearray="yes" dir="in">
9557 <desc>Names of properties to set.</desc>
9558 </param>
9559 <param name="values" type="wstring" safearray="yes" dir="in">
9560 <desc>Values of properties to set.</desc>
9561 </param>
9562 </method>
9563
9564 <!-- storage methods -->
9565
9566 <method name="createBaseStorage">
9567 <desc>
9568 Starts creating a hard disk storage unit (fixed/dynamic, according
9569 to the variant flags) in in the background. The previous storage unit
9570 created for this object, if any, must first be deleted using
9571 <link to="#deleteStorage"/>, otherwise the operation will fail.
9572
9573 Before the operation starts, the medium is placed in
9574 <link to="MediumState::Creating"/> state. If the create operation
9575 fails, the medium will be placed back in <link to="MediumState::NotCreated"/>
9576 state.
9577
9578 After the returned progress object reports that the operation has
9579 successfully completed, the medium state will be set to <link
9580 to="MediumState::Created"/>, the medium will be remembered by this
9581 VirtualBox installation and may be attached to virtual machines.
9582
9583 <result name="VBOX_E_NOT_SUPPORTED">
9584 The variant of storage creation operation is not supported. See <link
9585 to="IMediumFormat::capabilities"/>.
9586 </result>
9587 </desc>
9588 <param name="logicalSize" type="long long" dir="in">
9589 <desc>Maximum logical size of the medium in megabytes.</desc>
9590 </param>
9591 <param name="variant" type="MediumVariant" dir="in">
9592 <desc>Exact image variant which should be created.</desc>
9593 </param>
9594 <param name="progress" type="IProgress" dir="return">
9595 <desc>Progress object to track the operation completion.</desc>
9596 </param>
9597 </method>
9598
9599 <method name="deleteStorage">
9600 <desc>
9601 Starts deleting the storage unit of this medium.
9602
9603 The medium must not be attached to any known virtual machine and must
9604 not have any known child media, otherwise the operation will fail.
9605 It will also fail if there is no storage unit to delete or if deletion
9606 is already in progress, or if the medium is being in use (locked for
9607 read or for write) or inaccessible. Therefore, the only valid state for
9608 this operation to succeed is <link to="MediumState::Created"/>.
9609
9610 Before the operation starts, the medium is placed in
9611 <link to="MediumState::Deleting"/> state and gets removed from the list
9612 of remembered hard disks (media registry). If the delete operation
9613 fails, the medium will be remembered again and placed back to
9614 <link to="MediumState::Created"/> state.
9615
9616 After the returned progress object reports that the operation is
9617 complete, the medium state will be set to
9618 <link to="MediumState::NotCreated"/> and you will be able to use one of
9619 the storage creation methods to create it again.
9620
9621 <see>#close()</see>
9622
9623 <result name="VBOX_E_OBJECT_IN_USE">
9624 Medium is attached to a virtual machine.
9625 </result>
9626 <result name="VBOX_E_NOT_SUPPORTED">
9627 Storage deletion is not allowed because neither of storage creation
9628 operations are supported. See
9629 <link to="IMediumFormat::capabilities"/>.
9630 </result>
9631
9632 <note>
9633 If the deletion operation fails, it is not guaranteed that the storage
9634 unit still exists. You may check the <link to="IMedium::state"/> value
9635 to answer this question.
9636 </note>
9637 </desc>
9638 <param name="progress" type="IProgress" dir="return">
9639 <desc>Progress object to track the operation completion.</desc>
9640 </param>
9641 </method>
9642
9643 <!-- diff methods -->
9644
9645 <method name="createDiffStorage">
9646 <desc>
9647 Starts creating an empty differencing storage unit based on this
9648 medium in the format and at the location defined by the @a target
9649 argument.
9650
9651 The target medium must be in <link to="MediumState::NotCreated"/>
9652 state (i.e. must not have an existing storage unit). Upon successful
9653 completion, this operation will set the type of the target medium to
9654 <link to="MediumType::Normal"/> and create a storage unit necessary to
9655 represent the differencing medium data in the given format (according
9656 to the storage format of the target object).
9657
9658 After the returned progress object reports that the operation is
9659 successfully complete, the target medium gets remembered by this
9660 VirtualBox installation and may be attached to virtual machines.
9661
9662 <note>
9663 The medium will be set to <link to="MediumState::LockedRead"/>
9664 state for the duration of this operation.
9665 </note>
9666 <result name="VBOX_E_OBJECT_IN_USE">
9667 Medium not in @c NotCreated state.
9668 </result>
9669 </desc>
9670 <param name="target" type="IMedium" dir="in">
9671 <desc>Target medium.</desc>
9672 </param>
9673 <param name="variant" type="MediumVariant" dir="in">
9674 <desc>Exact image variant which should be created.</desc>
9675 </param>
9676 <param name="progress" type="IProgress" dir="return">
9677 <desc>Progress object to track the operation completion.</desc>
9678 </param>
9679 </method>
9680
9681 <method name="mergeTo">
9682 <desc>
9683 Starts merging the contents of this medium and all intermediate
9684 differencing media in the chain to the given target medium.
9685
9686 The target medium must be either a descendant of this medium or
9687 its ancestor (otherwise this method will immediately return a failure).
9688 It follows that there are two logical directions of the merge operation:
9689 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9690 ancestor (<i>backward merge</i>). Let us consider the following medium
9691 chain:
9692
9693 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9694
9695 Here, calling this method on the <tt>Base</tt> medium object with
9696 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9697 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9698 merge. Note that in both cases the contents of the resulting medium
9699 will be the same, the only difference is the medium object that takes
9700 the result of the merge operation. In case of the forward merge in the
9701 above example, the result will be written to <tt>Diff_2</tt>; in case of
9702 the backward merge, the result will be written to <tt>Base</tt>. In
9703 other words, the result of the operation is always stored in the target
9704 medium.
9705
9706 Upon successful operation completion, the storage units of all media in
9707 the chain between this (source) medium and the target medium, including
9708 the source medium itself, will be automatically deleted and the
9709 relevant medium objects (including this medium) will become
9710 uninitialized. This means that any attempt to call any of
9711 their methods or attributes will fail with the
9712 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9713 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9714 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> media.
9715 Note that <tt>Diff_2</tt> in this case will become a base medium
9716 itself since it will no longer be based on any other medium.
9717
9718 Considering the above, all of the following conditions must be met in
9719 order for the merge operation to succeed:
9720 <ul>
9721 <li>
9722 Neither this (source) medium nor any intermediate
9723 differencing medium in the chain between it and the target
9724 medium is attached to any virtual machine.
9725 </li>
9726 <li>
9727 Neither the source medium nor the target medium is an
9728 <link to="MediumType::Immutable"/> medium.
9729 </li>
9730 <li>
9731 The part of the medium tree from the source medium to the
9732 target medium is a linear chain, i.e. all medium in this
9733 chain have exactly one child which is the next medium in this
9734 chain. The only exception from this rule is the target medium in
9735 the forward merge operation; it is allowed to have any number of
9736 child media because the merge operation will not change its
9737 logical contents (as it is seen by the guest OS or by children).
9738 </li>
9739 <li>
9740 None of the involved media are in
9741 <link to="MediumState::LockedRead"/> or
9742 <link to="MediumState::LockedWrite"/> state.
9743 </li>
9744 </ul>
9745
9746 <note>
9747 This (source) medium and all intermediates will be placed to <link
9748 to="MediumState::Deleting"/> state and the target medium will be
9749 placed to <link to="MediumState::LockedWrite"/> state and for the
9750 duration of this operation.
9751 </note>
9752 </desc>
9753 <param name="target" type="IMedium" dir="in">
9754 <desc>Target medium.</desc>
9755 </param>
9756 <param name="progress" type="IProgress" dir="return">
9757 <desc>Progress object to track the operation completion.</desc>
9758 </param>
9759 </method>
9760
9761 <!-- clone method -->
9762
9763 <method name="cloneTo">
9764 <desc>
9765 Starts creating a clone of this medium in the format and at the
9766 location defined by the @a target argument.
9767
9768 The target medium must be either in <link to="MediumState::NotCreated"/>
9769 state (i.e. must not have an existing storage unit) or in
9770 <link to="MediumState::Created"/> state (i.e. created and not locked, and
9771 big enough to hold the data or else the copy will be partial). Upon
9772 successful completion, the cloned medium will contain exactly the
9773 same sector data as the medium being cloned, except that in the
9774 first case a new UUID for the clone will be randomly generated, and in
9775 the second case the UUID will remain unchanged.
9776
9777 The @a parent argument defines which medium will be the parent
9778 of the clone. Passing a @c null reference indicates that the clone will
9779 be a base image, i.e. completely independent. It is possible to specify
9780 an arbitrary medium for this parameter, including the parent of the
9781 medium which is being cloned. Even cloning to a child of the source
9782 medium is possible. Note that when cloning to an existing image, the
9783 @a parent irgument is ignored.
9784
9785 After the returned progress object reports that the operation is
9786 successfully complete, the target medium gets remembered by this
9787 VirtualBox installation and may be attached to virtual machines.
9788
9789 <note>
9790 This medium will be placed to <link to="MediumState::LockedRead"/>
9791 state for the duration of this operation.
9792 </note>
9793 <result name="E_NOTIMPL">
9794 The specified cloning variant is not supported at the moment.
9795 </result>
9796 </desc>
9797 <param name="target" type="IMedium" dir="in">
9798 <desc>Target medium.</desc>
9799 </param>
9800 <param name="variant" type="MediumVariant" dir="in">
9801 <desc>Exact image variant which should be created.</desc>
9802 </param>
9803 <param name="parent" type="IMedium" dir="in">
9804 <desc>Parent of the cloned medium.</desc>
9805 </param>
9806 <param name="progress" type="IProgress" dir="return">
9807 <desc>Progress object to track the operation completion.</desc>
9808 </param>
9809 </method>
9810
9811 <!-- other methods -->
9812
9813 <method name="compact">
9814 <desc>
9815 Starts compacting of this medium. This means that the medium is
9816 transformed into a possibly more compact storage representation.
9817 This potentially creates temporary images, which can require a
9818 substantial amount of additional disk space.
9819
9820 This medium will be placed to <link to="MediumState::LockedWrite"/>
9821 state and all its parent media (if any) will be placed to
9822 <link to="MediumState::LockedRead"/> state for the duration of this
9823 operation.
9824
9825 Please note that the results can be either returned straight away,
9826 or later as the result of the background operation via the object
9827 returned via the @a progress parameter.
9828
9829 <result name="VBOX_E_NOT_SUPPORTED">
9830 Medium format does not support compacting (but potentially
9831 needs it).
9832 </result>
9833 </desc>
9834 <param name="progress" type="IProgress" dir="return">
9835 <desc>Progress object to track the operation completion.</desc>
9836 </param>
9837 </method>
9838
9839 <method name="resize">
9840 <desc>
9841 Starts resizing this medium. This means that the nominal size of the
9842 medium is set to the new value. Both increasing and decreasing the
9843 size is possible, and there are no safety checks, since VirtualBox
9844 does not make any assumptions about the medium contents.
9845
9846 Resizing usually needs additional disk space, and possibly also
9847 some temporary disk space. Note that resize does not create a full
9848 temporary copy of the medium, so the additional disk space requirement
9849 is usually much lower than using the clone operation.
9850
9851 This medium will be placed to <link to="MediumState::LockedWrite"/>
9852 state for the duration of this operation.
9853
9854 Please note that the results can be either returned straight away,
9855 or later as the result of the background operation via the object
9856 returned via the @a progress parameter.
9857
9858 <result name="VBOX_E_NOT_SUPPORTED">
9859 Medium format does not support resizing.
9860 </result>
9861 </desc>
9862 <param name="logicalSize" type="long long" dir="in">
9863 <desc>New nominal capacity of the medium in megabytes.</desc>
9864 </param>
9865 <param name="progress" type="IProgress" dir="return">
9866 <desc>Progress object to track the operation completion.</desc>
9867 </param>
9868 </method>
9869
9870 <method name="reset">
9871 <desc>
9872 Starts erasing the contents of this differencing medium.
9873
9874 This operation will reset the differencing medium to its initial
9875 state when it does not contain any sector data and any read operation is
9876 redirected to its parent medium. This automatically gets called
9877 during VM power-up for every medium whose <link to="#autoReset" />
9878 attribute is @c true.
9879
9880 The medium will be write-locked for the duration of this operation (see
9881 <link to="#lockWrite" />).
9882
9883 <result name="VBOX_E_NOT_SUPPORTED">
9884 This is not a differencing medium.
9885 </result>
9886 <result name="VBOX_E_INVALID_OBJECT_STATE">
9887 Medium is not in <link to="MediumState::Created"/> or
9888 <link to="MediumState::Inaccessible"/> state.
9889 </result>
9890 </desc>
9891 <param name="progress" type="IProgress" dir="return">
9892 <desc>Progress object to track the operation completion.</desc>
9893 </param>
9894 </method>
9895
9896 </interface>
9897
9898
9899 <!--
9900 // IMediumFormat
9901 /////////////////////////////////////////////////////////////////////////
9902 -->
9903
9904 <enum
9905 name="DataType"
9906 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9907 >
9908 <const name="Int32" value="0"/>
9909 <const name="Int8" value="1"/>
9910 <const name="String" value="2"/>
9911 </enum>
9912
9913 <enum
9914 name="DataFlags"
9915 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9916 >
9917 <const name="None" value="0x00"/>
9918 <const name="Mandatory" value="0x01"/>
9919 <const name="Expert" value="0x02"/>
9920 <const name="Array" value="0x04"/>
9921 <const name="FlagMask" value="0x07"/>
9922 </enum>
9923
9924 <enum
9925 name="MediumFormatCapabilities"
9926 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
9927 >
9928 <desc>
9929 Medium format capability flags.
9930 </desc>
9931
9932 <const name="Uuid" value="0x01">
9933 <desc>
9934 Supports UUIDs as expected by VirtualBox code.
9935 </desc>
9936 </const>
9937
9938 <const name="CreateFixed" value="0x02">
9939 <desc>
9940 Supports creating fixed size images, allocating all space instantly.
9941 </desc>
9942 </const>
9943
9944 <const name="CreateDynamic" value="0x04">
9945 <desc>
9946 Supports creating dynamically growing images, allocating space on
9947 demand.
9948 </desc>
9949 </const>
9950
9951 <const name="CreateSplit2G" value="0x08">
9952 <desc>
9953 Supports creating images split in chunks of a bit less than 2 GBytes.
9954 </desc>
9955 </const>
9956
9957 <const name="Differencing" value="0x10">
9958 <desc>
9959 Supports being used as a format for differencing media (see <link
9960 to="IMedium::createDiffStorage"/>).
9961 </desc>
9962 </const>
9963
9964 <const name="Asynchronous" value="0x20">
9965 <desc>
9966 Supports asynchronous I/O operations for at least some configurations.
9967 </desc>
9968 </const>
9969
9970 <const name="File" value="0x40">
9971 <desc>
9972 The format backend operates on files (the <link to="IMedium::location"/>
9973 attribute of the medium specifies a file used to store medium
9974 data; for a list of supported file extensions see
9975 <link to="IMediumFormat::fileExtensions"/>).
9976 </desc>
9977 </const>
9978
9979 <const name="Properties" value="0x80">
9980 <desc>
9981 The format backend uses the property interface to configure the storage
9982 location and properties (the <link to="IMediumFormat::describeProperties"/>
9983 method is used to get access to properties supported by the given medium format).
9984 </desc>
9985 </const>
9986
9987 <const name="CapabilityMask" value="0xFF"/>
9988 </enum>
9989
9990 <interface
9991 name="IMediumFormat" extends="$unknown"
9992 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
9993 wsmap="managed"
9994 >
9995 <desc>
9996 The IMediumFormat interface represents a medium format.
9997
9998 Each medium format has an associated backend which is used to handle
9999 media stored in this format. This interface provides information
10000 about the properties of the associated backend.
10001
10002 Each medium format is identified by a string represented by the
10003 <link to="#id"/> attribute. This string is used in calls like
10004 <link to="IVirtualBox::createHardDisk"/> to specify the desired
10005 format.
10006
10007 The list of all supported medium formats can be obtained using
10008 <link to="ISystemProperties::mediumFormats"/>.
10009
10010 <see>IMedium</see>
10011 </desc>
10012
10013 <attribute name="id" type="wstring" readonly="yes">
10014 <desc>
10015 Identifier of this format.
10016
10017 The format identifier is a non-@c null non-empty ASCII string. Note that
10018 this string is case-insensitive. This means that, for example, all of
10019 the following strings:
10020 <pre>
10021 "VDI"
10022 "vdi"
10023 "VdI"</pre>
10024 refer to the same medium format.
10025
10026 This string is used in methods of other interfaces where it is necessary
10027 to specify a medium format, such as
10028 <link to="IVirtualBox::createHardDisk"/>.
10029 </desc>
10030 </attribute>
10031
10032 <attribute name="name" type="wstring" readonly="yes">
10033 <desc>
10034 Human readable description of this format.
10035
10036 Mainly for use in file open dialogs.
10037 </desc>
10038 </attribute>
10039
10040 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
10041 <desc>
10042 Array of strings containing the supported file extensions.
10043
10044 The first extension in the array is the extension preferred by the
10045 backend. It is recommended to use this extension when specifying a
10046 location of the storage unit for a new medium.
10047
10048 Note that some backends do not work on files, so this array may be
10049 empty.
10050
10051 <see>IMediumFormat::capabilities</see>
10052 </desc>
10053 </attribute>
10054
10055 <attribute name="capabilities" type="unsigned long" readonly="yes">
10056 <desc>
10057 Capabilities of the format as a set of bit flags.
10058
10059 For the meaning of individual capability flags see
10060 <link to="MediumFormatCapabilities"/>.
10061 </desc>
10062 </attribute>
10063
10064 <method name="describeProperties">
10065 <desc>
10066 Returns several arrays describing the properties supported by this
10067 format.
10068
10069 An element with the given index in each array describes one
10070 property. Thus, the number of elements in each returned array is the
10071 same and corresponds to the number of supported properties.
10072
10073 The returned arrays are filled in only if the
10074 <link to="MediumFormatCapabilities::Properties"/> flag is set.
10075 All arguments must be non-@c null.
10076
10077 <see>DataType</see>
10078 <see>DataFlags</see>
10079 </desc>
10080
10081 <param name="names" type="wstring" safearray="yes" dir="out">
10082 <desc>Array of property names.</desc>
10083 </param>
10084 <param name="description" type="wstring" safearray="yes" dir="out">
10085 <desc>Array of property descriptions.</desc>
10086 </param>
10087 <param name="types" type="DataType" safearray="yes" dir="out">
10088 <desc>Array of property types.</desc>
10089 </param>
10090 <param name="flags" type="unsigned long" safearray="yes" dir="out">
10091 <desc>Array of property flags.</desc>
10092 </param>
10093 <param name="defaults" type="wstring" safearray="yes" dir="out">
10094 <desc>Array of default property values.</desc>
10095 </param>
10096 </method>
10097
10098 </interface>
10099
10100
10101 <!--
10102 // IKeyboard
10103 /////////////////////////////////////////////////////////////////////////
10104 -->
10105
10106 <interface
10107 name="IKeyboard" extends="$unknown"
10108 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10109 wsmap="managed"
10110 >
10111 <desc>
10112 The IKeyboard interface represents the virtual machine's keyboard. Used
10113 in <link to="IConsole::keyboard"/>.
10114
10115 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10116 to the virtual machine.
10117
10118 </desc>
10119 <method name="putScancode">
10120 <desc>Sends a scancode to the keyboard.
10121
10122 <result name="VBOX_E_IPRT_ERROR">
10123 Could not send scan code to virtual keyboard.
10124 </result>
10125
10126 </desc>
10127 <param name="scancode" type="long" dir="in"/>
10128 </method>
10129
10130 <method name="putScancodes">
10131 <desc>Sends an array of scancodes to the keyboard.
10132
10133 <result name="VBOX_E_IPRT_ERROR">
10134 Could not send all scan codes to virtual keyboard.
10135 </result>
10136
10137 </desc>
10138 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10139 <param name="codesStored" type="unsigned long" dir="return"/>
10140 </method>
10141
10142 <method name="putCAD">
10143 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10144 function is nothing special, it is just a convenience function
10145 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10146
10147 <result name="VBOX_E_IPRT_ERROR">
10148 Could not send all scan codes to virtual keyboard.
10149 </result>
10150
10151 </desc>
10152 </method>
10153
10154 </interface>
10155
10156
10157 <!--
10158 // IMouse
10159 /////////////////////////////////////////////////////////////////////////
10160 -->
10161
10162 <enum
10163 name="MouseButtonState"
10164 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10165 >
10166 <desc>
10167 Mouse button state.
10168 </desc>
10169
10170 <const name="LeftButton" value="0x01"/>
10171 <const name="RightButton" value="0x02"/>
10172 <const name="MiddleButton" value="0x04"/>
10173 <const name="WheelUp" value="0x08"/>
10174 <const name="WheelDown" value="0x10"/>
10175 <const name="XButton1" value="0x20"/>
10176 <const name="XButton2" value="0x40"/>
10177 <const name="MouseStateMask" value="0x7F"/>
10178 </enum>
10179
10180 <interface
10181 name="IMouse" extends="$unknown"
10182 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
10183 wsmap="managed"
10184 >
10185 <desc>
10186 The IMouse interface represents the virtual machine's mouse. Used in
10187 <link to="IConsole::mouse"/>.
10188
10189 Through this interface, the virtual machine's virtual mouse can be
10190 controlled.
10191 </desc>
10192
10193 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10194 <desc>
10195 Whether the guest OS supports absolute mouse pointer positioning
10196 or not.
10197 <note>
10198 You can use the <link to="IMouseCapabilityChangedEvent"/>
10199 event to be instantly informed about changes of this attribute
10200 during virtual machine execution.
10201 </note>
10202 <see><link to="#putMouseEventAbsolute"/></see>
10203 </desc>
10204 </attribute>
10205
10206 <attribute name="relativeSupported" type="boolean" readonly="yes">
10207 <desc>
10208 Whether the guest OS supports relative mouse pointer positioning
10209 or not.
10210 <note>
10211 You can use the <link to="IMouseCapabilityChangedEvent"/>
10212 event to be instantly informed about changes of this attribute
10213 during virtual machine execution.
10214 </note>
10215 <see><link to="#putMouseEvent"/></see>
10216 </desc>
10217 </attribute>
10218
10219 <attribute name="needsHostCursor" type="boolean" readonly="yes">
10220 <desc>
10221 Whether the guest OS can currently switch to drawing it's own mouse
10222 cursor on demand.
10223 <note>
10224 You can use the <link to="IMouseCapabilityChangedEvent"/>
10225 event to be instantly informed about changes of this attribute
10226 during virtual machine execution.
10227 </note>
10228 <see><link to="#putMouseEvent"/></see>
10229 </desc>
10230 </attribute>
10231
10232 <method name="putMouseEvent">
10233 <desc>
10234 Initiates a mouse event using relative pointer movements
10235 along x and y axis.
10236
10237 <result name="E_ACCESSDENIED">
10238 Console not powered up.
10239 </result>
10240 <result name="VBOX_E_IPRT_ERROR">
10241 Could not send mouse event to virtual mouse.
10242 </result>
10243
10244 </desc>
10245
10246 <param name="dx" type="long" dir="in">
10247 <desc>
10248 Amount of pixels the mouse should move to the right.
10249 Negative values move the mouse to the left.
10250 </desc>
10251 </param>
10252 <param name="dy" type="long" dir="in">
10253 <desc>
10254 Amount of pixels the mouse should move downwards.
10255 Negative values move the mouse upwards.
10256 </desc>
10257 </param>
10258 <param name="dz" type="long" dir="in">
10259 <desc>
10260 Amount of mouse wheel moves.
10261 Positive values describe clockwise wheel rotations,
10262 negative values describe counterclockwise rotations.
10263 </desc>
10264 </param>
10265 <param name="dw" type="long" dir="in">
10266 <desc>
10267 Amount of horizontal mouse wheel moves.
10268 Positive values describe a movement to the left,
10269 negative values describe a movement to the right.
10270 </desc>
10271 </param>
10272 <param name="buttonState" type="long" dir="in">
10273 <desc>
10274 The current state of mouse buttons. Every bit represents
10275 a mouse button as follows:
10276 <table>
10277 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10278 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10279 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10280 </table>
10281 A value of <tt>1</tt> means the corresponding button is pressed.
10282 otherwise it is released.
10283 </desc>
10284 </param>
10285 </method>
10286
10287 <method name="putMouseEventAbsolute">
10288 <desc>
10289 Positions the mouse pointer using absolute x and y coordinates.
10290 These coordinates are expressed in pixels and
10291 start from <tt>[1,1]</tt> which corresponds to the top left
10292 corner of the virtual display.
10293
10294 <result name="E_ACCESSDENIED">
10295 Console not powered up.
10296 </result>
10297 <result name="VBOX_E_IPRT_ERROR">
10298 Could not send mouse event to virtual mouse.
10299 </result>
10300
10301 <note>
10302 This method will have effect only if absolute mouse
10303 positioning is supported by the guest OS.
10304 </note>
10305
10306 <see><link to="#absoluteSupported"/></see>
10307 </desc>
10308
10309 <param name="x" type="long" dir="in">
10310 <desc>
10311 X coordinate of the pointer in pixels, starting from @c 1.
10312 </desc>
10313 </param>
10314 <param name="y" type="long" dir="in">
10315 <desc>
10316 Y coordinate of the pointer in pixels, starting from @c 1.
10317 </desc>
10318 </param>
10319 <param name="dz" type="long" dir="in">
10320 <desc>
10321 Amount of mouse wheel moves.
10322 Positive values describe clockwise wheel rotations,
10323 negative values describe counterclockwise rotations.
10324 </desc>
10325 </param>
10326 <param name="dw" type="long" dir="in">
10327 <desc>
10328 Amount of horizontal mouse wheel moves.
10329 Positive values describe a movement to the left,
10330 negative values describe a movement to the right.
10331 </desc>
10332 </param>
10333 <param name="buttonState" type="long" dir="in">
10334 <desc>
10335 The current state of mouse buttons. Every bit represents
10336 a mouse button as follows:
10337 <table>
10338 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10339 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10340 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10341 </table>
10342 A value of @c 1 means the corresponding button is pressed.
10343 otherwise it is released.
10344 </desc>
10345 </param>
10346 </method>
10347
10348 </interface>
10349
10350 <!--
10351 // IDisplay
10352 /////////////////////////////////////////////////////////////////////////
10353 -->
10354
10355 <enum
10356 name="FramebufferPixelFormat"
10357 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10358 >
10359 <desc>
10360 Format of the video memory buffer. Constants represented by this enum can
10361 be used to test for particular values of <link
10362 to="IFramebuffer::pixelFormat"/>. See also <link
10363 to="IFramebuffer::requestResize"/>.
10364
10365 See also www.fourcc.org for more information about FOURCC pixel formats.
10366 </desc>
10367
10368 <const name="Opaque" value="0">
10369 <desc>
10370 Unknown buffer format (the user may not assume any particular format of
10371 the buffer).
10372 </desc>
10373 </const>
10374 <const name="FOURCC_RGB" value="0x32424752">
10375 <desc>
10376 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10377 bit layout).
10378 </desc>
10379 </const>
10380 </enum>
10381
10382 <interface
10383 name="IFramebuffer" extends="$unknown"
10384 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10385 wsmap="suppress"
10386 >
10387 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10388 <desc>Address of the start byte of the frame buffer.</desc>
10389 </attribute>
10390
10391 <attribute name="width" type="unsigned long" readonly="yes">
10392 <desc>Frame buffer width, in pixels.</desc>
10393 </attribute>
10394
10395 <attribute name="height" type="unsigned long" readonly="yes">
10396 <desc>Frame buffer height, in pixels.</desc>
10397 </attribute>
10398
10399 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10400 <desc>
10401 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10402 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, valid values
10403 are: 8, 15, 16, 24 and 32.
10404 </desc>
10405 </attribute>
10406
10407 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10408 <desc>
10409 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10410 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, the
10411 size of the scan line must be aligned to 32 bits.
10412 </desc>
10413 </attribute>
10414
10415 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10416 <desc>
10417 Frame buffer pixel format. It's either one of the values defined by <link
10418 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10419 <note>
10420 This attribute must never return <link
10421 to="FramebufferPixelFormat::Opaque"/> -- the format of the buffer
10422 <link to="#address"/> points to must be always known.
10423 </note>
10424 </desc>
10425 </attribute>
10426
10427 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10428 <desc>
10429 Defines whether this frame buffer uses the virtual video card's memory
10430 buffer (guest VRAM) directly or not. See <link
10431 to="IFramebuffer::requestResize"/> for more information.
10432 </desc>
10433 </attribute>
10434
10435 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10436 <desc>
10437 Hint from the frame buffer about how much of the standard
10438 screen height it wants to use for itself. This information is
10439 exposed to the guest through the VESA BIOS and VMMDev interface
10440 so that it can use it for determining its video mode table. It
10441 is not guaranteed that the guest respects the value.
10442 </desc>
10443 </attribute>
10444
10445 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10446 <desc>
10447 An alpha-blended overlay which is superposed over the frame buffer.
10448 The initial purpose is to allow the display of icons providing
10449 information about the VM state, including disk activity, in front
10450 ends which do not have other means of doing that. The overlay is
10451 designed to controlled exclusively by IDisplay. It has no locking
10452 of its own, and any changes made to it are not guaranteed to be
10453 visible until the affected portion of IFramebuffer is updated. The
10454 overlay can be created lazily the first time it is requested. This
10455 attribute can also return @c null to signal that the overlay is not
10456 implemented.
10457 </desc>
10458 </attribute>
10459
10460 <attribute name="winId" type="long long" readonly="yes">
10461 <desc>
10462 Platform-dependent identifier of the window where context of this
10463 frame buffer is drawn, or zero if there's no such window.
10464 </desc>
10465 </attribute>
10466
10467 <method name="lock">
10468 <desc>
10469 Locks the frame buffer.
10470 Gets called by the IDisplay object where this frame buffer is
10471 bound to.
10472 </desc>
10473 </method>
10474
10475 <method name="unlock">
10476 <desc>
10477 Unlocks the frame buffer.
10478 Gets called by the IDisplay object where this frame buffer is
10479 bound to.
10480 </desc>
10481 </method>
10482
10483 <method name="notifyUpdate">
10484 <desc>
10485 Informs about an update.
10486 Gets called by the display object where this buffer is
10487 registered.
10488 </desc>
10489 <param name="x" type="unsigned long" dir="in"/>
10490 <param name="y" type="unsigned long" dir="in"/>
10491 <param name="width" type="unsigned long" dir="in"/>
10492 <param name="height" type="unsigned long" dir="in"/>
10493 </method>
10494
10495 <method name="requestResize">
10496 <desc>
10497 Requests a size and pixel format change.
10498
10499 There are two modes of working with the video buffer of the virtual
10500 machine. The <i>indirect</i> mode implies that the IFramebuffer
10501 implementation allocates a memory buffer for the requested display mode
10502 and provides it to the virtual machine. In <i>direct</i> mode, the
10503 IFramebuffer implementation uses the memory buffer allocated and owned
10504 by the virtual machine. This buffer represents the video memory of the
10505 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10506 usually faster because the implementation gets a raw pointer to the
10507 guest VRAM buffer which it can directly use for visualizing the contents
10508 of the virtual display, as opposed to the indirect mode where the
10509 contents of guest VRAM are copied to the memory buffer provided by
10510 the implementation every time a display update occurs.
10511
10512 It is important to note that the direct mode is really fast only when
10513 the implementation uses the given guest VRAM buffer directly, for
10514 example, by blitting it to the window representing the virtual machine's
10515 display, which saves at least one copy operation comparing to the
10516 indirect mode. However, using the guest VRAM buffer directly is not
10517 always possible: the format and the color depth of this buffer may be
10518 not supported by the target window, or it may be unknown (opaque) as in
10519 case of text or non-linear multi-plane VGA video modes. In this case,
10520 the indirect mode (that is always available) should be used as a
10521 fallback: when the guest VRAM contents are copied to the
10522 implementation-provided memory buffer, color and format conversion is
10523 done automatically by the underlying code.
10524
10525 The @a pixelFormat parameter defines whether the direct mode is
10526 available or not. If @a pixelFormat is <link
10527 to="FramebufferPixelFormat::Opaque"/> then direct access to the guest
10528 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10529 @a bytesPerLine parameters must be ignored and the implementation must use
10530 the indirect mode (where it provides its own buffer in one of the
10531 supported formats). In all other cases, @a pixelFormat together with
10532 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10533 buffer pointed to by the @a VRAM parameter and the implementation is
10534 free to choose which mode to use. To indicate that this frame buffer uses
10535 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10536 attribute must return @c true and <link to="#address"/> must
10537 return exactly the same address that is passed in the @a VRAM parameter
10538 of this method; otherwise it is assumed that the indirect strategy is
10539 chosen.
10540
10541 The @a width and @a height parameters represent the size of the
10542 requested display mode in both modes. In case of indirect mode, the
10543 provided memory buffer should be big enough to store data of the given
10544 display mode. In case of direct mode, it is guaranteed that the given
10545 @a VRAM buffer contains enough space to represent the display mode of the
10546 given size. Note that this frame buffer's <link to="#width"/> and <link
10547 to="#height"/> attributes must return exactly the same values as
10548 passed to this method after the resize is completed (see below).
10549
10550 The @a finished output parameter determines if the implementation has
10551 finished resizing the frame buffer or not. If, for some reason, the
10552 resize cannot be finished immediately during this call, @a finished
10553 must be set to @c false, and the implementation must call
10554 <link to="IDisplay::resizeCompleted"/> after it has returned from
10555 this method as soon as possible. If @a finished is @c false, the
10556 machine will not call any frame buffer methods until
10557 <link to="IDisplay::resizeCompleted"/> is called.
10558
10559 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10560 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10561 this frame buffer must return exactly the same values as specified in the
10562 parameters of this method, after the resize is completed. If the
10563 indirect mode is chosen, these attributes must return values describing
10564 the format of the implementation's own memory buffer <link
10565 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10566 value must always correlate with <link to="#pixelFormat"/>. Note that
10567 the <link to="#pixelFormat"/> attribute must never return <link
10568 to="FramebufferPixelFormat::Opaque"/> regardless of the selected mode.
10569
10570 <note>
10571 This method is called by the IDisplay object under the
10572 <link to="#lock"/> provided by this IFramebuffer
10573 implementation. If this method returns @c false in @a finished, then
10574 this lock is not released until
10575 <link to="IDisplay::resizeCompleted"/> is called.
10576 </note>
10577 </desc>
10578 <param name="screenId" type="unsigned long" dir="in">
10579 <desc>
10580 Logical screen number. Must be used in the corresponding call to
10581 <link to="IDisplay::resizeCompleted"/> if this call is made.
10582 </desc>
10583 </param>
10584 <param name="pixelFormat" type="unsigned long" dir="in">
10585 <desc>
10586 Pixel format of the memory buffer pointed to by @a VRAM.
10587 See also <link to="FramebufferPixelFormat"/>.
10588 </desc>
10589 </param>
10590 <param name="VRAM" type="octet" mod="ptr" dir="in">
10591 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10592 </param>
10593 <param name="bitsPerPixel" type="unsigned long" dir="in">
10594 <desc>Color depth, bits per pixel.</desc>
10595 </param>
10596 <param name="bytesPerLine" type="unsigned long" dir="in">
10597 <desc>Size of one scan line, in bytes.</desc>
10598 </param>
10599 <param name="width" type="unsigned long" dir="in">
10600 <desc>Width of the guest display, in pixels.</desc>
10601 </param>
10602 <param name="height" type="unsigned long" dir="in">
10603 <desc>Height of the guest display, in pixels.</desc>
10604 </param>
10605 <param name="finished" type="boolean" dir="return">
10606 <desc>
10607 Can the VM start using the new frame buffer immediately
10608 after this method returns or it should wait for
10609 <link to="IDisplay::resizeCompleted"/>.
10610 </desc>
10611 </param>
10612 </method>
10613
10614 <method name="videoModeSupported">
10615 <desc>
10616 Returns whether the frame buffer implementation is willing to
10617 support a given video mode. In case it is not able to render
10618 the video mode (or for some reason not willing), it should
10619 return @c false. Usually this method is called when the guest
10620 asks the VMM device whether a given video mode is supported
10621 so the information returned is directly exposed to the guest.
10622 It is important that this method returns very quickly.
10623 </desc>
10624 <param name="width" type="unsigned long" dir="in"/>
10625 <param name="height" type="unsigned long" dir="in"/>
10626 <param name="bpp" type="unsigned long" dir="in"/>
10627 <param name="supported" type="boolean" dir="return"/>
10628 </method>
10629
10630 <method name="getVisibleRegion">
10631 <desc>
10632 Returns the visible region of this frame buffer.
10633
10634 If the @a rectangles parameter is @c null then the value of the
10635 @a count parameter is ignored and the number of elements necessary to
10636 describe the current visible region is returned in @a countCopied.
10637
10638 If @a rectangles is not @c null but @a count is less
10639 than the required number of elements to store region data, the method
10640 will report a failure. If @a count is equal or greater than the
10641 required number of elements, then the actual number of elements copied
10642 to the provided array will be returned in @a countCopied.
10643
10644 <note>
10645 The address of the provided array must be in the process space of
10646 this IFramebuffer object.
10647 </note>
10648 <note>
10649 Method not yet implemented.
10650 </note>
10651 </desc>
10652 <param name="rectangles" type="octet" mod="ptr" dir="in">
10653 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10654 </param>
10655 <param name="count" type="unsigned long" dir="in">
10656 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10657 </param>
10658 <param name="countCopied" type="unsigned long" dir="return">
10659 <desc>Number of elements copied to the @a rectangles array.</desc>
10660 </param>
10661 </method>
10662
10663 <method name="setVisibleRegion">
10664 <desc>
10665 Suggests a new visible region to this frame buffer. This region
10666 represents the area of the VM display which is a union of regions of
10667 all top-level windows of the guest operating system running inside the
10668 VM (if the Guest Additions for this system support this
10669 functionality). This information may be used by the frontends to
10670 implement the seamless desktop integration feature.
10671
10672 <note>
10673 The address of the provided array must be in the process space of
10674 this IFramebuffer object.
10675 </note>
10676 <note>
10677 The IFramebuffer implementation must make a copy of the provided
10678 array of rectangles.
10679 </note>
10680 <note>
10681 Method not yet implemented.
10682 </note>
10683 </desc>
10684 <param name="rectangles" type="octet" mod="ptr" dir="in">
10685 <desc>Pointer to the @c RTRECT array.</desc>
10686 </param>
10687 <param name="count" type="unsigned long" dir="in">
10688 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10689 </param>
10690 </method>
10691
10692 <method name="processVHWACommand">
10693 <desc>
10694 Posts a Video HW Acceleration Command to the frame buffer for processing.
10695 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10696 are posted from quest to the host to be processed by the host hardware.
10697
10698 <note>
10699 The address of the provided command must be in the process space of
10700 this IFramebuffer object.
10701 </note>
10702 </desc>
10703
10704 <param name="command" type="octet" mod="ptr" dir="in">
10705 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10706 </param>
10707 </method>
10708
10709 </interface>
10710
10711 <interface
10712 name="IFramebufferOverlay" extends="IFramebuffer"
10713 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10714 wsmap="suppress"
10715 >
10716 <desc>
10717 The IFramebufferOverlay interface represents an alpha blended overlay
10718 for displaying status icons above an IFramebuffer. It is always created
10719 not visible, so that it must be explicitly shown. It only covers a
10720 portion of the IFramebuffer, determined by its width, height and
10721 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10722 that order) format, and may be written to directly. Do re-read the
10723 width though, after setting it, as it may be adjusted (increased) to
10724 make it more suitable for the front end.
10725 </desc>
10726 <attribute name="x" type="unsigned long" readonly="yes">
10727 <desc>X position of the overlay, relative to the frame buffer.</desc>
10728 </attribute>
10729
10730 <attribute name="y" type="unsigned long" readonly="yes">
10731 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10732 </attribute>
10733
10734 <attribute name="visible" type="boolean" readonly="no">
10735 <desc>
10736 Whether the overlay is currently visible.
10737 </desc>
10738 </attribute>
10739
10740 <attribute name="alpha" type="unsigned long" readonly="no">
10741 <desc>
10742 The global alpha value for the overlay. This may or may not be
10743 supported by a given front end.
10744 </desc>
10745 </attribute>
10746
10747 <method name="move">
10748 <desc>
10749 Changes the overlay's position relative to the IFramebuffer.
10750 </desc>
10751 <param name="x" type="unsigned long" dir="in"/>
10752 <param name="y" type="unsigned long" dir="in"/>
10753 </method>
10754
10755 </interface>
10756
10757 <interface
10758 name="IDisplay" extends="$unknown"
10759 uuid="09EED313-CD56-4D06-BD56-FAC0F716B5DD"
10760 wsmap="managed"
10761 >
10762 <desc>
10763 The IDisplay interface represents the virtual machine's display.
10764
10765 The object implementing this interface is contained in each
10766 <link to="IConsole::display"/> attribute and represents the visual
10767 output of the virtual machine.
10768
10769 The virtual display supports pluggable output targets represented by the
10770 IFramebuffer interface. Examples of the output target are a window on
10771 the host computer or an RDP session's display on a remote computer.
10772 </desc>
10773 <method name="getScreenResolution">
10774 <desc>Queries display width, height and color depth for given screen.</desc>
10775 <param name="screenId" type="unsigned long" dir="in"/>
10776 <param name="width" type="unsigned long" dir="out"/>
10777 <param name="height" type="unsigned long" dir="out"/>
10778 <param name="bitsPerPixel" type="unsigned long" dir="out"/>
10779 </method>
10780
10781 <method name="setFramebuffer">
10782 <desc>
10783 Sets the framebuffer for given screen.
10784 </desc>
10785 <param name="screenId" type="unsigned long" dir="in"/>
10786 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10787 </method>
10788
10789 <method name="getFramebuffer">
10790 <desc>
10791 Queries the framebuffer for given screen.
10792 </desc>
10793 <param name="screenId" type="unsigned long" dir="in"/>
10794 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10795 <param name="xOrigin" type="long" dir="out"/>
10796 <param name="yOrigin" type="long" dir="out"/>
10797 </method>
10798
10799 <method name="setVideoModeHint">
10800 <desc>
10801 Asks VirtualBox to request the given video mode from
10802 the guest. This is just a hint and it cannot be guaranteed
10803 that the requested resolution will be used. Guest Additions
10804 are required for the request to be seen by guests. The caller
10805 should issue the request and wait for a resolution change and
10806 after a timeout retry.
10807
10808 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10809 parameters means that the corresponding values should be taken from the
10810 current video mode (i.e. left unchanged).
10811
10812 If the guest OS supports multi-monitor configuration then the @a display
10813 parameter specifies the number of the guest display to send the hint to:
10814 @c 0 is the primary display, @c 1 is the first secondary and
10815 so on. If the multi-monitor configuration is not supported, @a display
10816 must be @c 0.
10817
10818 <result name="E_INVALIDARG">
10819 The @a display is not associated with any monitor.
10820 </result>
10821
10822 </desc>
10823 <param name="width" type="unsigned long" dir="in"/>
10824 <param name="height" type="unsigned long" dir="in"/>
10825 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10826 <param name="display" type="unsigned long" dir="in"/>
10827 </method>
10828
10829 <method name="setSeamlessMode">
10830 <desc>
10831 Enables or disables seamless guest display rendering (seamless desktop
10832 integration) mode.
10833 <note>
10834 Calling this method has no effect if <link
10835 to="IGuest::supportsSeamless"/> returns @c false.
10836 </note>
10837 </desc>
10838 <param name="enabled" type="boolean" dir="in"/>
10839 </method>
10840
10841 <method name="takeScreenShot">
10842 <desc>
10843 Takes a screen shot of the requested size and copies it to the
10844 32-bpp buffer allocated by the caller and pointed to by @a address.
10845 A pixel consists of 4 bytes in order: B, G, R, 0.
10846
10847 <note>This API can be used only by the COM/XPCOM C++ API as it
10848 requires pointer support. Use <link to="#takeScreenShotToArray" />
10849 with other language bindings.
10850 </note>
10851
10852 <result name="E_NOTIMPL">
10853 Feature not implemented.
10854 </result>
10855 <result name="VBOX_E_IPRT_ERROR">
10856 Could not take a screenshot.
10857 </result>
10858
10859 </desc>
10860 <param name="screenId" type="unsigned long" dir="in"/>
10861 <param name="address" type="octet" mod="ptr" dir="in"/>
10862 <param name="width" type="unsigned long" dir="in"/>
10863 <param name="height" type="unsigned long" dir="in"/>
10864 </method>
10865
10866 <method name="takeScreenShotToArray">
10867 <desc>
10868 Takes a guest screen shot of the requested size and returns it as
10869 an array of bytes in uncompressed 32-bit RGBA format.
10870 A pixel consists of 4 bytes in order: R, G, B, 0xFF.
10871
10872 This API is slow, but could be the only option to get guest screenshot
10873 for scriptable languages not allowed to manipulate with addresses
10874 directly.
10875
10876 <result name="E_NOTIMPL">
10877 Feature not implemented.
10878 </result>
10879 <result name="VBOX_E_IPRT_ERROR">
10880 Could not take a screenshot.
10881 </result>
10882 </desc>
10883 <param name="screenId" type="unsigned long" dir="in">
10884 <desc>
10885 Monitor to take screenshot from.
10886 </desc>
10887 </param>
10888 <param name="width" type="unsigned long" dir="in">
10889 <desc>
10890 Desired image width.
10891 </desc>
10892 </param>
10893 <param name="height" type="unsigned long" dir="in">
10894 <desc>
10895 Desired image height.
10896 </desc>
10897 </param>
10898 <param name="screenData" type="octet" dir="return" safearray="yes">
10899 <desc>
10900 Array with resulting screen data.
10901 </desc>
10902 </param>
10903 </method>
10904
10905 <method name="takeScreenShotPNGToArray">
10906 <desc>
10907 Takes a guest screen shot of the requested size and returns it as
10908 PNG image in array.
10909
10910 <result name="E_NOTIMPL">
10911 Feature not implemented.
10912 </result>
10913 <result name="VBOX_E_IPRT_ERROR">
10914 Could not take a screenshot.
10915 </result>
10916 </desc>
10917 <param name="screenId" type="unsigned long" dir="in">
10918 <desc>
10919 Monitor to take screenshot from.
10920 </desc>
10921 </param>
10922 <param name="width" type="unsigned long" dir="in">
10923 <desc>
10924 Desired image width.
10925 </desc>
10926 </param>
10927 <param name="height" type="unsigned long" dir="in">
10928 <desc>
10929 Desired image height.
10930 </desc>
10931 </param>
10932 <param name="screenData" type="octet" dir="return" safearray="yes">
10933 <desc>
10934 Array with resulting screen data.
10935 </desc>
10936 </param>
10937 </method>
10938
10939 <method name="drawToScreen">
10940 <desc>
10941 Draws a 32-bpp image of the specified size from the given buffer
10942 to the given point on the VM display.
10943
10944 <result name="E_NOTIMPL">
10945 Feature not implemented.
10946 </result>
10947 <result name="VBOX_E_IPRT_ERROR">
10948 Could not draw to screen.
10949 </result>
10950
10951 </desc>
10952 <param name="screenId" type="unsigned long" dir="in"/>
10953 <param name="address" type="octet" mod="ptr" dir="in"/>
10954 <param name="x" type="unsigned long" dir="in">
10955 <desc>Relative to the screen top left corner.</desc>
10956 </param>
10957 <param name="y" type="unsigned long" dir="in">
10958 <desc>Relative to the screen top left corner.</desc>
10959 </param>
10960 <param name="width" type="unsigned long" dir="in"/>
10961 <param name="height" type="unsigned long" dir="in"/>
10962 </method>
10963
10964 <method name="invalidateAndUpdate">
10965 <desc>
10966 Does a full invalidation of the VM display and instructs the VM
10967 to update it.
10968
10969 <result name="VBOX_E_IPRT_ERROR">
10970 Could not invalidate and update screen.
10971 </result>
10972
10973 </desc>
10974 </method>
10975
10976 <method name="resizeCompleted">
10977 <desc>
10978 Signals that a framebuffer has completed the resize operation.
10979
10980 <result name="VBOX_E_NOT_SUPPORTED">
10981 Operation only valid for external frame buffers.
10982 </result>
10983
10984 </desc>
10985 <param name="screenId" type="unsigned long" dir="in"/>
10986 </method>
10987
10988 <method name="completeVHWACommand">
10989 <desc>
10990 Signals that the Video HW Acceleration command has completed.
10991 </desc>
10992
10993 <param name="command" type="octet" mod="ptr" dir="in">
10994 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
10995 </param>
10996 </method>
10997
10998 </interface>
10999
11000 <!--
11001 // INetworkAdapter
11002 /////////////////////////////////////////////////////////////////////////
11003 -->
11004
11005 <enum
11006 name="NetworkAttachmentType"
11007 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
11008 >
11009 <desc>
11010 Network attachment type.
11011 </desc>
11012
11013 <const name="Null" value="0">
11014 <desc>Null value, also means "not attached".</desc>
11015 </const>
11016 <const name="NAT" value="1"/>
11017 <const name="Bridged" value="2"/>
11018 <const name="Internal" value="3"/>
11019 <const name="HostOnly" value="4"/>
11020 <const name="VDE" value="5"/>
11021 </enum>
11022
11023 <enum
11024 name="NetworkAdapterType"
11025 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
11026 >
11027 <desc>
11028 Network adapter type.
11029 </desc>
11030
11031 <const name="Null" value="0">
11032 <desc>Null value (never used by the API).</desc>
11033 </const>
11034 <const name="Am79C970A" value="1">
11035 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
11036 </const>
11037 <const name="Am79C973" value="2">
11038 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
11039 </const>
11040 <const name="I82540EM" value="3">
11041 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
11042 </const>
11043 <const name="I82543GC" value="4">
11044 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
11045 </const>
11046 <const name="I82545EM" value="5">
11047 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
11048 </const>
11049 <const name="Virtio" value="6">
11050 <desc>Virtio network device.</desc>
11051 </const>
11052 </enum>
11053
11054 <interface
11055 name="INetworkAdapter" extends="$unknown"
11056 uuid="9bf58a46-c3f7-4f31-80fa-dde9a5dc0b7b"
11057 wsmap="managed"
11058 >
11059 <desc>
11060 Represents a virtual network adapter that is attached to a virtual machine.
11061 Each virtual machine has a fixed number of network adapter slots with one
11062 instance of this attached to each of them. Call
11063 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
11064 is attached to a given slot in a given machine.
11065
11066 Each network adapter can be in one of five attachment modes, which are
11067 represented by the <link to="NetworkAttachmentType" /> enumeration;
11068 see the <link to="#attachmentType" /> attribute.
11069 </desc>
11070
11071 <attribute name="adapterType" type="NetworkAdapterType">
11072 <desc>
11073 Type of the virtual network adapter. Depending on this value,
11074 VirtualBox will provide a different virtual network hardware
11075 to the guest.
11076 </desc>
11077 </attribute>
11078
11079 <attribute name="slot" type="unsigned long" readonly="yes">
11080 <desc>
11081 Slot number this adapter is plugged into. Corresponds to
11082 the value you pass to <link to="IMachine::getNetworkAdapter"/>
11083 to obtain this instance.
11084 </desc>
11085 </attribute>
11086
11087 <attribute name="enabled" type="boolean">
11088 <desc>
11089 Flag whether the network adapter is present in the
11090 guest system. If disabled, the virtual guest hardware will
11091 not contain this network adapter. Can only be changed when
11092 the VM is not running.
11093 </desc>
11094 </attribute>
11095
11096 <attribute name="MACAddress" type="wstring">
11097 <desc>
11098 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
11099 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
11100 </desc>
11101 </attribute>
11102
11103 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
11104
11105 <attribute name="hostInterface" type="wstring">
11106 <desc>
11107 Name of the host network interface the VM is attached to.
11108 </desc>
11109 </attribute>
11110
11111 <attribute name="internalNetwork" type="wstring">
11112 <desc>
11113 Name of the internal network the VM is attached to.
11114 </desc>
11115 </attribute>
11116
11117 <attribute name="NATNetwork" type="wstring">
11118 <desc>
11119 Name of the NAT network the VM is attached to.
11120 </desc>
11121 </attribute>
11122
11123 <attribute name="VDENetwork" type="wstring">
11124 <desc>
11125 Name of the VDE switch the VM is attached to.
11126 </desc>
11127 </attribute>
11128
11129 <attribute name="cableConnected" type="boolean">
11130 <desc>
11131 Flag whether the adapter reports the cable as connected or not.
11132 It can be used to report offline situations to a VM.
11133 </desc>
11134 </attribute>
11135
11136 <attribute name="lineSpeed" type="unsigned long">
11137 <desc>
11138 Line speed reported by custom drivers, in units of 1 kbps.
11139 </desc>
11140 </attribute>
11141
11142 <attribute name="traceEnabled" type="boolean">
11143 <desc>
11144 Flag whether network traffic from/to the network card should be traced.
11145 Can only be toggled when the VM is turned off.
11146 </desc>
11147 </attribute>
11148
11149 <attribute name="traceFile" type="wstring">
11150 <desc>
11151 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11152 will be used.
11153 </desc>
11154 </attribute>
11155
11156 <attribute name="natDriver" type="INATEngine" readonly="yes">
11157 <desc>
11158 Points to the NAT engine which handles the network address translation
11159 for this interface. This is active only when the interface actually uses
11160 NAT (see <link to="#attachToNAT" />).
11161 </desc>
11162 </attribute>
11163
11164 <attribute name="bootPriority" type="unsigned long">
11165 <desc>
11166 Network boot priority of the adapter. Priority 1 is highest. If not set,
11167 the priority is considered to be at the lowest possible setting.
11168 </desc>
11169 </attribute>
11170
11171 <attribute name="bandwidthLimit" type="unsigned long">
11172 <desc>
11173 Maximum throughput allowed for this network adapter, in units of 1 mbps.
11174 A zero value means uncapped/unlimited.
11175 </desc>
11176 </attribute>
11177
11178 <method name="attachToNAT">
11179 <desc>
11180 Attach the network adapter to the Network Address Translation (NAT) interface.
11181 </desc>
11182 </method>
11183
11184 <method name="attachToBridgedInterface">
11185 <desc>
11186 Attach the network adapter to a bridged host interface.
11187 </desc>
11188 </method>
11189
11190 <method name="attachToInternalNetwork">
11191 <desc>
11192 Attach the network adapter to an internal network.
11193 </desc>
11194 </method>
11195
11196 <method name="attachToHostOnlyInterface">
11197 <desc>
11198 Attach the network adapter to the host-only network.
11199 </desc>
11200 </method>
11201
11202 <method name="attachToVDE">
11203 <desc>
11204 Attach the network adapter to a VDE network.
11205 </desc>
11206 </method>
11207
11208 <method name="detach">
11209 <desc>
11210 Detach the network adapter
11211 </desc>
11212 </method>
11213 </interface>
11214
11215
11216 <!--
11217 // ISerialPort
11218 /////////////////////////////////////////////////////////////////////////
11219 -->
11220
11221 <enum
11222 name="PortMode"
11223 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11224 >
11225 <desc>
11226 The PortMode enumeration represents possible communication modes for
11227 the virtual serial port device.
11228 </desc>
11229
11230 <const name="Disconnected" value="0">
11231 <desc>Virtual device is not attached to any real host device.</desc>
11232 </const>
11233 <const name="HostPipe" value="1">
11234 <desc>Virtual device is attached to a host pipe.</desc>
11235 </const>
11236 <const name="HostDevice" value="2">
11237 <desc>Virtual device is attached to a host device.</desc>
11238 </const>
11239 <const name="RawFile" value="3">
11240 <desc>Virtual device is attached to a raw file.</desc>
11241 </const>
11242 </enum>
11243
11244 <interface
11245 name="ISerialPort" extends="$unknown"
11246 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11247 wsmap="managed"
11248 >
11249
11250 <desc>
11251 The ISerialPort interface represents the virtual serial port device.
11252
11253 The virtual serial port device acts like an ordinary serial port
11254 inside the virtual machine. This device communicates to the real
11255 serial port hardware in one of two modes: host pipe or host device.
11256
11257 In host pipe mode, the #path attribute specifies the path to the pipe on
11258 the host computer that represents a serial port. The #server attribute
11259 determines if this pipe is created by the virtual machine process at
11260 machine startup or it must already exist before starting machine
11261 execution.
11262
11263 In host device mode, the #path attribute specifies the name of the
11264 serial port device on the host computer.
11265
11266 There is also a third communication mode: the disconnected mode. In this
11267 mode, the guest OS running inside the virtual machine will be able to
11268 detect the serial port, but all port write operations will be discarded
11269 and all port read operations will return no data.
11270
11271 <see>IMachine::getSerialPort</see>
11272 </desc>
11273
11274 <attribute name="slot" type="unsigned long" readonly="yes">
11275 <desc>
11276 Slot number this serial port is plugged into. Corresponds to
11277 the value you pass to <link to="IMachine::getSerialPort"/>
11278 to obtain this instance.
11279 </desc>
11280 </attribute>
11281
11282 <attribute name="enabled" type="boolean">
11283 <desc>
11284 Flag whether the serial port is enabled. If disabled,
11285 the serial port will not be reported to the guest OS.
11286 </desc>
11287 </attribute>
11288
11289 <attribute name="IOBase" type="unsigned long">
11290 <desc>Base I/O address of the serial port.</desc>
11291 </attribute>
11292
11293 <attribute name="IRQ" type="unsigned long">
11294 <desc>IRQ number of the serial port.</desc>
11295 </attribute>
11296
11297 <attribute name="hostMode" type="PortMode">
11298 <desc>
11299 How is this port connected to the host.
11300 <note>
11301 Changing this attribute may fail if the conditions for
11302 <link to="#path"/> are not met.
11303 </note>
11304 </desc>
11305 </attribute>
11306
11307 <attribute name="server" type="boolean">
11308 <desc>
11309 Flag whether this serial port acts as a server (creates a new pipe on
11310 the host) or as a client (uses the existing pipe). This attribute is
11311 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11312 </desc>
11313 </attribute>
11314
11315 <attribute name="path" type="wstring">
11316 <desc>
11317 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11318 PortMode_HostPipe, or the host serial device name when
11319 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11320 cases, setting a @c null or empty string as the attribute's value
11321 is an error. Otherwise, the value of this property is ignored.
11322 </desc>
11323 </attribute>
11324
11325 </interface>
11326
11327 <!--
11328 // IParallelPort
11329 /////////////////////////////////////////////////////////////////////////
11330 -->
11331
11332 <interface
11333 name="IParallelPort" extends="$unknown"
11334 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11335 wsmap="managed"
11336 >
11337
11338 <desc>
11339 The IParallelPort interface represents the virtual parallel port device.
11340
11341 The virtual parallel port device acts like an ordinary parallel port
11342 inside the virtual machine. This device communicates to the real
11343 parallel port hardware using the name of the parallel device on the host
11344 computer specified in the #path attribute.
11345
11346 Each virtual parallel port device is assigned a base I/O address and an
11347 IRQ number that will be reported to the guest operating system and used
11348 to operate the given parallel port from within the virtual machine.
11349
11350 <see>IMachine::getParallelPort</see>
11351 </desc>
11352
11353 <attribute name="slot" type="unsigned long" readonly="yes">
11354 <desc>
11355 Slot number this parallel port is plugged into. Corresponds to
11356 the value you pass to <link to="IMachine::getParallelPort"/>
11357 to obtain this instance.
11358 </desc>
11359 </attribute>
11360
11361 <attribute name="enabled" type="boolean">
11362 <desc>
11363 Flag whether the parallel port is enabled. If disabled,
11364 the parallel port will not be reported to the guest OS.
11365 </desc>
11366 </attribute>
11367
11368 <attribute name="IOBase" type="unsigned long">
11369 <desc>Base I/O address of the parallel port.</desc>
11370 </attribute>
11371
11372 <attribute name="IRQ" type="unsigned long">
11373 <desc>IRQ number of the parallel port.</desc>
11374 </attribute>
11375
11376 <attribute name="path" type="wstring">
11377 <desc>
11378 Host parallel device name. If this parallel port is enabled, setting a
11379 @c null or an empty string as this attribute's value will result into
11380 an error.
11381 </desc>
11382 </attribute>
11383
11384 </interface>
11385
11386
11387 <!--
11388 // IMachineDebugger
11389 /////////////////////////////////////////////////////////////////////////
11390 -->
11391
11392 <interface
11393 name="IMachineDebugger" extends="$unknown"
11394 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11395 wsmap="suppress"
11396 >
11397 <method name="resetStats">
11398 <desc>
11399 Reset VM statistics.
11400 </desc>
11401 <param name="pattern" type="wstring" dir="in">
11402 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11403 </param>
11404 </method>
11405
11406 <method name="dumpStats">
11407 <desc>
11408 Dumps VM statistics.
11409 </desc>
11410 <param name="pattern" type="wstring" dir="in">
11411 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11412 </param>
11413 </method>
11414
11415 <method name="getStats">
11416 <desc>
11417 Get the VM statistics in a XMLish format.
11418 </desc>
11419 <param name="pattern" type="wstring" dir="in">
11420 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11421 </param>
11422 <param name="withDescriptions" type="boolean" dir="in">
11423 <desc>Whether to include the descriptions.</desc>
11424 </param>
11425 <param name="stats" type="wstring" dir="out">
11426 <desc>The XML document containing the statistics.</desc>
11427 </param>
11428 </method>
11429
11430 <method name="injectNMI">
11431 <desc>
11432 Inject an NMI into a running VT-x/AMD-V VM.
11433 </desc>
11434 </method>
11435
11436 <attribute name="singlestep" type="boolean">
11437 <desc>Switch for enabling singlestepping.</desc>
11438 </attribute>
11439
11440 <attribute name="recompileUser" type="boolean">
11441 <desc>Switch for forcing code recompilation for user mode code.</desc>
11442 </attribute>
11443
11444 <attribute name="recompileSupervisor" type="boolean">
11445 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11446 </attribute>
11447
11448 <attribute name="PATMEnabled" type="boolean">
11449 <desc>Switch for enabling and disabling the PATM component.</desc>
11450 </attribute>
11451
11452 <attribute name="CSAMEnabled" type="boolean">
11453 <desc>Switch for enabling and disabling the CSAM component.</desc>
11454 </attribute>
11455
11456 <attribute name="logEnabled" type="boolean">
11457 <desc>Switch for enabling and disabling logging.</desc>
11458 </attribute>
11459
11460 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11461 <desc>
11462 Flag indicating whether the VM is currently making use of CPU hardware
11463 virtualization extensions.
11464 </desc>
11465 </attribute>
11466
11467 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11468 <desc>
11469 Flag indicating whether the VM is currently making use of the nested paging
11470 CPU hardware virtualization extension.
11471 </desc>
11472 </attribute>
11473
11474 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11475 <desc>
11476 Flag indicating whether the VM is currently making use of the VPID
11477 VT-x extension.
11478 </desc>
11479 </attribute>
11480
11481 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11482 <desc>
11483 Flag indicating whether the VM is currently making use of the Physical
11484 Address Extension CPU feature.
11485 </desc>
11486 </attribute>
11487
11488 <attribute name="virtualTimeRate" type="unsigned long">
11489 <desc>
11490 The rate at which the virtual time runs expressed as a percentage.
11491 The accepted range is 2% to 20000%.
11492 </desc>
11493 </attribute>
11494
11495 <!-- @todo method for setting log flags, groups and destination! -->
11496
11497 <attribute name="VM" type="long long" readonly="yes">
11498 <desc>
11499 Gets the VM handle. This is only for internal use while
11500 we carve the details of this interface.
11501 </desc>
11502 </attribute>
11503
11504 </interface>
11505
11506 <!--
11507 // IUSBController
11508 /////////////////////////////////////////////////////////////////////////
11509 -->
11510
11511 <interface
11512 name="IUSBController" extends="$unknown"
11513 uuid="6fdcccc5-abd3-4fec-9387-2ad3914fc4a8"
11514 wsmap="managed"
11515 >
11516 <attribute name="enabled" type="boolean">
11517 <desc>
11518 Flag whether the USB controller is present in the
11519 guest system. If disabled, the virtual guest hardware will
11520 not contain any USB controller. Can only be changed when
11521 the VM is powered off.
11522 </desc>
11523 </attribute>
11524
11525 <attribute name="enabledEhci" type="boolean">
11526 <desc>
11527 Flag whether the USB EHCI controller is present in the
11528 guest system. If disabled, the virtual guest hardware will
11529 not contain a USB EHCI controller. Can only be changed when
11530 the VM is powered off.
11531 </desc>
11532 </attribute>
11533
11534 <attribute name="proxyAvailable" type="boolean" readonly="yes">
11535 <desc>
11536 Flag whether there is an USB proxy available.
11537 </desc>
11538 </attribute>
11539
11540 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11541 <desc>
11542 USB standard version which the controller implements.
11543 This is a BCD which means that the major version is in the
11544 high byte and minor version is in the low byte.
11545 </desc>
11546 </attribute>
11547
11548 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11549 <desc>
11550 List of USB device filters associated with the machine.
11551
11552 If the machine is currently running, these filters are activated
11553 every time a new (supported) USB device is attached to the host
11554 computer that was not ignored by global filters
11555 (<link to="IHost::USBDeviceFilters"/>).
11556
11557 These filters are also activated when the machine is powered up.
11558 They are run against a list of all currently available USB
11559 devices (in states
11560 <link to="USBDeviceState::Available"/>,
11561 <link to="USBDeviceState::Busy"/>,
11562 <link to="USBDeviceState::Held"/>) that were not previously
11563 ignored by global filters.
11564
11565 If at least one filter matches the USB device in question, this
11566 device is automatically captured (attached to) the virtual USB
11567 controller of this machine.
11568
11569 <see>IUSBDeviceFilter, ::IUSBController</see>
11570 </desc>
11571 </attribute>
11572
11573 <method name="createDeviceFilter">
11574 <desc>
11575 Creates a new USB device filter. All attributes except
11576 the filter name are set to empty (any match),
11577 <i>active</i> is @c false (the filter is not active).
11578
11579 The created filter can then be added to the list of filters using
11580 <link to="#insertDeviceFilter"/>.
11581
11582 <result name="VBOX_E_INVALID_VM_STATE">
11583 The virtual machine is not mutable.
11584 </result>
11585
11586 <see>#deviceFilters</see>
11587 </desc>
11588 <param name="name" type="wstring" dir="in">
11589 <desc>
11590 Filter name. See <link to="IUSBDeviceFilter::name"/>
11591 for more info.
11592 </desc>
11593 </param>
11594 <param name="filter" type="IUSBDeviceFilter" dir="return">
11595 <desc>Created filter object.</desc>
11596 </param>
11597 </method>
11598
11599 <method name="insertDeviceFilter">
11600 <desc>
11601 Inserts the given USB device to the specified position
11602 in the list of filters.
11603
11604 Positions are numbered starting from <tt>0</tt>. If the specified
11605 position is equal to or greater than the number of elements in
11606 the list, the filter is added to the end of the collection.
11607
11608 <note>
11609 Duplicates are not allowed, so an attempt to insert a
11610 filter that is already in the collection, will return an
11611 error.
11612 </note>
11613
11614 <result name="VBOX_E_INVALID_VM_STATE">
11615 Virtual machine is not mutable.
11616 </result>
11617 <result name="E_INVALIDARG">
11618 USB device filter not created within this VirtualBox instance.
11619 </result>
11620 <result name="VBOX_E_INVALID_OBJECT_STATE">
11621 USB device filter already in list.
11622 </result>
11623
11624 <see>#deviceFilters</see>
11625 </desc>
11626 <param name="position" type="unsigned long" dir="in">
11627 <desc>Position to insert the filter to.</desc>
11628 </param>
11629 <param name="filter" type="IUSBDeviceFilter" dir="in">
11630 <desc>USB device filter to insert.</desc>
11631 </param>
11632 </method>
11633
11634 <method name="removeDeviceFilter">
11635 <desc>
11636 Removes a USB device filter from the specified position in the
11637 list of filters.
11638
11639 Positions are numbered starting from <tt>0</tt>. Specifying a
11640 position equal to or greater than the number of elements in
11641 the list will produce an error.
11642
11643 <see>#deviceFilters</see>
11644
11645 <result name="VBOX_E_INVALID_VM_STATE">
11646 Virtual machine is not mutable.
11647 </result>
11648 <result name="E_INVALIDARG">
11649 USB device filter list empty or invalid @a position.
11650 </result>
11651
11652 </desc>
11653 <param name="position" type="unsigned long" dir="in">
11654 <desc>Position to remove the filter from.</desc>
11655 </param>
11656 <param name="filter" type="IUSBDeviceFilter" dir="return">
11657 <desc>Removed USB device filter.</desc>
11658 </param>
11659 </method>
11660
11661 </interface>
11662
11663
11664 <!--
11665 // IUSBDevice
11666 /////////////////////////////////////////////////////////////////////////
11667 -->
11668
11669 <interface
11670 name="IUSBDevice" extends="$unknown"
11671 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11672 wsmap="managed"
11673 >
11674 <desc>
11675 The IUSBDevice interface represents a virtual USB device attached to the
11676 virtual machine.
11677
11678 A collection of objects implementing this interface is stored in the
11679 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11680 attached to a running virtual machine's USB controller.
11681 </desc>
11682
11683 <attribute name="id" type="uuid" mod="string" readonly="yes">
11684 <desc>
11685 Unique USB device ID. This ID is built from #vendorId,
11686 #productId, #revision and #serialNumber.
11687 </desc>
11688 </attribute>
11689
11690 <attribute name="vendorId" type="unsigned short" readonly="yes">
11691 <desc>Vendor ID.</desc>
11692 </attribute>
11693
11694 <attribute name="productId" type="unsigned short" readonly="yes">
11695 <desc>Product ID.</desc>
11696 </attribute>
11697
11698 <attribute name="revision" type="unsigned short" readonly="yes">
11699 <desc>
11700 Product revision number. This is a packed BCD represented as
11701 unsigned short. The high byte is the integer part and the low
11702 byte is the decimal.
11703 </desc>
11704 </attribute>
11705
11706 <attribute name="manufacturer" type="wstring" readonly="yes">
11707 <desc>Manufacturer string.</desc>
11708 </attribute>
11709
11710 <attribute name="product" type="wstring" readonly="yes">
11711 <desc>Product string.</desc>
11712 </attribute>
11713
11714 <attribute name="serialNumber" type="wstring" readonly="yes">
11715 <desc>Serial number string.</desc>
11716 </attribute>
11717
11718 <attribute name="address" type="wstring" readonly="yes">
11719 <desc>Host specific address of the device.</desc>
11720 </attribute>
11721
11722 <attribute name="port" type="unsigned short" readonly="yes">
11723 <desc>
11724 Host USB port number the device is physically
11725 connected to.
11726 </desc>
11727 </attribute>
11728
11729 <attribute name="version" type="unsigned short" readonly="yes">
11730 <desc>
11731 The major USB version of the device - 1 or 2.
11732 </desc>
11733 </attribute>
11734
11735 <attribute name="portVersion" type="unsigned short" readonly="yes">
11736 <desc>
11737 The major USB version of the host USB port the device is
11738 physically connected to - 1 or 2. For devices not connected to
11739 anything this will have the same value as the version attribute.
11740 </desc>
11741 </attribute>
11742
11743 <attribute name="remote" type="boolean" readonly="yes">
11744 <desc>
11745 Whether the device is physically connected to a remote VRDP
11746 client or to a local host machine.
11747 </desc>
11748 </attribute>
11749
11750 </interface>
11751
11752
11753 <!--
11754 // IUSBDeviceFilter
11755 /////////////////////////////////////////////////////////////////////////
11756 -->
11757
11758 <interface
11759 name="IUSBDeviceFilter" extends="$unknown"
11760 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11761 wsmap="managed"
11762 >
11763 <desc>
11764 The IUSBDeviceFilter interface represents an USB device filter used
11765 to perform actions on a group of USB devices.
11766
11767 This type of filters is used by running virtual machines to
11768 automatically capture selected USB devices once they are physically
11769 attached to the host computer.
11770
11771 A USB device is matched to the given device filter if and only if all
11772 attributes of the device match the corresponding attributes of the
11773 filter (that is, attributes are joined together using the logical AND
11774 operation). On the other hand, all together, filters in the list of
11775 filters carry the semantics of the logical OR operation. So if it is
11776 desirable to create a match like "this vendor id OR this product id",
11777 one needs to create two filters and specify "any match" (see below)
11778 for unused attributes.
11779
11780 All filter attributes used for matching are strings. Each string
11781 is an expression representing a set of values of the corresponding
11782 device attribute, that will match the given filter. Currently, the
11783 following filtering expressions are supported:
11784
11785 <ul>
11786 <li><i>Interval filters</i>. Used to specify valid intervals for
11787 integer device attributes (Vendor ID, Product ID and Revision).
11788 The format of the string is:
11789
11790 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11791
11792 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11793 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11794 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11795 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11796 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11797 possible integer is assumed.
11798 </li>
11799 <li><i>Boolean filters</i>. Used to specify acceptable values for
11800 boolean device attributes. The format of the string is:
11801
11802 <tt>true|false|yes|no|0|1</tt>
11803
11804 </li>
11805 <li><i>Exact match</i>. Used to specify a single value for the given
11806 device attribute. Any string that doesn't start with <tt>int:</tt>
11807 represents the exact match. String device attributes are compared to
11808 this string including case of symbols. Integer attributes are first
11809 converted to a string (see individual filter attributes) and then
11810 compared ignoring case.
11811
11812 </li>
11813 <li><i>Any match</i>. Any value of the corresponding device attribute
11814 will match the given filter. An empty or @c null string is
11815 used to construct this type of filtering expressions.
11816
11817 </li>
11818 </ul>
11819
11820 <note>
11821 On the Windows host platform, interval filters are not currently
11822 available. Also all string filter attributes
11823 (<link to="#manufacturer"/>, <link to="#product"/>,
11824 <link to="#serialNumber"/>) are ignored, so they behave as
11825 <i>any match</i> no matter what string expression is specified.
11826 </note>
11827
11828 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11829 </desc>
11830
11831 <attribute name="name" type="wstring">
11832 <desc>
11833 Visible name for this filter.
11834 This name is used to visually distinguish one filter from another,
11835 so it can neither be @c null nor an empty string.
11836 </desc>
11837 </attribute>
11838
11839 <attribute name="active" type="boolean">
11840 <desc>Whether this filter active or has been temporarily disabled.</desc>
11841 </attribute>
11842
11843 <attribute name="vendorId" type="wstring">
11844 <desc>
11845 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11846 The string representation for the <i>exact matching</i>
11847 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11848 (including leading zeroes).
11849 </desc>
11850 </attribute>
11851
11852 <attribute name="productId" type="wstring">
11853 <desc>
11854 <link to="IUSBDevice::productId">Product ID</link> filter.
11855 The string representation for the <i>exact matching</i>
11856 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11857 (including leading zeroes).
11858 </desc>
11859 </attribute>
11860
11861 <attribute name="revision" type="wstring">
11862 <desc>
11863 <link to="IUSBDevice::productId">Product revision number</link>
11864 filter. The string representation for the <i>exact matching</i>
11865 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11866 of the integer part of the revision, and <tt>F</tt> is the
11867 decimal digit of its fractional part (including leading and
11868 trailing zeros).
11869 Note that for interval filters, it's best to use the hexadecimal
11870 form, because the revision is stored as a 16 bit packed BCD value;
11871 so the expression <tt>int:0x0100-0x0199</tt> will match any
11872 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11873 </desc>
11874 </attribute>
11875
11876 <attribute name="manufacturer" type="wstring">
11877 <desc>
11878 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11879 </desc>
11880 </attribute>
11881
11882 <attribute name="product" type="wstring">
11883 <desc>
11884 <link to="IUSBDevice::product">Product</link> filter.
11885 </desc>
11886 </attribute>
11887
11888 <attribute name="serialNumber" type="wstring">
11889 <desc>
11890 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11891 </desc>
11892 </attribute>
11893
11894 <attribute name="port" type="wstring">
11895 <desc>
11896 <link to="IUSBDevice::port">Host USB port</link> filter.
11897 </desc>
11898 </attribute>
11899
11900 <attribute name="remote" type="wstring">
11901 <desc>
11902 <link to="IUSBDevice::remote">Remote state</link> filter.
11903 <note>
11904 This filter makes sense only for machine USB filters,
11905 i.e. it is ignored by IHostUSBDeviceFilter objects.
11906 </note>
11907 </desc>
11908 </attribute>
11909
11910 <attribute name="maskedInterfaces" type="unsigned long">
11911 <desc>
11912 This is an advanced option for hiding one or more USB interfaces
11913 from the guest. The value is a bit mask where the bits that are set
11914 means the corresponding USB interface should be hidden, masked off
11915 if you like.
11916 This feature only works on Linux hosts.
11917 </desc>
11918 </attribute>
11919
11920 </interface>
11921
11922
11923 <!--
11924 // IHostUSBDevice
11925 /////////////////////////////////////////////////////////////////////////
11926 -->
11927
11928 <enum
11929 name="USBDeviceState"
11930 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11931 >
11932 <desc>
11933 USB device state. This enumeration represents all possible states
11934 of the USB device physically attached to the host computer regarding
11935 its state on the host computer and availability to guest computers
11936 (all currently running virtual machines).
11937
11938 Once a supported USB device is attached to the host, global USB
11939 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11940 either ignore the device, or put it to USBDeviceState_Held state, or do
11941 nothing. Unless the device is ignored by global filters, filters of all
11942 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11943 activated that can put it to USBDeviceState_Captured state.
11944
11945 If the device was ignored by global filters, or didn't match
11946 any filters at all (including guest ones), it is handled by the host
11947 in a normal way. In this case, the device state is determined by
11948 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11949 or USBDeviceState_Available, depending on the current device usage.
11950
11951 Besides auto-capturing based on filters, the device can be manually
11952 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11953 state is USBDeviceState_Busy, USBDeviceState_Available or
11954 USBDeviceState_Held.
11955
11956 <note>
11957 Due to differences in USB stack implementations in Linux and Win32,
11958 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11959 only to the Linux version of the product. This also means that (<link
11960 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11961 device state is USBDeviceState_Held.
11962 </note>
11963
11964 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11965 </desc>
11966
11967 <const name="NotSupported" value="0">
11968 <desc>
11969 Not supported by the VirtualBox server, not available to guests.
11970 </desc>
11971 </const>
11972 <const name="Unavailable" value="1">
11973 <desc>
11974 Being used by the host computer exclusively,
11975 not available to guests.
11976 </desc>
11977 </const>
11978 <const name="Busy" value="2">
11979 <desc>
11980 Being used by the host computer, potentially available to guests.
11981 </desc>
11982 </const>
11983 <const name="Available" value="3">
11984 <desc>
11985 Not used by the host computer, available to guests (the host computer
11986 can also start using the device at any time).
11987 </desc>
11988 </const>
11989 <const name="Held" value="4">
11990 <desc>
11991 Held by the VirtualBox server (ignored by the host computer),
11992 available to guests.
11993 </desc>
11994 </const>
11995 <const name="Captured" value="5">
11996 <desc>
11997 Captured by one of the guest computers, not available
11998 to anybody else.
11999 </desc>
12000 </const>
12001 </enum>
12002
12003 <interface
12004 name="IHostUSBDevice" extends="IUSBDevice"
12005 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
12006 wsmap="managed"
12007 >
12008 <desc>
12009 The IHostUSBDevice interface represents a physical USB device attached
12010 to the host computer.
12011
12012 Besides properties inherited from IUSBDevice, this interface adds the
12013 <link to="#state"/> property that holds the current state of the USB
12014 device.
12015
12016 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
12017 </desc>
12018
12019 <attribute name="state" type="USBDeviceState" readonly="yes">
12020 <desc>
12021 Current state of the device.
12022 </desc>
12023 </attribute>
12024
12025 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
12026
12027 </interface>
12028
12029
12030 <!--
12031 // IHostUSBDeviceFilter
12032 /////////////////////////////////////////////////////////////////////////
12033 -->
12034
12035 <enum
12036 name="USBDeviceFilterAction"
12037 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
12038 >
12039 <desc>
12040 Actions for host USB device filters.
12041 <see>IHostUSBDeviceFilter, USBDeviceState</see>
12042 </desc>
12043
12044 <const name="Null" value="0">
12045 <desc>Null value (never used by the API).</desc>
12046 </const>
12047 <const name="Ignore" value="1">
12048 <desc>Ignore the matched USB device.</desc>
12049 </const>
12050 <const name="Hold" value="2">
12051 <desc>Hold the matched USB device.</desc>
12052 </const>
12053 </enum>
12054
12055 <interface
12056 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
12057 uuid="4cc70246-d74a-400f-8222-3900489c0374"
12058 wsmap="managed"
12059 >
12060 <desc>
12061 The IHostUSBDeviceFilter interface represents a global filter for a
12062 physical USB device used by the host computer. Used indirectly in
12063 <link to="IHost::USBDeviceFilters"/>.
12064
12065 Using filters of this type, the host computer determines the initial
12066 state of the USB device after it is physically attached to the
12067 host's USB controller.
12068
12069 <note>
12070 The <link to="IUSBDeviceFilter::remote"/> attribute is ignored by this type of
12071 filters, because it makes sense only for
12072 <link to="IUSBController::deviceFilters">machine USB filters</link>.
12073 </note>
12074
12075 <see>IHost::USBDeviceFilters</see>
12076 </desc>
12077
12078 <attribute name="action" type="USBDeviceFilterAction">
12079 <desc>
12080 Action performed by the host when an attached USB device
12081 matches this filter.
12082 </desc>
12083 </attribute>
12084
12085 </interface>
12086
12087 <!--
12088 // IAudioAdapter
12089 /////////////////////////////////////////////////////////////////////////
12090 -->
12091
12092 <enum
12093 name="AudioDriverType"
12094 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
12095 >
12096 <desc>
12097 Host audio driver type.
12098 </desc>
12099
12100 <const name="Null" value="0">
12101 <desc>Null value, also means "dummy audio driver".</desc>
12102 </const>
12103 <const name="WinMM" value="1">
12104 <desc>Windows multimedia (Windows hosts only).</desc>
12105 </const>
12106 <const name="OSS" value="2">
12107 <desc>Open Sound System (Linux hosts only).</desc>
12108 </const>
12109 <const name="ALSA" value="3">
12110 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
12111 </const>
12112 <const name="DirectSound" value="4">
12113 <desc>DirectSound (Windows hosts only).</desc>
12114 </const>
12115 <const name="CoreAudio" value="5">
12116 <desc>CoreAudio (Mac hosts only).</desc>
12117 </const>
12118 <const name="MMPM" value="6">
12119 <desc>Reserved for historical reasons.</desc>
12120 </const>
12121 <const name="Pulse" value="7">
12122 <desc>PulseAudio (Linux hosts only).</desc>
12123 </const>
12124 <const name="SolAudio" value="8">
12125 <desc>Solaris audio (Solaris hosts only).</desc>
12126 </const>
12127 </enum>
12128
12129 <enum
12130 name="AudioControllerType"
12131 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
12132 >
12133 <desc>
12134 Virtual audio controller type.
12135 </desc>
12136
12137 <const name="AC97" value="0"/>
12138 <const name="SB16" value="1"/>
12139 <const name="HDA" value="2"/>
12140 </enum>
12141
12142 <interface
12143 name="IAudioAdapter" extends="$unknown"
12144 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
12145 wsmap="managed"
12146 >
12147 <desc>
12148 The IAudioAdapter interface represents the virtual audio adapter of
12149 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
12150 </desc>
12151 <attribute name="enabled" type="boolean">
12152 <desc>
12153 Flag whether the audio adapter is present in the
12154 guest system. If disabled, the virtual guest hardware will
12155 not contain any audio adapter. Can only be changed when
12156 the VM is not running.
12157 </desc>
12158 </attribute>
12159 <attribute name="audioController" type="AudioControllerType">
12160 <desc>
12161 The audio hardware we emulate.
12162 </desc>
12163 </attribute>
12164 <attribute name="audioDriver" type="AudioDriverType">
12165 <desc>
12166 Audio driver the adapter is connected to. This setting
12167 can only be changed when the VM is not running.
12168 </desc>
12169 </attribute>
12170 </interface>
12171
12172 <!--
12173 // IVRDPServer
12174 /////////////////////////////////////////////////////////////////////////
12175 -->
12176
12177 <enum
12178 name="VRDPAuthType"
12179 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
12180 >
12181 <desc>
12182 VRDP authentication type.
12183 </desc>
12184
12185 <const name="Null" value="0">
12186 <desc>Null value, also means "no authentication".</desc>
12187 </const>
12188 <const name="External" value="1"/>
12189 <const name="Guest" value="2"/>
12190 </enum>
12191
12192 <interface
12193 name="IVRDPServer" extends="$unknown"
12194 uuid="7aeeb530-0b08-41fe-835d-9be9ec1dbe5c"
12195 wsmap="managed"
12196 >
12197 <attribute name="enabled" type="boolean">
12198 <desc>VRDP server status.</desc>
12199 </attribute>
12200
12201 <attribute name="ports" type="wstring">
12202 <desc>
12203 VRDP server port numbers. The server will try to bind to one of free ports from the list.
12204 <note>
12205 This is a string of comma separated TCP port numbers or port number ranges.
12206 Example <tt>5000,5010-5012,5015</tt>
12207 </note>
12208 </desc>
12209 </attribute>
12210
12211 <attribute name="netAddress" type="wstring">
12212 <desc>VRDP server address.</desc>
12213 </attribute>
12214
12215 <attribute name="authType" type="VRDPAuthType">
12216 <desc>VRDP authentication method.</desc>
12217 </attribute>
12218
12219 <attribute name="authTimeout" type="unsigned long">
12220 <desc>Timeout for guest authentication. Milliseconds.</desc>
12221 </attribute>
12222
12223 <attribute name="allowMultiConnection" type="boolean">
12224 <desc>
12225 Flag whether multiple simultaneous connections to the VM are permitted.
12226 Note that this will be replaced by a more powerful mechanism in the future.
12227 </desc>
12228 </attribute>
12229
12230 <attribute name="reuseSingleConnection" type="boolean">
12231 <desc>
12232 Flag whether the existing connection must be dropped and a new connection
12233 must be established by the VRDP server, when a new client connects in single
12234 connection mode.
12235 </desc>
12236 </attribute>
12237
12238 <attribute name="videoChannel" type="boolean">
12239 <desc>
12240 Flag whether RDP video channel is supported.
12241 </desc>
12242 </attribute>
12243
12244 <attribute name="videoChannelQuality" type="unsigned long">
12245 <desc>
12246 Image quality in percents.
12247 </desc>
12248 </attribute>
12249
12250 </interface>
12251
12252
12253 <!--
12254 // ISharedFolder
12255 /////////////////////////////////////////////////////////////////////////
12256 -->
12257
12258 <interface
12259 name="ISharedFolder" extends="$unknown"
12260 uuid="8388da11-b559-4574-a5b7-2bd7acd5cef8"
12261 wsmap="struct"
12262 >
12263 <desc>
12264 The ISharedFolder interface represents a folder in the host computer's
12265 file system accessible from the guest OS running inside a virtual
12266 machine using an associated logical name.
12267
12268 There are three types of shared folders:
12269 <ul>
12270 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12271 folders available to all virtual machines.</li>
12272 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12273 VM-specific shared folders available to the given virtual machine at
12274 startup.</li>
12275 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12276 VM-specific shared folders created in the session context (for
12277 example, when the virtual machine is running) and automatically
12278 discarded when the session is closed (the VM is powered off).</li>
12279 </ul>
12280
12281 Logical names of shared folders must be unique within the given scope
12282 (global, permanent or transient). However, they do not need to be unique
12283 across scopes. In this case, the definition of the shared folder in a
12284 more specific scope takes precedence over definitions in all other
12285 scopes. The order of precedence is (more specific to more general):
12286 <ol>
12287 <li>Transient definitions</li>
12288 <li>Permanent definitions</li>
12289 <li>Global definitions</li>
12290 </ol>
12291
12292 For example, if MyMachine has a shared folder named
12293 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12294 transient shared folder named <tt>C_DRIVE</tt> (that points
12295 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12296 of <tt>C_DRIVE</tt> in the guest OS so
12297 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12298 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12299 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12300 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12301 to <tt>C:\\</tt> if it still exists.
12302
12303 Note that permanent and transient shared folders of different machines
12304 are in different name spaces, so they don't overlap and don't need to
12305 have unique logical names.
12306
12307 <note>
12308 Global shared folders are not implemented in the current version of the
12309 product.
12310 </note>
12311 </desc>
12312
12313 <attribute name="name" type="wstring" readonly="yes">
12314 <desc>Logical name of the shared folder.</desc>
12315 </attribute>
12316
12317 <attribute name="hostPath" type="wstring" readonly="yes">
12318 <desc>Full path to the shared folder in the host file system.</desc>
12319 </attribute>
12320
12321 <attribute name="accessible" type="boolean" readonly="yes">
12322 <desc>
12323 Whether the folder defined by the host path is currently
12324 accessible or not.
12325 For example, the folder can be unaccessible if it is placed
12326 on the network share that is not available by the time
12327 this property is read.
12328 </desc>
12329 </attribute>
12330
12331 <attribute name="writable" type="boolean" readonly="yes">
12332 <desc>
12333 Whether the folder defined by the host path is writable or
12334 not.
12335 </desc>
12336 </attribute>
12337
12338 <attribute name="autoMount" type="boolean" readonly="yes">
12339 <desc>
12340 Whether the folder gets automatically mounted by the guest or not.
12341 </desc>
12342 </attribute>
12343
12344 <attribute name="lastAccessError" type="wstring" readonly="yes">
12345 <desc>
12346 Text message that represents the result of the last accessibility
12347 check.
12348
12349 Accessibility checks are performed each time the <link to="#accessible"/>
12350 attribute is read. An empty string is returned if the last
12351 accessibility check was successful. A non-empty string indicates a
12352 failure and should normally describe a reason of the failure (for
12353 example, a file read error).
12354 </desc>
12355 </attribute>
12356
12357 </interface>
12358
12359 <!--
12360 // ISession
12361 /////////////////////////////////////////////////////////////////////////
12362 -->
12363
12364 <interface
12365 name="IInternalSessionControl" extends="$unknown"
12366 uuid="ef059f1d-2273-4f81-9342-c152a0d2cd40"
12367 internal="yes"
12368 wsmap="suppress"
12369 >
12370 <method name="getPID">
12371 <desc>PID of the process that has created this Session object.
12372 </desc>
12373 <param name="pid" type="unsigned long" dir="return"/>
12374 </method>
12375
12376 <method name="getRemoteConsole">
12377 <desc>
12378 Returns the console object suitable for remote control.
12379
12380 <result name="VBOX_E_INVALID_VM_STATE">
12381 Session state prevents operation.
12382 </result>
12383 <result name="VBOX_E_INVALID_OBJECT_STATE">
12384 Session type prevents operation.
12385 </result>
12386
12387 </desc>
12388 <param name="console" type="IConsole" dir="return"/>
12389 </method>
12390
12391 <method name="assignMachine">
12392 <desc>
12393 Assigns the machine object associated with this direct-type
12394 session or informs the session that it will be a remote one
12395 (if @a machine == @c null).
12396
12397 <result name="VBOX_E_INVALID_VM_STATE">
12398 Session state prevents operation.
12399 </result>
12400 <result name="VBOX_E_INVALID_OBJECT_STATE">
12401 Session type prevents operation.
12402 </result>
12403
12404 </desc>
12405 <param name="machine" type="IMachine" dir="in"/>
12406 </method>
12407
12408 <method name="assignRemoteMachine">
12409 <desc>
12410 Assigns the machine and the (remote) console object associated with
12411 this remote-type session.
12412
12413 <result name="VBOX_E_INVALID_VM_STATE">
12414 Session state prevents operation.
12415 </result>
12416
12417 </desc>
12418 <param name="machine" type="IMachine" dir="in"/>
12419 <param name="console" type="IConsole" dir="in"/>
12420 </method>
12421
12422 <method name="updateMachineState">
12423 <desc>
12424 Updates the machine state in the VM process.
12425 Must be called only in certain cases
12426 (see the method implementation).
12427
12428 <result name="VBOX_E_INVALID_VM_STATE">
12429 Session state prevents operation.
12430 </result>
12431 <result name="VBOX_E_INVALID_OBJECT_STATE">
12432 Session type prevents operation.
12433 </result>
12434
12435 </desc>
12436 <param name="aMachineState" type="MachineState" dir="in"/>
12437 </method>
12438
12439 <method name="uninitialize">
12440 <desc>
12441 Uninitializes (closes) this session. Used by VirtualBox to close
12442 the corresponding remote session when the direct session dies
12443 or gets closed.
12444
12445 <result name="VBOX_E_INVALID_VM_STATE">
12446 Session state prevents operation.
12447 </result>
12448
12449 </desc>
12450 </method>
12451
12452 <method name="onNetworkAdapterChange">
12453 <desc>
12454 Triggered when settings of a network adapter of the
12455 associated virtual machine have changed.
12456
12457 <result name="VBOX_E_INVALID_VM_STATE">
12458 Session state prevents operation.
12459 </result>
12460 <result name="VBOX_E_INVALID_OBJECT_STATE">
12461 Session type prevents operation.
12462 </result>
12463
12464 </desc>
12465 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12466 <param name="changeAdapter" type="boolean" dir="in"/>
12467 </method>
12468
12469 <method name="onSerialPortChange">
12470 <desc>
12471 Triggered when settings of a serial port of the
12472 associated virtual machine have changed.
12473
12474 <result name="VBOX_E_INVALID_VM_STATE">
12475 Session state prevents operation.
12476 </result>
12477 <result name="VBOX_E_INVALID_OBJECT_STATE">
12478 Session type prevents operation.
12479 </result>
12480
12481 </desc>
12482 <param name="serialPort" type="ISerialPort" dir="in"/>
12483 </method>
12484
12485 <method name="onParallelPortChange">
12486 <desc>
12487 Triggered when settings of a parallel port of the
12488 associated virtual machine have changed.
12489
12490 <result name="VBOX_E_INVALID_VM_STATE">
12491 Session state prevents operation.
12492 </result>
12493 <result name="VBOX_E_INVALID_OBJECT_STATE">
12494 Session type prevents operation.
12495 </result>
12496
12497 </desc>
12498 <param name="parallelPort" type="IParallelPort" dir="in"/>
12499 </method>
12500
12501 <method name="onStorageControllerChange">
12502 <desc>
12503 Triggered when settings of a storage controller of the
12504 associated virtual machine have changed.
12505
12506 <result name="VBOX_E_INVALID_VM_STATE">
12507 Session state prevents operation.
12508 </result>
12509 <result name="VBOX_E_INVALID_OBJECT_STATE">
12510 Session type prevents operation.
12511 </result>
12512
12513 </desc>
12514 </method>
12515
12516 <method name="onMediumChange">
12517 <desc>
12518 Triggered when attached media of the
12519 associated virtual machine have changed.
12520
12521 <result name="VBOX_E_INVALID_VM_STATE">
12522 Session state prevents operation.
12523 </result>
12524 <result name="VBOX_E_INVALID_OBJECT_STATE">
12525 Session type prevents operation.
12526 </result>
12527
12528 </desc>
12529
12530 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12531 <param name="force" type="boolean" dir="in"/>
12532 </method>
12533
12534 <method name="onCPUChange">
12535 <desc>
12536 Notification when a CPU changes.
12537 </desc>
12538 <param name="cpu" type="unsigned long" dir="in">
12539 <desc>The CPU which changed</desc>
12540 </param>
12541 <param name="add" type="boolean" dir="in">
12542 <desc>Flag whether the CPU was added or removed</desc>
12543 </param>
12544 </method>
12545
12546 <method name="onCPUPriorityChange">
12547 <desc>
12548 Notification when the CPU priority changes.
12549 </desc>
12550 <param name="priority" type="unsigned long" dir="in">
12551 <desc>The new CPU priority value. (1-100)</desc>
12552 </param>
12553 </method>
12554
12555 <method name="onVRDPServerChange">
12556 <desc>
12557 Triggered when settings of the VRDP server object of the
12558 associated virtual machine have changed.
12559
12560 <result name="VBOX_E_INVALID_VM_STATE">
12561 Session state prevents operation.
12562 </result>
12563 <result name="VBOX_E_INVALID_OBJECT_STATE">
12564 Session type prevents operation.
12565 </result>
12566
12567 </desc>
12568 <param name="restart" type="boolean" dir="in">
12569 <desc>Flag whether the server must be restarted</desc>
12570 </param>
12571 </method>
12572
12573 <method name="onUSBControllerChange">
12574 <desc>
12575 Triggered when settings of the USB controller object of the
12576 associated virtual machine have changed.
12577
12578 <result name="VBOX_E_INVALID_VM_STATE">
12579 Session state prevents operation.
12580 </result>
12581 <result name="VBOX_E_INVALID_OBJECT_STATE">
12582 Session type prevents operation.
12583 </result>
12584
12585 </desc>
12586 </method>
12587
12588 <method name="onSharedFolderChange">
12589 <desc>
12590 Triggered when a permanent (global or machine) shared folder has been
12591 created or removed.
12592 <note>
12593 We don't pass shared folder parameters in this notification because
12594 the order in which parallel notifications are delivered is not defined,
12595 therefore it could happen that these parameters were outdated by the
12596 time of processing this notification.
12597 </note>
12598
12599 <result name="VBOX_E_INVALID_VM_STATE">
12600 Session state prevents operation.
12601 </result>
12602 <result name="VBOX_E_INVALID_OBJECT_STATE">
12603 Session type prevents operation.
12604 </result>
12605
12606 </desc>
12607 <param name="global" type="boolean" dir="in"/>
12608 </method>
12609
12610 <method name="onUSBDeviceAttach">
12611 <desc>
12612 Triggered when a request to capture a USB device (as a result
12613 of matched USB filters or direct call to
12614 <link to="IConsole::attachUSBDevice"/>) has completed.
12615 A @c null @a error object means success, otherwise it
12616 describes a failure.
12617
12618 <result name="VBOX_E_INVALID_VM_STATE">
12619 Session state prevents operation.
12620 </result>
12621 <result name="VBOX_E_INVALID_OBJECT_STATE">
12622 Session type prevents operation.
12623 </result>
12624
12625 </desc>
12626 <param name="device" type="IUSBDevice" dir="in"/>
12627 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12628 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12629 </method>
12630
12631 <method name="onUSBDeviceDetach">
12632 <desc>
12633 Triggered when a request to release the USB device (as a result
12634 of machine termination or direct call to
12635 <link to="IConsole::detachUSBDevice"/>) has completed.
12636 A @c null @a error object means success, otherwise it
12637 describes a failure.
12638
12639 <result name="VBOX_E_INVALID_VM_STATE">
12640 Session state prevents operation.
12641 </result>
12642 <result name="VBOX_E_INVALID_OBJECT_STATE">
12643 Session type prevents operation.
12644 </result>
12645
12646 </desc>
12647 <param name="id" type="uuid" mod="string" dir="in"/>
12648 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12649 </method>
12650
12651 <method name="onShowWindow">
12652 <desc>
12653 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12654 <link to="IMachine::showConsoleWindow"/> in order to notify
12655 console listeners
12656 <link to="ICanShowWindowEvent"/>
12657 and <link to="IShowWindowEvent"/>.
12658
12659 <result name="VBOX_E_INVALID_OBJECT_STATE">
12660 Session type prevents operation.
12661 </result>
12662
12663 </desc>
12664 <param name="check" type="boolean" dir="in"/>
12665 <param name="canShow" type="boolean" dir="out"/>
12666 <param name="winId" type="long long" dir="out"/>
12667 </method>
12668
12669 <method name="accessGuestProperty">
12670 <desc>
12671 Called by <link to="IMachine::getGuestProperty"/> and by
12672 <link to="IMachine::setGuestProperty"/> in order to read and
12673 modify guest properties.
12674
12675 <result name="VBOX_E_INVALID_VM_STATE">
12676 Machine session is not open.
12677 </result>
12678 <result name="VBOX_E_INVALID_OBJECT_STATE">
12679 Session type is not direct.
12680 </result>
12681
12682 </desc>
12683 <param name="name" type="wstring" dir="in"/>
12684 <param name="value" type="wstring" dir="in"/>
12685 <param name="flags" type="wstring" dir="in"/>
12686 <param name="isSetter" type="boolean" dir="in"/>
12687 <param name="retValue" type="wstring" dir="out"/>
12688 <param name="retTimestamp" type="long long" dir="out"/>
12689 <param name="retFlags" type="wstring" dir="out"/>
12690 </method>
12691
12692 <method name="enumerateGuestProperties">
12693 <desc>
12694 Return a list of the guest properties matching a set of patterns along
12695 with their values, time stamps and flags.
12696
12697 <result name="VBOX_E_INVALID_VM_STATE">
12698 Machine session is not open.
12699 </result>
12700 <result name="VBOX_E_INVALID_OBJECT_STATE">
12701 Session type is not direct.
12702 </result>
12703
12704 </desc>
12705 <param name="patterns" type="wstring" dir="in">
12706 <desc>
12707 The patterns to match the properties against as a comma-separated
12708 string. If this is empty, all properties currently set will be
12709 returned.
12710 </desc>
12711 </param>
12712 <param name="key" type="wstring" dir="out" safearray="yes">
12713 <desc>
12714 The key names of the properties returned.
12715 </desc>
12716 </param>
12717 <param name="value" type="wstring" dir="out" safearray="yes">
12718 <desc>
12719 The values of the properties returned. The array entries match the
12720 corresponding entries in the @a key array.
12721 </desc>
12722 </param>
12723 <param name="timestamp" type="long long" dir="out" safearray="yes">
12724 <desc>
12725 The time stamps of the properties returned. The array entries match
12726 the corresponding entries in the @a key array.
12727 </desc>
12728 </param>
12729 <param name="flags" type="wstring" dir="out" safearray="yes">
12730 <desc>
12731 The flags of the properties returned. The array entries match the
12732 corresponding entries in the @a key array.
12733 </desc>
12734 </param>
12735 </method>
12736
12737 <method name="onlineMergeMedium">
12738 <desc>
12739 Triggers online merging of a hard disk. Used internally when deleting
12740 a snapshot while a VM referring to the same hard disk chain is running.
12741
12742 <result name="VBOX_E_INVALID_VM_STATE">
12743 Machine session is not open.
12744 </result>
12745 <result name="VBOX_E_INVALID_OBJECT_STATE">
12746 Session type is not direct.
12747 </result>
12748
12749 </desc>
12750 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
12751 <desc>The medium attachment to identify the medium chain.</desc>
12752 </param>
12753 <param name="sourceIdx" type="unsigned long" dir="in">
12754 <desc>The index of the source image in the chain.
12755 Redundant, but drastically reduces IPC.</desc>
12756 </param>
12757 <param name="targetIdx" type="unsigned long" dir="in">
12758 <desc>The index of the target image in the chain.
12759 Redundant, but drastically reduces IPC.</desc>
12760 </param>
12761 <param name="source" type="IMedium" dir="in">
12762 <desc>Merge source medium.</desc>
12763 </param>
12764 <param name="target" type="IMedium" dir="in">
12765 <desc>Merge target medium.</desc>
12766 </param>
12767 <param name="mergeForward" type="boolean" dir="in">
12768 <desc>Merge direction.</desc>
12769 </param>
12770 <param name="parentForTarget" type="IMedium" dir="in">
12771 <desc>For forward merges: new parent for target medium.</desc>
12772 </param>
12773 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
12774 <desc>For backward merges: list of media which need their parent UUID
12775 updated.</desc>
12776 </param>
12777 <param name="progress" type="IProgress" dir="in">
12778 <desc>
12779 Progress object for this operation.
12780 </desc>
12781 </param>
12782 </method>
12783
12784 </interface>
12785
12786 <interface
12787 name="ISession" extends="$unknown"
12788 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12789 wsmap="managed"
12790 >
12791 <desc>
12792 The ISession interface represents a client process and allows for locking
12793 virtual machines (represented by IMachine objects) to prevent conflicting
12794 changes to the machine.
12795
12796 Any caller wishing to manipulate a virtual machine needs to create a session
12797 object first, which lives in its own process space. Such session objects are
12798 then associated with <link to="IMachine" /> objects living in the VirtualBox
12799 server process to coordinate such changes.
12800
12801 There are two typical scenarios in which sessions are used:
12802
12803 <ul>
12804 <li>To alter machine settings or control a running virtual machine, one
12805 needs to lock a machine for a given session (client process) by calling
12806 <link to="IMachine::lockMachine"/>.
12807
12808 Whereas multiple sessions may control a running virtual machine, only
12809 one process can obtain a write lock on the machine to prevent conflicting
12810 changes. A write lock is also needed if a process wants to actually run a
12811 virtual machine in its own context, such as the VirtualBox GUI or
12812 VBoxHeadless front-ends. They must also lock a machine for their own
12813 sessions before they are allowed to power up the virtual machine.
12814
12815 As a result, no machine settings can be altered while another process is
12816 already using it, either because that process is modifying machine settings
12817 or because the machine is running.
12818 </li>
12819 <li>
12820 To start a VM using one of the existing VirtualBox front-ends (e.g. the
12821 VirtualBox GUI or VBoxHeadless), one would use
12822 <link to="IMachine::launchVMProcess"/>, which also takes a session object
12823 as its first parameter. This session then identifies the caller and lets the
12824 caller control the started machine (for example, pause machine execution or
12825 power it down) as well as be notified about machine execution state changes.
12826 </li>
12827 </ul>
12828
12829 How sessions objects are created in a client process depends on whether you use
12830 the Main API via COM or via the webservice:
12831
12832 <ul>
12833 <li>When using the COM API directly, an object of the Session class from the
12834 VirtualBox type library needs to be created. In regular COM C++ client code,
12835 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12836 This object will then act as a local session object in further calls to open
12837 a session.
12838 </li>
12839
12840 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12841 a session object automatically whenever <link to="IWebsessionManager::logon" />
12842 is called. A managed object reference to that session object can be retrieved by
12843 calling <link to="IWebsessionManager::getSessionObject" />.
12844 </li>
12845 </ul>
12846 </desc>
12847
12848 <attribute name="state" type="SessionState" readonly="yes">
12849 <desc>Current state of this session.</desc>
12850 </attribute>
12851
12852 <attribute name="type" type="SessionType" readonly="yes">
12853 <desc>
12854 Type of this session. The value of this attribute is valid only
12855 if the session currently has a machine locked (i.e. its
12856 <link to="#state" /> is Locked), otherwise an error will be returned.
12857 </desc>
12858 </attribute>
12859
12860 <attribute name="machine" type="IMachine" readonly="yes">
12861 <desc>Machine object associated with this session.</desc>
12862 </attribute>
12863
12864 <attribute name="console" type="IConsole" readonly="yes">
12865 <desc>Console object associated with this session.</desc>
12866 </attribute>
12867
12868 <method name="unlockMachine">
12869 <desc>
12870 Unlocks a machine that was previously locked for the current session.
12871
12872 Calling this method is required every time a machine has been locked
12873 for a particular session using the <link to="IMachine::launchVMProcess" />
12874 or <link to="IMachine::lockMachine" /> calls. Otherwise the state of
12875 the machine will be set to <link to="MachineState::Aborted" /> on the
12876 server, and changes made to the machine settings will be lost.
12877
12878 Generally, it is recommended to unlock all machines explicitly
12879 before terminating the application (regardless of the reason for
12880 the termination).
12881
12882 <note>
12883 Do not expect the session state (<link to="ISession::state" />
12884 to return to "Unlocked" immediately after you invoke this method,
12885 particularly if you have started a new VM process. The session
12886 state will automatically return to "Unlocked" once the VM is no
12887 longer executing, which can of course take a very long time.
12888 </note>
12889
12890 <result name="E_UNEXPECTED">
12891 Session is not locked.
12892 </result>
12893
12894 </desc>
12895 </method>
12896
12897 </interface>
12898
12899 <!--
12900 // IStorageController
12901 /////////////////////////////////////////////////////////////////////////
12902 -->
12903
12904 <enum
12905 name="StorageBus"
12906 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
12907 >
12908 <desc>
12909 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy);
12910 see <link to="IStorageController::bus" />.
12911 </desc>
12912 <const name="Null" value="0">
12913 <desc>@c null value. Never used by the API.</desc>
12914 </const>
12915 <const name="IDE" value="1"/>
12916 <const name="SATA" value="2"/>
12917 <const name="SCSI" value="3"/>
12918 <const name="Floppy" value="4"/>
12919 <const name="SAS" value="5"/>
12920 </enum>
12921
12922 <enum
12923 name="StorageControllerType"
12924 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
12925 >
12926 <desc>
12927 The exact variant of storage controller hardware presented
12928 to the guest; see <link to="IStorageController::controllerType" />.
12929 </desc>
12930
12931 <const name="Null" value="0">
12932 <desc>@c null value. Never used by the API.</desc>
12933 </const>
12934 <const name="LsiLogic" value="1">
12935 <desc>A SCSI controller of the LsiLogic variant.</desc>
12936 </const>
12937 <const name="BusLogic" value="2">
12938 <desc>A SCSI controller of the BusLogic variant.</desc>
12939 </const>
12940 <const name="IntelAhci" value="3">
12941 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
12942 </const>
12943 <const name="PIIX3" value="4">
12944 <desc>An IDE controller of the PIIX3 variant.</desc>
12945 </const>
12946 <const name="PIIX4" value="5">
12947 <desc>An IDE controller of the PIIX4 variant.</desc>
12948 </const>
12949 <const name="ICH6" value="6">
12950 <desc>An IDE controller of the ICH6 variant.</desc>
12951 </const>
12952 <const name="I82078" value="7">
12953 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
12954 </const>
12955 <const name="LsiLogicSas" value="8">
12956 <desc>A variant of the LsiLogic controller using SAS.</desc>
12957 </const>
12958 </enum>
12959
12960 <interface
12961 name="IStorageController" extends="$unknown"
12962 uuid="fd93adc0-bbaa-4256-9e6e-00e29f9151c9"
12963 wsmap="managed"
12964 >
12965 <desc>
12966 Represents a storage controller that is attached to a virtual machine
12967 (<link to="IMachine" />). Just as drives (hard disks, DVDs, FDs) are
12968 attached to storage controllers in a real computer, virtual drives
12969 (represented by <link to="IMediumAttachment" />) are attached to virtual
12970 storage controllers, represented by this interface.
12971
12972 As opposed to physical hardware, VirtualBox has a very generic concept
12973 of a storage controller, and for purposes of the Main API, all virtual
12974 storage is attached to virtual machines via instances of this interface.
12975 There are five types of such virtual storage controllers: IDE, SCSI, SATA,
12976 SAS and Floppy (see <link to="#bus" />). Depending on which of these four
12977 is used, certain sub-types may be available and can be selected in
12978 <link to="#controllerType" />.
12979
12980 Depending on these settings, the guest operating system might see
12981 significantly different virtual hardware.
12982 </desc>
12983
12984 <attribute name="name" type="wstring" readonly="yes">
12985 <desc>
12986 Name of the storage controller, as originally specified with
12987 <link to="IMachine::addStorageController" />. This then uniquely
12988 identifies this controller with other method calls such as
12989 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
12990 </desc>
12991 </attribute>
12992
12993 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12994 <desc>
12995 Maximum number of devices which can be attached to one port.
12996 </desc>
12997 </attribute>
12998
12999 <attribute name="minPortCount" type="unsigned long" readonly="yes">
13000 <desc>
13001 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
13002 </desc>
13003 </attribute>
13004
13005 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
13006 <desc>
13007 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
13008 </desc>
13009 </attribute>
13010
13011 <attribute name="instance" type="unsigned long">
13012 <desc>
13013 The instance number of the device in the running VM.
13014 </desc>
13015 </attribute>
13016
13017 <attribute name="portCount" type="unsigned long">
13018 <desc>
13019 The number of currently usable ports on the controller.
13020 The minimum and maximum number of ports for one controller are
13021 stored in <link to="IStorageController::minPortCount"/>
13022 and <link to="IStorageController::maxPortCount"/>.
13023 </desc>
13024 </attribute>
13025
13026 <attribute name="bus" type="StorageBus" readonly="yes">
13027 <desc>
13028 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy).
13029 </desc>
13030 </attribute>
13031
13032 <attribute name="controllerType" type="StorageControllerType">
13033 <desc>
13034 The exact variant of storage controller hardware presented
13035 to the guest.
13036 Depending on this value, VirtualBox will provide a different
13037 virtual storage controller hardware to the guest.
13038 For SATA, SAS and floppy controllers, only one variant is
13039 available, but for IDE and SCSI, there are several.
13040
13041 For SCSI controllers, the default type is LsiLogic.
13042 </desc>
13043 </attribute>
13044
13045 <attribute name="useHostIOCache" type="boolean">
13046 <desc>
13047 If true, the storage controller emulation will use a dedicated I/O thread, enable the host I/O
13048 caches and use synchronous file APIs on the host. This was the only option in the API before
13049 VirtualBox 3.2 and is still the default for IDE controllers.
13050
13051 If false, the host I/O cache will be disabled for image files attached to this storage controller.
13052 Instead, the storage controller emulation will use asynchronous I/O APIs on the host. This makes
13053 it possible to turn off the host I/O caches because the emulation can handle unaligned access to
13054 the file. This should be used on OS X and Linux hosts if a high I/O load is expected or many
13055 virtual machines are running at the same time to prevent I/O cache related hangs.
13056 This option new with the API of VirtualBox 3.2 and is now the default for non-IDE storage controllers.
13057 </desc>
13058 </attribute>
13059
13060 <method name="getIDEEmulationPort">
13061 <desc>
13062 Gets the corresponding port number which is emulated as an IDE device.
13063 Works only with SATA controllers.
13064
13065 <result name="E_INVALIDARG">
13066 The @a devicePosition is not in the range 0 to 3.
13067 </result>
13068 <result name="E_NOTIMPL">
13069 The storage controller type is not SATAIntelAhci.
13070 </result>
13071
13072 </desc>
13073 <param name="devicePosition" type="long" dir="in"/>
13074 <param name="portNumber" type="long" dir="return"/>
13075 </method>
13076
13077 <method name="setIDEEmulationPort">
13078 <desc>
13079 Sets the port number which is emulated as an IDE device.
13080 Works only with SATA controllers.
13081
13082 <result name="E_INVALIDARG">
13083 The @a devicePosition is not in the range 0 to 3 or the
13084 @a portNumber is not in the range 0 to 29.
13085 </result>
13086 <result name="E_NOTIMPL">
13087 The storage controller type is not SATAIntelAhci.
13088 </result>
13089
13090 </desc>
13091 <param name="devicePosition" type="long" dir="in"/>
13092 <param name="portNumber" type="long" dir="in"/>
13093 </method>
13094
13095 </interface>
13096
13097<if target="wsdl">
13098
13099 <!--
13100 // IManagedObjectRef
13101 /////////////////////////////////////////////////////////////////////////
13102 -->
13103
13104 <interface
13105 name="IManagedObjectRef" extends="$unknown"
13106 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
13107 internal="yes"
13108 wsmap="managed"
13109 wscpp="hardcoded"
13110 >
13111 <desc>
13112 Managed object reference.
13113
13114 Only within the webservice, a managed object reference (which is really
13115 an opaque number) allows a webservice client to address an object
13116 that lives in the address space of the webservice server.
13117
13118 Behind each managed object reference, there is a COM object that lives
13119 in the webservice server's address space. The COM object is not freed
13120 until the managed object reference is released, either by an explicit
13121 call to <link to="IManagedObjectRef::release" /> or by logging off from
13122 the webservice (<link to="IWebsessionManager::logoff" />), which releases
13123 all objects created during the webservice session.
13124
13125 Whenever a method call of the VirtualBox API returns a COM object, the
13126 webservice representation of that method will instead return a
13127 managed object reference, which can then be used to invoke methods
13128 on that object.
13129 </desc>
13130
13131 <method name="getInterfaceName">
13132 <desc>
13133 Returns the name of the interface that this managed object represents,
13134 for example, "IMachine", as a string.
13135 </desc>
13136 <param name="return" type="wstring" dir="return"/>
13137 </method>
13138
13139 <method name="release">
13140 <desc>
13141 Releases this managed object reference and frees the resources that
13142 were allocated for it in the webservice server process. After calling
13143 this method, the identifier of the reference can no longer be used.
13144 </desc>
13145 </method>
13146
13147 </interface>
13148
13149 <!--
13150 // IWebsessionManager
13151 /////////////////////////////////////////////////////////////////////////
13152 -->
13153
13154 <interface
13155 name="IWebsessionManager" extends="$unknown"
13156 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
13157 internal="yes"
13158 wsmap="global"
13159 wscpp="hardcoded"
13160 >
13161 <desc>
13162 Websession manager. This provides essential services
13163 to webservice clients.
13164 </desc>
13165 <method name="logon">
13166 <desc>
13167 Logs a new client onto the webservice and returns a managed object reference to
13168 the IVirtualBox instance, which the client can then use as a basis to further
13169 queries, since all calls to the VirtualBox API are based on the IVirtualBox
13170 interface, in one way or the other.
13171 </desc>
13172 <param name="username" type="wstring" dir="in"/>
13173 <param name="password" type="wstring" dir="in"/>
13174 <param name="return" type="IVirtualBox" dir="return"/>
13175 </method>
13176
13177 <method name="getSessionObject">
13178 <desc>
13179 Returns a managed object reference to the internal ISession object that was created
13180 for this web service session when the client logged on.
13181
13182 <see>ISession</see>
13183 </desc>
13184 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13185 <param name="return" type="ISession" dir="return"/>
13186 </method>
13187
13188 <method name="logoff">
13189 <desc>
13190 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
13191 and destroys all resources associated with the session (most importantly, all
13192 managed objects created in the server while the session was active).
13193 </desc>
13194 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13195 </method>
13196
13197 </interface>
13198
13199</if>
13200
13201 <!--
13202 // IPerformanceCollector & friends
13203 /////////////////////////////////////////////////////////////////////////
13204 -->
13205
13206 <interface
13207 name="IPerformanceMetric" extends="$unknown"
13208 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
13209 >
13210 <desc>
13211 The IPerformanceMetric interface represents parameters of the given
13212 performance metric.
13213 </desc>
13214
13215 <attribute name="metricName" type="wstring" readonly="yes">
13216 <desc>
13217 Name of the metric.
13218 </desc>
13219 </attribute>
13220
13221 <attribute name="object" type="$unknown" readonly="yes">
13222 <desc>
13223 Object this metric belongs to.
13224 </desc>
13225 </attribute>
13226
13227 <attribute name="description" type="wstring" readonly="yes">
13228 <desc>
13229 Textual description of the metric.
13230 </desc>
13231 </attribute>
13232
13233 <attribute name="period" type="unsigned long" readonly="yes">
13234 <desc>
13235 Time interval between samples, measured in seconds.
13236 </desc>
13237 </attribute>
13238
13239 <attribute name="count" type="unsigned long" readonly="yes">
13240 <desc>
13241 Number of recent samples retained by the performance collector for this
13242 metric.
13243
13244 When the collected sample count exceeds this number, older samples
13245 are discarded.
13246 </desc>
13247 </attribute>
13248
13249 <attribute name="unit" type="wstring" readonly="yes">
13250 <desc>
13251 Unit of measurement.
13252 </desc>
13253 </attribute>
13254
13255 <attribute name="minimumValue" type="long" readonly="yes">
13256 <desc>
13257 Minimum possible value of this metric.
13258 </desc>
13259 </attribute>
13260
13261 <attribute name="maximumValue" type="long" readonly="yes">
13262 <desc>
13263 Maximum possible value of this metric.
13264 </desc>
13265 </attribute>
13266 </interface>
13267
13268 <interface
13269 name="IPerformanceCollector" extends="$unknown"
13270 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
13271 wsmap="managed"
13272 >
13273 <desc>
13274 The IPerformanceCollector interface represents a service that collects
13275 and stores performance metrics data.
13276
13277 Performance metrics are associated with objects of interfaces like IHost
13278 and IMachine. Each object has a distinct set of performance metrics. The
13279 set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
13280
13281 Metric data is collected at the specified intervals and is retained
13282 internally. The interval and the number of retained samples can be set
13283 with <link to="IPerformanceCollector::setupMetrics" />. Both metric data
13284 and collection settings are not persistent, they are discarded as soon as
13285 VBoxSVC process terminates. Moreover, metric settings and data associated
13286 with a particular VM only exist while VM is running. They disappear as
13287 soon as VM shuts down. It is not possible to set up metrics for machines
13288 that are powered off. One needs to start VM first, then set up metric
13289 collection parameters.
13290
13291 Metrics are organized hierarchically, with each level separated by a
13292 slash (/) character. Generally, the scheme for metric names is like this:
13293
13294 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
13295
13296 "Category/Metric" together form the base metric name. A base metric is
13297 the smallest unit for which a sampling interval and the number of
13298 retained samples can be set. Only base metrics can be enabled and
13299 disabled. All sub-metrics are collected when their base metric is
13300 collected. Collected values for any set of sub-metrics can be queried
13301 with <link to="IPerformanceCollector::queryMetricsData" />.
13302
13303 For example "CPU/Load/User:avg" metric name stands for the "CPU"
13304 category, "Load" metric, "User" submetric, "average" aggregate. An
13305 aggregate function is computed over all retained data. Valid aggregate
13306 functions are:
13307
13308 <ul>
13309 <li>avg -- average</li>
13310 <li>min -- minimum</li>
13311 <li>max -- maximum</li>
13312 </ul>
13313
13314 When setting up metric parameters, querying metric data, enabling or
13315 disabling metrics wildcards can be used in metric names to specify a
13316 subset of metrics. For example, to select all CPU-related metrics
13317 use <tt>CPU/*</tt>, all averages can be queried using <tt>*:avg</tt> and
13318 so on. To query metric values without aggregates <tt>*:</tt> can be used.
13319
13320 The valid names for base metrics are:
13321
13322 <ul>
13323 <li>CPU/Load</li>
13324 <li>CPU/MHz</li>
13325 <li>RAM/Usage</li>
13326 </ul>
13327
13328 The general sequence for collecting and retrieving the metrics is:
13329 <ul>
13330 <li>
13331 Obtain an instance of IPerformanceCollector with
13332 <link to="IVirtualBox::performanceCollector" />
13333 </li>
13334 <li>
13335 Allocate and populate an array with references to objects the metrics
13336 will be collected for. Use references to IHost and IMachine objects.
13337 </li>
13338 <li>
13339 Allocate and populate an array with base metric names the data will
13340 be collected for.
13341 </li>
13342 <li>
13343 Call <link to="IPerformanceCollector::setupMetrics" />. From now on
13344 the metric data will be collected and stored.
13345 </li>
13346 <li>
13347 Wait for the data to get collected.
13348 </li>
13349 <li>
13350 Allocate and populate an array with references to objects the metric
13351 values will be queried for. You can re-use the object array used for
13352 setting base metrics.
13353 </li>
13354 <li>
13355 Allocate and populate an array with metric names the data will be
13356 collected for. Note that metric names differ from base metric names.
13357 </li>
13358 <li>
13359 Call <link to="IPerformanceCollector::queryMetricsData" />. The data
13360 that have been collected so far are returned. Note that the values
13361 are still retained internally and data collection continues.
13362 </li>
13363 </ul>
13364
13365 For an example of usage refer to the following files in VirtualBox SDK:
13366 <ul>
13367 <li>
13368 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13369 </li>
13370 <li>
13371 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13372 </li>
13373 </ul>
13374 </desc>
13375
13376 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13377 <desc>
13378 Array of unique names of metrics.
13379
13380 This array represents all metrics supported by the performance
13381 collector. Individual objects do not necessarily support all of them.
13382 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13383 list of supported metrics for a particular object.
13384 </desc>
13385 </attribute>
13386
13387 <method name="getMetrics">
13388 <desc>
13389 Returns parameters of specified metrics for a set of objects.
13390 <note>
13391 @c Null metrics array means all metrics. @c Null object array means
13392 all existing objects.
13393 </note>
13394 </desc>
13395 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13396 <desc>
13397 Metric name filter. Currently, only a comma-separated list of metrics
13398 is supported.
13399 </desc>
13400 </param>
13401 <param name="objects" type="$unknown" dir="in" safearray="yes">
13402 <desc>
13403 Set of objects to return metric parameters for.
13404 </desc>
13405 </param>
13406 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13407 <desc>
13408 Array of returned metric parameters.
13409 </desc>
13410 </param>
13411 </method>
13412
13413 <method name="setupMetrics">
13414 <desc>
13415 Sets parameters of specified base metrics for a set of objects. Returns
13416 an array of <link to="IPerformanceMetric" /> describing the metrics
13417 have been affected.
13418 <note>
13419 @c Null or empty metric name array means all metrics. @c Null or
13420 empty object array means all existing objects. If metric name array
13421 contains a single element and object array contains many, the single
13422 metric name array element is applied to each object array element to
13423 form metric/object pairs.
13424 </note>
13425 </desc>
13426 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13427 <desc>
13428 Metric name filter. Comma-separated list of metrics with wildcard
13429 support.
13430 </desc>
13431 </param>
13432 <param name="objects" type="$unknown" dir="in" safearray="yes">
13433 <desc>
13434 Set of objects to setup metric parameters for.
13435 </desc>
13436 </param>
13437 <param name="period" type="unsigned long" dir="in">
13438 <desc>
13439 Time interval in seconds between two consecutive samples of
13440 performance data.
13441 </desc>
13442 </param>
13443 <param name="count" type="unsigned long" dir="in">
13444 <desc>
13445 Number of samples to retain in performance data history. Older
13446 samples get discarded.
13447 </desc>
13448 </param>
13449 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13450 <desc>
13451 Array of metrics that have been modified by the call to this method.
13452 </desc>
13453 </param>
13454 </method>
13455
13456 <method name="enableMetrics">
13457 <desc>
13458 Turns on collecting specified base metrics. Returns an array of
13459 <link to="IPerformanceMetric" /> describing the metrics have been
13460 affected.
13461 <note>
13462 @c Null or empty metric name array means all metrics. @c Null or
13463 empty object array means all existing objects. If metric name array
13464 contains a single element and object array contains many, the single
13465 metric name array element is applied to each object array element to
13466 form metric/object pairs.
13467 </note>
13468 </desc>
13469 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13470 <desc>
13471 Metric name filter. Comma-separated list of metrics with wildcard
13472 support.
13473 </desc>
13474 </param>
13475 <param name="objects" type="$unknown" dir="in" safearray="yes">
13476 <desc>
13477 Set of objects to enable metrics for.
13478 </desc>
13479 </param>
13480 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13481 <desc>
13482 Array of metrics that have been modified by the call to this method.
13483 </desc>
13484 </param>
13485 </method>
13486
13487 <method name="disableMetrics">
13488 <desc>
13489 Turns off collecting specified base metrics. Returns an array of
13490 <link to="IPerformanceMetric" /> describing the metrics have been
13491 affected.
13492 <note>
13493 @c Null or empty metric name array means all metrics. @c Null or
13494 empty object array means all existing objects. If metric name array
13495 contains a single element and object array contains many, the single
13496 metric name array element is applied to each object array element to
13497 form metric/object pairs.
13498 </note>
13499 </desc>
13500 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13501 <desc>
13502 Metric name filter. Comma-separated list of metrics with wildcard
13503 support.
13504 </desc>
13505 </param>
13506 <param name="objects" type="$unknown" dir="in" safearray="yes">
13507 <desc>
13508 Set of objects to disable metrics for.
13509 </desc>
13510 </param>
13511 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13512 <desc>
13513 Array of metrics that have been modified by the call to this method.
13514 </desc>
13515 </param>
13516 </method>
13517
13518 <method name="queryMetricsData">
13519 <desc>
13520 Queries collected metrics data for a set of objects.
13521
13522 The data itself and related metric information are returned in seven
13523 parallel and one flattened array of arrays. Elements of
13524 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13525 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13526 the same index describe one set of values corresponding to a single
13527 metric.
13528
13529 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13530 start and length of a sub-array is indicated by
13531 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13532 value for metric <tt>metricNames[i]</tt> is at
13533 <tt>returnData[returnIndices[i]]</tt>.
13534
13535 <note>
13536 @c Null or empty metric name array means all metrics. @c Null or
13537 empty object array means all existing objects. If metric name array
13538 contains a single element and object array contains many, the single
13539 metric name array element is applied to each object array element to
13540 form metric/object pairs.
13541 </note>
13542 <note>
13543 Data collection continues behind the scenes after call to @c
13544 queryMetricsData. The return data can be seen as the snapshot of the
13545 current state at the time of @c queryMetricsData call. The internally
13546 kept metric values are not cleared by the call. This makes possible
13547 querying different subsets of metrics or aggregates with subsequent
13548 calls. If periodic querying is needed it is highly suggested to query
13549 the values with @c interval*count period to avoid confusion. This way
13550 a completely new set of data values will be provided by each query.
13551 </note>
13552 </desc>
13553 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13554 <desc>
13555 Metric name filter. Comma-separated list of metrics with wildcard
13556 support.
13557 </desc>
13558 </param>
13559 <param name="objects" type="$unknown" dir="in" safearray="yes">
13560 <desc>
13561 Set of objects to query metrics for.
13562 </desc>
13563 </param>
13564 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13565 <desc>
13566 Names of metrics returned in @c returnData.
13567 </desc>
13568 </param>
13569 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13570 <desc>
13571 Objects associated with metrics returned in @c returnData.
13572 </desc>
13573 </param>
13574 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13575 <desc>
13576 Units of measurement for each returned metric.
13577 </desc>
13578 </param>
13579 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13580 <desc>
13581 Divisor that should be applied to return values in order to get
13582 floating point values. For example:
13583 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13584 will retrieve the floating point value of i-th sample of the first
13585 metric.
13586 </desc>
13587 </param>
13588 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13589 <desc>
13590 Sequence numbers of the first elements of value sequences of
13591 particular metrics returned in @c returnData. For aggregate metrics
13592 it is the sequence number of the sample the aggregate started
13593 calculation from.
13594 </desc>
13595 </param>
13596 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13597 <desc>
13598 Indices of the first elements of value sequences of particular
13599 metrics returned in @c returnData.
13600 </desc>
13601 </param>
13602 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13603 <desc>
13604 Lengths of value sequences of particular metrics.
13605 </desc>
13606 </param>
13607 <param name="returnData" type="long" dir="return" safearray="yes">
13608 <desc>
13609 Flattened array of all metric data containing sequences of values for
13610 each metric.
13611 </desc>
13612 </param>
13613 </method>
13614
13615 </interface>
13616 <enum
13617 name="NATAliasMode"
13618 uuid="67772168-50d9-11df-9669-7fb714ee4fa1">
13619 <desc></desc>
13620 <const name="AliasLog" value="0x1">
13621 <desc></desc>
13622 </const>
13623 <const name="AliasProxyOnly" value="0x02">
13624 <desc></desc>
13625 </const>
13626 <const name="AliasUseSamePorts" value="0x04">
13627 <desc></desc>
13628 </const>
13629 </enum>
13630 <enum
13631 name="NATProtocol"
13632 uuid="e90164be-eb03-11de-94af-fff9b1c1b19f"
13633 >
13634 <desc>Protocol definitions used with NAT port-forwarding rules.</desc>
13635 <const name="UDP" value="0">
13636 <desc>Port-forwarding uses UDP protocol.</desc>
13637 </const>
13638 <const name="TCP" value="1">
13639 <desc>Port-forwarding uses TCP protocol.</desc>
13640 </const>
13641 </enum>
13642
13643 <interface
13644 name="INATEngine" extends="$unknown"
13645 uuid="4b286616-eb03-11de-b0fb-1701eca42246"
13646 wsmap="managed"
13647 >
13648 <desc>Interface for managing a NAT engine which is used with a virtual machine. This
13649 allows for changing NAT behavior such as port-forwarding rules. This interface is
13650 used in the <link to="INetworkAdapter::natDriver" /> attribute.</desc>
13651 <attribute name="network" type="wstring">
13652 <desc>The network attribute of the NAT engine (the same value is used with built-in
13653 DHCP server to fill corresponding fields of DHCP leases).</desc>
13654 </attribute>
13655 <attribute name="hostIP" type="wstring">
13656 <desc>IP of host interface to bind all opened sockets to.
13657 <note>Changing this does not change binding of port forwarding.</note>
13658 </desc>
13659 </attribute>
13660 <attribute name="tftpPrefix" type="wstring">
13661 <desc>TFTP prefix attribute which is used with the built-in DHCP server to fill
13662 the corresponding fields of DHCP leases.</desc>
13663 </attribute>
13664 <attribute name="tftpBootFile" type="wstring">
13665 <desc>TFTP boot file attribute which is used with the built-in DHCP server to fill
13666 the corresponding fields of DHCP leases.</desc>
13667 </attribute>
13668 <attribute name="tftpNextServer" type="wstring">
13669 <desc>TFTP server attribute which is used with the built-in DHCP server to fill
13670 the corresponding fields of DHCP leases.
13671 <note>The preferred form is IPv4 addresses.</note>
13672 </desc>
13673 </attribute>
13674 <attribute name="aliasMode" type="unsigned long">
13675 <desc></desc>
13676 </attribute>
13677 <attribute name="dnsPassDomain" type="boolean">
13678 <desc>Whether the DHCP server should pass the DNS domain used by the host.</desc>
13679 </attribute>
13680 <attribute name="dnsProxy" type="boolean">
13681 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
13682 of the DNS proxy and process traffic using DNS servers registered on the host.</desc>
13683 </attribute>
13684 <attribute name="dnsUseHostResolver" type="boolean">
13685 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
13686 of the DNS proxy and process traffic using the host resolver mechanism.</desc>
13687 </attribute>
13688 <attribute name="redirects" type="wstring" readonly="yes" safearray="yes">
13689 <desc>Array of NAT port-forwarding rules in string representation, in the following
13690 format: "name,protocol id,host ip,host port,guest ip,guest port".</desc>
13691 </attribute>
13692 <method name="setNetworkSettings">
13693 <desc>Sets network configuration of the NAT engine.</desc>
13694 <param name="mtu" type="unsigned long" dir="in">
13695 <desc>MTU (maximum transmission unit) of the NAT engine in bytes.</desc>
13696 </param>
13697 <param name="sockSnd" type="unsigned long" dir="in">
13698 <desc>Capacity of the socket send buffer in bytes when creating a new socket.</desc>
13699 </param>
13700 <param name="sockRcv" type="unsigned long" dir="in">
13701 <desc>Capacity of the socket receive buffer in bytes when creating a new socket.</desc>
13702 </param>
13703 <param name="TcpWndSnd" type="unsigned long" dir="in">
13704 <desc>Initial size of the NAT engine's sending TCP window in bytes when
13705 establishing a new TCP connection.</desc>
13706 </param>
13707 <param name="TcpWndRcv" type="unsigned long" dir="in">
13708 <desc>Initial size of the NAT engine's receiving TCP window in bytes when
13709 establishing a new TCP connection.</desc>
13710 </param>
13711 </method>
13712 <method name="getNetworkSettings">
13713 <desc>Returns network configuration of NAT engine. See <link to="#setNetworkSettings" />
13714 for parameter descriptions.</desc>
13715 <param name="mtu" type="unsigned long" dir="out" />
13716 <param name="sockSnd" type="unsigned long" dir="out" />
13717 <param name="sockRcv" type="unsigned long" dir="out" />
13718 <param name="TcpWndSnd" type="unsigned long" dir="out" />
13719 <param name="TcpWndRcv" type="unsigned long" dir="out" />
13720 </method>
13721 <method name="addRedirect">
13722 <desc>Adds a new NAT port-forwarding rule.</desc>
13723 <param name="name" type="wstring" dir="in">
13724 <desc>The name of the rule. An empty name is acceptable, in which case the NAT engine
13725 auto-generates one using the other parameters.</desc>
13726 </param>
13727 <param name="proto" type="NATProtocol" dir="in">
13728 <desc>Protocol handled with the rule.</desc>
13729 </param>
13730 <param name="hostIp" type="wstring" dir="in">
13731 <desc>IP of the host interface to which the rule should apply. An empty ip address is
13732 acceptable, in which case the NAT engine binds the handling socket to any interface.</desc>
13733 </param>
13734 <param name="hostPort" type="unsigned short" dir="in">
13735 <desc>The port number to listen on.</desc>
13736 </param>
13737 <param name="guestIp" type="wstring" dir="in">
13738 <desc>The IP address of the guest which the NAT engine will forward matching packets
13739 to. An empty IP address is acceptable, in which case the NAT engine will forward
13740 packets to the first DHCP lease (x.x.x.15).</desc>
13741 </param>
13742 <param name="guestPort" type="unsigned short" dir="in">
13743 <desc>The port number to forward.</desc>
13744 </param>
13745 </method>
13746 <method name="removeRedirect">
13747 <desc>Removes a port-forwarding rule that was previously registered.</desc>
13748 <param name="name" type="wstring" dir="in">
13749 <desc>The name of the rule to delete.</desc>
13750 </param>
13751 </method>
13752 </interface>
13753
13754 <enum
13755 name="VBoxEventType"
13756 uuid="2c76667e-6981-4122-a71a-cdfd6a6eb575">
13757
13758 <desc>
13759 Type of an event.
13760 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
13761 </desc>
13762
13763 <const name="Invalid" value="0">
13764 <desc>
13765 Invalid event, must be first.
13766 </desc>
13767 </const>
13768
13769 <const name="Any" value="1">
13770 <desc>
13771 Wildcard for all events.
13772 Events of this type are never delivered, and only used in
13773 registerListener() call to simplify registration.
13774 </desc>
13775 </const>
13776
13777 <const name="Vetoable" value="2">
13778 <desc>
13779 Wildcard for all vetoable events. Events of this type are never delivered, and only
13780 used in registerListener() call to simplify registration.
13781 </desc>
13782 </const>
13783
13784 <const name="MachineEvent" value="3">
13785 <desc>
13786 Wildcard for all machine events. Events of this type are never delivered, and only used in
13787 registerListener() call to simplify registration.
13788 </desc>
13789 </const>
13790
13791 <const name="SnapshotEvent" value="4">
13792 <desc>
13793 Wildcard for all snapshot events. Events of this type are never delivered, and only used in
13794 registerListener() call to simplify registration.
13795 </desc>
13796 </const>
13797
13798 <const name="InputEvent" value="5">
13799 <desc>
13800 Wildcard for all input device (keyboard, mouse) events.
13801 Events of this type are never delivered, and only used in
13802 registerListener() call to simplify registration.
13803 </desc>
13804 </const>
13805
13806 <const name="LastWildcard" value="31">
13807 <desc>
13808 Last wildcard.
13809 </desc>
13810 </const>
13811
13812 <const name="OnMachineStateChanged" value="32">
13813 <desc>
13814 See <link to="IMachineStateChangedEvent">IMachineStateChangedEvent</link>.
13815 </desc>
13816 </const>
13817 <const name="OnMachineDataChanged" value="33">
13818 <desc>
13819 See <link to="IMachineDataChangedEvent">IMachineDataChangedEvent</link>.
13820 </desc>
13821 </const>
13822 <const name="OnExtraDataChanged" value="34">
13823 <desc>
13824 See <link to="IExtraDataChangedEvent">IExtraDataChangedEvent</link>.
13825 </desc>
13826 </const>
13827 <const name="OnExtraDataCanChange" value="35">
13828 <desc>
13829 See <link to="IExtraDataCanChangeEvent">IExtraDataCanChangeEvent</link>.
13830 </desc>
13831 </const>
13832 <const name="OnMediumRegistered" value="36">
13833 <desc>
13834 See <link to="IMediumRegisteredEvent">IMediumRegisteredEvent</link>.
13835 </desc>
13836 </const>
13837 <const name="OnMachineRegistered" value="37">
13838 <desc>
13839 See <link to="IMachineRegisteredEvent">IMachineRegisteredEvent</link>.
13840 </desc>
13841 </const>
13842 <const name="OnSessionStateChanged" value="38">
13843 <desc>
13844 See <link to="ISessionStateChangedEvent">ISessionStateChangedEvent</link>.
13845 </desc>
13846 </const>
13847 <const name="OnSnapshotTaken" value="39">
13848 <desc>
13849 See <link to="ISnapshotTakenEvent">ISnapshotTakenEvent</link>.
13850 </desc>
13851 </const>
13852 <const name="OnSnapshotDeleted" value="40">
13853 <desc>
13854 See <link to="ISnapshotDeletedEvent">ISnapshotDeletedEvent</link>.
13855 </desc>
13856 </const>
13857 <const name="OnSnapshotChanged" value="41">
13858 <desc>
13859 See <link to="ISnapshotChangedEvent">ISnapshotChangedEvent</link>.
13860 </desc>
13861 </const>
13862 <const name="OnGuestPropertyChanged" value="42">
13863 <desc>
13864 See <link to="IGuestPropertyChangedEvent">IGuestPropertyChangedEvent</link>.
13865 </desc>
13866 </const>
13867 <!-- Console events -->
13868 <const name="OnMousePointerShapeChanged" value="43">
13869 <desc>
13870 See <link to="IMousePointerShapeChangedEvent">IMousePointerShapeChangedEvent</link>.
13871 </desc>
13872 </const>
13873 <const name="OnMouseCapabilityChanged" value="44">
13874 <desc>
13875 See <link to="IMouseCapabilityChangedEvent">IMouseCapabilityChangedEvent</link>.
13876 </desc>
13877 </const>
13878 <const name="OnKeyboardLedsChanged" value="45">
13879 <desc>
13880 See <link to="IKeyboardLedsChangedEvent">IKeyboardLedsChangedEvent</link>.
13881 </desc>
13882 </const>
13883 <const name="OnStateChanged" value="46">
13884 <desc>
13885 See <link to="IStateChangedEvent">IStateChangedEvent</link>.
13886 </desc>
13887 </const>
13888 <const name="OnAdditionsStateChanged" value="47">
13889 <desc>
13890 See <link to="IAdditionsStateChangedEvent">IAdditionsStateChangedEvent</link>.
13891 </desc>
13892 </const>
13893 <const name="OnNetworkAdapterChanged" value="48">
13894 <desc>
13895 See <link to="INetworkAdapterChangedEvent">INetworkAdapterChangedEvent</link>.
13896 </desc>
13897 </const>
13898 <const name="OnSerialPortChanged" value="49">
13899 <desc>
13900 See <link to="ISerialPortChangedEvent">ISerialPortChangedEvent</link>.
13901 </desc>
13902 </const>
13903 <const name="OnParallelPortChanged" value="50">
13904 <desc>
13905 See <link to="IParallelPortChangedEvent">IParallelPortChangedEvent</link>.
13906 </desc>
13907 </const>
13908 <const name="OnStorageControllerChanged" value="51">
13909 <desc>
13910 See <link to="IStorageControllerChangedEvent">IStorageControllerChangedEvent</link>.
13911 </desc>
13912 </const>
13913 <const name="OnMediumChanged" value="52">
13914 <desc>
13915 See <link to="IMediumChangedEvent">IMediumChangedEvent</link>.
13916 </desc>
13917 </const>
13918 <const name="OnVRDPServerChanged" value="53">
13919 <desc>
13920 See <link to="IVRDPServerChangedEvent">IVRDPServerChangedEvent</link>.
13921 </desc>
13922 </const>
13923 <const name="OnUSBControllerChanged" value="54">
13924 <desc>
13925 See <link to="IUSBControllerChangedEvent">IUSBControllerChangedEvent</link>.
13926 </desc>
13927 </const>
13928 <const name="OnUSBDeviceStateChanged" value="55">
13929 <desc>
13930 See <link to="IUSBDeviceStateChangedEvent">IUSBDeviceStateChangedEvent</link>.
13931 </desc>
13932 </const>
13933 <const name="OnSharedFolderChanged" value="56">
13934 <desc>
13935 See <link to="ISharedFolderChangedEvent">ISharedFolderChangedEvent</link>.
13936 </desc>
13937 </const>
13938 <const name="OnRuntimeError" value="57">
13939 <desc>
13940 See <link to="IRuntimeErrorEvent">IRuntimeErrorEvent</link>.
13941 </desc>
13942 </const>
13943 <const name="OnCanShowWindow" value="58">
13944 <desc>
13945 See <link to="ICanShowWindowEvent">ICanShowWindowEvent</link>.
13946 </desc>
13947 </const>
13948 <const name="OnShowWindow" value="59">
13949 <desc>
13950 See <link to="IShowWindowEvent">IShowWindowEvent</link>.
13951 </desc>
13952 </const>
13953 <const name="OnCPUChanged" value="60">
13954 <desc>
13955 See <link to="ICPUChangedEvent">ICPUChangedEvent</link>.
13956 </desc>
13957 </const>
13958 <const name="OnRemoteDisplayInfoChanged" value="61">
13959 <desc>
13960 See <link to="IRemoteDisplayInfoChangedEvent">IRemoteDisplayInfoChangedEvent</link>.
13961 </desc>
13962 </const>
13963 <const name="OnEventSourceChanged" value="62">
13964 <desc>
13965 See <link to="IEventSourceChangedEvent">IEventSourceChangedEvent</link>.
13966 </desc>
13967 </const>
13968 <const name="OnCPUPriorityChanged" value="63">
13969 <desc>
13970 See <link to="ICPUPriorityChangedEvent">ICPUPriorityChangedEvent</link>.
13971 </desc>
13972 </const>
13973 <!-- Last event marker -->
13974 <const name="Last" value="64">
13975 <desc>
13976 Must be last event, used for iterations and structures relying on numerical event values.
13977 </desc>
13978 </const>
13979
13980 </enum>
13981
13982 <interface
13983 name="IEventSource" extends="$unknown"
13984 uuid="3c670618-f727-4fe9-94d2-8243f489a033"
13985 wsmap="managed"
13986 >
13987 <desc>
13988 Event source. Generally, any object which could generate events can be an event source,
13989 or aggregate one. To simplify using one-way protocols such as webservices running on top of HTTP(S),
13990 an event source can work with listeners in either active or passive mode. In active mode it is up to
13991 the IEventSource implementation to call <link to="IEventListener::handleEvent" />, in passive mode the
13992 event source keeps track of pending events for each listener and returns available events on demand.
13993
13994 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
13995 </desc>
13996
13997 <method name="createListener">
13998 <desc>
13999 Creates a new listener object, useful for passive mode.
14000 </desc>
14001 <param name="listener" type="IEventListener" dir="return"/>
14002 </method>
14003
14004 <method name="registerListener">
14005 <desc>
14006 Register an event listener.
14007
14008 <note>
14009 To avoid system overload, the VirtualBox server process checks if passive event
14010 listeners call <link to="IEventSource::getEvent"/> frequently enough. In the
14011 current implementation, if more than 100 pending events are detected for a passive
14012 event listener, it is forcefully unregistered by the system, and further
14013 <link to="#getEvent" /> calls will return @c VBOX_E_OBJECT_NOT_FOUND.
14014 </note>
14015 </desc>
14016 <param name="listener" type="IEventListener" dir="in">
14017 <desc>Listener to register.</desc>
14018 </param>
14019 <param name="interesting" type="VBoxEventType" dir="in" safearray="yes">
14020 <desc>
14021 Event types listener is interested in. One can use wildcards like -
14022 <link to="VBoxEventType::Any"/> to specify wildcards, matching more
14023 than one event.
14024 </desc>
14025 </param>
14026 <param name="active" type="boolean" dir="in">
14027 <desc>
14028 Which mode this listener is operating in.
14029 In active mode, <link to="IEventListener::handleEvent" /> is called directly.
14030 In passive mode, an internal event queue is created for this this IEventListener.
14031 For each event coming in, it is added to queues for all interested registered passive
14032 listeners. It is then up to the external code to call the listener's
14033 <link to="IEventListener::handleEvent" /> method. When done with an event, the
14034 external code must call <link to="#eventProcessed" />.
14035 </desc>
14036 </param>
14037 </method>
14038
14039 <method name="unregisterListener">
14040 <desc>
14041 Unregister an event listener. If listener is passive, and some waitable events are still
14042 in queue they are marked as processed automatically.
14043 </desc>
14044 <param name="listener" type="IEventListener" dir="in">
14045 <desc>Listener to unregister.</desc>
14046 </param>
14047 </method>
14048
14049 <method name="fireEvent">
14050 <desc>
14051 Fire an event for this source.
14052 </desc>
14053 <param name="event" type="IEvent" dir="in">
14054 <desc>Event to deliver.</desc>
14055 </param>
14056 <param name="timeout" type="long" dir="in">
14057 <desc>
14058 Maximum time to wait for event processing (if event is waitable), in ms;
14059 0 = no wait, -1 = indefinite wait.
14060 </desc>
14061 </param>
14062 <param name="result" type="boolean" dir="return">
14063 <desc>true if an event was delivered to all targets, or is non-waitable.</desc>
14064 </param>
14065 </method>
14066
14067 <method name="getEvent">
14068 <desc>
14069 Get events from this peer's event queue (for passive mode). Calling this method
14070 regularly is required for passive event listeners to avoid system overload;
14071 see <link to="IEventSource::registerListener" /> for details.
14072
14073 <result name="VBOX_E_OBJECT_NOT_FOUND">
14074 Listener is not registered, or autounregistered.
14075 </result>
14076 </desc>
14077 <param name="listener" type="IEventListener" dir="in">
14078 <desc>Which listener to get data for.</desc>
14079 </param>
14080 <param name="timeout" type="long" dir="in">
14081 <desc>
14082 Maximum time to wait for events, in ms;
14083 0 = no wait, -1 = indefinite wait.
14084 </desc>
14085 </param>
14086 <param name="event" type="IEvent" dir="return">
14087 <desc>Event retrieved, or null if none available.</desc>
14088 </param>
14089 </method>
14090
14091 <method name="eventProcessed">
14092 <desc>
14093 Must be called for waitable events after a particular listener finished its
14094 event processing. When all listeners of a particular event have called this
14095 method, the system will then call <link to="IEvent::setProcessed" />.
14096 </desc>
14097 <param name="listener" type="IEventListener" dir="in">
14098 <desc>Which listener processed event.</desc>
14099 </param>
14100 <param name="event" type="IEvent" dir="in">
14101 <desc>Which event.</desc>
14102 </param>
14103 </method>
14104
14105 </interface>
14106
14107 <interface
14108 name="IEventListener" extends="$unknown"
14109 uuid="67099191-32e7-4f6c-85ee-422304c71b90"
14110 wsmap="managed"
14111 >
14112 <desc>
14113 Event listener. An event listener can work in either active or passive mode, depending on the way
14114 it was registered.
14115 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
14116 </desc>
14117
14118 <method name="handleEvent">
14119 <desc>
14120 Handle event callback (called directly by IEventSource in active mode, or could be
14121 called by event processor thread in passive mode).
14122 </desc>
14123 <param name="event" type="IEvent" dir="in">
14124 <desc>Event available.</desc>
14125 </param>
14126 </method>
14127
14128 </interface>
14129
14130 <interface
14131 name="IEvent" extends="$unknown"
14132 uuid="0ca2adba-8f30-401b-a8cd-fe31dbe839c0"
14133 wsmap="managed"
14134 >
14135 <desc>
14136 Abstract parent interface for VirtualBox events. Actual events will typically implement
14137 a more specific interface which derives from this (see below).
14138
14139 <b>Introduction to VirtualBox events</b>
14140
14141 Generally speaking, an event (represented by this interface) signals that something
14142 happened, while an event listener (see <link to="IEventListener" />) represents an
14143 entity that is interested in certain events. In order for this to work with
14144 unidirectional protocols (i.e. web services), the concepts of passive and active
14145 listener are used.
14146
14147 Event consumers can register themselves as listeners, providing an array of
14148 events they are interested in (see <link to="IEventSource::registerListener" />).
14149 When an event triggers, the listener is notified about the event. The exact
14150 mechanism of the notification depends on whether the listener was registered as
14151 an active or passive listener:
14152
14153 <ul>
14154 <li>An active listener is very similar to a callback: it is a function invoked
14155 by the API. As opposed to the callbacks that were used in the API before
14156 VirtualBox 3.3 however, events are now objects with an interface hierarchy.
14157 </li>
14158
14159 <li>Passive listeners are somewhat tricker to implement, but do not require
14160 a client function to be callable, which is not an option with scripting
14161 languages or web service clients. Internally the <link to="IEventSource" />
14162 implementation maintains an event queue for each passive listener, and
14163 newly arrived events are put in this queue. When the listener calls
14164 <link to="IEventSource::getEvent"/>, first element from its internal event
14165 queue is returned. When the client completes processing of an event,
14166 the <link to="IEventSource::eventProcessed" /> function must be called,
14167 acknowledging that the event was processed. It supports implementing
14168 waitable events. On passive listener unregistration, all events from its
14169 queue are auto-acknowledged.
14170 </li>
14171 </ul>
14172
14173 Waitable events are useful in situations where the event generator wants to track
14174 delivery or a party wants to wait until all listeners have completed the event. A
14175 typical example would be a vetoable event (see <link to="IVetoEvent" />) where a
14176 listeners might veto a certain action, and thus the event producer has to make
14177 sure that all listeners have processed the event and not vetoed before taking
14178 the action.
14179
14180 A given event may have both passive and active listeners at the same time.
14181
14182 <b>Using events</b>
14183
14184 Any VirtualBox object capable of producing externally visible events provides an
14185 @c eventSource read-only attribute, which is of the type <link to="IEventSource" />.
14186 This event source object is notified by VirtualBox once something has happened, so
14187 consumers may register event listeners with this event source. To register a listener,
14188 an object implementing the <link to="IEventListener" /> interface must be provided.
14189 For active listeners, such an object is typically created by the consumer, while for
14190 passive listeners <link to="IEventSource::createListener" /> should be used. Please
14191 note that a listener created with @c createListener() must not be used as an active listener.
14192
14193 Once created, the listener must be registered to listen for the desired events
14194 (see <link to="IEventSource::registerListener" />), providing an array of
14195 <link to="VBoxEventType" /> enums. Those elements can either be the individual
14196 event IDs or wildcards matching multiple event IDs.
14197
14198 After registration, the callback's <link to="IEventListener::handleEvent" /> method is
14199 called automatically when the event is triggered, while passive listeners have to call
14200 <link to="IEventSource::getEvent" /> and <link to="IEventSource::eventProcessed" /> in
14201 an event processing loop.
14202
14203 The IEvent interface is an abstract parent interface for all such VirtualBox events
14204 coming in. As a result, the standard use pattern inside <link to="IEventListener::handleEvent" />
14205 or the event processing loop is to check the <link to="#type" /> attribute of the event and
14206 then cast to the appropriate specific interface using @c QueryInterface().
14207 </desc>
14208
14209 <attribute name="type" readonly="yes" type="VBoxEventType">
14210 <desc>
14211 Event type.
14212 </desc>
14213 </attribute>
14214
14215 <attribute name="source" readonly="yes" type="IEventSource">
14216 <desc>
14217 Source of this event.
14218 </desc>
14219 </attribute>
14220
14221 <attribute name="waitable" readonly="yes" type="boolean">
14222 <desc>
14223 If we can wait for this event being processed. If false, waitProcessed() returns immediately,
14224 and setProcessed() doesn't make sense. Non-waitable events are generally better performing,
14225 as no additional overhead associated with waitability imposed.
14226 Waitable events are needed when one need to be able to wait for particular event processed,
14227 for example for vetoable changes, or if event refers to some resource which need to be kept immutable
14228 until all consumers confirmed events.
14229 </desc>
14230 </attribute>
14231
14232 <method name="setProcessed">
14233 <desc>
14234 Internal method called by the system when all listeners of a particular event have called
14235 <link to="IEventSource::eventProcessed" />. This should not be called by client code.
14236 </desc>
14237 </method>
14238
14239 <method name="waitProcessed">
14240 <desc>
14241 Wait until time outs, or this event is processed. Event must be waitable for this operation to have
14242 described semantics, for non-waitable returns true immediately.
14243 </desc>
14244 <param name="timeout" type="long" dir="in">
14245 <desc>
14246 Maximum time to wait for event processeing, in ms;
14247 0 = no wait, -1 = indefinite wait.
14248 </desc>
14249 </param>
14250 <param name="result" type="boolean" dir="return">
14251 <desc>If this event was processed before timeout.</desc>
14252 </param>
14253 </method>
14254 </interface>
14255
14256
14257 <interface
14258 name="IReusableEvent" extends="IEvent"
14259 uuid="69bfb134-80f6-4266-8e20-16371f68fa25"
14260 wsmap="managed"
14261 >
14262 <desc>Base abstract interface for all reusable events.</desc>
14263
14264 <attribute name="generation" readonly="yes" type="unsigned long">
14265 <desc>Current generation of event, incremented on reuse.</desc>
14266 </attribute>
14267
14268 <method name="reuse">
14269 <desc>
14270 Marks an event as reused, increments 'generation', fields shall no
14271 longer be considered valid.
14272 </desc>
14273 </method>
14274 </interface>
14275
14276 <interface
14277 name="IMachineEvent" extends="IEvent"
14278 uuid="92ed7b1a-0d96-40ed-ae46-a564d484325e"
14279 wsmap="managed" id="MachineEvent"
14280 >
14281 <desc>Base abstract interface for all machine events.</desc>
14282
14283 <attribute name="machineId" readonly="yes" type="uuid" mod="string">
14284 <desc>ID of the machine this event relates to.</desc>
14285 </attribute>
14286
14287 </interface>
14288
14289 <interface
14290 name="IMachineStateChangedEvent" extends="IMachineEvent"
14291 uuid="5748F794-48DF-438D-85EB-98FFD70D18C9"
14292 wsmap="managed" autogen="VBoxEvent" id="OnMachineStateChanged"
14293 >
14294 <desc>Machine state change event.</desc>
14295
14296 <attribute name="state" readonly="yes" type="MachineState">
14297 <desc>New execution state.</desc>
14298 </attribute>
14299 </interface>
14300
14301 <interface
14302 name="IMachineDataChangedEvent" extends="IMachineEvent"
14303 uuid="6AA70A6C-0DCA-4810-8C5C-457B278E3D49"
14304 wsmap="managed" autogen="VBoxEvent" id="OnMachineDataChanged"
14305 >
14306 <desc>
14307 Any of the settings of the given machine has changed.
14308 </desc>
14309 </interface>
14310
14311 <interface
14312 name="IMediumRegisteredEvent" extends="IEvent"
14313 uuid="53fac49a-b7f1-4a5a-a4ef-a11dd9c2a458"
14314 wsmap="managed" autogen="VBoxEvent" id="OnMediumRegistered"
14315 >
14316 <desc>
14317 The given medium was registered or unregistered
14318 within this VirtualBox installation.
14319 </desc>
14320
14321 <attribute name="mediumId" readonly="yes" type="uuid" mod="string">
14322 <desc>ID of the medium this event relates to.</desc>
14323 </attribute>
14324
14325 <attribute name="mediumType" readonly="yes" type="DeviceType">
14326 <desc>Type of the medium this event relates to.</desc>
14327 </attribute>
14328
14329 <attribute name="registered" type="boolean" readonly="yes">
14330 <desc>
14331 If @c true, the medium was registered, otherwise it was
14332 unregistered.
14333 </desc>
14334 </attribute>
14335 </interface>
14336
14337 <interface
14338 name="IMachineRegisteredEvent" extends="IMachineEvent"
14339 uuid="c354a762-3ff2-4f2e-8f09-07382ee25088"
14340 wsmap="managed" autogen="VBoxEvent" id="OnMachineRegistered"
14341 >
14342 <desc>
14343 The given machine was registered or unregistered
14344 within this VirtualBox installation.
14345 </desc>
14346
14347 <attribute name="registered" type="boolean" readonly="yes">
14348 <desc>
14349 If @c true, the machine was registered, otherwise it was
14350 unregistered.
14351 </desc>
14352 </attribute>
14353 </interface>
14354
14355 <interface
14356 name="ISessionStateChangedEvent" extends="IMachineEvent"
14357 uuid="714a3eef-799a-4489-86cd-fe8e45b2ff8e"
14358 wsmap="managed" autogen="VBoxEvent" id="OnSessionStateChanged"
14359 >
14360 <desc>
14361 The state of the session for the given machine was changed.
14362 <see>IMachine::sessionState</see>
14363 </desc>
14364
14365 <attribute name="state" type="SessionState" readonly="yes">
14366 <desc>
14367 New session state.
14368 </desc>
14369 </attribute>
14370 </interface>
14371
14372 <interface
14373 name="IGuestPropertyChangedEvent" extends="IMachineEvent"
14374 uuid="3f63597a-26f1-4edb-8dd2-6bddd0912368"
14375 wsmap="managed" autogen="VBoxEvent" id="OnGuestPropertyChanged"
14376 >
14377 <desc>
14378 Notification when a guest property has changed.
14379 </desc>
14380
14381 <attribute name="name" readonly="yes" type="wstring">
14382 <desc>
14383 The name of the property that has changed.
14384 </desc>
14385 </attribute>
14386
14387 <attribute name="value" readonly="yes" type="wstring">
14388 <desc>
14389 The new property value.
14390 </desc>
14391 </attribute>
14392
14393 <attribute name="flags" readonly="yes" type="wstring">
14394 <desc>
14395 The new property flags.
14396 </desc>
14397 </attribute>
14398
14399 </interface>
14400
14401 <interface
14402 name="ISnapshotEvent" extends="IMachineEvent"
14403 uuid="21637b0e-34b8-42d3-acfb-7e96daf77c22"
14404 wsmap="managed" id="SnapshotEvent"
14405 >
14406 <desc>Base interface for all snapshot events.</desc>
14407
14408 <attribute name="snapshotId" readonly="yes" type="uuid" mod="string">
14409 <desc>ID of the snapshot this event relates to.</desc>
14410 </attribute>
14411
14412 </interface>
14413
14414 <interface
14415 name="ISnapshotTakenEvent" extends="ISnapshotEvent"
14416 uuid="d27c0b3d-6038-422c-b45e-6d4a0503d9f1"
14417 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotTaken"
14418 >
14419 <desc>
14420 A new snapshot of the machine has been taken.
14421 <see>ISnapshot</see>
14422 </desc>
14423 </interface>
14424
14425 <interface
14426 name="ISnapshotDeletedEvent" extends="ISnapshotEvent"
14427 uuid="c48f3401-4a9e-43f4-b7a7-54bd285e22f4"
14428 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotDeleted"
14429 >
14430 <desc>
14431 Snapshot of the given machine has been deleted.
14432
14433 <note>
14434 This notification is delivered <b>after</b> the snapshot
14435 object has been uninitialized on the server (so that any
14436 attempt to call its methods will return an error).
14437 </note>
14438
14439 <see>ISnapshot</see>
14440 </desc>
14441 </interface>
14442
14443 <interface
14444 name="ISnapshotChangedEvent" extends="ISnapshotEvent"
14445 uuid="07541941-8079-447a-a33e-47a69c7980db"
14446 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotChanged"
14447 >
14448 <desc>
14449 Snapshot properties (name and/or description) have been changed.
14450 <see>ISnapshot</see>
14451 </desc>
14452 </interface>
14453
14454 <interface
14455 name="IMousePointerShapeChangedEvent" extends="IEvent"
14456 uuid="a6dcf6e8-416b-4181-8c4a-45ec95177aef"
14457 wsmap="managed" autogen="VBoxEvent" id="OnMousePointerShapeChanged"
14458 >
14459 <desc>
14460 Notification when the guest mouse pointer shape has
14461 changed. The new shape data is given.
14462 </desc>
14463
14464 <attribute name="visible" type="boolean" readonly="yes">
14465 <desc>
14466 Flag whether the pointer is visible.
14467 </desc>
14468 </attribute>
14469 <attribute name="alpha" type="boolean" readonly="yes">
14470 <desc>
14471 Flag whether the pointer has an alpha channel.
14472 </desc>
14473 </attribute>
14474 <attribute name="xhot" type="unsigned long" readonly="yes">
14475 <desc>
14476 The pointer hot spot X coordinate.
14477 </desc>
14478 </attribute>
14479 <attribute name="yhot" type="unsigned long" readonly="yes">
14480 <desc>
14481 The pointer hot spot Y coordinate.
14482 </desc>
14483 </attribute>
14484 <attribute name="width" type="unsigned long" readonly="yes">
14485 <desc>
14486 Width of the pointer shape in pixels.
14487 </desc>
14488 </attribute>
14489 <attribute name="height" type="unsigned long" readonly="yes">
14490 <desc>
14491 Height of the pointer shape in pixels.
14492 </desc>
14493 </attribute>
14494 <attribute name="shape" type="octet" safearray="yes" readonly="yes">
14495 <desc>
14496 Shape buffer arrays.
14497
14498 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
14499 followed by a 32-bpp XOR (color) mask.
14500
14501 For pointers without alpha channel the XOR mask pixels are 32
14502 bit values: (lsb)BGR0(msb). For pointers with alpha channel
14503 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
14504
14505 An AND mask is used for pointers with alpha channel, so if the
14506 callback does not support alpha, the pointer could be
14507 displayed as a normal color pointer.
14508
14509 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
14510 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
14511 height</tt>. The padding bits at the end of each scanline are
14512 undefined.
14513
14514 The XOR mask follows the AND mask on the next 4-byte aligned
14515 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
14516 Bytes in the gap between the AND and the XOR mask are undefined.
14517 The XOR mask scanlines have no gap between them and the size of
14518 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
14519
14520 <note>
14521 If @a shape is 0, only the pointer visibility is changed.
14522 </note>
14523 </desc>
14524 </attribute>
14525 </interface>
14526
14527 <interface
14528 name="IMouseCapabilityChangedEvent" extends="IEvent"
14529 uuid="d633ad48-820c-4207-b46c-6bd3596640d5"
14530 wsmap="managed" autogen="VBoxEvent" id="OnMouseCapabilityChanged"
14531 >
14532 <desc>
14533 Notification when the mouse capabilities reported by the
14534 guest have changed. The new capabilities are passed.
14535 </desc>
14536 <attribute name="supportsAbsolute" type="boolean" readonly="yes">
14537 <desc>
14538 Supports absolute coordinates.
14539 </desc>
14540 </attribute>
14541 <attribute name="supportsRelative" type="boolean" readonly="yes">
14542 <desc>
14543 Supports relative coordinates.
14544 </desc>
14545 </attribute>
14546 <attribute name="needsHostCursor" type="boolean" readonly="yes">
14547 <desc>
14548 If host cursor is needed.
14549 </desc>
14550 </attribute>
14551 </interface>
14552
14553 <interface
14554 name="IKeyboardLedsChangedEvent" extends="IEvent"
14555 uuid="6DDEF35E-4737-457B-99FC-BC52C851A44F"
14556 wsmap="managed" autogen="VBoxEvent" id="OnKeyboardLedsChanged"
14557 >
14558 <desc>
14559 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
14560 to alter the state of the keyboard LEDs.
14561 </desc>
14562 <attribute name="numLock" type="boolean" readonly="yes">
14563 <desc>
14564 NumLock status.
14565 </desc>
14566 </attribute>
14567 <attribute name="capsLock" type="boolean" readonly="yes">
14568 <desc>
14569 CapsLock status.
14570 </desc>
14571 </attribute>
14572 <attribute name="scrollLock" type="boolean" readonly="yes">
14573 <desc>
14574 ScrollLock status.
14575 </desc>
14576 </attribute>
14577 </interface>
14578
14579 <interface
14580 name="IStateChangedEvent" extends="IEvent"
14581 uuid="4376693C-CF37-453B-9289-3B0F521CAF27"
14582 wsmap="managed" autogen="VBoxEvent" id="OnStateChanged"
14583 >
14584 <desc>
14585 Notification when the execution state of the machine has changed.
14586 The new state is given.
14587 </desc>
14588 <attribute name="state" type="MachineState" readonly="yes">
14589 <desc>
14590 New machine state.
14591 </desc>
14592 </attribute>
14593 </interface>
14594
14595 <interface
14596 name="IAdditionsStateChangedEvent" extends="IEvent"
14597 uuid="D70F7915-DA7C-44C8-A7AC-9F173490446A"
14598 wsmap="managed" autogen="VBoxEvent" id="OnAdditionsStateChanged"
14599 >
14600 <desc>
14601 Notification when a Guest Additions property changes.
14602 Interested callees should query IGuest attributes to
14603 find out what has changed.
14604 </desc>
14605 </interface>
14606
14607 <interface
14608 name="INetworkAdapterChangedEvent" extends="IEvent"
14609 uuid="08889892-1EC6-4883-801D-77F56CFD0103"
14610 wsmap="managed" autogen="VBoxEvent" id="OnNetworkAdapterChanged"
14611 >
14612 <desc>
14613 Notification when a property of one of the
14614 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
14615 changes. Interested callees should use INetworkAdapter methods and
14616 attributes to find out what has changed.
14617 </desc>
14618 <attribute name="networkAdapter" type="INetworkAdapter" readonly="yes">
14619 <desc>
14620 Network adapter that is subject to change.
14621 </desc>
14622 </attribute>
14623 </interface>
14624
14625 <interface
14626 name="ISerialPortChangedEvent" extends="IEvent"
14627 uuid="3BA329DC-659C-488B-835C-4ECA7AE71C6C"
14628 wsmap="managed" autogen="VBoxEvent" id="OnSerialPortChanged"
14629 >
14630 <desc>
14631 Notification when a property of one of the
14632 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
14633 Interested callees should use ISerialPort methods and attributes
14634 to find out what has changed.
14635 </desc>
14636 <attribute name="serialPort" type="ISerialPort" readonly="yes">
14637 <desc>
14638 Serial port that is subject to change.
14639 </desc>
14640 </attribute>
14641 </interface>
14642
14643 <interface
14644 name="IParallelPortChangedEvent" extends="IEvent"
14645 uuid="813C99FC-9849-4F47-813E-24A75DC85615"
14646 wsmap="managed" autogen="VBoxEvent" id="OnParallelPortChanged"
14647 >
14648 <desc>
14649 Notification when a property of one of the
14650 virtual <link to="IMachine::getParallelPort">parallel ports</link>
14651 changes. Interested callees should use ISerialPort methods and
14652 attributes to find out what has changed.
14653 </desc>
14654 <attribute name="parallelPort" type="IParallelPort" readonly="yes">
14655 <desc>
14656 Parallel port that is subject to change.
14657 </desc>
14658 </attribute>
14659 </interface>
14660
14661 <interface
14662 name="IStorageControllerChangedEvent" extends="IEvent"
14663 uuid="715212BF-DA59-426E-8230-3831FAA52C56"
14664 wsmap="managed" autogen="VBoxEvent" id="OnStorageControllerChanged"
14665 >
14666 <desc>
14667 Notification when a
14668 <link to="IMachine::mediumAttachments">medium attachment</link>
14669 changes.
14670 </desc>
14671 </interface>
14672
14673 <interface
14674 name="IMediumChangedEvent" extends="IEvent"
14675 uuid="0FE2DA40-5637-472A-9736-72019EABD7DE"
14676 wsmap="managed" autogen="VBoxEvent" id="OnMediumChanged"
14677 >
14678 <desc>
14679 Notification when a
14680 <link to="IMachine::mediumAttachments">medium attachment</link>
14681 changes.
14682 </desc>
14683 <attribute name="mediumAttachment" type="IMediumAttachment" readonly="yes">
14684 <desc>
14685 Medium attachment that is subject to change.
14686 </desc>
14687 </attribute>
14688 </interface>
14689
14690 <interface
14691 name="ICPUChangedEvent" extends="IEvent"
14692 uuid="D0F0BECC-EE17-4D17-A8CC-383B0EB55E9D"
14693 wsmap="managed" autogen="VBoxEvent" id="OnCPUChanged"
14694 >
14695 <desc>
14696 Notification when a CPU changes.
14697 </desc>
14698 <attribute name="cpu" type="unsigned long" readonly="yes">
14699 <desc>
14700 The CPU which changed.
14701 </desc>
14702 </attribute>
14703 <attribute name="add" type="boolean" readonly="yes">
14704 <desc>
14705 Flag whether the CPU was added or removed.
14706 </desc>
14707 </attribute>
14708 </interface>
14709
14710 <interface
14711 name="ICPUPriorityChangedEvent" extends="IEvent"
14712 uuid="657fe2fe-a75a-4cb6-8cf9-072aa41e7d75"
14713 wsmap="managed" autogen="VBoxEvent" id="OnCPUPriorityChanged"
14714 >
14715 <desc>
14716 Notification when the CPU priority changes.
14717 </desc>
14718 <attribute name="priority" type="unsigned long" readonly="yes">
14719 <desc>
14720 The new CPU priority value. (1-100)
14721 </desc>
14722 </attribute>
14723 </interface>
14724
14725 <interface
14726 name="IVRDPServerChangedEvent" extends="IEvent"
14727 uuid="726038B6-6279-4A7A-8037-D041693D1915"
14728 wsmap="managed" autogen="VBoxEvent" id="OnVRDPServerChanged"
14729 >
14730 <desc>
14731 Notification when a property of the
14732 <link to="IMachine::VRDPServer">VRDP server</link> changes.
14733 Interested callees should use IVRDPServer methods and attributes to
14734 find out what has changed.
14735 </desc>
14736 </interface>
14737
14738 <interface
14739 name="IRemoteDisplayInfoChangedEvent" extends="IEvent"
14740 uuid="65B556C5-2A99-47D8-B311-FC177F0914CD"
14741 wsmap="managed" autogen="VBoxEvent" id="OnRemoteDisplayInfoChanged"
14742 >
14743 <desc>
14744 Notification when the status of the VRDP server changes. Interested callees
14745 should use <link to="IConsole::remoteDisplayInfo">IRemoteDisplayInfo</link>
14746 attributes to find out what is the current status.
14747 </desc>
14748 </interface>
14749
14750 <interface
14751 name="IUSBControllerChangedEvent" extends="IEvent"
14752 uuid="93BADC0C-61D9-4940-A084-E6BB29AF3D83"
14753 wsmap="managed" autogen="VBoxEvent" id="OnUSBControllerChanged"
14754 >
14755 <desc>
14756 Notification when a property of the virtual
14757 <link to="IMachine::USBController">USB controller</link> changes.
14758 Interested callees should use IUSBController methods and attributes to
14759 find out what has changed.
14760 </desc>
14761 </interface>
14762
14763 <interface
14764 name="IUSBDeviceStateChangedEvent" extends="IEvent"
14765 uuid="806da61b-6679-422a-b629-51b06b0c6d93"
14766 wsmap="managed" autogen="VBoxEvent" id="OnUSBDeviceStateChanged"
14767 >
14768 <desc>
14769 Notification when a USB device is attached to or detached from
14770 the virtual USB controller.
14771
14772 This notification is sent as a result of the indirect
14773 request to attach the device because it matches one of the
14774 machine USB filters, or as a result of the direct request
14775 issued by <link to="IConsole::attachUSBDevice"/> or
14776 <link to="IConsole::detachUSBDevice"/>.
14777
14778 This notification is sent in case of both a succeeded and a
14779 failed request completion. When the request succeeds, the
14780 @a error parameter is @c null, and the given device has been
14781 already added to (when @a attached is @c true) or removed from
14782 (when @a attached is @c false) the collection represented by
14783 <link to="IConsole::USBDevices"/>. On failure, the collection
14784 doesn't change and the @a error parameter represents the error
14785 message describing the failure.
14786 </desc>
14787 <attribute name="device" type="IUSBDevice" readonly="yes">
14788 <desc>
14789 Device that is subject to state change.
14790 </desc>
14791 </attribute>
14792 <attribute name="attached" type="boolean" readonly="yes">
14793 <desc>
14794 @c true if the device was attached and @c false otherwise.
14795 </desc>
14796 </attribute>
14797 <attribute name="error" type="IVirtualBoxErrorInfo" readonly="yes">
14798 <desc>
14799 @c null on success or an error message object on failure.
14800 </desc>
14801 </attribute>
14802 </interface>
14803
14804 <interface
14805 name="ISharedFolderChangedEvent" extends="IEvent"
14806 uuid="B66349B5-3534-4239-B2DE-8E1535D94C0B"
14807 wsmap="managed" autogen="VBoxEvent" id="OnSharedFolderChanged"
14808 >
14809 <desc>
14810 Notification when a shared folder is added or removed.
14811 The @a scope argument defines one of three scopes:
14812 <link to="IVirtualBox::sharedFolders">global shared folders</link>
14813 (<link to="Scope::Global">Global</link>),
14814 <link to="IMachine::sharedFolders">permanent shared folders</link> of
14815 the machine (<link to="Scope::Machine">Machine</link>) or <link
14816 to="IConsole::sharedFolders">transient shared folders</link> of the
14817 machine (<link to="Scope::Session">Session</link>). Interested callees
14818 should use query the corresponding collections to find out what has
14819 changed.
14820 </desc>
14821 <attribute name="scope" type="Scope" readonly="yes">
14822 <desc>
14823 Scope of the notification.
14824 </desc>
14825 </attribute>
14826 </interface>
14827
14828 <interface
14829 name="IRuntimeErrorEvent" extends="IEvent"
14830 uuid="883DD18B-0721-4CDE-867C-1A82ABAF914C"
14831 wsmap="managed" autogen="VBoxEvent" id="OnRuntimeError"
14832 >
14833 <desc>
14834 Notification when an error happens during the virtual
14835 machine execution.
14836
14837 There are three kinds of runtime errors:
14838 <ul>
14839 <li><i>fatal</i></li>
14840 <li><i>non-fatal with retry</i></li>
14841 <li><i>non-fatal warnings</i></li>
14842 </ul>
14843
14844 <b>Fatal</b> errors are indicated by the @a fatal parameter set
14845 to @c true. In case of fatal errors, the virtual machine
14846 execution is always paused before calling this notification, and
14847 the notification handler is supposed either to immediately save
14848 the virtual machine state using <link to="IConsole::saveState"/>
14849 or power it off using <link to="IConsole::powerDown"/>.
14850 Resuming the execution can lead to unpredictable results.
14851
14852 <b>Non-fatal</b> errors and warnings are indicated by the
14853 @a fatal parameter set to @c false. If the virtual machine
14854 is in the Paused state by the time the error notification is
14855 received, it means that the user can <i>try to resume</i> the machine
14856 execution after attempting to solve the problem that caused the
14857 error. In this case, the notification handler is supposed
14858 to show an appropriate message to the user (depending on the
14859 value of the @a id parameter) that offers several actions such
14860 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
14861 wants to retry, the notification handler should continue
14862 the machine execution using the <link to="IConsole::resume"/>
14863 call. If the machine execution is not Paused during this
14864 notification, then it means this notification is a <i>warning</i>
14865 (for example, about a fatal condition that can happen very soon);
14866 no immediate action is required from the user, the machine
14867 continues its normal execution.
14868
14869 Note that in either case the notification handler
14870 <b>must not</b> perform any action directly on a thread
14871 where this notification is called. Everything it is allowed to
14872 do is to post a message to another thread that will then talk
14873 to the user and take the corresponding action.
14874
14875 Currently, the following error identifiers are known:
14876 <ul>
14877 <li><tt>"HostMemoryLow"</tt></li>
14878 <li><tt>"HostAudioNotResponding"</tt></li>
14879 <li><tt>"VDIStorageFull"</tt></li>
14880 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
14881 </ul>
14882 </desc>
14883 <attribute name="fatal" type="boolean" readonly="yes">
14884 <desc>
14885 Whether the error is fatal or not.
14886 </desc>
14887 </attribute>
14888 <attribute name="id" type="wstring" readonly="yes">
14889 <desc>
14890 Error identifier.
14891 </desc>
14892 </attribute>
14893 <attribute name="message" type="wstring" readonly="yes">
14894 <desc>
14895 Optional error message.
14896 </desc>
14897 </attribute>
14898 </interface>
14899
14900
14901 <interface
14902 name="IEventSourceChangedEvent" extends="IEvent"
14903 uuid="e7932cb8-f6d4-4ab6-9cbf-558eb8959a6a"
14904 waitable="yes"
14905 wsmap="managed" autogen="VBoxEvent" id="OnEventSourceChanged"
14906 >
14907 <desc>
14908 Notification when an event source state changes (listener added or removed).
14909 </desc>
14910
14911 <attribute name="listener" type="IEventListener" readonly="yes">
14912 <desc>
14913 Event listener which has changed.
14914 </desc>
14915 </attribute>
14916
14917 <attribute name="add" type="boolean" readonly="yes">
14918 <desc>
14919 Flag whether listener was added or removed.
14920 </desc>
14921 </attribute>
14922 </interface>
14923
14924 <interface
14925 name="IExtraDataChangedEvent" extends="IEvent"
14926 uuid="024F00CE-6E0B-492A-A8D0-968472A94DC7"
14927 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataChanged"
14928 >
14929 <desc>
14930 Notification when machine specific or global extra data
14931 has changed.
14932 </desc>
14933 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
14934 <desc>
14935 ID of the machine this event relates to.
14936 Null for global extra data changes.
14937 </desc>
14938 </attribute>
14939 <attribute name="key" type="wstring" readonly="yes">
14940 <desc>
14941 Extra data key that has changed.
14942 </desc>
14943 </attribute>
14944 <attribute name="value" type="wstring" readonly="yes">
14945 <desc>
14946 Extra data value for the given key.
14947 </desc>
14948 </attribute>
14949 </interface>
14950
14951 <interface
14952 name="IVetoEvent" extends="IEvent"
14953 uuid="9a1a4130-69fe-472f-ac10-c6fa25d75007"
14954 wsmap="managed"
14955 >
14956 <desc>Base abstract interface for veto events.</desc>
14957
14958 <method name="addVeto">
14959 <desc>
14960 Adds a veto on this event.
14961 </desc>
14962 <param name="reason" type="wstring" dir="in">
14963 <desc>
14964 Reason for veto, could be null or empty string.
14965 </desc>
14966 </param>
14967 </method>
14968
14969 <method name="isVetoed">
14970 <desc>
14971 If this event was vetoed.
14972 </desc>
14973 <param name="result" type="boolean" dir="return">
14974 <desc>
14975 Reason for veto.
14976 </desc>
14977 </param>
14978 </method>
14979
14980 <method name="getVetos">
14981 <desc>
14982 Current veto reason list, if size is 0 - no veto.
14983 </desc>
14984 <param name="result" type="wstring" dir="return" safearray="yes">
14985 <desc>
14986 Array of reasons for veto provided by different event handlers.
14987 </desc>
14988 </param>
14989 </method>
14990
14991 </interface>
14992
14993 <interface
14994 name="IExtraDataCanChangeEvent" extends="IVetoEvent"
14995 uuid="245d88bd-800a-40f8-87a6-170d02249a55"
14996 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataCanChange"
14997 waitable="true"
14998 >
14999 <desc>
15000 Notification when someone tries to change extra data for
15001 either the given machine or (if @c null) global extra data.
15002 This gives the chance to veto against changes.
15003 </desc>
15004 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
15005 <desc>
15006 ID of the machine this event relates to.
15007 Null for global extra data changes.
15008 </desc>
15009 </attribute>
15010 <attribute name="key" type="wstring" readonly="yes">
15011 <desc>
15012 Extra data key that has changed.
15013 </desc>
15014 </attribute>
15015 <attribute name="value" type="wstring" readonly="yes">
15016 <desc>
15017 Extra data value for the given key.
15018 </desc>
15019 </attribute>
15020 </interface>
15021
15022 <interface
15023 name="ICanShowWindowEvent" extends="IVetoEvent"
15024 uuid="adf292b0-92c9-4a77-9d35-e058b39fe0b9"
15025 wsmap="managed" autogen="VBoxEvent" id="OnCanShowWindow"
15026 waitable="true"
15027 >
15028 <desc>
15029 Notification when a call to
15030 <link to="IMachine::canShowConsoleWindow"/> is made by a
15031 front-end to check if a subsequent call to
15032 <link to="IMachine::showConsoleWindow"/> can succeed.
15033
15034 The callee should give an answer appropriate to the current
15035 machine state using event veto. This answer must
15036 remain valid at least until the next
15037 <link to="IConsole::state">machine state</link> change.
15038 </desc>
15039 </interface>
15040
15041 <interface
15042 name="IShowWindowEvent" extends="IEvent"
15043 uuid="B0A0904D-2F05-4D28-855F-488F96BAD2B2"
15044 wsmap="managed" autogen="VBoxEvent" id="OnShowWindow"
15045 waitable="true"
15046 >
15047 <desc>
15048 Notification when a call to
15049 <link to="IMachine::showConsoleWindow"/>
15050 requests the console window to be activated and brought to
15051 foreground on the desktop of the host PC.
15052
15053 This notification should cause the VM console process to
15054 perform the requested action as described above. If it is
15055 impossible to do it at a time of this notification, this
15056 method should return a failure.
15057
15058 Note that many modern window managers on many platforms
15059 implement some sort of focus stealing prevention logic, so
15060 that it may be impossible to activate a window without the
15061 help of the currently active application (which is supposedly
15062 an initiator of this notification). In this case, this method
15063 must return a non-zero identifier that represents the
15064 top-level window of the VM console process. The caller, if it
15065 represents a currently active process, is responsible to use
15066 this identifier (in a platform-dependent manner) to perform
15067 actual window activation.
15068
15069 This method must set @a winId to zero if it has performed all
15070 actions necessary to complete the request and the console
15071 window is now active and in foreground, to indicate that no
15072 further action is required on the caller's side.
15073 </desc>
15074 <attribute name="winId" type="long long">
15075 <desc>
15076 Platform-dependent identifier of the top-level VM console
15077 window, or zero if this method has performed all actions
15078 necessary to implement the <i>show window</i> semantics for
15079 the given platform and/or this VirtualBox front-end.
15080 </desc>
15081 </attribute>
15082 </interface>
15083
15084 <module name="VBoxSVC" context="LocalServer">
15085 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
15086 namespace="virtualbox.org">
15087 <interface name="IVirtualBox" default="yes"/>
15088 </class>
15089 </module>
15090
15091 <module name="VBoxC" context="InprocServer" threadingModel="Free">
15092 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
15093 namespace="virtualbox.org">
15094 <interface name="ISession" default="yes"/>
15095 </class>
15096
15097 <class name="Console" uuid="577230FF-164F-4CAC-8548-312D8275A4A7"
15098 namespace="virtualbox.org">
15099 <interface name="IConsole" default="yes"/>
15100 </class>
15101 </module>
15102
15103</library>
15104
15105</idl>
15106
15107<!-- 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