VirtualBox

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

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

Main: rename LockForSession() API to LockMachine() and fix parameters; move code from internal open*Session() methods into LockMachine()

  • Property svn:eol-style set to native
File size: 550.9 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4
5 Copyright (C) 2006-2010 Oracle Corporation
6
7 This file is part of VirtualBox Open Source Edition (OSE), as
8 available from http://www.virtualbox.org. This file is free software;
9 you can redistribute it and/or modify it under the terms of the GNU
10 General Public License (GPL) as published by the Free Software
11 Foundation, in version 2 as it comes in the "COPYING" file of the
12 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
13 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
14-->
15
16<!--
17 This is the master declaration for VirtualBox's Main API,
18 represented by COM/XPCOM and web service interfaces.
19
20 From this document, the build system generates several files
21 via XSLT that are then used during the build process.
22
23 Below is the list of XSL templates that operate on this file and
24 output files they generate. These XSL templates must be updated
25 whenever the schema of this file changes:
26
27 1. src/VBox/Main/idl/midl.xsl =>
28 out/<platform>/bin/sdk/idl/VirtualBox.idl
29 (MS COM interface definition file for Main API)
30
31 2. src/VBox/Main/idl/xpidl.xsl =>
32 out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
33 (XPCOM interface definition file for Main API)
34
35 3. src/VBox/Main/idl/doxygen.xsl =>
36 out/<platform>/obj/src/VBox/Main/VirtualBox.idl
37 (pseudo-IDL for Doxygen to generate the official Main API
38 documentation)
39
40 4. src/VBox/Main/webservice/*.xsl =>
41 a bunch of WSDL and C++ files
42 (VirtualBox web service sources and SOAP mappers;
43 see src/VBox/Main/webservice/Makefile.kmk for details)
44
45 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
46 out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
47 (smart Qt-based C++ wrapper classes for COM interfaces
48 of the Main API)
49
50 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
51 out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
52 (Main API TypeLib block for the WiX installer)
53
54 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
55 out/<platform>/obj/Runtime/errmsgvboxcomdata.h
56 (<result> extraction for the %Rhrc format specifier)
57-->
58
59<idl>
60
61<desc>
62 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
63 describes the so-called <i>VirtualBox Main API</i> which comprises all public
64 COM interfaces and components provided by the VirtualBox server and by the
65 VirtualBox client library.
66
67 VirtualBox employs a client-server design, meaning that whenever any part of
68 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
69 interface or any virtual machine --, a dedicated server process named
70 VBoxSVC runs in the background. This allows multiple processes working with
71 VirtualBox to cooperate without conflicts. These processes communicate to each
72 other using inter-process communication facilities provided by the COM
73 implementation of the host computer.
74
75 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
76 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
77 implementation, is used.
78
79 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
80 the VBoxManage command-line interface and the VBoxVRDP server) are technically
81 front-ends to the Main API and only use the interfaces that are documented
82 in this Main API documentation. This ensures that, with any given release
83 version of VirtualBox, all capabilities of the product that could be useful
84 to an external client program are always exposed by way of this API.
85
86 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
87 contains two public component classes:
88 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
89 implement IVirtualBox and ISession interfaces respectively. These two classes
90 are of supreme importance and will be needed in order for any front-end
91 program to do anything useful. It is recommended to read the documentation of
92 the mentioned interfaces first.
93
94 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
95 there can be only one object of this class on the local machine at any given
96 time. This object is a parent of many other objects in the VirtualBox COM
97 library and lives in the VBoxSVC process. In fact, when you create an instance
98 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
99 process is already running, starts it if not, and returns you a reference to
100 the <tt>VirtualBox</tt> object created in this process. When the last reference
101 to this object is released, the VBoxSVC process ends (with a 5 second delay to
102 protect from too frequent restarts).
103
104 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
105 as many <tt>Session</tt> objects as you need but all of them will live in a
106 process which issues the object instantiation call. <tt>Session</tt> objects
107 represent virtual machine sessions which are used to configure virtual
108 machines and control their execution.
109</desc>
110
111<if target="midl">
112 <cpp line="enum {"/>
113 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
114 <cpp line=" kTypeLibraryMinorVersion = 0"/>
115 <cpp line="};"/>
116</if>
117
118<if target="xpidl">
119 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
120 <cpp>
121/* currently, nsISupportsImpl.h lacks the below-like macros */
122
123#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
124#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
125#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI NS_IMPL_QUERY_INTERFACE3_CI
126#define NS_IMPL_THREADSAFE_QUERY_INTERFACE4_CI NS_IMPL_QUERY_INTERFACE4_CI
127
128
129#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
130# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
131 NS_IMPL_THREADSAFE_ADDREF(_class) \
132 NS_IMPL_THREADSAFE_RELEASE(_class) \
133 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
134 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
135#endif
136
137#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
138# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
139 NS_IMPL_THREADSAFE_ADDREF(_class) \
140 NS_IMPL_THREADSAFE_RELEASE(_class) \
141 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
142 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
143#endif
144
145#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_CI
146# define NS_IMPL_THREADSAFE_ISUPPORTS3_CI(_class, _i1, _i2, _i3) \
147 NS_IMPL_THREADSAFE_ADDREF(_class) \
148 NS_IMPL_THREADSAFE_RELEASE(_class) \
149 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI(_class, _i1, _i2, _i3) \
150 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
151#endif
152
153#ifndef NS_IMPL_THREADSAFE_ISUPPORTS4_CI
154# define NS_IMPL_THREADSAFE_ISUPPORTS4_CI(_class, _i1, _i2, _i3, _i4) \
155 NS_IMPL_THREADSAFE_ADDREF(_class) \
156 NS_IMPL_THREADSAFE_RELEASE(_class) \
157 NS_IMPL_THREADSAFE_QUERY_INTERFACE4_CI(_class, _i1, _i2, _i3, _i4) \
158 NS_IMPL_CI_INTERFACE_GETTER4(_class, _i1, _i2, _i3, _i4)
159#endif
160
161#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
162# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
163 NS_INTERFACE_MAP_BEGIN(_class) \
164 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
165 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
166 NS_IMPL_QUERY_CLASSINFO(_class) \
167 NS_INTERFACE_MAP_END
168#endif
169
170#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
171# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
172 _i2, _ic2) \
173 NS_INTERFACE_MAP_BEGIN(_class) \
174 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
175 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
176 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
177 NS_IMPL_QUERY_CLASSINFO(_class) \
178 NS_INTERFACE_MAP_END
179#endif
180
181#ifndef NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
182# define NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
183 _i2, _ic2, _i3, _ic3) \
184 NS_INTERFACE_MAP_BEGIN(_class) \
185 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
186 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
187 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i3, _ic3) \
188 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
189 NS_IMPL_QUERY_CLASSINFO(_class) \
190 NS_INTERFACE_MAP_END
191#endif
192
193#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
194#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
195#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
196
197#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
198# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
199 NS_IMPL_THREADSAFE_ADDREF(_class) \
200 NS_IMPL_THREADSAFE_RELEASE(_class) \
201 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
202 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
203#endif
204
205#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
206# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
207 _i2, _ic2) \
208 NS_IMPL_THREADSAFE_ADDREF(_class) \
209 NS_IMPL_THREADSAFE_RELEASE(_class) \
210 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
211 _i2, _ic2) \
212 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
213#endif
214
215#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI
216# define NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI(_class, _i1, _ic1, \
217 _i2, _ic2, _i3, _ic3) \
218 NS_IMPL_THREADSAFE_ADDREF(_class) \
219 NS_IMPL_THREADSAFE_RELEASE(_class) \
220 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
221 _i2, _ic2, _i3, _ic3) \
222 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
223#endif
224
225 </cpp>
226</if>
227
228<library
229 name="VirtualBox"
230 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
231 version="1.3"
232 desc="VirtualBox Type Library"
233 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
234 supportsErrorInfo="yes"
235>
236
237
238 <!--
239 // COM result codes for VirtualBox
240 /////////////////////////////////////////////////////////////////////////
241 -->
242
243 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
244 <desc>
245 This section describes all VirtualBox-specific COM result codes that may
246 be returned by methods of VirtualBox COM interfaces in addition to
247 standard COM result codes.
248
249 Note that along with the result code, every VirtualBox method returns
250 extended error information through the IVirtualBoxErrorInfo interface on
251 failure. This interface is a preferred way to present the error to the end
252 user because it contains a human readable description of the error. Raw
253 result codes, both standard and described in this section, are intended to
254 be used by programs to analyze the reason of a failure and select an
255 appropriate course of action without involving the end user (for example,
256 retry the operation later or make a different call).
257
258 The standard COM result codes that may originate from our methods include:
259
260 <table>
261 <tr><td>E_INVALIDARG</td>
262 <td>
263 Returned when the value of the method's argument is not within the range
264 of valid values. This should not be confused with situations when the
265 value is within the range but simply doesn't suit the current object
266 state and there is a possibility that it will be accepted later (in such
267 cases VirtualBox-specific codes are returned, for example,
268 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
269 </td>
270 </tr>
271 <tr><td>E_POINTER</td>
272 <td>
273 Returned if a memory pointer for the output argument is invalid (for
274 example, @c null). Note that when pointers representing input
275 arguments (such as strings) are invalid, E_INVALIDARG is returned.
276 </td>
277 </tr>
278 <tr><td>E_ACCESSDENIED</td>
279 <td>
280 Returned when the called object is not ready. Since the lifetime of a
281 public COM object cannot be fully controlled by the implementation,
282 VirtualBox maintains the readiness state for all objects it creates and
283 returns this code in response to any method call on the object that was
284 deactivated by VirtualBox and is not functioning any more.
285 </td>
286 </tr>
287 <tr><td>E_OUTOFMEMORY</td>
288 <td>
289 Returned when a memory allocation operation fails.
290 </td>
291 </tr>
292 </table>
293 </desc>
294 </descGroup>
295
296 <!--
297 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
298 everything in <result>/<desc> after (and including) the first dot, so express
299 the matter of the error code in the first sentence and keep it short.
300 -->
301
302 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
303 <desc>
304 Object corresponding to the supplied arguments does not exist.
305 </desc>
306 </result>
307
308 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
309 <desc>
310 Current virtual machine state prevents the operation.
311 </desc>
312 </result>
313
314 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
315 <desc>
316 Virtual machine error occurred attempting the operation.
317 </desc>
318 </result>
319
320 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
321 <desc>
322 File not accessible or erroneous file contents.
323 </desc>
324 </result>
325
326 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
327 <desc>
328 Runtime subsystem error.
329 </desc>
330 </result>
331
332 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
333 <desc>
334 Pluggable Device Manager error.
335 </desc>
336 </result>
337
338 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
339 <desc>
340 Current object state prohibits operation.
341 </desc>
342 </result>
343
344 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
345 <desc>
346 Host operating system related error.
347 </desc>
348 </result>
349
350 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
351 <desc>
352 Requested operation is not supported.
353 </desc>
354 </result>
355
356 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
357 <desc>
358 Invalid XML found.
359 </desc>
360 </result>
361
362 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
363 <desc>
364 Current session state prohibits operation.
365 </desc>
366 </result>
367
368 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
369 <desc>
370 Object being in use prohibits operation.
371 </desc>
372 </result>
373
374 <!--
375 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
376 everything in <result>/<desc> after (and including) the first dot, so express
377 the matter of the error code in the first sentence and keep it short.
378 -->
379
380 <descGroup/>
381
382 <!--
383 // all common enums
384 /////////////////////////////////////////////////////////////////////////
385 -->
386
387 <enum name="SettingsVersion"
388 uuid="52bd6f5f-1adb-4493-975d-581a9c4b803f"
389 >
390 <desc>Settings version of VirtualBox settings files. This is written to
391 the "version" attribute of the root "VirtualBox" element in the settings
392 file XML and indicates which VirtualBox version wrote the file.
393 </desc>
394
395 <const name="Null" value="0">
396 <desc>Null value, indicates invalid version.</desc>
397 </const>
398 <const name="v1_0" value="1">
399 <desc>Legacy settings version, not currently supported.</desc>
400 </const>
401 <const name="v1_1" value="2">
402 <desc>Legacy settings version, not currently supported.</desc>
403 </const>
404 <const name="v1_2" value="3">
405 <desc>Legacy settings version, not currently supported.</desc>
406 </const>
407 <const name="v1_3pre" value="4">
408 <desc>Legacy settings version, not currently supported.</desc>
409 </const>
410 <const name="v1_3" value="5">
411 <desc>Settings version "1.3", written by VirtualBox 2.0.12.</desc>
412 <!--
413 Machine XML: Capitalization of Uart, Lpt elements and many attributes changed.
414 -->
415 </const>
416 <const name="v1_4" value="6">
417 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
418 <!--
419 VirtualBox.xml: big DiskRegistry -> MediaRegistry revamp, various HardDisk types merged
420 (was VirtualDiskImage, VMDKImage, VHDImage, ISCSIHardDisk, CustomHardDisk, DiffHardDisk)
421 -->
422 </const>
423 <const name="v1_5" value="7">
424 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
425 <!-- 2008-09-04: 2.0.0 released
426 2008-11-20: settings version 1.5 introduced
427 2008-12-17: 2.1.0 released
428 Machine changes:
429 guest OS identifiers changed;
430 Machine/Hardware/Display/MonitorCount renamed to monitorCount;
431 Machine/Hardware/Display/Accelerate3D renamed to accelerate3D;
432 Machine/Hardware/CPU/CPUCount/@count changed to CPU/@count
433 -->
434 </const>
435 <const name="v1_6" value="8">
436 <desc>Settings version "1.6", written by VirtualBox 2.1.4 (at least).</desc>
437 <!-- 2008-12-17: 2.1.0 released
438 2008-12-19: settings version 1.6 introduced (is in 2.1 branch)
439 2009-04-08: 2.2.0 released
440 Machine changes: remove all Machine/Hardware/Network/Adapter/HostInterface[@TAPSetup or @TAPTerminate]/ attributes (done)
441 -->
442 </const>
443 <const name="v1_7" value="9">
444 <desc>Settings version "1.7", written by VirtualBox 2.2.x and 3.0.x.</desc>
445 <!-- 2008-12-17: 2.1.0 released
446 2009-03-11: settings version 1.7 introduced (is in 2.2 branch)
447 2009-04-08: 2.2.0 released
448 VirtualBox.xml additions: NetserviceRegistry with DHCPServers (done)
449 Machine changes: HardDiskAttachments is now StorageControllers (done)
450 -->
451 </const>
452 <const name="v1_8" value="10">
453 <desc>Intermediate settings version "1.8", understood by VirtualBox 3.1.x.</desc>
454 <!-- Machine additions: Display/@accelerate2DVideo (done)
455 -->
456 </const>
457 <const name="v1_9" value="11">
458 <desc>Settings version "1.9", written by VirtualBox 3.1.x.</desc>
459 <!-- The big storage controller / DVD / Floppy rework (done)
460 -->
461 </const>
462 <const name="v1_10" value="12">
463 <desc>Settings version "1.10", written by VirtualBox 3.2.x.</desc>
464 <!-- Machine changes: RTC localOrUTC (done)
465 CPU hot-plug support
466 -->
467 </const>
468 <const name="v1_11" value="13">
469 <desc>Settings version "1.11", written by VirtualBox 3.3.x.</desc>
470 <!-- Machine changes: HD Audio controller
471 -->
472 </const>
473 <const name="Future" value="99999">
474 <desc>Settings version greater than "1.10", written by a future VirtualBox version.</desc>
475 </const>
476 </enum>
477
478 <enum
479 name="AccessMode"
480 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
481 >
482 <desc>
483 Access mode for opening files.
484 </desc>
485
486 <const name="ReadOnly" value="1"/>
487 <const name="ReadWrite" value="2"/>
488 </enum>
489
490 <enum
491 name="MachineState"
492 uuid="e998d075-543a-41fc-8aa9-5ca3e92393fd"
493 >
494 <desc>
495 Virtual machine execution state.
496
497 This enumeration represents possible values of the <link
498 to="IMachine::state"/> attribute.
499
500 Below is the basic virtual machine state diagram. It shows how the state
501 changes during virtual machine execution. The text in square braces shows
502 a method of the IConsole interface that performs the given state
503 transition.
504
505 <pre>
506 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
507 V |
508 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
509 | | | | V |
510 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
511 | | ^ | ^ |
512 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
513 | ^ | | | |
514 | | +-----------------------------------------+-|-------------------+ +
515 | | | | |
516 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
517 | | | |
518 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
519 | | |
520 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
521 </pre>
522
523 Note that states to the right from PoweredOff, Aborted and Saved in the
524 above diagram are called <i>online VM states</i>. These states
525 represent the virtual machine which is being executed in a dedicated
526 process (usually with a GUI window attached to it where you can see the
527 activity of the virtual machine and interact with it). There are two
528 special pseudo-states, FirstOnline and LastOnline, that can be used in
529 relational expressions to detect if the given machine state is online or
530 not:
531
532 <pre>
533 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
534 machine.GetState() &lt;= MachineState_LastOnline)
535 {
536 ...the machine is being executed...
537 }
538 </pre>
539
540 When the virtual machine is in one of the online VM states (that is, being
541 executed), only a few machine settings can be modified. Methods working
542 with such settings contain an explicit note about that. An attempt to
543 change any oter setting or perform a modifying operation during this time
544 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
545
546 All online states except Running, Paused and Stuck are transitional: they
547 represent temporary conditions of the virtual machine that will last as
548 long as the operation that initiated such a condition.
549
550 The Stuck state is a special case. It means that execution of the machine
551 has reached the "Guru Meditation" condition. This condition indicates an
552 internal VMM (virtual machine manager) failure which may happen as a
553 result of either an unhandled low-level virtual hardware exception or one
554 of the recompiler exceptions (such as the <i>too-many-traps</i>
555 condition).
556
557 Note also that any online VM state may transit to the Aborted state. This
558 happens if the process that is executing the virtual machine terminates
559 unexpectedly (for example, crashes). Other than that, the Aborted state is
560 equivalent to PoweredOff.
561
562 There are also a few additional state diagrams that do not deal with
563 virtual machine execution and therefore are shown separately. The states
564 shown on these diagrams are called <i>offline VM states</i> (this includes
565 PoweredOff, Aborted and Saved too).
566
567 The first diagram shows what happens when a lengthy setup operation is
568 being executed (such as <link to="IMachine::attachDevice"/>).
569
570 <pre>
571 +----------------------------------(same state as before the call)------+
572 | |
573 +-&gt; PoweredOff --+ |
574 | | |
575 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
576 | |
577 +-&gt; Saved -------+
578 </pre>
579
580 The next two diagrams demonstrate the process of taking a snapshot of a
581 powered off virtual machine, restoring the state to that as of a snapshot
582 or deleting a snapshot, respectively.
583
584 <pre>
585 +----------------------------------(same state as before the call)------+
586 | |
587 +-&gt; PoweredOff --+ |
588 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
589 +-&gt; Aborted -----+
590
591 +-&gt; PoweredOff --+
592 | |
593 | Aborted -----+--&gt;[restoreSnapshot() ]-------&gt; RestoringSnapshot -+
594 | | [deleteSnapshot() ]-------&gt; DeletingSnapshot --+
595 +-&gt; Saved -------+ |
596 | |
597 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
598 </pre>
599
600 Note that the Saving state is present in both the offline state group and
601 online state group. Currently, the only way to determine what group is
602 assumed in a particular case is to remember the previous machine state: if
603 it was Running or Paused, then Saving is an online state, otherwise it is
604 an offline state. This inconsistency may be removed in one of the future
605 versions of VirtualBox by adding a new state.
606
607 <note internal="yes">
608 For whoever decides to touch this enum: In order to keep the
609 comparisons involving FirstOnline and LastOnline pseudo-states valid,
610 the numeric values of these states must be correspondingly updated if
611 needed: for any online VM state, the condition
612 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
613 @c true. The same relates to transient states for which
614 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
615 @c true.
616 </note>
617 </desc>
618
619 <const name="Null" value="0">
620 <desc>Null value (never used by the API).</desc>
621 </const>
622 <const name="PoweredOff" value="1">
623 <desc>
624 The machine is not running and has no saved execution state; it has
625 either never been started or been shut down successfully.
626 </desc>
627 </const>
628 <const name="Saved" value="2">
629 <desc>
630 The machine is not currently running, but the execution state of the machine
631 has been saved to an external file when it was running, from where
632 it can be resumed.
633 </desc>
634 </const>
635 <const name="Teleported" value="3">
636 <desc>
637 The machine was teleported to a different host (or process) and then
638 powered off. Take care when powering it on again may corrupt resources
639 it shares with the teleportation target (e.g. disk and network).
640 </desc>
641 </const>
642 <const name="Aborted" value="4">
643 <desc>
644 The process running the machine has terminated abnormally. This may
645 indicate a crash of the VM process in host execution context, or
646 the VM process has been terminated externally.
647 </desc>
648 </const>
649 <const name="Running" value="5">
650 <desc>
651 The machine is currently being executed.
652 <note internal="yes">
653 For whoever decides to touch this enum: In order to keep the
654 comparisons in the old source code valid, this state must immediately
655 precede the Paused state.
656 TODO: Lift this spectacularly wonderful restriction.
657 </note>
658 </desc>
659 </const>
660 <const name="Paused" value="6">
661 <desc>
662 Execution of the machine has been paused.
663 <note internal="yes">
664 For whoever decides to touch this enum: In order to keep the
665 comparisons in the old source code valid, this state must immediately
666 follow the Running state.
667 TODO: Lift this spectacularly wonderful restriction.
668 </note>
669 </desc>
670 </const>
671 <const name="Stuck" value="7">
672 <desc>
673 Execution of the machine has reached the "Guru Meditation"
674 condition. This indicates a severe error in the hypervisor itself.
675 <note internal="yes">
676 bird: Why this uncool name? Could we rename it to "GuruMeditation" or
677 "Guru", perhaps? Or are there some other VMM states that are
678 intended to be lumped in here as well?
679 </note>
680 </desc>
681 </const>
682 <const name="Teleporting" value="8">
683 <desc>
684 The machine is about to be teleported to a different host or process.
685 It is possible to pause a machine in this state, but it will go to the
686 @c TeleportingPausedVM state and it will not be
687 possible to resume it again unless the teleportation fails.
688 </desc>
689 </const>
690 <const name="LiveSnapshotting" value="9">
691 <desc>
692 A live snapshot is being taken. The machine is running normally, but
693 some of the runtime configuration options are inaccessible. Also, if
694 paused while in this state it will transition to
695 @c Saving and it will not be resume the
696 execution until the snapshot operation has completed.
697 </desc>
698 </const>
699 <const name="Starting" value="10">
700 <desc>
701 Machine is being started after powering it on from a
702 zero execution state.
703 </desc>
704 </const>
705 <const name="Stopping" value="11">
706 <desc>
707 Machine is being normally stopped powering it off, or after the guest OS
708 has initiated a shutdown sequence.
709 </desc>
710 </const>
711 <const name="Saving" value="12">
712 <desc>
713 Machine is saving its execution state to a file, or an online
714 snapshot of the machine is being taken.
715 </desc>
716 </const>
717 <const name="Restoring" value="13">
718 <desc>
719 Execution state of the machine is being restored from a file
720 after powering it on from the saved execution state.
721 </desc>
722 </const>
723 <const name="TeleportingPausedVM" value="14">
724 <desc>
725 The machine is being teleported to another host or process, but it is
726 not running. This is the paused variant of the
727 @c state.
728 </desc>
729 </const>
730 <const name="TeleportingIn" value="15">
731 <desc>
732 Teleporting the machine state in from another host or process.
733 </desc>
734 </const>
735 <const name="DeletingSnapshotOnline" value="16">
736 <desc>
737 Like @c DeletingSnapshot, but the merging of media is ongoing in
738 the background while the machine is running.
739 </desc>
740 </const>
741 <const name="DeletingSnapshotPaused" value="17">
742 <desc>
743 Like @c DeletingSnapshot, but the machine is being paused while the
744 merging of differencing media is ongoing.
745 </desc>
746 </const>
747 <const name="RestoringSnapshot" value="18">
748 <desc>
749 A machine snapshot is being restored; this typically does not take long.
750 </desc>
751 </const>
752 <const name="DeletingSnapshot" value="19">
753 <desc>
754 A machine snapshot is being deleted; this can take a long time since this
755 may require merging differencing media. This value indicates that the
756 machine is not running while the snapshot is being deleted.
757 </desc>
758 </const>
759 <const name="SettingUp" value="20">
760 <desc>
761 Lengthy setup operation is in progress.
762 </desc>
763 </const>
764
765 <const name="FirstOnline" value="5" wsmap="suppress"> <!-- Running -->
766 <desc>
767 Pseudo-state: first online state (for use in relational expressions).
768 </desc>
769 </const>
770 <const name="LastOnline" value="17" wsmap="suppress"> <!-- DeletingSnapshotPaused -->
771 <desc>
772 Pseudo-state: last online state (for use in relational expressions).
773 </desc>
774 </const>
775
776 <const name="FirstTransient" value="8" wsmap="suppress"> <!-- Teleporting -->
777 <desc>
778 Pseudo-state: first transient state (for use in relational expressions).
779 </desc>
780 </const>
781 <const name="LastTransient" value="20" wsmap="suppress"> <!-- SettingUp -->
782 <desc>
783 Pseudo-state: last transient state (for use in relational expressions).
784 </desc>
785 </const>
786
787 </enum>
788
789 <enum
790 name="SessionState"
791 uuid="cf2700c0-ea4b-47ae-9725-7810114b94d8"
792 >
793 <desc>
794 Session state. This enumeration represents possible values of
795 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
796 attributes.
797 </desc>
798
799 <const name="Null" value="0">
800 <desc>Null value (never used by the API).</desc>
801 </const>
802 <const name="Unlocked" value="1">
803 <desc>
804 In <link to="IMachine::sessionState"/>, this means that the machine
805 is not locked for any sessions.
806
807 In <link to="ISession::state"/>, this means that no machine is
808 currently locked for this session.
809 </desc>
810 </const>
811 <const name="Locked" value="2">
812 <desc>
813 In <link to="IMachine::sessionState"/>, this means that the machine
814 is currently locked for a session, whose process identifier can
815 then be found in the <link to="IMachine::sessionPid" /> attribute.
816
817 In <link to="ISession::state"/>, this means that a machine is
818 currently locked for this session, and the mutable machine object
819 can be found in the <link to="ISession::machine"/> attribute
820 (see <link to="IMachine::lockMachine" /> for details).
821 </desc>
822 </const>
823 <const name="Spawning" value="3">
824 <desc>
825 A new process is being spawned for the machine as a result of
826 <link to="IMachine::launchVMProcess"/> call. This state also occurs
827 as a short transient state during an <link to="IMachine::lockMachine"/>
828 call.
829 </desc>
830 </const>
831 <const name="Unlocking" value="4">
832 <desc>
833 The session is being unlocked.
834 </desc>
835 </const>
836 </enum>
837
838 <enum
839 name="CPUPropertyType"
840 uuid="24d356a6-2f45-4abd-b977-1cbe9c4701f5"
841 >
842 <desc>
843 Virtual CPU property type. This enumeration represents possible values of the
844 IMachine get- and setCPUProperty methods.
845 </desc>
846 <const name="Null" value="0">
847 <desc>Null value (never used by the API).</desc>
848 </const>
849 <const name="PAE" value="1">
850 <desc>
851 This setting determines whether VirtualBox will expose the Physical Address
852 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
853 is not available, it will not be reported.
854 </desc>
855 </const>
856 <const name="Synthetic" value="2">
857 <desc>
858 This setting determines whether VirtualBox will expose a synthetic CPU to the guest to allow
859 teleporting between host systems that differ significantly.
860 </desc>
861 </const>
862 </enum>
863
864
865 <enum
866 name="HWVirtExPropertyType"
867 uuid="ce81dfdd-d2b8-4a90-bbea-40ee8b7ffcee"
868 >
869 <desc>
870 Hardware virtualization property type. This enumeration represents possible values
871 for the <link to="IMachine::getHWVirtExProperty"/> and
872 <link to="IMachine::setHWVirtExProperty"/> methods.
873 </desc>
874 <const name="Null" value="0">
875 <desc>Null value (never used by the API).</desc>
876 </const>
877 <const name="Enabled" value="1">
878 <desc>
879 Whether hardware virtualization (VT-x/AMD-V) is enabled at all. If
880 such extensions are not available, they will not be used.
881 </desc>
882 </const>
883 <const name="Exclusive" value="2">
884 <desc>
885 Whether hardware virtualization is used exclusively by VirtualBox. When enabled,
886 VirtualBox assumes it can acquire full and exclusive access to the VT-x or AMD-V
887 feature of the host. To share these with other hypervisors, you must disable this property.
888 </desc>
889 </const>
890 <const name="VPID" value="3">
891 <desc>
892 Whether VT-x VPID is enabled. If this extension is not available, it will not be used.
893 </desc>
894 </const>
895 <const name="NestedPaging" value="4">
896 <desc>
897 Whether Nested Paging is enabled. If this extension is not available, it will not be used.
898 </desc>
899 </const>
900 <const name="LargePages" value="5">
901 <desc>
902 Whether large page allocation is enabled; requires nested paging and a 64 bits host.
903 </desc>
904 </const>
905 </enum>
906
907 <enum
908 name="LockType"
909 uuid="138b53f8-db4b-47c5-b32b-4ef52f769413"
910 >
911 <desc>
912 Used with <link to="IMachine::lockMachine" />.
913 </desc>
914 <const name="Write" value="2">
915 <desc>Lock the machine for writing.</desc>
916 </const>
917 <const name="Shared" value="1">
918 <desc>Request only a shared read lock for remote-controlling the machine.</desc>
919 </const>
920 </enum>
921
922 <enum
923 name="SessionType"
924 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
925 >
926 <desc>
927 Session type. This enumeration represents possible values of the
928 <link to="ISession::type"/> attribute.
929 </desc>
930
931 <const name="Null" value="0">
932 <desc>Null value (never used by the API).</desc>
933 </const>
934 <const name="WriteLock" value="1">
935 <desc>
936 Session has acquired an exclusive write lock on a machine
937 using <link to="IMachine::lockMachine"/>.
938 </desc>
939 </const>
940 <const name="Remote" value="2">
941 <desc>
942 Session has launched a VM process using
943 <link to="IMachine::launchVMProcess"/>
944 </desc>
945 </const>
946 <const name="Shared" value="3">
947 <desc>
948 Session has obtained a link to another session using
949 <link to="IMachine::lockMachine"/>
950 </desc>
951 </const>
952 </enum>
953
954 <enum
955 name="DeviceType"
956 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
957 >
958 <desc>
959 Device type.
960 </desc>
961 <const name="Null" value="0">
962 <desc>
963 Null value, may also mean "no device" (not allowed for
964 <link to="IConsole::getDeviceActivity"/>).
965 </desc>
966 </const>
967 <const name="Floppy" value="1">
968 <desc>Floppy device.</desc>
969 </const>
970 <const name="DVD" value="2">
971 <desc>CD/DVD-ROM device.</desc>
972 </const>
973 <const name="HardDisk" value="3">
974 <desc>Hard disk device.</desc>
975 </const>
976 <const name="Network" value="4">
977 <desc>Network device.</desc>
978 </const>
979 <const name="USB" value="5">
980 <desc>USB device.</desc>
981 </const>
982 <const name="SharedFolder" value="6">
983 <desc>Shared folder device.</desc>
984 </const>
985 </enum>
986
987 <enum
988 name="DeviceActivity"
989 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
990 >
991 <desc>
992 Device activity for <link to="IConsole::getDeviceActivity"/>.
993 </desc>
994
995 <const name="Null" value="0"/>
996 <const name="Idle" value="1"/>
997 <const name="Reading" value="2"/>
998 <const name="Writing" value="3"/>
999 </enum>
1000
1001 <enum
1002 name="ClipboardMode"
1003 uuid="33364716-4008-4701-8f14-be0fa3d62950"
1004 >
1005 <desc>
1006 Host-Guest clipboard interchange mode.
1007 </desc>
1008
1009 <const name="Disabled" value="0"/>
1010 <const name="HostToGuest" value="1"/>
1011 <const name="GuestToHost" value="2"/>
1012 <const name="Bidirectional" value="3"/>
1013 </enum>
1014
1015 <enum
1016 name="Scope"
1017 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
1018 >
1019 <desc>
1020 Scope of the operation.
1021
1022 A generic enumeration used in various methods to define the action or
1023 argument scope.
1024 </desc>
1025
1026 <const name="Global" value="0"/>
1027 <const name="Machine" value="1"/>
1028 <const name="Session" value="2"/>
1029 </enum>
1030
1031 <enum
1032 name="BIOSBootMenuMode"
1033 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
1034 >
1035 <desc>
1036 BIOS boot menu mode.
1037 </desc>
1038
1039 <const name="Disabled" value="0"/>
1040 <const name="MenuOnly" value="1"/>
1041 <const name="MessageAndMenu" value="2"/>
1042 </enum>
1043
1044 <enum
1045 name="ProcessorFeature"
1046 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
1047 >
1048 <desc>
1049 CPU features.
1050 </desc>
1051
1052 <const name="HWVirtEx" value="0"/>
1053 <const name="PAE" value="1"/>
1054 <const name="LongMode" value="2"/>
1055 <const name="NestedPaging" value="3"/>
1056 </enum>
1057
1058 <enum
1059 name="FirmwareType"
1060 uuid="b903f264-c230-483e-ac74-2b37ce60d371"
1061 >
1062 <desc>
1063 Firmware type.
1064 </desc>
1065 <const name="BIOS" value="1">
1066 <desc>BIOS Firmware.</desc>
1067 </const>
1068 <const name="EFI" value="2">
1069 <desc>EFI Firmware, bitness detetced basing on OS type.</desc>
1070 </const>
1071 <const name="EFI32" value="3">
1072 <desc>Efi firmware, 32-bit.</desc>
1073 </const>
1074 <const name="EFI64" value="4">
1075 <desc>Efi firmware, 64-bit.</desc>
1076 </const>
1077 <const name="EFIDUAL" value="5">
1078 <desc>Efi firmware, combined 32 and 64-bit.</desc>
1079 </const>
1080 </enum>
1081
1082 <enum
1083 name="PointingHidType"
1084 uuid="0d3c17a2-821a-4b2e-ae41-890c6c60aa97"
1085 >
1086 <desc>
1087 Type of pointing device used in a virtual machine.
1088 </desc>
1089 <const name="None" value="1">
1090 <desc>No mouse.</desc>
1091 </const>
1092 <const name="PS2Mouse" value="2">
1093 <desc>PS/2 auxillary device, a.k.a. mouse.</desc>
1094 </const>
1095 <const name="USBMouse" value="3">
1096 <desc>USB mouse (relative pointer).</desc>
1097 </const>
1098 <const name="USBTablet" value="4">
1099 <desc>USB tablet (absolute pointer).</desc>
1100 </const>
1101 <const name="ComboMouse" value="5">
1102 <desc>Combined device, working as PS/2 or USB mouse, depending on guest behavior.
1103 Using of such device can have negative performance implications. </desc>
1104 </const>
1105 </enum>
1106
1107 <enum
1108 name="KeyboardHidType"
1109 uuid="5a5b0996-3a3e-44bb-9019-56979812cbcc"
1110 >
1111 <desc>
1112 Type of keyboard device used in a virtual machine.
1113 </desc>
1114 <const name="None" value="1">
1115 <desc>No keyboard.</desc>
1116 </const>
1117 <const name="PS2Keyboard" value="2">
1118 <desc>PS/2 keyboard.</desc>
1119 </const>
1120 <const name="USBKeyboard" value="3">
1121 <desc>USB keyboard.</desc>
1122 </const>
1123 <const name="ComboKeyboard" value="4">
1124 <desc>Combined device, working as PS/2 or USB keyboard, depending on guest behavior.
1125 Using of such device can have negative performance implications. </desc>
1126 </const>
1127 </enum>
1128
1129 <!--
1130 // IVirtualBoxErrorInfo
1131 /////////////////////////////////////////////////////////////////////////
1132 -->
1133
1134 <interface
1135 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1136 uuid="e053d3c0-f493-491b-a735-3a9f0b1feed4"
1137 supportsErrorInfo="no"
1138 wsmap="managed"
1139 >
1140 <desc>
1141 The IVirtualBoxErrorInfo interface represents extended error information.
1142
1143 Extended error information can be set by VirtualBox components after
1144 unsuccessful or partially successful method invocation. This information
1145 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1146 and then shown to the client in addition to the plain 32-bit result code.
1147
1148 In MS COM, this interface extends the IErrorInfo interface,
1149 in XPCOM, it extends the nsIException interface. In both cases,
1150 it provides a set of common attributes to retrieve error
1151 information.
1152
1153 Sometimes invocation of some component's method may involve methods of
1154 other components that may also fail (independently of this method's
1155 failure), or a series of non-fatal errors may precede a fatal error that
1156 causes method failure. In cases like that, it may be desirable to preserve
1157 information about all errors happened during method invocation and deliver
1158 it to the caller. The <link to="#next"/> attribute is intended
1159 specifically for this purpose and allows to represent a chain of errors
1160 through a single IVirtualBoxErrorInfo object set after method invocation.
1161
1162 Note that errors are stored to a chain in the reverse order, i.e. the
1163 initial error object you query right after method invocation is the last
1164 error set by the callee, the object it points to in the @a next attribute
1165 is the previous error and so on, up to the first error (which is the last
1166 in the chain).
1167 </desc>
1168
1169 <attribute name="resultCode" type="long" readonly="yes">
1170 <desc>
1171 Result code of the error.
1172 Usually, it will be the same as the result code returned
1173 by the method that provided this error information, but not
1174 always. For example, on Win32, CoCreateInstance() will most
1175 likely return E_NOINTERFACE upon unsuccessful component
1176 instantiation attempt, but not the value the component factory
1177 returned. Value is typed 'long', not 'result',
1178 to make interface usable from scripting languages.
1179 <note>
1180 In MS COM, there is no equivalent.
1181 In XPCOM, it is the same as nsIException::result.
1182 </note>
1183 </desc>
1184 </attribute>
1185
1186 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1187 <desc>
1188 UUID of the interface that defined the error.
1189 <note>
1190 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1191 data type.
1192 In XPCOM, there is no equivalent.
1193 </note>
1194 </desc>
1195 </attribute>
1196
1197 <attribute name="component" type="wstring" readonly="yes">
1198 <desc>
1199 Name of the component that generated the error.
1200 <note>
1201 In MS COM, it is the same as IErrorInfo::GetSource.
1202 In XPCOM, there is no equivalent.
1203 </note>
1204 </desc>
1205 </attribute>
1206
1207 <attribute name="text" type="wstring" readonly="yes">
1208 <desc>
1209 Text description of the error.
1210 <note>
1211 In MS COM, it is the same as IErrorInfo::GetDescription.
1212 In XPCOM, it is the same as nsIException::message.
1213 </note>
1214 </desc>
1215 </attribute>
1216
1217 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1218 <desc>
1219 Next error object if there is any, or @c null otherwise.
1220 <note>
1221 In MS COM, there is no equivalent.
1222 In XPCOM, it is the same as nsIException::inner.
1223 </note>
1224 </desc>
1225 </attribute>
1226
1227 </interface>
1228
1229 <!--
1230 // IVirtualBox
1231 /////////////////////////////////////////////////////////////////////////
1232 -->
1233
1234 <interface
1235 name="IDHCPServer" extends="$unknown"
1236 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1237 wsmap="managed"
1238 >
1239 <desc>
1240 The IDHCPServer interface represents the vbox dhcp server configuration.
1241
1242 To enumerate all the dhcp servers on the host, use the
1243 <link to="IVirtualBox::DHCPServers"/> attribute.
1244 </desc>
1245
1246 <attribute name="enabled" type="boolean">
1247 <desc>
1248 specifies if the dhcp server is enabled
1249 </desc>
1250 </attribute>
1251
1252 <attribute name="IPAddress" type="wstring" readonly="yes">
1253 <desc>
1254 specifies server IP
1255 </desc>
1256 </attribute>
1257
1258 <attribute name="networkMask" type="wstring" readonly="yes">
1259 <desc>
1260 specifies server network mask
1261 </desc>
1262 </attribute>
1263
1264 <attribute name="networkName" type="wstring" readonly="yes">
1265 <desc>
1266 specifies internal network name the server is used for
1267 </desc>
1268 </attribute>
1269
1270 <attribute name="lowerIP" type="wstring" readonly="yes">
1271 <desc>
1272 specifies from IP adrres in server address range
1273 </desc>
1274 </attribute>
1275
1276 <attribute name="upperIP" type="wstring" readonly="yes">
1277 <desc>
1278 specifies to IP adrres in server address range
1279 </desc>
1280 </attribute>
1281
1282 <method name="setConfiguration">
1283 <desc>
1284 configures the server
1285 <result name="E_INVALIDARG">
1286 invalid configuration supplied
1287 </result>
1288 </desc>
1289 <param name="IPAddress" type="wstring" dir="in">
1290 <desc>
1291 server IP address
1292 </desc>
1293 </param>
1294 <param name="networkMask" type="wstring" dir="in">
1295 <desc>
1296 server network mask
1297 </desc>
1298 </param>
1299 <param name="FromIPAddress" type="wstring" dir="in">
1300 <desc>
1301 server From IP address for address range
1302 </desc>
1303 </param>
1304 <param name="ToIPAddress" type="wstring" dir="in">
1305 <desc>
1306 server To IP address for address range
1307 </desc>
1308 </param>
1309 </method>
1310
1311 <method name="start">
1312 <desc>
1313 Starts DHCP server process.
1314 <result name="E_FAIL">
1315 Failed to start the process.
1316 </result>
1317 </desc>
1318 <param name="networkName" type="wstring" dir="in">
1319 <desc>
1320 Name of internal network DHCP server should attach to.
1321 </desc>
1322 </param>
1323 <param name="trunkName" type="wstring" dir="in">
1324 <desc>
1325 Name of internal network trunk.
1326 </desc>
1327 </param>
1328 <param name="trunkType" type="wstring" dir="in">
1329 <desc>
1330 Type of internal network trunk.
1331 </desc>
1332 </param>
1333 </method>
1334
1335 <method name="stop">
1336 <desc>
1337 Stops DHCP server process.
1338 <result name="E_FAIL">
1339 Failed to stop the process.
1340 </result>
1341 </desc>
1342 </method>
1343 </interface>
1344
1345 <interface
1346 name="IVirtualBox" extends="$unknown"
1347 uuid="ec6cc7e7-06a2-4c5d-8993-1e3619c53817"
1348 wsmap="managed"
1349 >
1350 <desc>
1351 The IVirtualBox interface represents the main interface exposed by the
1352 product that provides virtual machine management.
1353
1354 An instance of IVirtualBox is required for the product to do anything
1355 useful. Even though the interface does not expose this, internally,
1356 IVirtualBox is implemented as a singleton and actually lives in the
1357 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1358 IVirtualBox can track the state of all virtual machines on a particular
1359 host, regardless of which frontend started them.
1360
1361 To enumerate all the virtual machines on the host, use the
1362 <link to="IVirtualBox::machines"/> attribute.
1363 </desc>
1364
1365 <attribute name="version" type="wstring" readonly="yes">
1366 <desc>
1367 A string representing the version number of the product. The
1368 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1369 last number represents the build number and will frequently change.
1370 </desc>
1371 </attribute>
1372
1373 <attribute name="revision" type="unsigned long" readonly="yes">
1374 <desc>
1375 The internal build revision number of the product.
1376 </desc>
1377 </attribute>
1378
1379 <attribute name="packageType" type="wstring" readonly="yes">
1380 <desc>
1381 A string representing the package type of this product. The
1382 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1383 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1384 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1385 this.
1386 </desc>
1387 </attribute>
1388
1389 <attribute name="homeFolder" type="wstring" readonly="yes">
1390 <desc>
1391 Full path to the directory where the global settings file,
1392 <tt>VirtualBox.xml</tt>, is stored.
1393
1394 In this version of VirtualBox, the value of this property is
1395 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1396 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1397 as determined by the host OS), and cannot be changed.
1398
1399 This path is also used as the base to resolve relative paths in
1400 places where relative paths are allowed (unless otherwise
1401 expressly indicated).
1402 </desc>
1403 </attribute>
1404
1405 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1406 <desc>
1407 Full name of the global settings file.
1408 The value of this property corresponds to the value of
1409 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1410 </desc>
1411 </attribute>
1412
1413 <attribute name="host" type="IHost" readonly="yes">
1414 <desc>Associated host object.</desc>
1415 </attribute>
1416
1417 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1418 <desc>Associated system information object.</desc>
1419 </attribute>
1420
1421 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1422 <desc>
1423 Array of machine objects registered within this VirtualBox instance.
1424 </desc>
1425 </attribute>
1426
1427 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1428 <desc>
1429 Array of medium objects known to this VirtualBox installation.
1430
1431 This array contains only base media. All differencing
1432 media of the given base medium can be enumerated using
1433 <link to="IMedium::children"/>.
1434 </desc>
1435 </attribute>
1436
1437 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1438 <desc>
1439 Array of CD/DVD image objects registered with this VirtualBox instance.
1440 </desc>
1441 </attribute>
1442
1443 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1444 <desc>
1445 Array of floppy image objects registered with this VirtualBox instance.
1446 </desc>
1447 </attribute>
1448
1449 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1450
1451 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1452
1453 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1454 <desc>
1455 Collection of global shared folders. Global shared folders are
1456 available to all virtual machines.
1457
1458 New shared folders are added to the collection using
1459 <link to="#createSharedFolder"/>. Existing shared folders can be
1460 removed using <link to="#removeSharedFolder"/>.
1461
1462 <note>
1463 In the current version of the product, global shared folders are not
1464 implemented and therefore this collection is always empty.
1465 </note>
1466 </desc>
1467 </attribute>
1468
1469 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1470 <desc>
1471 Associated performance collector object.
1472 </desc>
1473 </attribute>
1474
1475 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1476 <desc>
1477 dhcp server settings.
1478 </desc>
1479 </attribute>
1480
1481 <attribute name="eventSource" type="IEventSource" readonly="yes">
1482 <desc>
1483 Event source for VirtualBox events.
1484 </desc>
1485 </attribute>
1486
1487
1488 <method name="createMachine">
1489 <desc>
1490 Creates a new virtual machine.
1491
1492 The new machine is created unregistered, with the initial configuration
1493 set according to the specified guest OS type. A typical sequence of
1494 actions to create a new virtual machine is as follows:
1495
1496 <ol>
1497 <li>
1498 Call this method to have a new machine created. The returned machine
1499 object will be "mutable" allowing to change any machine property.
1500 </li>
1501
1502 <li>
1503 Configure the machine using the appropriate attributes and methods.
1504 </li>
1505
1506 <li>
1507 Call <link to="IMachine::saveSettings" /> to write the settings
1508 to the machine's XML settings file. The configuration of the newly
1509 created machine will not be saved to disk until this method is
1510 called.
1511 </li>
1512
1513 <li>
1514 Call <link to="#registerMachine" /> to add the machine to the list
1515 of machines known to VirtualBox.
1516 </li>
1517 </ol>
1518
1519 You should specify valid name for the newly created machine when calling
1520 this method. See the <link to="IMachine::name"/> attribute description
1521 for more details about the machine name.
1522
1523 The specified guest OS type identifier must match an ID of one of known
1524 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1525 array.
1526
1527 Every machine has a <i>settings file</i> that is used to store
1528 the machine configuration. This file is stored in a directory called the
1529 <i>machine settings subfolder</i>. Both the settings subfolder and file
1530 will have a name that corresponds to the name of the virtual machine.
1531 You can specify where to create the machine setting subfolder using the
1532 @a baseFolder argument. The base folder can be absolute (full path) or
1533 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1534 directory</link>.
1535
1536 If @a baseFolder is a @c null or empty string (which is recommended), the
1537 <link to="ISystemProperties::defaultMachineFolder">default machine
1538 settings folder</link> will be used as a base folder for the created
1539 machine. Otherwise the given base folder will be used. In either case,
1540 the full path to the resulting settings file has the following
1541 structure:
1542 <pre>
1543 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1544 </pre>
1545
1546 Note that if the resulting settings file already exists, this method
1547 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1548
1549 Optionally, you may specify an UUID of to assign to the created machine.
1550 However, this is not recommended and you should normally pass an empty
1551 (@c null) UUID to this method so that a new UUID will be automatically
1552 generated for every created machine. You can use UUID
1553 00000000-0000-0000-0000-000000000000 as @c null value.
1554
1555 <note>
1556 There is no way to change the name of the settings file or
1557 subfolder of the created machine directly.
1558 </note>
1559
1560 <result name="VBOX_E_OBJECT_NOT_FOUND">
1561 @a osTypeId is invalid.
1562 </result>
1563 <result name="VBOX_E_FILE_ERROR">
1564 Resulting settings file name is invalid or the settings file already
1565 exists or could not be created due to an I/O error.
1566 </result>
1567 <result name="E_INVALIDARG">
1568 @a name is empty or @c null.
1569 </result>
1570 </desc>
1571
1572 <param name="name" type="wstring" dir="in">
1573 <desc>Machine name.</desc>
1574 </param>
1575 <param name="osTypeId" type="wstring" dir="in">
1576 <desc>Guest OS Type ID.</desc>
1577 </param>
1578 <param name="baseFolder" type="wstring" dir="in">
1579 <desc>Base machine folder (optional).</desc>
1580 </param>
1581 <param name="id" type="uuid" mod="string" dir="in">
1582 <desc>Machine UUID (optional).</desc>
1583 </param>
1584 <param name="override" type="boolean" dir="in">
1585 <desc>Create the VM even if there are conflicting files.</desc>
1586 </param>
1587 <param name="machine" type="IMachine" dir="return">
1588 <desc>Created machine object.</desc>
1589 </param>
1590 </method>
1591
1592 <method name="createLegacyMachine">
1593 <desc>
1594 Creates a new virtual machine in "legacy" mode, using the specified
1595 settings file to store machine settings.
1596
1597 As opposed to machines created by <link to="#createMachine"/>,
1598 the settings file of the machine created in "legacy" mode is not
1599 automatically renamed when the machine name is changed -- it will always
1600 remain the same as specified in this method call.
1601
1602 The specified settings file name can be absolute (full path) or relative
1603 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1604 directory</link>. If the file name doesn't contain an extension, the
1605 default extension (.xml) will be appended.
1606
1607 Note that the configuration of the newly created machine is not
1608 saved to disk (and therefore no settings file is created)
1609 until <link to="IMachine::saveSettings"/> is called. If the
1610 specified settings file already exists, this method
1611 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1612
1613 See <link to="#createMachine"/> for more information.
1614
1615 @deprecated This method may be removed later. Use <link
1616 to="IVirtualBox::createMachine"/> instead.
1617
1618 <note>
1619 There is no way to change the name of the settings file
1620 of the machine created in "legacy" mode.
1621 </note>
1622
1623 <result name="VBOX_E_OBJECT_NOT_FOUND">
1624 @a osTypeId is invalid.
1625 </result>
1626 <result name="VBOX_E_FILE_ERROR">
1627 @a settingsFile is invalid or the settings file already exists or
1628 could not be created due to an I/O error.
1629 </result>
1630 <result name="E_INVALIDARG">
1631 @a name or @a settingsFile is empty or @c null.
1632 </result>
1633 </desc>
1634
1635 <param name="name" type="wstring" dir="in">
1636 <desc>Machine name.</desc>
1637 </param>
1638 <param name="osTypeId" type="wstring" dir="in">
1639 <desc>Machine OS Type ID.</desc>
1640 </param>
1641 <param name="settingsFile" type="wstring" dir="in">
1642 <desc>Name of the machine settings file.</desc>
1643 </param>
1644 <param name="id" type="uuid" mod="string" dir="in">
1645 <desc>Machine UUID (optional).</desc>
1646 </param>
1647 <param name="machine" type="IMachine" dir="return">
1648 <desc>Created machine object.</desc>
1649 </param>
1650 </method>
1651
1652 <method name="openMachine">
1653 <desc>
1654 Opens a virtual machine from the existing settings file.
1655 The opened machine remains unregistered until you call
1656 <link to="#registerMachine"/>.
1657
1658 The specified settings file name can be absolute
1659 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1660 VirtualBox home directory</link>. This file must exist
1661 and must be a valid machine settings file whose contents
1662 will be used to construct the machine object.
1663
1664 @deprecated Will be removed soon.
1665 <result name="VBOX_E_FILE_ERROR">
1666 Settings file name invalid, not found or sharing violation.
1667 </result>
1668 </desc>
1669 <param name="settingsFile" type="wstring" dir="in">
1670 <desc>
1671 Name of the machine settings file.
1672 </desc>
1673 </param>
1674 <param name="machine" type="IMachine" dir="return">
1675 <desc>Opened machine object.</desc>
1676 </param>
1677 <note>
1678 <link to="IMachine::settingsModified"/> will return
1679 @c false for the created machine, until any of machine settings
1680 are changed.
1681 </note>
1682 </method>
1683
1684 <method name="registerMachine">
1685 <desc>
1686
1687 Registers the machine previously created using
1688 <link to="#createMachine"/> or opened using
1689 <link to="#openMachine"/> within this VirtualBox installation. After
1690 successful method invocation, the
1691 <link to="IMachineRegisteredEvent"/> event is fired.
1692
1693 <note>
1694 This method implicitly calls <link to="IMachine::saveSettings"/>
1695 to save all current machine settings before registering it.
1696 </note>
1697
1698 <result name="VBOX_E_OBJECT_NOT_FOUND">
1699 No matching virtual machine found.
1700 </result>
1701 <result name="VBOX_E_INVALID_OBJECT_STATE">
1702 Virtual machine was not created within this VirtualBox instance.
1703 </result>
1704
1705 </desc>
1706 <param name="machine" type="IMachine" dir="in"/>
1707 </method>
1708
1709 <method name="getMachine">
1710 <desc>
1711 Attempts to find a virtual machine given its UUID.
1712 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1713 instead.
1714
1715 <result name="VBOX_E_OBJECT_NOT_FOUND">
1716 Could not find registered machine matching @a id.
1717 </result>
1718
1719 </desc>
1720 <param name="id" type="uuid" mod="string" dir="in"/>
1721 <param name="machine" type="IMachine" dir="return"/>
1722 </method>
1723
1724 <method name="findMachine">
1725 <desc>
1726 Attempts to find a virtual machine given its name.
1727 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1728 instead.
1729
1730 <result name="VBOX_E_OBJECT_NOT_FOUND">
1731 Could not find registered machine matching @a name.
1732 </result>
1733
1734 </desc>
1735 <param name="name" type="wstring" dir="in"/>
1736 <param name="machine" type="IMachine" dir="return"/>
1737 </method>
1738
1739 <method name="createAppliance">
1740 <desc>
1741 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1742 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1743 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1744 </desc>
1745 <param name="appliance" type="IAppliance" dir="return">
1746 <desc>New appliance.</desc>
1747 </param>
1748 </method>
1749
1750 <method name="createHardDisk">
1751 <desc>
1752 Creates a new base medium object that will use the given storage
1753 format and location for medium data.
1754
1755 Note that the actual storage unit is not created by this method. In
1756 order to do it, and before you are able to attach the created medium
1757 to virtual machines, you must call one of the following methods to
1758 allocate a format-specific storage unit at the specified location:
1759 <ul>
1760 <li><link to="IMedium::createBaseStorage"/></li>
1761 <li><link to="IMedium::createDiffStorage"/></li>
1762 </ul>
1763
1764 Some medium attributes, such as <link to="IMedium::id"/>, may
1765 remain uninitialized until the medium storage unit is successfully
1766 created by one of the above methods.
1767
1768 After the storage unit is successfully created, the medium gets
1769 remembered by this VirtualBox installation and will be accessible
1770 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
1771 methods. Remembered base medium are also returned as part of
1772 the <link to="#hardDisks"/> array. See IMedium for more details.
1773
1774 The list of all storage formats supported by this VirtualBox
1775 installation can be obtained using
1776 <link to="ISystemProperties::mediumFormats"/>. If the @a format
1777 attribute is empty or @c null then the default storage format
1778 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1779 be used for creating a storage unit of the medium.
1780
1781 Note that the format of the location string is storage format specific.
1782 See <link to="IMedium::location"/>, IMedium and
1783 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1784
1785 <result name="VBOX_E_OBJECT_NOT_FOUND">
1786 @a format identifier is invalid. See
1787 <link to="ISystemProperties::mediumFormats"/>.
1788 </result>
1789 <result name="VBOX_E_FILE_ERROR">
1790 @a location is a not valid file name (for file-based formats only).
1791 </result>
1792 </desc>
1793 <param name="format" type="wstring" dir="in">
1794 <desc>
1795 Identifier of the storage format to use for the new medium.
1796 </desc>
1797 </param>
1798 <param name="location" type="wstring" dir="in">
1799 <desc>
1800 Location of the storage unit for the new medium.
1801 </desc>
1802 </param>
1803 <param name="medium" type="IMedium" dir="return">
1804 <desc>Created medium object.</desc>
1805 </param>
1806 </method>
1807
1808 <method name="openHardDisk">
1809 <desc>
1810 Opens a medium from an existing location, optionally replacing
1811 the image UUID and/or parent UUID.
1812
1813 After the medium is successfully opened by this method, it gets
1814 remembered by (known to) this VirtualBox installation and will be
1815 accessible through <link to="#getHardDisk"/> and
1816 <link to="#findHardDisk"/> methods. Remembered base media
1817 are also returned as part of the <link to="#hardDisks"/> array and can
1818 be attached to virtual machines. See IMedium for more details.
1819
1820 If a differencing 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 tries 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), the image is opened
1829 for read/write access and must have according permissions, as VirtualBox
1830 may actually write status information into the disk's metadata sections.
1831
1832 Note that write access is required for all typical image usage in VirtualBox,
1833 since VirtualBox may need to write metadata such as a UUID into the image.
1834 The only exception is opening a source image temporarily for copying and
1835 cloning when the image will quickly be closed again.
1836
1837 Note that the format of the location string is storage format specific.
1838 See <link to="IMedium::location"/>, IMedium and
1839 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1840
1841 <result name="VBOX_E_FILE_ERROR">
1842 Invalid medium storage file location or could not find the medium
1843 at the specified location.
1844 </result>
1845 <result name="VBOX_E_IPRT_ERROR">
1846 Could not get medium storage format.
1847 </result>
1848 <result name="E_INVALIDARG">
1849 Invalid medium storage format.
1850 </result>
1851
1852 </desc>
1853 <param name="location" type="wstring" dir="in">
1854 <desc>
1855 Location of the storage unit that contains medium data in one of
1856 the supported storage formats.
1857 </desc>
1858 </param>
1859 <param name="accessMode" type="AccessMode" dir="in">
1860 <desc>
1861 Determines whether to open the image in read/write or read-only mode.
1862 </desc>
1863 </param>
1864 <param name="setImageId" type="boolean" dir="in">
1865 <desc>
1866 Select whether a new image UUID is set or not.
1867 </desc>
1868 </param>
1869 <param name="imageId" type="uuid" mod="string" dir="in">
1870 <desc>
1871 New UUID for the image. If an empty string is passed, then a new
1872 UUID is automatically created. Specifying a zero UUIDs is not valid.
1873 </desc>
1874 </param>
1875 <param name="setParentId" type="boolean" dir="in">
1876 <desc>
1877 Select whether a new parent UUID is set or not.
1878 </desc>
1879 </param>
1880 <param name="parentId" type="uuid" mod="string" dir="in">
1881 <desc>
1882 New parent UUID for the image. If an empty string is passed, then a
1883 new UUID is automatically created, provided @a setParentId is
1884 @c true. A zero UUID is valid.
1885 </desc>
1886 </param>
1887 <param name="medium" type="IMedium" dir="return">
1888 <desc>Opened medium object.</desc>
1889 </param>
1890 </method>
1891
1892 <method name="getHardDisk" const="yes">
1893 <desc>
1894 Returns a medium with the given UUID.
1895
1896 The medium with the given UUID must be known to this VirtualBox
1897 installation, i.e. it must be previously created by
1898 <link to="#createHardDisk"/> or opened by <link
1899 to="#openHardDisk"/>, or attached to some known virtual machine.
1900
1901 <result name="VBOX_E_OBJECT_NOT_FOUND">
1902 No medium object matching @a id found.
1903 </result>
1904
1905 </desc>
1906 <param name="id" type="uuid" mod="string" dir="in">
1907 <desc>UUID of the medium to look for.</desc>
1908 </param>
1909 <param name="medium" type="IMedium" dir="return">
1910 <desc>Found medium object.</desc>
1911 </param>
1912 </method>
1913
1914 <method name="findHardDisk">
1915 <desc>
1916 Returns a medium that uses the given location to store medium data.
1917
1918 The given medium must be known to this VirtualBox installation, i.e.
1919 it must be previously created by
1920 <link to="#createHardDisk"/> or opened by <link
1921 to="#openHardDisk"/>, or attached to some known virtual machine.
1922
1923 The search is done by comparing the value of the @a location argument to
1924 the <link to="IMedium::location"/> attribute of each known medium.
1925
1926 For locations represented by file names in the host's file system, the
1927 requested location can be a path relative to the
1928 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1929 only a file name without any path is given, the
1930 <link to="ISystemProperties::defaultHardDiskFolder"> default medium
1931 folder</link> will be prepended to the file name before searching. Note
1932 that on case sensitive file systems, a case sensitive comparison is
1933 performed, otherwise the case of symbols in the file path is ignored.
1934
1935 <result name="VBOX_E_OBJECT_NOT_FOUND">
1936 No medium object matching @a location found.
1937 </result>
1938
1939 </desc>
1940 <param name="location" type="wstring" dir="in">
1941 <desc>Location string to search for.</desc>
1942 </param>
1943 <param name="medium" type="IMedium" dir="return">
1944 <desc>Found medium object.</desc>
1945 </param>
1946 </method>
1947
1948 <method name="openDVDImage">
1949 <desc>
1950 Opens a CD/DVD image contained in the specified file of the supported
1951 format and assigns it the given UUID.
1952
1953 After the image is successfully opened by this method, it gets
1954 remembered by (known to) this VirtualBox installation and will be
1955 accessible through <link to="#getDVDImage"/> and
1956 <link to="#findDVDImage"/> methods. Remembered images are also
1957 returned as part of the <link to="#DVDImages"/> array and can be mounted
1958 to virtual machines. See IMedium for more details.
1959
1960 See <link to="IMedium::location"/> to get more details about the format
1961 of the location string.
1962
1963 <note>
1964 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
1965 </note>
1966
1967 <result name="VBOX_E_FILE_ERROR">
1968 Invalid CD/DVD image file location or could not find the CD/DVD
1969 image at the specified location.
1970 </result>
1971 <result name="VBOX_E_INVALID_OBJECT_STATE">
1972 CD/DVD image already exists in the media registry.
1973 </result>
1974
1975 </desc>
1976 <param name="location" type="wstring" dir="in">
1977 <desc>
1978 Full path to the file that contains a valid CD/DVD image.
1979 </desc>
1980 </param>
1981 <param name="id" type="uuid" mod="string" dir="in">
1982 <desc>
1983 UUID to assign to the given image within this VirtualBox installation.
1984 If an empty (@c null) UUID is specified, the system will randomly
1985 generate a new UUID.
1986 </desc>
1987 </param>
1988 <param name="image" type="IMedium" dir="return">
1989 <desc>Opened CD/DVD image object.</desc>
1990 </param>
1991 </method>
1992
1993 <method name="getDVDImage">
1994 <desc>
1995 Returns a CD/DVD image with the given UUID.
1996
1997 The image with the given UUID must be known to this VirtualBox
1998 installation, i.e. it must be previously opened by <link
1999 to="#openDVDImage"/>, or mounted to some known virtual machine.
2000
2001 <result name="VBOX_E_OBJECT_NOT_FOUND">
2002 No matching DVD image found in the media registry.
2003 </result>
2004
2005 </desc>
2006 <param name="id" type="uuid" mod="string" dir="in">
2007 <desc>UUID of the image to look for.</desc>
2008 </param>
2009 <param name="image" type="IMedium" dir="return">
2010 <desc>Found CD/DVD image object.</desc>
2011 </param>
2012 </method>
2013
2014 <method name="findDVDImage">
2015 <desc>
2016 Returns a CD/DVD image with the given image location.
2017
2018 The image with the given UUID must be known to this VirtualBox
2019 installation, i.e. it must be previously opened by <link
2020 to="#openDVDImage"/>, or mounted to some known virtual machine.
2021
2022 The search is done by comparing the value of the @a location argument to
2023 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2024
2025 The requested location can be a path relative to the
2026 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2027 only a file name without any path is given, the
2028 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2029 folder</link> will be prepended to the file name before searching. Note
2030 that on case sensitive file systems, a case sensitive comparison is
2031 performed, otherwise the case in the file path is ignored.
2032
2033 <result name="VBOX_E_FILE_ERROR">
2034 Invalid image file location.
2035 </result>
2036 <result name="VBOX_E_OBJECT_NOT_FOUND">
2037 No matching DVD image found in the media registry.
2038 </result>
2039
2040 </desc>
2041 <param name="location" type="wstring" dir="in">
2042 <desc>CD/DVD image file path to look for.</desc>
2043 </param>
2044 <param name="image" type="IMedium" dir="return">
2045 <desc>Found CD/DVD image object.</desc>
2046 </param>
2047 </method>
2048
2049 <method name="openFloppyImage">
2050 <desc>
2051 Opens a floppy image contained in the specified file of the supported
2052 format and assigns it the given UUID.
2053
2054 After the image is successfully opened by this method, it gets
2055 remembered by (known to) this VirtualBox installation and will be
2056 accessible through <link to="#getFloppyImage"/> and
2057 <link to="#findFloppyImage"/> methods. Remembered images are also
2058 returned as part of the <link to="#floppyImages"/> array and can be
2059 mounted to virtual machines. See IMedium for more details.
2060
2061 See <link to="IMedium::location"/> to get more details about the format
2062 of the location string.
2063
2064 <result name="VBOX_E_FILE_ERROR">
2065 Invalid floppy image file location or could not find the floppy
2066 image at the specified location.
2067 </result>
2068 <result name="VBOX_E_INVALID_OBJECT_STATE">
2069 Floppy image already exists in the media registry.
2070 </result>
2071
2072 <note>
2073 Currently, only raw floppy images are supported by VirtualBox.
2074 </note>
2075 </desc>
2076 <param name="location" type="wstring" dir="in">
2077 <desc>
2078 Full path to the file that contains a valid floppy image.
2079 </desc>
2080 </param>
2081 <param name="id" type="uuid" mod="string" dir="in">
2082 <desc>
2083 UUID to assign to the given image file within this VirtualBox
2084 installation. If an empty (@c null) UUID is specified, the system will
2085 randomly generate a new UUID.
2086 </desc>
2087 </param>
2088 <param name="image" type="IMedium" dir="return">
2089 <desc>Opened floppy image object.</desc>
2090 </param>
2091 </method>
2092
2093 <method name="getFloppyImage">
2094 <desc>
2095 Returns a floppy image with the given UUID.
2096
2097 The image with the given UUID must be known to this VirtualBox
2098 installation, i.e. it must be previously opened by <link
2099 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2100
2101 <result name="VBOX_E_OBJECT_NOT_FOUND">
2102 No matching floppy image found in the media registry.
2103 </result>
2104
2105 </desc>
2106 <param name="id" type="uuid" mod="string" dir="in">
2107 <desc>UUID of the image to look for.</desc>
2108 </param>
2109 <param name="image" type="IMedium" dir="return">
2110 <desc>Found floppy image object.</desc>
2111 </param>
2112 </method>
2113
2114 <method name="findFloppyImage">
2115 <desc>
2116 Returns a floppy image with the given image location.
2117
2118 The image with the given UUID must be known to this VirtualBox
2119 installation, i.e. it must be previously opened by <link
2120 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2121
2122 The search is done by comparing the value of the @a location argument to
2123 the <link to="IMedium::location"/> attribute of each known floppy image.
2124
2125 The requested location can be a path relative to the
2126 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2127 only a file name without any path is given, the
2128 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2129 folder</link> will be prepended to the file name before searching. Note
2130 that on case sensitive file systems, a case sensitive comparison is
2131 performed, otherwise the case of symbols in the file path is ignored.
2132
2133 <result name="VBOX_E_FILE_ERROR">
2134 Invalid image file location.
2135 </result>
2136 <result name="VBOX_E_OBJECT_NOT_FOUND">
2137 No matching floppy image found in the media registry.
2138 </result>
2139
2140 </desc>
2141 <param name="location" type="wstring" dir="in">
2142 <desc>Floppy image file path to look for.</desc>
2143 </param>
2144 <param name="image" type="IMedium" dir="return">
2145 <desc>Found floppy image object.</desc>
2146 </param>
2147 </method>
2148
2149 <method name="getGuestOSType">
2150 <desc>
2151 Returns an object describing the specified guest OS type.
2152
2153 The requested guest OS type is specified using a string which is a
2154 mnemonic identifier of the guest operating system, such as
2155 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2156 particular virtual machine can be read or set using the
2157 <link to="IMachine::OSTypeId"/> attribute.
2158
2159 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2160 available guest OS type objects. Each object has an
2161 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2162 the guest OS this object describes.
2163
2164 <result name="E_INVALIDARG">
2165 @a id is not a valid Guest OS type.
2166 </result>
2167
2168 </desc>
2169 <param name="id" type="uuid" mod="string" dir="in">
2170 <desc>Guest OS type ID string.</desc>
2171 </param>
2172 <param name="type" type="IGuestOSType" dir="return">
2173 <desc>Guest OS type object.</desc>
2174 </param>
2175 </method>
2176
2177 <method name="createSharedFolder">
2178 <desc>
2179 Creates a new global shared folder by associating the given logical
2180 name with the given host path, adds it to the collection of shared
2181 folders and starts sharing it. Refer to the description of
2182 <link to="ISharedFolder"/> to read more about logical names.
2183 <note>
2184 In the current implementation, this operation is not
2185 implemented.
2186 </note>
2187 </desc>
2188 <param name="name" type="wstring" dir="in">
2189 <desc>Unique logical name of the shared folder.</desc>
2190 </param>
2191 <param name="hostPath" type="wstring" dir="in">
2192 <desc>Full path to the shared folder in the host file system.</desc>
2193 </param>
2194 <param name="writable" type="boolean" dir="in">
2195 <desc>Whether the share is writable or readonly</desc>
2196 </param>
2197 <param name="automount" type="boolean" dir="in">
2198 <desc>Whether the share gets automatically mounted by the guest
2199 or not.</desc>
2200 </param>
2201 </method>
2202
2203 <method name="removeSharedFolder">
2204 <desc>
2205 Removes the global shared folder with the given name previously
2206 created by <link to="#createSharedFolder"/> from the collection of
2207 shared folders and stops sharing it.
2208 <note>
2209 In the current implementation, this operation is not
2210 implemented.
2211 </note>
2212 </desc>
2213 <param name="name" type="wstring" dir="in">
2214 <desc>Logical name of the shared folder to remove.</desc>
2215 </param>
2216 </method>
2217
2218 <method name="getExtraDataKeys">
2219 <desc>
2220 Returns an array representing the global extra data keys which currently
2221 have values defined.
2222 </desc>
2223 <param name="value" type="wstring" dir="return" safearray="yes">
2224 <desc>Array of extra data keys.</desc>
2225 </param>
2226 </method>
2227
2228 <method name="getExtraData">
2229 <desc>
2230 Returns associated global extra data.
2231
2232 If the requested data @a key does not exist, this function will
2233 succeed and return an empty string in the @a value argument.
2234
2235 <result name="VBOX_E_FILE_ERROR">
2236 Settings file not accessible.
2237 </result>
2238 <result name="VBOX_E_XML_ERROR">
2239 Could not parse the settings file.
2240 </result>
2241
2242 </desc>
2243 <param name="key" type="wstring" dir="in">
2244 <desc>Name of the data key to get.</desc>
2245 </param>
2246 <param name="value" type="wstring" dir="return">
2247 <desc>Value of the requested data key.</desc>
2248 </param>
2249 </method>
2250
2251 <method name="setExtraData">
2252 <desc>
2253 Sets associated global extra data.
2254
2255 If you pass @c null or empty string as a key @a value, the given @a key
2256 will be deleted.
2257
2258 <note>
2259 Before performing the actual data change, this method will ask all
2260 registered event listener using the
2261 <link to="IExtraDataCanChangeEvent"/>
2262 notification for a permission. If one of the listeners refuses the
2263 new value, the change will not be performed.
2264 </note>
2265 <note>
2266 On success, the
2267 <link to="IExtraDataChangedEvent"/> notification
2268 is called to inform all registered listeners about a successful data
2269 change.
2270 </note>
2271
2272 <result name="VBOX_E_FILE_ERROR">
2273 Settings file not accessible.
2274 </result>
2275 <result name="VBOX_E_XML_ERROR">
2276 Could not parse the settings file.
2277 </result>
2278 <result name="E_ACCESSDENIED">
2279 Modification request refused.
2280 </result>
2281
2282 </desc>
2283 <param name="key" type="wstring" dir="in">
2284 <desc>Name of the data key to set.</desc>
2285 </param>
2286 <param name="value" type="wstring" dir="in">
2287 <desc>Value to assign to the key.</desc>
2288 </param>
2289 </method>
2290
2291 <method name="waitForPropertyChange">
2292 <desc>
2293 Blocks the caller until any of the properties represented by the
2294 @a what argument changes the value or until the given timeout interval
2295 expires.
2296
2297 The @a what argument is a comma separated list of property masks that
2298 describe properties the caller is interested in. The property mask is
2299 a string in the following format:
2300
2301 <pre>
2302 [[group.]subgroup.]name
2303 </pre>
2304
2305 where @c name is the property name and @c group, @c subgroup are zero
2306 or more property group specifiers. Each element (group or name) in
2307 the property mask may be either a Latin string or an asterisk symbol
2308 (@c "*") which is used to match any string for the given element. A
2309 property mask that doesn't contain asterisk symbols represents a
2310 single fully qualified property name.
2311
2312 Groups in the fully qualified property name go from more generic (the
2313 left-most part) to more specific (the right-most part). The first
2314 element is usually a name of the object the property belongs to. The
2315 second element may be either a property name, or a child object name,
2316 or an index if the preceding element names an object which is one of
2317 many objects of the same type. This way, property names form a
2318 hierarchy of properties. Here are some examples of property names:
2319
2320 <table>
2321 <tr>
2322 <td><tt>VirtualBox.version</tt></td>
2323 <td><link to="IVirtualBox::version"/> property</td>
2324 </tr>
2325 <tr>
2326 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2327 <td><link to="IMachine::name"/> property of the machine with the
2328 given UUID</td>
2329 </tr>
2330 </table>
2331
2332 Most property names directly correspond to the properties of objects
2333 (components) provided by the VirtualBox library and may be used to
2334 track changes to these properties. However, there may be
2335 pseudo-property names that don't correspond to any existing object's
2336 property directly, as well as there may be object properties that
2337 don't have a corresponding property name that is understood by this
2338 method, and therefore changes to such properties cannot be
2339 tracked. See individual object's property descriptions to get a
2340 fully qualified property name that can be used with this method (if
2341 any).
2342
2343 There is a special property mask @c "*" (i.e. a string consisting of a
2344 single asterisk symbol) that can be used to match all properties.
2345 Below are more examples of property masks:
2346
2347 <table>
2348 <tr>
2349 <td><tt>VirtualBox.*</tt></td>
2350 <td>Track all properties of the VirtualBox object</td>
2351 </tr>
2352 <tr>
2353 <td><tt>Machine.*.name</tt></td>
2354 <td>Track changes to the <link to="IMachine::name"/> property of
2355 all registered virtual machines</td>
2356 </tr>
2357 </table>
2358
2359 <note>
2360 This function is not implemented in the current version of the
2361 product.
2362 </note>
2363 </desc>
2364 <param name="what" type="wstring" dir="in">
2365 <desc>Comma separated list of property masks.</desc>
2366 </param>
2367 <param name="timeout" type="unsigned long" dir="in">
2368 <desc>
2369 Wait timeout in milliseconds.
2370 Specify -1 for an indefinite wait.
2371 </desc>
2372 </param>
2373 <param name="changed" type="wstring" dir="out">
2374 <desc>
2375 Comma separated list of properties that have been changed and caused
2376 this method to return to the caller.
2377 </desc>
2378 </param>
2379 <param name="values" type="wstring" dir="out">
2380 <desc>Reserved, not currently used.</desc>
2381 </param>
2382 </method>
2383
2384 <!--method name="createDHCPServerForInterface">
2385 <desc>
2386 Creates a dhcp server settings to be used for the given interface
2387 <result name="E_INVALIDARG">
2388 Host network interface @a name already exists.
2389 </result>
2390 </desc>
2391 <param name="interface" type="IHostNetworkInterface" dir="in">
2392 <desc>Network Interface</desc>
2393 </param>
2394 <param name="server" type="IDHCPServer" dir="out">
2395 <desc>Dhcp server settings</desc>
2396 </param>
2397 </method-->
2398
2399 <method name="createDHCPServer">
2400 <desc>
2401 Creates a dhcp server settings to be used for the given internal network name
2402 <result name="E_INVALIDARG">
2403 Host network interface @a name already exists.
2404 </result>
2405 </desc>
2406 <param name="name" type="wstring" dir="in">
2407 <desc>server name</desc>
2408 </param>
2409 <param name="server" type="IDHCPServer" dir="return">
2410 <desc>Dhcp server settings</desc>
2411 </param>
2412 </method>
2413
2414 <method name="findDHCPServerByNetworkName">
2415 <desc>
2416 Searches a dhcp server settings to be used for the given internal network name
2417 <result name="E_INVALIDARG">
2418 Host network interface @a name already exists.
2419 </result>
2420
2421 </desc>
2422 <param name="name" type="wstring" dir="in">
2423 <desc>server name</desc>
2424 </param>
2425 <param name="server" type="IDHCPServer" dir="return">
2426 <desc>Dhcp server settings</desc>
2427 </param>
2428 </method>
2429
2430 <!--method name="findDHCPServerForInterface">
2431 <desc>
2432 Searches a dhcp server settings to be used for the given interface
2433 <result name="E_INVALIDARG">
2434 Host network interface @a name already exists.
2435 </result>
2436 </desc>
2437 <param name="interface" type="IHostNetworkInterface" dir="in">
2438 <desc>Network Interface</desc>
2439 </param>
2440 <param name="server" type="IDHCPServer" dir="out">
2441 <desc>Dhcp server settings</desc>
2442 </param>
2443 </method-->
2444
2445 <method name="removeDHCPServer">
2446 <desc>
2447 Removes the dhcp server settings
2448 <result name="E_INVALIDARG">
2449 Host network interface @a name already exists.
2450 </result>
2451 </desc>
2452 <param name="server" type="IDHCPServer" dir="in">
2453 <desc>Dhcp server settings to be removed</desc>
2454 </param>
2455 </method>
2456
2457
2458 <method name="checkFirmwarePresent">
2459 <desc>
2460 Check if this VirtualBox installation has a firmware
2461 of the given type available, either system-wide or per-user.
2462 Optionally, this may return a hint where this firmware can be
2463 downloaded from.
2464 </desc>
2465 <param name="firmwareType" type="FirmwareType" dir="in">
2466 <desc>
2467 Type of firmware to check.
2468 </desc>
2469 </param>
2470 <param name="version" type="wstring" dir="in">
2471 <desc>Expected version number, usually empty string (presently ignored).</desc>
2472 </param>
2473
2474 <param name="url" type="wstring" dir="out">
2475 <desc>
2476 Suggested URL to download this firmware from.
2477 </desc>
2478 </param>
2479
2480 <param name="file" type="wstring" dir="out">
2481 <desc>
2482 Filename of firmware, only valid if result == TRUE.
2483 </desc>
2484 </param>
2485
2486 <param name="result" type="boolean" dir="return">
2487 <desc>If firmware of this type and version is available.</desc>
2488 </param>
2489 </method>
2490
2491 </interface>
2492
2493 <!--
2494 // IVFSExplorer
2495 /////////////////////////////////////////////////////////////////////////
2496 -->
2497
2498 <enum
2499 name="VFSType"
2500 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
2501 >
2502 <desc>
2503 Virtual file systems supported by VFSExplorer.
2504 </desc>
2505
2506 <const name="File" value="1" />
2507 <const name="Cloud" value="2" />
2508 <const name="S3" value="3" />
2509 <const name="WebDav" value="4" />
2510 </enum>
2511
2512 <enum
2513 name="VFSFileType"
2514 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
2515 >
2516 <desc>
2517 File types known by VFSExplorer.
2518 </desc>
2519
2520 <const name="Unknown" value="1" />
2521 <const name="Fifo" value="2" />
2522 <const name="DevChar" value="3" />
2523 <const name="Directory" value="4" />
2524 <const name="DevBlock" value="5" />
2525 <const name="File" value="6" />
2526 <const name="SymLink" value="7" />
2527 <const name="Socket" value="8" />
2528 <const name="WhiteOut" value="9" />
2529 </enum>
2530
2531 <interface
2532 name="IVFSExplorer" extends="$unknown"
2533 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
2534 wsmap="managed"
2535 >
2536 <desc>
2537 The VFSExplorer interface unifies access to different file system
2538 types. This includes local file systems as well remote file systems like
2539 S3. For a list of supported types see <link to="VFSType" />.
2540 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
2541 </desc>
2542
2543 <attribute name="path" type="wstring" readonly="yes">
2544 <desc>Returns the current path in the virtual file system.</desc>
2545 </attribute>
2546
2547 <attribute name="type" type="VFSType" readonly="yes">
2548 <desc>Returns the file system type which is currently in use.</desc>
2549 </attribute>
2550
2551 <method name="update">
2552 <desc>Updates the internal list of files/directories from the
2553 current directory level. Use <link to="#entryList" /> to get the full list
2554 after a call to this method.</desc>
2555
2556 <param name="aProgress" type="IProgress" dir="return">
2557 <desc>Progress object to track the operation completion.</desc>
2558 </param>
2559 </method>
2560
2561 <method name="cd">
2562 <desc>Change the current directory level.</desc>
2563
2564 <param name="aDir" type="wstring" dir="in">
2565 <desc>The name of the directory to go in.</desc>
2566 </param>
2567
2568 <param name="aProgress" type="IProgress" dir="return">
2569 <desc>Progress object to track the operation completion.</desc>
2570 </param>
2571 </method>
2572
2573 <method name="cdUp">
2574 <desc>Go one directory upwards from the current directory level.</desc>
2575
2576 <param name="aProgress" type="IProgress" dir="return">
2577 <desc>Progress object to track the operation completion.</desc>
2578 </param>
2579 </method>
2580
2581 <method name="entryList">
2582 <desc>Returns a list of files/directories after a call to <link
2583 to="#update" />. The user is responsible for keeping this internal
2584 list up do date.</desc>
2585
2586 <param name="aNames" type="wstring" safearray="yes" dir="out">
2587 <desc>The list of names for the entries.</desc>
2588 </param>
2589
2590 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
2591 <desc>The list of types for the entries.</desc>
2592 </param>
2593 </method>
2594
2595 <method name="exists">
2596 <desc>Checks if the given file list exists in the current directory
2597 level.</desc>
2598
2599 <param name="aNames" type="wstring" safearray="yes" dir="in">
2600 <desc>The names to check.</desc>
2601 </param>
2602
2603 <param name="aExists" type="wstring" safearray="yes" dir="return">
2604 <desc>The names which exist.</desc>
2605 </param>
2606 </method>
2607
2608 <method name="remove">
2609 <desc>Deletes the given files in the current directory level.</desc>
2610
2611 <param name="aNames" type="wstring" safearray="yes" dir="in">
2612 <desc>The names to remove.</desc>
2613 </param>
2614
2615 <param name="aProgress" type="IProgress" dir="return">
2616 <desc>Progress object to track the operation completion.</desc>
2617 </param>
2618 </method>
2619
2620 </interface>
2621
2622 <!--
2623 // IAppliance
2624 /////////////////////////////////////////////////////////////////////////
2625 -->
2626
2627 <interface
2628 name="IAppliance" extends="$unknown"
2629 uuid="fb61a4fc-57e7-48d6-859b-71f37d484cf2"
2630 wsmap="managed"
2631 >
2632 <desc>
2633 Represents a platform-independent appliance in OVF format. An instance of this is returned
2634 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
2635 virtual machines within an appliance with VirtualBox.
2636
2637 The OVF standard suggests two different physical file formats:
2638
2639 <ol>
2640 <li>If the appliance is distributed as a set of files, there must be at least one XML descriptor
2641 file that conforms to the OVF standard and carries an <tt>.ovf</tt> file extension. If
2642 this descriptor file references other files such as disk images, as OVF appliances typically
2643 do, those additional files must be in the same directory as the descriptor file.</li>
2644
2645 <li>If the appliance is distributed as a single file, it must be in TAR format and have the
2646 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
2647 files and optionally other files.
2648
2649 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
2650 be added with a later version.</li>
2651 </ol>
2652
2653 <b>Importing</b> an OVF appliance into VirtualBox as instances of
2654 <link to="IMachine" /> involves the following sequence of API calls:
2655
2656 <ol>
2657 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
2658 </li>
2659
2660 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
2661 would like to import. So long as this file is syntactically valid, this will succeed
2662 and fill the appliance object with the parsed data from the OVF file.
2663 </li>
2664
2665 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
2666 contents of the IAppliance attributes accordingly. These can be inspected by a
2667 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
2668 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
2669 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
2670 systems (machines) in the OVF, which in turn describe the virtual hardware prescribed
2671 by the OVF (network and hardware adapters, virtual disk images, memory size and so on).
2672 The GUI can then give the user the option to confirm and/or change these suggestions.
2673 </li>
2674
2675 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
2676 virtual system (machine) to override the suggestions made by the interpret() routine.
2677 </li>
2678
2679 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
2680 VirtualBox as instances of <link to="IMachine" /> that match the information in the
2681 virtual system descriptions. After this call suceeded, the UUIDs of the machines created
2682 can be found in the <link to="#machines" /> array attribute.
2683 </li>
2684 </ol>
2685
2686 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
2687
2688 <ol>
2689 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
2690 an empty IAppliance object.
2691 </li>
2692
2693 <li>For each machine you would like to export, call <link to="IMachine::export" />
2694 with the IAppliance object you just created. Each such call creates one instance of
2695 <link to="IVirtualSystemDescription" /> inside the appliance.
2696 </li>
2697
2698 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
2699 virtual system (machine) to override the suggestions made by the export() routine.
2700 </li>
2701
2702 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
2703 file written.</li>
2704 </ol>
2705
2706 </desc>
2707
2708 <attribute name="path" type="wstring" readonly="yes">
2709 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
2710 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
2711 <link to="#write" /> (for export).
2712 This attribute is empty until one of these methods has been called.
2713 </desc>
2714 </attribute>
2715
2716 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
2717 <desc>
2718 Array of virtual disk definitions. One such description exists for each
2719 disk definition in the OVF; each string array item represents one such piece of
2720 disk information, with the information fields separated by tab (\t) characters.
2721
2722 The caller should be prepared for additional fields being appended to
2723 this string in future versions of VirtualBox and therefore check for
2724 the number of tabs in the strings returned.
2725
2726 In the current version, the following eight fields are returned per string
2727 in the array:
2728
2729 <ol>
2730 <li>Disk ID (unique string identifier given to disk)</li>
2731
2732 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
2733
2734 <li>Populated size (optional unsigned integer indicating the current size of the
2735 disk; can be approximate; -1 if unspecified)</li>
2736
2737 <li>Format (string identifying the disk format, typically
2738 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
2739
2740 <li>Reference (where to find the disk image, typically a file name; if empty,
2741 then the disk should be created on import)</li>
2742
2743 <li>Image size (optional unsigned integer indicating the size of the image,
2744 which need not necessarily be the same as the values specified above, since
2745 the image may be compressed or sparse; -1 if not specified)</li>
2746
2747 <li>Chunk size (optional unsigned integer if the image is split into chunks;
2748 presently unsupported and always -1)</li>
2749
2750 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
2751 </ol>
2752 </desc>
2753 </attribute>
2754
2755 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
2756 <desc> Array of virtual system descriptions. One such description is created
2757 for each virtual system (machine) found in the OVF.
2758 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
2759 (for export) has been called.
2760 </desc>
2761 </attribute>
2762
2763 <attribute name="machines" type="wstring" readonly="yes" safearray="yes">
2764 <desc>
2765 Contains the UUIDs of the machines created from the information in this appliances. This is only
2766 relevant for the import case, and will only contain data after a call to <link to="#importMachines" />
2767 succeeded.
2768 </desc>
2769 </attribute>
2770
2771 <method name="read">
2772 <desc>
2773 Reads an OVF file into the appliance object.
2774
2775 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
2776 mere fact that this method returns successfully does not mean that VirtualBox supports all
2777 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
2778 </desc>
2779 <param name="file" type="wstring" dir="in">
2780 <desc>
2781 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
2782 on whether the appliance is distributed as a set of files or as a single file, respectively).
2783 </desc>
2784 </param>
2785 <param name="aProgress" type="IProgress" dir="return">
2786 <desc></desc>
2787 </param>
2788 </method>
2789
2790 <method name="interpret">
2791 <desc>
2792 Interprets the OVF data that was read when the appliance was constructed. After
2793 calling this method, one can inspect the
2794 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
2795 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
2796 the appliance.
2797
2798 Calling this method is the second step of importing an appliance into VirtualBox;
2799 see <link to="IAppliance" /> for an overview.
2800
2801 After calling this method, one should call <link to="#getWarnings" /> to find out
2802 if problems were encountered during the processing which might later lead to
2803 errors.
2804 </desc>
2805 </method>
2806
2807 <method name="importMachines">
2808 <desc>
2809 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
2810 and other interfaces that match the information contained in the appliance as
2811 closely as possible, as represented by the import instructions in the
2812 <link to="#virtualSystemDescriptions" /> array.
2813
2814 Calling this method is the final step of importing an appliance into VirtualBox;
2815 see <link to="IAppliance" /> for an overview.
2816
2817 Since importing the appliance will most probably involve copying and converting
2818 disk images, which can take a long time, this method operates asynchronously and
2819 returns an IProgress object to allow the caller to monitor the progress.
2820
2821 After the import succeeded, the UUIDs of the IMachine instances created can be
2822 retrieved from the <link to="#machines" /> array attribute.
2823 </desc>
2824
2825 <param name="aProgress" type="IProgress" dir="return">
2826 <desc></desc>
2827 </param>
2828 </method>
2829
2830 <method name="createVFSExplorer">
2831 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
2832
2833 <param name="aUri" type="wstring" dir="in">
2834 <desc>The URI describing the file system to use.</desc>
2835 </param>
2836
2837 <param name="aExplorer" type="IVFSExplorer" dir="return">
2838 <desc></desc>
2839 </param>
2840 </method>
2841
2842 <method name="write">
2843 <desc>
2844 Writes the contents of the appliance exports into a new OVF file.
2845
2846 Calling this method is the final step of exporting an appliance from VirtualBox;
2847 see <link to="IAppliance" /> for an overview.
2848
2849 Since exporting the appliance will most probably involve copying and converting
2850 disk images, which can take a long time, this method operates asynchronously and
2851 returns an IProgress object to allow the caller to monitor the progress.
2852 </desc>
2853 <param name="format" type="wstring" dir="in">
2854 <desc>
2855 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
2856 future versions of VirtualBox may support additional formats.
2857 </desc>
2858 </param>
2859 <param name="path" type="wstring" dir="in">
2860 <desc>
2861 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
2862 on whether the appliance is distributed as a set of files or as a single file, respectively).
2863 </desc>
2864 </param>
2865 <param name="aProgress" type="IProgress" dir="return">
2866 <desc>Progress object to track the operation completion.</desc>
2867 </param>
2868 </method>
2869
2870 <method name="getWarnings">
2871 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
2872
2873 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
2874 <desc></desc>
2875 </param>
2876 </method>
2877
2878 </interface>
2879
2880 <enum
2881 name="VirtualSystemDescriptionType"
2882 uuid="c0f8f135-3a1d-417d-afa6-b38b95a91f90"
2883 >
2884 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
2885 a configuration value.</desc>
2886
2887 <const name="Ignore" value="1" />
2888 <const name="OS" value="2" />
2889 <const name="Name" value="3" />
2890 <const name="Product" value="4" />
2891 <const name="Vendor" value="5" />
2892 <const name="Version" value="6" />
2893 <const name="ProductUrl" value="7" />
2894 <const name="VendorUrl" value="8" />
2895 <const name="Description" value="9" />
2896 <const name="License" value="10" />
2897 <const name="Miscellaneous" value="11" />
2898 <const name="CPU" value="12" />
2899 <const name="Memory" value="13" />
2900 <const name="HardDiskControllerIDE" value="14" />
2901 <const name="HardDiskControllerSATA" value="15" />
2902 <const name="HardDiskControllerSCSI" value="16" />
2903 <const name="HardDiskControllerSAS" value="17" />
2904 <const name="HardDiskImage" value="18" />
2905 <const name="Floppy" value="19" />
2906 <const name="CDROM" value="20" />
2907 <const name="NetworkAdapter" value="21" />
2908 <const name="USBController" value="22" />
2909 <const name="SoundCard" value="23" />
2910
2911 </enum>
2912
2913 <enum
2914 name="VirtualSystemDescriptionValueType"
2915 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
2916 >
2917 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
2918 type to fetch.</desc>
2919
2920 <const name="Reference" value="1" />
2921 <const name="Original" value="2" />
2922 <const name="Auto" value="3" />
2923 <const name="ExtraConfig" value="4" />
2924
2925 </enum>
2926
2927 <interface
2928 name="IVirtualSystemDescription" extends="$unknown"
2929 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
2930 wsmap="managed"
2931 >
2932
2933 <desc>Represents one virtual system (machine) in an appliance. This interface is used in
2934 the <link to="IAppliance::virtualSystemDescriptions" /> array. After
2935 <link to="IAppliance::interpret" /> has been called, that array contains information
2936 about how the virtual systems described in the OVF should best be imported into
2937 VirtualBox virtual machines. See <link to="IAppliance" /> for the steps required to
2938 import an OVF into VirtualBox.
2939 </desc>
2940
2941 <attribute name="count" type="unsigned long" readonly="yes">
2942 <desc>Return the number of virtual system description entries.</desc>
2943 </attribute>
2944
2945 <method name="getDescription">
2946 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
2947 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
2948
2949 The list below identifies the value sets that are possible depending on the
2950 <link to="VirtualSystemDescriptionType" /> enum value in the array item in @a aTypes[]. In each case,
2951 the array item with the same index in @a aOvfValues[] will contain the original value as contained
2952 in the OVF file (just for informational purposes), and the corresponding item in @a aVBoxValues[]
2953 will contain a suggested value to be used for VirtualBox. Depending on the description type,
2954 the @a aExtraConfigValues[] array item may also be used.
2955
2956 <ul>
2957 <li>
2958 "OS": the guest operating system type. There must be exactly one such array item on import. The
2959 corresponding item in @a aVBoxValues[] contains the suggested guest operating system for VirtualBox.
2960 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
2961 item in @a aOvfValues[] will contain a numerical value that described the operating system in the OVF.
2962 </li>
2963 <li>
2964 "Name": the name to give to the new virtual machine. There can be at most one such array item;
2965 if none is present on import, then an automatic name will be created from the operating system
2966 type. The correponding item im @a aOvfValues[] will contain the suggested virtual machine name
2967 from the OVF file, and @a aVBoxValues[] will contain a suggestion for a unique VirtualBox
2968 <link to="IMachine" /> name that does not exist yet.
2969 </li>
2970 <li>
2971 "Description": an arbitrary description.
2972 </li>
2973 <li>
2974 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
2975 code to display such a license for agreement; the Main API does not enforce any such policy.
2976 </li>
2977 <li>
2978 Miscellaneous: reserved for future use.
2979 </li>
2980 <li>
2981 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
2982 </li>
2983 <li>
2984 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
2985 is present on import, then VirtualBox will set a meaningful default based on the operating system
2986 type.
2987 </li>
2988 <li>
2989 "HardDiskControllerIDE": an IDE hard disk controller. There can be at most two such items.
2990 An optional value in @a aOvfValues[] and @a aVBoxValues[] can be "PIIX3" or "PIIX4" to specify
2991 the type of IDE controller; this corresponds to the ResourceSubType element which VirtualBox
2992 writes into the OVF.
2993 The matching item in the @a aRefs[] array will contain an integer that items of the "Harddisk"
2994 type can use to specify which hard disk controller a virtual disk should be connected to.
2995 Note that in OVF, an IDE controller has two channels, corresponding to "master" and "slave"
2996 in traditional terminology, whereas the IDE storage controller that VirtualBox supports in
2997 its virtual machines supports four channels (primary master, primary slave, secondary master,
2998 secondary slave) and thus maps to two IDE controllers in the OVF sense.
2999 </li>
3000 <li>
3001 "HardDiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3002 has no value in @a aOvfValues[] or @a aVBoxValues[].
3003 The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
3004 </li>
3005 <li>
3006 "HardDiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3007 The items in @a aOvfValues[] and @a aVBoxValues[] will either be "LsiLogic", "BusLogic" or
3008 "LsiLogicSas". (Note that in OVF, the LsiLogicSas controller is treated as a SCSI controller
3009 whereas VirtualBox considers it a class of storage controllers of its own; see
3010 <link to="StorageControllerType" />).
3011 The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
3012 </li>
3013 <li>
3014 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3015 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3016
3017 The array item in @a aOvfValues[] will contain the file specification from the OVF file (without
3018 a path since the image file should be in the same location as the OVF file itself), whereas the
3019 item in @a aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
3020 hard disk image. This means that on import the image will be copied and converted from the
3021 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3022 On import, the target image will also be registered with VirtualBox.
3023
3024 The matching item in the @a aExtraConfigValues[] array must contain a string of the following
3025 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3026 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3027 the image to. That number must be the index of an array item with one of the hard disk controller
3028 types (HardDiskControllerSCSI, HardDiskControllerSATA, HardDiskControllerIDE).
3029 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3030 this can be 0 or 1 for master or slave, respectively. For compatibility with VirtualBox versions
3031 before 3.2, the values 2 and 3 (for secondary master and secondary slave) are also supported, but
3032 no longer exported. For SATA and SCSI controllers, the channel can range from 0-29.
3033 </li>
3034 <li>
3035 "CDROM": a virtual CD-ROM drive. The matching item in @a aExtraConfigValue[] contains the same
3036 attachment information as with "HardDiskImage" items.
3037 </li>
3038 <li>
3039 "CDROM": a virtual floppy drive. The matching item in @a aExtraConfigValue[] contains the same
3040 attachment information as with "HardDiskImage" items.
3041 </li>
3042 <li>
3043 "NetworkAdapter": a network adapter. The array item in @a aVBoxValues[] will specify the hardware
3044 for the network adapter, whereas the array item in @a aExtraConfigValues[] will have a string
3045 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3046 </li>
3047 <li>
3048 "USBController": a USB controller. There can be at most one such item. If and only if such an
3049 item ispresent, USB support will be enabled for the new virtual machine.
3050 </li>
3051 <li>
3052 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3053 present, sound support will be enabled for the new virtual machine. Note that the virtual
3054 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3055 may be different from the virtual soundcard expected by the appliance.
3056 </li>
3057 </ul>
3058
3059 </desc>
3060
3061 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3062 <desc></desc>
3063 </param>
3064
3065 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3066 <desc></desc>
3067 </param>
3068
3069 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3070 <desc></desc>
3071 </param>
3072
3073 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3074 <desc></desc>
3075 </param>
3076
3077 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3078 <desc></desc>
3079 </param>
3080
3081 </method>
3082
3083 <method name="getDescriptionByType">
3084 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3085 should be returned.</desc>
3086
3087 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3088 <desc></desc>
3089 </param>
3090
3091 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3092 <desc></desc>
3093 </param>
3094
3095 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3096 <desc></desc>
3097 </param>
3098
3099 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3100 <desc></desc>
3101 </param>
3102
3103 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3104 <desc></desc>
3105 </param>
3106
3107 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3108 <desc></desc>
3109 </param>
3110
3111 </method>
3112
3113 <method name="getValuesByType">
3114 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3115 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3116 values.</desc>
3117
3118 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3119 <desc></desc>
3120 </param>
3121
3122 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3123 <desc></desc>
3124 </param>
3125
3126 <param name="aValues" type="wstring" dir="return" safearray="yes">
3127 <desc></desc>
3128 </param>
3129
3130 </method>
3131
3132 <method name="setFinalValues">
3133 <desc>
3134 This method allows the appliance's user to change the configuration for the virtual
3135 system descriptions. For each array item returned from <link to="#getDescription" />,
3136 you must pass in one boolean value and one configuration value.
3137
3138 Each item in the boolean array determines whether the particular configuration item
3139 should be enabled.
3140 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3141 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3142 and SoundCard.
3143
3144 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3145 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
3146 the configuration remains unchanged. Please see the documentation for getDescription()
3147 for valid configuration values for the individual array item types. If the
3148 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
3149 </desc>
3150
3151 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3152 <desc></desc>
3153 </param>
3154
3155 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
3156 <desc></desc>
3157 </param>
3158
3159 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3160 <desc></desc>
3161 </param>
3162 </method>
3163
3164 <method name="addDescription">
3165 <desc>
3166 This method adds an additional description entry to the stack of already
3167 available descriptions for this virtual system. This is handy for writing
3168 values which aren't directly supported by VirtualBox. One example would
3169 be the License type of <link to="VirtualSystemDescriptionType" />.
3170 </desc>
3171
3172 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3173 <desc></desc>
3174 </param>
3175
3176 <param name="aVBoxValue" type="wstring" dir="in">
3177 <desc></desc>
3178 </param>
3179
3180 <param name="aExtraConfigValue" type="wstring" dir="in">
3181 <desc></desc>
3182 </param>
3183 </method>
3184 </interface>
3185
3186
3187 <!--
3188 // IMachine
3189 /////////////////////////////////////////////////////////////////////////
3190 -->
3191
3192 <interface
3193 name="IInternalMachineControl" extends="$unknown"
3194 uuid="26604a54-8628-491b-a0ea-e1392a16d13b"
3195 internal="yes"
3196 wsmap="suppress"
3197 >
3198 <method name="setRemoveSavedState">
3199 <desc>
3200 Updates the flag whether saved state is removed on a machine state
3201 change from Saved to PoweredOff.
3202 </desc>
3203 <param name="aRemove" type="boolean" dir="in"/>
3204 </method>
3205
3206 <method name="updateState">
3207 <desc>
3208 Updates the VM state.
3209 <note>
3210 This operation will also update the settings file with
3211 the correct information about the saved state file
3212 and delete this file from disk when appropriate.
3213 </note>
3214 </desc>
3215 <param name="state" type="MachineState" dir="in"/>
3216 </method>
3217
3218 <method name="getIPCId">
3219 <param name="id" type="wstring" dir="return"/>
3220 </method>
3221
3222 <method name="beginPowerUp">
3223 <desc>
3224 Tells VBoxSVC that <link to="IConsole::powerUp"/> is under ways and
3225 gives it the progress object that should be part of any pending
3226 <link to="IMachine::launchVMProcess"/> operations. The progress
3227 object may be called back to reflect an early cancelation, so some care
3228 have to be taken with respect to any cancelation callbacks. The console
3229 object will call <link to="IInternalMachineControl::endPowerUp"/>
3230 to signal the completion of the progress object.
3231 </desc>
3232 <param name="progress" type="IProgress" dir="in"/>
3233 </method>
3234
3235 <method name="endPowerUp">
3236 <desc>
3237 Tells VBoxSVC that <link to="IConsole::powerUp"/> has completed.
3238 This method may query status information from the progress object it
3239 received in <link to="IInternalMachineControl::beginPowerUp"/> and copy
3240 it over to any in-progress <link to="IMachine::launchVMProcess"/>
3241 call in order to complete that progress object.
3242 </desc>
3243 <param name="result" type="long" dir="in"/>
3244 </method>
3245
3246 <method name="runUSBDeviceFilters">
3247 <desc>
3248 Asks the server to run USB devices filters of the associated
3249 machine against the given USB device and tell if there is
3250 a match.
3251 <note>
3252 Intended to be used only for remote USB devices. Local
3253 ones don't require to call this method (this is done
3254 implicitly by the Host and USBProxyService).
3255 </note>
3256 </desc>
3257 <param name="device" type="IUSBDevice" dir="in"/>
3258 <param name="matched" type="boolean" dir="out"/>
3259 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3260 </method>
3261
3262 <method name="captureUSBDevice">
3263 <desc>
3264 Requests a capture of the given host USB device.
3265 When the request is completed, the VM process will
3266 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3267 notification.
3268 </desc>
3269 <param name="id" type="uuid" mod="string" dir="in"/>
3270 </method>
3271
3272 <method name="detachUSBDevice">
3273 <desc>
3274 Notification that a VM is going to detach (@a done = @c false) or has
3275 already detached (@a done = @c true) the given USB device.
3276 When the @a done = @c true request is completed, the VM process will
3277 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3278 notification.
3279 <note>
3280 In the @a done = @c true case, the server must run its own filters
3281 and filters of all VMs but this one on the detached device
3282 as if it were just attached to the host computer.
3283 </note>
3284 </desc>
3285 <param name="id" type="uuid" mod="string" dir="in"/>
3286 <param name="done" type="boolean" dir="in"/>
3287 </method>
3288
3289 <method name="autoCaptureUSBDevices">
3290 <desc>
3291 Requests a capture all matching USB devices attached to the host.
3292 When the request is completed, the VM process will
3293 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3294 notification per every captured device.
3295 </desc>
3296 </method>
3297
3298 <method name="detachAllUSBDevices">
3299 <desc>
3300 Notification that a VM that is being powered down. The done
3301 parameter indicates whether which stage of the power down
3302 we're at. When @a done = @c false the VM is announcing its
3303 intentions, while when @a done = @c true the VM is reporting
3304 what it has done.
3305 <note>
3306 In the @a done = @c true case, the server must run its own filters
3307 and filters of all VMs but this one on all detach devices as
3308 if they were just attached to the host computer.
3309 </note>
3310 </desc>
3311 <param name="done" type="boolean" dir="in"/>
3312 </method>
3313
3314 <method name="onSessionEnd">
3315 <desc>
3316 Triggered by the given session object when the session is about
3317 to close normally.
3318 </desc>
3319 <param name="session" type="ISession" dir="in">
3320 <desc>Session that is being closed</desc>
3321 </param>
3322 <param name="progress" type="IProgress" dir="return">
3323 <desc>
3324 Used to wait until the corresponding machine is actually
3325 dissociated from the given session on the server.
3326 Returned only when this session is a direct one.
3327 </desc>
3328 </param>
3329 </method>
3330
3331 <method name="beginSavingState">
3332 <desc>
3333 Called by the VM process to inform the server it wants to
3334 save the current state and stop the VM execution.
3335 </desc>
3336 <param name="progress" type="IProgress" dir="in">
3337 <desc>
3338 Progress object created by the VM process to wait until
3339 the state is saved.
3340 </desc>
3341 </param>
3342 <param name="stateFilePath" type="wstring" dir="out">
3343 <desc>
3344 File path the VM process must save the execution state to.
3345 </desc>
3346 </param>
3347 </method>
3348
3349 <method name="endSavingState">
3350 <desc>
3351 Called by the VM process to inform the server that saving
3352 the state previously requested by #beginSavingState is either
3353 successfully finished or there was a failure.
3354
3355 <result name="VBOX_E_FILE_ERROR">
3356 Settings file not accessible.
3357 </result>
3358 <result name="VBOX_E_XML_ERROR">
3359 Could not parse the settings file.
3360 </result>
3361
3362 </desc>
3363
3364 <param name="success" type="boolean" dir="in">
3365 <desc>@c true to indicate success and @c false otherwise.
3366 </desc>
3367 </param>
3368 </method>
3369
3370 <method name="adoptSavedState">
3371 <desc>
3372 Gets called by IConsole::adoptSavedState.
3373 <result name="VBOX_E_FILE_ERROR">
3374 Invalid saved state file path.
3375 </result>
3376 </desc>
3377 <param name="savedStateFile" type="wstring" dir="in">
3378 <desc>Path to the saved state file to adopt.</desc>
3379 </param>
3380 </method>
3381
3382 <method name="beginTakingSnapshot">
3383 <desc>
3384 Called from the VM process to request from the server to perform the
3385 server-side actions of creating a snapshot (creating differencing images
3386 and the snapshot object).
3387
3388 <result name="VBOX_E_FILE_ERROR">
3389 Settings file not accessible.
3390 </result>
3391 <result name="VBOX_E_XML_ERROR">
3392 Could not parse the settings file.
3393 </result>
3394 </desc>
3395 <param name="initiator" type="IConsole" dir="in">
3396 <desc>The console object that initiated this call.</desc>
3397 </param>
3398 <param name="name" type="wstring" dir="in">
3399 <desc>Snapshot name.</desc>
3400 </param>
3401 <param name="description" type="wstring" dir="in">
3402 <desc>Snapshot description.</desc>
3403 </param>
3404 <param name="consoleProgress" type="IProgress" dir="in">
3405 <desc>
3406 Progress object created by the VM process tracking the
3407 snapshot's progress. This has the following sub-operations:
3408 <ul>
3409 <li>setting up (weight 1);</li>
3410 <li>one for each medium attachment that needs a differencing image (weight 1 each);</li>
3411 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3412 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3413 <li>finishing up (weight 1)</li>
3414 </ul>
3415 </desc>
3416 </param>
3417 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3418 <desc>
3419 Whether this is an online snapshot (i.e. the machine is running).
3420 </desc>
3421 </param>
3422 <param name="stateFilePath" type="wstring" dir="out">
3423 <desc>
3424 File path the VM process must save the execution state to.
3425 </desc>
3426 </param>
3427 </method>
3428
3429 <method name="endTakingSnapshot">
3430 <desc>
3431 Called by the VM process to inform the server that the snapshot
3432 previously requested by #beginTakingSnapshot is either
3433 successfully taken or there was a failure.
3434 </desc>
3435
3436 <param name="success" type="boolean" dir="in">
3437 <desc>@c true to indicate success and @c false otherwise</desc>
3438 </param>
3439 </method>
3440
3441 <method name="deleteSnapshot">
3442 <desc>
3443 Gets called by IConsole::deleteSnapshot.
3444 <result name="VBOX_E_INVALID_OBJECT_STATE">
3445 Snapshot has more than one child snapshot.
3446 </result>
3447 </desc>
3448 <param name="initiator" type="IConsole" dir="in">
3449 <desc>The console object that initiated this call.</desc>
3450 </param>
3451 <param name="id" type="uuid" mod="string" dir="in">
3452 <desc>UUID of the snapshot to delete.</desc>
3453 </param>
3454 <param name="machineState" type="MachineState" dir="out">
3455 <desc>New machine state after this operation is started.</desc>
3456 </param>
3457 <param name="progress" type="IProgress" dir="return">
3458 <desc>Progress object to track the operation completion.</desc>
3459 </param>
3460 </method>
3461
3462 <method name="finishOnlineMergeMedium">
3463 <desc>
3464 Gets called by IConsole::onlineMergeMedium.
3465 </desc>
3466 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
3467 <desc>The medium attachment which needs to be cleaned up.</desc>
3468 </param>
3469 <param name="source" type="IMedium" dir="in">
3470 <desc>Merge source medium.</desc>
3471 </param>
3472 <param name="target" type="IMedium" dir="in">
3473 <desc>Merge target medium.</desc>
3474 </param>
3475 <param name="mergeForward" type="boolean" dir="in">
3476 <desc>Merge direction.</desc>
3477 </param>
3478 <param name="parentForTarget" type="IMedium" dir="in">
3479 <desc>For forward merges: new parent for target medium.</desc>
3480 </param>
3481 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
3482 <desc>For backward merges: list of media which need their parent UUID
3483 updated.</desc>
3484 </param>
3485 </method>
3486
3487 <method name="restoreSnapshot">
3488 <desc>
3489 Gets called by IConsole::RestoreSnapshot.
3490 </desc>
3491 <param name="initiator" type="IConsole" dir="in">
3492 <desc>The console object that initiated this call.</desc>
3493 </param>
3494 <param name="snapshot" type="ISnapshot" dir="in">
3495 <desc>The snapshot to restore the VM state from.</desc>
3496 </param>
3497 <param name="machineState" type="MachineState" dir="out">
3498 <desc>New machine state after this operation is started.</desc>
3499 </param>
3500 <param name="progress" type="IProgress" dir="return">
3501 <desc>Progress object to track the operation completion.</desc>
3502 </param>
3503 </method>
3504
3505 <method name="pullGuestProperties">
3506 <desc>
3507 Get the list of the guest properties matching a set of patterns along
3508 with their values, time stamps and flags and give responsibility for
3509 managing properties to the console.
3510 </desc>
3511 <param name="name" type="wstring" dir="out" safearray="yes">
3512 <desc>
3513 The names of the properties returned.
3514 </desc>
3515 </param>
3516 <param name="value" type="wstring" dir="out" safearray="yes">
3517 <desc>
3518 The values of the properties returned. The array entries match the
3519 corresponding entries in the @a name array.
3520 </desc>
3521 </param>
3522 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3523 <desc>
3524 The time stamps of the properties returned. The array entries match
3525 the corresponding entries in the @a name array.
3526 </desc>
3527 </param>
3528 <param name="flags" type="wstring" dir="out" safearray="yes">
3529 <desc>
3530 The flags of the properties returned. The array entries match the
3531 corresponding entries in the @a name array.
3532 </desc>
3533 </param>
3534 </method>
3535
3536 <method name="pushGuestProperty">
3537 <desc>
3538 Update a single guest property in IMachine.
3539 </desc>
3540 <param name="name" type="wstring" dir="in">
3541 <desc>
3542 The name of the property to be updated.
3543 </desc>
3544 </param>
3545 <param name="value" type="wstring" dir="in">
3546 <desc>
3547 The value of the property.
3548 </desc>
3549 </param>
3550 <param name="timestamp" type="unsigned long long" dir="in">
3551 <desc>
3552 The timestamp of the property.
3553 </desc>
3554 </param>
3555 <param name="flags" type="wstring" dir="in">
3556 <desc>
3557 The flags of the property.
3558 </desc>
3559 </param>
3560 </method>
3561
3562 <method name="lockMedia">
3563 <desc>
3564 Locks all media attached to the machine for writing and parents of
3565 attached differencing media (if any) for reading. This operation is
3566 atomic so that if it fails no media is actually locked.
3567
3568 This method is intended to be called when the machine is in Starting or
3569 Restoring state. The locked media will be automatically unlocked when
3570 the machine is powered off or crashed.
3571 </desc>
3572 </method>
3573 <method name="unlockMedia">
3574 <desc>
3575 Unlocks all media previously locked using
3576 <link to="IInternalMachineControl::lockMedia"/>.
3577
3578 This method is intended to be used with teleportation so that it is
3579 possible to teleport between processes on the same machine.
3580 </desc>
3581 </method>
3582 </interface>
3583
3584 <interface
3585 name="IBIOSSettings" extends="$unknown"
3586 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3587 wsmap="managed"
3588 >
3589 <desc>
3590 The IBIOSSettings interface represents BIOS settings of the virtual
3591 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3592 </desc>
3593 <attribute name="logoFadeIn" type="boolean">
3594 <desc>Fade in flag for BIOS logo animation.</desc>
3595 </attribute>
3596
3597 <attribute name="logoFadeOut" type="boolean">
3598 <desc>Fade out flag for BIOS logo animation.</desc>
3599 </attribute>
3600
3601 <attribute name="logoDisplayTime" type="unsigned long">
3602 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3603 </attribute>
3604
3605 <attribute name="logoImagePath" type="wstring">
3606 <desc>
3607 Local file system path for external BIOS splash image. Empty string
3608 means the default image is shown on boot.
3609 </desc>
3610 </attribute>
3611
3612 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3613 <desc>Mode of the BIOS boot device menu.</desc>
3614 </attribute>
3615
3616 <attribute name="ACPIEnabled" type="boolean">
3617 <desc>ACPI support flag.</desc>
3618 </attribute>
3619
3620 <attribute name="IOAPICEnabled" type="boolean">
3621 <desc>
3622 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3623 and support IRQs above 15.
3624 </desc>
3625 </attribute>
3626
3627 <attribute name="timeOffset" type="long long">
3628 <desc>
3629 Offset in milliseconds from the host system time. This allows for
3630 guests running with a different system date/time than the host.
3631 It is equivalent to setting the system date/time in the BIOS except
3632 it is not an absolute value but a relative one. Guest Additions
3633 time synchronization honors this offset.
3634 </desc>
3635 </attribute>
3636
3637 <attribute name="PXEDebugEnabled" type="boolean">
3638 <desc>
3639 PXE debug logging flag. If set, VirtualBox will write extensive
3640 PXE trace information to the release log.
3641 </desc>
3642 </attribute>
3643
3644 </interface>
3645
3646 <interface
3647 name="IMachine" extends="$unknown"
3648 uuid="de8f0b23-f285-4779-acf4-08eddda7ec75"
3649 wsmap="managed"
3650 >
3651 <desc>
3652 The IMachine interface represents a virtual machine, or guest, created
3653 in VirtualBox.
3654
3655 This interface is used in two contexts. First of all, a collection of
3656 objects implementing this interface is stored in the
3657 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
3658 machines that are currently registered with this VirtualBox
3659 installation. Also, once a session has been opened for the given virtual
3660 machine (e.g. the virtual machine is running), the machine object
3661 associated with the open session can be queried from the session object;
3662 see <link to="ISession"/> for details.
3663
3664 The main role of this interface is to expose the settings of the virtual
3665 machine and provide methods to change various aspects of the virtual
3666 machine's configuration. For machine objects stored in the
3667 <link to="IVirtualBox::machines"/> collection, all attributes are
3668 read-only unless explicitly stated otherwise in individual attribute
3669 and method descriptions.
3670
3671 In order to change a machine setting, a session for this machine must be
3672 opened using one of the <link to="IMachine::lockMachine" /> or
3673 <link to="IMachine::launchVMProcess"/> methods. After the
3674 machine has been successfully locked for a session, a mutable machine object
3675 needs to be queried from the session object and then the desired settings
3676 changes can be applied to the returned object using IMachine attributes and
3677 methods. See the <link to="ISession"/> interface description for more
3678 information about sessions.
3679
3680 Note that IMachine does not provide methods to control virtual machine
3681 execution (such as start the machine, or power it down) -- these methods
3682 are grouped in a separate interface called <link to="IConsole" />.
3683
3684 <see>ISession, IConsole</see>
3685 </desc>
3686
3687 <attribute name="parent" type="IVirtualBox" readonly="yes">
3688 <desc>Associated parent object.</desc>
3689 </attribute>
3690
3691 <attribute name="accessible" type="boolean" readonly="yes">
3692 <desc>
3693 Whether this virtual machine is currently accessible or not.
3694
3695 A machine is always deemed accessible unless it is registered <i>and</i>
3696 its settings file cannot be read or parsed (either because the file itself
3697 is unavailable or has invalid XML contents).
3698
3699 Every time this property is read, the accessibility state of
3700 this machine is re-evaluated. If the returned value is @c false,
3701 the <link to="#accessError"/> property may be used to get the
3702 detailed error information describing the reason of
3703 inaccessibility, including XML error messages.
3704
3705 When the machine is inaccessible, only the following properties
3706 can be used on it:
3707 <ul>
3708 <li><link to="#parent"/></li>
3709 <li><link to="#id"/></li>
3710 <li><link to="#settingsFilePath"/></li>
3711 <li><link to="#accessible"/></li>
3712 <li><link to="#accessError"/></li>
3713 </ul>
3714
3715 An attempt to access any other property or method will return
3716 an error.
3717
3718 The only possible action you can perform on an inaccessible
3719 machine is to unregister it using the
3720 <link to="IMachine::unregister"/> call (or, to check
3721 for the accessibility state once more by querying this
3722 property).
3723
3724 <note>
3725 In the current implementation, once this property returns
3726 @c true, the machine will never become inaccessible
3727 later, even if its settings file cannot be successfully
3728 read/written any more (at least, until the VirtualBox
3729 server is restarted). This limitation may be removed in
3730 future releases.
3731 </note>
3732 </desc>
3733 </attribute>
3734
3735 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3736 <desc>
3737 Error information describing the reason of machine
3738 inaccessibility.
3739
3740 Reading this property is only valid after the last call to
3741 <link to="#accessible"/> returned @c false (i.e. the
3742 machine is currently unaccessible). Otherwise, a @c null
3743 IVirtualBoxErrorInfo object will be returned.
3744 </desc>
3745 </attribute>
3746
3747 <attribute name="name" type="wstring">
3748 <desc>
3749 Name of the virtual machine.
3750
3751 Besides being used for human-readable identification purposes
3752 everywhere in VirtualBox, the virtual machine name is also used
3753 as a name of the machine's settings file and as a name of the
3754 subdirectory this settings file resides in. Thus, every time you
3755 change the value of this property, the settings file will be
3756 renamed once you call <link to="#saveSettings"/> to confirm the
3757 change. The containing subdirectory will be also renamed, but
3758 only if it has exactly the same name as the settings file
3759 itself prior to changing this property (for backward compatibility
3760 with previous API releases). The above implies the following
3761 limitations:
3762 <ul>
3763 <li>The machine name cannot be empty.</li>
3764 <li>The machine name can contain only characters that are valid
3765 file name characters according to the rules of the file
3766 system used to store VirtualBox configuration.</li>
3767 <li>You cannot have two or more machines with the same name
3768 if they use the same subdirectory for storing the machine
3769 settings files.</li>
3770 <li>You cannot change the name of the machine if it is running,
3771 or if any file in the directory containing the settings file
3772 is being used by another running machine or by any other
3773 process in the host operating system at a time when
3774 <link to="#saveSettings"/> is called.
3775 </li>
3776 </ul>
3777 If any of the above limitations are hit, <link to="#saveSettings"/>
3778 will return an appropriate error message explaining the exact
3779 reason and the changes you made to this machine will not be
3780 saved.
3781 <note>
3782 For "legacy" machines created using the
3783 <link to="IVirtualBox::createLegacyMachine"/> call,
3784 the above naming limitations do not apply because the
3785 machine name does not affect the settings file name.
3786 The settings file name remains the same as it was specified
3787 during machine creation and never changes.
3788 </note>
3789 </desc>
3790 </attribute>
3791
3792 <attribute name="description" type="wstring">
3793 <desc>
3794 Description of the virtual machine.
3795
3796 The description attribute can contain any text and is
3797 typically used to describe the hardware and software
3798 configuration of the virtual machine in detail (i.e. network
3799 settings, versions of the installed software and so on).
3800 </desc>
3801 </attribute>
3802
3803 <attribute name="id" type="uuid" mod="string" readonly="yes">
3804 <desc>UUID of the virtual machine.</desc>
3805 </attribute>
3806
3807 <attribute name="OSTypeId" type="wstring">
3808 <desc>
3809 User-defined identifier of the Guest OS type.
3810 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
3811 an IGuestOSType object representing details about the given
3812 Guest OS type.
3813 <note>
3814 This value may differ from the value returned by
3815 <link to="IGuest::OSTypeId"/> if Guest Additions are
3816 installed to the guest OS.
3817 </note>
3818 </desc>
3819 </attribute>
3820
3821 <attribute name="HardwareVersion" type="wstring">
3822 <desc>Hardware version identifier. Internal use only for now.</desc>
3823 </attribute>
3824
3825 <attribute name="hardwareUUID" type="uuid" mod="string">
3826 <desc>
3827 The UUID presented to the guest via memory tables, hardware and guest
3828 properties. For most VMs this is the same as the @a id, but for VMs
3829 which have been cloned or teleported it may be the same as the source
3830 VM. This latter is because the guest shouldn't notice that it was
3831 cloned or teleported.
3832 </desc>
3833 </attribute>
3834
3835 <attribute name="CPUCount" type="unsigned long">
3836 <desc>Number of virtual CPUs in the VM.</desc>
3837 </attribute>
3838
3839 <attribute name="CPUHotPlugEnabled" type="boolean">
3840 <desc>
3841 This setting determines whether VirtualBox allows CPU
3842 hotplugging for this machine.</desc>
3843 </attribute>
3844
3845 <attribute name="memorySize" type="unsigned long">
3846 <desc>System memory size in megabytes.</desc>
3847 </attribute>
3848
3849 <attribute name="memoryBalloonSize" type="unsigned long">
3850 <desc>Memory balloon size in megabytes.</desc>
3851 </attribute>
3852
3853 <attribute name="PageFusionEnabled" type="boolean">
3854 <desc>
3855 This setting determines whether VirtualBox allows page
3856 fusion for this machine (64 bits host only).
3857 </desc>
3858 </attribute>
3859
3860 <attribute name="VRAMSize" type="unsigned long">
3861 <desc>Video memory size in megabytes.</desc>
3862 </attribute>
3863
3864 <attribute name="accelerate3DEnabled" type="boolean" default="false">
3865 <desc>
3866 This setting determines whether VirtualBox allows this machine to make
3867 use of the 3D graphics support available on the host.</desc>
3868 </attribute>
3869
3870 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
3871 <desc>
3872 This setting determines whether VirtualBox allows this machine to make
3873 use of the 2D video acceleration support available on the host.</desc>
3874 </attribute>
3875
3876 <attribute name="monitorCount" type="unsigned long">
3877 <desc>
3878 Number of virtual monitors.
3879 <note>
3880 Only effective on Windows XP and later guests with
3881 Guest Additions installed.
3882 </note>
3883 </desc>
3884 </attribute>
3885
3886 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
3887 <desc>Object containing all BIOS settings.</desc>
3888 </attribute>
3889
3890 <attribute name="firmwareType" type="FirmwareType">
3891 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
3892 bootstrap in this VM.</desc>
3893 </attribute>
3894
3895 <attribute name="pointingHidType" type="PointingHidType">
3896 <desc>Type of pointing HID (such as mouse or tablet) used in this VM.
3897 The default is typically "PS2Mouse" but can vary depending on the
3898 requirements of the guest operating system.</desc>
3899 </attribute>
3900
3901 <attribute name="keyboardHidType" type="KeyboardHidType">
3902 <desc>Type of keyboard HID used in this VM.
3903 The default is typically "PS2Keyboard" but can vary depending on the
3904 requirements of the guest operating system.</desc>
3905 </attribute>
3906
3907 <attribute name="hpetEnabled" type="boolean">
3908 <desc>This attribute controls if High Precision Event Timer (HPET) is
3909 enabled in this VM. Use this property if you want to provide guests
3910 with additional time source, or if guest requires HPET to function correctly.
3911 Default is false.</desc>
3912 </attribute>
3913
3914 <attribute name="snapshotFolder" type="wstring">
3915 <desc>
3916 Full path to the directory used to store snapshot data
3917 (differencing media and saved state files) of this machine.
3918
3919 The initial value of this property is
3920 <tt>&lt;</tt><link to="#settingsFilePath">
3921 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3922 <link to="#id">machine_uuid</link>
3923 <tt>&gt;</tt>.
3924
3925 Currently, it is an error to try to change this property on
3926 a machine that has snapshots (because this would require to
3927 move possibly large files to a different location).
3928 A separate method will be available for this purpose later.
3929
3930 <note>
3931 Setting this property to @c null or to an empty string will restore
3932 the initial value.
3933 </note>
3934 <note>
3935 When setting this property, the specified path can be
3936 absolute (full path) or relative to the directory where the
3937 <link to="#settingsFilePath">machine settings file</link>
3938 is located. When reading this property, a full path is
3939 always returned.
3940 </note>
3941 <note>
3942 The specified path may not exist, it will be created
3943 when necessary.
3944 </note>
3945 </desc>
3946 </attribute>
3947
3948 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
3949 <desc>VRDP server object.</desc>
3950 </attribute>
3951
3952 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
3953 <desc>Array of media attached to this machine.</desc>
3954 </attribute>
3955
3956 <attribute name="USBController" type="IUSBController" readonly="yes">
3957 <desc>
3958 Associated USB controller object.
3959
3960 <note>
3961 If USB functionality is not available in the given edition of
3962 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3963 </note>
3964 </desc>
3965 </attribute>
3966
3967 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3968 <desc>Associated audio adapter, always present.</desc>
3969 </attribute>
3970
3971 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
3972 <desc>Array of storage controllers attached to this machine.</desc>
3973 </attribute>
3974
3975 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3976 <desc>
3977 Full name of the file containing machine settings data.
3978 </desc>
3979 </attribute>
3980
3981 <attribute name="settingsModified" type="boolean" readonly="yes">
3982 <desc>
3983 Whether the settings of this machine have been modified
3984 (but neither yet saved nor discarded).
3985 <note>
3986 Reading this property is only valid on instances returned
3987 by <link to="ISession::machine"/> and on new machines
3988 created by <link to="IVirtualBox::createMachine"/> or opened
3989 by <link to="IVirtualBox::openMachine"/> but not
3990 yet registered, or on unregistered machines after calling
3991 <link to="IMachine::unregister"/>. For all other
3992 cases, the settings can never be modified.
3993 </note>
3994 <note>
3995 For newly created unregistered machines, the value of this
3996 property is always @c true until <link to="#saveSettings"/>
3997 is called (no matter if any machine settings have been
3998 changed after the creation or not). For opened machines
3999 the value is set to @c false (and then follows to normal rules).
4000 </note>
4001 </desc>
4002 </attribute>
4003
4004 <attribute name="sessionState" type="SessionState" readonly="yes">
4005 <desc>Current session state for this machine.</desc>
4006 </attribute>
4007
4008 <attribute name="sessionType" type="wstring" readonly="yes">
4009 <desc>
4010 Type of the session. If <link to="#sessionState"/> is
4011 SessionSpawning or SessionOpen, this attribute contains the
4012 same value as passed to the
4013 <link to="IMachine::launchVMProcess"/> method in the
4014 @a type parameter. If the session was used with
4015 <link to="IMachine::lockMachine" />, or if
4016 <link to="#sessionState"/> is SessionClosed, the value of this
4017 attribute is an empty string.
4018 </desc>
4019 </attribute>
4020
4021 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4022 <desc>
4023 Identifier of the session process. This attribute contains the
4024 platform-dependent identifier of the process whose session was
4025 used with <link to="IMachine::lockMachine" /> call. The returned
4026 value is only valid if <link to="#sessionState"/> is Locked or
4027 Unlocking by the time this property is read.
4028 </desc>
4029 </attribute>
4030
4031 <attribute name="state" type="MachineState" readonly="yes">
4032 <desc>Current execution state of this machine.</desc>
4033 </attribute>
4034
4035 <attribute name="lastStateChange" type="long long" readonly="yes">
4036 <desc>
4037 Time stamp of the last execution state change,
4038 in milliseconds since 1970-01-01 UTC.
4039 </desc>
4040 </attribute>
4041
4042 <attribute name="stateFilePath" type="wstring" readonly="yes">
4043 <desc>
4044 Full path to the file that stores the execution state of
4045 the machine when it is in the <link to="MachineState_Saved"/> state.
4046 <note>
4047 When the machine is not in the Saved state, this attribute is
4048 an empty string.
4049 </note>
4050 </desc>
4051 </attribute>
4052
4053 <attribute name="logFolder" type="wstring" readonly="yes">
4054 <desc>
4055 Full path to the folder that stores a set of rotated log files
4056 recorded during machine execution. The most recent log file is
4057 named <tt>VBox.log</tt>, the previous log file is
4058 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4059 in the current version).
4060 </desc>
4061 </attribute>
4062
4063 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4064 <desc>
4065 Current snapshot of this machine. This is @c null if the machine
4066 currently has no snapshots. If it is not @c null, then it was
4067 set by one of <link to="IConsole::takeSnapshot" />,
4068 <link to="IConsole::deleteSnapshot" />
4069 or <link to="IConsole::restoreSnapshot" />, depending on which
4070 was called last. See <link to="ISnapshot"/> for details.
4071 </desc>
4072 </attribute>
4073
4074 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4075 <desc>
4076 Number of snapshots taken on this machine. Zero means the
4077 machine doesn't have any snapshots.
4078 </desc>
4079 </attribute>
4080
4081 <attribute name="currentStateModified" type="boolean" readonly="yes">
4082 <desc>
4083 Returns @c true if the current state of the machine is not
4084 identical to the state stored in the current snapshot.
4085
4086 The current state is identical to the current snapshot only
4087 directly after one of the following calls are made:
4088
4089 <ul>
4090 <li><link to="IConsole::restoreSnapshot"/>
4091 </li>
4092 <li><link to="IConsole::takeSnapshot"/> (issued on a
4093 "powered off" or "saved" machine, for which
4094 <link to="#settingsModified"/> returns @c false)
4095 </li>
4096 <li><link to="IMachine::setCurrentSnapshot"/>
4097 </li>
4098 </ul>
4099
4100 The current state remains identical until one of the following
4101 happens:
4102 <ul>
4103 <li>settings of the machine are changed</li>
4104 <li>the saved state is deleted</li>
4105 <li>the current snapshot is deleted</li>
4106 <li>an attempt to execute the machine is made</li>
4107 </ul>
4108
4109 <note>
4110 For machines that don't have snapshots, this property is
4111 always @c false.
4112 </note>
4113 </desc>
4114 </attribute>
4115
4116 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4117 <desc>
4118 Collection of shared folders for this machine (permanent shared
4119 folders). These folders are shared automatically at machine startup
4120 and available only to the guest OS installed within this machine.
4121
4122 New shared folders are added to the collection using
4123 <link to="#createSharedFolder"/>. Existing shared folders can be
4124 removed using <link to="#removeSharedFolder"/>.
4125 </desc>
4126 </attribute>
4127
4128 <attribute name="clipboardMode" type="ClipboardMode">
4129 <desc>
4130 Synchronization mode between the host OS clipboard
4131 and the guest OS clipboard.
4132 </desc>
4133 </attribute>
4134
4135 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4136 <desc>
4137 A comma-separated list of simple glob patterns. Changes to guest
4138 properties whose name matches one of the patterns will generate an
4139 <link to="IGuestPropertyChangedEvent"/> signal.
4140 </desc>
4141 </attribute>
4142
4143 <attribute name="teleporterEnabled" type="boolean">
4144 <desc>
4145 When set to @a true, the virtual machine becomes a target teleporter
4146 the next time it is powered on. This can only set to @a true when the
4147 VM is in the @a PoweredOff or @a Aborted state.
4148
4149 <!-- This property is automatically set to @a false when the VM is powered
4150 on. (bird: This doesn't work yet ) -->
4151 </desc>
4152 </attribute>
4153
4154 <attribute name="teleporterPort" type="unsigned long">
4155 <desc>
4156 The TCP port the target teleporter will listen for incoming
4157 teleportations on.
4158
4159 0 means the port is automatically selected upon power on. The actual
4160 value can be read from this property while the machine is waiting for
4161 incoming teleportations.
4162 </desc>
4163 </attribute>
4164
4165 <attribute name="teleporterAddress" type="wstring">
4166 <desc>
4167 The address the target teleporter will listen on. If set to an empty
4168 string, it will listen on all addresses.
4169 </desc>
4170 </attribute>
4171
4172 <attribute name="teleporterPassword" type="wstring">
4173 <desc>
4174 The password the to check for on the target teleporter. This is just a
4175 very basic measure to prevent simple hacks and operators accidentally
4176 beaming a virtual machine to the wrong place.
4177 </desc>
4178 </attribute>
4179
4180 <attribute name="RTCUseUTC" type="boolean">
4181 <desc>
4182 When set to @a true, the RTC device of the virtual machine will run
4183 in UTC time, otherwise in local time. Especially Unix guests prefer
4184 the time in UTC.
4185 </desc>
4186 </attribute>
4187
4188 <attribute name="ioCacheEnabled" type="boolean">
4189 <desc>
4190 When set to @a true, the builtin I/O cache of the virtual machine
4191 will be enabled.
4192 </desc>
4193 </attribute>
4194
4195 <attribute name="ioCacheSize" type="unsigned long">
4196 <desc>
4197 Maximum size of the I/O cache in MB.
4198 </desc>
4199 </attribute>
4200
4201 <attribute name="ioBandwidthMax" type="unsigned long">
4202 <desc>
4203 The maximum number of MB the VM is allowed to transfer per second.
4204 0 means unlimited bandwidth.
4205 </desc>
4206 </attribute>
4207
4208 <method name="lockMachine">
4209 <desc>
4210 Locks the machine for the given session to enable the caller
4211 to make changes to the machine or start the VM or control
4212 VM execution.
4213
4214 There are two ways to lock a machine for such uses:
4215
4216 <ul>
4217 <li>If you want to make changes to the machine settings,
4218 you must obtain an exclusive write lock on the machine
4219 by setting @a lockType to @c Write.
4220
4221 This will only succeed if no other process has locked
4222 the machine to prevent conflicting changes. Only after
4223 an exclusive write lock has been obtained using this method, one
4224 can change all VM settings or execute the VM in the process
4225 space of the session object. (Note that the latter is only of
4226 interest if you actually want to write a new front-end for
4227 virtual machines; but this API gets called internally by
4228 the existing front-ends such as VBoxHeadless and the VirtualBox
4229 GUI to acquire a write lock on the machine that they are running.)
4230
4231 On success, write-locking the machine for a session creates
4232 a second copy of the IMachine object. It is this second object
4233 upon which changes can be made; in VirtualBox terminology, the
4234 second copy is "mutable". It is only this second, mutable machine
4235 object upon which you can call methods that change the
4236 machine state. After having called this method, you can
4237 obtain this second, mutable machine object using the
4238 <link to="ISession::machine" /> attribute.
4239 </li>
4240 <li>If you only want to check the machine state or control
4241 machine execution without actually changing machine
4242 settings (e.g. to get access to VM statistics or take
4243 a snapshot or save the machine state), then set the
4244 @a lockType argument to @c Shared.
4245
4246 If no other session has obtained a lock, you will obtain an
4247 exclusive write lock as described above. However, if another
4248 session has already obtained such a lock, then a link to that
4249 existing session will be established which allows you
4250 to control that existing session.
4251
4252 To find out which type of lock was obtained, you can
4253 inspect <link to="ISession::type" />, which will have been
4254 set to either @c WriteLock or @c Shared.
4255 </li>
4256 </ul>
4257
4258 In either case, you can get access to the <link to="IConsole" />
4259 object which controls VM execution.
4260
4261 Also in all of the above cases, one must always call <link to="ISession::close" />
4262 to release the lock on the machine, or the machine's state will
4263 eventually be set to "Aborted".
4264
4265 To change settings on a machine, the following sequence is typically
4266 performed:
4267
4268 <ol>
4269 <li>Call this method to obtain an exclusive write lock for the current session.</li>
4270
4271 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
4272
4273 <li>Change the settings of the machine.</li>
4274
4275 <li>Call <link to="IMachine::saveSettings" />.</li>
4276
4277 <li>Close the session by calling <link to="ISession::close"/>.</li>
4278 </ol>
4279
4280 <result name="E_UNEXPECTED">
4281 Virtual machine not registered.
4282 </result>
4283 <result name="E_ACCESSDENIED">
4284 Process not started by OpenRemoteSession.
4285 </result>
4286 <result name="VBOX_E_INVALID_OBJECT_STATE">
4287 Session already open or being opened.
4288 </result>
4289 <result name="VBOX_E_VM_ERROR">
4290 Failed to assign machine to session.
4291 </result>
4292 </desc>
4293 <param name="session" type="ISession" dir="in">
4294 <desc>
4295 Session object for which the machine will be locked.
4296 </desc>
4297 </param>
4298 <param name="lockType" type="LockType" dir="in">
4299 <desc>
4300 If set to @c Write, then attempt to acquire an exclusive write lock or fail.
4301 If set to @c Shared, then either acquire an exclusive write lock or establish
4302 a link to an existing session.
4303 </desc>
4304 </param>
4305 </method>
4306
4307 <method name="launchVMProcess">
4308 <desc>
4309 Spawns a new process that will execute the virtual machine.
4310
4311 This operation can take some time (a new VM is started in a new process,
4312 for which memory and other resources need to be set up). Because of this,
4313 an <link to="IProgress" /> object is returned to allow the caller to wait
4314 for this asynchronous operation to be completed. Until then, the caller's
4315 session object remains in the "Unlocked" state, and its <link to="ISession::machine" />
4316 and <link to="ISession::console" /> attributes cannot be accessed.
4317 It is recommended to use <link to="IProgress::waitForCompletion" /> or
4318 similar calls to wait for completion. Completion is signalled when the VM
4319 is powered on. If launching the VM fails, error messages can be queried
4320 via the progress object, if available.
4321
4322 If launching the VM succeeds, the new VM process will create its own
4323 session and lock the machine for it, preventing conflicting changes
4324 from other processes. If the machine is already locked (because it
4325 is already running or because another session is making changes),
4326 launching the VM process will therefore fail. Reversely, future
4327 locking attempts will also fail while the machine is running.
4328
4329 The caller's session object remains separate from the session opened
4330 by the new VM process. It receives its own <link to="IConsole" />
4331 object which can be used to control machine execution, but it cannot
4332 be used to change all VM settings which would be available after
4333 a <link to="#lockMachine" /> call.
4334
4335 As with all <link to="ISession" /> objects, it is recommended to call
4336 <link to="ISession::close" /> on the local session object once this call
4337 has returned. However, the session's state (see <link to="ISession::state" />)
4338 will not return to "Unlocked" until the remote session has also unlocked
4339 the machine.
4340
4341 The @a environment argument is a string containing definitions of
4342 environment variables in the following format:
4343 @code
4344 NAME[=VALUE]\n
4345 NAME[=VALUE]\n
4346 ...
4347 @endcode
4348 where <tt>\\n</tt> is the new line character. These environment
4349 variables will be appended to the environment of the VirtualBox server
4350 process. If an environment variable exists both in the server process
4351 and in this list, the value from this list takes precedence over the
4352 server's variable. If the value of the environment variable is
4353 omitted, this variable will be removed from the resulting environment.
4354 If the environment string is @c null or empty, the server environment
4355 is inherited by the started process as is.
4356
4357 The progress object will have at least 2 sub-operations. The first
4358 operation covers the period up to the new VM process calls powerUp.
4359 The subsequent operations mirror the <link to="IConsole::powerUp"/>
4360 progress object. Because <link to="IConsole::powerUp"/> may require
4361 some extra sub-operations, the <link to="IProgress::operationCount"/>
4362 may change at the completion of operation.
4363
4364 For details on the teleportation progress operation, see
4365 <link to="IConsole::powerUp"/>.
4366
4367 <result name="E_UNEXPECTED">
4368 Virtual machine not registered.
4369 </result>
4370 <result name="E_INVALIDARG">
4371 Invalid session type @a type.
4372 </result>
4373 <result name="VBOX_E_OBJECT_NOT_FOUND">
4374 No machine matching @a machineId found.
4375 </result>
4376 <result name="VBOX_E_INVALID_OBJECT_STATE">
4377 Session already open or being opened.
4378 </result>
4379 <result name="VBOX_E_IPRT_ERROR">
4380 Launching process for machine failed.
4381 </result>
4382 <result name="VBOX_E_VM_ERROR">
4383 Failed to assign machine to session.
4384 </result>
4385 </desc>
4386 <param name="session" type="ISession" dir="in">
4387 <desc>
4388 Session object that will represent the opened remote session
4389 after successful method invocation (this object must not
4390 represent an already open session).
4391 </desc>
4392 </param>
4393 <param name="type" type="wstring" dir="in">
4394 <desc>
4395 Type of the remote session (case sensitive). The following are
4396 currently supported:
4397 <ul>
4398 <li><tt>"gui"</tt>: VirtualBox Qt GUI front-end</li>
4399 <li><tt>"vrdp"</tt>: VBoxHeadless (VRDP Server) front-end</li>
4400 <li><tt>"sdl"</tt>: VirtualBox SDL front-end</li>
4401 </ul>
4402 </desc>
4403 </param>
4404 <param name="environment" type="wstring" dir="in">
4405 <desc>
4406 Environment to pass to the VM process.
4407 </desc>
4408 </param>
4409 <param name="progress" type="IProgress" dir="return">
4410 <desc>Progress object to track the operation completion.</desc>
4411 </param>
4412 </method>
4413
4414 <method name="setBootOrder">
4415 <desc>
4416 Puts the given device to the specified position in
4417 the boot order.
4418
4419 To indicate that no device is associated with the given position,
4420 <link to="DeviceType_Null"/> should be used.
4421
4422 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4423
4424 <result name="E_INVALIDARG">
4425 Boot @a position out of range.
4426 </result>
4427 <result name="E_NOTIMPL">
4428 Booting from USB @a device currently not supported.
4429 </result>
4430
4431 </desc>
4432 <param name="position" type="unsigned long" dir="in">
4433 <desc>
4434 Position in the boot order (@c 1 to the total number of
4435 devices the machine can boot from, as returned by
4436 <link to="ISystemProperties::maxBootPosition"/>).
4437 </desc>
4438 </param>
4439 <param name="device" type="DeviceType" dir="in">
4440 <desc>
4441 The type of the device used to boot at the given position.
4442 </desc>
4443 </param>
4444 </method>
4445
4446 <method name="getBootOrder" const="yes">
4447 <desc>
4448 Returns the device type that occupies the specified
4449 position in the boot order.
4450
4451 @todo [remove?]
4452 If the machine can have more than one device of the returned type
4453 (such as hard disks), then a separate method should be used to
4454 retrieve the individual device that occupies the given position.
4455
4456 If here are no devices at the given position, then
4457 <link to="DeviceType_Null"/> is returned.
4458
4459 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4460
4461 <result name="E_INVALIDARG">
4462 Boot @a position out of range.
4463 </result>
4464
4465 </desc>
4466 <param name="position" type="unsigned long" dir="in">
4467 <desc>
4468 Position in the boot order (@c 1 to the total number of
4469 devices the machine can boot from, as returned by
4470 <link to="ISystemProperties::maxBootPosition"/>).
4471 </desc>
4472 </param>
4473 <param name="device" type="DeviceType" dir="return">
4474 <desc>
4475 Device at the given position.
4476 </desc>
4477 </param>
4478 </method>
4479
4480 <method name="attachDevice">
4481 <desc>
4482 Attaches a device and optionally mounts a medium to the given storage
4483 controller (<link to="IStorageController" />, identified by @a name),
4484 at the indicated port and device.
4485
4486 This method is intended for managing storage devices in general (it works
4487 for both fixed and removable media). For storage devices supporting removable
4488 media (such as DVDs and floppies), you can also use <link to="IMachine::mountMedium"/>
4489 for changing the media while the machine is running.
4490
4491 In a VM's default configuration of virtual machines, the secondary
4492 master of the IDE controller is used for a CD/DVD drive.
4493
4494 For fixed media such as hard disks, the given medium identifier cannot
4495 be a zero UUID. It may be a zero UUID for removable media such as DVDs
4496 and floppies.
4497
4498 After calling this returns successfully, a new instance of
4499 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4500 attachments (<link to="IMachine::mediumAttachments"/>).
4501
4502 The specified device slot must not have a device attached to it,
4503 or this method will fail.
4504
4505 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4506 information about attaching media.
4507
4508 <note>
4509 You cannot attach a device to a running machine. Also, you cannot
4510 attach a device to a newly created machine until this machine's
4511 settings are saved to disk using <link to="#saveSettings"/>.
4512 </note>
4513 <note>
4514 If the medium is being attached indirectly, a new differencing medium
4515 will implicitly be created for it and attached instead. If the
4516 changes made to the machine settings (including this indirect
4517 attachment) are later cancelled using <link to="#discardSettings"/>,
4518 this implicitly created differencing medium will implicitly
4519 be deleted.
4520 </note>
4521
4522 <result name="E_INVALIDARG">
4523 SATA device, SATA port, IDE port or IDE slot out of range.
4524 </result>
4525 <result name="VBOX_E_INVALID_OBJECT_STATE">
4526 Attempt to attach medium to an unregistered virtual machine.
4527 </result>
4528 <result name="VBOX_E_INVALID_VM_STATE">
4529 Invalid machine state.
4530 </result>
4531 <result name="VBOX_E_OBJECT_IN_USE">
4532 Hard disk already attached to this or another virtual machine.
4533 </result>
4534
4535 </desc>
4536 <param name="name" type="wstring" dir="in">
4537 <desc>Name of the storage controller to attach the device to.</desc>
4538 </param>
4539 <param name="controllerPort" type="long" dir="in">
4540 <desc>Port to attach the device to. For an IDE controller, 0 specifies
4541 the primary controller and 1 specifies the secondary controller.
4542 For a SCSI controller, this must range from 0 to 15; for a SATA controller,
4543 from 0 to 29; for an SAS controller, from 0 to 7.</desc>
4544 </param>
4545 <param name="device" type="long" dir="in">
4546 <desc>Device slot in the given port to attach the device to. This is only
4547 relevant for IDE controllers, for which 0 specifies the master device and
4548 1 specifies the slave device. For all other controller types, this must
4549 be 0.</desc>
4550 </param>
4551 <param name="type" type="DeviceType" dir="in">
4552 <desc>Device type of the attached device.</desc>
4553 </param>
4554 <param name="id" type="uuid" mod="string" dir="in">
4555 <desc>UUID of the medium to mount. Zero UUID means do not mount any
4556 medium.</desc>
4557 </param>
4558 </method>
4559
4560 <method name="detachDevice">
4561 <desc>
4562 Detaches the device attached to a device slot of the specified bus.
4563
4564 Detaching the device from the virtual machine is deferred. This means
4565 that the medium remains associated with the machine when this method
4566 returns and gets actually de-associated only after a successful
4567 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4568 for more detailed information about attaching media.
4569
4570 <note>
4571 You cannot detach a device from a running machine.
4572 </note>
4573 <note>
4574 Detaching differencing media implicitly created by <link
4575 to="#attachDevice"/> for the indirect attachment using this
4576 method will <b>not</b> implicitly delete them. The
4577 <link to="IMedium::deleteStorage"/> operation should be
4578 explicitly performed by the caller after the medium is successfully
4579 detached and the settings are saved with
4580 <link to="#saveSettings"/>, if it is the desired action.
4581 </note>
4582
4583 <result name="VBOX_E_INVALID_VM_STATE">
4584 Attempt to detach medium from a running virtual machine.
4585 </result>
4586 <result name="VBOX_E_OBJECT_NOT_FOUND">
4587 No medium attached to given slot/bus.
4588 </result>
4589 <result name="VBOX_E_NOT_SUPPORTED">
4590 Medium format does not support storage deletion.
4591 </result>
4592
4593 </desc>
4594 <param name="name" type="wstring" dir="in">
4595 <desc>Name of the storage controller to detach the medium from.</desc>
4596 </param>
4597 <param name="controllerPort" type="long" dir="in">
4598 <desc>Port number to detach the medium from.</desc>
4599 </param>
4600 <param name="device" type="long" dir="in">
4601 <desc>Device slot number to detach the medium from.</desc>
4602 </param>
4603 </method>
4604
4605 <method name="passthroughDevice">
4606 <desc>
4607 Sets the passthrough mode of an existing DVD device. Changing the
4608 setting while the VM is running is forbidden. The setting is only used
4609 if at VM start the device is configured as a host DVD drive, in all
4610 other cases it is ignored. The device must already exist; see
4611 <link to="IMachine::attachDevice"/> for how to attach a new device.
4612
4613 The @a controllerPort and @a device parameters specify the device slot and
4614 have have the same meaning as with <link to="IMachine::attachDevice" />.
4615
4616 <result name="E_INVALIDARG">
4617 SATA device, SATA port, IDE port or IDE slot out of range.
4618 </result>
4619 <result name="VBOX_E_INVALID_OBJECT_STATE">
4620 Attempt to modify an unregistered virtual machine.
4621 </result>
4622 <result name="VBOX_E_INVALID_VM_STATE">
4623 Invalid machine state.
4624 </result>
4625
4626 </desc>
4627 <param name="name" type="wstring" dir="in">
4628 <desc>Name of the storage controller.</desc>
4629 </param>
4630 <param name="controllerPort" type="long" dir="in">
4631 <desc>Storage controller port.</desc>
4632 </param>
4633 <param name="device" type="long" dir="in">
4634 <desc>Device slot in the given port.</desc>
4635 </param>
4636 <param name="passthrough" type="boolean" dir="in">
4637 <desc>New value for the passthrough setting.</desc>
4638 </param>
4639 </method>
4640
4641 <method name="mountMedium">
4642 <desc>
4643 Mounts a medium (<link to="IMedium" />, identified
4644 by the given UUID @a id) to the given storage controller
4645 (<link to="IStorageController" />, identified by @a name),
4646 at the indicated port and device. The device must already exist;
4647 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4648
4649 This method is intended only for managing removable media, where the
4650 device is fixed but media is changeable at runtime (such as DVDs
4651 and floppies). It cannot be used for fixed media such as hard disks.
4652
4653 The @a controllerPort and @a device parameters specify the device slot and
4654 have have the same meaning as with <link to="IMachine::attachDevice" />.
4655
4656 The specified device slot can have a medium mounted, which will be
4657 unmounted first. Specifying a zero UUID (or an empty string) for
4658 @a medium does just an unmount.
4659
4660 See <link to="IMedium"/> for more detailed information about
4661 attaching media.
4662
4663 <result name="E_INVALIDARG">
4664 SATA device, SATA port, IDE port or IDE slot out of range.
4665 </result>
4666 <result name="VBOX_E_INVALID_OBJECT_STATE">
4667 Attempt to attach medium to an unregistered virtual machine.
4668 </result>
4669 <result name="VBOX_E_INVALID_VM_STATE">
4670 Invalid machine state.
4671 </result>
4672 <result name="VBOX_E_OBJECT_IN_USE">
4673 Medium already attached to this or another virtual machine.
4674 </result>
4675
4676 </desc>
4677 <param name="name" type="wstring" dir="in">
4678 <desc>Name of the storage controller to attach the medium to.</desc>
4679 </param>
4680 <param name="controllerPort" type="long" dir="in">
4681 <desc>Port to attach the medium to.</desc>
4682 </param>
4683 <param name="device" type="long" dir="in">
4684 <desc>Device slot in the given port to attach the medium to.</desc>
4685 </param>
4686 <param name="medium" type="uuid" mod="string" dir="in">
4687 <desc>UUID of the medium to attach. A zero UUID means unmount the
4688 currently mounted medium.</desc>
4689 </param>
4690 <param name="force" type="boolean" dir="in">
4691 <desc>Allows to force unmount/mount of a medium which is locked by
4692 theDevice slot in the given port to attach the medium to.</desc>
4693 </param>
4694 </method>
4695
4696 <method name="getMedium" const="yes">
4697 <desc>
4698 Returns the virtual medium attached to a device slot of the specified
4699 bus.
4700
4701 Note that if the medium was indirectly attached by
4702 <link to="#mountMedium"/> to the given device slot then this
4703 method will return not the same object as passed to the
4704 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4705 more detailed information about mounting a medium.
4706
4707 <result name="VBOX_E_OBJECT_NOT_FOUND">
4708 No medium attached to given slot/bus.
4709 </result>
4710
4711 </desc>
4712 <param name="name" type="wstring" dir="in">
4713 <desc>Name of the storage controller the medium is attached to.</desc>
4714 </param>
4715 <param name="controllerPort" type="long" dir="in">
4716 <desc>Port to query.</desc>
4717 </param>
4718 <param name="device" type="long" dir="in">
4719 <desc>Device slot in the given port to query.</desc>
4720 </param>
4721 <param name="medium" type="IMedium" dir="return">
4722 <desc>Attached medium object.</desc>
4723 </param>
4724 </method>
4725
4726 <method name="getMediumAttachmentsOfController" const="yes">
4727 <desc>
4728 Returns an array of medium attachments which are attached to the
4729 the controller with the given name.
4730
4731 <result name="VBOX_E_OBJECT_NOT_FOUND">
4732 A storage controller with given name doesn't exist.
4733 </result>
4734 </desc>
4735 <param name="name" type="wstring" dir="in"/>
4736 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4737 </method>
4738
4739 <method name="getMediumAttachment" const="yes">
4740 <desc>
4741 Returns a medium attachment which corresponds to the controller with
4742 the given name, on the given port and device slot.
4743
4744 <result name="VBOX_E_OBJECT_NOT_FOUND">
4745 No attachment exists for the given controller/port/device combination.
4746 </result>
4747 </desc>
4748 <param name="name" type="wstring" dir="in"/>
4749 <param name="controllerPort" type="long" dir="in"/>
4750 <param name="device" type="long" dir="in"/>
4751 <param name="attachment" type="IMediumAttachment" dir="return"/>
4752 </method>
4753
4754 <method name="getNetworkAdapter" const="yes">
4755 <desc>
4756 Returns the network adapter associated with the given slot.
4757 Slots are numbered sequentially, starting with zero. The total
4758 number of adapters per machine is defined by the
4759 <link to="ISystemProperties::networkAdapterCount"/> property,
4760 so the maximum slot number is one less than that property's value.
4761
4762 <result name="E_INVALIDARG">
4763 Invalid @a slot number.
4764 </result>
4765
4766 </desc>
4767 <param name="slot" type="unsigned long" dir="in"/>
4768 <param name="adapter" type="INetworkAdapter" dir="return"/>
4769 </method>
4770
4771 <method name="addStorageController">
4772 <desc>
4773 Adds a new storage controller (SCSI, SAS or SATA controller) to the
4774 machine and returns it as an instance of
4775 <link to="IStorageController" />.
4776
4777 @a name identifies the controller for subsequent calls such as
4778 <link to="#getStorageControllerByName" />,
4779 <link to="#getStorageControllerByInstance" />,
4780 <link to="#removeStorageController" />,
4781 <link to="#attachDevice" /> or <link to="#mountMedium" />.
4782
4783 After the controller has been added, you can set its exact
4784 type by setting the <link to="IStorageController::controllerType" />.
4785
4786 <result name="VBOX_E_OBJECT_IN_USE">
4787 A storage controller with given name exists already.
4788 </result>
4789 <result name="E_INVALIDARG">
4790 Invalid @a controllerType.
4791 </result>
4792 </desc>
4793 <param name="name" type="wstring" dir="in"/>
4794 <param name="connectionType" type="StorageBus" dir="in"/>
4795 <param name="controller" type="IStorageController" dir="return"/>
4796 </method>
4797
4798 <method name="getStorageControllerByName" const="yes">
4799 <desc>
4800 Returns a storage controller with the given name.
4801
4802 <result name="VBOX_E_OBJECT_NOT_FOUND">
4803 A storage controller with given name doesn't exist.
4804 </result>
4805 </desc>
4806 <param name="name" type="wstring" dir="in"/>
4807 <param name="storageController" type="IStorageController" dir="return"/>
4808 </method>
4809
4810 <method name="getStorageControllerByInstance" const="yes">
4811 <desc>
4812 Returns a storage controller with the given instance number.
4813
4814 <result name="VBOX_E_OBJECT_NOT_FOUND">
4815 A storage controller with given instance number doesn't exist.
4816 </result>
4817 </desc>
4818 <param name="instance" type="unsigned long" dir="in"/>
4819 <param name="storageController" type="IStorageController" dir="return"/>
4820 </method>
4821
4822 <method name="removeStorageController">
4823 <desc>
4824 Removes a storage controller from the machine.
4825
4826 <result name="VBOX_E_OBJECT_NOT_FOUND">
4827 A storage controller with given name doesn't exist.
4828 </result>
4829 </desc>
4830 <param name="name" type="wstring" dir="in"/>
4831 </method>
4832
4833 <method name="getSerialPort" const="yes">
4834 <desc>
4835 Returns the serial port associated with the given slot.
4836 Slots are numbered sequentially, starting with zero. The total
4837 number of serial ports per machine is defined by the
4838 <link to="ISystemProperties::serialPortCount"/> property,
4839 so the maximum slot number is one less than that property's value.
4840
4841 <result name="E_INVALIDARG">
4842 Invalid @a slot number.
4843 </result>
4844
4845 </desc>
4846 <param name="slot" type="unsigned long" dir="in"/>
4847 <param name="port" type="ISerialPort" dir="return"/>
4848 </method>
4849
4850 <method name="getParallelPort" const="yes">
4851 <desc>
4852 Returns the parallel port associated with the given slot.
4853 Slots are numbered sequentially, starting with zero. The total
4854 number of parallel ports per machine is defined by the
4855 <link to="ISystemProperties::parallelPortCount"/> property,
4856 so the maximum slot number is one less than that property's value.
4857
4858 <result name="E_INVALIDARG">
4859 Invalid @a slot number.
4860 </result>
4861
4862 </desc>
4863 <param name="slot" type="unsigned long" dir="in"/>
4864 <param name="port" type="IParallelPort" dir="return"/>
4865 </method>
4866
4867 <method name="getExtraDataKeys">
4868 <desc>
4869 Returns an array representing the machine-specific extra data keys
4870 which currently have values defined.
4871 </desc>
4872 <param name="value" type="wstring" dir="return" safearray="yes">
4873 <desc>Array of extra data keys.</desc>
4874 </param>
4875 </method>
4876
4877 <method name="getExtraData">
4878 <desc>
4879 Returns associated machine-specific extra data.
4880
4881 If the requested data @a key does not exist, this function will
4882 succeed and return an empty string in the @a value argument.
4883
4884 <result name="VBOX_E_FILE_ERROR">
4885 Settings file not accessible.
4886 </result>
4887 <result name="VBOX_E_XML_ERROR">
4888 Could not parse the settings file.
4889 </result>
4890
4891 </desc>
4892 <param name="key" type="wstring" dir="in">
4893 <desc>Name of the data key to get.</desc>
4894 </param>
4895 <param name="value" type="wstring" dir="return">
4896 <desc>Value of the requested data key.</desc>
4897 </param>
4898 </method>
4899
4900 <method name="setExtraData">
4901 <desc>
4902 Sets associated machine-specific extra data.
4903
4904 If you pass @c null or an empty string as a key @a value, the given
4905 @a key will be deleted.
4906
4907 <note>
4908 Before performing the actual data change, this method will ask all
4909 registered listeners using the
4910 <link to="IExtraDataCanChangeEvent"/>
4911 notification for a permission. If one of the listeners refuses the
4912 new value, the change will not be performed.
4913 </note>
4914 <note>
4915 On success, the
4916 <link to="IExtraDataChangedEvent"/> notification
4917 is called to inform all registered listeners about a successful data
4918 change.
4919 </note>
4920 <note>
4921 This method can be called outside the machine session and therefore
4922 it's a caller's responsibility to handle possible race conditions
4923 when several clients change the same key at the same time.
4924 </note>
4925
4926 <result name="VBOX_E_FILE_ERROR">
4927 Settings file not accessible.
4928 </result>
4929 <result name="VBOX_E_XML_ERROR">
4930 Could not parse the settings file.
4931 </result>
4932
4933 </desc>
4934 <param name="key" type="wstring" dir="in">
4935 <desc>Name of the data key to set.</desc>
4936 </param>
4937 <param name="value" type="wstring" dir="in">
4938 <desc>Value to assign to the key.</desc>
4939 </param>
4940 </method>
4941
4942 <method name="getCPUProperty" const="yes">
4943 <desc>
4944 Returns the virtual CPU boolean value of the specified property.
4945
4946 <result name="E_INVALIDARG">
4947 Invalid property.
4948 </result>
4949
4950 </desc>
4951 <param name="property" type="CPUPropertyType" dir="in">
4952 <desc>
4953 Property type to query.
4954 </desc>
4955 </param>
4956 <param name="value" type="boolean" dir="return">
4957 <desc>
4958 Property value.
4959 </desc>
4960 </param>
4961 </method>
4962
4963 <method name="setCPUProperty">
4964 <desc>
4965 Sets the virtual CPU boolean value of the specified property.
4966
4967 <result name="E_INVALIDARG">
4968 Invalid property.
4969 </result>
4970
4971 </desc>
4972 <param name="property" type="CPUPropertyType" dir="in">
4973 <desc>
4974 Property type to query.
4975 </desc>
4976 </param>
4977 <param name="value" type="boolean" dir="in">
4978 <desc>
4979 Property value.
4980 </desc>
4981 </param>
4982 </method>
4983
4984 <method name="getCPUIDLeaf" const="yes">
4985 <desc>
4986 Returns the virtual CPU cpuid information for the specified leaf.
4987
4988 Currently supported index values for cpuid:
4989 Standard CPUID leafs: 0 - 0xA
4990 Extended CPUID leafs: 0x80000000 - 0x8000000A
4991
4992 See the Intel and AMD programmer's manuals for detailed information
4993 about the cpuid instruction and its leafs.
4994 <result name="E_INVALIDARG">
4995 Invalid id.
4996 </result>
4997
4998 </desc>
4999 <param name="id" type="unsigned long" dir="in">
5000 <desc>
5001 CPUID leaf index.
5002 </desc>
5003 </param>
5004 <param name="valEax" type="unsigned long" dir="out">
5005 <desc>
5006 CPUID leaf value for register eax.
5007 </desc>
5008 </param>
5009 <param name="valEbx" type="unsigned long" dir="out">
5010 <desc>
5011 CPUID leaf value for register ebx.
5012 </desc>
5013 </param>
5014 <param name="valEcx" type="unsigned long" dir="out">
5015 <desc>
5016 CPUID leaf value for register ecx.
5017 </desc>
5018 </param>
5019 <param name="valEdx" type="unsigned long" dir="out">
5020 <desc>
5021 CPUID leaf value for register edx.
5022 </desc>
5023 </param>
5024 </method>
5025
5026 <method name="setCPUIDLeaf">
5027 <desc>
5028 Sets the virtual CPU cpuid information for the specified leaf. Note that these values
5029 are not passed unmodified. VirtualBox clears features that it doesn't support.
5030
5031 Currently supported index values for cpuid:
5032 Standard CPUID leafs: 0 - 0xA
5033 Extended CPUID leafs: 0x80000000 - 0x8000000A
5034
5035 See the Intel and AMD programmer's manuals for detailed information
5036 about the cpuid instruction and its leafs.
5037
5038 Do not use this method unless you know exactly what you're doing. Misuse can lead to
5039 random crashes inside VMs.
5040 <result name="E_INVALIDARG">
5041 Invalid id.
5042 </result>
5043
5044 </desc>
5045 <param name="id" type="unsigned long" dir="in">
5046 <desc>
5047 CPUID leaf index.
5048 </desc>
5049 </param>
5050 <param name="valEax" type="unsigned long" dir="in">
5051 <desc>
5052 CPUID leaf value for register eax.
5053 </desc>
5054 </param>
5055 <param name="valEbx" type="unsigned long" dir="in">
5056 <desc>
5057 CPUID leaf value for register ebx.
5058 </desc>
5059 </param>
5060 <param name="valEcx" type="unsigned long" dir="in">
5061 <desc>
5062 CPUID leaf value for register ecx.
5063 </desc>
5064 </param>
5065 <param name="valEdx" type="unsigned long" dir="in">
5066 <desc>
5067 CPUID leaf value for register edx.
5068 </desc>
5069 </param>
5070 </method>
5071
5072 <method name="removeCPUIDLeaf">
5073 <desc>
5074 Removes the virtual CPU cpuid leaf for the specified index
5075
5076 <result name="E_INVALIDARG">
5077 Invalid id.
5078 </result>
5079
5080 </desc>
5081 <param name="id" type="unsigned long" dir="in">
5082 <desc>
5083 CPUID leaf index.
5084 </desc>
5085 </param>
5086 </method>
5087
5088 <method name="removeAllCPUIDLeaves">
5089 <desc>
5090 Removes all the virtual CPU cpuid leaves
5091 </desc>
5092 </method>
5093
5094 <method name="getHWVirtExProperty" const="yes">
5095 <desc>
5096 Returns the value of the specified hardware virtualization boolean property.
5097
5098 <result name="E_INVALIDARG">
5099 Invalid property.
5100 </result>
5101
5102 </desc>
5103 <param name="property" type="HWVirtExPropertyType" dir="in">
5104 <desc>
5105 Property type to query.
5106 </desc>
5107 </param>
5108 <param name="value" type="boolean" dir="return">
5109 <desc>
5110 Property value.
5111 </desc>
5112 </param>
5113 </method>
5114
5115 <method name="setHWVirtExProperty">
5116 <desc>
5117 Sets a new value for the specified hardware virtualization boolean property.
5118
5119 <result name="E_INVALIDARG">
5120 Invalid property.
5121 </result>
5122
5123 </desc>
5124 <param name="property" type="HWVirtExPropertyType" dir="in">
5125 <desc>
5126 Property type to set.
5127 </desc>
5128 </param>
5129 <param name="value" type="boolean" dir="in">
5130 <desc>
5131 New property value.
5132 </desc>
5133 </param>
5134 </method>
5135
5136 <method name="saveSettings">
5137 <desc>
5138 Saves any changes to machine settings made since the session
5139 has been opened or a new machine has been created, or since the
5140 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
5141 For registered machines, new settings become visible to all
5142 other VirtualBox clients after successful invocation of this
5143 method.
5144 <note>
5145 The method sends <link to="IMachineDataChangedEvent"/>
5146 notification event after the configuration has been successfully
5147 saved (only for registered machines).
5148 </note>
5149 <note>
5150 Calling this method is only valid on instances returned
5151 by <link to="ISession::machine"/> and on new machines
5152 created by <link to="IVirtualBox::createMachine"/> but not
5153 yet registered, or on unregistered machines after calling
5154 <link to="IMachine::unregister"/>.
5155 </note>
5156
5157 <result name="VBOX_E_FILE_ERROR">
5158 Settings file not accessible.
5159 </result>
5160 <result name="VBOX_E_XML_ERROR">
5161 Could not parse the settings file.
5162 </result>
5163 <result name="E_ACCESSDENIED">
5164 Modification request refused.
5165 </result>
5166
5167 </desc>
5168 </method>
5169
5170 <method name="discardSettings">
5171 <desc>
5172 Discards any changes to the machine settings made since the session
5173 has been opened or since the last call to <link to="#saveSettings"/>
5174 or <link to="#discardSettings"/>.
5175 <note>
5176 Calling this method is only valid on instances returned
5177 by <link to="ISession::machine"/> and on new machines
5178 created by <link to="IVirtualBox::createMachine"/> or
5179 opened by <link to="IVirtualBox::openMachine"/> but not
5180 yet registered, or on unregistered machines after calling
5181 <link to="IMachine::unregister"/>.
5182 </note>
5183
5184 <result name="VBOX_E_INVALID_VM_STATE">
5185 Virtual machine is not mutable.
5186 </result>
5187
5188 </desc>
5189 </method>
5190
5191 <method name="unregister">
5192 <desc>
5193 Unregisters the machine, which must have been previously registered using
5194 <link to="IVirtualBox::registerMachine"/>. After successful method invocation,
5195 the <link to="IMachineRegisteredEvent"/> event is fired.
5196
5197 <note>
5198 The specified machine must not be in the Saved state nor have an open
5199 (or a spawning) direct session associated with it.
5200 </note>
5201
5202 <note>
5203 This method implicitly calls <link to="#saveSettings"/> to
5204 save all current machine settings before unregistering it.
5205 </note>
5206
5207 <note>
5208 If the given machine is inaccessible (see <link to="#accessible"/>), it
5209 will be unregistered and fully uninitialized right afterwards. As a result,
5210 the returned machine object will be unusable and an attempt to call
5211 <b>any</b> method will return the "Object not ready" error.
5212 </note>
5213
5214 <result name="VBOX_E_OBJECT_NOT_FOUND">
5215 Could not find registered machine matching @a id.
5216 </result>
5217 <result name="VBOX_E_INVALID_VM_STATE">
5218 Machine is in Saved state.
5219 </result>
5220 <result name="VBOX_E_INVALID_OBJECT_STATE">
5221 Machine has snapshot or open session or medium attached.
5222 </result>
5223 </desc>
5224
5225 <param name="fCloseMedia" type="boolean" dir="in">
5226 <desc>If true, the method will automatically detach all media from the
5227 machine and its snapshots, call <link to="IMedium::close" /> on each
5228 medium, and the paths of all media files involved will be reported to
5229 the caller in the @a aFiles array so the caller can then delete the
5230 image files.
5231 If false, the method will fail if media attachments are present.</desc>
5232 </param>
5233 <param name="aFiles" type="wstring" safearray="yes" dir="return">
5234 <desc>
5235 List of all files detached from medium attachments of the machine, if
5236 @a fCloseMedia is true.
5237 </desc>
5238 </param>
5239 </method>
5240
5241 <method name="delete">
5242 <desc>
5243 Deletes the settings (machine XML) file of this machine from disk. The machine
5244 must not be registered in order for this operation to succeed.
5245 <note>
5246 <link to="#settingsModified"/> will return @c true after this
5247 method successfully returns.
5248 </note>
5249 <note>
5250 Calling this method is only valid on instances returned
5251 by <link to="ISession::machine"/> and on new machines
5252 created by <link to="IVirtualBox::createMachine"/> or
5253 opened by <link to="IVirtualBox::openMachine"/> but not
5254 yet registered, or on unregistered machines after calling
5255 <link to="IMachine::unregister"/>.
5256 </note>
5257 <note>
5258 The deleted machine settings file can be restored (saved again)
5259 by calling <link to="#saveSettings"/>.
5260 </note>
5261
5262 <result name="VBOX_E_INVALID_VM_STATE">
5263 Cannot delete settings of a registered machine or
5264 machine not mutable.
5265 </result>
5266 <result name="VBOX_E_IPRT_ERROR">
5267 Could not delete the settings file.
5268 </result>
5269
5270 </desc>
5271 </method>
5272
5273 <method name="export">
5274 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5275 steps required to export VirtualBox machines to OVF.
5276 </desc>
5277
5278 <param name="aAppliance" type="IAppliance" dir="in">
5279 <desc>Appliance to export this machine to.</desc>
5280 </param>
5281 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5282 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5283 </param>
5284 </method >
5285
5286 <method name="getSnapshot">
5287 <desc>
5288 Returns a snapshot of this machine with the given UUID.
5289 A @c null UUID can be used to obtain the first snapshot
5290 taken on this machine. This is useful if you want to traverse
5291 the whole tree of snapshots starting from the root.
5292
5293 <result name="VBOX_E_OBJECT_NOT_FOUND">
5294 Virtual machine has no snapshots or snapshot not found.
5295 </result>
5296
5297 </desc>
5298 <param name="id" type="uuid" mod="string" dir="in">
5299 <desc>UUID of the snapshot to get</desc>
5300 </param>
5301 <param name="snapshot" type="ISnapshot" dir="return">
5302 <desc>Snapshot object with the given UUID.</desc>
5303 </param>
5304 </method>
5305
5306 <method name="findSnapshot">
5307 <desc>
5308 Returns a snapshot of this machine with the given name.
5309
5310 <result name="VBOX_E_OBJECT_NOT_FOUND">
5311 Virtual machine has no snapshots or snapshot not found.
5312 </result>
5313
5314 </desc>
5315 <param name="name" type="wstring" dir="in">
5316 <desc>Name of the snapshot to find</desc>
5317 </param>
5318 <param name="snapshot" type="ISnapshot" dir="return">
5319 <desc>Snapshot object with the given name.</desc>
5320 </param>
5321 </method>
5322
5323 <method name="setCurrentSnapshot">
5324 <desc>
5325 Sets the current snapshot of this machine.
5326 <note>
5327 In the current implementation, this operation is not
5328 implemented.
5329 </note>
5330 </desc>
5331 <param name="id" type="uuid" mod="string" dir="in">
5332 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5333 </param>
5334 </method>
5335
5336 <method name="createSharedFolder">
5337 <desc>
5338 Creates a new permanent shared folder by associating the given logical
5339 name with the given host path, adds it to the collection of shared
5340 folders and starts sharing it. Refer to the description of
5341 <link to="ISharedFolder"/> to read more about logical names.
5342
5343 <result name="VBOX_E_OBJECT_IN_USE">
5344 Shared folder already exists.
5345 </result>
5346 <result name="VBOX_E_FILE_ERROR">
5347 Shared folder @a hostPath not accessible.
5348 </result>
5349
5350 </desc>
5351 <param name="name" type="wstring" dir="in">
5352 <desc>Unique logical name of the shared folder.</desc>
5353 </param>
5354 <param name="hostPath" type="wstring" dir="in">
5355 <desc>Full path to the shared folder in the host file system.</desc>
5356 </param>
5357 <param name="writable" type="boolean" dir="in">
5358 <desc>Whether the share is writable or readonly.</desc>
5359 </param>
5360 <param name="automount" type="boolean" dir="in">
5361 <desc>Whether the share gets automatically mounted by the guest
5362 or not.</desc>
5363 </param>
5364 </method>
5365
5366 <method name="removeSharedFolder">
5367 <desc>
5368 Removes the permanent shared folder with the given name previously
5369 created by <link to="#createSharedFolder"/> from the collection of
5370 shared folders and stops sharing it.
5371
5372 <result name="VBOX_E_INVALID_VM_STATE">
5373 Virtual machine is not mutable.
5374 </result>
5375 <result name="VBOX_E_OBJECT_NOT_FOUND">
5376 Shared folder @a name does not exist.
5377 </result>
5378
5379 </desc>
5380 <param name="name" type="wstring" dir="in">
5381 <desc>Logical name of the shared folder to remove.</desc>
5382 </param>
5383 </method>
5384
5385 <method name="canShowConsoleWindow">
5386 <desc>
5387 Returns @c true if the VM console process can activate the
5388 console window and bring it to foreground on the desktop of
5389 the host PC.
5390 <note>
5391 This method will fail if a session for this machine is not
5392 currently open.
5393 </note>
5394
5395 <result name="VBOX_E_INVALID_VM_STATE">
5396 Machine session is not open.
5397 </result>
5398
5399 </desc>
5400 <param name="canShow" type="boolean" dir="return">
5401 <desc>
5402 @c true if the console window can be shown and @c false otherwise.
5403 </desc>
5404 </param>
5405 </method>
5406
5407 <method name="showConsoleWindow">
5408 <desc>
5409 Activates the console window and brings it to foreground on
5410 the desktop of the host PC. Many modern window managers on
5411 many platforms implement some sort of focus stealing
5412 prevention logic, so that it may be impossible to activate
5413 a window without the help of the currently active
5414 application. In this case, this method will return a non-zero
5415 identifier that represents the top-level window of the VM
5416 console process. The caller, if it represents a currently
5417 active process, is responsible to use this identifier (in a
5418 platform-dependent manner) to perform actual window
5419 activation.
5420 <note>
5421 This method will fail if a session for this machine is not
5422 currently open.
5423 </note>
5424
5425 <result name="VBOX_E_INVALID_VM_STATE">
5426 Machine session is not open.
5427 </result>
5428
5429 </desc>
5430 <param name="winId" type="unsigned long long" dir="return">
5431 <desc>
5432 Platform-dependent identifier of the top-level VM console
5433 window, or zero if this method has performed all actions
5434 necessary to implement the <i>show window</i> semantics for
5435 the given platform and/or VirtualBox front-end.
5436 </desc>
5437 </param>
5438 </method>
5439
5440 <method name="getGuestProperty" const="yes">
5441 <desc>
5442 Reads an entry from the machine's guest property store.
5443
5444 <result name="VBOX_E_INVALID_VM_STATE">
5445 Machine session is not open.
5446 </result>
5447
5448 </desc>
5449 <param name="name" type="wstring" dir="in">
5450 <desc>
5451 The name of the property to read.
5452 </desc>
5453 </param>
5454 <param name="value" type="wstring" dir="out">
5455 <desc>
5456 The value of the property. If the property does not exist then this
5457 will be empty.
5458 </desc>
5459 </param>
5460 <param name="timestamp" type="unsigned long long" dir="out">
5461 <desc>
5462 The time at which the property was last modified, as seen by the
5463 server process.
5464 </desc>
5465 </param>
5466 <param name="flags" type="wstring" dir="out">
5467 <desc>
5468 Additional property parameters, passed as a comma-separated list of
5469 "name=value" type entries.
5470 </desc>
5471 </param>
5472 </method>
5473
5474 <method name="getGuestPropertyValue" const="yes">
5475 <desc>
5476 Reads a value from the machine's guest property store.
5477
5478 <result name="VBOX_E_INVALID_VM_STATE">
5479 Machine session is not open.
5480 </result>
5481
5482 </desc>
5483 <param name="property" type="wstring" dir="in">
5484 <desc>
5485 The name of the property to read.
5486 </desc>
5487 </param>
5488 <param name="value" type="wstring" dir="return">
5489 <desc>
5490 The value of the property. If the property does not exist then this
5491 will be empty.
5492 </desc>
5493 </param>
5494 </method>
5495
5496 <method name="getGuestPropertyTimestamp" const="yes">
5497 <desc>
5498 Reads a property timestamp from the machine's guest property store.
5499
5500 <result name="VBOX_E_INVALID_VM_STATE">
5501 Machine session is not open.
5502 </result>
5503
5504 </desc>
5505 <param name="property" type="wstring" dir="in">
5506 <desc>
5507 The name of the property to read.
5508 </desc>
5509 </param>
5510 <param name="value" type="unsigned long long" dir="return">
5511 <desc>
5512 The timestamp. If the property does not exist then this will be
5513 empty.
5514 </desc>
5515 </param>
5516 </method>
5517
5518 <method name="setGuestProperty">
5519 <desc>
5520 Sets, changes or deletes an entry in the machine's guest property
5521 store.
5522
5523 <result name="E_ACCESSDENIED">
5524 Property cannot be changed.
5525 </result>
5526 <result name="E_INVALIDARG">
5527 Invalid @a flags.
5528 </result>
5529 <result name="VBOX_E_INVALID_VM_STATE">
5530 Virtual machine is not mutable or session not open.
5531 </result>
5532 <result name="VBOX_E_INVALID_OBJECT_STATE">
5533 Cannot set transient property when machine not running.
5534 </result>
5535
5536 </desc>
5537 <param name="property" type="wstring" dir="in">
5538 <desc>
5539 The name of the property to set, change or delete.
5540 </desc>
5541 </param>
5542 <param name="value" type="wstring" dir="in">
5543 <desc>
5544 The new value of the property to set, change or delete. If the
5545 property does not yet exist and value is non-empty, it will be
5546 created. If the value is @c null or empty, the property will be
5547 deleted if it exists.
5548 </desc>
5549 </param>
5550 <param name="flags" type="wstring" dir="in">
5551 <desc>
5552 Additional property parameters, passed as a comma-separated list of
5553 "name=value" type entries.
5554 </desc>
5555 </param>
5556 </method>
5557
5558 <method name="setGuestPropertyValue">
5559 <desc>
5560 Sets, changes or deletes a value in the machine's guest property
5561 store. The flags field will be left unchanged or created empty for a
5562 new property.
5563
5564 <result name="E_ACCESSDENIED">
5565 Property cannot be changed.
5566 </result>
5567 <result name="VBOX_E_INVALID_VM_STATE">
5568 Virtual machine is not mutable or session not open.
5569 </result>
5570 <result name="VBOX_E_INVALID_OBJECT_STATE">
5571 Cannot set transient property when machine not running.
5572 </result>
5573 </desc>
5574
5575 <param name="property" type="wstring" dir="in">
5576 <desc>
5577 The name of the property to set, change or delete.
5578 </desc>
5579 </param>
5580 <param name="value" type="wstring" dir="in">
5581 <desc>
5582 The new value of the property to set, change or delete. If the
5583 property does not yet exist and value is non-empty, it will be
5584 created. If the value is @c null or empty, the property will be
5585 deleted if it exists.
5586 </desc>
5587 </param>
5588 </method>
5589
5590 <method name="enumerateGuestProperties">
5591 <desc>
5592 Return a list of the guest properties matching a set of patterns along
5593 with their values, time stamps and flags.
5594 </desc>
5595 <param name="patterns" type="wstring" dir="in">
5596 <desc>
5597 The patterns to match the properties against, separated by '|'
5598 characters. If this is empty or @c null, all properties will match.
5599 </desc>
5600 </param>
5601 <param name="name" type="wstring" dir="out" safearray="yes">
5602 <desc>
5603 The names of the properties returned.
5604 </desc>
5605 </param>
5606 <param name="value" type="wstring" dir="out" safearray="yes">
5607 <desc>
5608 The values of the properties returned. The array entries match the
5609 corresponding entries in the @a name array.
5610 </desc>
5611 </param>
5612 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5613 <desc>
5614 The time stamps of the properties returned. The array entries match
5615 the corresponding entries in the @a name array.
5616 </desc>
5617 </param>
5618 <param name="flags" type="wstring" dir="out" safearray="yes">
5619 <desc>
5620 The flags of the properties returned. The array entries match the
5621 corresponding entries in the @a name array.
5622 </desc>
5623 </param>
5624 </method>
5625
5626 <method name="querySavedThumbnailSize">
5627 <desc>
5628 Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.
5629 </desc>
5630 <param name="screenId" type="unsigned long" dir="in">
5631 <desc>
5632 Saved guest screen to query info from.
5633 </desc>
5634 </param>
5635 <param name="size" type="unsigned long" dir="out">
5636 <desc>
5637 Size of buffer required to store the bitmap.
5638 </desc>
5639 </param>
5640 <param name="width" type="unsigned long" dir="out">
5641 <desc>
5642 Bitmap width.
5643 </desc>
5644 </param>
5645 <param name="height" type="unsigned long" dir="out">
5646 <desc>
5647 Bitmap height.
5648 </desc>
5649 </param>
5650 </method>
5651
5652 <method name="readSavedThumbnailToArray">
5653 <desc>
5654 Thumbnail is retrieved to an array of bytes in uncompressed 32-bit BGRA or RGBA format.
5655 </desc>
5656 <param name="screenId" type="unsigned long" dir="in">
5657 <desc>
5658 Saved guest screen to read from.
5659 </desc>
5660 </param>
5661 <param name="BGR" type="boolean" dir="in">
5662 <desc>
5663 How to order bytes in the pixel. A pixel consists of 4 bytes. If this parameter is true, then
5664 bytes order is: B, G, R, 0xFF. If this parameter is false, then bytes order is: R, G, B, 0xFF.
5665 </desc>
5666 </param>
5667 <param name="width" type="unsigned long" dir="out">
5668 <desc>
5669 Bitmap width.
5670 </desc>
5671 </param>
5672 <param name="height" type="unsigned long" dir="out">
5673 <desc>
5674 Bitmap height.
5675 </desc>
5676 </param>
5677 <param name="data" type="octet" dir="return" safearray="yes">
5678 <desc>
5679 Array with resulting bitmap data.
5680 </desc>
5681 </param>
5682 </method>
5683
5684 <method name="querySavedScreenshotPNGSize">
5685 <desc>
5686 Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.
5687 </desc>
5688 <param name="screenId" type="unsigned long" dir="in">
5689 <desc>
5690 Saved guest screen to query info from.
5691 </desc>
5692 </param>
5693 <param name="size" type="unsigned long" dir="out">
5694 <desc>
5695 Size of buffer required to store the PNG binary data.
5696 </desc>
5697 </param>
5698 <param name="width" type="unsigned long" dir="out">
5699 <desc>
5700 Image width.
5701 </desc>
5702 </param>
5703 <param name="height" type="unsigned long" dir="out">
5704 <desc>
5705 Image height.
5706 </desc>
5707 </param>
5708 </method>
5709
5710 <method name="readSavedScreenshotPNGToArray">
5711 <desc>
5712 Screenshot in PNG format is retrieved to an array of bytes.
5713 </desc>
5714 <param name="screenId" type="unsigned long" dir="in">
5715 <desc>
5716 Saved guest screen to read from.
5717 </desc>
5718 </param>
5719 <param name="width" type="unsigned long" dir="out">
5720 <desc>
5721 Image width.
5722 </desc>
5723 </param>
5724 <param name="height" type="unsigned long" dir="out">
5725 <desc>
5726 Image height.
5727 </desc>
5728 </param>
5729 <param name="data" type="octet" dir="return" safearray="yes">
5730 <desc>
5731 Array with resulting PNG data.
5732 </desc>
5733 </param>
5734 </method>
5735
5736 <method name="hotPlugCPU">
5737 <desc>
5738 Plugs a CPU into the machine.
5739 </desc>
5740 <param name="cpu" type="unsigned long" dir="in">
5741 <desc>
5742 The CPU id to insert.
5743 </desc>
5744 </param>
5745 </method>
5746
5747 <method name="hotUnplugCPU">
5748 <desc>
5749 Removes a CPU from the machine.
5750 </desc>
5751 <param name="cpu" type="unsigned long" dir="in">
5752 <desc>
5753 The CPU id to remove.
5754 </desc>
5755 </param>
5756 </method>
5757
5758 <method name="getCPUStatus">
5759 <desc>
5760 Returns the current status of the given CPU.
5761 </desc>
5762 <param name="cpu" type="unsigned long" dir="in">
5763 <desc>
5764 The CPU id to check for.
5765 </desc>
5766 </param>
5767 <param name="attached" type="boolean" dir="return">
5768 <desc>
5769 Status of the CPU.
5770 </desc>
5771 </param>
5772 </method>
5773
5774 <method name="queryLogFilename">
5775 <desc>
5776 Queries for the VM log file name of an given index. Returns an empty
5777 string if a log file with that index doesn't exists.
5778 </desc>
5779 <param name="idx" type="unsigned long" dir="in">
5780 <desc>
5781 Which log file name to query. 0=current log file.
5782 </desc>
5783 </param>
5784 <param name="filename" type="wstring" dir="return">
5785 <desc>
5786 On return the full path to the log file or an empty string on error.
5787 </desc>
5788 </param>
5789 </method>
5790
5791 <method name="readLog">
5792 <desc>
5793 Reads the VM log file. The chunk size is limited, so even if you
5794 ask for a big piece there might be less data returned.
5795 </desc>
5796 <param name="idx" type="unsigned long" dir="in">
5797 <desc>
5798 Which log file to read. 0=current log file.
5799 </desc>
5800 </param>
5801 <param name="offset" type="unsigned long long" dir="in">
5802 <desc>
5803 Offset in the log file.
5804 </desc>
5805 </param>
5806 <param name="size" type="unsigned long long" dir="in">
5807 <desc>
5808 Chunk size to read in the log file.
5809 </desc>
5810 </param>
5811 <param name="data" type="octet" dir="return" safearray="yes">
5812 <desc>
5813 Data read from the log file. A data size of 0 means end of file
5814 if the requested chunk size was not 0. This is the unprocessed
5815 file data, i.e. the line ending style depends on the platform of
5816 the system the server is running on.
5817 </desc>
5818 </param>
5819 </method>
5820 </interface>
5821
5822 <!--
5823 // IConsole
5824 /////////////////////////////////////////////////////////////////////////
5825 -->
5826
5827 <interface
5828 name="IRemoteDisplayInfo" extends="$unknown"
5829 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
5830 wsmap="struct"
5831 >
5832 <desc>
5833 Contains information about the remote display (VRDP) capabilities and status.
5834 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5835 </desc>
5836
5837 <attribute name="active" type="boolean" readonly="yes">
5838 <desc>
5839 Whether the remote display connection is active.
5840 </desc>
5841 </attribute>
5842
5843 <attribute name="port" type="long" readonly="yes">
5844 <desc>
5845 VRDP server port number. If this property is equal to <tt>0</tt>, then
5846 the VRDP server failed to start, usually because there are no free TCP
5847 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
5848 server has not yet been started.
5849 </desc>
5850 </attribute>
5851
5852 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5853 <desc>
5854 How many times a client connected.
5855 </desc>
5856 </attribute>
5857
5858 <attribute name="beginTime" type="long long" readonly="yes">
5859 <desc>
5860 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5861 </desc>
5862 </attribute>
5863
5864 <attribute name="endTime" type="long long" readonly="yes">
5865 <desc>
5866 When the last connection was terminated or the current time, if
5867 connection is still active, in milliseconds since 1970-01-01 UTC.
5868 </desc>
5869 </attribute>
5870
5871 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5872 <desc>
5873 How many bytes were sent in last or current, if still active, connection.
5874 </desc>
5875 </attribute>
5876
5877 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5878 <desc>
5879 How many bytes were sent in all connections.
5880 </desc>
5881 </attribute>
5882
5883 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5884 <desc>
5885 How many bytes were received in last or current, if still active, connection.
5886 </desc>
5887 </attribute>
5888
5889 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5890 <desc>
5891 How many bytes were received in all connections.
5892 </desc>
5893 </attribute>
5894
5895 <attribute name="user" type="wstring" readonly="yes">
5896 <desc>
5897 Login user name supplied by the client.
5898 </desc>
5899 </attribute>
5900
5901 <attribute name="domain" type="wstring" readonly="yes">
5902 <desc>
5903 Login domain name supplied by the client.
5904 </desc>
5905 </attribute>
5906
5907 <attribute name="clientName" type="wstring" readonly="yes">
5908 <desc>
5909 The client name supplied by the client.
5910 </desc>
5911 </attribute>
5912
5913 <attribute name="clientIP" type="wstring" readonly="yes">
5914 <desc>
5915 The IP address of the client.
5916 </desc>
5917 </attribute>
5918
5919 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5920 <desc>
5921 The client software version number.
5922 </desc>
5923 </attribute>
5924
5925 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5926 <desc>
5927 Public key exchange method used when connection was established.
5928 Values: 0 - RDP4 public key exchange scheme.
5929 1 - X509 certificates were sent to client.
5930 </desc>
5931 </attribute>
5932
5933 </interface>
5934
5935 <interface
5936 name="IConsole" extends="$unknown"
5937 uuid="9e467cff-98fc-4f5b-83aa-048d903694c9"
5938 wsmap="managed"
5939 >
5940 <desc>
5941 The IConsole interface represents an interface to control virtual
5942 machine execution.
5943
5944 A console object gets created when a machine has been locked for a
5945 particular session (client process) using <link to="IMachine::lockMachine" />
5946 or <link to="IMachine::launchVMProcess"/>. The console object can
5947 then be found in the session's <link to="ISession::console" /> attribute.
5948
5949 Methods of the IConsole interface allow the caller to query the current
5950 virtual machine execution state, pause the machine or power it down, save
5951 the machine state or take a snapshot, attach and detach removable media
5952 and so on.
5953
5954 <see>ISession</see>
5955 </desc>
5956
5957 <attribute name="machine" type="IMachine" readonly="yes">
5958 <desc>
5959 Machine object this console is sessioned with.
5960 <note>
5961 This is a convenience property, it has the same value as
5962 <link to="ISession::machine"/> of the corresponding session
5963 object.
5964 </note>
5965 </desc>
5966 </attribute>
5967
5968 <attribute name="state" type="MachineState" readonly="yes">
5969 <desc>
5970 Current execution state of the machine.
5971 <note>
5972 This property always returns the same value as the corresponding
5973 property of the IMachine object this console is sessioned with.
5974 For the process that owns (executes) the VM, this is the
5975 preferable way of querying the VM state, because no IPC
5976 calls are made.
5977 </note>
5978 </desc>
5979 </attribute>
5980
5981 <attribute name="guest" type="IGuest" readonly="yes">
5982 <desc>Guest object.</desc>
5983 </attribute>
5984
5985 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5986 <desc>
5987 Virtual keyboard object.
5988 <note>
5989 If the machine is not running, any attempt to use
5990 the returned object will result in an error.
5991 </note>
5992 </desc>
5993 </attribute>
5994
5995 <attribute name="mouse" type="IMouse" readonly="yes">
5996 <desc>
5997 Virtual mouse object.
5998 <note>
5999 If the machine is not running, any attempt to use
6000 the returned object will result in an error.
6001 </note>
6002 </desc>
6003 </attribute>
6004
6005 <attribute name="display" type="IDisplay" readonly="yes">
6006 <desc>Virtual display object.
6007 <note>
6008 If the machine is not running, any attempt to use
6009 the returned object will result in an error.
6010 </note>
6011 </desc>
6012 </attribute>
6013
6014 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6015 <desc>Debugging interface.</desc>
6016 </attribute>
6017
6018 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6019 <desc>
6020 Collection of USB devices currently attached to the virtual
6021 USB controller.
6022 <note>
6023 The collection is empty if the machine is not running.
6024 </note>
6025 </desc>
6026 </attribute>
6027
6028 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6029 <desc>
6030 List of USB devices currently attached to the remote VRDP client.
6031 Once a new device is physically attached to the remote host computer,
6032 it appears in this list and remains there until detached.
6033 </desc>
6034 </attribute>
6035
6036 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6037 <desc>
6038 Collection of shared folders for the current session. These folders
6039 are called transient shared folders because they are available to the
6040 guest OS running inside the associated virtual machine only for the
6041 duration of the session (as opposed to
6042 <link to="IMachine::sharedFolders"/> which represent permanent shared
6043 folders). When the session is closed (e.g. the machine is powered down),
6044 these folders are automatically discarded.
6045
6046 New shared folders are added to the collection using
6047 <link to="#createSharedFolder"/>. Existing shared folders can be
6048 removed using <link to="#removeSharedFolder"/>.
6049 </desc>
6050 </attribute>
6051
6052 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6053 <desc>
6054 Interface that provides information on Remote Display (VRDP) connection.
6055 </desc>
6056 </attribute>
6057
6058 <attribute name="eventSource" type="IEventSource" readonly="yes">
6059 <desc>
6060 Event source for console events.
6061 </desc>
6062 </attribute>
6063
6064 <method name="powerUp">
6065 <desc>
6066 Starts the virtual machine execution using the current machine
6067 state (that is, its current execution state, current settings and
6068 current storage devices).
6069
6070 <note>
6071 This method is only useful for front-ends that want to actually
6072 execute virtual machines in their own process (like the VirtualBox
6073 or VBoxSDL front-ends). Unless you are intending to write such a
6074 front-end, do not call this method. If you simply want to
6075 start virtual machine execution using one of the existing front-ends
6076 (for example the VirtualBox GUI or headless server), use
6077 <link to="IMachine::launchVMProcess"/> instead; these
6078 front-ends will power up the machine automatically for you.
6079 </note>
6080
6081 If the machine is powered off or aborted, the execution will
6082 start from the beginning (as if the real hardware were just
6083 powered on).
6084
6085 If the machine is in the <link to="MachineState_Saved"/> state,
6086 it will continue its execution the point where the state has
6087 been saved.
6088
6089 If the machine <link to="IMachine::teleporterEnabled"/> property is
6090 enabled on the machine being powered up, the machine will wait for an
6091 incoming teleportation in the <link to="MachineState_TeleportingIn"/>
6092 state. The returned progress object will have at least three
6093 operations where the last three are defined as: (1) powering up and
6094 starting TCP server, (2) waiting for incoming teleportations, and
6095 (3) perform teleportation. These operations will be reflected as the
6096 last three operations of the progress objected returned by
6097 <link to="IMachine::launchVMProcess"/> as well.
6098
6099 <see>#saveState</see>
6100
6101 <result name="VBOX_E_INVALID_VM_STATE">
6102 Virtual machine already running.
6103 </result>
6104 <result name="VBOX_E_HOST_ERROR">
6105 Host interface does not exist or name not set.
6106 </result>
6107 <result name="VBOX_E_FILE_ERROR">
6108 Invalid saved state file.
6109 </result>
6110 </desc>
6111 <param name="progress" type="IProgress" dir="return">
6112 <desc>Progress object to track the operation completion.</desc>
6113 </param>
6114 </method>
6115
6116 <method name="powerUpPaused">
6117 <desc>
6118 Identical to powerUp except that the VM will enter the
6119 <link to="MachineState_Paused"/> state, instead of
6120 <link to="MachineState_Running"/>.
6121
6122 <see>#powerUp</see>
6123 <result name="VBOX_E_INVALID_VM_STATE">
6124 Virtual machine already running.
6125 </result>
6126 <result name="VBOX_E_HOST_ERROR">
6127 Host interface does not exist or name not set.
6128 </result>
6129 <result name="VBOX_E_FILE_ERROR">
6130 Invalid saved state file.
6131 </result>
6132 </desc>
6133 <param name="progress" type="IProgress" dir="return">
6134 <desc>Progress object to track the operation completion.</desc>
6135 </param>
6136 </method>
6137
6138 <method name="powerDown">
6139 <desc>
6140 Initiates the power down procedure to stop the virtual machine
6141 execution.
6142
6143 The completion of the power down procedure is tracked using the returned
6144 IProgress object. After the operation is complete, the machine will go
6145 to the PoweredOff state.
6146 <result name="VBOX_E_INVALID_VM_STATE">
6147 Virtual machine must be Running, Paused or Stuck to be powered down.
6148 </result>
6149 </desc>
6150 <param name="progress" type="IProgress" dir="return">
6151 <desc>Progress object to track the operation completion.</desc>
6152 </param>
6153 </method>
6154
6155 <method name="reset">
6156 <desc>Resets the virtual machine.
6157 <result name="VBOX_E_INVALID_VM_STATE">
6158 Virtual machine not in Running state.
6159 </result>
6160 <result name="VBOX_E_VM_ERROR">
6161 Virtual machine error in reset operation.
6162 </result>
6163 </desc>
6164 </method>
6165
6166 <method name="pause">
6167 <desc>Pauses the virtual machine execution.
6168 <result name="VBOX_E_INVALID_VM_STATE">
6169 Virtual machine not in Running state.
6170 </result>
6171 <result name="VBOX_E_VM_ERROR">
6172 Virtual machine error in suspend operation.
6173 </result>
6174 </desc>
6175 </method>
6176
6177 <method name="resume">
6178 <desc>Resumes the virtual machine execution.
6179 <result name="VBOX_E_INVALID_VM_STATE">
6180 Virtual machine not in Paused state.
6181 </result>
6182 <result name="VBOX_E_VM_ERROR">
6183 Virtual machine error in resume operation.
6184 </result>
6185 </desc>
6186 </method>
6187
6188 <method name="powerButton">
6189 <desc>Sends the ACPI power button event to the guest.
6190 <result name="VBOX_E_INVALID_VM_STATE">
6191 Virtual machine not in Running state.
6192 </result>
6193 <result name="VBOX_E_PDM_ERROR">
6194 Controlled power off failed.
6195 </result>
6196 </desc>
6197 </method>
6198
6199 <method name="sleepButton">
6200 <desc>Sends the ACPI sleep button event to the guest.
6201 <result name="VBOX_E_INVALID_VM_STATE">
6202 Virtual machine not in Running state.
6203 </result>
6204 <result name="VBOX_E_PDM_ERROR">
6205 Sending sleep button event failed.
6206 </result>
6207 </desc>
6208 </method>
6209
6210 <method name="getPowerButtonHandled">
6211 <desc>Checks if the last power button event was handled by guest.
6212 <result name="VBOX_E_PDM_ERROR">
6213 Checking if the event was handled by the guest OS failed.
6214 </result>
6215 </desc>
6216 <param name="handled" type="boolean" dir="return"/>
6217 </method>
6218
6219 <method name="getGuestEnteredACPIMode">
6220 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6221 G1 (sleeping). If this method returns @c false, the guest will
6222 most likely not respond to external ACPI events.
6223 <result name="VBOX_E_INVALID_VM_STATE">
6224 Virtual machine not in Running state.
6225 </result>
6226 </desc>
6227 <param name="entered" type="boolean" dir="return"/>
6228 </method>
6229
6230 <method name="saveState">
6231 <desc>
6232 Saves the current execution state of a running virtual machine
6233 and stops its execution.
6234
6235 After this operation completes, the machine will go to the
6236 Saved state. Next time it is powered up, this state will
6237 be restored and the machine will continue its execution from
6238 the place where it was saved.
6239
6240 This operation differs from taking a snapshot to the effect
6241 that it doesn't create new differencing media. Also, once
6242 the machine is powered up from the state saved using this method,
6243 the saved state is deleted, so it will be impossible to return
6244 to this state later.
6245
6246 <note>
6247 On success, this method implicitly calls
6248 <link to="IMachine::saveSettings"/> to save all current machine
6249 settings (including runtime changes to the DVD medium, etc.).
6250 Together with the impossibility to change any VM settings when it is
6251 in the Saved state, this guarantees adequate hardware
6252 configuration of the machine when it is restored from the saved
6253 state file.
6254 </note>
6255
6256 <note>
6257 The machine must be in the Running or Paused state, otherwise
6258 the operation will fail.
6259 </note>
6260 <result name="VBOX_E_INVALID_VM_STATE">
6261 Virtual machine state neither Running nor Paused.
6262 </result>
6263 <result name="VBOX_E_FILE_ERROR">
6264 Failed to create directory for saved state file.
6265 </result>
6266
6267 <see><link to="#takeSnapshot"/></see>
6268 </desc>
6269 <param name="progress" type="IProgress" dir="return">
6270 <desc>Progress object to track the operation completion.</desc>
6271 </param>
6272 </method>
6273
6274 <method name="adoptSavedState">
6275 <desc>
6276 Associates the given saved state file to the virtual machine.
6277
6278 On success, the machine will go to the Saved state. Next time it is
6279 powered up, it will be restored from the adopted saved state and
6280 continue execution from the place where the saved state file was
6281 created.
6282
6283 The specified saved state file path may be absolute or relative to the
6284 folder the VM normally saves the state to (usually,
6285 <link to="IMachine::snapshotFolder"/>).
6286
6287 <note>
6288 It's a caller's responsibility to make sure the given saved state
6289 file is compatible with the settings of this virtual machine that
6290 represent its virtual hardware (memory size, storage disk configuration
6291 etc.). If there is a mismatch, the behavior of the virtual machine
6292 is undefined.
6293 </note>
6294 <result name="VBOX_E_INVALID_VM_STATE">
6295 Virtual machine state neither PoweredOff nor Aborted.
6296 </result>
6297 </desc>
6298 <param name="savedStateFile" type="wstring" dir="in">
6299 <desc>Path to the saved state file to adopt.</desc>
6300 </param>
6301 </method>
6302
6303 <method name="forgetSavedState">
6304 <desc>
6305 Forgets the saved state of the virtual machine previously created
6306 by <link to="#saveState"/>. Next time the machine is powered up, a
6307 clean boot will occur. If @a remove is @c true the saved state file
6308 is deleted.
6309 <note>
6310 This operation is equivalent to resetting or powering off
6311 the machine without doing a proper shutdown in the guest OS.
6312 </note>
6313 <result name="VBOX_E_INVALID_VM_STATE">
6314 Virtual machine not in state Saved.
6315 </result>
6316 </desc>
6317 <param name="removeFile" type="boolean" dir="in">
6318 <desc>If @c true remove the saved state file.</desc>
6319 </param>
6320 </method>
6321
6322 <method name="getDeviceActivity">
6323 <desc>
6324 Gets the current activity type of a given device or device group.
6325 <result name="E_INVALIDARG">
6326 Invalid device type.
6327 </result>
6328 </desc>
6329 <param name="type" type="DeviceType" dir="in"/>
6330 <param name="activity" type="DeviceActivity" dir="return"/>
6331 </method>
6332
6333 <method name="attachUSBDevice">
6334 <desc>
6335 Attaches a host USB device with the given UUID to the
6336 USB controller of the virtual machine.
6337
6338 The device needs to be in one of the following states:
6339 <link to="USBDeviceState_Busy"/>,
6340 <link to="USBDeviceState_Available"/> or
6341 <link to="USBDeviceState_Held"/>,
6342 otherwise an error is immediately returned.
6343
6344 When the device state is
6345 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6346 be returned if the host computer refuses to release it for some reason.
6347
6348 <see>IUSBController::deviceFilters, USBDeviceState</see>
6349 <result name="VBOX_E_INVALID_VM_STATE">
6350 Virtual machine state neither Running nor Paused.
6351 </result>
6352 <result name="VBOX_E_PDM_ERROR">
6353 Virtual machine does not have a USB controller.
6354 </result>
6355 </desc>
6356 <param name="id" type="uuid" mod="string" dir="in">
6357 <desc>UUID of the host USB device to attach.</desc>
6358 </param>
6359 </method>
6360
6361 <method name="detachUSBDevice">
6362 <desc>
6363 Detaches an USB device with the given UUID from the USB controller
6364 of the virtual machine.
6365
6366 After this method succeeds, the VirtualBox server re-initiates
6367 all USB filters as if the device were just physically attached
6368 to the host, but filters of this machine are ignored to avoid
6369 a possible automatic re-attachment.
6370
6371 <see>IUSBController::deviceFilters, USBDeviceState</see>
6372
6373 <result name="VBOX_E_PDM_ERROR">
6374 Virtual machine does not have a USB controller.
6375 </result>
6376 <result name="E_INVALIDARG">
6377 USB device not attached to this virtual machine.
6378 </result>
6379 </desc>
6380 <param name="id" type="uuid" mod="string" dir="in">
6381 <desc>UUID of the USB device to detach.</desc>
6382 </param>
6383 <param name="device" type="IUSBDevice" dir="return">
6384 <desc>Detached USB device.</desc>
6385 </param>
6386 </method>
6387
6388 <method name="findUSBDeviceByAddress">
6389 <desc>
6390 Searches for a USB device with the given host address.
6391
6392 <result name="VBOX_E_OBJECT_NOT_FOUND">
6393 Given @c name does not correspond to any USB device.
6394 </result>
6395
6396 <see>IUSBDevice::address</see>
6397 </desc>
6398 <param name="name" type="wstring" dir="in">
6399 <desc>
6400 Address of the USB device (as assigned by the host) to
6401 search for.
6402 </desc>
6403 </param>
6404 <param name="device" type="IUSBDevice" dir="return">
6405 <desc>Found USB device object.</desc>
6406 </param>
6407 </method>
6408
6409 <method name="findUSBDeviceById">
6410 <desc>
6411 Searches for a USB device with the given UUID.
6412
6413 <result name="VBOX_E_OBJECT_NOT_FOUND">
6414 Given @c id does not correspond to any USB device.
6415 </result>
6416
6417 <see>IUSBDevice::id</see>
6418 </desc>
6419 <param name="id" type="uuid" mod="string" dir="in">
6420 <desc>UUID of the USB device to search for.</desc>
6421 </param>
6422 <param name="device" type="IUSBDevice" dir="return">
6423 <desc>Found USB device object.</desc>
6424 </param>
6425 </method>
6426
6427 <method name="createSharedFolder">
6428 <desc>
6429 Creates a transient new shared folder by associating the given logical
6430 name with the given host path, adds it to the collection of shared
6431 folders and starts sharing it. Refer to the description of
6432 <link to="ISharedFolder"/> to read more about logical names.
6433
6434 <result name="VBOX_E_INVALID_VM_STATE">
6435 Virtual machine in Saved state or currently changing state.
6436 </result>
6437 <result name="VBOX_E_FILE_ERROR">
6438 Shared folder already exists or not accessible.
6439 </result>
6440 </desc>
6441 <param name="name" type="wstring" dir="in">
6442 <desc>Unique logical name of the shared folder.</desc>
6443 </param>
6444 <param name="hostPath" type="wstring" dir="in">
6445 <desc>Full path to the shared folder in the host file system.</desc>
6446 </param>
6447 <param name="writable" type="boolean" dir="in">
6448 <desc>Whether the share is writable or readonly</desc>
6449 </param>
6450 <param name="automount" type="boolean" dir="in">
6451 <desc>Whether the share gets automatically mounted by the guest
6452 or not.</desc>
6453 </param>
6454 </method>
6455
6456 <method name="removeSharedFolder">
6457 <desc>
6458 Removes a transient shared folder with the given name previously
6459 created by <link to="#createSharedFolder"/> from the collection of
6460 shared folders and stops sharing it.
6461 <result name="VBOX_E_INVALID_VM_STATE">
6462 Virtual machine in Saved state or currently changing state.
6463 </result>
6464 <result name="VBOX_E_FILE_ERROR">
6465 Shared folder does not exists.
6466 </result>
6467 </desc>
6468 <param name="name" type="wstring" dir="in">
6469 <desc>Logical name of the shared folder to remove.</desc>
6470 </param>
6471 </method>
6472
6473 <method name="takeSnapshot">
6474 <desc>
6475 Saves the current execution state
6476 and all settings of the machine and creates differencing images
6477 for all normal (non-independent) media.
6478 See <link to="ISnapshot" /> for an introduction to snapshots.
6479
6480 This method can be called for a PoweredOff, Saved (see
6481 <link to="#saveState"/>), Running or
6482 Paused virtual machine. When the machine is PoweredOff, an
6483 offline snapshot is created. When the machine is Running a live
6484 snapshot is created, and an online snapshot is is created when Paused.
6485
6486 The taken snapshot is always based on the
6487 <link to="IMachine::currentSnapshot">current snapshot</link>
6488 of the associated virtual machine and becomes a new current snapshot.
6489
6490 <note>
6491 This method implicitly calls <link to="IMachine::saveSettings"/> to
6492 save all current machine settings before taking an offline snapshot.
6493 </note>
6494
6495 <result name="VBOX_E_INVALID_VM_STATE">
6496 Virtual machine currently changing state.
6497 </result>
6498 </desc>
6499 <param name="name" type="wstring" dir="in">
6500 <desc>Short name for the snapshot.</desc>
6501 </param>
6502 <param name="description" type="wstring" dir="in">
6503 <desc>Optional description of the snapshot.</desc>
6504 </param>
6505 <param name="progress" type="IProgress" dir="return">
6506 <desc>Progress object to track the operation completion.</desc>
6507 </param>
6508 </method>
6509
6510 <method name="deleteSnapshot">
6511 <desc>
6512 Starts deleting the specified snapshot asynchronously.
6513 See <link to="ISnapshot" /> for an introduction to snapshots.
6514
6515 The execution state and settings of the associated machine stored in
6516 the snapshot will be deleted. The contents of all differencing media of
6517 this snapshot will be merged with the contents of their dependent child
6518 media to keep the medium chain valid (in other words, all changes
6519 represented by media being deleted will be propagated to their child
6520 medium). After that, this snapshot's differencing medium will be
6521 deleted. The parent of this snapshot will become a new parent for all
6522 its child snapshots.
6523
6524 If the deleted snapshot is the current one, its parent snapshot will
6525 become a new current snapshot. The current machine state is not directly
6526 affected in this case, except that currently attached differencing
6527 media based on media of the deleted snapshot will be also merged as
6528 described above.
6529
6530 If the deleted snapshot is the first or current snapshot, then the
6531 respective IMachine attributes will be adjusted. Deleting the current
6532 snapshot will also implicitly call <link to="IMachine::saveSettings"/>
6533 to make all current machine settings permanent.
6534
6535 Deleting a snapshot has the following preconditions:
6536
6537 <ul>
6538 <li>Child media of all normal media of the deleted snapshot
6539 must be accessible (see <link to="IMedium::state"/>) for this
6540 operation to succeed. In particular, this means that all virtual
6541 machines, whose media are directly or indirectly based on the
6542 media of deleted snapshot, must be powered off.</li>
6543
6544 <li>You cannot delete the snapshot if a medium attached to it has
6545 more than once child medium (differencing images) because otherwise
6546 merging would be impossible. This might be the case if there is
6547 more than one child snapshot or differencing images were created
6548 for other reason (e.g. implicitly because of multiple machine
6549 attachments).</li>
6550 </ul>
6551
6552
6553 The virtual machine's <link to="IMachine::state">state</link> is changed to "DeletingSnapshot"
6554 while this operation is in progress.
6555
6556 <note>
6557 Merging medium contents can be very time and disk space
6558 consuming, if these media are big in size and have many
6559 children. However, if the snapshot being deleted is the last
6560 (head) snapshot on the branch, the operation will be rather
6561 quick.
6562 </note>
6563 <result name="VBOX_E_INVALID_VM_STATE">
6564 Virtual machine is running.
6565 </result>
6566 </desc>
6567 <param name="id" type="uuid" mod="string" dir="in">
6568 <desc>UUID of the snapshot to delete.</desc>
6569 </param>
6570 <param name="progress" type="IProgress" dir="return">
6571 <desc>Progress object to track the operation completion.</desc>
6572 </param>
6573 </method>
6574
6575 <method name="restoreSnapshot">
6576 <desc>
6577 Starts resetting the machine's current state to the state contained
6578 in the given snapshot, asynchronously. All current settings of the
6579 machine will be reset and changes stored in differencing media
6580 will be lost.
6581 See <link to="ISnapshot" /> for an introduction to snapshots.
6582
6583 After this operation is successfully completed, new empty differencing
6584 media are created for all normal media of the machine.
6585
6586 If the given snapshot is an online snapshot, the machine will go to
6587 the <link to="MachineState_Saved"> saved state</link>, so that the
6588 next time it is powered on, the execution state will be restored
6589 from the state of the snapshot.
6590
6591 <note>
6592 The machine must not be running, otherwise the operation will fail.
6593 </note>
6594
6595 <note>
6596 If the machine state is <link to="MachineState_Saved">Saved</link>
6597 prior to this operation, the saved state file will be implicitly
6598 deleted (as if <link to="IConsole::forgetSavedState"/> were
6599 called).
6600 </note>
6601
6602 <result name="VBOX_E_INVALID_VM_STATE">
6603 Virtual machine is running.
6604 </result>
6605 </desc>
6606 <param name="snapshot" type="ISnapshot" dir="in">
6607 <desc>The snapshot to restore the VM state from.</desc>
6608 </param>
6609 <param name="progress" type="IProgress" dir="return">
6610 <desc>Progress object to track the operation completion.</desc>
6611 </param>
6612 </method>
6613
6614 <method name="teleport">
6615 <desc>
6616 Teleport the VM to a different host machine or process.
6617
6618 TODO explain the details.
6619
6620 <result name="VBOX_E_INVALID_VM_STATE">
6621 Virtual machine not running or paused.
6622 </result>
6623 </desc>
6624 <param name="hostname" type="wstring" dir="in">
6625 <desc>The name or IP of the host to teleport to.</desc>
6626 </param>
6627 <param name="tcpport" type="unsigned long" dir="in">
6628 <desc>The TCP port to connect to (1..65535).</desc>
6629 </param>
6630 <param name="password" type="wstring" dir="in">
6631 <desc>The password.</desc>
6632 </param>
6633 <param name="maxDowntime" type="unsigned long" dir="in">
6634 <desc>
6635 The maximum allowed downtime given as milliseconds. 0 is not a valid
6636 value. Recommended value: 250 ms.
6637
6638 The higher the value is, the greater the chance for a successful
6639 teleportation. A small value may easily result in the teleportation
6640 process taking hours and eventually fail.
6641
6642 <note>
6643 The current implementation treats this a guideline, not as an
6644 absolute rule.
6645 </note>
6646 </desc>
6647 </param>
6648 <param name="progress" type="IProgress" dir="return">
6649 <desc>Progress object to track the operation completion.</desc>
6650 </param>
6651 </method>
6652
6653 </interface>
6654
6655 <!--
6656 // IHost
6657 /////////////////////////////////////////////////////////////////////////
6658 -->
6659
6660 <enum
6661 name="HostNetworkInterfaceMediumType"
6662 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6663 >
6664 <desc>
6665 Type of encapsulation. Ethernet encapsulation includes both wired and
6666 wireless Ethernet connections.
6667 <see>IHostNetworkInterface</see>
6668 </desc>
6669
6670 <const name="Unknown" value="0">
6671 <desc>
6672 The type of interface cannot be determined.
6673 </desc>
6674 </const>
6675 <const name="Ethernet" value="1">
6676 <desc>
6677 Ethernet frame encapsulation.
6678 </desc>
6679 </const>
6680 <const name="PPP" value="2">
6681 <desc>
6682 Point-to-point protocol encapsulation.
6683 </desc>
6684 </const>
6685 <const name="SLIP" value="3">
6686 <desc>
6687 Serial line IP encapsulation.
6688 </desc>
6689 </const>
6690 </enum>
6691
6692 <enum
6693 name="HostNetworkInterfaceStatus"
6694 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6695 >
6696 <desc>
6697 Current status of the interface.
6698 <see>IHostNetworkInterface</see>
6699 </desc>
6700
6701 <const name="Unknown" value="0">
6702 <desc>
6703 The state of interface cannot be determined.
6704 </desc>
6705 </const>
6706 <const name="Up" value="1">
6707 <desc>
6708 The interface is fully operational.
6709 </desc>
6710 </const>
6711 <const name="Down" value="2">
6712 <desc>
6713 The interface is not functioning.
6714 </desc>
6715 </const>
6716 </enum>
6717
6718 <enum
6719 name="HostNetworkInterfaceType"
6720 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6721 >
6722 <desc>
6723 Network interface type.
6724 </desc>
6725 <const name="Bridged" value="1"/>
6726 <const name="HostOnly" value="2"/>
6727 </enum>
6728
6729 <interface
6730 name="IHostNetworkInterface" extends="$unknown"
6731 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6732 wsmap="managed"
6733 >
6734 <desc>
6735 Represents one of host's network interfaces. IP V6 address and network
6736 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6737 separated by colons.
6738 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6739 </desc>
6740 <attribute name="name" type="wstring" readonly="yes">
6741 <desc>Returns the host network interface name.</desc>
6742 </attribute>
6743
6744 <attribute name="id" type="uuid" mod="string" readonly="yes">
6745 <desc>Returns the interface UUID.</desc>
6746 </attribute>
6747
6748 <attribute name="networkName" type="wstring" readonly="yes">
6749 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6750 </attribute>
6751
6752 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6753 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6754 </attribute>
6755
6756 <attribute name="IPAddress" type="wstring" readonly="yes">
6757 <desc>Returns the IP V4 address of the interface.</desc>
6758 </attribute>
6759
6760 <attribute name="networkMask" type="wstring" readonly="yes">
6761 <desc>Returns the network mask of the interface.</desc>
6762 </attribute>
6763
6764 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6765 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6766 </attribute>
6767
6768 <attribute name="IPV6Address" type="wstring" readonly="yes">
6769 <desc>Returns the IP V6 address of the interface.</desc>
6770 </attribute>
6771
6772 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6773 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6774 </attribute>
6775
6776 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6777 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6778 </attribute>
6779
6780 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6781 <desc>Type of protocol encapsulation used.</desc>
6782 </attribute>
6783
6784 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6785 <desc>Status of the interface.</desc>
6786 </attribute>
6787
6788 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6789 <desc>specifies the host interface type.</desc>
6790 </attribute>
6791
6792 <method name="enableStaticIpConfig">
6793 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6794 <param name="IPAddress" type="wstring" dir="in">
6795 <desc>
6796 IP address.
6797 </desc>
6798 </param>
6799 <param name="networkMask" type="wstring" dir="in">
6800 <desc>
6801 network mask.
6802 </desc>
6803 </param>
6804 </method>
6805
6806 <method name="enableStaticIpConfigV6">
6807 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6808 <param name="IPV6Address" type="wstring" dir="in">
6809 <desc>
6810 IP address.
6811 </desc>
6812 </param>
6813 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6814 <desc>
6815 network mask.
6816 </desc>
6817 </param>
6818 </method>
6819
6820 <method name="enableDynamicIpConfig">
6821 <desc>enables the dynamic IP configuration.</desc>
6822 </method>
6823
6824 <method name="dhcpRediscover">
6825 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6826 </method>
6827
6828 </interface>
6829
6830 <interface
6831 name="IHost" extends="$unknown"
6832 uuid="35b004f4-7806-4009-bfa8-d1308adba7e5"
6833 wsmap="managed"
6834 >
6835 <desc>
6836 The IHost interface represents the physical machine that this VirtualBox
6837 installation runs on.
6838
6839 An object implementing this interface is returned by the
6840 <link to="IVirtualBox::host" /> attribute. This interface contains
6841 read-only information about the host's physical hardware (such as what
6842 processors and disks are available, what the host operating system is,
6843 and so on) and also allows for manipulating some of the host's hardware,
6844 such as global USB device filters and host interface networking.
6845
6846 </desc>
6847 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
6848 <desc>List of DVD drives available on the host.</desc>
6849 </attribute>
6850
6851 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
6852 <desc>List of floppy drives available on the host.</desc>
6853 </attribute>
6854
6855 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6856 <desc>
6857 List of USB devices currently attached to the host.
6858 Once a new device is physically attached to the host computer,
6859 it appears in this list and remains there until detached.
6860
6861 <note>
6862 If USB functionality is not available in the given edition of
6863 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6864 </note>
6865 </desc>
6866 </attribute>
6867
6868 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
6869 <desc>
6870 List of USB device filters in action.
6871 When a new device is physically attached to the host computer,
6872 filters from this list are applied to it (in order they are stored
6873 in the list). The first matched filter will determine the
6874 <link to="IHostUSBDeviceFilter::action">action</link>
6875 performed on the device.
6876
6877 Unless the device is ignored by these filters, filters of all
6878 currently running virtual machines
6879 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6880
6881 <note>
6882 If USB functionality is not available in the given edition of
6883 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6884 </note>
6885
6886 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6887 </desc>
6888 </attribute>
6889
6890 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6891 <desc>List of host network interfaces currently defined on the host.</desc>
6892 </attribute>
6893
6894 <attribute name="processorCount" type="unsigned long" readonly="yes">
6895 <desc>Number of (logical) CPUs installed in the host system.</desc>
6896 </attribute>
6897
6898 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6899 <desc>Number of (logical) CPUs online in the host system.</desc>
6900 </attribute>
6901
6902 <attribute name="processorCoreCount" type="unsigned long" readonly="yes">
6903 <desc>Number of physical processor cores installed in the host system.</desc>
6904 </attribute>
6905
6906 <method name="getProcessorSpeed">
6907 <desc>Query the (approximate) maximum speed of a specified host CPU in
6908 Megahertz.
6909 </desc>
6910 <param name="cpuId" type="unsigned long" dir="in">
6911 <desc>
6912 Identifier of the CPU.
6913 </desc>
6914 </param>
6915 <param name="speed" type="unsigned long" dir="return">
6916 <desc>
6917 Speed value. 0 is returned if value is not known or @a cpuId is
6918 invalid.
6919 </desc>
6920 </param>
6921 </method>
6922
6923 <method name="getProcessorFeature">
6924 <desc>Query whether a CPU feature is supported or not.</desc>
6925 <param name="feature" type="ProcessorFeature" dir="in">
6926 <desc>
6927 CPU Feature identifier.
6928 </desc>
6929 </param>
6930 <param name="supported" type="boolean" dir="return">
6931 <desc>
6932 Feature is supported or not.
6933 </desc>
6934 </param>
6935 </method>
6936
6937 <method name="getProcessorDescription">
6938 <desc>Query the model string of a specified host CPU.
6939 </desc>
6940 <param name="cpuId" type="unsigned long" dir="in">
6941 <desc>
6942 Identifier of the CPU.
6943 <note>
6944 The current implementation might not necessarily return the
6945 description for this exact CPU.
6946 </note>
6947 </desc>
6948 </param>
6949 <param name="description" type="wstring" dir="return">
6950 <desc>
6951 Model string. An empty string is returned if value is not known or
6952 @a cpuId is invalid.
6953 </desc>
6954 </param>
6955 </method>
6956
6957 <method name="getProcessorCPUIDLeaf">
6958 <desc>
6959 Returns the CPU cpuid information for the specified leaf.
6960 </desc>
6961 <param name="cpuId" type="unsigned long" dir="in">
6962 <desc>
6963 Identifier of the CPU. The CPU most be online.
6964 <note>
6965 The current implementation might not necessarily return the
6966 description for this exact CPU.
6967 </note>
6968 </desc>
6969 </param>
6970 <param name="leaf" type="unsigned long" dir="in">
6971 <desc>
6972 CPUID leaf index (eax).
6973 </desc>
6974 </param>
6975 <param name="subLeaf" type="unsigned long" dir="in">
6976 <desc>
6977 CPUID leaf sub index (ecx). This currently only applies to cache
6978 information on Intel CPUs. Use 0 if retriving values for
6979 <link to="IMachine::setCPUIDLeaf"/>.
6980 </desc>
6981 </param>
6982 <param name="valEax" type="unsigned long" dir="out">
6983 <desc>
6984 CPUID leaf value for register eax.
6985 </desc>
6986 </param>
6987 <param name="valEbx" type="unsigned long" dir="out">
6988 <desc>
6989 CPUID leaf value for register ebx.
6990 </desc>
6991 </param>
6992 <param name="valEcx" type="unsigned long" dir="out">
6993 <desc>
6994 CPUID leaf value for register ecx.
6995 </desc>
6996 </param>
6997 <param name="valEdx" type="unsigned long" dir="out">
6998 <desc>
6999 CPUID leaf value for register edx.
7000 </desc>
7001 </param>
7002 </method>
7003
7004 <attribute name="memorySize" type="unsigned long" readonly="yes">
7005 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7006 </attribute>
7007
7008 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7009 <desc>Available system memory in the host system.</desc>
7010 </attribute>
7011
7012 <attribute name="operatingSystem" type="wstring" readonly="yes">
7013 <desc>Name of the host system's operating system.</desc>
7014 </attribute>
7015
7016 <attribute name="OSVersion" type="wstring" readonly="yes">
7017 <desc>Host operating system's version string.</desc>
7018 </attribute>
7019
7020 <attribute name="UTCTime" type="long long" readonly="yes">
7021 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7022 </attribute>
7023
7024 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
7025 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
7026 </attribute>
7027
7028 <method name="createHostOnlyNetworkInterface">
7029 <desc>
7030 Creates a new adapter for Host Only Networking.
7031 <result name="E_INVALIDARG">
7032 Host network interface @a name already exists.
7033 </result>
7034 </desc>
7035 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7036 <desc>
7037 Created host interface object.
7038 </desc>
7039 </param>
7040 <param name="progress" type="IProgress" dir="return">
7041 <desc>
7042 Progress object to track the operation completion.
7043 </desc>
7044 </param>
7045 </method>
7046
7047 <method name="removeHostOnlyNetworkInterface">
7048 <desc>
7049 Removes the given Host Only Networking interface.
7050 <result name="VBOX_E_OBJECT_NOT_FOUND">
7051 No host network interface matching @a id found.
7052 </result>
7053 </desc>
7054 <param name="id" type="uuid" mod="string" dir="in">
7055 <desc>
7056 Adapter GUID.
7057 </desc>
7058 </param>
7059 <param name="progress" type="IProgress" dir="return">
7060 <desc>
7061 Progress object to track the operation completion.
7062 </desc>
7063 </param>
7064 </method>
7065
7066 <method name="createUSBDeviceFilter">
7067 <desc>
7068 Creates a new USB device filter. All attributes except
7069 the filter name are set to empty (any match),
7070 <i>active</i> is @c false (the filter is not active).
7071
7072 The created filter can be added to the list of filters using
7073 <link to="#insertUSBDeviceFilter"/>.
7074
7075 <see>#USBDeviceFilters</see>
7076 </desc>
7077 <param name="name" type="wstring" dir="in">
7078 <desc>
7079 Filter name. See <link to="IUSBDeviceFilter::name"/> for more information.
7080 </desc>
7081 </param>
7082 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7083 <desc>Created filter object.</desc>
7084 </param>
7085 </method>
7086
7087 <method name="insertUSBDeviceFilter">
7088 <desc>
7089 Inserts the given USB device to the specified position
7090 in the list of filters.
7091
7092 Positions are numbered starting from @c 0. If the specified
7093 position is equal to or greater than the number of elements in
7094 the list, the filter is added at the end of the collection.
7095
7096 <note>
7097 Duplicates are not allowed, so an attempt to insert a
7098 filter already in the list is an error.
7099 </note>
7100 <note>
7101 If USB functionality is not available in the given edition of
7102 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7103 </note>
7104
7105 <see>#USBDeviceFilters</see>
7106
7107 <result name="VBOX_E_INVALID_OBJECT_STATE">
7108 USB device filter is not created within this VirtualBox instance.
7109 </result>
7110 <result name="E_INVALIDARG">
7111 USB device filter already in list.
7112 </result>
7113
7114 </desc>
7115 <param name="position" type="unsigned long" dir="in">
7116 <desc>Position to insert the filter to.</desc>
7117 </param>
7118 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7119 <desc>USB device filter to insert.</desc>
7120 </param>
7121 </method>
7122
7123 <method name="removeUSBDeviceFilter">
7124 <desc>
7125 Removes a USB device filter from the specified position in the
7126 list of filters.
7127
7128 Positions are numbered starting from @c 0. Specifying a
7129 position equal to or greater than the number of elements in
7130 the list will produce an error.
7131
7132 <note>
7133 If USB functionality is not available in the given edition of
7134 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7135 </note>
7136
7137 <see>#USBDeviceFilters</see>
7138
7139 <result name="E_INVALIDARG">
7140 USB device filter list empty or invalid @a position.
7141 </result>
7142
7143 </desc>
7144 <param name="position" type="unsigned long" dir="in">
7145 <desc>Position to remove the filter from.</desc>
7146 </param>
7147 </method>
7148
7149 <method name="findHostDVDDrive">
7150 <desc>
7151 Searches for a host DVD drive with the given @c name.
7152
7153 <result name="VBOX_E_OBJECT_NOT_FOUND">
7154 Given @c name does not correspond to any host drive.
7155 </result>
7156
7157 </desc>
7158 <param name="name" type="wstring" dir="in">
7159 <desc>Name of the host drive to search for</desc>
7160 </param>
7161 <param name="drive" type="IMedium" dir="return">
7162 <desc>Found host drive object</desc>
7163 </param>
7164 </method>
7165
7166 <method name="findHostFloppyDrive">
7167 <desc>
7168 Searches for a host floppy drive with the given @c name.
7169
7170 <result name="VBOX_E_OBJECT_NOT_FOUND">
7171 Given @c name does not correspond to any host floppy drive.
7172 </result>
7173
7174 </desc>
7175 <param name="name" type="wstring" dir="in">
7176 <desc>Name of the host floppy drive to search for</desc>
7177 </param>
7178 <param name="drive" type="IMedium" dir="return">
7179 <desc>Found host floppy drive object</desc>
7180 </param>
7181 </method>
7182
7183 <method name="findHostNetworkInterfaceByName">
7184 <desc>
7185 Searches through all host network interfaces for an interface with
7186 the given @c name.
7187 <note>
7188 The method returns an error if the given @c name does not
7189 correspond to any host network interface.
7190 </note>
7191 </desc>
7192 <param name="name" type="wstring" dir="in">
7193 <desc>Name of the host network interface to search for.</desc>
7194 </param>
7195 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7196 <desc>Found host network interface object.</desc>
7197 </param>
7198 </method>
7199 <method name="findHostNetworkInterfaceById">
7200 <desc>
7201 Searches through all host network interfaces for an interface with
7202 the given GUID.
7203 <note>
7204 The method returns an error if the given GUID does not
7205 correspond to any host network interface.
7206 </note>
7207 </desc>
7208 <param name="id" type="uuid" mod="string" dir="in">
7209 <desc>GUID of the host network interface to search for.</desc>
7210 </param>
7211 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7212 <desc>Found host network interface object.</desc>
7213 </param>
7214 </method>
7215 <method name="findHostNetworkInterfacesOfType">
7216 <desc>
7217 Searches through all host network interfaces and returns a list of interfaces of the specified type
7218 </desc>
7219 <param name="type" type="HostNetworkInterfaceType" dir="in">
7220 <desc>type of the host network interfaces to search for.</desc>
7221 </param>
7222 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7223 <desc>Found host network interface objects.</desc>
7224 </param>
7225 </method>
7226
7227 <method name="findUSBDeviceById">
7228 <desc>
7229 Searches for a USB device with the given UUID.
7230
7231 <result name="VBOX_E_OBJECT_NOT_FOUND">
7232 Given @c id does not correspond to any USB device.
7233 </result>
7234
7235 <see>IHostUSBDevice::id</see>
7236 </desc>
7237 <param name="id" type="uuid" mod="string" dir="in">
7238 <desc>UUID of the USB device to search for.</desc>
7239 </param>
7240 <param name="device" type="IHostUSBDevice" dir="return">
7241 <desc>Found USB device object.</desc>
7242 </param>
7243 </method>
7244
7245 <method name="findUSBDeviceByAddress">
7246 <desc>
7247 Searches for a USB device with the given host address.
7248
7249 <result name="VBOX_E_OBJECT_NOT_FOUND">
7250 Given @c name does not correspond to any USB device.
7251 </result>
7252
7253 <see>IHostUSBDevice::address</see>
7254 </desc>
7255 <param name="name" type="wstring" dir="in">
7256 <desc>
7257 Address of the USB device (as assigned by the host) to
7258 search for.
7259 </desc>
7260 </param>
7261 <param name="device" type="IHostUSBDevice" dir="return">
7262 <desc>Found USB device object.</desc>
7263 </param>
7264 </method>
7265
7266 </interface>
7267
7268 <!--
7269 // ISystemProperties
7270 /////////////////////////////////////////////////////////////////////////
7271 -->
7272
7273 <interface
7274 name="ISystemProperties"
7275 extends="$unknown"
7276 uuid="07c3ffd8-8f59-49cc-b608-53a332e85cc3"
7277 wsmap="managed"
7278 >
7279 <desc>
7280 The ISystemProperties interface represents global properties of the given
7281 VirtualBox installation.
7282
7283 These properties define limits and default values for various attributes
7284 and parameters. Most of the properties are read-only, but some can be
7285 changed by a user.
7286 </desc>
7287
7288 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7289 <desc>Minimum guest system memory in Megabytes.</desc>
7290 </attribute>
7291
7292 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7293 <desc>Maximum guest system memory in Megabytes.</desc>
7294 </attribute>
7295
7296 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7297 <desc>Minimum guest video memory in Megabytes.</desc>
7298 </attribute>
7299
7300 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7301 <desc>Maximum guest video memory in Megabytes.</desc>
7302 </attribute>
7303
7304 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7305 <desc>Minimum CPU count.</desc>
7306 </attribute>
7307
7308 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7309 <desc>Maximum CPU count.</desc>
7310 </attribute>
7311
7312 <attribute name="maxGuestMonitors" type="unsigned long" readonly="yes">
7313 <desc>Maximum of monitors which could be connected.</desc>
7314 </attribute>
7315
7316 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7317 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7318 </attribute>
7319
7320 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7321 <desc>
7322 Number of network adapters associated with every
7323 <link to="IMachine"/> instance.
7324 </desc>
7325 </attribute>
7326
7327 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7328 <desc>
7329 Number of serial ports associated with every
7330 <link to="IMachine"/> instance.
7331 </desc>
7332 </attribute>
7333
7334 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7335 <desc>
7336 Number of parallel ports associated with every
7337 <link to="IMachine"/> instance.
7338 </desc>
7339 </attribute>
7340
7341 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7342 <desc>
7343 Maximum device position in the boot order. This value corresponds
7344 to the total number of devices a machine can boot from, to make it
7345 possible to include all possible devices to the boot list.
7346 <see><link to="IMachine::setBootOrder"/></see>
7347 </desc>
7348 </attribute>
7349
7350 <attribute name="defaultMachineFolder" type="wstring">
7351 <desc>
7352 Full path to the default directory used to create new or open
7353 existing machines when a settings file name contains no
7354 path.
7355
7356 The initial value of this property is
7357 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7358 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7359
7360 <note>
7361 Setting this property to @c null or an empty string will restore the
7362 initial value.
7363 </note>
7364 <note>
7365 When settings this property, the specified path can be
7366 absolute (full path) or relative
7367 to the <link to="IVirtualBox::homeFolder">
7368 VirtualBox home directory</link>.
7369 When reading this property, a full path is
7370 always returned.
7371 </note>
7372 <note>
7373 The specified path may not exist, it will be created
7374 when necessary.
7375 </note>
7376
7377 <see>
7378 <link to="IVirtualBox::createMachine"/>,
7379 <link to="IVirtualBox::openMachine"/>
7380 </see>
7381 </desc>
7382 </attribute>
7383
7384 <attribute name="defaultHardDiskFolder" type="wstring">
7385 <desc>
7386 Full path to the default directory used to create new or open existing
7387 virtual disks.
7388
7389 This path is used when the storage unit of a hard disk is a regular file
7390 in the host's file system and only a file name that contains no path is
7391 given.
7392
7393 The initial value of this property is
7394 <tt>&lt;</tt>
7395 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7396 <tt>&gt;/HardDisks</tt>.
7397
7398 <note>
7399 Setting this property to @c null or empty string will restore the
7400 initial value.
7401 </note>
7402 <note>
7403 When settings this property, the specified path can be relative
7404 to the
7405 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7406 absolute. When reading this property, a full path is
7407 always returned.
7408 </note>
7409 <note>
7410 The specified path may not exist, it will be created
7411 when necessary.
7412 </note>
7413
7414 <see>
7415 IMedium,
7416 <link to="IVirtualBox::createHardDisk"/>,
7417 <link to="IVirtualBox::openHardDisk"/>,
7418 <link to="IMedium::location"/>
7419 </see>
7420 </desc>
7421 </attribute>
7422
7423 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7424 <desc>
7425 List of all medium storage formats supported by this VirtualBox
7426 installation.
7427
7428 Keep in mind that the medium format identifier
7429 (<link to="IMediumFormat::id"/>) used in other API calls like
7430 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7431 medium format is a case-insensitive string. This means that, for
7432 example, all of the following strings:
7433 <pre>
7434 "VDI"
7435 "vdi"
7436 "VdI"</pre>
7437 refer to the same medium format.
7438
7439 Note that the virtual medium framework is backend-based, therefore
7440 the list of supported formats depends on what backends are currently
7441 installed.
7442
7443 <see>
7444 <link to="IMediumFormat"/>,
7445 </see>
7446 </desc>
7447 </attribute>
7448
7449 <attribute name="defaultHardDiskFormat" type="wstring">
7450 <desc>
7451 Identifier of the default medium format used by VirtualBox.
7452
7453 The medium format set by this attribute is used by VirtualBox
7454 when the medium format was not specified explicitly. One example is
7455 <link to="IVirtualBox::createHardDisk"/> with the empty
7456 format argument. A more complex example is implicit creation of
7457 differencing media when taking a snapshot of a virtual machine:
7458 this operation will try to use a format of the parent medium first
7459 and if this format does not support differencing media the default
7460 format specified by this argument will be used.
7461
7462 The list of supported medium formats may be obtained by the
7463 <link to="#mediumFormats"/> call. Note that the default medium
7464 format must have a capability to create differencing media;
7465 otherwise operations that create media implicitly may fail
7466 unexpectedly.
7467
7468 The initial value of this property is <tt>"VDI"</tt> in the current
7469 version of the VirtualBox product, but may change in the future.
7470
7471 <note>
7472 Setting this property to @c null or empty string will restore the
7473 initial value.
7474 </note>
7475
7476 <see>
7477 <link to="#mediumFormats"/>,
7478 <link to="IMediumFormat::id"/>,
7479 <link to="IVirtualBox::createHardDisk"/>
7480 </see>
7481 </desc>
7482 </attribute>
7483
7484 <attribute name="freeDiskSpaceWarning" type="unsigned long long">
7485 <desc>Issue a warning if the free disk space is below (or in some disk
7486 intensive operation is expected to go below) the given size in
7487 Megabytes.</desc>
7488 </attribute>
7489
7490 <attribute name="freeDiskSpacePercentWarning" type="unsigned long">
7491 <desc>Issue a warning if the free disk space is below (or in some disk
7492 intensive operation is expected to go below) the given percentage.</desc>
7493 </attribute>
7494
7495 <attribute name="freeDiskSpaceError" type="unsigned long long">
7496 <desc>Issue an error if the free disk space is below (or in some disk
7497 intensive operation is expected to go below) the given size in
7498 Megabytes.</desc>
7499 </attribute>
7500
7501 <attribute name="freeDiskSpacePercentError" type="unsigned long">
7502 <desc>Issue an error if the free disk space is below (or in some disk
7503 intensive operation is expected to go below) the given percentage.</desc>
7504 </attribute>
7505
7506 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7507 <desc>
7508 Library that provides authentication for VRDP clients. The library
7509 is used if a virtual machine's authentication type is set to "external"
7510 in the VM RemoteDisplay configuration.
7511
7512 The system library extension (".DLL" or ".so") must be omitted.
7513 A full path can be specified; if not, then the library must reside on the
7514 system's default library path.
7515
7516 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7517 of that name in one of the default VirtualBox library directories.
7518
7519 For details about VirtualBox authentication libraries and how to implement
7520 them, please refer to the VirtualBox manual.
7521
7522 <note>
7523 Setting this property to @c null or empty string will restore the
7524 initial value.
7525 </note>
7526 </desc>
7527 </attribute>
7528
7529 <attribute name="webServiceAuthLibrary" type="wstring">
7530 <desc>
7531 Library that provides authentication for webservice clients. The library
7532 is used if a virtual machine's authentication type is set to "external"
7533 in the VM RemoteDisplay configuration and will be called from
7534 within the <link to="IWebsessionManager::logon" /> implementation.
7535
7536 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7537 there is no per-VM setting for this, as the webservice is a global
7538 resource (if it is running). Only for this setting (for the webservice),
7539 setting this value to a literal <tt>"null"</tt> string disables authentication,
7540 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7541 no matter what user name and password are supplied.
7542
7543 The initial value of this property is <tt>"VRDPAuth"</tt>,
7544 meaning that the webservice will use the same authentication
7545 library that is used by default for VBoxVRDP (again, see
7546 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7547 The format and calling convention of authentication libraries
7548 is the same for the webservice as it is for VBoxVRDP.
7549
7550 <note>
7551 Setting this property to @c null or empty string will restore the
7552 initial value.
7553 </note>
7554 </desc>
7555 </attribute>
7556
7557 <attribute name="LogHistoryCount" type="unsigned long">
7558 <desc>
7559 This value specifies how many old release log files are kept.
7560 </desc>
7561 </attribute>
7562
7563 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7564 <desc>This value hold the default audio driver for the current
7565 system.</desc>
7566 </attribute>
7567
7568 <method name="getMaxDevicesPerPortForStorageBus">
7569 <desc>Returns the maximum number of devices which can be attached to a port
7570 for the given storage bus.</desc>
7571
7572 <param name="bus" type="StorageBus" dir="in">
7573 <desc>The storage bus type to get the value for.</desc>
7574 </param>
7575
7576 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
7577 <desc>The maximum number of devices which can eb attached to the port for the given
7578 storage bus.</desc>
7579 </param>
7580 </method>
7581
7582 <method name="getMinPortCountForStorageBus">
7583 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
7584
7585 <param name="bus" type="StorageBus" dir="in">
7586 <desc>The storage bus type to get the value for.</desc>
7587 </param>
7588
7589 <param name="minPortCount" type="unsigned long" dir="return">
7590 <desc>The minimum number of ports for the given storage bus.</desc>
7591 </param>
7592 </method>
7593
7594 <method name="getMaxPortCountForStorageBus">
7595 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
7596
7597 <param name="bus" type="StorageBus" dir="in">
7598 <desc>The storage bus type to get the value for.</desc>
7599 </param>
7600
7601 <param name="maxPortCount" type="unsigned long" dir="return">
7602 <desc>The maximum number of ports for the given storage bus.</desc>
7603 </param>
7604 </method>
7605
7606 <method name="getMaxInstancesOfStorageBus">
7607 <desc>Returns the maximum number of storage bus instances which
7608 can be configured for each VM. This corresponds to the number of
7609 storage controllers one can have.</desc>
7610
7611 <param name="bus" type="StorageBus" dir="in">
7612 <desc>The storage bus type to get the value for.</desc>
7613 </param>
7614
7615 <param name="maxInstances" type="unsigned long" dir="return">
7616 <desc>The maximum number of instances for the given storage bus.</desc>
7617 </param>
7618 </method>
7619
7620 <method name="getDeviceTypesForStorageBus">
7621 <desc>Returns list of all the supported device types
7622 (<link to="DeviceType"/>) for the given type of storage
7623 bus.</desc>
7624
7625 <param name="bus" type="StorageBus" dir="in">
7626 <desc>The storage bus type to get the value for.</desc>
7627 </param>
7628
7629 <param name="deviceTypes" type="DeviceType" safearray="yes" dir="return">
7630 <desc>The list of all supported device types for the given storage bus.</desc>
7631 </param>
7632 </method>
7633 </interface>
7634
7635 <!--
7636 // IGuest
7637 /////////////////////////////////////////////////////////////////////////
7638 -->
7639
7640 <interface
7641 name="IGuestOSType" extends="$unknown"
7642 uuid="e3f6727e-a09b-41ea-a824-864a176472f3"
7643 wsmap="struct"
7644 >
7645 <desc>
7646 </desc>
7647
7648 <attribute name="familyId" type="wstring" readonly="yes">
7649 <desc>Guest OS family identifier string.</desc>
7650 </attribute>
7651
7652 <attribute name="familyDescription" type="wstring" readonly="yes">
7653 <desc>Human readable description of the guest OS family.</desc>
7654 </attribute>
7655
7656 <attribute name="id" type="wstring" readonly="yes">
7657 <desc>Guest OS identifier string.</desc>
7658 </attribute>
7659
7660 <attribute name="description" type="wstring" readonly="yes">
7661 <desc>Human readable description of the guest OS.</desc>
7662 </attribute>
7663
7664 <attribute name="is64Bit" type="boolean" readonly="yes">
7665 <desc>Returns @c true if the given OS is 64-bit</desc>
7666 </attribute>
7667
7668 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7669 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7670 </attribute>
7671
7672 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7673 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7674 </attribute>
7675
7676 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7677 <desc>Recommended RAM size in Megabytes.</desc>
7678 </attribute>
7679
7680 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7681 <desc>Recommended video RAM size in Megabytes.</desc>
7682 </attribute>
7683
7684 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7685 <desc>Recommended hard disk size in Megabytes.</desc>
7686 </attribute>
7687
7688 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7689 <desc>Returns recommended network adapter for this OS type.</desc>
7690 </attribute>
7691
7692 <attribute name="recommendedPae" type="boolean" readonly="yes">
7693 <desc>Returns @c true if using PAE is recommended for this OS type.</desc>
7694 </attribute>
7695
7696 <attribute name="recommendedDvdStorageController" type="StorageControllerType" readonly="yes">
7697 <desc>Recommended storage controller type for DVD/CD drives.</desc>
7698 </attribute>
7699
7700 <attribute name="recommendedDvdStorageBus" type="StorageBus" readonly="yes">
7701 <desc>Recommended storage bus type for DVD/CD drives.</desc>
7702 </attribute>
7703
7704 <attribute name="recommendedHdStorageController" type="StorageControllerType" readonly="yes">
7705 <desc>Recommended storage controller type for HD drives.</desc>
7706 </attribute>
7707
7708 <attribute name="recommendedHdStorageBus" type="StorageBus" readonly="yes">
7709 <desc>Recommended storage bus type for HD drives.</desc>
7710 </attribute>
7711
7712 <attribute name="recommendedFirmware" type="FirmwareType" readonly="yes">
7713 <desc>Recommended firmware type.</desc>
7714 </attribute>
7715
7716 <attribute name="recommendedUsbHid" type="boolean" readonly="yes">
7717 <desc>Returns @c true if using USB Human Interface Devices, such as keyboard and mouse recommended.</desc>
7718 </attribute>
7719
7720 <attribute name="recommendedHpet" type="boolean" readonly="yes">
7721 <desc>Returns @c true if using HPET is recommended for this OS type.</desc>
7722 </attribute>
7723
7724 <attribute name="recommendedUsbTablet" type="boolean" readonly="yes">
7725 <desc>Returns @c true if using a USB Tablet is recommended.</desc>
7726 </attribute>
7727
7728 <attribute name="recommendedRtcUseUtc" type="boolean" readonly="yes">
7729 <desc>Returns @c true if the RTC of this VM should be set to UTC</desc>
7730 </attribute>
7731
7732 </interface>
7733
7734 <interface
7735 name="IGuest" extends="$unknown"
7736 uuid="d915dff1-ed38-495a-91f1-ab6c53932468"
7737 wsmap="managed"
7738 >
7739 <desc>
7740 The IGuest interface represents information about the operating system
7741 running inside the virtual machine. Used in
7742 <link to="IConsole::guest"/>.
7743
7744 IGuest provides information about the guest operating system, whether
7745 Guest Additions are installed and other OS-specific virtual machine
7746 properties.
7747 </desc>
7748
7749 <attribute name="OSTypeId" type="wstring" readonly="yes">
7750 <desc>
7751 Identifier of the Guest OS type as reported by the Guest
7752 Additions.
7753 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7754 an IGuestOSType object representing details about the given
7755 Guest OS type.
7756 <note>
7757 If Guest Additions are not installed, this value will be
7758 the same as <link to="IMachine::OSTypeId"/>.
7759 </note>
7760 </desc>
7761 </attribute>
7762
7763 <attribute name="additionsActive" type="boolean" readonly="yes">
7764 <desc>
7765 Flag whether the Guest Additions are installed and active
7766 in which case their version will be returned by the
7767 <link to="#additionsVersion"/> property.
7768 </desc>
7769 </attribute>
7770
7771 <attribute name="additionsVersion" type="wstring" readonly="yes">
7772 <desc>
7773 Version of the Guest Additions (3 decimal numbers separated
7774 by dots) or empty when the Additions are not installed. The
7775 Additions may also report a version but yet not be active as
7776 the version might be refused by VirtualBox (incompatible) or
7777 other failures occurred.
7778 </desc>
7779 </attribute>
7780
7781 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7782 <desc>
7783 Flag whether seamless guest display rendering (seamless desktop
7784 integration) is supported.
7785 </desc>
7786 </attribute>
7787
7788 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7789 <desc>
7790 Flag whether the guest is in graphics mode. If it is not, then
7791 seamless rendering will not work, resize hints are not immediately
7792 acted on and guest display resizes are probably not initiated by
7793 the guest additions.
7794 </desc>
7795 </attribute>
7796
7797 <attribute name="memoryBalloonSize" type="unsigned long">
7798 <desc>Guest system memory balloon size in megabytes (transient property).</desc>
7799 </attribute>
7800
7801 <attribute name="pageFusionEnabled" type="boolean">
7802 <desc>Flag whether page fusion is enabled or not.</desc>
7803 </attribute>
7804
7805 <attribute name="statisticsUpdateInterval" type="unsigned long">
7806 <desc>Interval to update guest statistics in seconds.</desc>
7807 </attribute>
7808
7809 <method name="internalGetStatistics">
7810 <desc>
7811 Internal method; do not use as it might change at any time
7812 </desc>
7813 <param name="cpuUser" type="unsigned long" dir="out">
7814 <desc>Percentage of processor time spent in user mode as seen by the guest</desc>
7815 </param>
7816 <param name="cpuKernel" type="unsigned long" dir="out">
7817 <desc>Percentage of processor time spent in kernel mode as seen by the guest</desc>
7818 </param>
7819 <param name="cpuIdle" type="unsigned long" dir="out">
7820 <desc>Percentage of processor time spent idling as seen by the guest</desc>
7821 </param>
7822 <param name="memTotal" type="unsigned long" dir="out">
7823 <desc>Total amount of physical guest RAM</desc>
7824 </param>
7825 <param name="memFree" type="unsigned long" dir="out">
7826 <desc>Free amount of physical guest RAM</desc>
7827 </param>
7828 <param name="memBalloon" type="unsigned long" dir="out">
7829 <desc>Amount of ballooned physical guest RAM</desc>
7830 </param>
7831 <param name="memShared" type="unsigned long" dir="out">
7832 <desc>Amount of shared physical guest RAM</desc>
7833 </param>
7834 <param name="memCache" type="unsigned long" dir="out">
7835 <desc>Total amount of guest (disk) cache memory</desc>
7836 </param>
7837 <param name="pagedTotal" type="unsigned long" dir="out">
7838 <desc>Total amount of space in the page file</desc>
7839 </param>
7840 <param name="memAllocTotal" type="unsigned long" dir="out">
7841 <desc>Total amount of memory allocated by the hypervisor</desc>
7842 </param>
7843 <param name="memFreeTotal" type="unsigned long" dir="out">
7844 <desc>Total amount of free memory available in the hypervisor</desc>
7845 </param>
7846 <param name="memBalloonTotal" type="unsigned long" dir="out">
7847 <desc>Total amount of memory ballooned by the hypervisor</desc>
7848 </param>
7849 <param name="memSharedTotal" type="unsigned long" dir="out">
7850 <desc>Total amount of shared memory in the hypervisor</desc>
7851 </param>
7852 </method>
7853
7854 <method name="setCredentials">
7855 <desc>
7856 Store login credentials that can be queried by guest operating
7857 systems with Additions installed. The credentials are transient
7858 to the session and the guest may also choose to erase them. Note
7859 that the caller cannot determine whether the guest operating system
7860 has queried or made use of the credentials.
7861
7862 <result name="VBOX_E_VM_ERROR">
7863 VMM device is not available.
7864 </result>
7865
7866 </desc>
7867 <param name="userName" type="wstring" dir="in">
7868 <desc>User name string, can be empty</desc>
7869 </param>
7870 <param name="password" type="wstring" dir="in">
7871 <desc>Password string, can be empty</desc>
7872 </param>
7873 <param name="domain" type="wstring" dir="in">
7874 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7875 </param>
7876 <param name="allowInteractiveLogon" type="boolean" dir="in">
7877 <desc>
7878 Flag whether the guest should alternatively allow the user to
7879 interactively specify different credentials. This flag might
7880 not be supported by all versions of the Additions.
7881 </desc>
7882 </param>
7883 </method>
7884
7885 <method name="executeProcess">
7886 <desc>
7887 Executes an existing program inside the guest VM.
7888
7889 <result name="VBOX_E_IPRT_ERROR">
7890 Could not execute process.
7891 </result>
7892
7893 </desc>
7894 <param name="execName" type="wstring" dir="in">
7895 <desc>
7896 Full path name of the command to execute on the guest; the
7897 commands has to exists in the guest VM in order to be executed.
7898 </desc>
7899 </param>
7900 <param name="flags" type="unsigned long" dir="in">
7901 <desc>
7902 Execution flags - currently not supported and therefore
7903 has to be set to 0.
7904 </desc>
7905 </param>
7906 <param name="arguments" type="wstring" safearray="yes" dir="in">
7907 <desc>
7908 Array of arguments passed to the execution command.
7909 </desc>
7910 </param>
7911 <param name="environment" type="wstring" safearray="yes" dir="in">
7912 <desc>
7913 Environment variables that can be set while the command is being
7914 executed, in form of "NAME=VALUE"; one pair per entry. To unset a
7915 variable just set its name ("NAME") without a value.
7916 </desc>
7917 </param>
7918 <param name="userName" type="wstring" dir="in">
7919 <desc>
7920 User name under which the command will be executed; has to exist
7921 and have the appropriate rights to execute programs in the VM.
7922 </desc>
7923 </param>
7924 <param name="password" type="wstring" dir="in">
7925 <desc>
7926 Password of the user account specified.
7927 </desc>
7928 </param>
7929 <param name="timeoutMS" type="unsigned long" dir="in">
7930 <desc>
7931 The maximum timeout value (in msec) to wait for finished program
7932 execution. Pass 0 for an infinite timeout.
7933 </desc>
7934 </param>
7935 <param name="pid" type="unsigned long" dir="out">
7936 <desc>
7937 The PID (process ID) of the started command for later reference.
7938 </desc>
7939 </param>
7940 <param name="progress" type="IProgress" dir="return">
7941 <desc>Progress object to track the operation completion.</desc>
7942 </param>
7943 </method>
7944
7945 <method name="getProcessOutput">
7946 <desc>
7947 Retrieves output of a formerly started process.
7948
7949 <result name="VBOX_E_IPRT_ERROR">
7950 Could not retrieve output.
7951 </result>
7952
7953 </desc>
7954 <param name="pid" type="unsigned long" dir="in">
7955 <desc>
7956 Process id returned by earlier executeProcess() call.
7957 </desc>
7958 </param>
7959 <param name="flags" type="unsigned long" dir="in">
7960 <desc>
7961 Flags describing which output to retrieve.
7962 </desc>
7963 </param>
7964 <param name="timeoutMS" type="unsigned long" dir="in">
7965 <desc>
7966 The maximum timeout value (in msec) to wait for output
7967 data. Pass 0 for an infinite timeout.
7968 </desc>
7969 </param>
7970 <param name="size" type="unsigned long long" dir="in">
7971 <desc>
7972 Size in bytes to read in the buffer.
7973 </desc>
7974 </param>
7975 <param name="data" type="octet" dir="return" safearray="yes">
7976 <desc>
7977 Buffer for retrieving the actual output. A data size of 0 means end of file
7978 if the requested size was not 0. This is the unprocessed
7979 output data, i.e. the line ending style depends on the platform of
7980 the system the server is running on.
7981 </desc>
7982 </param>
7983 </method>
7984
7985 <method name="getProcessStatus">
7986 <desc>
7987 Retrieves status, exit code and the exit reason of a formerly started process.
7988
7989 <result name="VBOX_E_IPRT_ERROR">
7990 Process with specified PID was not found.
7991 </result>
7992
7993 </desc>
7994 <param name="pid" type="unsigned long" dir="in">
7995 <desc>
7996 Process id returned by earlier executeProcess() call.
7997 </desc>
7998 </param>
7999 <param name="exitcode" type="unsigned long" dir="out">
8000 <desc>
8001 The exit code (if available).
8002 </desc>
8003 </param>
8004 <param name="flags" type="unsigned long" dir="out">
8005 <desc>
8006 Additional flags of process status (not used at the moment).
8007 </desc>
8008 </param>
8009 <param name="reason" type="unsigned long" dir="return">
8010 <desc>
8011 The current process status.
8012 </desc>
8013 </param>
8014 </method>
8015
8016 </interface>
8017
8018
8019 <!--
8020 // IProgress
8021 /////////////////////////////////////////////////////////////////////////
8022 -->
8023
8024 <interface
8025 name="IProgress" extends="$unknown"
8026 uuid="856aa038-853f-42e2-acf7-6e7b02dbe294"
8027 wsmap="managed"
8028 >
8029 <desc>
8030 The IProgress interface is used to track and control
8031 asynchronous tasks within VirtualBox.
8032
8033 An instance of this is returned every time VirtualBox starts
8034 an asynchronous task (in other words, a separate thread) which
8035 continues to run after a method call returns. For example,
8036 <link to="IConsole::saveState" />, which saves the state of
8037 a running virtual machine, can take a long time to complete.
8038 To be able to display a progress bar, a user interface such as
8039 the VirtualBox graphical user interface can use the IProgress
8040 object returned by that method.
8041
8042 Note that IProgress is a "read-only" interface in the sense
8043 that only the VirtualBox internals behind the Main API can
8044 create and manipulate progress objects, whereas client code
8045 can only use the IProgress object to monitor a task's
8046 progress and, if <link to="#cancelable" /> is @c true,
8047 cancel the task by calling <link to="#cancel" />.
8048
8049 A task represented by IProgress consists of either one or
8050 several sub-operations that run sequentially, one by one (see
8051 <link to="#operation" /> and <link to="#operationCount" />).
8052 Every operation is identified by a number (starting from 0)
8053 and has a separate description.
8054
8055 You can find the individual percentage of completion of the current
8056 operation in <link to="#operationPercent" /> and the
8057 percentage of completion of the task as a whole
8058 in <link to="#percent" />.
8059
8060 Similarly, you can wait for the completion of a particular
8061 operation via <link to="#waitForOperationCompletion" /> or
8062 for the completion of the whole task via
8063 <link to="#waitForCompletion" />.
8064 </desc>
8065
8066 <attribute name="id" type="uuid" mod="string" readonly="yes">
8067 <desc>ID of the task.</desc>
8068 </attribute>
8069
8070 <attribute name="description" type="wstring" readonly="yes">
8071 <desc>Description of the task.</desc>
8072 </attribute>
8073
8074 <attribute name="initiator" type="$unknown" readonly="yes">
8075 <desc>Initiator of the task.</desc>
8076 </attribute>
8077
8078 <attribute name="cancelable" type="boolean" readonly="yes">
8079 <desc>Whether the task can be interrupted.</desc>
8080 </attribute>
8081
8082 <attribute name="percent" type="unsigned long" readonly="yes">
8083 <desc>
8084 Current progress value of the task as a whole, in percent.
8085 This value depends on how many operations are already complete.
8086 Returns 100 if <link to="#completed" /> is @c true.
8087 </desc>
8088 </attribute>
8089
8090 <attribute name="timeRemaining" type="long" readonly="yes">
8091 <desc>
8092 Estimated remaining time until the task completes, in
8093 seconds. Returns 0 once the task has completed; returns -1
8094 if the remaining time cannot be computed, in particular if
8095 the current progress is 0.
8096
8097 Even if a value is returned, the estimate will be unreliable
8098 for low progress values. It will become more reliable as the
8099 task progresses; it is not recommended to display an ETA
8100 before at least 20% of a task have completed.
8101 </desc>
8102 </attribute>
8103
8104 <attribute name="completed" type="boolean" readonly="yes">
8105 <desc>Whether the task has been completed.</desc>
8106 </attribute>
8107
8108 <attribute name="canceled" type="boolean" readonly="yes">
8109 <desc>Whether the task has been canceled.</desc>
8110 </attribute>
8111
8112 <attribute name="resultCode" type="long" readonly="yes">
8113 <desc>
8114 Result code of the progress task.
8115 Valid only if <link to="#completed"/> is @c true.
8116 </desc>
8117 </attribute>
8118
8119 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
8120 <desc>
8121 Extended information about the unsuccessful result of the
8122 progress operation. May be @c null if no extended information
8123 is available.
8124 Valid only if <link to="#completed"/> is @c true and
8125 <link to="#resultCode"/> indicates a failure.
8126 </desc>
8127 </attribute>
8128
8129 <attribute name="operationCount" type="unsigned long" readonly="yes">
8130 <desc>
8131 Number of sub-operations this task is divided into.
8132 Every task consists of at least one suboperation.
8133 </desc>
8134 </attribute>
8135
8136 <attribute name="operation" type="unsigned long" readonly="yes">
8137 <desc>Number of the sub-operation being currently executed.</desc>
8138 </attribute>
8139
8140 <attribute name="operationDescription" type="wstring" readonly="yes">
8141 <desc>
8142 Description of the sub-operation being currently executed.
8143 </desc>
8144 </attribute>
8145
8146 <attribute name="operationPercent" type="unsigned long" readonly="yes">
8147 <desc>Progress value of the current sub-operation only, in percent.</desc>
8148 </attribute>
8149
8150 <attribute name="timeout" type="unsigned long">
8151 <desc>
8152 When non-zero, this specifies the number of milliseconds after which
8153 the operation will automatically be canceled. This can only be set on
8154 cancelable objects.
8155 </desc>
8156 </attribute>
8157
8158 <method name="setCurrentOperationProgress">
8159 <desc>Internal method, not to be called externally.</desc>
8160 <param name="percent" type="unsigned long" dir="in" />
8161 </method>
8162 <method name="setNextOperation">
8163 <desc>Internal method, not to be called externally.</desc>
8164 <param name="nextOperationDescription" type="wstring" dir="in" />
8165 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8166 </method>
8167
8168 <method name="waitForCompletion">
8169 <desc>
8170 Waits until the task is done (including all sub-operations)
8171 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8172
8173 <result name="VBOX_E_IPRT_ERROR">
8174 Failed to wait for task completion.
8175 </result>
8176 </desc>
8177
8178 <param name="timeout" type="long" dir="in">
8179 <desc>
8180 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8181 </desc>
8182 </param>
8183 </method>
8184
8185 <method name="waitForOperationCompletion">
8186 <desc>
8187 Waits until the given operation is done with a given timeout in
8188 milliseconds; specify -1 for an indefinite wait.
8189
8190 <result name="VBOX_E_IPRT_ERROR">
8191 Failed to wait for operation completion.
8192 </result>
8193
8194 </desc>
8195 <param name="operation" type="unsigned long" dir="in">
8196 <desc>
8197 Number of the operation to wait for.
8198 Must be less than <link to="#operationCount"/>.
8199 </desc>
8200 </param>
8201 <param name="timeout" type="long" dir="in">
8202 <desc>
8203 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8204 </desc>
8205 </param>
8206 </method>
8207
8208 <method name="cancel">
8209 <desc>
8210 Cancels the task.
8211 <note>
8212 If <link to="#cancelable"/> is @c false, then this method will fail.
8213 </note>
8214
8215 <result name="VBOX_E_INVALID_OBJECT_STATE">
8216 Operation cannot be canceled.
8217 </result>
8218
8219 </desc>
8220 </method>
8221
8222 </interface>
8223
8224 <!--
8225 // ISnapshot
8226 /////////////////////////////////////////////////////////////////////////
8227 -->
8228
8229 <interface
8230 name="ISnapshot" extends="$unknown"
8231 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8232 wsmap="managed"
8233 >
8234 <desc>
8235 The ISnapshot interface represents a snapshot of the virtual
8236 machine.
8237
8238 Together with the differencing media that are created
8239 when a snapshot is taken, a machine can be brought back to
8240 the exact state it was in when the snapshot was taken.
8241
8242 The ISnapshot interface has no methods, only attributes; snapshots
8243 are controlled through methods of the <link to="IConsole" /> interface
8244 which also manage the media associated with the snapshot.
8245 The following operations exist:
8246
8247 <ul>
8248 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8249 by creating new, empty differencing images for the machine's
8250 media and saving the VM settings and (if the VM is running)
8251 the current VM state in the snapshot.
8252
8253 The differencing images will then receive all data written to
8254 the machine's media, while their parent (base) images
8255 remain unmodified after the snapshot has been taken (see
8256 <link to="IMedium" /> for details about differencing images).
8257 This simplifies restoring a machine to the state of a snapshot:
8258 only the differencing images need to be deleted.
8259
8260 The current machine state is not changed by taking a snapshot.
8261 If the machine is running, it will resume execution after the
8262 snapshot has been taken.
8263 </li>
8264
8265 <li><link to="IConsole::restoreSnapshot"/>: this goes back to
8266 a previous snapshot. This resets the machine's state to that of
8267 the previous snapshot by deleting the differencing image of each
8268 of the machine's media and setting the machine's settings
8269 and state to the state that was saved in the snapshot (if any).
8270
8271 This destroys the machine's current state.
8272 </li>
8273
8274 <li><link to="IConsole::deleteSnapshot"/>: deletes a snapshot
8275 without affecting the current machine state.
8276
8277 This does not change the machine, but instead frees the resources
8278 allocated when the snapshot was taken: the settings and machine state
8279 is deleted (if any), and the snapshot's differencing image for each
8280 of the machine's media gets merged with its parent image.
8281
8282 Neither the current machine state nor other snapshots are affected
8283 by this operation, except that parent media will be modified
8284 to contain the disk data associated with the snapshot being deleted.
8285 </li>
8286 </ul>
8287
8288 Each snapshot contains the settings of the virtual machine (hardware
8289 configuration etc.). In addition, if the machine was running when the
8290 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8291 the current VM state is saved in the snapshot (similarly to what happens
8292 when a VM's state is saved). The snapshot is then said to
8293 be <i>online</i> because when restoring it, the VM will be running.
8294
8295 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8296 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8297
8298 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8299 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8300 it then contains a so-called "zero execution state", representing a
8301 machine that is powered off.
8302
8303 <h3>Snapshot branches and the "current" snapshot</h3>
8304
8305 Snapshots can be chained, whereby every next snapshot is based on the
8306 previous one. This chaining is related to medium branching
8307 (see the <link to="IMedium"/> description) in that every time
8308 a new snapshot is created, a new differencing medium is implicitly
8309 created for all normal media attached to the machine.
8310
8311 Each virtual machine has a "current snapshot", identified by
8312 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8313 to the last snapshot in the chain. In a future version of VirtualBox,
8314 it will be possible to reset a machine's current state to that of an
8315 earlier snapshot without deleting the current state so that it will be
8316 possible to create alternative snapshot paths in a snapshot tree.
8317
8318 In the current implementation, multiple snapshot branches within one
8319 virtual machine are not allowed. Every machine has a single branch,
8320 and <link to="IConsole::takeSnapshot"/> operation adds a new
8321 snapshot to the top of that branch.
8322 </desc>
8323
8324 <attribute name="id" type="uuid" mod="string" readonly="yes">
8325 <desc>UUID of the snapshot.</desc>
8326 </attribute>
8327
8328 <attribute name="name" type="wstring">
8329 <desc>Short name of the snapshot.</desc>
8330 </attribute>
8331
8332 <attribute name="description" type="wstring">
8333 <desc>Optional description of the snapshot.</desc>
8334 </attribute>
8335
8336 <attribute name="timeStamp" type="long long" readonly="yes">
8337 <desc>
8338 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8339 </desc>
8340 </attribute>
8341
8342 <attribute name="online" type="boolean" readonly="yes">
8343 <desc>
8344 @c true if this snapshot is an online snapshot and @c false otherwise.
8345
8346 When this attribute is @c true, the
8347 <link to="IMachine::stateFilePath"/> attribute of the
8348 <link to="#machine"/> object associated with this snapshot
8349 will point to the saved state file. Otherwise, it will be
8350 an empty string.
8351 </desc>
8352 </attribute>
8353
8354 <attribute name="machine" type="IMachine" readonly="yes">
8355 <desc>
8356 Virtual machine this snapshot is taken on. This object
8357 stores all settings the machine had when taking this snapshot.
8358 <note>
8359 The returned machine object is immutable, i.e. no
8360 any settings can be changed.
8361 </note>
8362 </desc>
8363 </attribute>
8364
8365 <attribute name="parent" type="ISnapshot" readonly="yes">
8366 <desc>
8367 Parent snapshot (a snapshot this one is based on), or
8368 @c null if the snapshot has no parent (i.e. is the first snapshot).
8369 </desc>
8370 </attribute>
8371
8372 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8373 <desc>
8374 Child snapshots (all snapshots having this one as a parent).
8375 </desc>
8376 </attribute>
8377
8378 </interface>
8379
8380
8381 <!--
8382 // IMedium
8383 /////////////////////////////////////////////////////////////////////////
8384 -->
8385
8386 <enum
8387 name="MediumState"
8388 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8389 >
8390 <desc>
8391 Virtual medium state.
8392 <see>IMedium</see>
8393 </desc>
8394
8395 <const name="NotCreated" value="0">
8396 <desc>
8397 Associated medium storage does not exist (either was not created yet or
8398 was deleted).
8399 </desc>
8400 </const>
8401 <const name="Created" value="1">
8402 <desc>
8403 Associated storage exists and accessible; this gets set if the
8404 accessibility check performed by <link to="IMedium::refreshState" />
8405 was successful.
8406 </desc>
8407 </const>
8408 <const name="LockedRead" value="2">
8409 <desc>
8410 Medium is locked for reading (see <link to="IMedium::lockRead"/>),
8411 no data modification is possible.
8412 </desc>
8413 </const>
8414 <const name="LockedWrite" value="3">
8415 <desc>
8416 Medium is locked for writing (see <link to="IMedium::lockWrite"/>),
8417 no concurrent data reading or modification is possible.
8418 </desc>
8419 </const>
8420 <const name="Inaccessible" value="4">
8421 <desc>
8422 Medium accessiblity check (see <link to="IMedium::refreshState" />) has
8423 not yet been performed, or else, associated medium storage is not
8424 accessible. In the first case, <link to="IMedium::lastAccessError"/>
8425 is empty, in the second case, it describes the error that occured.
8426 </desc>
8427 </const>
8428 <const name="Creating" value="5">
8429 <desc>
8430 Associated medium storage is being created.
8431 </desc>
8432 </const>
8433 <const name="Deleting" value="6">
8434 <desc>
8435 Associated medium storage is being deleted.
8436 </desc>
8437 </const>
8438 </enum>
8439
8440 <enum
8441 name="MediumType"
8442 uuid="46bf1fd4-ad86-4ded-8c49-28bd2d148e5a"
8443 >
8444 <desc>
8445 Virtual medium type.
8446 <see>IMedium</see>
8447 </desc>
8448
8449 <const name="Normal" value="0">
8450 <desc>
8451 Normal medium (attached directly or indirectly, preserved
8452 when taking snapshots).
8453 </desc>
8454 </const>
8455 <const name="Immutable" value="1">
8456 <desc>
8457 Immutable medium (attached indirectly, changes are wiped out
8458 the next time the virtual machine is started).
8459 </desc>
8460 </const>
8461 <const name="Writethrough" value="2">
8462 <desc>
8463 Write through medium (attached directly, ignored when
8464 taking snapshots).
8465 </desc>
8466 </const>
8467 <const name="Shareable" value="3">
8468 <desc>
8469 Allow using this medium concurrently by several machines.
8470 <note>This is a stub value. Not usable until this note is removed.</note>
8471 </desc>
8472 </const>
8473 </enum>
8474
8475 <enum
8476 name="MediumVariant"
8477 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8478 >
8479 <desc>
8480 Virtual medium image variant. More than one flag may be set.
8481 <see>IMedium</see>
8482 </desc>
8483
8484 <const name="Standard" value="0">
8485 <desc>
8486 No particular variant requested, results in using the backend default.
8487 </desc>
8488 </const>
8489 <const name="VmdkSplit2G" value="0x01">
8490 <desc>
8491 VMDK image split in chunks of less than 2GByte.
8492 </desc>
8493 </const>
8494 <const name="VmdkStreamOptimized" value="0x04">
8495 <desc>
8496 VMDK streamOptimized image. Special import/export format which is
8497 read-only/append-only.
8498 </desc>
8499 </const>
8500 <const name="VmdkESX" value="0x08">
8501 <desc>
8502 VMDK format variant used on ESX products.
8503 </desc>
8504 </const>
8505 <const name="Fixed" value="0x10000">
8506 <desc>
8507 Fixed image. Only allowed for base images.
8508 </desc>
8509 </const>
8510 <const name="Diff" value="0x20000">
8511 <desc>
8512 Fixed image. Only allowed for base images.
8513 </desc>
8514 </const>
8515 </enum>
8516
8517 <interface
8518 name="IMediumAttachment" extends="$unknown"
8519 uuid="e58eb3eb-8627-428b-bdf8-34487c848de5"
8520 wsmap="struct"
8521 >
8522 <desc>
8523 The IMediumAttachment interface represents the attachment
8524 of a storage medium to a virtual machine. Each machine contains
8525 an array of its medium attachments in <link to="IMachine::mediumAttachments"/>.
8526
8527 Each medium attachment specifies a storage controller as well as a port
8528 and device number. Fixed media (hard disks) will always also specify
8529 an instance of IMedium in <link to="#medium" />, referring to the hard disk
8530 medium. For removeable media, the IMedia instance is optional; it can be
8531 @c null if no media is mounted (see <link to="IMachine::mountMedium" />).
8532 </desc>
8533
8534 <attribute name="medium" type="IMedium" readonly="yes">
8535 <desc>Medium object associated with this attachment; it
8536 can be @c null for removable devices.</desc>
8537 </attribute>
8538
8539 <attribute name="controller" type="wstring" readonly="yes">
8540 <desc>Name of the storage controller of this attachment; this
8541 refers to one of the controllers in <link to="IMachine::storageControllers" />
8542 by name.</desc>
8543 </attribute>
8544
8545 <attribute name="port" type="long" readonly="yes">
8546 <desc>Port number of this attachment.
8547 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8548 </desc>
8549 </attribute>
8550
8551 <attribute name="device" type="long" readonly="yes">
8552 <desc>Device slot number of this attachment.
8553 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8554 </desc>
8555 </attribute>
8556
8557 <attribute name="type" type="DeviceType" readonly="yes">
8558 <desc>Device type of this attachment.</desc>
8559 </attribute>
8560
8561 <attribute name="passthrough" type="boolean" readonly="yes">
8562 <desc>Pass I/O requests through to a device on the host.</desc>
8563 </attribute>
8564
8565 </interface>
8566
8567 <interface
8568 name="IMedium" extends="$unknown"
8569 uuid="1d578f43-5ef1-4415-b556-7592d3ccdc8f"
8570 wsmap="managed"
8571 >
8572 <desc>
8573 The IMedium interface represents virtual storage for a machine's
8574 hard disks, CD/DVD or floppy drives. It will typically represent
8575 a disk image on the host, for example a VDI or VMDK file representing
8576 a virtual hard disk, or an ISO or RAW file representing virtual
8577 removable media, but can also point to a network location (e.g.
8578 for iSCSI targets).
8579
8580 Instances of IMedium are connected to virtual machines by way of
8581 medium attachments (see <link to="IMediumAttachment" />), which link
8582 the storage medium to a particular device slot of a storage controller
8583 of the virtual machine.
8584 In the VirtualBox API, virtual storage is therefore always represented
8585 by the following chain of object links:
8586
8587 <ul>
8588 <li><link to="IMachine::storageControllers"/> contains an array of
8589 storage controllers (IDE, SATA, SCSI, SAS or a floppy controller;
8590 these are instances of <link to="IStorageController"/>).</li>
8591 <li><link to="IMachine::mediumAttachments"/> contains an array of
8592 medium attachments (instances of <link to="IMediumAttachment"/>),
8593 each containing a storage controller from the above array, a
8594 port/device specification, and an instance of IMedium representing
8595 the medium storage (image file).
8596
8597 For removable media, the storage medium is optional; a medium
8598 attachment with no medium represents a CD/DVD or floppy drive
8599 with no medium inserted. By contrast, hard disk attachments
8600 will always have an IMedium object attached.</li>
8601 <li>Each IMedium in turn points to a storage unit (such as a file
8602 on the host computer or a network resource) that holds actual
8603 data. This location is represented by the <link to="#location"/>
8604 attribute.</li>
8605 </ul>
8606
8607 Existing media are opened using the following methods, depending on the
8608 media type:
8609 <ul>
8610 <li><link to="IVirtualBox::openHardDisk"/></li>
8611 <li><link to="IVirtualBox::openDVDImage"/></li>
8612 <li><link to="IVirtualBox::openFloppyImage"/></li>
8613 </ul>
8614
8615 New hard disk media can be created with the VirtualBox API using the
8616 <link to="IVirtualBox::createHardDisk"/> method.
8617
8618 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8619 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8620 type in a regular file.
8621
8622 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8623 drive; in that case the <link to="#id" /> attribute contains the UUID of
8624 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8625
8626 <h3>Known media</h3>
8627
8628 When an existing medium is opened for the first time, it is automatically
8629 remembered by the given VirtualBox installation or, in other words, becomes
8630 a <i>known medium</i>. Known media are stored in the media
8631 registry transparently maintained by VirtualBox and stored in settings
8632 files so that this registry is preserved when VirtualBox is not running.
8633
8634 Newly created virtual media are remembered only when the associated
8635 storage unit is actually created.
8636
8637 All known media can be enumerated using
8638 <link to="IVirtualBox::hardDisks"/>,
8639 <link to="IVirtualBox::DVDImages"/> and
8640 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8641 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8642 and similar methods or by location using
8643 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8644
8645 Only known media can be attached to virtual machines.
8646
8647 Removing known media from the media registry is performed when the given
8648 medium is closed using the <link to="#close"/> method or when its
8649 associated storage unit is deleted.
8650
8651 <h3>Accessibility checks</h3>
8652
8653 VirtualBox defers media accessibility checks until the <link to="#refreshState" />
8654 method is called explicitly on a medium. This is done to make the VirtualBox object
8655 ready for serving requests as fast as possible and let the end-user
8656 application decide if it needs to check media accessibility right away or not.
8657
8658 As a result, when VirtualBox starts up (e.g. the VirtualBox
8659 object gets created for the first time), all known media are in the
8660 "Inaccessible" state, but the value of the <link to="#lastAccessError"/>
8661 attribute is an empty string because no actual accessibility check has
8662 been made yet.
8663
8664 After calling <link to="#refreshState" />, a medium is considered
8665 <i>accessible</i> if its storage unit can be read. In that case, the
8666 <link to="#state"/> attribute has a value of "Created". If the storage
8667 unit cannot be read (for example, because it is located on a disconnected
8668 network resource, or was accidentally deleted outside VirtualBox),
8669 the medium is considered <i>inaccessible</i>, which is indicated by the
8670 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8671 obtained by reading the <link to="#lastAccessError"/> attribute.
8672
8673 <h3>Medium types</h3>
8674
8675 There are three types of medium behavior (see <link to="MediumType" />):
8676 "normal", "immutable" and "writethrough", represented by the
8677 <link to="#type"/> attribute. The type of the medium defines how the
8678 medium is attached to a virtual machine and what happens when a
8679 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8680 attached medium is taken. At the moment DVD and floppy media are always
8681 of type "writethrough".
8682
8683 All media can be also divided in two groups: <i>base</i> media and
8684 <i>differencing</i> media. A base medium contains all sectors of the
8685 medium data in its own storage and therefore can be used independently.
8686 In contrast, a differencing mediun is a "delta" to some other medium and
8687 contains only those sectors which differ from that other medium, which is
8688 then called a <i>parent</i>. The differencing medium is said to be
8689 <i>linked to</i> that parent. The parent may be itself a differencing
8690 medium, thus forming a chain of linked media. The last element in that
8691 chain must always be a base medium. Note that several differencing
8692 media may be linked to the same parent medium.
8693
8694 Differencing media can be distinguished from base media by querying the
8695 <link to="#parent"/> attribute: base media do not have parents they would
8696 depend on, so the value of this attribute is always @c null for them.
8697 Using this attribute, it is possible to walk up the medium tree (from the
8698 child medium to its parent). It is also possible to walk down the tree
8699 using the <link to="#children"/> attribute.
8700
8701 Note that the type of all differencing media is "Normal"; all other
8702 values are meaningless for them. Base media may be of any type.
8703
8704 <h3>Creating hard disks</h3>
8705
8706 New base hard disks are created using
8707 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8708 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8709 disks are usually implicitly created by VirtualBox when needed but may
8710 also be created explicitly using <link to="#createDiffStorage"/>.
8711
8712 After the hard disk is successfully created (including the storage unit)
8713 or opened, it becomes a known hard disk (remembered in the internal media
8714 registry). Known hard disks can be attached to a virtual machine, accessed
8715 through <link to="IVirtualBox::getHardDisk"/> and
8716 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8717 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8718
8719 The following methods, besides <link to="IMedium::close"/>,
8720 automatically remove the hard disk from the media registry:
8721 <ul>
8722 <li><link to="#deleteStorage"/></li>
8723 <li><link to="#mergeTo"/></li>
8724 </ul>
8725
8726 If the storage unit of the hard disk is a regular file in the host's
8727 file system then the rules stated in the description of the
8728 <link to="IMedium::location"/> attribute apply when setting its value. In
8729 addition, a plain file name without any path may be given, in which case
8730 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8731 folder</link> will be prepended to it.
8732
8733 <h4>Automatic composition of the file name part</h4>
8734
8735 Another extension to the <link to="IMedium::location"/> attribute is that
8736 there is a possibility to cause VirtualBox to compose a unique value for
8737 the file name part of the location using the UUID of the hard disk. This
8738 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
8739 e.g. before the storage unit is created, and works as follows. You set the
8740 value of the <link to="IMedium::location"/> attribute to a location
8741 specification which only contains the path specification but not the file
8742 name part and ends with either a forward slash or a backslash character.
8743 In response, VirtualBox will generate a new UUID for the hard disk and
8744 compose the file name using the following pattern:
8745 <pre>
8746 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8747 </pre>
8748 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8749 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8750 is the default extension for the storage format of this hard disk. After
8751 that, you may call any of the methods that create a new hard disk storage
8752 unit and they will use the generated UUID and file name.
8753
8754 <h3>Attaching Hard Disks</h3>
8755
8756 Hard disks are attached to virtual machines using the
8757 <link to="IMachine::attachDevice"/> method and detached using the
8758 <link to="IMachine::detachDevice"/> method. Depending on their
8759 <link to="#type"/>, hard disks are attached either
8760 <i>directly</i> or <i>indirectly</i>.
8761
8762 When a hard disk is being attached directly, it is associated with the
8763 virtual machine and used for hard disk operations when the machine is
8764 running. When a hard disk is being attached indirectly, a new differencing
8765 hard disk linked to it is implicitly created and this differencing hard
8766 disk is associated with the machine and used for hard disk operations.
8767 This also means that if <link to="IMachine::attachDevice"/> performs
8768 a direct attachment then the same hard disk will be returned in response
8769 to the subsequent <link to="IMachine::getMedium"/> call; however if
8770 an indirect attachment is performed then
8771 <link to="IMachine::getMedium"/> will return the implicitly created
8772 differencing hard disk, not the original one passed to <link
8773 to="IMachine::attachDevice"/>. In detail:
8774
8775 <ul>
8776 <li><b>Normal base</b> hard disks that do not have children (i.e.
8777 differencing hard disks linked to them) and that are not already
8778 attached to virtual machines in snapshots are attached <b>directly</b>.
8779 Otherwise, they are attached <b>indirectly</b> because having
8780 dependent children or being part of the snapshot makes it impossible
8781 to modify hard disk contents without breaking the integrity of the
8782 dependent party. The <link to="#readOnly"/> attribute allows to
8783 quickly determine the kind of the attachment for the given hard
8784 disk. Note that if a normal base hard disk is to be indirectly
8785 attached to a virtual machine with snapshots then a special
8786 procedure called <i>smart attachment</i> is performed (see below).</li>
8787 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
8788 they are attached <b>directly</b> if they do not have children and are
8789 not attached to virtual machines in snapshots, and <b>indirectly</b>
8790 otherwise. Note that the smart attachment procedure is never performed
8791 for differencing hard disks.</li>
8792 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
8793 they are designed to be non-writable. If an immutable hard disk is
8794 attached to a virtual machine with snapshots then a special
8795 procedure called smart attachment is performed (see below).</li>
8796 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
8797 also as designed. This also means that writethrough hard disks cannot
8798 have other hard disks linked to them at all.</li>
8799 </ul>
8800
8801 Note that the same hard disk, regardless of its type, may be attached to
8802 more than one virtual machine at a time. In this case, the machine that is
8803 started first gains exclusive access to the hard disk and attempts to
8804 start other machines having this hard disk attached will fail until the
8805 first machine is powered down.
8806
8807 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8808 that the given hard disk remains associated with the given machine after a
8809 successful <link to="IMachine::detachDevice"/> call until
8810 <link to="IMachine::saveSettings"/> is called to save all changes to
8811 machine settings to disk. This deferring is necessary to guarantee that
8812 the hard disk configuration may be restored at any time by a call to
8813 <link to="IMachine::discardSettings"/> before the settings
8814 are saved (committed).
8815
8816 Note that if <link to="IMachine::discardSettings"/> is called after
8817 indirectly attaching some hard disks to the machine but before a call to
8818 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8819 all differencing hard disks implicitly created by
8820 <link to="IMachine::attachDevice"/> for these indirect attachments.
8821 Such implicitly created hard disks will also be immediately deleted when
8822 detached explicitly using the <link to="IMachine::detachDevice"/>
8823 call if it is made before <link to="IMachine::saveSettings"/>. This
8824 implicit deletion is safe because newly created differencing hard
8825 disks do not contain any user data.
8826
8827 However, keep in mind that detaching differencing hard disks that were
8828 implicitly created by <link to="IMachine::attachDevice"/>
8829 before the last <link to="IMachine::saveSettings"/> call will
8830 <b>not</b> implicitly delete them as they may already contain some data
8831 (for example, as a result of virtual machine execution). If these hard
8832 disks are no more necessary, the caller can always delete them explicitly
8833 using <link to="#deleteStorage"/> after they are actually de-associated
8834 from this machine by the <link to="IMachine::saveSettings"/> call.
8835
8836 <h3>Smart Attachment</h3>
8837
8838 When normal base or immutable hard disks are indirectly attached to a
8839 virtual machine then some additional steps are performed to make sure the
8840 virtual machine will have the most recent "view" of the hard disk being
8841 attached. These steps include walking through the machine's snapshots
8842 starting from the current one and going through ancestors up to the first
8843 snapshot. Hard disks attached to the virtual machine in all
8844 of the encountered snapshots are checked whether they are descendants of
8845 the given normal base or immutable hard disk. The first found child (which
8846 is the differencing hard disk) will be used instead of the normal base or
8847 immutable hard disk as a parent for creating a new differencing hard disk
8848 that will be actually attached to the machine. And only if no descendants
8849 are found or if the virtual machine does not have any snapshots then the
8850 normal base or immutable hard disk will be used itself as a parent for
8851 this differencing hard disk.
8852
8853 It is easier to explain what smart attachment does using the
8854 following example:
8855 <pre>
8856BEFORE attaching B.vdi: AFTER attaching B.vdi:
8857
8858Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8859 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8860 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8861 Snapshot 4 (none) Snapshot 4 (none)
8862 CurState (none) CurState (D3->D2.vdi)
8863
8864 NOT
8865 ...
8866 CurState (D3->B.vdi)
8867 </pre>
8868 The first column is the virtual machine configuration before the base hard
8869 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8870 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8871 mean that the hard disk that is actually attached to the machine is a
8872 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8873 another hard disk, <tt>B.vdi</tt>.
8874
8875 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8876 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8877 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8878 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8879 it cannot be attached directly and needs an indirect attachment (i.e.
8880 implicit creation of a new differencing hard disk). Due to the smart
8881 attachment procedure, the new differencing hard disk
8882 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8883 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8884 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8885 machine.
8886
8887 Note that if there is more than one descendant hard disk of the given base
8888 hard disk found in a snapshot, and there is an exact device, channel and
8889 bus match, then this exact match will be used. Otherwise, the youngest
8890 descendant will be picked up.
8891
8892 There is one more important aspect of the smart attachment procedure which
8893 is not related to snapshots at all. Before walking through the snapshots
8894 as described above, the backup copy of the current list of hard disk
8895 attachment is searched for descendants. This backup copy is created when
8896 the hard disk configuration is changed for the first time after the last
8897 <link to="IMachine::saveSettings"/> call and used by
8898 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8899 changes. When such a descendant is found in this backup copy, it will be
8900 simply re-attached back, without creating a new differencing hard disk for
8901 it. This optimization is necessary to make it possible to re-attach the
8902 base or immutable hard disk to a different bus, channel or device slot
8903 without losing the contents of the differencing hard disk actually
8904 attached to the machine in place of it.
8905 </desc>
8906
8907 <attribute name="id" type="uuid" mod="string" readonly="yes">
8908 <desc>
8909 UUID of the medium. For a newly created medium, this value is a randomly
8910 generated UUID.
8911
8912 <note>
8913 For media in one of MediumState_NotCreated, MediumState_Creating or
8914 MediumState_Deleting states, the value of this property is undefined
8915 and will most likely be an empty UUID.
8916 </note>
8917 </desc>
8918 </attribute>
8919
8920 <attribute name="description" type="wstring">
8921 <desc>
8922 Optional description of the medium. For a newly created medium the value
8923 of this attribute is an empty string.
8924
8925 Medium types that don't support this attribute will return E_NOTIMPL in
8926 attempt to get or set this attribute's value.
8927
8928 <note>
8929 For some storage types, reading this attribute may return an outdated
8930 (last known) value when <link to="#state"/> is <link
8931 to="MediumState_Inaccessible"/> or <link
8932 to="MediumState_LockedWrite"/> because the value of this attribute is
8933 stored within the storage unit itself. Also note that changing the
8934 attribute value is not possible in such case, as well as when the
8935 medium is the <link to="MediumState_LockedRead"/> state.
8936 </note>
8937 </desc>
8938 </attribute>
8939
8940 <attribute name="state" type="MediumState" readonly="yes">
8941 <desc>
8942 Returns the current medium state, which is the last state set by
8943 the accessibility check performed by <link to="#refreshState"/>.
8944 If that method has not yet been called on the medium, the state
8945 is "Inaccessible"; as opposed to truly inaccessible media, the
8946 value of <link to="#lastAccessError"/> will be an empty string in
8947 that case.
8948
8949 <note>As of version 3.1, this no longer performs an accessibility check
8950 automatically; call <link to="#refreshState"/> for that.
8951 </note>
8952 </desc>
8953 </attribute>
8954
8955 <attribute name="location" type="wstring">
8956 <desc>
8957 Location of the storage unit holding medium data.
8958
8959 The format of the location string is medium type specific. For medium
8960 types using regular files in a host's file system, the location
8961 string is the full file name.
8962
8963 Some medium types may support changing the storage unit location by
8964 simply changing the value of this property. If this operation is not
8965 supported, the implementation will return E_NOTIMPL in attempt to set
8966 this attribute's value.
8967
8968 When setting a value of the location attribute which is a regular file
8969 in the host's file system, the given file name may be either relative to
8970 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8971 absolute. Note that if the given location specification does not contain
8972 the file extension part then a proper default extension will be
8973 automatically appended by the implementation depending on the medium type.
8974 </desc>
8975 </attribute>
8976
8977 <attribute name="name" type="wstring" readonly="yes">
8978 <desc>
8979 Name of the storage unit holding medium data.
8980
8981 The returned string is a short version of the <link to="#location"/>
8982 attribute that is suitable for representing the medium in situations
8983 where the full location specification is too long (such as lists
8984 and comboboxes in GUI frontends). This string is also used by frontends
8985 to sort the media list alphabetically when needed.
8986
8987 For example, for locations that are regular files in the host's file
8988 system, the value of this attribute is just the file name (+ extension),
8989 without the path specification.
8990
8991 Note that as opposed to the <link to="#location"/> attribute, the name
8992 attribute will not necessary be unique for a list of media of the
8993 given type and format.
8994 </desc>
8995 </attribute>
8996
8997 <attribute name="deviceType" type="DeviceType" readonly="yes">
8998 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
8999 medium.</desc>
9000 </attribute>
9001
9002 <attribute name="hostDrive" type="boolean" readonly="yes">
9003 <desc>True if this corresponds to a drive on the host.</desc>
9004 </attribute>
9005
9006 <attribute name="size" type="unsigned long long" readonly="yes">
9007 <desc>
9008 Physical size of the storage unit used to hold medium data (in bytes).
9009
9010 <note>
9011 For media whose <link to="#state"/> is <link
9012 to="MediumState_Inaccessible"/>, the value of this property is the
9013 last known size. For <link to="MediumState_NotCreated"/> media,
9014 the returned value is zero.
9015 </note>
9016 </desc>
9017 </attribute>
9018
9019 <attribute name="format" type="wstring" readonly="yes">
9020 <desc>
9021 Storage format of this medium.
9022
9023 The value of this attribute is a string that specifies a backend used
9024 to store medium data. The storage format is defined when you create a
9025 new medium or automatically detected when you open an existing medium,
9026 and cannot be changed later.
9027
9028 The list of all storage formats supported by this VirtualBox
9029 installation can be obtained using
9030 <link to="ISystemProperties::mediumFormats"/>.
9031 </desc>
9032 </attribute>
9033
9034 <attribute name="mediumFormat" type="IMediumFormat" readonly="yes">
9035 <desc>
9036 Storage medium format object corresponding to this medium.
9037
9038 The value of this attribute is a reference to the medium format object
9039 that specifies the backend properties used to store medium data. The
9040 storage format is defined when you create a new medium or automatically
9041 detected when you open an existing medium, and cannot be changed later.
9042
9043 <note>@c null is returned if there is no associated medium format
9044 object. This can e.g. happen for medium objects representing host
9045 drives and other special medium objects.</note>
9046 </desc>
9047 </attribute>
9048
9049 <attribute name="type" type="MediumType">
9050 <desc>
9051 Type (role) of this medium.
9052
9053 The following constraints apply when changing the value of this
9054 attribute:
9055 <ul>
9056 <li>If a medium is attached to a virtual machine (either in the
9057 current state or in one of the snapshots), its type cannot be
9058 changed.
9059 </li>
9060 <li>As long as the medium has children, its type cannot be set
9061 to <link to="MediumType_Writethrough"/>.
9062 </li>
9063 <li>The type of all differencing media is
9064 <link to="MediumType_Normal"/> and cannot be changed.
9065 </li>
9066 </ul>
9067
9068 The type of a newly created or opened medium is set to
9069 <link to="MediumType_Normal"/>, except for DVD and floppy media,
9070 which have a type of <link to="MediumType_Writethrough"/>.
9071 </desc>
9072 </attribute>
9073
9074 <attribute name="parent" type="IMedium" readonly="yes">
9075 <desc>
9076 Parent of this medium (the medium this medium is directly based
9077 on).
9078
9079 Only differencing media have parents. For base (non-differencing)
9080 media, @c null is returned.
9081 </desc>
9082 </attribute>
9083
9084 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
9085 <desc>
9086 Children of this medium (all differencing media directly based
9087 on this medium). A @c null array is returned if this medium
9088 does not have any children.
9089 </desc>
9090 </attribute>
9091
9092 <attribute name="base" type="IMedium" readonly="yes">
9093 <desc>
9094 Base medium of this medium.
9095
9096 If this is a differencing medium, its base medium is the medium
9097 the given medium branch starts from. For all other types of media, this
9098 property returns the medium object itself (i.e. the same object this
9099 property is read on).
9100 </desc>
9101 </attribute>
9102
9103 <attribute name="readOnly" type="boolean" readonly="yes">
9104 <desc>
9105 Returns @c true if this medium is read-only and @c false otherwise.
9106
9107 A medium is considered to be read-only when its contents cannot be
9108 modified without breaking the integrity of other parties that depend on
9109 this medium such as its child media or snapshots of virtual machines
9110 where this medium is attached to these machines. If there are no
9111 children and no such snapshots then there is no dependency and the
9112 medium is not read-only.
9113
9114 The value of this attribute can be used to determine the kind of the
9115 attachment that will take place when attaching this medium to a
9116 virtual machine. If the value is @c false then the medium will
9117 be attached directly. If the value is @c true then the medium
9118 will be attached indirectly by creating a new differencing child
9119 medium for that. See the interface description for more information.
9120
9121 Note that all <link to="MediumType_Immutable">Immutable</link> media
9122 are always read-only while all
9123 <link to="MediumType_Writethrough">Writethrough</link> media are
9124 always not.
9125
9126 <note>
9127 The read-only condition represented by this attribute is related to
9128 the medium type and usage, not to the current
9129 <link to="IMedium::state">medium state</link> and not to the read-only
9130 state of the storage unit.
9131 </note>
9132 </desc>
9133 </attribute>
9134
9135 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9136 <desc>
9137 Logical size of this medium (in megabytes), as reported to the
9138 guest OS running inside the virtual machine this medium is
9139 attached to. The logical size is defined when the medium is created
9140 and cannot be changed later.
9141
9142 <note>
9143 Reading this property on a differencing medium will return the size
9144 of its <link to="#base"/> medium.
9145 </note>
9146 <note>
9147 For media whose state is <link to="#state"/> is <link
9148 to="MediumState_Inaccessible"/>, the value of this property is the
9149 last known logical size. For <link to="MediumState_NotCreated"/>
9150 media, the returned value is zero.
9151 </note>
9152 </desc>
9153 </attribute>
9154
9155 <attribute name="autoReset" type="boolean">
9156 <desc>
9157 Whether this differencing medium will be automatically reset each
9158 time a virtual machine it is attached to is powered up. This
9159 attribute is automatically set to @c true for the last
9160 differencing image of an "immutable" medium (see
9161 <link to="MediumType" />).
9162
9163 See <link to="#reset"/> for more information about resetting
9164 differencing media.
9165
9166 <note>
9167 Reading this property on a base (non-differencing) medium will
9168 always @c false. Changing the value of this property in this
9169 case is not supported.
9170 </note>
9171
9172 <result name="VBOX_E_NOT_SUPPORTED">
9173 This is not a differencing medium (when changing the attribute
9174 value).
9175 </result>
9176 </desc>
9177 </attribute>
9178
9179 <attribute name="lastAccessError" type="wstring" readonly="yes">
9180 <desc>
9181 Text message that represents the result of the last accessibility
9182 check performed by <link to="#refreshState"/>.
9183
9184 An empty string is returned if the last accessibility check
9185 was successful or has not yet been called. As a result, if
9186 <link to="#state" /> is "Inaccessible" and this attribute is empty,
9187 then <link to="#refreshState"/> has yet to be called; this is the
9188 default value of media after VirtualBox initialization.
9189 A non-empty string indicates a failure and should normally describe
9190 a reason of the failure (for example, a file read error).
9191 </desc>
9192 </attribute>
9193
9194 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9195 <desc>
9196 Array of UUIDs of all machines this medium is attached to.
9197
9198 A @c null array is returned if this medium is not attached to any
9199 machine or to any machine's snapshot.
9200
9201 <note>
9202 The returned array will include a machine even if this medium is not
9203 attached to that machine in the current state but attached to it in
9204 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9205 details.
9206 </note>
9207 </desc>
9208 </attribute>
9209
9210 <method name="refreshState">
9211 <desc>
9212 If the current medium state (see <link to="MediumState"/>) is one of
9213 "Created", "Inaccessible" or "LockedRead", then this performs an
9214 accessibility check on the medium and sets the value of the <link to="#state"/>
9215 attribute accordingly; that value is also returned for convenience.
9216
9217 For all other state values, this does not perform a refresh but returns
9218 the state only.
9219
9220 The refresh, if performed, may take a long time (several seconds or even
9221 minutes, depending on the storage unit location and format) because it performs an
9222 accessibility check of the storage unit. This check may cause a significant
9223 delay if the storage unit of the given medium is, for example, a file located
9224 on a network share which is not currently accessible due to connectivity
9225 problems. In that case, the call will not return until a timeout
9226 interval defined by the host OS for this operation expires. For this reason,
9227 it is recommended to never read this attribute on the main UI thread to avoid
9228 making the UI unresponsive.
9229
9230 If the last known state of the medium is "Created" and the accessibility
9231 check fails, then the state would be set to "Inaccessible", and
9232 <link to="#lastAccessError"/> may be used to get more details about the
9233 failure. If the state of the medium is "LockedRead", then it remains the
9234 same, and a non-empty value of <link to="#lastAccessError"/> will
9235 indicate a failed accessibility check in this case.
9236
9237 Note that not all medium states are applicable to all medium types.
9238 </desc>
9239 <param name="state" type="MediumState" dir="return">
9240 <desc>
9241 New medium state.
9242 </desc>
9243 </param>
9244 </method>
9245
9246 <method name="getSnapshotIds">
9247 <desc>
9248 Returns an array of UUIDs of all snapshots of the given machine where
9249 this medium is attached to.
9250
9251 If the medium is attached to the machine in the current state, then the
9252 first element in the array will always be the ID of the queried machine
9253 (i.e. the value equal to the @c machineId argument), followed by
9254 snapshot IDs (if any).
9255
9256 If the medium is not attached to the machine in the current state, then
9257 the array will contain only snapshot IDs.
9258
9259 The returned array may be @c null if this medium is not attached
9260 to the given machine at all, neither in the current state nor in one of
9261 the snapshots.
9262 </desc>
9263 <param name="machineId" type="uuid" mod="string" dir="in">
9264 <desc>
9265 UUID of the machine to query.
9266 </desc>
9267 </param>
9268 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9269 <desc>
9270 Array of snapshot UUIDs of the given machine using this medium.
9271 </desc>
9272 </param>
9273 </method>
9274
9275 <method name="lockRead">
9276 <desc>
9277 Locks this medium for reading.
9278
9279 A read lock is shared: many clients can simultaneously lock the
9280 same medium for reading unless it is already locked for writing (see
9281 <link to="#lockWrite"/>) in which case an error is returned.
9282
9283 When the medium is locked for reading, it cannot be modified
9284 from within VirtualBox. This means that any method that changes
9285 the properties of this medium or contents of the storage unit
9286 will return an error (unless explicitly stated otherwise). That
9287 includes an attempt to start a virtual machine that wants to
9288 write to the the medium.
9289
9290 When the virtual machine is started up, it locks for reading all
9291 media it uses in read-only mode. If some medium cannot be locked
9292 for reading, the startup procedure will fail.
9293 A medium is typically locked for reading while it is used by a running
9294 virtual machine but has a depending differencing image that receives
9295 the actual write operations. This way one base medium can have
9296 multiple child differencing images which can be written to
9297 simultaneously. Read-only media such as DVD and floppy images are
9298 also locked for reading only (so they can be in use by multiple
9299 machines simultaneously).
9300
9301 A medium is also locked for reading when it is the source of a
9302 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9303
9304 The medium locked for reading must be unlocked using the <link
9305 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9306 can be nested and must be followed by the same number of paired
9307 <link to="#unlockRead"/> calls.
9308
9309 This method sets the medium state (see <link to="#state"/>) to
9310 "LockedRead" on success. The medium's previous state must be
9311 one of "Created", "Inaccessible" or "LockedRead".
9312
9313 Locking an inaccessible medium is not an error; this method performs
9314 a logical lock that prevents modifications of this medium through
9315 the VirtualBox API, not a physical file-system lock of the underlying
9316 storage unit.
9317
9318 This method returns the current state of the medium
9319 <i>before</i> the operation.
9320
9321 <result name="VBOX_E_INVALID_OBJECT_STATE">
9322 Invalid medium state (e.g. not created, locked, inaccessible,
9323 creating, deleting).
9324 </result>
9325
9326 </desc>
9327 <param name="state" type="MediumState" dir="return">
9328 <desc>
9329 State of the medium after the operation.
9330 </desc>
9331 </param>
9332 </method>
9333
9334 <method name="unlockRead">
9335 <desc>
9336 Cancels the read lock previously set by <link to="#lockRead"/>.
9337
9338 For both success and failure, this method returns the current state
9339 of the medium <i>after</i> the operation.
9340
9341 See <link to="#lockRead"/> for more details.
9342
9343 <result name="VBOX_E_INVALID_OBJECT_STATE">
9344 Medium not locked for reading.
9345 </result>
9346
9347 </desc>
9348 <param name="state" type="MediumState" dir="return">
9349 <desc>
9350 State of the medium after the operation.
9351 </desc>
9352 </param>
9353 </method>
9354
9355 <method name="lockWrite">
9356 <desc>
9357 Locks this medium for writing.
9358
9359 A write lock, as opposed to <link to="#lockRead"/>, is
9360 exclusive: there may be only one client holding a write lock,
9361 and there may be no read locks while the write lock is held.
9362 As a result, read-locking fails if a write lock is held, and
9363 write-locking fails if either a read or another write lock is held.
9364
9365 When a medium is locked for writing, it cannot be modified
9366 from within VirtualBox, and it is not guaranteed that the values
9367 of its properties are up-to-date. Any method that changes the
9368 properties of this medium or contents of the storage unit will
9369 return an error (unless explicitly stated otherwise).
9370
9371 When a virtual machine is started up, it locks for writing all
9372 media it uses to write data to. If any medium could not be locked
9373 for writing, the startup procedure will fail. If a medium has
9374 differencing images, then while the machine is running, only
9375 the last ("leaf") differencing image is locked for writing,
9376 whereas its parents are locked for reading only.
9377
9378 A medium is also locked for writing when it is the target of a
9379 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9380
9381 The medium locked for writing must be unlocked using the <link
9382 to="#unlockWrite"/> method. Write locks <i>cannot</i> be nested.
9383
9384 This method sets the medium state (see <link to="#state"/>) to
9385 "LockedWrite" on success. The medium's previous state must be
9386 either "Created" or "Inaccessible".
9387
9388 Locking an inaccessible medium is not an error; this method performs
9389 a logical lock that prevents modifications of this medium through
9390 the VirtualBox API, not a physical file-system lock of the underlying
9391 storage unit.
9392
9393 For both, success and failure, this method returns the current
9394 state of the medium <i>before</i> the operation.
9395
9396 <result name="VBOX_E_INVALID_OBJECT_STATE">
9397 Invalid medium state (e.g. not created, locked, inaccessible,
9398 creating, deleting).
9399 </result>
9400
9401 </desc>
9402 <param name="state" type="MediumState" dir="return">
9403 <desc>
9404 State of the medium after the operation.
9405 </desc>
9406 </param>
9407 </method>
9408
9409 <method name="unlockWrite">
9410 <desc>
9411 Cancels the write lock previously set by <link to="#lockWrite"/>.
9412
9413 For both success and failure, this method returns the current
9414 state of the medium <i>after</i> the operation.
9415
9416 See <link to="#lockWrite"/> for more details.
9417
9418 <result name="VBOX_E_INVALID_OBJECT_STATE">
9419 Medium not locked for writing.
9420 </result>
9421
9422 </desc>
9423 <param name="state" type="MediumState" dir="return">
9424 <desc>
9425 State of the medium after the operation.
9426 </desc>
9427 </param>
9428 </method>
9429
9430 <method name="close">
9431 <desc>
9432 Closes this medium.
9433
9434 The medium must not be attached to any known virtual machine
9435 and must not have any known child media, otherwise the
9436 operation will fail.
9437
9438 When the medium is successfully closed, it gets removed from
9439 the list of remembered media, but its storage unit is not
9440 deleted. In particular, this means that this medium can be
9441 later opened again using the <link
9442 to="IVirtualBox::openHardDisk"/> call.
9443
9444 Note that after this method successfully returns, the given medium
9445 object becomes uninitialized. This means that any attempt
9446 to call any of its methods or attributes will fail with the
9447 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9448
9449 <result name="VBOX_E_INVALID_OBJECT_STATE">
9450 Invalid medium state (other than not created, created or
9451 inaccessible).
9452 </result>
9453 <result name="VBOX_E_OBJECT_IN_USE">
9454 Medium attached to virtual machine.
9455 </result>
9456 <result name="VBOX_E_FILE_ERROR">
9457 Settings file not accessible.
9458 </result>
9459 <result name="VBOX_E_XML_ERROR">
9460 Could not parse the settings file.
9461 </result>
9462
9463 </desc>
9464 </method>
9465
9466 <!-- storage methods -->
9467
9468 <method name="getProperty">
9469 <desc>
9470 Returns the value of the custom medium property with the given name.
9471
9472 The list of all properties supported by the given medium format can
9473 be obtained with <link to="IMediumFormat::describeProperties"/>.
9474
9475 Note that if this method returns an empty string in @a value, the
9476 requested property is supported but currently not assigned any value.
9477
9478 <result name="VBOX_E_OBJECT_NOT_FOUND">
9479 Requested property does not exist (not supported by the format).
9480 </result>
9481 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9482 </desc>
9483 <param name="name" type="wstring" dir="in">
9484 <desc>Name of the property to get.</desc>
9485 </param>
9486 <param name="value" type="wstring" dir="return">
9487 <desc>Current property value.</desc>
9488 </param>
9489 </method>
9490
9491 <method name="setProperty">
9492 <desc>
9493 Sets the value of the custom medium property with the given name.
9494
9495 The list of all properties supported by the given medium format can
9496 be obtained with <link to="IMediumFormat::describeProperties"/>.
9497
9498 Note that setting the property value to @c null or an empty string is
9499 equivalent to deleting the existing value. A default value (if it is
9500 defined for this property) will be used by the format backend in this
9501 case.
9502
9503 <result name="VBOX_E_OBJECT_NOT_FOUND">
9504 Requested property does not exist (not supported by the format).
9505 </result>
9506 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9507 </desc>
9508 <param name="name" type="wstring" dir="in">
9509 <desc>Name of the property to set.</desc>
9510 </param>
9511 <param name="value" type="wstring" dir="in">
9512 <desc>Property value to set.</desc>
9513 </param>
9514 </method>
9515
9516 <method name="getProperties">
9517 <desc>
9518 Returns values for a group of properties in one call.
9519
9520 The names of the properties to get are specified using the @a names
9521 argument which is a list of comma-separated property names or
9522 an empty string if all properties are to be returned. Note that currently
9523 the value of this argument is ignored and the method always returns all
9524 existing properties.
9525
9526 The list of all properties supported by the given medium format can
9527 be obtained with <link to="IMediumFormat::describeProperties"/>.
9528
9529 The method returns two arrays, the array of property names corresponding
9530 to the @a names argument and the current values of these properties.
9531 Both arrays have the same number of elements with each elemend at the
9532 given index in the first array corresponds to an element at the same
9533 index in the second array.
9534
9535 Note that for properties that do not have assigned values,
9536 an empty string is returned at the appropriate index in the
9537 @a returnValues array.
9538
9539 </desc>
9540 <param name="names" type="wstring" dir="in">
9541 <desc>
9542 Names of properties to get.
9543 </desc>
9544 </param>
9545 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9546 <desc>Names of returned properties.</desc>
9547 </param>
9548 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9549 <desc>Values of returned properties.</desc>
9550 </param>
9551 </method>
9552
9553 <method name="setProperties">
9554 <desc>
9555 Sets values for a group of properties in one call.
9556
9557 The names of the properties to set are passed in the @a names
9558 array along with the new values for them in the @a values array. Both
9559 arrays have the same number of elements with each elemend at the given
9560 index in the first array corresponding to an element at the same index
9561 in the second array.
9562
9563 If there is at least one property name in @a names that is not valid,
9564 the method will fail before changing the values of any other properties
9565 from the @a names array.
9566
9567 Using this method over <link to="#setProperty"/> is preferred if you
9568 need to set several properties at once since it will result into less
9569 IPC calls.
9570
9571 The list of all properties supported by the given medium format can
9572 be obtained with <link to="IMediumFormat::describeProperties"/>.
9573
9574 Note that setting the property value to @c null or an empty string is
9575 equivalent to deleting the existing value. A default value (if it is
9576 defined for this property) will be used by the format backend in this
9577 case.
9578 </desc>
9579 <param name="names" type="wstring" safearray="yes" dir="in">
9580 <desc>Names of properties to set.</desc>
9581 </param>
9582 <param name="values" type="wstring" safearray="yes" dir="in">
9583 <desc>Values of properties to set.</desc>
9584 </param>
9585 </method>
9586
9587 <!-- storage methods -->
9588
9589 <method name="createBaseStorage">
9590 <desc>
9591 Starts creating a hard disk storage unit (fixed/dynamic, according
9592 to the variant flags) in in the background. The previous storage unit
9593 created for this object, if any, must first be deleted using
9594 <link to="#deleteStorage"/>, otherwise the operation will fail.
9595
9596 Before the operation starts, the medium is placed in
9597 <link to="MediumState_Creating"/> state. If the create operation
9598 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
9599 state.
9600
9601 After the returned progress object reports that the operation has
9602 successfully completed, the medium state will be set to <link
9603 to="MediumState_Created"/>, the medium will be remembered by this
9604 VirtualBox installation and may be attached to virtual machines.
9605
9606 <result name="VBOX_E_NOT_SUPPORTED">
9607 The variant of storage creation operation is not supported. See <link
9608 to="IMediumFormat::capabilities"/>.
9609 </result>
9610 </desc>
9611 <param name="logicalSize" type="unsigned long long" dir="in">
9612 <desc>Maximum logical size of the medium in megabytes.</desc>
9613 </param>
9614 <param name="variant" type="MediumVariant" dir="in">
9615 <desc>Exact image variant which should be created.</desc>
9616 </param>
9617 <param name="progress" type="IProgress" dir="return">
9618 <desc>Progress object to track the operation completion.</desc>
9619 </param>
9620 </method>
9621
9622 <method name="deleteStorage">
9623 <desc>
9624 Starts deleting the storage unit of this medium.
9625
9626 The medium must not be attached to any known virtual machine and must
9627 not have any known child media, otherwise the operation will fail.
9628 It will also fail if there is no storage unit to delete or if deletion
9629 is already in progress, or if the medium is being in use (locked for
9630 read or for write) or inaccessible. Therefore, the only valid state for
9631 this operation to succeed is <link to="MediumState_Created"/>.
9632
9633 Before the operation starts, the medium is placed in
9634 <link to="MediumState_Deleting"/> state and gets removed from the list
9635 of remembered hard disks (media registry). If the delete operation
9636 fails, the medium will be remembered again and placed back to
9637 <link to="MediumState_Created"/> state.
9638
9639 After the returned progress object reports that the operation is
9640 complete, the medium state will be set to
9641 <link to="MediumState_NotCreated"/> and you will be able to use one of
9642 the storage creation methods to create it again.
9643
9644 <see>#close()</see>
9645
9646 <result name="VBOX_E_OBJECT_IN_USE">
9647 Medium is attached to a virtual machine.
9648 </result>
9649 <result name="VBOX_E_NOT_SUPPORTED">
9650 Storage deletion is not allowed because neither of storage creation
9651 operations are supported. See
9652 <link to="IMediumFormat::capabilities"/>.
9653 </result>
9654
9655 <note>
9656 If the deletion operation fails, it is not guaranteed that the storage
9657 unit still exists. You may check the <link to="IMedium::state"/> value
9658 to answer this question.
9659 </note>
9660 </desc>
9661 <param name="progress" type="IProgress" dir="return">
9662 <desc>Progress object to track the operation completion.</desc>
9663 </param>
9664 </method>
9665
9666 <!-- diff methods -->
9667
9668 <method name="createDiffStorage">
9669 <desc>
9670 Starts creating an empty differencing storage unit based on this
9671 medium in the format and at the location defined by the @a target
9672 argument.
9673
9674 The target medium must be in <link to="MediumState_NotCreated"/>
9675 state (i.e. must not have an existing storage unit). Upon successful
9676 completion, this operation will set the type of the target medium to
9677 <link to="MediumType_Normal"/> and create a storage unit necessary to
9678 represent the differencing medium data in the given format (according
9679 to the storage format of the target object).
9680
9681 After the returned progress object reports that the operation is
9682 successfully complete, the target medium gets remembered by this
9683 VirtualBox installation and may be attached to virtual machines.
9684
9685 <note>
9686 The medium will be set to <link to="MediumState_LockedRead"/>
9687 state for the duration of this operation.
9688 </note>
9689 <result name="VBOX_E_OBJECT_IN_USE">
9690 Medium not in @c NotCreated state.
9691 </result>
9692 </desc>
9693 <param name="target" type="IMedium" dir="in">
9694 <desc>Target medium.</desc>
9695 </param>
9696 <param name="variant" type="MediumVariant" dir="in">
9697 <desc>Exact image variant which should be created.</desc>
9698 </param>
9699 <param name="progress" type="IProgress" dir="return">
9700 <desc>Progress object to track the operation completion.</desc>
9701 </param>
9702 </method>
9703
9704 <method name="mergeTo">
9705 <desc>
9706 Starts merging the contents of this medium and all intermediate
9707 differencing media in the chain to the given target medium.
9708
9709 The target medium must be either a descendant of this medium or
9710 its ancestor (otherwise this method will immediately return a failure).
9711 It follows that there are two logical directions of the merge operation:
9712 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9713 ancestor (<i>backward merge</i>). Let us consider the following medium
9714 chain:
9715
9716 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9717
9718 Here, calling this method on the <tt>Base</tt> medium object with
9719 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9720 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9721 merge. Note that in both cases the contents of the resulting medium
9722 will be the same, the only difference is the medium object that takes
9723 the result of the merge operation. In case of the forward merge in the
9724 above example, the result will be written to <tt>Diff_2</tt>; in case of
9725 the backward merge, the result will be written to <tt>Base</tt>. In
9726 other words, the result of the operation is always stored in the target
9727 medium.
9728
9729 Upon successful operation completion, the storage units of all media in
9730 the chain between this (source) medium and the target medium, including
9731 the source medium itself, will be automatically deleted and the
9732 relevant medium objects (including this medium) will become
9733 uninitialized. This means that any attempt to call any of
9734 their methods or attributes will fail with the
9735 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9736 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9737 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> media.
9738 Note that <tt>Diff_2</tt> in this case will become a base medium
9739 itself since it will no longer be based on any other medium.
9740
9741 Considering the above, all of the following conditions must be met in
9742 order for the merge operation to succeed:
9743 <ul>
9744 <li>
9745 Neither this (source) medium nor any intermediate
9746 differencing medium in the chain between it and the target
9747 medium is attached to any virtual machine.
9748 </li>
9749 <li>
9750 Neither the source medium nor the target medium is an
9751 <link to="MediumType_Immutable"/> medium.
9752 </li>
9753 <li>
9754 The part of the medium tree from the source medium to the
9755 target medium is a linear chain, i.e. all medium in this
9756 chain have exactly one child which is the next medium in this
9757 chain. The only exception from this rule is the target medium in
9758 the forward merge operation; it is allowed to have any number of
9759 child media because the merge operation will not change its
9760 logical contents (as it is seen by the guest OS or by children).
9761 </li>
9762 <li>
9763 None of the involved media are in
9764 <link to="MediumState_LockedRead"/> or
9765 <link to="MediumState_LockedWrite"/> state.
9766 </li>
9767 </ul>
9768
9769 <note>
9770 This (source) medium and all intermediates will be placed to <link
9771 to="MediumState_Deleting"/> state and the target medium will be
9772 placed to <link to="MediumState_LockedWrite"/> state and for the
9773 duration of this operation.
9774 </note>
9775 </desc>
9776 <param name="target" type="IMedium" dir="in">
9777 <desc>Target medium.</desc>
9778 </param>
9779 <param name="progress" type="IProgress" dir="return">
9780 <desc>Progress object to track the operation completion.</desc>
9781 </param>
9782 </method>
9783
9784 <!-- clone method -->
9785
9786 <method name="cloneTo">
9787 <desc>
9788 Starts creating a clone of this medium in the format and at the
9789 location defined by the @a target argument.
9790
9791 The target medium must be either in <link to="MediumState_NotCreated"/>
9792 state (i.e. must not have an existing storage unit) or in
9793 <link to="MediumState_Created"/> state (i.e. created and not locked, and
9794 big enough to hold the data or else the copy will be partial). Upon
9795 successful completion, the cloned medium will contain exactly the
9796 same sector data as the medium being cloned, except that in the
9797 first case a new UUID for the clone will be randomly generated, and in
9798 the second case the UUID will remain unchanged.
9799
9800 The @a parent argument defines which medium will be the parent
9801 of the clone. Passing a @c null reference indicates that the clone will
9802 be a base image, i.e. completely independent. It is possible to specify
9803 an arbitrary medium for this parameter, including the parent of the
9804 medium which is being cloned. Even cloning to a child of the source
9805 medium is possible. Note that when cloning to an existing image, the
9806 @a parent irgument is ignored.
9807
9808 After the returned progress object reports that the operation is
9809 successfully complete, the target medium gets remembered by this
9810 VirtualBox installation and may be attached to virtual machines.
9811
9812 <note>
9813 This medium will be placed to <link to="MediumState_LockedRead"/>
9814 state for the duration of this operation.
9815 </note>
9816 <result name="E_NOTIMPL">
9817 The specified cloning variant is not supported at the moment.
9818 </result>
9819 </desc>
9820 <param name="target" type="IMedium" dir="in">
9821 <desc>Target medium.</desc>
9822 </param>
9823 <param name="variant" type="MediumVariant" dir="in">
9824 <desc>Exact image variant which should be created.</desc>
9825 </param>
9826 <param name="parent" type="IMedium" dir="in">
9827 <desc>Parent of the cloned medium.</desc>
9828 </param>
9829 <param name="progress" type="IProgress" dir="return">
9830 <desc>Progress object to track the operation completion.</desc>
9831 </param>
9832 </method>
9833
9834 <!-- other methods -->
9835
9836 <method name="compact">
9837 <desc>
9838 Starts compacting of this medium. This means that the medium is
9839 transformed into a possibly more compact storage representation.
9840 This potentially creates temporary images, which can require a
9841 substantial amount of additional disk space.
9842
9843 This medium will be placed to <link to="MediumState_LockedWrite"/>
9844 state and all its parent media (if any) will be placed to
9845 <link to="MediumState_LockedRead"/> state for the duration of this
9846 operation.
9847
9848 Please note that the results can be either returned straight away,
9849 or later as the result of the background operation via the object
9850 returned via the @a progress parameter.
9851
9852 <result name="VBOX_E_NOT_SUPPORTED">
9853 Medium format does not support compacting (but potentially
9854 needs it).
9855 </result>
9856 </desc>
9857 <param name="progress" type="IProgress" dir="return">
9858 <desc>Progress object to track the operation completion.</desc>
9859 </param>
9860 </method>
9861
9862 <method name="resize">
9863 <desc>
9864 Starts resizing this medium. This means that the nominal size of the
9865 medium is set to the new value. Both increasing and decreasing the
9866 size is possible, and there are no safety checks, since VirtualBox
9867 does not make any assumptions about the medium contents.
9868
9869 Resizing usually needs additional disk space, and possibly also
9870 some temporary disk space. Note that resize does not create a full
9871 temporary copy of the medium, so the additional disk space requirement
9872 is usually much lower than using the clone operation.
9873
9874 This medium will be placed to <link to="MediumState_LockedWrite"/>
9875 state for the duration of this operation.
9876
9877 Please note that the results can be either returned straight away,
9878 or later as the result of the background operation via the object
9879 returned via the @a progress parameter.
9880
9881 <result name="VBOX_E_NOT_SUPPORTED">
9882 Medium format does not support resizing.
9883 </result>
9884 </desc>
9885 <param name="logicalSize" type="unsigned long long" dir="in">
9886 <desc>New nominal capacity of the medium in megabytes.</desc>
9887 </param>
9888 <param name="progress" type="IProgress" dir="return">
9889 <desc>Progress object to track the operation completion.</desc>
9890 </param>
9891 </method>
9892
9893 <method name="reset">
9894 <desc>
9895 Starts erasing the contents of this differencing medium.
9896
9897 This operation will reset the differencing medium to its initial
9898 state when it does not contain any sector data and any read operation is
9899 redirected to its parent medium. This automatically gets called
9900 during VM power-up for every medium whose <link to="#autoReset" />
9901 attribute is @c true.
9902
9903 The medium will be write-locked for the duration of this operation (see
9904 <link to="#lockWrite" />).
9905
9906 <result name="VBOX_E_NOT_SUPPORTED">
9907 This is not a differencing medium.
9908 </result>
9909 <result name="VBOX_E_INVALID_OBJECT_STATE">
9910 Medium is not in <link to="MediumState_Created"/> or
9911 <link to="MediumState_Inaccessible"/> state.
9912 </result>
9913 </desc>
9914 <param name="progress" type="IProgress" dir="return">
9915 <desc>Progress object to track the operation completion.</desc>
9916 </param>
9917 </method>
9918
9919 </interface>
9920
9921
9922 <!--
9923 // IMediumFormat
9924 /////////////////////////////////////////////////////////////////////////
9925 -->
9926
9927 <enum
9928 name="DataType"
9929 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9930 >
9931 <const name="Int32" value="0"/>
9932 <const name="Int8" value="1"/>
9933 <const name="String" value="2"/>
9934 </enum>
9935
9936 <enum
9937 name="DataFlags"
9938 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9939 >
9940 <const name="None" value="0x00"/>
9941 <const name="Mandatory" value="0x01"/>
9942 <const name="Expert" value="0x02"/>
9943 <const name="Array" value="0x04"/>
9944 <const name="FlagMask" value="0x07"/>
9945 </enum>
9946
9947 <enum
9948 name="MediumFormatCapabilities"
9949 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
9950 >
9951 <desc>
9952 Medium format capability flags.
9953 </desc>
9954
9955 <const name="Uuid" value="0x01">
9956 <desc>
9957 Supports UUIDs as expected by VirtualBox code.
9958 </desc>
9959 </const>
9960
9961 <const name="CreateFixed" value="0x02">
9962 <desc>
9963 Supports creating fixed size images, allocating all space instantly.
9964 </desc>
9965 </const>
9966
9967 <const name="CreateDynamic" value="0x04">
9968 <desc>
9969 Supports creating dynamically growing images, allocating space on
9970 demand.
9971 </desc>
9972 </const>
9973
9974 <const name="CreateSplit2G" value="0x08">
9975 <desc>
9976 Supports creating images split in chunks of a bit less than 2 GBytes.
9977 </desc>
9978 </const>
9979
9980 <const name="Differencing" value="0x10">
9981 <desc>
9982 Supports being used as a format for differencing media (see <link
9983 to="IMedium::createDiffStorage"/>).
9984 </desc>
9985 </const>
9986
9987 <const name="Asynchronous" value="0x20">
9988 <desc>
9989 Supports asynchronous I/O operations for at least some configurations.
9990 </desc>
9991 </const>
9992
9993 <const name="File" value="0x40">
9994 <desc>
9995 The format backend operates on files (the <link to="IMedium::location"/>
9996 attribute of the medium specifies a file used to store medium
9997 data; for a list of supported file extensions see
9998 <link to="IMediumFormat::fileExtensions"/>).
9999 </desc>
10000 </const>
10001
10002 <const name="Properties" value="0x80">
10003 <desc>
10004 The format backend uses the property interface to configure the storage
10005 location and properties (the <link to="IMediumFormat::describeProperties"/>
10006 method is used to get access to properties supported by the given medium format).
10007 </desc>
10008 </const>
10009
10010 <const name="CapabilityMask" value="0xFF"/>
10011 </enum>
10012
10013 <interface
10014 name="IMediumFormat" extends="$unknown"
10015 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
10016 wsmap="managed"
10017 >
10018 <desc>
10019 The IMediumFormat interface represents a medium format.
10020
10021 Each medium format has an associated backend which is used to handle
10022 media stored in this format. This interface provides information
10023 about the properties of the associated backend.
10024
10025 Each medium format is identified by a string represented by the
10026 <link to="#id"/> attribute. This string is used in calls like
10027 <link to="IVirtualBox::createHardDisk"/> to specify the desired
10028 format.
10029
10030 The list of all supported medium formats can be obtained using
10031 <link to="ISystemProperties::mediumFormats"/>.
10032
10033 <see>IMedium</see>
10034 </desc>
10035
10036 <attribute name="id" type="wstring" readonly="yes">
10037 <desc>
10038 Identifier of this format.
10039
10040 The format identifier is a non-@c null non-empty ASCII string. Note that
10041 this string is case-insensitive. This means that, for example, all of
10042 the following strings:
10043 <pre>
10044 "VDI"
10045 "vdi"
10046 "VdI"</pre>
10047 refer to the same medium format.
10048
10049 This string is used in methods of other interfaces where it is necessary
10050 to specify a medium format, such as
10051 <link to="IVirtualBox::createHardDisk"/>.
10052 </desc>
10053 </attribute>
10054
10055 <attribute name="name" type="wstring" readonly="yes">
10056 <desc>
10057 Human readable description of this format.
10058
10059 Mainly for use in file open dialogs.
10060 </desc>
10061 </attribute>
10062
10063 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
10064 <desc>
10065 Array of strings containing the supported file extensions.
10066
10067 The first extension in the array is the extension preferred by the
10068 backend. It is recommended to use this extension when specifying a
10069 location of the storage unit for a new medium.
10070
10071 Note that some backends do not work on files, so this array may be
10072 empty.
10073
10074 <see>IMediumFormat::capabilities</see>
10075 </desc>
10076 </attribute>
10077
10078 <attribute name="capabilities" type="unsigned long" readonly="yes">
10079 <desc>
10080 Capabilities of the format as a set of bit flags.
10081
10082 For the meaning of individual capability flags see
10083 <link to="MediumFormatCapabilities"/>.
10084 </desc>
10085 </attribute>
10086
10087 <method name="describeProperties">
10088 <desc>
10089 Returns several arrays describing the properties supported by this
10090 format.
10091
10092 An element with the given index in each array describes one
10093 property. Thus, the number of elements in each returned array is the
10094 same and corresponds to the number of supported properties.
10095
10096 The returned arrays are filled in only if the
10097 <link to="MediumFormatCapabilities_Properties"/> flag is set.
10098 All arguments must be non-@c null.
10099
10100 <see>DataType</see>
10101 <see>DataFlags</see>
10102 </desc>
10103
10104 <param name="names" type="wstring" safearray="yes" dir="out">
10105 <desc>Array of property names.</desc>
10106 </param>
10107 <param name="description" type="wstring" safearray="yes" dir="out">
10108 <desc>Array of property descriptions.</desc>
10109 </param>
10110 <param name="types" type="DataType" safearray="yes" dir="out">
10111 <desc>Array of property types.</desc>
10112 </param>
10113 <param name="flags" type="unsigned long" safearray="yes" dir="out">
10114 <desc>Array of property flags.</desc>
10115 </param>
10116 <param name="defaults" type="wstring" safearray="yes" dir="out">
10117 <desc>Array of default property values.</desc>
10118 </param>
10119 </method>
10120
10121 </interface>
10122
10123
10124 <!--
10125 // IKeyboard
10126 /////////////////////////////////////////////////////////////////////////
10127 -->
10128
10129 <interface
10130 name="IKeyboard" extends="$unknown"
10131 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10132 wsmap="managed"
10133 >
10134 <desc>
10135 The IKeyboard interface represents the virtual machine's keyboard. Used
10136 in <link to="IConsole::keyboard"/>.
10137
10138 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10139 to the virtual machine.
10140
10141 </desc>
10142 <method name="putScancode">
10143 <desc>Sends a scancode to the keyboard.
10144
10145 <result name="VBOX_E_IPRT_ERROR">
10146 Could not send scan code to virtual keyboard.
10147 </result>
10148
10149 </desc>
10150 <param name="scancode" type="long" dir="in"/>
10151 </method>
10152
10153 <method name="putScancodes">
10154 <desc>Sends an array of scancodes to the keyboard.
10155
10156 <result name="VBOX_E_IPRT_ERROR">
10157 Could not send all scan codes to virtual keyboard.
10158 </result>
10159
10160 </desc>
10161 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10162 <param name="codesStored" type="unsigned long" dir="return"/>
10163 </method>
10164
10165 <method name="putCAD">
10166 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10167 function is nothing special, it is just a convenience function
10168 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10169
10170 <result name="VBOX_E_IPRT_ERROR">
10171 Could not send all scan codes to virtual keyboard.
10172 </result>
10173
10174 </desc>
10175 </method>
10176
10177 </interface>
10178
10179
10180 <!--
10181 // IMouse
10182 /////////////////////////////////////////////////////////////////////////
10183 -->
10184
10185 <enum
10186 name="MouseButtonState"
10187 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10188 >
10189 <desc>
10190 Mouse button state.
10191 </desc>
10192
10193 <const name="LeftButton" value="0x01"/>
10194 <const name="RightButton" value="0x02"/>
10195 <const name="MiddleButton" value="0x04"/>
10196 <const name="WheelUp" value="0x08"/>
10197 <const name="WheelDown" value="0x10"/>
10198 <const name="XButton1" value="0x20"/>
10199 <const name="XButton2" value="0x40"/>
10200 <const name="MouseStateMask" value="0x7F"/>
10201 </enum>
10202
10203 <interface
10204 name="IMouse" extends="$unknown"
10205 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
10206 wsmap="managed"
10207 >
10208 <desc>
10209 The IMouse interface represents the virtual machine's mouse. Used in
10210 <link to="IConsole::mouse"/>.
10211
10212 Through this interface, the virtual machine's virtual mouse can be
10213 controlled.
10214 </desc>
10215
10216 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10217 <desc>
10218 Whether the guest OS supports absolute mouse pointer positioning
10219 or not.
10220 <note>
10221 You can use the <link to="IMouseCapabilityChangedEvent"/>
10222 event to be instantly informed about changes of this attribute
10223 during virtual machine execution.
10224 </note>
10225 <see><link to="#putMouseEventAbsolute"/></see>
10226 </desc>
10227 </attribute>
10228
10229 <attribute name="relativeSupported" type="boolean" readonly="yes">
10230 <desc>
10231 Whether the guest OS supports relative mouse pointer positioning
10232 or not.
10233 <note>
10234 You can use the <link to="IMouseCapabilityChangedEvent"/>
10235 event to be instantly informed about changes of this attribute
10236 during virtual machine execution.
10237 </note>
10238 <see><link to="#putMouseEvent"/></see>
10239 </desc>
10240 </attribute>
10241
10242 <attribute name="needsHostCursor" type="boolean" readonly="yes">
10243 <desc>
10244 Whether the guest OS can currently switch to drawing it's own mouse
10245 cursor on demand.
10246 <note>
10247 You can use the <link to="IMouseCapabilityChangedEvent"/>
10248 event to be instantly informed about changes of this attribute
10249 during virtual machine execution.
10250 </note>
10251 <see><link to="#putMouseEvent"/></see>
10252 </desc>
10253 </attribute>
10254
10255 <method name="putMouseEvent">
10256 <desc>
10257 Initiates a mouse event using relative pointer movements
10258 along x and y axis.
10259
10260 <result name="E_ACCESSDENIED">
10261 Console not powered up.
10262 </result>
10263 <result name="VBOX_E_IPRT_ERROR">
10264 Could not send mouse event to virtual mouse.
10265 </result>
10266
10267 </desc>
10268
10269 <param name="dx" type="long" dir="in">
10270 <desc>
10271 Amount of pixels the mouse should move to the right.
10272 Negative values move the mouse to the left.
10273 </desc>
10274 </param>
10275 <param name="dy" type="long" dir="in">
10276 <desc>
10277 Amount of pixels the mouse should move downwards.
10278 Negative values move the mouse upwards.
10279 </desc>
10280 </param>
10281 <param name="dz" type="long" dir="in">
10282 <desc>
10283 Amount of mouse wheel moves.
10284 Positive values describe clockwise wheel rotations,
10285 negative values describe counterclockwise rotations.
10286 </desc>
10287 </param>
10288 <param name="dw" type="long" dir="in">
10289 <desc>
10290 Amount of horizontal mouse wheel moves.
10291 Positive values describe a movement to the left,
10292 negative values describe a movement to the right.
10293 </desc>
10294 </param>
10295 <param name="buttonState" type="long" dir="in">
10296 <desc>
10297 The current state of mouse buttons. Every bit represents
10298 a mouse button as follows:
10299 <table>
10300 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10301 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10302 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10303 </table>
10304 A value of <tt>1</tt> means the corresponding button is pressed.
10305 otherwise it is released.
10306 </desc>
10307 </param>
10308 </method>
10309
10310 <method name="putMouseEventAbsolute">
10311 <desc>
10312 Positions the mouse pointer using absolute x and y coordinates.
10313 These coordinates are expressed in pixels and
10314 start from <tt>[1,1]</tt> which corresponds to the top left
10315 corner of the virtual display.
10316
10317 <result name="E_ACCESSDENIED">
10318 Console not powered up.
10319 </result>
10320 <result name="VBOX_E_IPRT_ERROR">
10321 Could not send mouse event to virtual mouse.
10322 </result>
10323
10324 <note>
10325 This method will have effect only if absolute mouse
10326 positioning is supported by the guest OS.
10327 </note>
10328
10329 <see><link to="#absoluteSupported"/></see>
10330 </desc>
10331
10332 <param name="x" type="long" dir="in">
10333 <desc>
10334 X coordinate of the pointer in pixels, starting from @c 1.
10335 </desc>
10336 </param>
10337 <param name="y" type="long" dir="in">
10338 <desc>
10339 Y coordinate of the pointer in pixels, starting from @c 1.
10340 </desc>
10341 </param>
10342 <param name="dz" type="long" dir="in">
10343 <desc>
10344 Amount of mouse wheel moves.
10345 Positive values describe clockwise wheel rotations,
10346 negative values describe counterclockwise rotations.
10347 </desc>
10348 </param>
10349 <param name="dw" type="long" dir="in">
10350 <desc>
10351 Amount of horizontal mouse wheel moves.
10352 Positive values describe a movement to the left,
10353 negative values describe a movement to the right.
10354 </desc>
10355 </param>
10356 <param name="buttonState" type="long" dir="in">
10357 <desc>
10358 The current state of mouse buttons. Every bit represents
10359 a mouse button as follows:
10360 <table>
10361 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10362 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10363 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10364 </table>
10365 A value of @c 1 means the corresponding button is pressed.
10366 otherwise it is released.
10367 </desc>
10368 </param>
10369 </method>
10370
10371 </interface>
10372
10373 <!--
10374 // IDisplay
10375 /////////////////////////////////////////////////////////////////////////
10376 -->
10377
10378 <enum
10379 name="FramebufferPixelFormat"
10380 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10381 >
10382 <desc>
10383 Format of the video memory buffer. Constants represented by this enum can
10384 be used to test for particular values of <link
10385 to="IFramebuffer::pixelFormat"/>. See also <link
10386 to="IFramebuffer::requestResize"/>.
10387
10388 See also www.fourcc.org for more information about FOURCC pixel formats.
10389 </desc>
10390
10391 <const name="Opaque" value="0">
10392 <desc>
10393 Unknown buffer format (the user may not assume any particular format of
10394 the buffer).
10395 </desc>
10396 </const>
10397 <const name="FOURCC_RGB" value="0x32424752">
10398 <desc>
10399 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10400 bit layout).
10401 </desc>
10402 </const>
10403 </enum>
10404
10405 <interface
10406 name="IFramebuffer" extends="$unknown"
10407 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10408 wsmap="suppress"
10409 >
10410 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10411 <desc>Address of the start byte of the frame buffer.</desc>
10412 </attribute>
10413
10414 <attribute name="width" type="unsigned long" readonly="yes">
10415 <desc>Frame buffer width, in pixels.</desc>
10416 </attribute>
10417
10418 <attribute name="height" type="unsigned long" readonly="yes">
10419 <desc>Frame buffer height, in pixels.</desc>
10420 </attribute>
10421
10422 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10423 <desc>
10424 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10425 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10426 are: 8, 15, 16, 24 and 32.
10427 </desc>
10428 </attribute>
10429
10430 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10431 <desc>
10432 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10433 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10434 size of the scan line must be aligned to 32 bits.
10435 </desc>
10436 </attribute>
10437
10438 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10439 <desc>
10440 Frame buffer pixel format. It's either one of the values defined by <link
10441 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10442 <note>
10443 This attribute must never return <link
10444 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10445 <link to="#address"/> points to must be always known.
10446 </note>
10447 </desc>
10448 </attribute>
10449
10450 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10451 <desc>
10452 Defines whether this frame buffer uses the virtual video card's memory
10453 buffer (guest VRAM) directly or not. See <link
10454 to="IFramebuffer::requestResize"/> for more information.
10455 </desc>
10456 </attribute>
10457
10458 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10459 <desc>
10460 Hint from the frame buffer about how much of the standard
10461 screen height it wants to use for itself. This information is
10462 exposed to the guest through the VESA BIOS and VMMDev interface
10463 so that it can use it for determining its video mode table. It
10464 is not guaranteed that the guest respects the value.
10465 </desc>
10466 </attribute>
10467
10468 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10469 <desc>
10470 An alpha-blended overlay which is superposed over the frame buffer.
10471 The initial purpose is to allow the display of icons providing
10472 information about the VM state, including disk activity, in front
10473 ends which do not have other means of doing that. The overlay is
10474 designed to controlled exclusively by IDisplay. It has no locking
10475 of its own, and any changes made to it are not guaranteed to be
10476 visible until the affected portion of IFramebuffer is updated. The
10477 overlay can be created lazily the first time it is requested. This
10478 attribute can also return @c null to signal that the overlay is not
10479 implemented.
10480 </desc>
10481 </attribute>
10482
10483 <attribute name="winId" type="unsigned long long" readonly="yes">
10484 <desc>
10485 Platform-dependent identifier of the window where context of this
10486 frame buffer is drawn, or zero if there's no such window.
10487 </desc>
10488 </attribute>
10489
10490 <method name="lock">
10491 <desc>
10492 Locks the frame buffer.
10493 Gets called by the IDisplay object where this frame buffer is
10494 bound to.
10495 </desc>
10496 </method>
10497
10498 <method name="unlock">
10499 <desc>
10500 Unlocks the frame buffer.
10501 Gets called by the IDisplay object where this frame buffer is
10502 bound to.
10503 </desc>
10504 </method>
10505
10506 <method name="notifyUpdate">
10507 <desc>
10508 Informs about an update.
10509 Gets called by the display object where this buffer is
10510 registered.
10511 </desc>
10512 <param name="x" type="unsigned long" dir="in"/>
10513 <param name="y" type="unsigned long" dir="in"/>
10514 <param name="width" type="unsigned long" dir="in"/>
10515 <param name="height" type="unsigned long" dir="in"/>
10516 </method>
10517
10518 <method name="requestResize">
10519 <desc>
10520 Requests a size and pixel format change.
10521
10522 There are two modes of working with the video buffer of the virtual
10523 machine. The <i>indirect</i> mode implies that the IFramebuffer
10524 implementation allocates a memory buffer for the requested display mode
10525 and provides it to the virtual machine. In <i>direct</i> mode, the
10526 IFramebuffer implementation uses the memory buffer allocated and owned
10527 by the virtual machine. This buffer represents the video memory of the
10528 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10529 usually faster because the implementation gets a raw pointer to the
10530 guest VRAM buffer which it can directly use for visualizing the contents
10531 of the virtual display, as opposed to the indirect mode where the
10532 contents of guest VRAM are copied to the memory buffer provided by
10533 the implementation every time a display update occurs.
10534
10535 It is important to note that the direct mode is really fast only when
10536 the implementation uses the given guest VRAM buffer directly, for
10537 example, by blitting it to the window representing the virtual machine's
10538 display, which saves at least one copy operation comparing to the
10539 indirect mode. However, using the guest VRAM buffer directly is not
10540 always possible: the format and the color depth of this buffer may be
10541 not supported by the target window, or it may be unknown (opaque) as in
10542 case of text or non-linear multi-plane VGA video modes. In this case,
10543 the indirect mode (that is always available) should be used as a
10544 fallback: when the guest VRAM contents are copied to the
10545 implementation-provided memory buffer, color and format conversion is
10546 done automatically by the underlying code.
10547
10548 The @a pixelFormat parameter defines whether the direct mode is
10549 available or not. If @a pixelFormat is <link
10550 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10551 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10552 @a bytesPerLine parameters must be ignored and the implementation must use
10553 the indirect mode (where it provides its own buffer in one of the
10554 supported formats). In all other cases, @a pixelFormat together with
10555 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10556 buffer pointed to by the @a VRAM parameter and the implementation is
10557 free to choose which mode to use. To indicate that this frame buffer uses
10558 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10559 attribute must return @c true and <link to="#address"/> must
10560 return exactly the same address that is passed in the @a VRAM parameter
10561 of this method; otherwise it is assumed that the indirect strategy is
10562 chosen.
10563
10564 The @a width and @a height parameters represent the size of the
10565 requested display mode in both modes. In case of indirect mode, the
10566 provided memory buffer should be big enough to store data of the given
10567 display mode. In case of direct mode, it is guaranteed that the given
10568 @a VRAM buffer contains enough space to represent the display mode of the
10569 given size. Note that this frame buffer's <link to="#width"/> and <link
10570 to="#height"/> attributes must return exactly the same values as
10571 passed to this method after the resize is completed (see below).
10572
10573 The @a finished output parameter determines if the implementation has
10574 finished resizing the frame buffer or not. If, for some reason, the
10575 resize cannot be finished immediately during this call, @a finished
10576 must be set to @c false, and the implementation must call
10577 <link to="IDisplay::resizeCompleted"/> after it has returned from
10578 this method as soon as possible. If @a finished is @c false, the
10579 machine will not call any frame buffer methods until
10580 <link to="IDisplay::resizeCompleted"/> is called.
10581
10582 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10583 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10584 this frame buffer must return exactly the same values as specified in the
10585 parameters of this method, after the resize is completed. If the
10586 indirect mode is chosen, these attributes must return values describing
10587 the format of the implementation's own memory buffer <link
10588 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10589 value must always correlate with <link to="#pixelFormat"/>. Note that
10590 the <link to="#pixelFormat"/> attribute must never return <link
10591 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10592
10593 <note>
10594 This method is called by the IDisplay object under the
10595 <link to="#lock"/> provided by this IFramebuffer
10596 implementation. If this method returns @c false in @a finished, then
10597 this lock is not released until
10598 <link to="IDisplay::resizeCompleted"/> is called.
10599 </note>
10600 </desc>
10601 <param name="screenId" type="unsigned long" dir="in">
10602 <desc>
10603 Logical screen number. Must be used in the corresponding call to
10604 <link to="IDisplay::resizeCompleted"/> if this call is made.
10605 </desc>
10606 </param>
10607 <param name="pixelFormat" type="unsigned long" dir="in">
10608 <desc>
10609 Pixel format of the memory buffer pointed to by @a VRAM.
10610 See also <link to="FramebufferPixelFormat"/>.
10611 </desc>
10612 </param>
10613 <param name="VRAM" type="octet" mod="ptr" dir="in">
10614 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10615 </param>
10616 <param name="bitsPerPixel" type="unsigned long" dir="in">
10617 <desc>Color depth, bits per pixel.</desc>
10618 </param>
10619 <param name="bytesPerLine" type="unsigned long" dir="in">
10620 <desc>Size of one scan line, in bytes.</desc>
10621 </param>
10622 <param name="width" type="unsigned long" dir="in">
10623 <desc>Width of the guest display, in pixels.</desc>
10624 </param>
10625 <param name="height" type="unsigned long" dir="in">
10626 <desc>Height of the guest display, in pixels.</desc>
10627 </param>
10628 <param name="finished" type="boolean" dir="return">
10629 <desc>
10630 Can the VM start using the new frame buffer immediately
10631 after this method returns or it should wait for
10632 <link to="IDisplay::resizeCompleted"/>.
10633 </desc>
10634 </param>
10635 </method>
10636
10637 <method name="videoModeSupported">
10638 <desc>
10639 Returns whether the frame buffer implementation is willing to
10640 support a given video mode. In case it is not able to render
10641 the video mode (or for some reason not willing), it should
10642 return @c false. Usually this method is called when the guest
10643 asks the VMM device whether a given video mode is supported
10644 so the information returned is directly exposed to the guest.
10645 It is important that this method returns very quickly.
10646 </desc>
10647 <param name="width" type="unsigned long" dir="in"/>
10648 <param name="height" type="unsigned long" dir="in"/>
10649 <param name="bpp" type="unsigned long" dir="in"/>
10650 <param name="supported" type="boolean" dir="return"/>
10651 </method>
10652
10653 <method name="getVisibleRegion">
10654 <desc>
10655 Returns the visible region of this frame buffer.
10656
10657 If the @a rectangles parameter is @c null then the value of the
10658 @a count parameter is ignored and the number of elements necessary to
10659 describe the current visible region is returned in @a countCopied.
10660
10661 If @a rectangles is not @c null but @a count is less
10662 than the required number of elements to store region data, the method
10663 will report a failure. If @a count is equal or greater than the
10664 required number of elements, then the actual number of elements copied
10665 to the provided array will be returned in @a countCopied.
10666
10667 <note>
10668 The address of the provided array must be in the process space of
10669 this IFramebuffer object.
10670 </note>
10671 <note>
10672 Method not yet implemented.
10673 </note>
10674 </desc>
10675 <param name="rectangles" type="octet" mod="ptr" dir="in">
10676 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10677 </param>
10678 <param name="count" type="unsigned long" dir="in">
10679 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10680 </param>
10681 <param name="countCopied" type="unsigned long" dir="return">
10682 <desc>Number of elements copied to the @a rectangles array.</desc>
10683 </param>
10684 </method>
10685
10686 <method name="setVisibleRegion">
10687 <desc>
10688 Suggests a new visible region to this frame buffer. This region
10689 represents the area of the VM display which is a union of regions of
10690 all top-level windows of the guest operating system running inside the
10691 VM (if the Guest Additions for this system support this
10692 functionality). This information may be used by the frontends to
10693 implement the seamless desktop integration feature.
10694
10695 <note>
10696 The address of the provided array must be in the process space of
10697 this IFramebuffer object.
10698 </note>
10699 <note>
10700 The IFramebuffer implementation must make a copy of the provided
10701 array of rectangles.
10702 </note>
10703 <note>
10704 Method not yet implemented.
10705 </note>
10706 </desc>
10707 <param name="rectangles" type="octet" mod="ptr" dir="in">
10708 <desc>Pointer to the @c RTRECT array.</desc>
10709 </param>
10710 <param name="count" type="unsigned long" dir="in">
10711 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10712 </param>
10713 </method>
10714
10715 <method name="processVHWACommand">
10716 <desc>
10717 Posts a Video HW Acceleration Command to the frame buffer for processing.
10718 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10719 are posted from quest to the host to be processed by the host hardware.
10720
10721 <note>
10722 The address of the provided command must be in the process space of
10723 this IFramebuffer object.
10724 </note>
10725 </desc>
10726
10727 <param name="command" type="octet" mod="ptr" dir="in">
10728 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10729 </param>
10730 </method>
10731
10732 </interface>
10733
10734 <interface
10735 name="IFramebufferOverlay" extends="IFramebuffer"
10736 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10737 wsmap="suppress"
10738 >
10739 <desc>
10740 The IFramebufferOverlay interface represents an alpha blended overlay
10741 for displaying status icons above an IFramebuffer. It is always created
10742 not visible, so that it must be explicitly shown. It only covers a
10743 portion of the IFramebuffer, determined by its width, height and
10744 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10745 that order) format, and may be written to directly. Do re-read the
10746 width though, after setting it, as it may be adjusted (increased) to
10747 make it more suitable for the front end.
10748 </desc>
10749 <attribute name="x" type="unsigned long" readonly="yes">
10750 <desc>X position of the overlay, relative to the frame buffer.</desc>
10751 </attribute>
10752
10753 <attribute name="y" type="unsigned long" readonly="yes">
10754 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10755 </attribute>
10756
10757 <attribute name="visible" type="boolean" readonly="no">
10758 <desc>
10759 Whether the overlay is currently visible.
10760 </desc>
10761 </attribute>
10762
10763 <attribute name="alpha" type="unsigned long" readonly="no">
10764 <desc>
10765 The global alpha value for the overlay. This may or may not be
10766 supported by a given front end.
10767 </desc>
10768 </attribute>
10769
10770 <method name="move">
10771 <desc>
10772 Changes the overlay's position relative to the IFramebuffer.
10773 </desc>
10774 <param name="x" type="unsigned long" dir="in"/>
10775 <param name="y" type="unsigned long" dir="in"/>
10776 </method>
10777
10778 </interface>
10779
10780 <interface
10781 name="IDisplay" extends="$unknown"
10782 uuid="1fa79e39-0cc9-4ab3-9df3-ed3e96b42496"
10783 wsmap="managed"
10784 >
10785 <desc>
10786 The IDisplay interface represents the virtual machine's display.
10787
10788 The object implementing this interface is contained in each
10789 <link to="IConsole::display"/> attribute and represents the visual
10790 output of the virtual machine.
10791
10792 The virtual display supports pluggable output targets represented by the
10793 IFramebuffer interface. Examples of the output target are a window on
10794 the host computer or an RDP session's display on a remote computer.
10795 </desc>
10796 <method name="getScreenResolution">
10797 <desc>Queries display width, height and color depth for given screen.</desc>
10798 <param name="screenId" type="unsigned long" dir="in"/>
10799 <param name="width" type="unsigned long" dir="out"/>
10800 <param name="height" type="unsigned long" dir="out"/>
10801 <param name="bitsPerPixel" type="unsigned long" dir="out"/>
10802 </method>
10803
10804 <method name="setFramebuffer">
10805 <desc>
10806 Sets the framebuffer for given screen.
10807 </desc>
10808 <param name="screenId" type="unsigned long" dir="in"/>
10809 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10810 </method>
10811
10812 <method name="getFramebuffer">
10813 <desc>
10814 Queries the framebuffer for given screen.
10815 </desc>
10816 <param name="screenId" type="unsigned long" dir="in"/>
10817 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10818 <param name="xOrigin" type="long" dir="out"/>
10819 <param name="yOrigin" type="long" dir="out"/>
10820 </method>
10821
10822 <method name="setVideoModeHint">
10823 <desc>
10824 Asks VirtualBox to request the given video mode from
10825 the guest. This is just a hint and it cannot be guaranteed
10826 that the requested resolution will be used. Guest Additions
10827 are required for the request to be seen by guests. The caller
10828 should issue the request and wait for a resolution change and
10829 after a timeout retry.
10830
10831 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10832 parameters means that the corresponding values should be taken from the
10833 current video mode (i.e. left unchanged).
10834
10835 If the guest OS supports multi-monitor configuration then the @a display
10836 parameter specifies the number of the guest display to send the hint to:
10837 @c 0 is the primary display, @c 1 is the first secondary and
10838 so on. If the multi-monitor configuration is not supported, @a display
10839 must be @c 0.
10840
10841 <result name="E_INVALIDARG">
10842 The @a display is not associated with any monitor.
10843 </result>
10844
10845 </desc>
10846 <param name="width" type="unsigned long" dir="in"/>
10847 <param name="height" type="unsigned long" dir="in"/>
10848 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10849 <param name="display" type="unsigned long" dir="in"/>
10850 </method>
10851
10852 <method name="setSeamlessMode">
10853 <desc>
10854 Enables or disables seamless guest display rendering (seamless desktop
10855 integration) mode.
10856 <note>
10857 Calling this method has no effect if <link
10858 to="IGuest::supportsSeamless"/> returns @c false.
10859 </note>
10860 </desc>
10861 <param name="enabled" type="boolean" dir="in"/>
10862 </method>
10863
10864 <method name="takeScreenShot">
10865 <desc>
10866 Takes a screen shot of the requested size and copies it to the
10867 32-bpp buffer allocated by the caller and pointed to by @a address.
10868 A pixel consists of 4 bytes in order: B, G, R, 0.
10869
10870 <note>This API can be used only by the COM/XPCOM C++ API as it
10871 requires pointer support. Use <link to="#takeScreenShotToArray" />
10872 with other language bindings.
10873 </note>
10874
10875 <result name="E_NOTIMPL">
10876 Feature not implemented.
10877 </result>
10878 <result name="VBOX_E_IPRT_ERROR">
10879 Could not take a screenshot.
10880 </result>
10881
10882 </desc>
10883 <param name="screenId" type="unsigned long" dir="in"/>
10884 <param name="address" type="octet" mod="ptr" dir="in"/>
10885 <param name="width" type="unsigned long" dir="in"/>
10886 <param name="height" type="unsigned long" dir="in"/>
10887 </method>
10888
10889 <method name="takeScreenShotToArray">
10890 <desc>
10891 Takes a guest screen shot of the requested size and returns it as
10892 an array of bytes in uncompressed 32-bit RGBA format.
10893 A pixel consists of 4 bytes in order: R, G, B, 0xFF.
10894
10895 This API is slow, but could be the only option to get guest screenshot
10896 for scriptable languages not allowed to manipulate with addresses
10897 directly.
10898
10899 <result name="E_NOTIMPL">
10900 Feature not implemented.
10901 </result>
10902 <result name="VBOX_E_IPRT_ERROR">
10903 Could not take a screenshot.
10904 </result>
10905 </desc>
10906 <param name="screenId" type="unsigned long" dir="in">
10907 <desc>
10908 Monitor to take screenshot from.
10909 </desc>
10910 </param>
10911 <param name="width" type="unsigned long" dir="in">
10912 <desc>
10913 Desired image width.
10914 </desc>
10915 </param>
10916 <param name="height" type="unsigned long" dir="in">
10917 <desc>
10918 Desired image height.
10919 </desc>
10920 </param>
10921 <param name="screenData" type="octet" dir="return" safearray="yes">
10922 <desc>
10923 Array with resulting screen data.
10924 </desc>
10925 </param>
10926 </method>
10927
10928 <method name="drawToScreen">
10929 <desc>
10930 Draws a 32-bpp image of the specified size from the given buffer
10931 to the given point on the VM display.
10932
10933 <result name="E_NOTIMPL">
10934 Feature not implemented.
10935 </result>
10936 <result name="VBOX_E_IPRT_ERROR">
10937 Could not draw to screen.
10938 </result>
10939
10940 </desc>
10941 <param name="screenId" type="unsigned long" dir="in"/>
10942 <param name="address" type="octet" mod="ptr" dir="in"/>
10943 <param name="x" type="unsigned long" dir="in">
10944 <desc>Relative to the screen top left corner.</desc>
10945 </param>
10946 <param name="y" type="unsigned long" dir="in">
10947 <desc>Relative to the screen top left corner.</desc>
10948 </param>
10949 <param name="width" type="unsigned long" dir="in"/>
10950 <param name="height" type="unsigned long" dir="in"/>
10951 </method>
10952
10953 <method name="invalidateAndUpdate">
10954 <desc>
10955 Does a full invalidation of the VM display and instructs the VM
10956 to update it.
10957
10958 <result name="VBOX_E_IPRT_ERROR">
10959 Could not invalidate and update screen.
10960 </result>
10961
10962 </desc>
10963 </method>
10964
10965 <method name="resizeCompleted">
10966 <desc>
10967 Signals that a framebuffer has completed the resize operation.
10968
10969 <result name="VBOX_E_NOT_SUPPORTED">
10970 Operation only valid for external frame buffers.
10971 </result>
10972
10973 </desc>
10974 <param name="screenId" type="unsigned long" dir="in"/>
10975 </method>
10976
10977 <method name="completeVHWACommand">
10978 <desc>
10979 Signals that the Video HW Acceleration command has completed.
10980 </desc>
10981
10982 <param name="command" type="octet" mod="ptr" dir="in">
10983 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
10984 </param>
10985 </method>
10986
10987 </interface>
10988
10989 <!--
10990 // INetworkAdapter
10991 /////////////////////////////////////////////////////////////////////////
10992 -->
10993
10994 <enum
10995 name="NetworkAttachmentType"
10996 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10997 >
10998 <desc>
10999 Network attachment type.
11000 </desc>
11001
11002 <const name="Null" value="0">
11003 <desc>Null value, also means "not attached".</desc>
11004 </const>
11005 <const name="NAT" value="1"/>
11006 <const name="Bridged" value="2"/>
11007 <const name="Internal" value="3"/>
11008 <const name="HostOnly" value="4"/>
11009 <const name="VDE" value="5"/>
11010 </enum>
11011
11012 <enum
11013 name="NetworkAdapterType"
11014 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
11015 >
11016 <desc>
11017 Network adapter type.
11018 </desc>
11019
11020 <const name="Null" value="0">
11021 <desc>Null value (never used by the API).</desc>
11022 </const>
11023 <const name="Am79C970A" value="1">
11024 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
11025 </const>
11026 <const name="Am79C973" value="2">
11027 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
11028 </const>
11029 <const name="I82540EM" value="3">
11030 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
11031 </const>
11032 <const name="I82543GC" value="4">
11033 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
11034 </const>
11035 <const name="I82545EM" value="5">
11036 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
11037 </const>
11038 <const name="Virtio" value="6">
11039 <desc>Virtio network device.</desc>
11040 </const>
11041 </enum>
11042
11043 <interface
11044 name="INetworkAdapter" extends="$unknown"
11045 uuid="5bdb9df8-a5e1-4322-a139-b7a4a734c790"
11046 wsmap="managed"
11047 >
11048 <desc>
11049 Represents a virtual network adapter that is attached to a virtual machine.
11050 Each virtual machine has a fixed number of network adapter slots with one
11051 instance of this attached to each of them. Call
11052 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
11053 is attached to a given slot in a given machine.
11054
11055 Each network adapter can be in one of five attachment modes, which are
11056 represented by the <link to="NetworkAttachmentType" /> enumeration;
11057 see the <link to="#attachmentType" /> attribute.
11058 </desc>
11059
11060 <attribute name="adapterType" type="NetworkAdapterType">
11061 <desc>
11062 Type of the virtual network adapter. Depending on this value,
11063 VirtualBox will provide a different virtual network hardware
11064 to the guest.
11065 </desc>
11066 </attribute>
11067
11068 <attribute name="slot" type="unsigned long" readonly="yes">
11069 <desc>
11070 Slot number this adapter is plugged into. Corresponds to
11071 the value you pass to <link to="IMachine::getNetworkAdapter"/>
11072 to obtain this instance.
11073 </desc>
11074 </attribute>
11075
11076 <attribute name="enabled" type="boolean">
11077 <desc>
11078 Flag whether the network adapter is present in the
11079 guest system. If disabled, the virtual guest hardware will
11080 not contain this network adapter. Can only be changed when
11081 the VM is not running.
11082 </desc>
11083 </attribute>
11084
11085 <attribute name="MACAddress" type="wstring">
11086 <desc>
11087 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
11088 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
11089 </desc>
11090 </attribute>
11091
11092 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
11093
11094 <attribute name="hostInterface" type="wstring">
11095 <desc>
11096 Name of the host network interface the VM is attached to.
11097 </desc>
11098 </attribute>
11099
11100 <attribute name="internalNetwork" type="wstring">
11101 <desc>
11102 Name of the internal network the VM is attached to.
11103 </desc>
11104 </attribute>
11105
11106 <attribute name="NATNetwork" type="wstring">
11107 <desc>
11108 Name of the NAT network the VM is attached to.
11109 </desc>
11110 </attribute>
11111
11112 <attribute name="VDENetwork" type="wstring">
11113 <desc>
11114 Name of the VDE switch the VM is attached to.
11115 </desc>
11116 </attribute>
11117
11118 <attribute name="cableConnected" type="boolean">
11119 <desc>
11120 Flag whether the adapter reports the cable as connected or not.
11121 It can be used to report offline situations to a VM.
11122 </desc>
11123 </attribute>
11124
11125 <attribute name="lineSpeed" type="unsigned long">
11126 <desc>
11127 Line speed reported by custom drivers, in units of 1 kbps.
11128 </desc>
11129 </attribute>
11130
11131 <attribute name="traceEnabled" type="boolean">
11132 <desc>
11133 Flag whether network traffic from/to the network card should be traced.
11134 Can only be toggled when the VM is turned off.
11135 </desc>
11136 </attribute>
11137
11138 <attribute name="traceFile" type="wstring">
11139 <desc>
11140 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11141 will be used.
11142 </desc>
11143 </attribute>
11144
11145 <attribute name="natDriver" type="INATEngine" readonly="yes">
11146 <desc>
11147 Points to the NAT engine which handles the network address translation
11148 for this interface. This is active only when the interface actually uses
11149 NAT (see <link to="#attachToNAT" />).
11150 </desc>
11151 </attribute>
11152
11153 <attribute name="bootPriority" type="unsigned long">
11154 <desc>
11155 Network boot priority of the adapter. Priority 1 is highest. If not set,
11156 the priority is considered to be at the lowest possible setting.
11157 </desc>
11158 </attribute>
11159
11160 <method name="attachToNAT">
11161 <desc>
11162 Attach the network adapter to the Network Address Translation (NAT) interface.
11163 </desc>
11164 </method>
11165
11166 <method name="attachToBridgedInterface">
11167 <desc>
11168 Attach the network adapter to a bridged host interface.
11169 </desc>
11170 </method>
11171
11172 <method name="attachToInternalNetwork">
11173 <desc>
11174 Attach the network adapter to an internal network.
11175 </desc>
11176 </method>
11177
11178 <method name="attachToHostOnlyInterface">
11179 <desc>
11180 Attach the network adapter to the host-only network.
11181 </desc>
11182 </method>
11183
11184 <method name="attachToVDE">
11185 <desc>
11186 Attach the network adapter to a VDE network.
11187 </desc>
11188 </method>
11189
11190 <method name="detach">
11191 <desc>
11192 Detach the network adapter
11193 </desc>
11194 </method>
11195 </interface>
11196
11197
11198 <!--
11199 // ISerialPort
11200 /////////////////////////////////////////////////////////////////////////
11201 -->
11202
11203 <enum
11204 name="PortMode"
11205 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11206 >
11207 <desc>
11208 The PortMode enumeration represents possible communication modes for
11209 the virtual serial port device.
11210 </desc>
11211
11212 <const name="Disconnected" value="0">
11213 <desc>Virtual device is not attached to any real host device.</desc>
11214 </const>
11215 <const name="HostPipe" value="1">
11216 <desc>Virtual device is attached to a host pipe.</desc>
11217 </const>
11218 <const name="HostDevice" value="2">
11219 <desc>Virtual device is attached to a host device.</desc>
11220 </const>
11221 <const name="RawFile" value="3">
11222 <desc>Virtual device is attached to a raw file.</desc>
11223 </const>
11224 </enum>
11225
11226 <interface
11227 name="ISerialPort" extends="$unknown"
11228 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11229 wsmap="managed"
11230 >
11231
11232 <desc>
11233 The ISerialPort interface represents the virtual serial port device.
11234
11235 The virtual serial port device acts like an ordinary serial port
11236 inside the virtual machine. This device communicates to the real
11237 serial port hardware in one of two modes: host pipe or host device.
11238
11239 In host pipe mode, the #path attribute specifies the path to the pipe on
11240 the host computer that represents a serial port. The #server attribute
11241 determines if this pipe is created by the virtual machine process at
11242 machine startup or it must already exist before starting machine
11243 execution.
11244
11245 In host device mode, the #path attribute specifies the name of the
11246 serial port device on the host computer.
11247
11248 There is also a third communication mode: the disconnected mode. In this
11249 mode, the guest OS running inside the virtual machine will be able to
11250 detect the serial port, but all port write operations will be discarded
11251 and all port read operations will return no data.
11252
11253 <see>IMachine::getSerialPort</see>
11254 </desc>
11255
11256 <attribute name="slot" type="unsigned long" readonly="yes">
11257 <desc>
11258 Slot number this serial port is plugged into. Corresponds to
11259 the value you pass to <link to="IMachine::getSerialPort"/>
11260 to obtain this instance.
11261 </desc>
11262 </attribute>
11263
11264 <attribute name="enabled" type="boolean">
11265 <desc>
11266 Flag whether the serial port is enabled. If disabled,
11267 the serial port will not be reported to the guest OS.
11268 </desc>
11269 </attribute>
11270
11271 <attribute name="IOBase" type="unsigned long">
11272 <desc>Base I/O address of the serial port.</desc>
11273 </attribute>
11274
11275 <attribute name="IRQ" type="unsigned long">
11276 <desc>IRQ number of the serial port.</desc>
11277 </attribute>
11278
11279 <attribute name="hostMode" type="PortMode">
11280 <desc>
11281 How is this port connected to the host.
11282 <note>
11283 Changing this attribute may fail if the conditions for
11284 <link to="#path"/> are not met.
11285 </note>
11286 </desc>
11287 </attribute>
11288
11289 <attribute name="server" type="boolean">
11290 <desc>
11291 Flag whether this serial port acts as a server (creates a new pipe on
11292 the host) or as a client (uses the existing pipe). This attribute is
11293 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11294 </desc>
11295 </attribute>
11296
11297 <attribute name="path" type="wstring">
11298 <desc>
11299 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11300 PortMode_HostPipe, or the host serial device name when
11301 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11302 cases, setting a @c null or empty string as the attribute's value
11303 is an error. Otherwise, the value of this property is ignored.
11304 </desc>
11305 </attribute>
11306
11307 </interface>
11308
11309 <!--
11310 // IParallelPort
11311 /////////////////////////////////////////////////////////////////////////
11312 -->
11313
11314 <interface
11315 name="IParallelPort" extends="$unknown"
11316 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11317 wsmap="managed"
11318 >
11319
11320 <desc>
11321 The IParallelPort interface represents the virtual parallel port device.
11322
11323 The virtual parallel port device acts like an ordinary parallel port
11324 inside the virtual machine. This device communicates to the real
11325 parallel port hardware using the name of the parallel device on the host
11326 computer specified in the #path attribute.
11327
11328 Each virtual parallel port device is assigned a base I/O address and an
11329 IRQ number that will be reported to the guest operating system and used
11330 to operate the given parallel port from within the virtual machine.
11331
11332 <see>IMachine::getParallelPort</see>
11333 </desc>
11334
11335 <attribute name="slot" type="unsigned long" readonly="yes">
11336 <desc>
11337 Slot number this parallel port is plugged into. Corresponds to
11338 the value you pass to <link to="IMachine::getParallelPort"/>
11339 to obtain this instance.
11340 </desc>
11341 </attribute>
11342
11343 <attribute name="enabled" type="boolean">
11344 <desc>
11345 Flag whether the parallel port is enabled. If disabled,
11346 the parallel port will not be reported to the guest OS.
11347 </desc>
11348 </attribute>
11349
11350 <attribute name="IOBase" type="unsigned long">
11351 <desc>Base I/O address of the parallel port.</desc>
11352 </attribute>
11353
11354 <attribute name="IRQ" type="unsigned long">
11355 <desc>IRQ number of the parallel port.</desc>
11356 </attribute>
11357
11358 <attribute name="path" type="wstring">
11359 <desc>
11360 Host parallel device name. If this parallel port is enabled, setting a
11361 @c null or an empty string as this attribute's value will result into
11362 an error.
11363 </desc>
11364 </attribute>
11365
11366 </interface>
11367
11368
11369 <!--
11370 // IMachineDebugger
11371 /////////////////////////////////////////////////////////////////////////
11372 -->
11373
11374 <interface
11375 name="IMachineDebugger" extends="$unknown"
11376 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11377 wsmap="suppress"
11378 >
11379 <method name="resetStats">
11380 <desc>
11381 Reset VM statistics.
11382 </desc>
11383 <param name="pattern" type="wstring" dir="in">
11384 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11385 </param>
11386 </method>
11387
11388 <method name="dumpStats">
11389 <desc>
11390 Dumps VM statistics.
11391 </desc>
11392 <param name="pattern" type="wstring" dir="in">
11393 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11394 </param>
11395 </method>
11396
11397 <method name="getStats">
11398 <desc>
11399 Get the VM statistics in a XMLish format.
11400 </desc>
11401 <param name="pattern" type="wstring" dir="in">
11402 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11403 </param>
11404 <param name="withDescriptions" type="boolean" dir="in">
11405 <desc>Whether to include the descriptions.</desc>
11406 </param>
11407 <param name="stats" type="wstring" dir="out">
11408 <desc>The XML document containing the statistics.</desc>
11409 </param>
11410 </method>
11411
11412 <method name="injectNMI">
11413 <desc>
11414 Inject an NMI into a running VT-x/AMD-V VM.
11415 </desc>
11416 </method>
11417
11418 <attribute name="singlestep" type="boolean">
11419 <desc>Switch for enabling singlestepping.</desc>
11420 </attribute>
11421
11422 <attribute name="recompileUser" type="boolean">
11423 <desc>Switch for forcing code recompilation for user mode code.</desc>
11424 </attribute>
11425
11426 <attribute name="recompileSupervisor" type="boolean">
11427 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11428 </attribute>
11429
11430 <attribute name="PATMEnabled" type="boolean">
11431 <desc>Switch for enabling and disabling the PATM component.</desc>
11432 </attribute>
11433
11434 <attribute name="CSAMEnabled" type="boolean">
11435 <desc>Switch for enabling and disabling the CSAM component.</desc>
11436 </attribute>
11437
11438 <attribute name="logEnabled" type="boolean">
11439 <desc>Switch for enabling and disabling logging.</desc>
11440 </attribute>
11441
11442 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11443 <desc>
11444 Flag indicating whether the VM is currently making use of CPU hardware
11445 virtualization extensions.
11446 </desc>
11447 </attribute>
11448
11449 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11450 <desc>
11451 Flag indicating whether the VM is currently making use of the nested paging
11452 CPU hardware virtualization extension.
11453 </desc>
11454 </attribute>
11455
11456 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11457 <desc>
11458 Flag indicating whether the VM is currently making use of the VPID
11459 VT-x extension.
11460 </desc>
11461 </attribute>
11462
11463 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11464 <desc>
11465 Flag indicating whether the VM is currently making use of the Physical
11466 Address Extension CPU feature.
11467 </desc>
11468 </attribute>
11469
11470 <attribute name="virtualTimeRate" type="unsigned long">
11471 <desc>
11472 The rate at which the virtual time runs expressed as a percentage.
11473 The accepted range is 2% to 20000%.
11474 </desc>
11475 </attribute>
11476
11477 <!-- @todo method for setting log flags, groups and destination! -->
11478
11479 <attribute name="VM" type="unsigned long long" readonly="yes">
11480 <desc>
11481 Gets the VM handle. This is only for internal use while
11482 we carve the details of this interface.
11483 </desc>
11484 </attribute>
11485
11486 </interface>
11487
11488 <!--
11489 // IUSBController
11490 /////////////////////////////////////////////////////////////////////////
11491 -->
11492
11493 <interface
11494 name="IUSBController" extends="$unknown"
11495 uuid="6fdcccc5-abd3-4fec-9387-2ad3914fc4a8"
11496 wsmap="managed"
11497 >
11498 <attribute name="enabled" type="boolean">
11499 <desc>
11500 Flag whether the USB controller is present in the
11501 guest system. If disabled, the virtual guest hardware will
11502 not contain any USB controller. Can only be changed when
11503 the VM is powered off.
11504 </desc>
11505 </attribute>
11506
11507 <attribute name="enabledEhci" type="boolean">
11508 <desc>
11509 Flag whether the USB EHCI controller is present in the
11510 guest system. If disabled, the virtual guest hardware will
11511 not contain a USB EHCI controller. Can only be changed when
11512 the VM is powered off.
11513 </desc>
11514 </attribute>
11515
11516 <attribute name="proxyAvailable" type="boolean" readonly="yes">
11517 <desc>
11518 Flag whether there is an USB proxy available.
11519 </desc>
11520 </attribute>
11521
11522 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11523 <desc>
11524 USB standard version which the controller implements.
11525 This is a BCD which means that the major version is in the
11526 high byte and minor version is in the low byte.
11527 </desc>
11528 </attribute>
11529
11530 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11531 <desc>
11532 List of USB device filters associated with the machine.
11533
11534 If the machine is currently running, these filters are activated
11535 every time a new (supported) USB device is attached to the host
11536 computer that was not ignored by global filters
11537 (<link to="IHost::USBDeviceFilters"/>).
11538
11539 These filters are also activated when the machine is powered up.
11540 They are run against a list of all currently available USB
11541 devices (in states
11542 <link to="USBDeviceState_Available"/>,
11543 <link to="USBDeviceState_Busy"/>,
11544 <link to="USBDeviceState_Held"/>) that were not previously
11545 ignored by global filters.
11546
11547 If at least one filter matches the USB device in question, this
11548 device is automatically captured (attached to) the virtual USB
11549 controller of this machine.
11550
11551 <see>IUSBDeviceFilter, ::IUSBController</see>
11552 </desc>
11553 </attribute>
11554
11555 <method name="createDeviceFilter">
11556 <desc>
11557 Creates a new USB device filter. All attributes except
11558 the filter name are set to empty (any match),
11559 <i>active</i> is @c false (the filter is not active).
11560
11561 The created filter can then be added to the list of filters using
11562 <link to="#insertDeviceFilter"/>.
11563
11564 <result name="VBOX_E_INVALID_VM_STATE">
11565 The virtual machine is not mutable.
11566 </result>
11567
11568 <see>#deviceFilters</see>
11569 </desc>
11570 <param name="name" type="wstring" dir="in">
11571 <desc>
11572 Filter name. See <link to="IUSBDeviceFilter::name"/>
11573 for more info.
11574 </desc>
11575 </param>
11576 <param name="filter" type="IUSBDeviceFilter" dir="return">
11577 <desc>Created filter object.</desc>
11578 </param>
11579 </method>
11580
11581 <method name="insertDeviceFilter">
11582 <desc>
11583 Inserts the given USB device to the specified position
11584 in the list of filters.
11585
11586 Positions are numbered starting from <tt>0</tt>. If the specified
11587 position is equal to or greater than the number of elements in
11588 the list, the filter is added to the end of the collection.
11589
11590 <note>
11591 Duplicates are not allowed, so an attempt to insert a
11592 filter that is already in the collection, will return an
11593 error.
11594 </note>
11595
11596 <result name="VBOX_E_INVALID_VM_STATE">
11597 Virtual machine is not mutable.
11598 </result>
11599 <result name="E_INVALIDARG">
11600 USB device filter not created within this VirtualBox instance.
11601 </result>
11602 <result name="VBOX_E_INVALID_OBJECT_STATE">
11603 USB device filter already in list.
11604 </result>
11605
11606 <see>#deviceFilters</see>
11607 </desc>
11608 <param name="position" type="unsigned long" dir="in">
11609 <desc>Position to insert the filter to.</desc>
11610 </param>
11611 <param name="filter" type="IUSBDeviceFilter" dir="in">
11612 <desc>USB device filter to insert.</desc>
11613 </param>
11614 </method>
11615
11616 <method name="removeDeviceFilter">
11617 <desc>
11618 Removes a USB device filter from the specified position in the
11619 list of filters.
11620
11621 Positions are numbered starting from <tt>0</tt>. Specifying a
11622 position equal to or greater than the number of elements in
11623 the list will produce an error.
11624
11625 <see>#deviceFilters</see>
11626
11627 <result name="VBOX_E_INVALID_VM_STATE">
11628 Virtual machine is not mutable.
11629 </result>
11630 <result name="E_INVALIDARG">
11631 USB device filter list empty or invalid @a position.
11632 </result>
11633
11634 </desc>
11635 <param name="position" type="unsigned long" dir="in">
11636 <desc>Position to remove the filter from.</desc>
11637 </param>
11638 <param name="filter" type="IUSBDeviceFilter" dir="return">
11639 <desc>Removed USB device filter.</desc>
11640 </param>
11641 </method>
11642
11643 </interface>
11644
11645
11646 <!--
11647 // IUSBDevice
11648 /////////////////////////////////////////////////////////////////////////
11649 -->
11650
11651 <interface
11652 name="IUSBDevice" extends="$unknown"
11653 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11654 wsmap="managed"
11655 >
11656 <desc>
11657 The IUSBDevice interface represents a virtual USB device attached to the
11658 virtual machine.
11659
11660 A collection of objects implementing this interface is stored in the
11661 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11662 attached to a running virtual machine's USB controller.
11663 </desc>
11664
11665 <attribute name="id" type="uuid" mod="string" readonly="yes">
11666 <desc>
11667 Unique USB device ID. This ID is built from #vendorId,
11668 #productId, #revision and #serialNumber.
11669 </desc>
11670 </attribute>
11671
11672 <attribute name="vendorId" type="unsigned short" readonly="yes">
11673 <desc>Vendor ID.</desc>
11674 </attribute>
11675
11676 <attribute name="productId" type="unsigned short" readonly="yes">
11677 <desc>Product ID.</desc>
11678 </attribute>
11679
11680 <attribute name="revision" type="unsigned short" readonly="yes">
11681 <desc>
11682 Product revision number. This is a packed BCD represented as
11683 unsigned short. The high byte is the integer part and the low
11684 byte is the decimal.
11685 </desc>
11686 </attribute>
11687
11688 <attribute name="manufacturer" type="wstring" readonly="yes">
11689 <desc>Manufacturer string.</desc>
11690 </attribute>
11691
11692 <attribute name="product" type="wstring" readonly="yes">
11693 <desc>Product string.</desc>
11694 </attribute>
11695
11696 <attribute name="serialNumber" type="wstring" readonly="yes">
11697 <desc>Serial number string.</desc>
11698 </attribute>
11699
11700 <attribute name="address" type="wstring" readonly="yes">
11701 <desc>Host specific address of the device.</desc>
11702 </attribute>
11703
11704 <attribute name="port" type="unsigned short" readonly="yes">
11705 <desc>
11706 Host USB port number the device is physically
11707 connected to.
11708 </desc>
11709 </attribute>
11710
11711 <attribute name="version" type="unsigned short" readonly="yes">
11712 <desc>
11713 The major USB version of the device - 1 or 2.
11714 </desc>
11715 </attribute>
11716
11717 <attribute name="portVersion" type="unsigned short" readonly="yes">
11718 <desc>
11719 The major USB version of the host USB port the device is
11720 physically connected to - 1 or 2. For devices not connected to
11721 anything this will have the same value as the version attribute.
11722 </desc>
11723 </attribute>
11724
11725 <attribute name="remote" type="boolean" readonly="yes">
11726 <desc>
11727 Whether the device is physically connected to a remote VRDP
11728 client or to a local host machine.
11729 </desc>
11730 </attribute>
11731
11732 </interface>
11733
11734
11735 <!--
11736 // IUSBDeviceFilter
11737 /////////////////////////////////////////////////////////////////////////
11738 -->
11739
11740 <interface
11741 name="IUSBDeviceFilter" extends="$unknown"
11742 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11743 wsmap="managed"
11744 >
11745 <desc>
11746 The IUSBDeviceFilter interface represents an USB device filter used
11747 to perform actions on a group of USB devices.
11748
11749 This type of filters is used by running virtual machines to
11750 automatically capture selected USB devices once they are physically
11751 attached to the host computer.
11752
11753 A USB device is matched to the given device filter if and only if all
11754 attributes of the device match the corresponding attributes of the
11755 filter (that is, attributes are joined together using the logical AND
11756 operation). On the other hand, all together, filters in the list of
11757 filters carry the semantics of the logical OR operation. So if it is
11758 desirable to create a match like "this vendor id OR this product id",
11759 one needs to create two filters and specify "any match" (see below)
11760 for unused attributes.
11761
11762 All filter attributes used for matching are strings. Each string
11763 is an expression representing a set of values of the corresponding
11764 device attribute, that will match the given filter. Currently, the
11765 following filtering expressions are supported:
11766
11767 <ul>
11768 <li><i>Interval filters</i>. Used to specify valid intervals for
11769 integer device attributes (Vendor ID, Product ID and Revision).
11770 The format of the string is:
11771
11772 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11773
11774 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11775 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11776 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11777 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11778 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11779 possible integer is assumed.
11780 </li>
11781 <li><i>Boolean filters</i>. Used to specify acceptable values for
11782 boolean device attributes. The format of the string is:
11783
11784 <tt>true|false|yes|no|0|1</tt>
11785
11786 </li>
11787 <li><i>Exact match</i>. Used to specify a single value for the given
11788 device attribute. Any string that doesn't start with <tt>int:</tt>
11789 represents the exact match. String device attributes are compared to
11790 this string including case of symbols. Integer attributes are first
11791 converted to a string (see individual filter attributes) and then
11792 compared ignoring case.
11793
11794 </li>
11795 <li><i>Any match</i>. Any value of the corresponding device attribute
11796 will match the given filter. An empty or @c null string is
11797 used to construct this type of filtering expressions.
11798
11799 </li>
11800 </ul>
11801
11802 <note>
11803 On the Windows host platform, interval filters are not currently
11804 available. Also all string filter attributes
11805 (<link to="#manufacturer"/>, <link to="#product"/>,
11806 <link to="#serialNumber"/>) are ignored, so they behave as
11807 <i>any match</i> no matter what string expression is specified.
11808 </note>
11809
11810 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11811 </desc>
11812
11813 <attribute name="name" type="wstring">
11814 <desc>
11815 Visible name for this filter.
11816 This name is used to visually distinguish one filter from another,
11817 so it can neither be @c null nor an empty string.
11818 </desc>
11819 </attribute>
11820
11821 <attribute name="active" type="boolean">
11822 <desc>Whether this filter active or has been temporarily disabled.</desc>
11823 </attribute>
11824
11825 <attribute name="vendorId" type="wstring">
11826 <desc>
11827 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11828 The string representation for the <i>exact matching</i>
11829 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11830 (including leading zeroes).
11831 </desc>
11832 </attribute>
11833
11834 <attribute name="productId" type="wstring">
11835 <desc>
11836 <link to="IUSBDevice::productId">Product ID</link> filter.
11837 The string representation for the <i>exact matching</i>
11838 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11839 (including leading zeroes).
11840 </desc>
11841 </attribute>
11842
11843 <attribute name="revision" type="wstring">
11844 <desc>
11845 <link to="IUSBDevice::productId">Product revision number</link>
11846 filter. The string representation for the <i>exact matching</i>
11847 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11848 of the integer part of the revision, and <tt>F</tt> is the
11849 decimal digit of its fractional part (including leading and
11850 trailing zeros).
11851 Note that for interval filters, it's best to use the hexadecimal
11852 form, because the revision is stored as a 16 bit packed BCD value;
11853 so the expression <tt>int:0x0100-0x0199</tt> will match any
11854 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11855 </desc>
11856 </attribute>
11857
11858 <attribute name="manufacturer" type="wstring">
11859 <desc>
11860 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11861 </desc>
11862 </attribute>
11863
11864 <attribute name="product" type="wstring">
11865 <desc>
11866 <link to="IUSBDevice::product">Product</link> filter.
11867 </desc>
11868 </attribute>
11869
11870 <attribute name="serialNumber" type="wstring">
11871 <desc>
11872 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11873 </desc>
11874 </attribute>
11875
11876 <attribute name="port" type="wstring">
11877 <desc>
11878 <link to="IUSBDevice::port">Host USB port</link> filter.
11879 </desc>
11880 </attribute>
11881
11882 <attribute name="remote" type="wstring">
11883 <desc>
11884 <link to="IUSBDevice::remote">Remote state</link> filter.
11885 <note>
11886 This filter makes sense only for machine USB filters,
11887 i.e. it is ignored by IHostUSBDeviceFilter objects.
11888 </note>
11889 </desc>
11890 </attribute>
11891
11892 <attribute name="maskedInterfaces" type="unsigned long">
11893 <desc>
11894 This is an advanced option for hiding one or more USB interfaces
11895 from the guest. The value is a bit mask where the bits that are set
11896 means the corresponding USB interface should be hidden, masked off
11897 if you like.
11898 This feature only works on Linux hosts.
11899 </desc>
11900 </attribute>
11901
11902 </interface>
11903
11904
11905 <!--
11906 // IHostUSBDevice
11907 /////////////////////////////////////////////////////////////////////////
11908 -->
11909
11910 <enum
11911 name="USBDeviceState"
11912 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11913 >
11914 <desc>
11915 USB device state. This enumeration represents all possible states
11916 of the USB device physically attached to the host computer regarding
11917 its state on the host computer and availability to guest computers
11918 (all currently running virtual machines).
11919
11920 Once a supported USB device is attached to the host, global USB
11921 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11922 either ignore the device, or put it to USBDeviceState_Held state, or do
11923 nothing. Unless the device is ignored by global filters, filters of all
11924 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11925 activated that can put it to USBDeviceState_Captured state.
11926
11927 If the device was ignored by global filters, or didn't match
11928 any filters at all (including guest ones), it is handled by the host
11929 in a normal way. In this case, the device state is determined by
11930 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11931 or USBDeviceState_Available, depending on the current device usage.
11932
11933 Besides auto-capturing based on filters, the device can be manually
11934 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11935 state is USBDeviceState_Busy, USBDeviceState_Available or
11936 USBDeviceState_Held.
11937
11938 <note>
11939 Due to differences in USB stack implementations in Linux and Win32,
11940 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11941 only to the Linux version of the product. This also means that (<link
11942 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11943 device state is USBDeviceState_Held.
11944 </note>
11945
11946 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11947 </desc>
11948
11949 <const name="NotSupported" value="0">
11950 <desc>
11951 Not supported by the VirtualBox server, not available to guests.
11952 </desc>
11953 </const>
11954 <const name="Unavailable" value="1">
11955 <desc>
11956 Being used by the host computer exclusively,
11957 not available to guests.
11958 </desc>
11959 </const>
11960 <const name="Busy" value="2">
11961 <desc>
11962 Being used by the host computer, potentially available to guests.
11963 </desc>
11964 </const>
11965 <const name="Available" value="3">
11966 <desc>
11967 Not used by the host computer, available to guests (the host computer
11968 can also start using the device at any time).
11969 </desc>
11970 </const>
11971 <const name="Held" value="4">
11972 <desc>
11973 Held by the VirtualBox server (ignored by the host computer),
11974 available to guests.
11975 </desc>
11976 </const>
11977 <const name="Captured" value="5">
11978 <desc>
11979 Captured by one of the guest computers, not available
11980 to anybody else.
11981 </desc>
11982 </const>
11983 </enum>
11984
11985 <interface
11986 name="IHostUSBDevice" extends="IUSBDevice"
11987 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11988 wsmap="managed"
11989 >
11990 <desc>
11991 The IHostUSBDevice interface represents a physical USB device attached
11992 to the host computer.
11993
11994 Besides properties inherited from IUSBDevice, this interface adds the
11995 <link to="#state"/> property that holds the current state of the USB
11996 device.
11997
11998 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11999 </desc>
12000
12001 <attribute name="state" type="USBDeviceState" readonly="yes">
12002 <desc>
12003 Current state of the device.
12004 </desc>
12005 </attribute>
12006
12007 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
12008
12009 </interface>
12010
12011
12012 <!--
12013 // IHostUSBDeviceFilter
12014 /////////////////////////////////////////////////////////////////////////
12015 -->
12016
12017 <enum
12018 name="USBDeviceFilterAction"
12019 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
12020 >
12021 <desc>
12022 Actions for host USB device filters.
12023 <see>IHostUSBDeviceFilter, USBDeviceState</see>
12024 </desc>
12025
12026 <const name="Null" value="0">
12027 <desc>Null value (never used by the API).</desc>
12028 </const>
12029 <const name="Ignore" value="1">
12030 <desc>Ignore the matched USB device.</desc>
12031 </const>
12032 <const name="Hold" value="2">
12033 <desc>Hold the matched USB device.</desc>
12034 </const>
12035 </enum>
12036
12037 <interface
12038 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
12039 uuid="4cc70246-d74a-400f-8222-3900489c0374"
12040 wsmap="managed"
12041 >
12042 <desc>
12043 The IHostUSBDeviceFilter interface represents a global filter for a
12044 physical USB device used by the host computer. Used indirectly in
12045 <link to="IHost::USBDeviceFilters"/>.
12046
12047 Using filters of this type, the host computer determines the initial
12048 state of the USB device after it is physically attached to the
12049 host's USB controller.
12050
12051 <note>
12052 The <link to="IUSBDeviceFilter::remote"/> attribute is ignored by this type of
12053 filters, because it makes sense only for
12054 <link to="IUSBController::deviceFilters">machine USB filters</link>.
12055 </note>
12056
12057 <see>IHost::USBDeviceFilters</see>
12058 </desc>
12059
12060 <attribute name="action" type="USBDeviceFilterAction">
12061 <desc>
12062 Action performed by the host when an attached USB device
12063 matches this filter.
12064 </desc>
12065 </attribute>
12066
12067 </interface>
12068
12069 <!--
12070 // IAudioAdapter
12071 /////////////////////////////////////////////////////////////////////////
12072 -->
12073
12074 <enum
12075 name="AudioDriverType"
12076 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
12077 >
12078 <desc>
12079 Host audio driver type.
12080 </desc>
12081
12082 <const name="Null" value="0">
12083 <desc>Null value, also means "dummy audio driver".</desc>
12084 </const>
12085 <const name="WinMM" value="1">
12086 <desc>Windows multimedia (Windows hosts only).</desc>
12087 </const>
12088 <const name="OSS" value="2">
12089 <desc>Open Sound System (Linux hosts only).</desc>
12090 </const>
12091 <const name="ALSA" value="3">
12092 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
12093 </const>
12094 <const name="DirectSound" value="4">
12095 <desc>DirectSound (Windows hosts only).</desc>
12096 </const>
12097 <const name="CoreAudio" value="5">
12098 <desc>CoreAudio (Mac hosts only).</desc>
12099 </const>
12100 <const name="MMPM" value="6">
12101 <desc>Reserved for historical reasons.</desc>
12102 </const>
12103 <const name="Pulse" value="7">
12104 <desc>PulseAudio (Linux hosts only).</desc>
12105 </const>
12106 <const name="SolAudio" value="8">
12107 <desc>Solaris audio (Solaris hosts only).</desc>
12108 </const>
12109 </enum>
12110
12111 <enum
12112 name="AudioControllerType"
12113 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
12114 >
12115 <desc>
12116 Virtual audio controller type.
12117 </desc>
12118
12119 <const name="AC97" value="0"/>
12120 <const name="SB16" value="1"/>
12121 <const name="HDA" value="2"/>
12122 </enum>
12123
12124 <interface
12125 name="IAudioAdapter" extends="$unknown"
12126 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
12127 wsmap="managed"
12128 >
12129 <desc>
12130 The IAudioAdapter interface represents the virtual audio adapter of
12131 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
12132 </desc>
12133 <attribute name="enabled" type="boolean">
12134 <desc>
12135 Flag whether the audio adapter is present in the
12136 guest system. If disabled, the virtual guest hardware will
12137 not contain any audio adapter. Can only be changed when
12138 the VM is not running.
12139 </desc>
12140 </attribute>
12141 <attribute name="audioController" type="AudioControllerType">
12142 <desc>
12143 The audio hardware we emulate.
12144 </desc>
12145 </attribute>
12146 <attribute name="audioDriver" type="AudioDriverType">
12147 <desc>
12148 Audio driver the adapter is connected to. This setting
12149 can only be changed when the VM is not running.
12150 </desc>
12151 </attribute>
12152 </interface>
12153
12154 <!--
12155 // IVRDPServer
12156 /////////////////////////////////////////////////////////////////////////
12157 -->
12158
12159 <enum
12160 name="VRDPAuthType"
12161 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
12162 >
12163 <desc>
12164 VRDP authentication type.
12165 </desc>
12166
12167 <const name="Null" value="0">
12168 <desc>Null value, also means "no authentication".</desc>
12169 </const>
12170 <const name="External" value="1"/>
12171 <const name="Guest" value="2"/>
12172 </enum>
12173
12174 <interface
12175 name="IVRDPServer" extends="$unknown"
12176 uuid="7aeeb530-0b08-41fe-835d-9be9ec1dbe5c"
12177 wsmap="managed"
12178 >
12179 <attribute name="enabled" type="boolean">
12180 <desc>VRDP server status.</desc>
12181 </attribute>
12182
12183 <attribute name="ports" type="wstring">
12184 <desc>
12185 VRDP server port numbers. The server will try to bind to one of free ports from the list.
12186 <note>
12187 This is a string of comma separated TCP port numbers or port number ranges.
12188 Example <tt>5000,5010-5012,5015</tt>
12189 </note>
12190 </desc>
12191 </attribute>
12192
12193 <attribute name="netAddress" type="wstring">
12194 <desc>VRDP server address.</desc>
12195 </attribute>
12196
12197 <attribute name="authType" type="VRDPAuthType">
12198 <desc>VRDP authentication method.</desc>
12199 </attribute>
12200
12201 <attribute name="authTimeout" type="unsigned long">
12202 <desc>Timeout for guest authentication. Milliseconds.</desc>
12203 </attribute>
12204
12205 <attribute name="allowMultiConnection" type="boolean">
12206 <desc>
12207 Flag whether multiple simultaneous connections to the VM are permitted.
12208 Note that this will be replaced by a more powerful mechanism in the future.
12209 </desc>
12210 </attribute>
12211
12212 <attribute name="reuseSingleConnection" type="boolean">
12213 <desc>
12214 Flag whether the existing connection must be dropped and a new connection
12215 must be established by the VRDP server, when a new client connects in single
12216 connection mode.
12217 </desc>
12218 </attribute>
12219
12220 <attribute name="videoChannel" type="boolean">
12221 <desc>
12222 Flag whether RDP video channel is supported.
12223 </desc>
12224 </attribute>
12225
12226 <attribute name="videoChannelQuality" type="unsigned long">
12227 <desc>
12228 Image quality in percents.
12229 </desc>
12230 </attribute>
12231
12232 </interface>
12233
12234
12235 <!--
12236 // ISharedFolder
12237 /////////////////////////////////////////////////////////////////////////
12238 -->
12239
12240 <interface
12241 name="ISharedFolder" extends="$unknown"
12242 uuid="8388da11-b559-4574-a5b7-2bd7acd5cef8"
12243 wsmap="struct"
12244 >
12245 <desc>
12246 The ISharedFolder interface represents a folder in the host computer's
12247 file system accessible from the guest OS running inside a virtual
12248 machine using an associated logical name.
12249
12250 There are three types of shared folders:
12251 <ul>
12252 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12253 folders available to all virtual machines.</li>
12254 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12255 VM-specific shared folders available to the given virtual machine at
12256 startup.</li>
12257 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12258 VM-specific shared folders created in the session context (for
12259 example, when the virtual machine is running) and automatically
12260 discarded when the session is closed (the VM is powered off).</li>
12261 </ul>
12262
12263 Logical names of shared folders must be unique within the given scope
12264 (global, permanent or transient). However, they do not need to be unique
12265 across scopes. In this case, the definition of the shared folder in a
12266 more specific scope takes precedence over definitions in all other
12267 scopes. The order of precedence is (more specific to more general):
12268 <ol>
12269 <li>Transient definitions</li>
12270 <li>Permanent definitions</li>
12271 <li>Global definitions</li>
12272 </ol>
12273
12274 For example, if MyMachine has a shared folder named
12275 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12276 transient shared folder named <tt>C_DRIVE</tt> (that points
12277 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12278 of <tt>C_DRIVE</tt> in the guest OS so
12279 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12280 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12281 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12282 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12283 to <tt>C:\\</tt> if it still exists.
12284
12285 Note that permanent and transient shared folders of different machines
12286 are in different name spaces, so they don't overlap and don't need to
12287 have unique logical names.
12288
12289 <note>
12290 Global shared folders are not implemented in the current version of the
12291 product.
12292 </note>
12293 </desc>
12294
12295 <attribute name="name" type="wstring" readonly="yes">
12296 <desc>Logical name of the shared folder.</desc>
12297 </attribute>
12298
12299 <attribute name="hostPath" type="wstring" readonly="yes">
12300 <desc>Full path to the shared folder in the host file system.</desc>
12301 </attribute>
12302
12303 <attribute name="accessible" type="boolean" readonly="yes">
12304 <desc>
12305 Whether the folder defined by the host path is currently
12306 accessible or not.
12307 For example, the folder can be unaccessible if it is placed
12308 on the network share that is not available by the time
12309 this property is read.
12310 </desc>
12311 </attribute>
12312
12313 <attribute name="writable" type="boolean" readonly="yes">
12314 <desc>
12315 Whether the folder defined by the host path is writable or
12316 not.
12317 </desc>
12318 </attribute>
12319
12320 <attribute name="autoMount" type="boolean" readonly="yes">
12321 <desc>
12322 Whether the folder gets automatically mounted by the guest or not.
12323 </desc>
12324 </attribute>
12325
12326 <attribute name="lastAccessError" type="wstring" readonly="yes">
12327 <desc>
12328 Text message that represents the result of the last accessibility
12329 check.
12330
12331 Accessibility checks are performed each time the <link to="#accessible"/>
12332 attribute is read. An empty string is returned if the last
12333 accessibility check was successful. A non-empty string indicates a
12334 failure and should normally describe a reason of the failure (for
12335 example, a file read error).
12336 </desc>
12337 </attribute>
12338
12339 </interface>
12340
12341 <!--
12342 // ISession
12343 /////////////////////////////////////////////////////////////////////////
12344 -->
12345
12346 <interface
12347 name="IInternalSessionControl" extends="$unknown"
12348 uuid="ab161f72-e4b3-44e6-a919-2256474bda66"
12349 internal="yes"
12350 wsmap="suppress"
12351 >
12352 <method name="getPID">
12353 <desc>PID of the process that has created this Session object.
12354 </desc>
12355 <param name="pid" type="unsigned long" dir="return"/>
12356 </method>
12357
12358 <method name="getRemoteConsole">
12359 <desc>
12360 Returns the console object suitable for remote control.
12361
12362 <result name="VBOX_E_INVALID_VM_STATE">
12363 Session state prevents operation.
12364 </result>
12365 <result name="VBOX_E_INVALID_OBJECT_STATE">
12366 Session type prevents operation.
12367 </result>
12368
12369 </desc>
12370 <param name="console" type="IConsole" dir="return"/>
12371 </method>
12372
12373 <method name="assignMachine">
12374 <desc>
12375 Assigns the machine object associated with this direct-type
12376 session or informs the session that it will be a remote one
12377 (if @a machine == @c null).
12378
12379 <result name="VBOX_E_INVALID_VM_STATE">
12380 Session state prevents operation.
12381 </result>
12382 <result name="VBOX_E_INVALID_OBJECT_STATE">
12383 Session type prevents operation.
12384 </result>
12385
12386 </desc>
12387 <param name="machine" type="IMachine" dir="in"/>
12388 </method>
12389
12390 <method name="assignRemoteMachine">
12391 <desc>
12392 Assigns the machine and the (remote) console object associated with
12393 this remote-type session.
12394
12395 <result name="VBOX_E_INVALID_VM_STATE">
12396 Session state prevents operation.
12397 </result>
12398
12399 </desc>
12400 <param name="machine" type="IMachine" dir="in"/>
12401 <param name="console" type="IConsole" dir="in"/>
12402 </method>
12403
12404 <method name="updateMachineState">
12405 <desc>
12406 Updates the machine state in the VM process.
12407 Must be called only in certain cases
12408 (see the method implementation).
12409
12410 <result name="VBOX_E_INVALID_VM_STATE">
12411 Session state prevents operation.
12412 </result>
12413 <result name="VBOX_E_INVALID_OBJECT_STATE">
12414 Session type prevents operation.
12415 </result>
12416
12417 </desc>
12418 <param name="aMachineState" type="MachineState" dir="in"/>
12419 </method>
12420
12421 <method name="uninitialize">
12422 <desc>
12423 Uninitializes (closes) this session. Used by VirtualBox to close
12424 the corresponding remote session when the direct session dies
12425 or gets closed.
12426
12427 <result name="VBOX_E_INVALID_VM_STATE">
12428 Session state prevents operation.
12429 </result>
12430
12431 </desc>
12432 </method>
12433
12434 <method name="onNetworkAdapterChange">
12435 <desc>
12436 Triggered when settings of a network adapter of the
12437 associated virtual machine have changed.
12438
12439 <result name="VBOX_E_INVALID_VM_STATE">
12440 Session state prevents operation.
12441 </result>
12442 <result name="VBOX_E_INVALID_OBJECT_STATE">
12443 Session type prevents operation.
12444 </result>
12445
12446 </desc>
12447 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12448 <param name="changeAdapter" type="boolean" dir="in"/>
12449 </method>
12450
12451 <method name="onSerialPortChange">
12452 <desc>
12453 Triggered when settings of a serial port of the
12454 associated virtual machine have changed.
12455
12456 <result name="VBOX_E_INVALID_VM_STATE">
12457 Session state prevents operation.
12458 </result>
12459 <result name="VBOX_E_INVALID_OBJECT_STATE">
12460 Session type prevents operation.
12461 </result>
12462
12463 </desc>
12464 <param name="serialPort" type="ISerialPort" dir="in"/>
12465 </method>
12466
12467 <method name="onParallelPortChange">
12468 <desc>
12469 Triggered when settings of a parallel port of the
12470 associated virtual machine have changed.
12471
12472 <result name="VBOX_E_INVALID_VM_STATE">
12473 Session state prevents operation.
12474 </result>
12475 <result name="VBOX_E_INVALID_OBJECT_STATE">
12476 Session type prevents operation.
12477 </result>
12478
12479 </desc>
12480 <param name="parallelPort" type="IParallelPort" dir="in"/>
12481 </method>
12482
12483 <method name="onStorageControllerChange">
12484 <desc>
12485 Triggered when settings of a storage controller of the
12486 associated virtual machine have changed.
12487
12488 <result name="VBOX_E_INVALID_VM_STATE">
12489 Session state prevents operation.
12490 </result>
12491 <result name="VBOX_E_INVALID_OBJECT_STATE">
12492 Session type prevents operation.
12493 </result>
12494
12495 </desc>
12496 </method>
12497
12498 <method name="onMediumChange">
12499 <desc>
12500 Triggered when attached media of the
12501 associated virtual machine have changed.
12502
12503 <result name="VBOX_E_INVALID_VM_STATE">
12504 Session state prevents operation.
12505 </result>
12506 <result name="VBOX_E_INVALID_OBJECT_STATE">
12507 Session type prevents operation.
12508 </result>
12509
12510 </desc>
12511
12512 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12513 <param name="force" type="boolean" dir="in"/>
12514 </method>
12515
12516 <method name="onCPUChange">
12517 <desc>
12518 Notification when a CPU changes.
12519 </desc>
12520 <param name="cpu" type="unsigned long" dir="in">
12521 <desc>The CPU which changed</desc>
12522 </param>
12523 <param name="add" type="boolean" dir="in">
12524 <desc>Flag whether the CPU was added or removed</desc>
12525 </param>
12526 </method>
12527
12528 <method name="onVRDPServerChange">
12529 <desc>
12530 Triggered when settings of the VRDP server object of the
12531 associated virtual machine have changed.
12532
12533 <result name="VBOX_E_INVALID_VM_STATE">
12534 Session state prevents operation.
12535 </result>
12536 <result name="VBOX_E_INVALID_OBJECT_STATE">
12537 Session type prevents operation.
12538 </result>
12539
12540 </desc>
12541 <param name="restart" type="boolean" dir="in">
12542 <desc>Flag whether the server must be restarted</desc>
12543 </param>
12544 </method>
12545
12546 <method name="onUSBControllerChange">
12547 <desc>
12548 Triggered when settings of the USB controller object of the
12549 associated virtual machine have changed.
12550
12551 <result name="VBOX_E_INVALID_VM_STATE">
12552 Session state prevents operation.
12553 </result>
12554 <result name="VBOX_E_INVALID_OBJECT_STATE">
12555 Session type prevents operation.
12556 </result>
12557
12558 </desc>
12559 </method>
12560
12561 <method name="onSharedFolderChange">
12562 <desc>
12563 Triggered when a permanent (global or machine) shared folder has been
12564 created or removed.
12565 <note>
12566 We don't pass shared folder parameters in this notification because
12567 the order in which parallel notifications are delivered is not defined,
12568 therefore it could happen that these parameters were outdated by the
12569 time of processing this notification.
12570 </note>
12571
12572 <result name="VBOX_E_INVALID_VM_STATE">
12573 Session state prevents operation.
12574 </result>
12575 <result name="VBOX_E_INVALID_OBJECT_STATE">
12576 Session type prevents operation.
12577 </result>
12578
12579 </desc>
12580 <param name="global" type="boolean" dir="in"/>
12581 </method>
12582
12583 <method name="onUSBDeviceAttach">
12584 <desc>
12585 Triggered when a request to capture a USB device (as a result
12586 of matched USB filters or direct call to
12587 <link to="IConsole::attachUSBDevice"/>) has completed.
12588 A @c null @a error object means success, otherwise it
12589 describes a failure.
12590
12591 <result name="VBOX_E_INVALID_VM_STATE">
12592 Session state prevents operation.
12593 </result>
12594 <result name="VBOX_E_INVALID_OBJECT_STATE">
12595 Session type prevents operation.
12596 </result>
12597
12598 </desc>
12599 <param name="device" type="IUSBDevice" dir="in"/>
12600 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12601 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12602 </method>
12603
12604 <method name="onUSBDeviceDetach">
12605 <desc>
12606 Triggered when a request to release the USB device (as a result
12607 of machine termination or direct call to
12608 <link to="IConsole::detachUSBDevice"/>) has completed.
12609 A @c null @a error object means success, otherwise it
12610 describes a failure.
12611
12612 <result name="VBOX_E_INVALID_VM_STATE">
12613 Session state prevents operation.
12614 </result>
12615 <result name="VBOX_E_INVALID_OBJECT_STATE">
12616 Session type prevents operation.
12617 </result>
12618
12619 </desc>
12620 <param name="id" type="uuid" mod="string" dir="in"/>
12621 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12622 </method>
12623
12624 <method name="onShowWindow">
12625 <desc>
12626 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12627 <link to="IMachine::showConsoleWindow"/> in order to notify
12628 console listeners
12629 <link to="ICanShowWindowEvent"/>
12630 and <link to="IShowWindowEvent"/>.
12631
12632 <result name="VBOX_E_INVALID_OBJECT_STATE">
12633 Session type prevents operation.
12634 </result>
12635
12636 </desc>
12637 <param name="check" type="boolean" dir="in"/>
12638 <param name="canShow" type="boolean" dir="out"/>
12639 <param name="winId" type="unsigned long long" dir="out"/>
12640 </method>
12641
12642 <method name="accessGuestProperty">
12643 <desc>
12644 Called by <link to="IMachine::getGuestProperty"/> and by
12645 <link to="IMachine::setGuestProperty"/> in order to read and
12646 modify guest properties.
12647
12648 <result name="VBOX_E_INVALID_VM_STATE">
12649 Machine session is not open.
12650 </result>
12651 <result name="VBOX_E_INVALID_OBJECT_STATE">
12652 Session type is not direct.
12653 </result>
12654
12655 </desc>
12656 <param name="name" type="wstring" dir="in"/>
12657 <param name="value" type="wstring" dir="in"/>
12658 <param name="flags" type="wstring" dir="in"/>
12659 <param name="isSetter" type="boolean" dir="in"/>
12660 <param name="retValue" type="wstring" dir="out"/>
12661 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12662 <param name="retFlags" type="wstring" dir="out"/>
12663 </method>
12664
12665 <method name="enumerateGuestProperties">
12666 <desc>
12667 Return a list of the guest properties matching a set of patterns along
12668 with their values, time stamps and flags.
12669
12670 <result name="VBOX_E_INVALID_VM_STATE">
12671 Machine session is not open.
12672 </result>
12673 <result name="VBOX_E_INVALID_OBJECT_STATE">
12674 Session type is not direct.
12675 </result>
12676
12677 </desc>
12678 <param name="patterns" type="wstring" dir="in">
12679 <desc>
12680 The patterns to match the properties against as a comma-separated
12681 string. If this is empty, all properties currently set will be
12682 returned.
12683 </desc>
12684 </param>
12685 <param name="key" type="wstring" dir="out" safearray="yes">
12686 <desc>
12687 The key names of the properties returned.
12688 </desc>
12689 </param>
12690 <param name="value" type="wstring" dir="out" safearray="yes">
12691 <desc>
12692 The values of the properties returned. The array entries match the
12693 corresponding entries in the @a key array.
12694 </desc>
12695 </param>
12696 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12697 <desc>
12698 The time stamps of the properties returned. The array entries match
12699 the corresponding entries in the @a key array.
12700 </desc>
12701 </param>
12702 <param name="flags" type="wstring" dir="out" safearray="yes">
12703 <desc>
12704 The flags of the properties returned. The array entries match the
12705 corresponding entries in the @a key array.
12706 </desc>
12707 </param>
12708 </method>
12709
12710 <method name="onlineMergeMedium">
12711 <desc>
12712 Triggers online merging of a hard disk. Used internally when deleting
12713 a snapshot while a VM referring to the same hard disk chain is running.
12714
12715 <result name="VBOX_E_INVALID_VM_STATE">
12716 Machine session is not open.
12717 </result>
12718 <result name="VBOX_E_INVALID_OBJECT_STATE">
12719 Session type is not direct.
12720 </result>
12721
12722 </desc>
12723 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
12724 <desc>The medium attachment to identify the medium chain.</desc>
12725 </param>
12726 <param name="sourceIdx" type="unsigned long" dir="in">
12727 <desc>The index of the source image in the chain.
12728 Redundant, but drastically reduces IPC.</desc>
12729 </param>
12730 <param name="targetIdx" type="unsigned long" dir="in">
12731 <desc>The index of the target image in the chain.
12732 Redundant, but drastically reduces IPC.</desc>
12733 </param>
12734 <param name="source" type="IMedium" dir="in">
12735 <desc>Merge source medium.</desc>
12736 </param>
12737 <param name="target" type="IMedium" dir="in">
12738 <desc>Merge target medium.</desc>
12739 </param>
12740 <param name="mergeForward" type="boolean" dir="in">
12741 <desc>Merge direction.</desc>
12742 </param>
12743 <param name="parentForTarget" type="IMedium" dir="in">
12744 <desc>For forward merges: new parent for target medium.</desc>
12745 </param>
12746 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
12747 <desc>For backward merges: list of media which need their parent UUID
12748 updated.</desc>
12749 </param>
12750 <param name="progress" type="IProgress" dir="in">
12751 <desc>
12752 Progress object for this operation.
12753 </desc>
12754 </param>
12755 </method>
12756
12757 </interface>
12758
12759 <interface
12760 name="ISession" extends="$unknown"
12761 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12762 wsmap="managed"
12763 >
12764 <desc>
12765 The ISession interface represents a serialization primitive for virtual
12766 machines. Any caller wishing to manipulate a virtual machine (represented
12767 by an IMachine object) needs to create a session object first, which lives
12768 in its own process space. Such session objects are then attached to the
12769 <link to="IMachine" /> objects living in the VirtualBox server process to
12770 coordinate possibly conflicting changes.
12771
12772 There are two typical scenarios in which sessions are used:
12773
12774 <ul>
12775 <li>To alter machine settings, one needs to lock a machine for a given session
12776 (client process) by calling <link to="IMachine::lockMachine"/>. While a
12777 machine is thus locked, no any other process may lock the machine again.
12778
12779 The same applies for any process which indends to actually run a virtual
12780 machine in its own context, such as the VirtualBox GUI or VBoxHeadless
12781 executables. They must also lock a machine for their own sessions before
12782 being allowed to power up the virtual machine.
12783
12784 As a result, no machine can be altered while another process is already
12785 using it, either because that process is modifying machine settings or
12786 because the machine is running.
12787 </li>
12788 <li>
12789 To initiate virtual machine execution using one of the existing VirtualBox
12790 front-ends (e.g. the GUI or VBoxHeadless), one would instead call
12791 <link to="IMachine::launchVMProcess"/>, which also requires a session
12792 object as its first parameter. This session then identifies the caller
12793 and lets the caller control the started machine (for example, pause machine
12794 execution or power it down) as well as be notified about machine execution
12795 state changes.
12796 </li>
12797 </ul>
12798
12799 How sessions objects are used depends on whether you use the Main API
12800 via COM or via the webservice:
12801
12802 <ul>
12803 <li>When using the COM API directly, an object of the Session class from the
12804 VirtualBox type library needs to be created. In regular COM C++ client code,
12805 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12806 This object will then act as a local session object in further calls to open
12807 a session.
12808 </li>
12809
12810 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12811 a session object automatically whenever <link to="IWebsessionManager::logon" />
12812 is called. A managed object reference to that session object can be retrieved by
12813 calling <link to="IWebsessionManager::getSessionObject" />.
12814 </li>
12815 </ul>
12816 </desc>
12817
12818 <attribute name="state" type="SessionState" readonly="yes">
12819 <desc>Current state of this session.</desc>
12820 </attribute>
12821
12822 <attribute name="type" type="SessionType" readonly="yes">
12823 <desc>
12824 Type of this session. The value of this attribute is valid only
12825 if the session is currently open (i.e. its <link to="#state" /> is
12826 SessionState_SessionOpen), otherwise an error will be returned.
12827 </desc>
12828 </attribute>
12829
12830 <attribute name="machine" type="IMachine" readonly="yes">
12831 <desc>Machine object associated with this session.</desc>
12832 </attribute>
12833
12834 <attribute name="console" type="IConsole" readonly="yes">
12835 <desc>Console object associated with this session.</desc>
12836 </attribute>
12837
12838 <method name="close">
12839 <desc>
12840 Closes a session that was previously opened.
12841
12842 Calling this method is eventually required every time a machine has been
12843 locked for a particular session using the <link to="IMachine::launchVMProcess" />
12844 or <link to="IMachine::lockMachine" />) calls. Otherwise the state of
12845 the machine will be set to <link to="MachineState_Aborted" /> on the
12846 server, and changes made to the machine settings will be lost.
12847
12848 Generally, it is recommended to close all open sessions explicitly
12849 before terminating the application (regardless of the reason for
12850 the termination).
12851
12852 <note>
12853 Do not expect the session state (<link to="ISession::state" />
12854 to return to "Closed" immediately after you invoke
12855 ISession::close(), particularly if you have started a remote
12856 session to execute the VM in a new process. The session state will
12857 automatically return to "Closed" once the VM is no longer executing,
12858 which can of course take a very long time.
12859 </note>
12860
12861 <result name="E_UNEXPECTED">
12862 Session is not open.
12863 </result>
12864
12865 </desc>
12866 </method>
12867
12868 </interface>
12869
12870 <!--
12871 // IStorageController
12872 /////////////////////////////////////////////////////////////////////////
12873 -->
12874
12875 <enum
12876 name="StorageBus"
12877 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
12878 >
12879 <desc>
12880 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy);
12881 see <link to="IStorageController::bus" />.
12882 </desc>
12883 <const name="Null" value="0">
12884 <desc>@c null value. Never used by the API.</desc>
12885 </const>
12886 <const name="IDE" value="1"/>
12887 <const name="SATA" value="2"/>
12888 <const name="SCSI" value="3"/>
12889 <const name="Floppy" value="4"/>
12890 <const name="SAS" value="5"/>
12891 </enum>
12892
12893 <enum
12894 name="StorageControllerType"
12895 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
12896 >
12897 <desc>
12898 The exact variant of storage controller hardware presented
12899 to the guest; see <link to="IStorageController::controllerType" />.
12900 </desc>
12901
12902 <const name="Null" value="0">
12903 <desc>@c null value. Never used by the API.</desc>
12904 </const>
12905 <const name="LsiLogic" value="1">
12906 <desc>A SCSI controller of the LsiLogic variant.</desc>
12907 </const>
12908 <const name="BusLogic" value="2">
12909 <desc>A SCSI controller of the BusLogic variant.</desc>
12910 </const>
12911 <const name="IntelAhci" value="3">
12912 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
12913 </const>
12914 <const name="PIIX3" value="4">
12915 <desc>An IDE controller of the PIIX3 variant.</desc>
12916 </const>
12917 <const name="PIIX4" value="5">
12918 <desc>An IDE controller of the PIIX4 variant.</desc>
12919 </const>
12920 <const name="ICH6" value="6">
12921 <desc>An IDE controller of the ICH6 variant.</desc>
12922 </const>
12923 <const name="I82078" value="7">
12924 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
12925 </const>
12926 <const name="LsiLogicSas" value="8">
12927 <desc>A variant of the LsiLogic controller using SAS.</desc>
12928 </const>
12929 </enum>
12930
12931 <interface
12932 name="IStorageController" extends="$unknown"
12933 uuid="fd93adc0-bbaa-4256-9e6e-00e29f9151c9"
12934 wsmap="managed"
12935 >
12936 <desc>
12937 Represents a storage controller that is attached to a virtual machine
12938 (<link to="IMachine" />). Just as drives (hard disks, DVDs, FDs) are
12939 attached to storage controllers in a real computer, virtual drives
12940 (represented by <link to="IMediumAttachment" />) are attached to virtual
12941 storage controllers, represented by this interface.
12942
12943 As opposed to physical hardware, VirtualBox has a very generic concept
12944 of a storage controller, and for purposes of the Main API, all virtual
12945 storage is attached to virtual machines via instances of this interface.
12946 There are five types of such virtual storage controllers: IDE, SCSI, SATA,
12947 SAS and Floppy (see <link to="#bus" />). Depending on which of these four
12948 is used, certain sub-types may be available and can be selected in
12949 <link to="#controllerType" />.
12950
12951 Depending on these settings, the guest operating system might see
12952 significantly different virtual hardware.
12953 </desc>
12954
12955 <attribute name="name" type="wstring" readonly="yes">
12956 <desc>
12957 Name of the storage controller, as originally specified with
12958 <link to="IMachine::addStorageController" />. This then uniquely
12959 identifies this controller with other method calls such as
12960 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
12961 </desc>
12962 </attribute>
12963
12964 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12965 <desc>
12966 Maximum number of devices which can be attached to one port.
12967 </desc>
12968 </attribute>
12969
12970 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12971 <desc>
12972 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12973 </desc>
12974 </attribute>
12975
12976 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12977 <desc>
12978 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12979 </desc>
12980 </attribute>
12981
12982 <attribute name="instance" type="unsigned long">
12983 <desc>
12984 The instance number of the device in the running VM.
12985 </desc>
12986 </attribute>
12987
12988 <attribute name="portCount" type="unsigned long">
12989 <desc>
12990 The number of currently usable ports on the controller.
12991 The minimum and maximum number of ports for one controller are
12992 stored in <link to="IStorageController::minPortCount"/>
12993 and <link to="IStorageController::maxPortCount"/>.
12994 </desc>
12995 </attribute>
12996
12997 <attribute name="bus" type="StorageBus" readonly="yes">
12998 <desc>
12999 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy).
13000 </desc>
13001 </attribute>
13002
13003 <attribute name="controllerType" type="StorageControllerType">
13004 <desc>
13005 The exact variant of storage controller hardware presented
13006 to the guest.
13007 Depending on this value, VirtualBox will provide a different
13008 virtual storage controller hardware to the guest.
13009 For SATA, SAS and floppy controllers, only one variant is
13010 available, but for IDE and SCSI, there are several.
13011
13012 For SCSI controllers, the default type is LsiLogic.
13013 </desc>
13014 </attribute>
13015
13016 <attribute name="useHostIOCache" type="boolean">
13017 <desc>
13018 If true, the storage controller emulation will use a dedicated I/O thread, enable the host I/O
13019 caches and use synchronous file APIs on the host. This was the only option in the API before
13020 VirtualBox 3.2 and is still the default for IDE controllers.
13021
13022 If false, the host I/O cache will be disabled for image files attached to this storage controller.
13023 Instead, the storage controller emulation will use asynchronous I/O APIs on the host. This makes
13024 it possible to turn off the host I/O caches because the emulation can handle unaligned access to
13025 the file. This should be used on OS X and Linux hosts if a high I/O load is expected or many
13026 virtual machines are running at the same time to prevent I/O cache related hangs.
13027 This option new with the API of VirtualBox 3.2 and is now the default for non-IDE storage controllers.
13028 </desc>
13029 </attribute>
13030
13031 <method name="getIDEEmulationPort">
13032 <desc>
13033 Gets the corresponding port number which is emulated as an IDE device.
13034 Works only with SATA controllers.
13035
13036 <result name="E_INVALIDARG">
13037 The @a devicePosition is not in the range 0 to 3.
13038 </result>
13039 <result name="E_NOTIMPL">
13040 The storage controller type is not SATAIntelAhci.
13041 </result>
13042
13043 </desc>
13044 <param name="devicePosition" type="long" dir="in"/>
13045 <param name="portNumber" type="long" dir="return"/>
13046 </method>
13047
13048 <method name="setIDEEmulationPort">
13049 <desc>
13050 Sets the port number which is emulated as an IDE device.
13051 Works only with SATA controllers.
13052
13053 <result name="E_INVALIDARG">
13054 The @a devicePosition is not in the range 0 to 3 or the
13055 @a portNumber is not in the range 0 to 29.
13056 </result>
13057 <result name="E_NOTIMPL">
13058 The storage controller type is not SATAIntelAhci.
13059 </result>
13060
13061 </desc>
13062 <param name="devicePosition" type="long" dir="in"/>
13063 <param name="portNumber" type="long" dir="in"/>
13064 </method>
13065
13066 </interface>
13067
13068<if target="wsdl">
13069
13070 <!--
13071 // IManagedObjectRef
13072 /////////////////////////////////////////////////////////////////////////
13073 -->
13074
13075 <interface
13076 name="IManagedObjectRef" extends="$unknown"
13077 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
13078 internal="yes"
13079 wsmap="managed"
13080 wscpp="hardcoded"
13081 >
13082 <desc>
13083 Managed object reference.
13084
13085 Only within the webservice, a managed object reference (which is really
13086 an opaque number) allows a webservice client to address an object
13087 that lives in the address space of the webservice server.
13088
13089 Behind each managed object reference, there is a COM object that lives
13090 in the webservice server's address space. The COM object is not freed
13091 until the managed object reference is released, either by an explicit
13092 call to <link to="IManagedObjectRef::release" /> or by logging off from
13093 the webservice (<link to="IWebsessionManager::logoff" />), which releases
13094 all objects created during the webservice session.
13095
13096 Whenever a method call of the VirtualBox API returns a COM object, the
13097 webservice representation of that method will instead return a
13098 managed object reference, which can then be used to invoke methods
13099 on that object.
13100 </desc>
13101
13102 <method name="getInterfaceName">
13103 <desc>
13104 Returns the name of the interface that this managed object represents,
13105 for example, "IMachine", as a string.
13106 </desc>
13107 <param name="return" type="wstring" dir="return"/>
13108 </method>
13109
13110 <method name="release">
13111 <desc>
13112 Releases this managed object reference and frees the resources that
13113 were allocated for it in the webservice server process. After calling
13114 this method, the identifier of the reference can no longer be used.
13115 </desc>
13116 </method>
13117
13118 </interface>
13119
13120 <!--
13121 // IWebsessionManager
13122 /////////////////////////////////////////////////////////////////////////
13123 -->
13124
13125 <interface
13126 name="IWebsessionManager" extends="$unknown"
13127 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
13128 internal="yes"
13129 wsmap="global"
13130 wscpp="hardcoded"
13131 >
13132 <desc>
13133 Websession manager. This provides essential services
13134 to webservice clients.
13135 </desc>
13136 <method name="logon">
13137 <desc>
13138 Logs a new client onto the webservice and returns a managed object reference to
13139 the IVirtualBox instance, which the client can then use as a basis to further
13140 queries, since all calls to the VirtualBox API are based on the IVirtualBox
13141 interface, in one way or the other.
13142 </desc>
13143 <param name="username" type="wstring" dir="in"/>
13144 <param name="password" type="wstring" dir="in"/>
13145 <param name="return" type="IVirtualBox" dir="return"/>
13146 </method>
13147
13148 <method name="getSessionObject">
13149 <desc>
13150 Returns a managed object reference to the internal ISession object that was created
13151 for this web service session when the client logged on.
13152
13153 <see>ISession</see>
13154 </desc>
13155 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13156 <param name="return" type="ISession" dir="return"/>
13157 </method>
13158
13159 <method name="logoff">
13160 <desc>
13161 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
13162 and destroys all resources associated with the session (most importantly, all
13163 managed objects created in the server while the session was active).
13164 </desc>
13165 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13166 </method>
13167
13168 </interface>
13169
13170</if>
13171
13172 <!--
13173 // IPerformanceCollector & friends
13174 /////////////////////////////////////////////////////////////////////////
13175 -->
13176
13177 <interface
13178 name="IPerformanceMetric" extends="$unknown"
13179 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
13180 >
13181 <desc>
13182 The IPerformanceMetric interface represents parameters of the given
13183 performance metric.
13184 </desc>
13185
13186 <attribute name="metricName" type="wstring" readonly="yes">
13187 <desc>
13188 Name of the metric.
13189 </desc>
13190 </attribute>
13191
13192 <attribute name="object" type="$unknown" readonly="yes">
13193 <desc>
13194 Object this metric belongs to.
13195 </desc>
13196 </attribute>
13197
13198 <attribute name="description" type="wstring" readonly="yes">
13199 <desc>
13200 Textual description of the metric.
13201 </desc>
13202 </attribute>
13203
13204 <attribute name="period" type="unsigned long" readonly="yes">
13205 <desc>
13206 Time interval between samples, measured in seconds.
13207 </desc>
13208 </attribute>
13209
13210 <attribute name="count" type="unsigned long" readonly="yes">
13211 <desc>
13212 Number of recent samples retained by the performance collector for this
13213 metric.
13214
13215 When the collected sample count exceeds this number, older samples
13216 are discarded.
13217 </desc>
13218 </attribute>
13219
13220 <attribute name="unit" type="wstring" readonly="yes">
13221 <desc>
13222 Unit of measurement.
13223 </desc>
13224 </attribute>
13225
13226 <attribute name="minimumValue" type="long" readonly="yes">
13227 <desc>
13228 Minimum possible value of this metric.
13229 </desc>
13230 </attribute>
13231
13232 <attribute name="maximumValue" type="long" readonly="yes">
13233 <desc>
13234 Maximum possible value of this metric.
13235 </desc>
13236 </attribute>
13237 </interface>
13238
13239 <interface
13240 name="IPerformanceCollector" extends="$unknown"
13241 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
13242 wsmap="managed"
13243 >
13244 <desc>
13245 The IPerformanceCollector interface represents a service that collects
13246 and stores performance metrics data.
13247
13248 Performance metrics are associated with objects of interfaces like IHost
13249 and IMachine. Each object has a distinct set of performance metrics. The
13250 set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
13251
13252 Metric data is collected at the specified intervals and is retained
13253 internally. The interval and the number of retained samples can be set
13254 with <link to="IPerformanceCollector::setupMetrics" />. Both metric data
13255 and collection settings are not persistent, they are discarded as soon as
13256 VBoxSVC process terminates. Moreover, metric settings and data associated
13257 with a particular VM only exist while VM is running. They disappear as
13258 soon as VM shuts down. It is not possible to set up metrics for machines
13259 that are powered off. One needs to start VM first, then set up metric
13260 collection parameters.
13261
13262 Metrics are organized hierarchically, with each level separated by a
13263 slash (/) character. Generally, the scheme for metric names is like this:
13264
13265 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
13266
13267 "Category/Metric" together form the base metric name. A base metric is
13268 the smallest unit for which a sampling interval and the number of
13269 retained samples can be set. Only base metrics can be enabled and
13270 disabled. All sub-metrics are collected when their base metric is
13271 collected. Collected values for any set of sub-metrics can be queried
13272 with <link to="IPerformanceCollector::queryMetricsData" />.
13273
13274 For example "CPU/Load/User:avg" metric name stands for the "CPU"
13275 category, "Load" metric, "User" submetric, "average" aggregate. An
13276 aggregate function is computed over all retained data. Valid aggregate
13277 functions are:
13278
13279 <ul>
13280 <li>avg -- average</li>
13281 <li>min -- minimum</li>
13282 <li>max -- maximum</li>
13283 </ul>
13284
13285 When setting up metric parameters, querying metric data, enabling or
13286 disabling metrics wildcards can be used in metric names to specify a
13287 subset of metrics. For example, to select all CPU-related metrics
13288 use <tt>CPU/*</tt>, all averages can be queried using <tt>*:avg</tt> and
13289 so on. To query metric values without aggregates <tt>*:</tt> can be used.
13290
13291 The valid names for base metrics are:
13292
13293 <ul>
13294 <li>CPU/Load</li>
13295 <li>CPU/MHz</li>
13296 <li>RAM/Usage</li>
13297 </ul>
13298
13299 The general sequence for collecting and retrieving the metrics is:
13300 <ul>
13301 <li>
13302 Obtain an instance of IPerformanceCollector with
13303 <link to="IVirtualBox::performanceCollector" />
13304 </li>
13305 <li>
13306 Allocate and populate an array with references to objects the metrics
13307 will be collected for. Use references to IHost and IMachine objects.
13308 </li>
13309 <li>
13310 Allocate and populate an array with base metric names the data will
13311 be collected for.
13312 </li>
13313 <li>
13314 Call <link to="IPerformanceCollector::setupMetrics" />. From now on
13315 the metric data will be collected and stored.
13316 </li>
13317 <li>
13318 Wait for the data to get collected.
13319 </li>
13320 <li>
13321 Allocate and populate an array with references to objects the metric
13322 values will be queried for. You can re-use the object array used for
13323 setting base metrics.
13324 </li>
13325 <li>
13326 Allocate and populate an array with metric names the data will be
13327 collected for. Note that metric names differ from base metric names.
13328 </li>
13329 <li>
13330 Call <link to="IPerformanceCollector::queryMetricsData" />. The data
13331 that have been collected so far are returned. Note that the values
13332 are still retained internally and data collection continues.
13333 </li>
13334 </ul>
13335
13336 For an example of usage refer to the following files in VirtualBox SDK:
13337 <ul>
13338 <li>
13339 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13340 </li>
13341 <li>
13342 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13343 </li>
13344 </ul>
13345 </desc>
13346
13347 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13348 <desc>
13349 Array of unique names of metrics.
13350
13351 This array represents all metrics supported by the performance
13352 collector. Individual objects do not necessarily support all of them.
13353 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13354 list of supported metrics for a particular object.
13355 </desc>
13356 </attribute>
13357
13358 <method name="getMetrics">
13359 <desc>
13360 Returns parameters of specified metrics for a set of objects.
13361 <note>
13362 @c Null metrics array means all metrics. @c Null object array means
13363 all existing objects.
13364 </note>
13365 </desc>
13366 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13367 <desc>
13368 Metric name filter. Currently, only a comma-separated list of metrics
13369 is supported.
13370 </desc>
13371 </param>
13372 <param name="objects" type="$unknown" dir="in" safearray="yes">
13373 <desc>
13374 Set of objects to return metric parameters for.
13375 </desc>
13376 </param>
13377 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13378 <desc>
13379 Array of returned metric parameters.
13380 </desc>
13381 </param>
13382 </method>
13383
13384 <method name="setupMetrics">
13385 <desc>
13386 Sets parameters of specified base metrics for a set of objects. Returns
13387 an array of <link to="IPerformanceMetric" /> describing the metrics
13388 have been affected.
13389 <note>
13390 @c Null or empty metric name array means all metrics. @c Null or
13391 empty object array means all existing objects. If metric name array
13392 contains a single element and object array contains many, the single
13393 metric name array element is applied to each object array element to
13394 form metric/object pairs.
13395 </note>
13396 </desc>
13397 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13398 <desc>
13399 Metric name filter. Comma-separated list of metrics with wildcard
13400 support.
13401 </desc>
13402 </param>
13403 <param name="objects" type="$unknown" dir="in" safearray="yes">
13404 <desc>
13405 Set of objects to setup metric parameters for.
13406 </desc>
13407 </param>
13408 <param name="period" type="unsigned long" dir="in">
13409 <desc>
13410 Time interval in seconds between two consecutive samples of
13411 performance data.
13412 </desc>
13413 </param>
13414 <param name="count" type="unsigned long" dir="in">
13415 <desc>
13416 Number of samples to retain in performance data history. Older
13417 samples get discarded.
13418 </desc>
13419 </param>
13420 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13421 <desc>
13422 Array of metrics that have been modified by the call to this method.
13423 </desc>
13424 </param>
13425 </method>
13426
13427 <method name="enableMetrics">
13428 <desc>
13429 Turns on collecting specified base metrics. Returns an array of
13430 <link to="IPerformanceMetric" /> describing the metrics have been
13431 affected.
13432 <note>
13433 @c Null or empty metric name array means all metrics. @c Null or
13434 empty object array means all existing objects. If metric name array
13435 contains a single element and object array contains many, the single
13436 metric name array element is applied to each object array element to
13437 form metric/object pairs.
13438 </note>
13439 </desc>
13440 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13441 <desc>
13442 Metric name filter. Comma-separated list of metrics with wildcard
13443 support.
13444 </desc>
13445 </param>
13446 <param name="objects" type="$unknown" dir="in" safearray="yes">
13447 <desc>
13448 Set of objects to enable metrics for.
13449 </desc>
13450 </param>
13451 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13452 <desc>
13453 Array of metrics that have been modified by the call to this method.
13454 </desc>
13455 </param>
13456 </method>
13457
13458 <method name="disableMetrics">
13459 <desc>
13460 Turns off collecting specified base metrics. Returns an array of
13461 <link to="IPerformanceMetric" /> describing the metrics have been
13462 affected.
13463 <note>
13464 @c Null or empty metric name array means all metrics. @c Null or
13465 empty object array means all existing objects. If metric name array
13466 contains a single element and object array contains many, the single
13467 metric name array element is applied to each object array element to
13468 form metric/object pairs.
13469 </note>
13470 </desc>
13471 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13472 <desc>
13473 Metric name filter. Comma-separated list of metrics with wildcard
13474 support.
13475 </desc>
13476 </param>
13477 <param name="objects" type="$unknown" dir="in" safearray="yes">
13478 <desc>
13479 Set of objects to disable metrics for.
13480 </desc>
13481 </param>
13482 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13483 <desc>
13484 Array of metrics that have been modified by the call to this method.
13485 </desc>
13486 </param>
13487 </method>
13488
13489 <method name="queryMetricsData">
13490 <desc>
13491 Queries collected metrics data for a set of objects.
13492
13493 The data itself and related metric information are returned in seven
13494 parallel and one flattened array of arrays. Elements of
13495 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13496 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13497 the same index describe one set of values corresponding to a single
13498 metric.
13499
13500 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13501 start and length of a sub-array is indicated by
13502 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13503 value for metric <tt>metricNames[i]</tt> is at
13504 <tt>returnData[returnIndices[i]]</tt>.
13505
13506 <note>
13507 @c Null or empty metric name array means all metrics. @c Null or
13508 empty object array means all existing objects. If metric name array
13509 contains a single element and object array contains many, the single
13510 metric name array element is applied to each object array element to
13511 form metric/object pairs.
13512 </note>
13513 <note>
13514 Data collection continues behind the scenes after call to @c
13515 queryMetricsData. The return data can be seen as the snapshot of the
13516 current state at the time of @c queryMetricsData call. The internally
13517 kept metric values are not cleared by the call. This makes possible
13518 querying different subsets of metrics or aggregates with subsequent
13519 calls. If periodic querying is needed it is highly suggested to query
13520 the values with @c interval*count period to avoid confusion. This way
13521 a completely new set of data values will be provided by each query.
13522 </note>
13523 </desc>
13524 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13525 <desc>
13526 Metric name filter. Comma-separated list of metrics with wildcard
13527 support.
13528 </desc>
13529 </param>
13530 <param name="objects" type="$unknown" dir="in" safearray="yes">
13531 <desc>
13532 Set of objects to query metrics for.
13533 </desc>
13534 </param>
13535 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13536 <desc>
13537 Names of metrics returned in @c returnData.
13538 </desc>
13539 </param>
13540 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13541 <desc>
13542 Objects associated with metrics returned in @c returnData.
13543 </desc>
13544 </param>
13545 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13546 <desc>
13547 Units of measurement for each returned metric.
13548 </desc>
13549 </param>
13550 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13551 <desc>
13552 Divisor that should be applied to return values in order to get
13553 floating point values. For example:
13554 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13555 will retrieve the floating point value of i-th sample of the first
13556 metric.
13557 </desc>
13558 </param>
13559 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13560 <desc>
13561 Sequence numbers of the first elements of value sequences of
13562 particular metrics returned in @c returnData. For aggregate metrics
13563 it is the sequence number of the sample the aggregate started
13564 calculation from.
13565 </desc>
13566 </param>
13567 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13568 <desc>
13569 Indices of the first elements of value sequences of particular
13570 metrics returned in @c returnData.
13571 </desc>
13572 </param>
13573 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13574 <desc>
13575 Lengths of value sequences of particular metrics.
13576 </desc>
13577 </param>
13578 <param name="returnData" type="long" dir="return" safearray="yes">
13579 <desc>
13580 Flattened array of all metric data containing sequences of values for
13581 each metric.
13582 </desc>
13583 </param>
13584 </method>
13585
13586 </interface>
13587 <enum
13588 name="NATAliasMode"
13589 uuid="67772168-50d9-11df-9669-7fb714ee4fa1">
13590 <desc></desc>
13591 <const name="AliasLog" value="0x1">
13592 <desc></desc>
13593 </const>
13594 <const name="AliasProxyOnly" value="0x02">
13595 <desc></desc>
13596 </const>
13597 <const name="AliasUseSamePorts" value="0x04">
13598 <desc></desc>
13599 </const>
13600 </enum>
13601 <enum
13602 name="NATProtocol"
13603 uuid="e90164be-eb03-11de-94af-fff9b1c1b19f"
13604 >
13605 <desc>Protocol definitions used with NAT port-forwarding rules.</desc>
13606 <const name="UDP" value="0">
13607 <desc>Port-forwarding uses UDP protocol.</desc>
13608 </const>
13609 <const name="TCP" value="1">
13610 <desc>Port-forwarding uses TCP protocol.</desc>
13611 </const>
13612 </enum>
13613
13614 <interface
13615 name="INATEngine" extends="$unknown"
13616 uuid="4b286616-eb03-11de-b0fb-1701eca42246"
13617 wsmap="managed"
13618 >
13619 <desc>Interface for managing a NAT engine which is used with a virtual machine. This
13620 allows for changing NAT behavior such as port-forwarding rules. This interface is
13621 used in the <link to="INetworkAdapter::natDriver" /> attribute.</desc>
13622 <attribute name="network" type="wstring">
13623 <desc>The network attribute of the NAT engine (the same value is used with built-in
13624 DHCP server to fill corresponding fields of DHCP leases).</desc>
13625 </attribute>
13626 <attribute name="hostIP" type="wstring">
13627 <desc>IP of host interface to bind all opened sockets to.
13628 <note>Changing this does not change binding of port forwarding.</note>
13629 </desc>
13630 </attribute>
13631 <attribute name="tftpPrefix" type="wstring">
13632 <desc>TFTP prefix attribute which is used with the built-in DHCP server to fill
13633 the corresponding fields of DHCP leases.</desc>
13634 </attribute>
13635 <attribute name="tftpBootFile" type="wstring">
13636 <desc>TFTP boot file attribute which is used with the built-in DHCP server to fill
13637 the corresponding fields of DHCP leases.</desc>
13638 </attribute>
13639 <attribute name="tftpNextServer" type="wstring">
13640 <desc>TFTP server attribute which is used with the built-in DHCP server to fill
13641 the corresponding fields of DHCP leases.
13642 <note>The preferred form is IPv4 addresses.</note>
13643 </desc>
13644 </attribute>
13645 <attribute name="aliasMode" type="unsigned long">
13646 <desc></desc>
13647 </attribute>
13648 <attribute name="dnsPassDomain" type="boolean">
13649 <desc>Whether the DHCP server should pass the DNS domain used by the host.</desc>
13650 </attribute>
13651 <attribute name="dnsProxy" type="boolean">
13652 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
13653 of the DNS proxy and process traffic using DNS servers registered on the host.</desc>
13654 </attribute>
13655 <attribute name="dnsUseHostResolver" type="boolean">
13656 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
13657 of the DNS proxy and process traffic using the host resolver mechanism.</desc>
13658 </attribute>
13659 <attribute name="redirects" type="wstring" readonly="yes" safearray="yes">
13660 <desc>Array of NAT port-forwarding rules in string representation, in the following
13661 format: "name,protocol id,host ip,host port,guest ip,guest port".</desc>
13662 </attribute>
13663 <method name="setNetworkSettings">
13664 <desc>Sets network configuration of the NAT engine.</desc>
13665 <param name="mtu" type="unsigned long" dir="in">
13666 <desc>MTU (maximum transmission unit) of the NAT engine in bytes.</desc>
13667 </param>
13668 <param name="sockSnd" type="unsigned long" dir="in">
13669 <desc>Capacity of the socket send buffer in bytes when creating a new socket.</desc>
13670 </param>
13671 <param name="sockRcv" type="unsigned long" dir="in">
13672 <desc>Capacity of the socket receive buffer in bytes when creating a new socket.</desc>
13673 </param>
13674 <param name="TcpWndSnd" type="unsigned long" dir="in">
13675 <desc>Initial size of the NAT engine's sending TCP window in bytes when
13676 establishing a new TCP connection.</desc>
13677 </param>
13678 <param name="TcpWndRcv" type="unsigned long" dir="in">
13679 <desc>Initial size of the NAT engine's receiving TCP window in bytes when
13680 establishing a new TCP connection.</desc>
13681 </param>
13682 </method>
13683 <method name="getNetworkSettings">
13684 <desc>Returns network configuration of NAT engine. See <link to="#setNetworkSettings" />
13685 for parameter descriptions.</desc>
13686 <param name="mtu" type="unsigned long" dir="out" />
13687 <param name="sockSnd" type="unsigned long" dir="out" />
13688 <param name="sockRcv" type="unsigned long" dir="out" />
13689 <param name="TcpWndSnd" type="unsigned long" dir="out" />
13690 <param name="TcpWndRcv" type="unsigned long" dir="out" />
13691 </method>
13692 <method name="addRedirect">
13693 <desc>Adds a new NAT port-forwarding rule.</desc>
13694 <param name="name" type="wstring" dir="in">
13695 <desc>The name of the rule. An empty name is acceptable, in which case the NAT engine
13696 auto-generates one using the other parameters.</desc>
13697 </param>
13698 <param name="proto" type="NATProtocol" dir="in">
13699 <desc>Protocol handled with the rule.</desc>
13700 </param>
13701 <param name="hostIp" type="wstring" dir="in">
13702 <desc>IP of the host interface to which the rule should apply. An empty ip address is
13703 acceptable, in which case the NAT engine binds the handling socket to any interface.</desc>
13704 </param>
13705 <param name="hostPort" type="unsigned short" dir="in">
13706 <desc>The port number to listen on.</desc>
13707 </param>
13708 <param name="guestIp" type="wstring" dir="in">
13709 <desc>The IP address of the guest which the NAT engine will forward matching packets
13710 to. An empty IP address is acceptable, in which case the NAT engine will forward
13711 packets to the first DHCP lease (x.x.x.15).</desc>
13712 </param>
13713 <param name="guestPort" type="unsigned short" dir="in">
13714 <desc>The port number to forward.</desc>
13715 </param>
13716 </method>
13717 <method name="removeRedirect">
13718 <desc>Removes a port-forwarding rule that was previously registered.</desc>
13719 <param name="name" type="wstring" dir="in">
13720 <desc>The name of the rule to delete.</desc>
13721 </param>
13722 </method>
13723 </interface>
13724
13725 <enum
13726 name="VBoxEventType"
13727 uuid="7d695029-32b8-4855-86d3-75de9082923b">
13728
13729 <desc>
13730 Type of an event.
13731 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
13732 </desc>
13733
13734 <const name="Invalid" value="0">
13735 <desc>
13736 Invalid event, must be first.
13737 </desc>
13738 </const>
13739
13740 <const name="Any" value="1">
13741 <desc>
13742 Wildcard for all events. Events of this type are never delivered, and only used in
13743 registerListener() call to simplify registration.
13744 </desc>
13745 </const>
13746
13747 <const name="MachineEvent" value="2">
13748 <desc>
13749 Wildcard for all machine events. Events of this type are never delivered, and only used in
13750 registerListener() call to simplify registration.
13751 </desc>
13752 </const>
13753
13754 <const name="SnapshotEvent" value="3">
13755 <desc>
13756 Wildcard for all snapshot events. Events of this type are never delivered, and only used in
13757 registerListener() call to simplify registration.
13758 </desc>
13759 </const>
13760
13761 <const name="InputEvent" value="4">
13762 <desc>
13763 Wildcard for all input device (keyboard, mouse) events.
13764 Events of this type are never delivered, and only used in
13765 registerListener() call to simplify registration.
13766 </desc>
13767 </const>
13768
13769 <const name="LastWildcard" value="31">
13770 <desc>
13771 Last wildcard.
13772 </desc>
13773 </const>
13774
13775 <const name="OnMachineStateChanged" value="32">
13776 <desc>
13777 <see>IMachineStateChangedEvent</see>
13778 </desc>
13779 </const>
13780 <const name="OnMachineDataChanged" value="33">
13781 <desc>
13782 <see>IMachineDataChangedEvent</see>
13783 </desc>
13784 </const>
13785 <const name="OnExtraDataChanged" value="34">
13786 <desc>
13787 <see>IExtraDataChangedEvent</see>
13788 </desc>
13789 </const>
13790 <const name="OnExtraDataCanChange" value="35">
13791 <desc>
13792 <see>IExtraDataCanChangeEvent</see>
13793 </desc>
13794 </const>
13795 <const name="OnMediumRegistered" value="36">
13796 <desc>
13797 <see>IMediumRegistered</see>
13798 </desc>
13799 </const>
13800 <const name="OnMachineRegistered" value="37">
13801 <desc>
13802 <see>IMachineRegisteredEvent</see>
13803 </desc>
13804 </const>
13805 <const name="OnSessionStateChanged" value="38">
13806 <desc>
13807 <see>ISessionStateChangedEvent</see>
13808 </desc>
13809 </const>
13810 <const name="OnSnapshotTaken" value="39">
13811 <desc>
13812 <see>ISnapshotTakenEvent</see>
13813 </desc>
13814 </const>
13815 <const name="OnSnapshotDeleted" value="40">
13816 <desc>
13817 <see>ISnapshotDeletedEvent</see>
13818 </desc>
13819 </const>
13820 <const name="OnSnapshotChanged" value="41">
13821 <desc>
13822 <see>ISnapshotChangedEvent</see>
13823 </desc>
13824 </const>
13825 <const name="OnGuestPropertyChanged" value="42">
13826 <desc>
13827 <see>IGuestPropertyChangedEvent</see>
13828 </desc>
13829 </const>
13830 <!-- Console events -->
13831 <const name="OnMousePointerShapeChanged" value="43">
13832 <desc>
13833 <see>IMousePointerShapeChangedEvent</see>
13834 </desc>
13835 </const>
13836 <const name="OnMouseCapabilityChanged" value="44">
13837 <desc>
13838 <see>IMouseCapabilityChangedEvent</see>
13839 </desc>
13840 </const>
13841 <const name="OnKeyboardLedsChanged" value="45">
13842 <desc>
13843 <see>IKeyboardLedsChangedEvent</see>
13844 </desc>
13845 </const>
13846 <const name="OnStateChanged" value="46">
13847 <desc>
13848 <see>IStateChangedEvent</see>
13849 </desc>
13850 </const>
13851 <const name="OnAdditionsStateChanged" value="47">
13852 <desc>
13853 <see>IAdditionsStateChangedEvent</see>
13854 </desc>
13855 </const>
13856 <const name="OnNetworkAdapterChanged" value="48">
13857 <desc>
13858 <see>INetworkAdapterChangedEvent</see>
13859 </desc>
13860 </const>
13861 <const name="OnSerialPortChanged" value="49">
13862 <desc>
13863 <see>ISerialPortChangedEvent</see>
13864 </desc>
13865 </const>
13866 <const name="OnParallelPortChanged" value="50">
13867 <desc>
13868 <see>IParallelPortChangedEvent</see>
13869 </desc>
13870 </const>
13871 <const name="OnStorageControllerChanged" value="51">
13872 <desc>
13873 <see>IStorageControllerChangedEvent</see>
13874 </desc>
13875 </const>
13876 <const name="OnMediumChanged" value="52">
13877 <desc>
13878 <see>IMediumChangedEvent</see>
13879 </desc>
13880 </const>
13881 <const name="OnVRDPServerChanged" value="53">
13882 <desc>
13883 <see>IVRDPServerChangedEvent</see>
13884 </desc>
13885 </const>
13886 <const name="OnUSBControllerChanged" value="54">
13887 <desc>
13888 <see>IUSBControllerChangedEvent</see>
13889 </desc>
13890 </const>
13891 <const name="OnUSBDeviceStateChanged" value="55">
13892 <desc>
13893 <see>IUSBDeviceStateChangedEvent</see>
13894 </desc>
13895 </const>
13896 <const name="OnSharedFolderChanged" value="56">
13897 <desc>
13898 <see>ISharedFolderChangedEvent</see>
13899 </desc>
13900 </const>
13901 <const name="OnRuntimeError" value="57">
13902 <desc>
13903 <see>IRuntimeErrorEvent</see>
13904 </desc>
13905 </const>
13906 <const name="OnCanShowWindow" value="58">
13907 <desc>
13908 <see>ICanShowWindowEvent</see>
13909 </desc>
13910 </const>
13911 <const name="OnShowWindow" value="59">
13912 <desc>
13913 <see>IShowWindowEvent</see>
13914 </desc>
13915 </const>
13916 <const name="OnCPUChanged" value="60">
13917 <desc>
13918 <see>ICPUChangedEvent</see>
13919 </desc>
13920 </const>
13921 <const name="OnRemoteDisplayInfoChanged" value="61">
13922 <desc>
13923 <see>IRemoteDisplayInfoChangedEvent</see>
13924 </desc>
13925 </const>
13926 <const name="OnEventSourceChanged" value="62">
13927 <desc>
13928 <see>IEventSourceChangedEvent</see>
13929 </desc>
13930 </const>
13931 <!-- Last event marker -->
13932 <const name="Last" value="63">
13933 <desc>
13934 Must be last event, used for iterations and structures relying on numerical event values.
13935 </desc>
13936 </const>
13937
13938 </enum>
13939
13940 <interface
13941 name="IEventSource" extends="$unknown"
13942 uuid="3c670618-f727-4fe9-94d2-8243f489a033"
13943 wsmap="managed"
13944 >
13945 <desc>
13946 Event source. Generally, any object which could generate events can be an event source,
13947 or aggregate one. To simplify using one-way protocols such as webservices running on top of HTTP(S),
13948 an event source can work with listeners in either active or passive mode. In active mode it is up to
13949 the IEventSource implementation to call <link to="IEventListener::handleEvent" />, in passive mode the
13950 event source keeps track of pending events for each listener and returns available events on demand.
13951
13952 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
13953 </desc>
13954
13955 <method name="createListener">
13956 <desc>
13957 Creates a new listener object, useful for passive mode.
13958 </desc>
13959 <param name="listener" type="IEventListener" dir="return"/>
13960 </method>
13961
13962 <method name="registerListener">
13963 <desc>
13964 Register an event listener.
13965 </desc>
13966 <param name="listener" type="IEventListener" dir="in">
13967 <desc>Listener to register.</desc>
13968 </param>
13969 <param name="interesting" type="VBoxEventType" dir="in" safearray="yes">
13970 <desc>
13971 Event types listener is interested in. One can use wildcards like Any -
13972 <see>VBoxEventType::Any</see> to specify wildcards.
13973 </desc>
13974 </param>
13975 <param name="active" type="boolean" dir="in">
13976 <desc>
13977 Which mode this listener is operating in.
13978 In active mode, <link to="IEventListener::handleEvent" /> is called directly.
13979 In passive mode, an internal event queue is created for this this IEventListener.
13980 For each event coming in, it is added to queues for all interested registered passive
13981 listeners. It is then up to the external code to call the listener's
13982 <link to="IEventListener::handleEvent" /> method. When done with an event, the
13983 external code must call eventComplete().
13984 </desc>
13985 </param>
13986 </method>
13987
13988 <method name="unregisterListener">
13989 <desc>
13990 Unregister an event listener. If listener is passive, and some waitable events are still
13991 in queue they are marked as processed automatically.
13992 </desc>
13993 <param name="listener" type="IEventListener" dir="in">
13994 <desc>Listener to unregister.</desc>
13995 </param>
13996 </method>
13997
13998 <method name="fireEvent">
13999 <desc>
14000 Fire an event for this source.
14001 </desc>
14002 <param name="event" type="IEvent" dir="in">
14003 <desc>Event to deliver.</desc>
14004 </param>
14005 <param name="timeout" type="long" dir="in">
14006 <desc>
14007 Timeout to wait until event processed in ms (if event is waitable),
14008 0 - no wait, -1 - forever until delivered.
14009 </desc>
14010 </param>
14011 <param name="result" type="boolean" dir="return">
14012 <desc>true if an event was delivered to all targets, or is non-waitable.</desc>
14013 </param>
14014 </method>
14015
14016 <method name="getEvent">
14017 <desc>
14018 Get events from this peer's event queue (for passive mode). Consumer's implementation
14019 must call <link to="IEventListener::handleEvent" /> once the event is available.
14020 </desc>
14021 <param name="listener" type="IEventListener" dir="in">
14022 <desc>Which listener get data for.</desc>
14023 </param>
14024 <param name="timeout" type="long" dir="in">
14025 <desc>Timeout to wait until event available in ms, 0 - no wait, -1 - forever until available.</desc>
14026 </param>
14027 <param name="event" type="IEvent" dir="return">
14028 <desc>Event retrieved, or null if none available.</desc>
14029 </param>
14030 </method>
14031
14032 <method name="eventProcessed">
14033 <desc>
14034 Must be called for waitable events when particular listener finished event processing.
14035 When all listeners who this event was aimed to call eventProcessed() event source
14036 can call event's setProcessed().
14037 </desc>
14038 <param name="listener" type="IEventListener" dir="in">
14039 <desc>Which listener processed event.</desc>
14040 </param>
14041 <param name="event" type="IEvent" dir="in">
14042 <desc>Which event.</desc>
14043 </param>
14044 </method>
14045
14046 </interface>
14047
14048 <interface
14049 name="IEventListener" extends="$unknown"
14050 uuid="67099191-32e7-4f6c-85ee-422304c71b90"
14051 wsmap="managed"
14052 >
14053 <desc>
14054 Event listener. An event listener can work in either active or passive mode, depending on the way
14055 it was registered.
14056 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
14057 </desc>
14058
14059 <method name="handleEvent">
14060 <desc>
14061 Handle event callback (called directly by IEventSource in active mode, or could be
14062 called by event processor thread in passive mode).
14063 </desc>
14064 <param name="event" type="IEvent" dir="in">
14065 <desc>Event available.</desc>
14066 </param>
14067 </method>
14068
14069 </interface>
14070
14071 <interface
14072 name="IEvent" extends="$unknown"
14073 uuid="0ca2adba-8f30-401b-a8cd-fe31dbe839c0"
14074 wsmap="managed"
14075 >
14076 <desc>
14077 Abstract parent interface for VirtualBox events. Actual events will typically implement
14078 a more specific interface which derives from this (see below).
14079
14080 <b>Introduction to VirtualBox events</b>
14081
14082 Starting with VirtualBox 3.3, support for generic events was introduced.
14083 It provides a uniform mechanism to register for and consume specific events.
14084 Previously, several callback interfaces were used which means that clients
14085 were called for each event in the interface. Also, this mechanism was not
14086 compatible with scripting languages, local Java bindings and remote web
14087 services as they do not support callbacks.
14088
14089 To overcome those issues, the notion of events and listeners was introduced.
14090 Generally speaking, an event represents the information that something happened,
14091 while a listener represents an entity that is interested in certain events.
14092 In order for this to work with unidirectional protocols (i.e. web services),
14093 the concept of passive and active listeners is used.
14094
14095 Event consumers can register themselves as listeners, providing an array of
14096 events they are interested in. When an event triggers, the listener is
14097 notified about the event. The exact mechanism of the notification
14098 depends on the way the listener was registered - as an active or passive listener:
14099
14100 <ul>
14101 <li>An active listener is very similar to a traditional callback - i.e. it is a
14102 function invoked by the API implementation.
14103 The main difference here is that there's an event object notion, not individual
14104 callback parameters.</li>
14105
14106 <li>Passive listeners are somewhat trickier: internally the
14107 <link to="IEventSource" /> implementation maintains an event queue for each passive
14108 listener, and newly arrived events are put in this queue. When the listener calls
14109 <link to="IEventSource::getEvent"/>, all elements from its internal event queue are
14110 returned. When the client completes processing of an event, the
14111 <link to="IEventSource::eventProcessed" /> function must be called, acknowledging
14112 that the events were processed. It supports implementing waitable events. On passive
14113 listener unregistration, all events from its queue are auto-acknowledged.</li>
14114 </ul>
14115
14116 Waitable events are useful in situations where the event generator wants to track
14117 delivery or a party wants to wait until all listeners have completed the event. A
14118 typical example would be a vetoable event where a listeners might put a veto on
14119 a certain action, and thus the event producer has to make sure that all listeners have
14120 processed the event and not vetoed before taking the action.
14121
14122 A given event may have both passive and active listeners at the same time.
14123
14124 <b>Using events</b>
14125
14126 Any VirtualBox object capable of producing externally visible events provides an
14127 @c eventSource read-only attribute, which is of the type <link to="IEventSource" />.
14128 This event source object is notified by VirtualBox once something has happened, so
14129 consumers may register event listeners with this event source. To register a listener,
14130 an object implementing the <link to="IEventListener" /> interface must be provided.
14131 For active listeners, such an object is typically created by the consumer, while for
14132 passive listeners <link to="IEventSource::createListener" /> should be used. Please
14133 note that a listener created with @c CreateListener() must not be used as an active listener.
14134
14135 Once created, the listener must be registered to listen for the desired events, providing
14136 an array of <link to="VBoxEventType" /> enums. Those elements can either be the individual
14137 event IDs or wildcards matching multiple event IDs.
14138
14139 After registration, the callback's <link to="IEventListener::handleEvent" /> method is
14140 called automatically when the event is triggered, while passive listeners have to call
14141 <link to="IEventSource::getEvent" /> and <link to="IEventSource::eventProcessed" /> in
14142 an event processing loop.
14143
14144 This interface (IEvent) is an abstract parent interface for all such VirtualBox events
14145 coming in. As a result, the standard use pattern inside <link to="IEventListener::handleEvent" />
14146 or the event processing loop is to check the <link to="#type" /> attribute of the event and
14147 then cast to the appropriate specific interface using @c QueryInterface().
14148 </desc>
14149
14150 <attribute name="type" readonly="yes" type="VBoxEventType">
14151 <desc>
14152 Event type.
14153 </desc>
14154 </attribute>
14155
14156 <attribute name="source" readonly="yes" type="IEventSource">
14157 <desc>
14158 Source of this event.
14159 </desc>
14160 </attribute>
14161
14162 <attribute name="waitable" readonly="yes" type="boolean">
14163 <desc>
14164 If we can wait for this event being processed. If false, waitProcessed() returns immediately,
14165 and setProcessed() doesn't make sense. Non-waitable events are generally better performing,
14166 as no additional overhead associated with waitability imposed.
14167 Waitable events are needed when some need to be able to wait for particular event processed,
14168 for example for vetoable changes, or if event refers to some resource which need to be kept immutable
14169 until all consumers confirmed events.
14170 </desc>
14171 </attribute>
14172
14173 <method name="setProcessed">
14174 <desc>
14175 Called to mark the moment when this event is considered processed.
14176 </desc>
14177 </method>
14178
14179 <method name="waitProcessed">
14180 <desc>
14181 Wait until time outs, or this event is processed. Event must be waitable for this operation to have
14182 described semantics, for non-waitable returns true immediately.
14183 </desc>
14184 <param name="timeout" type="long" dir="in">
14185 <desc>Timeout to wait until event processed in ms, 0 - no wait, -1 - forever until processed.</desc>
14186 </param>
14187 <param name="result" type="boolean" dir="return">
14188 <desc>If this event was processed before timeout.</desc>
14189 </param>
14190 </method>
14191 </interface>
14192
14193
14194 <interface
14195 name="IMachineEvent" extends="IEvent"
14196 uuid="92ed7b1a-0d96-40ed-ae46-a564d484325e"
14197 wsmap="managed" id="MachineEvent"
14198 >
14199 <desc>Base abstract interface for all machine events.</desc>
14200
14201 <attribute name="machineId" readonly="yes" type="uuid" mod="string">
14202 <desc>ID of the machine this event relates to.</desc>
14203 </attribute>
14204
14205 </interface>
14206
14207 <interface
14208 name="IMachineStateChangedEvent" extends="IMachineEvent"
14209 uuid="5748F794-48DF-438D-85EB-98FFD70D18C9"
14210 wsmap="managed" autogen="VBoxEvent" id="OnMachineStateChanged"
14211 >
14212 <desc>Machine state change event.</desc>
14213
14214 <attribute name="state" readonly="yes" type="MachineState">
14215 <desc>New execution state.</desc>
14216 </attribute>
14217 </interface>
14218
14219 <interface
14220 name="IMachineDataChangedEvent" extends="IMachineEvent"
14221 uuid="6AA70A6C-0DCA-4810-8C5C-457B278E3D49"
14222 wsmap="managed" autogen="VBoxEvent" id="OnMachineDataChanged"
14223 >
14224 <desc>
14225 Any of the settings of the given machine has changed.
14226 </desc>
14227 </interface>
14228
14229 <interface
14230 name="IMachineRegisteredEvent" extends="IMachineEvent"
14231 uuid="c354a762-3ff2-4f2e-8f09-07382ee25088"
14232 wsmap="managed" autogen="VBoxEvent" id="OnMachineRegistered"
14233 >
14234 <desc>
14235 The given machine was registered or unregistered
14236 within this VirtualBox installation.
14237 </desc>
14238
14239 <attribute name="registered" type="boolean" readonly="yes">
14240 <desc>
14241 If @c true, the machine was registered, otherwise it was
14242 unregistered.
14243 </desc>
14244 </attribute>
14245 </interface>
14246
14247 <interface
14248 name="ISessionStateChangedEvent" extends="IMachineEvent"
14249 uuid="714a3eef-799a-4489-86cd-fe8e45b2ff8e"
14250 wsmap="managed" autogen="VBoxEvent" id="OnSessionStateChanged"
14251 >
14252 <desc>
14253 The state of the session for the given machine was changed.
14254 <see>IMachine::sessionState</see>
14255 </desc>
14256
14257 <attribute name="state" type="SessionState" readonly="yes">
14258 <desc>
14259 New session state.
14260 </desc>
14261 </attribute>
14262 </interface>
14263
14264 <interface
14265 name="IGuestPropertyChangedEvent" extends="IMachineEvent"
14266 uuid="3f63597a-26f1-4edb-8dd2-6bddd0912368"
14267 wsmap="managed" autogen="VBoxEvent" id="OnGuestPropertyChanged"
14268 >
14269 <desc>
14270 Notification when a guest property has changed.
14271 </desc>
14272
14273 <attribute name="name" readonly="yes" type="wstring">
14274 <desc>
14275 The name of the property that has changed.
14276 </desc>
14277 </attribute>
14278
14279 <attribute name="value" readonly="yes" type="wstring">
14280 <desc>
14281 The new property value.
14282 </desc>
14283 </attribute>
14284
14285 <attribute name="flags" readonly="yes" type="wstring">
14286 <desc>
14287 The new property flags.
14288 </desc>
14289 </attribute>
14290
14291 </interface>
14292
14293 <interface
14294 name="ISnapshotEvent" extends="IMachineEvent"
14295 uuid="21637b0e-34b8-42d3-acfb-7e96daf77c22"
14296 wsmap="managed" id="SnapshotEvent"
14297 >
14298 <desc>Base interface for all snapshot events.</desc>
14299
14300 <attribute name="snapshotId" readonly="yes" type="uuid" mod="string">
14301 <desc>ID of the snapshot this event relates to.</desc>
14302 </attribute>
14303
14304 </interface>
14305
14306 <interface
14307 name="ISnapshotTakenEvent" extends="ISnapshotEvent"
14308 uuid="d27c0b3d-6038-422c-b45e-6d4a0503d9f1"
14309 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotTaken"
14310 >
14311 <desc>
14312 A new snapshot of the machine has been taken.
14313 <see>ISnapshot</see>
14314 </desc>
14315 </interface>
14316
14317 <interface
14318 name="ISnapshotDeletedEvent" extends="ISnapshotEvent"
14319 uuid="c48f3401-4a9e-43f4-b7a7-54bd285e22f4"
14320 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotDeleted"
14321 >
14322 <desc>
14323 Snapshot of the given machine has been deleted.
14324
14325 <note>
14326 This notification is delivered <b>after</b> the snapshot
14327 object has been uninitialized on the server (so that any
14328 attempt to call its methods will return an error).
14329 </note>
14330
14331 <see>ISnapshot</see>
14332 </desc>
14333 </interface>
14334
14335 <interface
14336 name="ISnapshotChangedEvent" extends="ISnapshotEvent"
14337 uuid="07541941-8079-447a-a33e-47a69c7980db"
14338 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotChanged"
14339 >
14340 <desc>
14341 Snapshot properties (name and/or description) have been changed.
14342 <see>ISnapshot</see>
14343 </desc>
14344 </interface>
14345
14346 <interface
14347 name="IMousePointerShapeChangedEvent" extends="IEvent"
14348 uuid="a6dcf6e8-416b-4181-8c4a-45ec95177aef"
14349 wsmap="managed" autogen="VBoxEvent" id="OnMousePointerShapeChanged"
14350 >
14351 <desc>
14352 Notification when the guest mouse pointer shape has
14353 changed. The new shape data is given.
14354 </desc>
14355
14356 <attribute name="visible" type="boolean" readonly="yes">
14357 <desc>
14358 Flag whether the pointer is visible.
14359 </desc>
14360 </attribute>
14361 <attribute name="alpha" type="boolean" readonly="yes">
14362 <desc>
14363 Flag whether the pointer has an alpha channel.
14364 </desc>
14365 </attribute>
14366 <attribute name="xhot" type="unsigned long" readonly="yes">
14367 <desc>
14368 The pointer hot spot X coordinate.
14369 </desc>
14370 </attribute>
14371 <attribute name="yhot" type="unsigned long" readonly="yes">
14372 <desc>
14373 The pointer hot spot Y coordinate.
14374 </desc>
14375 </attribute>
14376 <attribute name="width" type="unsigned long" readonly="yes">
14377 <desc>
14378 Width of the pointer shape in pixels.
14379 </desc>
14380 </attribute>
14381 <attribute name="height" type="unsigned long" readonly="yes">
14382 <desc>
14383 Height of the pointer shape in pixels.
14384 </desc>
14385 </attribute>
14386 <attribute name="shape" type="octet" safearray="yes" readonly="yes">
14387 <desc>
14388 Shape buffer arrays.
14389
14390 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
14391 followed by a 32-bpp XOR (color) mask.
14392
14393 For pointers without alpha channel the XOR mask pixels are 32
14394 bit values: (lsb)BGR0(msb). For pointers with alpha channel
14395 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
14396
14397 An AND mask is used for pointers with alpha channel, so if the
14398 callback does not support alpha, the pointer could be
14399 displayed as a normal color pointer.
14400
14401 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
14402 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
14403 height</tt>. The padding bits at the end of each scanline are
14404 undefined.
14405
14406 The XOR mask follows the AND mask on the next 4-byte aligned
14407 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
14408 Bytes in the gap between the AND and the XOR mask are undefined.
14409 The XOR mask scanlines have no gap between them and the size of
14410 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
14411
14412 <note>
14413 If @a shape is 0, only the pointer visibility is changed.
14414 </note>
14415 </desc>
14416 </attribute>
14417 </interface>
14418
14419 <interface
14420 name="IMouseCapabilityChangedEvent" extends="IEvent"
14421 uuid="d633ad48-820c-4207-b46c-6bd3596640d5"
14422 wsmap="managed" autogen="VBoxEvent" id="OnMouseCapabilityChanged"
14423 >
14424 <desc>
14425 Notification when the mouse capabilities reported by the
14426 guest have changed. The new capabilities are passed.
14427 </desc>
14428 <attribute name="supportsAbsolute" type="boolean" readonly="yes">
14429 <desc>
14430 Supports absolute coordinates.
14431 </desc>
14432 </attribute>
14433 <attribute name="supportsRelative" type="boolean" readonly="yes">
14434 <desc>
14435 Supports relative coordinates.
14436 </desc>
14437 </attribute>
14438 <attribute name="needsHostCursor" type="boolean" readonly="yes">
14439 <desc>
14440 If host cursor is needed.
14441 </desc>
14442 </attribute>
14443 </interface>
14444
14445 <interface
14446 name="IKeyboardLedsChangedEvent" extends="IEvent"
14447 uuid="6DDEF35E-4737-457B-99FC-BC52C851A44F"
14448 wsmap="managed" autogen="VBoxEvent" id="OnKeyboardLedsChanged"
14449 >
14450 <desc>
14451 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
14452 to alter the state of the keyboard LEDs.
14453 </desc>
14454 <attribute name="numLock" type="boolean" readonly="yes">
14455 <desc>
14456 NumLock status.
14457 </desc>
14458 </attribute>
14459 <attribute name="capsLock" type="boolean" readonly="yes">
14460 <desc>
14461 CapsLock status.
14462 </desc>
14463 </attribute>
14464 <attribute name="scrollLock" type="boolean" readonly="yes">
14465 <desc>
14466 ScrollLock status.
14467 </desc>
14468 </attribute>
14469 </interface>
14470
14471 <interface
14472 name="IStateChangedEvent" extends="IEvent"
14473 uuid="4376693C-CF37-453B-9289-3B0F521CAF27"
14474 wsmap="managed" autogen="VBoxEvent" id="OnStateChanged"
14475 >
14476 <desc>
14477 Notification when the execution state of the machine has changed.
14478 The new state is given.
14479 </desc>
14480 <attribute name="state" type="MachineState" readonly="yes">
14481 <desc>
14482 New machine state.
14483 </desc>
14484 </attribute>
14485 </interface>
14486
14487 <interface
14488 name="IAdditionsStateChangedEvent" extends="IEvent"
14489 uuid="D70F7915-DA7C-44C8-A7AC-9F173490446A"
14490 wsmap="managed" autogen="VBoxEvent" id="OnAdditionsStateChanged"
14491 >
14492 <desc>
14493 Notification when a Guest Additions property changes.
14494 Interested callees should query IGuest attributes to
14495 find out what has changed.
14496 </desc>
14497 </interface>
14498
14499 <interface
14500 name="INetworkAdapterChangedEvent" extends="IEvent"
14501 uuid="08889892-1EC6-4883-801D-77F56CFD0103"
14502 wsmap="managed" autogen="VBoxEvent" id="OnNetworkAdapterChanged"
14503 >
14504 <desc>
14505 Notification when a property of one of the
14506 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
14507 changes. Interested callees should use INetworkAdapter methods and
14508 attributes to find out what has changed.
14509 </desc>
14510 <attribute name="networkAdapter" type="INetworkAdapter" readonly="yes">
14511 <desc>
14512 Network adapter that is subject to change.
14513 </desc>
14514 </attribute>
14515 </interface>
14516
14517 <interface
14518 name="ISerialPortChangedEvent" extends="IEvent"
14519 uuid="3BA329DC-659C-488B-835C-4ECA7AE71C6C"
14520 wsmap="managed" autogen="VBoxEvent" id="OnSerialPortChanged"
14521 >
14522 <desc>
14523 Notification when a property of one of the
14524 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
14525 Interested callees should use ISerialPort methods and attributes
14526 to find out what has changed.
14527 </desc>
14528 <attribute name="serialPort" type="ISerialPort" readonly="yes">
14529 <desc>
14530 Serial port that is subject to change.
14531 </desc>
14532 </attribute>
14533 </interface>
14534
14535 <interface
14536 name="IParallelPortChangedEvent" extends="IEvent"
14537 uuid="813C99FC-9849-4F47-813E-24A75DC85615"
14538 wsmap="managed" autogen="VBoxEvent" id="OnParallelPortChanged"
14539 >
14540 <desc>
14541 Notification when a property of one of the
14542 virtual <link to="IMachine::getParallelPort">parallel ports</link>
14543 changes. Interested callees should use ISerialPort methods and
14544 attributes to find out what has changed.
14545 </desc>
14546 <attribute name="parallelPort" type="IParallelPort" readonly="yes">
14547 <desc>
14548 Parallel port that is subject to change.
14549 </desc>
14550 </attribute>
14551 </interface>
14552
14553 <interface
14554 name="IStorageControllerChangedEvent" extends="IEvent"
14555 uuid="715212BF-DA59-426E-8230-3831FAA52C56"
14556 wsmap="managed" autogen="VBoxEvent" id="OnStorageControllerChanged"
14557 >
14558 <desc>
14559 Notification when a
14560 <link to="IMachine::mediumAttachments">medium attachment</link>
14561 changes.
14562 </desc>
14563 </interface>
14564
14565 <interface
14566 name="IMediumChangedEvent" extends="IEvent"
14567 uuid="0FE2DA40-5637-472A-9736-72019EABD7DE"
14568 wsmap="managed" autogen="VBoxEvent" id="OnMediumChanged"
14569 >
14570 <desc>
14571 Notification when a
14572 <link to="IMachine::mediumAttachments">medium attachment</link>
14573 changes.
14574 </desc>
14575 <attribute name="mediumAttachment" type="IMediumAttachment" readonly="yes">
14576 <desc>
14577 Medium attachment that is subject to change.
14578 </desc>
14579 </attribute>
14580 </interface>
14581
14582 <interface
14583 name="ICPUChangedEvent" extends="IEvent"
14584 uuid="D0F0BECC-EE17-4D17-A8CC-383B0EB55E9D"
14585 wsmap="managed" autogen="VBoxEvent" id="OnCPUChanged"
14586 >
14587 <desc>
14588 Notification when a CPU changes.
14589 </desc>
14590 <attribute name="cpu" type="unsigned long" readonly="yes">
14591 <desc>
14592 The CPU which changed.
14593 </desc>
14594 </attribute>
14595 <attribute name="add" type="boolean" readonly="yes">
14596 <desc>
14597 Flag whether the CPU was added or removed.
14598 </desc>
14599 </attribute>
14600 </interface>
14601
14602 <interface
14603 name="IVRDPServerChangedEvent" extends="IEvent"
14604 uuid="726038B6-6279-4A7A-8037-D041693D1915"
14605 wsmap="managed" autogen="VBoxEvent" id="OnVRDPServerChanged"
14606 >
14607 <desc>
14608 Notification when a property of the
14609 <link to="IMachine::VRDPServer">VRDP server</link> changes.
14610 Interested callees should use IVRDPServer methods and attributes to
14611 find out what has changed.
14612 </desc>
14613 </interface>
14614
14615 <interface
14616 name="IRemoteDisplayInfoChangedEvent" extends="IEvent"
14617 uuid="65B556C5-2A99-47D8-B311-FC177F0914CD"
14618 wsmap="managed" autogen="VBoxEvent" id="OnRemoteDisplayInfoChanged"
14619 >
14620 <desc>
14621 Notification when the status of the VRDP server changes. Interested callees
14622 should use <link to="IConsole::remoteDisplayInfo">IRemoteDisplayInfo</link>
14623 attributes to find out what is the current status.
14624 </desc>
14625 </interface>
14626
14627 <interface
14628 name="IUSBControllerChangedEvent" extends="IEvent"
14629 uuid="93BADC0C-61D9-4940-A084-E6BB29AF3D83"
14630 wsmap="managed" autogen="VBoxEvent" id="OnUSBControllerChanged"
14631 >
14632 <desc>
14633 Notification when a property of the virtual
14634 <link to="IMachine::USBController">USB controller</link> changes.
14635 Interested callees should use IUSBController methods and attributes to
14636 find out what has changed.
14637 </desc>
14638 </interface>
14639
14640 <interface
14641 name="IUSBDeviceStateChangedEvent" extends="IEvent"
14642 uuid="806da61b-6679-422a-b629-51b06b0c6d93"
14643 wsmap="managed" autogen="VBoxEvent" id="OnUSBDeviceStateChanged"
14644 >
14645 <desc>
14646 Notification when a USB device is attached to or detached from
14647 the virtual USB controller.
14648
14649 This notification is sent as a result of the indirect
14650 request to attach the device because it matches one of the
14651 machine USB filters, or as a result of the direct request
14652 issued by <link to="IConsole::attachUSBDevice"/> or
14653 <link to="IConsole::detachUSBDevice"/>.
14654
14655 This notification is sent in case of both a succeeded and a
14656 failed request completion. When the request succeeds, the
14657 @a error parameter is @c null, and the given device has been
14658 already added to (when @a attached is @c true) or removed from
14659 (when @a attached is @c false) the collection represented by
14660 <link to="IConsole::USBDevices"/>. On failure, the collection
14661 doesn't change and the @a error parameter represents the error
14662 message describing the failure.
14663 </desc>
14664 <attribute name="device" type="IUSBDevice" readonly="yes">
14665 <desc>
14666 Device that is subject to state change.
14667 </desc>
14668 </attribute>
14669 <attribute name="attached" type="boolean" readonly="yes">
14670 <desc>
14671 @c true if the device was attached and @c false otherwise.
14672 </desc>
14673 </attribute>
14674 <attribute name="error" type="IVirtualBoxErrorInfo" readonly="yes">
14675 <desc>
14676 @c null on success or an error message object on failure.
14677 </desc>
14678 </attribute>
14679 </interface>
14680
14681 <interface
14682 name="ISharedFolderChangedEvent" extends="IEvent"
14683 uuid="B66349B5-3534-4239-B2DE-8E1535D94C0B"
14684 wsmap="managed" autogen="VBoxEvent" id="OnSharedFolderChanged"
14685 >
14686 <desc>
14687 Notification when a shared folder is added or removed.
14688 The @a scope argument defines one of three scopes:
14689 <link to="IVirtualBox::sharedFolders">global shared folders</link>
14690 (<link to="Scope_Global">Global</link>),
14691 <link to="IMachine::sharedFolders">permanent shared folders</link> of
14692 the machine (<link to="Scope_Machine">Machine</link>) or <link
14693 to="IConsole::sharedFolders">transient shared folders</link> of the
14694 machine (<link to="Scope_Session">Session</link>). Interested callees
14695 should use query the corresponding collections to find out what has
14696 changed.
14697 </desc>
14698 <attribute name="scope" type="Scope" readonly="yes">
14699 <desc>
14700 Scope of the notification.
14701 </desc>
14702 </attribute>
14703 </interface>
14704
14705 <interface
14706 name="IRuntimeErrorEvent" extends="IEvent"
14707 uuid="883DD18B-0721-4CDE-867C-1A82ABAF914C"
14708 wsmap="managed" autogen="VBoxEvent" id="OnRuntimeError"
14709 >
14710 <desc>
14711 Notification when an error happens during the virtual
14712 machine execution.
14713
14714 There are three kinds of runtime errors:
14715 <ul>
14716 <li><i>fatal</i></li>
14717 <li><i>non-fatal with retry</i></li>
14718 <li><i>non-fatal warnings</i></li>
14719 </ul>
14720
14721 <b>Fatal</b> errors are indicated by the @a fatal parameter set
14722 to @c true. In case of fatal errors, the virtual machine
14723 execution is always paused before calling this notification, and
14724 the notification handler is supposed either to immediately save
14725 the virtual machine state using <link to="IConsole::saveState"/>
14726 or power it off using <link to="IConsole::powerDown"/>.
14727 Resuming the execution can lead to unpredictable results.
14728
14729 <b>Non-fatal</b> errors and warnings are indicated by the
14730 @a fatal parameter set to @c false. If the virtual machine
14731 is in the Paused state by the time the error notification is
14732 received, it means that the user can <i>try to resume</i> the machine
14733 execution after attempting to solve the problem that caused the
14734 error. In this case, the notification handler is supposed
14735 to show an appropriate message to the user (depending on the
14736 value of the @a id parameter) that offers several actions such
14737 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
14738 wants to retry, the notification handler should continue
14739 the machine execution using the <link to="IConsole::resume"/>
14740 call. If the machine execution is not Paused during this
14741 notification, then it means this notification is a <i>warning</i>
14742 (for example, about a fatal condition that can happen very soon);
14743 no immediate action is required from the user, the machine
14744 continues its normal execution.
14745
14746 Note that in either case the notification handler
14747 <b>must not</b> perform any action directly on a thread
14748 where this notification is called. Everything it is allowed to
14749 do is to post a message to another thread that will then talk
14750 to the user and take the corresponding action.
14751
14752 Currently, the following error identifiers are known:
14753 <ul>
14754 <li><tt>"HostMemoryLow"</tt></li>
14755 <li><tt>"HostAudioNotResponding"</tt></li>
14756 <li><tt>"VDIStorageFull"</tt></li>
14757 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
14758 </ul>
14759 </desc>
14760 <attribute name="fatal" type="boolean" readonly="yes">
14761 <desc>
14762 Whether the error is fatal or not.
14763 </desc>
14764 </attribute>
14765 <attribute name="id" type="wstring" readonly="yes">
14766 <desc>
14767 Error identifier.
14768 </desc>
14769 </attribute>
14770 <attribute name="message" type="wstring" readonly="yes">
14771 <desc>
14772 Optional error message.
14773 </desc>
14774 </attribute>
14775 </interface>
14776
14777
14778 <interface
14779 name="IEventSourceChangedEvent" extends="IEvent"
14780 uuid="e7932cb8-f6d4-4ab6-9cbf-558eb8959a6a"
14781 waitable="yes"
14782 wsmap="managed" autogen="VBoxEvent" id="OnEventSourceChanged"
14783 >
14784 <desc>
14785 Notification when an event source state changes (listener added or removed).
14786 </desc>
14787
14788 <attribute name="listener" type="IEventListener" readonly="yes">
14789 <desc>
14790 Event listener which has changed.
14791 </desc>
14792 </attribute>
14793
14794 <attribute name="add" type="boolean" readonly="yes">
14795 <desc>
14796 Flag whether listener was added or removed.
14797 </desc>
14798 </attribute>
14799 </interface>
14800
14801 <interface
14802 name="IExtraDataChangedEvent" extends="IEvent"
14803 uuid="024F00CE-6E0B-492A-A8D0-968472A94DC7"
14804 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataChanged"
14805 >
14806 <desc>
14807 Notification when machine specific or global extra data
14808 has changed.
14809 </desc>
14810 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
14811 <desc>
14812 ID of the machine this event relates to.
14813 Null for global extra data changes.
14814 </desc>
14815 </attribute>
14816 <attribute name="key" type="wstring" readonly="yes">
14817 <desc>
14818 Extra data key that has changed.
14819 </desc>
14820 </attribute>
14821 <attribute name="value" type="wstring" readonly="yes">
14822 <desc>
14823 Extra data value for the given key.
14824 </desc>
14825 </attribute>
14826 </interface>
14827
14828 <interface
14829 name="IVetoEvent" extends="IEvent"
14830 uuid="9a1a4130-69fe-472f-ac10-c6fa25d75007"
14831 wsmap="managed"
14832 >
14833 <desc>Base abstract interface for veto events.</desc>
14834
14835 <method name="addVeto">
14836 <desc>
14837 Adds a veto on this event.
14838 </desc>
14839 <param name="reason" type="wstring" dir="in">
14840 <desc>
14841 Reason for veto, could be null or empty string.
14842 </desc>
14843 </param>
14844 </method>
14845
14846 <method name="isVetoed">
14847 <desc>
14848 If this event was vetoed.
14849 </desc>
14850 <param name="result" type="boolean" dir="return">
14851 <desc>
14852 Reason for veto.
14853 </desc>
14854 </param>
14855 </method>
14856
14857 <method name="getVetos">
14858 <desc>
14859 Current veto reason list, if size is 0 - no veto.
14860 </desc>
14861 <param name="result" type="wstring" dir="return" safearray="yes">
14862 <desc>
14863 Array of reasons for veto provided by different event handlers.
14864 </desc>
14865 </param>
14866 </method>
14867
14868 </interface>
14869
14870 <interface
14871 name="IExtraDataCanChangeEvent" extends="IVetoEvent"
14872 uuid="245d88bd-800a-40f8-87a6-170d02249a55"
14873 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataCanChange"
14874 waitable="true"
14875 >
14876 <desc>
14877 Notification when someone tries to change extra data for
14878 either the given machine or (if @c null) global extra data.
14879 This gives the chance to veto against changes.
14880 </desc>
14881 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
14882 <desc>
14883 ID of the machine this event relates to.
14884 Null for global extra data changes.
14885 </desc>
14886 </attribute>
14887 <attribute name="key" type="wstring" readonly="yes">
14888 <desc>
14889 Extra data key that has changed.
14890 </desc>
14891 </attribute>
14892 <attribute name="value" type="wstring" readonly="yes">
14893 <desc>
14894 Extra data value for the given key.
14895 </desc>
14896 </attribute>
14897 </interface>
14898
14899 <interface
14900 name="ICanShowWindowEvent" extends="IVetoEvent"
14901 uuid="adf292b0-92c9-4a77-9d35-e058b39fe0b9"
14902 wsmap="managed" autogen="VBoxEvent" id="OnCanShowWindow"
14903 waitable="true"
14904 >
14905 <desc>
14906 Notification when a call to
14907 <link to="IMachine::canShowConsoleWindow"/> is made by a
14908 front-end to check if a subsequent call to
14909 <link to="IMachine::showConsoleWindow"/> can succeed.
14910
14911 The callee should give an answer appropriate to the current
14912 machine state using event veto. This answer must
14913 remain valid at least until the next
14914 <link to="IConsole::state">machine state</link> change.
14915 </desc>
14916 </interface>
14917
14918 <interface
14919 name="IShowWindowEvent" extends="IEvent"
14920 uuid="B0A0904D-2F05-4D28-855F-488F96BAD2B2"
14921 wsmap="managed" autogen="VBoxEvent" id="OnShowWindow"
14922 waitable="true"
14923 >
14924 <desc>
14925 Notification when a call to
14926 <link to="IMachine::showConsoleWindow"/>
14927 requests the console window to be activated and brought to
14928 foreground on the desktop of the host PC.
14929
14930 This notification should cause the VM console process to
14931 perform the requested action as described above. If it is
14932 impossible to do it at a time of this notification, this
14933 method should return a failure.
14934
14935 Note that many modern window managers on many platforms
14936 implement some sort of focus stealing prevention logic, so
14937 that it may be impossible to activate a window without the
14938 help of the currently active application (which is supposedly
14939 an initiator of this notification). In this case, this method
14940 must return a non-zero identifier that represents the
14941 top-level window of the VM console process. The caller, if it
14942 represents a currently active process, is responsible to use
14943 this identifier (in a platform-dependent manner) to perform
14944 actual window activation.
14945
14946 This method must set @a winId to zero if it has performed all
14947 actions necessary to complete the request and the console
14948 window is now active and in foreground, to indicate that no
14949 further action is required on the caller's side.
14950 </desc>
14951 <attribute name="winId" type="unsigned long long">
14952 <desc>
14953 Platform-dependent identifier of the top-level VM console
14954 window, or zero if this method has performed all actions
14955 necessary to implement the <i>show window</i> semantics for
14956 the given platform and/or this VirtualBox front-end.
14957 </desc>
14958 </attribute>
14959 </interface>
14960
14961 <module name="VBoxSVC" context="LocalServer">
14962 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
14963 namespace="virtualbox.org">
14964 <interface name="IVirtualBox" default="yes"/>
14965 </class>
14966 </module>
14967
14968 <module name="VBoxC" context="InprocServer" threadingModel="Free">
14969 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
14970 namespace="virtualbox.org">
14971 <interface name="ISession" default="yes"/>
14972 </class>
14973
14974 <class name="Console" uuid="577230FF-164F-4CAC-8548-312D8275A4A7"
14975 namespace="virtualbox.org">
14976 <interface name="IConsole" default="yes"/>
14977 </class>
14978 </module>
14979
14980</library>
14981
14982</idl>
14983
14984<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
Note: See TracBrowser for help on using the repository browser.

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