VirtualBox

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

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

Guest Copy/VBoxManage+Main: Implemented first working "copyto" command (single file only, no progress), in development.

  • Property svn:eol-style set to native
File size: 561.4 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 4.0.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="5e887b09-e3f3-4787-b9f3-8ade5d04d675"
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 <method name="composeMachineFilename">
1517 <desc>
1518 Returns the full path of the settings file name that <link to="#createMachine" />
1519 would use. This method gets called by createMachine(), but calling this method
1520 independently might be helpful if one needs to create the machine directory
1521 to place files (such as disk images) there before actually creating the machine.
1522
1523 See the <link to="IMachine::name"/> attribute description for more details about
1524 the machine name.
1525
1526 Every machine has a <i>settings file</i> that is used to store
1527 the machine configuration. This file is stored in a directory called the
1528 <i>machine settings subfolder</i>. Both the settings subfolder and file
1529 will have a name that corresponds to the name of the virtual machine.
1530 You can specify where to create the machine setting subfolder using the
1531 @a baseFolder argument. The base folder can be absolute (full path) or
1532 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1533 directory</link>.
1534
1535 If @a baseFolder is a @c null or empty string (which is recommended), the
1536 <link to="ISystemProperties::defaultMachineFolder">default machine
1537 settings folder</link> will be used as a base folder for the created
1538 machine. Otherwise the given base folder will be used. In either case,
1539 the full path to the resulting settings file has the following
1540 structure:
1541 <pre>
1542 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1543 </pre>
1544
1545
1546 This method does not access the host disks. In particular, it does not check for
1547 whether a machine of this name already exists.
1548 </desc>
1549 <param name="name" type="wstring" dir="in">
1550 <desc>Suggested machine name.</desc>
1551 </param>
1552 <param name="baseFolder" type="wstring" dir="in">
1553 <desc>Base machine folder (optional).</desc>
1554 </param>
1555 <param name="file" type="wstring" dir="return">
1556 <desc>Fully qualified path where the machine would be created.</desc>
1557 </param>
1558 </method>
1559
1560 <method name="createMachine">
1561 <desc>
1562 Creates a new virtual machine.
1563
1564 The new machine is created unregistered, with the initial configuration
1565 set according to the specified guest OS type. A typical sequence of
1566 actions to create a new virtual machine is as follows:
1567
1568 <ol>
1569 <li>
1570 Call this method to have a new machine created. The returned machine
1571 object will be "mutable" allowing to change any machine property.
1572 </li>
1573
1574 <li>
1575 Configure the machine using the appropriate attributes and methods.
1576 </li>
1577
1578 <li>
1579 Call <link to="IMachine::saveSettings" /> to write the settings
1580 to the machine's XML settings file. The configuration of the newly
1581 created machine will not be saved to disk until this method is
1582 called.
1583 </li>
1584
1585 <li>
1586 Call <link to="#registerMachine" /> to add the machine to the list
1587 of machines known to VirtualBox.
1588 </li>
1589 </ol>
1590
1591 The specified guest OS type identifier must match an ID of one of known
1592 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1593 array.
1594
1595 This method uses the <link to="#composeMachineFilename" /> method to determine
1596 where to create the machine's directory and settings file. Please refer
1597 to the additional remarks and restrictions there.
1598
1599 If the resulting settings file already exists, this method will fail
1600 with <link to="VBOX_E_FILE_ERROR"/>.
1601
1602 Optionally, you may specify an UUID of to assign to the created machine.
1603 However, this is not recommended and you should normally pass an empty
1604 (@c null) UUID to this method so that a new UUID will be automatically
1605 generated for every created machine. You can use UUID
1606 00000000-0000-0000-0000-000000000000 as @c null value.
1607
1608 <note>
1609 There is no way to change the name of the settings file or
1610 subfolder of the created machine directly.
1611 </note>
1612
1613 <result name="VBOX_E_OBJECT_NOT_FOUND">
1614 @a osTypeId is invalid.
1615 </result>
1616 <result name="VBOX_E_FILE_ERROR">
1617 Resulting settings file name is invalid or the settings file already
1618 exists or could not be created due to an I/O error.
1619 </result>
1620 <result name="E_INVALIDARG">
1621 @a name is empty or @c null.
1622 </result>
1623 </desc>
1624
1625 <param name="name" type="wstring" dir="in">
1626 <desc>Machine name.</desc>
1627 </param>
1628 <param name="osTypeId" type="wstring" dir="in">
1629 <desc>Guest OS Type ID.</desc>
1630 </param>
1631 <param name="baseFolder" type="wstring" dir="in">
1632 <desc>Base machine folder (optional).</desc>
1633 </param>
1634 <param name="id" type="uuid" mod="string" dir="in">
1635 <desc>Machine UUID (optional).</desc>
1636 </param>
1637 <param name="override" type="boolean" dir="in">
1638 <desc>Create the VM even if there are conflicting files.</desc>
1639 </param>
1640 <param name="machine" type="IMachine" dir="return">
1641 <desc>Created machine object.</desc>
1642 </param>
1643 </method>
1644
1645 <method name="openMachine">
1646 <desc>
1647 Opens a virtual machine from the existing settings file.
1648 The opened machine remains unregistered until you call
1649 <link to="#registerMachine"/>.
1650
1651 The specified settings file name can be absolute
1652 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1653 VirtualBox home directory</link>. This file must exist
1654 and must be a valid machine settings file whose contents
1655 will be used to construct the machine object.
1656
1657 <result name="VBOX_E_FILE_ERROR">
1658 Settings file name invalid, not found or sharing violation.
1659 </result>
1660 </desc>
1661 <param name="settingsFile" type="wstring" dir="in">
1662 <desc>
1663 Name of the machine settings file.
1664 </desc>
1665 </param>
1666 <param name="machine" type="IMachine" dir="return">
1667 <desc>Opened machine object.</desc>
1668 </param>
1669 <note>
1670 <link to="IMachine::settingsModified"/> will return
1671 @c false for the created machine, until any of machine settings
1672 are changed.
1673 </note>
1674 </method>
1675
1676 <method name="registerMachine">
1677 <desc>
1678
1679 Registers the machine previously created using
1680 <link to="#createMachine"/> or opened using
1681 <link to="#openMachine"/> within this VirtualBox installation. After
1682 successful method invocation, the
1683 <link to="IMachineRegisteredEvent"/> event is fired.
1684
1685 <note>
1686 This method implicitly calls <link to="IMachine::saveSettings"/>
1687 to save all current machine settings before registering it.
1688 </note>
1689
1690 <result name="VBOX_E_OBJECT_NOT_FOUND">
1691 No matching virtual machine found.
1692 </result>
1693 <result name="VBOX_E_INVALID_OBJECT_STATE">
1694 Virtual machine was not created within this VirtualBox instance.
1695 </result>
1696
1697 </desc>
1698 <param name="machine" type="IMachine" dir="in"/>
1699 </method>
1700
1701 <method name="findMachine">
1702 <desc>
1703 Attempts to find a virtual machine given its name or UUID.
1704
1705 <note>Inaccessible machines cannot be found by name, only by UUID, because their name
1706 cannot safely be determined.</note>
1707
1708 <result name="VBOX_E_OBJECT_NOT_FOUND">
1709 Could not find registered machine matching @a nameOrId.
1710 </result>
1711
1712 </desc>
1713 <param name="nameOrId" type="wstring" dir="in">
1714 <desc>What to search for. This can either be the UUID or the name of a virtual machine.</desc>
1715 </param>
1716 <param name="machine" type="IMachine" dir="return">
1717 <desc>Machine object, if found.</desc>
1718 </param>
1719 </method>
1720
1721 <method name="createAppliance">
1722 <desc>
1723 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1724 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1725 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1726 </desc>
1727 <param name="appliance" type="IAppliance" dir="return">
1728 <desc>New appliance.</desc>
1729 </param>
1730 </method>
1731
1732 <method name="createHardDisk">
1733 <desc>
1734 Creates a new base medium object that will use the given storage
1735 format and location for medium data.
1736
1737 Note that the actual storage unit is not created by this method. In
1738 order to do it, and before you are able to attach the created medium
1739 to virtual machines, you must call one of the following methods to
1740 allocate a format-specific storage unit at the specified location:
1741 <ul>
1742 <li><link to="IMedium::createBaseStorage"/></li>
1743 <li><link to="IMedium::createDiffStorage"/></li>
1744 </ul>
1745
1746 Some medium attributes, such as <link to="IMedium::id"/>, may
1747 remain uninitialized until the medium storage unit is successfully
1748 created by one of the above methods.
1749
1750 After the storage unit is successfully created, it will be
1751 accessible through the <link to="#findMedium"/> method and can
1752 be found in the <link to="#hardDisks"/> array.
1753
1754 The list of all storage formats supported by this VirtualBox
1755 installation can be obtained using
1756 <link to="ISystemProperties::mediumFormats"/>. If the @a format
1757 attribute is empty or @c null then the default storage format
1758 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1759 be used for creating a storage unit of the medium.
1760
1761 Note that the format of the location string is storage format specific.
1762 See <link to="IMedium::location"/> and IMedium for more details.
1763
1764 <result name="VBOX_E_OBJECT_NOT_FOUND">
1765 @a format identifier is invalid. See
1766 <link to="ISystemProperties::mediumFormats"/>.
1767 </result>
1768 <result name="VBOX_E_FILE_ERROR">
1769 @a location is a not valid file name (for file-based formats only).
1770 </result>
1771 </desc>
1772 <param name="format" type="wstring" dir="in">
1773 <desc>
1774 Identifier of the storage format to use for the new medium.
1775 </desc>
1776 </param>
1777 <param name="location" type="wstring" dir="in">
1778 <desc>
1779 Location of the storage unit for the new medium.
1780 </desc>
1781 </param>
1782 <param name="medium" type="IMedium" dir="return">
1783 <desc>Created medium object.</desc>
1784 </param>
1785 </method>
1786
1787 <method name="openMedium">
1788 <desc>
1789 Opens a medium from an existing storage location.
1790
1791 Once a medium has been opened, it can be passed to other VirtualBox
1792 methods, in particular to <link to="IMachine::attachDevice" />.
1793
1794 Depending on the given device type, the file at the storage location
1795 must be in one of the media formats understood by VirtualBox:
1796
1797 <ul>
1798 <li>With a "HardDisk" device type, the file must be a hard disk image
1799 in one of the formats supported by VirtualBox (see
1800 <link to="ISystemProperties::mediumFormats" />).
1801 After this method succeeds, if the medium is a base medium, it
1802 will be added to the <link to="#hardDisks"/> array attribute. </li>
1803 <li>With a "DVD" device type, the file must be an ISO 9960 CD/DVD image.
1804 After this method succeeds, the medium will be added to the
1805 <link to="#DVDImages"/> array attribute.</li>
1806 <li>With a "Floppy" device type, the file must be an RAW floppy image.
1807 After this method succeeds, the medium will be added to the
1808 <link to="#floppyImages"/> array attribute.</li>
1809 </ul>
1810
1811 After having been opened, the medium can be found by the <link to="#findMedium"/>
1812 method and can be attached to virtual machines. See <link to="IMedium" /> for more details.
1813
1814 The UUID of the newly opened medium will either be retrieved from the
1815 storage location, if the format supports it (e.g. for hard disk images),
1816 or a new UUID will be randomly generated (e.g. for ISO and RAW files).
1817 If for some reason you need to change the medium's UUID, use
1818 <link to="IMedium::setIDs" />.
1819
1820 If a differencing hard disk medium is to be opened by this method, the
1821 operation will succeed only if its parent medium and all ancestors,
1822 if any, are already known to this VirtualBox installation (for example,
1823 were opened by this method before).
1824
1825 This method attempts to guess the storage format of the specified medium
1826 by reading medium data at the specified location.
1827
1828 If @a accessMode is ReadWrite (which it should be for hard disks and floppies),
1829 the image is opened for read/write access and must have according permissions,
1830 as VirtualBox may actually write status information into the disk's metadata
1831 sections.
1832
1833 Note that write access is required for all typical hard disk usage in VirtualBox,
1834 since VirtualBox may need to write metadata such as a UUID into the image.
1835 The only exception is opening a source image temporarily for copying and
1836 cloning (see <link to="IMedium::cloneTo" /> when the image will be closed
1837 again soon.
1838
1839 The format of the location string is storage format specific. See
1840 <link to="IMedium::location"/> and IMedium for more details.
1841
1842 Prior to VirtualBox 3.3, opening a medium added it to a global media
1843 registry in the VirtualBox.xml file, which was shared between
1844 all machines and made transporting machines and their media from one
1845 host to another difficult.
1846
1847 Starting with VirtualBox 3.3, media are only added to a registry when
1848 they are attached to a machine. Machines created with VirtualBox 3.3
1849 or later can have their own media registry. As a result, a medium attached
1850 to such a machine will be remembered in that machine's XML settings file.
1851 Media attached to older machines will continue to be added to the global
1852 registry.
1853
1854 <result name="VBOX_E_FILE_ERROR">
1855 Invalid medium storage file location or could not find the medium
1856 at the specified location.
1857 </result>
1858 <result name="VBOX_E_IPRT_ERROR">
1859 Could not get medium storage format.
1860 </result>
1861 <result name="E_INVALIDARG">
1862 Invalid medium storage format.
1863 </result>
1864 <result name="VBOX_E_INVALID_OBJECT_STATE">
1865 Medium has already been added to a media registry.
1866 </result>
1867 </desc>
1868 <param name="location" type="wstring" dir="in">
1869 <desc>
1870 Location of the storage unit that contains medium data in one of
1871 the supported storage formats.
1872 </desc>
1873 </param>
1874 <param name="deviceType" type="DeviceType" dir="in">
1875 <desc>
1876 Must be one of "HardDisk", "DVD" or "Floppy".
1877 </desc>
1878 </param>
1879 <param name="accessMode" type="AccessMode" dir="in">
1880 <desc>Whether to open the image in read/write or read-only mode. For
1881 a "DVD" device type, this is ignored and read-only mode is always assumed.</desc>
1882 </param>
1883 <param name="medium" type="IMedium" dir="return">
1884 <desc>Opened medium object.</desc>
1885 </param>
1886 </method>
1887
1888 <method name="findMedium">
1889 <desc>
1890 Returns a medium of the given type that uses the given fully qualified
1891 location or UUID to store medium data.
1892
1893 The given medium must be known to this VirtualBox installation, i.e.
1894 it must be previously created by <link to="#createHardDisk"/> or opened
1895 by <link to="#openMedium"/>.
1896
1897 The search is done by comparing the value of the @a location argument to
1898 the <link to="IMedium::location"/> and <link to="IMedium::id" />
1899 attributes of each known medium.
1900
1901 On case sensitive file systems, a case sensitive comparison is performed,
1902 otherwise the case of symbols in the file path is ignored.
1903
1904 <result name="VBOX_E_OBJECT_NOT_FOUND">
1905 No medium object matching @a location found.
1906 </result>
1907 </desc>
1908 <param name="location" type="wstring" dir="in">
1909 <desc>What to search for. This can either be the UUID or the location string of an open medium.</desc>
1910 </param>
1911 <param name="type" type="DeviceType" dir="in">
1912 <desc>Device type (must be HardDisk, DVD or Floppy)</desc>
1913 </param>
1914 <param name="medium" type="IMedium" dir="return">
1915 <desc>Medium object, if found.</desc>
1916 </param>
1917 </method>
1918
1919 <method name="getGuestOSType">
1920 <desc>
1921 Returns an object describing the specified guest OS type.
1922
1923 The requested guest OS type is specified using a string which is a
1924 mnemonic identifier of the guest operating system, such as
1925 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
1926 particular virtual machine can be read or set using the
1927 <link to="IMachine::OSTypeId"/> attribute.
1928
1929 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
1930 available guest OS type objects. Each object has an
1931 <link to="IGuestOSType::id"/> attribute which contains an identifier of
1932 the guest OS this object describes.
1933
1934 <result name="E_INVALIDARG">
1935 @a id is not a valid Guest OS type.
1936 </result>
1937
1938 </desc>
1939 <param name="id" type="uuid" mod="string" dir="in">
1940 <desc>Guest OS type ID string.</desc>
1941 </param>
1942 <param name="type" type="IGuestOSType" dir="return">
1943 <desc>Guest OS type object.</desc>
1944 </param>
1945 </method>
1946
1947 <method name="createSharedFolder">
1948 <desc>
1949 Creates a new global shared folder by associating the given logical
1950 name with the given host path, adds it to the collection of shared
1951 folders and starts sharing it. Refer to the description of
1952 <link to="ISharedFolder"/> to read more about logical names.
1953 <note>
1954 In the current implementation, this operation is not
1955 implemented.
1956 </note>
1957 </desc>
1958 <param name="name" type="wstring" dir="in">
1959 <desc>Unique logical name of the shared folder.</desc>
1960 </param>
1961 <param name="hostPath" type="wstring" dir="in">
1962 <desc>Full path to the shared folder in the host file system.</desc>
1963 </param>
1964 <param name="writable" type="boolean" dir="in">
1965 <desc>Whether the share is writable or readonly</desc>
1966 </param>
1967 <param name="automount" type="boolean" dir="in">
1968 <desc>Whether the share gets automatically mounted by the guest
1969 or not.</desc>
1970 </param>
1971 </method>
1972
1973 <method name="removeSharedFolder">
1974 <desc>
1975 Removes the global shared folder with the given name previously
1976 created by <link to="#createSharedFolder"/> from the collection of
1977 shared folders and stops sharing it.
1978 <note>
1979 In the current implementation, this operation is not
1980 implemented.
1981 </note>
1982 </desc>
1983 <param name="name" type="wstring" dir="in">
1984 <desc>Logical name of the shared folder to remove.</desc>
1985 </param>
1986 </method>
1987
1988 <method name="getExtraDataKeys">
1989 <desc>
1990 Returns an array representing the global extra data keys which currently
1991 have values defined.
1992 </desc>
1993 <param name="value" type="wstring" dir="return" safearray="yes">
1994 <desc>Array of extra data keys.</desc>
1995 </param>
1996 </method>
1997
1998 <method name="getExtraData">
1999 <desc>
2000 Returns associated global extra data.
2001
2002 If the requested data @a key does not exist, this function will
2003 succeed and return an empty string in the @a value argument.
2004
2005 <result name="VBOX_E_FILE_ERROR">
2006 Settings file not accessible.
2007 </result>
2008 <result name="VBOX_E_XML_ERROR">
2009 Could not parse the settings file.
2010 </result>
2011
2012 </desc>
2013 <param name="key" type="wstring" dir="in">
2014 <desc>Name of the data key to get.</desc>
2015 </param>
2016 <param name="value" type="wstring" dir="return">
2017 <desc>Value of the requested data key.</desc>
2018 </param>
2019 </method>
2020
2021 <method name="setExtraData">
2022 <desc>
2023 Sets associated global extra data.
2024
2025 If you pass @c null or empty string as a key @a value, the given @a key
2026 will be deleted.
2027
2028 <note>
2029 Before performing the actual data change, this method will ask all
2030 registered event listener using the
2031 <link to="IExtraDataCanChangeEvent"/>
2032 notification for a permission. If one of the listeners refuses the
2033 new value, the change will not be performed.
2034 </note>
2035 <note>
2036 On success, the
2037 <link to="IExtraDataChangedEvent"/> notification
2038 is called to inform all registered listeners about a successful data
2039 change.
2040 </note>
2041
2042 <result name="VBOX_E_FILE_ERROR">
2043 Settings file not accessible.
2044 </result>
2045 <result name="VBOX_E_XML_ERROR">
2046 Could not parse the settings file.
2047 </result>
2048 <result name="E_ACCESSDENIED">
2049 Modification request refused.
2050 </result>
2051
2052 </desc>
2053 <param name="key" type="wstring" dir="in">
2054 <desc>Name of the data key to set.</desc>
2055 </param>
2056 <param name="value" type="wstring" dir="in">
2057 <desc>Value to assign to the key.</desc>
2058 </param>
2059 </method>
2060
2061 <!--method name="createDHCPServerForInterface">
2062 <desc>
2063 Creates a dhcp server settings to be used for the given interface
2064 <result name="E_INVALIDARG">
2065 Host network interface @a name already exists.
2066 </result>
2067 </desc>
2068 <param name="interface" type="IHostNetworkInterface" dir="in">
2069 <desc>Network Interface</desc>
2070 </param>
2071 <param name="server" type="IDHCPServer" dir="out">
2072 <desc>Dhcp server settings</desc>
2073 </param>
2074 </method-->
2075
2076 <method name="createDHCPServer">
2077 <desc>
2078 Creates a dhcp server settings to be used for the given internal network name
2079 <result name="E_INVALIDARG">
2080 Host network interface @a name already exists.
2081 </result>
2082 </desc>
2083 <param name="name" type="wstring" dir="in">
2084 <desc>server name</desc>
2085 </param>
2086 <param name="server" type="IDHCPServer" dir="return">
2087 <desc>Dhcp server settings</desc>
2088 </param>
2089 </method>
2090
2091 <method name="findDHCPServerByNetworkName">
2092 <desc>
2093 Searches a dhcp server settings to be used for the given internal network name
2094 <result name="E_INVALIDARG">
2095 Host network interface @a name already exists.
2096 </result>
2097
2098 </desc>
2099 <param name="name" type="wstring" dir="in">
2100 <desc>server name</desc>
2101 </param>
2102 <param name="server" type="IDHCPServer" dir="return">
2103 <desc>Dhcp server settings</desc>
2104 </param>
2105 </method>
2106
2107 <!--method name="findDHCPServerForInterface">
2108 <desc>
2109 Searches a dhcp server settings to be used for the given interface
2110 <result name="E_INVALIDARG">
2111 Host network interface @a name already exists.
2112 </result>
2113 </desc>
2114 <param name="interface" type="IHostNetworkInterface" dir="in">
2115 <desc>Network Interface</desc>
2116 </param>
2117 <param name="server" type="IDHCPServer" dir="out">
2118 <desc>Dhcp server settings</desc>
2119 </param>
2120 </method-->
2121
2122 <method name="removeDHCPServer">
2123 <desc>
2124 Removes the dhcp server settings
2125 <result name="E_INVALIDARG">
2126 Host network interface @a name already exists.
2127 </result>
2128 </desc>
2129 <param name="server" type="IDHCPServer" dir="in">
2130 <desc>Dhcp server settings to be removed</desc>
2131 </param>
2132 </method>
2133
2134
2135 <method name="checkFirmwarePresent">
2136 <desc>
2137 Check if this VirtualBox installation has a firmware
2138 of the given type available, either system-wide or per-user.
2139 Optionally, this may return a hint where this firmware can be
2140 downloaded from.
2141 </desc>
2142 <param name="firmwareType" type="FirmwareType" dir="in">
2143 <desc>
2144 Type of firmware to check.
2145 </desc>
2146 </param>
2147 <param name="version" type="wstring" dir="in">
2148 <desc>Expected version number, usually empty string (presently ignored).</desc>
2149 </param>
2150
2151 <param name="url" type="wstring" dir="out">
2152 <desc>
2153 Suggested URL to download this firmware from.
2154 </desc>
2155 </param>
2156
2157 <param name="file" type="wstring" dir="out">
2158 <desc>
2159 Filename of firmware, only valid if result == TRUE.
2160 </desc>
2161 </param>
2162
2163 <param name="result" type="boolean" dir="return">
2164 <desc>If firmware of this type and version is available.</desc>
2165 </param>
2166 </method>
2167
2168 </interface>
2169
2170 <!--
2171 // IVFSExplorer
2172 /////////////////////////////////////////////////////////////////////////
2173 -->
2174
2175 <enum
2176 name="VFSType"
2177 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
2178 >
2179 <desc>
2180 Virtual file systems supported by VFSExplorer.
2181 </desc>
2182
2183 <const name="File" value="1" />
2184 <const name="Cloud" value="2" />
2185 <const name="S3" value="3" />
2186 <const name="WebDav" value="4" />
2187 </enum>
2188
2189 <enum
2190 name="VFSFileType"
2191 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
2192 >
2193 <desc>
2194 File types known by VFSExplorer.
2195 </desc>
2196
2197 <const name="Unknown" value="1" />
2198 <const name="Fifo" value="2" />
2199 <const name="DevChar" value="3" />
2200 <const name="Directory" value="4" />
2201 <const name="DevBlock" value="5" />
2202 <const name="File" value="6" />
2203 <const name="SymLink" value="7" />
2204 <const name="Socket" value="8" />
2205 <const name="WhiteOut" value="9" />
2206 </enum>
2207
2208 <interface
2209 name="IVFSExplorer" extends="$unknown"
2210 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
2211 wsmap="managed"
2212 >
2213 <desc>
2214 The VFSExplorer interface unifies access to different file system
2215 types. This includes local file systems as well remote file systems like
2216 S3. For a list of supported types see <link to="VFSType" />.
2217 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
2218 </desc>
2219
2220 <attribute name="path" type="wstring" readonly="yes">
2221 <desc>Returns the current path in the virtual file system.</desc>
2222 </attribute>
2223
2224 <attribute name="type" type="VFSType" readonly="yes">
2225 <desc>Returns the file system type which is currently in use.</desc>
2226 </attribute>
2227
2228 <method name="update">
2229 <desc>Updates the internal list of files/directories from the
2230 current directory level. Use <link to="#entryList" /> to get the full list
2231 after a call to this method.</desc>
2232
2233 <param name="aProgress" type="IProgress" dir="return">
2234 <desc>Progress object to track the operation completion.</desc>
2235 </param>
2236 </method>
2237
2238 <method name="cd">
2239 <desc>Change the current directory level.</desc>
2240
2241 <param name="aDir" type="wstring" dir="in">
2242 <desc>The name of the directory to go in.</desc>
2243 </param>
2244
2245 <param name="aProgress" type="IProgress" dir="return">
2246 <desc>Progress object to track the operation completion.</desc>
2247 </param>
2248 </method>
2249
2250 <method name="cdUp">
2251 <desc>Go one directory upwards from the current directory level.</desc>
2252
2253 <param name="aProgress" type="IProgress" dir="return">
2254 <desc>Progress object to track the operation completion.</desc>
2255 </param>
2256 </method>
2257
2258 <method name="entryList">
2259 <desc>Returns a list of files/directories after a call to <link
2260 to="#update" />. The user is responsible for keeping this internal
2261 list up do date.</desc>
2262
2263 <param name="aNames" type="wstring" safearray="yes" dir="out">
2264 <desc>The list of names for the entries.</desc>
2265 </param>
2266
2267 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
2268 <desc>The list of types for the entries.</desc>
2269 </param>
2270 </method>
2271
2272 <method name="exists">
2273 <desc>Checks if the given file list exists in the current directory
2274 level.</desc>
2275
2276 <param name="aNames" type="wstring" safearray="yes" dir="in">
2277 <desc>The names to check.</desc>
2278 </param>
2279
2280 <param name="aExists" type="wstring" safearray="yes" dir="return">
2281 <desc>The names which exist.</desc>
2282 </param>
2283 </method>
2284
2285 <method name="remove">
2286 <desc>Deletes the given files in the current directory level.</desc>
2287
2288 <param name="aNames" type="wstring" safearray="yes" dir="in">
2289 <desc>The names to remove.</desc>
2290 </param>
2291
2292 <param name="aProgress" type="IProgress" dir="return">
2293 <desc>Progress object to track the operation completion.</desc>
2294 </param>
2295 </method>
2296
2297 </interface>
2298
2299 <!--
2300 // IAppliance
2301 /////////////////////////////////////////////////////////////////////////
2302 -->
2303
2304 <interface
2305 name="IAppliance" extends="$unknown"
2306 uuid="7b148032-4124-4f46-b56a-b48ac1273f5a"
2307 wsmap="managed"
2308 >
2309 <desc>
2310 Represents a platform-independent appliance in OVF format. An instance of this is returned
2311 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
2312 virtual machines within an appliance with VirtualBox.
2313
2314 The OVF standard suggests two different physical file formats:
2315
2316 <ol>
2317 <li>If the appliance is distributed as a set of files, there must be at least one XML descriptor
2318 file that conforms to the OVF standard and carries an <tt>.ovf</tt> file extension. If
2319 this descriptor file references other files such as disk images, as OVF appliances typically
2320 do, those additional files must be in the same directory as the descriptor file.</li>
2321
2322 <li>If the appliance is distributed as a single file, it must be in TAR format and have the
2323 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
2324 files and optionally other files.
2325
2326 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
2327 be added with a later version.</li>
2328 </ol>
2329
2330 <b>Importing</b> an OVF appliance into VirtualBox as instances of
2331 <link to="IMachine" /> involves the following sequence of API calls:
2332
2333 <ol>
2334 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
2335 </li>
2336
2337 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
2338 would like to import. So long as this file is syntactically valid, this will succeed
2339 and fill the appliance object with the parsed data from the OVF file.
2340 </li>
2341
2342 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
2343 contents of the IAppliance attributes accordingly. These can be inspected by a
2344 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
2345 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
2346 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
2347 systems (machines) in the OVF, which in turn describe the virtual hardware prescribed
2348 by the OVF (network and hardware adapters, virtual disk images, memory size and so on).
2349 The GUI can then give the user the option to confirm and/or change these suggestions.
2350 </li>
2351
2352 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
2353 virtual system (machine) to override the suggestions made by the interpret() routine.
2354 </li>
2355
2356 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
2357 VirtualBox as instances of <link to="IMachine" /> that match the information in the
2358 virtual system descriptions. After this call suceeded, the UUIDs of the machines created
2359 can be found in the <link to="#machines" /> array attribute.
2360 </li>
2361 </ol>
2362
2363 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
2364
2365 <ol>
2366 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
2367 an empty IAppliance object.
2368 </li>
2369
2370 <li>For each machine you would like to export, call <link to="IMachine::export" />
2371 with the IAppliance object you just created. Each such call creates one instance of
2372 <link to="IVirtualSystemDescription" /> inside the appliance.
2373 </li>
2374
2375 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
2376 virtual system (machine) to override the suggestions made by the export() routine.
2377 </li>
2378
2379 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
2380 file written.</li>
2381 </ol>
2382
2383 </desc>
2384
2385 <attribute name="path" type="wstring" readonly="yes">
2386 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
2387 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
2388 <link to="#write" /> (for export).
2389 This attribute is empty until one of these methods has been called.
2390 </desc>
2391 </attribute>
2392
2393 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
2394 <desc>
2395 Array of virtual disk definitions. One such description exists for each
2396 disk definition in the OVF; each string array item represents one such piece of
2397 disk information, with the information fields separated by tab (\t) characters.
2398
2399 The caller should be prepared for additional fields being appended to
2400 this string in future versions of VirtualBox and therefore check for
2401 the number of tabs in the strings returned.
2402
2403 In the current version, the following eight fields are returned per string
2404 in the array:
2405
2406 <ol>
2407 <li>Disk ID (unique string identifier given to disk)</li>
2408
2409 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
2410
2411 <li>Populated size (optional unsigned integer indicating the current size of the
2412 disk; can be approximate; -1 if unspecified)</li>
2413
2414 <li>Format (string identifying the disk format, typically
2415 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
2416
2417 <li>Reference (where to find the disk image, typically a file name; if empty,
2418 then the disk should be created on import)</li>
2419
2420 <li>Image size (optional unsigned integer indicating the size of the image,
2421 which need not necessarily be the same as the values specified above, since
2422 the image may be compressed or sparse; -1 if not specified)</li>
2423
2424 <li>Chunk size (optional unsigned integer if the image is split into chunks;
2425 presently unsupported and always -1)</li>
2426
2427 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
2428 </ol>
2429 </desc>
2430 </attribute>
2431
2432 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
2433 <desc> Array of virtual system descriptions. One such description is created
2434 for each virtual system (machine) found in the OVF.
2435 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
2436 (for export) has been called.
2437 </desc>
2438 </attribute>
2439
2440 <attribute name="machines" type="wstring" readonly="yes" safearray="yes">
2441 <desc>
2442 Contains the UUIDs of the machines created from the information in this appliances. This is only
2443 relevant for the import case, and will only contain data after a call to <link to="#importMachines" />
2444 succeeded.
2445 </desc>
2446 </attribute>
2447
2448 <method name="read">
2449 <desc>
2450 Reads an OVF file into the appliance object.
2451
2452 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
2453 mere fact that this method returns successfully does not mean that VirtualBox supports all
2454 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
2455 </desc>
2456 <param name="file" type="wstring" dir="in">
2457 <desc>
2458 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
2459 on whether the appliance is distributed as a set of files or as a single file, respectively).
2460 </desc>
2461 </param>
2462 <param name="aProgress" type="IProgress" dir="return">
2463 <desc>Progress object to track the operation completion.</desc>
2464 </param>
2465 </method>
2466
2467 <method name="interpret">
2468 <desc>
2469 Interprets the OVF data that was read when the appliance was constructed. After
2470 calling this method, one can inspect the
2471 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
2472 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
2473 the appliance.
2474
2475 Calling this method is the second step of importing an appliance into VirtualBox;
2476 see <link to="IAppliance" /> for an overview.
2477
2478 After calling this method, one should call <link to="#getWarnings" /> to find out
2479 if problems were encountered during the processing which might later lead to
2480 errors.
2481 </desc>
2482 </method>
2483
2484 <method name="importMachines">
2485 <desc>
2486 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
2487 and other interfaces that match the information contained in the appliance as
2488 closely as possible, as represented by the import instructions in the
2489 <link to="#virtualSystemDescriptions" /> array.
2490
2491 Calling this method is the final step of importing an appliance into VirtualBox;
2492 see <link to="IAppliance" /> for an overview.
2493
2494 Since importing the appliance will most probably involve copying and converting
2495 disk images, which can take a long time, this method operates asynchronously and
2496 returns an IProgress object to allow the caller to monitor the progress.
2497
2498 After the import succeeded, the UUIDs of the IMachine instances created can be
2499 retrieved from the <link to="#machines" /> array attribute.
2500 </desc>
2501
2502 <param name="aProgress" type="IProgress" dir="return">
2503 <desc>Progress object to track the operation completion.</desc>
2504 </param>
2505 </method>
2506
2507 <method name="createVFSExplorer">
2508 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
2509
2510 <param name="aUri" type="wstring" dir="in">
2511 <desc>The URI describing the file system to use.</desc>
2512 </param>
2513
2514 <param name="aExplorer" type="IVFSExplorer" dir="return">
2515 <desc></desc>
2516 </param>
2517 </method>
2518
2519 <method name="write">
2520 <desc>
2521 Writes the contents of the appliance exports into a new OVF file.
2522
2523 Calling this method is the final step of exporting an appliance from VirtualBox;
2524 see <link to="IAppliance" /> for an overview.
2525
2526 Since exporting the appliance will most probably involve copying and converting
2527 disk images, which can take a long time, this method operates asynchronously and
2528 returns an IProgress object to allow the caller to monitor the progress.
2529 </desc>
2530 <param name="format" type="wstring" dir="in">
2531 <desc>
2532 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
2533 future versions of VirtualBox may support additional formats.
2534 </desc>
2535 </param>
2536 <param name="manifest" type="boolean" dir="in">
2537 <desc>
2538 Indicate if the optional manifest file (.mf) should be written. The manifest file
2539 is used for integrity checks prior import.
2540 </desc>
2541 </param>
2542 <param name="path" type="wstring" dir="in">
2543 <desc>
2544 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
2545 on whether the appliance is distributed as a set of files or as a single file, respectively).
2546 </desc>
2547 </param>
2548 <param name="progress" type="IProgress" dir="return">
2549 <desc>Progress object to track the operation completion.</desc>
2550 </param>
2551 </method>
2552
2553 <method name="getWarnings">
2554 <desc>Returns textual warnings which occurred during execution of <link to="#interpret" />.</desc>
2555
2556 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
2557 <desc></desc>
2558 </param>
2559 </method>
2560
2561 </interface>
2562
2563 <enum
2564 name="VirtualSystemDescriptionType"
2565 uuid="c0f8f135-3a1d-417d-afa6-b38b95a91f90"
2566 >
2567 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
2568 a configuration value.</desc>
2569
2570 <const name="Ignore" value="1" />
2571 <const name="OS" value="2" />
2572 <const name="Name" value="3" />
2573 <const name="Product" value="4" />
2574 <const name="Vendor" value="5" />
2575 <const name="Version" value="6" />
2576 <const name="ProductUrl" value="7" />
2577 <const name="VendorUrl" value="8" />
2578 <const name="Description" value="9" />
2579 <const name="License" value="10" />
2580 <const name="Miscellaneous" value="11" />
2581 <const name="CPU" value="12" />
2582 <const name="Memory" value="13" />
2583 <const name="HardDiskControllerIDE" value="14" />
2584 <const name="HardDiskControllerSATA" value="15" />
2585 <const name="HardDiskControllerSCSI" value="16" />
2586 <const name="HardDiskControllerSAS" value="17" />
2587 <const name="HardDiskImage" value="18" />
2588 <const name="Floppy" value="19" />
2589 <const name="CDROM" value="20" />
2590 <const name="NetworkAdapter" value="21" />
2591 <const name="USBController" value="22" />
2592 <const name="SoundCard" value="23" />
2593
2594 </enum>
2595
2596 <enum
2597 name="VirtualSystemDescriptionValueType"
2598 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
2599 >
2600 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
2601 type to fetch.</desc>
2602
2603 <const name="Reference" value="1" />
2604 <const name="Original" value="2" />
2605 <const name="Auto" value="3" />
2606 <const name="ExtraConfig" value="4" />
2607
2608 </enum>
2609
2610 <interface
2611 name="IVirtualSystemDescription" extends="$unknown"
2612 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
2613 wsmap="managed"
2614 >
2615
2616 <desc>Represents one virtual system (machine) in an appliance. This interface is used in
2617 the <link to="IAppliance::virtualSystemDescriptions" /> array. After
2618 <link to="IAppliance::interpret" /> has been called, that array contains information
2619 about how the virtual systems described in the OVF should best be imported into
2620 VirtualBox virtual machines. See <link to="IAppliance" /> for the steps required to
2621 import an OVF into VirtualBox.
2622 </desc>
2623
2624 <attribute name="count" type="unsigned long" readonly="yes">
2625 <desc>Return the number of virtual system description entries.</desc>
2626 </attribute>
2627
2628 <method name="getDescription">
2629 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
2630 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
2631
2632 The list below identifies the value sets that are possible depending on the
2633 <link to="VirtualSystemDescriptionType" /> enum value in the array item in @a aTypes[]. In each case,
2634 the array item with the same index in @a aOvfValues[] will contain the original value as contained
2635 in the OVF file (just for informational purposes), and the corresponding item in @a aVBoxValues[]
2636 will contain a suggested value to be used for VirtualBox. Depending on the description type,
2637 the @a aExtraConfigValues[] array item may also be used.
2638
2639 <ul>
2640 <li>
2641 "OS": the guest operating system type. There must be exactly one such array item on import. The
2642 corresponding item in @a aVBoxValues[] contains the suggested guest operating system for VirtualBox.
2643 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
2644 item in @a aOvfValues[] will contain a numerical value that described the operating system in the OVF.
2645 </li>
2646 <li>
2647 "Name": the name to give to the new virtual machine. There can be at most one such array item;
2648 if none is present on import, then an automatic name will be created from the operating system
2649 type. The correponding item im @a aOvfValues[] will contain the suggested virtual machine name
2650 from the OVF file, and @a aVBoxValues[] will contain a suggestion for a unique VirtualBox
2651 <link to="IMachine" /> name that does not exist yet.
2652 </li>
2653 <li>
2654 "Description": an arbitrary description.
2655 </li>
2656 <li>
2657 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
2658 code to display such a license for agreement; the Main API does not enforce any such policy.
2659 </li>
2660 <li>
2661 Miscellaneous: reserved for future use.
2662 </li>
2663 <li>
2664 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
2665 </li>
2666 <li>
2667 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
2668 is present on import, then VirtualBox will set a meaningful default based on the operating system
2669 type.
2670 </li>
2671 <li>
2672 "HardDiskControllerIDE": an IDE hard disk controller. There can be at most two such items.
2673 An optional value in @a aOvfValues[] and @a aVBoxValues[] can be "PIIX3" or "PIIX4" to specify
2674 the type of IDE controller; this corresponds to the ResourceSubType element which VirtualBox
2675 writes into the OVF.
2676 The matching item in the @a aRefs[] array will contain an integer that items of the "Harddisk"
2677 type can use to specify which hard disk controller a virtual disk should be connected to.
2678 Note that in OVF, an IDE controller has two channels, corresponding to "master" and "slave"
2679 in traditional terminology, whereas the IDE storage controller that VirtualBox supports in
2680 its virtual machines supports four channels (primary master, primary slave, secondary master,
2681 secondary slave) and thus maps to two IDE controllers in the OVF sense.
2682 </li>
2683 <li>
2684 "HardDiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
2685 has no value in @a aOvfValues[] or @a aVBoxValues[].
2686 The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
2687 </li>
2688 <li>
2689 "HardDiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
2690 The items in @a aOvfValues[] and @a aVBoxValues[] will either be "LsiLogic", "BusLogic" or
2691 "LsiLogicSas". (Note that in OVF, the LsiLogicSas controller is treated as a SCSI controller
2692 whereas VirtualBox considers it a class of storage controllers of its own; see
2693 <link to="StorageControllerType" />).
2694 The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
2695 </li>
2696 <li>
2697 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
2698 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
2699
2700 The array item in @a aOvfValues[] will contain the file specification from the OVF file (without
2701 a path since the image file should be in the same location as the OVF file itself), whereas the
2702 item in @a aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
2703 hard disk image. This means that on import the image will be copied and converted from the
2704 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
2705
2706 The matching item in the @a aExtraConfigValues[] array must contain a string of the following
2707 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
2708 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
2709 the image to. That number must be the index of an array item with one of the hard disk controller
2710 types (HardDiskControllerSCSI, HardDiskControllerSATA, HardDiskControllerIDE).
2711 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
2712 this can be 0 or 1 for master or slave, respectively. For compatibility with VirtualBox versions
2713 before 3.2, the values 2 and 3 (for secondary master and secondary slave) are also supported, but
2714 no longer exported. For SATA and SCSI controllers, the channel can range from 0-29.
2715 </li>
2716 <li>
2717 "CDROM": a virtual CD-ROM drive. The matching item in @a aExtraConfigValue[] contains the same
2718 attachment information as with "HardDiskImage" items.
2719 </li>
2720 <li>
2721 "CDROM": a virtual floppy drive. The matching item in @a aExtraConfigValue[] contains the same
2722 attachment information as with "HardDiskImage" items.
2723 </li>
2724 <li>
2725 "NetworkAdapter": a network adapter. The array item in @a aVBoxValues[] will specify the hardware
2726 for the network adapter, whereas the array item in @a aExtraConfigValues[] will have a string
2727 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
2728 </li>
2729 <li>
2730 "USBController": a USB controller. There can be at most one such item. If and only if such an
2731 item ispresent, USB support will be enabled for the new virtual machine.
2732 </li>
2733 <li>
2734 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
2735 present, sound support will be enabled for the new virtual machine. Note that the virtual
2736 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
2737 may be different from the virtual soundcard expected by the appliance.
2738 </li>
2739 </ul>
2740
2741 </desc>
2742
2743 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
2744 <desc></desc>
2745 </param>
2746
2747 <param name="aRefs" type="wstring" dir="out" safearray="yes">
2748 <desc></desc>
2749 </param>
2750
2751 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
2752 <desc></desc>
2753 </param>
2754
2755 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
2756 <desc></desc>
2757 </param>
2758
2759 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
2760 <desc></desc>
2761 </param>
2762
2763 </method>
2764
2765 <method name="getDescriptionByType">
2766 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
2767 should be returned.</desc>
2768
2769 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2770 <desc></desc>
2771 </param>
2772
2773 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
2774 <desc></desc>
2775 </param>
2776
2777 <param name="aRefs" type="wstring" dir="out" safearray="yes">
2778 <desc></desc>
2779 </param>
2780
2781 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
2782 <desc></desc>
2783 </param>
2784
2785 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
2786 <desc></desc>
2787 </param>
2788
2789 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
2790 <desc></desc>
2791 </param>
2792
2793 </method>
2794
2795 <method name="getValuesByType">
2796 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
2797 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
2798 values.</desc>
2799
2800 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2801 <desc></desc>
2802 </param>
2803
2804 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
2805 <desc></desc>
2806 </param>
2807
2808 <param name="aValues" type="wstring" dir="return" safearray="yes">
2809 <desc></desc>
2810 </param>
2811
2812 </method>
2813
2814 <method name="setFinalValues">
2815 <desc>
2816 This method allows the appliance's user to change the configuration for the virtual
2817 system descriptions. For each array item returned from <link to="#getDescription" />,
2818 you must pass in one boolean value and one configuration value.
2819
2820 Each item in the boolean array determines whether the particular configuration item
2821 should be enabled.
2822 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
2823 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
2824 and SoundCard.
2825
2826 For the "vbox" and "extra configuration" values, if you pass in the same arrays
2827 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
2828 the configuration remains unchanged. Please see the documentation for getDescription()
2829 for valid configuration values for the individual array item types. If the
2830 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
2831 </desc>
2832
2833 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
2834 <desc></desc>
2835 </param>
2836
2837 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
2838 <desc></desc>
2839 </param>
2840
2841 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
2842 <desc></desc>
2843 </param>
2844 </method>
2845
2846 <method name="addDescription">
2847 <desc>
2848 This method adds an additional description entry to the stack of already
2849 available descriptions for this virtual system. This is handy for writing
2850 values which aren't directly supported by VirtualBox. One example would
2851 be the License type of <link to="VirtualSystemDescriptionType" />.
2852 </desc>
2853
2854 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2855 <desc></desc>
2856 </param>
2857
2858 <param name="aVBoxValue" type="wstring" dir="in">
2859 <desc></desc>
2860 </param>
2861
2862 <param name="aExtraConfigValue" type="wstring" dir="in">
2863 <desc></desc>
2864 </param>
2865 </method>
2866 </interface>
2867
2868
2869 <!--
2870 // IMachine
2871 /////////////////////////////////////////////////////////////////////////
2872 -->
2873
2874 <interface
2875 name="IInternalMachineControl" extends="$unknown"
2876 uuid="e2da8b1a-2ad1-490e-b29e-c33a144791b6"
2877 internal="yes"
2878 wsmap="suppress"
2879 >
2880 <method name="setRemoveSavedStateFile">
2881 <desc>
2882 Updates the flag whether the saved state file is removed on a
2883 machine state change from Saved to PoweredOff.
2884 </desc>
2885 <param name="aRemove" type="boolean" dir="in"/>
2886 </method>
2887
2888 <method name="updateState">
2889 <desc>
2890 Updates the VM state.
2891 <note>
2892 This operation will also update the settings file with the correct
2893 information about the saved state file and delete this file from disk
2894 when appropriate.
2895 </note>
2896 </desc>
2897 <param name="state" type="MachineState" dir="in"/>
2898 </method>
2899
2900 <method name="getIPCId">
2901 <param name="id" type="wstring" dir="return"/>
2902 </method>
2903
2904 <method name="beginPowerUp">
2905 <desc>
2906 Tells VBoxSVC that <link to="IConsole::powerUp"/> is under ways and
2907 gives it the progress object that should be part of any pending
2908 <link to="IMachine::launchVMProcess"/> operations. The progress
2909 object may be called back to reflect an early cancelation, so some care
2910 have to be taken with respect to any cancelation callbacks. The console
2911 object will call <link to="IInternalMachineControl::endPowerUp"/>
2912 to signal the completion of the progress object.
2913 </desc>
2914 <param name="aProgress" type="IProgress" dir="in" />
2915 </method>
2916
2917 <method name="endPowerUp">
2918 <desc>
2919 Tells VBoxSVC that <link to="IConsole::powerUp"/> has completed.
2920 This method may query status information from the progress object it
2921 received in <link to="IInternalMachineControl::beginPowerUp"/> and copy
2922 it over to any in-progress <link to="IMachine::launchVMProcess"/>
2923 call in order to complete that progress object.
2924 </desc>
2925 <param name="result" type="long" dir="in"/>
2926 </method>
2927
2928 <method name="runUSBDeviceFilters">
2929 <desc>
2930 Asks the server to run USB devices filters of the associated
2931 machine against the given USB device and tell if there is
2932 a match.
2933 <note>
2934 Intended to be used only for remote USB devices. Local
2935 ones don't require to call this method (this is done
2936 implicitly by the Host and USBProxyService).
2937 </note>
2938 </desc>
2939 <param name="device" type="IUSBDevice" dir="in"/>
2940 <param name="matched" type="boolean" dir="out"/>
2941 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
2942 </method>
2943
2944 <method name="captureUSBDevice">
2945 <desc>
2946 Requests a capture of the given host USB device.
2947 When the request is completed, the VM process will
2948 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2949 notification.
2950 </desc>
2951 <param name="id" type="uuid" mod="string" dir="in"/>
2952 </method>
2953
2954 <method name="detachUSBDevice">
2955 <desc>
2956 Notification that a VM is going to detach (@a done = @c false) or has
2957 already detached (@a done = @c true) the given USB device.
2958 When the @a done = @c true request is completed, the VM process will
2959 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
2960 notification.
2961 <note>
2962 In the @a done = @c true case, the server must run its own filters
2963 and filters of all VMs but this one on the detached device
2964 as if it were just attached to the host computer.
2965 </note>
2966 </desc>
2967 <param name="id" type="uuid" mod="string" dir="in"/>
2968 <param name="done" type="boolean" dir="in"/>
2969 </method>
2970
2971 <method name="autoCaptureUSBDevices">
2972 <desc>
2973 Requests a capture all matching USB devices attached to the host.
2974 When the request is completed, the VM process will
2975 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2976 notification per every captured device.
2977 </desc>
2978 </method>
2979
2980 <method name="detachAllUSBDevices">
2981 <desc>
2982 Notification that a VM that is being powered down. The done
2983 parameter indicates whether which stage of the power down
2984 we're at. When @a done = @c false the VM is announcing its
2985 intentions, while when @a done = @c true the VM is reporting
2986 what it has done.
2987 <note>
2988 In the @a done = @c true case, the server must run its own filters
2989 and filters of all VMs but this one on all detach devices as
2990 if they were just attached to the host computer.
2991 </note>
2992 </desc>
2993 <param name="done" type="boolean" dir="in"/>
2994 </method>
2995
2996 <method name="onSessionEnd">
2997 <desc>
2998 Triggered by the given session object when the session is about
2999 to close normally.
3000 </desc>
3001 <param name="session" type="ISession" dir="in">
3002 <desc>Session that is being closed</desc>
3003 </param>
3004 <param name="progress" type="IProgress" dir="return">
3005 <desc>
3006 Used to wait until the corresponding machine is actually
3007 dissociated from the given session on the server.
3008 Returned only when this session is a direct one.
3009 </desc>
3010 </param>
3011 </method>
3012
3013 <method name="beginSavingState">
3014 <desc>
3015 Called by the VM process to inform the server it wants to
3016 save the current state and stop the VM execution.
3017 </desc>
3018 <param name="progress" type="IProgress" dir="in">
3019 <desc>
3020 Progress object created by the VM process to wait until
3021 the state is saved.
3022 </desc>
3023 </param>
3024 <param name="stateFilePath" type="wstring" dir="out">
3025 <desc>
3026 File path the VM process must save the execution state to.
3027 </desc>
3028 </param>
3029 </method>
3030
3031 <method name="endSavingState">
3032 <desc>
3033 Called by the VM process to inform the server that saving
3034 the state previously requested by #beginSavingState is either
3035 successfully finished or there was a failure.
3036
3037 <result name="VBOX_E_FILE_ERROR">
3038 Settings file not accessible.
3039 </result>
3040 <result name="VBOX_E_XML_ERROR">
3041 Could not parse the settings file.
3042 </result>
3043
3044 </desc>
3045
3046 <param name="success" type="boolean" dir="in">
3047 <desc>@c true to indicate success and @c false otherwise.
3048 </desc>
3049 </param>
3050 </method>
3051
3052 <method name="adoptSavedState">
3053 <desc>
3054 Gets called by IConsole::adoptSavedState.
3055 <result name="VBOX_E_FILE_ERROR">
3056 Invalid saved state file path.
3057 </result>
3058 </desc>
3059 <param name="savedStateFile" type="wstring" dir="in">
3060 <desc>Path to the saved state file to adopt.</desc>
3061 </param>
3062 </method>
3063
3064 <method name="beginTakingSnapshot">
3065 <desc>
3066 Called from the VM process to request from the server to perform the
3067 server-side actions of creating a snapshot (creating differencing images
3068 and the snapshot object).
3069
3070 <result name="VBOX_E_FILE_ERROR">
3071 Settings file not accessible.
3072 </result>
3073 <result name="VBOX_E_XML_ERROR">
3074 Could not parse the settings file.
3075 </result>
3076 </desc>
3077 <param name="initiator" type="IConsole" dir="in">
3078 <desc>The console object that initiated this call.</desc>
3079 </param>
3080 <param name="name" type="wstring" dir="in">
3081 <desc>Snapshot name.</desc>
3082 </param>
3083 <param name="description" type="wstring" dir="in">
3084 <desc>Snapshot description.</desc>
3085 </param>
3086 <param name="consoleProgress" type="IProgress" dir="in">
3087 <desc>
3088 Progress object created by the VM process tracking the
3089 snapshot's progress. This has the following sub-operations:
3090 <ul>
3091 <li>setting up (weight 1);</li>
3092 <li>one for each medium attachment that needs a differencing image (weight 1 each);</li>
3093 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3094 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3095 <li>finishing up (weight 1)</li>
3096 </ul>
3097 </desc>
3098 </param>
3099 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3100 <desc>
3101 Whether this is an online snapshot (i.e. the machine is running).
3102 </desc>
3103 </param>
3104 <param name="stateFilePath" type="wstring" dir="out">
3105 <desc>
3106 File path the VM process must save the execution state to.
3107 </desc>
3108 </param>
3109 </method>
3110
3111 <method name="endTakingSnapshot">
3112 <desc>
3113 Called by the VM process to inform the server that the snapshot
3114 previously requested by #beginTakingSnapshot is either
3115 successfully taken or there was a failure.
3116 </desc>
3117
3118 <param name="success" type="boolean" dir="in">
3119 <desc>@c true to indicate success and @c false otherwise</desc>
3120 </param>
3121 </method>
3122
3123 <method name="deleteSnapshot">
3124 <desc>
3125 Gets called by IConsole::deleteSnapshot.
3126 <result name="VBOX_E_INVALID_OBJECT_STATE">
3127 Snapshot has more than one child snapshot.
3128 </result>
3129 </desc>
3130 <param name="initiator" type="IConsole" dir="in">
3131 <desc>The console object that initiated this call.</desc>
3132 </param>
3133 <param name="id" type="uuid" mod="string" dir="in">
3134 <desc>UUID of the snapshot to delete.</desc>
3135 </param>
3136 <param name="machineState" type="MachineState" dir="out">
3137 <desc>New machine state after this operation is started.</desc>
3138 </param>
3139 <param name="progress" type="IProgress" dir="return">
3140 <desc>Progress object to track the operation completion.</desc>
3141 </param>
3142 </method>
3143
3144 <method name="finishOnlineMergeMedium">
3145 <desc>
3146 Gets called by IConsole::onlineMergeMedium.
3147 </desc>
3148 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
3149 <desc>The medium attachment which needs to be cleaned up.</desc>
3150 </param>
3151 <param name="source" type="IMedium" dir="in">
3152 <desc>Merge source medium.</desc>
3153 </param>
3154 <param name="target" type="IMedium" dir="in">
3155 <desc>Merge target medium.</desc>
3156 </param>
3157 <param name="mergeForward" type="boolean" dir="in">
3158 <desc>Merge direction.</desc>
3159 </param>
3160 <param name="parentForTarget" type="IMedium" dir="in">
3161 <desc>For forward merges: new parent for target medium.</desc>
3162 </param>
3163 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
3164 <desc>For backward merges: list of media which need their parent UUID
3165 updated.</desc>
3166 </param>
3167 </method>
3168
3169 <method name="restoreSnapshot">
3170 <desc>
3171 Gets called by IConsole::RestoreSnapshot.
3172 </desc>
3173 <param name="initiator" type="IConsole" dir="in">
3174 <desc>The console object that initiated this call.</desc>
3175 </param>
3176 <param name="snapshot" type="ISnapshot" dir="in">
3177 <desc>The snapshot to restore the VM state from.</desc>
3178 </param>
3179 <param name="machineState" type="MachineState" dir="out">
3180 <desc>New machine state after this operation is started.</desc>
3181 </param>
3182 <param name="progress" type="IProgress" dir="return">
3183 <desc>Progress object to track the operation completion.</desc>
3184 </param>
3185 </method>
3186
3187 <method name="pullGuestProperties">
3188 <desc>
3189 Get the list of the guest properties matching a set of patterns along
3190 with their values, time stamps and flags and give responsibility for
3191 managing properties to the console.
3192 </desc>
3193 <param name="name" type="wstring" dir="out" safearray="yes">
3194 <desc>
3195 The names of the properties returned.
3196 </desc>
3197 </param>
3198 <param name="value" type="wstring" dir="out" safearray="yes">
3199 <desc>
3200 The values of the properties returned. The array entries match the
3201 corresponding entries in the @a name array.
3202 </desc>
3203 </param>
3204 <param name="timestamp" type="long long" dir="out" safearray="yes">
3205 <desc>
3206 The time stamps of the properties returned. The array entries match
3207 the corresponding entries in the @a name array.
3208 </desc>
3209 </param>
3210 <param name="flags" type="wstring" dir="out" safearray="yes">
3211 <desc>
3212 The flags of the properties returned. The array entries match the
3213 corresponding entries in the @a name array.
3214 </desc>
3215 </param>
3216 </method>
3217
3218 <method name="pushGuestProperty">
3219 <desc>
3220 Update a single guest property in IMachine.
3221 </desc>
3222 <param name="name" type="wstring" dir="in">
3223 <desc>
3224 The name of the property to be updated.
3225 </desc>
3226 </param>
3227 <param name="value" type="wstring" dir="in">
3228 <desc>
3229 The value of the property.
3230 </desc>
3231 </param>
3232 <param name="timestamp" type="long long" dir="in">
3233 <desc>
3234 The timestamp of the property.
3235 </desc>
3236 </param>
3237 <param name="flags" type="wstring" dir="in">
3238 <desc>
3239 The flags of the property.
3240 </desc>
3241 </param>
3242 </method>
3243
3244 <method name="lockMedia">
3245 <desc>
3246 Locks all media attached to the machine for writing and parents of
3247 attached differencing media (if any) for reading. This operation is
3248 atomic so that if it fails no media is actually locked.
3249
3250 This method is intended to be called when the machine is in Starting or
3251 Restoring state. The locked media will be automatically unlocked when
3252 the machine is powered off or crashed.
3253 </desc>
3254 </method>
3255 <method name="unlockMedia">
3256 <desc>
3257 Unlocks all media previously locked using
3258 <link to="IInternalMachineControl::lockMedia"/>.
3259
3260 This method is intended to be used with teleportation so that it is
3261 possible to teleport between processes on the same machine.
3262 </desc>
3263 </method>
3264 </interface>
3265
3266 <interface
3267 name="IBIOSSettings" extends="$unknown"
3268 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3269 wsmap="managed"
3270 >
3271 <desc>
3272 The IBIOSSettings interface represents BIOS settings of the virtual
3273 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3274 </desc>
3275 <attribute name="logoFadeIn" type="boolean">
3276 <desc>Fade in flag for BIOS logo animation.</desc>
3277 </attribute>
3278
3279 <attribute name="logoFadeOut" type="boolean">
3280 <desc>Fade out flag for BIOS logo animation.</desc>
3281 </attribute>
3282
3283 <attribute name="logoDisplayTime" type="unsigned long">
3284 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3285 </attribute>
3286
3287 <attribute name="logoImagePath" type="wstring">
3288 <desc>
3289 Local file system path for external BIOS splash image. Empty string
3290 means the default image is shown on boot.
3291 </desc>
3292 </attribute>
3293
3294 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3295 <desc>Mode of the BIOS boot device menu.</desc>
3296 </attribute>
3297
3298 <attribute name="ACPIEnabled" type="boolean">
3299 <desc>ACPI support flag.</desc>
3300 </attribute>
3301
3302 <attribute name="IOAPICEnabled" type="boolean">
3303 <desc>
3304 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3305 and support IRQs above 15.
3306 </desc>
3307 </attribute>
3308
3309 <attribute name="timeOffset" type="long long">
3310 <desc>
3311 Offset in milliseconds from the host system time. This allows for
3312 guests running with a different system date/time than the host.
3313 It is equivalent to setting the system date/time in the BIOS except
3314 it is not an absolute value but a relative one. Guest Additions
3315 time synchronization honors this offset.
3316 </desc>
3317 </attribute>
3318
3319 <attribute name="PXEDebugEnabled" type="boolean">
3320 <desc>
3321 PXE debug logging flag. If set, VirtualBox will write extensive
3322 PXE trace information to the release log.
3323 </desc>
3324 </attribute>
3325
3326 </interface>
3327
3328 <enum name="CleanupMode"
3329 uuid="67897c50-7cca-47a9-83f6-ce8fd8eb5441">
3330 <desc>Cleanup mode, used with <link to="IMachine::unregister" />.
3331 </desc>
3332 <const name="UnregisterOnly" value="1">
3333 <desc>Unregister only the machine, but neither delete snapshots nor detach media.</desc>
3334 </const>
3335 <const name="DetachAllReturnNone" value="2">
3336 <desc>Delete all snapshots and detach all media but return none; this will keep all media registered.</desc>
3337 </const>
3338 <const name="DetachAllReturnHardDisksOnly" value="3">
3339 <desc>Delete all snapshots, detach all media and return hard disks for closing, but not removeable media.</desc>
3340 </const>
3341 <const name="Full" value="4">
3342 <desc>Delete all snapshots, detach all media and return all media for closing.</desc>
3343 </const>
3344 </enum>
3345
3346 <interface
3347 name="IMachine" extends="$unknown"
3348 uuid="14136b33-438a-45de-884c-550e9eb34f23"
3349 wsmap="managed"
3350 >
3351 <desc>
3352 The IMachine interface represents a virtual machine, or guest, created
3353 in VirtualBox.
3354
3355 This interface is used in two contexts. First of all, a collection of
3356 objects implementing this interface is stored in the
3357 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
3358 machines that are currently registered with this VirtualBox
3359 installation. Also, once a session has been opened for the given virtual
3360 machine (e.g. the virtual machine is running), the machine object
3361 associated with the open session can be queried from the session object;
3362 see <link to="ISession"/> for details.
3363
3364 The main role of this interface is to expose the settings of the virtual
3365 machine and provide methods to change various aspects of the virtual
3366 machine's configuration. For machine objects stored in the
3367 <link to="IVirtualBox::machines"/> collection, all attributes are
3368 read-only unless explicitly stated otherwise in individual attribute
3369 and method descriptions.
3370
3371 In order to change a machine setting, a session for this machine must be
3372 opened using one of the <link to="IMachine::lockMachine" /> or
3373 <link to="IMachine::launchVMProcess"/> methods. After the
3374 machine has been successfully locked for a session, a mutable machine object
3375 needs to be queried from the session object and then the desired settings
3376 changes can be applied to the returned object using IMachine attributes and
3377 methods. See the <link to="ISession"/> interface description for more
3378 information about sessions.
3379
3380 Note that IMachine does not provide methods to control virtual machine
3381 execution (such as start the machine, or power it down) -- these methods
3382 are grouped in a separate interface called <link to="IConsole" />.
3383
3384 <see>ISession, IConsole</see>
3385 </desc>
3386
3387 <attribute name="parent" type="IVirtualBox" readonly="yes">
3388 <desc>Associated parent object.</desc>
3389 </attribute>
3390
3391 <attribute name="accessible" type="boolean" readonly="yes">
3392 <desc>
3393 Whether this virtual machine is currently accessible or not.
3394
3395 A machine is always deemed accessible unless it is registered <i>and</i>
3396 its settings file cannot be read or parsed (either because the file itself
3397 is unavailable or has invalid XML contents).
3398
3399 Every time this property is read, the accessibility state of
3400 this machine is re-evaluated. If the returned value is @c false,
3401 the <link to="#accessError"/> property may be used to get the
3402 detailed error information describing the reason of
3403 inaccessibility, including XML error messages.
3404
3405 When the machine is inaccessible, only the following properties
3406 can be used on it:
3407 <ul>
3408 <li><link to="#parent"/></li>
3409 <li><link to="#id"/></li>
3410 <li><link to="#settingsFilePath"/></li>
3411 <li><link to="#accessible"/></li>
3412 <li><link to="#accessError"/></li>
3413 </ul>
3414
3415 An attempt to access any other property or method will return
3416 an error.
3417
3418 The only possible action you can perform on an inaccessible
3419 machine is to unregister it using the
3420 <link to="IMachine::unregister"/> call (or, to check
3421 for the accessibility state once more by querying this
3422 property).
3423
3424 <note>
3425 In the current implementation, once this property returns
3426 @c true, the machine will never become inaccessible
3427 later, even if its settings file cannot be successfully
3428 read/written any more (at least, until the VirtualBox
3429 server is restarted). This limitation may be removed in
3430 future releases.
3431 </note>
3432 </desc>
3433 </attribute>
3434
3435 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3436 <desc>
3437 Error information describing the reason of machine
3438 inaccessibility.
3439
3440 Reading this property is only valid after the last call to
3441 <link to="#accessible"/> returned @c false (i.e. the
3442 machine is currently unaccessible). Otherwise, a @c null
3443 IVirtualBoxErrorInfo object will be returned.
3444 </desc>
3445 </attribute>
3446
3447 <attribute name="name" type="wstring">
3448 <desc>
3449 Name of the virtual machine.
3450
3451 Besides being used for human-readable identification purposes
3452 everywhere in VirtualBox, the virtual machine name is also used
3453 as a name of the machine's settings file and as a name of the
3454 subdirectory this settings file resides in. Thus, every time you
3455 change the value of this property, the settings file will be
3456 renamed once you call <link to="#saveSettings"/> to confirm the
3457 change. The containing subdirectory will be also renamed, but
3458 only if it has exactly the same name as the settings file
3459 itself prior to changing this property (for backward compatibility
3460 with previous API releases). The above implies the following
3461 limitations:
3462 <ul>
3463 <li>The machine name cannot be empty.</li>
3464 <li>The machine name can contain only characters that are valid
3465 file name characters according to the rules of the file
3466 system used to store VirtualBox configuration.</li>
3467 <li>You cannot have two or more machines with the same name
3468 if they use the same subdirectory for storing the machine
3469 settings files.</li>
3470 <li>You cannot change the name of the machine if it is running,
3471 or if any file in the directory containing the settings file
3472 is being used by another running machine or by any other
3473 process in the host operating system at a time when
3474 <link to="#saveSettings"/> is called.
3475 </li>
3476 </ul>
3477 If any of the above limitations are hit, <link to="#saveSettings"/>
3478 will return an appropriate error message explaining the exact
3479 reason and the changes you made to this machine will not be saved.
3480 </desc>
3481 </attribute>
3482
3483 <attribute name="description" type="wstring">
3484 <desc>
3485 Description of the virtual machine.
3486
3487 The description attribute can contain any text and is
3488 typically used to describe the hardware and software
3489 configuration of the virtual machine in detail (i.e. network
3490 settings, versions of the installed software and so on).
3491 </desc>
3492 </attribute>
3493
3494 <attribute name="id" type="uuid" mod="string" readonly="yes">
3495 <desc>UUID of the virtual machine.</desc>
3496 </attribute>
3497
3498 <attribute name="OSTypeId" type="wstring">
3499 <desc>
3500 User-defined identifier of the Guest OS type.
3501 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
3502 an IGuestOSType object representing details about the given
3503 Guest OS type.
3504 <note>
3505 This value may differ from the value returned by
3506 <link to="IGuest::OSTypeId"/> if Guest Additions are
3507 installed to the guest OS.
3508 </note>
3509 </desc>
3510 </attribute>
3511
3512 <attribute name="HardwareVersion" type="wstring">
3513 <desc>Hardware version identifier. Internal use only for now.</desc>
3514 </attribute>
3515
3516 <attribute name="hardwareUUID" type="uuid" mod="string">
3517 <desc>
3518 The UUID presented to the guest via memory tables, hardware and guest
3519 properties. For most VMs this is the same as the @a id, but for VMs
3520 which have been cloned or teleported it may be the same as the source
3521 VM. This latter is because the guest shouldn't notice that it was
3522 cloned or teleported.
3523 </desc>
3524 </attribute>
3525
3526 <attribute name="CPUCount" type="unsigned long">
3527 <desc>Number of virtual CPUs in the VM.</desc>
3528 </attribute>
3529
3530 <attribute name="CPUHotPlugEnabled" type="boolean">
3531 <desc>
3532 This setting determines whether VirtualBox allows CPU
3533 hotplugging for this machine.</desc>
3534 </attribute>
3535
3536 <attribute name="CPUExecutionCap" type="unsigned long">
3537 <desc>
3538 Means to limit the number of CPU cycles a guest can use. The unit
3539 is percentage of host CPU cycles per second. The valid range
3540 is 1 - 100. 100 (the default) implies no limit.
3541 </desc>
3542 </attribute>
3543
3544 <attribute name="memorySize" type="unsigned long">
3545 <desc>System memory size in megabytes.</desc>
3546 </attribute>
3547
3548 <attribute name="memoryBalloonSize" type="unsigned long">
3549 <desc>Memory balloon size in megabytes.</desc>
3550 </attribute>
3551
3552 <attribute name="PageFusionEnabled" type="boolean">
3553 <desc>
3554 This setting determines whether VirtualBox allows page
3555 fusion for this machine (64 bits host only).
3556 </desc>
3557 </attribute>
3558
3559 <attribute name="VRAMSize" type="unsigned long">
3560 <desc>Video memory size in megabytes.</desc>
3561 </attribute>
3562
3563 <attribute name="accelerate3DEnabled" type="boolean" default="false">
3564 <desc>
3565 This setting determines whether VirtualBox allows this machine to make
3566 use of the 3D graphics support available on the host.</desc>
3567 </attribute>
3568
3569 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
3570 <desc>
3571 This setting determines whether VirtualBox allows this machine to make
3572 use of the 2D video acceleration support available on the host.</desc>
3573 </attribute>
3574
3575 <attribute name="monitorCount" type="unsigned long">
3576 <desc>
3577 Number of virtual monitors.
3578 <note>
3579 Only effective on Windows XP and later guests with
3580 Guest Additions installed.
3581 </note>
3582 </desc>
3583 </attribute>
3584
3585 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
3586 <desc>Object containing all BIOS settings.</desc>
3587 </attribute>
3588
3589 <attribute name="firmwareType" type="FirmwareType">
3590 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
3591 bootstrap in this VM.</desc>
3592 </attribute>
3593
3594 <attribute name="pointingHidType" type="PointingHidType">
3595 <desc>Type of pointing HID (such as mouse or tablet) used in this VM.
3596 The default is typically "PS2Mouse" but can vary depending on the
3597 requirements of the guest operating system.</desc>
3598 </attribute>
3599
3600 <attribute name="keyboardHidType" type="KeyboardHidType">
3601 <desc>Type of keyboard HID used in this VM.
3602 The default is typically "PS2Keyboard" but can vary depending on the
3603 requirements of the guest operating system.</desc>
3604 </attribute>
3605
3606 <attribute name="hpetEnabled" type="boolean">
3607 <desc>This attribute controls if High Precision Event Timer (HPET) is
3608 enabled in this VM. Use this property if you want to provide guests
3609 with additional time source, or if guest requires HPET to function correctly.
3610 Default is false.</desc>
3611 </attribute>
3612
3613 <attribute name="chipsetType" type="ChipsetType">
3614 <desc>Chipset type used in this VM.</desc>
3615 </attribute>
3616
3617 <attribute name="snapshotFolder" type="wstring">
3618 <desc>
3619 Full path to the directory used to store snapshot data
3620 (differencing media and saved state files) of this machine.
3621
3622 The initial value of this property is
3623 <tt>&lt;</tt><link to="#settingsFilePath">
3624 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3625 <link to="#id">machine_uuid</link>
3626 <tt>&gt;</tt>.
3627
3628 Currently, it is an error to try to change this property on
3629 a machine that has snapshots (because this would require to
3630 move possibly large files to a different location).
3631 A separate method will be available for this purpose later.
3632
3633 <note>
3634 Setting this property to @c null or to an empty string will restore
3635 the initial value.
3636 </note>
3637 <note>
3638 When setting this property, the specified path can be
3639 absolute (full path) or relative to the directory where the
3640 <link to="#settingsFilePath">machine settings file</link>
3641 is located. When reading this property, a full path is
3642 always returned.
3643 </note>
3644 <note>
3645 The specified path may not exist, it will be created
3646 when necessary.
3647 </note>
3648 </desc>
3649 </attribute>
3650
3651 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
3652 <desc>VRDP server object.</desc>
3653 </attribute>
3654
3655 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
3656 <desc>Array of media attached to this machine.</desc>
3657 </attribute>
3658
3659 <attribute name="USBController" type="IUSBController" readonly="yes">
3660 <desc>
3661 Associated USB controller object.
3662
3663 <note>
3664 If USB functionality is not available in the given edition of
3665 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3666 </note>
3667 </desc>
3668 </attribute>
3669
3670 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3671 <desc>Associated audio adapter, always present.</desc>
3672 </attribute>
3673
3674 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
3675 <desc>Array of storage controllers attached to this machine.</desc>
3676 </attribute>
3677
3678 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3679 <desc>
3680 Full name of the file containing machine settings data.
3681 </desc>
3682 </attribute>
3683
3684 <attribute name="settingsModified" type="boolean" readonly="yes">
3685 <desc>
3686 Whether the settings of this machine have been modified
3687 (but neither yet saved nor discarded).
3688 <note>
3689 Reading this property is only valid on instances returned
3690 by <link to="ISession::machine"/> and on new machines
3691 created by <link to="IVirtualBox::createMachine"/> or opened
3692 by <link to="IVirtualBox::openMachine"/> but not
3693 yet registered, or on unregistered machines after calling
3694 <link to="IMachine::unregister"/>. For all other
3695 cases, the settings can never be modified.
3696 </note>
3697 <note>
3698 For newly created unregistered machines, the value of this
3699 property is always @c true until <link to="#saveSettings"/>
3700 is called (no matter if any machine settings have been
3701 changed after the creation or not). For opened machines
3702 the value is set to @c false (and then follows to normal rules).
3703 </note>
3704 </desc>
3705 </attribute>
3706
3707 <attribute name="sessionState" type="SessionState" readonly="yes">
3708 <desc>Current session state for this machine.</desc>
3709 </attribute>
3710
3711 <attribute name="sessionType" type="wstring" readonly="yes">
3712 <desc>
3713 Type of the session. If <link to="#sessionState"/> is
3714 Spawning or Locked, this attribute contains the
3715 same value as passed to the
3716 <link to="IMachine::launchVMProcess"/> method in the
3717 @a type parameter. If the session was used with
3718 <link to="IMachine::lockMachine" />, or if
3719 <link to="#sessionState"/> is SessionClosed, the value of this
3720 attribute is an empty string.
3721 </desc>
3722 </attribute>
3723
3724 <attribute name="sessionPid" type="unsigned long" readonly="yes">
3725 <desc>
3726 Identifier of the session process. This attribute contains the
3727 platform-dependent identifier of the process whose session was
3728 used with <link to="IMachine::lockMachine" /> call. The returned
3729 value is only valid if <link to="#sessionState"/> is Locked or
3730 Unlocking by the time this property is read.
3731 </desc>
3732 </attribute>
3733
3734 <attribute name="state" type="MachineState" readonly="yes">
3735 <desc>Current execution state of this machine.</desc>
3736 </attribute>
3737
3738 <attribute name="lastStateChange" type="long long" readonly="yes">
3739 <desc>
3740 Time stamp of the last execution state change,
3741 in milliseconds since 1970-01-01 UTC.
3742 </desc>
3743 </attribute>
3744
3745 <attribute name="stateFilePath" type="wstring" readonly="yes">
3746 <desc>
3747 Full path to the file that stores the execution state of
3748 the machine when it is in the <link to="MachineState_Saved"/> state.
3749 <note>
3750 When the machine is not in the Saved state, this attribute is
3751 an empty string.
3752 </note>
3753 </desc>
3754 </attribute>
3755
3756 <attribute name="logFolder" type="wstring" readonly="yes">
3757 <desc>
3758 Full path to the folder that stores a set of rotated log files
3759 recorded during machine execution. The most recent log file is
3760 named <tt>VBox.log</tt>, the previous log file is
3761 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
3762 in the current version).
3763 </desc>
3764 </attribute>
3765
3766 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
3767 <desc>
3768 Current snapshot of this machine. This is @c null if the machine
3769 currently has no snapshots. If it is not @c null, then it was
3770 set by one of <link to="IConsole::takeSnapshot" />,
3771 <link to="IConsole::deleteSnapshot" />
3772 or <link to="IConsole::restoreSnapshot" />, depending on which
3773 was called last. See <link to="ISnapshot"/> for details.
3774 </desc>
3775 </attribute>
3776
3777 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
3778 <desc>
3779 Number of snapshots taken on this machine. Zero means the
3780 machine doesn't have any snapshots.
3781 </desc>
3782 </attribute>
3783
3784 <attribute name="currentStateModified" type="boolean" readonly="yes">
3785 <desc>
3786 Returns @c true if the current state of the machine is not
3787 identical to the state stored in the current snapshot.
3788
3789 The current state is identical to the current snapshot only
3790 directly after one of the following calls are made:
3791
3792 <ul>
3793 <li><link to="IConsole::restoreSnapshot"/>
3794 </li>
3795 <li><link to="IConsole::takeSnapshot"/> (issued on a
3796 "powered off" or "saved" machine, for which
3797 <link to="#settingsModified"/> returns @c false)
3798 </li>
3799 </ul>
3800
3801 The current state remains identical until one of the following
3802 happens:
3803 <ul>
3804 <li>settings of the machine are changed</li>
3805 <li>the saved state is deleted</li>
3806 <li>the current snapshot is deleted</li>
3807 <li>an attempt to execute the machine is made</li>
3808 </ul>
3809
3810 <note>
3811 For machines that don't have snapshots, this property is
3812 always @c false.
3813 </note>
3814 </desc>
3815 </attribute>
3816
3817 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
3818 <desc>
3819 Collection of shared folders for this machine (permanent shared
3820 folders). These folders are shared automatically at machine startup
3821 and available only to the guest OS installed within this machine.
3822
3823 New shared folders are added to the collection using
3824 <link to="#createSharedFolder"/>. Existing shared folders can be
3825 removed using <link to="#removeSharedFolder"/>.
3826 </desc>
3827 </attribute>
3828
3829 <attribute name="clipboardMode" type="ClipboardMode">
3830 <desc>
3831 Synchronization mode between the host OS clipboard
3832 and the guest OS clipboard.
3833 </desc>
3834 </attribute>
3835
3836 <attribute name="guestPropertyNotificationPatterns" type="wstring">
3837 <desc>
3838 A comma-separated list of simple glob patterns. Changes to guest
3839 properties whose name matches one of the patterns will generate an
3840 <link to="IGuestPropertyChangedEvent"/> signal.
3841 </desc>
3842 </attribute>
3843
3844 <attribute name="teleporterEnabled" type="boolean">
3845 <desc>
3846 When set to @a true, the virtual machine becomes a target teleporter
3847 the next time it is powered on. This can only set to @a true when the
3848 VM is in the @a PoweredOff or @a Aborted state.
3849
3850 <!-- This property is automatically set to @a false when the VM is powered
3851 on. (bird: This doesn't work yet ) -->
3852 </desc>
3853 </attribute>
3854
3855 <attribute name="teleporterPort" type="unsigned long">
3856 <desc>
3857 The TCP port the target teleporter will listen for incoming
3858 teleportations on.
3859
3860 0 means the port is automatically selected upon power on. The actual
3861 value can be read from this property while the machine is waiting for
3862 incoming teleportations.
3863 </desc>
3864 </attribute>
3865
3866 <attribute name="teleporterAddress" type="wstring">
3867 <desc>
3868 The address the target teleporter will listen on. If set to an empty
3869 string, it will listen on all addresses.
3870 </desc>
3871 </attribute>
3872
3873 <attribute name="teleporterPassword" type="wstring">
3874 <desc>
3875 The password to check for on the target teleporter. This is just a
3876 very basic measure to prevent simple hacks and operators accidentally
3877 beaming a virtual machine to the wrong place.
3878 </desc>
3879 </attribute>
3880
3881 <attribute name="faultToleranceState" type="FaultToleranceState">
3882 <desc>
3883 Fault tolerance state; disabled, source or target.
3884 This property can be changed at any time. If you change it for a running
3885 VM, then the fault tolerance address and port must be set beforehand.
3886 </desc>
3887 </attribute>
3888
3889 <attribute name="faultTolerancePort" type="unsigned long">
3890 <desc>
3891 The TCP port the fault tolerance source or target will use for
3892 communication.
3893 </desc>
3894 </attribute>
3895
3896 <attribute name="faultToleranceAddress" type="wstring">
3897 <desc>
3898 The address the fault tolerance source or target.
3899 </desc>
3900 </attribute>
3901
3902 <attribute name="faultTolerancePassword" type="wstring">
3903 <desc>
3904 The password to check for on the standby VM. This is just a
3905 very basic measure to prevent simple hacks and operators accidentally
3906 choosing the wrong standby VM.
3907 </desc>
3908 </attribute>
3909
3910 <attribute name="faultToleranceSyncInterval" type="unsigned long">
3911 <desc>
3912 The interval in ms used for syncing the state between source and target.
3913 </desc>
3914 </attribute>
3915
3916 <attribute name="RTCUseUTC" type="boolean">
3917 <desc>
3918 When set to @a true, the RTC device of the virtual machine will run
3919 in UTC time, otherwise in local time. Especially Unix guests prefer
3920 the time in UTC.
3921 </desc>
3922 </attribute>
3923
3924 <attribute name="ioCacheEnabled" type="boolean">
3925 <desc>
3926 When set to @a true, the builtin I/O cache of the virtual machine
3927 will be enabled.
3928 </desc>
3929 </attribute>
3930
3931 <attribute name="ioCacheSize" type="unsigned long">
3932 <desc>
3933 Maximum size of the I/O cache in MB.
3934 </desc>
3935 </attribute>
3936
3937 <method name="lockMachine">
3938 <desc>
3939 Locks the machine for the given session to enable the caller
3940 to make changes to the machine or start the VM or control
3941 VM execution.
3942
3943 There are two ways to lock a machine for such uses:
3944
3945 <ul>
3946 <li>If you want to make changes to the machine settings,
3947 you must obtain an exclusive write lock on the machine
3948 by setting @a lockType to @c Write.
3949
3950 This will only succeed if no other process has locked
3951 the machine to prevent conflicting changes. Only after
3952 an exclusive write lock has been obtained using this method, one
3953 can change all VM settings or execute the VM in the process
3954 space of the session object. (Note that the latter is only of
3955 interest if you actually want to write a new front-end for
3956 virtual machines; but this API gets called internally by
3957 the existing front-ends such as VBoxHeadless and the VirtualBox
3958 GUI to acquire a write lock on the machine that they are running.)
3959
3960 On success, write-locking the machine for a session creates
3961 a second copy of the IMachine object. It is this second object
3962 upon which changes can be made; in VirtualBox terminology, the
3963 second copy is "mutable". It is only this second, mutable machine
3964 object upon which you can call methods that change the
3965 machine state. After having called this method, you can
3966 obtain this second, mutable machine object using the
3967 <link to="ISession::machine" /> attribute.
3968 </li>
3969 <li>If you only want to check the machine state or control
3970 machine execution without actually changing machine
3971 settings (e.g. to get access to VM statistics or take
3972 a snapshot or save the machine state), then set the
3973 @a lockType argument to @c Shared.
3974
3975 If no other session has obtained a lock, you will obtain an
3976 exclusive write lock as described above. However, if another
3977 session has already obtained such a lock, then a link to that
3978 existing session will be established which allows you
3979 to control that existing session.
3980
3981 To find out which type of lock was obtained, you can
3982 inspect <link to="ISession::type" />, which will have been
3983 set to either @c WriteLock or @c Shared.
3984 </li>
3985 </ul>
3986
3987 In either case, you can get access to the <link to="IConsole" />
3988 object which controls VM execution.
3989
3990 Also in all of the above cases, one must always call
3991 <link to="ISession::unlockMachine" /> to release the lock on the machine, or
3992 the machine's state will eventually be set to "Aborted".
3993
3994 To change settings on a machine, the following sequence is typically
3995 performed:
3996
3997 <ol>
3998 <li>Call this method to obtain an exclusive write lock for the current session.</li>
3999
4000 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
4001
4002 <li>Change the settings of the machine by invoking IMachine methods.</li>
4003
4004 <li>Call <link to="IMachine::saveSettings" />.</li>
4005
4006 <li>Release the write lock by calling <link to="ISession::unlockMachine"/>.</li>
4007 </ol>
4008
4009 <result name="E_UNEXPECTED">
4010 Virtual machine not registered.
4011 </result>
4012 <result name="E_ACCESSDENIED">
4013 Process not started by OpenRemoteSession.
4014 </result>
4015 <result name="VBOX_E_INVALID_OBJECT_STATE">
4016 Session already open or being opened.
4017 </result>
4018 <result name="VBOX_E_VM_ERROR">
4019 Failed to assign machine to session.
4020 </result>
4021 </desc>
4022 <param name="session" type="ISession" dir="in">
4023 <desc>
4024 Session object for which the machine will be locked.
4025 </desc>
4026 </param>
4027 <param name="lockType" type="LockType" dir="in">
4028 <desc>
4029 If set to @c Write, then attempt to acquire an exclusive write lock or fail.
4030 If set to @c Shared, then either acquire an exclusive write lock or establish
4031 a link to an existing session.
4032 </desc>
4033 </param>
4034 </method>
4035
4036 <method name="launchVMProcess">
4037 <desc>
4038 Spawns a new process that will execute the virtual machine and obtains a shared
4039 lock on the machine for the calling session.
4040
4041 If launching the VM succeeds, the new VM process will create its own session
4042 and write-lock the machine for it, preventing conflicting changes from other
4043 processes. If the machine is already locked (because it is already running or
4044 because another session has a write lock), launching the VM process will therefore
4045 fail. Reversely, future attempts to obtain a write lock will also fail while the
4046 machine is running.
4047
4048 The caller's session object remains separate from the session opened by the new
4049 VM process. It receives its own <link to="IConsole" /> object which can be used
4050 to control machine execution, but it cannot be used to change all VM settings
4051 which would be available after a <link to="#lockMachine" /> call.
4052
4053 The caller must eventually release the session's shared lock by calling
4054 <link to="ISession::unlockMachine" /> on the local session object once this call
4055 has returned. However, the session's state (see <link to="ISession::state" />)
4056 will not return to "Unlocked" until the remote session has also unlocked
4057 the machine (i.e. the machine has stopped running).
4058
4059 Lauching a VM process can take some time (a new VM is started in a new process,
4060 for which memory and other resources need to be set up). Because of this,
4061 an <link to="IProgress" /> object is returned to allow the caller to wait
4062 for this asynchronous operation to be completed. Until then, the caller's
4063 session object remains in the "Unlocked" state, and its <link to="ISession::machine" />
4064 and <link to="ISession::console" /> attributes cannot be accessed.
4065 It is recommended to use <link to="IProgress::waitForCompletion" /> or
4066 similar calls to wait for completion. Completion is signalled when the VM
4067 is powered on. If launching the VM fails, error messages can be queried
4068 via the progress object, if available.
4069
4070 The progress object will have at least 2 sub-operations. The first
4071 operation covers the period up to the new VM process calls powerUp.
4072 The subsequent operations mirror the <link to="IConsole::powerUp"/>
4073 progress object. Because <link to="IConsole::powerUp"/> may require
4074 some extra sub-operations, the <link to="IProgress::operationCount"/>
4075 may change at the completion of operation.
4076
4077 For details on the teleportation progress operation, see
4078 <link to="IConsole::powerUp"/>.
4079
4080 The @a environment argument is a string containing definitions of
4081 environment variables in the following format:
4082 @code
4083 NAME[=VALUE]\n
4084 NAME[=VALUE]\n
4085 ...
4086 @endcode
4087 where <tt>\\n</tt> is the new line character. These environment
4088 variables will be appended to the environment of the VirtualBox server
4089 process. If an environment variable exists both in the server process
4090 and in this list, the value from this list takes precedence over the
4091 server's variable. If the value of the environment variable is
4092 omitted, this variable will be removed from the resulting environment.
4093 If the environment string is @c null or empty, the server environment
4094 is inherited by the started process as is.
4095
4096 <result name="E_UNEXPECTED">
4097 Virtual machine not registered.
4098 </result>
4099 <result name="E_INVALIDARG">
4100 Invalid session type @a type.
4101 </result>
4102 <result name="VBOX_E_OBJECT_NOT_FOUND">
4103 No machine matching @a machineId found.
4104 </result>
4105 <result name="VBOX_E_INVALID_OBJECT_STATE">
4106 Session already open or being opened.
4107 </result>
4108 <result name="VBOX_E_IPRT_ERROR">
4109 Launching process for machine failed.
4110 </result>
4111 <result name="VBOX_E_VM_ERROR">
4112 Failed to assign machine to session.
4113 </result>
4114 </desc>
4115 <param name="session" type="ISession" dir="in">
4116 <desc>
4117 Client session object to which the VM process will be connected (this
4118 must be in "Unlocked" state).
4119 </desc>
4120 </param>
4121 <param name="type" type="wstring" dir="in">
4122 <desc>
4123 Front-end to use for the new VM process. The following are currently supported:
4124 <ul>
4125 <li><tt>"gui"</tt>: VirtualBox Qt GUI front-end</li>
4126 <li><tt>"vrdp"</tt>: VBoxHeadless (VRDP Server) front-end</li>
4127 <li><tt>"sdl"</tt>: VirtualBox SDL front-end</li>
4128 </ul>
4129 </desc>
4130 </param>
4131 <param name="environment" type="wstring" dir="in">
4132 <desc>
4133 Environment to pass to the VM process.
4134 </desc>
4135 </param>
4136 <param name="progress" type="IProgress" dir="return">
4137 <desc>Progress object to track the operation completion.</desc>
4138 </param>
4139 </method>
4140
4141 <method name="setBootOrder">
4142 <desc>
4143 Puts the given device to the specified position in
4144 the boot order.
4145
4146 To indicate that no device is associated with the given position,
4147 <link to="DeviceType_Null"/> should be used.
4148
4149 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4150
4151 <result name="E_INVALIDARG">
4152 Boot @a position out of range.
4153 </result>
4154 <result name="E_NOTIMPL">
4155 Booting from USB @a device currently not supported.
4156 </result>
4157
4158 </desc>
4159 <param name="position" type="unsigned long" dir="in">
4160 <desc>
4161 Position in the boot order (@c 1 to the total number of
4162 devices the machine can boot from, as returned by
4163 <link to="ISystemProperties::maxBootPosition"/>).
4164 </desc>
4165 </param>
4166 <param name="device" type="DeviceType" dir="in">
4167 <desc>
4168 The type of the device used to boot at the given position.
4169 </desc>
4170 </param>
4171 </method>
4172
4173 <method name="getBootOrder" const="yes">
4174 <desc>
4175 Returns the device type that occupies the specified
4176 position in the boot order.
4177
4178 @todo [remove?]
4179 If the machine can have more than one device of the returned type
4180 (such as hard disks), then a separate method should be used to
4181 retrieve the individual device that occupies the given position.
4182
4183 If here are no devices at the given position, then
4184 <link to="DeviceType_Null"/> is returned.
4185
4186 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4187
4188 <result name="E_INVALIDARG">
4189 Boot @a position out of range.
4190 </result>
4191
4192 </desc>
4193 <param name="position" type="unsigned long" dir="in">
4194 <desc>
4195 Position in the boot order (@c 1 to the total number of
4196 devices the machine can boot from, as returned by
4197 <link to="ISystemProperties::maxBootPosition"/>).
4198 </desc>
4199 </param>
4200 <param name="device" type="DeviceType" dir="return">
4201 <desc>
4202 Device at the given position.
4203 </desc>
4204 </param>
4205 </method>
4206
4207 <method name="attachDevice">
4208 <desc>
4209 Attaches a device and optionally mounts a medium to the given storage
4210 controller (<link to="IStorageController" />, identified by @a name),
4211 at the indicated port and device.
4212
4213 This method is intended for managing storage devices in general while a
4214 machine is powered off. It can be used to attach and detach fixed
4215 and removeable media. The following kind of media can be attached
4216 to a machine:
4217
4218 <ul>
4219 <li>For fixed and removable media, you can pass in a medium that was
4220 previously opened using <link to="IVirtualBox::openMedium" />.
4221 </li>
4222
4223 <li>Only for storage devices supporting removable media (such as
4224 DVDs and floppies), you can also specify a null pointer to
4225 indicate an empty drive or one of the medium objects listed
4226 in the <link to="IHost::DVDDrives" /> and <link to="IHost::floppyDrives"/>
4227 arrays to indicate a host drive.
4228 For removeable devices, you can also use <link to="IMachine::mountMedium"/>
4229 to change the media while the machine is running.
4230 </li>
4231 </ul>
4232
4233 In a VM's default configuration of virtual machines, the secondary
4234 master of the IDE controller is used for a CD/DVD drive.
4235
4236 After calling this returns successfully, a new instance of
4237 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4238 attachments (see <link to="IMachine::mediumAttachments"/>).
4239
4240 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4241 information about attaching media.
4242
4243 The specified device slot must not have a device attached to it,
4244 or this method will fail.
4245
4246 <note>
4247 You cannot attach a device to a newly created machine until
4248 this machine's settings are saved to disk using
4249 <link to="#saveSettings"/>.
4250 </note>
4251 <note>
4252 If the medium is being attached indirectly, a new differencing medium
4253 will implicitly be created for it and attached instead. If the
4254 changes made to the machine settings (including this indirect
4255 attachment) are later cancelled using <link to="#discardSettings"/>,
4256 this implicitly created differencing medium will implicitly
4257 be deleted.
4258 </note>
4259
4260 <result name="E_INVALIDARG">
4261 SATA device, SATA port, IDE port or IDE slot out of range, or
4262 file or UUID not found.
4263 </result>
4264 <result name="VBOX_E_INVALID_OBJECT_STATE">
4265 Machine must be registered before media can be attached.
4266 </result>
4267 <result name="VBOX_E_INVALID_VM_STATE">
4268 Invalid machine state.
4269 </result>
4270 <result name="VBOX_E_OBJECT_IN_USE">
4271 A medium is already attached to this or another virtual machine.
4272 </result>
4273
4274 </desc>
4275 <param name="name" type="wstring" dir="in">
4276 <desc>Name of the storage controller to attach the device to.</desc>
4277 </param>
4278 <param name="controllerPort" type="long" dir="in">
4279 <desc>Port to attach the device to. For an IDE controller, 0 specifies
4280 the primary controller and 1 specifies the secondary controller.
4281 For a SCSI controller, this must range from 0 to 15; for a SATA controller,
4282 from 0 to 29; for an SAS controller, from 0 to 7.</desc>
4283 </param>
4284 <param name="device" type="long" dir="in">
4285 <desc>Device slot in the given port to attach the device to. This is only
4286 relevant for IDE controllers, for which 0 specifies the master device and
4287 1 specifies the slave device. For all other controller types, this must
4288 be 0.</desc>
4289 </param>
4290 <param name="type" type="DeviceType" dir="in">
4291 <desc>Device type of the attached device. For media opened by
4292 <link to="IVirtualBox::openMedium" />, this must match the device type
4293 specified there.</desc>
4294 </param>
4295 <param name="medium" type="IMedium" dir="in">
4296 <desc>Medium to mount or NULL for an empty drive.</desc>
4297 </param>
4298 </method>
4299
4300 <method name="detachDevice">
4301 <desc>
4302 Detaches the device attached to a device slot of the specified bus.
4303
4304 Detaching the device from the virtual machine is deferred. This means
4305 that the medium remains associated with the machine when this method
4306 returns and gets actually de-associated only after a successful
4307 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4308 for more detailed information about attaching media.
4309
4310 <note>
4311 You cannot detach a device from a running machine.
4312 </note>
4313 <note>
4314 Detaching differencing media implicitly created by <link
4315 to="#attachDevice"/> for the indirect attachment using this
4316 method will <b>not</b> implicitly delete them. The
4317 <link to="IMedium::deleteStorage"/> operation should be
4318 explicitly performed by the caller after the medium is successfully
4319 detached and the settings are saved with
4320 <link to="#saveSettings"/>, if it is the desired action.
4321 </note>
4322
4323 <result name="VBOX_E_INVALID_VM_STATE">
4324 Attempt to detach medium from a running virtual machine.
4325 </result>
4326 <result name="VBOX_E_OBJECT_NOT_FOUND">
4327 No medium attached to given slot/bus.
4328 </result>
4329 <result name="VBOX_E_NOT_SUPPORTED">
4330 Medium format does not support storage deletion.
4331 </result>
4332
4333 </desc>
4334 <param name="name" type="wstring" dir="in">
4335 <desc>Name of the storage controller to detach the medium from.</desc>
4336 </param>
4337 <param name="controllerPort" type="long" dir="in">
4338 <desc>Port number to detach the medium from.</desc>
4339 </param>
4340 <param name="device" type="long" dir="in">
4341 <desc>Device slot number to detach the medium from.</desc>
4342 </param>
4343 </method>
4344
4345 <method name="passthroughDevice">
4346 <desc>
4347 Sets the passthrough mode of an existing DVD device. Changing the
4348 setting while the VM is running is forbidden. The setting is only used
4349 if at VM start the device is configured as a host DVD drive, in all
4350 other cases it is ignored. The device must already exist; see
4351 <link to="IMachine::attachDevice"/> for how to attach a new device.
4352
4353 The @a controllerPort and @a device parameters specify the device slot and
4354 have have the same meaning as with <link to="IMachine::attachDevice" />.
4355
4356 <result name="E_INVALIDARG">
4357 SATA device, SATA port, IDE port or IDE slot out of range.
4358 </result>
4359 <result name="VBOX_E_INVALID_OBJECT_STATE">
4360 Attempt to modify an unregistered virtual machine.
4361 </result>
4362 <result name="VBOX_E_INVALID_VM_STATE">
4363 Invalid machine state.
4364 </result>
4365
4366 </desc>
4367 <param name="name" type="wstring" dir="in">
4368 <desc>Name of the storage controller.</desc>
4369 </param>
4370 <param name="controllerPort" type="long" dir="in">
4371 <desc>Storage controller port.</desc>
4372 </param>
4373 <param name="device" type="long" dir="in">
4374 <desc>Device slot in the given port.</desc>
4375 </param>
4376 <param name="passthrough" type="boolean" dir="in">
4377 <desc>New value for the passthrough setting.</desc>
4378 </param>
4379 </method>
4380
4381 <method name="mountMedium">
4382 <desc>
4383 Mounts a medium (<link to="IMedium" />, identified
4384 by the given UUID @a id) to the given storage controller
4385 (<link to="IStorageController" />, identified by @a name),
4386 at the indicated port and device. The device must already exist;
4387 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4388
4389 This method is intended only for managing removable media, where the
4390 device is fixed but media is changeable at runtime (such as DVDs
4391 and floppies). It cannot be used for fixed media such as hard disks.
4392
4393 The @a controllerPort and @a device parameters specify the device slot and
4394 have have the same meaning as with <link to="IMachine::attachDevice" />.
4395
4396 The specified device slot can have a medium mounted, which will be
4397 unmounted first. Specifying a zero UUID (or an empty string) for
4398 @a medium does just an unmount.
4399
4400 See <link to="IMedium"/> for more detailed information about
4401 attaching media.
4402
4403 <result name="E_INVALIDARG">
4404 SATA device, SATA port, IDE port or IDE slot out of range.
4405 </result>
4406 <result name="VBOX_E_INVALID_OBJECT_STATE">
4407 Attempt to attach medium to an unregistered virtual machine.
4408 </result>
4409 <result name="VBOX_E_INVALID_VM_STATE">
4410 Invalid machine state.
4411 </result>
4412 <result name="VBOX_E_OBJECT_IN_USE">
4413 Medium already attached to this or another virtual machine.
4414 </result>
4415
4416 </desc>
4417 <param name="name" type="wstring" dir="in">
4418 <desc>Name of the storage controller to attach the medium to.</desc>
4419 </param>
4420 <param name="controllerPort" type="long" dir="in">
4421 <desc>Port to attach the medium to.</desc>
4422 </param>
4423 <param name="device" type="long" dir="in">
4424 <desc>Device slot in the given port to attach the medium to.</desc>
4425 </param>
4426 <param name="medium" type="IMedium" dir="in">
4427 <desc>Medium to mount or NULL for an empty drive.</desc>
4428 </param>
4429 <param name="force" type="boolean" dir="in">
4430 <desc>Allows to force unmount/mount of a medium which is locked by
4431 the device slot in the given port to attach the medium to.</desc>
4432 </param>
4433 </method>
4434
4435 <method name="getMedium" const="yes">
4436 <desc>
4437 Returns the virtual medium attached to a device slot of the specified
4438 bus.
4439
4440 Note that if the medium was indirectly attached by
4441 <link to="#mountMedium"/> to the given device slot then this
4442 method will return not the same object as passed to the
4443 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4444 more detailed information about mounting a medium.
4445
4446 <result name="VBOX_E_OBJECT_NOT_FOUND">
4447 No medium attached to given slot/bus.
4448 </result>
4449
4450 </desc>
4451 <param name="name" type="wstring" dir="in">
4452 <desc>Name of the storage controller the medium is attached to.</desc>
4453 </param>
4454 <param name="controllerPort" type="long" dir="in">
4455 <desc>Port to query.</desc>
4456 </param>
4457 <param name="device" type="long" dir="in">
4458 <desc>Device slot in the given port to query.</desc>
4459 </param>
4460 <param name="medium" type="IMedium" dir="return">
4461 <desc>Attached medium object.</desc>
4462 </param>
4463 </method>
4464
4465 <method name="getMediumAttachmentsOfController" const="yes">
4466 <desc>
4467 Returns an array of medium attachments which are attached to the
4468 the controller with the given name.
4469
4470 <result name="VBOX_E_OBJECT_NOT_FOUND">
4471 A storage controller with given name doesn't exist.
4472 </result>
4473 </desc>
4474 <param name="name" type="wstring" dir="in"/>
4475 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4476 </method>
4477
4478 <method name="getMediumAttachment" const="yes">
4479 <desc>
4480 Returns a medium attachment which corresponds to the controller with
4481 the given name, on the given port and device slot.
4482
4483 <result name="VBOX_E_OBJECT_NOT_FOUND">
4484 No attachment exists for the given controller/port/device combination.
4485 </result>
4486 </desc>
4487 <param name="name" type="wstring" dir="in"/>
4488 <param name="controllerPort" type="long" dir="in"/>
4489 <param name="device" type="long" dir="in"/>
4490 <param name="attachment" type="IMediumAttachment" dir="return"/>
4491 </method>
4492
4493 <method name="getNetworkAdapter" const="yes">
4494 <desc>
4495 Returns the network adapter associated with the given slot.
4496 Slots are numbered sequentially, starting with zero. The total
4497 number of adapters per machine is defined by the
4498 <link to="ISystemProperties::networkAdapterCount"/> property,
4499 so the maximum slot number is one less than that property's value.
4500
4501 <result name="E_INVALIDARG">
4502 Invalid @a slot number.
4503 </result>
4504
4505 </desc>
4506 <param name="slot" type="unsigned long" dir="in"/>
4507 <param name="adapter" type="INetworkAdapter" dir="return"/>
4508 </method>
4509
4510 <method name="addStorageController">
4511 <desc>
4512 Adds a new storage controller (SCSI, SAS or SATA controller) to the
4513 machine and returns it as an instance of
4514 <link to="IStorageController" />.
4515
4516 @a name identifies the controller for subsequent calls such as
4517 <link to="#getStorageControllerByName" />,
4518 <link to="#getStorageControllerByInstance" />,
4519 <link to="#removeStorageController" />,
4520 <link to="#attachDevice" /> or <link to="#mountMedium" />.
4521
4522 After the controller has been added, you can set its exact
4523 type by setting the <link to="IStorageController::controllerType" />.
4524
4525 <result name="VBOX_E_OBJECT_IN_USE">
4526 A storage controller with given name exists already.
4527 </result>
4528 <result name="E_INVALIDARG">
4529 Invalid @a controllerType.
4530 </result>
4531 </desc>
4532 <param name="name" type="wstring" dir="in"/>
4533 <param name="connectionType" type="StorageBus" dir="in"/>
4534 <param name="controller" type="IStorageController" dir="return"/>
4535 </method>
4536
4537 <method name="getStorageControllerByName" const="yes">
4538 <desc>
4539 Returns a storage controller with the given name.
4540
4541 <result name="VBOX_E_OBJECT_NOT_FOUND">
4542 A storage controller with given name doesn't exist.
4543 </result>
4544 </desc>
4545 <param name="name" type="wstring" dir="in"/>
4546 <param name="storageController" type="IStorageController" dir="return"/>
4547 </method>
4548
4549 <method name="getStorageControllerByInstance" const="yes">
4550 <desc>
4551 Returns a storage controller with the given instance number.
4552
4553 <result name="VBOX_E_OBJECT_NOT_FOUND">
4554 A storage controller with given instance number doesn't exist.
4555 </result>
4556 </desc>
4557 <param name="instance" type="unsigned long" dir="in"/>
4558 <param name="storageController" type="IStorageController" dir="return"/>
4559 </method>
4560
4561 <method name="removeStorageController">
4562 <desc>
4563 Removes a storage controller from the machine.
4564
4565 <result name="VBOX_E_OBJECT_NOT_FOUND">
4566 A storage controller with given name doesn't exist.
4567 </result>
4568 </desc>
4569 <param name="name" type="wstring" dir="in"/>
4570 </method>
4571
4572 <method name="getSerialPort" const="yes">
4573 <desc>
4574 Returns the serial port associated with the given slot.
4575 Slots are numbered sequentially, starting with zero. The total
4576 number of serial ports per machine is defined by the
4577 <link to="ISystemProperties::serialPortCount"/> property,
4578 so the maximum slot number is one less than that property's value.
4579
4580 <result name="E_INVALIDARG">
4581 Invalid @a slot number.
4582 </result>
4583
4584 </desc>
4585 <param name="slot" type="unsigned long" dir="in"/>
4586 <param name="port" type="ISerialPort" dir="return"/>
4587 </method>
4588
4589 <method name="getParallelPort" const="yes">
4590 <desc>
4591 Returns the parallel port associated with the given slot.
4592 Slots are numbered sequentially, starting with zero. The total
4593 number of parallel ports per machine is defined by the
4594 <link to="ISystemProperties::parallelPortCount"/> property,
4595 so the maximum slot number is one less than that property's value.
4596
4597 <result name="E_INVALIDARG">
4598 Invalid @a slot number.
4599 </result>
4600
4601 </desc>
4602 <param name="slot" type="unsigned long" dir="in"/>
4603 <param name="port" type="IParallelPort" dir="return"/>
4604 </method>
4605
4606 <method name="getExtraDataKeys">
4607 <desc>
4608 Returns an array representing the machine-specific extra data keys
4609 which currently have values defined.
4610 </desc>
4611 <param name="value" type="wstring" dir="return" safearray="yes">
4612 <desc>Array of extra data keys.</desc>
4613 </param>
4614 </method>
4615
4616 <method name="getExtraData">
4617 <desc>
4618 Returns associated machine-specific extra data.
4619
4620 If the requested data @a key does not exist, this function will
4621 succeed and return an empty string in the @a value argument.
4622
4623 <result name="VBOX_E_FILE_ERROR">
4624 Settings file not accessible.
4625 </result>
4626 <result name="VBOX_E_XML_ERROR">
4627 Could not parse the settings file.
4628 </result>
4629
4630 </desc>
4631 <param name="key" type="wstring" dir="in">
4632 <desc>Name of the data key to get.</desc>
4633 </param>
4634 <param name="value" type="wstring" dir="return">
4635 <desc>Value of the requested data key.</desc>
4636 </param>
4637 </method>
4638
4639 <method name="setExtraData">
4640 <desc>
4641 Sets associated machine-specific extra data.
4642
4643 If you pass @c null or an empty string as a key @a value, the given
4644 @a key will be deleted.
4645
4646 <note>
4647 Before performing the actual data change, this method will ask all
4648 registered listeners using the
4649 <link to="IExtraDataCanChangeEvent"/>
4650 notification for a permission. If one of the listeners refuses the
4651 new value, the change will not be performed.
4652 </note>
4653 <note>
4654 On success, the
4655 <link to="IExtraDataChangedEvent"/> notification
4656 is called to inform all registered listeners about a successful data
4657 change.
4658 </note>
4659 <note>
4660 This method can be called outside the machine session and therefore
4661 it's a caller's responsibility to handle possible race conditions
4662 when several clients change the same key at the same time.
4663 </note>
4664
4665 <result name="VBOX_E_FILE_ERROR">
4666 Settings file not accessible.
4667 </result>
4668 <result name="VBOX_E_XML_ERROR">
4669 Could not parse the settings file.
4670 </result>
4671
4672 </desc>
4673 <param name="key" type="wstring" dir="in">
4674 <desc>Name of the data key to set.</desc>
4675 </param>
4676 <param name="value" type="wstring" dir="in">
4677 <desc>Value to assign to the key.</desc>
4678 </param>
4679 </method>
4680
4681 <method name="getCPUProperty" const="yes">
4682 <desc>
4683 Returns the virtual CPU boolean value of the specified property.
4684
4685 <result name="E_INVALIDARG">
4686 Invalid property.
4687 </result>
4688
4689 </desc>
4690 <param name="property" type="CPUPropertyType" dir="in">
4691 <desc>
4692 Property type to query.
4693 </desc>
4694 </param>
4695 <param name="value" type="boolean" dir="return">
4696 <desc>
4697 Property value.
4698 </desc>
4699 </param>
4700 </method>
4701
4702 <method name="setCPUProperty">
4703 <desc>
4704 Sets the virtual CPU boolean value of the specified property.
4705
4706 <result name="E_INVALIDARG">
4707 Invalid property.
4708 </result>
4709
4710 </desc>
4711 <param name="property" type="CPUPropertyType" dir="in">
4712 <desc>
4713 Property type to query.
4714 </desc>
4715 </param>
4716 <param name="value" type="boolean" dir="in">
4717 <desc>
4718 Property value.
4719 </desc>
4720 </param>
4721 </method>
4722
4723 <method name="getCPUIDLeaf" const="yes">
4724 <desc>
4725 Returns the virtual CPU cpuid information for the specified leaf.
4726
4727 Currently supported index values for cpuid:
4728 Standard CPUID leafs: 0 - 0xA
4729 Extended CPUID leafs: 0x80000000 - 0x8000000A
4730
4731 See the Intel and AMD programmer's manuals for detailed information
4732 about the cpuid instruction and its leafs.
4733 <result name="E_INVALIDARG">
4734 Invalid id.
4735 </result>
4736
4737 </desc>
4738 <param name="id" type="unsigned long" dir="in">
4739 <desc>
4740 CPUID leaf index.
4741 </desc>
4742 </param>
4743 <param name="valEax" type="unsigned long" dir="out">
4744 <desc>
4745 CPUID leaf value for register eax.
4746 </desc>
4747 </param>
4748 <param name="valEbx" type="unsigned long" dir="out">
4749 <desc>
4750 CPUID leaf value for register ebx.
4751 </desc>
4752 </param>
4753 <param name="valEcx" type="unsigned long" dir="out">
4754 <desc>
4755 CPUID leaf value for register ecx.
4756 </desc>
4757 </param>
4758 <param name="valEdx" type="unsigned long" dir="out">
4759 <desc>
4760 CPUID leaf value for register edx.
4761 </desc>
4762 </param>
4763 </method>
4764
4765 <method name="setCPUIDLeaf">
4766 <desc>
4767 Sets the virtual CPU cpuid information for the specified leaf. Note that these values
4768 are not passed unmodified. VirtualBox clears features that it doesn't support.
4769
4770 Currently supported index values for cpuid:
4771 Standard CPUID leafs: 0 - 0xA
4772 Extended CPUID leafs: 0x80000000 - 0x8000000A
4773
4774 See the Intel and AMD programmer's manuals for detailed information
4775 about the cpuid instruction and its leafs.
4776
4777 Do not use this method unless you know exactly what you're doing. Misuse can lead to
4778 random crashes inside VMs.
4779 <result name="E_INVALIDARG">
4780 Invalid id.
4781 </result>
4782
4783 </desc>
4784 <param name="id" type="unsigned long" dir="in">
4785 <desc>
4786 CPUID leaf index.
4787 </desc>
4788 </param>
4789 <param name="valEax" type="unsigned long" dir="in">
4790 <desc>
4791 CPUID leaf value for register eax.
4792 </desc>
4793 </param>
4794 <param name="valEbx" type="unsigned long" dir="in">
4795 <desc>
4796 CPUID leaf value for register ebx.
4797 </desc>
4798 </param>
4799 <param name="valEcx" type="unsigned long" dir="in">
4800 <desc>
4801 CPUID leaf value for register ecx.
4802 </desc>
4803 </param>
4804 <param name="valEdx" type="unsigned long" dir="in">
4805 <desc>
4806 CPUID leaf value for register edx.
4807 </desc>
4808 </param>
4809 </method>
4810
4811 <method name="removeCPUIDLeaf">
4812 <desc>
4813 Removes the virtual CPU cpuid leaf for the specified index
4814
4815 <result name="E_INVALIDARG">
4816 Invalid id.
4817 </result>
4818
4819 </desc>
4820 <param name="id" type="unsigned long" dir="in">
4821 <desc>
4822 CPUID leaf index.
4823 </desc>
4824 </param>
4825 </method>
4826
4827 <method name="removeAllCPUIDLeaves">
4828 <desc>
4829 Removes all the virtual CPU cpuid leaves
4830 </desc>
4831 </method>
4832
4833 <method name="getHWVirtExProperty" const="yes">
4834 <desc>
4835 Returns the value of the specified hardware virtualization boolean property.
4836
4837 <result name="E_INVALIDARG">
4838 Invalid property.
4839 </result>
4840
4841 </desc>
4842 <param name="property" type="HWVirtExPropertyType" dir="in">
4843 <desc>
4844 Property type to query.
4845 </desc>
4846 </param>
4847 <param name="value" type="boolean" dir="return">
4848 <desc>
4849 Property value.
4850 </desc>
4851 </param>
4852 </method>
4853
4854 <method name="setHWVirtExProperty">
4855 <desc>
4856 Sets a new value for the specified hardware virtualization boolean property.
4857
4858 <result name="E_INVALIDARG">
4859 Invalid property.
4860 </result>
4861
4862 </desc>
4863 <param name="property" type="HWVirtExPropertyType" dir="in">
4864 <desc>
4865 Property type to set.
4866 </desc>
4867 </param>
4868 <param name="value" type="boolean" dir="in">
4869 <desc>
4870 New property value.
4871 </desc>
4872 </param>
4873 </method>
4874
4875 <method name="saveSettings">
4876 <desc>
4877 Saves any changes to machine settings made since the session
4878 has been opened or a new machine has been created, or since the
4879 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
4880 For registered machines, new settings become visible to all
4881 other VirtualBox clients after successful invocation of this
4882 method.
4883 <note>
4884 The method sends <link to="IMachineDataChangedEvent"/>
4885 notification event after the configuration has been successfully
4886 saved (only for registered machines).
4887 </note>
4888 <note>
4889 Calling this method is only valid on instances returned
4890 by <link to="ISession::machine"/> and on new machines
4891 created by <link to="IVirtualBox::createMachine"/> but not
4892 yet registered, or on unregistered machines after calling
4893 <link to="IMachine::unregister"/>.
4894 </note>
4895
4896 <result name="VBOX_E_FILE_ERROR">
4897 Settings file not accessible.
4898 </result>
4899 <result name="VBOX_E_XML_ERROR">
4900 Could not parse the settings file.
4901 </result>
4902 <result name="E_ACCESSDENIED">
4903 Modification request refused.
4904 </result>
4905
4906 </desc>
4907 </method>
4908
4909 <method name="discardSettings">
4910 <desc>
4911 Discards any changes to the machine settings made since the session
4912 has been opened or since the last call to <link to="#saveSettings"/>
4913 or <link to="#discardSettings"/>.
4914 <note>
4915 Calling this method is only valid on instances returned
4916 by <link to="ISession::machine"/> and on new machines
4917 created by <link to="IVirtualBox::createMachine"/> or
4918 opened by <link to="IVirtualBox::openMachine"/> but not
4919 yet registered, or on unregistered machines after calling
4920 <link to="IMachine::unregister"/>.
4921 </note>
4922
4923 <result name="VBOX_E_INVALID_VM_STATE">
4924 Virtual machine is not mutable.
4925 </result>
4926
4927 </desc>
4928 </method>
4929
4930 <method name="unregister">
4931 <desc>
4932 Unregisters the machine, which must have been previously registered using
4933 <link to="IVirtualBox::registerMachine"/>, and optionally do additional
4934 cleanup before the machine is unregistered.
4935
4936 This method does not delete any files. It only changes the machine configuration and
4937 the list of registered machines in the VirtualBox object. To delete the files which
4938 belonged to the machine, including the XML file of the machine itself, call
4939 <link to="#delete"/>, optionally with the array of IMedium objects which was returned
4940 from this method.
4941
4942 How thoroughly this method cleans up the machine configuration before unregistering
4943 the machine depends on the @a cleanupMode argument.
4944
4945 <ul>
4946 <li>With "UnregisterOnly", the machine will only be unregistered, but no additional
4947 cleanup will be performed. The call will fail if the machine is in "Saved" state
4948 or has any snapshots or any media attached (see <link to="IMediumAttachment" />.
4949 It is the responsibility of the caller to delete all such configuration in this mode.
4950 In this mode, the API behaves like the former @c IVirtualBox::unregisterMachine() API
4951 which it replaces.</li>
4952 <li>With "DetachAllReturnNone", the call will succeed even if the machine is in "Saved"
4953 state or if it has snapshots or media attached. All media attached to the current machine
4954 state or in snapshots will be detached. No medium objects will be returned; all of the
4955 machine's media will remain open.</li>
4956 <li>With "DetachAllReturnHardDisksOnly", the call will behave like with "DetachAllReturnNone",
4957 except that all the hard disk medium objects which were detached from the machine will
4958 be returned as an array. This allows for quickly passing them to the <link to="#delete" />
4959 API for closing and deletion.</li>
4960 <li>With "Full", the call will behave like with "DetachAllReturnHardDisksOnly", except
4961 that all media will be returned in the array, including removeable media like DVDs and
4962 floppies. This might be useful if the user wants to inspect in detail which media were
4963 attached to the machine. Be careful when passing the media array to <link to="#delete" />
4964 in that case because users will typically want to preserve ISO and RAW image files.</li>
4965 </ul>
4966
4967 This API does not verify whether the media files returned in the array are still
4968 attached to other machines (i.e. shared between several machines). If such a shared
4969 image is passed to <link to="#delete" /> however, closing the image will fail there
4970 and the image will be silently skipped.
4971
4972 A typical implementation will use "DetachAllReturnHardDisksOnly" and then pass the
4973 resulting IMedia array to <link to="#delete"/>. This way, the machine is completely
4974 deleted with all its saved states and hard disk images, but images for removeable
4975 drives (such as ISO and RAW files) will remain on disk.
4976
4977 The call will fail if the machine is currently locked (see <link to="ISession" />).
4978 It implicitly calls <link to="#saveSettings"/> to save all current machine settings
4979 before unregistering it.
4980
4981 After successful method invocation, the <link to="IMachineRegisteredEvent"/> event
4982 is fired.
4983
4984 <note>
4985 If the given machine is inaccessible (see <link to="#accessible"/>), it
4986 will be unregistered and fully uninitialized right afterwards. As a result,
4987 the returned machine object will be unusable and an attempt to call
4988 <b>any</b> method will return the "Object not ready" error.
4989 </note>
4990
4991 <result name="VBOX_E_INVALID_OBJECT_STATE">
4992 Machine is currently locked for a session.
4993 </result>
4994 </desc>
4995
4996 <param name="cleanupMode" type="CleanupMode" dir="in">
4997 <desc>How to clean up after the machine has been unregistered.</desc>
4998 </param>
4999 <param name="aMedia" type="IMedium" safearray="yes" dir="return">
5000 <desc>List of media detached from the machine, depending on the @a cleanupMode parameter.</desc>
5001 </param>
5002 </method>
5003
5004 <method name="delete">
5005 <desc>
5006 Deletes the files associated with this machine from disk. If medium objects are passed
5007 in with the @a aMedia argument, they are closed and, if closing was succesful, their
5008 storage files are deleted as well. For convenience, this array of media files can be
5009 the same as the one returned from a previous <link to="#unregister" /> call.
5010
5011 This method must only be called on machines which are either write-locked (i.e. on instances
5012 returned by <link to="ISession::machine"/>) or on unregistered machines (i.e. not yet
5013 registered machines created by <link to="IVirtualBox::createMachine"/> or opened by
5014 <link to="IVirtualBox::openMachine"/>, or after having called <link to="#unregister"/>).
5015
5016 The following files will be deleted by this method:
5017 <ul>
5018 <li>If <link to="#unregister" /> had been previously called with a @a cleanupMode
5019 argument other than "UnregisterOnly", this will delete all saved state files that
5020 the machine had in use; possibly one if the machine was in "Saved" state and one
5021 for each online snapshot that the machine had.</li>
5022 <li>On each medium object passed in the @a aMedia array, this will call
5023 <link to="IMedium::close" />. If that succeeds, this will attempt to delete the
5024 medium's storage on disk. Since the close() call will fail if the medium is still
5025 in use, e.g. because it is still attached to a second machine; in that case the
5026 storage will not be deleted.</li>
5027 <li>Finally, the machine's own XML file will be deleted.</li>
5028 </ul>
5029
5030 Since deleting large disk image files can be a time-consuming I/O operation, this
5031 method operates asynchronously and returns an IProgress object to allow the caller
5032 to monitor the progress. There will be one sub-operation for each file that is
5033 being deleted (saved state or medium storage file).
5034
5035 <note>
5036 <link to="#settingsModified"/> will return @c true after this
5037 method successfully returns.
5038 </note>
5039
5040 <result name="VBOX_E_INVALID_VM_STATE">
5041 Machine is registered but not write-locked.
5042 </result>
5043 <result name="VBOX_E_IPRT_ERROR">
5044 Could not delete the settings file.
5045 </result>
5046 </desc>
5047 <param name="aMedia" type="IMedium" safearray="yes" dir="in">
5048 <desc>List of media to be closed and whose storage files will be deleted.</desc>
5049 </param>
5050 <param name="aProgress" type="IProgress" dir="return">
5051 <desc>Progress object to track the operation completion.</desc>
5052 </param>
5053 </method>
5054
5055 <method name="export">
5056 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5057 steps required to export VirtualBox machines to OVF.
5058 </desc>
5059
5060 <param name="aAppliance" type="IAppliance" dir="in">
5061 <desc>Appliance to export this machine to.</desc>
5062 </param>
5063 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5064 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5065 </param>
5066 </method >
5067
5068 <method name="findSnapshot">
5069 <desc>
5070 Returns a snapshot of this machine with the given name or UUID.
5071
5072 Returns a snapshot of this machine with the given UUID.
5073 A @c null argument can be used to obtain the first snapshot
5074 taken on this machine. This is useful if you want to traverse
5075 the whole tree of snapshots starting from the root.
5076
5077 <result name="VBOX_E_OBJECT_NOT_FOUND">
5078 Virtual machine has no snapshots or snapshot not found.
5079 </result>
5080
5081 </desc>
5082 <param name="nameOrId" type="wstring" dir="in">
5083 <desc>What to search for. Name or UUID of the snapshot to find</desc>
5084 </param>
5085 <param name="snapshot" type="ISnapshot" dir="return">
5086 <desc>Snapshot object with the given name.</desc>
5087 </param>
5088 </method>
5089
5090 <method name="createSharedFolder">
5091 <desc>
5092 Creates a new permanent shared folder by associating the given logical
5093 name with the given host path, adds it to the collection of shared
5094 folders and starts sharing it. Refer to the description of
5095 <link to="ISharedFolder"/> to read more about logical names.
5096
5097 <result name="VBOX_E_OBJECT_IN_USE">
5098 Shared folder already exists.
5099 </result>
5100 <result name="VBOX_E_FILE_ERROR">
5101 Shared folder @a hostPath not accessible.
5102 </result>
5103
5104 </desc>
5105 <param name="name" type="wstring" dir="in">
5106 <desc>Unique logical name of the shared folder.</desc>
5107 </param>
5108 <param name="hostPath" type="wstring" dir="in">
5109 <desc>Full path to the shared folder in the host file system.</desc>
5110 </param>
5111 <param name="writable" type="boolean" dir="in">
5112 <desc>Whether the share is writable or readonly.</desc>
5113 </param>
5114 <param name="automount" type="boolean" dir="in">
5115 <desc>Whether the share gets automatically mounted by the guest
5116 or not.</desc>
5117 </param>
5118 </method>
5119
5120 <method name="removeSharedFolder">
5121 <desc>
5122 Removes the permanent shared folder with the given name previously
5123 created by <link to="#createSharedFolder"/> from the collection of
5124 shared folders and stops sharing it.
5125
5126 <result name="VBOX_E_INVALID_VM_STATE">
5127 Virtual machine is not mutable.
5128 </result>
5129 <result name="VBOX_E_OBJECT_NOT_FOUND">
5130 Shared folder @a name does not exist.
5131 </result>
5132
5133 </desc>
5134 <param name="name" type="wstring" dir="in">
5135 <desc>Logical name of the shared folder to remove.</desc>
5136 </param>
5137 </method>
5138
5139 <method name="canShowConsoleWindow">
5140 <desc>
5141 Returns @c true if the VM console process can activate the
5142 console window and bring it to foreground on the desktop of
5143 the host PC.
5144 <note>
5145 This method will fail if a session for this machine is not
5146 currently open.
5147 </note>
5148
5149 <result name="VBOX_E_INVALID_VM_STATE">
5150 Machine session is not open.
5151 </result>
5152
5153 </desc>
5154 <param name="canShow" type="boolean" dir="return">
5155 <desc>
5156 @c true if the console window can be shown and @c false otherwise.
5157 </desc>
5158 </param>
5159 </method>
5160
5161 <method name="showConsoleWindow">
5162 <desc>
5163 Activates the console window and brings it to foreground on
5164 the desktop of the host PC. Many modern window managers on
5165 many platforms implement some sort of focus stealing
5166 prevention logic, so that it may be impossible to activate
5167 a window without the help of the currently active
5168 application. In this case, this method will return a non-zero
5169 identifier that represents the top-level window of the VM
5170 console process. The caller, if it represents a currently
5171 active process, is responsible to use this identifier (in a
5172 platform-dependent manner) to perform actual window
5173 activation.
5174 <note>
5175 This method will fail if a session for this machine is not
5176 currently open.
5177 </note>
5178
5179 <result name="VBOX_E_INVALID_VM_STATE">
5180 Machine session is not open.
5181 </result>
5182
5183 </desc>
5184 <param name="winId" type="long long" dir="return">
5185 <desc>
5186 Platform-dependent identifier of the top-level VM console
5187 window, or zero if this method has performed all actions
5188 necessary to implement the <i>show window</i> semantics for
5189 the given platform and/or VirtualBox front-end.
5190 </desc>
5191 </param>
5192 </method>
5193
5194 <method name="getGuestProperty" const="yes">
5195 <desc>
5196 Reads an entry from the machine's guest property store.
5197
5198 <result name="VBOX_E_INVALID_VM_STATE">
5199 Machine session is not open.
5200 </result>
5201
5202 </desc>
5203 <param name="name" type="wstring" dir="in">
5204 <desc>
5205 The name of the property to read.
5206 </desc>
5207 </param>
5208 <param name="value" type="wstring" dir="out">
5209 <desc>
5210 The value of the property. If the property does not exist then this
5211 will be empty.
5212 </desc>
5213 </param>
5214 <param name="timestamp" type="long long" dir="out">
5215 <desc>
5216 The time at which the property was last modified, as seen by the
5217 server process.
5218 </desc>
5219 </param>
5220 <param name="flags" type="wstring" dir="out">
5221 <desc>
5222 Additional property parameters, passed as a comma-separated list of
5223 "name=value" type entries.
5224 </desc>
5225 </param>
5226 </method>
5227
5228 <method name="getGuestPropertyValue" const="yes">
5229 <desc>
5230 Reads a value from the machine's guest property store.
5231
5232 <result name="VBOX_E_INVALID_VM_STATE">
5233 Machine session is not open.
5234 </result>
5235
5236 </desc>
5237 <param name="property" type="wstring" dir="in">
5238 <desc>
5239 The name of the property to read.
5240 </desc>
5241 </param>
5242 <param name="value" type="wstring" dir="return">
5243 <desc>
5244 The value of the property. If the property does not exist then this
5245 will be empty.
5246 </desc>
5247 </param>
5248 </method>
5249
5250 <method name="getGuestPropertyTimestamp" const="yes">
5251 <desc>
5252 Reads a property timestamp from the machine's guest property store.
5253
5254 <result name="VBOX_E_INVALID_VM_STATE">
5255 Machine session is not open.
5256 </result>
5257
5258 </desc>
5259 <param name="property" type="wstring" dir="in">
5260 <desc>
5261 The name of the property to read.
5262 </desc>
5263 </param>
5264 <param name="value" type="long long" dir="return">
5265 <desc>
5266 The timestamp. If the property does not exist then this will be
5267 empty.
5268 </desc>
5269 </param>
5270 </method>
5271
5272 <method name="setGuestProperty">
5273 <desc>
5274 Sets, changes or deletes an entry in the machine's guest property
5275 store.
5276
5277 <result name="E_ACCESSDENIED">
5278 Property cannot be changed.
5279 </result>
5280 <result name="E_INVALIDARG">
5281 Invalid @a flags.
5282 </result>
5283 <result name="VBOX_E_INVALID_VM_STATE">
5284 Virtual machine is not mutable or session not open.
5285 </result>
5286 <result name="VBOX_E_INVALID_OBJECT_STATE">
5287 Cannot set transient property when machine not running.
5288 </result>
5289
5290 </desc>
5291 <param name="property" type="wstring" dir="in">
5292 <desc>
5293 The name of the property to set, change or delete.
5294 </desc>
5295 </param>
5296 <param name="value" type="wstring" dir="in">
5297 <desc>
5298 The new value of the property to set, change or delete. If the
5299 property does not yet exist and value is non-empty, it will be
5300 created. If the value is @c null or empty, the property will be
5301 deleted if it exists.
5302 </desc>
5303 </param>
5304 <param name="flags" type="wstring" dir="in">
5305 <desc>
5306 Additional property parameters, passed as a comma-separated list of
5307 "name=value" type entries.
5308 </desc>
5309 </param>
5310 </method>
5311
5312 <method name="setGuestPropertyValue">
5313 <desc>
5314 Sets, changes or deletes a value in the machine's guest property
5315 store. The flags field will be left unchanged or created empty for a
5316 new property.
5317
5318 <result name="E_ACCESSDENIED">
5319 Property cannot be changed.
5320 </result>
5321 <result name="VBOX_E_INVALID_VM_STATE">
5322 Virtual machine is not mutable or session not open.
5323 </result>
5324 <result name="VBOX_E_INVALID_OBJECT_STATE">
5325 Cannot set transient property when machine not running.
5326 </result>
5327 </desc>
5328
5329 <param name="property" type="wstring" dir="in">
5330 <desc>
5331 The name of the property to set, change or delete.
5332 </desc>
5333 </param>
5334 <param name="value" type="wstring" dir="in">
5335 <desc>
5336 The new value of the property to set, change or delete. If the
5337 property does not yet exist and value is non-empty, it will be
5338 created. If the value is @c null or empty, the property will be
5339 deleted if it exists.
5340 </desc>
5341 </param>
5342 </method>
5343
5344 <method name="enumerateGuestProperties">
5345 <desc>
5346 Return a list of the guest properties matching a set of patterns along
5347 with their values, time stamps and flags.
5348 </desc>
5349 <param name="patterns" type="wstring" dir="in">
5350 <desc>
5351 The patterns to match the properties against, separated by '|'
5352 characters. If this is empty or @c null, all properties will match.
5353 </desc>
5354 </param>
5355 <param name="name" type="wstring" dir="out" safearray="yes">
5356 <desc>
5357 The names of the properties returned.
5358 </desc>
5359 </param>
5360 <param name="value" type="wstring" dir="out" safearray="yes">
5361 <desc>
5362 The values of the properties returned. The array entries match the
5363 corresponding entries in the @a name array.
5364 </desc>
5365 </param>
5366 <param name="timestamp" type="long long" dir="out" safearray="yes">
5367 <desc>
5368 The time stamps of the properties returned. The array entries match
5369 the corresponding entries in the @a name array.
5370 </desc>
5371 </param>
5372 <param name="flags" type="wstring" dir="out" safearray="yes">
5373 <desc>
5374 The flags of the properties returned. The array entries match the
5375 corresponding entries in the @a name array.
5376 </desc>
5377 </param>
5378 </method>
5379
5380 <method name="querySavedGuestSize">
5381 <desc>
5382 Returns the guest dimensions from the saved state.
5383 </desc>
5384 <param name="screenId" type="unsigned long" dir="in">
5385 <desc>
5386 Saved guest screen to query info from.
5387 </desc>
5388 </param>
5389 <param name="width" type="unsigned long" dir="out">
5390 <desc>
5391 Guest width at the time of the saved state was taken.
5392 </desc>
5393 </param>
5394 <param name="height" type="unsigned long" dir="out">
5395 <desc>
5396 Guest height at the time of the saved state was taken.
5397 </desc>
5398 </param>
5399 </method>
5400
5401 <method name="querySavedThumbnailSize">
5402 <desc>
5403 Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.
5404 </desc>
5405 <param name="screenId" type="unsigned long" dir="in">
5406 <desc>
5407 Saved guest screen to query info from.
5408 </desc>
5409 </param>
5410 <param name="size" type="unsigned long" dir="out">
5411 <desc>
5412 Size of buffer required to store the bitmap.
5413 </desc>
5414 </param>
5415 <param name="width" type="unsigned long" dir="out">
5416 <desc>
5417 Bitmap width.
5418 </desc>
5419 </param>
5420 <param name="height" type="unsigned long" dir="out">
5421 <desc>
5422 Bitmap height.
5423 </desc>
5424 </param>
5425 </method>
5426
5427 <method name="readSavedThumbnailToArray">
5428 <desc>
5429 Thumbnail is retrieved to an array of bytes in uncompressed 32-bit BGRA or RGBA format.
5430 </desc>
5431 <param name="screenId" type="unsigned long" dir="in">
5432 <desc>
5433 Saved guest screen to read from.
5434 </desc>
5435 </param>
5436 <param name="BGR" type="boolean" dir="in">
5437 <desc>
5438 How to order bytes in the pixel. A pixel consists of 4 bytes. If this parameter is true, then
5439 bytes order is: B, G, R, 0xFF. If this parameter is false, then bytes order is: R, G, B, 0xFF.
5440 </desc>
5441 </param>
5442 <param name="width" type="unsigned long" dir="out">
5443 <desc>
5444 Bitmap width.
5445 </desc>
5446 </param>
5447 <param name="height" type="unsigned long" dir="out">
5448 <desc>
5449 Bitmap height.
5450 </desc>
5451 </param>
5452 <param name="data" type="octet" safearray="yes" dir="return">
5453 <desc>
5454 Array with resulting bitmap data.
5455 </desc>
5456 </param>
5457 </method>
5458
5459 <method name="readSavedThumbnailPNGToArray">
5460 <desc>
5461 Thumbnail in PNG format is retrieved to an array of bytes.
5462 </desc>
5463 <param name="screenId" type="unsigned long" dir="in">
5464 <desc>
5465 Saved guest screen to read from.
5466 </desc>
5467 </param>
5468 <param name="width" type="unsigned long" dir="out">
5469 <desc>
5470 Image width.
5471 </desc>
5472 </param>
5473 <param name="height" type="unsigned long" dir="out">
5474 <desc>
5475 Image height.
5476 </desc>
5477 </param>
5478 <param name="data" type="octet" dir="return" safearray="yes">
5479 <desc>
5480 Array with resulting PNG data.
5481 </desc>
5482 </param>
5483 </method>
5484
5485 <method name="querySavedScreenshotPNGSize">
5486 <desc>
5487 Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.
5488 </desc>
5489 <param name="screenId" type="unsigned long" dir="in">
5490 <desc>
5491 Saved guest screen to query info from.
5492 </desc>
5493 </param>
5494 <param name="size" type="unsigned long" dir="out">
5495 <desc>
5496 Size of buffer required to store the PNG binary data.
5497 </desc>
5498 </param>
5499 <param name="width" type="unsigned long" dir="out">
5500 <desc>
5501 Image width.
5502 </desc>
5503 </param>
5504 <param name="height" type="unsigned long" dir="out">
5505 <desc>
5506 Image height.
5507 </desc>
5508 </param>
5509 </method>
5510
5511 <method name="readSavedScreenshotPNGToArray">
5512 <desc>
5513 Screenshot in PNG format is retrieved to an array of bytes.
5514 </desc>
5515 <param name="screenId" type="unsigned long" dir="in">
5516 <desc>
5517 Saved guest screen to read from.
5518 </desc>
5519 </param>
5520 <param name="width" type="unsigned long" dir="out">
5521 <desc>
5522 Image width.
5523 </desc>
5524 </param>
5525 <param name="height" type="unsigned long" dir="out">
5526 <desc>
5527 Image height.
5528 </desc>
5529 </param>
5530 <param name="data" type="octet" dir="return" safearray="yes">
5531 <desc>
5532 Array with resulting PNG data.
5533 </desc>
5534 </param>
5535 </method>
5536
5537 <method name="hotPlugCPU">
5538 <desc>
5539 Plugs a CPU into the machine.
5540 </desc>
5541 <param name="cpu" type="unsigned long" dir="in">
5542 <desc>
5543 The CPU id to insert.
5544 </desc>
5545 </param>
5546 </method>
5547
5548 <method name="hotUnplugCPU">
5549 <desc>
5550 Removes a CPU from the machine.
5551 </desc>
5552 <param name="cpu" type="unsigned long" dir="in">
5553 <desc>
5554 The CPU id to remove.
5555 </desc>
5556 </param>
5557 </method>
5558
5559 <method name="getCPUStatus">
5560 <desc>
5561 Returns the current status of the given CPU.
5562 </desc>
5563 <param name="cpu" type="unsigned long" dir="in">
5564 <desc>
5565 The CPU id to check for.
5566 </desc>
5567 </param>
5568 <param name="attached" type="boolean" dir="return">
5569 <desc>
5570 Status of the CPU.
5571 </desc>
5572 </param>
5573 </method>
5574
5575 <method name="queryLogFilename">
5576 <desc>
5577 Queries for the VM log file name of an given index. Returns an empty
5578 string if a log file with that index doesn't exists.
5579 </desc>
5580 <param name="idx" type="unsigned long" dir="in">
5581 <desc>
5582 Which log file name to query. 0=current log file.
5583 </desc>
5584 </param>
5585 <param name="filename" type="wstring" dir="return">
5586 <desc>
5587 On return the full path to the log file or an empty string on error.
5588 </desc>
5589 </param>
5590 </method>
5591
5592 <method name="readLog">
5593 <desc>
5594 Reads the VM log file. The chunk size is limited, so even if you
5595 ask for a big piece there might be less data returned.
5596 </desc>
5597 <param name="idx" type="unsigned long" dir="in">
5598 <desc>
5599 Which log file to read. 0=current log file.
5600 </desc>
5601 </param>
5602 <param name="offset" type="long long" dir="in">
5603 <desc>
5604 Offset in the log file.
5605 </desc>
5606 </param>
5607 <param name="size" type="long long" dir="in">
5608 <desc>
5609 Chunk size to read in the log file.
5610 </desc>
5611 </param>
5612 <param name="data" type="octet" dir="return" safearray="yes">
5613 <desc>
5614 Data read from the log file. A data size of 0 means end of file
5615 if the requested chunk size was not 0. This is the unprocessed
5616 file data, i.e. the line ending style depends on the platform of
5617 the system the server is running on.
5618 </desc>
5619 </param>
5620 </method>
5621 </interface>
5622
5623 <!--
5624 // IConsole
5625 /////////////////////////////////////////////////////////////////////////
5626 -->
5627
5628 <interface
5629 name="IRemoteDisplayInfo" extends="$unknown"
5630 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
5631 wsmap="struct"
5632 >
5633 <desc>
5634 Contains information about the remote display (VRDP) capabilities and status.
5635 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5636 </desc>
5637
5638 <attribute name="active" type="boolean" readonly="yes">
5639 <desc>
5640 Whether the remote display connection is active.
5641 </desc>
5642 </attribute>
5643
5644 <attribute name="port" type="long" readonly="yes">
5645 <desc>
5646 VRDP server port number. If this property is equal to <tt>0</tt>, then
5647 the VRDP server failed to start, usually because there are no free TCP
5648 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
5649 server has not yet been started.
5650 </desc>
5651 </attribute>
5652
5653 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5654 <desc>
5655 How many times a client connected.
5656 </desc>
5657 </attribute>
5658
5659 <attribute name="beginTime" type="long long" readonly="yes">
5660 <desc>
5661 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5662 </desc>
5663 </attribute>
5664
5665 <attribute name="endTime" type="long long" readonly="yes">
5666 <desc>
5667 When the last connection was terminated or the current time, if
5668 connection is still active, in milliseconds since 1970-01-01 UTC.
5669 </desc>
5670 </attribute>
5671
5672 <attribute name="bytesSent" type="long long" readonly="yes">
5673 <desc>
5674 How many bytes were sent in last or current, if still active, connection.
5675 </desc>
5676 </attribute>
5677
5678 <attribute name="bytesSentTotal" type="long long" readonly="yes">
5679 <desc>
5680 How many bytes were sent in all connections.
5681 </desc>
5682 </attribute>
5683
5684 <attribute name="bytesReceived" type="long long" readonly="yes">
5685 <desc>
5686 How many bytes were received in last or current, if still active, connection.
5687 </desc>
5688 </attribute>
5689
5690 <attribute name="bytesReceivedTotal" type="long long" readonly="yes">
5691 <desc>
5692 How many bytes were received in all connections.
5693 </desc>
5694 </attribute>
5695
5696 <attribute name="user" type="wstring" readonly="yes">
5697 <desc>
5698 Login user name supplied by the client.
5699 </desc>
5700 </attribute>
5701
5702 <attribute name="domain" type="wstring" readonly="yes">
5703 <desc>
5704 Login domain name supplied by the client.
5705 </desc>
5706 </attribute>
5707
5708 <attribute name="clientName" type="wstring" readonly="yes">
5709 <desc>
5710 The client name supplied by the client.
5711 </desc>
5712 </attribute>
5713
5714 <attribute name="clientIP" type="wstring" readonly="yes">
5715 <desc>
5716 The IP address of the client.
5717 </desc>
5718 </attribute>
5719
5720 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5721 <desc>
5722 The client software version number.
5723 </desc>
5724 </attribute>
5725
5726 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5727 <desc>
5728 Public key exchange method used when connection was established.
5729 Values: 0 - RDP4 public key exchange scheme.
5730 1 - X509 certificates were sent to client.
5731 </desc>
5732 </attribute>
5733
5734 </interface>
5735
5736 <interface
5737 name="IConsole" extends="$unknown"
5738 uuid="03cb7897-ea17-4e6c-81ae-4bd90be2fde2"
5739 wsmap="managed"
5740 >
5741 <desc>
5742 The IConsole interface represents an interface to control virtual
5743 machine execution.
5744
5745 A console object gets created when a machine has been locked for a
5746 particular session (client process) using <link to="IMachine::lockMachine" />
5747 or <link to="IMachine::launchVMProcess"/>. The console object can
5748 then be found in the session's <link to="ISession::console" /> attribute.
5749
5750 Methods of the IConsole interface allow the caller to query the current
5751 virtual machine execution state, pause the machine or power it down, save
5752 the machine state or take a snapshot, attach and detach removable media
5753 and so on.
5754
5755 <see>ISession</see>
5756 </desc>
5757
5758 <attribute name="machine" type="IMachine" readonly="yes">
5759 <desc>
5760 Machine object this console is sessioned with.
5761 <note>
5762 This is a convenience property, it has the same value as
5763 <link to="ISession::machine"/> of the corresponding session
5764 object.
5765 </note>
5766 </desc>
5767 </attribute>
5768
5769 <attribute name="state" type="MachineState" readonly="yes">
5770 <desc>
5771 Current execution state of the machine.
5772 <note>
5773 This property always returns the same value as the corresponding
5774 property of the IMachine object this console is sessioned with.
5775 For the process that owns (executes) the VM, this is the
5776 preferable way of querying the VM state, because no IPC
5777 calls are made.
5778 </note>
5779 </desc>
5780 </attribute>
5781
5782 <attribute name="guest" type="IGuest" readonly="yes">
5783 <desc>Guest object.</desc>
5784 </attribute>
5785
5786 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5787 <desc>
5788 Virtual keyboard object.
5789 <note>
5790 If the machine is not running, any attempt to use
5791 the returned object will result in an error.
5792 </note>
5793 </desc>
5794 </attribute>
5795
5796 <attribute name="mouse" type="IMouse" readonly="yes">
5797 <desc>
5798 Virtual mouse object.
5799 <note>
5800 If the machine is not running, any attempt to use
5801 the returned object will result in an error.
5802 </note>
5803 </desc>
5804 </attribute>
5805
5806 <attribute name="display" type="IDisplay" readonly="yes">
5807 <desc>Virtual display object.
5808 <note>
5809 If the machine is not running, any attempt to use
5810 the returned object will result in an error.
5811 </note>
5812 </desc>
5813 </attribute>
5814
5815 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5816 <desc>Debugging interface.</desc>
5817 </attribute>
5818
5819 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
5820 <desc>
5821 Collection of USB devices currently attached to the virtual
5822 USB controller.
5823 <note>
5824 The collection is empty if the machine is not running.
5825 </note>
5826 </desc>
5827 </attribute>
5828
5829 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
5830 <desc>
5831 List of USB devices currently attached to the remote VRDP client.
5832 Once a new device is physically attached to the remote host computer,
5833 it appears in this list and remains there until detached.
5834 </desc>
5835 </attribute>
5836
5837 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
5838 <desc>
5839 Collection of shared folders for the current session. These folders
5840 are called transient shared folders because they are available to the
5841 guest OS running inside the associated virtual machine only for the
5842 duration of the session (as opposed to
5843 <link to="IMachine::sharedFolders"/> which represent permanent shared
5844 folders). When the session is closed (e.g. the machine is powered down),
5845 these folders are automatically discarded.
5846
5847 New shared folders are added to the collection using
5848 <link to="#createSharedFolder"/>. Existing shared folders can be
5849 removed using <link to="#removeSharedFolder"/>.
5850 </desc>
5851 </attribute>
5852
5853 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5854 <desc>
5855 Interface that provides information on Remote Display (VRDP) connection.
5856 </desc>
5857 </attribute>
5858
5859 <attribute name="eventSource" type="IEventSource" readonly="yes">
5860 <desc>
5861 Event source for console events.
5862 </desc>
5863 </attribute>
5864
5865 <method name="powerUp">
5866 <desc>
5867 Starts the virtual machine execution using the current machine
5868 state (that is, its current execution state, current settings and
5869 current storage devices).
5870
5871 <note>
5872 This method is only useful for front-ends that want to actually
5873 execute virtual machines in their own process (like the VirtualBox
5874 or VBoxSDL front-ends). Unless you are intending to write such a
5875 front-end, do not call this method. If you simply want to
5876 start virtual machine execution using one of the existing front-ends
5877 (for example the VirtualBox GUI or headless server), use
5878 <link to="IMachine::launchVMProcess"/> instead; these
5879 front-ends will power up the machine automatically for you.
5880 </note>
5881
5882 If the machine is powered off or aborted, the execution will
5883 start from the beginning (as if the real hardware were just
5884 powered on).
5885
5886 If the machine is in the <link to="MachineState_Saved"/> state,
5887 it will continue its execution the point where the state has
5888 been saved.
5889
5890 If the machine <link to="IMachine::teleporterEnabled"/> property is
5891 enabled on the machine being powered up, the machine will wait for an
5892 incoming teleportation in the <link to="MachineState_TeleportingIn"/>
5893 state. The returned progress object will have at least three
5894 operations where the last three are defined as: (1) powering up and
5895 starting TCP server, (2) waiting for incoming teleportations, and
5896 (3) perform teleportation. These operations will be reflected as the
5897 last three operations of the progress objected returned by
5898 <link to="IMachine::launchVMProcess"/> as well.
5899
5900 <see>#saveState</see>
5901
5902 <result name="VBOX_E_INVALID_VM_STATE">
5903 Virtual machine already running.
5904 </result>
5905 <result name="VBOX_E_HOST_ERROR">
5906 Host interface does not exist or name not set.
5907 </result>
5908 <result name="VBOX_E_FILE_ERROR">
5909 Invalid saved state file.
5910 </result>
5911 </desc>
5912 <param name="progress" type="IProgress" dir="return">
5913 <desc>Progress object to track the operation completion.</desc>
5914 </param>
5915 </method>
5916
5917 <method name="powerUpPaused">
5918 <desc>
5919 Identical to powerUp except that the VM will enter the
5920 <link to="MachineState_Paused"/> state, instead of
5921 <link to="MachineState_Running"/>.
5922
5923 <see>#powerUp</see>
5924 <result name="VBOX_E_INVALID_VM_STATE">
5925 Virtual machine already running.
5926 </result>
5927 <result name="VBOX_E_HOST_ERROR">
5928 Host interface does not exist or name not set.
5929 </result>
5930 <result name="VBOX_E_FILE_ERROR">
5931 Invalid saved state file.
5932 </result>
5933 </desc>
5934 <param name="progress" type="IProgress" dir="return">
5935 <desc>Progress object to track the operation completion.</desc>
5936 </param>
5937 </method>
5938
5939 <method name="powerDown">
5940 <desc>
5941 Initiates the power down procedure to stop the virtual machine
5942 execution.
5943
5944 The completion of the power down procedure is tracked using the returned
5945 IProgress object. After the operation is complete, the machine will go
5946 to the PoweredOff state.
5947 <result name="VBOX_E_INVALID_VM_STATE">
5948 Virtual machine must be Running, Paused or Stuck to be powered down.
5949 </result>
5950 </desc>
5951 <param name="progress" type="IProgress" dir="return">
5952 <desc>Progress object to track the operation completion.</desc>
5953 </param>
5954 </method>
5955
5956 <method name="reset">
5957 <desc>Resets the virtual machine.
5958 <result name="VBOX_E_INVALID_VM_STATE">
5959 Virtual machine not in Running state.
5960 </result>
5961 <result name="VBOX_E_VM_ERROR">
5962 Virtual machine error in reset operation.
5963 </result>
5964 </desc>
5965 </method>
5966
5967 <method name="pause">
5968 <desc>Pauses the virtual machine execution.
5969 <result name="VBOX_E_INVALID_VM_STATE">
5970 Virtual machine not in Running state.
5971 </result>
5972 <result name="VBOX_E_VM_ERROR">
5973 Virtual machine error in suspend operation.
5974 </result>
5975 </desc>
5976 </method>
5977
5978 <method name="resume">
5979 <desc>Resumes the virtual machine execution.
5980 <result name="VBOX_E_INVALID_VM_STATE">
5981 Virtual machine not in Paused state.
5982 </result>
5983 <result name="VBOX_E_VM_ERROR">
5984 Virtual machine error in resume operation.
5985 </result>
5986 </desc>
5987 </method>
5988
5989 <method name="powerButton">
5990 <desc>Sends the ACPI power button event to the guest.
5991 <result name="VBOX_E_INVALID_VM_STATE">
5992 Virtual machine not in Running state.
5993 </result>
5994 <result name="VBOX_E_PDM_ERROR">
5995 Controlled power off failed.
5996 </result>
5997 </desc>
5998 </method>
5999
6000 <method name="sleepButton">
6001 <desc>Sends the ACPI sleep button event to the guest.
6002 <result name="VBOX_E_INVALID_VM_STATE">
6003 Virtual machine not in Running state.
6004 </result>
6005 <result name="VBOX_E_PDM_ERROR">
6006 Sending sleep button event failed.
6007 </result>
6008 </desc>
6009 </method>
6010
6011 <method name="getPowerButtonHandled">
6012 <desc>Checks if the last power button event was handled by guest.
6013 <result name="VBOX_E_PDM_ERROR">
6014 Checking if the event was handled by the guest OS failed.
6015 </result>
6016 </desc>
6017 <param name="handled" type="boolean" dir="return"/>
6018 </method>
6019
6020 <method name="getGuestEnteredACPIMode">
6021 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6022 G1 (sleeping). If this method returns @c false, the guest will
6023 most likely not respond to external ACPI events.
6024 <result name="VBOX_E_INVALID_VM_STATE">
6025 Virtual machine not in Running state.
6026 </result>
6027 </desc>
6028 <param name="entered" type="boolean" dir="return"/>
6029 </method>
6030
6031 <method name="saveState">
6032 <desc>
6033 Saves the current execution state of a running virtual machine
6034 and stops its execution.
6035
6036 After this operation completes, the machine will go to the
6037 Saved state. Next time it is powered up, this state will
6038 be restored and the machine will continue its execution from
6039 the place where it was saved.
6040
6041 This operation differs from taking a snapshot to the effect
6042 that it doesn't create new differencing media. Also, once
6043 the machine is powered up from the state saved using this method,
6044 the saved state is deleted, so it will be impossible to return
6045 to this state later.
6046
6047 <note>
6048 On success, this method implicitly calls
6049 <link to="IMachine::saveSettings"/> to save all current machine
6050 settings (including runtime changes to the DVD medium, etc.).
6051 Together with the impossibility to change any VM settings when it is
6052 in the Saved state, this guarantees adequate hardware
6053 configuration of the machine when it is restored from the saved
6054 state file.
6055 </note>
6056
6057 <note>
6058 The machine must be in the Running or Paused state, otherwise
6059 the operation will fail.
6060 </note>
6061 <result name="VBOX_E_INVALID_VM_STATE">
6062 Virtual machine state neither Running nor Paused.
6063 </result>
6064 <result name="VBOX_E_FILE_ERROR">
6065 Failed to create directory for saved state file.
6066 </result>
6067
6068 <see><link to="#takeSnapshot"/></see>
6069 </desc>
6070 <param name="progress" type="IProgress" dir="return">
6071 <desc>Progress object to track the operation completion.</desc>
6072 </param>
6073 </method>
6074
6075 <method name="adoptSavedState">
6076 <desc>
6077 Associates the given saved state file to the virtual machine.
6078
6079 On success, the machine will go to the Saved state. Next time it is
6080 powered up, it will be restored from the adopted saved state and
6081 continue execution from the place where the saved state file was
6082 created.
6083
6084 The specified saved state file path may be absolute or relative to the
6085 folder the VM normally saves the state to (usually,
6086 <link to="IMachine::snapshotFolder"/>).
6087
6088 <note>
6089 It's a caller's responsibility to make sure the given saved state
6090 file is compatible with the settings of this virtual machine that
6091 represent its virtual hardware (memory size, storage disk configuration
6092 etc.). If there is a mismatch, the behavior of the virtual machine
6093 is undefined.
6094 </note>
6095 <result name="VBOX_E_INVALID_VM_STATE">
6096 Virtual machine state neither PoweredOff nor Aborted.
6097 </result>
6098 </desc>
6099 <param name="savedStateFile" type="wstring" dir="in">
6100 <desc>Path to the saved state file to adopt.</desc>
6101 </param>
6102 </method>
6103
6104 <method name="discardSavedState">
6105 <desc>
6106 Forcibly resets the machine to "Powered Off" state if it is
6107 currently in the "Saved" state (previously created by <link to="#saveState"/>).
6108 Next time the machine is powered up, a clean boot will occur.
6109 <note>
6110 This operation is equivalent to resetting or powering off
6111 the machine without doing a proper shutdown of the guest
6112 operating system; as with resetting a running phyiscal
6113 computer, it can can lead to data loss.
6114 </note>
6115 If @a fRemoveFile is @c true, the file in the machine directory
6116 into which the machine state was saved is also deleted. If
6117 this is @c false, then the state can be recovered and later
6118 re-inserted into a machine using <link to="#adoptSavedState" />.
6119 The location of the file can be found in the
6120 <link to="IMachine::stateFilePath" /> attribute.
6121 <result name="VBOX_E_INVALID_VM_STATE">
6122 Virtual machine not in state Saved.
6123 </result>
6124 </desc>
6125 <param name="fRemoveFile" type="boolean" dir="in" >
6126 <desc>Whether to also remove the saved state file.</desc>
6127 </param>
6128 </method>
6129
6130 <method name="getDeviceActivity">
6131 <desc>
6132 Gets the current activity type of a given device or device group.
6133 <result name="E_INVALIDARG">
6134 Invalid device type.
6135 </result>
6136 </desc>
6137 <param name="type" type="DeviceType" dir="in"/>
6138 <param name="activity" type="DeviceActivity" dir="return"/>
6139 </method>
6140
6141 <method name="attachUSBDevice">
6142 <desc>
6143 Attaches a host USB device with the given UUID to the
6144 USB controller of the virtual machine.
6145
6146 The device needs to be in one of the following states:
6147 <link to="USBDeviceState_Busy"/>,
6148 <link to="USBDeviceState_Available"/> or
6149 <link to="USBDeviceState_Held"/>,
6150 otherwise an error is immediately returned.
6151
6152 When the device state is
6153 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6154 be returned if the host computer refuses to release it for some reason.
6155
6156 <see>IUSBController::deviceFilters, USBDeviceState</see>
6157 <result name="VBOX_E_INVALID_VM_STATE">
6158 Virtual machine state neither Running nor Paused.
6159 </result>
6160 <result name="VBOX_E_PDM_ERROR">
6161 Virtual machine does not have a USB controller.
6162 </result>
6163 </desc>
6164 <param name="id" type="uuid" mod="string" dir="in">
6165 <desc>UUID of the host USB device to attach.</desc>
6166 </param>
6167 </method>
6168
6169 <method name="detachUSBDevice">
6170 <desc>
6171 Detaches an USB device with the given UUID from the USB controller
6172 of the virtual machine.
6173
6174 After this method succeeds, the VirtualBox server re-initiates
6175 all USB filters as if the device were just physically attached
6176 to the host, but filters of this machine are ignored to avoid
6177 a possible automatic re-attachment.
6178
6179 <see>IUSBController::deviceFilters, USBDeviceState</see>
6180
6181 <result name="VBOX_E_PDM_ERROR">
6182 Virtual machine does not have a USB controller.
6183 </result>
6184 <result name="E_INVALIDARG">
6185 USB device not attached to this virtual machine.
6186 </result>
6187 </desc>
6188 <param name="id" type="uuid" mod="string" dir="in">
6189 <desc>UUID of the USB device to detach.</desc>
6190 </param>
6191 <param name="device" type="IUSBDevice" dir="return">
6192 <desc>Detached USB device.</desc>
6193 </param>
6194 </method>
6195
6196 <method name="findUSBDeviceByAddress">
6197 <desc>
6198 Searches for a USB device with the given host address.
6199
6200 <result name="VBOX_E_OBJECT_NOT_FOUND">
6201 Given @c name does not correspond to any USB device.
6202 </result>
6203
6204 <see>IUSBDevice::address</see>
6205 </desc>
6206 <param name="name" type="wstring" dir="in">
6207 <desc>
6208 Address of the USB device (as assigned by the host) to
6209 search for.
6210 </desc>
6211 </param>
6212 <param name="device" type="IUSBDevice" dir="return">
6213 <desc>Found USB device object.</desc>
6214 </param>
6215 </method>
6216
6217 <method name="findUSBDeviceById">
6218 <desc>
6219 Searches for a USB device with the given UUID.
6220
6221 <result name="VBOX_E_OBJECT_NOT_FOUND">
6222 Given @c id does not correspond to any USB device.
6223 </result>
6224
6225 <see>IUSBDevice::id</see>
6226 </desc>
6227 <param name="id" type="uuid" mod="string" dir="in">
6228 <desc>UUID of the USB device to search for.</desc>
6229 </param>
6230 <param name="device" type="IUSBDevice" dir="return">
6231 <desc>Found USB device object.</desc>
6232 </param>
6233 </method>
6234
6235 <method name="createSharedFolder">
6236 <desc>
6237 Creates a transient new shared folder by associating the given logical
6238 name with the given host path, adds it to the collection of shared
6239 folders and starts sharing it. Refer to the description of
6240 <link to="ISharedFolder"/> to read more about logical names.
6241
6242 <result name="VBOX_E_INVALID_VM_STATE">
6243 Virtual machine in Saved state or currently changing state.
6244 </result>
6245 <result name="VBOX_E_FILE_ERROR">
6246 Shared folder already exists or not accessible.
6247 </result>
6248 </desc>
6249 <param name="name" type="wstring" dir="in">
6250 <desc>Unique logical name of the shared folder.</desc>
6251 </param>
6252 <param name="hostPath" type="wstring" dir="in">
6253 <desc>Full path to the shared folder in the host file system.</desc>
6254 </param>
6255 <param name="writable" type="boolean" dir="in">
6256 <desc>Whether the share is writable or readonly</desc>
6257 </param>
6258 <param name="automount" type="boolean" dir="in">
6259 <desc>Whether the share gets automatically mounted by the guest
6260 or not.</desc>
6261 </param>
6262 </method>
6263
6264 <method name="removeSharedFolder">
6265 <desc>
6266 Removes a transient shared folder with the given name previously
6267 created by <link to="#createSharedFolder"/> from the collection of
6268 shared folders and stops sharing it.
6269 <result name="VBOX_E_INVALID_VM_STATE">
6270 Virtual machine in Saved state or currently changing state.
6271 </result>
6272 <result name="VBOX_E_FILE_ERROR">
6273 Shared folder does not exists.
6274 </result>
6275 </desc>
6276 <param name="name" type="wstring" dir="in">
6277 <desc>Logical name of the shared folder to remove.</desc>
6278 </param>
6279 </method>
6280
6281 <method name="takeSnapshot">
6282 <desc>
6283 Saves the current execution state
6284 and all settings of the machine and creates differencing images
6285 for all normal (non-independent) media.
6286 See <link to="ISnapshot" /> for an introduction to snapshots.
6287
6288 This method can be called for a PoweredOff, Saved (see
6289 <link to="#saveState"/>), Running or
6290 Paused virtual machine. When the machine is PoweredOff, an
6291 offline snapshot is created. When the machine is Running a live
6292 snapshot is created, and an online snapshot is is created when Paused.
6293
6294 The taken snapshot is always based on the
6295 <link to="IMachine::currentSnapshot">current snapshot</link>
6296 of the associated virtual machine and becomes a new current snapshot.
6297
6298 <note>
6299 This method implicitly calls <link to="IMachine::saveSettings"/> to
6300 save all current machine settings before taking an offline snapshot.
6301 </note>
6302
6303 <result name="VBOX_E_INVALID_VM_STATE">
6304 Virtual machine currently changing state.
6305 </result>
6306 </desc>
6307 <param name="name" type="wstring" dir="in">
6308 <desc>Short name for the snapshot.</desc>
6309 </param>
6310 <param name="description" type="wstring" dir="in">
6311 <desc>Optional description of the snapshot.</desc>
6312 </param>
6313 <param name="progress" type="IProgress" dir="return">
6314 <desc>Progress object to track the operation completion.</desc>
6315 </param>
6316 </method>
6317
6318 <method name="deleteSnapshot">
6319 <desc>
6320 Starts deleting the specified snapshot asynchronously.
6321 See <link to="ISnapshot" /> for an introduction to snapshots.
6322
6323 The execution state and settings of the associated machine stored in
6324 the snapshot will be deleted. The contents of all differencing media of
6325 this snapshot will be merged with the contents of their dependent child
6326 media to keep the medium chain valid (in other words, all changes
6327 represented by media being deleted will be propagated to their child
6328 medium). After that, this snapshot's differencing medium will be
6329 deleted. The parent of this snapshot will become a new parent for all
6330 its child snapshots.
6331
6332 If the deleted snapshot is the current one, its parent snapshot will
6333 become a new current snapshot. The current machine state is not directly
6334 affected in this case, except that currently attached differencing
6335 media based on media of the deleted snapshot will be also merged as
6336 described above.
6337
6338 If the deleted snapshot is the first or current snapshot, then the
6339 respective IMachine attributes will be adjusted. Deleting the current
6340 snapshot will also implicitly call <link to="IMachine::saveSettings"/>
6341 to make all current machine settings permanent.
6342
6343 Deleting a snapshot has the following preconditions:
6344
6345 <ul>
6346 <li>Child media of all normal media of the deleted snapshot
6347 must be accessible (see <link to="IMedium::state"/>) for this
6348 operation to succeed. In particular, this means that all virtual
6349 machines, whose media are directly or indirectly based on the
6350 media of deleted snapshot, must be powered off.</li>
6351
6352 <li>You cannot delete the snapshot if a medium attached to it has
6353 more than once child medium (differencing images) because otherwise
6354 merging would be impossible. This might be the case if there is
6355 more than one child snapshot or differencing images were created
6356 for other reason (e.g. implicitly because of multiple machine
6357 attachments).</li>
6358 </ul>
6359
6360
6361 The virtual machine's <link to="IMachine::state">state</link> is
6362 changed to "DeletingSnapshot", "DeletingSnapshotOnline" or
6363 "DeletingSnapshotPaused" while this operation is in progress.
6364
6365 <note>
6366 Merging medium contents can be very time and disk space
6367 consuming, if these media are big in size and have many
6368 children. However, if the snapshot being deleted is the last
6369 (head) snapshot on the branch, the operation will be rather
6370 quick.
6371 </note>
6372 <result name="VBOX_E_INVALID_VM_STATE">
6373 The running virtual machine prevents deleting this snapshot. This
6374 happens only in very specific situations, usually snapshots can be
6375 deleted without trouble while a VM is running. The error message
6376 text explains the reason for the failure.
6377 </result>
6378 </desc>
6379 <param name="id" type="uuid" mod="string" dir="in">
6380 <desc>UUID of the snapshot to delete.</desc>
6381 </param>
6382 <param name="progress" type="IProgress" dir="return">
6383 <desc>Progress object to track the operation completion.</desc>
6384 </param>
6385 </method>
6386
6387 <method name="restoreSnapshot">
6388 <desc>
6389 Starts resetting the machine's current state to the state contained
6390 in the given snapshot, asynchronously. All current settings of the
6391 machine will be reset and changes stored in differencing media
6392 will be lost.
6393 See <link to="ISnapshot" /> for an introduction to snapshots.
6394
6395 After this operation is successfully completed, new empty differencing
6396 media are created for all normal media of the machine.
6397
6398 If the given snapshot is an online snapshot, the machine will go to
6399 the <link to="MachineState_Saved"> saved state</link>, so that the
6400 next time it is powered on, the execution state will be restored
6401 from the state of the snapshot.
6402
6403 <note>
6404 The machine must not be running, otherwise the operation will fail.
6405 </note>
6406
6407 <note>
6408 If the machine state is <link to="MachineState_Saved">Saved</link>
6409 prior to this operation, the saved state file will be implicitly
6410 deleted (as if <link to="IConsole::discardSavedState"/> were
6411 called).
6412 </note>
6413
6414 <result name="VBOX_E_INVALID_VM_STATE">
6415 Virtual machine is running.
6416 </result>
6417 </desc>
6418 <param name="snapshot" type="ISnapshot" dir="in">
6419 <desc>The snapshot to restore the VM state from.</desc>
6420 </param>
6421 <param name="progress" type="IProgress" dir="return">
6422 <desc>Progress object to track the operation completion.</desc>
6423 </param>
6424 </method>
6425
6426 <method name="teleport">
6427 <desc>
6428 Teleport the VM to a different host machine or process.
6429
6430 TODO explain the details.
6431
6432 <result name="VBOX_E_INVALID_VM_STATE">
6433 Virtual machine not running or paused.
6434 </result>
6435 </desc>
6436 <param name="hostname" type="wstring" dir="in">
6437 <desc>The name or IP of the host to teleport to.</desc>
6438 </param>
6439 <param name="tcpport" type="unsigned long" dir="in">
6440 <desc>The TCP port to connect to (1..65535).</desc>
6441 </param>
6442 <param name="password" type="wstring" dir="in">
6443 <desc>The password.</desc>
6444 </param>
6445 <param name="maxDowntime" type="unsigned long" dir="in">
6446 <desc>
6447 The maximum allowed downtime given as milliseconds. 0 is not a valid
6448 value. Recommended value: 250 ms.
6449
6450 The higher the value is, the greater the chance for a successful
6451 teleportation. A small value may easily result in the teleportation
6452 process taking hours and eventually fail.
6453
6454 <note>
6455 The current implementation treats this a guideline, not as an
6456 absolute rule.
6457 </note>
6458 </desc>
6459 </param>
6460 <param name="progress" type="IProgress" dir="return">
6461 <desc>Progress object to track the operation completion.</desc>
6462 </param>
6463 </method>
6464
6465 </interface>
6466
6467 <!--
6468 // IHost
6469 /////////////////////////////////////////////////////////////////////////
6470 -->
6471
6472 <enum
6473 name="HostNetworkInterfaceMediumType"
6474 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6475 >
6476 <desc>
6477 Type of encapsulation. Ethernet encapsulation includes both wired and
6478 wireless Ethernet connections.
6479 <see>IHostNetworkInterface</see>
6480 </desc>
6481
6482 <const name="Unknown" value="0">
6483 <desc>
6484 The type of interface cannot be determined.
6485 </desc>
6486 </const>
6487 <const name="Ethernet" value="1">
6488 <desc>
6489 Ethernet frame encapsulation.
6490 </desc>
6491 </const>
6492 <const name="PPP" value="2">
6493 <desc>
6494 Point-to-point protocol encapsulation.
6495 </desc>
6496 </const>
6497 <const name="SLIP" value="3">
6498 <desc>
6499 Serial line IP encapsulation.
6500 </desc>
6501 </const>
6502 </enum>
6503
6504 <enum
6505 name="HostNetworkInterfaceStatus"
6506 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6507 >
6508 <desc>
6509 Current status of the interface.
6510 <see>IHostNetworkInterface</see>
6511 </desc>
6512
6513 <const name="Unknown" value="0">
6514 <desc>
6515 The state of interface cannot be determined.
6516 </desc>
6517 </const>
6518 <const name="Up" value="1">
6519 <desc>
6520 The interface is fully operational.
6521 </desc>
6522 </const>
6523 <const name="Down" value="2">
6524 <desc>
6525 The interface is not functioning.
6526 </desc>
6527 </const>
6528 </enum>
6529
6530 <enum
6531 name="HostNetworkInterfaceType"
6532 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6533 >
6534 <desc>
6535 Network interface type.
6536 </desc>
6537 <const name="Bridged" value="1"/>
6538 <const name="HostOnly" value="2"/>
6539 </enum>
6540
6541 <interface
6542 name="IHostNetworkInterface" extends="$unknown"
6543 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6544 wsmap="managed"
6545 >
6546 <desc>
6547 Represents one of host's network interfaces. IP V6 address and network
6548 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6549 separated by colons.
6550 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6551 </desc>
6552 <attribute name="name" type="wstring" readonly="yes">
6553 <desc>Returns the host network interface name.</desc>
6554 </attribute>
6555
6556 <attribute name="id" type="uuid" mod="string" readonly="yes">
6557 <desc>Returns the interface UUID.</desc>
6558 </attribute>
6559
6560 <attribute name="networkName" type="wstring" readonly="yes">
6561 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6562 </attribute>
6563
6564 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6565 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6566 </attribute>
6567
6568 <attribute name="IPAddress" type="wstring" readonly="yes">
6569 <desc>Returns the IP V4 address of the interface.</desc>
6570 </attribute>
6571
6572 <attribute name="networkMask" type="wstring" readonly="yes">
6573 <desc>Returns the network mask of the interface.</desc>
6574 </attribute>
6575
6576 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6577 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6578 </attribute>
6579
6580 <attribute name="IPV6Address" type="wstring" readonly="yes">
6581 <desc>Returns the IP V6 address of the interface.</desc>
6582 </attribute>
6583
6584 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6585 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6586 </attribute>
6587
6588 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6589 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6590 </attribute>
6591
6592 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6593 <desc>Type of protocol encapsulation used.</desc>
6594 </attribute>
6595
6596 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6597 <desc>Status of the interface.</desc>
6598 </attribute>
6599
6600 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6601 <desc>specifies the host interface type.</desc>
6602 </attribute>
6603
6604 <method name="enableStaticIpConfig">
6605 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6606 <param name="IPAddress" type="wstring" dir="in">
6607 <desc>
6608 IP address.
6609 </desc>
6610 </param>
6611 <param name="networkMask" type="wstring" dir="in">
6612 <desc>
6613 network mask.
6614 </desc>
6615 </param>
6616 </method>
6617
6618 <method name="enableStaticIpConfigV6">
6619 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6620 <param name="IPV6Address" type="wstring" dir="in">
6621 <desc>
6622 IP address.
6623 </desc>
6624 </param>
6625 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6626 <desc>
6627 network mask.
6628 </desc>
6629 </param>
6630 </method>
6631
6632 <method name="enableDynamicIpConfig">
6633 <desc>enables the dynamic IP configuration.</desc>
6634 </method>
6635
6636 <method name="dhcpRediscover">
6637 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6638 </method>
6639
6640 </interface>
6641
6642 <interface
6643 name="IHost" extends="$unknown"
6644 uuid="35b004f4-7806-4009-bfa8-d1308adba7e5"
6645 wsmap="managed"
6646 >
6647 <desc>
6648 The IHost interface represents the physical machine that this VirtualBox
6649 installation runs on.
6650
6651 An object implementing this interface is returned by the
6652 <link to="IVirtualBox::host" /> attribute. This interface contains
6653 read-only information about the host's physical hardware (such as what
6654 processors and disks are available, what the host operating system is,
6655 and so on) and also allows for manipulating some of the host's hardware,
6656 such as global USB device filters and host interface networking.
6657
6658 </desc>
6659 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
6660 <desc>List of DVD drives available on the host.</desc>
6661 </attribute>
6662
6663 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
6664 <desc>List of floppy drives available on the host.</desc>
6665 </attribute>
6666
6667 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6668 <desc>
6669 List of USB devices currently attached to the host.
6670 Once a new device is physically attached to the host computer,
6671 it appears in this list and remains there until detached.
6672
6673 <note>
6674 If USB functionality is not available in the given edition of
6675 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6676 </note>
6677 </desc>
6678 </attribute>
6679
6680 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
6681 <desc>
6682 List of USB device filters in action.
6683 When a new device is physically attached to the host computer,
6684 filters from this list are applied to it (in order they are stored
6685 in the list). The first matched filter will determine the
6686 <link to="IHostUSBDeviceFilter::action">action</link>
6687 performed on the device.
6688
6689 Unless the device is ignored by these filters, filters of all
6690 currently running virtual machines
6691 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6692
6693 <note>
6694 If USB functionality is not available in the given edition of
6695 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6696 </note>
6697
6698 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6699 </desc>
6700 </attribute>
6701
6702 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6703 <desc>List of host network interfaces currently defined on the host.</desc>
6704 </attribute>
6705
6706 <attribute name="processorCount" type="unsigned long" readonly="yes">
6707 <desc>Number of (logical) CPUs installed in the host system.</desc>
6708 </attribute>
6709
6710 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6711 <desc>Number of (logical) CPUs online in the host system.</desc>
6712 </attribute>
6713
6714 <attribute name="processorCoreCount" type="unsigned long" readonly="yes">
6715 <desc>Number of physical processor cores installed in the host system.</desc>
6716 </attribute>
6717
6718 <method name="getProcessorSpeed">
6719 <desc>Query the (approximate) maximum speed of a specified host CPU in
6720 Megahertz.
6721 </desc>
6722 <param name="cpuId" type="unsigned long" dir="in">
6723 <desc>
6724 Identifier of the CPU.
6725 </desc>
6726 </param>
6727 <param name="speed" type="unsigned long" dir="return">
6728 <desc>
6729 Speed value. 0 is returned if value is not known or @a cpuId is
6730 invalid.
6731 </desc>
6732 </param>
6733 </method>
6734
6735 <method name="getProcessorFeature">
6736 <desc>Query whether a CPU feature is supported or not.</desc>
6737 <param name="feature" type="ProcessorFeature" dir="in">
6738 <desc>
6739 CPU Feature identifier.
6740 </desc>
6741 </param>
6742 <param name="supported" type="boolean" dir="return">
6743 <desc>
6744 Feature is supported or not.
6745 </desc>
6746 </param>
6747 </method>
6748
6749 <method name="getProcessorDescription">
6750 <desc>Query the model string of a specified host CPU.
6751 </desc>
6752 <param name="cpuId" type="unsigned long" dir="in">
6753 <desc>
6754 Identifier of the CPU.
6755 <note>
6756 The current implementation might not necessarily return the
6757 description for this exact CPU.
6758 </note>
6759 </desc>
6760 </param>
6761 <param name="description" type="wstring" dir="return">
6762 <desc>
6763 Model string. An empty string is returned if value is not known or
6764 @a cpuId is invalid.
6765 </desc>
6766 </param>
6767 </method>
6768
6769 <method name="getProcessorCPUIDLeaf">
6770 <desc>
6771 Returns the CPU cpuid information for the specified leaf.
6772 </desc>
6773 <param name="cpuId" type="unsigned long" dir="in">
6774 <desc>
6775 Identifier of the CPU. The CPU most be online.
6776 <note>
6777 The current implementation might not necessarily return the
6778 description for this exact CPU.
6779 </note>
6780 </desc>
6781 </param>
6782 <param name="leaf" type="unsigned long" dir="in">
6783 <desc>
6784 CPUID leaf index (eax).
6785 </desc>
6786 </param>
6787 <param name="subLeaf" type="unsigned long" dir="in">
6788 <desc>
6789 CPUID leaf sub index (ecx). This currently only applies to cache
6790 information on Intel CPUs. Use 0 if retriving values for
6791 <link to="IMachine::setCPUIDLeaf"/>.
6792 </desc>
6793 </param>
6794 <param name="valEax" type="unsigned long" dir="out">
6795 <desc>
6796 CPUID leaf value for register eax.
6797 </desc>
6798 </param>
6799 <param name="valEbx" type="unsigned long" dir="out">
6800 <desc>
6801 CPUID leaf value for register ebx.
6802 </desc>
6803 </param>
6804 <param name="valEcx" type="unsigned long" dir="out">
6805 <desc>
6806 CPUID leaf value for register ecx.
6807 </desc>
6808 </param>
6809 <param name="valEdx" type="unsigned long" dir="out">
6810 <desc>
6811 CPUID leaf value for register edx.
6812 </desc>
6813 </param>
6814 </method>
6815
6816 <attribute name="memorySize" type="unsigned long" readonly="yes">
6817 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6818 </attribute>
6819
6820 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6821 <desc>Available system memory in the host system.</desc>
6822 </attribute>
6823
6824 <attribute name="operatingSystem" type="wstring" readonly="yes">
6825 <desc>Name of the host system's operating system.</desc>
6826 </attribute>
6827
6828 <attribute name="OSVersion" type="wstring" readonly="yes">
6829 <desc>Host operating system's version string.</desc>
6830 </attribute>
6831
6832 <attribute name="UTCTime" type="long long" readonly="yes">
6833 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6834 </attribute>
6835
6836 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
6837 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
6838 </attribute>
6839
6840 <method name="createHostOnlyNetworkInterface">
6841 <desc>
6842 Creates a new adapter for Host Only Networking.
6843 <result name="E_INVALIDARG">
6844 Host network interface @a name already exists.
6845 </result>
6846 </desc>
6847 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6848 <desc>
6849 Created host interface object.
6850 </desc>
6851 </param>
6852 <param name="progress" type="IProgress" dir="return">
6853 <desc>
6854 Progress object to track the operation completion.
6855 </desc>
6856 </param>
6857 </method>
6858
6859 <method name="removeHostOnlyNetworkInterface">
6860 <desc>
6861 Removes the given Host Only Networking interface.
6862 <result name="VBOX_E_OBJECT_NOT_FOUND">
6863 No host network interface matching @a id found.
6864 </result>
6865 </desc>
6866 <param name="id" type="uuid" mod="string" dir="in">
6867 <desc>
6868 Adapter GUID.
6869 </desc>
6870 </param>
6871 <param name="progress" type="IProgress" dir="return">
6872 <desc>
6873 Progress object to track the operation completion.
6874 </desc>
6875 </param>
6876 </method>
6877
6878 <method name="createUSBDeviceFilter">
6879 <desc>
6880 Creates a new USB device filter. All attributes except
6881 the filter name are set to empty (any match),
6882 <i>active</i> is @c false (the filter is not active).
6883
6884 The created filter can be added to the list of filters using
6885 <link to="#insertUSBDeviceFilter"/>.
6886
6887 <see>#USBDeviceFilters</see>
6888 </desc>
6889 <param name="name" type="wstring" dir="in">
6890 <desc>
6891 Filter name. See <link to="IUSBDeviceFilter::name"/> for more information.
6892 </desc>
6893 </param>
6894 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6895 <desc>Created filter object.</desc>
6896 </param>
6897 </method>
6898
6899 <method name="insertUSBDeviceFilter">
6900 <desc>
6901 Inserts the given USB device to the specified position
6902 in the list of filters.
6903
6904 Positions are numbered starting from @c 0. If the specified
6905 position is equal to or greater than the number of elements in
6906 the list, the filter is added at the end of the collection.
6907
6908 <note>
6909 Duplicates are not allowed, so an attempt to insert a
6910 filter already in the list is an error.
6911 </note>
6912 <note>
6913 If USB functionality is not available in the given edition of
6914 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6915 </note>
6916
6917 <see>#USBDeviceFilters</see>
6918
6919 <result name="VBOX_E_INVALID_OBJECT_STATE">
6920 USB device filter is not created within this VirtualBox instance.
6921 </result>
6922 <result name="E_INVALIDARG">
6923 USB device filter already in list.
6924 </result>
6925
6926 </desc>
6927 <param name="position" type="unsigned long" dir="in">
6928 <desc>Position to insert the filter to.</desc>
6929 </param>
6930 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
6931 <desc>USB device filter to insert.</desc>
6932 </param>
6933 </method>
6934
6935 <method name="removeUSBDeviceFilter">
6936 <desc>
6937 Removes a USB device filter from the specified position in the
6938 list of filters.
6939
6940 Positions are numbered starting from @c 0. Specifying a
6941 position equal to or greater than the number of elements in
6942 the list will produce an error.
6943
6944 <note>
6945 If USB functionality is not available in the given edition of
6946 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6947 </note>
6948
6949 <see>#USBDeviceFilters</see>
6950
6951 <result name="E_INVALIDARG">
6952 USB device filter list empty or invalid @a position.
6953 </result>
6954
6955 </desc>
6956 <param name="position" type="unsigned long" dir="in">
6957 <desc>Position to remove the filter from.</desc>
6958 </param>
6959 </method>
6960
6961 <method name="findHostDVDDrive">
6962 <desc>
6963 Searches for a host DVD drive with the given @c name.
6964
6965 <result name="VBOX_E_OBJECT_NOT_FOUND">
6966 Given @c name does not correspond to any host drive.
6967 </result>
6968
6969 </desc>
6970 <param name="name" type="wstring" dir="in">
6971 <desc>Name of the host drive to search for</desc>
6972 </param>
6973 <param name="drive" type="IMedium" dir="return">
6974 <desc>Found host drive object</desc>
6975 </param>
6976 </method>
6977
6978 <method name="findHostFloppyDrive">
6979 <desc>
6980 Searches for a host floppy drive with the given @c name.
6981
6982 <result name="VBOX_E_OBJECT_NOT_FOUND">
6983 Given @c name does not correspond to any host floppy drive.
6984 </result>
6985
6986 </desc>
6987 <param name="name" type="wstring" dir="in">
6988 <desc>Name of the host floppy drive to search for</desc>
6989 </param>
6990 <param name="drive" type="IMedium" dir="return">
6991 <desc>Found host floppy drive object</desc>
6992 </param>
6993 </method>
6994
6995 <method name="findHostNetworkInterfaceByName">
6996 <desc>
6997 Searches through all host network interfaces for an interface with
6998 the given @c name.
6999 <note>
7000 The method returns an error if the given @c name does not
7001 correspond to any host network interface.
7002 </note>
7003 </desc>
7004 <param name="name" type="wstring" dir="in">
7005 <desc>Name of the host network interface to search for.</desc>
7006 </param>
7007 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7008 <desc>Found host network interface object.</desc>
7009 </param>
7010 </method>
7011 <method name="findHostNetworkInterfaceById">
7012 <desc>
7013 Searches through all host network interfaces for an interface with
7014 the given GUID.
7015 <note>
7016 The method returns an error if the given GUID does not
7017 correspond to any host network interface.
7018 </note>
7019 </desc>
7020 <param name="id" type="uuid" mod="string" dir="in">
7021 <desc>GUID of the host network interface to search for.</desc>
7022 </param>
7023 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7024 <desc>Found host network interface object.</desc>
7025 </param>
7026 </method>
7027 <method name="findHostNetworkInterfacesOfType">
7028 <desc>
7029 Searches through all host network interfaces and returns a list of interfaces of the specified type
7030 </desc>
7031 <param name="type" type="HostNetworkInterfaceType" dir="in">
7032 <desc>type of the host network interfaces to search for.</desc>
7033 </param>
7034 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7035 <desc>Found host network interface objects.</desc>
7036 </param>
7037 </method>
7038
7039 <method name="findUSBDeviceById">
7040 <desc>
7041 Searches for a USB device with the given UUID.
7042
7043 <result name="VBOX_E_OBJECT_NOT_FOUND">
7044 Given @c id does not correspond to any USB device.
7045 </result>
7046
7047 <see>IHostUSBDevice::id</see>
7048 </desc>
7049 <param name="id" type="uuid" mod="string" dir="in">
7050 <desc>UUID of the USB device to search for.</desc>
7051 </param>
7052 <param name="device" type="IHostUSBDevice" dir="return">
7053 <desc>Found USB device object.</desc>
7054 </param>
7055 </method>
7056
7057 <method name="findUSBDeviceByAddress">
7058 <desc>
7059 Searches for a USB device with the given host address.
7060
7061 <result name="VBOX_E_OBJECT_NOT_FOUND">
7062 Given @c name does not correspond to any USB device.
7063 </result>
7064
7065 <see>IHostUSBDevice::address</see>
7066 </desc>
7067 <param name="name" type="wstring" dir="in">
7068 <desc>
7069 Address of the USB device (as assigned by the host) to
7070 search for.
7071 </desc>
7072 </param>
7073 <param name="device" type="IHostUSBDevice" dir="return">
7074 <desc>Found USB device object.</desc>
7075 </param>
7076 </method>
7077
7078 </interface>
7079
7080 <!--
7081 // ISystemProperties
7082 /////////////////////////////////////////////////////////////////////////
7083 -->
7084
7085 <interface
7086 name="ISystemProperties"
7087 extends="$unknown"
7088 uuid="f8fff1f1-eeb4-4483-a2a4-b4186fab5a1e"
7089 wsmap="managed"
7090 >
7091 <desc>
7092 The ISystemProperties interface represents global properties of the given
7093 VirtualBox installation.
7094
7095 These properties define limits and default values for various attributes
7096 and parameters. Most of the properties are read-only, but some can be
7097 changed by a user.
7098 </desc>
7099
7100 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7101 <desc>Minimum guest system memory in Megabytes.</desc>
7102 </attribute>
7103
7104 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7105 <desc>Maximum guest system memory in Megabytes.</desc>
7106 </attribute>
7107
7108 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7109 <desc>Minimum guest video memory in Megabytes.</desc>
7110 </attribute>
7111
7112 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7113 <desc>Maximum guest video memory in Megabytes.</desc>
7114 </attribute>
7115
7116 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7117 <desc>Minimum CPU count.</desc>
7118 </attribute>
7119
7120 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7121 <desc>Maximum CPU count.</desc>
7122 </attribute>
7123
7124 <attribute name="maxGuestMonitors" type="unsigned long" readonly="yes">
7125 <desc>Maximum of monitors which could be connected.</desc>
7126 </attribute>
7127
7128 <attribute name="infoVDSize" type="long long" readonly="yes">
7129 <desc>Maximum size of a virtual disk image in bytes. Informational value,
7130 does not reflect the limits of any virtual disk image format.</desc>
7131 </attribute>
7132
7133 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7134 <desc>
7135 Number of network adapters associated with every
7136 <link to="IMachine"/> instance.
7137 </desc>
7138 </attribute>
7139
7140 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7141 <desc>
7142 Number of serial ports associated with every
7143 <link to="IMachine"/> instance.
7144 </desc>
7145 </attribute>
7146
7147 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7148 <desc>
7149 Number of parallel ports associated with every
7150 <link to="IMachine"/> instance.
7151 </desc>
7152 </attribute>
7153
7154 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7155 <desc>
7156 Maximum device position in the boot order. This value corresponds
7157 to the total number of devices a machine can boot from, to make it
7158 possible to include all possible devices to the boot list.
7159 <see><link to="IMachine::setBootOrder"/></see>
7160 </desc>
7161 </attribute>
7162
7163 <attribute name="defaultMachineFolder" type="wstring">
7164 <desc>
7165 Full path to the default directory used to create new or open
7166 existing machines when a settings file name contains no
7167 path.
7168
7169 The initial value of this property is
7170 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7171 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7172
7173 <note>
7174 Setting this property to @c null or an empty string will restore the
7175 initial value.
7176 </note>
7177 <note>
7178 When settings this property, the specified path can be
7179 absolute (full path) or relative
7180 to the <link to="IVirtualBox::homeFolder">
7181 VirtualBox home directory</link>.
7182 When reading this property, a full path is
7183 always returned.
7184 </note>
7185 <note>
7186 The specified path may not exist, it will be created
7187 when necessary.
7188 </note>
7189
7190 <see>
7191 <link to="IVirtualBox::createMachine"/>,
7192 <link to="IVirtualBox::openMachine"/>
7193 </see>
7194 </desc>
7195 </attribute>
7196
7197 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7198 <desc>
7199 List of all medium storage formats supported by this VirtualBox
7200 installation.
7201
7202 Keep in mind that the medium format identifier
7203 (<link to="IMediumFormat::id"/>) used in other API calls like
7204 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7205 medium format is a case-insensitive string. This means that, for
7206 example, all of the following strings:
7207 <pre>
7208 "VDI"
7209 "vdi"
7210 "VdI"</pre>
7211 refer to the same medium format.
7212
7213 Note that the virtual medium framework is backend-based, therefore
7214 the list of supported formats depends on what backends are currently
7215 installed.
7216
7217 <see>
7218 <link to="IMediumFormat"/>,
7219 </see>
7220 </desc>
7221 </attribute>
7222
7223 <attribute name="defaultHardDiskFormat" type="wstring">
7224 <desc>
7225 Identifier of the default medium format used by VirtualBox.
7226
7227 The medium format set by this attribute is used by VirtualBox
7228 when the medium format was not specified explicitly. One example is
7229 <link to="IVirtualBox::createHardDisk"/> with the empty
7230 format argument. A more complex example is implicit creation of
7231 differencing media when taking a snapshot of a virtual machine:
7232 this operation will try to use a format of the parent medium first
7233 and if this format does not support differencing media the default
7234 format specified by this argument will be used.
7235
7236 The list of supported medium formats may be obtained by the
7237 <link to="#mediumFormats"/> call. Note that the default medium
7238 format must have a capability to create differencing media;
7239 otherwise operations that create media implicitly may fail
7240 unexpectedly.
7241
7242 The initial value of this property is <tt>"VDI"</tt> in the current
7243 version of the VirtualBox product, but may change in the future.
7244
7245 <note>
7246 Setting this property to @c null or empty string will restore the
7247 initial value.
7248 </note>
7249
7250 <see>
7251 <link to="#mediumFormats"/>,
7252 <link to="IMediumFormat::id"/>,
7253 <link to="IVirtualBox::createHardDisk"/>
7254 </see>
7255 </desc>
7256 </attribute>
7257
7258 <attribute name="freeDiskSpaceWarning" type="long long">
7259 <desc>Issue a warning if the free disk space is below (or in some disk
7260 intensive operation is expected to go below) the given size in
7261 bytes.</desc>
7262 </attribute>
7263
7264 <attribute name="freeDiskSpacePercentWarning" type="unsigned long">
7265 <desc>Issue a warning if the free disk space is below (or in some disk
7266 intensive operation is expected to go below) the given percentage.</desc>
7267 </attribute>
7268
7269 <attribute name="freeDiskSpaceError" type="long long">
7270 <desc>Issue an error if the free disk space is below (or in some disk
7271 intensive operation is expected to go below) the given size in
7272 bytes.</desc>
7273 </attribute>
7274
7275 <attribute name="freeDiskSpacePercentError" type="unsigned long">
7276 <desc>Issue an error if the free disk space is below (or in some disk
7277 intensive operation is expected to go below) the given percentage.</desc>
7278 </attribute>
7279
7280 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7281 <desc>
7282 Library that provides authentication for VRDP clients. The library
7283 is used if a virtual machine's authentication type is set to "external"
7284 in the VM RemoteDisplay configuration.
7285
7286 The system library extension (".DLL" or ".so") must be omitted.
7287 A full path can be specified; if not, then the library must reside on the
7288 system's default library path.
7289
7290 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7291 of that name in one of the default VirtualBox library directories.
7292
7293 For details about VirtualBox authentication libraries and how to implement
7294 them, please refer to the VirtualBox manual.
7295
7296 <note>
7297 Setting this property to @c null or empty string will restore the
7298 initial value.
7299 </note>
7300 </desc>
7301 </attribute>
7302
7303 <attribute name="webServiceAuthLibrary" type="wstring">
7304 <desc>
7305 Library that provides authentication for webservice clients. The library
7306 is used if a virtual machine's authentication type is set to "external"
7307 in the VM RemoteDisplay configuration and will be called from
7308 within the <link to="IWebsessionManager::logon" /> implementation.
7309
7310 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7311 there is no per-VM setting for this, as the webservice is a global
7312 resource (if it is running). Only for this setting (for the webservice),
7313 setting this value to a literal <tt>"null"</tt> string disables authentication,
7314 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7315 no matter what user name and password are supplied.
7316
7317 The initial value of this property is <tt>"VRDPAuth"</tt>,
7318 meaning that the webservice will use the same authentication
7319 library that is used by default for VBoxVRDP (again, see
7320 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7321 The format and calling convention of authentication libraries
7322 is the same for the webservice as it is for VBoxVRDP.
7323
7324 <note>
7325 Setting this property to @c null or empty string will restore the
7326 initial value.
7327 </note>
7328 </desc>
7329 </attribute>
7330
7331 <attribute name="LogHistoryCount" type="unsigned long">
7332 <desc>
7333 This value specifies how many old release log files are kept.
7334 </desc>
7335 </attribute>
7336
7337 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7338 <desc>This value hold the default audio driver for the current
7339 system.</desc>
7340 </attribute>
7341
7342 <method name="getMaxDevicesPerPortForStorageBus">
7343 <desc>Returns the maximum number of devices which can be attached to a port
7344 for the given storage bus.</desc>
7345
7346 <param name="bus" type="StorageBus" dir="in">
7347 <desc>The storage bus type to get the value for.</desc>
7348 </param>
7349
7350 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
7351 <desc>The maximum number of devices which can eb attached to the port for the given
7352 storage bus.</desc>
7353 </param>
7354 </method>
7355
7356 <method name="getMinPortCountForStorageBus">
7357 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
7358
7359 <param name="bus" type="StorageBus" dir="in">
7360 <desc>The storage bus type to get the value for.</desc>
7361 </param>
7362
7363 <param name="minPortCount" type="unsigned long" dir="return">
7364 <desc>The minimum number of ports for the given storage bus.</desc>
7365 </param>
7366 </method>
7367
7368 <method name="getMaxPortCountForStorageBus">
7369 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
7370
7371 <param name="bus" type="StorageBus" dir="in">
7372 <desc>The storage bus type to get the value for.</desc>
7373 </param>
7374
7375 <param name="maxPortCount" type="unsigned long" dir="return">
7376 <desc>The maximum number of ports for the given storage bus.</desc>
7377 </param>
7378 </method>
7379
7380 <method name="getMaxInstancesOfStorageBus">
7381 <desc>Returns the maximum number of storage bus instances which
7382 can be configured for each VM. This corresponds to the number of
7383 storage controllers one can have.</desc>
7384
7385 <param name="bus" type="StorageBus" dir="in">
7386 <desc>The storage bus type to get the value for.</desc>
7387 </param>
7388
7389 <param name="maxInstances" type="unsigned long" dir="return">
7390 <desc>The maximum number of instances for the given storage bus.</desc>
7391 </param>
7392 </method>
7393
7394 <method name="getDeviceTypesForStorageBus">
7395 <desc>Returns list of all the supported device types
7396 (<link to="DeviceType"/>) for the given type of storage
7397 bus.</desc>
7398
7399 <param name="bus" type="StorageBus" dir="in">
7400 <desc>The storage bus type to get the value for.</desc>
7401 </param>
7402
7403 <param name="deviceTypes" type="DeviceType" safearray="yes" dir="return">
7404 <desc>The list of all supported device types for the given storage bus.</desc>
7405 </param>
7406 </method>
7407
7408 <method name="getDefaultIoCacheSettingForStorageController">
7409 <desc>Returns the default I/O cache setting for the
7410 given storage controller</desc>
7411
7412 <param name="controllerType" type="StorageControllerType" dir="in">
7413 <desc>The storage controller to the setting for.</desc>
7414 </param>
7415
7416 <param name="enabled" type="boolean" dir="return">
7417 <desc>Returned flag indicating the default value</desc>
7418 </param>
7419 </method>
7420 </interface>
7421
7422 <!--
7423 // IGuest
7424 /////////////////////////////////////////////////////////////////////////
7425 -->
7426
7427 <interface
7428 name="IGuestOSType" extends="$unknown"
7429 uuid="432c1546-1354-4abf-bf08-878a32a373f5"
7430 wsmap="struct"
7431 >
7432 <desc>
7433 </desc>
7434
7435 <attribute name="familyId" type="wstring" readonly="yes">
7436 <desc>Guest OS family identifier string.</desc>
7437 </attribute>
7438
7439 <attribute name="familyDescription" type="wstring" readonly="yes">
7440 <desc>Human readable description of the guest OS family.</desc>
7441 </attribute>
7442
7443 <attribute name="id" type="wstring" readonly="yes">
7444 <desc>Guest OS identifier string.</desc>
7445 </attribute>
7446
7447 <attribute name="description" type="wstring" readonly="yes">
7448 <desc>Human readable description of the guest OS.</desc>
7449 </attribute>
7450
7451 <attribute name="is64Bit" type="boolean" readonly="yes">
7452 <desc>Returns @c true if the given OS is 64-bit</desc>
7453 </attribute>
7454
7455 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7456 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7457 </attribute>
7458
7459 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7460 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7461 </attribute>
7462
7463 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7464 <desc>Recommended RAM size in Megabytes.</desc>
7465 </attribute>
7466
7467 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7468 <desc>Recommended video RAM size in Megabytes.</desc>
7469 </attribute>
7470
7471 <attribute name="recommendedHDD" type="long long" readonly="yes">
7472 <desc>Recommended hard disk size in bytes.</desc>
7473 </attribute>
7474
7475 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7476 <desc>Returns recommended network adapter for this OS type.</desc>
7477 </attribute>
7478
7479 <attribute name="recommendedPae" type="boolean" readonly="yes">
7480 <desc>Returns @c true if using PAE is recommended for this OS type.</desc>
7481 </attribute>
7482
7483 <attribute name="recommendedDvdStorageController" type="StorageControllerType" readonly="yes">
7484 <desc>Recommended storage controller type for DVD/CD drives.</desc>
7485 </attribute>
7486
7487 <attribute name="recommendedDvdStorageBus" type="StorageBus" readonly="yes">
7488 <desc>Recommended storage bus type for DVD/CD drives.</desc>
7489 </attribute>
7490
7491 <attribute name="recommendedHdStorageController" type="StorageControllerType" readonly="yes">
7492 <desc>Recommended storage controller type for HD drives.</desc>
7493 </attribute>
7494
7495 <attribute name="recommendedHdStorageBus" type="StorageBus" readonly="yes">
7496 <desc>Recommended storage bus type for HD drives.</desc>
7497 </attribute>
7498
7499 <attribute name="recommendedFirmware" type="FirmwareType" readonly="yes">
7500 <desc>Recommended firmware type.</desc>
7501 </attribute>
7502
7503 <attribute name="recommendedUsbHid" type="boolean" readonly="yes">
7504 <desc>Returns @c true if using USB Human Interface Devices, such as keyboard and mouse recommended.</desc>
7505 </attribute>
7506
7507 <attribute name="recommendedHpet" type="boolean" readonly="yes">
7508 <desc>Returns @c true if using HPET is recommended for this OS type.</desc>
7509 </attribute>
7510
7511 <attribute name="recommendedUsbTablet" type="boolean" readonly="yes">
7512 <desc>Returns @c true if using a USB Tablet is recommended.</desc>
7513 </attribute>
7514
7515 <attribute name="recommendedRtcUseUtc" type="boolean" readonly="yes">
7516 <desc>Returns @c true if the RTC of this VM should be set to UTC</desc>
7517 </attribute>
7518
7519 <attribute name="recommendedChipset" type="ChipsetType" readonly="yes">
7520 <desc>Recommended chipset type.</desc>
7521 </attribute>
7522
7523 </interface>
7524
7525 <enum
7526 name="AdditionsRunLevelType"
7527 uuid="a25417ee-a9dd-4f5b-b0dc-377860087754"
7528 >
7529 <desc>
7530 Guest Additions run level type.
7531 </desc>
7532
7533 <const name="None" value="0">
7534 <desc>Guest Additions are not loaded.</desc>
7535 </const>
7536 <const name="System" value="1">
7537 <desc>Guest drivers are loaded.</desc>
7538 </const>
7539 <const name="Userland" value="2">
7540 <desc>Common components (such as application services) are loaded.</desc>
7541 </const>
7542 <const name="Desktop" value="3">
7543 <desc>Per-user desktop components are loaded.</desc>
7544 </const>
7545 </enum>
7546
7547 <enum
7548 name="ExecuteProcessFlag"
7549 uuid="9a24c17d-bd46-4207-b247-517fdd6d6b8f"
7550 >
7551 <desc>
7552 Guest process execution flags.
7553 </desc>
7554
7555 <const name="None" value="0">
7556 <desc>No flag set.</desc>
7557 </const>
7558
7559 <const name="IgnoreOrphanedProcesses" value="2">
7560 <desc>Do not report an error when executed processes are still alive when VBoxService or the guest OS is shutting down.</desc>
7561 </const>
7562 </enum>
7563
7564 <enum
7565 name="ProcessInputFlag"
7566 uuid="5d38c1dd-2604-4ddf-92e5-0c0cdd3bdbd5"
7567 >
7568 <desc>
7569 Guest process input flags.
7570 </desc>
7571
7572 <const name="None" value="0">
7573 <desc>No flag set.</desc>
7574 </const>
7575 <const name="EndOfFile" value="1">
7576 <desc>End of file (input) reached.</desc>
7577 </const>
7578 </enum>
7579
7580 <enum
7581 name="CopyFileFlag"
7582 uuid="23f79fdf-738a-493d-b80b-42d607c9b916"
7583 >
7584 <desc>
7585 Host/Guest copy flags.
7586 </desc>
7587
7588 <const name="None" value="0">
7589 <desc>No flag set.</desc>
7590 </const>
7591
7592 <const name="Recursive" value="1">
7593 <desc>Copy directories recursively.</desc>
7594 </const>
7595
7596 <const name="Update" value="2">
7597 <desc>Copy only when the source file is newer than the destination file or when the destination file is missing.</desc>
7598 </const>
7599
7600 <const name="FollowLinks" value="4">
7601 <desc>Follow symbolic links.</desc>
7602 </const>
7603 </enum>
7604
7605 <interface
7606 name="IGuest" extends="$unknown"
7607 uuid="ed69cdce-2905-4275-872b-3c743a85c584"
7608 wsmap="managed"
7609 >
7610 <desc>
7611 The IGuest interface represents information about the operating system
7612 running inside the virtual machine. Used in
7613 <link to="IConsole::guest"/>.
7614
7615 IGuest provides information about the guest operating system, whether
7616 Guest Additions are installed and other OS-specific virtual machine
7617 properties.
7618 </desc>
7619
7620 <attribute name="OSTypeId" type="wstring" readonly="yes">
7621 <desc>
7622 Identifier of the Guest OS type as reported by the Guest
7623 Additions.
7624 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7625 an IGuestOSType object representing details about the given
7626 Guest OS type.
7627 <note>
7628 If Guest Additions are not installed, this value will be
7629 the same as <link to="IMachine::OSTypeId"/>.
7630 </note>
7631 </desc>
7632 </attribute>
7633
7634 <attribute name="additionsRunLevel" type="AdditionsRunLevelType" readonly="yes">
7635 <desc>
7636 Current run level of the Guest Additions.
7637 </desc>
7638 </attribute>
7639
7640 <attribute name="additionsVersion" type="wstring" readonly="yes">
7641 <desc>
7642 Version of the Guest Additions including the revision (3 decimal numbers
7643 separated by dots + revision number) installed on the guest or empty
7644 when the Additions are not installed.
7645 </desc>
7646 </attribute>
7647
7648 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7649 <desc>
7650 Flag whether seamless guest display rendering (seamless desktop
7651 integration) is supported.
7652 </desc>
7653 </attribute>
7654
7655 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7656 <desc>
7657 Flag whether the guest is in graphics mode. If it is not, then
7658 seamless rendering will not work, resize hints are not immediately
7659 acted on and guest display resizes are probably not initiated by
7660 the guest additions.
7661 </desc>
7662 </attribute>
7663
7664 <attribute name="memoryBalloonSize" type="unsigned long">
7665 <desc>Guest system memory balloon size in megabytes (transient property).</desc>
7666 </attribute>
7667
7668 <attribute name="statisticsUpdateInterval" type="unsigned long">
7669 <desc>Interval to update guest statistics in seconds.</desc>
7670 </attribute>
7671
7672 <method name="internalGetStatistics">
7673 <desc>
7674 Internal method; do not use as it might change at any time
7675 </desc>
7676 <param name="cpuUser" type="unsigned long" dir="out">
7677 <desc>Percentage of processor time spent in user mode as seen by the guest</desc>
7678 </param>
7679 <param name="cpuKernel" type="unsigned long" dir="out">
7680 <desc>Percentage of processor time spent in kernel mode as seen by the guest</desc>
7681 </param>
7682 <param name="cpuIdle" type="unsigned long" dir="out">
7683 <desc>Percentage of processor time spent idling as seen by the guest</desc>
7684 </param>
7685 <param name="memTotal" type="unsigned long" dir="out">
7686 <desc>Total amount of physical guest RAM</desc>
7687 </param>
7688 <param name="memFree" type="unsigned long" dir="out">
7689 <desc>Free amount of physical guest RAM</desc>
7690 </param>
7691 <param name="memBalloon" type="unsigned long" dir="out">
7692 <desc>Amount of ballooned physical guest RAM</desc>
7693 </param>
7694 <param name="memShared" type="unsigned long" dir="out">
7695 <desc>Amount of shared physical guest RAM</desc>
7696 </param>
7697 <param name="memCache" type="unsigned long" dir="out">
7698 <desc>Total amount of guest (disk) cache memory</desc>
7699 </param>
7700 <param name="pagedTotal" type="unsigned long" dir="out">
7701 <desc>Total amount of space in the page file</desc>
7702 </param>
7703 <param name="memAllocTotal" type="unsigned long" dir="out">
7704 <desc>Total amount of memory allocated by the hypervisor</desc>
7705 </param>
7706 <param name="memFreeTotal" type="unsigned long" dir="out">
7707 <desc>Total amount of free memory available in the hypervisor</desc>
7708 </param>
7709 <param name="memBalloonTotal" type="unsigned long" dir="out">
7710 <desc>Total amount of memory ballooned by the hypervisor</desc>
7711 </param>
7712 <param name="memSharedTotal" type="unsigned long" dir="out">
7713 <desc>Total amount of shared memory in the hypervisor</desc>
7714 </param>
7715 </method>
7716
7717 <method name="getAdditionsStatus">
7718 <desc>
7719 Retrieve the current status of a certain Guest Additions run level.
7720
7721 <result name="VBOX_E_NOT_SUPPORTED">
7722 Wrong status level specified.
7723 </result>
7724
7725 </desc>
7726 <param name="level" type="AdditionsRunLevelType" dir="in">
7727 <desc>Status level to check</desc>
7728 </param>
7729 <param name="active" type="boolean" dir="return">
7730 <desc>Flag whether the status level has been reached or not</desc>
7731 </param>
7732 </method>
7733
7734 <method name="setCredentials">
7735 <desc>
7736 Store login credentials that can be queried by guest operating
7737 systems with Additions installed. The credentials are transient
7738 to the session and the guest may also choose to erase them. Note
7739 that the caller cannot determine whether the guest operating system
7740 has queried or made use of the credentials.
7741
7742 <result name="VBOX_E_VM_ERROR">
7743 VMM device is not available.
7744 </result>
7745
7746 </desc>
7747 <param name="userName" type="wstring" dir="in">
7748 <desc>User name string, can be empty</desc>
7749 </param>
7750 <param name="password" type="wstring" dir="in">
7751 <desc>Password string, can be empty</desc>
7752 </param>
7753 <param name="domain" type="wstring" dir="in">
7754 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7755 </param>
7756 <param name="allowInteractiveLogon" type="boolean" dir="in">
7757 <desc>
7758 Flag whether the guest should alternatively allow the user to
7759 interactively specify different credentials. This flag might
7760 not be supported by all versions of the Additions.
7761 </desc>
7762 </param>
7763 </method>
7764
7765 <method name="executeProcess">
7766 <desc>
7767 Executes an existing program inside the guest VM.
7768
7769 <result name="VBOX_E_IPRT_ERROR">
7770 Could not execute process.
7771 </result>
7772
7773 </desc>
7774 <param name="execName" type="wstring" dir="in">
7775 <desc>
7776 Full path name of the command to execute on the guest; the
7777 commands has to exists in the guest VM in order to be executed.
7778 </desc>
7779 </param>
7780 <param name="flags" type="unsigned long" dir="in">
7781 <desc>
7782 Execution flags - currently not supported and therefore
7783 has to be set to 0.
7784 </desc>
7785 </param>
7786 <param name="arguments" type="wstring" safearray="yes" dir="in">
7787 <desc>
7788 Array of arguments passed to the execution command.
7789 </desc>
7790 </param>
7791 <param name="environment" type="wstring" safearray="yes" dir="in">
7792 <desc>
7793 Environment variables that can be set while the command is being
7794 executed, in form of "NAME=VALUE"; one pair per entry. To unset a
7795 variable just set its name ("NAME") without a value.
7796 </desc>
7797 </param>
7798 <param name="userName" type="wstring" dir="in">
7799 <desc>
7800 User name under which the command will be executed; has to exist
7801 and have the appropriate rights to execute programs in the VM.
7802 </desc>
7803 </param>
7804 <param name="password" type="wstring" dir="in">
7805 <desc>
7806 Password of the user account specified.
7807 </desc>
7808 </param>
7809 <param name="timeoutMS" type="unsigned long" dir="in">
7810 <desc>
7811 The maximum timeout value (in msec) to wait for finished program
7812 execution. Pass 0 for an infinite timeout.
7813 </desc>
7814 </param>
7815 <param name="pid" type="unsigned long" dir="out">
7816 <desc>
7817 The PID (process ID) of the started command for later reference.
7818 </desc>
7819 </param>
7820 <param name="progress" type="IProgress" dir="return">
7821 <desc>Progress object to track the operation completion.</desc>
7822 </param>
7823 </method>
7824
7825 <method name="getProcessOutput">
7826 <desc>
7827 Retrieves output of a formerly started process.
7828
7829 <result name="VBOX_E_IPRT_ERROR">
7830 Could not retrieve output.
7831 </result>
7832
7833 </desc>
7834 <param name="pid" type="unsigned long" dir="in">
7835 <desc>
7836 Process id returned by earlier executeProcess() call.
7837 </desc>
7838 </param>
7839 <param name="flags" type="unsigned long" dir="in">
7840 <desc>
7841 Flags describing which output to retrieve.
7842 </desc>
7843 </param>
7844 <param name="timeoutMS" type="unsigned long" dir="in">
7845 <desc>
7846 The maximum timeout value (in msec) to wait for output
7847 data. Pass 0 for an infinite timeout.
7848 </desc>
7849 </param>
7850 <param name="size" type="long long" dir="in">
7851 <desc>
7852 Size in bytes to read in the buffer.
7853 </desc>
7854 </param>
7855 <param name="data" type="octet" dir="return" safearray="yes">
7856 <desc>
7857 Buffer for retrieving the actual output. A data size of 0 means end of file
7858 if the requested size was not 0. This is the unprocessed
7859 output data, i.e. the line ending style depends on the platform of
7860 the system the server is running on.
7861 </desc>
7862 </param>
7863 </method>
7864
7865 <method name="getProcessStatus">
7866 <desc>
7867 Retrieves status, exit code and the exit reason of a formerly started process.
7868
7869 <result name="VBOX_E_IPRT_ERROR">
7870 Process with specified PID was not found.
7871 </result>
7872
7873 </desc>
7874 <param name="pid" type="unsigned long" dir="in">
7875 <desc>
7876 Process id returned by earlier executeProcess() call.
7877 </desc>
7878 </param>
7879 <param name="exitcode" type="unsigned long" dir="out">
7880 <desc>
7881 The exit code (if available).
7882 </desc>
7883 </param>
7884 <param name="flags" type="unsigned long" dir="out">
7885 <desc>
7886 Additional flags of process status (not used at the moment).
7887 </desc>
7888 </param>
7889 <param name="reason" type="unsigned long" dir="return">
7890 <desc>
7891 The current process status.
7892 </desc>
7893 </param>
7894 </method>
7895
7896 <method name="copyToGuest">
7897 <desc>
7898 Copies files/directories from host to the guest.
7899
7900 <result name="VBOX_E_IPRT_ERROR">
7901 Error while copying.
7902 </result>
7903
7904 </desc>
7905 <param name="source" type="wstring" dir="in">
7906 <desc>
7907 Foo.
7908 </desc>
7909 </param>
7910 <param name="dest" type="wstring" dir="in">
7911 <desc>
7912 Bar.
7913 </desc>
7914 </param>
7915 <param name="userName" type="wstring" dir="in">
7916 <desc>
7917 User name under which the copy command will be executed; the
7918 user has to exist and have the appropriate rights to write to
7919 the destination path.
7920 </desc>
7921 </param>
7922 <param name="password" type="wstring" dir="in">
7923 <desc>
7924 Password of the user account specified.
7925 </desc>
7926 </param>
7927 <param name="flags" type="unsigned long" dir="in">
7928 <desc>
7929 Copy flags.
7930 </desc>
7931 </param>
7932 <param name="progress" type="IProgress" dir="return">
7933 <desc>Progress object to track the operation completion.</desc>
7934 </param>
7935 </method>
7936
7937 <method name="setProcessInput">
7938 <desc>
7939 Sends input into a formerly started process.
7940
7941 <result name="VBOX_E_IPRT_ERROR">
7942 Could not send input.
7943 </result>
7944
7945 </desc>
7946 <param name="pid" type="unsigned long" dir="in">
7947 <desc>
7948 Process id returned by earlier executeProcess() call.
7949 </desc>
7950 </param>
7951 <param name="flags" type="unsigned long" dir="in">
7952 <desc>
7953 Not used, must be set to zero.
7954 </desc>
7955 </param>
7956 <param name="data" type="octet" dir="in" safearray="yes">
7957 <desc>
7958 Buffer of input data to send to the started process to.
7959 </desc>
7960 </param>
7961 <param name="written" type="unsigned long" dir="return">
7962 <desc>
7963 Number of bytes written.
7964 </desc>
7965 </param>
7966 </method>
7967
7968 </interface>
7969
7970
7971 <!--
7972 // IProgress
7973 /////////////////////////////////////////////////////////////////////////
7974 -->
7975
7976 <interface
7977 name="IProgress" extends="$unknown"
7978 uuid="A163C98F-8635-4AA8-B770-A9941737F3EF"
7979 wsmap="managed"
7980 >
7981 <desc>
7982 The IProgress interface is used to track and control
7983 asynchronous tasks within VirtualBox.
7984
7985 An instance of this is returned every time VirtualBox starts
7986 an asynchronous task (in other words, a separate thread) which
7987 continues to run after a method call returns. For example,
7988 <link to="IConsole::saveState" />, which saves the state of
7989 a running virtual machine, can take a long time to complete.
7990 To be able to display a progress bar, a user interface such as
7991 the VirtualBox graphical user interface can use the IProgress
7992 object returned by that method.
7993
7994 Note that IProgress is a "read-only" interface in the sense
7995 that only the VirtualBox internals behind the Main API can
7996 create and manipulate progress objects, whereas client code
7997 can only use the IProgress object to monitor a task's
7998 progress and, if <link to="#cancelable" /> is @c true,
7999 cancel the task by calling <link to="#cancel" />.
8000
8001 A task represented by IProgress consists of either one or
8002 several sub-operations that run sequentially, one by one (see
8003 <link to="#operation" /> and <link to="#operationCount" />).
8004 Every operation is identified by a number (starting from 0)
8005 and has a separate description.
8006
8007 You can find the individual percentage of completion of the current
8008 operation in <link to="#operationPercent" /> and the
8009 percentage of completion of the task as a whole
8010 in <link to="#percent" />.
8011
8012 Similarly, you can wait for the completion of a particular
8013 operation via <link to="#waitForOperationCompletion" /> or
8014 for the completion of the whole task via
8015 <link to="#waitForCompletion" />.
8016 </desc>
8017
8018 <attribute name="id" type="uuid" mod="string" readonly="yes">
8019 <desc>ID of the task.</desc>
8020 </attribute>
8021
8022 <attribute name="description" type="wstring" readonly="yes">
8023 <desc>Description of the task.</desc>
8024 </attribute>
8025
8026 <attribute name="initiator" type="$unknown" readonly="yes">
8027 <desc>Initiator of the task.</desc>
8028 </attribute>
8029
8030 <attribute name="cancelable" type="boolean" readonly="yes">
8031 <desc>Whether the task can be interrupted.</desc>
8032 </attribute>
8033
8034 <attribute name="percent" type="unsigned long" readonly="yes">
8035 <desc>
8036 Current progress value of the task as a whole, in percent.
8037 This value depends on how many operations are already complete.
8038 Returns 100 if <link to="#completed" /> is @c true.
8039 </desc>
8040 </attribute>
8041
8042 <attribute name="timeRemaining" type="long" readonly="yes">
8043 <desc>
8044 Estimated remaining time until the task completes, in
8045 seconds. Returns 0 once the task has completed; returns -1
8046 if the remaining time cannot be computed, in particular if
8047 the current progress is 0.
8048
8049 Even if a value is returned, the estimate will be unreliable
8050 for low progress values. It will become more reliable as the
8051 task progresses; it is not recommended to display an ETA
8052 before at least 20% of a task have completed.
8053 </desc>
8054 </attribute>
8055
8056 <attribute name="completed" type="boolean" readonly="yes">
8057 <desc>Whether the task has been completed.</desc>
8058 </attribute>
8059
8060 <attribute name="canceled" type="boolean" readonly="yes">
8061 <desc>Whether the task has been canceled.</desc>
8062 </attribute>
8063
8064 <attribute name="resultCode" type="long" readonly="yes">
8065 <desc>
8066 Result code of the progress task.
8067 Valid only if <link to="#completed"/> is @c true.
8068 </desc>
8069 </attribute>
8070
8071 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
8072 <desc>
8073 Extended information about the unsuccessful result of the
8074 progress operation. May be @c null if no extended information
8075 is available.
8076 Valid only if <link to="#completed"/> is @c true and
8077 <link to="#resultCode"/> indicates a failure.
8078 </desc>
8079 </attribute>
8080
8081 <attribute name="operationCount" type="unsigned long" readonly="yes">
8082 <desc>
8083 Number of sub-operations this task is divided into.
8084 Every task consists of at least one suboperation.
8085 </desc>
8086 </attribute>
8087
8088 <attribute name="operation" type="unsigned long" readonly="yes">
8089 <desc>Number of the sub-operation being currently executed.</desc>
8090 </attribute>
8091
8092 <attribute name="operationDescription" type="wstring" readonly="yes">
8093 <desc>
8094 Description of the sub-operation being currently executed.
8095 </desc>
8096 </attribute>
8097
8098 <attribute name="operationPercent" type="unsigned long" readonly="yes">
8099 <desc>Progress value of the current sub-operation only, in percent.</desc>
8100 </attribute>
8101
8102 <attribute name="operationWeight" type="unsigned long" readonly="yes">
8103 <desc>Weight value of the current sub-operation only.</desc>
8104 </attribute>
8105
8106 <attribute name="timeout" type="unsigned long">
8107 <desc>
8108 When non-zero, this specifies the number of milliseconds after which
8109 the operation will automatically be canceled. This can only be set on
8110 cancelable objects.
8111 </desc>
8112 </attribute>
8113
8114 <method name="setCurrentOperationProgress">
8115 <desc>Internal method, not to be called externally.</desc>
8116 <param name="percent" type="unsigned long" dir="in" />
8117 </method>
8118 <method name="setNextOperation">
8119 <desc>Internal method, not to be called externally.</desc>
8120 <param name="nextOperationDescription" type="wstring" dir="in" />
8121 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8122 </method>
8123
8124 <method name="waitForCompletion">
8125 <desc>
8126 Waits until the task is done (including all sub-operations)
8127 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8128
8129 Note that the VirtualBox/XPCOM/COM/native event queues of the calling
8130 thread are not processed while waiting. Neglecting event queues may
8131 have dire consequences (degrade performance, resource hogs,
8132 deadlocks, etc.), this is specially so for the main thread on
8133 platforms using XPCOM. Callers are adviced wait for short periods
8134 and service their event queues between calls, or to create a worker
8135 thread to do the waiting.
8136
8137 <result name="VBOX_E_IPRT_ERROR">
8138 Failed to wait for task completion.
8139 </result>
8140 </desc>
8141
8142 <param name="timeout" type="long" dir="in">
8143 <desc>
8144 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8145 </desc>
8146 </param>
8147 </method>
8148
8149 <method name="waitForOperationCompletion">
8150 <desc>
8151 Waits until the given operation is done with a given timeout in
8152 milliseconds; specify -1 for an indefinite wait.
8153
8154 See <link to="#waitForCompletion"> for event queue considerations.</link>
8155
8156 <result name="VBOX_E_IPRT_ERROR">
8157 Failed to wait for operation completion.
8158 </result>
8159
8160 </desc>
8161 <param name="operation" type="unsigned long" dir="in">
8162 <desc>
8163 Number of the operation to wait for.
8164 Must be less than <link to="#operationCount"/>.
8165 </desc>
8166 </param>
8167 <param name="timeout" type="long" dir="in">
8168 <desc>
8169 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8170 </desc>
8171 </param>
8172 </method>
8173
8174 <method name="cancel">
8175 <desc>
8176 Cancels the task.
8177 <note>
8178 If <link to="#cancelable"/> is @c false, then this method will fail.
8179 </note>
8180
8181 <result name="VBOX_E_INVALID_OBJECT_STATE">
8182 Operation cannot be canceled.
8183 </result>
8184
8185 </desc>
8186 </method>
8187
8188 </interface>
8189
8190 <!--
8191 // ISnapshot
8192 /////////////////////////////////////////////////////////////////////////
8193 -->
8194
8195 <interface
8196 name="ISnapshot" extends="$unknown"
8197 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8198 wsmap="managed"
8199 >
8200 <desc>
8201 The ISnapshot interface represents a snapshot of the virtual
8202 machine.
8203
8204 Together with the differencing media that are created
8205 when a snapshot is taken, a machine can be brought back to
8206 the exact state it was in when the snapshot was taken.
8207
8208 The ISnapshot interface has no methods, only attributes; snapshots
8209 are controlled through methods of the <link to="IConsole" /> interface
8210 which also manage the media associated with the snapshot.
8211 The following operations exist:
8212
8213 <ul>
8214 <li><link to="IConsole::takeSnapshot"/> creates a new snapshot
8215 by creating new, empty differencing images for the machine's
8216 media and saving the VM settings and (if the VM is running)
8217 the current VM state in the snapshot.
8218
8219 The differencing images will then receive all data written to
8220 the machine's media, while their parent (base) images
8221 remain unmodified after the snapshot has been taken (see
8222 <link to="IMedium" /> for details about differencing images).
8223 This simplifies restoring a machine to the state of a snapshot:
8224 only the differencing images need to be deleted.
8225
8226 The current machine state is not changed by taking a snapshot.
8227 If the machine is running, it will resume execution after the
8228 snapshot has been taken. After calling this,
8229 <link to="IMachine::currentSnapshot" /> is set to the snapshot
8230 just created.
8231 </li>
8232
8233 <li><link to="IConsole::restoreSnapshot"/> resets a machine to
8234 the state of a previous snapshot by deleting the differencing
8235 image of each of the machine's media and setting the machine's
8236 settings and state to the state that was saved in the snapshot (if any).
8237
8238 This destroys the machine's current state. After calling this,
8239 <link to="IMachine::currentSnapshot" /> is set to the snapshot that was
8240 restored.
8241 </li>
8242
8243 <li><link to="IConsole::deleteSnapshot"/> deletes a snapshot
8244 without affecting the current machine state.
8245
8246 This does not change the current machine state, but instead frees the
8247 resources allocated when the snapshot was taken: the settings and machine
8248 state file are deleted (if any), and the snapshot's differencing image for
8249 each of the machine's media gets merged with its parent image.
8250
8251 Neither the current machine state nor other snapshots are affected
8252 by this operation, except that parent media will be modified
8253 to contain the disk data associated with the snapshot being deleted.
8254
8255 When deleting the current snapshot, the <link to="IMachine::currentSnapshot" />
8256 attribute is set to the current snapshot's parent or NULL if it
8257 has no parent. Otherwise the attribute is unchanged.
8258 </li>
8259 </ul>
8260
8261 Each snapshot contains the settings of the virtual machine (hardware
8262 configuration etc.). In addition, if the machine was running when the
8263 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8264 the current VM state is saved in the snapshot (similarly to what happens
8265 when a VM's state is saved). The snapshot is then said to
8266 be <i>online</i> because when restoring it, the VM will be running.
8267
8268 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8269 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8270
8271 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8272 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8273 it then contains a so-called "zero execution state", representing a
8274 machine that is powered off.
8275 </desc>
8276
8277 <attribute name="id" type="uuid" mod="string" readonly="yes">
8278 <desc>UUID of the snapshot.</desc>
8279 </attribute>
8280
8281 <attribute name="name" type="wstring">
8282 <desc>Short name of the snapshot.</desc>
8283 </attribute>
8284
8285 <attribute name="description" type="wstring">
8286 <desc>Optional description of the snapshot.</desc>
8287 </attribute>
8288
8289 <attribute name="timeStamp" type="long long" readonly="yes">
8290 <desc>
8291 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8292 </desc>
8293 </attribute>
8294
8295 <attribute name="online" type="boolean" readonly="yes">
8296 <desc>
8297 @c true if this snapshot is an online snapshot and @c false otherwise.
8298
8299 When this attribute is @c true, the
8300 <link to="IMachine::stateFilePath"/> attribute of the
8301 <link to="#machine"/> object associated with this snapshot
8302 will point to the saved state file. Otherwise, it will be
8303 an empty string.
8304 </desc>
8305 </attribute>
8306
8307 <attribute name="machine" type="IMachine" readonly="yes">
8308 <desc>
8309 Virtual machine this snapshot is taken on. This object
8310 stores all settings the machine had when taking this snapshot.
8311 <note>
8312 The returned machine object is immutable, i.e. no
8313 any settings can be changed.
8314 </note>
8315 </desc>
8316 </attribute>
8317
8318 <attribute name="parent" type="ISnapshot" readonly="yes">
8319 <desc>
8320 Parent snapshot (a snapshot this one is based on), or
8321 @c null if the snapshot has no parent (i.e. is the first snapshot).
8322 </desc>
8323 </attribute>
8324
8325 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8326 <desc>
8327 Child snapshots (all snapshots having this one as a parent).
8328 </desc>
8329 </attribute>
8330
8331 </interface>
8332
8333
8334 <!--
8335 // IMedium
8336 /////////////////////////////////////////////////////////////////////////
8337 -->
8338
8339 <enum
8340 name="MediumState"
8341 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8342 >
8343 <desc>
8344 Virtual medium state.
8345 <see>IMedium</see>
8346 </desc>
8347
8348 <const name="NotCreated" value="0">
8349 <desc>
8350 Associated medium storage does not exist (either was not created yet or
8351 was deleted).
8352 </desc>
8353 </const>
8354 <const name="Created" value="1">
8355 <desc>
8356 Associated storage exists and accessible; this gets set if the
8357 accessibility check performed by <link to="IMedium::refreshState" />
8358 was successful.
8359 </desc>
8360 </const>
8361 <const name="LockedRead" value="2">
8362 <desc>
8363 Medium is locked for reading (see <link to="IMedium::lockRead"/>),
8364 no data modification is possible.
8365 </desc>
8366 </const>
8367 <const name="LockedWrite" value="3">
8368 <desc>
8369 Medium is locked for writing (see <link to="IMedium::lockWrite"/>),
8370 no concurrent data reading or modification is possible.
8371 </desc>
8372 </const>
8373 <const name="Inaccessible" value="4">
8374 <desc>
8375 Medium accessiblity check (see <link to="IMedium::refreshState" />) has
8376 not yet been performed, or else, associated medium storage is not
8377 accessible. In the first case, <link to="IMedium::lastAccessError"/>
8378 is empty, in the second case, it describes the error that occured.
8379 </desc>
8380 </const>
8381 <const name="Creating" value="5">
8382 <desc>
8383 Associated medium storage is being created.
8384 </desc>
8385 </const>
8386 <const name="Deleting" value="6">
8387 <desc>
8388 Associated medium storage is being deleted.
8389 </desc>
8390 </const>
8391 </enum>
8392
8393 <enum
8394 name="MediumType"
8395 uuid="46bf1fd4-ad86-4ded-8c49-28bd2d148e5a"
8396 >
8397 <desc>
8398 Virtual medium type.
8399 <see>IMedium</see>
8400 </desc>
8401
8402 <const name="Normal" value="0">
8403 <desc>
8404 Normal medium (attached directly or indirectly, preserved
8405 when taking snapshots).
8406 </desc>
8407 </const>
8408 <const name="Immutable" value="1">
8409 <desc>
8410 Immutable medium (attached indirectly, changes are wiped out
8411 the next time the virtual machine is started).
8412 </desc>
8413 </const>
8414 <const name="Writethrough" value="2">
8415 <desc>
8416 Write through medium (attached directly, ignored when
8417 taking snapshots).
8418 </desc>
8419 </const>
8420 <const name="Shareable" value="3">
8421 <desc>
8422 Allow using this medium concurrently by several machines.
8423 <note>Present since VirtualBox 3.2.0, and accepted since 3.2.8.</note>
8424 </desc>
8425 </const>
8426 </enum>
8427
8428 <enum
8429 name="MediumVariant"
8430 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8431 >
8432 <desc>
8433 Virtual medium image variant. More than one flag may be set.
8434 <see>IMedium</see>
8435 </desc>
8436
8437 <const name="Standard" value="0">
8438 <desc>
8439 No particular variant requested, results in using the backend default.
8440 </desc>
8441 </const>
8442 <const name="VmdkSplit2G" value="0x01">
8443 <desc>
8444 VMDK image split in chunks of less than 2GByte.
8445 </desc>
8446 </const>
8447 <const name="VmdkStreamOptimized" value="0x04">
8448 <desc>
8449 VMDK streamOptimized image. Special import/export format which is
8450 read-only/append-only.
8451 </desc>
8452 </const>
8453 <const name="VmdkESX" value="0x08">
8454 <desc>
8455 VMDK format variant used on ESX products.
8456 </desc>
8457 </const>
8458 <const name="Fixed" value="0x10000">
8459 <desc>
8460 Fixed image. Only allowed for base images.
8461 </desc>
8462 </const>
8463 <const name="Diff" value="0x20000">
8464 <desc>
8465 Differencing image. Only allowed for child images.
8466 </desc>
8467 </const>
8468 </enum>
8469
8470 <interface
8471 name="IMediumAttachment" extends="$unknown"
8472 uuid="c29452cc-ca72-404b-9261-cfc514f1e412"
8473 wsmap="struct"
8474 >
8475 <desc>
8476 The IMediumAttachment interface links storage media to virtual machines.
8477 For each medium (<link to="IMedium"/>) which has been attached to a
8478 storage controller (<link to="IStorageController"/>) of a machine
8479 (<link to="IMachine"/>) via the <link to="IMachine::attachDevice" />
8480 method, one instance of IMediumAttachment is added to the machine's
8481 <link to="IMachine::mediumAttachments"/> array attribute.
8482
8483 Each medium attachment specifies the storage controller as well as a
8484 port and device number and the IMedium instance representing a virtual
8485 hard disk or floppy or DVD image.
8486
8487 For removeable media (DVDs or floppies), there are two additional
8488 options. For one, the IMedium instance can be @c null to represent
8489 an empty drive with no media inserted (see <link to="IMachine::mountMedium" />);
8490 secondly, the medium can be one of the pseudo-media for host drives
8491 listed in <link to="IHost::DVDDrives"/> or <link to="IHost::floppyDrives"/>.
8492 </desc>
8493
8494 <attribute name="medium" type="IMedium" readonly="yes">
8495 <desc>Medium object associated with this attachment; it
8496 can be @c null for removable devices.</desc>
8497 </attribute>
8498
8499 <attribute name="controller" type="wstring" readonly="yes">
8500 <desc>Name of the storage controller of this attachment; this
8501 refers to one of the controllers in <link to="IMachine::storageControllers" />
8502 by name.</desc>
8503 </attribute>
8504
8505 <attribute name="port" type="long" readonly="yes">
8506 <desc>Port number of this attachment.
8507 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8508 </desc>
8509 </attribute>
8510
8511 <attribute name="device" type="long" readonly="yes">
8512 <desc>Device slot number of this attachment.
8513 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8514 </desc>
8515 </attribute>
8516
8517 <attribute name="type" type="DeviceType" readonly="yes">
8518 <desc>Device type of this attachment.</desc>
8519 </attribute>
8520
8521 <attribute name="passthrough" type="boolean" readonly="yes">
8522 <desc>Pass I/O requests through to a device on the host.</desc>
8523 </attribute>
8524
8525 <attribute name="bandwidthLimit" type="unsigned long">
8526 <desc>
8527 Maximum throughput allowed for this medium attachment, in units of 1 mbps.
8528 A zero value means uncapped/unlimited.
8529 </desc>
8530 </attribute>
8531
8532 </interface>
8533
8534 <interface
8535 name="IMedium" extends="$unknown"
8536 uuid="bfcf5b8c-5155-4f24-9414-9457054b16db"
8537 wsmap="managed"
8538 >
8539 <desc>
8540 The IMedium interface represents virtual storage for a machine's
8541 hard disks, CD/DVD or floppy drives. It will typically represent
8542 a disk image on the host, for example a VDI or VMDK file representing
8543 a virtual hard disk, or an ISO or RAW file representing virtual
8544 removable media, but can also point to a network location (e.g.
8545 for iSCSI targets).
8546
8547 Instances of IMedium are connected to virtual machines by way of
8548 medium attachments (see <link to="IMediumAttachment" />), which link
8549 the storage medium to a particular device slot of a storage controller
8550 of the virtual machine.
8551 In the VirtualBox API, virtual storage is therefore always represented
8552 by the following chain of object links:
8553
8554 <ul>
8555 <li><link to="IMachine::storageControllers"/> contains an array of
8556 storage controllers (IDE, SATA, SCSI, SAS or a floppy controller;
8557 these are instances of <link to="IStorageController"/>).</li>
8558 <li><link to="IMachine::mediumAttachments"/> contains an array of
8559 medium attachments (instances of <link to="IMediumAttachment"/>),
8560 each containing a storage controller from the above array, a
8561 port/device specification, and an instance of IMedium representing
8562 the medium storage (image file).
8563
8564 For removable media, the storage medium is optional; a medium
8565 attachment with no medium represents a CD/DVD or floppy drive
8566 with no medium inserted. By contrast, hard disk attachments
8567 will always have an IMedium object attached.</li>
8568 <li>Each IMedium in turn points to a storage unit (such as a file
8569 on the host computer or a network resource) that holds actual
8570 data. This location is represented by the <link to="#location"/>
8571 attribute.</li>
8572 </ul>
8573
8574 Existing media are opened using <link to="IVirtualBox::openMedium"/>;
8575 new hard disk media can be created with the VirtualBox API using the
8576 <link to="IVirtualBox::createHardDisk"/> method.
8577
8578 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8579 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8580 type in a regular file.
8581
8582 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8583 drive; in that case the <link to="#id" /> attribute contains the UUID of
8584 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8585
8586 <h3>Known media</h3>
8587
8588 When an existing medium is opened for the first time, it is automatically
8589 remembered by the given VirtualBox installation or, in other words, becomes
8590 a <i>known medium</i>. Known media are stored in the media
8591 registry transparently maintained by VirtualBox and stored in settings
8592 files so that this registry is preserved when VirtualBox is not running.
8593
8594 Newly created virtual media are remembered only when the associated
8595 storage unit is actually created.
8596
8597 All known media can be enumerated using
8598 <link to="IVirtualBox::hardDisks"/>,
8599 <link to="IVirtualBox::DVDImages"/> and
8600 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8601 quickly found using the <link to="IVirtualBox::findMedium"/> method.
8602
8603 Only known media can be attached to virtual machines.
8604
8605 Removing known media from the media registry is performed when the given
8606 medium is closed using the <link to="#close"/> method or when its
8607 associated storage unit is deleted.
8608
8609 <h3>Accessibility checks</h3>
8610
8611 VirtualBox defers media accessibility checks until the <link to="#refreshState" />
8612 method is called explicitly on a medium. This is done to make the VirtualBox object
8613 ready for serving requests as fast as possible and let the end-user
8614 application decide if it needs to check media accessibility right away or not.
8615
8616 As a result, when VirtualBox starts up (e.g. the VirtualBox
8617 object gets created for the first time), all known media are in the
8618 "Inaccessible" state, but the value of the <link to="#lastAccessError"/>
8619 attribute is an empty string because no actual accessibility check has
8620 been made yet.
8621
8622 After calling <link to="#refreshState" />, a medium is considered
8623 <i>accessible</i> if its storage unit can be read. In that case, the
8624 <link to="#state"/> attribute has a value of "Created". If the storage
8625 unit cannot be read (for example, because it is located on a disconnected
8626 network resource, or was accidentally deleted outside VirtualBox),
8627 the medium is considered <i>inaccessible</i>, which is indicated by the
8628 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8629 obtained by reading the <link to="#lastAccessError"/> attribute.
8630
8631 <h3>Medium types</h3>
8632
8633 There are four types of medium behavior (see <link to="MediumType" />):
8634 "normal", "immutable", "writethrough" and "shareable", represented by the
8635 <link to="#type"/> attribute. The type of the medium defines how the
8636 medium is attached to a virtual machine and what happens when a
8637 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8638 attached medium is taken. At the moment DVD and floppy media are always
8639 of type "writethrough".
8640
8641 All media can be also divided in two groups: <i>base</i> media and
8642 <i>differencing</i> media. A base medium contains all sectors of the
8643 medium data in its own storage and therefore can be used independently.
8644 In contrast, a differencing mediun is a "delta" to some other medium and
8645 contains only those sectors which differ from that other medium, which is
8646 then called a <i>parent</i>. The differencing medium is said to be
8647 <i>linked to</i> that parent. The parent may be itself a differencing
8648 medium, thus forming a chain of linked media. The last element in that
8649 chain must always be a base medium. Note that several differencing
8650 media may be linked to the same parent medium.
8651
8652 Differencing media can be distinguished from base media by querying the
8653 <link to="#parent"/> attribute: base media do not have parents they would
8654 depend on, so the value of this attribute is always @c null for them.
8655 Using this attribute, it is possible to walk up the medium tree (from the
8656 child medium to its parent). It is also possible to walk down the tree
8657 using the <link to="#children"/> attribute.
8658
8659 Note that the type of all differencing media is "normal"; all other
8660 values are meaningless for them. Base media may be of any type.
8661
8662 <h3>Creating hard disks</h3>
8663
8664 New base hard disks are created using
8665 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8666 opened using <link to="IVirtualBox::openMedium"/>. Differencing hard
8667 disks are usually implicitly created by VirtualBox when needed but may
8668 also be created explicitly using <link to="#createDiffStorage"/>.
8669
8670 After the hard disk is successfully created (including the storage unit)
8671 or opened, it becomes a known hard disk (remembered in the internal media
8672 registry). Known hard disks can be attached to a virtual machine, accessed
8673 through <link to="IVirtualBox::findMedium"/> or enumerated using the
8674 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8675
8676 The following methods, besides <link to="IMedium::close"/>,
8677 automatically remove the hard disk from the media registry:
8678 <ul>
8679 <li><link to="#deleteStorage"/></li>
8680 <li><link to="#mergeTo"/></li>
8681 </ul>
8682
8683 If the storage unit of the hard disk is a regular file in the host's
8684 file system then the rules stated in the description of the
8685 <link to="IMedium::location"/> attribute apply when setting its value.
8686
8687 <h4>Automatic composition of the file name part</h4>
8688
8689 Another extension to the <link to="IMedium::location"/> attribute is that
8690 there is a possibility to cause VirtualBox to compose a unique value for
8691 the file name part of the location using the UUID of the hard disk. This
8692 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
8693 e.g. before the storage unit is created, and works as follows. You set the
8694 value of the <link to="IMedium::location"/> attribute to a location
8695 specification which only contains the path specification but not the file
8696 name part and ends with either a forward slash or a backslash character.
8697 In response, VirtualBox will generate a new UUID for the hard disk and
8698 compose the file name using the following pattern:
8699 <pre>
8700 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8701 </pre>
8702 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8703 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8704 is the default extension for the storage format of this hard disk. After
8705 that, you may call any of the methods that create a new hard disk storage
8706 unit and they will use the generated UUID and file name.
8707
8708 <h3>Attaching Hard Disks</h3>
8709
8710 Hard disks are attached to virtual machines using the
8711 <link to="IMachine::attachDevice"/> method and detached using the
8712 <link to="IMachine::detachDevice"/> method. Depending on their
8713 <link to="#type"/>, hard disks are attached either
8714 <i>directly</i> or <i>indirectly</i>.
8715
8716 When a hard disk is being attached directly, it is associated with the
8717 virtual machine and used for hard disk operations when the machine is
8718 running. When a hard disk is being attached indirectly, a new differencing
8719 hard disk linked to it is implicitly created and this differencing hard
8720 disk is associated with the machine and used for hard disk operations.
8721 This also means that if <link to="IMachine::attachDevice"/> performs
8722 a direct attachment then the same hard disk will be returned in response
8723 to the subsequent <link to="IMachine::getMedium"/> call; however if
8724 an indirect attachment is performed then
8725 <link to="IMachine::getMedium"/> will return the implicitly created
8726 differencing hard disk, not the original one passed to <link
8727 to="IMachine::attachDevice"/>. In detail:
8728
8729 <ul>
8730 <li><b>Normal base</b> hard disks that do not have children (i.e.
8731 differencing hard disks linked to them) and that are not already
8732 attached to virtual machines in snapshots are attached <b>directly</b>.
8733 Otherwise, they are attached <b>indirectly</b> because having
8734 dependent children or being part of the snapshot makes it impossible
8735 to modify hard disk contents without breaking the integrity of the
8736 dependent party. The <link to="#readOnly"/> attribute allows to
8737 quickly determine the kind of the attachment for the given hard
8738 disk. Note that if a normal base hard disk is to be indirectly
8739 attached to a virtual machine with snapshots then a special
8740 procedure called <i>smart attachment</i> is performed (see below).</li>
8741 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
8742 they are attached <b>directly</b> if they do not have children and are
8743 not attached to virtual machines in snapshots, and <b>indirectly</b>
8744 otherwise. Note that the smart attachment procedure is never performed
8745 for differencing hard disks.</li>
8746 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
8747 they are designed to be non-writable. If an immutable hard disk is
8748 attached to a virtual machine with snapshots then a special
8749 procedure called smart attachment is performed (see below).</li>
8750 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
8751 also as designed. This also means that writethrough hard disks cannot
8752 have other hard disks linked to them at all.</li>
8753 <li><b>Shareable</b> hard disks are always attached <b>directly</b>,
8754 also as designed. This also means that shareable hard disks cannot
8755 have other hard disks linked to them at all. They behave almost
8756 like writethrough hard disks, except that shareable hard disks can
8757 be attached to several virtual machines which are running, allowing
8758 concurrent accesses. You need special cluster software running in
8759 the virtual machines to make use of such disks.</li>
8760 </ul>
8761
8762 Note that the same hard disk, regardless of its type, may be attached to
8763 more than one virtual machine at a time. In this case, the machine that is
8764 started first gains exclusive access to the hard disk and attempts to
8765 start other machines having this hard disk attached will fail until the
8766 first machine is powered down.
8767
8768 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8769 that the given hard disk remains associated with the given machine after a
8770 successful <link to="IMachine::detachDevice"/> call until
8771 <link to="IMachine::saveSettings"/> is called to save all changes to
8772 machine settings to disk. This deferring is necessary to guarantee that
8773 the hard disk configuration may be restored at any time by a call to
8774 <link to="IMachine::discardSettings"/> before the settings
8775 are saved (committed).
8776
8777 Note that if <link to="IMachine::discardSettings"/> is called after
8778 indirectly attaching some hard disks to the machine but before a call to
8779 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8780 all differencing hard disks implicitly created by
8781 <link to="IMachine::attachDevice"/> for these indirect attachments.
8782 Such implicitly created hard disks will also be immediately deleted when
8783 detached explicitly using the <link to="IMachine::detachDevice"/>
8784 call if it is made before <link to="IMachine::saveSettings"/>. This
8785 implicit deletion is safe because newly created differencing hard
8786 disks do not contain any user data.
8787
8788 However, keep in mind that detaching differencing hard disks that were
8789 implicitly created by <link to="IMachine::attachDevice"/>
8790 before the last <link to="IMachine::saveSettings"/> call will
8791 <b>not</b> implicitly delete them as they may already contain some data
8792 (for example, as a result of virtual machine execution). If these hard
8793 disks are no more necessary, the caller can always delete them explicitly
8794 using <link to="#deleteStorage"/> after they are actually de-associated
8795 from this machine by the <link to="IMachine::saveSettings"/> call.
8796
8797 <h3>Smart Attachment</h3>
8798
8799 When normal base or immutable hard disks are indirectly attached to a
8800 virtual machine then some additional steps are performed to make sure the
8801 virtual machine will have the most recent "view" of the hard disk being
8802 attached. These steps include walking through the machine's snapshots
8803 starting from the current one and going through ancestors up to the first
8804 snapshot. Hard disks attached to the virtual machine in all
8805 of the encountered snapshots are checked whether they are descendants of
8806 the given normal base or immutable hard disk. The first found child (which
8807 is the differencing hard disk) will be used instead of the normal base or
8808 immutable hard disk as a parent for creating a new differencing hard disk
8809 that will be actually attached to the machine. And only if no descendants
8810 are found or if the virtual machine does not have any snapshots then the
8811 normal base or immutable hard disk will be used itself as a parent for
8812 this differencing hard disk.
8813
8814 It is easier to explain what smart attachment does using the
8815 following example:
8816 <pre>
8817BEFORE attaching B.vdi: AFTER attaching B.vdi:
8818
8819Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8820 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8821 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8822 Snapshot 4 (none) Snapshot 4 (none)
8823 CurState (none) CurState (D3->D2.vdi)
8824
8825 NOT
8826 ...
8827 CurState (D3->B.vdi)
8828 </pre>
8829 The first column is the virtual machine configuration before the base hard
8830 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8831 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8832 mean that the hard disk that is actually attached to the machine is a
8833 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8834 another hard disk, <tt>B.vdi</tt>.
8835
8836 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8837 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8838 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8839 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8840 it cannot be attached directly and needs an indirect attachment (i.e.
8841 implicit creation of a new differencing hard disk). Due to the smart
8842 attachment procedure, the new differencing hard disk
8843 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8844 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8845 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8846 machine.
8847
8848 Note that if there is more than one descendant hard disk of the given base
8849 hard disk found in a snapshot, and there is an exact device, channel and
8850 bus match, then this exact match will be used. Otherwise, the youngest
8851 descendant will be picked up.
8852
8853 There is one more important aspect of the smart attachment procedure which
8854 is not related to snapshots at all. Before walking through the snapshots
8855 as described above, the backup copy of the current list of hard disk
8856 attachment is searched for descendants. This backup copy is created when
8857 the hard disk configuration is changed for the first time after the last
8858 <link to="IMachine::saveSettings"/> call and used by
8859 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8860 changes. When such a descendant is found in this backup copy, it will be
8861 simply re-attached back, without creating a new differencing hard disk for
8862 it. This optimization is necessary to make it possible to re-attach the
8863 base or immutable hard disk to a different bus, channel or device slot
8864 without losing the contents of the differencing hard disk actually
8865 attached to the machine in place of it.
8866 </desc>
8867
8868 <attribute name="id" type="uuid" mod="string" readonly="yes">
8869 <desc>
8870 UUID of the medium. For a newly created medium, this value is a randomly
8871 generated UUID.
8872
8873 <note>
8874 For media in one of MediumState_NotCreated, MediumState_Creating or
8875 MediumState_Deleting states, the value of this property is undefined
8876 and will most likely be an empty UUID.
8877 </note>
8878 </desc>
8879 </attribute>
8880
8881 <attribute name="description" type="wstring">
8882 <desc>
8883 Optional description of the medium. For a newly created medium the value
8884 of this attribute is an empty string.
8885
8886 Medium types that don't support this attribute will return E_NOTIMPL in
8887 attempt to get or set this attribute's value.
8888
8889 <note>
8890 For some storage types, reading this attribute may return an outdated
8891 (last known) value when <link to="#state"/> is <link
8892 to="MediumState_Inaccessible"/> or <link
8893 to="MediumState_LockedWrite"/> because the value of this attribute is
8894 stored within the storage unit itself. Also note that changing the
8895 attribute value is not possible in such case, as well as when the
8896 medium is the <link to="MediumState_LockedRead"/> state.
8897 </note>
8898 </desc>
8899 </attribute>
8900
8901 <attribute name="state" type="MediumState" readonly="yes">
8902 <desc>
8903 Returns the current medium state, which is the last state set by
8904 the accessibility check performed by <link to="#refreshState"/>.
8905 If that method has not yet been called on the medium, the state
8906 is "Inaccessible"; as opposed to truly inaccessible media, the
8907 value of <link to="#lastAccessError"/> will be an empty string in
8908 that case.
8909
8910 <note>As of version 3.1, this no longer performs an accessibility check
8911 automatically; call <link to="#refreshState"/> for that.
8912 </note>
8913 </desc>
8914 </attribute>
8915
8916 <attribute name="variant" type="MediumVariant" readonly="yes">
8917 <desc>
8918 Returns the storage format variant information for this medium.
8919 Before <link to="#refreshState"/> is called this method returns
8920 an undefined value.
8921 </desc>
8922 </attribute>
8923
8924 <attribute name="location" type="wstring">
8925 <desc>
8926 Location of the storage unit holding medium data.
8927
8928 The format of the location string is medium type specific. For medium
8929 types using regular files in a host's file system, the location
8930 string is the full file name.
8931
8932 Some medium types may support changing the storage unit location by
8933 simply changing the value of this property. If this operation is not
8934 supported, the implementation will return E_NOTIMPL in attempt to set
8935 this attribute's value.
8936
8937 When setting a value of the location attribute which is a regular file
8938 in the host's file system, the given file name may be either relative to
8939 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8940 absolute. Note that if the given location specification does not contain
8941 the file extension part then a proper default extension will be
8942 automatically appended by the implementation depending on the medium type.
8943 </desc>
8944 </attribute>
8945
8946 <attribute name="name" type="wstring" readonly="yes">
8947 <desc>
8948 Name of the storage unit holding medium data.
8949
8950 The returned string is a short version of the <link to="#location"/>
8951 attribute that is suitable for representing the medium in situations
8952 where the full location specification is too long (such as lists
8953 and comboboxes in GUI frontends). This string is also used by frontends
8954 to sort the media list alphabetically when needed.
8955
8956 For example, for locations that are regular files in the host's file
8957 system, the value of this attribute is just the file name (+ extension),
8958 without the path specification.
8959
8960 Note that as opposed to the <link to="#location"/> attribute, the name
8961 attribute will not necessary be unique for a list of media of the
8962 given type and format.
8963 </desc>
8964 </attribute>
8965
8966 <attribute name="deviceType" type="DeviceType" readonly="yes">
8967 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
8968 medium.</desc>
8969 </attribute>
8970
8971 <attribute name="hostDrive" type="boolean" readonly="yes">
8972 <desc>True if this corresponds to a drive on the host.</desc>
8973 </attribute>
8974
8975 <attribute name="size" type="long long" readonly="yes">
8976 <desc>
8977 Physical size of the storage unit used to hold medium data (in bytes).
8978
8979 <note>
8980 For media whose <link to="#state"/> is <link
8981 to="MediumState_Inaccessible"/>, the value of this property is the
8982 last known size. For <link to="MediumState_NotCreated"/> media,
8983 the returned value is zero.
8984 </note>
8985 </desc>
8986 </attribute>
8987
8988 <attribute name="format" type="wstring" readonly="yes">
8989 <desc>
8990 Storage format of this medium.
8991
8992 The value of this attribute is a string that specifies a backend used
8993 to store medium data. The storage format is defined when you create a
8994 new medium or automatically detected when you open an existing medium,
8995 and cannot be changed later.
8996
8997 The list of all storage formats supported by this VirtualBox
8998 installation can be obtained using
8999 <link to="ISystemProperties::mediumFormats"/>.
9000 </desc>
9001 </attribute>
9002
9003 <attribute name="mediumFormat" type="IMediumFormat" readonly="yes">
9004 <desc>
9005 Storage medium format object corresponding to this medium.
9006
9007 The value of this attribute is a reference to the medium format object
9008 that specifies the backend properties used to store medium data. The
9009 storage format is defined when you create a new medium or automatically
9010 detected when you open an existing medium, and cannot be changed later.
9011
9012 <note>@c null is returned if there is no associated medium format
9013 object. This can e.g. happen for medium objects representing host
9014 drives and other special medium objects.</note>
9015 </desc>
9016 </attribute>
9017
9018 <attribute name="type" type="MediumType">
9019 <desc>
9020 Type (role) of this medium.
9021
9022 The following constraints apply when changing the value of this
9023 attribute:
9024 <ul>
9025 <li>If a medium is attached to a virtual machine (either in the
9026 current state or in one of the snapshots), its type cannot be
9027 changed.
9028 </li>
9029 <li>As long as the medium has children, its type cannot be set
9030 to <link to="MediumType_Writethrough"/>.
9031 </li>
9032 <li>The type of all differencing media is
9033 <link to="MediumType_Normal"/> and cannot be changed.
9034 </li>
9035 </ul>
9036
9037 The type of a newly created or opened medium is set to
9038 <link to="MediumType_Normal"/>, except for DVD and floppy media,
9039 which have a type of <link to="MediumType_Writethrough"/>.
9040 </desc>
9041 </attribute>
9042
9043 <attribute name="parent" type="IMedium" readonly="yes">
9044 <desc>
9045 Parent of this medium (the medium this medium is directly based
9046 on).
9047
9048 Only differencing media have parents. For base (non-differencing)
9049 media, @c null is returned.
9050 </desc>
9051 </attribute>
9052
9053 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
9054 <desc>
9055 Children of this medium (all differencing media directly based
9056 on this medium). A @c null array is returned if this medium
9057 does not have any children.
9058 </desc>
9059 </attribute>
9060
9061 <attribute name="base" type="IMedium" readonly="yes">
9062 <desc>
9063 Base medium of this medium.
9064
9065 If this is a differencing medium, its base medium is the medium
9066 the given medium branch starts from. For all other types of media, this
9067 property returns the medium object itself (i.e. the same object this
9068 property is read on).
9069 </desc>
9070 </attribute>
9071
9072 <attribute name="readOnly" type="boolean" readonly="yes">
9073 <desc>
9074 Returns @c true if this medium is read-only and @c false otherwise.
9075
9076 A medium is considered to be read-only when its contents cannot be
9077 modified without breaking the integrity of other parties that depend on
9078 this medium such as its child media or snapshots of virtual machines
9079 where this medium is attached to these machines. If there are no
9080 children and no such snapshots then there is no dependency and the
9081 medium is not read-only.
9082
9083 The value of this attribute can be used to determine the kind of the
9084 attachment that will take place when attaching this medium to a
9085 virtual machine. If the value is @c false then the medium will
9086 be attached directly. If the value is @c true then the medium
9087 will be attached indirectly by creating a new differencing child
9088 medium for that. See the interface description for more information.
9089
9090 Note that all <link to="MediumType_Immutable">Immutable</link> media
9091 are always read-only while all
9092 <link to="MediumType_Writethrough">Writethrough</link> media are
9093 always not.
9094
9095 <note>
9096 The read-only condition represented by this attribute is related to
9097 the medium type and usage, not to the current
9098 <link to="IMedium::state">medium state</link> and not to the read-only
9099 state of the storage unit.
9100 </note>
9101 </desc>
9102 </attribute>
9103
9104 <attribute name="logicalSize" type="long long" readonly="yes">
9105 <desc>
9106 Logical size of this medium (in bytes), as reported to the
9107 guest OS running inside the virtual machine this medium is
9108 attached to. The logical size is defined when the medium is created
9109 and cannot be changed later.
9110
9111 <note>
9112 Reading this property on a differencing medium will return the size
9113 of its <link to="#base"/> medium.
9114 </note>
9115 <note>
9116 For media whose state is <link to="#state"/> is <link
9117 to="MediumState_Inaccessible"/>, the value of this property is the
9118 last known logical size. For <link to="MediumState_NotCreated"/>
9119 media, the returned value is zero.
9120 </note>
9121 </desc>
9122 </attribute>
9123
9124 <attribute name="autoReset" type="boolean">
9125 <desc>
9126 Whether this differencing medium will be automatically reset each
9127 time a virtual machine it is attached to is powered up. This
9128 attribute is automatically set to @c true for the last
9129 differencing image of an "immutable" medium (see
9130 <link to="MediumType" />).
9131
9132 See <link to="#reset"/> for more information about resetting
9133 differencing media.
9134
9135 <note>
9136 Reading this property on a base (non-differencing) medium will
9137 always @c false. Changing the value of this property in this
9138 case is not supported.
9139 </note>
9140
9141 <result name="VBOX_E_NOT_SUPPORTED">
9142 This is not a differencing medium (when changing the attribute
9143 value).
9144 </result>
9145 </desc>
9146 </attribute>
9147
9148 <attribute name="lastAccessError" type="wstring" readonly="yes">
9149 <desc>
9150 Text message that represents the result of the last accessibility
9151 check performed by <link to="#refreshState"/>.
9152
9153 An empty string is returned if the last accessibility check
9154 was successful or has not yet been called. As a result, if
9155 <link to="#state" /> is "Inaccessible" and this attribute is empty,
9156 then <link to="#refreshState"/> has yet to be called; this is the
9157 default value of media after VirtualBox initialization.
9158 A non-empty string indicates a failure and should normally describe
9159 a reason of the failure (for example, a file read error).
9160 </desc>
9161 </attribute>
9162
9163 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9164 <desc>
9165 Array of UUIDs of all machines this medium is attached to.
9166
9167 A @c null array is returned if this medium is not attached to any
9168 machine or to any machine's snapshot.
9169
9170 <note>
9171 The returned array will include a machine even if this medium is not
9172 attached to that machine in the current state but attached to it in
9173 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9174 details.
9175 </note>
9176 </desc>
9177 </attribute>
9178
9179 <method name="setIDs">
9180 <desc>
9181 Changes the UUID and parent UUID for a hard disk medium.
9182 </desc>
9183 <param name="setImageId" type="boolean" dir="in">
9184 <desc>
9185 Select whether a new image UUID is set or not.
9186 </desc>
9187 </param>
9188 <param name="imageId" type="uuid" mod="string" dir="in">
9189 <desc>
9190 New UUID for the image. If an empty string is passed, then a new
9191 UUID is automatically created, provided that @a setImageId is @c true.
9192 Specifying a zero UUID is not allowed.
9193 </desc>
9194 </param>
9195 <param name="setParentId" type="boolean" dir="in">
9196 <desc>
9197 Select whether a new parent UUID is set or not.
9198 </desc>
9199 </param>
9200 <param name="parentId" type="uuid" mod="string" dir="in">
9201 <desc>
9202 New parent UUID for the image. If an empty string is passed, then a
9203 new UUID is automatically created, provided @a setParentId is
9204 @c true. A zero UUID is valid.
9205 </desc>
9206 </param>
9207 <result name="E_INVALIDARG">
9208 Invalid parameter combination.
9209 </result>
9210 <result name="VBOX_E_NOT_SUPPORTED">
9211 Medium is not a hard disk medium.
9212 </result>
9213 </method>
9214
9215 <method name="refreshState">
9216 <desc>
9217 If the current medium state (see <link to="MediumState"/>) is one of
9218 "Created", "Inaccessible" or "LockedRead", then this performs an
9219 accessibility check on the medium and sets the value of the <link to="#state"/>
9220 attribute accordingly; that value is also returned for convenience.
9221
9222 For all other state values, this does not perform a refresh but returns
9223 the state only.
9224
9225 The refresh, if performed, may take a long time (several seconds or even
9226 minutes, depending on the storage unit location and format) because it performs an
9227 accessibility check of the storage unit. This check may cause a significant
9228 delay if the storage unit of the given medium is, for example, a file located
9229 on a network share which is not currently accessible due to connectivity
9230 problems. In that case, the call will not return until a timeout
9231 interval defined by the host OS for this operation expires. For this reason,
9232 it is recommended to never read this attribute on the main UI thread to avoid
9233 making the UI unresponsive.
9234
9235 If the last known state of the medium is "Created" and the accessibility
9236 check fails, then the state would be set to "Inaccessible", and
9237 <link to="#lastAccessError"/> may be used to get more details about the
9238 failure. If the state of the medium is "LockedRead", then it remains the
9239 same, and a non-empty value of <link to="#lastAccessError"/> will
9240 indicate a failed accessibility check in this case.
9241
9242 Note that not all medium states are applicable to all medium types.
9243 </desc>
9244 <param name="state" type="MediumState" dir="return">
9245 <desc>
9246 New medium state.
9247 </desc>
9248 </param>
9249 </method>
9250
9251 <method name="getSnapshotIds">
9252 <desc>
9253 Returns an array of UUIDs of all snapshots of the given machine where
9254 this medium is attached to.
9255
9256 If the medium is attached to the machine in the current state, then the
9257 first element in the array will always be the ID of the queried machine
9258 (i.e. the value equal to the @c machineId argument), followed by
9259 snapshot IDs (if any).
9260
9261 If the medium is not attached to the machine in the current state, then
9262 the array will contain only snapshot IDs.
9263
9264 The returned array may be @c null if this medium is not attached
9265 to the given machine at all, neither in the current state nor in one of
9266 the snapshots.
9267 </desc>
9268 <param name="machineId" type="uuid" mod="string" dir="in">
9269 <desc>
9270 UUID of the machine to query.
9271 </desc>
9272 </param>
9273 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9274 <desc>
9275 Array of snapshot UUIDs of the given machine using this medium.
9276 </desc>
9277 </param>
9278 </method>
9279
9280 <method name="lockRead">
9281 <desc>
9282 Locks this medium for reading.
9283
9284 A read lock is shared: many clients can simultaneously lock the
9285 same medium for reading unless it is already locked for writing (see
9286 <link to="#lockWrite"/>) in which case an error is returned.
9287
9288 When the medium is locked for reading, it cannot be modified
9289 from within VirtualBox. This means that any method that changes
9290 the properties of this medium or contents of the storage unit
9291 will return an error (unless explicitly stated otherwise). That
9292 includes an attempt to start a virtual machine that wants to
9293 write to the the medium.
9294
9295 When the virtual machine is started up, it locks for reading all
9296 media it uses in read-only mode. If some medium cannot be locked
9297 for reading, the startup procedure will fail.
9298 A medium is typically locked for reading while it is used by a running
9299 virtual machine but has a depending differencing image that receives
9300 the actual write operations. This way one base medium can have
9301 multiple child differencing images which can be written to
9302 simultaneously. Read-only media such as DVD and floppy images are
9303 also locked for reading only (so they can be in use by multiple
9304 machines simultaneously).
9305
9306 A medium is also locked for reading when it is the source of a
9307 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9308
9309 The medium locked for reading must be unlocked using the <link
9310 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9311 can be nested and must be followed by the same number of paired
9312 <link to="#unlockRead"/> calls.
9313
9314 This method sets the medium state (see <link to="#state"/>) to
9315 "LockedRead" on success. The medium's previous state must be
9316 one of "Created", "Inaccessible" or "LockedRead".
9317
9318 Locking an inaccessible medium is not an error; this method performs
9319 a logical lock that prevents modifications of this medium through
9320 the VirtualBox API, not a physical file-system lock of the underlying
9321 storage unit.
9322
9323 This method returns the current state of the medium
9324 <i>before</i> the operation.
9325
9326 <result name="VBOX_E_INVALID_OBJECT_STATE">
9327 Invalid medium state (e.g. not created, locked, inaccessible,
9328 creating, deleting).
9329 </result>
9330
9331 </desc>
9332 <param name="state" type="MediumState" dir="return">
9333 <desc>
9334 State of the medium after the operation.
9335 </desc>
9336 </param>
9337 </method>
9338
9339 <method name="unlockRead">
9340 <desc>
9341 Cancels the read lock previously set by <link to="#lockRead"/>.
9342
9343 For both success and failure, this method returns the current state
9344 of the medium <i>after</i> the operation.
9345
9346 See <link to="#lockRead"/> for more details.
9347
9348 <result name="VBOX_E_INVALID_OBJECT_STATE">
9349 Medium not locked for reading.
9350 </result>
9351
9352 </desc>
9353 <param name="state" type="MediumState" dir="return">
9354 <desc>
9355 State of the medium after the operation.
9356 </desc>
9357 </param>
9358 </method>
9359
9360 <method name="lockWrite">
9361 <desc>
9362 Locks this medium for writing.
9363
9364 A write lock, as opposed to <link to="#lockRead"/>, is
9365 exclusive: there may be only one client holding a write lock,
9366 and there may be no read locks while the write lock is held.
9367 As a result, read-locking fails if a write lock is held, and
9368 write-locking fails if either a read or another write lock is held.
9369
9370 When a medium is locked for writing, it cannot be modified
9371 from within VirtualBox, and it is not guaranteed that the values
9372 of its properties are up-to-date. Any method that changes the
9373 properties of this medium or contents of the storage unit will
9374 return an error (unless explicitly stated otherwise).
9375
9376 When a virtual machine is started up, it locks for writing all
9377 media it uses to write data to. If any medium could not be locked
9378 for writing, the startup procedure will fail. If a medium has
9379 differencing images, then while the machine is running, only
9380 the last ("leaf") differencing image is locked for writing,
9381 whereas its parents are locked for reading only.
9382
9383 A medium is also locked for writing when it is the target of a
9384 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9385
9386 The medium locked for writing must be unlocked using the <link
9387 to="#unlockWrite"/> method. Write locks <i>cannot</i> be nested.
9388
9389 This method sets the medium state (see <link to="#state"/>) to
9390 "LockedWrite" on success. The medium's previous state must be
9391 either "Created" or "Inaccessible".
9392
9393 Locking an inaccessible medium is not an error; this method performs
9394 a logical lock that prevents modifications of this medium through
9395 the VirtualBox API, not a physical file-system lock of the underlying
9396 storage unit.
9397
9398 For both, success and failure, this method returns the current
9399 state of the medium <i>before</i> the operation.
9400
9401 <result name="VBOX_E_INVALID_OBJECT_STATE">
9402 Invalid medium state (e.g. not created, locked, inaccessible,
9403 creating, deleting).
9404 </result>
9405
9406 </desc>
9407 <param name="state" type="MediumState" dir="return">
9408 <desc>
9409 State of the medium after the operation.
9410 </desc>
9411 </param>
9412 </method>
9413
9414 <method name="unlockWrite">
9415 <desc>
9416 Cancels the write lock previously set by <link to="#lockWrite"/>.
9417
9418 For both success and failure, this method returns the current
9419 state of the medium <i>after</i> the operation.
9420
9421 See <link to="#lockWrite"/> for more details.
9422
9423 <result name="VBOX_E_INVALID_OBJECT_STATE">
9424 Medium not locked for writing.
9425 </result>
9426
9427 </desc>
9428 <param name="state" type="MediumState" dir="return">
9429 <desc>
9430 State of the medium after the operation.
9431 </desc>
9432 </param>
9433 </method>
9434
9435 <method name="close">
9436 <desc>
9437 Closes this medium.
9438
9439 The medium must not be attached to any known virtual machine
9440 and must not have any known child media, otherwise the
9441 operation will fail.
9442
9443 When the medium is successfully closed, it is removed from
9444 the list of registered media, but its storage unit is not
9445 deleted. In particular, this means that this medium can
9446 later be opened again using the <link to="IVirtualBox::openMedium"/>
9447 call.
9448
9449 Note that after this method successfully returns, the given medium
9450 object becomes uninitialized. This means that any attempt
9451 to call any of its methods or attributes will fail with the
9452 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9453
9454 <result name="VBOX_E_INVALID_OBJECT_STATE">
9455 Invalid medium state (other than not created, created or
9456 inaccessible).
9457 </result>
9458 <result name="VBOX_E_OBJECT_IN_USE">
9459 Medium attached to virtual machine.
9460 </result>
9461 <result name="VBOX_E_FILE_ERROR">
9462 Settings file not accessible.
9463 </result>
9464 <result name="VBOX_E_XML_ERROR">
9465 Could not parse the settings file.
9466 </result>
9467
9468 </desc>
9469 </method>
9470
9471 <!-- storage methods -->
9472
9473 <method name="getProperty">
9474 <desc>
9475 Returns the value of the custom medium property with the given name.
9476
9477 The list of all properties supported by the given medium format can
9478 be obtained with <link to="IMediumFormat::describeProperties"/>.
9479
9480 Note that if this method returns an empty string in @a value, the
9481 requested property is supported but currently not assigned any value.
9482
9483 <result name="VBOX_E_OBJECT_NOT_FOUND">
9484 Requested property does not exist (not supported by the format).
9485 </result>
9486 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9487 </desc>
9488 <param name="name" type="wstring" dir="in">
9489 <desc>Name of the property to get.</desc>
9490 </param>
9491 <param name="value" type="wstring" dir="return">
9492 <desc>Current property value.</desc>
9493 </param>
9494 </method>
9495
9496 <method name="setProperty">
9497 <desc>
9498 Sets the value of the custom medium property with the given name.
9499
9500 The list of all properties supported by the given medium format can
9501 be obtained with <link to="IMediumFormat::describeProperties"/>.
9502
9503 Note that setting the property value to @c null or an empty string is
9504 equivalent to deleting the existing value. A default value (if it is
9505 defined for this property) will be used by the format backend in this
9506 case.
9507
9508 <result name="VBOX_E_OBJECT_NOT_FOUND">
9509 Requested property does not exist (not supported by the format).
9510 </result>
9511 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9512 </desc>
9513 <param name="name" type="wstring" dir="in">
9514 <desc>Name of the property to set.</desc>
9515 </param>
9516 <param name="value" type="wstring" dir="in">
9517 <desc>Property value to set.</desc>
9518 </param>
9519 </method>
9520
9521 <method name="getProperties">
9522 <desc>
9523 Returns values for a group of properties in one call.
9524
9525 The names of the properties to get are specified using the @a names
9526 argument which is a list of comma-separated property names or
9527 an empty string if all properties are to be returned. Note that currently
9528 the value of this argument is ignored and the method always returns all
9529 existing properties.
9530
9531 The list of all properties supported by the given medium format can
9532 be obtained with <link to="IMediumFormat::describeProperties"/>.
9533
9534 The method returns two arrays, the array of property names corresponding
9535 to the @a names argument and the current values of these properties.
9536 Both arrays have the same number of elements with each elemend at the
9537 given index in the first array corresponds to an element at the same
9538 index in the second array.
9539
9540 Note that for properties that do not have assigned values,
9541 an empty string is returned at the appropriate index in the
9542 @a returnValues array.
9543
9544 </desc>
9545 <param name="names" type="wstring" dir="in">
9546 <desc>
9547 Names of properties to get.
9548 </desc>
9549 </param>
9550 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9551 <desc>Names of returned properties.</desc>
9552 </param>
9553 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9554 <desc>Values of returned properties.</desc>
9555 </param>
9556 </method>
9557
9558 <method name="setProperties">
9559 <desc>
9560 Sets values for a group of properties in one call.
9561
9562 The names of the properties to set are passed in the @a names
9563 array along with the new values for them in the @a values array. Both
9564 arrays have the same number of elements with each elemend at the given
9565 index in the first array corresponding to an element at the same index
9566 in the second array.
9567
9568 If there is at least one property name in @a names that is not valid,
9569 the method will fail before changing the values of any other properties
9570 from the @a names array.
9571
9572 Using this method over <link to="#setProperty"/> is preferred if you
9573 need to set several properties at once since it will result into less
9574 IPC calls.
9575
9576 The list of all properties supported by the given medium format can
9577 be obtained with <link to="IMediumFormat::describeProperties"/>.
9578
9579 Note that setting the property value to @c null or an empty string is
9580 equivalent to deleting the existing value. A default value (if it is
9581 defined for this property) will be used by the format backend in this
9582 case.
9583 </desc>
9584 <param name="names" type="wstring" safearray="yes" dir="in">
9585 <desc>Names of properties to set.</desc>
9586 </param>
9587 <param name="values" type="wstring" safearray="yes" dir="in">
9588 <desc>Values of properties to set.</desc>
9589 </param>
9590 </method>
9591
9592 <!-- storage methods -->
9593
9594 <method name="createBaseStorage">
9595 <desc>
9596 Starts creating a hard disk storage unit (fixed/dynamic, according
9597 to the variant flags) in in the background. The previous storage unit
9598 created for this object, if any, must first be deleted using
9599 <link to="#deleteStorage"/>, otherwise the operation will fail.
9600
9601 Before the operation starts, the medium is placed in
9602 <link to="MediumState_Creating"/> state. If the create operation
9603 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
9604 state.
9605
9606 After the returned progress object reports that the operation has
9607 successfully completed, the medium state will be set to <link
9608 to="MediumState_Created"/>, the medium will be remembered by this
9609 VirtualBox installation and may be attached to virtual machines.
9610
9611 <result name="VBOX_E_NOT_SUPPORTED">
9612 The variant of storage creation operation is not supported. See <link
9613 to="IMediumFormat::capabilities"/>.
9614 </result>
9615 </desc>
9616 <param name="logicalSize" type="long long" dir="in">
9617 <desc>Maximum logical size of the medium in bytes.</desc>
9618 </param>
9619 <param name="variant" type="MediumVariant" dir="in">
9620 <desc>Exact image variant which should be created.</desc>
9621 </param>
9622 <param name="progress" type="IProgress" dir="return">
9623 <desc>Progress object to track the operation completion.</desc>
9624 </param>
9625 </method>
9626
9627 <method name="deleteStorage">
9628 <desc>
9629 Starts deleting the storage unit of this medium.
9630
9631 The medium must not be attached to any known virtual machine and must
9632 not have any known child media, otherwise the operation will fail.
9633 It will also fail if there is no storage unit to delete or if deletion
9634 is already in progress, or if the medium is being in use (locked for
9635 read or for write) or inaccessible. Therefore, the only valid state for
9636 this operation to succeed is <link to="MediumState_Created"/>.
9637
9638 Before the operation starts, the medium is placed in
9639 <link to="MediumState_Deleting"/> state and gets removed from the list
9640 of remembered hard disks (media registry). If the delete operation
9641 fails, the medium will be remembered again and placed back to
9642 <link to="MediumState_Created"/> state.
9643
9644 After the returned progress object reports that the operation is
9645 complete, the medium state will be set to
9646 <link to="MediumState_NotCreated"/> and you will be able to use one of
9647 the storage creation methods to create it again.
9648
9649 <see>#close()</see>
9650
9651 <result name="VBOX_E_OBJECT_IN_USE">
9652 Medium is attached to a virtual machine.
9653 </result>
9654 <result name="VBOX_E_NOT_SUPPORTED">
9655 Storage deletion is not allowed because neither of storage creation
9656 operations are supported. See
9657 <link to="IMediumFormat::capabilities"/>.
9658 </result>
9659
9660 <note>
9661 If the deletion operation fails, it is not guaranteed that the storage
9662 unit still exists. You may check the <link to="IMedium::state"/> value
9663 to answer this question.
9664 </note>
9665 </desc>
9666 <param name="progress" type="IProgress" dir="return">
9667 <desc>Progress object to track the operation completion.</desc>
9668 </param>
9669 </method>
9670
9671 <!-- diff methods -->
9672
9673 <method name="createDiffStorage">
9674 <desc>
9675 Starts creating an empty differencing storage unit based on this
9676 medium in the format and at the location defined by the @a target
9677 argument.
9678
9679 The target medium must be in <link to="MediumState_NotCreated"/>
9680 state (i.e. must not have an existing storage unit). Upon successful
9681 completion, this operation will set the type of the target medium to
9682 <link to="MediumType_Normal"/> and create a storage unit necessary to
9683 represent the differencing medium data in the given format (according
9684 to the storage format of the target object).
9685
9686 After the returned progress object reports that the operation is
9687 successfully complete, the target medium gets remembered by this
9688 VirtualBox installation and may be attached to virtual machines.
9689
9690 <note>
9691 The medium will be set to <link to="MediumState_LockedRead"/>
9692 state for the duration of this operation.
9693 </note>
9694 <result name="VBOX_E_OBJECT_IN_USE">
9695 Medium not in @c NotCreated state.
9696 </result>
9697 </desc>
9698 <param name="target" type="IMedium" dir="in">
9699 <desc>Target medium.</desc>
9700 </param>
9701 <param name="variant" type="MediumVariant" dir="in">
9702 <desc>Exact image variant which should be created.</desc>
9703 </param>
9704 <param name="progress" type="IProgress" dir="return">
9705 <desc>Progress object to track the operation completion.</desc>
9706 </param>
9707 </method>
9708
9709 <method name="mergeTo">
9710 <desc>
9711 Starts merging the contents of this medium and all intermediate
9712 differencing media in the chain to the given target medium.
9713
9714 The target medium must be either a descendant of this medium or
9715 its ancestor (otherwise this method will immediately return a failure).
9716 It follows that there are two logical directions of the merge operation:
9717 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9718 ancestor (<i>backward merge</i>). Let us consider the following medium
9719 chain:
9720
9721 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9722
9723 Here, calling this method on the <tt>Base</tt> medium object with
9724 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9725 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9726 merge. Note that in both cases the contents of the resulting medium
9727 will be the same, the only difference is the medium object that takes
9728 the result of the merge operation. In case of the forward merge in the
9729 above example, the result will be written to <tt>Diff_2</tt>; in case of
9730 the backward merge, the result will be written to <tt>Base</tt>. In
9731 other words, the result of the operation is always stored in the target
9732 medium.
9733
9734 Upon successful operation completion, the storage units of all media in
9735 the chain between this (source) medium and the target medium, including
9736 the source medium itself, will be automatically deleted and the
9737 relevant medium objects (including this medium) will become
9738 uninitialized. This means that any attempt to call any of
9739 their methods or attributes will fail with the
9740 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9741 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9742 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> media.
9743 Note that <tt>Diff_2</tt> in this case will become a base medium
9744 itself since it will no longer be based on any other medium.
9745
9746 Considering the above, all of the following conditions must be met in
9747 order for the merge operation to succeed:
9748 <ul>
9749 <li>
9750 Neither this (source) medium nor any intermediate
9751 differencing medium in the chain between it and the target
9752 medium is attached to any virtual machine.
9753 </li>
9754 <li>
9755 Neither the source medium nor the target medium is an
9756 <link to="MediumType_Immutable"/> medium.
9757 </li>
9758 <li>
9759 The part of the medium tree from the source medium to the
9760 target medium is a linear chain, i.e. all medium in this
9761 chain have exactly one child which is the next medium in this
9762 chain. The only exception from this rule is the target medium in
9763 the forward merge operation; it is allowed to have any number of
9764 child media because the merge operation will not change its
9765 logical contents (as it is seen by the guest OS or by children).
9766 </li>
9767 <li>
9768 None of the involved media are in
9769 <link to="MediumState_LockedRead"/> or
9770 <link to="MediumState_LockedWrite"/> state.
9771 </li>
9772 </ul>
9773
9774 <note>
9775 This (source) medium and all intermediates will be placed to <link
9776 to="MediumState_Deleting"/> state and the target medium will be
9777 placed to <link to="MediumState_LockedWrite"/> state and for the
9778 duration of this operation.
9779 </note>
9780 </desc>
9781 <param name="target" type="IMedium" dir="in">
9782 <desc>Target medium.</desc>
9783 </param>
9784 <param name="progress" type="IProgress" dir="return">
9785 <desc>Progress object to track the operation completion.</desc>
9786 </param>
9787 </method>
9788
9789 <!-- clone method -->
9790
9791 <method name="cloneTo">
9792 <desc>
9793 Starts creating a clone of this medium in the format and at the
9794 location defined by the @a target argument.
9795
9796 The target medium must be either in <link to="MediumState_NotCreated"/>
9797 state (i.e. must not have an existing storage unit) or in
9798 <link to="MediumState_Created"/> state (i.e. created and not locked, and
9799 big enough to hold the data or else the copy will be partial). Upon
9800 successful completion, the cloned medium will contain exactly the
9801 same sector data as the medium being cloned, except that in the
9802 first case a new UUID for the clone will be randomly generated, and in
9803 the second case the UUID will remain unchanged.
9804
9805 The @a parent argument defines which medium will be the parent
9806 of the clone. Passing a @c null reference indicates that the clone will
9807 be a base image, i.e. completely independent. It is possible to specify
9808 an arbitrary medium for this parameter, including the parent of the
9809 medium which is being cloned. Even cloning to a child of the source
9810 medium is possible. Note that when cloning to an existing image, the
9811 @a parent irgument is ignored.
9812
9813 After the returned progress object reports that the operation is
9814 successfully complete, the target medium gets remembered by this
9815 VirtualBox installation and may be attached to virtual machines.
9816
9817 <note>
9818 This medium will be placed to <link to="MediumState_LockedRead"/>
9819 state for the duration of this operation.
9820 </note>
9821 <result name="E_NOTIMPL">
9822 The specified cloning variant is not supported at the moment.
9823 </result>
9824 </desc>
9825 <param name="target" type="IMedium" dir="in">
9826 <desc>Target medium.</desc>
9827 </param>
9828 <param name="variant" type="MediumVariant" dir="in">
9829 <desc>Exact image variant which should be created.</desc>
9830 </param>
9831 <param name="parent" type="IMedium" dir="in">
9832 <desc>Parent of the cloned medium.</desc>
9833 </param>
9834 <param name="progress" type="IProgress" dir="return">
9835 <desc>Progress object to track the operation completion.</desc>
9836 </param>
9837 </method>
9838
9839 <!-- other methods -->
9840
9841 <method name="compact">
9842 <desc>
9843 Starts compacting of this medium. This means that the medium is
9844 transformed into a possibly more compact storage representation.
9845 This potentially creates temporary images, which can require a
9846 substantial amount of additional disk space.
9847
9848 This medium will be placed to <link to="MediumState_LockedWrite"/>
9849 state and all its parent media (if any) will be placed to
9850 <link to="MediumState_LockedRead"/> state for the duration of this
9851 operation.
9852
9853 Please note that the results can be either returned straight away,
9854 or later as the result of the background operation via the object
9855 returned via the @a progress parameter.
9856
9857 <result name="VBOX_E_NOT_SUPPORTED">
9858 Medium format does not support compacting (but potentially
9859 needs it).
9860 </result>
9861 </desc>
9862 <param name="progress" type="IProgress" dir="return">
9863 <desc>Progress object to track the operation completion.</desc>
9864 </param>
9865 </method>
9866
9867 <method name="resize">
9868 <desc>
9869 Starts resizing this medium. This means that the nominal size of the
9870 medium is set to the new value. Both increasing and decreasing the
9871 size is possible, and there are no safety checks, since VirtualBox
9872 does not make any assumptions about the medium contents.
9873
9874 Resizing usually needs additional disk space, and possibly also
9875 some temporary disk space. Note that resize does not create a full
9876 temporary copy of the medium, so the additional disk space requirement
9877 is usually much lower than using the clone operation.
9878
9879 This medium will be placed to <link to="MediumState_LockedWrite"/>
9880 state for the duration of this operation.
9881
9882 Please note that the results can be either returned straight away,
9883 or later as the result of the background operation via the object
9884 returned via the @a progress parameter.
9885
9886 <result name="VBOX_E_NOT_SUPPORTED">
9887 Medium format does not support resizing.
9888 </result>
9889 </desc>
9890 <param name="logicalSize" type="long long" dir="in">
9891 <desc>New nominal capacity of the medium in bytes.</desc>
9892 </param>
9893 <param name="progress" type="IProgress" dir="return">
9894 <desc>Progress object to track the operation completion.</desc>
9895 </param>
9896 </method>
9897
9898 <method name="reset">
9899 <desc>
9900 Starts erasing the contents of this differencing medium.
9901
9902 This operation will reset the differencing medium to its initial
9903 state when it does not contain any sector data and any read operation is
9904 redirected to its parent medium. This automatically gets called
9905 during VM power-up for every medium whose <link to="#autoReset" />
9906 attribute is @c true.
9907
9908 The medium will be write-locked for the duration of this operation (see
9909 <link to="#lockWrite" />).
9910
9911 <result name="VBOX_E_NOT_SUPPORTED">
9912 This is not a differencing medium.
9913 </result>
9914 <result name="VBOX_E_INVALID_OBJECT_STATE">
9915 Medium is not in <link to="MediumState_Created"/> or
9916 <link to="MediumState_Inaccessible"/> state.
9917 </result>
9918 </desc>
9919 <param name="progress" type="IProgress" dir="return">
9920 <desc>Progress object to track the operation completion.</desc>
9921 </param>
9922 </method>
9923
9924 </interface>
9925
9926
9927 <!--
9928 // IMediumFormat
9929 /////////////////////////////////////////////////////////////////////////
9930 -->
9931
9932 <enum
9933 name="DataType"
9934 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9935 >
9936 <const name="Int32" value="0"/>
9937 <const name="Int8" value="1"/>
9938 <const name="String" value="2"/>
9939 </enum>
9940
9941 <enum
9942 name="DataFlags"
9943 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9944 >
9945 <const name="None" value="0x00"/>
9946 <const name="Mandatory" value="0x01"/>
9947 <const name="Expert" value="0x02"/>
9948 <const name="Array" value="0x04"/>
9949 <const name="FlagMask" value="0x07"/>
9950 </enum>
9951
9952 <enum
9953 name="MediumFormatCapabilities"
9954 uuid="7342ba79-7ce0-4d94-8f86-5ed5a185d9bd"
9955 >
9956 <desc>
9957 Medium format capability flags.
9958 </desc>
9959
9960 <const name="Uuid" value="0x01">
9961 <desc>
9962 Supports UUIDs as expected by VirtualBox code.
9963 </desc>
9964 </const>
9965
9966 <const name="CreateFixed" value="0x02">
9967 <desc>
9968 Supports creating fixed size images, allocating all space instantly.
9969 </desc>
9970 </const>
9971
9972 <const name="CreateDynamic" value="0x04">
9973 <desc>
9974 Supports creating dynamically growing images, allocating space on
9975 demand.
9976 </desc>
9977 </const>
9978
9979 <const name="CreateSplit2G" value="0x08">
9980 <desc>
9981 Supports creating images split in chunks of a bit less than 2 GBytes.
9982 </desc>
9983 </const>
9984
9985 <const name="Differencing" value="0x10">
9986 <desc>
9987 Supports being used as a format for differencing media (see <link
9988 to="IMedium::createDiffStorage"/>).
9989 </desc>
9990 </const>
9991
9992 <const name="Asynchronous" value="0x20">
9993 <desc>
9994 Supports asynchronous I/O operations for at least some configurations.
9995 </desc>
9996 </const>
9997
9998 <const name="File" value="0x40">
9999 <desc>
10000 The format backend operates on files (the <link to="IMedium::location"/>
10001 attribute of the medium specifies a file used to store medium
10002 data; for a list of supported file extensions see
10003 <link to="IMediumFormat::fileExtensions"/>).
10004 </desc>
10005 </const>
10006
10007 <const name="Properties" value="0x80">
10008 <desc>
10009 The format backend uses the property interface to configure the storage
10010 location and properties (the <link to="IMediumFormat::describeProperties"/>
10011 method is used to get access to properties supported by the given medium format).
10012 </desc>
10013 </const>
10014
10015 <const name="TcpNetworking" value="0x100">
10016 <desc>
10017 The format backend uses the TCP networking interface for network access.
10018 </desc>
10019 </const>
10020
10021 <const name="VFS" value="0x200">
10022 <desc>
10023 The format backend supports virtual filesystem functionality.
10024 </desc>
10025 </const>
10026
10027 <const name="CapabilityMask" value="0x3FF"/>
10028 </enum>
10029
10030 <interface
10031 name="IMediumFormat" extends="$unknown"
10032 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
10033 wsmap="managed"
10034 >
10035 <desc>
10036 The IMediumFormat interface represents a medium format.
10037
10038 Each medium format has an associated backend which is used to handle
10039 media stored in this format. This interface provides information
10040 about the properties of the associated backend.
10041
10042 Each medium format is identified by a string represented by the
10043 <link to="#id"/> attribute. This string is used in calls like
10044 <link to="IVirtualBox::createHardDisk"/> to specify the desired
10045 format.
10046
10047 The list of all supported medium formats can be obtained using
10048 <link to="ISystemProperties::mediumFormats"/>.
10049
10050 <see>IMedium</see>
10051 </desc>
10052
10053 <attribute name="id" type="wstring" readonly="yes">
10054 <desc>
10055 Identifier of this format.
10056
10057 The format identifier is a non-@c null non-empty ASCII string. Note that
10058 this string is case-insensitive. This means that, for example, all of
10059 the following strings:
10060 <pre>
10061 "VDI"
10062 "vdi"
10063 "VdI"</pre>
10064 refer to the same medium format.
10065
10066 This string is used in methods of other interfaces where it is necessary
10067 to specify a medium format, such as
10068 <link to="IVirtualBox::createHardDisk"/>.
10069 </desc>
10070 </attribute>
10071
10072 <attribute name="name" type="wstring" readonly="yes">
10073 <desc>
10074 Human readable description of this format.
10075
10076 Mainly for use in file open dialogs.
10077 </desc>
10078 </attribute>
10079
10080 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
10081 <desc>
10082 Array of strings containing the supported file extensions.
10083
10084 The first extension in the array is the extension preferred by the
10085 backend. It is recommended to use this extension when specifying a
10086 location of the storage unit for a new medium.
10087
10088 Note that some backends do not work on files, so this array may be
10089 empty.
10090
10091 <see>IMediumFormat::capabilities</see>
10092 </desc>
10093 </attribute>
10094
10095 <attribute name="capabilities" type="unsigned long" readonly="yes">
10096 <desc>
10097 Capabilities of the format as a set of bit flags.
10098
10099 For the meaning of individual capability flags see
10100 <link to="MediumFormatCapabilities"/>.
10101 </desc>
10102 </attribute>
10103
10104 <method name="describeProperties">
10105 <desc>
10106 Returns several arrays describing the properties supported by this
10107 format.
10108
10109 An element with the given index in each array describes one
10110 property. Thus, the number of elements in each returned array is the
10111 same and corresponds to the number of supported properties.
10112
10113 The returned arrays are filled in only if the
10114 <link to="MediumFormatCapabilities_Properties"/> flag is set.
10115 All arguments must be non-@c null.
10116
10117 <see>DataType</see>
10118 <see>DataFlags</see>
10119 </desc>
10120
10121 <param name="names" type="wstring" safearray="yes" dir="out">
10122 <desc>Array of property names.</desc>
10123 </param>
10124 <param name="description" type="wstring" safearray="yes" dir="out">
10125 <desc>Array of property descriptions.</desc>
10126 </param>
10127 <param name="types" type="DataType" safearray="yes" dir="out">
10128 <desc>Array of property types.</desc>
10129 </param>
10130 <param name="flags" type="unsigned long" safearray="yes" dir="out">
10131 <desc>Array of property flags.</desc>
10132 </param>
10133 <param name="defaults" type="wstring" safearray="yes" dir="out">
10134 <desc>Array of default property values.</desc>
10135 </param>
10136 </method>
10137
10138 </interface>
10139
10140
10141 <!--
10142 // IKeyboard
10143 /////////////////////////////////////////////////////////////////////////
10144 -->
10145
10146 <interface
10147 name="IKeyboard" extends="$unknown"
10148 uuid="f6916ec5-a881-4237-898f-7de58cf88672"
10149 wsmap="managed"
10150 >
10151 <desc>
10152 The IKeyboard interface represents the virtual machine's keyboard. Used
10153 in <link to="IConsole::keyboard"/>.
10154
10155 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10156 to the virtual machine.
10157
10158 </desc>
10159 <method name="putScancode">
10160 <desc>Sends a scancode to the keyboard.
10161
10162 <result name="VBOX_E_IPRT_ERROR">
10163 Could not send scan code to virtual keyboard.
10164 </result>
10165
10166 </desc>
10167 <param name="scancode" type="long" dir="in"/>
10168 </method>
10169
10170 <method name="putScancodes">
10171 <desc>Sends an array of scancodes to the keyboard.
10172
10173 <result name="VBOX_E_IPRT_ERROR">
10174 Could not send all scan codes to virtual keyboard.
10175 </result>
10176
10177 </desc>
10178 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10179 <param name="codesStored" type="unsigned long" dir="return"/>
10180 </method>
10181
10182 <method name="putCAD">
10183 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10184 function is nothing special, it is just a convenience function
10185 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10186
10187 <result name="VBOX_E_IPRT_ERROR">
10188 Could not send all scan codes to virtual keyboard.
10189 </result>
10190
10191 </desc>
10192 </method>
10193
10194 <attribute name="eventSource" type="IEventSource" readonly="yes">
10195 <desc>
10196 Event source for keyboard events.
10197 </desc>
10198 </attribute>
10199
10200 </interface>
10201
10202
10203 <!--
10204 // IMouse
10205 /////////////////////////////////////////////////////////////////////////
10206 -->
10207
10208 <enum
10209 name="MouseButtonState"
10210 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10211 >
10212 <desc>
10213 Mouse button state.
10214 </desc>
10215
10216 <const name="LeftButton" value="0x01"/>
10217 <const name="RightButton" value="0x02"/>
10218 <const name="MiddleButton" value="0x04"/>
10219 <const name="WheelUp" value="0x08"/>
10220 <const name="WheelDown" value="0x10"/>
10221 <const name="XButton1" value="0x20"/>
10222 <const name="XButton2" value="0x40"/>
10223 <const name="MouseStateMask" value="0x7F"/>
10224 </enum>
10225
10226 <interface
10227 name="IMouse" extends="$unknown"
10228 uuid="05044a52-7811-4f00-ae3a-0ab7ff707b10"
10229 wsmap="managed"
10230 >
10231 <desc>
10232 The IMouse interface represents the virtual machine's mouse. Used in
10233 <link to="IConsole::mouse"/>.
10234
10235 Through this interface, the virtual machine's virtual mouse can be
10236 controlled.
10237 </desc>
10238
10239 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10240 <desc>
10241 Whether the guest OS supports absolute mouse pointer positioning
10242 or not.
10243 <note>
10244 You can use the <link to="IMouseCapabilityChangedEvent"/>
10245 event to be instantly informed about changes of this attribute
10246 during virtual machine execution.
10247 </note>
10248 <see><link to="#putMouseEventAbsolute"/></see>
10249 </desc>
10250 </attribute>
10251
10252 <attribute name="relativeSupported" type="boolean" readonly="yes">
10253 <desc>
10254 Whether the guest OS supports relative mouse pointer positioning
10255 or not.
10256 <note>
10257 You can use the <link to="IMouseCapabilityChangedEvent"/>
10258 event to be instantly informed about changes of this attribute
10259 during virtual machine execution.
10260 </note>
10261 <see><link to="#putMouseEvent"/></see>
10262 </desc>
10263 </attribute>
10264
10265 <attribute name="needsHostCursor" type="boolean" readonly="yes">
10266 <desc>
10267 Whether the guest OS can currently switch to drawing it's own mouse
10268 cursor on demand.
10269 <note>
10270 You can use the <link to="IMouseCapabilityChangedEvent"/>
10271 event to be instantly informed about changes of this attribute
10272 during virtual machine execution.
10273 </note>
10274 <see><link to="#putMouseEvent"/></see>
10275 </desc>
10276 </attribute>
10277
10278 <method name="putMouseEvent">
10279 <desc>
10280 Initiates a mouse event using relative pointer movements
10281 along x and y axis.
10282
10283 <result name="E_ACCESSDENIED">
10284 Console not powered up.
10285 </result>
10286 <result name="VBOX_E_IPRT_ERROR">
10287 Could not send mouse event to virtual mouse.
10288 </result>
10289
10290 </desc>
10291
10292 <param name="dx" type="long" dir="in">
10293 <desc>
10294 Amount of pixels the mouse should move to the right.
10295 Negative values move the mouse to the left.
10296 </desc>
10297 </param>
10298 <param name="dy" type="long" dir="in">
10299 <desc>
10300 Amount of pixels the mouse should move downwards.
10301 Negative values move the mouse upwards.
10302 </desc>
10303 </param>
10304 <param name="dz" type="long" dir="in">
10305 <desc>
10306 Amount of mouse wheel moves.
10307 Positive values describe clockwise wheel rotations,
10308 negative values describe counterclockwise rotations.
10309 </desc>
10310 </param>
10311 <param name="dw" type="long" dir="in">
10312 <desc>
10313 Amount of horizontal mouse wheel moves.
10314 Positive values describe a movement to the left,
10315 negative values describe a movement to the right.
10316 </desc>
10317 </param>
10318 <param name="buttonState" type="long" dir="in">
10319 <desc>
10320 The current state of mouse buttons. Every bit represents
10321 a mouse button as follows:
10322 <table>
10323 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10324 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10325 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10326 </table>
10327 A value of <tt>1</tt> means the corresponding button is pressed.
10328 otherwise it is released.
10329 </desc>
10330 </param>
10331 </method>
10332
10333 <method name="putMouseEventAbsolute">
10334 <desc>
10335 Positions the mouse pointer using absolute x and y coordinates.
10336 These coordinates are expressed in pixels and
10337 start from <tt>[1,1]</tt> which corresponds to the top left
10338 corner of the virtual display.
10339
10340 <result name="E_ACCESSDENIED">
10341 Console not powered up.
10342 </result>
10343 <result name="VBOX_E_IPRT_ERROR">
10344 Could not send mouse event to virtual mouse.
10345 </result>
10346
10347 <note>
10348 This method will have effect only if absolute mouse
10349 positioning is supported by the guest OS.
10350 </note>
10351
10352 <see><link to="#absoluteSupported"/></see>
10353 </desc>
10354
10355 <param name="x" type="long" dir="in">
10356 <desc>
10357 X coordinate of the pointer in pixels, starting from @c 1.
10358 </desc>
10359 </param>
10360 <param name="y" type="long" dir="in">
10361 <desc>
10362 Y coordinate of the pointer in pixels, starting from @c 1.
10363 </desc>
10364 </param>
10365 <param name="dz" type="long" dir="in">
10366 <desc>
10367 Amount of mouse wheel moves.
10368 Positive values describe clockwise wheel rotations,
10369 negative values describe counterclockwise rotations.
10370 </desc>
10371 </param>
10372 <param name="dw" type="long" dir="in">
10373 <desc>
10374 Amount of horizontal mouse wheel moves.
10375 Positive values describe a movement to the left,
10376 negative values describe a movement to the right.
10377 </desc>
10378 </param>
10379 <param name="buttonState" type="long" dir="in">
10380 <desc>
10381 The current state of mouse buttons. Every bit represents
10382 a mouse button as follows:
10383 <table>
10384 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10385 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10386 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10387 </table>
10388 A value of @c 1 means the corresponding button is pressed.
10389 otherwise it is released.
10390 </desc>
10391 </param>
10392 </method>
10393
10394 <attribute name="eventSource" type="IEventSource" readonly="yes">
10395 <desc>
10396 Event source for mouse events.
10397 </desc>
10398 </attribute>
10399
10400 </interface>
10401
10402 <!--
10403 // IDisplay
10404 /////////////////////////////////////////////////////////////////////////
10405 -->
10406
10407 <enum
10408 name="FramebufferPixelFormat"
10409 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10410 >
10411 <desc>
10412 Format of the video memory buffer. Constants represented by this enum can
10413 be used to test for particular values of <link
10414 to="IFramebuffer::pixelFormat"/>. See also <link
10415 to="IFramebuffer::requestResize"/>.
10416
10417 See also www.fourcc.org for more information about FOURCC pixel formats.
10418 </desc>
10419
10420 <const name="Opaque" value="0">
10421 <desc>
10422 Unknown buffer format (the user may not assume any particular format of
10423 the buffer).
10424 </desc>
10425 </const>
10426 <const name="FOURCC_RGB" value="0x32424752">
10427 <desc>
10428 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10429 bit layout).
10430 </desc>
10431 </const>
10432 </enum>
10433
10434 <interface
10435 name="IFramebuffer" extends="$unknown"
10436 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10437 wsmap="suppress"
10438 >
10439 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10440 <desc>Address of the start byte of the frame buffer.</desc>
10441 </attribute>
10442
10443 <attribute name="width" type="unsigned long" readonly="yes">
10444 <desc>Frame buffer width, in pixels.</desc>
10445 </attribute>
10446
10447 <attribute name="height" type="unsigned long" readonly="yes">
10448 <desc>Frame buffer height, in pixels.</desc>
10449 </attribute>
10450
10451 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10452 <desc>
10453 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10454 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10455 are: 8, 15, 16, 24 and 32.
10456 </desc>
10457 </attribute>
10458
10459 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10460 <desc>
10461 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10462 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10463 size of the scan line must be aligned to 32 bits.
10464 </desc>
10465 </attribute>
10466
10467 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10468 <desc>
10469 Frame buffer pixel format. It's either one of the values defined by <link
10470 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10471 <note>
10472 This attribute must never return <link
10473 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10474 <link to="#address"/> points to must be always known.
10475 </note>
10476 </desc>
10477 </attribute>
10478
10479 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10480 <desc>
10481 Defines whether this frame buffer uses the virtual video card's memory
10482 buffer (guest VRAM) directly or not. See <link
10483 to="IFramebuffer::requestResize"/> for more information.
10484 </desc>
10485 </attribute>
10486
10487 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10488 <desc>
10489 Hint from the frame buffer about how much of the standard
10490 screen height it wants to use for itself. This information is
10491 exposed to the guest through the VESA BIOS and VMMDev interface
10492 so that it can use it for determining its video mode table. It
10493 is not guaranteed that the guest respects the value.
10494 </desc>
10495 </attribute>
10496
10497 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10498 <desc>
10499 An alpha-blended overlay which is superposed over the frame buffer.
10500 The initial purpose is to allow the display of icons providing
10501 information about the VM state, including disk activity, in front
10502 ends which do not have other means of doing that. The overlay is
10503 designed to controlled exclusively by IDisplay. It has no locking
10504 of its own, and any changes made to it are not guaranteed to be
10505 visible until the affected portion of IFramebuffer is updated. The
10506 overlay can be created lazily the first time it is requested. This
10507 attribute can also return @c null to signal that the overlay is not
10508 implemented.
10509 </desc>
10510 </attribute>
10511
10512 <attribute name="winId" type="long long" readonly="yes">
10513 <desc>
10514 Platform-dependent identifier of the window where context of this
10515 frame buffer is drawn, or zero if there's no such window.
10516 </desc>
10517 </attribute>
10518
10519 <method name="lock">
10520 <desc>
10521 Locks the frame buffer.
10522 Gets called by the IDisplay object where this frame buffer is
10523 bound to.
10524 </desc>
10525 </method>
10526
10527 <method name="unlock">
10528 <desc>
10529 Unlocks the frame buffer.
10530 Gets called by the IDisplay object where this frame buffer is
10531 bound to.
10532 </desc>
10533 </method>
10534
10535 <method name="notifyUpdate">
10536 <desc>
10537 Informs about an update.
10538 Gets called by the display object where this buffer is
10539 registered.
10540 </desc>
10541 <param name="x" type="unsigned long" dir="in"/>
10542 <param name="y" type="unsigned long" dir="in"/>
10543 <param name="width" type="unsigned long" dir="in"/>
10544 <param name="height" type="unsigned long" dir="in"/>
10545 </method>
10546
10547 <method name="requestResize">
10548 <desc>
10549 Requests a size and pixel format change.
10550
10551 There are two modes of working with the video buffer of the virtual
10552 machine. The <i>indirect</i> mode implies that the IFramebuffer
10553 implementation allocates a memory buffer for the requested display mode
10554 and provides it to the virtual machine. In <i>direct</i> mode, the
10555 IFramebuffer implementation uses the memory buffer allocated and owned
10556 by the virtual machine. This buffer represents the video memory of the
10557 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10558 usually faster because the implementation gets a raw pointer to the
10559 guest VRAM buffer which it can directly use for visualizing the contents
10560 of the virtual display, as opposed to the indirect mode where the
10561 contents of guest VRAM are copied to the memory buffer provided by
10562 the implementation every time a display update occurs.
10563
10564 It is important to note that the direct mode is really fast only when
10565 the implementation uses the given guest VRAM buffer directly, for
10566 example, by blitting it to the window representing the virtual machine's
10567 display, which saves at least one copy operation comparing to the
10568 indirect mode. However, using the guest VRAM buffer directly is not
10569 always possible: the format and the color depth of this buffer may be
10570 not supported by the target window, or it may be unknown (opaque) as in
10571 case of text or non-linear multi-plane VGA video modes. In this case,
10572 the indirect mode (that is always available) should be used as a
10573 fallback: when the guest VRAM contents are copied to the
10574 implementation-provided memory buffer, color and format conversion is
10575 done automatically by the underlying code.
10576
10577 The @a pixelFormat parameter defines whether the direct mode is
10578 available or not. If @a pixelFormat is <link
10579 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10580 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10581 @a bytesPerLine parameters must be ignored and the implementation must use
10582 the indirect mode (where it provides its own buffer in one of the
10583 supported formats). In all other cases, @a pixelFormat together with
10584 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10585 buffer pointed to by the @a VRAM parameter and the implementation is
10586 free to choose which mode to use. To indicate that this frame buffer uses
10587 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10588 attribute must return @c true and <link to="#address"/> must
10589 return exactly the same address that is passed in the @a VRAM parameter
10590 of this method; otherwise it is assumed that the indirect strategy is
10591 chosen.
10592
10593 The @a width and @a height parameters represent the size of the
10594 requested display mode in both modes. In case of indirect mode, the
10595 provided memory buffer should be big enough to store data of the given
10596 display mode. In case of direct mode, it is guaranteed that the given
10597 @a VRAM buffer contains enough space to represent the display mode of the
10598 given size. Note that this frame buffer's <link to="#width"/> and <link
10599 to="#height"/> attributes must return exactly the same values as
10600 passed to this method after the resize is completed (see below).
10601
10602 The @a finished output parameter determines if the implementation has
10603 finished resizing the frame buffer or not. If, for some reason, the
10604 resize cannot be finished immediately during this call, @a finished
10605 must be set to @c false, and the implementation must call
10606 <link to="IDisplay::resizeCompleted"/> after it has returned from
10607 this method as soon as possible. If @a finished is @c false, the
10608 machine will not call any frame buffer methods until
10609 <link to="IDisplay::resizeCompleted"/> is called.
10610
10611 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10612 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10613 this frame buffer must return exactly the same values as specified in the
10614 parameters of this method, after the resize is completed. If the
10615 indirect mode is chosen, these attributes must return values describing
10616 the format of the implementation's own memory buffer <link
10617 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10618 value must always correlate with <link to="#pixelFormat"/>. Note that
10619 the <link to="#pixelFormat"/> attribute must never return <link
10620 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10621
10622 <note>
10623 This method is called by the IDisplay object under the
10624 <link to="#lock"/> provided by this IFramebuffer
10625 implementation. If this method returns @c false in @a finished, then
10626 this lock is not released until
10627 <link to="IDisplay::resizeCompleted"/> is called.
10628 </note>
10629 </desc>
10630 <param name="screenId" type="unsigned long" dir="in">
10631 <desc>
10632 Logical screen number. Must be used in the corresponding call to
10633 <link to="IDisplay::resizeCompleted"/> if this call is made.
10634 </desc>
10635 </param>
10636 <param name="pixelFormat" type="unsigned long" dir="in">
10637 <desc>
10638 Pixel format of the memory buffer pointed to by @a VRAM.
10639 See also <link to="FramebufferPixelFormat"/>.
10640 </desc>
10641 </param>
10642 <param name="VRAM" type="octet" mod="ptr" dir="in">
10643 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10644 </param>
10645 <param name="bitsPerPixel" type="unsigned long" dir="in">
10646 <desc>Color depth, bits per pixel.</desc>
10647 </param>
10648 <param name="bytesPerLine" type="unsigned long" dir="in">
10649 <desc>Size of one scan line, in bytes.</desc>
10650 </param>
10651 <param name="width" type="unsigned long" dir="in">
10652 <desc>Width of the guest display, in pixels.</desc>
10653 </param>
10654 <param name="height" type="unsigned long" dir="in">
10655 <desc>Height of the guest display, in pixels.</desc>
10656 </param>
10657 <param name="finished" type="boolean" dir="return">
10658 <desc>
10659 Can the VM start using the new frame buffer immediately
10660 after this method returns or it should wait for
10661 <link to="IDisplay::resizeCompleted"/>.
10662 </desc>
10663 </param>
10664 </method>
10665
10666 <method name="videoModeSupported">
10667 <desc>
10668 Returns whether the frame buffer implementation is willing to
10669 support a given video mode. In case it is not able to render
10670 the video mode (or for some reason not willing), it should
10671 return @c false. Usually this method is called when the guest
10672 asks the VMM device whether a given video mode is supported
10673 so the information returned is directly exposed to the guest.
10674 It is important that this method returns very quickly.
10675 </desc>
10676 <param name="width" type="unsigned long" dir="in"/>
10677 <param name="height" type="unsigned long" dir="in"/>
10678 <param name="bpp" type="unsigned long" dir="in"/>
10679 <param name="supported" type="boolean" dir="return"/>
10680 </method>
10681
10682 <method name="getVisibleRegion">
10683 <desc>
10684 Returns the visible region of this frame buffer.
10685
10686 If the @a rectangles parameter is @c null then the value of the
10687 @a count parameter is ignored and the number of elements necessary to
10688 describe the current visible region is returned in @a countCopied.
10689
10690 If @a rectangles is not @c null but @a count is less
10691 than the required number of elements to store region data, the method
10692 will report a failure. If @a count is equal or greater than the
10693 required number of elements, then the actual number of elements copied
10694 to the provided array will be returned in @a countCopied.
10695
10696 <note>
10697 The address of the provided array must be in the process space of
10698 this IFramebuffer object.
10699 </note>
10700 <note>
10701 Method not yet implemented.
10702 </note>
10703 </desc>
10704 <param name="rectangles" type="octet" mod="ptr" dir="in">
10705 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10706 </param>
10707 <param name="count" type="unsigned long" dir="in">
10708 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10709 </param>
10710 <param name="countCopied" type="unsigned long" dir="return">
10711 <desc>Number of elements copied to the @a rectangles array.</desc>
10712 </param>
10713 </method>
10714
10715 <method name="setVisibleRegion">
10716 <desc>
10717 Suggests a new visible region to this frame buffer. This region
10718 represents the area of the VM display which is a union of regions of
10719 all top-level windows of the guest operating system running inside the
10720 VM (if the Guest Additions for this system support this
10721 functionality). This information may be used by the frontends to
10722 implement the seamless desktop integration feature.
10723
10724 <note>
10725 The address of the provided array must be in the process space of
10726 this IFramebuffer object.
10727 </note>
10728 <note>
10729 The IFramebuffer implementation must make a copy of the provided
10730 array of rectangles.
10731 </note>
10732 <note>
10733 Method not yet implemented.
10734 </note>
10735 </desc>
10736 <param name="rectangles" type="octet" mod="ptr" dir="in">
10737 <desc>Pointer to the @c RTRECT array.</desc>
10738 </param>
10739 <param name="count" type="unsigned long" dir="in">
10740 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10741 </param>
10742 </method>
10743
10744 <method name="processVHWACommand">
10745 <desc>
10746 Posts a Video HW Acceleration Command to the frame buffer for processing.
10747 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10748 are posted from quest to the host to be processed by the host hardware.
10749
10750 <note>
10751 The address of the provided command must be in the process space of
10752 this IFramebuffer object.
10753 </note>
10754 </desc>
10755
10756 <param name="command" type="octet" mod="ptr" dir="in">
10757 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10758 </param>
10759 </method>
10760
10761 </interface>
10762
10763 <interface
10764 name="IFramebufferOverlay" extends="IFramebuffer"
10765 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10766 wsmap="suppress"
10767 >
10768 <desc>
10769 The IFramebufferOverlay interface represents an alpha blended overlay
10770 for displaying status icons above an IFramebuffer. It is always created
10771 not visible, so that it must be explicitly shown. It only covers a
10772 portion of the IFramebuffer, determined by its width, height and
10773 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10774 that order) format, and may be written to directly. Do re-read the
10775 width though, after setting it, as it may be adjusted (increased) to
10776 make it more suitable for the front end.
10777 </desc>
10778 <attribute name="x" type="unsigned long" readonly="yes">
10779 <desc>X position of the overlay, relative to the frame buffer.</desc>
10780 </attribute>
10781
10782 <attribute name="y" type="unsigned long" readonly="yes">
10783 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10784 </attribute>
10785
10786 <attribute name="visible" type="boolean" readonly="no">
10787 <desc>
10788 Whether the overlay is currently visible.
10789 </desc>
10790 </attribute>
10791
10792 <attribute name="alpha" type="unsigned long" readonly="no">
10793 <desc>
10794 The global alpha value for the overlay. This may or may not be
10795 supported by a given front end.
10796 </desc>
10797 </attribute>
10798
10799 <method name="move">
10800 <desc>
10801 Changes the overlay's position relative to the IFramebuffer.
10802 </desc>
10803 <param name="x" type="unsigned long" dir="in"/>
10804 <param name="y" type="unsigned long" dir="in"/>
10805 </method>
10806
10807 </interface>
10808
10809 <interface
10810 name="IDisplay" extends="$unknown"
10811 uuid="09EED313-CD56-4D06-BD56-FAC0F716B5DD"
10812 wsmap="managed"
10813 >
10814 <desc>
10815 The IDisplay interface represents the virtual machine's display.
10816
10817 The object implementing this interface is contained in each
10818 <link to="IConsole::display"/> attribute and represents the visual
10819 output of the virtual machine.
10820
10821 The virtual display supports pluggable output targets represented by the
10822 IFramebuffer interface. Examples of the output target are a window on
10823 the host computer or an RDP session's display on a remote computer.
10824 </desc>
10825 <method name="getScreenResolution">
10826 <desc>Queries display width, height and color depth for given screen.</desc>
10827 <param name="screenId" type="unsigned long" dir="in"/>
10828 <param name="width" type="unsigned long" dir="out"/>
10829 <param name="height" type="unsigned long" dir="out"/>
10830 <param name="bitsPerPixel" type="unsigned long" dir="out"/>
10831 </method>
10832
10833 <method name="setFramebuffer">
10834 <desc>
10835 Sets the framebuffer for given screen.
10836 </desc>
10837 <param name="screenId" type="unsigned long" dir="in"/>
10838 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10839 </method>
10840
10841 <method name="getFramebuffer">
10842 <desc>
10843 Queries the framebuffer for given screen.
10844 </desc>
10845 <param name="screenId" type="unsigned long" dir="in"/>
10846 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10847 <param name="xOrigin" type="long" dir="out"/>
10848 <param name="yOrigin" type="long" dir="out"/>
10849 </method>
10850
10851 <method name="setVideoModeHint">
10852 <desc>
10853 Asks VirtualBox to request the given video mode from
10854 the guest. This is just a hint and it cannot be guaranteed
10855 that the requested resolution will be used. Guest Additions
10856 are required for the request to be seen by guests. The caller
10857 should issue the request and wait for a resolution change and
10858 after a timeout retry.
10859
10860 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10861 parameters means that the corresponding values should be taken from the
10862 current video mode (i.e. left unchanged).
10863
10864 If the guest OS supports multi-monitor configuration then the @a display
10865 parameter specifies the number of the guest display to send the hint to:
10866 @c 0 is the primary display, @c 1 is the first secondary and
10867 so on. If the multi-monitor configuration is not supported, @a display
10868 must be @c 0.
10869
10870 <result name="E_INVALIDARG">
10871 The @a display is not associated with any monitor.
10872 </result>
10873
10874 </desc>
10875 <param name="width" type="unsigned long" dir="in"/>
10876 <param name="height" type="unsigned long" dir="in"/>
10877 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10878 <param name="display" type="unsigned long" dir="in"/>
10879 </method>
10880
10881 <method name="setSeamlessMode">
10882 <desc>
10883 Enables or disables seamless guest display rendering (seamless desktop
10884 integration) mode.
10885 <note>
10886 Calling this method has no effect if <link
10887 to="IGuest::supportsSeamless"/> returns @c false.
10888 </note>
10889 </desc>
10890 <param name="enabled" type="boolean" dir="in"/>
10891 </method>
10892
10893 <method name="takeScreenShot">
10894 <desc>
10895 Takes a screen shot of the requested size and copies it to the
10896 32-bpp buffer allocated by the caller and pointed to by @a address.
10897 A pixel consists of 4 bytes in order: B, G, R, 0.
10898
10899 <note>This API can be used only by the COM/XPCOM C++ API as it
10900 requires pointer support. Use <link to="#takeScreenShotToArray" />
10901 with other language bindings.
10902 </note>
10903
10904 <result name="E_NOTIMPL">
10905 Feature not implemented.
10906 </result>
10907 <result name="VBOX_E_IPRT_ERROR">
10908 Could not take a screenshot.
10909 </result>
10910
10911 </desc>
10912 <param name="screenId" type="unsigned long" dir="in"/>
10913 <param name="address" type="octet" mod="ptr" dir="in"/>
10914 <param name="width" type="unsigned long" dir="in"/>
10915 <param name="height" type="unsigned long" dir="in"/>
10916 </method>
10917
10918 <method name="takeScreenShotToArray">
10919 <desc>
10920 Takes a guest screen shot of the requested size and returns it as
10921 an array of bytes in uncompressed 32-bit RGBA format.
10922 A pixel consists of 4 bytes in order: R, G, B, 0xFF.
10923
10924 This API is slow, but could be the only option to get guest screenshot
10925 for scriptable languages not allowed to manipulate with addresses
10926 directly.
10927
10928 <result name="E_NOTIMPL">
10929 Feature not implemented.
10930 </result>
10931 <result name="VBOX_E_IPRT_ERROR">
10932 Could not take a screenshot.
10933 </result>
10934 </desc>
10935 <param name="screenId" type="unsigned long" dir="in">
10936 <desc>
10937 Monitor to take screenshot from.
10938 </desc>
10939 </param>
10940 <param name="width" type="unsigned long" dir="in">
10941 <desc>
10942 Desired image width.
10943 </desc>
10944 </param>
10945 <param name="height" type="unsigned long" dir="in">
10946 <desc>
10947 Desired image height.
10948 </desc>
10949 </param>
10950 <param name="screenData" type="octet" dir="return" safearray="yes">
10951 <desc>
10952 Array with resulting screen data.
10953 </desc>
10954 </param>
10955 </method>
10956
10957 <method name="takeScreenShotPNGToArray">
10958 <desc>
10959 Takes a guest screen shot of the requested size and returns it as
10960 PNG image in array.
10961
10962 <result name="E_NOTIMPL">
10963 Feature not implemented.
10964 </result>
10965 <result name="VBOX_E_IPRT_ERROR">
10966 Could not take a screenshot.
10967 </result>
10968 </desc>
10969 <param name="screenId" type="unsigned long" dir="in">
10970 <desc>
10971 Monitor to take the screenshot from.
10972 </desc>
10973 </param>
10974 <param name="width" type="unsigned long" dir="in">
10975 <desc>
10976 Desired image width.
10977 </desc>
10978 </param>
10979 <param name="height" type="unsigned long" dir="in">
10980 <desc>
10981 Desired image height.
10982 </desc>
10983 </param>
10984 <param name="screenData" type="octet" dir="return" safearray="yes">
10985 <desc>
10986 Array with resulting screen data.
10987 </desc>
10988 </param>
10989 </method>
10990
10991 <method name="drawToScreen">
10992 <desc>
10993 Draws a 32-bpp image of the specified size from the given buffer
10994 to the given point on the VM display.
10995
10996 <result name="E_NOTIMPL">
10997 Feature not implemented.
10998 </result>
10999 <result name="VBOX_E_IPRT_ERROR">
11000 Could not draw to screen.
11001 </result>
11002
11003 </desc>
11004 <param name="screenId" type="unsigned long" dir="in">
11005 <desc>
11006 Monitor to take the screenshot from.
11007 </desc>
11008 </param>
11009 <param name="address" type="octet" mod="ptr" dir="in">
11010 <desc>
11011 Address to store the screenshot to
11012 </desc>
11013 </param>
11014 <param name="x" type="unsigned long" dir="in">
11015 <desc>
11016 Relative to the screen top left corner.
11017 </desc>
11018 </param>
11019 <param name="y" type="unsigned long" dir="in">
11020 <desc>
11021 Relative to the screen top left corner.
11022 </desc>
11023 </param>
11024 <param name="width" type="unsigned long" dir="in">
11025 <desc>
11026 Desired image width.
11027 </desc>
11028 </param>
11029 <param name="height" type="unsigned long" dir="in">
11030 <desc>
11031 Desired image height.
11032 </desc>
11033 </param>
11034 </method>
11035
11036 <method name="invalidateAndUpdate">
11037 <desc>
11038 Does a full invalidation of the VM display and instructs the VM
11039 to update it.
11040
11041 <result name="VBOX_E_IPRT_ERROR">
11042 Could not invalidate and update screen.
11043 </result>
11044
11045 </desc>
11046 </method>
11047
11048 <method name="resizeCompleted">
11049 <desc>
11050 Signals that a framebuffer has completed the resize operation.
11051
11052 <result name="VBOX_E_NOT_SUPPORTED">
11053 Operation only valid for external frame buffers.
11054 </result>
11055
11056 </desc>
11057 <param name="screenId" type="unsigned long" dir="in"/>
11058 </method>
11059
11060 <method name="completeVHWACommand">
11061 <desc>
11062 Signals that the Video HW Acceleration command has completed.
11063 </desc>
11064
11065 <param name="command" type="octet" mod="ptr" dir="in">
11066 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
11067 </param>
11068 </method>
11069
11070 </interface>
11071
11072 <!--
11073 // INetworkAdapter
11074 /////////////////////////////////////////////////////////////////////////
11075 -->
11076
11077 <enum
11078 name="NetworkAttachmentType"
11079 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
11080 >
11081 <desc>
11082 Network attachment type.
11083 </desc>
11084
11085 <const name="Null" value="0">
11086 <desc>Null value, also means "not attached".</desc>
11087 </const>
11088 <const name="NAT" value="1"/>
11089 <const name="Bridged" value="2"/>
11090 <const name="Internal" value="3"/>
11091 <const name="HostOnly" value="4"/>
11092 <const name="VDE" value="5"/>
11093 </enum>
11094
11095 <enum
11096 name="NetworkAdapterType"
11097 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
11098 >
11099 <desc>
11100 Network adapter type.
11101 </desc>
11102
11103 <const name="Null" value="0">
11104 <desc>Null value (never used by the API).</desc>
11105 </const>
11106 <const name="Am79C970A" value="1">
11107 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
11108 </const>
11109 <const name="Am79C973" value="2">
11110 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
11111 </const>
11112 <const name="I82540EM" value="3">
11113 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
11114 </const>
11115 <const name="I82543GC" value="4">
11116 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
11117 </const>
11118 <const name="I82545EM" value="5">
11119 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
11120 </const>
11121 <const name="Virtio" value="6">
11122 <desc>Virtio network device.</desc>
11123 </const>
11124 </enum>
11125
11126 <interface
11127 name="INetworkAdapter" extends="$unknown"
11128 uuid="9bf58a46-c3f7-4f31-80fa-dde9a5dc0b7b"
11129 wsmap="managed"
11130 >
11131 <desc>
11132 Represents a virtual network adapter that is attached to a virtual machine.
11133 Each virtual machine has a fixed number of network adapter slots with one
11134 instance of this attached to each of them. Call
11135 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
11136 is attached to a given slot in a given machine.
11137
11138 Each network adapter can be in one of five attachment modes, which are
11139 represented by the <link to="NetworkAttachmentType" /> enumeration;
11140 see the <link to="#attachmentType" /> attribute.
11141 </desc>
11142
11143 <attribute name="adapterType" type="NetworkAdapterType">
11144 <desc>
11145 Type of the virtual network adapter. Depending on this value,
11146 VirtualBox will provide a different virtual network hardware
11147 to the guest.
11148 </desc>
11149 </attribute>
11150
11151 <attribute name="slot" type="unsigned long" readonly="yes">
11152 <desc>
11153 Slot number this adapter is plugged into. Corresponds to
11154 the value you pass to <link to="IMachine::getNetworkAdapter"/>
11155 to obtain this instance.
11156 </desc>
11157 </attribute>
11158
11159 <attribute name="enabled" type="boolean">
11160 <desc>
11161 Flag whether the network adapter is present in the
11162 guest system. If disabled, the virtual guest hardware will
11163 not contain this network adapter. Can only be changed when
11164 the VM is not running.
11165 </desc>
11166 </attribute>
11167
11168 <attribute name="MACAddress" type="wstring">
11169 <desc>
11170 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
11171 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
11172 </desc>
11173 </attribute>
11174
11175 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
11176
11177 <attribute name="hostInterface" type="wstring">
11178 <desc>
11179 Name of the host network interface the VM is attached to.
11180 </desc>
11181 </attribute>
11182
11183 <attribute name="internalNetwork" type="wstring">
11184 <desc>
11185 Name of the internal network the VM is attached to.
11186 </desc>
11187 </attribute>
11188
11189 <attribute name="NATNetwork" type="wstring">
11190 <desc>
11191 Name of the NAT network the VM is attached to.
11192 </desc>
11193 </attribute>
11194
11195 <attribute name="VDENetwork" type="wstring">
11196 <desc>
11197 Name of the VDE switch the VM is attached to.
11198 </desc>
11199 </attribute>
11200
11201 <attribute name="cableConnected" type="boolean">
11202 <desc>
11203 Flag whether the adapter reports the cable as connected or not.
11204 It can be used to report offline situations to a VM.
11205 </desc>
11206 </attribute>
11207
11208 <attribute name="lineSpeed" type="unsigned long">
11209 <desc>
11210 Line speed reported by custom drivers, in units of 1 kbps.
11211 </desc>
11212 </attribute>
11213
11214 <attribute name="traceEnabled" type="boolean">
11215 <desc>
11216 Flag whether network traffic from/to the network card should be traced.
11217 Can only be toggled when the VM is turned off.
11218 </desc>
11219 </attribute>
11220
11221 <attribute name="traceFile" type="wstring">
11222 <desc>
11223 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11224 will be used.
11225 </desc>
11226 </attribute>
11227
11228 <attribute name="natDriver" type="INATEngine" readonly="yes">
11229 <desc>
11230 Points to the NAT engine which handles the network address translation
11231 for this interface. This is active only when the interface actually uses
11232 NAT (see <link to="#attachToNAT" />).
11233 </desc>
11234 </attribute>
11235
11236 <attribute name="bootPriority" type="unsigned long">
11237 <desc>
11238 Network boot priority of the adapter. Priority 1 is highest. If not set,
11239 the priority is considered to be at the lowest possible setting.
11240 </desc>
11241 </attribute>
11242
11243 <attribute name="bandwidthLimit" type="unsigned long">
11244 <desc>
11245 Maximum throughput allowed for this network adapter, in units of 1 mbps.
11246 A zero value means uncapped/unlimited.
11247 </desc>
11248 </attribute>
11249
11250 <method name="attachToNAT">
11251 <desc>
11252 Attach the network adapter to the Network Address Translation (NAT) interface.
11253 </desc>
11254 </method>
11255
11256 <method name="attachToBridgedInterface">
11257 <desc>
11258 Attach the network adapter to a bridged host interface.
11259 </desc>
11260 </method>
11261
11262 <method name="attachToInternalNetwork">
11263 <desc>
11264 Attach the network adapter to an internal network.
11265 </desc>
11266 </method>
11267
11268 <method name="attachToHostOnlyInterface">
11269 <desc>
11270 Attach the network adapter to the host-only network.
11271 </desc>
11272 </method>
11273
11274 <method name="attachToVDE">
11275 <desc>
11276 Attach the network adapter to a VDE network.
11277 </desc>
11278 </method>
11279
11280 <method name="detach">
11281 <desc>
11282 Detach the network adapter
11283 </desc>
11284 </method>
11285 </interface>
11286
11287
11288 <!--
11289 // ISerialPort
11290 /////////////////////////////////////////////////////////////////////////
11291 -->
11292
11293 <enum
11294 name="PortMode"
11295 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11296 >
11297 <desc>
11298 The PortMode enumeration represents possible communication modes for
11299 the virtual serial port device.
11300 </desc>
11301
11302 <const name="Disconnected" value="0">
11303 <desc>Virtual device is not attached to any real host device.</desc>
11304 </const>
11305 <const name="HostPipe" value="1">
11306 <desc>Virtual device is attached to a host pipe.</desc>
11307 </const>
11308 <const name="HostDevice" value="2">
11309 <desc>Virtual device is attached to a host device.</desc>
11310 </const>
11311 <const name="RawFile" value="3">
11312 <desc>Virtual device is attached to a raw file.</desc>
11313 </const>
11314 </enum>
11315
11316 <interface
11317 name="ISerialPort" extends="$unknown"
11318 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11319 wsmap="managed"
11320 >
11321
11322 <desc>
11323 The ISerialPort interface represents the virtual serial port device.
11324
11325 The virtual serial port device acts like an ordinary serial port
11326 inside the virtual machine. This device communicates to the real
11327 serial port hardware in one of two modes: host pipe or host device.
11328
11329 In host pipe mode, the #path attribute specifies the path to the pipe on
11330 the host computer that represents a serial port. The #server attribute
11331 determines if this pipe is created by the virtual machine process at
11332 machine startup or it must already exist before starting machine
11333 execution.
11334
11335 In host device mode, the #path attribute specifies the name of the
11336 serial port device on the host computer.
11337
11338 There is also a third communication mode: the disconnected mode. In this
11339 mode, the guest OS running inside the virtual machine will be able to
11340 detect the serial port, but all port write operations will be discarded
11341 and all port read operations will return no data.
11342
11343 <see>IMachine::getSerialPort</see>
11344 </desc>
11345
11346 <attribute name="slot" type="unsigned long" readonly="yes">
11347 <desc>
11348 Slot number this serial port is plugged into. Corresponds to
11349 the value you pass to <link to="IMachine::getSerialPort"/>
11350 to obtain this instance.
11351 </desc>
11352 </attribute>
11353
11354 <attribute name="enabled" type="boolean">
11355 <desc>
11356 Flag whether the serial port is enabled. If disabled,
11357 the serial port will not be reported to the guest OS.
11358 </desc>
11359 </attribute>
11360
11361 <attribute name="IOBase" type="unsigned long">
11362 <desc>Base I/O address of the serial port.</desc>
11363 </attribute>
11364
11365 <attribute name="IRQ" type="unsigned long">
11366 <desc>IRQ number of the serial port.</desc>
11367 </attribute>
11368
11369 <attribute name="hostMode" type="PortMode">
11370 <desc>
11371 How is this port connected to the host.
11372 <note>
11373 Changing this attribute may fail if the conditions for
11374 <link to="#path"/> are not met.
11375 </note>
11376 </desc>
11377 </attribute>
11378
11379 <attribute name="server" type="boolean">
11380 <desc>
11381 Flag whether this serial port acts as a server (creates a new pipe on
11382 the host) or as a client (uses the existing pipe). This attribute is
11383 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11384 </desc>
11385 </attribute>
11386
11387 <attribute name="path" type="wstring">
11388 <desc>
11389 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11390 PortMode_HostPipe, or the host serial device name when
11391 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11392 cases, setting a @c null or empty string as the attribute's value
11393 is an error. Otherwise, the value of this property is ignored.
11394 </desc>
11395 </attribute>
11396
11397 </interface>
11398
11399 <!--
11400 // IParallelPort
11401 /////////////////////////////////////////////////////////////////////////
11402 -->
11403
11404 <interface
11405 name="IParallelPort" extends="$unknown"
11406 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11407 wsmap="managed"
11408 >
11409
11410 <desc>
11411 The IParallelPort interface represents the virtual parallel port device.
11412
11413 The virtual parallel port device acts like an ordinary parallel port
11414 inside the virtual machine. This device communicates to the real
11415 parallel port hardware using the name of the parallel device on the host
11416 computer specified in the #path attribute.
11417
11418 Each virtual parallel port device is assigned a base I/O address and an
11419 IRQ number that will be reported to the guest operating system and used
11420 to operate the given parallel port from within the virtual machine.
11421
11422 <see>IMachine::getParallelPort</see>
11423 </desc>
11424
11425 <attribute name="slot" type="unsigned long" readonly="yes">
11426 <desc>
11427 Slot number this parallel port is plugged into. Corresponds to
11428 the value you pass to <link to="IMachine::getParallelPort"/>
11429 to obtain this instance.
11430 </desc>
11431 </attribute>
11432
11433 <attribute name="enabled" type="boolean">
11434 <desc>
11435 Flag whether the parallel port is enabled. If disabled,
11436 the parallel port will not be reported to the guest OS.
11437 </desc>
11438 </attribute>
11439
11440 <attribute name="IOBase" type="unsigned long">
11441 <desc>Base I/O address of the parallel port.</desc>
11442 </attribute>
11443
11444 <attribute name="IRQ" type="unsigned long">
11445 <desc>IRQ number of the parallel port.</desc>
11446 </attribute>
11447
11448 <attribute name="path" type="wstring">
11449 <desc>
11450 Host parallel device name. If this parallel port is enabled, setting a
11451 @c null or an empty string as this attribute's value will result into
11452 an error.
11453 </desc>
11454 </attribute>
11455
11456 </interface>
11457
11458
11459 <!--
11460 // IMachineDebugger
11461 /////////////////////////////////////////////////////////////////////////
11462 -->
11463
11464 <interface
11465 name="IMachineDebugger" extends="$unknown"
11466 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11467 wsmap="suppress"
11468 >
11469 <method name="resetStats">
11470 <desc>
11471 Reset VM statistics.
11472 </desc>
11473 <param name="pattern" type="wstring" dir="in">
11474 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11475 </param>
11476 </method>
11477
11478 <method name="dumpStats">
11479 <desc>
11480 Dumps VM statistics.
11481 </desc>
11482 <param name="pattern" type="wstring" dir="in">
11483 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11484 </param>
11485 </method>
11486
11487 <method name="getStats">
11488 <desc>
11489 Get the VM statistics in a XMLish format.
11490 </desc>
11491 <param name="pattern" type="wstring" dir="in">
11492 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11493 </param>
11494 <param name="withDescriptions" type="boolean" dir="in">
11495 <desc>Whether to include the descriptions.</desc>
11496 </param>
11497 <param name="stats" type="wstring" dir="out">
11498 <desc>The XML document containing the statistics.</desc>
11499 </param>
11500 </method>
11501
11502 <method name="injectNMI">
11503 <desc>
11504 Inject an NMI into a running VT-x/AMD-V VM.
11505 </desc>
11506 </method>
11507
11508 <attribute name="singlestep" type="boolean">
11509 <desc>Switch for enabling singlestepping.</desc>
11510 </attribute>
11511
11512 <attribute name="recompileUser" type="boolean">
11513 <desc>Switch for forcing code recompilation for user mode code.</desc>
11514 </attribute>
11515
11516 <attribute name="recompileSupervisor" type="boolean">
11517 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11518 </attribute>
11519
11520 <attribute name="PATMEnabled" type="boolean">
11521 <desc>Switch for enabling and disabling the PATM component.</desc>
11522 </attribute>
11523
11524 <attribute name="CSAMEnabled" type="boolean">
11525 <desc>Switch for enabling and disabling the CSAM component.</desc>
11526 </attribute>
11527
11528 <attribute name="logEnabled" type="boolean">
11529 <desc>Switch for enabling and disabling logging.</desc>
11530 </attribute>
11531
11532 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11533 <desc>
11534 Flag indicating whether the VM is currently making use of CPU hardware
11535 virtualization extensions.
11536 </desc>
11537 </attribute>
11538
11539 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11540 <desc>
11541 Flag indicating whether the VM is currently making use of the nested paging
11542 CPU hardware virtualization extension.
11543 </desc>
11544 </attribute>
11545
11546 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11547 <desc>
11548 Flag indicating whether the VM is currently making use of the VPID
11549 VT-x extension.
11550 </desc>
11551 </attribute>
11552
11553 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11554 <desc>
11555 Flag indicating whether the VM is currently making use of the Physical
11556 Address Extension CPU feature.
11557 </desc>
11558 </attribute>
11559
11560 <attribute name="virtualTimeRate" type="unsigned long">
11561 <desc>
11562 The rate at which the virtual time runs expressed as a percentage.
11563 The accepted range is 2% to 20000%.
11564 </desc>
11565 </attribute>
11566
11567 <!-- @todo method for setting log flags, groups and destination! -->
11568
11569 <attribute name="VM" type="long long" readonly="yes">
11570 <desc>
11571 Gets the VM handle. This is only for internal use while
11572 we carve the details of this interface.
11573 </desc>
11574 </attribute>
11575
11576 </interface>
11577
11578 <!--
11579 // IUSBController
11580 /////////////////////////////////////////////////////////////////////////
11581 -->
11582
11583 <interface
11584 name="IUSBController" extends="$unknown"
11585 uuid="6fdcccc5-abd3-4fec-9387-2ad3914fc4a8"
11586 wsmap="managed"
11587 >
11588 <attribute name="enabled" type="boolean">
11589 <desc>
11590 Flag whether the USB controller is present in the
11591 guest system. If disabled, the virtual guest hardware will
11592 not contain any USB controller. Can only be changed when
11593 the VM is powered off.
11594 </desc>
11595 </attribute>
11596
11597 <attribute name="enabledEhci" type="boolean">
11598 <desc>
11599 Flag whether the USB EHCI controller is present in the
11600 guest system. If disabled, the virtual guest hardware will
11601 not contain a USB EHCI controller. Can only be changed when
11602 the VM is powered off.
11603 </desc>
11604 </attribute>
11605
11606 <attribute name="proxyAvailable" type="boolean" readonly="yes">
11607 <desc>
11608 Flag whether there is an USB proxy available.
11609 </desc>
11610 </attribute>
11611
11612 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11613 <desc>
11614 USB standard version which the controller implements.
11615 This is a BCD which means that the major version is in the
11616 high byte and minor version is in the low byte.
11617 </desc>
11618 </attribute>
11619
11620 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11621 <desc>
11622 List of USB device filters associated with the machine.
11623
11624 If the machine is currently running, these filters are activated
11625 every time a new (supported) USB device is attached to the host
11626 computer that was not ignored by global filters
11627 (<link to="IHost::USBDeviceFilters"/>).
11628
11629 These filters are also activated when the machine is powered up.
11630 They are run against a list of all currently available USB
11631 devices (in states
11632 <link to="USBDeviceState_Available"/>,
11633 <link to="USBDeviceState_Busy"/>,
11634 <link to="USBDeviceState_Held"/>) that were not previously
11635 ignored by global filters.
11636
11637 If at least one filter matches the USB device in question, this
11638 device is automatically captured (attached to) the virtual USB
11639 controller of this machine.
11640
11641 <see>IUSBDeviceFilter, ::IUSBController</see>
11642 </desc>
11643 </attribute>
11644
11645 <method name="createDeviceFilter">
11646 <desc>
11647 Creates a new USB device filter. All attributes except
11648 the filter name are set to empty (any match),
11649 <i>active</i> is @c false (the filter is not active).
11650
11651 The created filter can then be added to the list of filters using
11652 <link to="#insertDeviceFilter"/>.
11653
11654 <result name="VBOX_E_INVALID_VM_STATE">
11655 The virtual machine is not mutable.
11656 </result>
11657
11658 <see>#deviceFilters</see>
11659 </desc>
11660 <param name="name" type="wstring" dir="in">
11661 <desc>
11662 Filter name. See <link to="IUSBDeviceFilter::name"/>
11663 for more info.
11664 </desc>
11665 </param>
11666 <param name="filter" type="IUSBDeviceFilter" dir="return">
11667 <desc>Created filter object.</desc>
11668 </param>
11669 </method>
11670
11671 <method name="insertDeviceFilter">
11672 <desc>
11673 Inserts the given USB device to the specified position
11674 in the list of filters.
11675
11676 Positions are numbered starting from <tt>0</tt>. If the specified
11677 position is equal to or greater than the number of elements in
11678 the list, the filter is added to the end of the collection.
11679
11680 <note>
11681 Duplicates are not allowed, so an attempt to insert a
11682 filter that is already in the collection, will return an
11683 error.
11684 </note>
11685
11686 <result name="VBOX_E_INVALID_VM_STATE">
11687 Virtual machine is not mutable.
11688 </result>
11689 <result name="E_INVALIDARG">
11690 USB device filter not created within this VirtualBox instance.
11691 </result>
11692 <result name="VBOX_E_INVALID_OBJECT_STATE">
11693 USB device filter already in list.
11694 </result>
11695
11696 <see>#deviceFilters</see>
11697 </desc>
11698 <param name="position" type="unsigned long" dir="in">
11699 <desc>Position to insert the filter to.</desc>
11700 </param>
11701 <param name="filter" type="IUSBDeviceFilter" dir="in">
11702 <desc>USB device filter to insert.</desc>
11703 </param>
11704 </method>
11705
11706 <method name="removeDeviceFilter">
11707 <desc>
11708 Removes a USB device filter from the specified position in the
11709 list of filters.
11710
11711 Positions are numbered starting from <tt>0</tt>. Specifying a
11712 position equal to or greater than the number of elements in
11713 the list will produce an error.
11714
11715 <see>#deviceFilters</see>
11716
11717 <result name="VBOX_E_INVALID_VM_STATE">
11718 Virtual machine is not mutable.
11719 </result>
11720 <result name="E_INVALIDARG">
11721 USB device filter list empty or invalid @a position.
11722 </result>
11723
11724 </desc>
11725 <param name="position" type="unsigned long" dir="in">
11726 <desc>Position to remove the filter from.</desc>
11727 </param>
11728 <param name="filter" type="IUSBDeviceFilter" dir="return">
11729 <desc>Removed USB device filter.</desc>
11730 </param>
11731 </method>
11732
11733 </interface>
11734
11735
11736 <!--
11737 // IUSBDevice
11738 /////////////////////////////////////////////////////////////////////////
11739 -->
11740
11741 <interface
11742 name="IUSBDevice" extends="$unknown"
11743 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11744 wsmap="managed"
11745 >
11746 <desc>
11747 The IUSBDevice interface represents a virtual USB device attached to the
11748 virtual machine.
11749
11750 A collection of objects implementing this interface is stored in the
11751 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11752 attached to a running virtual machine's USB controller.
11753 </desc>
11754
11755 <attribute name="id" type="uuid" mod="string" readonly="yes">
11756 <desc>
11757 Unique USB device ID. This ID is built from #vendorId,
11758 #productId, #revision and #serialNumber.
11759 </desc>
11760 </attribute>
11761
11762 <attribute name="vendorId" type="unsigned short" readonly="yes">
11763 <desc>Vendor ID.</desc>
11764 </attribute>
11765
11766 <attribute name="productId" type="unsigned short" readonly="yes">
11767 <desc>Product ID.</desc>
11768 </attribute>
11769
11770 <attribute name="revision" type="unsigned short" readonly="yes">
11771 <desc>
11772 Product revision number. This is a packed BCD represented as
11773 unsigned short. The high byte is the integer part and the low
11774 byte is the decimal.
11775 </desc>
11776 </attribute>
11777
11778 <attribute name="manufacturer" type="wstring" readonly="yes">
11779 <desc>Manufacturer string.</desc>
11780 </attribute>
11781
11782 <attribute name="product" type="wstring" readonly="yes">
11783 <desc>Product string.</desc>
11784 </attribute>
11785
11786 <attribute name="serialNumber" type="wstring" readonly="yes">
11787 <desc>Serial number string.</desc>
11788 </attribute>
11789
11790 <attribute name="address" type="wstring" readonly="yes">
11791 <desc>Host specific address of the device.</desc>
11792 </attribute>
11793
11794 <attribute name="port" type="unsigned short" readonly="yes">
11795 <desc>
11796 Host USB port number the device is physically
11797 connected to.
11798 </desc>
11799 </attribute>
11800
11801 <attribute name="version" type="unsigned short" readonly="yes">
11802 <desc>
11803 The major USB version of the device - 1 or 2.
11804 </desc>
11805 </attribute>
11806
11807 <attribute name="portVersion" type="unsigned short" readonly="yes">
11808 <desc>
11809 The major USB version of the host USB port the device is
11810 physically connected to - 1 or 2. For devices not connected to
11811 anything this will have the same value as the version attribute.
11812 </desc>
11813 </attribute>
11814
11815 <attribute name="remote" type="boolean" readonly="yes">
11816 <desc>
11817 Whether the device is physically connected to a remote VRDP
11818 client or to a local host machine.
11819 </desc>
11820 </attribute>
11821
11822 </interface>
11823
11824
11825 <!--
11826 // IUSBDeviceFilter
11827 /////////////////////////////////////////////////////////////////////////
11828 -->
11829
11830 <interface
11831 name="IUSBDeviceFilter" extends="$unknown"
11832 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11833 wsmap="managed"
11834 >
11835 <desc>
11836 The IUSBDeviceFilter interface represents an USB device filter used
11837 to perform actions on a group of USB devices.
11838
11839 This type of filters is used by running virtual machines to
11840 automatically capture selected USB devices once they are physically
11841 attached to the host computer.
11842
11843 A USB device is matched to the given device filter if and only if all
11844 attributes of the device match the corresponding attributes of the
11845 filter (that is, attributes are joined together using the logical AND
11846 operation). On the other hand, all together, filters in the list of
11847 filters carry the semantics of the logical OR operation. So if it is
11848 desirable to create a match like "this vendor id OR this product id",
11849 one needs to create two filters and specify "any match" (see below)
11850 for unused attributes.
11851
11852 All filter attributes used for matching are strings. Each string
11853 is an expression representing a set of values of the corresponding
11854 device attribute, that will match the given filter. Currently, the
11855 following filtering expressions are supported:
11856
11857 <ul>
11858 <li><i>Interval filters</i>. Used to specify valid intervals for
11859 integer device attributes (Vendor ID, Product ID and Revision).
11860 The format of the string is:
11861
11862 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11863
11864 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11865 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11866 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11867 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11868 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11869 possible integer is assumed.
11870 </li>
11871 <li><i>Boolean filters</i>. Used to specify acceptable values for
11872 boolean device attributes. The format of the string is:
11873
11874 <tt>true|false|yes|no|0|1</tt>
11875
11876 </li>
11877 <li><i>Exact match</i>. Used to specify a single value for the given
11878 device attribute. Any string that doesn't start with <tt>int:</tt>
11879 represents the exact match. String device attributes are compared to
11880 this string including case of symbols. Integer attributes are first
11881 converted to a string (see individual filter attributes) and then
11882 compared ignoring case.
11883
11884 </li>
11885 <li><i>Any match</i>. Any value of the corresponding device attribute
11886 will match the given filter. An empty or @c null string is
11887 used to construct this type of filtering expressions.
11888
11889 </li>
11890 </ul>
11891
11892 <note>
11893 On the Windows host platform, interval filters are not currently
11894 available. Also all string filter attributes
11895 (<link to="#manufacturer"/>, <link to="#product"/>,
11896 <link to="#serialNumber"/>) are ignored, so they behave as
11897 <i>any match</i> no matter what string expression is specified.
11898 </note>
11899
11900 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11901 </desc>
11902
11903 <attribute name="name" type="wstring">
11904 <desc>
11905 Visible name for this filter.
11906 This name is used to visually distinguish one filter from another,
11907 so it can neither be @c null nor an empty string.
11908 </desc>
11909 </attribute>
11910
11911 <attribute name="active" type="boolean">
11912 <desc>Whether this filter active or has been temporarily disabled.</desc>
11913 </attribute>
11914
11915 <attribute name="vendorId" type="wstring">
11916 <desc>
11917 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11918 The string representation for the <i>exact matching</i>
11919 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11920 (including leading zeroes).
11921 </desc>
11922 </attribute>
11923
11924 <attribute name="productId" type="wstring">
11925 <desc>
11926 <link to="IUSBDevice::productId">Product ID</link> filter.
11927 The string representation for the <i>exact matching</i>
11928 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11929 (including leading zeroes).
11930 </desc>
11931 </attribute>
11932
11933 <attribute name="revision" type="wstring">
11934 <desc>
11935 <link to="IUSBDevice::productId">Product revision number</link>
11936 filter. The string representation for the <i>exact matching</i>
11937 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11938 of the integer part of the revision, and <tt>F</tt> is the
11939 decimal digit of its fractional part (including leading and
11940 trailing zeros).
11941 Note that for interval filters, it's best to use the hexadecimal
11942 form, because the revision is stored as a 16 bit packed BCD value;
11943 so the expression <tt>int:0x0100-0x0199</tt> will match any
11944 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11945 </desc>
11946 </attribute>
11947
11948 <attribute name="manufacturer" type="wstring">
11949 <desc>
11950 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11951 </desc>
11952 </attribute>
11953
11954 <attribute name="product" type="wstring">
11955 <desc>
11956 <link to="IUSBDevice::product">Product</link> filter.
11957 </desc>
11958 </attribute>
11959
11960 <attribute name="serialNumber" type="wstring">
11961 <desc>
11962 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11963 </desc>
11964 </attribute>
11965
11966 <attribute name="port" type="wstring">
11967 <desc>
11968 <link to="IUSBDevice::port">Host USB port</link> filter.
11969 </desc>
11970 </attribute>
11971
11972 <attribute name="remote" type="wstring">
11973 <desc>
11974 <link to="IUSBDevice::remote">Remote state</link> filter.
11975 <note>
11976 This filter makes sense only for machine USB filters,
11977 i.e. it is ignored by IHostUSBDeviceFilter objects.
11978 </note>
11979 </desc>
11980 </attribute>
11981
11982 <attribute name="maskedInterfaces" type="unsigned long">
11983 <desc>
11984 This is an advanced option for hiding one or more USB interfaces
11985 from the guest. The value is a bit mask where the bits that are set
11986 means the corresponding USB interface should be hidden, masked off
11987 if you like.
11988 This feature only works on Linux hosts.
11989 </desc>
11990 </attribute>
11991
11992 </interface>
11993
11994
11995 <!--
11996 // IHostUSBDevice
11997 /////////////////////////////////////////////////////////////////////////
11998 -->
11999
12000 <enum
12001 name="USBDeviceState"
12002 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
12003 >
12004 <desc>
12005 USB device state. This enumeration represents all possible states
12006 of the USB device physically attached to the host computer regarding
12007 its state on the host computer and availability to guest computers
12008 (all currently running virtual machines).
12009
12010 Once a supported USB device is attached to the host, global USB
12011 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
12012 either ignore the device, or put it to USBDeviceState_Held state, or do
12013 nothing. Unless the device is ignored by global filters, filters of all
12014 currently running guests (<link to="IUSBController::deviceFilters"/>) are
12015 activated that can put it to USBDeviceState_Captured state.
12016
12017 If the device was ignored by global filters, or didn't match
12018 any filters at all (including guest ones), it is handled by the host
12019 in a normal way. In this case, the device state is determined by
12020 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
12021 or USBDeviceState_Available, depending on the current device usage.
12022
12023 Besides auto-capturing based on filters, the device can be manually
12024 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
12025 state is USBDeviceState_Busy, USBDeviceState_Available or
12026 USBDeviceState_Held.
12027
12028 <note>
12029 Due to differences in USB stack implementations in Linux and Win32,
12030 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
12031 only to the Linux version of the product. This also means that (<link
12032 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
12033 device state is USBDeviceState_Held.
12034 </note>
12035
12036 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
12037 </desc>
12038
12039 <const name="NotSupported" value="0">
12040 <desc>
12041 Not supported by the VirtualBox server, not available to guests.
12042 </desc>
12043 </const>
12044 <const name="Unavailable" value="1">
12045 <desc>
12046 Being used by the host computer exclusively,
12047 not available to guests.
12048 </desc>
12049 </const>
12050 <const name="Busy" value="2">
12051 <desc>
12052 Being used by the host computer, potentially available to guests.
12053 </desc>
12054 </const>
12055 <const name="Available" value="3">
12056 <desc>
12057 Not used by the host computer, available to guests (the host computer
12058 can also start using the device at any time).
12059 </desc>
12060 </const>
12061 <const name="Held" value="4">
12062 <desc>
12063 Held by the VirtualBox server (ignored by the host computer),
12064 available to guests.
12065 </desc>
12066 </const>
12067 <const name="Captured" value="5">
12068 <desc>
12069 Captured by one of the guest computers, not available
12070 to anybody else.
12071 </desc>
12072 </const>
12073 </enum>
12074
12075 <interface
12076 name="IHostUSBDevice" extends="IUSBDevice"
12077 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
12078 wsmap="managed"
12079 >
12080 <desc>
12081 The IHostUSBDevice interface represents a physical USB device attached
12082 to the host computer.
12083
12084 Besides properties inherited from IUSBDevice, this interface adds the
12085 <link to="#state"/> property that holds the current state of the USB
12086 device.
12087
12088 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
12089 </desc>
12090
12091 <attribute name="state" type="USBDeviceState" readonly="yes">
12092 <desc>
12093 Current state of the device.
12094 </desc>
12095 </attribute>
12096
12097 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
12098
12099 </interface>
12100
12101
12102 <!--
12103 // IHostUSBDeviceFilter
12104 /////////////////////////////////////////////////////////////////////////
12105 -->
12106
12107 <enum
12108 name="USBDeviceFilterAction"
12109 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
12110 >
12111 <desc>
12112 Actions for host USB device filters.
12113 <see>IHostUSBDeviceFilter, USBDeviceState</see>
12114 </desc>
12115
12116 <const name="Null" value="0">
12117 <desc>Null value (never used by the API).</desc>
12118 </const>
12119 <const name="Ignore" value="1">
12120 <desc>Ignore the matched USB device.</desc>
12121 </const>
12122 <const name="Hold" value="2">
12123 <desc>Hold the matched USB device.</desc>
12124 </const>
12125 </enum>
12126
12127 <interface
12128 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
12129 uuid="4cc70246-d74a-400f-8222-3900489c0374"
12130 wsmap="managed"
12131 >
12132 <desc>
12133 The IHostUSBDeviceFilter interface represents a global filter for a
12134 physical USB device used by the host computer. Used indirectly in
12135 <link to="IHost::USBDeviceFilters"/>.
12136
12137 Using filters of this type, the host computer determines the initial
12138 state of the USB device after it is physically attached to the
12139 host's USB controller.
12140
12141 <note>
12142 The <link to="IUSBDeviceFilter::remote"/> attribute is ignored by this type of
12143 filters, because it makes sense only for
12144 <link to="IUSBController::deviceFilters">machine USB filters</link>.
12145 </note>
12146
12147 <see>IHost::USBDeviceFilters</see>
12148 </desc>
12149
12150 <attribute name="action" type="USBDeviceFilterAction">
12151 <desc>
12152 Action performed by the host when an attached USB device
12153 matches this filter.
12154 </desc>
12155 </attribute>
12156
12157 </interface>
12158
12159 <!--
12160 // IAudioAdapter
12161 /////////////////////////////////////////////////////////////////////////
12162 -->
12163
12164 <enum
12165 name="AudioDriverType"
12166 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
12167 >
12168 <desc>
12169 Host audio driver type.
12170 </desc>
12171
12172 <const name="Null" value="0">
12173 <desc>Null value, also means "dummy audio driver".</desc>
12174 </const>
12175 <const name="WinMM" value="1">
12176 <desc>Windows multimedia (Windows hosts only).</desc>
12177 </const>
12178 <const name="OSS" value="2">
12179 <desc>Open Sound System (Linux hosts only).</desc>
12180 </const>
12181 <const name="ALSA" value="3">
12182 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
12183 </const>
12184 <const name="DirectSound" value="4">
12185 <desc>DirectSound (Windows hosts only).</desc>
12186 </const>
12187 <const name="CoreAudio" value="5">
12188 <desc>CoreAudio (Mac hosts only).</desc>
12189 </const>
12190 <const name="MMPM" value="6">
12191 <desc>Reserved for historical reasons.</desc>
12192 </const>
12193 <const name="Pulse" value="7">
12194 <desc>PulseAudio (Linux hosts only).</desc>
12195 </const>
12196 <const name="SolAudio" value="8">
12197 <desc>Solaris audio (Solaris hosts only).</desc>
12198 </const>
12199 </enum>
12200
12201 <enum
12202 name="AudioControllerType"
12203 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
12204 >
12205 <desc>
12206 Virtual audio controller type.
12207 </desc>
12208
12209 <const name="AC97" value="0"/>
12210 <const name="SB16" value="1"/>
12211 <const name="HDA" value="2"/>
12212 </enum>
12213
12214 <interface
12215 name="IAudioAdapter" extends="$unknown"
12216 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
12217 wsmap="managed"
12218 >
12219 <desc>
12220 The IAudioAdapter interface represents the virtual audio adapter of
12221 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
12222 </desc>
12223 <attribute name="enabled" type="boolean">
12224 <desc>
12225 Flag whether the audio adapter is present in the
12226 guest system. If disabled, the virtual guest hardware will
12227 not contain any audio adapter. Can only be changed when
12228 the VM is not running.
12229 </desc>
12230 </attribute>
12231 <attribute name="audioController" type="AudioControllerType">
12232 <desc>
12233 The audio hardware we emulate.
12234 </desc>
12235 </attribute>
12236 <attribute name="audioDriver" type="AudioDriverType">
12237 <desc>
12238 Audio driver the adapter is connected to. This setting
12239 can only be changed when the VM is not running.
12240 </desc>
12241 </attribute>
12242 </interface>
12243
12244 <!--
12245 // IVRDPServer
12246 /////////////////////////////////////////////////////////////////////////
12247 -->
12248
12249 <enum
12250 name="VRDPAuthType"
12251 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
12252 >
12253 <desc>
12254 VRDP authentication type.
12255 </desc>
12256
12257 <const name="Null" value="0">
12258 <desc>Null value, also means "no authentication".</desc>
12259 </const>
12260 <const name="External" value="1"/>
12261 <const name="Guest" value="2"/>
12262 </enum>
12263
12264 <interface
12265 name="IVRDPServer" extends="$unknown"
12266 uuid="7aeeb530-0b08-41fe-835d-9be9ec1dbe5c"
12267 wsmap="managed"
12268 >
12269 <attribute name="enabled" type="boolean">
12270 <desc>VRDP server status.</desc>
12271 </attribute>
12272
12273 <attribute name="ports" type="wstring">
12274 <desc>
12275 VRDP server port numbers. The server will try to bind to one of free ports from the list.
12276 <note>
12277 This is a string of comma separated TCP port numbers or port number ranges.
12278 Example <tt>5000,5010-5012,5015</tt>
12279 </note>
12280 </desc>
12281 </attribute>
12282
12283 <attribute name="netAddress" type="wstring">
12284 <desc>VRDP server address.</desc>
12285 </attribute>
12286
12287 <attribute name="authType" type="VRDPAuthType">
12288 <desc>VRDP authentication method.</desc>
12289 </attribute>
12290
12291 <attribute name="authTimeout" type="unsigned long">
12292 <desc>Timeout for guest authentication. Milliseconds.</desc>
12293 </attribute>
12294
12295 <attribute name="allowMultiConnection" type="boolean">
12296 <desc>
12297 Flag whether multiple simultaneous connections to the VM are permitted.
12298 Note that this will be replaced by a more powerful mechanism in the future.
12299 </desc>
12300 </attribute>
12301
12302 <attribute name="reuseSingleConnection" type="boolean">
12303 <desc>
12304 Flag whether the existing connection must be dropped and a new connection
12305 must be established by the VRDP server, when a new client connects in single
12306 connection mode.
12307 </desc>
12308 </attribute>
12309
12310 <attribute name="videoChannel" type="boolean">
12311 <desc>
12312 Flag whether RDP video channel is supported.
12313 </desc>
12314 </attribute>
12315
12316 <attribute name="videoChannelQuality" type="unsigned long">
12317 <desc>
12318 Image quality in percents.
12319 </desc>
12320 </attribute>
12321
12322 </interface>
12323
12324
12325 <!--
12326 // ISharedFolder
12327 /////////////////////////////////////////////////////////////////////////
12328 -->
12329
12330 <interface
12331 name="ISharedFolder" extends="$unknown"
12332 uuid="8388da11-b559-4574-a5b7-2bd7acd5cef8"
12333 wsmap="struct"
12334 >
12335 <desc>
12336 The ISharedFolder interface represents a folder in the host computer's
12337 file system accessible from the guest OS running inside a virtual
12338 machine using an associated logical name.
12339
12340 There are three types of shared folders:
12341 <ul>
12342 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12343 folders available to all virtual machines.</li>
12344 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12345 VM-specific shared folders available to the given virtual machine at
12346 startup.</li>
12347 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12348 VM-specific shared folders created in the session context (for
12349 example, when the virtual machine is running) and automatically
12350 discarded when the session is closed (the VM is powered off).</li>
12351 </ul>
12352
12353 Logical names of shared folders must be unique within the given scope
12354 (global, permanent or transient). However, they do not need to be unique
12355 across scopes. In this case, the definition of the shared folder in a
12356 more specific scope takes precedence over definitions in all other
12357 scopes. The order of precedence is (more specific to more general):
12358 <ol>
12359 <li>Transient definitions</li>
12360 <li>Permanent definitions</li>
12361 <li>Global definitions</li>
12362 </ol>
12363
12364 For example, if MyMachine has a shared folder named
12365 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12366 transient shared folder named <tt>C_DRIVE</tt> (that points
12367 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12368 of <tt>C_DRIVE</tt> in the guest OS so
12369 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12370 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12371 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12372 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12373 to <tt>C:\\</tt> if it still exists.
12374
12375 Note that permanent and transient shared folders of different machines
12376 are in different name spaces, so they don't overlap and don't need to
12377 have unique logical names.
12378
12379 <note>
12380 Global shared folders are not implemented in the current version of the
12381 product.
12382 </note>
12383 </desc>
12384
12385 <attribute name="name" type="wstring" readonly="yes">
12386 <desc>Logical name of the shared folder.</desc>
12387 </attribute>
12388
12389 <attribute name="hostPath" type="wstring" readonly="yes">
12390 <desc>Full path to the shared folder in the host file system.</desc>
12391 </attribute>
12392
12393 <attribute name="accessible" type="boolean" readonly="yes">
12394 <desc>
12395 Whether the folder defined by the host path is currently
12396 accessible or not.
12397 For example, the folder can be unaccessible if it is placed
12398 on the network share that is not available by the time
12399 this property is read.
12400 </desc>
12401 </attribute>
12402
12403 <attribute name="writable" type="boolean" readonly="yes">
12404 <desc>
12405 Whether the folder defined by the host path is writable or
12406 not.
12407 </desc>
12408 </attribute>
12409
12410 <attribute name="autoMount" type="boolean" readonly="yes">
12411 <desc>
12412 Whether the folder gets automatically mounted by the guest or not.
12413 </desc>
12414 </attribute>
12415
12416 <attribute name="lastAccessError" type="wstring" readonly="yes">
12417 <desc>
12418 Text message that represents the result of the last accessibility
12419 check.
12420
12421 Accessibility checks are performed each time the <link to="#accessible"/>
12422 attribute is read. An empty string is returned if the last
12423 accessibility check was successful. A non-empty string indicates a
12424 failure and should normally describe a reason of the failure (for
12425 example, a file read error).
12426 </desc>
12427 </attribute>
12428
12429 </interface>
12430
12431 <!--
12432 // ISession
12433 /////////////////////////////////////////////////////////////////////////
12434 -->
12435
12436 <interface
12437 name="IInternalSessionControl" extends="$unknown"
12438 uuid="0431ef9e-2c2e-42af-87d7-c8f52455f28a"
12439 internal="yes"
12440 wsmap="suppress"
12441 >
12442 <method name="getPID">
12443 <desc>PID of the process that has created this Session object.
12444 </desc>
12445 <param name="pid" type="unsigned long" dir="return"/>
12446 </method>
12447
12448 <method name="getRemoteConsole">
12449 <desc>
12450 Returns the console object suitable for remote control.
12451
12452 <result name="VBOX_E_INVALID_VM_STATE">
12453 Session state prevents operation.
12454 </result>
12455 <result name="VBOX_E_INVALID_OBJECT_STATE">
12456 Session type prevents operation.
12457 </result>
12458
12459 </desc>
12460 <param name="console" type="IConsole" dir="return"/>
12461 </method>
12462
12463 <method name="assignMachine">
12464 <desc>
12465 Assigns the machine object associated with this direct-type
12466 session or informs the session that it will be a remote one
12467 (if @a machine == @c null).
12468
12469 <result name="VBOX_E_INVALID_VM_STATE">
12470 Session state prevents operation.
12471 </result>
12472 <result name="VBOX_E_INVALID_OBJECT_STATE">
12473 Session type prevents operation.
12474 </result>
12475
12476 </desc>
12477 <param name="machine" type="IMachine" dir="in"/>
12478 </method>
12479
12480 <method name="assignRemoteMachine">
12481 <desc>
12482 Assigns the machine and the (remote) console object associated with
12483 this remote-type session.
12484
12485 <result name="VBOX_E_INVALID_VM_STATE">
12486 Session state prevents operation.
12487 </result>
12488
12489 </desc>
12490 <param name="machine" type="IMachine" dir="in"/>
12491 <param name="console" type="IConsole" dir="in"/>
12492 </method>
12493
12494 <method name="updateMachineState">
12495 <desc>
12496 Updates the machine state in the VM process.
12497 Must be called only in certain cases
12498 (see the method implementation).
12499
12500 <result name="VBOX_E_INVALID_VM_STATE">
12501 Session state prevents operation.
12502 </result>
12503 <result name="VBOX_E_INVALID_OBJECT_STATE">
12504 Session type prevents operation.
12505 </result>
12506
12507 </desc>
12508 <param name="aMachineState" type="MachineState" dir="in"/>
12509 </method>
12510
12511 <method name="uninitialize">
12512 <desc>
12513 Uninitializes (closes) this session. Used by VirtualBox to close
12514 the corresponding remote session when the direct session dies
12515 or gets closed.
12516
12517 <result name="VBOX_E_INVALID_VM_STATE">
12518 Session state prevents operation.
12519 </result>
12520
12521 </desc>
12522 </method>
12523
12524 <method name="onNetworkAdapterChange">
12525 <desc>
12526 Triggered when settings of a network adapter of the
12527 associated virtual machine have changed.
12528
12529 <result name="VBOX_E_INVALID_VM_STATE">
12530 Session state prevents operation.
12531 </result>
12532 <result name="VBOX_E_INVALID_OBJECT_STATE">
12533 Session type prevents operation.
12534 </result>
12535
12536 </desc>
12537 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12538 <param name="changeAdapter" type="boolean" dir="in"/>
12539 </method>
12540
12541 <method name="onSerialPortChange">
12542 <desc>
12543 Triggered when settings of a serial port of the
12544 associated virtual machine have changed.
12545
12546 <result name="VBOX_E_INVALID_VM_STATE">
12547 Session state prevents operation.
12548 </result>
12549 <result name="VBOX_E_INVALID_OBJECT_STATE">
12550 Session type prevents operation.
12551 </result>
12552
12553 </desc>
12554 <param name="serialPort" type="ISerialPort" dir="in"/>
12555 </method>
12556
12557 <method name="onParallelPortChange">
12558 <desc>
12559 Triggered when settings of a parallel port of the
12560 associated virtual machine have changed.
12561
12562 <result name="VBOX_E_INVALID_VM_STATE">
12563 Session state prevents operation.
12564 </result>
12565 <result name="VBOX_E_INVALID_OBJECT_STATE">
12566 Session type prevents operation.
12567 </result>
12568
12569 </desc>
12570 <param name="parallelPort" type="IParallelPort" dir="in"/>
12571 </method>
12572
12573 <method name="onStorageControllerChange">
12574 <desc>
12575 Triggered when settings of a storage controller 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="onMediumChange">
12589 <desc>
12590 Triggered when attached media of the
12591 associated virtual machine have changed.
12592
12593 <result name="VBOX_E_INVALID_VM_STATE">
12594 Session state prevents operation.
12595 </result>
12596 <result name="VBOX_E_INVALID_OBJECT_STATE">
12597 Session type prevents operation.
12598 </result>
12599
12600 </desc>
12601
12602 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12603 <param name="force" type="boolean" dir="in"/>
12604 </method>
12605
12606 <method name="onCPUChange">
12607 <desc>
12608 Notification when a CPU changes.
12609 </desc>
12610 <param name="cpu" type="unsigned long" dir="in">
12611 <desc>The CPU which changed</desc>
12612 </param>
12613 <param name="add" type="boolean" dir="in">
12614 <desc>Flag whether the CPU was added or removed</desc>
12615 </param>
12616 </method>
12617
12618 <method name="onCPUExecutionCapChange">
12619 <desc>
12620 Notification when the CPU execution cap changes.
12621 </desc>
12622 <param name="executionCap" type="unsigned long" dir="in">
12623 <desc>The new CPU execution cap value. (1-100)</desc>
12624 </param>
12625 </method>
12626
12627 <method name="onVRDPServerChange">
12628 <desc>
12629 Triggered when settings of the VRDP server object of the
12630 associated virtual machine have changed.
12631
12632 <result name="VBOX_E_INVALID_VM_STATE">
12633 Session state prevents operation.
12634 </result>
12635 <result name="VBOX_E_INVALID_OBJECT_STATE">
12636 Session type prevents operation.
12637 </result>
12638
12639 </desc>
12640 <param name="restart" type="boolean" dir="in">
12641 <desc>Flag whether the server must be restarted</desc>
12642 </param>
12643 </method>
12644
12645 <method name="onUSBControllerChange">
12646 <desc>
12647 Triggered when settings of the USB controller object of the
12648 associated virtual machine have changed.
12649
12650 <result name="VBOX_E_INVALID_VM_STATE">
12651 Session state prevents operation.
12652 </result>
12653 <result name="VBOX_E_INVALID_OBJECT_STATE">
12654 Session type prevents operation.
12655 </result>
12656
12657 </desc>
12658 </method>
12659
12660 <method name="onSharedFolderChange">
12661 <desc>
12662 Triggered when a permanent (global or machine) shared folder has been
12663 created or removed.
12664 <note>
12665 We don't pass shared folder parameters in this notification because
12666 the order in which parallel notifications are delivered is not defined,
12667 therefore it could happen that these parameters were outdated by the
12668 time of processing this notification.
12669 </note>
12670
12671 <result name="VBOX_E_INVALID_VM_STATE">
12672 Session state prevents operation.
12673 </result>
12674 <result name="VBOX_E_INVALID_OBJECT_STATE">
12675 Session type prevents operation.
12676 </result>
12677
12678 </desc>
12679 <param name="global" type="boolean" dir="in"/>
12680 </method>
12681
12682 <method name="onUSBDeviceAttach">
12683 <desc>
12684 Triggered when a request to capture a USB device (as a result
12685 of matched USB filters or direct call to
12686 <link to="IConsole::attachUSBDevice"/>) has completed.
12687 A @c null @a error object means success, otherwise it
12688 describes a failure.
12689
12690 <result name="VBOX_E_INVALID_VM_STATE">
12691 Session state prevents operation.
12692 </result>
12693 <result name="VBOX_E_INVALID_OBJECT_STATE">
12694 Session type prevents operation.
12695 </result>
12696
12697 </desc>
12698 <param name="device" type="IUSBDevice" dir="in"/>
12699 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12700 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12701 </method>
12702
12703 <method name="onUSBDeviceDetach">
12704 <desc>
12705 Triggered when a request to release the USB device (as a result
12706 of machine termination or direct call to
12707 <link to="IConsole::detachUSBDevice"/>) has completed.
12708 A @c null @a error object means success, otherwise it
12709 describes a failure.
12710
12711 <result name="VBOX_E_INVALID_VM_STATE">
12712 Session state prevents operation.
12713 </result>
12714 <result name="VBOX_E_INVALID_OBJECT_STATE">
12715 Session type prevents operation.
12716 </result>
12717
12718 </desc>
12719 <param name="id" type="uuid" mod="string" dir="in"/>
12720 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12721 </method>
12722
12723 <method name="onShowWindow">
12724 <desc>
12725 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12726 <link to="IMachine::showConsoleWindow"/> in order to notify
12727 console listeners
12728 <link to="ICanShowWindowEvent"/>
12729 and <link to="IShowWindowEvent"/>.
12730
12731 <result name="VBOX_E_INVALID_OBJECT_STATE">
12732 Session type prevents operation.
12733 </result>
12734
12735 </desc>
12736 <param name="check" type="boolean" dir="in"/>
12737 <param name="canShow" type="boolean" dir="out"/>
12738 <param name="winId" type="long long" dir="out"/>
12739 </method>
12740
12741 <method name="accessGuestProperty">
12742 <desc>
12743 Called by <link to="IMachine::getGuestProperty"/> and by
12744 <link to="IMachine::setGuestProperty"/> in order to read and
12745 modify guest properties.
12746
12747 <result name="VBOX_E_INVALID_VM_STATE">
12748 Machine session is not open.
12749 </result>
12750 <result name="VBOX_E_INVALID_OBJECT_STATE">
12751 Session type is not direct.
12752 </result>
12753
12754 </desc>
12755 <param name="name" type="wstring" dir="in"/>
12756 <param name="value" type="wstring" dir="in"/>
12757 <param name="flags" type="wstring" dir="in"/>
12758 <param name="isSetter" type="boolean" dir="in"/>
12759 <param name="retValue" type="wstring" dir="out"/>
12760 <param name="retTimestamp" type="long long" dir="out"/>
12761 <param name="retFlags" type="wstring" dir="out"/>
12762 </method>
12763
12764 <method name="enumerateGuestProperties">
12765 <desc>
12766 Return a list of the guest properties matching a set of patterns along
12767 with their values, time stamps and flags.
12768
12769 <result name="VBOX_E_INVALID_VM_STATE">
12770 Machine session is not open.
12771 </result>
12772 <result name="VBOX_E_INVALID_OBJECT_STATE">
12773 Session type is not direct.
12774 </result>
12775
12776 </desc>
12777 <param name="patterns" type="wstring" dir="in">
12778 <desc>
12779 The patterns to match the properties against as a comma-separated
12780 string. If this is empty, all properties currently set will be
12781 returned.
12782 </desc>
12783 </param>
12784 <param name="key" type="wstring" dir="out" safearray="yes">
12785 <desc>
12786 The key names of the properties returned.
12787 </desc>
12788 </param>
12789 <param name="value" type="wstring" dir="out" safearray="yes">
12790 <desc>
12791 The values of the properties returned. The array entries match the
12792 corresponding entries in the @a key array.
12793 </desc>
12794 </param>
12795 <param name="timestamp" type="long long" dir="out" safearray="yes">
12796 <desc>
12797 The time stamps of the properties returned. The array entries match
12798 the corresponding entries in the @a key array.
12799 </desc>
12800 </param>
12801 <param name="flags" type="wstring" dir="out" safearray="yes">
12802 <desc>
12803 The flags of the properties returned. The array entries match the
12804 corresponding entries in the @a key array.
12805 </desc>
12806 </param>
12807 </method>
12808
12809 <method name="onlineMergeMedium">
12810 <desc>
12811 Triggers online merging of a hard disk. Used internally when deleting
12812 a snapshot while a VM referring to the same hard disk chain is running.
12813
12814 <result name="VBOX_E_INVALID_VM_STATE">
12815 Machine session is not open.
12816 </result>
12817 <result name="VBOX_E_INVALID_OBJECT_STATE">
12818 Session type is not direct.
12819 </result>
12820
12821 </desc>
12822 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
12823 <desc>The medium attachment to identify the medium chain.</desc>
12824 </param>
12825 <param name="sourceIdx" type="unsigned long" dir="in">
12826 <desc>The index of the source image in the chain.
12827 Redundant, but drastically reduces IPC.</desc>
12828 </param>
12829 <param name="targetIdx" type="unsigned long" dir="in">
12830 <desc>The index of the target image in the chain.
12831 Redundant, but drastically reduces IPC.</desc>
12832 </param>
12833 <param name="source" type="IMedium" dir="in">
12834 <desc>Merge source medium.</desc>
12835 </param>
12836 <param name="target" type="IMedium" dir="in">
12837 <desc>Merge target medium.</desc>
12838 </param>
12839 <param name="mergeForward" type="boolean" dir="in">
12840 <desc>Merge direction.</desc>
12841 </param>
12842 <param name="parentForTarget" type="IMedium" dir="in">
12843 <desc>For forward merges: new parent for target medium.</desc>
12844 </param>
12845 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
12846 <desc>For backward merges: list of media which need their parent UUID
12847 updated.</desc>
12848 </param>
12849 <param name="progress" type="IProgress" dir="in">
12850 <desc>
12851 Progress object for this operation.
12852 </desc>
12853 </param>
12854 </method>
12855
12856 </interface>
12857
12858 <interface
12859 name="ISession" extends="$unknown"
12860 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12861 wsmap="managed"
12862 >
12863 <desc>
12864 The ISession interface represents a client process and allows for locking
12865 virtual machines (represented by IMachine objects) to prevent conflicting
12866 changes to the machine.
12867
12868 Any caller wishing to manipulate a virtual machine needs to create a session
12869 object first, which lives in its own process space. Such session objects are
12870 then associated with <link to="IMachine" /> objects living in the VirtualBox
12871 server process to coordinate such changes.
12872
12873 There are two typical scenarios in which sessions are used:
12874
12875 <ul>
12876 <li>To alter machine settings or control a running virtual machine, one
12877 needs to lock a machine for a given session (client process) by calling
12878 <link to="IMachine::lockMachine"/>.
12879
12880 Whereas multiple sessions may control a running virtual machine, only
12881 one process can obtain a write lock on the machine to prevent conflicting
12882 changes. A write lock is also needed if a process wants to actually run a
12883 virtual machine in its own context, such as the VirtualBox GUI or
12884 VBoxHeadless front-ends. They must also lock a machine for their own
12885 sessions before they are allowed to power up the virtual machine.
12886
12887 As a result, no machine settings can be altered while another process is
12888 already using it, either because that process is modifying machine settings
12889 or because the machine is running.
12890 </li>
12891 <li>
12892 To start a VM using one of the existing VirtualBox front-ends (e.g. the
12893 VirtualBox GUI or VBoxHeadless), one would use
12894 <link to="IMachine::launchVMProcess"/>, which also takes a session object
12895 as its first parameter. This session then identifies the caller and lets the
12896 caller control the started machine (for example, pause machine execution or
12897 power it down) as well as be notified about machine execution state changes.
12898 </li>
12899 </ul>
12900
12901 How sessions objects are created in a client process depends on whether you use
12902 the Main API via COM or via the webservice:
12903
12904 <ul>
12905 <li>When using the COM API directly, an object of the Session class from the
12906 VirtualBox type library needs to be created. In regular COM C++ client code,
12907 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12908 This object will then act as a local session object in further calls to open
12909 a session.
12910 </li>
12911
12912 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12913 a session object automatically whenever <link to="IWebsessionManager::logon" />
12914 is called. A managed object reference to that session object can be retrieved by
12915 calling <link to="IWebsessionManager::getSessionObject" />.
12916 </li>
12917 </ul>
12918 </desc>
12919
12920 <attribute name="state" type="SessionState" readonly="yes">
12921 <desc>Current state of this session.</desc>
12922 </attribute>
12923
12924 <attribute name="type" type="SessionType" readonly="yes">
12925 <desc>
12926 Type of this session. The value of this attribute is valid only
12927 if the session currently has a machine locked (i.e. its
12928 <link to="#state" /> is Locked), otherwise an error will be returned.
12929 </desc>
12930 </attribute>
12931
12932 <attribute name="machine" type="IMachine" readonly="yes">
12933 <desc>Machine object associated with this session.</desc>
12934 </attribute>
12935
12936 <attribute name="console" type="IConsole" readonly="yes">
12937 <desc>Console object associated with this session.</desc>
12938 </attribute>
12939
12940 <method name="unlockMachine">
12941 <desc>
12942 Unlocks a machine that was previously locked for the current session.
12943
12944 Calling this method is required every time a machine has been locked
12945 for a particular session using the <link to="IMachine::launchVMProcess" />
12946 or <link to="IMachine::lockMachine" /> calls. Otherwise the state of
12947 the machine will be set to <link to="MachineState_Aborted" /> on the
12948 server, and changes made to the machine settings will be lost.
12949
12950 Generally, it is recommended to unlock all machines explicitly
12951 before terminating the application (regardless of the reason for
12952 the termination).
12953
12954 <note>
12955 Do not expect the session state (<link to="ISession::state" />
12956 to return to "Unlocked" immediately after you invoke this method,
12957 particularly if you have started a new VM process. The session
12958 state will automatically return to "Unlocked" once the VM is no
12959 longer executing, which can of course take a very long time.
12960 </note>
12961
12962 <result name="E_UNEXPECTED">
12963 Session is not locked.
12964 </result>
12965
12966 </desc>
12967 </method>
12968
12969 </interface>
12970
12971 <!--
12972 // IStorageController
12973 /////////////////////////////////////////////////////////////////////////
12974 -->
12975
12976 <enum
12977 name="StorageBus"
12978 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
12979 >
12980 <desc>
12981 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy);
12982 see <link to="IStorageController::bus" />.
12983 </desc>
12984 <const name="Null" value="0">
12985 <desc>@c null value. Never used by the API.</desc>
12986 </const>
12987 <const name="IDE" value="1"/>
12988 <const name="SATA" value="2"/>
12989 <const name="SCSI" value="3"/>
12990 <const name="Floppy" value="4"/>
12991 <const name="SAS" value="5"/>
12992 </enum>
12993
12994 <enum
12995 name="StorageControllerType"
12996 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
12997 >
12998 <desc>
12999 The exact variant of storage controller hardware presented
13000 to the guest; see <link to="IStorageController::controllerType" />.
13001 </desc>
13002
13003 <const name="Null" value="0">
13004 <desc>@c null value. Never used by the API.</desc>
13005 </const>
13006 <const name="LsiLogic" value="1">
13007 <desc>A SCSI controller of the LsiLogic variant.</desc>
13008 </const>
13009 <const name="BusLogic" value="2">
13010 <desc>A SCSI controller of the BusLogic variant.</desc>
13011 </const>
13012 <const name="IntelAhci" value="3">
13013 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
13014 </const>
13015 <const name="PIIX3" value="4">
13016 <desc>An IDE controller of the PIIX3 variant.</desc>
13017 </const>
13018 <const name="PIIX4" value="5">
13019 <desc>An IDE controller of the PIIX4 variant.</desc>
13020 </const>
13021 <const name="ICH6" value="6">
13022 <desc>An IDE controller of the ICH6 variant.</desc>
13023 </const>
13024 <const name="I82078" value="7">
13025 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
13026 </const>
13027 <const name="LsiLogicSas" value="8">
13028 <desc>A variant of the LsiLogic controller using SAS.</desc>
13029 </const>
13030 </enum>
13031
13032 <enum
13033 name="ChipsetType"
13034 uuid="8b4096a8-a7c3-4d3b-bbb1-05a0a51ec394"
13035 >
13036 <desc>
13037 Type of emulated chipset (mostly southbridge).
13038 </desc>
13039
13040 <const name="Null" value="0">
13041 <desc>@c null value. Never used by the API.</desc>
13042 </const>
13043 <const name="PIIX3" value="1">
13044 <desc>A PIIX3 (PCI IDE ISA Xcelerator) chipset.</desc>
13045 </const>
13046 <const name="ICH9" value="2">
13047 <desc>A ICH9 (I/O Controller Hub) chipset.</desc>
13048 </const>
13049 </enum>
13050
13051 <interface
13052 name="IStorageController" extends="$unknown"
13053 uuid="fd93adc0-bbaa-4256-9e6e-00e29f9151c9"
13054 wsmap="managed"
13055 >
13056 <desc>
13057 Represents a storage controller that is attached to a virtual machine
13058 (<link to="IMachine" />). Just as drives (hard disks, DVDs, FDs) are
13059 attached to storage controllers in a real computer, virtual drives
13060 (represented by <link to="IMediumAttachment" />) are attached to virtual
13061 storage controllers, represented by this interface.
13062
13063 As opposed to physical hardware, VirtualBox has a very generic concept
13064 of a storage controller, and for purposes of the Main API, all virtual
13065 storage is attached to virtual machines via instances of this interface.
13066 There are five types of such virtual storage controllers: IDE, SCSI, SATA,
13067 SAS and Floppy (see <link to="#bus" />). Depending on which of these four
13068 is used, certain sub-types may be available and can be selected in
13069 <link to="#controllerType" />.
13070
13071 Depending on these settings, the guest operating system might see
13072 significantly different virtual hardware.
13073 </desc>
13074
13075 <attribute name="name" type="wstring" readonly="yes">
13076 <desc>
13077 Name of the storage controller, as originally specified with
13078 <link to="IMachine::addStorageController" />. This then uniquely
13079 identifies this controller with other method calls such as
13080 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
13081 </desc>
13082 </attribute>
13083
13084 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
13085 <desc>
13086 Maximum number of devices which can be attached to one port.
13087 </desc>
13088 </attribute>
13089
13090 <attribute name="minPortCount" type="unsigned long" readonly="yes">
13091 <desc>
13092 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
13093 </desc>
13094 </attribute>
13095
13096 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
13097 <desc>
13098 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
13099 </desc>
13100 </attribute>
13101
13102 <attribute name="instance" type="unsigned long">
13103 <desc>
13104 The instance number of the device in the running VM.
13105 </desc>
13106 </attribute>
13107
13108 <attribute name="portCount" type="unsigned long">
13109 <desc>
13110 The number of currently usable ports on the controller.
13111 The minimum and maximum number of ports for one controller are
13112 stored in <link to="IStorageController::minPortCount"/>
13113 and <link to="IStorageController::maxPortCount"/>.
13114 </desc>
13115 </attribute>
13116
13117 <attribute name="bus" type="StorageBus" readonly="yes">
13118 <desc>
13119 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy).
13120 </desc>
13121 </attribute>
13122
13123 <attribute name="controllerType" type="StorageControllerType">
13124 <desc>
13125 The exact variant of storage controller hardware presented
13126 to the guest.
13127 Depending on this value, VirtualBox will provide a different
13128 virtual storage controller hardware to the guest.
13129 For SATA, SAS and floppy controllers, only one variant is
13130 available, but for IDE and SCSI, there are several.
13131
13132 For SCSI controllers, the default type is LsiLogic.
13133 </desc>
13134 </attribute>
13135
13136 <attribute name="useHostIOCache" type="boolean">
13137 <desc>
13138 If true, the storage controller emulation will use a dedicated I/O thread, enable the host I/O
13139 caches and use synchronous file APIs on the host. This was the only option in the API before
13140 VirtualBox 3.2 and is still the default for IDE controllers.
13141
13142 If false, the host I/O cache will be disabled for image files attached to this storage controller.
13143 Instead, the storage controller emulation will use asynchronous I/O APIs on the host. This makes
13144 it possible to turn off the host I/O caches because the emulation can handle unaligned access to
13145 the file. This should be used on OS X and Linux hosts if a high I/O load is expected or many
13146 virtual machines are running at the same time to prevent I/O cache related hangs.
13147 This option new with the API of VirtualBox 3.2 and is now the default for non-IDE storage controllers.
13148 </desc>
13149 </attribute>
13150
13151 <method name="getIDEEmulationPort">
13152 <desc>
13153 Gets the corresponding port number which is emulated as an IDE device.
13154 Works only with SATA controllers.
13155
13156 <result name="E_INVALIDARG">
13157 The @a devicePosition is not in the range 0 to 3.
13158 </result>
13159 <result name="E_NOTIMPL">
13160 The storage controller type is not SATAIntelAhci.
13161 </result>
13162
13163 </desc>
13164 <param name="devicePosition" type="long" dir="in"/>
13165 <param name="portNumber" type="long" dir="return"/>
13166 </method>
13167
13168 <method name="setIDEEmulationPort">
13169 <desc>
13170 Sets the port number which is emulated as an IDE device.
13171 Works only with SATA controllers.
13172
13173 <result name="E_INVALIDARG">
13174 The @a devicePosition is not in the range 0 to 3 or the
13175 @a portNumber is not in the range 0 to 29.
13176 </result>
13177 <result name="E_NOTIMPL">
13178 The storage controller type is not SATAIntelAhci.
13179 </result>
13180
13181 </desc>
13182 <param name="devicePosition" type="long" dir="in"/>
13183 <param name="portNumber" type="long" dir="in"/>
13184 </method>
13185
13186 </interface>
13187
13188<if target="wsdl">
13189
13190 <!--
13191 // IManagedObjectRef
13192 /////////////////////////////////////////////////////////////////////////
13193 -->
13194
13195 <interface
13196 name="IManagedObjectRef" extends="$unknown"
13197 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
13198 internal="yes"
13199 wsmap="managed"
13200 wscpp="hardcoded"
13201 >
13202 <desc>
13203 Managed object reference.
13204
13205 Only within the webservice, a managed object reference (which is really
13206 an opaque number) allows a webservice client to address an object
13207 that lives in the address space of the webservice server.
13208
13209 Behind each managed object reference, there is a COM object that lives
13210 in the webservice server's address space. The COM object is not freed
13211 until the managed object reference is released, either by an explicit
13212 call to <link to="IManagedObjectRef::release" /> or by logging off from
13213 the webservice (<link to="IWebsessionManager::logoff" />), which releases
13214 all objects created during the webservice session.
13215
13216 Whenever a method call of the VirtualBox API returns a COM object, the
13217 webservice representation of that method will instead return a
13218 managed object reference, which can then be used to invoke methods
13219 on that object.
13220 </desc>
13221
13222 <method name="getInterfaceName">
13223 <desc>
13224 Returns the name of the interface that this managed object represents,
13225 for example, "IMachine", as a string.
13226 </desc>
13227 <param name="return" type="wstring" dir="return"/>
13228 </method>
13229
13230 <method name="release">
13231 <desc>
13232 Releases this managed object reference and frees the resources that
13233 were allocated for it in the webservice server process. After calling
13234 this method, the identifier of the reference can no longer be used.
13235 </desc>
13236 </method>
13237
13238 </interface>
13239
13240 <!--
13241 // IWebsessionManager
13242 /////////////////////////////////////////////////////////////////////////
13243 -->
13244
13245 <interface
13246 name="IWebsessionManager" extends="$unknown"
13247 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
13248 internal="yes"
13249 wsmap="global"
13250 wscpp="hardcoded"
13251 >
13252 <desc>
13253 Websession manager. This provides essential services
13254 to webservice clients.
13255 </desc>
13256 <method name="logon">
13257 <desc>
13258 Logs a new client onto the webservice and returns a managed object reference to
13259 the IVirtualBox instance, which the client can then use as a basis to further
13260 queries, since all calls to the VirtualBox API are based on the IVirtualBox
13261 interface, in one way or the other.
13262 </desc>
13263 <param name="username" type="wstring" dir="in"/>
13264 <param name="password" type="wstring" dir="in"/>
13265 <param name="return" type="IVirtualBox" dir="return"/>
13266 </method>
13267
13268 <method name="getSessionObject">
13269 <desc>
13270 Returns a managed object reference to the internal ISession object that was created
13271 for this web service session when the client logged on.
13272
13273 <see>ISession</see>
13274 </desc>
13275 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13276 <param name="return" type="ISession" dir="return"/>
13277 </method>
13278
13279 <method name="logoff">
13280 <desc>
13281 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
13282 and destroys all resources associated with the session (most importantly, all
13283 managed objects created in the server while the session was active).
13284 </desc>
13285 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13286 </method>
13287
13288 </interface>
13289
13290</if>
13291
13292 <!--
13293 // IPerformanceCollector & friends
13294 /////////////////////////////////////////////////////////////////////////
13295 -->
13296
13297 <interface
13298 name="IPerformanceMetric" extends="$unknown"
13299 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
13300 >
13301 <desc>
13302 The IPerformanceMetric interface represents parameters of the given
13303 performance metric.
13304 </desc>
13305
13306 <attribute name="metricName" type="wstring" readonly="yes">
13307 <desc>
13308 Name of the metric.
13309 </desc>
13310 </attribute>
13311
13312 <attribute name="object" type="$unknown" readonly="yes">
13313 <desc>
13314 Object this metric belongs to.
13315 </desc>
13316 </attribute>
13317
13318 <attribute name="description" type="wstring" readonly="yes">
13319 <desc>
13320 Textual description of the metric.
13321 </desc>
13322 </attribute>
13323
13324 <attribute name="period" type="unsigned long" readonly="yes">
13325 <desc>
13326 Time interval between samples, measured in seconds.
13327 </desc>
13328 </attribute>
13329
13330 <attribute name="count" type="unsigned long" readonly="yes">
13331 <desc>
13332 Number of recent samples retained by the performance collector for this
13333 metric.
13334
13335 When the collected sample count exceeds this number, older samples
13336 are discarded.
13337 </desc>
13338 </attribute>
13339
13340 <attribute name="unit" type="wstring" readonly="yes">
13341 <desc>
13342 Unit of measurement.
13343 </desc>
13344 </attribute>
13345
13346 <attribute name="minimumValue" type="long" readonly="yes">
13347 <desc>
13348 Minimum possible value of this metric.
13349 </desc>
13350 </attribute>
13351
13352 <attribute name="maximumValue" type="long" readonly="yes">
13353 <desc>
13354 Maximum possible value of this metric.
13355 </desc>
13356 </attribute>
13357 </interface>
13358
13359 <interface
13360 name="IPerformanceCollector" extends="$unknown"
13361 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
13362 wsmap="managed"
13363 >
13364 <desc>
13365 The IPerformanceCollector interface represents a service that collects
13366 and stores performance metrics data.
13367
13368 Performance metrics are associated with objects of interfaces like IHost
13369 and IMachine. Each object has a distinct set of performance metrics. The
13370 set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
13371
13372 Metric data is collected at the specified intervals and is retained
13373 internally. The interval and the number of retained samples can be set
13374 with <link to="IPerformanceCollector::setupMetrics" />. Both metric data
13375 and collection settings are not persistent, they are discarded as soon as
13376 VBoxSVC process terminates. Moreover, metric settings and data associated
13377 with a particular VM only exist while VM is running. They disappear as
13378 soon as VM shuts down. It is not possible to set up metrics for machines
13379 that are powered off. One needs to start VM first, then set up metric
13380 collection parameters.
13381
13382 Metrics are organized hierarchically, with each level separated by a
13383 slash (/) character. Generally, the scheme for metric names is like this:
13384
13385 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
13386
13387 "Category/Metric" together form the base metric name. A base metric is
13388 the smallest unit for which a sampling interval and the number of
13389 retained samples can be set. Only base metrics can be enabled and
13390 disabled. All sub-metrics are collected when their base metric is
13391 collected. Collected values for any set of sub-metrics can be queried
13392 with <link to="IPerformanceCollector::queryMetricsData" />.
13393
13394 For example "CPU/Load/User:avg" metric name stands for the "CPU"
13395 category, "Load" metric, "User" submetric, "average" aggregate. An
13396 aggregate function is computed over all retained data. Valid aggregate
13397 functions are:
13398
13399 <ul>
13400 <li>avg -- average</li>
13401 <li>min -- minimum</li>
13402 <li>max -- maximum</li>
13403 </ul>
13404
13405 When setting up metric parameters, querying metric data, enabling or
13406 disabling metrics wildcards can be used in metric names to specify a
13407 subset of metrics. For example, to select all CPU-related metrics
13408 use <tt>CPU/*</tt>, all averages can be queried using <tt>*:avg</tt> and
13409 so on. To query metric values without aggregates <tt>*:</tt> can be used.
13410
13411 The valid names for base metrics are:
13412
13413 <ul>
13414 <li>CPU/Load</li>
13415 <li>CPU/MHz</li>
13416 <li>RAM/Usage</li>
13417 </ul>
13418
13419 The general sequence for collecting and retrieving the metrics is:
13420 <ul>
13421 <li>
13422 Obtain an instance of IPerformanceCollector with
13423 <link to="IVirtualBox::performanceCollector" />
13424 </li>
13425 <li>
13426 Allocate and populate an array with references to objects the metrics
13427 will be collected for. Use references to IHost and IMachine objects.
13428 </li>
13429 <li>
13430 Allocate and populate an array with base metric names the data will
13431 be collected for.
13432 </li>
13433 <li>
13434 Call <link to="IPerformanceCollector::setupMetrics" />. From now on
13435 the metric data will be collected and stored.
13436 </li>
13437 <li>
13438 Wait for the data to get collected.
13439 </li>
13440 <li>
13441 Allocate and populate an array with references to objects the metric
13442 values will be queried for. You can re-use the object array used for
13443 setting base metrics.
13444 </li>
13445 <li>
13446 Allocate and populate an array with metric names the data will be
13447 collected for. Note that metric names differ from base metric names.
13448 </li>
13449 <li>
13450 Call <link to="IPerformanceCollector::queryMetricsData" />. The data
13451 that have been collected so far are returned. Note that the values
13452 are still retained internally and data collection continues.
13453 </li>
13454 </ul>
13455
13456 For an example of usage refer to the following files in VirtualBox SDK:
13457 <ul>
13458 <li>
13459 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13460 </li>
13461 <li>
13462 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13463 </li>
13464 </ul>
13465 </desc>
13466
13467 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13468 <desc>
13469 Array of unique names of metrics.
13470
13471 This array represents all metrics supported by the performance
13472 collector. Individual objects do not necessarily support all of them.
13473 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13474 list of supported metrics for a particular object.
13475 </desc>
13476 </attribute>
13477
13478 <method name="getMetrics">
13479 <desc>
13480 Returns parameters of specified metrics for a set of objects.
13481 <note>
13482 @c Null metrics array means all metrics. @c Null object array means
13483 all existing objects.
13484 </note>
13485 </desc>
13486 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13487 <desc>
13488 Metric name filter. Currently, only a comma-separated list of metrics
13489 is supported.
13490 </desc>
13491 </param>
13492 <param name="objects" type="$unknown" dir="in" safearray="yes">
13493 <desc>
13494 Set of objects to return metric parameters for.
13495 </desc>
13496 </param>
13497 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13498 <desc>
13499 Array of returned metric parameters.
13500 </desc>
13501 </param>
13502 </method>
13503
13504 <method name="setupMetrics">
13505 <desc>
13506 Sets parameters of specified base metrics for a set of objects. Returns
13507 an array of <link to="IPerformanceMetric" /> describing the metrics
13508 have been affected.
13509 <note>
13510 @c Null or empty metric name array means all metrics. @c Null or
13511 empty object array means all existing objects. If metric name array
13512 contains a single element and object array contains many, the single
13513 metric name array element is applied to each object array element to
13514 form metric/object pairs.
13515 </note>
13516 </desc>
13517 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13518 <desc>
13519 Metric name filter. Comma-separated list of metrics with wildcard
13520 support.
13521 </desc>
13522 </param>
13523 <param name="objects" type="$unknown" dir="in" safearray="yes">
13524 <desc>
13525 Set of objects to setup metric parameters for.
13526 </desc>
13527 </param>
13528 <param name="period" type="unsigned long" dir="in">
13529 <desc>
13530 Time interval in seconds between two consecutive samples of
13531 performance data.
13532 </desc>
13533 </param>
13534 <param name="count" type="unsigned long" dir="in">
13535 <desc>
13536 Number of samples to retain in performance data history. Older
13537 samples get discarded.
13538 </desc>
13539 </param>
13540 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13541 <desc>
13542 Array of metrics that have been modified by the call to this method.
13543 </desc>
13544 </param>
13545 </method>
13546
13547 <method name="enableMetrics">
13548 <desc>
13549 Turns on collecting specified base metrics. Returns an array of
13550 <link to="IPerformanceMetric" /> describing the metrics have been
13551 affected.
13552 <note>
13553 @c Null or empty metric name array means all metrics. @c Null or
13554 empty object array means all existing objects. If metric name array
13555 contains a single element and object array contains many, the single
13556 metric name array element is applied to each object array element to
13557 form metric/object pairs.
13558 </note>
13559 </desc>
13560 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13561 <desc>
13562 Metric name filter. Comma-separated list of metrics with wildcard
13563 support.
13564 </desc>
13565 </param>
13566 <param name="objects" type="$unknown" dir="in" safearray="yes">
13567 <desc>
13568 Set of objects to enable metrics for.
13569 </desc>
13570 </param>
13571 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13572 <desc>
13573 Array of metrics that have been modified by the call to this method.
13574 </desc>
13575 </param>
13576 </method>
13577
13578 <method name="disableMetrics">
13579 <desc>
13580 Turns off collecting specified base metrics. Returns an array of
13581 <link to="IPerformanceMetric" /> describing the metrics have been
13582 affected.
13583 <note>
13584 @c Null or empty metric name array means all metrics. @c Null or
13585 empty object array means all existing objects. If metric name array
13586 contains a single element and object array contains many, the single
13587 metric name array element is applied to each object array element to
13588 form metric/object pairs.
13589 </note>
13590 </desc>
13591 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13592 <desc>
13593 Metric name filter. Comma-separated list of metrics with wildcard
13594 support.
13595 </desc>
13596 </param>
13597 <param name="objects" type="$unknown" dir="in" safearray="yes">
13598 <desc>
13599 Set of objects to disable metrics for.
13600 </desc>
13601 </param>
13602 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13603 <desc>
13604 Array of metrics that have been modified by the call to this method.
13605 </desc>
13606 </param>
13607 </method>
13608
13609 <method name="queryMetricsData">
13610 <desc>
13611 Queries collected metrics data for a set of objects.
13612
13613 The data itself and related metric information are returned in seven
13614 parallel and one flattened array of arrays. Elements of
13615 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13616 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13617 the same index describe one set of values corresponding to a single
13618 metric.
13619
13620 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13621 start and length of a sub-array is indicated by
13622 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13623 value for metric <tt>metricNames[i]</tt> is at
13624 <tt>returnData[returnIndices[i]]</tt>.
13625
13626 <note>
13627 @c Null or empty metric name array means all metrics. @c Null or
13628 empty object array means all existing objects. If metric name array
13629 contains a single element and object array contains many, the single
13630 metric name array element is applied to each object array element to
13631 form metric/object pairs.
13632 </note>
13633 <note>
13634 Data collection continues behind the scenes after call to @c
13635 queryMetricsData. The return data can be seen as the snapshot of the
13636 current state at the time of @c queryMetricsData call. The internally
13637 kept metric values are not cleared by the call. This makes possible
13638 querying different subsets of metrics or aggregates with subsequent
13639 calls. If periodic querying is needed it is highly suggested to query
13640 the values with @c interval*count period to avoid confusion. This way
13641 a completely new set of data values will be provided by each query.
13642 </note>
13643 </desc>
13644 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13645 <desc>
13646 Metric name filter. Comma-separated list of metrics with wildcard
13647 support.
13648 </desc>
13649 </param>
13650 <param name="objects" type="$unknown" dir="in" safearray="yes">
13651 <desc>
13652 Set of objects to query metrics for.
13653 </desc>
13654 </param>
13655 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13656 <desc>
13657 Names of metrics returned in @c returnData.
13658 </desc>
13659 </param>
13660 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13661 <desc>
13662 Objects associated with metrics returned in @c returnData.
13663 </desc>
13664 </param>
13665 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13666 <desc>
13667 Units of measurement for each returned metric.
13668 </desc>
13669 </param>
13670 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13671 <desc>
13672 Divisor that should be applied to return values in order to get
13673 floating point values. For example:
13674 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13675 will retrieve the floating point value of i-th sample of the first
13676 metric.
13677 </desc>
13678 </param>
13679 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13680 <desc>
13681 Sequence numbers of the first elements of value sequences of
13682 particular metrics returned in @c returnData. For aggregate metrics
13683 it is the sequence number of the sample the aggregate started
13684 calculation from.
13685 </desc>
13686 </param>
13687 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13688 <desc>
13689 Indices of the first elements of value sequences of particular
13690 metrics returned in @c returnData.
13691 </desc>
13692 </param>
13693 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13694 <desc>
13695 Lengths of value sequences of particular metrics.
13696 </desc>
13697 </param>
13698 <param name="returnData" type="long" dir="return" safearray="yes">
13699 <desc>
13700 Flattened array of all metric data containing sequences of values for
13701 each metric.
13702 </desc>
13703 </param>
13704 </method>
13705
13706 </interface>
13707 <enum
13708 name="NATAliasMode"
13709 uuid="67772168-50d9-11df-9669-7fb714ee4fa1">
13710 <desc></desc>
13711 <const name="AliasLog" value="0x1">
13712 <desc></desc>
13713 </const>
13714 <const name="AliasProxyOnly" value="0x02">
13715 <desc></desc>
13716 </const>
13717 <const name="AliasUseSamePorts" value="0x04">
13718 <desc></desc>
13719 </const>
13720 </enum>
13721 <enum
13722 name="NATProtocol"
13723 uuid="e90164be-eb03-11de-94af-fff9b1c1b19f"
13724 >
13725 <desc>Protocol definitions used with NAT port-forwarding rules.</desc>
13726 <const name="UDP" value="0">
13727 <desc>Port-forwarding uses UDP protocol.</desc>
13728 </const>
13729 <const name="TCP" value="1">
13730 <desc>Port-forwarding uses TCP protocol.</desc>
13731 </const>
13732 </enum>
13733
13734 <interface
13735 name="INATEngine" extends="$unknown"
13736 uuid="4b286616-eb03-11de-b0fb-1701eca42246"
13737 wsmap="managed"
13738 >
13739 <desc>Interface for managing a NAT engine which is used with a virtual machine. This
13740 allows for changing NAT behavior such as port-forwarding rules. This interface is
13741 used in the <link to="INetworkAdapter::natDriver" /> attribute.</desc>
13742 <attribute name="network" type="wstring">
13743 <desc>The network attribute of the NAT engine (the same value is used with built-in
13744 DHCP server to fill corresponding fields of DHCP leases).</desc>
13745 </attribute>
13746 <attribute name="hostIP" type="wstring">
13747 <desc>IP of host interface to bind all opened sockets to.
13748 <note>Changing this does not change binding of port forwarding.</note>
13749 </desc>
13750 </attribute>
13751 <attribute name="tftpPrefix" type="wstring">
13752 <desc>TFTP prefix attribute which is used with the built-in DHCP server to fill
13753 the corresponding fields of DHCP leases.</desc>
13754 </attribute>
13755 <attribute name="tftpBootFile" type="wstring">
13756 <desc>TFTP boot file attribute which is used with the built-in DHCP server to fill
13757 the corresponding fields of DHCP leases.</desc>
13758 </attribute>
13759 <attribute name="tftpNextServer" type="wstring">
13760 <desc>TFTP server attribute which is used with the built-in DHCP server to fill
13761 the corresponding fields of DHCP leases.
13762 <note>The preferred form is IPv4 addresses.</note>
13763 </desc>
13764 </attribute>
13765 <attribute name="aliasMode" type="unsigned long">
13766 <desc></desc>
13767 </attribute>
13768 <attribute name="dnsPassDomain" type="boolean">
13769 <desc>Whether the DHCP server should pass the DNS domain used by the host.</desc>
13770 </attribute>
13771 <attribute name="dnsProxy" type="boolean">
13772 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
13773 of the DNS proxy and process traffic using DNS servers registered on the host.</desc>
13774 </attribute>
13775 <attribute name="dnsUseHostResolver" type="boolean">
13776 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
13777 of the DNS proxy and process traffic using the host resolver mechanism.</desc>
13778 </attribute>
13779 <attribute name="redirects" type="wstring" readonly="yes" safearray="yes">
13780 <desc>Array of NAT port-forwarding rules in string representation, in the following
13781 format: "name,protocol id,host ip,host port,guest ip,guest port".</desc>
13782 </attribute>
13783 <method name="setNetworkSettings">
13784 <desc>Sets network configuration of the NAT engine.</desc>
13785 <param name="mtu" type="unsigned long" dir="in">
13786 <desc>MTU (maximum transmission unit) of the NAT engine in bytes.</desc>
13787 </param>
13788 <param name="sockSnd" type="unsigned long" dir="in">
13789 <desc>Capacity of the socket send buffer in bytes when creating a new socket.</desc>
13790 </param>
13791 <param name="sockRcv" type="unsigned long" dir="in">
13792 <desc>Capacity of the socket receive buffer in bytes when creating a new socket.</desc>
13793 </param>
13794 <param name="TcpWndSnd" type="unsigned long" dir="in">
13795 <desc>Initial size of the NAT engine's sending TCP window in bytes when
13796 establishing a new TCP connection.</desc>
13797 </param>
13798 <param name="TcpWndRcv" type="unsigned long" dir="in">
13799 <desc>Initial size of the NAT engine's receiving TCP window in bytes when
13800 establishing a new TCP connection.</desc>
13801 </param>
13802 </method>
13803 <method name="getNetworkSettings">
13804 <desc>Returns network configuration of NAT engine. See <link to="#setNetworkSettings" />
13805 for parameter descriptions.</desc>
13806 <param name="mtu" type="unsigned long" dir="out" />
13807 <param name="sockSnd" type="unsigned long" dir="out" />
13808 <param name="sockRcv" type="unsigned long" dir="out" />
13809 <param name="TcpWndSnd" type="unsigned long" dir="out" />
13810 <param name="TcpWndRcv" type="unsigned long" dir="out" />
13811 </method>
13812 <method name="addRedirect">
13813 <desc>Adds a new NAT port-forwarding rule.</desc>
13814 <param name="name" type="wstring" dir="in">
13815 <desc>The name of the rule. An empty name is acceptable, in which case the NAT engine
13816 auto-generates one using the other parameters.</desc>
13817 </param>
13818 <param name="proto" type="NATProtocol" dir="in">
13819 <desc>Protocol handled with the rule.</desc>
13820 </param>
13821 <param name="hostIp" type="wstring" dir="in">
13822 <desc>IP of the host interface to which the rule should apply. An empty ip address is
13823 acceptable, in which case the NAT engine binds the handling socket to any interface.</desc>
13824 </param>
13825 <param name="hostPort" type="unsigned short" dir="in">
13826 <desc>The port number to listen on.</desc>
13827 </param>
13828 <param name="guestIp" type="wstring" dir="in">
13829 <desc>The IP address of the guest which the NAT engine will forward matching packets
13830 to. An empty IP address is acceptable, in which case the NAT engine will forward
13831 packets to the first DHCP lease (x.x.x.15).</desc>
13832 </param>
13833 <param name="guestPort" type="unsigned short" dir="in">
13834 <desc>The port number to forward.</desc>
13835 </param>
13836 </method>
13837 <method name="removeRedirect">
13838 <desc>Removes a port-forwarding rule that was previously registered.</desc>
13839 <param name="name" type="wstring" dir="in">
13840 <desc>The name of the rule to delete.</desc>
13841 </param>
13842 </method>
13843 </interface>
13844
13845 <enum
13846 name="VBoxEventType"
13847 uuid="1728bb3b-4843-4f12-af67-f7a1f69f3a52">
13848
13849 <desc>
13850 Type of an event.
13851 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
13852 </desc>
13853
13854 <const name="Invalid" value="0">
13855 <desc>
13856 Invalid event, must be first.
13857 </desc>
13858 </const>
13859
13860 <const name="Any" value="1">
13861 <desc>
13862 Wildcard for all events.
13863 Events of this type are never delivered, and only used in
13864 registerListener() call to simplify registration.
13865 </desc>
13866 </const>
13867
13868 <const name="Vetoable" value="2">
13869 <desc>
13870 Wildcard for all vetoable events. Events of this type are never delivered, and only
13871 used in registerListener() call to simplify registration.
13872 </desc>
13873 </const>
13874
13875 <const name="MachineEvent" value="3">
13876 <desc>
13877 Wildcard for all machine events. Events of this type are never delivered, and only used in
13878 registerListener() call to simplify registration.
13879 </desc>
13880 </const>
13881
13882 <const name="SnapshotEvent" value="4">
13883 <desc>
13884 Wildcard for all snapshot events. Events of this type are never delivered, and only used in
13885 registerListener() call to simplify registration.
13886 </desc>
13887 </const>
13888
13889 <const name="InputEvent" value="5">
13890 <desc>
13891 Wildcard for all input device (keyboard, mouse) events.
13892 Events of this type are never delivered, and only used in
13893 registerListener() call to simplify registration.
13894 </desc>
13895 </const>
13896
13897 <const name="LastWildcard" value="31">
13898 <desc>
13899 Last wildcard.
13900 </desc>
13901 </const>
13902
13903 <const name="OnMachineStateChanged" value="32">
13904 <desc>
13905 See <link to="IMachineStateChangedEvent">IMachineStateChangedEvent</link>.
13906 </desc>
13907 </const>
13908 <const name="OnMachineDataChanged" value="33">
13909 <desc>
13910 See <link to="IMachineDataChangedEvent">IMachineDataChangedEvent</link>.
13911 </desc>
13912 </const>
13913 <const name="OnExtraDataChanged" value="34">
13914 <desc>
13915 See <link to="IExtraDataChangedEvent">IExtraDataChangedEvent</link>.
13916 </desc>
13917 </const>
13918 <const name="OnExtraDataCanChange" value="35">
13919 <desc>
13920 See <link to="IExtraDataCanChangeEvent">IExtraDataCanChangeEvent</link>.
13921 </desc>
13922 </const>
13923 <const name="OnMediumRegistered" value="36">
13924 <desc>
13925 See <link to="IMediumRegisteredEvent">IMediumRegisteredEvent</link>.
13926 </desc>
13927 </const>
13928 <const name="OnMachineRegistered" value="37">
13929 <desc>
13930 See <link to="IMachineRegisteredEvent">IMachineRegisteredEvent</link>.
13931 </desc>
13932 </const>
13933 <const name="OnSessionStateChanged" value="38">
13934 <desc>
13935 See <link to="ISessionStateChangedEvent">ISessionStateChangedEvent</link>.
13936 </desc>
13937 </const>
13938 <const name="OnSnapshotTaken" value="39">
13939 <desc>
13940 See <link to="ISnapshotTakenEvent">ISnapshotTakenEvent</link>.
13941 </desc>
13942 </const>
13943 <const name="OnSnapshotDeleted" value="40">
13944 <desc>
13945 See <link to="ISnapshotDeletedEvent">ISnapshotDeletedEvent</link>.
13946 </desc>
13947 </const>
13948 <const name="OnSnapshotChanged" value="41">
13949 <desc>
13950 See <link to="ISnapshotChangedEvent">ISnapshotChangedEvent</link>.
13951 </desc>
13952 </const>
13953 <const name="OnGuestPropertyChanged" value="42">
13954 <desc>
13955 See <link to="IGuestPropertyChangedEvent">IGuestPropertyChangedEvent</link>.
13956 </desc>
13957 </const>
13958 <!-- Console events -->
13959 <const name="OnMousePointerShapeChanged" value="43">
13960 <desc>
13961 See <link to="IMousePointerShapeChangedEvent">IMousePointerShapeChangedEvent</link>.
13962 </desc>
13963 </const>
13964 <const name="OnMouseCapabilityChanged" value="44">
13965 <desc>
13966 See <link to="IMouseCapabilityChangedEvent">IMouseCapabilityChangedEvent</link>.
13967 </desc>
13968 </const>
13969 <const name="OnKeyboardLedsChanged" value="45">
13970 <desc>
13971 See <link to="IKeyboardLedsChangedEvent">IKeyboardLedsChangedEvent</link>.
13972 </desc>
13973 </const>
13974 <const name="OnStateChanged" value="46">
13975 <desc>
13976 See <link to="IStateChangedEvent">IStateChangedEvent</link>.
13977 </desc>
13978 </const>
13979 <const name="OnAdditionsStateChanged" value="47">
13980 <desc>
13981 See <link to="IAdditionsStateChangedEvent">IAdditionsStateChangedEvent</link>.
13982 </desc>
13983 </const>
13984 <const name="OnNetworkAdapterChanged" value="48">
13985 <desc>
13986 See <link to="INetworkAdapterChangedEvent">INetworkAdapterChangedEvent</link>.
13987 </desc>
13988 </const>
13989 <const name="OnSerialPortChanged" value="49">
13990 <desc>
13991 See <link to="ISerialPortChangedEvent">ISerialPortChangedEvent</link>.
13992 </desc>
13993 </const>
13994 <const name="OnParallelPortChanged" value="50">
13995 <desc>
13996 See <link to="IParallelPortChangedEvent">IParallelPortChangedEvent</link>.
13997 </desc>
13998 </const>
13999 <const name="OnStorageControllerChanged" value="51">
14000 <desc>
14001 See <link to="IStorageControllerChangedEvent">IStorageControllerChangedEvent</link>.
14002 </desc>
14003 </const>
14004 <const name="OnMediumChanged" value="52">
14005 <desc>
14006 See <link to="IMediumChangedEvent">IMediumChangedEvent</link>.
14007 </desc>
14008 </const>
14009 <const name="OnVRDPServerChanged" value="53">
14010 <desc>
14011 See <link to="IVRDPServerChangedEvent">IVRDPServerChangedEvent</link>.
14012 </desc>
14013 </const>
14014 <const name="OnUSBControllerChanged" value="54">
14015 <desc>
14016 See <link to="IUSBControllerChangedEvent">IUSBControllerChangedEvent</link>.
14017 </desc>
14018 </const>
14019 <const name="OnUSBDeviceStateChanged" value="55">
14020 <desc>
14021 See <link to="IUSBDeviceStateChangedEvent">IUSBDeviceStateChangedEvent</link>.
14022 </desc>
14023 </const>
14024 <const name="OnSharedFolderChanged" value="56">
14025 <desc>
14026 See <link to="ISharedFolderChangedEvent">ISharedFolderChangedEvent</link>.
14027 </desc>
14028 </const>
14029 <const name="OnRuntimeError" value="57">
14030 <desc>
14031 See <link to="IRuntimeErrorEvent">IRuntimeErrorEvent</link>.
14032 </desc>
14033 </const>
14034 <const name="OnCanShowWindow" value="58">
14035 <desc>
14036 See <link to="ICanShowWindowEvent">ICanShowWindowEvent</link>.
14037 </desc>
14038 </const>
14039 <const name="OnShowWindow" value="59">
14040 <desc>
14041 See <link to="IShowWindowEvent">IShowWindowEvent</link>.
14042 </desc>
14043 </const>
14044 <const name="OnCPUChanged" value="60">
14045 <desc>
14046 See <link to="ICPUChangedEvent">ICPUChangedEvent</link>.
14047 </desc>
14048 </const>
14049 <const name="OnRemoteDisplayInfoChanged" value="61">
14050 <desc>
14051 See <link to="IRemoteDisplayInfoChangedEvent">IRemoteDisplayInfoChangedEvent</link>.
14052 </desc>
14053 </const>
14054 <const name="OnEventSourceChanged" value="62">
14055 <desc>
14056 See <link to="IEventSourceChangedEvent">IEventSourceChangedEvent</link>.
14057 </desc>
14058 </const>
14059 <const name="OnCPUExecutionCapChanged" value="63">
14060 <desc>
14061 See <link to="ICPUExecutionCapChangedEvent">ICPUExecutionCapChangedEvent</link>.
14062 </desc>
14063 </const>
14064 <const name="OnGuestKeyboardEvent" value="64">
14065 <desc>
14066 See <link to="IGuestKeyboardEvent">IGuestKeyboardEvent</link>.
14067 </desc>
14068 </const>
14069 <const name="OnGuestMouseEvent" value="65">
14070 <desc>
14071 See <link to="IGuestMouseEvent">IGuestMouseEvent</link>.
14072 </desc>
14073 </const>
14074 <!-- Last event marker -->
14075 <const name="Last" value="66">
14076 <desc>
14077 Must be last event, used for iterations and structures relying on numerical event values.
14078 </desc>
14079 </const>
14080
14081 </enum>
14082
14083 <interface
14084 name="IEventSource" extends="$unknown"
14085 uuid="9b6e1aee-35f3-4f4d-b5bb-ed0ecefd8538"
14086 wsmap="managed"
14087 >
14088 <desc>
14089 Event source. Generally, any object which could generate events can be an event source,
14090 or aggregate one. To simplify using one-way protocols such as webservices running on top of HTTP(S),
14091 an event source can work with listeners in either active or passive mode. In active mode it is up to
14092 the IEventSource implementation to call <link to="IEventListener::handleEvent" />, in passive mode the
14093 event source keeps track of pending events for each listener and returns available events on demand.
14094
14095 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
14096 </desc>
14097
14098 <method name="createListener">
14099 <desc>
14100 Creates a new listener object, useful for passive mode.
14101 </desc>
14102 <param name="listener" type="IEventListener" dir="return"/>
14103 </method>
14104
14105 <method name="createAggregator">
14106 <desc>
14107 Creates a aggregator event source, collecting events from multiple sources.
14108 This way single listener can listen for events coming from multiple sources,
14109 using single blocking getEvent() of this aggregator.
14110 </desc>
14111 <param name="subordinates" type="IEventSource" dir="in" safearray="yes">
14112 <desc>
14113 Subordinate event source this one aggregatres.
14114 </desc>
14115 </param>
14116 <param name="result" type="IEventSource" dir="return"/>
14117 </method>
14118
14119 <method name="registerListener">
14120 <desc>
14121 Register an event listener.
14122
14123 <note>
14124 To avoid system overload, the VirtualBox server process checks if passive event
14125 listeners call <link to="IEventSource::getEvent"/> frequently enough. In the
14126 current implementation, if more than 500 pending events are detected for a passive
14127 event listener, it is forcefully unregistered by the system, and further
14128 <link to="#getEvent" /> calls will return @c VBOX_E_OBJECT_NOT_FOUND.
14129 </note>
14130 </desc>
14131 <param name="listener" type="IEventListener" dir="in">
14132 <desc>Listener to register.</desc>
14133 </param>
14134 <param name="interesting" type="VBoxEventType" dir="in" safearray="yes">
14135 <desc>
14136 Event types listener is interested in. One can use wildcards like -
14137 <link to="VBoxEventType_Any"/> to specify wildcards, matching more
14138 than one event.
14139 </desc>
14140 </param>
14141 <param name="active" type="boolean" dir="in">
14142 <desc>
14143 Which mode this listener is operating in.
14144 In active mode, <link to="IEventListener::handleEvent" /> is called directly.
14145 In passive mode, an internal event queue is created for this this IEventListener.
14146 For each event coming in, it is added to queues for all interested registered passive
14147 listeners. It is then up to the external code to call the listener's
14148 <link to="IEventListener::handleEvent" /> method. When done with an event, the
14149 external code must call <link to="#eventProcessed" />.
14150 </desc>
14151 </param>
14152 </method>
14153
14154 <method name="unregisterListener">
14155 <desc>
14156 Unregister an event listener. If listener is passive, and some waitable events are still
14157 in queue they are marked as processed automatically.
14158 </desc>
14159 <param name="listener" type="IEventListener" dir="in">
14160 <desc>Listener to unregister.</desc>
14161 </param>
14162 </method>
14163
14164 <method name="fireEvent">
14165 <desc>
14166 Fire an event for this source.
14167 </desc>
14168 <param name="event" type="IEvent" dir="in">
14169 <desc>Event to deliver.</desc>
14170 </param>
14171 <param name="timeout" type="long" dir="in">
14172 <desc>
14173 Maximum time to wait for event processing (if event is waitable), in ms;
14174 0 = no wait, -1 = indefinite wait.
14175 </desc>
14176 </param>
14177 <param name="result" type="boolean" dir="return">
14178 <desc>true if an event was delivered to all targets, or is non-waitable.</desc>
14179 </param>
14180 </method>
14181
14182 <method name="getEvent">
14183 <desc>
14184 Get events from this peer's event queue (for passive mode). Calling this method
14185 regularly is required for passive event listeners to avoid system overload;
14186 see <link to="IEventSource::registerListener" /> for details.
14187
14188 <result name="VBOX_E_OBJECT_NOT_FOUND">
14189 Listener is not registered, or autounregistered.
14190 </result>
14191 </desc>
14192 <param name="listener" type="IEventListener" dir="in">
14193 <desc>Which listener to get data for.</desc>
14194 </param>
14195 <param name="timeout" type="long" dir="in">
14196 <desc>
14197 Maximum time to wait for events, in ms;
14198 0 = no wait, -1 = indefinite wait.
14199 </desc>
14200 </param>
14201 <param name="event" type="IEvent" dir="return">
14202 <desc>Event retrieved, or null if none available.</desc>
14203 </param>
14204 </method>
14205
14206 <method name="eventProcessed">
14207 <desc>
14208 Must be called for waitable events after a particular listener finished its
14209 event processing. When all listeners of a particular event have called this
14210 method, the system will then call <link to="IEvent::setProcessed" />.
14211 </desc>
14212 <param name="listener" type="IEventListener" dir="in">
14213 <desc>Which listener processed event.</desc>
14214 </param>
14215 <param name="event" type="IEvent" dir="in">
14216 <desc>Which event.</desc>
14217 </param>
14218 </method>
14219
14220 </interface>
14221
14222 <interface
14223 name="IEventListener" extends="$unknown"
14224 uuid="67099191-32e7-4f6c-85ee-422304c71b90"
14225 wsmap="managed"
14226 >
14227 <desc>
14228 Event listener. An event listener can work in either active or passive mode, depending on the way
14229 it was registered.
14230 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
14231 </desc>
14232
14233 <method name="handleEvent">
14234 <desc>
14235 Handle event callback (called directly by IEventSource in active mode, or could be
14236 called by event processor thread in passive mode).
14237 </desc>
14238 <param name="event" type="IEvent" dir="in">
14239 <desc>Event available.</desc>
14240 </param>
14241 </method>
14242
14243 </interface>
14244
14245 <interface
14246 name="IEvent" extends="$unknown"
14247 uuid="0ca2adba-8f30-401b-a8cd-fe31dbe839c0"
14248 wsmap="managed"
14249 >
14250 <desc>
14251 Abstract parent interface for VirtualBox events. Actual events will typically implement
14252 a more specific interface which derives from this (see below).
14253
14254 <b>Introduction to VirtualBox events</b>
14255
14256 Generally speaking, an event (represented by this interface) signals that something
14257 happened, while an event listener (see <link to="IEventListener" />) represents an
14258 entity that is interested in certain events. In order for this to work with
14259 unidirectional protocols (i.e. web services), the concepts of passive and active
14260 listener are used.
14261
14262 Event consumers can register themselves as listeners, providing an array of
14263 events they are interested in (see <link to="IEventSource::registerListener" />).
14264 When an event triggers, the listener is notified about the event. The exact
14265 mechanism of the notification depends on whether the listener was registered as
14266 an active or passive listener:
14267
14268 <ul>
14269 <li>An active listener is very similar to a callback: it is a function invoked
14270 by the API. As opposed to the callbacks that were used in the API before
14271 VirtualBox 3.3 however, events are now objects with an interface hierarchy.
14272 </li>
14273
14274 <li>Passive listeners are somewhat tricker to implement, but do not require
14275 a client function to be callable, which is not an option with scripting
14276 languages or web service clients. Internally the <link to="IEventSource" />
14277 implementation maintains an event queue for each passive listener, and
14278 newly arrived events are put in this queue. When the listener calls
14279 <link to="IEventSource::getEvent"/>, first element from its internal event
14280 queue is returned. When the client completes processing of an event,
14281 the <link to="IEventSource::eventProcessed" /> function must be called,
14282 acknowledging that the event was processed. It supports implementing
14283 waitable events. On passive listener unregistration, all events from its
14284 queue are auto-acknowledged.
14285 </li>
14286 </ul>
14287
14288 Waitable events are useful in situations where the event generator wants to track
14289 delivery or a party wants to wait until all listeners have completed the event. A
14290 typical example would be a vetoable event (see <link to="IVetoEvent" />) where a
14291 listeners might veto a certain action, and thus the event producer has to make
14292 sure that all listeners have processed the event and not vetoed before taking
14293 the action.
14294
14295 A given event may have both passive and active listeners at the same time.
14296
14297 <b>Using events</b>
14298
14299 Any VirtualBox object capable of producing externally visible events provides an
14300 @c eventSource read-only attribute, which is of the type <link to="IEventSource" />.
14301 This event source object is notified by VirtualBox once something has happened, so
14302 consumers may register event listeners with this event source. To register a listener,
14303 an object implementing the <link to="IEventListener" /> interface must be provided.
14304 For active listeners, such an object is typically created by the consumer, while for
14305 passive listeners <link to="IEventSource::createListener" /> should be used. Please
14306 note that a listener created with @c createListener() must not be used as an active listener.
14307
14308 Once created, the listener must be registered to listen for the desired events
14309 (see <link to="IEventSource::registerListener" />), providing an array of
14310 <link to="VBoxEventType" /> enums. Those elements can either be the individual
14311 event IDs or wildcards matching multiple event IDs.
14312
14313 After registration, the callback's <link to="IEventListener::handleEvent" /> method is
14314 called automatically when the event is triggered, while passive listeners have to call
14315 <link to="IEventSource::getEvent" /> and <link to="IEventSource::eventProcessed" /> in
14316 an event processing loop.
14317
14318 The IEvent interface is an abstract parent interface for all such VirtualBox events
14319 coming in. As a result, the standard use pattern inside <link to="IEventListener::handleEvent" />
14320 or the event processing loop is to check the <link to="#type" /> attribute of the event and
14321 then cast to the appropriate specific interface using @c QueryInterface().
14322 </desc>
14323
14324 <attribute name="type" readonly="yes" type="VBoxEventType">
14325 <desc>
14326 Event type.
14327 </desc>
14328 </attribute>
14329
14330 <attribute name="source" readonly="yes" type="IEventSource">
14331 <desc>
14332 Source of this event.
14333 </desc>
14334 </attribute>
14335
14336 <attribute name="waitable" readonly="yes" type="boolean">
14337 <desc>
14338 If we can wait for this event being processed. If false, waitProcessed() returns immediately,
14339 and setProcessed() doesn't make sense. Non-waitable events are generally better performing,
14340 as no additional overhead associated with waitability imposed.
14341 Waitable events are needed when one need to be able to wait for particular event processed,
14342 for example for vetoable changes, or if event refers to some resource which need to be kept immutable
14343 until all consumers confirmed events.
14344 </desc>
14345 </attribute>
14346
14347 <method name="setProcessed">
14348 <desc>
14349 Internal method called by the system when all listeners of a particular event have called
14350 <link to="IEventSource::eventProcessed" />. This should not be called by client code.
14351 </desc>
14352 </method>
14353
14354 <method name="waitProcessed">
14355 <desc>
14356 Wait until time outs, or this event is processed. Event must be waitable for this operation to have
14357 described semantics, for non-waitable returns true immediately.
14358 </desc>
14359 <param name="timeout" type="long" dir="in">
14360 <desc>
14361 Maximum time to wait for event processeing, in ms;
14362 0 = no wait, -1 = indefinite wait.
14363 </desc>
14364 </param>
14365 <param name="result" type="boolean" dir="return">
14366 <desc>If this event was processed before timeout.</desc>
14367 </param>
14368 </method>
14369 </interface>
14370
14371
14372 <interface
14373 name="IReusableEvent" extends="IEvent"
14374 uuid="69bfb134-80f6-4266-8e20-16371f68fa25"
14375 wsmap="managed"
14376 >
14377 <desc>Base abstract interface for all reusable events.</desc>
14378
14379 <attribute name="generation" readonly="yes" type="unsigned long">
14380 <desc>Current generation of event, incremented on reuse.</desc>
14381 </attribute>
14382
14383 <method name="reuse">
14384 <desc>
14385 Marks an event as reused, increments 'generation', fields shall no
14386 longer be considered valid.
14387 </desc>
14388 </method>
14389 </interface>
14390
14391 <interface
14392 name="IMachineEvent" extends="IEvent"
14393 uuid="92ed7b1a-0d96-40ed-ae46-a564d484325e"
14394 wsmap="managed" id="MachineEvent"
14395 >
14396 <desc>Base abstract interface for all machine events.</desc>
14397
14398 <attribute name="machineId" readonly="yes" type="uuid" mod="string">
14399 <desc>ID of the machine this event relates to.</desc>
14400 </attribute>
14401
14402 </interface>
14403
14404 <interface
14405 name="IMachineStateChangedEvent" extends="IMachineEvent"
14406 uuid="5748F794-48DF-438D-85EB-98FFD70D18C9"
14407 wsmap="managed" autogen="VBoxEvent" id="OnMachineStateChanged"
14408 >
14409 <desc>Machine state change event.</desc>
14410
14411 <attribute name="state" readonly="yes" type="MachineState">
14412 <desc>New execution state.</desc>
14413 </attribute>
14414 </interface>
14415
14416 <interface
14417 name="IMachineDataChangedEvent" extends="IMachineEvent"
14418 uuid="6AA70A6C-0DCA-4810-8C5C-457B278E3D49"
14419 wsmap="managed" autogen="VBoxEvent" id="OnMachineDataChanged"
14420 >
14421 <desc>
14422 Any of the settings of the given machine has changed.
14423 </desc>
14424 </interface>
14425
14426 <interface
14427 name="IMediumRegisteredEvent" extends="IEvent"
14428 uuid="53fac49a-b7f1-4a5a-a4ef-a11dd9c2a458"
14429 wsmap="managed" autogen="VBoxEvent" id="OnMediumRegistered"
14430 >
14431 <desc>
14432 The given medium was registered or unregistered
14433 within this VirtualBox installation.
14434 </desc>
14435
14436 <attribute name="mediumId" readonly="yes" type="uuid" mod="string">
14437 <desc>ID of the medium this event relates to.</desc>
14438 </attribute>
14439
14440 <attribute name="mediumType" readonly="yes" type="DeviceType">
14441 <desc>Type of the medium this event relates to.</desc>
14442 </attribute>
14443
14444 <attribute name="registered" type="boolean" readonly="yes">
14445 <desc>
14446 If @c true, the medium was registered, otherwise it was
14447 unregistered.
14448 </desc>
14449 </attribute>
14450 </interface>
14451
14452 <interface
14453 name="IMachineRegisteredEvent" extends="IMachineEvent"
14454 uuid="c354a762-3ff2-4f2e-8f09-07382ee25088"
14455 wsmap="managed" autogen="VBoxEvent" id="OnMachineRegistered"
14456 >
14457 <desc>
14458 The given machine was registered or unregistered
14459 within this VirtualBox installation.
14460 </desc>
14461
14462 <attribute name="registered" type="boolean" readonly="yes">
14463 <desc>
14464 If @c true, the machine was registered, otherwise it was
14465 unregistered.
14466 </desc>
14467 </attribute>
14468 </interface>
14469
14470 <interface
14471 name="ISessionStateChangedEvent" extends="IMachineEvent"
14472 uuid="714a3eef-799a-4489-86cd-fe8e45b2ff8e"
14473 wsmap="managed" autogen="VBoxEvent" id="OnSessionStateChanged"
14474 >
14475 <desc>
14476 The state of the session for the given machine was changed.
14477 <see>IMachine::sessionState</see>
14478 </desc>
14479
14480 <attribute name="state" type="SessionState" readonly="yes">
14481 <desc>
14482 New session state.
14483 </desc>
14484 </attribute>
14485 </interface>
14486
14487 <interface
14488 name="IGuestPropertyChangedEvent" extends="IMachineEvent"
14489 uuid="3f63597a-26f1-4edb-8dd2-6bddd0912368"
14490 wsmap="managed" autogen="VBoxEvent" id="OnGuestPropertyChanged"
14491 >
14492 <desc>
14493 Notification when a guest property has changed.
14494 </desc>
14495
14496 <attribute name="name" readonly="yes" type="wstring">
14497 <desc>
14498 The name of the property that has changed.
14499 </desc>
14500 </attribute>
14501
14502 <attribute name="value" readonly="yes" type="wstring">
14503 <desc>
14504 The new property value.
14505 </desc>
14506 </attribute>
14507
14508 <attribute name="flags" readonly="yes" type="wstring">
14509 <desc>
14510 The new property flags.
14511 </desc>
14512 </attribute>
14513
14514 </interface>
14515
14516 <interface
14517 name="ISnapshotEvent" extends="IMachineEvent"
14518 uuid="21637b0e-34b8-42d3-acfb-7e96daf77c22"
14519 wsmap="managed" id="SnapshotEvent"
14520 >
14521 <desc>Base interface for all snapshot events.</desc>
14522
14523 <attribute name="snapshotId" readonly="yes" type="uuid" mod="string">
14524 <desc>ID of the snapshot this event relates to.</desc>
14525 </attribute>
14526
14527 </interface>
14528
14529 <interface
14530 name="ISnapshotTakenEvent" extends="ISnapshotEvent"
14531 uuid="d27c0b3d-6038-422c-b45e-6d4a0503d9f1"
14532 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotTaken"
14533 >
14534 <desc>
14535 A new snapshot of the machine has been taken.
14536 <see>ISnapshot</see>
14537 </desc>
14538 </interface>
14539
14540 <interface
14541 name="ISnapshotDeletedEvent" extends="ISnapshotEvent"
14542 uuid="c48f3401-4a9e-43f4-b7a7-54bd285e22f4"
14543 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotDeleted"
14544 >
14545 <desc>
14546 Snapshot of the given machine has been deleted.
14547
14548 <note>
14549 This notification is delivered <b>after</b> the snapshot
14550 object has been uninitialized on the server (so that any
14551 attempt to call its methods will return an error).
14552 </note>
14553
14554 <see>ISnapshot</see>
14555 </desc>
14556 </interface>
14557
14558 <interface
14559 name="ISnapshotChangedEvent" extends="ISnapshotEvent"
14560 uuid="07541941-8079-447a-a33e-47a69c7980db"
14561 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotChanged"
14562 >
14563 <desc>
14564 Snapshot properties (name and/or description) have been changed.
14565 <see>ISnapshot</see>
14566 </desc>
14567 </interface>
14568
14569 <interface
14570 name="IMousePointerShapeChangedEvent" extends="IEvent"
14571 uuid="a6dcf6e8-416b-4181-8c4a-45ec95177aef"
14572 wsmap="managed" autogen="VBoxEvent" id="OnMousePointerShapeChanged"
14573 >
14574 <desc>
14575 Notification when the guest mouse pointer shape has
14576 changed. The new shape data is given.
14577 </desc>
14578
14579 <attribute name="visible" type="boolean" readonly="yes">
14580 <desc>
14581 Flag whether the pointer is visible.
14582 </desc>
14583 </attribute>
14584 <attribute name="alpha" type="boolean" readonly="yes">
14585 <desc>
14586 Flag whether the pointer has an alpha channel.
14587 </desc>
14588 </attribute>
14589 <attribute name="xhot" type="unsigned long" readonly="yes">
14590 <desc>
14591 The pointer hot spot X coordinate.
14592 </desc>
14593 </attribute>
14594 <attribute name="yhot" type="unsigned long" readonly="yes">
14595 <desc>
14596 The pointer hot spot Y coordinate.
14597 </desc>
14598 </attribute>
14599 <attribute name="width" type="unsigned long" readonly="yes">
14600 <desc>
14601 Width of the pointer shape in pixels.
14602 </desc>
14603 </attribute>
14604 <attribute name="height" type="unsigned long" readonly="yes">
14605 <desc>
14606 Height of the pointer shape in pixels.
14607 </desc>
14608 </attribute>
14609 <attribute name="shape" type="octet" safearray="yes" readonly="yes">
14610 <desc>
14611 Shape buffer arrays.
14612
14613 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
14614 followed by a 32-bpp XOR (color) mask.
14615
14616 For pointers without alpha channel the XOR mask pixels are 32
14617 bit values: (lsb)BGR0(msb). For pointers with alpha channel
14618 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
14619
14620 An AND mask is used for pointers with alpha channel, so if the
14621 callback does not support alpha, the pointer could be
14622 displayed as a normal color pointer.
14623
14624 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
14625 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
14626 height</tt>. The padding bits at the end of each scanline are
14627 undefined.
14628
14629 The XOR mask follows the AND mask on the next 4-byte aligned
14630 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
14631 Bytes in the gap between the AND and the XOR mask are undefined.
14632 The XOR mask scanlines have no gap between them and the size of
14633 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
14634
14635 <note>
14636 If @a shape is 0, only the pointer visibility is changed.
14637 </note>
14638 </desc>
14639 </attribute>
14640 </interface>
14641
14642 <interface
14643 name="IMouseCapabilityChangedEvent" extends="IEvent"
14644 uuid="d633ad48-820c-4207-b46c-6bd3596640d5"
14645 wsmap="managed" autogen="VBoxEvent" id="OnMouseCapabilityChanged"
14646 >
14647 <desc>
14648 Notification when the mouse capabilities reported by the
14649 guest have changed. The new capabilities are passed.
14650 </desc>
14651 <attribute name="supportsAbsolute" type="boolean" readonly="yes">
14652 <desc>
14653 Supports absolute coordinates.
14654 </desc>
14655 </attribute>
14656 <attribute name="supportsRelative" type="boolean" readonly="yes">
14657 <desc>
14658 Supports relative coordinates.
14659 </desc>
14660 </attribute>
14661 <attribute name="needsHostCursor" type="boolean" readonly="yes">
14662 <desc>
14663 If host cursor is needed.
14664 </desc>
14665 </attribute>
14666 </interface>
14667
14668 <interface
14669 name="IKeyboardLedsChangedEvent" extends="IEvent"
14670 uuid="6DDEF35E-4737-457B-99FC-BC52C851A44F"
14671 wsmap="managed" autogen="VBoxEvent" id="OnKeyboardLedsChanged"
14672 >
14673 <desc>
14674 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
14675 to alter the state of the keyboard LEDs.
14676 </desc>
14677 <attribute name="numLock" type="boolean" readonly="yes">
14678 <desc>
14679 NumLock status.
14680 </desc>
14681 </attribute>
14682 <attribute name="capsLock" type="boolean" readonly="yes">
14683 <desc>
14684 CapsLock status.
14685 </desc>
14686 </attribute>
14687 <attribute name="scrollLock" type="boolean" readonly="yes">
14688 <desc>
14689 ScrollLock status.
14690 </desc>
14691 </attribute>
14692 </interface>
14693
14694 <interface
14695 name="IStateChangedEvent" extends="IEvent"
14696 uuid="4376693C-CF37-453B-9289-3B0F521CAF27"
14697 wsmap="managed" autogen="VBoxEvent" id="OnStateChanged"
14698 >
14699 <desc>
14700 Notification when the execution state of the machine has changed.
14701 The new state is given.
14702 </desc>
14703 <attribute name="state" type="MachineState" readonly="yes">
14704 <desc>
14705 New machine state.
14706 </desc>
14707 </attribute>
14708 </interface>
14709
14710 <interface
14711 name="IAdditionsStateChangedEvent" extends="IEvent"
14712 uuid="D70F7915-DA7C-44C8-A7AC-9F173490446A"
14713 wsmap="managed" autogen="VBoxEvent" id="OnAdditionsStateChanged"
14714 >
14715 <desc>
14716 Notification when a Guest Additions property changes.
14717 Interested callees should query IGuest attributes to
14718 find out what has changed.
14719 </desc>
14720 </interface>
14721
14722 <interface
14723 name="INetworkAdapterChangedEvent" extends="IEvent"
14724 uuid="08889892-1EC6-4883-801D-77F56CFD0103"
14725 wsmap="managed" autogen="VBoxEvent" id="OnNetworkAdapterChanged"
14726 >
14727 <desc>
14728 Notification when a property of one of the
14729 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
14730 changes. Interested callees should use INetworkAdapter methods and
14731 attributes to find out what has changed.
14732 </desc>
14733 <attribute name="networkAdapter" type="INetworkAdapter" readonly="yes">
14734 <desc>
14735 Network adapter that is subject to change.
14736 </desc>
14737 </attribute>
14738 </interface>
14739
14740 <interface
14741 name="ISerialPortChangedEvent" extends="IEvent"
14742 uuid="3BA329DC-659C-488B-835C-4ECA7AE71C6C"
14743 wsmap="managed" autogen="VBoxEvent" id="OnSerialPortChanged"
14744 >
14745 <desc>
14746 Notification when a property of one of the
14747 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
14748 Interested callees should use ISerialPort methods and attributes
14749 to find out what has changed.
14750 </desc>
14751 <attribute name="serialPort" type="ISerialPort" readonly="yes">
14752 <desc>
14753 Serial port that is subject to change.
14754 </desc>
14755 </attribute>
14756 </interface>
14757
14758 <interface
14759 name="IParallelPortChangedEvent" extends="IEvent"
14760 uuid="813C99FC-9849-4F47-813E-24A75DC85615"
14761 wsmap="managed" autogen="VBoxEvent" id="OnParallelPortChanged"
14762 >
14763 <desc>
14764 Notification when a property of one of the
14765 virtual <link to="IMachine::getParallelPort">parallel ports</link>
14766 changes. Interested callees should use ISerialPort methods and
14767 attributes to find out what has changed.
14768 </desc>
14769 <attribute name="parallelPort" type="IParallelPort" readonly="yes">
14770 <desc>
14771 Parallel port that is subject to change.
14772 </desc>
14773 </attribute>
14774 </interface>
14775
14776 <interface
14777 name="IStorageControllerChangedEvent" extends="IEvent"
14778 uuid="715212BF-DA59-426E-8230-3831FAA52C56"
14779 wsmap="managed" autogen="VBoxEvent" id="OnStorageControllerChanged"
14780 >
14781 <desc>
14782 Notification when a
14783 <link to="IMachine::mediumAttachments">medium attachment</link>
14784 changes.
14785 </desc>
14786 </interface>
14787
14788 <interface
14789 name="IMediumChangedEvent" extends="IEvent"
14790 uuid="0FE2DA40-5637-472A-9736-72019EABD7DE"
14791 wsmap="managed" autogen="VBoxEvent" id="OnMediumChanged"
14792 >
14793 <desc>
14794 Notification when a
14795 <link to="IMachine::mediumAttachments">medium attachment</link>
14796 changes.
14797 </desc>
14798 <attribute name="mediumAttachment" type="IMediumAttachment" readonly="yes">
14799 <desc>
14800 Medium attachment that is subject to change.
14801 </desc>
14802 </attribute>
14803 </interface>
14804
14805 <interface
14806 name="ICPUChangedEvent" extends="IEvent"
14807 uuid="D0F0BECC-EE17-4D17-A8CC-383B0EB55E9D"
14808 wsmap="managed" autogen="VBoxEvent" id="OnCPUChanged"
14809 >
14810 <desc>
14811 Notification when a CPU changes.
14812 </desc>
14813 <attribute name="cpu" type="unsigned long" readonly="yes">
14814 <desc>
14815 The CPU which changed.
14816 </desc>
14817 </attribute>
14818 <attribute name="add" type="boolean" readonly="yes">
14819 <desc>
14820 Flag whether the CPU was added or removed.
14821 </desc>
14822 </attribute>
14823 </interface>
14824
14825 <interface
14826 name="ICPUExecutionCapChangedEvent" extends="IEvent"
14827 uuid="dfa7e4f5-b4a4-44ce-85a8-127ac5eb59dc"
14828 wsmap="managed" autogen="VBoxEvent" id="OnCPUExecutionCapChanged"
14829 >
14830 <desc>
14831 Notification when the CPU execution cap changes.
14832 </desc>
14833 <attribute name="executionCap" type="unsigned long" readonly="yes">
14834 <desc>
14835 The new CPU execution cap value. (1-100)
14836 </desc>
14837 </attribute>
14838 </interface>
14839
14840 <interface
14841 name="IGuestKeyboardEvent" extends="IEvent"
14842 uuid="88394258-7006-40d4-b339-472ee3801844"
14843 wsmap="managed" autogen="VBoxEvent" id="OnGuestKeyboardEvent"
14844 >
14845 <desc>
14846 Notification when guest keyboard event happens.
14847 </desc>
14848 <attribute name="scancodes" type="long" safearray="yes" readonly="yes">
14849 <desc>
14850 Array of scancodes.
14851 </desc>
14852 </attribute>
14853 </interface>
14854
14855 <interface
14856 name="IGuestMouseEvent" extends="IReusableEvent"
14857 uuid="1f85d35c-c524-40ff-8e98-307000df0992"
14858 wsmap="managed" autogen="VBoxEvent" id="OnGuestMouseEvent"
14859 >
14860 <desc>
14861 Notification when guest mouse event happens.
14862 </desc>
14863
14864 <attribute name="absolute" type="boolean" readonly="yes">
14865 <desc>
14866 If this event is relative or absolute.
14867 </desc>
14868 </attribute>
14869
14870 <attribute name="x" type="long" readonly="yes">
14871 <desc>
14872 New X position, or X delta.
14873 </desc>
14874 </attribute>
14875
14876 <attribute name="y" type="long" readonly="yes">
14877 <desc>
14878 New Y position, or Y delta.
14879 </desc>
14880 </attribute>
14881
14882 <attribute name="z" type="long" readonly="yes">
14883 <desc>
14884 Z delta.
14885 </desc>
14886 </attribute>
14887
14888 <attribute name="w" type="long" readonly="yes">
14889 <desc>
14890 W delta.
14891 </desc>
14892 </attribute>
14893
14894 <attribute name="buttons" type="long" readonly="yes">
14895 <desc>
14896 Button state bitmask.
14897 </desc>
14898 </attribute>
14899
14900 </interface>
14901
14902
14903 <interface
14904 name="IVRDPServerChangedEvent" extends="IEvent"
14905 uuid="726038B6-6279-4A7A-8037-D041693D1915"
14906 wsmap="managed" autogen="VBoxEvent" id="OnVRDPServerChanged"
14907 >
14908 <desc>
14909 Notification when a property of the
14910 <link to="IMachine::VRDPServer">VRDP server</link> changes.
14911 Interested callees should use IVRDPServer methods and attributes to
14912 find out what has changed.
14913 </desc>
14914 </interface>
14915
14916 <interface
14917 name="IRemoteDisplayInfoChangedEvent" extends="IEvent"
14918 uuid="65B556C5-2A99-47D8-B311-FC177F0914CD"
14919 wsmap="managed" autogen="VBoxEvent" id="OnRemoteDisplayInfoChanged"
14920 >
14921 <desc>
14922 Notification when the status of the VRDP server changes. Interested callees
14923 should use <link to="IConsole::remoteDisplayInfo">IRemoteDisplayInfo</link>
14924 attributes to find out what is the current status.
14925 </desc>
14926 </interface>
14927
14928 <interface
14929 name="IUSBControllerChangedEvent" extends="IEvent"
14930 uuid="93BADC0C-61D9-4940-A084-E6BB29AF3D83"
14931 wsmap="managed" autogen="VBoxEvent" id="OnUSBControllerChanged"
14932 >
14933 <desc>
14934 Notification when a property of the virtual
14935 <link to="IMachine::USBController">USB controller</link> changes.
14936 Interested callees should use IUSBController methods and attributes to
14937 find out what has changed.
14938 </desc>
14939 </interface>
14940
14941 <interface
14942 name="IUSBDeviceStateChangedEvent" extends="IEvent"
14943 uuid="806da61b-6679-422a-b629-51b06b0c6d93"
14944 wsmap="managed" autogen="VBoxEvent" id="OnUSBDeviceStateChanged"
14945 >
14946 <desc>
14947 Notification when a USB device is attached to or detached from
14948 the virtual USB controller.
14949
14950 This notification is sent as a result of the indirect
14951 request to attach the device because it matches one of the
14952 machine USB filters, or as a result of the direct request
14953 issued by <link to="IConsole::attachUSBDevice"/> or
14954 <link to="IConsole::detachUSBDevice"/>.
14955
14956 This notification is sent in case of both a succeeded and a
14957 failed request completion. When the request succeeds, the
14958 @a error parameter is @c null, and the given device has been
14959 already added to (when @a attached is @c true) or removed from
14960 (when @a attached is @c false) the collection represented by
14961 <link to="IConsole::USBDevices"/>. On failure, the collection
14962 doesn't change and the @a error parameter represents the error
14963 message describing the failure.
14964 </desc>
14965 <attribute name="device" type="IUSBDevice" readonly="yes">
14966 <desc>
14967 Device that is subject to state change.
14968 </desc>
14969 </attribute>
14970 <attribute name="attached" type="boolean" readonly="yes">
14971 <desc>
14972 @c true if the device was attached and @c false otherwise.
14973 </desc>
14974 </attribute>
14975 <attribute name="error" type="IVirtualBoxErrorInfo" readonly="yes">
14976 <desc>
14977 @c null on success or an error message object on failure.
14978 </desc>
14979 </attribute>
14980 </interface>
14981
14982 <interface
14983 name="ISharedFolderChangedEvent" extends="IEvent"
14984 uuid="B66349B5-3534-4239-B2DE-8E1535D94C0B"
14985 wsmap="managed" autogen="VBoxEvent" id="OnSharedFolderChanged"
14986 >
14987 <desc>
14988 Notification when a shared folder is added or removed.
14989 The @a scope argument defines one of three scopes:
14990 <link to="IVirtualBox::sharedFolders">global shared folders</link>
14991 (<link to="Scope_Global">Global</link>),
14992 <link to="IMachine::sharedFolders">permanent shared folders</link> of
14993 the machine (<link to="Scope_Machine">Machine</link>) or <link
14994 to="IConsole::sharedFolders">transient shared folders</link> of the
14995 machine (<link to="Scope_Session">Session</link>). Interested callees
14996 should use query the corresponding collections to find out what has
14997 changed.
14998 </desc>
14999 <attribute name="scope" type="Scope" readonly="yes">
15000 <desc>
15001 Scope of the notification.
15002 </desc>
15003 </attribute>
15004 </interface>
15005
15006 <interface
15007 name="IRuntimeErrorEvent" extends="IEvent"
15008 uuid="883DD18B-0721-4CDE-867C-1A82ABAF914C"
15009 wsmap="managed" autogen="VBoxEvent" id="OnRuntimeError"
15010 >
15011 <desc>
15012 Notification when an error happens during the virtual
15013 machine execution.
15014
15015 There are three kinds of runtime errors:
15016 <ul>
15017 <li><i>fatal</i></li>
15018 <li><i>non-fatal with retry</i></li>
15019 <li><i>non-fatal warnings</i></li>
15020 </ul>
15021
15022 <b>Fatal</b> errors are indicated by the @a fatal parameter set
15023 to @c true. In case of fatal errors, the virtual machine
15024 execution is always paused before calling this notification, and
15025 the notification handler is supposed either to immediately save
15026 the virtual machine state using <link to="IConsole::saveState"/>
15027 or power it off using <link to="IConsole::powerDown"/>.
15028 Resuming the execution can lead to unpredictable results.
15029
15030 <b>Non-fatal</b> errors and warnings are indicated by the
15031 @a fatal parameter set to @c false. If the virtual machine
15032 is in the Paused state by the time the error notification is
15033 received, it means that the user can <i>try to resume</i> the machine
15034 execution after attempting to solve the problem that caused the
15035 error. In this case, the notification handler is supposed
15036 to show an appropriate message to the user (depending on the
15037 value of the @a id parameter) that offers several actions such
15038 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
15039 wants to retry, the notification handler should continue
15040 the machine execution using the <link to="IConsole::resume"/>
15041 call. If the machine execution is not Paused during this
15042 notification, then it means this notification is a <i>warning</i>
15043 (for example, about a fatal condition that can happen very soon);
15044 no immediate action is required from the user, the machine
15045 continues its normal execution.
15046
15047 Note that in either case the notification handler
15048 <b>must not</b> perform any action directly on a thread
15049 where this notification is called. Everything it is allowed to
15050 do is to post a message to another thread that will then talk
15051 to the user and take the corresponding action.
15052
15053 Currently, the following error identifiers are known:
15054 <ul>
15055 <li><tt>"HostMemoryLow"</tt></li>
15056 <li><tt>"HostAudioNotResponding"</tt></li>
15057 <li><tt>"VDIStorageFull"</tt></li>
15058 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
15059 </ul>
15060 </desc>
15061 <attribute name="fatal" type="boolean" readonly="yes">
15062 <desc>
15063 Whether the error is fatal or not.
15064 </desc>
15065 </attribute>
15066 <attribute name="id" type="wstring" readonly="yes">
15067 <desc>
15068 Error identifier.
15069 </desc>
15070 </attribute>
15071 <attribute name="message" type="wstring" readonly="yes">
15072 <desc>
15073 Optional error message.
15074 </desc>
15075 </attribute>
15076 </interface>
15077
15078
15079 <interface
15080 name="IEventSourceChangedEvent" extends="IEvent"
15081 uuid="e7932cb8-f6d4-4ab6-9cbf-558eb8959a6a"
15082 waitable="yes"
15083 wsmap="managed" autogen="VBoxEvent" id="OnEventSourceChanged"
15084 >
15085 <desc>
15086 Notification when an event source state changes (listener added or removed).
15087 </desc>
15088
15089 <attribute name="listener" type="IEventListener" readonly="yes">
15090 <desc>
15091 Event listener which has changed.
15092 </desc>
15093 </attribute>
15094
15095 <attribute name="add" type="boolean" readonly="yes">
15096 <desc>
15097 Flag whether listener was added or removed.
15098 </desc>
15099 </attribute>
15100 </interface>
15101
15102 <interface
15103 name="IExtraDataChangedEvent" extends="IEvent"
15104 uuid="024F00CE-6E0B-492A-A8D0-968472A94DC7"
15105 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataChanged"
15106 >
15107 <desc>
15108 Notification when machine specific or global extra data
15109 has changed.
15110 </desc>
15111 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
15112 <desc>
15113 ID of the machine this event relates to.
15114 Null for global extra data changes.
15115 </desc>
15116 </attribute>
15117 <attribute name="key" type="wstring" readonly="yes">
15118 <desc>
15119 Extra data key that has changed.
15120 </desc>
15121 </attribute>
15122 <attribute name="value" type="wstring" readonly="yes">
15123 <desc>
15124 Extra data value for the given key.
15125 </desc>
15126 </attribute>
15127 </interface>
15128
15129 <interface
15130 name="IVetoEvent" extends="IEvent"
15131 uuid="9a1a4130-69fe-472f-ac10-c6fa25d75007"
15132 wsmap="managed"
15133 >
15134 <desc>Base abstract interface for veto events.</desc>
15135
15136 <method name="addVeto">
15137 <desc>
15138 Adds a veto on this event.
15139 </desc>
15140 <param name="reason" type="wstring" dir="in">
15141 <desc>
15142 Reason for veto, could be null or empty string.
15143 </desc>
15144 </param>
15145 </method>
15146
15147 <method name="isVetoed">
15148 <desc>
15149 If this event was vetoed.
15150 </desc>
15151 <param name="result" type="boolean" dir="return">
15152 <desc>
15153 Reason for veto.
15154 </desc>
15155 </param>
15156 </method>
15157
15158 <method name="getVetos">
15159 <desc>
15160 Current veto reason list, if size is 0 - no veto.
15161 </desc>
15162 <param name="result" type="wstring" dir="return" safearray="yes">
15163 <desc>
15164 Array of reasons for veto provided by different event handlers.
15165 </desc>
15166 </param>
15167 </method>
15168
15169 </interface>
15170
15171 <interface
15172 name="IExtraDataCanChangeEvent" extends="IVetoEvent"
15173 uuid="245d88bd-800a-40f8-87a6-170d02249a55"
15174 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataCanChange"
15175 waitable="true"
15176 >
15177 <desc>
15178 Notification when someone tries to change extra data for
15179 either the given machine or (if @c null) global extra data.
15180 This gives the chance to veto against changes.
15181 </desc>
15182 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
15183 <desc>
15184 ID of the machine this event relates to.
15185 Null for global extra data changes.
15186 </desc>
15187 </attribute>
15188 <attribute name="key" type="wstring" readonly="yes">
15189 <desc>
15190 Extra data key that has changed.
15191 </desc>
15192 </attribute>
15193 <attribute name="value" type="wstring" readonly="yes">
15194 <desc>
15195 Extra data value for the given key.
15196 </desc>
15197 </attribute>
15198 </interface>
15199
15200 <interface
15201 name="ICanShowWindowEvent" extends="IVetoEvent"
15202 uuid="adf292b0-92c9-4a77-9d35-e058b39fe0b9"
15203 wsmap="managed" autogen="VBoxEvent" id="OnCanShowWindow"
15204 waitable="true"
15205 >
15206 <desc>
15207 Notification when a call to
15208 <link to="IMachine::canShowConsoleWindow"/> is made by a
15209 front-end to check if a subsequent call to
15210 <link to="IMachine::showConsoleWindow"/> can succeed.
15211
15212 The callee should give an answer appropriate to the current
15213 machine state using event veto. This answer must
15214 remain valid at least until the next
15215 <link to="IConsole::state">machine state</link> change.
15216 </desc>
15217 </interface>
15218
15219 <interface
15220 name="IShowWindowEvent" extends="IEvent"
15221 uuid="B0A0904D-2F05-4D28-855F-488F96BAD2B2"
15222 wsmap="managed" autogen="VBoxEvent" id="OnShowWindow"
15223 waitable="true"
15224 >
15225 <desc>
15226 Notification when a call to
15227 <link to="IMachine::showConsoleWindow"/>
15228 requests the console window to be activated and brought to
15229 foreground on the desktop of the host PC.
15230
15231 This notification should cause the VM console process to
15232 perform the requested action as described above. If it is
15233 impossible to do it at a time of this notification, this
15234 method should return a failure.
15235
15236 Note that many modern window managers on many platforms
15237 implement some sort of focus stealing prevention logic, so
15238 that it may be impossible to activate a window without the
15239 help of the currently active application (which is supposedly
15240 an initiator of this notification). In this case, this method
15241 must return a non-zero identifier that represents the
15242 top-level window of the VM console process. The caller, if it
15243 represents a currently active process, is responsible to use
15244 this identifier (in a platform-dependent manner) to perform
15245 actual window activation.
15246
15247 This method must set @a winId to zero if it has performed all
15248 actions necessary to complete the request and the console
15249 window is now active and in foreground, to indicate that no
15250 further action is required on the caller's side.
15251 </desc>
15252 <attribute name="winId" type="long long">
15253 <desc>
15254 Platform-dependent identifier of the top-level VM console
15255 window, or zero if this method has performed all actions
15256 necessary to implement the <i>show window</i> semantics for
15257 the given platform and/or this VirtualBox front-end.
15258 </desc>
15259 </attribute>
15260 </interface>
15261
15262 <module name="VBoxSVC" context="LocalServer">
15263 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
15264 namespace="virtualbox.org">
15265 <interface name="IVirtualBox" default="yes"/>
15266 </class>
15267 </module>
15268
15269 <module name="VBoxC" context="InprocServer" threadingModel="Free">
15270 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
15271 namespace="virtualbox.org">
15272 <interface name="ISession" default="yes"/>
15273 </class>
15274
15275 <class name="Console" uuid="577230FF-164F-4CAC-8548-312D8275A4A7"
15276 namespace="virtualbox.org">
15277 <interface name="IConsole" default="yes"/>
15278 </class>
15279 </module>
15280
15281</library>
15282
15283</idl>
15284
15285<!-- 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