VirtualBox

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

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

Main: Implemenation of per-machine media registries; VirtualBox::openMedium() no longer adds media to the global registry, instead a media are stored in a machine XML registry after Machine::AttachDevice() has been called; Machine::AttachDevice() now takes an IMedium object instead of a UUID; also make Machine::Unregister() work again for inaccessible machines

  • Property svn:eol-style set to native
File size: 554.1 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4
5 Copyright (C) 2006-2010 Oracle Corporation
6
7 This file is part of VirtualBox Open Source Edition (OSE), as
8 available from http://www.virtualbox.org. This file is free software;
9 you can redistribute it and/or modify it under the terms of the GNU
10 General Public License (GPL) as published by the Free Software
11 Foundation, in version 2 as it comes in the "COPYING" file of the
12 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
13 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
14-->
15
16<!--
17 This is the master declaration for VirtualBox's Main API,
18 represented by COM/XPCOM and web service interfaces.
19
20 From this document, the build system generates several files
21 via XSLT that are then used during the build process.
22
23 Below is the list of XSL templates that operate on this file and
24 output files they generate. These XSL templates must be updated
25 whenever the schema of this file changes:
26
27 1. src/VBox/Main/idl/midl.xsl =>
28 out/<platform>/bin/sdk/idl/VirtualBox.idl
29 (MS COM interface definition file for Main API)
30
31 2. src/VBox/Main/idl/xpidl.xsl =>
32 out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
33 (XPCOM interface definition file for Main API)
34
35 3. src/VBox/Main/idl/doxygen.xsl =>
36 out/<platform>/obj/src/VBox/Main/VirtualBox.idl
37 (pseudo-IDL for Doxygen to generate the official Main API
38 documentation)
39
40 4. src/VBox/Main/webservice/*.xsl =>
41 a bunch of WSDL and C++ files
42 (VirtualBox web service sources and SOAP mappers;
43 see src/VBox/Main/webservice/Makefile.kmk for details)
44
45 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
46 out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
47 (smart Qt-based C++ wrapper classes for COM interfaces
48 of the Main API)
49
50 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
51 out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
52 (Main API TypeLib block for the WiX installer)
53
54 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
55 out/<platform>/obj/Runtime/errmsgvboxcomdata.h
56 (<result> extraction for the %Rhrc format specifier)
57-->
58
59<idl>
60
61<desc>
62 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
63 describes the so-called <i>VirtualBox Main API</i> which comprises all public
64 COM interfaces and components provided by the VirtualBox server and by the
65 VirtualBox client library.
66
67 VirtualBox employs a client-server design, meaning that whenever any part of
68 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
69 interface or any virtual machine --, a dedicated server process named
70 VBoxSVC runs in the background. This allows multiple processes working with
71 VirtualBox to cooperate without conflicts. These processes communicate to each
72 other using inter-process communication facilities provided by the COM
73 implementation of the host computer.
74
75 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
76 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
77 implementation, is used.
78
79 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
80 the VBoxManage command-line interface and the VBoxVRDP server) are technically
81 front-ends to the Main API and only use the interfaces that are documented
82 in this Main API documentation. This ensures that, with any given release
83 version of VirtualBox, all capabilities of the product that could be useful
84 to an external client program are always exposed by way of this API.
85
86 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
87 contains two public component classes:
88 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
89 implement IVirtualBox and ISession interfaces respectively. These two classes
90 are of supreme importance and will be needed in order for any front-end
91 program to do anything useful. It is recommended to read the documentation of
92 the mentioned interfaces first.
93
94 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
95 there can be only one object of this class on the local machine at any given
96 time. This object is a parent of many other objects in the VirtualBox COM
97 library and lives in the VBoxSVC process. In fact, when you create an instance
98 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
99 process is already running, starts it if not, and returns you a reference to
100 the <tt>VirtualBox</tt> object created in this process. When the last reference
101 to this object is released, the VBoxSVC process ends (with a 5 second delay to
102 protect from too frequent restarts).
103
104 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
105 as many <tt>Session</tt> objects as you need but all of them will live in a
106 process which issues the object instantiation call. <tt>Session</tt> objects
107 represent virtual machine sessions which are used to configure virtual
108 machines and control their execution.
109</desc>
110
111<if target="midl">
112 <cpp line="enum {"/>
113 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
114 <cpp line=" kTypeLibraryMinorVersion = 0"/>
115 <cpp line="};"/>
116</if>
117
118<if target="xpidl">
119 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
120 <cpp>
121/* currently, nsISupportsImpl.h lacks the below-like macros */
122
123#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
124#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
125#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI NS_IMPL_QUERY_INTERFACE3_CI
126#define NS_IMPL_THREADSAFE_QUERY_INTERFACE4_CI NS_IMPL_QUERY_INTERFACE4_CI
127
128
129#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
130# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
131 NS_IMPL_THREADSAFE_ADDREF(_class) \
132 NS_IMPL_THREADSAFE_RELEASE(_class) \
133 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
134 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
135#endif
136
137#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
138# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
139 NS_IMPL_THREADSAFE_ADDREF(_class) \
140 NS_IMPL_THREADSAFE_RELEASE(_class) \
141 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
142 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
143#endif
144
145#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_CI
146# define NS_IMPL_THREADSAFE_ISUPPORTS3_CI(_class, _i1, _i2, _i3) \
147 NS_IMPL_THREADSAFE_ADDREF(_class) \
148 NS_IMPL_THREADSAFE_RELEASE(_class) \
149 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI(_class, _i1, _i2, _i3) \
150 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
151#endif
152
153#ifndef NS_IMPL_THREADSAFE_ISUPPORTS4_CI
154# define NS_IMPL_THREADSAFE_ISUPPORTS4_CI(_class, _i1, _i2, _i3, _i4) \
155 NS_IMPL_THREADSAFE_ADDREF(_class) \
156 NS_IMPL_THREADSAFE_RELEASE(_class) \
157 NS_IMPL_THREADSAFE_QUERY_INTERFACE4_CI(_class, _i1, _i2, _i3, _i4) \
158 NS_IMPL_CI_INTERFACE_GETTER4(_class, _i1, _i2, _i3, _i4)
159#endif
160
161#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
162# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
163 NS_INTERFACE_MAP_BEGIN(_class) \
164 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
165 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
166 NS_IMPL_QUERY_CLASSINFO(_class) \
167 NS_INTERFACE_MAP_END
168#endif
169
170#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
171# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
172 _i2, _ic2) \
173 NS_INTERFACE_MAP_BEGIN(_class) \
174 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
175 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
176 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
177 NS_IMPL_QUERY_CLASSINFO(_class) \
178 NS_INTERFACE_MAP_END
179#endif
180
181#ifndef NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
182# define NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
183 _i2, _ic2, _i3, _ic3) \
184 NS_INTERFACE_MAP_BEGIN(_class) \
185 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
186 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
187 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i3, _ic3) \
188 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
189 NS_IMPL_QUERY_CLASSINFO(_class) \
190 NS_INTERFACE_MAP_END
191#endif
192
193#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
194#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
195#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
196
197#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
198# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
199 NS_IMPL_THREADSAFE_ADDREF(_class) \
200 NS_IMPL_THREADSAFE_RELEASE(_class) \
201 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
202 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
203#endif
204
205#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
206# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
207 _i2, _ic2) \
208 NS_IMPL_THREADSAFE_ADDREF(_class) \
209 NS_IMPL_THREADSAFE_RELEASE(_class) \
210 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
211 _i2, _ic2) \
212 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
213#endif
214
215#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI
216# define NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI(_class, _i1, _ic1, \
217 _i2, _ic2, _i3, _ic3) \
218 NS_IMPL_THREADSAFE_ADDREF(_class) \
219 NS_IMPL_THREADSAFE_RELEASE(_class) \
220 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
221 _i2, _ic2, _i3, _ic3) \
222 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
223#endif
224
225 </cpp>
226</if>
227
228<library
229 name="VirtualBox"
230 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
231 version="1.3"
232 desc="VirtualBox Type Library"
233 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
234 supportsErrorInfo="yes"
235>
236
237
238 <!--
239 // COM result codes for VirtualBox
240 /////////////////////////////////////////////////////////////////////////
241 -->
242
243 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
244 <desc>
245 This section describes all VirtualBox-specific COM result codes that may
246 be returned by methods of VirtualBox COM interfaces in addition to
247 standard COM result codes.
248
249 Note that along with the result code, every VirtualBox method returns
250 extended error information through the IVirtualBoxErrorInfo interface on
251 failure. This interface is a preferred way to present the error to the end
252 user because it contains a human readable description of the error. Raw
253 result codes, both standard and described in this section, are intended to
254 be used by programs to analyze the reason of a failure and select an
255 appropriate course of action without involving the end user (for example,
256 retry the operation later or make a different call).
257
258 The standard COM result codes that may originate from our methods include:
259
260 <table>
261 <tr><td>E_INVALIDARG</td>
262 <td>
263 Returned when the value of the method's argument is not within the range
264 of valid values. This should not be confused with situations when the
265 value is within the range but simply doesn't suit the current object
266 state and there is a possibility that it will be accepted later (in such
267 cases VirtualBox-specific codes are returned, for example,
268 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
269 </td>
270 </tr>
271 <tr><td>E_POINTER</td>
272 <td>
273 Returned if a memory pointer for the output argument is invalid (for
274 example, @c null). Note that when pointers representing input
275 arguments (such as strings) are invalid, E_INVALIDARG is returned.
276 </td>
277 </tr>
278 <tr><td>E_ACCESSDENIED</td>
279 <td>
280 Returned when the called object is not ready. Since the lifetime of a
281 public COM object cannot be fully controlled by the implementation,
282 VirtualBox maintains the readiness state for all objects it creates and
283 returns this code in response to any method call on the object that was
284 deactivated by VirtualBox and is not functioning any more.
285 </td>
286 </tr>
287 <tr><td>E_OUTOFMEMORY</td>
288 <td>
289 Returned when a memory allocation operation fails.
290 </td>
291 </tr>
292 </table>
293 </desc>
294 </descGroup>
295
296 <!--
297 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
298 everything in <result>/<desc> after (and including) the first dot, so express
299 the matter of the error code in the first sentence and keep it short.
300 -->
301
302 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
303 <desc>
304 Object corresponding to the supplied arguments does not exist.
305 </desc>
306 </result>
307
308 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
309 <desc>
310 Current virtual machine state prevents the operation.
311 </desc>
312 </result>
313
314 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
315 <desc>
316 Virtual machine error occurred attempting the operation.
317 </desc>
318 </result>
319
320 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
321 <desc>
322 File not accessible or erroneous file contents.
323 </desc>
324 </result>
325
326 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
327 <desc>
328 Runtime subsystem error.
329 </desc>
330 </result>
331
332 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
333 <desc>
334 Pluggable Device Manager error.
335 </desc>
336 </result>
337
338 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
339 <desc>
340 Current object state prohibits operation.
341 </desc>
342 </result>
343
344 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
345 <desc>
346 Host operating system related error.
347 </desc>
348 </result>
349
350 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
351 <desc>
352 Requested operation is not supported.
353 </desc>
354 </result>
355
356 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
357 <desc>
358 Invalid XML found.
359 </desc>
360 </result>
361
362 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
363 <desc>
364 Current session state prohibits operation.
365 </desc>
366 </result>
367
368 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
369 <desc>
370 Object being in use prohibits operation.
371 </desc>
372 </result>
373
374 <!--
375 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
376 everything in <result>/<desc> after (and including) the first dot, so express
377 the matter of the error code in the first sentence and keep it short.
378 -->
379
380 <descGroup/>
381
382 <!--
383 // all common enums
384 /////////////////////////////////////////////////////////////////////////
385 -->
386
387 <enum name="SettingsVersion"
388 uuid="52bd6f5f-1adb-4493-975d-581a9c4b803f"
389 >
390 <desc>Settings version of VirtualBox settings files. This is written to
391 the "version" attribute of the root "VirtualBox" element in the settings
392 file XML and indicates which VirtualBox version wrote the file.
393 </desc>
394
395 <const name="Null" value="0">
396 <desc>Null value, indicates invalid version.</desc>
397 </const>
398 <const name="v1_0" value="1">
399 <desc>Legacy settings version, not currently supported.</desc>
400 </const>
401 <const name="v1_1" value="2">
402 <desc>Legacy settings version, not currently supported.</desc>
403 </const>
404 <const name="v1_2" value="3">
405 <desc>Legacy settings version, not currently supported.</desc>
406 </const>
407 <const name="v1_3pre" value="4">
408 <desc>Legacy settings version, not currently supported.</desc>
409 </const>
410 <const name="v1_3" value="5">
411 <desc>Settings version "1.3", written by VirtualBox 2.0.12.</desc>
412 <!--
413 Machine XML: Capitalization of Uart, Lpt elements and many attributes changed.
414 -->
415 </const>
416 <const name="v1_4" value="6">
417 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
418 <!--
419 VirtualBox.xml: big DiskRegistry -> MediaRegistry revamp, various HardDisk types merged
420 (was VirtualDiskImage, VMDKImage, VHDImage, ISCSIHardDisk, CustomHardDisk, DiffHardDisk)
421 -->
422 </const>
423 <const name="v1_5" value="7">
424 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
425 <!-- 2008-09-04: 2.0.0 released
426 2008-11-20: settings version 1.5 introduced
427 2008-12-17: 2.1.0 released
428 Machine changes:
429 guest OS identifiers changed;
430 Machine/Hardware/Display/MonitorCount renamed to monitorCount;
431 Machine/Hardware/Display/Accelerate3D renamed to accelerate3D;
432 Machine/Hardware/CPU/CPUCount/@count changed to CPU/@count
433 -->
434 </const>
435 <const name="v1_6" value="8">
436 <desc>Settings version "1.6", written by VirtualBox 2.1.4 (at least).</desc>
437 <!-- 2008-12-17: 2.1.0 released
438 2008-12-19: settings version 1.6 introduced (is in 2.1 branch)
439 2009-04-08: 2.2.0 released
440 Machine changes: remove all Machine/Hardware/Network/Adapter/HostInterface[@TAPSetup or @TAPTerminate]/ attributes (done)
441 -->
442 </const>
443 <const name="v1_7" value="9">
444 <desc>Settings version "1.7", written by VirtualBox 2.2.x and 3.0.x.</desc>
445 <!-- 2008-12-17: 2.1.0 released
446 2009-03-11: settings version 1.7 introduced (is in 2.2 branch)
447 2009-04-08: 2.2.0 released
448 VirtualBox.xml additions: NetserviceRegistry with DHCPServers (done)
449 Machine changes: HardDiskAttachments is now StorageControllers (done)
450 -->
451 </const>
452 <const name="v1_8" value="10">
453 <desc>Intermediate settings version "1.8", understood by VirtualBox 3.1.x.</desc>
454 <!-- Machine additions: Display/@accelerate2DVideo (done)
455 -->
456 </const>
457 <const name="v1_9" value="11">
458 <desc>Settings version "1.9", written by VirtualBox 3.1.x.</desc>
459 <!-- The big storage controller / DVD / Floppy rework (done)
460 -->
461 </const>
462 <const name="v1_10" value="12">
463 <desc>Settings version "1.10", written by VirtualBox 3.2.x.</desc>
464 <!-- Machine changes: RTC localOrUTC (done)
465 CPU hot-plug support
466 -->
467 </const>
468 <const name="v1_11" value="13">
469 <desc>Settings version "1.11", written by VirtualBox 3.3.x.</desc>
470 <!-- Machine changes: HD Audio controller, per-machine disk registries
471 -->
472 </const>
473 <const name="Future" value="99999">
474 <desc>Settings version greater than "1.11", written by a future VirtualBox version.</desc>
475 </const>
476 </enum>
477
478 <enum
479 name="AccessMode"
480 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
481 >
482 <desc>
483 Access mode for opening files.
484 </desc>
485
486 <const name="ReadOnly" value="1"/>
487 <const name="ReadWrite" value="2"/>
488 </enum>
489
490 <enum
491 name="MachineState"
492 uuid="e998d075-543a-41fc-8aa9-5ca3e92393fd"
493 >
494 <desc>
495 Virtual machine execution state.
496
497 This enumeration represents possible values of the <link
498 to="IMachine::state"/> attribute.
499
500 Below is the basic virtual machine state diagram. It shows how the state
501 changes during virtual machine execution. The text in square braces shows
502 a method of the IConsole interface that performs the given state
503 transition.
504
505 <pre>
506 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
507 V |
508 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
509 | | | | V |
510 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
511 | | ^ | ^ |
512 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
513 | ^ | | | |
514 | | +-----------------------------------------+-|-------------------+ +
515 | | | | |
516 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
517 | | | |
518 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
519 | | |
520 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
521 </pre>
522
523 Note that states to the right from PoweredOff, Aborted and Saved in the
524 above diagram are called <i>online VM states</i>. These states
525 represent the virtual machine which is being executed in a dedicated
526 process (usually with a GUI window attached to it where you can see the
527 activity of the virtual machine and interact with it). There are two
528 special pseudo-states, FirstOnline and LastOnline, that can be used in
529 relational expressions to detect if the given machine state is online or
530 not:
531
532 <pre>
533 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
534 machine.GetState() &lt;= MachineState_LastOnline)
535 {
536 ...the machine is being executed...
537 }
538 </pre>
539
540 When the virtual machine is in one of the online VM states (that is, being
541 executed), only a few machine settings can be modified. Methods working
542 with such settings contain an explicit note about that. An attempt to
543 change any oter setting or perform a modifying operation during this time
544 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
545
546 All online states except Running, Paused and Stuck are transitional: they
547 represent temporary conditions of the virtual machine that will last as
548 long as the operation that initiated such a condition.
549
550 The Stuck state is a special case. It means that execution of the machine
551 has reached the "Guru Meditation" condition. This condition indicates an
552 internal VMM (virtual machine manager) failure which may happen as a
553 result of either an unhandled low-level virtual hardware exception or one
554 of the recompiler exceptions (such as the <i>too-many-traps</i>
555 condition).
556
557 Note also that any online VM state may transit to the Aborted state. This
558 happens if the process that is executing the virtual machine terminates
559 unexpectedly (for example, crashes). Other than that, the Aborted state is
560 equivalent to PoweredOff.
561
562 There are also a few additional state diagrams that do not deal with
563 virtual machine execution and therefore are shown separately. The states
564 shown on these diagrams are called <i>offline VM states</i> (this includes
565 PoweredOff, Aborted and Saved too).
566
567 The first diagram shows what happens when a lengthy setup operation is
568 being executed (such as <link to="IMachine::attachDevice"/>).
569
570 <pre>
571 +----------------------------------(same state as before the call)------+
572 | |
573 +-&gt; PoweredOff --+ |
574 | | |
575 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
576 | |
577 +-&gt; Saved -------+
578 </pre>
579
580 The next two diagrams demonstrate the process of taking a snapshot of a
581 powered off virtual machine, restoring the state to that as of a snapshot
582 or deleting a snapshot, respectively.
583
584 <pre>
585 +----------------------------------(same state as before the call)------+
586 | |
587 +-&gt; PoweredOff --+ |
588 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
589 +-&gt; Aborted -----+
590
591 +-&gt; PoweredOff --+
592 | |
593 | Aborted -----+--&gt;[restoreSnapshot() ]-------&gt; RestoringSnapshot -+
594 | | [deleteSnapshot() ]-------&gt; DeletingSnapshot --+
595 +-&gt; Saved -------+ |
596 | |
597 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
598 </pre>
599
600 Note that the Saving state is present in both the offline state group and
601 online state group. Currently, the only way to determine what group is
602 assumed in a particular case is to remember the previous machine state: if
603 it was Running or Paused, then Saving is an online state, otherwise it is
604 an offline state. This inconsistency may be removed in one of the future
605 versions of VirtualBox by adding a new state.
606
607 <note internal="yes">
608 For whoever decides to touch this enum: In order to keep the
609 comparisons involving FirstOnline and LastOnline pseudo-states valid,
610 the numeric values of these states must be correspondingly updated if
611 needed: for any online VM state, the condition
612 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
613 @c true. The same relates to transient states for which
614 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
615 @c true.
616 </note>
617 </desc>
618
619 <const name="Null" value="0">
620 <desc>Null value (never used by the API).</desc>
621 </const>
622 <const name="PoweredOff" value="1">
623 <desc>
624 The machine is not running and has no saved execution state; it has
625 either never been started or been shut down successfully.
626 </desc>
627 </const>
628 <const name="Saved" value="2">
629 <desc>
630 The machine is not currently running, but the execution state of the machine
631 has been saved to an external file when it was running, from where
632 it can be resumed.
633 </desc>
634 </const>
635 <const name="Teleported" value="3">
636 <desc>
637 The machine was teleported to a different host (or process) and then
638 powered off. Take care when powering it on again may corrupt resources
639 it shares with the teleportation target (e.g. disk and network).
640 </desc>
641 </const>
642 <const name="Aborted" value="4">
643 <desc>
644 The process running the machine has terminated abnormally. This may
645 indicate a crash of the VM process in host execution context, or
646 the VM process has been terminated externally.
647 </desc>
648 </const>
649 <const name="Running" value="5">
650 <desc>
651 The machine is currently being executed.
652 <note internal="yes">
653 For whoever decides to touch this enum: In order to keep the
654 comparisons in the old source code valid, this state must immediately
655 precede the Paused state.
656 TODO: Lift this spectacularly wonderful restriction.
657 </note>
658 </desc>
659 </const>
660 <const name="Paused" value="6">
661 <desc>
662 Execution of the machine has been paused.
663 <note internal="yes">
664 For whoever decides to touch this enum: In order to keep the
665 comparisons in the old source code valid, this state must immediately
666 follow the Running state.
667 TODO: Lift this spectacularly wonderful restriction.
668 </note>
669 </desc>
670 </const>
671 <const name="Stuck" value="7">
672 <desc>
673 Execution of the machine has reached the "Guru Meditation"
674 condition. This indicates a severe error in the hypervisor itself.
675 <note internal="yes">
676 bird: Why this uncool name? Could we rename it to "GuruMeditation" or
677 "Guru", perhaps? Or are there some other VMM states that are
678 intended to be lumped in here as well?
679 </note>
680 </desc>
681 </const>
682 <const name="Teleporting" value="8">
683 <desc>
684 The machine is about to be teleported to a different host or process.
685 It is possible to pause a machine in this state, but it will go to the
686 @c TeleportingPausedVM state and it will not be
687 possible to resume it again unless the teleportation fails.
688 </desc>
689 </const>
690 <const name="LiveSnapshotting" value="9">
691 <desc>
692 A live snapshot is being taken. The machine is running normally, but
693 some of the runtime configuration options are inaccessible. Also, if
694 paused while in this state it will transition to
695 @c Saving and it will not be resume the
696 execution until the snapshot operation has completed.
697 </desc>
698 </const>
699 <const name="Starting" value="10">
700 <desc>
701 Machine is being started after powering it on from a
702 zero execution state.
703 </desc>
704 </const>
705 <const name="Stopping" value="11">
706 <desc>
707 Machine is being normally stopped powering it off, or after the guest OS
708 has initiated a shutdown sequence.
709 </desc>
710 </const>
711 <const name="Saving" value="12">
712 <desc>
713 Machine is saving its execution state to a file, or an online
714 snapshot of the machine is being taken.
715 </desc>
716 </const>
717 <const name="Restoring" value="13">
718 <desc>
719 Execution state of the machine is being restored from a file
720 after powering it on from the saved execution state.
721 </desc>
722 </const>
723 <const name="TeleportingPausedVM" value="14">
724 <desc>
725 The machine is being teleported to another host or process, but it is
726 not running. This is the paused variant of the
727 @c state.
728 </desc>
729 </const>
730 <const name="TeleportingIn" value="15">
731 <desc>
732 Teleporting the machine state in from another host or process.
733 </desc>
734 </const>
735 <const name="DeletingSnapshotOnline" value="16">
736 <desc>
737 Like @c DeletingSnapshot, but the merging of media is ongoing in
738 the background while the machine is running.
739 </desc>
740 </const>
741 <const name="DeletingSnapshotPaused" value="17">
742 <desc>
743 Like @c DeletingSnapshotOnline, but the machine was paused when the
744 merging of differencing media was started.
745 </desc>
746 </const>
747 <const name="RestoringSnapshot" value="18">
748 <desc>
749 A machine snapshot is being restored; this typically does not take long.
750 </desc>
751 </const>
752 <const name="DeletingSnapshot" value="19">
753 <desc>
754 A machine snapshot is being deleted; this can take a long time since this
755 may require merging differencing media. This value indicates that the
756 machine is not running while the snapshot is being deleted.
757 </desc>
758 </const>
759 <const name="SettingUp" value="20">
760 <desc>
761 Lengthy setup operation is in progress.
762 </desc>
763 </const>
764
765 <const name="FirstOnline" value="5" wsmap="suppress"> <!-- Running -->
766 <desc>
767 Pseudo-state: first online state (for use in relational expressions).
768 </desc>
769 </const>
770 <const name="LastOnline" value="17" wsmap="suppress"> <!-- DeletingSnapshotPaused -->
771 <desc>
772 Pseudo-state: last online state (for use in relational expressions).
773 </desc>
774 </const>
775
776 <const name="FirstTransient" value="8" wsmap="suppress"> <!-- Teleporting -->
777 <desc>
778 Pseudo-state: first transient state (for use in relational expressions).
779 </desc>
780 </const>
781 <const name="LastTransient" value="20" wsmap="suppress"> <!-- SettingUp -->
782 <desc>
783 Pseudo-state: last transient state (for use in relational expressions).
784 </desc>
785 </const>
786
787 </enum>
788
789 <enum
790 name="SessionState"
791 uuid="cf2700c0-ea4b-47ae-9725-7810114b94d8"
792 >
793 <desc>
794 Session state. This enumeration represents possible values of
795 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
796 attributes.
797 </desc>
798
799 <const name="Null" value="0">
800 <desc>Null value (never used by the API).</desc>
801 </const>
802 <const name="Unlocked" value="1">
803 <desc>
804 In <link to="IMachine::sessionState"/>, this means that the machine
805 is not locked for any sessions.
806
807 In <link to="ISession::state"/>, this means that no machine is
808 currently locked for this session.
809 </desc>
810 </const>
811 <const name="Locked" value="2">
812 <desc>
813 In <link to="IMachine::sessionState"/>, this means that the machine
814 is currently locked for a session, whose process identifier can
815 then be found in the <link to="IMachine::sessionPid" /> attribute.
816
817 In <link to="ISession::state"/>, this means that a machine is
818 currently locked for this session, and the mutable machine object
819 can be found in the <link to="ISession::machine"/> attribute
820 (see <link to="IMachine::lockMachine" /> for details).
821 </desc>
822 </const>
823 <const name="Spawning" value="3">
824 <desc>
825 A new process is being spawned for the machine as a result of
826 <link to="IMachine::launchVMProcess"/> call. This state also occurs
827 as a short transient state during an <link to="IMachine::lockMachine"/>
828 call.
829 </desc>
830 </const>
831 <const name="Unlocking" value="4">
832 <desc>
833 The session is being unlocked.
834 </desc>
835 </const>
836 </enum>
837
838 <enum
839 name="CPUPropertyType"
840 uuid="24d356a6-2f45-4abd-b977-1cbe9c4701f5"
841 >
842 <desc>
843 Virtual CPU property type. This enumeration represents possible values of the
844 IMachine get- and setCPUProperty methods.
845 </desc>
846 <const name="Null" value="0">
847 <desc>Null value (never used by the API).</desc>
848 </const>
849 <const name="PAE" value="1">
850 <desc>
851 This setting determines whether VirtualBox will expose the Physical Address
852 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
853 is not available, it will not be reported.
854 </desc>
855 </const>
856 <const name="Synthetic" value="2">
857 <desc>
858 This setting determines whether VirtualBox will expose a synthetic CPU to the guest to allow
859 teleporting between host systems that differ significantly.
860 </desc>
861 </const>
862 </enum>
863
864
865 <enum
866 name="HWVirtExPropertyType"
867 uuid="ce81dfdd-d2b8-4a90-bbea-40ee8b7ffcee"
868 >
869 <desc>
870 Hardware virtualization property type. This enumeration represents possible values
871 for the <link to="IMachine::getHWVirtExProperty"/> and
872 <link to="IMachine::setHWVirtExProperty"/> methods.
873 </desc>
874 <const name="Null" value="0">
875 <desc>Null value (never used by the API).</desc>
876 </const>
877 <const name="Enabled" value="1">
878 <desc>
879 Whether hardware virtualization (VT-x/AMD-V) is enabled at all. If
880 such extensions are not available, they will not be used.
881 </desc>
882 </const>
883 <const name="Exclusive" value="2">
884 <desc>
885 Whether hardware virtualization is used exclusively by VirtualBox. When enabled,
886 VirtualBox assumes it can acquire full and exclusive access to the VT-x or AMD-V
887 feature of the host. To share these with other hypervisors, you must disable this property.
888 </desc>
889 </const>
890 <const name="VPID" value="3">
891 <desc>
892 Whether VT-x VPID is enabled. If this extension is not available, it will not be used.
893 </desc>
894 </const>
895 <const name="NestedPaging" value="4">
896 <desc>
897 Whether Nested Paging is enabled. If this extension is not available, it will not be used.
898 </desc>
899 </const>
900 <const name="LargePages" value="5">
901 <desc>
902 Whether large page allocation is enabled; requires nested paging and a 64 bits host.
903 </desc>
904 </const>
905 </enum>
906
907 <enum
908 name="LockType"
909 uuid="138b53f8-db4b-47c5-b32b-4ef52f769413"
910 >
911 <desc>
912 Used with <link to="IMachine::lockMachine" />.
913 </desc>
914 <const name="Write" value="2">
915 <desc>Lock the machine for writing.</desc>
916 </const>
917 <const name="Shared" value="1">
918 <desc>Request only a shared read lock for remote-controlling the machine.</desc>
919 </const>
920 </enum>
921
922 <enum
923 name="SessionType"
924 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
925 >
926 <desc>
927 Session type. This enumeration represents possible values of the
928 <link to="ISession::type"/> attribute.
929 </desc>
930
931 <const name="Null" value="0">
932 <desc>Null value (never used by the API).</desc>
933 </const>
934 <const name="WriteLock" value="1">
935 <desc>
936 Session has acquired an exclusive write lock on a machine
937 using <link to="IMachine::lockMachine"/>.
938 </desc>
939 </const>
940 <const name="Remote" value="2">
941 <desc>
942 Session has launched a VM process using
943 <link to="IMachine::launchVMProcess"/>
944 </desc>
945 </const>
946 <const name="Shared" value="3">
947 <desc>
948 Session has obtained a link to another session using
949 <link to="IMachine::lockMachine"/>
950 </desc>
951 </const>
952 </enum>
953
954 <enum
955 name="DeviceType"
956 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
957 >
958 <desc>
959 Device type.
960 </desc>
961 <const name="Null" value="0">
962 <desc>
963 Null value, may also mean "no device" (not allowed for
964 <link to="IConsole::getDeviceActivity"/>).
965 </desc>
966 </const>
967 <const name="Floppy" value="1">
968 <desc>Floppy device.</desc>
969 </const>
970 <const name="DVD" value="2">
971 <desc>CD/DVD-ROM device.</desc>
972 </const>
973 <const name="HardDisk" value="3">
974 <desc>Hard disk device.</desc>
975 </const>
976 <const name="Network" value="4">
977 <desc>Network device.</desc>
978 </const>
979 <const name="USB" value="5">
980 <desc>USB device.</desc>
981 </const>
982 <const name="SharedFolder" value="6">
983 <desc>Shared folder device.</desc>
984 </const>
985 </enum>
986
987 <enum
988 name="DeviceActivity"
989 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
990 >
991 <desc>
992 Device activity for <link to="IConsole::getDeviceActivity"/>.
993 </desc>
994
995 <const name="Null" value="0"/>
996 <const name="Idle" value="1"/>
997 <const name="Reading" value="2"/>
998 <const name="Writing" value="3"/>
999 </enum>
1000
1001 <enum
1002 name="ClipboardMode"
1003 uuid="33364716-4008-4701-8f14-be0fa3d62950"
1004 >
1005 <desc>
1006 Host-Guest clipboard interchange mode.
1007 </desc>
1008
1009 <const name="Disabled" value="0"/>
1010 <const name="HostToGuest" value="1"/>
1011 <const name="GuestToHost" value="2"/>
1012 <const name="Bidirectional" value="3"/>
1013 </enum>
1014
1015 <enum
1016 name="Scope"
1017 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
1018 >
1019 <desc>
1020 Scope of the operation.
1021
1022 A generic enumeration used in various methods to define the action or
1023 argument scope.
1024 </desc>
1025
1026 <const name="Global" value="0"/>
1027 <const name="Machine" value="1"/>
1028 <const name="Session" value="2"/>
1029 </enum>
1030
1031 <enum
1032 name="BIOSBootMenuMode"
1033 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
1034 >
1035 <desc>
1036 BIOS boot menu mode.
1037 </desc>
1038
1039 <const name="Disabled" value="0"/>
1040 <const name="MenuOnly" value="1"/>
1041 <const name="MessageAndMenu" value="2"/>
1042 </enum>
1043
1044 <enum
1045 name="ProcessorFeature"
1046 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
1047 >
1048 <desc>
1049 CPU features.
1050 </desc>
1051
1052 <const name="HWVirtEx" value="0"/>
1053 <const name="PAE" value="1"/>
1054 <const name="LongMode" value="2"/>
1055 <const name="NestedPaging" value="3"/>
1056 </enum>
1057
1058 <enum
1059 name="FirmwareType"
1060 uuid="b903f264-c230-483e-ac74-2b37ce60d371"
1061 >
1062 <desc>
1063 Firmware type.
1064 </desc>
1065 <const name="BIOS" value="1">
1066 <desc>BIOS Firmware.</desc>
1067 </const>
1068 <const name="EFI" value="2">
1069 <desc>EFI Firmware, bitness detetced basing on OS type.</desc>
1070 </const>
1071 <const name="EFI32" value="3">
1072 <desc>Efi firmware, 32-bit.</desc>
1073 </const>
1074 <const name="EFI64" value="4">
1075 <desc>Efi firmware, 64-bit.</desc>
1076 </const>
1077 <const name="EFIDUAL" value="5">
1078 <desc>Efi firmware, combined 32 and 64-bit.</desc>
1079 </const>
1080 </enum>
1081
1082 <enum
1083 name="PointingHidType"
1084 uuid="0d3c17a2-821a-4b2e-ae41-890c6c60aa97"
1085 >
1086 <desc>
1087 Type of pointing device used in a virtual machine.
1088 </desc>
1089 <const name="None" value="1">
1090 <desc>No mouse.</desc>
1091 </const>
1092 <const name="PS2Mouse" value="2">
1093 <desc>PS/2 auxillary device, a.k.a. mouse.</desc>
1094 </const>
1095 <const name="USBMouse" value="3">
1096 <desc>USB mouse (relative pointer).</desc>
1097 </const>
1098 <const name="USBTablet" value="4">
1099 <desc>USB tablet (absolute pointer).</desc>
1100 </const>
1101 <const name="ComboMouse" value="5">
1102 <desc>Combined device, working as PS/2 or USB mouse, depending on guest behavior.
1103 Using of such device can have negative performance implications. </desc>
1104 </const>
1105 </enum>
1106
1107 <enum
1108 name="KeyboardHidType"
1109 uuid="5a5b0996-3a3e-44bb-9019-56979812cbcc"
1110 >
1111 <desc>
1112 Type of keyboard device used in a virtual machine.
1113 </desc>
1114 <const name="None" value="1">
1115 <desc>No keyboard.</desc>
1116 </const>
1117 <const name="PS2Keyboard" value="2">
1118 <desc>PS/2 keyboard.</desc>
1119 </const>
1120 <const name="USBKeyboard" value="3">
1121 <desc>USB keyboard.</desc>
1122 </const>
1123 <const name="ComboKeyboard" value="4">
1124 <desc>Combined device, working as PS/2 or USB keyboard, depending on guest behavior.
1125 Using of such device can have negative performance implications. </desc>
1126 </const>
1127 </enum>
1128
1129 <!--
1130 // IVirtualBoxErrorInfo
1131 /////////////////////////////////////////////////////////////////////////
1132 -->
1133
1134 <interface
1135 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1136 uuid="e053d3c0-f493-491b-a735-3a9f0b1feed4"
1137 supportsErrorInfo="no"
1138 wsmap="managed"
1139 >
1140 <desc>
1141 The IVirtualBoxErrorInfo interface represents extended error information.
1142
1143 Extended error information can be set by VirtualBox components after
1144 unsuccessful or partially successful method invocation. This information
1145 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1146 and then shown to the client in addition to the plain 32-bit result code.
1147
1148 In MS COM, this interface extends the IErrorInfo interface,
1149 in XPCOM, it extends the nsIException interface. In both cases,
1150 it provides a set of common attributes to retrieve error
1151 information.
1152
1153 Sometimes invocation of some component's method may involve methods of
1154 other components that may also fail (independently of this method's
1155 failure), or a series of non-fatal errors may precede a fatal error that
1156 causes method failure. In cases like that, it may be desirable to preserve
1157 information about all errors happened during method invocation and deliver
1158 it to the caller. The <link to="#next"/> attribute is intended
1159 specifically for this purpose and allows to represent a chain of errors
1160 through a single IVirtualBoxErrorInfo object set after method invocation.
1161
1162 Note that errors are stored to a chain in the reverse order, i.e. the
1163 initial error object you query right after method invocation is the last
1164 error set by the callee, the object it points to in the @a next attribute
1165 is the previous error and so on, up to the first error (which is the last
1166 in the chain).
1167 </desc>
1168
1169 <attribute name="resultCode" type="long" readonly="yes">
1170 <desc>
1171 Result code of the error.
1172 Usually, it will be the same as the result code returned
1173 by the method that provided this error information, but not
1174 always. For example, on Win32, CoCreateInstance() will most
1175 likely return E_NOINTERFACE upon unsuccessful component
1176 instantiation attempt, but not the value the component factory
1177 returned. Value is typed 'long', not 'result',
1178 to make interface usable from scripting languages.
1179 <note>
1180 In MS COM, there is no equivalent.
1181 In XPCOM, it is the same as nsIException::result.
1182 </note>
1183 </desc>
1184 </attribute>
1185
1186 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1187 <desc>
1188 UUID of the interface that defined the error.
1189 <note>
1190 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1191 data type.
1192 In XPCOM, there is no equivalent.
1193 </note>
1194 </desc>
1195 </attribute>
1196
1197 <attribute name="component" type="wstring" readonly="yes">
1198 <desc>
1199 Name of the component that generated the error.
1200 <note>
1201 In MS COM, it is the same as IErrorInfo::GetSource.
1202 In XPCOM, there is no equivalent.
1203 </note>
1204 </desc>
1205 </attribute>
1206
1207 <attribute name="text" type="wstring" readonly="yes">
1208 <desc>
1209 Text description of the error.
1210 <note>
1211 In MS COM, it is the same as IErrorInfo::GetDescription.
1212 In XPCOM, it is the same as nsIException::message.
1213 </note>
1214 </desc>
1215 </attribute>
1216
1217 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1218 <desc>
1219 Next error object if there is any, or @c null otherwise.
1220 <note>
1221 In MS COM, there is no equivalent.
1222 In XPCOM, it is the same as nsIException::inner.
1223 </note>
1224 </desc>
1225 </attribute>
1226
1227 </interface>
1228
1229 <!--
1230 // IVirtualBox
1231 /////////////////////////////////////////////////////////////////////////
1232 -->
1233
1234 <interface
1235 name="IDHCPServer" extends="$unknown"
1236 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1237 wsmap="managed"
1238 >
1239 <desc>
1240 The IDHCPServer interface represents the vbox dhcp server configuration.
1241
1242 To enumerate all the dhcp servers on the host, use the
1243 <link to="IVirtualBox::DHCPServers"/> attribute.
1244 </desc>
1245
1246 <attribute name="enabled" type="boolean">
1247 <desc>
1248 specifies if the dhcp server is enabled
1249 </desc>
1250 </attribute>
1251
1252 <attribute name="IPAddress" type="wstring" readonly="yes">
1253 <desc>
1254 specifies server IP
1255 </desc>
1256 </attribute>
1257
1258 <attribute name="networkMask" type="wstring" readonly="yes">
1259 <desc>
1260 specifies server network mask
1261 </desc>
1262 </attribute>
1263
1264 <attribute name="networkName" type="wstring" readonly="yes">
1265 <desc>
1266 specifies internal network name the server is used for
1267 </desc>
1268 </attribute>
1269
1270 <attribute name="lowerIP" type="wstring" readonly="yes">
1271 <desc>
1272 specifies from IP adrres in server address range
1273 </desc>
1274 </attribute>
1275
1276 <attribute name="upperIP" type="wstring" readonly="yes">
1277 <desc>
1278 specifies to IP adrres in server address range
1279 </desc>
1280 </attribute>
1281
1282 <method name="setConfiguration">
1283 <desc>
1284 configures the server
1285 <result name="E_INVALIDARG">
1286 invalid configuration supplied
1287 </result>
1288 </desc>
1289 <param name="IPAddress" type="wstring" dir="in">
1290 <desc>
1291 server IP address
1292 </desc>
1293 </param>
1294 <param name="networkMask" type="wstring" dir="in">
1295 <desc>
1296 server network mask
1297 </desc>
1298 </param>
1299 <param name="FromIPAddress" type="wstring" dir="in">
1300 <desc>
1301 server From IP address for address range
1302 </desc>
1303 </param>
1304 <param name="ToIPAddress" type="wstring" dir="in">
1305 <desc>
1306 server To IP address for address range
1307 </desc>
1308 </param>
1309 </method>
1310
1311 <method name="start">
1312 <desc>
1313 Starts DHCP server process.
1314 <result name="E_FAIL">
1315 Failed to start the process.
1316 </result>
1317 </desc>
1318 <param name="networkName" type="wstring" dir="in">
1319 <desc>
1320 Name of internal network DHCP server should attach to.
1321 </desc>
1322 </param>
1323 <param name="trunkName" type="wstring" dir="in">
1324 <desc>
1325 Name of internal network trunk.
1326 </desc>
1327 </param>
1328 <param name="trunkType" type="wstring" dir="in">
1329 <desc>
1330 Type of internal network trunk.
1331 </desc>
1332 </param>
1333 </method>
1334
1335 <method name="stop">
1336 <desc>
1337 Stops DHCP server process.
1338 <result name="E_FAIL">
1339 Failed to stop the process.
1340 </result>
1341 </desc>
1342 </method>
1343 </interface>
1344
1345 <interface
1346 name="IVirtualBox" extends="$unknown"
1347 uuid="ec6cc7e7-06a2-4c5d-8993-1e3619c53817"
1348 wsmap="managed"
1349 >
1350 <desc>
1351 The IVirtualBox interface represents the main interface exposed by the
1352 product that provides virtual machine management.
1353
1354 An instance of IVirtualBox is required for the product to do anything
1355 useful. Even though the interface does not expose this, internally,
1356 IVirtualBox is implemented as a singleton and actually lives in the
1357 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1358 IVirtualBox can track the state of all virtual machines on a particular
1359 host, regardless of which frontend started them.
1360
1361 To enumerate all the virtual machines on the host, use the
1362 <link to="IVirtualBox::machines"/> attribute.
1363 </desc>
1364
1365 <attribute name="version" type="wstring" readonly="yes">
1366 <desc>
1367 A string representing the version number of the product. The
1368 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1369 last number represents the build number and will frequently change.
1370 </desc>
1371 </attribute>
1372
1373 <attribute name="revision" type="unsigned long" readonly="yes">
1374 <desc>
1375 The internal build revision number of the product.
1376 </desc>
1377 </attribute>
1378
1379 <attribute name="packageType" type="wstring" readonly="yes">
1380 <desc>
1381 A string representing the package type of this product. The
1382 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1383 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1384 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1385 this.
1386 </desc>
1387 </attribute>
1388
1389 <attribute name="homeFolder" type="wstring" readonly="yes">
1390 <desc>
1391 Full path to the directory where the global settings file,
1392 <tt>VirtualBox.xml</tt>, is stored.
1393
1394 In this version of VirtualBox, the value of this property is
1395 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1396 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1397 as determined by the host OS), and cannot be changed.
1398
1399 This path is also used as the base to resolve relative paths in
1400 places where relative paths are allowed (unless otherwise
1401 expressly indicated).
1402 </desc>
1403 </attribute>
1404
1405 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1406 <desc>
1407 Full name of the global settings file.
1408 The value of this property corresponds to the value of
1409 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1410 </desc>
1411 </attribute>
1412
1413 <attribute name="host" type="IHost" readonly="yes">
1414 <desc>Associated host object.</desc>
1415 </attribute>
1416
1417 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1418 <desc>Associated system information object.</desc>
1419 </attribute>
1420
1421 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1422 <desc>
1423 Array of machine objects registered within this VirtualBox instance.
1424 </desc>
1425 </attribute>
1426
1427 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1428 <desc>
1429 Array of medium objects known to this VirtualBox installation.
1430
1431 This array contains only base media. All differencing
1432 media of the given base medium can be enumerated using
1433 <link to="IMedium::children"/>.
1434 </desc>
1435 </attribute>
1436
1437 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1438 <desc>
1439 Array of CD/DVD image objects currently in use by 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 currently in use by 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="openMachine">
1593 <desc>
1594 Opens a virtual machine from the existing settings file.
1595 The opened machine remains unregistered until you call
1596 <link to="#registerMachine"/>.
1597
1598 The specified settings file name can be absolute
1599 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1600 VirtualBox home directory</link>. This file must exist
1601 and must be a valid machine settings file whose contents
1602 will be used to construct the machine object.
1603
1604 <result name="VBOX_E_FILE_ERROR">
1605 Settings file name invalid, not found or sharing violation.
1606 </result>
1607 </desc>
1608 <param name="settingsFile" type="wstring" dir="in">
1609 <desc>
1610 Name of the machine settings file.
1611 </desc>
1612 </param>
1613 <param name="machine" type="IMachine" dir="return">
1614 <desc>Opened machine object.</desc>
1615 </param>
1616 <note>
1617 <link to="IMachine::settingsModified"/> will return
1618 @c false for the created machine, until any of machine settings
1619 are changed.
1620 </note>
1621 </method>
1622
1623 <method name="registerMachine">
1624 <desc>
1625
1626 Registers the machine previously created using
1627 <link to="#createMachine"/> or opened using
1628 <link to="#openMachine"/> within this VirtualBox installation. After
1629 successful method invocation, the
1630 <link to="IMachineRegisteredEvent"/> event is fired.
1631
1632 <note>
1633 This method implicitly calls <link to="IMachine::saveSettings"/>
1634 to save all current machine settings before registering it.
1635 </note>
1636
1637 <result name="VBOX_E_OBJECT_NOT_FOUND">
1638 No matching virtual machine found.
1639 </result>
1640 <result name="VBOX_E_INVALID_OBJECT_STATE">
1641 Virtual machine was not created within this VirtualBox instance.
1642 </result>
1643
1644 </desc>
1645 <param name="machine" type="IMachine" dir="in"/>
1646 </method>
1647
1648 <method name="getMachine">
1649 <desc>
1650 Attempts to find a virtual machine given its UUID.
1651 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1652 instead.
1653
1654 <result name="VBOX_E_OBJECT_NOT_FOUND">
1655 Could not find registered machine matching @a id.
1656 </result>
1657
1658 </desc>
1659 <param name="id" type="uuid" mod="string" dir="in"/>
1660 <param name="machine" type="IMachine" dir="return"/>
1661 </method>
1662
1663 <method name="findMachine">
1664 <desc>
1665 Attempts to find a virtual machine given its name.
1666 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1667 instead.
1668
1669 <result name="VBOX_E_OBJECT_NOT_FOUND">
1670 Could not find registered machine matching @a name.
1671 </result>
1672
1673 </desc>
1674 <param name="name" type="wstring" dir="in"/>
1675 <param name="machine" type="IMachine" dir="return"/>
1676 </method>
1677
1678 <method name="createAppliance">
1679 <desc>
1680 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1681 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1682 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1683 </desc>
1684 <param name="appliance" type="IAppliance" dir="return">
1685 <desc>New appliance.</desc>
1686 </param>
1687 </method>
1688
1689 <method name="createHardDisk">
1690 <desc>
1691 Creates a new base medium object that will use the given storage
1692 format and location for medium data.
1693
1694 Note that the actual storage unit is not created by this method. In
1695 order to do it, and before you are able to attach the created medium
1696 to virtual machines, you must call one of the following methods to
1697 allocate a format-specific storage unit at the specified location:
1698 <ul>
1699 <li><link to="IMedium::createBaseStorage"/></li>
1700 <li><link to="IMedium::createDiffStorage"/></li>
1701 </ul>
1702
1703 Some medium attributes, such as <link to="IMedium::id"/>, may
1704 remain uninitialized until the medium storage unit is successfully
1705 created by one of the above methods.
1706
1707 After the storage unit is successfully created, it will be
1708 accessible through the <link to="#findMedium"/> method and can
1709 be found in the <link to="#hardDisks"/> array.
1710
1711 The list of all storage formats supported by this VirtualBox
1712 installation can be obtained using
1713 <link to="ISystemProperties::mediumFormats"/>. If the @a format
1714 attribute is empty or @c null then the default storage format
1715 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1716 be used for creating a storage unit of the medium.
1717
1718 Note that the format of the location string is storage format specific.
1719 See <link to="IMedium::location"/>, IMedium and
1720 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1721
1722 <result name="VBOX_E_OBJECT_NOT_FOUND">
1723 @a format identifier is invalid. See
1724 <link to="ISystemProperties::mediumFormats"/>.
1725 </result>
1726 <result name="VBOX_E_FILE_ERROR">
1727 @a location is a not valid file name (for file-based formats only).
1728 </result>
1729 </desc>
1730 <param name="format" type="wstring" dir="in">
1731 <desc>
1732 Identifier of the storage format to use for the new medium.
1733 </desc>
1734 </param>
1735 <param name="location" type="wstring" dir="in">
1736 <desc>
1737 Location of the storage unit for the new medium.
1738 </desc>
1739 </param>
1740 <param name="medium" type="IMedium" dir="return">
1741 <desc>Created medium object.</desc>
1742 </param>
1743 </method>
1744
1745 <method name="openMedium">
1746 <desc>
1747 Opens a medium from an existing storage location.
1748
1749 Once a medium has been opened, it can be passed to other VirtualBox
1750 methods, in particular to <link to="IMachine::AttachDevice" />.
1751
1752 Depending on the given device type, the file at the storage location
1753 must be in one of the media formats understood by VirtualBox:
1754
1755 <ul>
1756 <li>With a "HardDisk" device type, the file must be a hard disk image
1757 in one of the formats supported by VirtualBox (see
1758 <link to="ISystemProperties::mediumFormats" />).
1759 After this method succeeds, if the medium is a base medium, it
1760 will be added to the <link to="#hardDisks"/> array attribute. </li>
1761 <li>With a "DVD" device type, the file must be an ISO 9960 CD/DVD image.
1762 After this method succeeds, the medium will be added to the
1763 <link to="#DVDImages"/> array attribute.</li>
1764 <li>With a "Floppy" device type, the file must be an RAW floppy image.
1765 After this method succeeds, the medium will be added to the
1766 <link to="#floppyImages"/> array attribute.</li>
1767 </ul>
1768
1769 After having been opened, the medium can be found by the <link to="#findMedium"/>
1770 method and can be attached to virtual machines. See <link to="IMedium" /> for more details.
1771
1772 The UUID of the newly opened medium will either be retrieved from the
1773 storage location, if the format supports it (e.g. for hard disk images),
1774 or a new UUID will be randomly generated (e.g. for ISO and RAW files).
1775 If for some reason you need to change the medium's UUID, use
1776 <link to="IMedium::setIDs" />.
1777
1778 If a differencing hard disk medium is to be opened by this method, the
1779 operation will succeed only if its parent medium and all ancestors,
1780 if any, are already known to this VirtualBox installation (for example,
1781 were opened by this method before).
1782
1783 This method attempts to guess the storage format of the specified medium
1784 by reading medium data at the specified location.
1785
1786 If @a accessMode is ReadWrite (which it should be for hard disks and floppies),
1787 the image is opened for read/write access and must have according permissions,
1788 as VirtualBox may actually write status information into the disk's metadata
1789 sections.
1790
1791 Note that write access is required for all typical hard disk usage in VirtualBox,
1792 since VirtualBox may need to write metadata such as a UUID into the image.
1793 The only exception is opening a source image temporarily for copying and
1794 cloning (see <link to="IMedium::cloneTo" /> when the image will be closed
1795 again soon.
1796
1797 The format of the location string is storage format specific. See
1798 <link to="IMedium::location"/>, IMedium and
1799 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1800
1801 Prior to VirtualBox 3.3, opening a medium added it to a global media
1802 registry in the VirtualBox.xml file, which was shared between
1803 all machines and made transporting machines and their media from one
1804 host to another difficult.
1805
1806 Starting with VirtualBox 3.3, media are only added to a registry when
1807 they are attached to a machine. Machines created with VirtualBox 3.3
1808 or later can have their own media registry. As a result, a medium attached
1809 to such a machine will be remembered in that machine's XML settings file.
1810 Media attached to older machines will continue to be added to the global
1811 registry.
1812
1813 <result name="VBOX_E_FILE_ERROR">
1814 Invalid medium storage file location or could not find the medium
1815 at the specified location.
1816 </result>
1817 <result name="VBOX_E_IPRT_ERROR">
1818 Could not get medium storage format.
1819 </result>
1820 <result name="E_INVALIDARG">
1821 Invalid medium storage format.
1822 </result>
1823 <result name="VBOX_E_INVALID_OBJECT_STATE">
1824 Medium has already been added to a media registry.
1825 </result>
1826 </desc>
1827 <param name="location" type="wstring" dir="in">
1828 <desc>
1829 Location of the storage unit that contains medium data in one of
1830 the supported storage formats.
1831 </desc>
1832 </param>
1833 <param name="deviceType" type="DeviceType" dir="in">
1834 <desc>
1835 Must be one of "HardDisk", "DVD" or "Floppy".
1836 </desc>
1837 </param>
1838 <param name="accessMode" type="AccessMode" dir="in">
1839 <desc>Whether to open the image in read/write or read-only mode. For
1840 a "DVD" device type, this is ignored and read-only mode is always assumed.</desc>
1841 </param>
1842 <param name="medium" type="IMedium" dir="return">
1843 <desc>Opened medium object.</desc>
1844 </param>
1845 </method>
1846
1847 <method name="findMedium">
1848 <desc>
1849 Returns a medium of the given type that uses the given location or
1850 UUID to store medium data.
1851
1852 The given medium must be known to this VirtualBox installation, i.e.
1853 it must be previously created by <link to="#createHardDisk"/> or opened
1854 by <link to="#openMedium"/>.
1855
1856 The search is done by comparing the value of the @a location argument to
1857 the <link to="IMedium::location"/> and <link to="IMedium::id" />
1858 attributes of each known medium.
1859
1860 For locations represented by file names in the host's file system, the
1861 requested location can be a path relative to the
1862 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1863 only a file name without any path is given, the
1864 <link to="ISystemProperties::defaultHardDiskFolder"> default medium
1865 folder</link> will be prepended to the file name before searching. Note
1866 that on case sensitive file systems, a case sensitive comparison is
1867 performed, otherwise the case of symbols in the file path is ignored.
1868
1869 <result name="VBOX_E_OBJECT_NOT_FOUND">
1870 No medium object matching @a location found.
1871 </result>
1872 </desc>
1873 <param name="location" type="wstring" dir="in">
1874 <desc>What to search for. This can either be the UUID or the location string of an open medium.</desc>
1875 </param>
1876 <param name="type" type="DeviceType" dir="in">
1877 <desc>Device type (must be HardDisk, DVD or Floppy)</desc>
1878 </param>
1879 <param name="medium" type="IMedium" dir="return">
1880 <desc>Medium object, if found.</desc>
1881 </param>
1882 </method>
1883
1884 <method name="getGuestOSType">
1885 <desc>
1886 Returns an object describing the specified guest OS type.
1887
1888 The requested guest OS type is specified using a string which is a
1889 mnemonic identifier of the guest operating system, such as
1890 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
1891 particular virtual machine can be read or set using the
1892 <link to="IMachine::OSTypeId"/> attribute.
1893
1894 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
1895 available guest OS type objects. Each object has an
1896 <link to="IGuestOSType::id"/> attribute which contains an identifier of
1897 the guest OS this object describes.
1898
1899 <result name="E_INVALIDARG">
1900 @a id is not a valid Guest OS type.
1901 </result>
1902
1903 </desc>
1904 <param name="id" type="uuid" mod="string" dir="in">
1905 <desc>Guest OS type ID string.</desc>
1906 </param>
1907 <param name="type" type="IGuestOSType" dir="return">
1908 <desc>Guest OS type object.</desc>
1909 </param>
1910 </method>
1911
1912 <method name="createSharedFolder">
1913 <desc>
1914 Creates a new global shared folder by associating the given logical
1915 name with the given host path, adds it to the collection of shared
1916 folders and starts sharing it. Refer to the description of
1917 <link to="ISharedFolder"/> to read more about logical names.
1918 <note>
1919 In the current implementation, this operation is not
1920 implemented.
1921 </note>
1922 </desc>
1923 <param name="name" type="wstring" dir="in">
1924 <desc>Unique logical name of the shared folder.</desc>
1925 </param>
1926 <param name="hostPath" type="wstring" dir="in">
1927 <desc>Full path to the shared folder in the host file system.</desc>
1928 </param>
1929 <param name="writable" type="boolean" dir="in">
1930 <desc>Whether the share is writable or readonly</desc>
1931 </param>
1932 <param name="automount" type="boolean" dir="in">
1933 <desc>Whether the share gets automatically mounted by the guest
1934 or not.</desc>
1935 </param>
1936 </method>
1937
1938 <method name="removeSharedFolder">
1939 <desc>
1940 Removes the global shared folder with the given name previously
1941 created by <link to="#createSharedFolder"/> from the collection of
1942 shared folders and stops sharing it.
1943 <note>
1944 In the current implementation, this operation is not
1945 implemented.
1946 </note>
1947 </desc>
1948 <param name="name" type="wstring" dir="in">
1949 <desc>Logical name of the shared folder to remove.</desc>
1950 </param>
1951 </method>
1952
1953 <method name="getExtraDataKeys">
1954 <desc>
1955 Returns an array representing the global extra data keys which currently
1956 have values defined.
1957 </desc>
1958 <param name="value" type="wstring" dir="return" safearray="yes">
1959 <desc>Array of extra data keys.</desc>
1960 </param>
1961 </method>
1962
1963 <method name="getExtraData">
1964 <desc>
1965 Returns associated global extra data.
1966
1967 If the requested data @a key does not exist, this function will
1968 succeed and return an empty string in the @a value argument.
1969
1970 <result name="VBOX_E_FILE_ERROR">
1971 Settings file not accessible.
1972 </result>
1973 <result name="VBOX_E_XML_ERROR">
1974 Could not parse the settings file.
1975 </result>
1976
1977 </desc>
1978 <param name="key" type="wstring" dir="in">
1979 <desc>Name of the data key to get.</desc>
1980 </param>
1981 <param name="value" type="wstring" dir="return">
1982 <desc>Value of the requested data key.</desc>
1983 </param>
1984 </method>
1985
1986 <method name="setExtraData">
1987 <desc>
1988 Sets associated global extra data.
1989
1990 If you pass @c null or empty string as a key @a value, the given @a key
1991 will be deleted.
1992
1993 <note>
1994 Before performing the actual data change, this method will ask all
1995 registered event listener using the
1996 <link to="IExtraDataCanChangeEvent"/>
1997 notification for a permission. If one of the listeners refuses the
1998 new value, the change will not be performed.
1999 </note>
2000 <note>
2001 On success, the
2002 <link to="IExtraDataChangedEvent"/> notification
2003 is called to inform all registered listeners about a successful data
2004 change.
2005 </note>
2006
2007 <result name="VBOX_E_FILE_ERROR">
2008 Settings file not accessible.
2009 </result>
2010 <result name="VBOX_E_XML_ERROR">
2011 Could not parse the settings file.
2012 </result>
2013 <result name="E_ACCESSDENIED">
2014 Modification request refused.
2015 </result>
2016
2017 </desc>
2018 <param name="key" type="wstring" dir="in">
2019 <desc>Name of the data key to set.</desc>
2020 </param>
2021 <param name="value" type="wstring" dir="in">
2022 <desc>Value to assign to the key.</desc>
2023 </param>
2024 </method>
2025
2026 <method name="waitForPropertyChange">
2027 <desc>
2028 Blocks the caller until any of the properties represented by the
2029 @a what argument changes the value or until the given timeout interval
2030 expires.
2031
2032 The @a what argument is a comma separated list of property masks that
2033 describe properties the caller is interested in. The property mask is
2034 a string in the following format:
2035
2036 <pre>
2037 [[group.]subgroup.]name
2038 </pre>
2039
2040 where @c name is the property name and @c group, @c subgroup are zero
2041 or more property group specifiers. Each element (group or name) in
2042 the property mask may be either a Latin string or an asterisk symbol
2043 (@c "*") which is used to match any string for the given element. A
2044 property mask that doesn't contain asterisk symbols represents a
2045 single fully qualified property name.
2046
2047 Groups in the fully qualified property name go from more generic (the
2048 left-most part) to more specific (the right-most part). The first
2049 element is usually a name of the object the property belongs to. The
2050 second element may be either a property name, or a child object name,
2051 or an index if the preceding element names an object which is one of
2052 many objects of the same type. This way, property names form a
2053 hierarchy of properties. Here are some examples of property names:
2054
2055 <table>
2056 <tr>
2057 <td><tt>VirtualBox.version</tt></td>
2058 <td><link to="IVirtualBox::version"/> property</td>
2059 </tr>
2060 <tr>
2061 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2062 <td><link to="IMachine::name"/> property of the machine with the
2063 given UUID</td>
2064 </tr>
2065 </table>
2066
2067 Most property names directly correspond to the properties of objects
2068 (components) provided by the VirtualBox library and may be used to
2069 track changes to these properties. However, there may be
2070 pseudo-property names that don't correspond to any existing object's
2071 property directly, as well as there may be object properties that
2072 don't have a corresponding property name that is understood by this
2073 method, and therefore changes to such properties cannot be
2074 tracked. See individual object's property descriptions to get a
2075 fully qualified property name that can be used with this method (if
2076 any).
2077
2078 There is a special property mask @c "*" (i.e. a string consisting of a
2079 single asterisk symbol) that can be used to match all properties.
2080 Below are more examples of property masks:
2081
2082 <table>
2083 <tr>
2084 <td><tt>VirtualBox.*</tt></td>
2085 <td>Track all properties of the VirtualBox object</td>
2086 </tr>
2087 <tr>
2088 <td><tt>Machine.*.name</tt></td>
2089 <td>Track changes to the <link to="IMachine::name"/> property of
2090 all registered virtual machines</td>
2091 </tr>
2092 </table>
2093
2094 <note>
2095 This function is not implemented in the current version of the
2096 product.
2097 </note>
2098 </desc>
2099 <param name="what" type="wstring" dir="in">
2100 <desc>Comma separated list of property masks.</desc>
2101 </param>
2102 <param name="timeout" type="unsigned long" dir="in">
2103 <desc>
2104 Wait timeout in milliseconds.
2105 Specify -1 for an indefinite wait.
2106 </desc>
2107 </param>
2108 <param name="changed" type="wstring" dir="out">
2109 <desc>
2110 Comma separated list of properties that have been changed and caused
2111 this method to return to the caller.
2112 </desc>
2113 </param>
2114 <param name="values" type="wstring" dir="out">
2115 <desc>Reserved, not currently used.</desc>
2116 </param>
2117 </method>
2118
2119 <!--method name="createDHCPServerForInterface">
2120 <desc>
2121 Creates a dhcp server settings to be used for the given interface
2122 <result name="E_INVALIDARG">
2123 Host network interface @a name already exists.
2124 </result>
2125 </desc>
2126 <param name="interface" type="IHostNetworkInterface" dir="in">
2127 <desc>Network Interface</desc>
2128 </param>
2129 <param name="server" type="IDHCPServer" dir="out">
2130 <desc>Dhcp server settings</desc>
2131 </param>
2132 </method-->
2133
2134 <method name="createDHCPServer">
2135 <desc>
2136 Creates a dhcp server settings to be used for the given internal network name
2137 <result name="E_INVALIDARG">
2138 Host network interface @a name already exists.
2139 </result>
2140 </desc>
2141 <param name="name" type="wstring" dir="in">
2142 <desc>server name</desc>
2143 </param>
2144 <param name="server" type="IDHCPServer" dir="return">
2145 <desc>Dhcp server settings</desc>
2146 </param>
2147 </method>
2148
2149 <method name="findDHCPServerByNetworkName">
2150 <desc>
2151 Searches a dhcp server settings to be used for the given internal network name
2152 <result name="E_INVALIDARG">
2153 Host network interface @a name already exists.
2154 </result>
2155
2156 </desc>
2157 <param name="name" type="wstring" dir="in">
2158 <desc>server name</desc>
2159 </param>
2160 <param name="server" type="IDHCPServer" dir="return">
2161 <desc>Dhcp server settings</desc>
2162 </param>
2163 </method>
2164
2165 <!--method name="findDHCPServerForInterface">
2166 <desc>
2167 Searches a dhcp server settings to be used for the given interface
2168 <result name="E_INVALIDARG">
2169 Host network interface @a name already exists.
2170 </result>
2171 </desc>
2172 <param name="interface" type="IHostNetworkInterface" dir="in">
2173 <desc>Network Interface</desc>
2174 </param>
2175 <param name="server" type="IDHCPServer" dir="out">
2176 <desc>Dhcp server settings</desc>
2177 </param>
2178 </method-->
2179
2180 <method name="removeDHCPServer">
2181 <desc>
2182 Removes the dhcp server settings
2183 <result name="E_INVALIDARG">
2184 Host network interface @a name already exists.
2185 </result>
2186 </desc>
2187 <param name="server" type="IDHCPServer" dir="in">
2188 <desc>Dhcp server settings to be removed</desc>
2189 </param>
2190 </method>
2191
2192
2193 <method name="checkFirmwarePresent">
2194 <desc>
2195 Check if this VirtualBox installation has a firmware
2196 of the given type available, either system-wide or per-user.
2197 Optionally, this may return a hint where this firmware can be
2198 downloaded from.
2199 </desc>
2200 <param name="firmwareType" type="FirmwareType" dir="in">
2201 <desc>
2202 Type of firmware to check.
2203 </desc>
2204 </param>
2205 <param name="version" type="wstring" dir="in">
2206 <desc>Expected version number, usually empty string (presently ignored).</desc>
2207 </param>
2208
2209 <param name="url" type="wstring" dir="out">
2210 <desc>
2211 Suggested URL to download this firmware from.
2212 </desc>
2213 </param>
2214
2215 <param name="file" type="wstring" dir="out">
2216 <desc>
2217 Filename of firmware, only valid if result == TRUE.
2218 </desc>
2219 </param>
2220
2221 <param name="result" type="boolean" dir="return">
2222 <desc>If firmware of this type and version is available.</desc>
2223 </param>
2224 </method>
2225
2226 </interface>
2227
2228 <!--
2229 // IVFSExplorer
2230 /////////////////////////////////////////////////////////////////////////
2231 -->
2232
2233 <enum
2234 name="VFSType"
2235 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
2236 >
2237 <desc>
2238 Virtual file systems supported by VFSExplorer.
2239 </desc>
2240
2241 <const name="File" value="1" />
2242 <const name="Cloud" value="2" />
2243 <const name="S3" value="3" />
2244 <const name="WebDav" value="4" />
2245 </enum>
2246
2247 <enum
2248 name="VFSFileType"
2249 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
2250 >
2251 <desc>
2252 File types known by VFSExplorer.
2253 </desc>
2254
2255 <const name="Unknown" value="1" />
2256 <const name="Fifo" value="2" />
2257 <const name="DevChar" value="3" />
2258 <const name="Directory" value="4" />
2259 <const name="DevBlock" value="5" />
2260 <const name="File" value="6" />
2261 <const name="SymLink" value="7" />
2262 <const name="Socket" value="8" />
2263 <const name="WhiteOut" value="9" />
2264 </enum>
2265
2266 <interface
2267 name="IVFSExplorer" extends="$unknown"
2268 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
2269 wsmap="managed"
2270 >
2271 <desc>
2272 The VFSExplorer interface unifies access to different file system
2273 types. This includes local file systems as well remote file systems like
2274 S3. For a list of supported types see <link to="VFSType" />.
2275 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
2276 </desc>
2277
2278 <attribute name="path" type="wstring" readonly="yes">
2279 <desc>Returns the current path in the virtual file system.</desc>
2280 </attribute>
2281
2282 <attribute name="type" type="VFSType" readonly="yes">
2283 <desc>Returns the file system type which is currently in use.</desc>
2284 </attribute>
2285
2286 <method name="update">
2287 <desc>Updates the internal list of files/directories from the
2288 current directory level. Use <link to="#entryList" /> to get the full list
2289 after a call to this method.</desc>
2290
2291 <param name="aProgress" type="IProgress" dir="return">
2292 <desc>Progress object to track the operation completion.</desc>
2293 </param>
2294 </method>
2295
2296 <method name="cd">
2297 <desc>Change the current directory level.</desc>
2298
2299 <param name="aDir" type="wstring" dir="in">
2300 <desc>The name of the directory to go in.</desc>
2301 </param>
2302
2303 <param name="aProgress" type="IProgress" dir="return">
2304 <desc>Progress object to track the operation completion.</desc>
2305 </param>
2306 </method>
2307
2308 <method name="cdUp">
2309 <desc>Go one directory upwards from the current directory level.</desc>
2310
2311 <param name="aProgress" type="IProgress" dir="return">
2312 <desc>Progress object to track the operation completion.</desc>
2313 </param>
2314 </method>
2315
2316 <method name="entryList">
2317 <desc>Returns a list of files/directories after a call to <link
2318 to="#update" />. The user is responsible for keeping this internal
2319 list up do date.</desc>
2320
2321 <param name="aNames" type="wstring" safearray="yes" dir="out">
2322 <desc>The list of names for the entries.</desc>
2323 </param>
2324
2325 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
2326 <desc>The list of types for the entries.</desc>
2327 </param>
2328 </method>
2329
2330 <method name="exists">
2331 <desc>Checks if the given file list exists in the current directory
2332 level.</desc>
2333
2334 <param name="aNames" type="wstring" safearray="yes" dir="in">
2335 <desc>The names to check.</desc>
2336 </param>
2337
2338 <param name="aExists" type="wstring" safearray="yes" dir="return">
2339 <desc>The names which exist.</desc>
2340 </param>
2341 </method>
2342
2343 <method name="remove">
2344 <desc>Deletes the given files in the current directory level.</desc>
2345
2346 <param name="aNames" type="wstring" safearray="yes" dir="in">
2347 <desc>The names to remove.</desc>
2348 </param>
2349
2350 <param name="aProgress" type="IProgress" dir="return">
2351 <desc>Progress object to track the operation completion.</desc>
2352 </param>
2353 </method>
2354
2355 </interface>
2356
2357 <!--
2358 // IAppliance
2359 /////////////////////////////////////////////////////////////////////////
2360 -->
2361
2362 <interface
2363 name="IAppliance" extends="$unknown"
2364 uuid="fb61a4fc-57e7-48d6-859b-71f37d484cf2"
2365 wsmap="managed"
2366 >
2367 <desc>
2368 Represents a platform-independent appliance in OVF format. An instance of this is returned
2369 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
2370 virtual machines within an appliance with VirtualBox.
2371
2372 The OVF standard suggests two different physical file formats:
2373
2374 <ol>
2375 <li>If the appliance is distributed as a set of files, there must be at least one XML descriptor
2376 file that conforms to the OVF standard and carries an <tt>.ovf</tt> file extension. If
2377 this descriptor file references other files such as disk images, as OVF appliances typically
2378 do, those additional files must be in the same directory as the descriptor file.</li>
2379
2380 <li>If the appliance is distributed as a single file, it must be in TAR format and have the
2381 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
2382 files and optionally other files.
2383
2384 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
2385 be added with a later version.</li>
2386 </ol>
2387
2388 <b>Importing</b> an OVF appliance into VirtualBox as instances of
2389 <link to="IMachine" /> involves the following sequence of API calls:
2390
2391 <ol>
2392 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
2393 </li>
2394
2395 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
2396 would like to import. So long as this file is syntactically valid, this will succeed
2397 and fill the appliance object with the parsed data from the OVF file.
2398 </li>
2399
2400 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
2401 contents of the IAppliance attributes accordingly. These can be inspected by a
2402 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
2403 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
2404 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
2405 systems (machines) in the OVF, which in turn describe the virtual hardware prescribed
2406 by the OVF (network and hardware adapters, virtual disk images, memory size and so on).
2407 The GUI can then give the user the option to confirm and/or change these suggestions.
2408 </li>
2409
2410 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
2411 virtual system (machine) to override the suggestions made by the interpret() routine.
2412 </li>
2413
2414 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
2415 VirtualBox as instances of <link to="IMachine" /> that match the information in the
2416 virtual system descriptions. After this call suceeded, the UUIDs of the machines created
2417 can be found in the <link to="#machines" /> array attribute.
2418 </li>
2419 </ol>
2420
2421 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
2422
2423 <ol>
2424 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
2425 an empty IAppliance object.
2426 </li>
2427
2428 <li>For each machine you would like to export, call <link to="IMachine::export" />
2429 with the IAppliance object you just created. Each such call creates one instance of
2430 <link to="IVirtualSystemDescription" /> inside the appliance.
2431 </li>
2432
2433 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
2434 virtual system (machine) to override the suggestions made by the export() routine.
2435 </li>
2436
2437 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
2438 file written.</li>
2439 </ol>
2440
2441 </desc>
2442
2443 <attribute name="path" type="wstring" readonly="yes">
2444 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
2445 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
2446 <link to="#write" /> (for export).
2447 This attribute is empty until one of these methods has been called.
2448 </desc>
2449 </attribute>
2450
2451 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
2452 <desc>
2453 Array of virtual disk definitions. One such description exists for each
2454 disk definition in the OVF; each string array item represents one such piece of
2455 disk information, with the information fields separated by tab (\t) characters.
2456
2457 The caller should be prepared for additional fields being appended to
2458 this string in future versions of VirtualBox and therefore check for
2459 the number of tabs in the strings returned.
2460
2461 In the current version, the following eight fields are returned per string
2462 in the array:
2463
2464 <ol>
2465 <li>Disk ID (unique string identifier given to disk)</li>
2466
2467 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
2468
2469 <li>Populated size (optional unsigned integer indicating the current size of the
2470 disk; can be approximate; -1 if unspecified)</li>
2471
2472 <li>Format (string identifying the disk format, typically
2473 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
2474
2475 <li>Reference (where to find the disk image, typically a file name; if empty,
2476 then the disk should be created on import)</li>
2477
2478 <li>Image size (optional unsigned integer indicating the size of the image,
2479 which need not necessarily be the same as the values specified above, since
2480 the image may be compressed or sparse; -1 if not specified)</li>
2481
2482 <li>Chunk size (optional unsigned integer if the image is split into chunks;
2483 presently unsupported and always -1)</li>
2484
2485 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
2486 </ol>
2487 </desc>
2488 </attribute>
2489
2490 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
2491 <desc> Array of virtual system descriptions. One such description is created
2492 for each virtual system (machine) found in the OVF.
2493 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
2494 (for export) has been called.
2495 </desc>
2496 </attribute>
2497
2498 <attribute name="machines" type="wstring" readonly="yes" safearray="yes">
2499 <desc>
2500 Contains the UUIDs of the machines created from the information in this appliances. This is only
2501 relevant for the import case, and will only contain data after a call to <link to="#importMachines" />
2502 succeeded.
2503 </desc>
2504 </attribute>
2505
2506 <method name="read">
2507 <desc>
2508 Reads an OVF file into the appliance object.
2509
2510 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
2511 mere fact that this method returns successfully does not mean that VirtualBox supports all
2512 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
2513 </desc>
2514 <param name="file" type="wstring" dir="in">
2515 <desc>
2516 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
2517 on whether the appliance is distributed as a set of files or as a single file, respectively).
2518 </desc>
2519 </param>
2520 <param name="aProgress" type="IProgress" dir="return">
2521 <desc>Progress object to track the operation completion.</desc>
2522 </param>
2523 </method>
2524
2525 <method name="interpret">
2526 <desc>
2527 Interprets the OVF data that was read when the appliance was constructed. After
2528 calling this method, one can inspect the
2529 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
2530 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
2531 the appliance.
2532
2533 Calling this method is the second step of importing an appliance into VirtualBox;
2534 see <link to="IAppliance" /> for an overview.
2535
2536 After calling this method, one should call <link to="#getWarnings" /> to find out
2537 if problems were encountered during the processing which might later lead to
2538 errors.
2539 </desc>
2540 </method>
2541
2542 <method name="importMachines">
2543 <desc>
2544 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
2545 and other interfaces that match the information contained in the appliance as
2546 closely as possible, as represented by the import instructions in the
2547 <link to="#virtualSystemDescriptions" /> array.
2548
2549 Calling this method is the final step of importing an appliance into VirtualBox;
2550 see <link to="IAppliance" /> for an overview.
2551
2552 Since importing the appliance will most probably involve copying and converting
2553 disk images, which can take a long time, this method operates asynchronously and
2554 returns an IProgress object to allow the caller to monitor the progress.
2555
2556 After the import succeeded, the UUIDs of the IMachine instances created can be
2557 retrieved from the <link to="#machines" /> array attribute.
2558 </desc>
2559
2560 <param name="aProgress" type="IProgress" dir="return">
2561 <desc>Progress object to track the operation completion.</desc>
2562 </param>
2563 </method>
2564
2565 <method name="createVFSExplorer">
2566 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
2567
2568 <param name="aUri" type="wstring" dir="in">
2569 <desc>The URI describing the file system to use.</desc>
2570 </param>
2571
2572 <param name="aExplorer" type="IVFSExplorer" dir="return">
2573 <desc></desc>
2574 </param>
2575 </method>
2576
2577 <method name="write">
2578 <desc>
2579 Writes the contents of the appliance exports into a new OVF file.
2580
2581 Calling this method is the final step of exporting an appliance from VirtualBox;
2582 see <link to="IAppliance" /> for an overview.
2583
2584 Since exporting the appliance will most probably involve copying and converting
2585 disk images, which can take a long time, this method operates asynchronously and
2586 returns an IProgress object to allow the caller to monitor the progress.
2587 </desc>
2588 <param name="format" type="wstring" dir="in">
2589 <desc>
2590 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
2591 future versions of VirtualBox may support additional formats.
2592 </desc>
2593 </param>
2594 <param name="path" type="wstring" dir="in">
2595 <desc>
2596 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
2597 on whether the appliance is distributed as a set of files or as a single file, respectively).
2598 </desc>
2599 </param>
2600 <param name="aProgress" type="IProgress" dir="return">
2601 <desc>Progress object to track the operation completion.</desc>
2602 </param>
2603 </method>
2604
2605 <method name="getWarnings">
2606 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
2607
2608 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
2609 <desc></desc>
2610 </param>
2611 </method>
2612
2613 </interface>
2614
2615 <enum
2616 name="VirtualSystemDescriptionType"
2617 uuid="c0f8f135-3a1d-417d-afa6-b38b95a91f90"
2618 >
2619 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
2620 a configuration value.</desc>
2621
2622 <const name="Ignore" value="1" />
2623 <const name="OS" value="2" />
2624 <const name="Name" value="3" />
2625 <const name="Product" value="4" />
2626 <const name="Vendor" value="5" />
2627 <const name="Version" value="6" />
2628 <const name="ProductUrl" value="7" />
2629 <const name="VendorUrl" value="8" />
2630 <const name="Description" value="9" />
2631 <const name="License" value="10" />
2632 <const name="Miscellaneous" value="11" />
2633 <const name="CPU" value="12" />
2634 <const name="Memory" value="13" />
2635 <const name="HardDiskControllerIDE" value="14" />
2636 <const name="HardDiskControllerSATA" value="15" />
2637 <const name="HardDiskControllerSCSI" value="16" />
2638 <const name="HardDiskControllerSAS" value="17" />
2639 <const name="HardDiskImage" value="18" />
2640 <const name="Floppy" value="19" />
2641 <const name="CDROM" value="20" />
2642 <const name="NetworkAdapter" value="21" />
2643 <const name="USBController" value="22" />
2644 <const name="SoundCard" value="23" />
2645
2646 </enum>
2647
2648 <enum
2649 name="VirtualSystemDescriptionValueType"
2650 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
2651 >
2652 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
2653 type to fetch.</desc>
2654
2655 <const name="Reference" value="1" />
2656 <const name="Original" value="2" />
2657 <const name="Auto" value="3" />
2658 <const name="ExtraConfig" value="4" />
2659
2660 </enum>
2661
2662 <interface
2663 name="IVirtualSystemDescription" extends="$unknown"
2664 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
2665 wsmap="managed"
2666 >
2667
2668 <desc>Represents one virtual system (machine) in an appliance. This interface is used in
2669 the <link to="IAppliance::virtualSystemDescriptions" /> array. After
2670 <link to="IAppliance::interpret" /> has been called, that array contains information
2671 about how the virtual systems described in the OVF should best be imported into
2672 VirtualBox virtual machines. See <link to="IAppliance" /> for the steps required to
2673 import an OVF into VirtualBox.
2674 </desc>
2675
2676 <attribute name="count" type="unsigned long" readonly="yes">
2677 <desc>Return the number of virtual system description entries.</desc>
2678 </attribute>
2679
2680 <method name="getDescription">
2681 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
2682 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
2683
2684 The list below identifies the value sets that are possible depending on the
2685 <link to="VirtualSystemDescriptionType" /> enum value in the array item in @a aTypes[]. In each case,
2686 the array item with the same index in @a aOvfValues[] will contain the original value as contained
2687 in the OVF file (just for informational purposes), and the corresponding item in @a aVBoxValues[]
2688 will contain a suggested value to be used for VirtualBox. Depending on the description type,
2689 the @a aExtraConfigValues[] array item may also be used.
2690
2691 <ul>
2692 <li>
2693 "OS": the guest operating system type. There must be exactly one such array item on import. The
2694 corresponding item in @a aVBoxValues[] contains the suggested guest operating system for VirtualBox.
2695 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
2696 item in @a aOvfValues[] will contain a numerical value that described the operating system in the OVF.
2697 </li>
2698 <li>
2699 "Name": the name to give to the new virtual machine. There can be at most one such array item;
2700 if none is present on import, then an automatic name will be created from the operating system
2701 type. The correponding item im @a aOvfValues[] will contain the suggested virtual machine name
2702 from the OVF file, and @a aVBoxValues[] will contain a suggestion for a unique VirtualBox
2703 <link to="IMachine" /> name that does not exist yet.
2704 </li>
2705 <li>
2706 "Description": an arbitrary description.
2707 </li>
2708 <li>
2709 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
2710 code to display such a license for agreement; the Main API does not enforce any such policy.
2711 </li>
2712 <li>
2713 Miscellaneous: reserved for future use.
2714 </li>
2715 <li>
2716 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
2717 </li>
2718 <li>
2719 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
2720 is present on import, then VirtualBox will set a meaningful default based on the operating system
2721 type.
2722 </li>
2723 <li>
2724 "HardDiskControllerIDE": an IDE hard disk controller. There can be at most two such items.
2725 An optional value in @a aOvfValues[] and @a aVBoxValues[] can be "PIIX3" or "PIIX4" to specify
2726 the type of IDE controller; this corresponds to the ResourceSubType element which VirtualBox
2727 writes into the OVF.
2728 The matching item in the @a aRefs[] array will contain an integer that items of the "Harddisk"
2729 type can use to specify which hard disk controller a virtual disk should be connected to.
2730 Note that in OVF, an IDE controller has two channels, corresponding to "master" and "slave"
2731 in traditional terminology, whereas the IDE storage controller that VirtualBox supports in
2732 its virtual machines supports four channels (primary master, primary slave, secondary master,
2733 secondary slave) and thus maps to two IDE controllers in the OVF sense.
2734 </li>
2735 <li>
2736 "HardDiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
2737 has no value in @a aOvfValues[] or @a aVBoxValues[].
2738 The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
2739 </li>
2740 <li>
2741 "HardDiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
2742 The items in @a aOvfValues[] and @a aVBoxValues[] will either be "LsiLogic", "BusLogic" or
2743 "LsiLogicSas". (Note that in OVF, the LsiLogicSas controller is treated as a SCSI controller
2744 whereas VirtualBox considers it a class of storage controllers of its own; see
2745 <link to="StorageControllerType" />).
2746 The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
2747 </li>
2748 <li>
2749 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
2750 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
2751
2752 The array item in @a aOvfValues[] will contain the file specification from the OVF file (without
2753 a path since the image file should be in the same location as the OVF file itself), whereas the
2754 item in @a aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
2755 hard disk image. This means that on import the image will be copied and converted from the
2756 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
2757
2758 The matching item in the @a aExtraConfigValues[] array must contain a string of the following
2759 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
2760 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
2761 the image to. That number must be the index of an array item with one of the hard disk controller
2762 types (HardDiskControllerSCSI, HardDiskControllerSATA, HardDiskControllerIDE).
2763 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
2764 this can be 0 or 1 for master or slave, respectively. For compatibility with VirtualBox versions
2765 before 3.2, the values 2 and 3 (for secondary master and secondary slave) are also supported, but
2766 no longer exported. For SATA and SCSI controllers, the channel can range from 0-29.
2767 </li>
2768 <li>
2769 "CDROM": a virtual CD-ROM drive. The matching item in @a aExtraConfigValue[] contains the same
2770 attachment information as with "HardDiskImage" items.
2771 </li>
2772 <li>
2773 "CDROM": a virtual floppy drive. The matching item in @a aExtraConfigValue[] contains the same
2774 attachment information as with "HardDiskImage" items.
2775 </li>
2776 <li>
2777 "NetworkAdapter": a network adapter. The array item in @a aVBoxValues[] will specify the hardware
2778 for the network adapter, whereas the array item in @a aExtraConfigValues[] will have a string
2779 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
2780 </li>
2781 <li>
2782 "USBController": a USB controller. There can be at most one such item. If and only if such an
2783 item ispresent, USB support will be enabled for the new virtual machine.
2784 </li>
2785 <li>
2786 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
2787 present, sound support will be enabled for the new virtual machine. Note that the virtual
2788 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
2789 may be different from the virtual soundcard expected by the appliance.
2790 </li>
2791 </ul>
2792
2793 </desc>
2794
2795 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
2796 <desc></desc>
2797 </param>
2798
2799 <param name="aRefs" type="wstring" dir="out" safearray="yes">
2800 <desc></desc>
2801 </param>
2802
2803 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
2804 <desc></desc>
2805 </param>
2806
2807 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
2808 <desc></desc>
2809 </param>
2810
2811 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
2812 <desc></desc>
2813 </param>
2814
2815 </method>
2816
2817 <method name="getDescriptionByType">
2818 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
2819 should be returned.</desc>
2820
2821 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2822 <desc></desc>
2823 </param>
2824
2825 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
2826 <desc></desc>
2827 </param>
2828
2829 <param name="aRefs" type="wstring" dir="out" safearray="yes">
2830 <desc></desc>
2831 </param>
2832
2833 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
2834 <desc></desc>
2835 </param>
2836
2837 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
2838 <desc></desc>
2839 </param>
2840
2841 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
2842 <desc></desc>
2843 </param>
2844
2845 </method>
2846
2847 <method name="getValuesByType">
2848 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
2849 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
2850 values.</desc>
2851
2852 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2853 <desc></desc>
2854 </param>
2855
2856 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
2857 <desc></desc>
2858 </param>
2859
2860 <param name="aValues" type="wstring" dir="return" safearray="yes">
2861 <desc></desc>
2862 </param>
2863
2864 </method>
2865
2866 <method name="setFinalValues">
2867 <desc>
2868 This method allows the appliance's user to change the configuration for the virtual
2869 system descriptions. For each array item returned from <link to="#getDescription" />,
2870 you must pass in one boolean value and one configuration value.
2871
2872 Each item in the boolean array determines whether the particular configuration item
2873 should be enabled.
2874 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
2875 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
2876 and SoundCard.
2877
2878 For the "vbox" and "extra configuration" values, if you pass in the same arrays
2879 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
2880 the configuration remains unchanged. Please see the documentation for getDescription()
2881 for valid configuration values for the individual array item types. If the
2882 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
2883 </desc>
2884
2885 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
2886 <desc></desc>
2887 </param>
2888
2889 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
2890 <desc></desc>
2891 </param>
2892
2893 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
2894 <desc></desc>
2895 </param>
2896 </method>
2897
2898 <method name="addDescription">
2899 <desc>
2900 This method adds an additional description entry to the stack of already
2901 available descriptions for this virtual system. This is handy for writing
2902 values which aren't directly supported by VirtualBox. One example would
2903 be the License type of <link to="VirtualSystemDescriptionType" />.
2904 </desc>
2905
2906 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2907 <desc></desc>
2908 </param>
2909
2910 <param name="aVBoxValue" type="wstring" dir="in">
2911 <desc></desc>
2912 </param>
2913
2914 <param name="aExtraConfigValue" type="wstring" dir="in">
2915 <desc></desc>
2916 </param>
2917 </method>
2918 </interface>
2919
2920
2921 <!--
2922 // IMachine
2923 /////////////////////////////////////////////////////////////////////////
2924 -->
2925
2926 <interface
2927 name="IInternalMachineControl" extends="$unknown"
2928 uuid="e2da8b1a-2ad1-490e-b29e-c33a144791b6"
2929 internal="yes"
2930 wsmap="suppress"
2931 >
2932 <method name="setRemoveSavedStateFile">
2933 <desc>
2934 Updates the flag whether the saved state file is removed on a
2935 machine state change from Saved to PoweredOff.
2936 </desc>
2937 <param name="aRemove" type="boolean" dir="in"/>
2938 </method>
2939
2940 <method name="updateState">
2941 <desc>
2942 Updates the VM state.
2943 <note>
2944 This operation will also update the settings file with the correct
2945 information about the saved state file and delete this file from disk
2946 when appropriate.
2947 </note>
2948 </desc>
2949 <param name="state" type="MachineState" dir="in"/>
2950 </method>
2951
2952 <method name="getIPCId">
2953 <param name="id" type="wstring" dir="return"/>
2954 </method>
2955
2956 <method name="beginPowerUp">
2957 <desc>
2958 Tells VBoxSVC that <link to="IConsole::powerUp"/> is under ways and
2959 gives it the progress object that should be part of any pending
2960 <link to="IMachine::launchVMProcess"/> operations. The progress
2961 object may be called back to reflect an early cancelation, so some care
2962 have to be taken with respect to any cancelation callbacks. The console
2963 object will call <link to="IInternalMachineControl::endPowerUp"/>
2964 to signal the completion of the progress object.
2965 </desc>
2966 <param name="aProgress" type="IProgress" dir="in" />
2967 </method>
2968
2969 <method name="endPowerUp">
2970 <desc>
2971 Tells VBoxSVC that <link to="IConsole::powerUp"/> has completed.
2972 This method may query status information from the progress object it
2973 received in <link to="IInternalMachineControl::beginPowerUp"/> and copy
2974 it over to any in-progress <link to="IMachine::launchVMProcess"/>
2975 call in order to complete that progress object.
2976 </desc>
2977 <param name="result" type="long" dir="in"/>
2978 </method>
2979
2980 <method name="runUSBDeviceFilters">
2981 <desc>
2982 Asks the server to run USB devices filters of the associated
2983 machine against the given USB device and tell if there is
2984 a match.
2985 <note>
2986 Intended to be used only for remote USB devices. Local
2987 ones don't require to call this method (this is done
2988 implicitly by the Host and USBProxyService).
2989 </note>
2990 </desc>
2991 <param name="device" type="IUSBDevice" dir="in"/>
2992 <param name="matched" type="boolean" dir="out"/>
2993 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
2994 </method>
2995
2996 <method name="captureUSBDevice">
2997 <desc>
2998 Requests a capture of the given host USB device.
2999 When the request is completed, the VM process will
3000 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3001 notification.
3002 </desc>
3003 <param name="id" type="uuid" mod="string" dir="in"/>
3004 </method>
3005
3006 <method name="detachUSBDevice">
3007 <desc>
3008 Notification that a VM is going to detach (@a done = @c false) or has
3009 already detached (@a done = @c true) the given USB device.
3010 When the @a done = @c true request is completed, the VM process will
3011 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3012 notification.
3013 <note>
3014 In the @a done = @c true case, the server must run its own filters
3015 and filters of all VMs but this one on the detached device
3016 as if it were just attached to the host computer.
3017 </note>
3018 </desc>
3019 <param name="id" type="uuid" mod="string" dir="in"/>
3020 <param name="done" type="boolean" dir="in"/>
3021 </method>
3022
3023 <method name="autoCaptureUSBDevices">
3024 <desc>
3025 Requests a capture all matching USB devices attached to the host.
3026 When the request is completed, the VM process will
3027 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3028 notification per every captured device.
3029 </desc>
3030 </method>
3031
3032 <method name="detachAllUSBDevices">
3033 <desc>
3034 Notification that a VM that is being powered down. The done
3035 parameter indicates whether which stage of the power down
3036 we're at. When @a done = @c false the VM is announcing its
3037 intentions, while when @a done = @c true the VM is reporting
3038 what it has done.
3039 <note>
3040 In the @a done = @c true case, the server must run its own filters
3041 and filters of all VMs but this one on all detach devices as
3042 if they were just attached to the host computer.
3043 </note>
3044 </desc>
3045 <param name="done" type="boolean" dir="in"/>
3046 </method>
3047
3048 <method name="onSessionEnd">
3049 <desc>
3050 Triggered by the given session object when the session is about
3051 to close normally.
3052 </desc>
3053 <param name="session" type="ISession" dir="in">
3054 <desc>Session that is being closed</desc>
3055 </param>
3056 <param name="progress" type="IProgress" dir="return">
3057 <desc>
3058 Used to wait until the corresponding machine is actually
3059 dissociated from the given session on the server.
3060 Returned only when this session is a direct one.
3061 </desc>
3062 </param>
3063 </method>
3064
3065 <method name="beginSavingState">
3066 <desc>
3067 Called by the VM process to inform the server it wants to
3068 save the current state and stop the VM execution.
3069 </desc>
3070 <param name="progress" type="IProgress" dir="in">
3071 <desc>
3072 Progress object created by the VM process to wait until
3073 the state is saved.
3074 </desc>
3075 </param>
3076 <param name="stateFilePath" type="wstring" dir="out">
3077 <desc>
3078 File path the VM process must save the execution state to.
3079 </desc>
3080 </param>
3081 </method>
3082
3083 <method name="endSavingState">
3084 <desc>
3085 Called by the VM process to inform the server that saving
3086 the state previously requested by #beginSavingState is either
3087 successfully finished or there was a failure.
3088
3089 <result name="VBOX_E_FILE_ERROR">
3090 Settings file not accessible.
3091 </result>
3092 <result name="VBOX_E_XML_ERROR">
3093 Could not parse the settings file.
3094 </result>
3095
3096 </desc>
3097
3098 <param name="success" type="boolean" dir="in">
3099 <desc>@c true to indicate success and @c false otherwise.
3100 </desc>
3101 </param>
3102 </method>
3103
3104 <method name="adoptSavedState">
3105 <desc>
3106 Gets called by IConsole::adoptSavedState.
3107 <result name="VBOX_E_FILE_ERROR">
3108 Invalid saved state file path.
3109 </result>
3110 </desc>
3111 <param name="savedStateFile" type="wstring" dir="in">
3112 <desc>Path to the saved state file to adopt.</desc>
3113 </param>
3114 </method>
3115
3116 <method name="beginTakingSnapshot">
3117 <desc>
3118 Called from the VM process to request from the server to perform the
3119 server-side actions of creating a snapshot (creating differencing images
3120 and the snapshot object).
3121
3122 <result name="VBOX_E_FILE_ERROR">
3123 Settings file not accessible.
3124 </result>
3125 <result name="VBOX_E_XML_ERROR">
3126 Could not parse the settings file.
3127 </result>
3128 </desc>
3129 <param name="initiator" type="IConsole" dir="in">
3130 <desc>The console object that initiated this call.</desc>
3131 </param>
3132 <param name="name" type="wstring" dir="in">
3133 <desc>Snapshot name.</desc>
3134 </param>
3135 <param name="description" type="wstring" dir="in">
3136 <desc>Snapshot description.</desc>
3137 </param>
3138 <param name="consoleProgress" type="IProgress" dir="in">
3139 <desc>
3140 Progress object created by the VM process tracking the
3141 snapshot's progress. This has the following sub-operations:
3142 <ul>
3143 <li>setting up (weight 1);</li>
3144 <li>one for each medium attachment that needs a differencing image (weight 1 each);</li>
3145 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3146 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3147 <li>finishing up (weight 1)</li>
3148 </ul>
3149 </desc>
3150 </param>
3151 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3152 <desc>
3153 Whether this is an online snapshot (i.e. the machine is running).
3154 </desc>
3155 </param>
3156 <param name="stateFilePath" type="wstring" dir="out">
3157 <desc>
3158 File path the VM process must save the execution state to.
3159 </desc>
3160 </param>
3161 </method>
3162
3163 <method name="endTakingSnapshot">
3164 <desc>
3165 Called by the VM process to inform the server that the snapshot
3166 previously requested by #beginTakingSnapshot is either
3167 successfully taken or there was a failure.
3168 </desc>
3169
3170 <param name="success" type="boolean" dir="in">
3171 <desc>@c true to indicate success and @c false otherwise</desc>
3172 </param>
3173 </method>
3174
3175 <method name="deleteSnapshot">
3176 <desc>
3177 Gets called by IConsole::deleteSnapshot.
3178 <result name="VBOX_E_INVALID_OBJECT_STATE">
3179 Snapshot has more than one child snapshot.
3180 </result>
3181 </desc>
3182 <param name="initiator" type="IConsole" dir="in">
3183 <desc>The console object that initiated this call.</desc>
3184 </param>
3185 <param name="id" type="uuid" mod="string" dir="in">
3186 <desc>UUID of the snapshot to delete.</desc>
3187 </param>
3188 <param name="machineState" type="MachineState" dir="out">
3189 <desc>New machine state after this operation is started.</desc>
3190 </param>
3191 <param name="progress" type="IProgress" dir="return">
3192 <desc>Progress object to track the operation completion.</desc>
3193 </param>
3194 </method>
3195
3196 <method name="finishOnlineMergeMedium">
3197 <desc>
3198 Gets called by IConsole::onlineMergeMedium.
3199 </desc>
3200 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
3201 <desc>The medium attachment which needs to be cleaned up.</desc>
3202 </param>
3203 <param name="source" type="IMedium" dir="in">
3204 <desc>Merge source medium.</desc>
3205 </param>
3206 <param name="target" type="IMedium" dir="in">
3207 <desc>Merge target medium.</desc>
3208 </param>
3209 <param name="mergeForward" type="boolean" dir="in">
3210 <desc>Merge direction.</desc>
3211 </param>
3212 <param name="parentForTarget" type="IMedium" dir="in">
3213 <desc>For forward merges: new parent for target medium.</desc>
3214 </param>
3215 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
3216 <desc>For backward merges: list of media which need their parent UUID
3217 updated.</desc>
3218 </param>
3219 </method>
3220
3221 <method name="restoreSnapshot">
3222 <desc>
3223 Gets called by IConsole::RestoreSnapshot.
3224 </desc>
3225 <param name="initiator" type="IConsole" dir="in">
3226 <desc>The console object that initiated this call.</desc>
3227 </param>
3228 <param name="snapshot" type="ISnapshot" dir="in">
3229 <desc>The snapshot to restore the VM state from.</desc>
3230 </param>
3231 <param name="machineState" type="MachineState" dir="out">
3232 <desc>New machine state after this operation is started.</desc>
3233 </param>
3234 <param name="progress" type="IProgress" dir="return">
3235 <desc>Progress object to track the operation completion.</desc>
3236 </param>
3237 </method>
3238
3239 <method name="pullGuestProperties">
3240 <desc>
3241 Get the list of the guest properties matching a set of patterns along
3242 with their values, time stamps and flags and give responsibility for
3243 managing properties to the console.
3244 </desc>
3245 <param name="name" type="wstring" dir="out" safearray="yes">
3246 <desc>
3247 The names of the properties returned.
3248 </desc>
3249 </param>
3250 <param name="value" type="wstring" dir="out" safearray="yes">
3251 <desc>
3252 The values of the properties returned. The array entries match the
3253 corresponding entries in the @a name array.
3254 </desc>
3255 </param>
3256 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3257 <desc>
3258 The time stamps of the properties returned. The array entries match
3259 the corresponding entries in the @a name array.
3260 </desc>
3261 </param>
3262 <param name="flags" type="wstring" dir="out" safearray="yes">
3263 <desc>
3264 The flags of the properties returned. The array entries match the
3265 corresponding entries in the @a name array.
3266 </desc>
3267 </param>
3268 </method>
3269
3270 <method name="pushGuestProperty">
3271 <desc>
3272 Update a single guest property in IMachine.
3273 </desc>
3274 <param name="name" type="wstring" dir="in">
3275 <desc>
3276 The name of the property to be updated.
3277 </desc>
3278 </param>
3279 <param name="value" type="wstring" dir="in">
3280 <desc>
3281 The value of the property.
3282 </desc>
3283 </param>
3284 <param name="timestamp" type="unsigned long long" dir="in">
3285 <desc>
3286 The timestamp of the property.
3287 </desc>
3288 </param>
3289 <param name="flags" type="wstring" dir="in">
3290 <desc>
3291 The flags of the property.
3292 </desc>
3293 </param>
3294 </method>
3295
3296 <method name="lockMedia">
3297 <desc>
3298 Locks all media attached to the machine for writing and parents of
3299 attached differencing media (if any) for reading. This operation is
3300 atomic so that if it fails no media is actually locked.
3301
3302 This method is intended to be called when the machine is in Starting or
3303 Restoring state. The locked media will be automatically unlocked when
3304 the machine is powered off or crashed.
3305 </desc>
3306 </method>
3307 <method name="unlockMedia">
3308 <desc>
3309 Unlocks all media previously locked using
3310 <link to="IInternalMachineControl::lockMedia"/>.
3311
3312 This method is intended to be used with teleportation so that it is
3313 possible to teleport between processes on the same machine.
3314 </desc>
3315 </method>
3316 </interface>
3317
3318 <interface
3319 name="IBIOSSettings" extends="$unknown"
3320 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3321 wsmap="managed"
3322 >
3323 <desc>
3324 The IBIOSSettings interface represents BIOS settings of the virtual
3325 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3326 </desc>
3327 <attribute name="logoFadeIn" type="boolean">
3328 <desc>Fade in flag for BIOS logo animation.</desc>
3329 </attribute>
3330
3331 <attribute name="logoFadeOut" type="boolean">
3332 <desc>Fade out flag for BIOS logo animation.</desc>
3333 </attribute>
3334
3335 <attribute name="logoDisplayTime" type="unsigned long">
3336 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3337 </attribute>
3338
3339 <attribute name="logoImagePath" type="wstring">
3340 <desc>
3341 Local file system path for external BIOS splash image. Empty string
3342 means the default image is shown on boot.
3343 </desc>
3344 </attribute>
3345
3346 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3347 <desc>Mode of the BIOS boot device menu.</desc>
3348 </attribute>
3349
3350 <attribute name="ACPIEnabled" type="boolean">
3351 <desc>ACPI support flag.</desc>
3352 </attribute>
3353
3354 <attribute name="IOAPICEnabled" type="boolean">
3355 <desc>
3356 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3357 and support IRQs above 15.
3358 </desc>
3359 </attribute>
3360
3361 <attribute name="timeOffset" type="long long">
3362 <desc>
3363 Offset in milliseconds from the host system time. This allows for
3364 guests running with a different system date/time than the host.
3365 It is equivalent to setting the system date/time in the BIOS except
3366 it is not an absolute value but a relative one. Guest Additions
3367 time synchronization honors this offset.
3368 </desc>
3369 </attribute>
3370
3371 <attribute name="PXEDebugEnabled" type="boolean">
3372 <desc>
3373 PXE debug logging flag. If set, VirtualBox will write extensive
3374 PXE trace information to the release log.
3375 </desc>
3376 </attribute>
3377
3378 </interface>
3379
3380 <enum name="CleanupMode"
3381 uuid="67897c50-7cca-47a9-83f6-ce8fd8eb5441">
3382 <desc>Cleanup mode, used with <link to="IMachine::unregister" />.
3383 </desc>
3384 <const name="UnregisterOnly" value="1">
3385 <desc>Unregister only the machine, but neither delete snapshots nor detach media.</desc>
3386 </const>
3387 <const name="DetachAllReturnNone" value="2">
3388 <desc>Delete all snapshots and detach all media but return none; this will keep all media registered.</desc>
3389 </const>
3390 <const name="DetachAllReturnHardDisksOnly" value="3">
3391 <desc>Delete all snapshots, detach all media and return hard disks for closing, but not removeable media.</desc>
3392 </const>
3393 <const name="Full" value="4">
3394 <desc>Delete all snapshots, detach all media and return all media for closing.</desc>
3395 </const>
3396 </enum>
3397
3398 <interface
3399 name="IMachine" extends="$unknown"
3400 uuid="082c38ff-d9b3-4b12-b540-01516a931f17"
3401 wsmap="managed"
3402 >
3403 <desc>
3404 The IMachine interface represents a virtual machine, or guest, created
3405 in VirtualBox.
3406
3407 This interface is used in two contexts. First of all, a collection of
3408 objects implementing this interface is stored in the
3409 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
3410 machines that are currently registered with this VirtualBox
3411 installation. Also, once a session has been opened for the given virtual
3412 machine (e.g. the virtual machine is running), the machine object
3413 associated with the open session can be queried from the session object;
3414 see <link to="ISession"/> for details.
3415
3416 The main role of this interface is to expose the settings of the virtual
3417 machine and provide methods to change various aspects of the virtual
3418 machine's configuration. For machine objects stored in the
3419 <link to="IVirtualBox::machines"/> collection, all attributes are
3420 read-only unless explicitly stated otherwise in individual attribute
3421 and method descriptions.
3422
3423 In order to change a machine setting, a session for this machine must be
3424 opened using one of the <link to="IMachine::lockMachine" /> or
3425 <link to="IMachine::launchVMProcess"/> methods. After the
3426 machine has been successfully locked for a session, a mutable machine object
3427 needs to be queried from the session object and then the desired settings
3428 changes can be applied to the returned object using IMachine attributes and
3429 methods. See the <link to="ISession"/> interface description for more
3430 information about sessions.
3431
3432 Note that IMachine does not provide methods to control virtual machine
3433 execution (such as start the machine, or power it down) -- these methods
3434 are grouped in a separate interface called <link to="IConsole" />.
3435
3436 <see>ISession, IConsole</see>
3437 </desc>
3438
3439 <attribute name="parent" type="IVirtualBox" readonly="yes">
3440 <desc>Associated parent object.</desc>
3441 </attribute>
3442
3443 <attribute name="accessible" type="boolean" readonly="yes">
3444 <desc>
3445 Whether this virtual machine is currently accessible or not.
3446
3447 A machine is always deemed accessible unless it is registered <i>and</i>
3448 its settings file cannot be read or parsed (either because the file itself
3449 is unavailable or has invalid XML contents).
3450
3451 Every time this property is read, the accessibility state of
3452 this machine is re-evaluated. If the returned value is @c false,
3453 the <link to="#accessError"/> property may be used to get the
3454 detailed error information describing the reason of
3455 inaccessibility, including XML error messages.
3456
3457 When the machine is inaccessible, only the following properties
3458 can be used on it:
3459 <ul>
3460 <li><link to="#parent"/></li>
3461 <li><link to="#id"/></li>
3462 <li><link to="#settingsFilePath"/></li>
3463 <li><link to="#accessible"/></li>
3464 <li><link to="#accessError"/></li>
3465 </ul>
3466
3467 An attempt to access any other property or method will return
3468 an error.
3469
3470 The only possible action you can perform on an inaccessible
3471 machine is to unregister it using the
3472 <link to="IMachine::unregister"/> call (or, to check
3473 for the accessibility state once more by querying this
3474 property).
3475
3476 <note>
3477 In the current implementation, once this property returns
3478 @c true, the machine will never become inaccessible
3479 later, even if its settings file cannot be successfully
3480 read/written any more (at least, until the VirtualBox
3481 server is restarted). This limitation may be removed in
3482 future releases.
3483 </note>
3484 </desc>
3485 </attribute>
3486
3487 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3488 <desc>
3489 Error information describing the reason of machine
3490 inaccessibility.
3491
3492 Reading this property is only valid after the last call to
3493 <link to="#accessible"/> returned @c false (i.e. the
3494 machine is currently unaccessible). Otherwise, a @c null
3495 IVirtualBoxErrorInfo object will be returned.
3496 </desc>
3497 </attribute>
3498
3499 <attribute name="name" type="wstring">
3500 <desc>
3501 Name of the virtual machine.
3502
3503 Besides being used for human-readable identification purposes
3504 everywhere in VirtualBox, the virtual machine name is also used
3505 as a name of the machine's settings file and as a name of the
3506 subdirectory this settings file resides in. Thus, every time you
3507 change the value of this property, the settings file will be
3508 renamed once you call <link to="#saveSettings"/> to confirm the
3509 change. The containing subdirectory will be also renamed, but
3510 only if it has exactly the same name as the settings file
3511 itself prior to changing this property (for backward compatibility
3512 with previous API releases). The above implies the following
3513 limitations:
3514 <ul>
3515 <li>The machine name cannot be empty.</li>
3516 <li>The machine name can contain only characters that are valid
3517 file name characters according to the rules of the file
3518 system used to store VirtualBox configuration.</li>
3519 <li>You cannot have two or more machines with the same name
3520 if they use the same subdirectory for storing the machine
3521 settings files.</li>
3522 <li>You cannot change the name of the machine if it is running,
3523 or if any file in the directory containing the settings file
3524 is being used by another running machine or by any other
3525 process in the host operating system at a time when
3526 <link to="#saveSettings"/> is called.
3527 </li>
3528 </ul>
3529 If any of the above limitations are hit, <link to="#saveSettings"/>
3530 will return an appropriate error message explaining the exact
3531 reason and the changes you made to this machine will not be saved.
3532 </desc>
3533 </attribute>
3534
3535 <attribute name="description" type="wstring">
3536 <desc>
3537 Description of the virtual machine.
3538
3539 The description attribute can contain any text and is
3540 typically used to describe the hardware and software
3541 configuration of the virtual machine in detail (i.e. network
3542 settings, versions of the installed software and so on).
3543 </desc>
3544 </attribute>
3545
3546 <attribute name="id" type="uuid" mod="string" readonly="yes">
3547 <desc>UUID of the virtual machine.</desc>
3548 </attribute>
3549
3550 <attribute name="OSTypeId" type="wstring">
3551 <desc>
3552 User-defined identifier of the Guest OS type.
3553 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
3554 an IGuestOSType object representing details about the given
3555 Guest OS type.
3556 <note>
3557 This value may differ from the value returned by
3558 <link to="IGuest::OSTypeId"/> if Guest Additions are
3559 installed to the guest OS.
3560 </note>
3561 </desc>
3562 </attribute>
3563
3564 <attribute name="HardwareVersion" type="wstring">
3565 <desc>Hardware version identifier. Internal use only for now.</desc>
3566 </attribute>
3567
3568 <attribute name="hardwareUUID" type="uuid" mod="string">
3569 <desc>
3570 The UUID presented to the guest via memory tables, hardware and guest
3571 properties. For most VMs this is the same as the @a id, but for VMs
3572 which have been cloned or teleported it may be the same as the source
3573 VM. This latter is because the guest shouldn't notice that it was
3574 cloned or teleported.
3575 </desc>
3576 </attribute>
3577
3578 <attribute name="CPUCount" type="unsigned long">
3579 <desc>Number of virtual CPUs in the VM.</desc>
3580 </attribute>
3581
3582 <attribute name="CPUHotPlugEnabled" type="boolean">
3583 <desc>
3584 This setting determines whether VirtualBox allows CPU
3585 hotplugging for this machine.</desc>
3586 </attribute>
3587
3588 <attribute name="CPUPriority" type="unsigned long">
3589 <desc>
3590 Priority of the virtual CPUs. Means to limit the number of CPU cycles
3591 a guest can use. The unit is percentage of host CPU cycles per second.
3592 The valid range is 1 - 100. 100 (the default) implies no limit.
3593 </desc>
3594 </attribute>
3595
3596 <attribute name="memorySize" type="unsigned long">
3597 <desc>System memory size in megabytes.</desc>
3598 </attribute>
3599
3600 <attribute name="memoryBalloonSize" type="unsigned long">
3601 <desc>Memory balloon size in megabytes.</desc>
3602 </attribute>
3603
3604 <attribute name="PageFusionEnabled" type="boolean">
3605 <desc>
3606 This setting determines whether VirtualBox allows page
3607 fusion for this machine (64 bits host only).
3608 </desc>
3609 </attribute>
3610
3611 <attribute name="VRAMSize" type="unsigned long">
3612 <desc>Video memory size in megabytes.</desc>
3613 </attribute>
3614
3615 <attribute name="accelerate3DEnabled" type="boolean" default="false">
3616 <desc>
3617 This setting determines whether VirtualBox allows this machine to make
3618 use of the 3D graphics support available on the host.</desc>
3619 </attribute>
3620
3621 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
3622 <desc>
3623 This setting determines whether VirtualBox allows this machine to make
3624 use of the 2D video acceleration support available on the host.</desc>
3625 </attribute>
3626
3627 <attribute name="monitorCount" type="unsigned long">
3628 <desc>
3629 Number of virtual monitors.
3630 <note>
3631 Only effective on Windows XP and later guests with
3632 Guest Additions installed.
3633 </note>
3634 </desc>
3635 </attribute>
3636
3637 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
3638 <desc>Object containing all BIOS settings.</desc>
3639 </attribute>
3640
3641 <attribute name="firmwareType" type="FirmwareType">
3642 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
3643 bootstrap in this VM.</desc>
3644 </attribute>
3645
3646 <attribute name="pointingHidType" type="PointingHidType">
3647 <desc>Type of pointing HID (such as mouse or tablet) used in this VM.
3648 The default is typically "PS2Mouse" but can vary depending on the
3649 requirements of the guest operating system.</desc>
3650 </attribute>
3651
3652 <attribute name="keyboardHidType" type="KeyboardHidType">
3653 <desc>Type of keyboard HID used in this VM.
3654 The default is typically "PS2Keyboard" but can vary depending on the
3655 requirements of the guest operating system.</desc>
3656 </attribute>
3657
3658 <attribute name="hpetEnabled" type="boolean">
3659 <desc>This attribute controls if High Precision Event Timer (HPET) is
3660 enabled in this VM. Use this property if you want to provide guests
3661 with additional time source, or if guest requires HPET to function correctly.
3662 Default is false.</desc>
3663 </attribute>
3664
3665 <attribute name="snapshotFolder" type="wstring">
3666 <desc>
3667 Full path to the directory used to store snapshot data
3668 (differencing media and saved state files) of this machine.
3669
3670 The initial value of this property is
3671 <tt>&lt;</tt><link to="#settingsFilePath">
3672 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3673 <link to="#id">machine_uuid</link>
3674 <tt>&gt;</tt>.
3675
3676 Currently, it is an error to try to change this property on
3677 a machine that has snapshots (because this would require to
3678 move possibly large files to a different location).
3679 A separate method will be available for this purpose later.
3680
3681 <note>
3682 Setting this property to @c null or to an empty string will restore
3683 the initial value.
3684 </note>
3685 <note>
3686 When setting this property, the specified path can be
3687 absolute (full path) or relative to the directory where the
3688 <link to="#settingsFilePath">machine settings file</link>
3689 is located. When reading this property, a full path is
3690 always returned.
3691 </note>
3692 <note>
3693 The specified path may not exist, it will be created
3694 when necessary.
3695 </note>
3696 </desc>
3697 </attribute>
3698
3699 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
3700 <desc>VRDP server object.</desc>
3701 </attribute>
3702
3703 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
3704 <desc>Array of media attached to this machine.</desc>
3705 </attribute>
3706
3707 <attribute name="USBController" type="IUSBController" readonly="yes">
3708 <desc>
3709 Associated USB controller object.
3710
3711 <note>
3712 If USB functionality is not available in the given edition of
3713 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3714 </note>
3715 </desc>
3716 </attribute>
3717
3718 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3719 <desc>Associated audio adapter, always present.</desc>
3720 </attribute>
3721
3722 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
3723 <desc>Array of storage controllers attached to this machine.</desc>
3724 </attribute>
3725
3726 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3727 <desc>
3728 Full name of the file containing machine settings data.
3729 </desc>
3730 </attribute>
3731
3732 <attribute name="settingsModified" type="boolean" readonly="yes">
3733 <desc>
3734 Whether the settings of this machine have been modified
3735 (but neither yet saved nor discarded).
3736 <note>
3737 Reading this property is only valid on instances returned
3738 by <link to="ISession::machine"/> and on new machines
3739 created by <link to="IVirtualBox::createMachine"/> or opened
3740 by <link to="IVirtualBox::openMachine"/> but not
3741 yet registered, or on unregistered machines after calling
3742 <link to="IMachine::unregister"/>. For all other
3743 cases, the settings can never be modified.
3744 </note>
3745 <note>
3746 For newly created unregistered machines, the value of this
3747 property is always @c true until <link to="#saveSettings"/>
3748 is called (no matter if any machine settings have been
3749 changed after the creation or not). For opened machines
3750 the value is set to @c false (and then follows to normal rules).
3751 </note>
3752 </desc>
3753 </attribute>
3754
3755 <attribute name="sessionState" type="SessionState" readonly="yes">
3756 <desc>Current session state for this machine.</desc>
3757 </attribute>
3758
3759 <attribute name="sessionType" type="wstring" readonly="yes">
3760 <desc>
3761 Type of the session. If <link to="#sessionState"/> is
3762 Spawning or Locked, this attribute contains the
3763 same value as passed to the
3764 <link to="IMachine::launchVMProcess"/> method in the
3765 @a type parameter. If the session was used with
3766 <link to="IMachine::lockMachine" />, or if
3767 <link to="#sessionState"/> is SessionClosed, the value of this
3768 attribute is an empty string.
3769 </desc>
3770 </attribute>
3771
3772 <attribute name="sessionPid" type="unsigned long" readonly="yes">
3773 <desc>
3774 Identifier of the session process. This attribute contains the
3775 platform-dependent identifier of the process whose session was
3776 used with <link to="IMachine::lockMachine" /> call. The returned
3777 value is only valid if <link to="#sessionState"/> is Locked or
3778 Unlocking by the time this property is read.
3779 </desc>
3780 </attribute>
3781
3782 <attribute name="state" type="MachineState" readonly="yes">
3783 <desc>Current execution state of this machine.</desc>
3784 </attribute>
3785
3786 <attribute name="lastStateChange" type="long long" readonly="yes">
3787 <desc>
3788 Time stamp of the last execution state change,
3789 in milliseconds since 1970-01-01 UTC.
3790 </desc>
3791 </attribute>
3792
3793 <attribute name="stateFilePath" type="wstring" readonly="yes">
3794 <desc>
3795 Full path to the file that stores the execution state of
3796 the machine when it is in the <link to="MachineState_Saved"/> state.
3797 <note>
3798 When the machine is not in the Saved state, this attribute is
3799 an empty string.
3800 </note>
3801 </desc>
3802 </attribute>
3803
3804 <attribute name="logFolder" type="wstring" readonly="yes">
3805 <desc>
3806 Full path to the folder that stores a set of rotated log files
3807 recorded during machine execution. The most recent log file is
3808 named <tt>VBox.log</tt>, the previous log file is
3809 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
3810 in the current version).
3811 </desc>
3812 </attribute>
3813
3814 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
3815 <desc>
3816 Current snapshot of this machine. This is @c null if the machine
3817 currently has no snapshots. If it is not @c null, then it was
3818 set by one of <link to="IConsole::takeSnapshot" />,
3819 <link to="IConsole::deleteSnapshot" />
3820 or <link to="IConsole::restoreSnapshot" />, depending on which
3821 was called last. See <link to="ISnapshot"/> for details.
3822 </desc>
3823 </attribute>
3824
3825 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
3826 <desc>
3827 Number of snapshots taken on this machine. Zero means the
3828 machine doesn't have any snapshots.
3829 </desc>
3830 </attribute>
3831
3832 <attribute name="currentStateModified" type="boolean" readonly="yes">
3833 <desc>
3834 Returns @c true if the current state of the machine is not
3835 identical to the state stored in the current snapshot.
3836
3837 The current state is identical to the current snapshot only
3838 directly after one of the following calls are made:
3839
3840 <ul>
3841 <li><link to="IConsole::restoreSnapshot"/>
3842 </li>
3843 <li><link to="IConsole::takeSnapshot"/> (issued on a
3844 "powered off" or "saved" machine, for which
3845 <link to="#settingsModified"/> returns @c false)
3846 </li>
3847 <li><link to="IMachine::setCurrentSnapshot"/>
3848 </li>
3849 </ul>
3850
3851 The current state remains identical until one of the following
3852 happens:
3853 <ul>
3854 <li>settings of the machine are changed</li>
3855 <li>the saved state is deleted</li>
3856 <li>the current snapshot is deleted</li>
3857 <li>an attempt to execute the machine is made</li>
3858 </ul>
3859
3860 <note>
3861 For machines that don't have snapshots, this property is
3862 always @c false.
3863 </note>
3864 </desc>
3865 </attribute>
3866
3867 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
3868 <desc>
3869 Collection of shared folders for this machine (permanent shared
3870 folders). These folders are shared automatically at machine startup
3871 and available only to the guest OS installed within this machine.
3872
3873 New shared folders are added to the collection using
3874 <link to="#createSharedFolder"/>. Existing shared folders can be
3875 removed using <link to="#removeSharedFolder"/>.
3876 </desc>
3877 </attribute>
3878
3879 <attribute name="clipboardMode" type="ClipboardMode">
3880 <desc>
3881 Synchronization mode between the host OS clipboard
3882 and the guest OS clipboard.
3883 </desc>
3884 </attribute>
3885
3886 <attribute name="guestPropertyNotificationPatterns" type="wstring">
3887 <desc>
3888 A comma-separated list of simple glob patterns. Changes to guest
3889 properties whose name matches one of the patterns will generate an
3890 <link to="IGuestPropertyChangedEvent"/> signal.
3891 </desc>
3892 </attribute>
3893
3894 <attribute name="teleporterEnabled" type="boolean">
3895 <desc>
3896 When set to @a true, the virtual machine becomes a target teleporter
3897 the next time it is powered on. This can only set to @a true when the
3898 VM is in the @a PoweredOff or @a Aborted state.
3899
3900 <!-- This property is automatically set to @a false when the VM is powered
3901 on. (bird: This doesn't work yet ) -->
3902 </desc>
3903 </attribute>
3904
3905 <attribute name="teleporterPort" type="unsigned long">
3906 <desc>
3907 The TCP port the target teleporter will listen for incoming
3908 teleportations on.
3909
3910 0 means the port is automatically selected upon power on. The actual
3911 value can be read from this property while the machine is waiting for
3912 incoming teleportations.
3913 </desc>
3914 </attribute>
3915
3916 <attribute name="teleporterAddress" type="wstring">
3917 <desc>
3918 The address the target teleporter will listen on. If set to an empty
3919 string, it will listen on all addresses.
3920 </desc>
3921 </attribute>
3922
3923 <attribute name="teleporterPassword" type="wstring">
3924 <desc>
3925 The password the to check for on the target teleporter. This is just a
3926 very basic measure to prevent simple hacks and operators accidentally
3927 beaming a virtual machine to the wrong place.
3928 </desc>
3929 </attribute>
3930
3931 <attribute name="RTCUseUTC" type="boolean">
3932 <desc>
3933 When set to @a true, the RTC device of the virtual machine will run
3934 in UTC time, otherwise in local time. Especially Unix guests prefer
3935 the time in UTC.
3936 </desc>
3937 </attribute>
3938
3939 <attribute name="ioCacheEnabled" type="boolean">
3940 <desc>
3941 When set to @a true, the builtin I/O cache of the virtual machine
3942 will be enabled.
3943 </desc>
3944 </attribute>
3945
3946 <attribute name="ioCacheSize" type="unsigned long">
3947 <desc>
3948 Maximum size of the I/O cache in MB.
3949 </desc>
3950 </attribute>
3951
3952 <method name="lockMachine">
3953 <desc>
3954 Locks the machine for the given session to enable the caller
3955 to make changes to the machine or start the VM or control
3956 VM execution.
3957
3958 There are two ways to lock a machine for such uses:
3959
3960 <ul>
3961 <li>If you want to make changes to the machine settings,
3962 you must obtain an exclusive write lock on the machine
3963 by setting @a lockType to @c Write.
3964
3965 This will only succeed if no other process has locked
3966 the machine to prevent conflicting changes. Only after
3967 an exclusive write lock has been obtained using this method, one
3968 can change all VM settings or execute the VM in the process
3969 space of the session object. (Note that the latter is only of
3970 interest if you actually want to write a new front-end for
3971 virtual machines; but this API gets called internally by
3972 the existing front-ends such as VBoxHeadless and the VirtualBox
3973 GUI to acquire a write lock on the machine that they are running.)
3974
3975 On success, write-locking the machine for a session creates
3976 a second copy of the IMachine object. It is this second object
3977 upon which changes can be made; in VirtualBox terminology, the
3978 second copy is "mutable". It is only this second, mutable machine
3979 object upon which you can call methods that change the
3980 machine state. After having called this method, you can
3981 obtain this second, mutable machine object using the
3982 <link to="ISession::machine" /> attribute.
3983 </li>
3984 <li>If you only want to check the machine state or control
3985 machine execution without actually changing machine
3986 settings (e.g. to get access to VM statistics or take
3987 a snapshot or save the machine state), then set the
3988 @a lockType argument to @c Shared.
3989
3990 If no other session has obtained a lock, you will obtain an
3991 exclusive write lock as described above. However, if another
3992 session has already obtained such a lock, then a link to that
3993 existing session will be established which allows you
3994 to control that existing session.
3995
3996 To find out which type of lock was obtained, you can
3997 inspect <link to="ISession::type" />, which will have been
3998 set to either @c WriteLock or @c Shared.
3999 </li>
4000 </ul>
4001
4002 In either case, you can get access to the <link to="IConsole" />
4003 object which controls VM execution.
4004
4005 Also in all of the above cases, one must always call
4006 <link to="ISession::unlockMachine" /> to release the lock on the machine, or
4007 the machine's state will eventually be set to "Aborted".
4008
4009 To change settings on a machine, the following sequence is typically
4010 performed:
4011
4012 <ol>
4013 <li>Call this method to obtain an exclusive write lock for the current session.</li>
4014
4015 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
4016
4017 <li>Change the settings of the machine by invoking IMachine methods.</li>
4018
4019 <li>Call <link to="IMachine::saveSettings" />.</li>
4020
4021 <li>Release the write lock by calling <link to="ISession::unlockMachine"/>.</li>
4022 </ol>
4023
4024 <result name="E_UNEXPECTED">
4025 Virtual machine not registered.
4026 </result>
4027 <result name="E_ACCESSDENIED">
4028 Process not started by OpenRemoteSession.
4029 </result>
4030 <result name="VBOX_E_INVALID_OBJECT_STATE">
4031 Session already open or being opened.
4032 </result>
4033 <result name="VBOX_E_VM_ERROR">
4034 Failed to assign machine to session.
4035 </result>
4036 </desc>
4037 <param name="session" type="ISession" dir="in">
4038 <desc>
4039 Session object for which the machine will be locked.
4040 </desc>
4041 </param>
4042 <param name="lockType" type="LockType" dir="in">
4043 <desc>
4044 If set to @c Write, then attempt to acquire an exclusive write lock or fail.
4045 If set to @c Shared, then either acquire an exclusive write lock or establish
4046 a link to an existing session.
4047 </desc>
4048 </param>
4049 </method>
4050
4051 <method name="launchVMProcess">
4052 <desc>
4053 Spawns a new process that will execute the virtual machine and obtains a shared
4054 lock on the machine for the calling session.
4055
4056 If launching the VM succeeds, the new VM process will create its own session
4057 and write-lock the machine for it, preventing conflicting changes from other
4058 processes. If the machine is already locked (because it is already running or
4059 because another session has a write lock), launching the VM process will therefore
4060 fail. Reversely, future attempts to obtain a write lock will also fail while the
4061 machine is running.
4062
4063 The caller's session object remains separate from the session opened by the new
4064 VM process. It receives its own <link to="IConsole" /> object which can be used
4065 to control machine execution, but it cannot be used to change all VM settings
4066 which would be available after a <link to="#lockMachine" /> call.
4067
4068 The caller must eventually release the session's shared lock by calling
4069 <link to="ISession::unlockMachine" /> on the local session object once this call
4070 has returned. However, the session's state (see <link to="ISession::state" />)
4071 will not return to "Unlocked" until the remote session has also unlocked
4072 the machine (i.e. the machine has stopped running).
4073
4074 Lauching a VM process can take some time (a new VM is started in a new process,
4075 for which memory and other resources need to be set up). Because of this,
4076 an <link to="IProgress" /> object is returned to allow the caller to wait
4077 for this asynchronous operation to be completed. Until then, the caller's
4078 session object remains in the "Unlocked" state, and its <link to="ISession::machine" />
4079 and <link to="ISession::console" /> attributes cannot be accessed.
4080 It is recommended to use <link to="IProgress::waitForCompletion" /> or
4081 similar calls to wait for completion. Completion is signalled when the VM
4082 is powered on. If launching the VM fails, error messages can be queried
4083 via the progress object, if available.
4084
4085 The progress object will have at least 2 sub-operations. The first
4086 operation covers the period up to the new VM process calls powerUp.
4087 The subsequent operations mirror the <link to="IConsole::powerUp"/>
4088 progress object. Because <link to="IConsole::powerUp"/> may require
4089 some extra sub-operations, the <link to="IProgress::operationCount"/>
4090 may change at the completion of operation.
4091
4092 For details on the teleportation progress operation, see
4093 <link to="IConsole::powerUp"/>.
4094
4095 The @a environment argument is a string containing definitions of
4096 environment variables in the following format:
4097 @code
4098 NAME[=VALUE]\n
4099 NAME[=VALUE]\n
4100 ...
4101 @endcode
4102 where <tt>\\n</tt> is the new line character. These environment
4103 variables will be appended to the environment of the VirtualBox server
4104 process. If an environment variable exists both in the server process
4105 and in this list, the value from this list takes precedence over the
4106 server's variable. If the value of the environment variable is
4107 omitted, this variable will be removed from the resulting environment.
4108 If the environment string is @c null or empty, the server environment
4109 is inherited by the started process as is.
4110
4111 <result name="E_UNEXPECTED">
4112 Virtual machine not registered.
4113 </result>
4114 <result name="E_INVALIDARG">
4115 Invalid session type @a type.
4116 </result>
4117 <result name="VBOX_E_OBJECT_NOT_FOUND">
4118 No machine matching @a machineId found.
4119 </result>
4120 <result name="VBOX_E_INVALID_OBJECT_STATE">
4121 Session already open or being opened.
4122 </result>
4123 <result name="VBOX_E_IPRT_ERROR">
4124 Launching process for machine failed.
4125 </result>
4126 <result name="VBOX_E_VM_ERROR">
4127 Failed to assign machine to session.
4128 </result>
4129 </desc>
4130 <param name="session" type="ISession" dir="in">
4131 <desc>
4132 Client session object to which the VM process will be connected (this
4133 must be in "Unlocked" state).
4134 </desc>
4135 </param>
4136 <param name="type" type="wstring" dir="in">
4137 <desc>
4138 Front-end to use for the new VM process. The following are currently supported:
4139 <ul>
4140 <li><tt>"gui"</tt>: VirtualBox Qt GUI front-end</li>
4141 <li><tt>"vrdp"</tt>: VBoxHeadless (VRDP Server) front-end</li>
4142 <li><tt>"sdl"</tt>: VirtualBox SDL front-end</li>
4143 </ul>
4144 </desc>
4145 </param>
4146 <param name="environment" type="wstring" dir="in">
4147 <desc>
4148 Environment to pass to the VM process.
4149 </desc>
4150 </param>
4151 <param name="progress" type="IProgress" dir="return">
4152 <desc>Progress object to track the operation completion.</desc>
4153 </param>
4154 </method>
4155
4156 <method name="setBootOrder">
4157 <desc>
4158 Puts the given device to the specified position in
4159 the boot order.
4160
4161 To indicate that no device is associated with the given position,
4162 <link to="DeviceType_Null"/> should be used.
4163
4164 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4165
4166 <result name="E_INVALIDARG">
4167 Boot @a position out of range.
4168 </result>
4169 <result name="E_NOTIMPL">
4170 Booting from USB @a device currently not supported.
4171 </result>
4172
4173 </desc>
4174 <param name="position" type="unsigned long" dir="in">
4175 <desc>
4176 Position in the boot order (@c 1 to the total number of
4177 devices the machine can boot from, as returned by
4178 <link to="ISystemProperties::maxBootPosition"/>).
4179 </desc>
4180 </param>
4181 <param name="device" type="DeviceType" dir="in">
4182 <desc>
4183 The type of the device used to boot at the given position.
4184 </desc>
4185 </param>
4186 </method>
4187
4188 <method name="getBootOrder" const="yes">
4189 <desc>
4190 Returns the device type that occupies the specified
4191 position in the boot order.
4192
4193 @todo [remove?]
4194 If the machine can have more than one device of the returned type
4195 (such as hard disks), then a separate method should be used to
4196 retrieve the individual device that occupies the given position.
4197
4198 If here are no devices at the given position, then
4199 <link to="DeviceType_Null"/> is returned.
4200
4201 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4202
4203 <result name="E_INVALIDARG">
4204 Boot @a position out of range.
4205 </result>
4206
4207 </desc>
4208 <param name="position" type="unsigned long" dir="in">
4209 <desc>
4210 Position in the boot order (@c 1 to the total number of
4211 devices the machine can boot from, as returned by
4212 <link to="ISystemProperties::maxBootPosition"/>).
4213 </desc>
4214 </param>
4215 <param name="device" type="DeviceType" dir="return">
4216 <desc>
4217 Device at the given position.
4218 </desc>
4219 </param>
4220 </method>
4221
4222 <method name="attachDevice">
4223 <desc>
4224 Attaches a device and optionally mounts a medium to the given storage
4225 controller (<link to="IStorageController" />, identified by @a name),
4226 at the indicated port and device.
4227
4228 This method is intended for managing storage devices in general while a
4229 machine is powered off. It can be used to attach and detach fixed
4230 and removeable media. The following kind of media can be attached
4231 to a machine:
4232
4233 <ul>
4234 <li>For fixed and removable media, you can pass in a medium that was
4235 previously opened using <link to="VirtualBox::openMedium" />.
4236 </li>
4237
4238 <li>Only for storage devices supporting removable media (such as
4239 DVDs and floppies), you can also specify a null pointer to
4240 indicate an empty drive or one of the medium objects listed
4241 in the <link to="IHost::DVDDrives" /> and <link to="IHost::floppyDrives"/>
4242 arrays to indicate a host drive.
4243 For removeable devices, you can also use <link to="IMachine::mountMedium"/>
4244 to change the media while the machine is running.
4245 </li>
4246 </ul>
4247
4248 In a VM's default configuration of virtual machines, the secondary
4249 master of the IDE controller is used for a CD/DVD drive.
4250
4251 After calling this returns successfully, a new instance of
4252 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4253 attachments (see <link to="IMachine::mediumAttachments"/>).
4254
4255 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4256 information about attaching media.
4257
4258 The specified device slot must not have a device attached to it,
4259 or this method will fail.
4260
4261 <note>
4262 You cannot attach a device to a newly created machine until
4263 this machine's settings are saved to disk using
4264 <link to="#saveSettings"/>.
4265 </note>
4266 <note>
4267 If the medium is being attached indirectly, a new differencing medium
4268 will implicitly be created for it and attached instead. If the
4269 changes made to the machine settings (including this indirect
4270 attachment) are later cancelled using <link to="#discardSettings"/>,
4271 this implicitly created differencing medium will implicitly
4272 be deleted.
4273 </note>
4274
4275 <result name="E_INVALIDARG">
4276 SATA device, SATA port, IDE port or IDE slot out of range, or
4277 file or UUID not found.
4278 </result>
4279 <result name="VBOX_E_INVALID_OBJECT_STATE">
4280 Machine must be registered before media can be attached.
4281 </result>
4282 <result name="VBOX_E_INVALID_VM_STATE">
4283 Invalid machine state.
4284 </result>
4285 <result name="VBOX_E_OBJECT_IN_USE">
4286 A medium is already attached to this or another virtual machine.
4287 </result>
4288
4289 </desc>
4290 <param name="name" type="wstring" dir="in">
4291 <desc>Name of the storage controller to attach the device to.</desc>
4292 </param>
4293 <param name="controllerPort" type="long" dir="in">
4294 <desc>Port to attach the device to. For an IDE controller, 0 specifies
4295 the primary controller and 1 specifies the secondary controller.
4296 For a SCSI controller, this must range from 0 to 15; for a SATA controller,
4297 from 0 to 29; for an SAS controller, from 0 to 7.</desc>
4298 </param>
4299 <param name="device" type="long" dir="in">
4300 <desc>Device slot in the given port to attach the device to. This is only
4301 relevant for IDE controllers, for which 0 specifies the master device and
4302 1 specifies the slave device. For all other controller types, this must
4303 be 0.</desc>
4304 </param>
4305 <param name="type" type="DeviceType" dir="in">
4306 <desc>Device type of the attached device. For media opened by
4307 <link to="IVirtualBox::openMedium" />, this must match the device type
4308 specified there.</desc>
4309 </param>
4310 <param name="medium" type="IMedium" dir="in">
4311 <desc>Medium to mount or NULL for an empty drive.</desc>
4312 </param>
4313 </method>
4314
4315 <method name="detachDevice">
4316 <desc>
4317 Detaches the device attached to a device slot of the specified bus.
4318
4319 Detaching the device from the virtual machine is deferred. This means
4320 that the medium remains associated with the machine when this method
4321 returns and gets actually de-associated only after a successful
4322 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4323 for more detailed information about attaching media.
4324
4325 <note>
4326 You cannot detach a device from a running machine.
4327 </note>
4328 <note>
4329 Detaching differencing media implicitly created by <link
4330 to="#attachDevice"/> for the indirect attachment using this
4331 method will <b>not</b> implicitly delete them. The
4332 <link to="IMedium::deleteStorage"/> operation should be
4333 explicitly performed by the caller after the medium is successfully
4334 detached and the settings are saved with
4335 <link to="#saveSettings"/>, if it is the desired action.
4336 </note>
4337
4338 <result name="VBOX_E_INVALID_VM_STATE">
4339 Attempt to detach medium from a running virtual machine.
4340 </result>
4341 <result name="VBOX_E_OBJECT_NOT_FOUND">
4342 No medium attached to given slot/bus.
4343 </result>
4344 <result name="VBOX_E_NOT_SUPPORTED">
4345 Medium format does not support storage deletion.
4346 </result>
4347
4348 </desc>
4349 <param name="name" type="wstring" dir="in">
4350 <desc>Name of the storage controller to detach the medium from.</desc>
4351 </param>
4352 <param name="controllerPort" type="long" dir="in">
4353 <desc>Port number to detach the medium from.</desc>
4354 </param>
4355 <param name="device" type="long" dir="in">
4356 <desc>Device slot number to detach the medium from.</desc>
4357 </param>
4358 </method>
4359
4360 <method name="passthroughDevice">
4361 <desc>
4362 Sets the passthrough mode of an existing DVD device. Changing the
4363 setting while the VM is running is forbidden. The setting is only used
4364 if at VM start the device is configured as a host DVD drive, in all
4365 other cases it is ignored. The device must already exist; see
4366 <link to="IMachine::attachDevice"/> for how to attach a new device.
4367
4368 The @a controllerPort and @a device parameters specify the device slot and
4369 have have the same meaning as with <link to="IMachine::attachDevice" />.
4370
4371 <result name="E_INVALIDARG">
4372 SATA device, SATA port, IDE port or IDE slot out of range.
4373 </result>
4374 <result name="VBOX_E_INVALID_OBJECT_STATE">
4375 Attempt to modify an unregistered virtual machine.
4376 </result>
4377 <result name="VBOX_E_INVALID_VM_STATE">
4378 Invalid machine state.
4379 </result>
4380
4381 </desc>
4382 <param name="name" type="wstring" dir="in">
4383 <desc>Name of the storage controller.</desc>
4384 </param>
4385 <param name="controllerPort" type="long" dir="in">
4386 <desc>Storage controller port.</desc>
4387 </param>
4388 <param name="device" type="long" dir="in">
4389 <desc>Device slot in the given port.</desc>
4390 </param>
4391 <param name="passthrough" type="boolean" dir="in">
4392 <desc>New value for the passthrough setting.</desc>
4393 </param>
4394 </method>
4395
4396 <method name="mountMedium">
4397 <desc>
4398 Mounts a medium (<link to="IMedium" />, identified
4399 by the given UUID @a id) to the given storage controller
4400 (<link to="IStorageController" />, identified by @a name),
4401 at the indicated port and device. The device must already exist;
4402 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4403
4404 This method is intended only for managing removable media, where the
4405 device is fixed but media is changeable at runtime (such as DVDs
4406 and floppies). It cannot be used for fixed media such as hard disks.
4407
4408 The @a controllerPort and @a device parameters specify the device slot and
4409 have have the same meaning as with <link to="IMachine::attachDevice" />.
4410
4411 The specified device slot can have a medium mounted, which will be
4412 unmounted first. Specifying a zero UUID (or an empty string) for
4413 @a medium does just an unmount.
4414
4415 See <link to="IMedium"/> for more detailed information about
4416 attaching media.
4417
4418 <result name="E_INVALIDARG">
4419 SATA device, SATA port, IDE port or IDE slot out of range.
4420 </result>
4421 <result name="VBOX_E_INVALID_OBJECT_STATE">
4422 Attempt to attach medium to an unregistered virtual machine.
4423 </result>
4424 <result name="VBOX_E_INVALID_VM_STATE">
4425 Invalid machine state.
4426 </result>
4427 <result name="VBOX_E_OBJECT_IN_USE">
4428 Medium already attached to this or another virtual machine.
4429 </result>
4430
4431 </desc>
4432 <param name="name" type="wstring" dir="in">
4433 <desc>Name of the storage controller to attach the medium to.</desc>
4434 </param>
4435 <param name="controllerPort" type="long" dir="in">
4436 <desc>Port to attach the medium to.</desc>
4437 </param>
4438 <param name="device" type="long" dir="in">
4439 <desc>Device slot in the given port to attach the medium to.</desc>
4440 </param>
4441 <param name="medium" type="uuid" mod="string" dir="in">
4442 <desc>UUID of the medium to attach. A zero UUID means unmount the
4443 currently mounted medium.</desc>
4444 </param>
4445 <param name="force" type="boolean" dir="in">
4446 <desc>Allows to force unmount/mount of a medium which is locked by
4447 theDevice slot in the given port to attach the medium to.</desc>
4448 </param>
4449 </method>
4450
4451 <method name="getMedium" const="yes">
4452 <desc>
4453 Returns the virtual medium attached to a device slot of the specified
4454 bus.
4455
4456 Note that if the medium was indirectly attached by
4457 <link to="#mountMedium"/> to the given device slot then this
4458 method will return not the same object as passed to the
4459 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4460 more detailed information about mounting a medium.
4461
4462 <result name="VBOX_E_OBJECT_NOT_FOUND">
4463 No medium attached to given slot/bus.
4464 </result>
4465
4466 </desc>
4467 <param name="name" type="wstring" dir="in">
4468 <desc>Name of the storage controller the medium is attached to.</desc>
4469 </param>
4470 <param name="controllerPort" type="long" dir="in">
4471 <desc>Port to query.</desc>
4472 </param>
4473 <param name="device" type="long" dir="in">
4474 <desc>Device slot in the given port to query.</desc>
4475 </param>
4476 <param name="medium" type="IMedium" dir="return">
4477 <desc>Attached medium object.</desc>
4478 </param>
4479 </method>
4480
4481 <method name="getMediumAttachmentsOfController" const="yes">
4482 <desc>
4483 Returns an array of medium attachments which are attached to the
4484 the controller with the given name.
4485
4486 <result name="VBOX_E_OBJECT_NOT_FOUND">
4487 A storage controller with given name doesn't exist.
4488 </result>
4489 </desc>
4490 <param name="name" type="wstring" dir="in"/>
4491 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4492 </method>
4493
4494 <method name="getMediumAttachment" const="yes">
4495 <desc>
4496 Returns a medium attachment which corresponds to the controller with
4497 the given name, on the given port and device slot.
4498
4499 <result name="VBOX_E_OBJECT_NOT_FOUND">
4500 No attachment exists for the given controller/port/device combination.
4501 </result>
4502 </desc>
4503 <param name="name" type="wstring" dir="in"/>
4504 <param name="controllerPort" type="long" dir="in"/>
4505 <param name="device" type="long" dir="in"/>
4506 <param name="attachment" type="IMediumAttachment" dir="return"/>
4507 </method>
4508
4509 <method name="getNetworkAdapter" const="yes">
4510 <desc>
4511 Returns the network adapter associated with the given slot.
4512 Slots are numbered sequentially, starting with zero. The total
4513 number of adapters per machine is defined by the
4514 <link to="ISystemProperties::networkAdapterCount"/> property,
4515 so the maximum slot number is one less than that property's value.
4516
4517 <result name="E_INVALIDARG">
4518 Invalid @a slot number.
4519 </result>
4520
4521 </desc>
4522 <param name="slot" type="unsigned long" dir="in"/>
4523 <param name="adapter" type="INetworkAdapter" dir="return"/>
4524 </method>
4525
4526 <method name="addStorageController">
4527 <desc>
4528 Adds a new storage controller (SCSI, SAS or SATA controller) to the
4529 machine and returns it as an instance of
4530 <link to="IStorageController" />.
4531
4532 @a name identifies the controller for subsequent calls such as
4533 <link to="#getStorageControllerByName" />,
4534 <link to="#getStorageControllerByInstance" />,
4535 <link to="#removeStorageController" />,
4536 <link to="#attachDevice" /> or <link to="#mountMedium" />.
4537
4538 After the controller has been added, you can set its exact
4539 type by setting the <link to="IStorageController::controllerType" />.
4540
4541 <result name="VBOX_E_OBJECT_IN_USE">
4542 A storage controller with given name exists already.
4543 </result>
4544 <result name="E_INVALIDARG">
4545 Invalid @a controllerType.
4546 </result>
4547 </desc>
4548 <param name="name" type="wstring" dir="in"/>
4549 <param name="connectionType" type="StorageBus" dir="in"/>
4550 <param name="controller" type="IStorageController" dir="return"/>
4551 </method>
4552
4553 <method name="getStorageControllerByName" const="yes">
4554 <desc>
4555 Returns a storage controller with the given name.
4556
4557 <result name="VBOX_E_OBJECT_NOT_FOUND">
4558 A storage controller with given name doesn't exist.
4559 </result>
4560 </desc>
4561 <param name="name" type="wstring" dir="in"/>
4562 <param name="storageController" type="IStorageController" dir="return"/>
4563 </method>
4564
4565 <method name="getStorageControllerByInstance" const="yes">
4566 <desc>
4567 Returns a storage controller with the given instance number.
4568
4569 <result name="VBOX_E_OBJECT_NOT_FOUND">
4570 A storage controller with given instance number doesn't exist.
4571 </result>
4572 </desc>
4573 <param name="instance" type="unsigned long" dir="in"/>
4574 <param name="storageController" type="IStorageController" dir="return"/>
4575 </method>
4576
4577 <method name="removeStorageController">
4578 <desc>
4579 Removes a storage controller from the machine.
4580
4581 <result name="VBOX_E_OBJECT_NOT_FOUND">
4582 A storage controller with given name doesn't exist.
4583 </result>
4584 </desc>
4585 <param name="name" type="wstring" dir="in"/>
4586 </method>
4587
4588 <method name="getSerialPort" const="yes">
4589 <desc>
4590 Returns the serial port associated with the given slot.
4591 Slots are numbered sequentially, starting with zero. The total
4592 number of serial ports per machine is defined by the
4593 <link to="ISystemProperties::serialPortCount"/> property,
4594 so the maximum slot number is one less than that property's value.
4595
4596 <result name="E_INVALIDARG">
4597 Invalid @a slot number.
4598 </result>
4599
4600 </desc>
4601 <param name="slot" type="unsigned long" dir="in"/>
4602 <param name="port" type="ISerialPort" dir="return"/>
4603 </method>
4604
4605 <method name="getParallelPort" const="yes">
4606 <desc>
4607 Returns the parallel port associated with the given slot.
4608 Slots are numbered sequentially, starting with zero. The total
4609 number of parallel ports per machine is defined by the
4610 <link to="ISystemProperties::parallelPortCount"/> property,
4611 so the maximum slot number is one less than that property's value.
4612
4613 <result name="E_INVALIDARG">
4614 Invalid @a slot number.
4615 </result>
4616
4617 </desc>
4618 <param name="slot" type="unsigned long" dir="in"/>
4619 <param name="port" type="IParallelPort" dir="return"/>
4620 </method>
4621
4622 <method name="getExtraDataKeys">
4623 <desc>
4624 Returns an array representing the machine-specific extra data keys
4625 which currently have values defined.
4626 </desc>
4627 <param name="value" type="wstring" dir="return" safearray="yes">
4628 <desc>Array of extra data keys.</desc>
4629 </param>
4630 </method>
4631
4632 <method name="getExtraData">
4633 <desc>
4634 Returns associated machine-specific extra data.
4635
4636 If the requested data @a key does not exist, this function will
4637 succeed and return an empty string in the @a value argument.
4638
4639 <result name="VBOX_E_FILE_ERROR">
4640 Settings file not accessible.
4641 </result>
4642 <result name="VBOX_E_XML_ERROR">
4643 Could not parse the settings file.
4644 </result>
4645
4646 </desc>
4647 <param name="key" type="wstring" dir="in">
4648 <desc>Name of the data key to get.</desc>
4649 </param>
4650 <param name="value" type="wstring" dir="return">
4651 <desc>Value of the requested data key.</desc>
4652 </param>
4653 </method>
4654
4655 <method name="setExtraData">
4656 <desc>
4657 Sets associated machine-specific extra data.
4658
4659 If you pass @c null or an empty string as a key @a value, the given
4660 @a key will be deleted.
4661
4662 <note>
4663 Before performing the actual data change, this method will ask all
4664 registered listeners using the
4665 <link to="IExtraDataCanChangeEvent"/>
4666 notification for a permission. If one of the listeners refuses the
4667 new value, the change will not be performed.
4668 </note>
4669 <note>
4670 On success, the
4671 <link to="IExtraDataChangedEvent"/> notification
4672 is called to inform all registered listeners about a successful data
4673 change.
4674 </note>
4675 <note>
4676 This method can be called outside the machine session and therefore
4677 it's a caller's responsibility to handle possible race conditions
4678 when several clients change the same key at the same time.
4679 </note>
4680
4681 <result name="VBOX_E_FILE_ERROR">
4682 Settings file not accessible.
4683 </result>
4684 <result name="VBOX_E_XML_ERROR">
4685 Could not parse the settings file.
4686 </result>
4687
4688 </desc>
4689 <param name="key" type="wstring" dir="in">
4690 <desc>Name of the data key to set.</desc>
4691 </param>
4692 <param name="value" type="wstring" dir="in">
4693 <desc>Value to assign to the key.</desc>
4694 </param>
4695 </method>
4696
4697 <method name="getCPUProperty" const="yes">
4698 <desc>
4699 Returns the virtual CPU boolean value of the specified property.
4700
4701 <result name="E_INVALIDARG">
4702 Invalid property.
4703 </result>
4704
4705 </desc>
4706 <param name="property" type="CPUPropertyType" dir="in">
4707 <desc>
4708 Property type to query.
4709 </desc>
4710 </param>
4711 <param name="value" type="boolean" dir="return">
4712 <desc>
4713 Property value.
4714 </desc>
4715 </param>
4716 </method>
4717
4718 <method name="setCPUProperty">
4719 <desc>
4720 Sets the virtual CPU boolean value of the specified property.
4721
4722 <result name="E_INVALIDARG">
4723 Invalid property.
4724 </result>
4725
4726 </desc>
4727 <param name="property" type="CPUPropertyType" dir="in">
4728 <desc>
4729 Property type to query.
4730 </desc>
4731 </param>
4732 <param name="value" type="boolean" dir="in">
4733 <desc>
4734 Property value.
4735 </desc>
4736 </param>
4737 </method>
4738
4739 <method name="getCPUIDLeaf" const="yes">
4740 <desc>
4741 Returns the virtual CPU cpuid information for the specified leaf.
4742
4743 Currently supported index values for cpuid:
4744 Standard CPUID leafs: 0 - 0xA
4745 Extended CPUID leafs: 0x80000000 - 0x8000000A
4746
4747 See the Intel and AMD programmer's manuals for detailed information
4748 about the cpuid instruction and its leafs.
4749 <result name="E_INVALIDARG">
4750 Invalid id.
4751 </result>
4752
4753 </desc>
4754 <param name="id" type="unsigned long" dir="in">
4755 <desc>
4756 CPUID leaf index.
4757 </desc>
4758 </param>
4759 <param name="valEax" type="unsigned long" dir="out">
4760 <desc>
4761 CPUID leaf value for register eax.
4762 </desc>
4763 </param>
4764 <param name="valEbx" type="unsigned long" dir="out">
4765 <desc>
4766 CPUID leaf value for register ebx.
4767 </desc>
4768 </param>
4769 <param name="valEcx" type="unsigned long" dir="out">
4770 <desc>
4771 CPUID leaf value for register ecx.
4772 </desc>
4773 </param>
4774 <param name="valEdx" type="unsigned long" dir="out">
4775 <desc>
4776 CPUID leaf value for register edx.
4777 </desc>
4778 </param>
4779 </method>
4780
4781 <method name="setCPUIDLeaf">
4782 <desc>
4783 Sets the virtual CPU cpuid information for the specified leaf. Note that these values
4784 are not passed unmodified. VirtualBox clears features that it doesn't support.
4785
4786 Currently supported index values for cpuid:
4787 Standard CPUID leafs: 0 - 0xA
4788 Extended CPUID leafs: 0x80000000 - 0x8000000A
4789
4790 See the Intel and AMD programmer's manuals for detailed information
4791 about the cpuid instruction and its leafs.
4792
4793 Do not use this method unless you know exactly what you're doing. Misuse can lead to
4794 random crashes inside VMs.
4795 <result name="E_INVALIDARG">
4796 Invalid id.
4797 </result>
4798
4799 </desc>
4800 <param name="id" type="unsigned long" dir="in">
4801 <desc>
4802 CPUID leaf index.
4803 </desc>
4804 </param>
4805 <param name="valEax" type="unsigned long" dir="in">
4806 <desc>
4807 CPUID leaf value for register eax.
4808 </desc>
4809 </param>
4810 <param name="valEbx" type="unsigned long" dir="in">
4811 <desc>
4812 CPUID leaf value for register ebx.
4813 </desc>
4814 </param>
4815 <param name="valEcx" type="unsigned long" dir="in">
4816 <desc>
4817 CPUID leaf value for register ecx.
4818 </desc>
4819 </param>
4820 <param name="valEdx" type="unsigned long" dir="in">
4821 <desc>
4822 CPUID leaf value for register edx.
4823 </desc>
4824 </param>
4825 </method>
4826
4827 <method name="removeCPUIDLeaf">
4828 <desc>
4829 Removes the virtual CPU cpuid leaf for the specified index
4830
4831 <result name="E_INVALIDARG">
4832 Invalid id.
4833 </result>
4834
4835 </desc>
4836 <param name="id" type="unsigned long" dir="in">
4837 <desc>
4838 CPUID leaf index.
4839 </desc>
4840 </param>
4841 </method>
4842
4843 <method name="removeAllCPUIDLeaves">
4844 <desc>
4845 Removes all the virtual CPU cpuid leaves
4846 </desc>
4847 </method>
4848
4849 <method name="getHWVirtExProperty" const="yes">
4850 <desc>
4851 Returns the value of the specified hardware virtualization boolean property.
4852
4853 <result name="E_INVALIDARG">
4854 Invalid property.
4855 </result>
4856
4857 </desc>
4858 <param name="property" type="HWVirtExPropertyType" dir="in">
4859 <desc>
4860 Property type to query.
4861 </desc>
4862 </param>
4863 <param name="value" type="boolean" dir="return">
4864 <desc>
4865 Property value.
4866 </desc>
4867 </param>
4868 </method>
4869
4870 <method name="setHWVirtExProperty">
4871 <desc>
4872 Sets a new value for the specified hardware virtualization boolean property.
4873
4874 <result name="E_INVALIDARG">
4875 Invalid property.
4876 </result>
4877
4878 </desc>
4879 <param name="property" type="HWVirtExPropertyType" dir="in">
4880 <desc>
4881 Property type to set.
4882 </desc>
4883 </param>
4884 <param name="value" type="boolean" dir="in">
4885 <desc>
4886 New property value.
4887 </desc>
4888 </param>
4889 </method>
4890
4891 <method name="saveSettings">
4892 <desc>
4893 Saves any changes to machine settings made since the session
4894 has been opened or a new machine has been created, or since the
4895 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
4896 For registered machines, new settings become visible to all
4897 other VirtualBox clients after successful invocation of this
4898 method.
4899 <note>
4900 The method sends <link to="IMachineDataChangedEvent"/>
4901 notification event after the configuration has been successfully
4902 saved (only for registered machines).
4903 </note>
4904 <note>
4905 Calling this method is only valid on instances returned
4906 by <link to="ISession::machine"/> and on new machines
4907 created by <link to="IVirtualBox::createMachine"/> but not
4908 yet registered, or on unregistered machines after calling
4909 <link to="IMachine::unregister"/>.
4910 </note>
4911
4912 <result name="VBOX_E_FILE_ERROR">
4913 Settings file not accessible.
4914 </result>
4915 <result name="VBOX_E_XML_ERROR">
4916 Could not parse the settings file.
4917 </result>
4918 <result name="E_ACCESSDENIED">
4919 Modification request refused.
4920 </result>
4921
4922 </desc>
4923 </method>
4924
4925 <method name="discardSettings">
4926 <desc>
4927 Discards any changes to the machine settings made since the session
4928 has been opened or since the last call to <link to="#saveSettings"/>
4929 or <link to="#discardSettings"/>.
4930 <note>
4931 Calling this method is only valid on instances returned
4932 by <link to="ISession::machine"/> and on new machines
4933 created by <link to="IVirtualBox::createMachine"/> or
4934 opened by <link to="IVirtualBox::openMachine"/> but not
4935 yet registered, or on unregistered machines after calling
4936 <link to="IMachine::unregister"/>.
4937 </note>
4938
4939 <result name="VBOX_E_INVALID_VM_STATE">
4940 Virtual machine is not mutable.
4941 </result>
4942
4943 </desc>
4944 </method>
4945
4946 <method name="unregister">
4947 <desc>
4948 Unregisters the machine, which must have been previously registered using
4949 <link to="IVirtualBox::registerMachine"/>, and optionally do additional
4950 cleanup before the machine is unregistered.
4951
4952 This method does not delete any files. It only changes the machine configuration and
4953 the list of registered machines in the VirtualBox object. To delete the files which
4954 belonged to the machine, including the XML file of the machine itself, call
4955 <link to="#delete"/>, optionally with the array of IMedium objects which was returned
4956 from this method.
4957
4958 How thoroughly this method cleans up the machine configuration before unregistering
4959 the machine depends on the @a cleanupMode argument.
4960
4961 <ul>
4962 <li>With "UnregisterOnly", the machine will only be unregistered, but no additional
4963 cleanup will be performed. The call will fail if the machine is in "Saved" state
4964 or has any snapshots or any media attached (see <link to="IMediumAttachment" />.
4965 It is the responsibility of the caller to delete all such configuration in this mode.
4966 In this mode, the API behaves like the former @c IVirtualBox::unregisterMachine() API
4967 which it replaces.</li>
4968 <li>With "DetachAllReturnNone", the call will succeed even if the machine is in "Saved"
4969 state or if it has snapshots or media attached. All media attached to the current machine
4970 state or in snapshots will be detached. No medium objects will be returned; all of the
4971 machine's media will remain open.</li>
4972 <li>With "DetachAllReturnHardDisksOnly", the call will behave like with "DetachAllReturnNone",
4973 except that all the hard disk medium objects which were detached from the machine will
4974 be returned as an array. This allows for quickly passing them to the <link to="#delete" />
4975 API for closing and deletion.</li>
4976 <li>With "Full", the call will behave like with "DetachAllReturnHardDisksOnly", except
4977 that all media will be returned in the array, including removeable media like DVDs and
4978 floppies. This might be useful if the user wants to inspect in detail which media were
4979 attached to the machine. Be careful when passing the media array to <link to="#delete" />
4980 in that case because users will typically want to preserve ISO and RAW image files.</li>
4981 </ul>
4982
4983 This API does not verify whether the media files returned in the array are still
4984 attached to other machines (i.e. shared between several machines). If such a shared
4985 image is passed to <link to="#delete" /> however, closing the image will fail there
4986 and the image will be silently skipped.
4987
4988 A typical implementation will use "DetachAllReturnHardDisksOnly" and then pass the
4989 resulting IMedia array to <link to="#delete"/>. This way, the machine is completely
4990 deleted with all its saved states and hard disk images, but images for removeable
4991 drives (such as ISO and RAW files) will remain on disk.
4992
4993 The call will fail if the machine is currently locked (see <link to="ISession" />).
4994 It implicitly calls <link to="#saveSettings"/> to save all current machine settings
4995 before unregistering it.
4996
4997 After successful method invocation, the <link to="IMachineRegisteredEvent"/> event
4998 is fired.
4999
5000 <note>
5001 If the given machine is inaccessible (see <link to="#accessible"/>), it
5002 will be unregistered and fully uninitialized right afterwards. As a result,
5003 the returned machine object will be unusable and an attempt to call
5004 <b>any</b> method will return the "Object not ready" error.
5005 </note>
5006
5007 <result name="VBOX_E_INVALID_OBJECT_STATE">
5008 Machine is currently locked for a session.
5009 </result>
5010 </desc>
5011
5012 <param name="cleanupMode" type="CleanupMode" dir="in">
5013 <desc>How to clean up after the machine has been unregistered.</desc>
5014 </param>
5015 <param name="aMedia" type="IMedium" safearray="yes" dir="return">
5016 <desc>List of media detached from the machine, depending on the @a cleanupMode parameter.</desc>
5017 </param>
5018 </method>
5019
5020 <method name="delete">
5021 <desc>
5022 Deletes the files associated with this machine from disk. If medium objects are passed
5023 in with the @a aMedia argument, they are closed and, if closing was succesful, their
5024 storage files are deleted as well. For convenience, this array of media files can be
5025 the same as the one returned from a previous <link to="#unregister" /> call.
5026
5027 This method must only be called on machines which are either write-locked (i.e. on instances
5028 returned by <link to="ISession::machine"/>) or on unregistered machines (i.e. not yet
5029 registered machines created by <link to="IVirtualBox::createMachine"/> or opened by
5030 <link to="IVirtualBox::openMachine"/>, or after having called <link to="#unregister"/>).
5031
5032 The following files will be deleted by this method:
5033 <ul>
5034 <li>If <link to="#unregister" /> had been previously called with a @a cleanupMode
5035 argument other than "UnregisterOnly", this will delete all saved state files that
5036 the machine had in use; possibly one if the machine was in "Saved" state and one
5037 for each online snapshot that the machine had.</li>
5038 <li>On each medium object passed in the @a aMedia array, this will call
5039 <link to="IMedium::close" />. If that succeeds, this will attempt to delete the
5040 medium's storage on disk. Since the close() call will fail if the medium is still
5041 in use, e.g. because it is still attached to a second machine; in that case the
5042 storage will not be deleted.</li>
5043 <li>Finally, the machine's own XML file will be deleted.</li>
5044 </ul>
5045
5046 Since deleting large disk image files can be a time-consuming I/O operation, this
5047 method operates asynchronously and returns an IProgress object to allow the caller
5048 to monitor the progress. There will be one sub-operation for each file that is
5049 being deleted (saved state or medium storage file).
5050
5051 <note>
5052 <link to="#settingsModified"/> will return @c true after this
5053 method successfully returns.
5054 </note>
5055
5056 <result name="VBOX_E_INVALID_VM_STATE">
5057 Machine is registered but not write-locked.
5058 </result>
5059 <result name="VBOX_E_IPRT_ERROR">
5060 Could not delete the settings file.
5061 </result>
5062 </desc>
5063 <param name="aMedia" type="IMedium" safearray="yes" dir="in">
5064 <desc>List of media to be closed and whose storage files will be deleted.</desc>
5065 </param>
5066 <param name="aProgress" type="IProgress" dir="return">
5067 <desc>Progress object to track the operation completion.</desc>
5068 </param>
5069 </method>
5070
5071 <method name="export">
5072 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5073 steps required to export VirtualBox machines to OVF.
5074 </desc>
5075
5076 <param name="aAppliance" type="IAppliance" dir="in">
5077 <desc>Appliance to export this machine to.</desc>
5078 </param>
5079 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5080 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5081 </param>
5082 </method >
5083
5084 <method name="getSnapshot">
5085 <desc>
5086 Returns a snapshot of this machine with the given UUID.
5087 A @c null UUID can be used to obtain the first snapshot
5088 taken on this machine. This is useful if you want to traverse
5089 the whole tree of snapshots starting from the root.
5090
5091 <result name="VBOX_E_OBJECT_NOT_FOUND">
5092 Virtual machine has no snapshots or snapshot not found.
5093 </result>
5094
5095 </desc>
5096 <param name="id" type="uuid" mod="string" dir="in">
5097 <desc>UUID of the snapshot to get</desc>
5098 </param>
5099 <param name="snapshot" type="ISnapshot" dir="return">
5100 <desc>Snapshot object with the given UUID.</desc>
5101 </param>
5102 </method>
5103
5104 <method name="findSnapshot">
5105 <desc>
5106 Returns a snapshot of this machine with the given name.
5107
5108 <result name="VBOX_E_OBJECT_NOT_FOUND">
5109 Virtual machine has no snapshots or snapshot not found.
5110 </result>
5111
5112 </desc>
5113 <param name="name" type="wstring" dir="in">
5114 <desc>Name of the snapshot to find</desc>
5115 </param>
5116 <param name="snapshot" type="ISnapshot" dir="return">
5117 <desc>Snapshot object with the given name.</desc>
5118 </param>
5119 </method>
5120
5121 <method name="setCurrentSnapshot">
5122 <desc>
5123 Sets the current snapshot of this machine.
5124 <note>
5125 In the current implementation, this operation is not
5126 implemented.
5127 </note>
5128 </desc>
5129 <param name="id" type="uuid" mod="string" dir="in">
5130 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5131 </param>
5132 </method>
5133
5134 <method name="createSharedFolder">
5135 <desc>
5136 Creates a new permanent shared folder by associating the given logical
5137 name with the given host path, adds it to the collection of shared
5138 folders and starts sharing it. Refer to the description of
5139 <link to="ISharedFolder"/> to read more about logical names.
5140
5141 <result name="VBOX_E_OBJECT_IN_USE">
5142 Shared folder already exists.
5143 </result>
5144 <result name="VBOX_E_FILE_ERROR">
5145 Shared folder @a hostPath not accessible.
5146 </result>
5147
5148 </desc>
5149 <param name="name" type="wstring" dir="in">
5150 <desc>Unique logical name of the shared folder.</desc>
5151 </param>
5152 <param name="hostPath" type="wstring" dir="in">
5153 <desc>Full path to the shared folder in the host file system.</desc>
5154 </param>
5155 <param name="writable" type="boolean" dir="in">
5156 <desc>Whether the share is writable or readonly.</desc>
5157 </param>
5158 <param name="automount" type="boolean" dir="in">
5159 <desc>Whether the share gets automatically mounted by the guest
5160 or not.</desc>
5161 </param>
5162 </method>
5163
5164 <method name="removeSharedFolder">
5165 <desc>
5166 Removes the permanent shared folder with the given name previously
5167 created by <link to="#createSharedFolder"/> from the collection of
5168 shared folders and stops sharing it.
5169
5170 <result name="VBOX_E_INVALID_VM_STATE">
5171 Virtual machine is not mutable.
5172 </result>
5173 <result name="VBOX_E_OBJECT_NOT_FOUND">
5174 Shared folder @a name does not exist.
5175 </result>
5176
5177 </desc>
5178 <param name="name" type="wstring" dir="in">
5179 <desc>Logical name of the shared folder to remove.</desc>
5180 </param>
5181 </method>
5182
5183 <method name="canShowConsoleWindow">
5184 <desc>
5185 Returns @c true if the VM console process can activate the
5186 console window and bring it to foreground on the desktop of
5187 the host PC.
5188 <note>
5189 This method will fail if a session for this machine is not
5190 currently open.
5191 </note>
5192
5193 <result name="VBOX_E_INVALID_VM_STATE">
5194 Machine session is not open.
5195 </result>
5196
5197 </desc>
5198 <param name="canShow" type="boolean" dir="return">
5199 <desc>
5200 @c true if the console window can be shown and @c false otherwise.
5201 </desc>
5202 </param>
5203 </method>
5204
5205 <method name="showConsoleWindow">
5206 <desc>
5207 Activates the console window and brings it to foreground on
5208 the desktop of the host PC. Many modern window managers on
5209 many platforms implement some sort of focus stealing
5210 prevention logic, so that it may be impossible to activate
5211 a window without the help of the currently active
5212 application. In this case, this method will return a non-zero
5213 identifier that represents the top-level window of the VM
5214 console process. The caller, if it represents a currently
5215 active process, is responsible to use this identifier (in a
5216 platform-dependent manner) to perform actual window
5217 activation.
5218 <note>
5219 This method will fail if a session for this machine is not
5220 currently open.
5221 </note>
5222
5223 <result name="VBOX_E_INVALID_VM_STATE">
5224 Machine session is not open.
5225 </result>
5226
5227 </desc>
5228 <param name="winId" type="unsigned long long" dir="return">
5229 <desc>
5230 Platform-dependent identifier of the top-level VM console
5231 window, or zero if this method has performed all actions
5232 necessary to implement the <i>show window</i> semantics for
5233 the given platform and/or VirtualBox front-end.
5234 </desc>
5235 </param>
5236 </method>
5237
5238 <method name="getGuestProperty" const="yes">
5239 <desc>
5240 Reads an entry from the machine's guest property store.
5241
5242 <result name="VBOX_E_INVALID_VM_STATE">
5243 Machine session is not open.
5244 </result>
5245
5246 </desc>
5247 <param name="name" type="wstring" dir="in">
5248 <desc>
5249 The name of the property to read.
5250 </desc>
5251 </param>
5252 <param name="value" type="wstring" dir="out">
5253 <desc>
5254 The value of the property. If the property does not exist then this
5255 will be empty.
5256 </desc>
5257 </param>
5258 <param name="timestamp" type="unsigned long long" dir="out">
5259 <desc>
5260 The time at which the property was last modified, as seen by the
5261 server process.
5262 </desc>
5263 </param>
5264 <param name="flags" type="wstring" dir="out">
5265 <desc>
5266 Additional property parameters, passed as a comma-separated list of
5267 "name=value" type entries.
5268 </desc>
5269 </param>
5270 </method>
5271
5272 <method name="getGuestPropertyValue" const="yes">
5273 <desc>
5274 Reads a value from the machine's guest property store.
5275
5276 <result name="VBOX_E_INVALID_VM_STATE">
5277 Machine session is not open.
5278 </result>
5279
5280 </desc>
5281 <param name="property" type="wstring" dir="in">
5282 <desc>
5283 The name of the property to read.
5284 </desc>
5285 </param>
5286 <param name="value" type="wstring" dir="return">
5287 <desc>
5288 The value of the property. If the property does not exist then this
5289 will be empty.
5290 </desc>
5291 </param>
5292 </method>
5293
5294 <method name="getGuestPropertyTimestamp" const="yes">
5295 <desc>
5296 Reads a property timestamp from the machine's guest property store.
5297
5298 <result name="VBOX_E_INVALID_VM_STATE">
5299 Machine session is not open.
5300 </result>
5301
5302 </desc>
5303 <param name="property" type="wstring" dir="in">
5304 <desc>
5305 The name of the property to read.
5306 </desc>
5307 </param>
5308 <param name="value" type="unsigned long long" dir="return">
5309 <desc>
5310 The timestamp. If the property does not exist then this will be
5311 empty.
5312 </desc>
5313 </param>
5314 </method>
5315
5316 <method name="setGuestProperty">
5317 <desc>
5318 Sets, changes or deletes an entry in the machine's guest property
5319 store.
5320
5321 <result name="E_ACCESSDENIED">
5322 Property cannot be changed.
5323 </result>
5324 <result name="E_INVALIDARG">
5325 Invalid @a flags.
5326 </result>
5327 <result name="VBOX_E_INVALID_VM_STATE">
5328 Virtual machine is not mutable or session not open.
5329 </result>
5330 <result name="VBOX_E_INVALID_OBJECT_STATE">
5331 Cannot set transient property when machine not running.
5332 </result>
5333
5334 </desc>
5335 <param name="property" type="wstring" dir="in">
5336 <desc>
5337 The name of the property to set, change or delete.
5338 </desc>
5339 </param>
5340 <param name="value" type="wstring" dir="in">
5341 <desc>
5342 The new value of the property to set, change or delete. If the
5343 property does not yet exist and value is non-empty, it will be
5344 created. If the value is @c null or empty, the property will be
5345 deleted if it exists.
5346 </desc>
5347 </param>
5348 <param name="flags" type="wstring" dir="in">
5349 <desc>
5350 Additional property parameters, passed as a comma-separated list of
5351 "name=value" type entries.
5352 </desc>
5353 </param>
5354 </method>
5355
5356 <method name="setGuestPropertyValue">
5357 <desc>
5358 Sets, changes or deletes a value in the machine's guest property
5359 store. The flags field will be left unchanged or created empty for a
5360 new property.
5361
5362 <result name="E_ACCESSDENIED">
5363 Property cannot be changed.
5364 </result>
5365 <result name="VBOX_E_INVALID_VM_STATE">
5366 Virtual machine is not mutable or session not open.
5367 </result>
5368 <result name="VBOX_E_INVALID_OBJECT_STATE">
5369 Cannot set transient property when machine not running.
5370 </result>
5371 </desc>
5372
5373 <param name="property" type="wstring" dir="in">
5374 <desc>
5375 The name of the property to set, change or delete.
5376 </desc>
5377 </param>
5378 <param name="value" type="wstring" dir="in">
5379 <desc>
5380 The new value of the property to set, change or delete. If the
5381 property does not yet exist and value is non-empty, it will be
5382 created. If the value is @c null or empty, the property will be
5383 deleted if it exists.
5384 </desc>
5385 </param>
5386 </method>
5387
5388 <method name="enumerateGuestProperties">
5389 <desc>
5390 Return a list of the guest properties matching a set of patterns along
5391 with their values, time stamps and flags.
5392 </desc>
5393 <param name="patterns" type="wstring" dir="in">
5394 <desc>
5395 The patterns to match the properties against, separated by '|'
5396 characters. If this is empty or @c null, all properties will match.
5397 </desc>
5398 </param>
5399 <param name="name" type="wstring" dir="out" safearray="yes">
5400 <desc>
5401 The names of the properties returned.
5402 </desc>
5403 </param>
5404 <param name="value" type="wstring" dir="out" safearray="yes">
5405 <desc>
5406 The values of the properties returned. The array entries match the
5407 corresponding entries in the @a name array.
5408 </desc>
5409 </param>
5410 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5411 <desc>
5412 The time stamps of the properties returned. The array entries match
5413 the corresponding entries in the @a name array.
5414 </desc>
5415 </param>
5416 <param name="flags" type="wstring" dir="out" safearray="yes">
5417 <desc>
5418 The flags of the properties returned. The array entries match the
5419 corresponding entries in the @a name array.
5420 </desc>
5421 </param>
5422 </method>
5423
5424 <method name="querySavedThumbnailSize">
5425 <desc>
5426 Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.
5427 </desc>
5428 <param name="screenId" type="unsigned long" dir="in">
5429 <desc>
5430 Saved guest screen to query info from.
5431 </desc>
5432 </param>
5433 <param name="size" type="unsigned long" dir="out">
5434 <desc>
5435 Size of buffer required to store the bitmap.
5436 </desc>
5437 </param>
5438 <param name="width" type="unsigned long" dir="out">
5439 <desc>
5440 Bitmap width.
5441 </desc>
5442 </param>
5443 <param name="height" type="unsigned long" dir="out">
5444 <desc>
5445 Bitmap height.
5446 </desc>
5447 </param>
5448 </method>
5449
5450 <method name="readSavedThumbnailToArray">
5451 <desc>
5452 Thumbnail is retrieved to an array of bytes in uncompressed 32-bit BGRA or RGBA format.
5453 </desc>
5454 <param name="screenId" type="unsigned long" dir="in">
5455 <desc>
5456 Saved guest screen to read from.
5457 </desc>
5458 </param>
5459 <param name="BGR" type="boolean" dir="in">
5460 <desc>
5461 How to order bytes in the pixel. A pixel consists of 4 bytes. If this parameter is true, then
5462 bytes order is: B, G, R, 0xFF. If this parameter is false, then bytes order is: R, G, B, 0xFF.
5463 </desc>
5464 </param>
5465 <param name="width" type="unsigned long" dir="out">
5466 <desc>
5467 Bitmap width.
5468 </desc>
5469 </param>
5470 <param name="height" type="unsigned long" dir="out">
5471 <desc>
5472 Bitmap height.
5473 </desc>
5474 </param>
5475 <param name="data" type="octet" dir="return" safearray="yes">
5476 <desc>
5477 Array with resulting bitmap data.
5478 </desc>
5479 </param>
5480 </method>
5481
5482 <method name="querySavedScreenshotPNGSize">
5483 <desc>
5484 Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.
5485 </desc>
5486 <param name="screenId" type="unsigned long" dir="in">
5487 <desc>
5488 Saved guest screen to query info from.
5489 </desc>
5490 </param>
5491 <param name="size" type="unsigned long" dir="out">
5492 <desc>
5493 Size of buffer required to store the PNG binary data.
5494 </desc>
5495 </param>
5496 <param name="width" type="unsigned long" dir="out">
5497 <desc>
5498 Image width.
5499 </desc>
5500 </param>
5501 <param name="height" type="unsigned long" dir="out">
5502 <desc>
5503 Image height.
5504 </desc>
5505 </param>
5506 </method>
5507
5508 <method name="readSavedScreenshotPNGToArray">
5509 <desc>
5510 Screenshot in PNG format is retrieved to an array of bytes.
5511 </desc>
5512 <param name="screenId" type="unsigned long" dir="in">
5513 <desc>
5514 Saved guest screen to read from.
5515 </desc>
5516 </param>
5517 <param name="width" type="unsigned long" dir="out">
5518 <desc>
5519 Image width.
5520 </desc>
5521 </param>
5522 <param name="height" type="unsigned long" dir="out">
5523 <desc>
5524 Image height.
5525 </desc>
5526 </param>
5527 <param name="data" type="octet" dir="return" safearray="yes">
5528 <desc>
5529 Array with resulting PNG data.
5530 </desc>
5531 </param>
5532 </method>
5533
5534 <method name="hotPlugCPU">
5535 <desc>
5536 Plugs a CPU into the machine.
5537 </desc>
5538 <param name="cpu" type="unsigned long" dir="in">
5539 <desc>
5540 The CPU id to insert.
5541 </desc>
5542 </param>
5543 </method>
5544
5545 <method name="hotUnplugCPU">
5546 <desc>
5547 Removes a CPU from the machine.
5548 </desc>
5549 <param name="cpu" type="unsigned long" dir="in">
5550 <desc>
5551 The CPU id to remove.
5552 </desc>
5553 </param>
5554 </method>
5555
5556 <method name="getCPUStatus">
5557 <desc>
5558 Returns the current status of the given CPU.
5559 </desc>
5560 <param name="cpu" type="unsigned long" dir="in">
5561 <desc>
5562 The CPU id to check for.
5563 </desc>
5564 </param>
5565 <param name="attached" type="boolean" dir="return">
5566 <desc>
5567 Status of the CPU.
5568 </desc>
5569 </param>
5570 </method>
5571
5572 <method name="queryLogFilename">
5573 <desc>
5574 Queries for the VM log file name of an given index. Returns an empty
5575 string if a log file with that index doesn't exists.
5576 </desc>
5577 <param name="idx" type="unsigned long" dir="in">
5578 <desc>
5579 Which log file name to query. 0=current log file.
5580 </desc>
5581 </param>
5582 <param name="filename" type="wstring" dir="return">
5583 <desc>
5584 On return the full path to the log file or an empty string on error.
5585 </desc>
5586 </param>
5587 </method>
5588
5589 <method name="readLog">
5590 <desc>
5591 Reads the VM log file. The chunk size is limited, so even if you
5592 ask for a big piece there might be less data returned.
5593 </desc>
5594 <param name="idx" type="unsigned long" dir="in">
5595 <desc>
5596 Which log file to read. 0=current log file.
5597 </desc>
5598 </param>
5599 <param name="offset" type="unsigned long long" dir="in">
5600 <desc>
5601 Offset in the log file.
5602 </desc>
5603 </param>
5604 <param name="size" type="unsigned long long" dir="in">
5605 <desc>
5606 Chunk size to read in the log file.
5607 </desc>
5608 </param>
5609 <param name="data" type="octet" dir="return" safearray="yes">
5610 <desc>
5611 Data read from the log file. A data size of 0 means end of file
5612 if the requested chunk size was not 0. This is the unprocessed
5613 file data, i.e. the line ending style depends on the platform of
5614 the system the server is running on.
5615 </desc>
5616 </param>
5617 </method>
5618 </interface>
5619
5620 <!--
5621 // IConsole
5622 /////////////////////////////////////////////////////////////////////////
5623 -->
5624
5625 <interface
5626 name="IRemoteDisplayInfo" extends="$unknown"
5627 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
5628 wsmap="struct"
5629 >
5630 <desc>
5631 Contains information about the remote display (VRDP) capabilities and status.
5632 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5633 </desc>
5634
5635 <attribute name="active" type="boolean" readonly="yes">
5636 <desc>
5637 Whether the remote display connection is active.
5638 </desc>
5639 </attribute>
5640
5641 <attribute name="port" type="long" readonly="yes">
5642 <desc>
5643 VRDP server port number. If this property is equal to <tt>0</tt>, then
5644 the VRDP server failed to start, usually because there are no free TCP
5645 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
5646 server has not yet been started.
5647 </desc>
5648 </attribute>
5649
5650 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5651 <desc>
5652 How many times a client connected.
5653 </desc>
5654 </attribute>
5655
5656 <attribute name="beginTime" type="long long" readonly="yes">
5657 <desc>
5658 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5659 </desc>
5660 </attribute>
5661
5662 <attribute name="endTime" type="long long" readonly="yes">
5663 <desc>
5664 When the last connection was terminated or the current time, if
5665 connection is still active, in milliseconds since 1970-01-01 UTC.
5666 </desc>
5667 </attribute>
5668
5669 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5670 <desc>
5671 How many bytes were sent in last or current, if still active, connection.
5672 </desc>
5673 </attribute>
5674
5675 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5676 <desc>
5677 How many bytes were sent in all connections.
5678 </desc>
5679 </attribute>
5680
5681 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5682 <desc>
5683 How many bytes were received in last or current, if still active, connection.
5684 </desc>
5685 </attribute>
5686
5687 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5688 <desc>
5689 How many bytes were received in all connections.
5690 </desc>
5691 </attribute>
5692
5693 <attribute name="user" type="wstring" readonly="yes">
5694 <desc>
5695 Login user name supplied by the client.
5696 </desc>
5697 </attribute>
5698
5699 <attribute name="domain" type="wstring" readonly="yes">
5700 <desc>
5701 Login domain name supplied by the client.
5702 </desc>
5703 </attribute>
5704
5705 <attribute name="clientName" type="wstring" readonly="yes">
5706 <desc>
5707 The client name supplied by the client.
5708 </desc>
5709 </attribute>
5710
5711 <attribute name="clientIP" type="wstring" readonly="yes">
5712 <desc>
5713 The IP address of the client.
5714 </desc>
5715 </attribute>
5716
5717 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5718 <desc>
5719 The client software version number.
5720 </desc>
5721 </attribute>
5722
5723 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5724 <desc>
5725 Public key exchange method used when connection was established.
5726 Values: 0 - RDP4 public key exchange scheme.
5727 1 - X509 certificates were sent to client.
5728 </desc>
5729 </attribute>
5730
5731 </interface>
5732
5733 <interface
5734 name="IConsole" extends="$unknown"
5735 uuid="03cb7897-ea17-4e6c-81ae-4bd90be2fde2"
5736 wsmap="managed"
5737 >
5738 <desc>
5739 The IConsole interface represents an interface to control virtual
5740 machine execution.
5741
5742 A console object gets created when a machine has been locked for a
5743 particular session (client process) using <link to="IMachine::lockMachine" />
5744 or <link to="IMachine::launchVMProcess"/>. The console object can
5745 then be found in the session's <link to="ISession::console" /> attribute.
5746
5747 Methods of the IConsole interface allow the caller to query the current
5748 virtual machine execution state, pause the machine or power it down, save
5749 the machine state or take a snapshot, attach and detach removable media
5750 and so on.
5751
5752 <see>ISession</see>
5753 </desc>
5754
5755 <attribute name="machine" type="IMachine" readonly="yes">
5756 <desc>
5757 Machine object this console is sessioned with.
5758 <note>
5759 This is a convenience property, it has the same value as
5760 <link to="ISession::machine"/> of the corresponding session
5761 object.
5762 </note>
5763 </desc>
5764 </attribute>
5765
5766 <attribute name="state" type="MachineState" readonly="yes">
5767 <desc>
5768 Current execution state of the machine.
5769 <note>
5770 This property always returns the same value as the corresponding
5771 property of the IMachine object this console is sessioned with.
5772 For the process that owns (executes) the VM, this is the
5773 preferable way of querying the VM state, because no IPC
5774 calls are made.
5775 </note>
5776 </desc>
5777 </attribute>
5778
5779 <attribute name="guest" type="IGuest" readonly="yes">
5780 <desc>Guest object.</desc>
5781 </attribute>
5782
5783 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5784 <desc>
5785 Virtual keyboard object.
5786 <note>
5787 If the machine is not running, any attempt to use
5788 the returned object will result in an error.
5789 </note>
5790 </desc>
5791 </attribute>
5792
5793 <attribute name="mouse" type="IMouse" readonly="yes">
5794 <desc>
5795 Virtual mouse object.
5796 <note>
5797 If the machine is not running, any attempt to use
5798 the returned object will result in an error.
5799 </note>
5800 </desc>
5801 </attribute>
5802
5803 <attribute name="display" type="IDisplay" readonly="yes">
5804 <desc>Virtual display object.
5805 <note>
5806 If the machine is not running, any attempt to use
5807 the returned object will result in an error.
5808 </note>
5809 </desc>
5810 </attribute>
5811
5812 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5813 <desc>Debugging interface.</desc>
5814 </attribute>
5815
5816 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
5817 <desc>
5818 Collection of USB devices currently attached to the virtual
5819 USB controller.
5820 <note>
5821 The collection is empty if the machine is not running.
5822 </note>
5823 </desc>
5824 </attribute>
5825
5826 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
5827 <desc>
5828 List of USB devices currently attached to the remote VRDP client.
5829 Once a new device is physically attached to the remote host computer,
5830 it appears in this list and remains there until detached.
5831 </desc>
5832 </attribute>
5833
5834 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
5835 <desc>
5836 Collection of shared folders for the current session. These folders
5837 are called transient shared folders because they are available to the
5838 guest OS running inside the associated virtual machine only for the
5839 duration of the session (as opposed to
5840 <link to="IMachine::sharedFolders"/> which represent permanent shared
5841 folders). When the session is closed (e.g. the machine is powered down),
5842 these folders are automatically discarded.
5843
5844 New shared folders are added to the collection using
5845 <link to="#createSharedFolder"/>. Existing shared folders can be
5846 removed using <link to="#removeSharedFolder"/>.
5847 </desc>
5848 </attribute>
5849
5850 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5851 <desc>
5852 Interface that provides information on Remote Display (VRDP) connection.
5853 </desc>
5854 </attribute>
5855
5856 <attribute name="eventSource" type="IEventSource" readonly="yes">
5857 <desc>
5858 Event source for console events.
5859 </desc>
5860 </attribute>
5861
5862 <method name="powerUp">
5863 <desc>
5864 Starts the virtual machine execution using the current machine
5865 state (that is, its current execution state, current settings and
5866 current storage devices).
5867
5868 <note>
5869 This method is only useful for front-ends that want to actually
5870 execute virtual machines in their own process (like the VirtualBox
5871 or VBoxSDL front-ends). Unless you are intending to write such a
5872 front-end, do not call this method. If you simply want to
5873 start virtual machine execution using one of the existing front-ends
5874 (for example the VirtualBox GUI or headless server), use
5875 <link to="IMachine::launchVMProcess"/> instead; these
5876 front-ends will power up the machine automatically for you.
5877 </note>
5878
5879 If the machine is powered off or aborted, the execution will
5880 start from the beginning (as if the real hardware were just
5881 powered on).
5882
5883 If the machine is in the <link to="MachineState_Saved"/> state,
5884 it will continue its execution the point where the state has
5885 been saved.
5886
5887 If the machine <link to="IMachine::teleporterEnabled"/> property is
5888 enabled on the machine being powered up, the machine will wait for an
5889 incoming teleportation in the <link to="MachineState_TeleportingIn"/>
5890 state. The returned progress object will have at least three
5891 operations where the last three are defined as: (1) powering up and
5892 starting TCP server, (2) waiting for incoming teleportations, and
5893 (3) perform teleportation. These operations will be reflected as the
5894 last three operations of the progress objected returned by
5895 <link to="IMachine::launchVMProcess"/> as well.
5896
5897 <see>#saveState</see>
5898
5899 <result name="VBOX_E_INVALID_VM_STATE">
5900 Virtual machine already running.
5901 </result>
5902 <result name="VBOX_E_HOST_ERROR">
5903 Host interface does not exist or name not set.
5904 </result>
5905 <result name="VBOX_E_FILE_ERROR">
5906 Invalid saved state file.
5907 </result>
5908 </desc>
5909 <param name="progress" type="IProgress" dir="return">
5910 <desc>Progress object to track the operation completion.</desc>
5911 </param>
5912 </method>
5913
5914 <method name="powerUpPaused">
5915 <desc>
5916 Identical to powerUp except that the VM will enter the
5917 <link to="MachineState_Paused"/> state, instead of
5918 <link to="MachineState_Running"/>.
5919
5920 <see>#powerUp</see>
5921 <result name="VBOX_E_INVALID_VM_STATE">
5922 Virtual machine already running.
5923 </result>
5924 <result name="VBOX_E_HOST_ERROR">
5925 Host interface does not exist or name not set.
5926 </result>
5927 <result name="VBOX_E_FILE_ERROR">
5928 Invalid saved state file.
5929 </result>
5930 </desc>
5931 <param name="progress" type="IProgress" dir="return">
5932 <desc>Progress object to track the operation completion.</desc>
5933 </param>
5934 </method>
5935
5936 <method name="powerDown">
5937 <desc>
5938 Initiates the power down procedure to stop the virtual machine
5939 execution.
5940
5941 The completion of the power down procedure is tracked using the returned
5942 IProgress object. After the operation is complete, the machine will go
5943 to the PoweredOff state.
5944 <result name="VBOX_E_INVALID_VM_STATE">
5945 Virtual machine must be Running, Paused or Stuck to be powered down.
5946 </result>
5947 </desc>
5948 <param name="progress" type="IProgress" dir="return">
5949 <desc>Progress object to track the operation completion.</desc>
5950 </param>
5951 </method>
5952
5953 <method name="reset">
5954 <desc>Resets the virtual machine.
5955 <result name="VBOX_E_INVALID_VM_STATE">
5956 Virtual machine not in Running state.
5957 </result>
5958 <result name="VBOX_E_VM_ERROR">
5959 Virtual machine error in reset operation.
5960 </result>
5961 </desc>
5962 </method>
5963
5964 <method name="pause">
5965 <desc>Pauses the virtual machine execution.
5966 <result name="VBOX_E_INVALID_VM_STATE">
5967 Virtual machine not in Running state.
5968 </result>
5969 <result name="VBOX_E_VM_ERROR">
5970 Virtual machine error in suspend operation.
5971 </result>
5972 </desc>
5973 </method>
5974
5975 <method name="resume">
5976 <desc>Resumes the virtual machine execution.
5977 <result name="VBOX_E_INVALID_VM_STATE">
5978 Virtual machine not in Paused state.
5979 </result>
5980 <result name="VBOX_E_VM_ERROR">
5981 Virtual machine error in resume operation.
5982 </result>
5983 </desc>
5984 </method>
5985
5986 <method name="powerButton">
5987 <desc>Sends the ACPI power button event to the guest.
5988 <result name="VBOX_E_INVALID_VM_STATE">
5989 Virtual machine not in Running state.
5990 </result>
5991 <result name="VBOX_E_PDM_ERROR">
5992 Controlled power off failed.
5993 </result>
5994 </desc>
5995 </method>
5996
5997 <method name="sleepButton">
5998 <desc>Sends the ACPI sleep button event to the guest.
5999 <result name="VBOX_E_INVALID_VM_STATE">
6000 Virtual machine not in Running state.
6001 </result>
6002 <result name="VBOX_E_PDM_ERROR">
6003 Sending sleep button event failed.
6004 </result>
6005 </desc>
6006 </method>
6007
6008 <method name="getPowerButtonHandled">
6009 <desc>Checks if the last power button event was handled by guest.
6010 <result name="VBOX_E_PDM_ERROR">
6011 Checking if the event was handled by the guest OS failed.
6012 </result>
6013 </desc>
6014 <param name="handled" type="boolean" dir="return"/>
6015 </method>
6016
6017 <method name="getGuestEnteredACPIMode">
6018 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6019 G1 (sleeping). If this method returns @c false, the guest will
6020 most likely not respond to external ACPI events.
6021 <result name="VBOX_E_INVALID_VM_STATE">
6022 Virtual machine not in Running state.
6023 </result>
6024 </desc>
6025 <param name="entered" type="boolean" dir="return"/>
6026 </method>
6027
6028 <method name="saveState">
6029 <desc>
6030 Saves the current execution state of a running virtual machine
6031 and stops its execution.
6032
6033 After this operation completes, the machine will go to the
6034 Saved state. Next time it is powered up, this state will
6035 be restored and the machine will continue its execution from
6036 the place where it was saved.
6037
6038 This operation differs from taking a snapshot to the effect
6039 that it doesn't create new differencing media. Also, once
6040 the machine is powered up from the state saved using this method,
6041 the saved state is deleted, so it will be impossible to return
6042 to this state later.
6043
6044 <note>
6045 On success, this method implicitly calls
6046 <link to="IMachine::saveSettings"/> to save all current machine
6047 settings (including runtime changes to the DVD medium, etc.).
6048 Together with the impossibility to change any VM settings when it is
6049 in the Saved state, this guarantees adequate hardware
6050 configuration of the machine when it is restored from the saved
6051 state file.
6052 </note>
6053
6054 <note>
6055 The machine must be in the Running or Paused state, otherwise
6056 the operation will fail.
6057 </note>
6058 <result name="VBOX_E_INVALID_VM_STATE">
6059 Virtual machine state neither Running nor Paused.
6060 </result>
6061 <result name="VBOX_E_FILE_ERROR">
6062 Failed to create directory for saved state file.
6063 </result>
6064
6065 <see><link to="#takeSnapshot"/></see>
6066 </desc>
6067 <param name="progress" type="IProgress" dir="return">
6068 <desc>Progress object to track the operation completion.</desc>
6069 </param>
6070 </method>
6071
6072 <method name="adoptSavedState">
6073 <desc>
6074 Associates the given saved state file to the virtual machine.
6075
6076 On success, the machine will go to the Saved state. Next time it is
6077 powered up, it will be restored from the adopted saved state and
6078 continue execution from the place where the saved state file was
6079 created.
6080
6081 The specified saved state file path may be absolute or relative to the
6082 folder the VM normally saves the state to (usually,
6083 <link to="IMachine::snapshotFolder"/>).
6084
6085 <note>
6086 It's a caller's responsibility to make sure the given saved state
6087 file is compatible with the settings of this virtual machine that
6088 represent its virtual hardware (memory size, storage disk configuration
6089 etc.). If there is a mismatch, the behavior of the virtual machine
6090 is undefined.
6091 </note>
6092 <result name="VBOX_E_INVALID_VM_STATE">
6093 Virtual machine state neither PoweredOff nor Aborted.
6094 </result>
6095 </desc>
6096 <param name="savedStateFile" type="wstring" dir="in">
6097 <desc>Path to the saved state file to adopt.</desc>
6098 </param>
6099 </method>
6100
6101 <method name="discardSavedState">
6102 <desc>
6103 Forcibly resets the machine to "Powered Off" state if it is
6104 currently in the "Saved" state (previously created by <link to="#saveState"/>).
6105 Next time the machine is powered up, a clean boot will occur.
6106 <note>
6107 This operation is equivalent to resetting or powering off
6108 the machine without doing a proper shutdown of the guest
6109 operating system; as with resetting a running phyiscal
6110 computer, it can can lead to data loss.
6111 </note>
6112 If @a fRemoveFile is @c true, the file in the machine directory
6113 into which the machine state was saved is also deleted. If
6114 this is @c false, then the state can be recovered and later
6115 re-inserted into a machine using <link to="#adoptSavedState" />.
6116 The location of the file can be found in the
6117 <link to="IMachine::stateFilePath" /> attribute.
6118 <result name="VBOX_E_INVALID_VM_STATE">
6119 Virtual machine not in state Saved.
6120 </result>
6121 </desc>
6122 <param name="fRemoveFile" type="boolean" dir="in" >
6123 <desc>Whether to also remove the saved state file.</desc>
6124 </param>
6125 </method>
6126
6127 <method name="getDeviceActivity">
6128 <desc>
6129 Gets the current activity type of a given device or device group.
6130 <result name="E_INVALIDARG">
6131 Invalid device type.
6132 </result>
6133 </desc>
6134 <param name="type" type="DeviceType" dir="in"/>
6135 <param name="activity" type="DeviceActivity" dir="return"/>
6136 </method>
6137
6138 <method name="attachUSBDevice">
6139 <desc>
6140 Attaches a host USB device with the given UUID to the
6141 USB controller of the virtual machine.
6142
6143 The device needs to be in one of the following states:
6144 <link to="USBDeviceState_Busy"/>,
6145 <link to="USBDeviceState_Available"/> or
6146 <link to="USBDeviceState_Held"/>,
6147 otherwise an error is immediately returned.
6148
6149 When the device state is
6150 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6151 be returned if the host computer refuses to release it for some reason.
6152
6153 <see>IUSBController::deviceFilters, USBDeviceState</see>
6154 <result name="VBOX_E_INVALID_VM_STATE">
6155 Virtual machine state neither Running nor Paused.
6156 </result>
6157 <result name="VBOX_E_PDM_ERROR">
6158 Virtual machine does not have a USB controller.
6159 </result>
6160 </desc>
6161 <param name="id" type="uuid" mod="string" dir="in">
6162 <desc>UUID of the host USB device to attach.</desc>
6163 </param>
6164 </method>
6165
6166 <method name="detachUSBDevice">
6167 <desc>
6168 Detaches an USB device with the given UUID from the USB controller
6169 of the virtual machine.
6170
6171 After this method succeeds, the VirtualBox server re-initiates
6172 all USB filters as if the device were just physically attached
6173 to the host, but filters of this machine are ignored to avoid
6174 a possible automatic re-attachment.
6175
6176 <see>IUSBController::deviceFilters, USBDeviceState</see>
6177
6178 <result name="VBOX_E_PDM_ERROR">
6179 Virtual machine does not have a USB controller.
6180 </result>
6181 <result name="E_INVALIDARG">
6182 USB device not attached to this virtual machine.
6183 </result>
6184 </desc>
6185 <param name="id" type="uuid" mod="string" dir="in">
6186 <desc>UUID of the USB device to detach.</desc>
6187 </param>
6188 <param name="device" type="IUSBDevice" dir="return">
6189 <desc>Detached USB device.</desc>
6190 </param>
6191 </method>
6192
6193 <method name="findUSBDeviceByAddress">
6194 <desc>
6195 Searches for a USB device with the given host address.
6196
6197 <result name="VBOX_E_OBJECT_NOT_FOUND">
6198 Given @c name does not correspond to any USB device.
6199 </result>
6200
6201 <see>IUSBDevice::address</see>
6202 </desc>
6203 <param name="name" type="wstring" dir="in">
6204 <desc>
6205 Address of the USB device (as assigned by the host) to
6206 search for.
6207 </desc>
6208 </param>
6209 <param name="device" type="IUSBDevice" dir="return">
6210 <desc>Found USB device object.</desc>
6211 </param>
6212 </method>
6213
6214 <method name="findUSBDeviceById">
6215 <desc>
6216 Searches for a USB device with the given UUID.
6217
6218 <result name="VBOX_E_OBJECT_NOT_FOUND">
6219 Given @c id does not correspond to any USB device.
6220 </result>
6221
6222 <see>IUSBDevice::id</see>
6223 </desc>
6224 <param name="id" type="uuid" mod="string" dir="in">
6225 <desc>UUID of the USB device to search for.</desc>
6226 </param>
6227 <param name="device" type="IUSBDevice" dir="return">
6228 <desc>Found USB device object.</desc>
6229 </param>
6230 </method>
6231
6232 <method name="createSharedFolder">
6233 <desc>
6234 Creates a transient new shared folder by associating the given logical
6235 name with the given host path, adds it to the collection of shared
6236 folders and starts sharing it. Refer to the description of
6237 <link to="ISharedFolder"/> to read more about logical names.
6238
6239 <result name="VBOX_E_INVALID_VM_STATE">
6240 Virtual machine in Saved state or currently changing state.
6241 </result>
6242 <result name="VBOX_E_FILE_ERROR">
6243 Shared folder already exists or not accessible.
6244 </result>
6245 </desc>
6246 <param name="name" type="wstring" dir="in">
6247 <desc>Unique logical name of the shared folder.</desc>
6248 </param>
6249 <param name="hostPath" type="wstring" dir="in">
6250 <desc>Full path to the shared folder in the host file system.</desc>
6251 </param>
6252 <param name="writable" type="boolean" dir="in">
6253 <desc>Whether the share is writable or readonly</desc>
6254 </param>
6255 <param name="automount" type="boolean" dir="in">
6256 <desc>Whether the share gets automatically mounted by the guest
6257 or not.</desc>
6258 </param>
6259 </method>
6260
6261 <method name="removeSharedFolder">
6262 <desc>
6263 Removes a transient shared folder with the given name previously
6264 created by <link to="#createSharedFolder"/> from the collection of
6265 shared folders and stops sharing it.
6266 <result name="VBOX_E_INVALID_VM_STATE">
6267 Virtual machine in Saved state or currently changing state.
6268 </result>
6269 <result name="VBOX_E_FILE_ERROR">
6270 Shared folder does not exists.
6271 </result>
6272 </desc>
6273 <param name="name" type="wstring" dir="in">
6274 <desc>Logical name of the shared folder to remove.</desc>
6275 </param>
6276 </method>
6277
6278 <method name="takeSnapshot">
6279 <desc>
6280 Saves the current execution state
6281 and all settings of the machine and creates differencing images
6282 for all normal (non-independent) media.
6283 See <link to="ISnapshot" /> for an introduction to snapshots.
6284
6285 This method can be called for a PoweredOff, Saved (see
6286 <link to="#saveState"/>), Running or
6287 Paused virtual machine. When the machine is PoweredOff, an
6288 offline snapshot is created. When the machine is Running a live
6289 snapshot is created, and an online snapshot is is created when Paused.
6290
6291 The taken snapshot is always based on the
6292 <link to="IMachine::currentSnapshot">current snapshot</link>
6293 of the associated virtual machine and becomes a new current snapshot.
6294
6295 <note>
6296 This method implicitly calls <link to="IMachine::saveSettings"/> to
6297 save all current machine settings before taking an offline snapshot.
6298 </note>
6299
6300 <result name="VBOX_E_INVALID_VM_STATE">
6301 Virtual machine currently changing state.
6302 </result>
6303 </desc>
6304 <param name="name" type="wstring" dir="in">
6305 <desc>Short name for the snapshot.</desc>
6306 </param>
6307 <param name="description" type="wstring" dir="in">
6308 <desc>Optional description of the snapshot.</desc>
6309 </param>
6310 <param name="progress" type="IProgress" dir="return">
6311 <desc>Progress object to track the operation completion.</desc>
6312 </param>
6313 </method>
6314
6315 <method name="deleteSnapshot">
6316 <desc>
6317 Starts deleting the specified snapshot asynchronously.
6318 See <link to="ISnapshot" /> for an introduction to snapshots.
6319
6320 The execution state and settings of the associated machine stored in
6321 the snapshot will be deleted. The contents of all differencing media of
6322 this snapshot will be merged with the contents of their dependent child
6323 media to keep the medium chain valid (in other words, all changes
6324 represented by media being deleted will be propagated to their child
6325 medium). After that, this snapshot's differencing medium will be
6326 deleted. The parent of this snapshot will become a new parent for all
6327 its child snapshots.
6328
6329 If the deleted snapshot is the current one, its parent snapshot will
6330 become a new current snapshot. The current machine state is not directly
6331 affected in this case, except that currently attached differencing
6332 media based on media of the deleted snapshot will be also merged as
6333 described above.
6334
6335 If the deleted snapshot is the first or current snapshot, then the
6336 respective IMachine attributes will be adjusted. Deleting the current
6337 snapshot will also implicitly call <link to="IMachine::saveSettings"/>
6338 to make all current machine settings permanent.
6339
6340 Deleting a snapshot has the following preconditions:
6341
6342 <ul>
6343 <li>Child media of all normal media of the deleted snapshot
6344 must be accessible (see <link to="IMedium::state"/>) for this
6345 operation to succeed. In particular, this means that all virtual
6346 machines, whose media are directly or indirectly based on the
6347 media of deleted snapshot, must be powered off.</li>
6348
6349 <li>You cannot delete the snapshot if a medium attached to it has
6350 more than once child medium (differencing images) because otherwise
6351 merging would be impossible. This might be the case if there is
6352 more than one child snapshot or differencing images were created
6353 for other reason (e.g. implicitly because of multiple machine
6354 attachments).</li>
6355 </ul>
6356
6357
6358 The virtual machine's <link to="IMachine::state">state</link> is
6359 changed to "DeletingSnapshot", "DeletingSnapshotOnline" or
6360 "DeletingSnapshotPaused" while this operation is in progress.
6361
6362 <note>
6363 Merging medium contents can be very time and disk space
6364 consuming, if these media are big in size and have many
6365 children. However, if the snapshot being deleted is the last
6366 (head) snapshot on the branch, the operation will be rather
6367 quick.
6368 </note>
6369 <result name="VBOX_E_INVALID_VM_STATE">
6370 The running virtual machine prevents deleting this snapshot. This
6371 happens only in very specific situations, usually snapshots can be
6372 deleted without trouble while a VM is running. The error message
6373 text explains the reason for the failure.
6374 </result>
6375 </desc>
6376 <param name="id" type="uuid" mod="string" dir="in">
6377 <desc>UUID of the snapshot to delete.</desc>
6378 </param>
6379 <param name="progress" type="IProgress" dir="return">
6380 <desc>Progress object to track the operation completion.</desc>
6381 </param>
6382 </method>
6383
6384 <method name="restoreSnapshot">
6385 <desc>
6386 Starts resetting the machine's current state to the state contained
6387 in the given snapshot, asynchronously. All current settings of the
6388 machine will be reset and changes stored in differencing media
6389 will be lost.
6390 See <link to="ISnapshot" /> for an introduction to snapshots.
6391
6392 After this operation is successfully completed, new empty differencing
6393 media are created for all normal media of the machine.
6394
6395 If the given snapshot is an online snapshot, the machine will go to
6396 the <link to="MachineState_Saved"> saved state</link>, so that the
6397 next time it is powered on, the execution state will be restored
6398 from the state of the snapshot.
6399
6400 <note>
6401 The machine must not be running, otherwise the operation will fail.
6402 </note>
6403
6404 <note>
6405 If the machine state is <link to="MachineState_Saved">Saved</link>
6406 prior to this operation, the saved state file will be implicitly
6407 deleted (as if <link to="IConsole::discardSavedState"/> were
6408 called).
6409 </note>
6410
6411 <result name="VBOX_E_INVALID_VM_STATE">
6412 Virtual machine is running.
6413 </result>
6414 </desc>
6415 <param name="snapshot" type="ISnapshot" dir="in">
6416 <desc>The snapshot to restore the VM state from.</desc>
6417 </param>
6418 <param name="progress" type="IProgress" dir="return">
6419 <desc>Progress object to track the operation completion.</desc>
6420 </param>
6421 </method>
6422
6423 <method name="teleport">
6424 <desc>
6425 Teleport the VM to a different host machine or process.
6426
6427 TODO explain the details.
6428
6429 <result name="VBOX_E_INVALID_VM_STATE">
6430 Virtual machine not running or paused.
6431 </result>
6432 </desc>
6433 <param name="hostname" type="wstring" dir="in">
6434 <desc>The name or IP of the host to teleport to.</desc>
6435 </param>
6436 <param name="tcpport" type="unsigned long" dir="in">
6437 <desc>The TCP port to connect to (1..65535).</desc>
6438 </param>
6439 <param name="password" type="wstring" dir="in">
6440 <desc>The password.</desc>
6441 </param>
6442 <param name="maxDowntime" type="unsigned long" dir="in">
6443 <desc>
6444 The maximum allowed downtime given as milliseconds. 0 is not a valid
6445 value. Recommended value: 250 ms.
6446
6447 The higher the value is, the greater the chance for a successful
6448 teleportation. A small value may easily result in the teleportation
6449 process taking hours and eventually fail.
6450
6451 <note>
6452 The current implementation treats this a guideline, not as an
6453 absolute rule.
6454 </note>
6455 </desc>
6456 </param>
6457 <param name="progress" type="IProgress" dir="return">
6458 <desc>Progress object to track the operation completion.</desc>
6459 </param>
6460 </method>
6461
6462 </interface>
6463
6464 <!--
6465 // IHost
6466 /////////////////////////////////////////////////////////////////////////
6467 -->
6468
6469 <enum
6470 name="HostNetworkInterfaceMediumType"
6471 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6472 >
6473 <desc>
6474 Type of encapsulation. Ethernet encapsulation includes both wired and
6475 wireless Ethernet connections.
6476 <see>IHostNetworkInterface</see>
6477 </desc>
6478
6479 <const name="Unknown" value="0">
6480 <desc>
6481 The type of interface cannot be determined.
6482 </desc>
6483 </const>
6484 <const name="Ethernet" value="1">
6485 <desc>
6486 Ethernet frame encapsulation.
6487 </desc>
6488 </const>
6489 <const name="PPP" value="2">
6490 <desc>
6491 Point-to-point protocol encapsulation.
6492 </desc>
6493 </const>
6494 <const name="SLIP" value="3">
6495 <desc>
6496 Serial line IP encapsulation.
6497 </desc>
6498 </const>
6499 </enum>
6500
6501 <enum
6502 name="HostNetworkInterfaceStatus"
6503 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6504 >
6505 <desc>
6506 Current status of the interface.
6507 <see>IHostNetworkInterface</see>
6508 </desc>
6509
6510 <const name="Unknown" value="0">
6511 <desc>
6512 The state of interface cannot be determined.
6513 </desc>
6514 </const>
6515 <const name="Up" value="1">
6516 <desc>
6517 The interface is fully operational.
6518 </desc>
6519 </const>
6520 <const name="Down" value="2">
6521 <desc>
6522 The interface is not functioning.
6523 </desc>
6524 </const>
6525 </enum>
6526
6527 <enum
6528 name="HostNetworkInterfaceType"
6529 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6530 >
6531 <desc>
6532 Network interface type.
6533 </desc>
6534 <const name="Bridged" value="1"/>
6535 <const name="HostOnly" value="2"/>
6536 </enum>
6537
6538 <interface
6539 name="IHostNetworkInterface" extends="$unknown"
6540 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6541 wsmap="managed"
6542 >
6543 <desc>
6544 Represents one of host's network interfaces. IP V6 address and network
6545 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6546 separated by colons.
6547 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6548 </desc>
6549 <attribute name="name" type="wstring" readonly="yes">
6550 <desc>Returns the host network interface name.</desc>
6551 </attribute>
6552
6553 <attribute name="id" type="uuid" mod="string" readonly="yes">
6554 <desc>Returns the interface UUID.</desc>
6555 </attribute>
6556
6557 <attribute name="networkName" type="wstring" readonly="yes">
6558 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6559 </attribute>
6560
6561 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6562 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6563 </attribute>
6564
6565 <attribute name="IPAddress" type="wstring" readonly="yes">
6566 <desc>Returns the IP V4 address of the interface.</desc>
6567 </attribute>
6568
6569 <attribute name="networkMask" type="wstring" readonly="yes">
6570 <desc>Returns the network mask of the interface.</desc>
6571 </attribute>
6572
6573 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6574 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6575 </attribute>
6576
6577 <attribute name="IPV6Address" type="wstring" readonly="yes">
6578 <desc>Returns the IP V6 address of the interface.</desc>
6579 </attribute>
6580
6581 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6582 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6583 </attribute>
6584
6585 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6586 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6587 </attribute>
6588
6589 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6590 <desc>Type of protocol encapsulation used.</desc>
6591 </attribute>
6592
6593 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6594 <desc>Status of the interface.</desc>
6595 </attribute>
6596
6597 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6598 <desc>specifies the host interface type.</desc>
6599 </attribute>
6600
6601 <method name="enableStaticIpConfig">
6602 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6603 <param name="IPAddress" type="wstring" dir="in">
6604 <desc>
6605 IP address.
6606 </desc>
6607 </param>
6608 <param name="networkMask" type="wstring" dir="in">
6609 <desc>
6610 network mask.
6611 </desc>
6612 </param>
6613 </method>
6614
6615 <method name="enableStaticIpConfigV6">
6616 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6617 <param name="IPV6Address" type="wstring" dir="in">
6618 <desc>
6619 IP address.
6620 </desc>
6621 </param>
6622 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6623 <desc>
6624 network mask.
6625 </desc>
6626 </param>
6627 </method>
6628
6629 <method name="enableDynamicIpConfig">
6630 <desc>enables the dynamic IP configuration.</desc>
6631 </method>
6632
6633 <method name="dhcpRediscover">
6634 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6635 </method>
6636
6637 </interface>
6638
6639 <interface
6640 name="IHost" extends="$unknown"
6641 uuid="35b004f4-7806-4009-bfa8-d1308adba7e5"
6642 wsmap="managed"
6643 >
6644 <desc>
6645 The IHost interface represents the physical machine that this VirtualBox
6646 installation runs on.
6647
6648 An object implementing this interface is returned by the
6649 <link to="IVirtualBox::host" /> attribute. This interface contains
6650 read-only information about the host's physical hardware (such as what
6651 processors and disks are available, what the host operating system is,
6652 and so on) and also allows for manipulating some of the host's hardware,
6653 such as global USB device filters and host interface networking.
6654
6655 </desc>
6656 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
6657 <desc>List of DVD drives available on the host.</desc>
6658 </attribute>
6659
6660 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
6661 <desc>List of floppy drives available on the host.</desc>
6662 </attribute>
6663
6664 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6665 <desc>
6666 List of USB devices currently attached to the host.
6667 Once a new device is physically attached to the host computer,
6668 it appears in this list and remains there until detached.
6669
6670 <note>
6671 If USB functionality is not available in the given edition of
6672 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6673 </note>
6674 </desc>
6675 </attribute>
6676
6677 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
6678 <desc>
6679 List of USB device filters in action.
6680 When a new device is physically attached to the host computer,
6681 filters from this list are applied to it (in order they are stored
6682 in the list). The first matched filter will determine the
6683 <link to="IHostUSBDeviceFilter::action">action</link>
6684 performed on the device.
6685
6686 Unless the device is ignored by these filters, filters of all
6687 currently running virtual machines
6688 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6689
6690 <note>
6691 If USB functionality is not available in the given edition of
6692 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6693 </note>
6694
6695 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6696 </desc>
6697 </attribute>
6698
6699 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6700 <desc>List of host network interfaces currently defined on the host.</desc>
6701 </attribute>
6702
6703 <attribute name="processorCount" type="unsigned long" readonly="yes">
6704 <desc>Number of (logical) CPUs installed in the host system.</desc>
6705 </attribute>
6706
6707 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6708 <desc>Number of (logical) CPUs online in the host system.</desc>
6709 </attribute>
6710
6711 <attribute name="processorCoreCount" type="unsigned long" readonly="yes">
6712 <desc>Number of physical processor cores installed in the host system.</desc>
6713 </attribute>
6714
6715 <method name="getProcessorSpeed">
6716 <desc>Query the (approximate) maximum speed of a specified host CPU in
6717 Megahertz.
6718 </desc>
6719 <param name="cpuId" type="unsigned long" dir="in">
6720 <desc>
6721 Identifier of the CPU.
6722 </desc>
6723 </param>
6724 <param name="speed" type="unsigned long" dir="return">
6725 <desc>
6726 Speed value. 0 is returned if value is not known or @a cpuId is
6727 invalid.
6728 </desc>
6729 </param>
6730 </method>
6731
6732 <method name="getProcessorFeature">
6733 <desc>Query whether a CPU feature is supported or not.</desc>
6734 <param name="feature" type="ProcessorFeature" dir="in">
6735 <desc>
6736 CPU Feature identifier.
6737 </desc>
6738 </param>
6739 <param name="supported" type="boolean" dir="return">
6740 <desc>
6741 Feature is supported or not.
6742 </desc>
6743 </param>
6744 </method>
6745
6746 <method name="getProcessorDescription">
6747 <desc>Query the model string of a specified host CPU.
6748 </desc>
6749 <param name="cpuId" type="unsigned long" dir="in">
6750 <desc>
6751 Identifier of the CPU.
6752 <note>
6753 The current implementation might not necessarily return the
6754 description for this exact CPU.
6755 </note>
6756 </desc>
6757 </param>
6758 <param name="description" type="wstring" dir="return">
6759 <desc>
6760 Model string. An empty string is returned if value is not known or
6761 @a cpuId is invalid.
6762 </desc>
6763 </param>
6764 </method>
6765
6766 <method name="getProcessorCPUIDLeaf">
6767 <desc>
6768 Returns the CPU cpuid information for the specified leaf.
6769 </desc>
6770 <param name="cpuId" type="unsigned long" dir="in">
6771 <desc>
6772 Identifier of the CPU. The CPU most be online.
6773 <note>
6774 The current implementation might not necessarily return the
6775 description for this exact CPU.
6776 </note>
6777 </desc>
6778 </param>
6779 <param name="leaf" type="unsigned long" dir="in">
6780 <desc>
6781 CPUID leaf index (eax).
6782 </desc>
6783 </param>
6784 <param name="subLeaf" type="unsigned long" dir="in">
6785 <desc>
6786 CPUID leaf sub index (ecx). This currently only applies to cache
6787 information on Intel CPUs. Use 0 if retriving values for
6788 <link to="IMachine::setCPUIDLeaf"/>.
6789 </desc>
6790 </param>
6791 <param name="valEax" type="unsigned long" dir="out">
6792 <desc>
6793 CPUID leaf value for register eax.
6794 </desc>
6795 </param>
6796 <param name="valEbx" type="unsigned long" dir="out">
6797 <desc>
6798 CPUID leaf value for register ebx.
6799 </desc>
6800 </param>
6801 <param name="valEcx" type="unsigned long" dir="out">
6802 <desc>
6803 CPUID leaf value for register ecx.
6804 </desc>
6805 </param>
6806 <param name="valEdx" type="unsigned long" dir="out">
6807 <desc>
6808 CPUID leaf value for register edx.
6809 </desc>
6810 </param>
6811 </method>
6812
6813 <attribute name="memorySize" type="unsigned long" readonly="yes">
6814 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6815 </attribute>
6816
6817 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6818 <desc>Available system memory in the host system.</desc>
6819 </attribute>
6820
6821 <attribute name="operatingSystem" type="wstring" readonly="yes">
6822 <desc>Name of the host system's operating system.</desc>
6823 </attribute>
6824
6825 <attribute name="OSVersion" type="wstring" readonly="yes">
6826 <desc>Host operating system's version string.</desc>
6827 </attribute>
6828
6829 <attribute name="UTCTime" type="long long" readonly="yes">
6830 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6831 </attribute>
6832
6833 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
6834 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
6835 </attribute>
6836
6837 <method name="createHostOnlyNetworkInterface">
6838 <desc>
6839 Creates a new adapter for Host Only Networking.
6840 <result name="E_INVALIDARG">
6841 Host network interface @a name already exists.
6842 </result>
6843 </desc>
6844 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6845 <desc>
6846 Created host interface object.
6847 </desc>
6848 </param>
6849 <param name="progress" type="IProgress" dir="return">
6850 <desc>
6851 Progress object to track the operation completion.
6852 </desc>
6853 </param>
6854 </method>
6855
6856 <method name="removeHostOnlyNetworkInterface">
6857 <desc>
6858 Removes the given Host Only Networking interface.
6859 <result name="VBOX_E_OBJECT_NOT_FOUND">
6860 No host network interface matching @a id found.
6861 </result>
6862 </desc>
6863 <param name="id" type="uuid" mod="string" dir="in">
6864 <desc>
6865 Adapter GUID.
6866 </desc>
6867 </param>
6868 <param name="progress" type="IProgress" dir="return">
6869 <desc>
6870 Progress object to track the operation completion.
6871 </desc>
6872 </param>
6873 </method>
6874
6875 <method name="createUSBDeviceFilter">
6876 <desc>
6877 Creates a new USB device filter. All attributes except
6878 the filter name are set to empty (any match),
6879 <i>active</i> is @c false (the filter is not active).
6880
6881 The created filter can be added to the list of filters using
6882 <link to="#insertUSBDeviceFilter"/>.
6883
6884 <see>#USBDeviceFilters</see>
6885 </desc>
6886 <param name="name" type="wstring" dir="in">
6887 <desc>
6888 Filter name. See <link to="IUSBDeviceFilter::name"/> for more information.
6889 </desc>
6890 </param>
6891 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6892 <desc>Created filter object.</desc>
6893 </param>
6894 </method>
6895
6896 <method name="insertUSBDeviceFilter">
6897 <desc>
6898 Inserts the given USB device to the specified position
6899 in the list of filters.
6900
6901 Positions are numbered starting from @c 0. If the specified
6902 position is equal to or greater than the number of elements in
6903 the list, the filter is added at the end of the collection.
6904
6905 <note>
6906 Duplicates are not allowed, so an attempt to insert a
6907 filter already in the list is an error.
6908 </note>
6909 <note>
6910 If USB functionality is not available in the given edition of
6911 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6912 </note>
6913
6914 <see>#USBDeviceFilters</see>
6915
6916 <result name="VBOX_E_INVALID_OBJECT_STATE">
6917 USB device filter is not created within this VirtualBox instance.
6918 </result>
6919 <result name="E_INVALIDARG">
6920 USB device filter already in list.
6921 </result>
6922
6923 </desc>
6924 <param name="position" type="unsigned long" dir="in">
6925 <desc>Position to insert the filter to.</desc>
6926 </param>
6927 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
6928 <desc>USB device filter to insert.</desc>
6929 </param>
6930 </method>
6931
6932 <method name="removeUSBDeviceFilter">
6933 <desc>
6934 Removes a USB device filter from the specified position in the
6935 list of filters.
6936
6937 Positions are numbered starting from @c 0. Specifying a
6938 position equal to or greater than the number of elements in
6939 the list will produce an error.
6940
6941 <note>
6942 If USB functionality is not available in the given edition of
6943 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6944 </note>
6945
6946 <see>#USBDeviceFilters</see>
6947
6948 <result name="E_INVALIDARG">
6949 USB device filter list empty or invalid @a position.
6950 </result>
6951
6952 </desc>
6953 <param name="position" type="unsigned long" dir="in">
6954 <desc>Position to remove the filter from.</desc>
6955 </param>
6956 </method>
6957
6958 <method name="findHostDVDDrive">
6959 <desc>
6960 Searches for a host DVD drive with the given @c name.
6961
6962 <result name="VBOX_E_OBJECT_NOT_FOUND">
6963 Given @c name does not correspond to any host drive.
6964 </result>
6965
6966 </desc>
6967 <param name="name" type="wstring" dir="in">
6968 <desc>Name of the host drive to search for</desc>
6969 </param>
6970 <param name="drive" type="IMedium" dir="return">
6971 <desc>Found host drive object</desc>
6972 </param>
6973 </method>
6974
6975 <method name="findHostFloppyDrive">
6976 <desc>
6977 Searches for a host floppy drive with the given @c name.
6978
6979 <result name="VBOX_E_OBJECT_NOT_FOUND">
6980 Given @c name does not correspond to any host floppy drive.
6981 </result>
6982
6983 </desc>
6984 <param name="name" type="wstring" dir="in">
6985 <desc>Name of the host floppy drive to search for</desc>
6986 </param>
6987 <param name="drive" type="IMedium" dir="return">
6988 <desc>Found host floppy drive object</desc>
6989 </param>
6990 </method>
6991
6992 <method name="findHostNetworkInterfaceByName">
6993 <desc>
6994 Searches through all host network interfaces for an interface with
6995 the given @c name.
6996 <note>
6997 The method returns an error if the given @c name does not
6998 correspond to any host network interface.
6999 </note>
7000 </desc>
7001 <param name="name" type="wstring" dir="in">
7002 <desc>Name of the host network interface to search for.</desc>
7003 </param>
7004 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7005 <desc>Found host network interface object.</desc>
7006 </param>
7007 </method>
7008 <method name="findHostNetworkInterfaceById">
7009 <desc>
7010 Searches through all host network interfaces for an interface with
7011 the given GUID.
7012 <note>
7013 The method returns an error if the given GUID does not
7014 correspond to any host network interface.
7015 </note>
7016 </desc>
7017 <param name="id" type="uuid" mod="string" dir="in">
7018 <desc>GUID of the host network interface to search for.</desc>
7019 </param>
7020 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7021 <desc>Found host network interface object.</desc>
7022 </param>
7023 </method>
7024 <method name="findHostNetworkInterfacesOfType">
7025 <desc>
7026 Searches through all host network interfaces and returns a list of interfaces of the specified type
7027 </desc>
7028 <param name="type" type="HostNetworkInterfaceType" dir="in">
7029 <desc>type of the host network interfaces to search for.</desc>
7030 </param>
7031 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7032 <desc>Found host network interface objects.</desc>
7033 </param>
7034 </method>
7035
7036 <method name="findUSBDeviceById">
7037 <desc>
7038 Searches for a USB device with the given UUID.
7039
7040 <result name="VBOX_E_OBJECT_NOT_FOUND">
7041 Given @c id does not correspond to any USB device.
7042 </result>
7043
7044 <see>IHostUSBDevice::id</see>
7045 </desc>
7046 <param name="id" type="uuid" mod="string" dir="in">
7047 <desc>UUID of the USB device to search for.</desc>
7048 </param>
7049 <param name="device" type="IHostUSBDevice" dir="return">
7050 <desc>Found USB device object.</desc>
7051 </param>
7052 </method>
7053
7054 <method name="findUSBDeviceByAddress">
7055 <desc>
7056 Searches for a USB device with the given host address.
7057
7058 <result name="VBOX_E_OBJECT_NOT_FOUND">
7059 Given @c name does not correspond to any USB device.
7060 </result>
7061
7062 <see>IHostUSBDevice::address</see>
7063 </desc>
7064 <param name="name" type="wstring" dir="in">
7065 <desc>
7066 Address of the USB device (as assigned by the host) to
7067 search for.
7068 </desc>
7069 </param>
7070 <param name="device" type="IHostUSBDevice" dir="return">
7071 <desc>Found USB device object.</desc>
7072 </param>
7073 </method>
7074
7075 </interface>
7076
7077 <!--
7078 // ISystemProperties
7079 /////////////////////////////////////////////////////////////////////////
7080 -->
7081
7082 <interface
7083 name="ISystemProperties"
7084 extends="$unknown"
7085 uuid="07c3ffd8-8f59-49cc-b608-53a332e85cc3"
7086 wsmap="managed"
7087 >
7088 <desc>
7089 The ISystemProperties interface represents global properties of the given
7090 VirtualBox installation.
7091
7092 These properties define limits and default values for various attributes
7093 and parameters. Most of the properties are read-only, but some can be
7094 changed by a user.
7095 </desc>
7096
7097 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7098 <desc>Minimum guest system memory in Megabytes.</desc>
7099 </attribute>
7100
7101 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7102 <desc>Maximum guest system memory in Megabytes.</desc>
7103 </attribute>
7104
7105 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7106 <desc>Minimum guest video memory in Megabytes.</desc>
7107 </attribute>
7108
7109 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7110 <desc>Maximum guest video memory in Megabytes.</desc>
7111 </attribute>
7112
7113 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7114 <desc>Minimum CPU count.</desc>
7115 </attribute>
7116
7117 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7118 <desc>Maximum CPU count.</desc>
7119 </attribute>
7120
7121 <attribute name="maxGuestMonitors" type="unsigned long" readonly="yes">
7122 <desc>Maximum of monitors which could be connected.</desc>
7123 </attribute>
7124
7125 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7126 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7127 </attribute>
7128
7129 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7130 <desc>
7131 Number of network adapters associated with every
7132 <link to="IMachine"/> instance.
7133 </desc>
7134 </attribute>
7135
7136 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7137 <desc>
7138 Number of serial ports associated with every
7139 <link to="IMachine"/> instance.
7140 </desc>
7141 </attribute>
7142
7143 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7144 <desc>
7145 Number of parallel ports associated with every
7146 <link to="IMachine"/> instance.
7147 </desc>
7148 </attribute>
7149
7150 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7151 <desc>
7152 Maximum device position in the boot order. This value corresponds
7153 to the total number of devices a machine can boot from, to make it
7154 possible to include all possible devices to the boot list.
7155 <see><link to="IMachine::setBootOrder"/></see>
7156 </desc>
7157 </attribute>
7158
7159 <attribute name="defaultMachineFolder" type="wstring">
7160 <desc>
7161 Full path to the default directory used to create new or open
7162 existing machines when a settings file name contains no
7163 path.
7164
7165 The initial value of this property is
7166 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7167 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7168
7169 <note>
7170 Setting this property to @c null or an empty string will restore the
7171 initial value.
7172 </note>
7173 <note>
7174 When settings this property, the specified path can be
7175 absolute (full path) or relative
7176 to the <link to="IVirtualBox::homeFolder">
7177 VirtualBox home directory</link>.
7178 When reading this property, a full path is
7179 always returned.
7180 </note>
7181 <note>
7182 The specified path may not exist, it will be created
7183 when necessary.
7184 </note>
7185
7186 <see>
7187 <link to="IVirtualBox::createMachine"/>,
7188 <link to="IVirtualBox::openMachine"/>
7189 </see>
7190 </desc>
7191 </attribute>
7192
7193 <attribute name="defaultHardDiskFolder" type="wstring">
7194 <desc>
7195 Full path to the default directory used to create new or open existing
7196 virtual disks.
7197
7198 This path is used when the storage unit of a hard disk is a regular file
7199 in the host's file system and only a file name that contains no path is
7200 given.
7201
7202 The initial value of this property is
7203 <tt>&lt;</tt>
7204 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7205 <tt>&gt;/HardDisks</tt>.
7206
7207 <note>
7208 Setting this property to @c null or empty string will restore the
7209 initial value.
7210 </note>
7211 <note>
7212 When settings this property, the specified path can be relative
7213 to the
7214 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7215 absolute. When reading this property, a full path is
7216 always returned.
7217 </note>
7218 <note>
7219 The specified path may not exist, it will be created
7220 when necessary.
7221 </note>
7222
7223 <see>
7224 IMedium,
7225 <link to="IVirtualBox::createHardDisk"/>,
7226 <link to="IVirtualBox::openMedium"/>,
7227 <link to="IMedium::location"/>
7228 </see>
7229 </desc>
7230 </attribute>
7231
7232 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7233 <desc>
7234 List of all medium storage formats supported by this VirtualBox
7235 installation.
7236
7237 Keep in mind that the medium format identifier
7238 (<link to="IMediumFormat::id"/>) used in other API calls like
7239 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7240 medium format is a case-insensitive string. This means that, for
7241 example, all of the following strings:
7242 <pre>
7243 "VDI"
7244 "vdi"
7245 "VdI"</pre>
7246 refer to the same medium format.
7247
7248 Note that the virtual medium framework is backend-based, therefore
7249 the list of supported formats depends on what backends are currently
7250 installed.
7251
7252 <see>
7253 <link to="IMediumFormat"/>,
7254 </see>
7255 </desc>
7256 </attribute>
7257
7258 <attribute name="defaultHardDiskFormat" type="wstring">
7259 <desc>
7260 Identifier of the default medium format used by VirtualBox.
7261
7262 The medium format set by this attribute is used by VirtualBox
7263 when the medium format was not specified explicitly. One example is
7264 <link to="IVirtualBox::createHardDisk"/> with the empty
7265 format argument. A more complex example is implicit creation of
7266 differencing media when taking a snapshot of a virtual machine:
7267 this operation will try to use a format of the parent medium first
7268 and if this format does not support differencing media the default
7269 format specified by this argument will be used.
7270
7271 The list of supported medium formats may be obtained by the
7272 <link to="#mediumFormats"/> call. Note that the default medium
7273 format must have a capability to create differencing media;
7274 otherwise operations that create media implicitly may fail
7275 unexpectedly.
7276
7277 The initial value of this property is <tt>"VDI"</tt> in the current
7278 version of the VirtualBox product, but may change in the future.
7279
7280 <note>
7281 Setting this property to @c null or empty string will restore the
7282 initial value.
7283 </note>
7284
7285 <see>
7286 <link to="#mediumFormats"/>,
7287 <link to="IMediumFormat::id"/>,
7288 <link to="IVirtualBox::createHardDisk"/>
7289 </see>
7290 </desc>
7291 </attribute>
7292
7293 <attribute name="freeDiskSpaceWarning" type="unsigned long long">
7294 <desc>Issue a warning if the free disk space is below (or in some disk
7295 intensive operation is expected to go below) the given size in
7296 Megabytes.</desc>
7297 </attribute>
7298
7299 <attribute name="freeDiskSpacePercentWarning" type="unsigned long">
7300 <desc>Issue a warning if the free disk space is below (or in some disk
7301 intensive operation is expected to go below) the given percentage.</desc>
7302 </attribute>
7303
7304 <attribute name="freeDiskSpaceError" type="unsigned long long">
7305 <desc>Issue an error if the free disk space is below (or in some disk
7306 intensive operation is expected to go below) the given size in
7307 Megabytes.</desc>
7308 </attribute>
7309
7310 <attribute name="freeDiskSpacePercentError" type="unsigned long">
7311 <desc>Issue an error if the free disk space is below (or in some disk
7312 intensive operation is expected to go below) the given percentage.</desc>
7313 </attribute>
7314
7315 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7316 <desc>
7317 Library that provides authentication for VRDP clients. The library
7318 is used if a virtual machine's authentication type is set to "external"
7319 in the VM RemoteDisplay configuration.
7320
7321 The system library extension (".DLL" or ".so") must be omitted.
7322 A full path can be specified; if not, then the library must reside on the
7323 system's default library path.
7324
7325 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7326 of that name in one of the default VirtualBox library directories.
7327
7328 For details about VirtualBox authentication libraries and how to implement
7329 them, please refer to the VirtualBox manual.
7330
7331 <note>
7332 Setting this property to @c null or empty string will restore the
7333 initial value.
7334 </note>
7335 </desc>
7336 </attribute>
7337
7338 <attribute name="webServiceAuthLibrary" type="wstring">
7339 <desc>
7340 Library that provides authentication for webservice clients. The library
7341 is used if a virtual machine's authentication type is set to "external"
7342 in the VM RemoteDisplay configuration and will be called from
7343 within the <link to="IWebsessionManager::logon" /> implementation.
7344
7345 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7346 there is no per-VM setting for this, as the webservice is a global
7347 resource (if it is running). Only for this setting (for the webservice),
7348 setting this value to a literal <tt>"null"</tt> string disables authentication,
7349 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7350 no matter what user name and password are supplied.
7351
7352 The initial value of this property is <tt>"VRDPAuth"</tt>,
7353 meaning that the webservice will use the same authentication
7354 library that is used by default for VBoxVRDP (again, see
7355 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7356 The format and calling convention of authentication libraries
7357 is the same for the webservice as it is for VBoxVRDP.
7358
7359 <note>
7360 Setting this property to @c null or empty string will restore the
7361 initial value.
7362 </note>
7363 </desc>
7364 </attribute>
7365
7366 <attribute name="LogHistoryCount" type="unsigned long">
7367 <desc>
7368 This value specifies how many old release log files are kept.
7369 </desc>
7370 </attribute>
7371
7372 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7373 <desc>This value hold the default audio driver for the current
7374 system.</desc>
7375 </attribute>
7376
7377 <method name="getMaxDevicesPerPortForStorageBus">
7378 <desc>Returns the maximum number of devices which can be attached to a port
7379 for the given storage bus.</desc>
7380
7381 <param name="bus" type="StorageBus" dir="in">
7382 <desc>The storage bus type to get the value for.</desc>
7383 </param>
7384
7385 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
7386 <desc>The maximum number of devices which can eb attached to the port for the given
7387 storage bus.</desc>
7388 </param>
7389 </method>
7390
7391 <method name="getMinPortCountForStorageBus">
7392 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
7393
7394 <param name="bus" type="StorageBus" dir="in">
7395 <desc>The storage bus type to get the value for.</desc>
7396 </param>
7397
7398 <param name="minPortCount" type="unsigned long" dir="return">
7399 <desc>The minimum number of ports for the given storage bus.</desc>
7400 </param>
7401 </method>
7402
7403 <method name="getMaxPortCountForStorageBus">
7404 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
7405
7406 <param name="bus" type="StorageBus" dir="in">
7407 <desc>The storage bus type to get the value for.</desc>
7408 </param>
7409
7410 <param name="maxPortCount" type="unsigned long" dir="return">
7411 <desc>The maximum number of ports for the given storage bus.</desc>
7412 </param>
7413 </method>
7414
7415 <method name="getMaxInstancesOfStorageBus">
7416 <desc>Returns the maximum number of storage bus instances which
7417 can be configured for each VM. This corresponds to the number of
7418 storage controllers one can have.</desc>
7419
7420 <param name="bus" type="StorageBus" dir="in">
7421 <desc>The storage bus type to get the value for.</desc>
7422 </param>
7423
7424 <param name="maxInstances" type="unsigned long" dir="return">
7425 <desc>The maximum number of instances for the given storage bus.</desc>
7426 </param>
7427 </method>
7428
7429 <method name="getDeviceTypesForStorageBus">
7430 <desc>Returns list of all the supported device types
7431 (<link to="DeviceType"/>) for the given type of storage
7432 bus.</desc>
7433
7434 <param name="bus" type="StorageBus" dir="in">
7435 <desc>The storage bus type to get the value for.</desc>
7436 </param>
7437
7438 <param name="deviceTypes" type="DeviceType" safearray="yes" dir="return">
7439 <desc>The list of all supported device types for the given storage bus.</desc>
7440 </param>
7441 </method>
7442 </interface>
7443
7444 <!--
7445 // IGuest
7446 /////////////////////////////////////////////////////////////////////////
7447 -->
7448
7449 <interface
7450 name="IGuestOSType" extends="$unknown"
7451 uuid="e3f6727e-a09b-41ea-a824-864a176472f3"
7452 wsmap="struct"
7453 >
7454 <desc>
7455 </desc>
7456
7457 <attribute name="familyId" type="wstring" readonly="yes">
7458 <desc>Guest OS family identifier string.</desc>
7459 </attribute>
7460
7461 <attribute name="familyDescription" type="wstring" readonly="yes">
7462 <desc>Human readable description of the guest OS family.</desc>
7463 </attribute>
7464
7465 <attribute name="id" type="wstring" readonly="yes">
7466 <desc>Guest OS identifier string.</desc>
7467 </attribute>
7468
7469 <attribute name="description" type="wstring" readonly="yes">
7470 <desc>Human readable description of the guest OS.</desc>
7471 </attribute>
7472
7473 <attribute name="is64Bit" type="boolean" readonly="yes">
7474 <desc>Returns @c true if the given OS is 64-bit</desc>
7475 </attribute>
7476
7477 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7478 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7479 </attribute>
7480
7481 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7482 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7483 </attribute>
7484
7485 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7486 <desc>Recommended RAM size in Megabytes.</desc>
7487 </attribute>
7488
7489 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7490 <desc>Recommended video RAM size in Megabytes.</desc>
7491 </attribute>
7492
7493 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7494 <desc>Recommended hard disk size in Megabytes.</desc>
7495 </attribute>
7496
7497 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7498 <desc>Returns recommended network adapter for this OS type.</desc>
7499 </attribute>
7500
7501 <attribute name="recommendedPae" type="boolean" readonly="yes">
7502 <desc>Returns @c true if using PAE is recommended for this OS type.</desc>
7503 </attribute>
7504
7505 <attribute name="recommendedDvdStorageController" type="StorageControllerType" readonly="yes">
7506 <desc>Recommended storage controller type for DVD/CD drives.</desc>
7507 </attribute>
7508
7509 <attribute name="recommendedDvdStorageBus" type="StorageBus" readonly="yes">
7510 <desc>Recommended storage bus type for DVD/CD drives.</desc>
7511 </attribute>
7512
7513 <attribute name="recommendedHdStorageController" type="StorageControllerType" readonly="yes">
7514 <desc>Recommended storage controller type for HD drives.</desc>
7515 </attribute>
7516
7517 <attribute name="recommendedHdStorageBus" type="StorageBus" readonly="yes">
7518 <desc>Recommended storage bus type for HD drives.</desc>
7519 </attribute>
7520
7521 <attribute name="recommendedFirmware" type="FirmwareType" readonly="yes">
7522 <desc>Recommended firmware type.</desc>
7523 </attribute>
7524
7525 <attribute name="recommendedUsbHid" type="boolean" readonly="yes">
7526 <desc>Returns @c true if using USB Human Interface Devices, such as keyboard and mouse recommended.</desc>
7527 </attribute>
7528
7529 <attribute name="recommendedHpet" type="boolean" readonly="yes">
7530 <desc>Returns @c true if using HPET is recommended for this OS type.</desc>
7531 </attribute>
7532
7533 <attribute name="recommendedUsbTablet" type="boolean" readonly="yes">
7534 <desc>Returns @c true if using a USB Tablet is recommended.</desc>
7535 </attribute>
7536
7537 <attribute name="recommendedRtcUseUtc" type="boolean" readonly="yes">
7538 <desc>Returns @c true if the RTC of this VM should be set to UTC</desc>
7539 </attribute>
7540
7541 </interface>
7542
7543 <interface
7544 name="IGuest" extends="$unknown"
7545 uuid="d915dff1-ed38-495a-91f1-ab6c53932468"
7546 wsmap="managed"
7547 >
7548 <desc>
7549 The IGuest interface represents information about the operating system
7550 running inside the virtual machine. Used in
7551 <link to="IConsole::guest"/>.
7552
7553 IGuest provides information about the guest operating system, whether
7554 Guest Additions are installed and other OS-specific virtual machine
7555 properties.
7556 </desc>
7557
7558 <attribute name="OSTypeId" type="wstring" readonly="yes">
7559 <desc>
7560 Identifier of the Guest OS type as reported by the Guest
7561 Additions.
7562 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7563 an IGuestOSType object representing details about the given
7564 Guest OS type.
7565 <note>
7566 If Guest Additions are not installed, this value will be
7567 the same as <link to="IMachine::OSTypeId"/>.
7568 </note>
7569 </desc>
7570 </attribute>
7571
7572 <attribute name="additionsActive" type="boolean" readonly="yes">
7573 <desc>
7574 Flag whether the Guest Additions are installed and active
7575 in which case their version will be returned by the
7576 <link to="#additionsVersion"/> property.
7577 </desc>
7578 </attribute>
7579
7580 <attribute name="additionsVersion" type="wstring" readonly="yes">
7581 <desc>
7582 Version of the Guest Additions including the revision (3 decimal numbers
7583 separated by dots + revision number) installed on the guest or empty
7584 when the Additions are not installed.
7585 </desc>
7586 </attribute>
7587
7588 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7589 <desc>
7590 Flag whether seamless guest display rendering (seamless desktop
7591 integration) is supported.
7592 </desc>
7593 </attribute>
7594
7595 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7596 <desc>
7597 Flag whether the guest is in graphics mode. If it is not, then
7598 seamless rendering will not work, resize hints are not immediately
7599 acted on and guest display resizes are probably not initiated by
7600 the guest additions.
7601 </desc>
7602 </attribute>
7603
7604 <attribute name="memoryBalloonSize" type="unsigned long">
7605 <desc>Guest system memory balloon size in megabytes (transient property).</desc>
7606 </attribute>
7607
7608 <attribute name="pageFusionEnabled" type="boolean">
7609 <desc>Flag whether page fusion is enabled or not.</desc>
7610 </attribute>
7611
7612 <attribute name="statisticsUpdateInterval" type="unsigned long">
7613 <desc>Interval to update guest statistics in seconds.</desc>
7614 </attribute>
7615
7616 <method name="internalGetStatistics">
7617 <desc>
7618 Internal method; do not use as it might change at any time
7619 </desc>
7620 <param name="cpuUser" type="unsigned long" dir="out">
7621 <desc>Percentage of processor time spent in user mode as seen by the guest</desc>
7622 </param>
7623 <param name="cpuKernel" type="unsigned long" dir="out">
7624 <desc>Percentage of processor time spent in kernel mode as seen by the guest</desc>
7625 </param>
7626 <param name="cpuIdle" type="unsigned long" dir="out">
7627 <desc>Percentage of processor time spent idling as seen by the guest</desc>
7628 </param>
7629 <param name="memTotal" type="unsigned long" dir="out">
7630 <desc>Total amount of physical guest RAM</desc>
7631 </param>
7632 <param name="memFree" type="unsigned long" dir="out">
7633 <desc>Free amount of physical guest RAM</desc>
7634 </param>
7635 <param name="memBalloon" type="unsigned long" dir="out">
7636 <desc>Amount of ballooned physical guest RAM</desc>
7637 </param>
7638 <param name="memShared" type="unsigned long" dir="out">
7639 <desc>Amount of shared physical guest RAM</desc>
7640 </param>
7641 <param name="memCache" type="unsigned long" dir="out">
7642 <desc>Total amount of guest (disk) cache memory</desc>
7643 </param>
7644 <param name="pagedTotal" type="unsigned long" dir="out">
7645 <desc>Total amount of space in the page file</desc>
7646 </param>
7647 <param name="memAllocTotal" type="unsigned long" dir="out">
7648 <desc>Total amount of memory allocated by the hypervisor</desc>
7649 </param>
7650 <param name="memFreeTotal" type="unsigned long" dir="out">
7651 <desc>Total amount of free memory available in the hypervisor</desc>
7652 </param>
7653 <param name="memBalloonTotal" type="unsigned long" dir="out">
7654 <desc>Total amount of memory ballooned by the hypervisor</desc>
7655 </param>
7656 <param name="memSharedTotal" type="unsigned long" dir="out">
7657 <desc>Total amount of shared memory in the hypervisor</desc>
7658 </param>
7659 </method>
7660
7661 <method name="setCredentials">
7662 <desc>
7663 Store login credentials that can be queried by guest operating
7664 systems with Additions installed. The credentials are transient
7665 to the session and the guest may also choose to erase them. Note
7666 that the caller cannot determine whether the guest operating system
7667 has queried or made use of the credentials.
7668
7669 <result name="VBOX_E_VM_ERROR">
7670 VMM device is not available.
7671 </result>
7672
7673 </desc>
7674 <param name="userName" type="wstring" dir="in">
7675 <desc>User name string, can be empty</desc>
7676 </param>
7677 <param name="password" type="wstring" dir="in">
7678 <desc>Password string, can be empty</desc>
7679 </param>
7680 <param name="domain" type="wstring" dir="in">
7681 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7682 </param>
7683 <param name="allowInteractiveLogon" type="boolean" dir="in">
7684 <desc>
7685 Flag whether the guest should alternatively allow the user to
7686 interactively specify different credentials. This flag might
7687 not be supported by all versions of the Additions.
7688 </desc>
7689 </param>
7690 </method>
7691
7692 <method name="executeProcess">
7693 <desc>
7694 Executes an existing program inside the guest VM.
7695
7696 <result name="VBOX_E_IPRT_ERROR">
7697 Could not execute process.
7698 </result>
7699
7700 </desc>
7701 <param name="execName" type="wstring" dir="in">
7702 <desc>
7703 Full path name of the command to execute on the guest; the
7704 commands has to exists in the guest VM in order to be executed.
7705 </desc>
7706 </param>
7707 <param name="flags" type="unsigned long" dir="in">
7708 <desc>
7709 Execution flags - currently not supported and therefore
7710 has to be set to 0.
7711 </desc>
7712 </param>
7713 <param name="arguments" type="wstring" safearray="yes" dir="in">
7714 <desc>
7715 Array of arguments passed to the execution command.
7716 </desc>
7717 </param>
7718 <param name="environment" type="wstring" safearray="yes" dir="in">
7719 <desc>
7720 Environment variables that can be set while the command is being
7721 executed, in form of "NAME=VALUE"; one pair per entry. To unset a
7722 variable just set its name ("NAME") without a value.
7723 </desc>
7724 </param>
7725 <param name="userName" type="wstring" dir="in">
7726 <desc>
7727 User name under which the command will be executed; has to exist
7728 and have the appropriate rights to execute programs in the VM.
7729 </desc>
7730 </param>
7731 <param name="password" type="wstring" dir="in">
7732 <desc>
7733 Password of the user account specified.
7734 </desc>
7735 </param>
7736 <param name="timeoutMS" type="unsigned long" dir="in">
7737 <desc>
7738 The maximum timeout value (in msec) to wait for finished program
7739 execution. Pass 0 for an infinite timeout.
7740 </desc>
7741 </param>
7742 <param name="pid" type="unsigned long" dir="out">
7743 <desc>
7744 The PID (process ID) of the started command for later reference.
7745 </desc>
7746 </param>
7747 <param name="progress" type="IProgress" dir="return">
7748 <desc>Progress object to track the operation completion.</desc>
7749 </param>
7750 </method>
7751
7752 <method name="getProcessOutput">
7753 <desc>
7754 Retrieves output of a formerly started process.
7755
7756 <result name="VBOX_E_IPRT_ERROR">
7757 Could not retrieve output.
7758 </result>
7759
7760 </desc>
7761 <param name="pid" type="unsigned long" dir="in">
7762 <desc>
7763 Process id returned by earlier executeProcess() call.
7764 </desc>
7765 </param>
7766 <param name="flags" type="unsigned long" dir="in">
7767 <desc>
7768 Flags describing which output to retrieve.
7769 </desc>
7770 </param>
7771 <param name="timeoutMS" type="unsigned long" dir="in">
7772 <desc>
7773 The maximum timeout value (in msec) to wait for output
7774 data. Pass 0 for an infinite timeout.
7775 </desc>
7776 </param>
7777 <param name="size" type="unsigned long long" dir="in">
7778 <desc>
7779 Size in bytes to read in the buffer.
7780 </desc>
7781 </param>
7782 <param name="data" type="octet" dir="return" safearray="yes">
7783 <desc>
7784 Buffer for retrieving the actual output. A data size of 0 means end of file
7785 if the requested size was not 0. This is the unprocessed
7786 output data, i.e. the line ending style depends on the platform of
7787 the system the server is running on.
7788 </desc>
7789 </param>
7790 </method>
7791
7792 <method name="getProcessStatus">
7793 <desc>
7794 Retrieves status, exit code and the exit reason of a formerly started process.
7795
7796 <result name="VBOX_E_IPRT_ERROR">
7797 Process with specified PID was not found.
7798 </result>
7799
7800 </desc>
7801 <param name="pid" type="unsigned long" dir="in">
7802 <desc>
7803 Process id returned by earlier executeProcess() call.
7804 </desc>
7805 </param>
7806 <param name="exitcode" type="unsigned long" dir="out">
7807 <desc>
7808 The exit code (if available).
7809 </desc>
7810 </param>
7811 <param name="flags" type="unsigned long" dir="out">
7812 <desc>
7813 Additional flags of process status (not used at the moment).
7814 </desc>
7815 </param>
7816 <param name="reason" type="unsigned long" dir="return">
7817 <desc>
7818 The current process status.
7819 </desc>
7820 </param>
7821 </method>
7822
7823 </interface>
7824
7825
7826 <!--
7827 // IProgress
7828 /////////////////////////////////////////////////////////////////////////
7829 -->
7830
7831 <interface
7832 name="IProgress" extends="$unknown"
7833 uuid="856aa038-853f-42e2-acf7-6e7b02dbe294"
7834 wsmap="managed"
7835 >
7836 <desc>
7837 The IProgress interface is used to track and control
7838 asynchronous tasks within VirtualBox.
7839
7840 An instance of this is returned every time VirtualBox starts
7841 an asynchronous task (in other words, a separate thread) which
7842 continues to run after a method call returns. For example,
7843 <link to="IConsole::saveState" />, which saves the state of
7844 a running virtual machine, can take a long time to complete.
7845 To be able to display a progress bar, a user interface such as
7846 the VirtualBox graphical user interface can use the IProgress
7847 object returned by that method.
7848
7849 Note that IProgress is a "read-only" interface in the sense
7850 that only the VirtualBox internals behind the Main API can
7851 create and manipulate progress objects, whereas client code
7852 can only use the IProgress object to monitor a task's
7853 progress and, if <link to="#cancelable" /> is @c true,
7854 cancel the task by calling <link to="#cancel" />.
7855
7856 A task represented by IProgress consists of either one or
7857 several sub-operations that run sequentially, one by one (see
7858 <link to="#operation" /> and <link to="#operationCount" />).
7859 Every operation is identified by a number (starting from 0)
7860 and has a separate description.
7861
7862 You can find the individual percentage of completion of the current
7863 operation in <link to="#operationPercent" /> and the
7864 percentage of completion of the task as a whole
7865 in <link to="#percent" />.
7866
7867 Similarly, you can wait for the completion of a particular
7868 operation via <link to="#waitForOperationCompletion" /> or
7869 for the completion of the whole task via
7870 <link to="#waitForCompletion" />.
7871 </desc>
7872
7873 <attribute name="id" type="uuid" mod="string" readonly="yes">
7874 <desc>ID of the task.</desc>
7875 </attribute>
7876
7877 <attribute name="description" type="wstring" readonly="yes">
7878 <desc>Description of the task.</desc>
7879 </attribute>
7880
7881 <attribute name="initiator" type="$unknown" readonly="yes">
7882 <desc>Initiator of the task.</desc>
7883 </attribute>
7884
7885 <attribute name="cancelable" type="boolean" readonly="yes">
7886 <desc>Whether the task can be interrupted.</desc>
7887 </attribute>
7888
7889 <attribute name="percent" type="unsigned long" readonly="yes">
7890 <desc>
7891 Current progress value of the task as a whole, in percent.
7892 This value depends on how many operations are already complete.
7893 Returns 100 if <link to="#completed" /> is @c true.
7894 </desc>
7895 </attribute>
7896
7897 <attribute name="timeRemaining" type="long" readonly="yes">
7898 <desc>
7899 Estimated remaining time until the task completes, in
7900 seconds. Returns 0 once the task has completed; returns -1
7901 if the remaining time cannot be computed, in particular if
7902 the current progress is 0.
7903
7904 Even if a value is returned, the estimate will be unreliable
7905 for low progress values. It will become more reliable as the
7906 task progresses; it is not recommended to display an ETA
7907 before at least 20% of a task have completed.
7908 </desc>
7909 </attribute>
7910
7911 <attribute name="completed" type="boolean" readonly="yes">
7912 <desc>Whether the task has been completed.</desc>
7913 </attribute>
7914
7915 <attribute name="canceled" type="boolean" readonly="yes">
7916 <desc>Whether the task has been canceled.</desc>
7917 </attribute>
7918
7919 <attribute name="resultCode" type="long" readonly="yes">
7920 <desc>
7921 Result code of the progress task.
7922 Valid only if <link to="#completed"/> is @c true.
7923 </desc>
7924 </attribute>
7925
7926 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7927 <desc>
7928 Extended information about the unsuccessful result of the
7929 progress operation. May be @c null if no extended information
7930 is available.
7931 Valid only if <link to="#completed"/> is @c true and
7932 <link to="#resultCode"/> indicates a failure.
7933 </desc>
7934 </attribute>
7935
7936 <attribute name="operationCount" type="unsigned long" readonly="yes">
7937 <desc>
7938 Number of sub-operations this task is divided into.
7939 Every task consists of at least one suboperation.
7940 </desc>
7941 </attribute>
7942
7943 <attribute name="operation" type="unsigned long" readonly="yes">
7944 <desc>Number of the sub-operation being currently executed.</desc>
7945 </attribute>
7946
7947 <attribute name="operationDescription" type="wstring" readonly="yes">
7948 <desc>
7949 Description of the sub-operation being currently executed.
7950 </desc>
7951 </attribute>
7952
7953 <attribute name="operationPercent" type="unsigned long" readonly="yes">
7954 <desc>Progress value of the current sub-operation only, in percent.</desc>
7955 </attribute>
7956
7957 <attribute name="timeout" type="unsigned long">
7958 <desc>
7959 When non-zero, this specifies the number of milliseconds after which
7960 the operation will automatically be canceled. This can only be set on
7961 cancelable objects.
7962 </desc>
7963 </attribute>
7964
7965 <method name="setCurrentOperationProgress">
7966 <desc>Internal method, not to be called externally.</desc>
7967 <param name="percent" type="unsigned long" dir="in" />
7968 </method>
7969 <method name="setNextOperation">
7970 <desc>Internal method, not to be called externally.</desc>
7971 <param name="nextOperationDescription" type="wstring" dir="in" />
7972 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
7973 </method>
7974
7975 <method name="waitForCompletion">
7976 <desc>
7977 Waits until the task is done (including all sub-operations)
7978 with a given timeout in milliseconds; specify -1 for an indefinite wait.
7979
7980 Note that the VirtualBox/XPCOM/COM/native event queues of the calling
7981 thread are not processed while waiting. Neglecting event queues may
7982 have dire consequences (degrade performance, resource hogs,
7983 deadlocks, etc.), this is specially so for the main thread on
7984 platforms using XPCOM. Callers are adviced wait for short periods
7985 and service their event queues between calls, or to create a worker
7986 thread to do the waiting.
7987
7988 <result name="VBOX_E_IPRT_ERROR">
7989 Failed to wait for task completion.
7990 </result>
7991 </desc>
7992
7993 <param name="timeout" type="long" dir="in">
7994 <desc>
7995 Maximum time in milliseconds to wait or -1 to wait indefinitely.
7996 </desc>
7997 </param>
7998 </method>
7999
8000 <method name="waitForOperationCompletion">
8001 <desc>
8002 Waits until the given operation is done with a given timeout in
8003 milliseconds; specify -1 for an indefinite wait.
8004
8005 See <link to="#waitForCompletion"> for event queue considerations.</link>
8006
8007 <result name="VBOX_E_IPRT_ERROR">
8008 Failed to wait for operation completion.
8009 </result>
8010
8011 </desc>
8012 <param name="operation" type="unsigned long" dir="in">
8013 <desc>
8014 Number of the operation to wait for.
8015 Must be less than <link to="#operationCount"/>.
8016 </desc>
8017 </param>
8018 <param name="timeout" type="long" dir="in">
8019 <desc>
8020 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8021 </desc>
8022 </param>
8023 </method>
8024
8025 <method name="cancel">
8026 <desc>
8027 Cancels the task.
8028 <note>
8029 If <link to="#cancelable"/> is @c false, then this method will fail.
8030 </note>
8031
8032 <result name="VBOX_E_INVALID_OBJECT_STATE">
8033 Operation cannot be canceled.
8034 </result>
8035
8036 </desc>
8037 </method>
8038
8039 </interface>
8040
8041 <!--
8042 // ISnapshot
8043 /////////////////////////////////////////////////////////////////////////
8044 -->
8045
8046 <interface
8047 name="ISnapshot" extends="$unknown"
8048 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8049 wsmap="managed"
8050 >
8051 <desc>
8052 The ISnapshot interface represents a snapshot of the virtual
8053 machine.
8054
8055 Together with the differencing media that are created
8056 when a snapshot is taken, a machine can be brought back to
8057 the exact state it was in when the snapshot was taken.
8058
8059 The ISnapshot interface has no methods, only attributes; snapshots
8060 are controlled through methods of the <link to="IConsole" /> interface
8061 which also manage the media associated with the snapshot.
8062 The following operations exist:
8063
8064 <ul>
8065 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8066 by creating new, empty differencing images for the machine's
8067 media and saving the VM settings and (if the VM is running)
8068 the current VM state in the snapshot.
8069
8070 The differencing images will then receive all data written to
8071 the machine's media, while their parent (base) images
8072 remain unmodified after the snapshot has been taken (see
8073 <link to="IMedium" /> for details about differencing images).
8074 This simplifies restoring a machine to the state of a snapshot:
8075 only the differencing images need to be deleted.
8076
8077 The current machine state is not changed by taking a snapshot.
8078 If the machine is running, it will resume execution after the
8079 snapshot has been taken.
8080 </li>
8081
8082 <li><link to="IConsole::restoreSnapshot"/>: this goes back to
8083 a previous snapshot. This resets the machine's state to that of
8084 the previous snapshot by deleting the differencing image of each
8085 of the machine's media and setting the machine's settings
8086 and state to the state that was saved in the snapshot (if any).
8087
8088 This destroys the machine's current state.
8089 </li>
8090
8091 <li><link to="IConsole::deleteSnapshot"/>: deletes a snapshot
8092 without affecting the current machine state.
8093
8094 This does not change the machine, but instead frees the resources
8095 allocated when the snapshot was taken: the settings and machine state
8096 is deleted (if any), and the snapshot's differencing image for each
8097 of the machine's media gets merged with its parent image.
8098
8099 Neither the current machine state nor other snapshots are affected
8100 by this operation, except that parent media will be modified
8101 to contain the disk data associated with the snapshot being deleted.
8102 </li>
8103 </ul>
8104
8105 Each snapshot contains the settings of the virtual machine (hardware
8106 configuration etc.). In addition, if the machine was running when the
8107 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8108 the current VM state is saved in the snapshot (similarly to what happens
8109 when a VM's state is saved). The snapshot is then said to
8110 be <i>online</i> because when restoring it, the VM will be running.
8111
8112 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8113 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8114
8115 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8116 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8117 it then contains a so-called "zero execution state", representing a
8118 machine that is powered off.
8119
8120 <h3>Snapshot branches and the "current" snapshot</h3>
8121
8122 Snapshots can be chained, whereby every next snapshot is based on the
8123 previous one. This chaining is related to medium branching
8124 (see the <link to="IMedium"/> description) in that every time
8125 a new snapshot is created, a new differencing medium is implicitly
8126 created for all normal media attached to the machine.
8127
8128 Each virtual machine has a "current snapshot", identified by
8129 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8130 to the last snapshot in the chain. In a future version of VirtualBox,
8131 it will be possible to reset a machine's current state to that of an
8132 earlier snapshot without deleting the current state so that it will be
8133 possible to create alternative snapshot paths in a snapshot tree.
8134
8135 In the current implementation, multiple snapshot branches within one
8136 virtual machine are not allowed. Every machine has a single branch,
8137 and <link to="IConsole::takeSnapshot"/> operation adds a new
8138 snapshot to the top of that branch.
8139 </desc>
8140
8141 <attribute name="id" type="uuid" mod="string" readonly="yes">
8142 <desc>UUID of the snapshot.</desc>
8143 </attribute>
8144
8145 <attribute name="name" type="wstring">
8146 <desc>Short name of the snapshot.</desc>
8147 </attribute>
8148
8149 <attribute name="description" type="wstring">
8150 <desc>Optional description of the snapshot.</desc>
8151 </attribute>
8152
8153 <attribute name="timeStamp" type="long long" readonly="yes">
8154 <desc>
8155 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8156 </desc>
8157 </attribute>
8158
8159 <attribute name="online" type="boolean" readonly="yes">
8160 <desc>
8161 @c true if this snapshot is an online snapshot and @c false otherwise.
8162
8163 When this attribute is @c true, the
8164 <link to="IMachine::stateFilePath"/> attribute of the
8165 <link to="#machine"/> object associated with this snapshot
8166 will point to the saved state file. Otherwise, it will be
8167 an empty string.
8168 </desc>
8169 </attribute>
8170
8171 <attribute name="machine" type="IMachine" readonly="yes">
8172 <desc>
8173 Virtual machine this snapshot is taken on. This object
8174 stores all settings the machine had when taking this snapshot.
8175 <note>
8176 The returned machine object is immutable, i.e. no
8177 any settings can be changed.
8178 </note>
8179 </desc>
8180 </attribute>
8181
8182 <attribute name="parent" type="ISnapshot" readonly="yes">
8183 <desc>
8184 Parent snapshot (a snapshot this one is based on), or
8185 @c null if the snapshot has no parent (i.e. is the first snapshot).
8186 </desc>
8187 </attribute>
8188
8189 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8190 <desc>
8191 Child snapshots (all snapshots having this one as a parent).
8192 </desc>
8193 </attribute>
8194
8195 </interface>
8196
8197
8198 <!--
8199 // IMedium
8200 /////////////////////////////////////////////////////////////////////////
8201 -->
8202
8203 <enum
8204 name="MediumState"
8205 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8206 >
8207 <desc>
8208 Virtual medium state.
8209 <see>IMedium</see>
8210 </desc>
8211
8212 <const name="NotCreated" value="0">
8213 <desc>
8214 Associated medium storage does not exist (either was not created yet or
8215 was deleted).
8216 </desc>
8217 </const>
8218 <const name="Created" value="1">
8219 <desc>
8220 Associated storage exists and accessible; this gets set if the
8221 accessibility check performed by <link to="IMedium::refreshState" />
8222 was successful.
8223 </desc>
8224 </const>
8225 <const name="LockedRead" value="2">
8226 <desc>
8227 Medium is locked for reading (see <link to="IMedium::lockRead"/>),
8228 no data modification is possible.
8229 </desc>
8230 </const>
8231 <const name="LockedWrite" value="3">
8232 <desc>
8233 Medium is locked for writing (see <link to="IMedium::lockWrite"/>),
8234 no concurrent data reading or modification is possible.
8235 </desc>
8236 </const>
8237 <const name="Inaccessible" value="4">
8238 <desc>
8239 Medium accessiblity check (see <link to="IMedium::refreshState" />) has
8240 not yet been performed, or else, associated medium storage is not
8241 accessible. In the first case, <link to="IMedium::lastAccessError"/>
8242 is empty, in the second case, it describes the error that occured.
8243 </desc>
8244 </const>
8245 <const name="Creating" value="5">
8246 <desc>
8247 Associated medium storage is being created.
8248 </desc>
8249 </const>
8250 <const name="Deleting" value="6">
8251 <desc>
8252 Associated medium storage is being deleted.
8253 </desc>
8254 </const>
8255 </enum>
8256
8257 <enum
8258 name="MediumType"
8259 uuid="46bf1fd4-ad86-4ded-8c49-28bd2d148e5a"
8260 >
8261 <desc>
8262 Virtual medium type.
8263 <see>IMedium</see>
8264 </desc>
8265
8266 <const name="Normal" value="0">
8267 <desc>
8268 Normal medium (attached directly or indirectly, preserved
8269 when taking snapshots).
8270 </desc>
8271 </const>
8272 <const name="Immutable" value="1">
8273 <desc>
8274 Immutable medium (attached indirectly, changes are wiped out
8275 the next time the virtual machine is started).
8276 </desc>
8277 </const>
8278 <const name="Writethrough" value="2">
8279 <desc>
8280 Write through medium (attached directly, ignored when
8281 taking snapshots).
8282 </desc>
8283 </const>
8284 <const name="Shareable" value="3">
8285 <desc>
8286 Allow using this medium concurrently by several machines.
8287 <note>Present since VirtualBox 3.2.0, and accepted since 3.2.8.</note>
8288 </desc>
8289 </const>
8290 </enum>
8291
8292 <enum
8293 name="MediumVariant"
8294 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8295 >
8296 <desc>
8297 Virtual medium image variant. More than one flag may be set.
8298 <see>IMedium</see>
8299 </desc>
8300
8301 <const name="Standard" value="0">
8302 <desc>
8303 No particular variant requested, results in using the backend default.
8304 </desc>
8305 </const>
8306 <const name="VmdkSplit2G" value="0x01">
8307 <desc>
8308 VMDK image split in chunks of less than 2GByte.
8309 </desc>
8310 </const>
8311 <const name="VmdkStreamOptimized" value="0x04">
8312 <desc>
8313 VMDK streamOptimized image. Special import/export format which is
8314 read-only/append-only.
8315 </desc>
8316 </const>
8317 <const name="VmdkESX" value="0x08">
8318 <desc>
8319 VMDK format variant used on ESX products.
8320 </desc>
8321 </const>
8322 <const name="Fixed" value="0x10000">
8323 <desc>
8324 Fixed image. Only allowed for base images.
8325 </desc>
8326 </const>
8327 <const name="Diff" value="0x20000">
8328 <desc>
8329 Differencing image. Only allowed for child images.
8330 </desc>
8331 </const>
8332 </enum>
8333
8334 <interface
8335 name="IMediumAttachment" extends="$unknown"
8336 uuid="c29452cc-ca72-404b-9261-cfc514f1e412"
8337 wsmap="struct"
8338 >
8339 <desc>
8340 The IMediumAttachment interface links storage media to virtual machines.
8341 For each medium (<link to="IMedium"/>) which has been attached to a
8342 storage controller (<link to="IStorageController"/>) of a machine
8343 (<link to="IMachine"/>) via the <link to="IMachine::attachDevice" />
8344 method, one instance of IMediumAttachment is added to the machine's
8345 <link to="IMachine::mediumAttachments"/> array attribute.
8346
8347 Each medium attachment specifies the storage controller as well as a
8348 port and device number and the IMedium instance representing a virtual
8349 hard disk or floppy or DVD image.
8350
8351 For removeable media (DVDs or floppies), there are two additional
8352 options. For one, the IMedium instance can be @c null to represent
8353 an empty drive with no media inserted (see <link to="IMachine::mountMedium" />);
8354 secondly, the medium can be one of the pseudo-media for host drives
8355 listed in <link to="IHost::DVDDrives"/> or <link to="IHost::floppyDrives"/>.
8356 </desc>
8357
8358 <attribute name="medium" type="IMedium" readonly="yes">
8359 <desc>Medium object associated with this attachment; it
8360 can be @c null for removable devices.</desc>
8361 </attribute>
8362
8363 <attribute name="controller" type="wstring" readonly="yes">
8364 <desc>Name of the storage controller of this attachment; this
8365 refers to one of the controllers in <link to="IMachine::storageControllers" />
8366 by name.</desc>
8367 </attribute>
8368
8369 <attribute name="port" type="long" readonly="yes">
8370 <desc>Port number of this attachment.
8371 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8372 </desc>
8373 </attribute>
8374
8375 <attribute name="device" type="long" readonly="yes">
8376 <desc>Device slot number of this attachment.
8377 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8378 </desc>
8379 </attribute>
8380
8381 <attribute name="type" type="DeviceType" readonly="yes">
8382 <desc>Device type of this attachment.</desc>
8383 </attribute>
8384
8385 <attribute name="passthrough" type="boolean" readonly="yes">
8386 <desc>Pass I/O requests through to a device on the host.</desc>
8387 </attribute>
8388
8389 <attribute name="bandwidthLimit" type="unsigned long">
8390 <desc>
8391 Maximum throughput allowed for this medium attachment, in units of 1 mbps.
8392 A zero value means uncapped/unlimited.
8393 </desc>
8394 </attribute>
8395
8396 </interface>
8397
8398 <interface
8399 name="IMedium" extends="$unknown"
8400 uuid="858ea9d3-9ade-4aa7-91b7-d8a40f8f9b16"
8401 wsmap="managed"
8402 >
8403 <desc>
8404 The IMedium interface represents virtual storage for a machine's
8405 hard disks, CD/DVD or floppy drives. It will typically represent
8406 a disk image on the host, for example a VDI or VMDK file representing
8407 a virtual hard disk, or an ISO or RAW file representing virtual
8408 removable media, but can also point to a network location (e.g.
8409 for iSCSI targets).
8410
8411 Instances of IMedium are connected to virtual machines by way of
8412 medium attachments (see <link to="IMediumAttachment" />), which link
8413 the storage medium to a particular device slot of a storage controller
8414 of the virtual machine.
8415 In the VirtualBox API, virtual storage is therefore always represented
8416 by the following chain of object links:
8417
8418 <ul>
8419 <li><link to="IMachine::storageControllers"/> contains an array of
8420 storage controllers (IDE, SATA, SCSI, SAS or a floppy controller;
8421 these are instances of <link to="IStorageController"/>).</li>
8422 <li><link to="IMachine::mediumAttachments"/> contains an array of
8423 medium attachments (instances of <link to="IMediumAttachment"/>),
8424 each containing a storage controller from the above array, a
8425 port/device specification, and an instance of IMedium representing
8426 the medium storage (image file).
8427
8428 For removable media, the storage medium is optional; a medium
8429 attachment with no medium represents a CD/DVD or floppy drive
8430 with no medium inserted. By contrast, hard disk attachments
8431 will always have an IMedium object attached.</li>
8432 <li>Each IMedium in turn points to a storage unit (such as a file
8433 on the host computer or a network resource) that holds actual
8434 data. This location is represented by the <link to="#location"/>
8435 attribute.</li>
8436 </ul>
8437
8438 Existing media are opened using <link to="IVirtualBox::openMedium"/>;
8439 new hard disk media can be created with the VirtualBox API using the
8440 <link to="IVirtualBox::createHardDisk"/> method.
8441
8442 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8443 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8444 type in a regular file.
8445
8446 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8447 drive; in that case the <link to="#id" /> attribute contains the UUID of
8448 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8449
8450 <h3>Known media</h3>
8451
8452 When an existing medium is opened for the first time, it is automatically
8453 remembered by the given VirtualBox installation or, in other words, becomes
8454 a <i>known medium</i>. Known media are stored in the media
8455 registry transparently maintained by VirtualBox and stored in settings
8456 files so that this registry is preserved when VirtualBox is not running.
8457
8458 Newly created virtual media are remembered only when the associated
8459 storage unit is actually created.
8460
8461 All known media can be enumerated using
8462 <link to="IVirtualBox::hardDisks"/>,
8463 <link to="IVirtualBox::DVDImages"/> and
8464 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8465 quickly found using the <link to="IVirtualBox::findMedium"/> method.
8466
8467 Only known media can be attached to virtual machines.
8468
8469 Removing known media from the media registry is performed when the given
8470 medium is closed using the <link to="#close"/> method or when its
8471 associated storage unit is deleted.
8472
8473 <h3>Accessibility checks</h3>
8474
8475 VirtualBox defers media accessibility checks until the <link to="#refreshState" />
8476 method is called explicitly on a medium. This is done to make the VirtualBox object
8477 ready for serving requests as fast as possible and let the end-user
8478 application decide if it needs to check media accessibility right away or not.
8479
8480 As a result, when VirtualBox starts up (e.g. the VirtualBox
8481 object gets created for the first time), all known media are in the
8482 "Inaccessible" state, but the value of the <link to="#lastAccessError"/>
8483 attribute is an empty string because no actual accessibility check has
8484 been made yet.
8485
8486 After calling <link to="#refreshState" />, a medium is considered
8487 <i>accessible</i> if its storage unit can be read. In that case, the
8488 <link to="#state"/> attribute has a value of "Created". If the storage
8489 unit cannot be read (for example, because it is located on a disconnected
8490 network resource, or was accidentally deleted outside VirtualBox),
8491 the medium is considered <i>inaccessible</i>, which is indicated by the
8492 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8493 obtained by reading the <link to="#lastAccessError"/> attribute.
8494
8495 <h3>Medium types</h3>
8496
8497 There are four types of medium behavior (see <link to="MediumType" />):
8498 "normal", "immutable", "writethrough" and "shareable", represented by the
8499 <link to="#type"/> attribute. The type of the medium defines how the
8500 medium is attached to a virtual machine and what happens when a
8501 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8502 attached medium is taken. At the moment DVD and floppy media are always
8503 of type "writethrough".
8504
8505 All media can be also divided in two groups: <i>base</i> media and
8506 <i>differencing</i> media. A base medium contains all sectors of the
8507 medium data in its own storage and therefore can be used independently.
8508 In contrast, a differencing mediun is a "delta" to some other medium and
8509 contains only those sectors which differ from that other medium, which is
8510 then called a <i>parent</i>. The differencing medium is said to be
8511 <i>linked to</i> that parent. The parent may be itself a differencing
8512 medium, thus forming a chain of linked media. The last element in that
8513 chain must always be a base medium. Note that several differencing
8514 media may be linked to the same parent medium.
8515
8516 Differencing media can be distinguished from base media by querying the
8517 <link to="#parent"/> attribute: base media do not have parents they would
8518 depend on, so the value of this attribute is always @c null for them.
8519 Using this attribute, it is possible to walk up the medium tree (from the
8520 child medium to its parent). It is also possible to walk down the tree
8521 using the <link to="#children"/> attribute.
8522
8523 Note that the type of all differencing media is "normal"; all other
8524 values are meaningless for them. Base media may be of any type.
8525
8526 <h3>Creating hard disks</h3>
8527
8528 New base hard disks are created using
8529 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8530 opened using <link to="IVirtualBox::openMedium"/>. Differencing hard
8531 disks are usually implicitly created by VirtualBox when needed but may
8532 also be created explicitly using <link to="#createDiffStorage"/>.
8533
8534 After the hard disk is successfully created (including the storage unit)
8535 or opened, it becomes a known hard disk (remembered in the internal media
8536 registry). Known hard disks can be attached to a virtual machine, accessed
8537 through <link to="IVirtualBox::findMedium"/> or enumerated using the
8538 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8539
8540 The following methods, besides <link to="IMedium::close"/>,
8541 automatically remove the hard disk from the media registry:
8542 <ul>
8543 <li><link to="#deleteStorage"/></li>
8544 <li><link to="#mergeTo"/></li>
8545 </ul>
8546
8547 If the storage unit of the hard disk is a regular file in the host's
8548 file system then the rules stated in the description of the
8549 <link to="IMedium::location"/> attribute apply when setting its value. In
8550 addition, a plain file name without any path may be given, in which case
8551 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8552 folder</link> will be prepended to it.
8553
8554 <h4>Automatic composition of the file name part</h4>
8555
8556 Another extension to the <link to="IMedium::location"/> attribute is that
8557 there is a possibility to cause VirtualBox to compose a unique value for
8558 the file name part of the location using the UUID of the hard disk. This
8559 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
8560 e.g. before the storage unit is created, and works as follows. You set the
8561 value of the <link to="IMedium::location"/> attribute to a location
8562 specification which only contains the path specification but not the file
8563 name part and ends with either a forward slash or a backslash character.
8564 In response, VirtualBox will generate a new UUID for the hard disk and
8565 compose the file name using the following pattern:
8566 <pre>
8567 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8568 </pre>
8569 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8570 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8571 is the default extension for the storage format of this hard disk. After
8572 that, you may call any of the methods that create a new hard disk storage
8573 unit and they will use the generated UUID and file name.
8574
8575 <h3>Attaching Hard Disks</h3>
8576
8577 Hard disks are attached to virtual machines using the
8578 <link to="IMachine::attachDevice"/> method and detached using the
8579 <link to="IMachine::detachDevice"/> method. Depending on their
8580 <link to="#type"/>, hard disks are attached either
8581 <i>directly</i> or <i>indirectly</i>.
8582
8583 When a hard disk is being attached directly, it is associated with the
8584 virtual machine and used for hard disk operations when the machine is
8585 running. When a hard disk is being attached indirectly, a new differencing
8586 hard disk linked to it is implicitly created and this differencing hard
8587 disk is associated with the machine and used for hard disk operations.
8588 This also means that if <link to="IMachine::attachDevice"/> performs
8589 a direct attachment then the same hard disk will be returned in response
8590 to the subsequent <link to="IMachine::getMedium"/> call; however if
8591 an indirect attachment is performed then
8592 <link to="IMachine::getMedium"/> will return the implicitly created
8593 differencing hard disk, not the original one passed to <link
8594 to="IMachine::attachDevice"/>. In detail:
8595
8596 <ul>
8597 <li><b>Normal base</b> hard disks that do not have children (i.e.
8598 differencing hard disks linked to them) and that are not already
8599 attached to virtual machines in snapshots are attached <b>directly</b>.
8600 Otherwise, they are attached <b>indirectly</b> because having
8601 dependent children or being part of the snapshot makes it impossible
8602 to modify hard disk contents without breaking the integrity of the
8603 dependent party. The <link to="#readOnly"/> attribute allows to
8604 quickly determine the kind of the attachment for the given hard
8605 disk. Note that if a normal base hard disk is to be indirectly
8606 attached to a virtual machine with snapshots then a special
8607 procedure called <i>smart attachment</i> is performed (see below).</li>
8608 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
8609 they are attached <b>directly</b> if they do not have children and are
8610 not attached to virtual machines in snapshots, and <b>indirectly</b>
8611 otherwise. Note that the smart attachment procedure is never performed
8612 for differencing hard disks.</li>
8613 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
8614 they are designed to be non-writable. If an immutable hard disk is
8615 attached to a virtual machine with snapshots then a special
8616 procedure called smart attachment is performed (see below).</li>
8617 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
8618 also as designed. This also means that writethrough hard disks cannot
8619 have other hard disks linked to them at all.</li>
8620 <li><b>Shareable</b> hard disks are always attached <b>directly</b>,
8621 also as designed. This also means that shareable hard disks cannot
8622 have other hard disks linked to them at all. They behave almost
8623 like writethrough hard disks, except that shareable hard disks can
8624 be attached to several virtual machines which are running, allowing
8625 concurrent accesses. You need special cluster software running in
8626 the virtual machines to make use of such disks.</li>
8627 </ul>
8628
8629 Note that the same hard disk, regardless of its type, may be attached to
8630 more than one virtual machine at a time. In this case, the machine that is
8631 started first gains exclusive access to the hard disk and attempts to
8632 start other machines having this hard disk attached will fail until the
8633 first machine is powered down.
8634
8635 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8636 that the given hard disk remains associated with the given machine after a
8637 successful <link to="IMachine::detachDevice"/> call until
8638 <link to="IMachine::saveSettings"/> is called to save all changes to
8639 machine settings to disk. This deferring is necessary to guarantee that
8640 the hard disk configuration may be restored at any time by a call to
8641 <link to="IMachine::discardSettings"/> before the settings
8642 are saved (committed).
8643
8644 Note that if <link to="IMachine::discardSettings"/> is called after
8645 indirectly attaching some hard disks to the machine but before a call to
8646 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8647 all differencing hard disks implicitly created by
8648 <link to="IMachine::attachDevice"/> for these indirect attachments.
8649 Such implicitly created hard disks will also be immediately deleted when
8650 detached explicitly using the <link to="IMachine::detachDevice"/>
8651 call if it is made before <link to="IMachine::saveSettings"/>. This
8652 implicit deletion is safe because newly created differencing hard
8653 disks do not contain any user data.
8654
8655 However, keep in mind that detaching differencing hard disks that were
8656 implicitly created by <link to="IMachine::attachDevice"/>
8657 before the last <link to="IMachine::saveSettings"/> call will
8658 <b>not</b> implicitly delete them as they may already contain some data
8659 (for example, as a result of virtual machine execution). If these hard
8660 disks are no more necessary, the caller can always delete them explicitly
8661 using <link to="#deleteStorage"/> after they are actually de-associated
8662 from this machine by the <link to="IMachine::saveSettings"/> call.
8663
8664 <h3>Smart Attachment</h3>
8665
8666 When normal base or immutable hard disks are indirectly attached to a
8667 virtual machine then some additional steps are performed to make sure the
8668 virtual machine will have the most recent "view" of the hard disk being
8669 attached. These steps include walking through the machine's snapshots
8670 starting from the current one and going through ancestors up to the first
8671 snapshot. Hard disks attached to the virtual machine in all
8672 of the encountered snapshots are checked whether they are descendants of
8673 the given normal base or immutable hard disk. The first found child (which
8674 is the differencing hard disk) will be used instead of the normal base or
8675 immutable hard disk as a parent for creating a new differencing hard disk
8676 that will be actually attached to the machine. And only if no descendants
8677 are found or if the virtual machine does not have any snapshots then the
8678 normal base or immutable hard disk will be used itself as a parent for
8679 this differencing hard disk.
8680
8681 It is easier to explain what smart attachment does using the
8682 following example:
8683 <pre>
8684BEFORE attaching B.vdi: AFTER attaching B.vdi:
8685
8686Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8687 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8688 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8689 Snapshot 4 (none) Snapshot 4 (none)
8690 CurState (none) CurState (D3->D2.vdi)
8691
8692 NOT
8693 ...
8694 CurState (D3->B.vdi)
8695 </pre>
8696 The first column is the virtual machine configuration before the base hard
8697 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8698 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8699 mean that the hard disk that is actually attached to the machine is a
8700 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8701 another hard disk, <tt>B.vdi</tt>.
8702
8703 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8704 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8705 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8706 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8707 it cannot be attached directly and needs an indirect attachment (i.e.
8708 implicit creation of a new differencing hard disk). Due to the smart
8709 attachment procedure, the new differencing hard disk
8710 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8711 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8712 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8713 machine.
8714
8715 Note that if there is more than one descendant hard disk of the given base
8716 hard disk found in a snapshot, and there is an exact device, channel and
8717 bus match, then this exact match will be used. Otherwise, the youngest
8718 descendant will be picked up.
8719
8720 There is one more important aspect of the smart attachment procedure which
8721 is not related to snapshots at all. Before walking through the snapshots
8722 as described above, the backup copy of the current list of hard disk
8723 attachment is searched for descendants. This backup copy is created when
8724 the hard disk configuration is changed for the first time after the last
8725 <link to="IMachine::saveSettings"/> call and used by
8726 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8727 changes. When such a descendant is found in this backup copy, it will be
8728 simply re-attached back, without creating a new differencing hard disk for
8729 it. This optimization is necessary to make it possible to re-attach the
8730 base or immutable hard disk to a different bus, channel or device slot
8731 without losing the contents of the differencing hard disk actually
8732 attached to the machine in place of it.
8733 </desc>
8734
8735 <attribute name="id" type="uuid" mod="string" readonly="yes">
8736 <desc>
8737 UUID of the medium. For a newly created medium, this value is a randomly
8738 generated UUID.
8739
8740 <note>
8741 For media in one of MediumState_NotCreated, MediumState_Creating or
8742 MediumState_Deleting states, the value of this property is undefined
8743 and will most likely be an empty UUID.
8744 </note>
8745 </desc>
8746 </attribute>
8747
8748 <attribute name="description" type="wstring">
8749 <desc>
8750 Optional description of the medium. For a newly created medium the value
8751 of this attribute is an empty string.
8752
8753 Medium types that don't support this attribute will return E_NOTIMPL in
8754 attempt to get or set this attribute's value.
8755
8756 <note>
8757 For some storage types, reading this attribute may return an outdated
8758 (last known) value when <link to="#state"/> is <link
8759 to="MediumState_Inaccessible"/> or <link
8760 to="MediumState_LockedWrite"/> because the value of this attribute is
8761 stored within the storage unit itself. Also note that changing the
8762 attribute value is not possible in such case, as well as when the
8763 medium is the <link to="MediumState_LockedRead"/> state.
8764 </note>
8765 </desc>
8766 </attribute>
8767
8768 <attribute name="state" type="MediumState" readonly="yes">
8769 <desc>
8770 Returns the current medium state, which is the last state set by
8771 the accessibility check performed by <link to="#refreshState"/>.
8772 If that method has not yet been called on the medium, the state
8773 is "Inaccessible"; as opposed to truly inaccessible media, the
8774 value of <link to="#lastAccessError"/> will be an empty string in
8775 that case.
8776
8777 <note>As of version 3.1, this no longer performs an accessibility check
8778 automatically; call <link to="#refreshState"/> for that.
8779 </note>
8780 </desc>
8781 </attribute>
8782
8783 <attribute name="variant" type="MediumVariant" readonly="yes">
8784 <desc>
8785 Returns the storage format variant information for this medium.
8786 Before <link to="#refreshState"/> is called this method returns
8787 an undefined value.
8788 </desc>
8789 </attribute>
8790
8791 <attribute name="location" type="wstring">
8792 <desc>
8793 Location of the storage unit holding medium data.
8794
8795 The format of the location string is medium type specific. For medium
8796 types using regular files in a host's file system, the location
8797 string is the full file name.
8798
8799 Some medium types may support changing the storage unit location by
8800 simply changing the value of this property. If this operation is not
8801 supported, the implementation will return E_NOTIMPL in attempt to set
8802 this attribute's value.
8803
8804 When setting a value of the location attribute which is a regular file
8805 in the host's file system, the given file name may be either relative to
8806 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8807 absolute. Note that if the given location specification does not contain
8808 the file extension part then a proper default extension will be
8809 automatically appended by the implementation depending on the medium type.
8810 </desc>
8811 </attribute>
8812
8813 <attribute name="name" type="wstring" readonly="yes">
8814 <desc>
8815 Name of the storage unit holding medium data.
8816
8817 The returned string is a short version of the <link to="#location"/>
8818 attribute that is suitable for representing the medium in situations
8819 where the full location specification is too long (such as lists
8820 and comboboxes in GUI frontends). This string is also used by frontends
8821 to sort the media list alphabetically when needed.
8822
8823 For example, for locations that are regular files in the host's file
8824 system, the value of this attribute is just the file name (+ extension),
8825 without the path specification.
8826
8827 Note that as opposed to the <link to="#location"/> attribute, the name
8828 attribute will not necessary be unique for a list of media of the
8829 given type and format.
8830 </desc>
8831 </attribute>
8832
8833 <attribute name="deviceType" type="DeviceType" readonly="yes">
8834 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
8835 medium.</desc>
8836 </attribute>
8837
8838 <attribute name="hostDrive" type="boolean" readonly="yes">
8839 <desc>True if this corresponds to a drive on the host.</desc>
8840 </attribute>
8841
8842 <attribute name="size" type="unsigned long long" readonly="yes">
8843 <desc>
8844 Physical size of the storage unit used to hold medium data (in bytes).
8845
8846 <note>
8847 For media whose <link to="#state"/> is <link
8848 to="MediumState_Inaccessible"/>, the value of this property is the
8849 last known size. For <link to="MediumState_NotCreated"/> media,
8850 the returned value is zero.
8851 </note>
8852 </desc>
8853 </attribute>
8854
8855 <attribute name="format" type="wstring" readonly="yes">
8856 <desc>
8857 Storage format of this medium.
8858
8859 The value of this attribute is a string that specifies a backend used
8860 to store medium data. The storage format is defined when you create a
8861 new medium or automatically detected when you open an existing medium,
8862 and cannot be changed later.
8863
8864 The list of all storage formats supported by this VirtualBox
8865 installation can be obtained using
8866 <link to="ISystemProperties::mediumFormats"/>.
8867 </desc>
8868 </attribute>
8869
8870 <attribute name="mediumFormat" type="IMediumFormat" readonly="yes">
8871 <desc>
8872 Storage medium format object corresponding to this medium.
8873
8874 The value of this attribute is a reference to the medium format object
8875 that specifies the backend properties used to store medium data. The
8876 storage format is defined when you create a new medium or automatically
8877 detected when you open an existing medium, and cannot be changed later.
8878
8879 <note>@c null is returned if there is no associated medium format
8880 object. This can e.g. happen for medium objects representing host
8881 drives and other special medium objects.</note>
8882 </desc>
8883 </attribute>
8884
8885 <attribute name="type" type="MediumType">
8886 <desc>
8887 Type (role) of this medium.
8888
8889 The following constraints apply when changing the value of this
8890 attribute:
8891 <ul>
8892 <li>If a medium is attached to a virtual machine (either in the
8893 current state or in one of the snapshots), its type cannot be
8894 changed.
8895 </li>
8896 <li>As long as the medium has children, its type cannot be set
8897 to <link to="MediumType_Writethrough"/>.
8898 </li>
8899 <li>The type of all differencing media is
8900 <link to="MediumType_Normal"/> and cannot be changed.
8901 </li>
8902 </ul>
8903
8904 The type of a newly created or opened medium is set to
8905 <link to="MediumType_Normal"/>, except for DVD and floppy media,
8906 which have a type of <link to="MediumType_Writethrough"/>.
8907 </desc>
8908 </attribute>
8909
8910 <attribute name="parent" type="IMedium" readonly="yes">
8911 <desc>
8912 Parent of this medium (the medium this medium is directly based
8913 on).
8914
8915 Only differencing media have parents. For base (non-differencing)
8916 media, @c null is returned.
8917 </desc>
8918 </attribute>
8919
8920 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
8921 <desc>
8922 Children of this medium (all differencing media directly based
8923 on this medium). A @c null array is returned if this medium
8924 does not have any children.
8925 </desc>
8926 </attribute>
8927
8928 <attribute name="base" type="IMedium" readonly="yes">
8929 <desc>
8930 Base medium of this medium.
8931
8932 If this is a differencing medium, its base medium is the medium
8933 the given medium branch starts from. For all other types of media, this
8934 property returns the medium object itself (i.e. the same object this
8935 property is read on).
8936 </desc>
8937 </attribute>
8938
8939 <attribute name="readOnly" type="boolean" readonly="yes">
8940 <desc>
8941 Returns @c true if this medium is read-only and @c false otherwise.
8942
8943 A medium is considered to be read-only when its contents cannot be
8944 modified without breaking the integrity of other parties that depend on
8945 this medium such as its child media or snapshots of virtual machines
8946 where this medium is attached to these machines. If there are no
8947 children and no such snapshots then there is no dependency and the
8948 medium is not read-only.
8949
8950 The value of this attribute can be used to determine the kind of the
8951 attachment that will take place when attaching this medium to a
8952 virtual machine. If the value is @c false then the medium will
8953 be attached directly. If the value is @c true then the medium
8954 will be attached indirectly by creating a new differencing child
8955 medium for that. See the interface description for more information.
8956
8957 Note that all <link to="MediumType_Immutable">Immutable</link> media
8958 are always read-only while all
8959 <link to="MediumType_Writethrough">Writethrough</link> media are
8960 always not.
8961
8962 <note>
8963 The read-only condition represented by this attribute is related to
8964 the medium type and usage, not to the current
8965 <link to="IMedium::state">medium state</link> and not to the read-only
8966 state of the storage unit.
8967 </note>
8968 </desc>
8969 </attribute>
8970
8971 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
8972 <desc>
8973 Logical size of this medium (in megabytes), as reported to the
8974 guest OS running inside the virtual machine this medium is
8975 attached to. The logical size is defined when the medium is created
8976 and cannot be changed later.
8977
8978 <note>
8979 Reading this property on a differencing medium will return the size
8980 of its <link to="#base"/> medium.
8981 </note>
8982 <note>
8983 For media whose state is <link to="#state"/> is <link
8984 to="MediumState_Inaccessible"/>, the value of this property is the
8985 last known logical size. For <link to="MediumState_NotCreated"/>
8986 media, the returned value is zero.
8987 </note>
8988 </desc>
8989 </attribute>
8990
8991 <attribute name="autoReset" type="boolean">
8992 <desc>
8993 Whether this differencing medium will be automatically reset each
8994 time a virtual machine it is attached to is powered up. This
8995 attribute is automatically set to @c true for the last
8996 differencing image of an "immutable" medium (see
8997 <link to="MediumType" />).
8998
8999 See <link to="#reset"/> for more information about resetting
9000 differencing media.
9001
9002 <note>
9003 Reading this property on a base (non-differencing) medium will
9004 always @c false. Changing the value of this property in this
9005 case is not supported.
9006 </note>
9007
9008 <result name="VBOX_E_NOT_SUPPORTED">
9009 This is not a differencing medium (when changing the attribute
9010 value).
9011 </result>
9012 </desc>
9013 </attribute>
9014
9015 <attribute name="lastAccessError" type="wstring" readonly="yes">
9016 <desc>
9017 Text message that represents the result of the last accessibility
9018 check performed by <link to="#refreshState"/>.
9019
9020 An empty string is returned if the last accessibility check
9021 was successful or has not yet been called. As a result, if
9022 <link to="#state" /> is "Inaccessible" and this attribute is empty,
9023 then <link to="#refreshState"/> has yet to be called; this is the
9024 default value of media after VirtualBox initialization.
9025 A non-empty string indicates a failure and should normally describe
9026 a reason of the failure (for example, a file read error).
9027 </desc>
9028 </attribute>
9029
9030 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9031 <desc>
9032 Array of UUIDs of all machines this medium is attached to.
9033
9034 A @c null array is returned if this medium is not attached to any
9035 machine or to any machine's snapshot.
9036
9037 <note>
9038 The returned array will include a machine even if this medium is not
9039 attached to that machine in the current state but attached to it in
9040 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9041 details.
9042 </note>
9043 </desc>
9044 </attribute>
9045
9046 <method name="setIDs">
9047 <desc>
9048 Changes the UUID and parent UUID for a hard disk medium.
9049 </desc>
9050 <param name="setImageId" type="boolean" dir="in">
9051 <desc>
9052 Select whether a new image UUID is set or not.
9053 </desc>
9054 </param>
9055 <param name="imageId" type="uuid" mod="string" dir="in">
9056 <desc>
9057 New UUID for the image. If an empty string is passed, then a new
9058 UUID is automatically created, provided that @a setImageId is @c true.
9059 Specifying a zero UUID is not allowed.
9060 </desc>
9061 </param>
9062 <param name="setParentId" type="boolean" dir="in">
9063 <desc>
9064 Select whether a new parent UUID is set or not.
9065 </desc>
9066 </param>
9067 <param name="parentId" type="uuid" mod="string" dir="in">
9068 <desc>
9069 New parent UUID for the image. If an empty string is passed, then a
9070 new UUID is automatically created, provided @a setParentId is
9071 @c true. A zero UUID is valid.
9072 </desc>
9073 </param>
9074 <result name="E_INVALIDARG">
9075 Invalid parameter combination.
9076 </result>
9077 <result name="VBOX_E_NOT_SUPPORTED">
9078 Medium is not a hard disk medium.
9079 </result>
9080 </method>
9081
9082 <method name="refreshState">
9083 <desc>
9084 If the current medium state (see <link to="MediumState"/>) is one of
9085 "Created", "Inaccessible" or "LockedRead", then this performs an
9086 accessibility check on the medium and sets the value of the <link to="#state"/>
9087 attribute accordingly; that value is also returned for convenience.
9088
9089 For all other state values, this does not perform a refresh but returns
9090 the state only.
9091
9092 The refresh, if performed, may take a long time (several seconds or even
9093 minutes, depending on the storage unit location and format) because it performs an
9094 accessibility check of the storage unit. This check may cause a significant
9095 delay if the storage unit of the given medium is, for example, a file located
9096 on a network share which is not currently accessible due to connectivity
9097 problems. In that case, the call will not return until a timeout
9098 interval defined by the host OS for this operation expires. For this reason,
9099 it is recommended to never read this attribute on the main UI thread to avoid
9100 making the UI unresponsive.
9101
9102 If the last known state of the medium is "Created" and the accessibility
9103 check fails, then the state would be set to "Inaccessible", and
9104 <link to="#lastAccessError"/> may be used to get more details about the
9105 failure. If the state of the medium is "LockedRead", then it remains the
9106 same, and a non-empty value of <link to="#lastAccessError"/> will
9107 indicate a failed accessibility check in this case.
9108
9109 Note that not all medium states are applicable to all medium types.
9110 </desc>
9111 <param name="state" type="MediumState" dir="return">
9112 <desc>
9113 New medium state.
9114 </desc>
9115 </param>
9116 </method>
9117
9118 <method name="getSnapshotIds">
9119 <desc>
9120 Returns an array of UUIDs of all snapshots of the given machine where
9121 this medium is attached to.
9122
9123 If the medium is attached to the machine in the current state, then the
9124 first element in the array will always be the ID of the queried machine
9125 (i.e. the value equal to the @c machineId argument), followed by
9126 snapshot IDs (if any).
9127
9128 If the medium is not attached to the machine in the current state, then
9129 the array will contain only snapshot IDs.
9130
9131 The returned array may be @c null if this medium is not attached
9132 to the given machine at all, neither in the current state nor in one of
9133 the snapshots.
9134 </desc>
9135 <param name="machineId" type="uuid" mod="string" dir="in">
9136 <desc>
9137 UUID of the machine to query.
9138 </desc>
9139 </param>
9140 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9141 <desc>
9142 Array of snapshot UUIDs of the given machine using this medium.
9143 </desc>
9144 </param>
9145 </method>
9146
9147 <method name="lockRead">
9148 <desc>
9149 Locks this medium for reading.
9150
9151 A read lock is shared: many clients can simultaneously lock the
9152 same medium for reading unless it is already locked for writing (see
9153 <link to="#lockWrite"/>) in which case an error is returned.
9154
9155 When the medium is locked for reading, it cannot be modified
9156 from within VirtualBox. This means that any method that changes
9157 the properties of this medium or contents of the storage unit
9158 will return an error (unless explicitly stated otherwise). That
9159 includes an attempt to start a virtual machine that wants to
9160 write to the the medium.
9161
9162 When the virtual machine is started up, it locks for reading all
9163 media it uses in read-only mode. If some medium cannot be locked
9164 for reading, the startup procedure will fail.
9165 A medium is typically locked for reading while it is used by a running
9166 virtual machine but has a depending differencing image that receives
9167 the actual write operations. This way one base medium can have
9168 multiple child differencing images which can be written to
9169 simultaneously. Read-only media such as DVD and floppy images are
9170 also locked for reading only (so they can be in use by multiple
9171 machines simultaneously).
9172
9173 A medium is also locked for reading when it is the source of a
9174 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9175
9176 The medium locked for reading must be unlocked using the <link
9177 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9178 can be nested and must be followed by the same number of paired
9179 <link to="#unlockRead"/> calls.
9180
9181 This method sets the medium state (see <link to="#state"/>) to
9182 "LockedRead" on success. The medium's previous state must be
9183 one of "Created", "Inaccessible" or "LockedRead".
9184
9185 Locking an inaccessible medium is not an error; this method performs
9186 a logical lock that prevents modifications of this medium through
9187 the VirtualBox API, not a physical file-system lock of the underlying
9188 storage unit.
9189
9190 This method returns the current state of the medium
9191 <i>before</i> the operation.
9192
9193 <result name="VBOX_E_INVALID_OBJECT_STATE">
9194 Invalid medium state (e.g. not created, locked, inaccessible,
9195 creating, deleting).
9196 </result>
9197
9198 </desc>
9199 <param name="state" type="MediumState" dir="return">
9200 <desc>
9201 State of the medium after the operation.
9202 </desc>
9203 </param>
9204 </method>
9205
9206 <method name="unlockRead">
9207 <desc>
9208 Cancels the read lock previously set by <link to="#lockRead"/>.
9209
9210 For both success and failure, this method returns the current state
9211 of the medium <i>after</i> the operation.
9212
9213 See <link to="#lockRead"/> for more details.
9214
9215 <result name="VBOX_E_INVALID_OBJECT_STATE">
9216 Medium not locked for reading.
9217 </result>
9218
9219 </desc>
9220 <param name="state" type="MediumState" dir="return">
9221 <desc>
9222 State of the medium after the operation.
9223 </desc>
9224 </param>
9225 </method>
9226
9227 <method name="lockWrite">
9228 <desc>
9229 Locks this medium for writing.
9230
9231 A write lock, as opposed to <link to="#lockRead"/>, is
9232 exclusive: there may be only one client holding a write lock,
9233 and there may be no read locks while the write lock is held.
9234 As a result, read-locking fails if a write lock is held, and
9235 write-locking fails if either a read or another write lock is held.
9236
9237 When a medium is locked for writing, it cannot be modified
9238 from within VirtualBox, and it is not guaranteed that the values
9239 of its properties are up-to-date. Any method that changes the
9240 properties of this medium or contents of the storage unit will
9241 return an error (unless explicitly stated otherwise).
9242
9243 When a virtual machine is started up, it locks for writing all
9244 media it uses to write data to. If any medium could not be locked
9245 for writing, the startup procedure will fail. If a medium has
9246 differencing images, then while the machine is running, only
9247 the last ("leaf") differencing image is locked for writing,
9248 whereas its parents are locked for reading only.
9249
9250 A medium is also locked for writing when it is the target of a
9251 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9252
9253 The medium locked for writing must be unlocked using the <link
9254 to="#unlockWrite"/> method. Write locks <i>cannot</i> be nested.
9255
9256 This method sets the medium state (see <link to="#state"/>) to
9257 "LockedWrite" on success. The medium's previous state must be
9258 either "Created" or "Inaccessible".
9259
9260 Locking an inaccessible medium is not an error; this method performs
9261 a logical lock that prevents modifications of this medium through
9262 the VirtualBox API, not a physical file-system lock of the underlying
9263 storage unit.
9264
9265 For both, success and failure, this method returns the current
9266 state of the medium <i>before</i> the operation.
9267
9268 <result name="VBOX_E_INVALID_OBJECT_STATE">
9269 Invalid medium state (e.g. not created, locked, inaccessible,
9270 creating, deleting).
9271 </result>
9272
9273 </desc>
9274 <param name="state" type="MediumState" dir="return">
9275 <desc>
9276 State of the medium after the operation.
9277 </desc>
9278 </param>
9279 </method>
9280
9281 <method name="unlockWrite">
9282 <desc>
9283 Cancels the write lock previously set by <link to="#lockWrite"/>.
9284
9285 For both success and failure, this method returns the current
9286 state of the medium <i>after</i> the operation.
9287
9288 See <link to="#lockWrite"/> for more details.
9289
9290 <result name="VBOX_E_INVALID_OBJECT_STATE">
9291 Medium not locked for writing.
9292 </result>
9293
9294 </desc>
9295 <param name="state" type="MediumState" dir="return">
9296 <desc>
9297 State of the medium after the operation.
9298 </desc>
9299 </param>
9300 </method>
9301
9302 <method name="close">
9303 <desc>
9304 Closes this medium.
9305
9306 The medium must not be attached to any known virtual machine
9307 and must not have any known child media, otherwise the
9308 operation will fail.
9309
9310 When the medium is successfully closed, it is removed from
9311 the list of registered media, but its storage unit is not
9312 deleted. In particular, this means that this medium can
9313 later be opened again using the <link to="IVirtualBox::openMedium"/>
9314 call.
9315
9316 Note that after this method successfully returns, the given medium
9317 object becomes uninitialized. This means that any attempt
9318 to call any of its methods or attributes will fail with the
9319 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9320
9321 <result name="VBOX_E_INVALID_OBJECT_STATE">
9322 Invalid medium state (other than not created, created or
9323 inaccessible).
9324 </result>
9325 <result name="VBOX_E_OBJECT_IN_USE">
9326 Medium attached to virtual machine.
9327 </result>
9328 <result name="VBOX_E_FILE_ERROR">
9329 Settings file not accessible.
9330 </result>
9331 <result name="VBOX_E_XML_ERROR">
9332 Could not parse the settings file.
9333 </result>
9334
9335 </desc>
9336 </method>
9337
9338 <!-- storage methods -->
9339
9340 <method name="getProperty">
9341 <desc>
9342 Returns the value of the custom medium property with the given name.
9343
9344 The list of all properties supported by the given medium format can
9345 be obtained with <link to="IMediumFormat::describeProperties"/>.
9346
9347 Note that if this method returns an empty string in @a value, the
9348 requested property is supported but currently not assigned any value.
9349
9350 <result name="VBOX_E_OBJECT_NOT_FOUND">
9351 Requested property does not exist (not supported by the format).
9352 </result>
9353 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9354 </desc>
9355 <param name="name" type="wstring" dir="in">
9356 <desc>Name of the property to get.</desc>
9357 </param>
9358 <param name="value" type="wstring" dir="return">
9359 <desc>Current property value.</desc>
9360 </param>
9361 </method>
9362
9363 <method name="setProperty">
9364 <desc>
9365 Sets the value of the custom medium property with the given name.
9366
9367 The list of all properties supported by the given medium format can
9368 be obtained with <link to="IMediumFormat::describeProperties"/>.
9369
9370 Note that setting the property value to @c null or an empty string is
9371 equivalent to deleting the existing value. A default value (if it is
9372 defined for this property) will be used by the format backend in this
9373 case.
9374
9375 <result name="VBOX_E_OBJECT_NOT_FOUND">
9376 Requested property does not exist (not supported by the format).
9377 </result>
9378 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9379 </desc>
9380 <param name="name" type="wstring" dir="in">
9381 <desc>Name of the property to set.</desc>
9382 </param>
9383 <param name="value" type="wstring" dir="in">
9384 <desc>Property value to set.</desc>
9385 </param>
9386 </method>
9387
9388 <method name="getProperties">
9389 <desc>
9390 Returns values for a group of properties in one call.
9391
9392 The names of the properties to get are specified using the @a names
9393 argument which is a list of comma-separated property names or
9394 an empty string if all properties are to be returned. Note that currently
9395 the value of this argument is ignored and the method always returns all
9396 existing properties.
9397
9398 The list of all properties supported by the given medium format can
9399 be obtained with <link to="IMediumFormat::describeProperties"/>.
9400
9401 The method returns two arrays, the array of property names corresponding
9402 to the @a names argument and the current values of these properties.
9403 Both arrays have the same number of elements with each elemend at the
9404 given index in the first array corresponds to an element at the same
9405 index in the second array.
9406
9407 Note that for properties that do not have assigned values,
9408 an empty string is returned at the appropriate index in the
9409 @a returnValues array.
9410
9411 </desc>
9412 <param name="names" type="wstring" dir="in">
9413 <desc>
9414 Names of properties to get.
9415 </desc>
9416 </param>
9417 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9418 <desc>Names of returned properties.</desc>
9419 </param>
9420 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9421 <desc>Values of returned properties.</desc>
9422 </param>
9423 </method>
9424
9425 <method name="setProperties">
9426 <desc>
9427 Sets values for a group of properties in one call.
9428
9429 The names of the properties to set are passed in the @a names
9430 array along with the new values for them in the @a values array. Both
9431 arrays have the same number of elements with each elemend at the given
9432 index in the first array corresponding to an element at the same index
9433 in the second array.
9434
9435 If there is at least one property name in @a names that is not valid,
9436 the method will fail before changing the values of any other properties
9437 from the @a names array.
9438
9439 Using this method over <link to="#setProperty"/> is preferred if you
9440 need to set several properties at once since it will result into less
9441 IPC calls.
9442
9443 The list of all properties supported by the given medium format can
9444 be obtained with <link to="IMediumFormat::describeProperties"/>.
9445
9446 Note that setting the property value to @c null or an empty string is
9447 equivalent to deleting the existing value. A default value (if it is
9448 defined for this property) will be used by the format backend in this
9449 case.
9450 </desc>
9451 <param name="names" type="wstring" safearray="yes" dir="in">
9452 <desc>Names of properties to set.</desc>
9453 </param>
9454 <param name="values" type="wstring" safearray="yes" dir="in">
9455 <desc>Values of properties to set.</desc>
9456 </param>
9457 </method>
9458
9459 <!-- storage methods -->
9460
9461 <method name="createBaseStorage">
9462 <desc>
9463 Starts creating a hard disk storage unit (fixed/dynamic, according
9464 to the variant flags) in in the background. The previous storage unit
9465 created for this object, if any, must first be deleted using
9466 <link to="#deleteStorage"/>, otherwise the operation will fail.
9467
9468 Before the operation starts, the medium is placed in
9469 <link to="MediumState_Creating"/> state. If the create operation
9470 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
9471 state.
9472
9473 After the returned progress object reports that the operation has
9474 successfully completed, the medium state will be set to <link
9475 to="MediumState_Created"/>, the medium will be remembered by this
9476 VirtualBox installation and may be attached to virtual machines.
9477
9478 <result name="VBOX_E_NOT_SUPPORTED">
9479 The variant of storage creation operation is not supported. See <link
9480 to="IMediumFormat::capabilities"/>.
9481 </result>
9482 </desc>
9483 <param name="logicalSize" type="unsigned long long" dir="in">
9484 <desc>Maximum logical size of the medium in megabytes.</desc>
9485 </param>
9486 <param name="variant" type="MediumVariant" dir="in">
9487 <desc>Exact image variant which should be created.</desc>
9488 </param>
9489 <param name="progress" type="IProgress" dir="return">
9490 <desc>Progress object to track the operation completion.</desc>
9491 </param>
9492 </method>
9493
9494 <method name="deleteStorage">
9495 <desc>
9496 Starts deleting the storage unit of this medium.
9497
9498 The medium must not be attached to any known virtual machine and must
9499 not have any known child media, otherwise the operation will fail.
9500 It will also fail if there is no storage unit to delete or if deletion
9501 is already in progress, or if the medium is being in use (locked for
9502 read or for write) or inaccessible. Therefore, the only valid state for
9503 this operation to succeed is <link to="MediumState_Created"/>.
9504
9505 Before the operation starts, the medium is placed in
9506 <link to="MediumState_Deleting"/> state and gets removed from the list
9507 of remembered hard disks (media registry). If the delete operation
9508 fails, the medium will be remembered again and placed back to
9509 <link to="MediumState_Created"/> state.
9510
9511 After the returned progress object reports that the operation is
9512 complete, the medium state will be set to
9513 <link to="MediumState_NotCreated"/> and you will be able to use one of
9514 the storage creation methods to create it again.
9515
9516 <see>#close()</see>
9517
9518 <result name="VBOX_E_OBJECT_IN_USE">
9519 Medium is attached to a virtual machine.
9520 </result>
9521 <result name="VBOX_E_NOT_SUPPORTED">
9522 Storage deletion is not allowed because neither of storage creation
9523 operations are supported. See
9524 <link to="IMediumFormat::capabilities"/>.
9525 </result>
9526
9527 <note>
9528 If the deletion operation fails, it is not guaranteed that the storage
9529 unit still exists. You may check the <link to="IMedium::state"/> value
9530 to answer this question.
9531 </note>
9532 </desc>
9533 <param name="progress" type="IProgress" dir="return">
9534 <desc>Progress object to track the operation completion.</desc>
9535 </param>
9536 </method>
9537
9538 <!-- diff methods -->
9539
9540 <method name="createDiffStorage">
9541 <desc>
9542 Starts creating an empty differencing storage unit based on this
9543 medium in the format and at the location defined by the @a target
9544 argument.
9545
9546 The target medium must be in <link to="MediumState_NotCreated"/>
9547 state (i.e. must not have an existing storage unit). Upon successful
9548 completion, this operation will set the type of the target medium to
9549 <link to="MediumType_Normal"/> and create a storage unit necessary to
9550 represent the differencing medium data in the given format (according
9551 to the storage format of the target object).
9552
9553 After the returned progress object reports that the operation is
9554 successfully complete, the target medium gets remembered by this
9555 VirtualBox installation and may be attached to virtual machines.
9556
9557 <note>
9558 The medium will be set to <link to="MediumState_LockedRead"/>
9559 state for the duration of this operation.
9560 </note>
9561 <result name="VBOX_E_OBJECT_IN_USE">
9562 Medium not in @c NotCreated state.
9563 </result>
9564 </desc>
9565 <param name="target" type="IMedium" dir="in">
9566 <desc>Target medium.</desc>
9567 </param>
9568 <param name="variant" type="MediumVariant" dir="in">
9569 <desc>Exact image variant which should be created.</desc>
9570 </param>
9571 <param name="progress" type="IProgress" dir="return">
9572 <desc>Progress object to track the operation completion.</desc>
9573 </param>
9574 </method>
9575
9576 <method name="mergeTo">
9577 <desc>
9578 Starts merging the contents of this medium and all intermediate
9579 differencing media in the chain to the given target medium.
9580
9581 The target medium must be either a descendant of this medium or
9582 its ancestor (otherwise this method will immediately return a failure).
9583 It follows that there are two logical directions of the merge operation:
9584 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9585 ancestor (<i>backward merge</i>). Let us consider the following medium
9586 chain:
9587
9588 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9589
9590 Here, calling this method on the <tt>Base</tt> medium object with
9591 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9592 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9593 merge. Note that in both cases the contents of the resulting medium
9594 will be the same, the only difference is the medium object that takes
9595 the result of the merge operation. In case of the forward merge in the
9596 above example, the result will be written to <tt>Diff_2</tt>; in case of
9597 the backward merge, the result will be written to <tt>Base</tt>. In
9598 other words, the result of the operation is always stored in the target
9599 medium.
9600
9601 Upon successful operation completion, the storage units of all media in
9602 the chain between this (source) medium and the target medium, including
9603 the source medium itself, will be automatically deleted and the
9604 relevant medium objects (including this medium) will become
9605 uninitialized. This means that any attempt to call any of
9606 their methods or attributes will fail with the
9607 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9608 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9609 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> media.
9610 Note that <tt>Diff_2</tt> in this case will become a base medium
9611 itself since it will no longer be based on any other medium.
9612
9613 Considering the above, all of the following conditions must be met in
9614 order for the merge operation to succeed:
9615 <ul>
9616 <li>
9617 Neither this (source) medium nor any intermediate
9618 differencing medium in the chain between it and the target
9619 medium is attached to any virtual machine.
9620 </li>
9621 <li>
9622 Neither the source medium nor the target medium is an
9623 <link to="MediumType_Immutable"/> medium.
9624 </li>
9625 <li>
9626 The part of the medium tree from the source medium to the
9627 target medium is a linear chain, i.e. all medium in this
9628 chain have exactly one child which is the next medium in this
9629 chain. The only exception from this rule is the target medium in
9630 the forward merge operation; it is allowed to have any number of
9631 child media because the merge operation will not change its
9632 logical contents (as it is seen by the guest OS or by children).
9633 </li>
9634 <li>
9635 None of the involved media are in
9636 <link to="MediumState_LockedRead"/> or
9637 <link to="MediumState_LockedWrite"/> state.
9638 </li>
9639 </ul>
9640
9641 <note>
9642 This (source) medium and all intermediates will be placed to <link
9643 to="MediumState_Deleting"/> state and the target medium will be
9644 placed to <link to="MediumState_LockedWrite"/> state and for the
9645 duration of this operation.
9646 </note>
9647 </desc>
9648 <param name="target" type="IMedium" dir="in">
9649 <desc>Target medium.</desc>
9650 </param>
9651 <param name="progress" type="IProgress" dir="return">
9652 <desc>Progress object to track the operation completion.</desc>
9653 </param>
9654 </method>
9655
9656 <!-- clone method -->
9657
9658 <method name="cloneTo">
9659 <desc>
9660 Starts creating a clone of this medium in the format and at the
9661 location defined by the @a target argument.
9662
9663 The target medium must be either in <link to="MediumState_NotCreated"/>
9664 state (i.e. must not have an existing storage unit) or in
9665 <link to="MediumState_Created"/> state (i.e. created and not locked, and
9666 big enough to hold the data or else the copy will be partial). Upon
9667 successful completion, the cloned medium will contain exactly the
9668 same sector data as the medium being cloned, except that in the
9669 first case a new UUID for the clone will be randomly generated, and in
9670 the second case the UUID will remain unchanged.
9671
9672 The @a parent argument defines which medium will be the parent
9673 of the clone. Passing a @c null reference indicates that the clone will
9674 be a base image, i.e. completely independent. It is possible to specify
9675 an arbitrary medium for this parameter, including the parent of the
9676 medium which is being cloned. Even cloning to a child of the source
9677 medium is possible. Note that when cloning to an existing image, the
9678 @a parent irgument is ignored.
9679
9680 After the returned progress object reports that the operation is
9681 successfully complete, the target medium gets remembered by this
9682 VirtualBox installation and may be attached to virtual machines.
9683
9684 <note>
9685 This medium will be placed to <link to="MediumState_LockedRead"/>
9686 state for the duration of this operation.
9687 </note>
9688 <result name="E_NOTIMPL">
9689 The specified cloning variant is not supported at the moment.
9690 </result>
9691 </desc>
9692 <param name="target" type="IMedium" dir="in">
9693 <desc>Target medium.</desc>
9694 </param>
9695 <param name="variant" type="MediumVariant" dir="in">
9696 <desc>Exact image variant which should be created.</desc>
9697 </param>
9698 <param name="parent" type="IMedium" dir="in">
9699 <desc>Parent of the cloned medium.</desc>
9700 </param>
9701 <param name="progress" type="IProgress" dir="return">
9702 <desc>Progress object to track the operation completion.</desc>
9703 </param>
9704 </method>
9705
9706 <!-- other methods -->
9707
9708 <method name="compact">
9709 <desc>
9710 Starts compacting of this medium. This means that the medium is
9711 transformed into a possibly more compact storage representation.
9712 This potentially creates temporary images, which can require a
9713 substantial amount of additional disk space.
9714
9715 This medium will be placed to <link to="MediumState_LockedWrite"/>
9716 state and all its parent media (if any) will be placed to
9717 <link to="MediumState_LockedRead"/> state for the duration of this
9718 operation.
9719
9720 Please note that the results can be either returned straight away,
9721 or later as the result of the background operation via the object
9722 returned via the @a progress parameter.
9723
9724 <result name="VBOX_E_NOT_SUPPORTED">
9725 Medium format does not support compacting (but potentially
9726 needs it).
9727 </result>
9728 </desc>
9729 <param name="progress" type="IProgress" dir="return">
9730 <desc>Progress object to track the operation completion.</desc>
9731 </param>
9732 </method>
9733
9734 <method name="resize">
9735 <desc>
9736 Starts resizing this medium. This means that the nominal size of the
9737 medium is set to the new value. Both increasing and decreasing the
9738 size is possible, and there are no safety checks, since VirtualBox
9739 does not make any assumptions about the medium contents.
9740
9741 Resizing usually needs additional disk space, and possibly also
9742 some temporary disk space. Note that resize does not create a full
9743 temporary copy of the medium, so the additional disk space requirement
9744 is usually much lower than using the clone operation.
9745
9746 This medium will be placed to <link to="MediumState_LockedWrite"/>
9747 state for the duration of this operation.
9748
9749 Please note that the results can be either returned straight away,
9750 or later as the result of the background operation via the object
9751 returned via the @a progress parameter.
9752
9753 <result name="VBOX_E_NOT_SUPPORTED">
9754 Medium format does not support resizing.
9755 </result>
9756 </desc>
9757 <param name="logicalSize" type="unsigned long long" dir="in">
9758 <desc>New nominal capacity of the medium in megabytes.</desc>
9759 </param>
9760 <param name="progress" type="IProgress" dir="return">
9761 <desc>Progress object to track the operation completion.</desc>
9762 </param>
9763 </method>
9764
9765 <method name="reset">
9766 <desc>
9767 Starts erasing the contents of this differencing medium.
9768
9769 This operation will reset the differencing medium to its initial
9770 state when it does not contain any sector data and any read operation is
9771 redirected to its parent medium. This automatically gets called
9772 during VM power-up for every medium whose <link to="#autoReset" />
9773 attribute is @c true.
9774
9775 The medium will be write-locked for the duration of this operation (see
9776 <link to="#lockWrite" />).
9777
9778 <result name="VBOX_E_NOT_SUPPORTED">
9779 This is not a differencing medium.
9780 </result>
9781 <result name="VBOX_E_INVALID_OBJECT_STATE">
9782 Medium is not in <link to="MediumState_Created"/> or
9783 <link to="MediumState_Inaccessible"/> state.
9784 </result>
9785 </desc>
9786 <param name="progress" type="IProgress" dir="return">
9787 <desc>Progress object to track the operation completion.</desc>
9788 </param>
9789 </method>
9790
9791 </interface>
9792
9793
9794 <!--
9795 // IMediumFormat
9796 /////////////////////////////////////////////////////////////////////////
9797 -->
9798
9799 <enum
9800 name="DataType"
9801 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9802 >
9803 <const name="Int32" value="0"/>
9804 <const name="Int8" value="1"/>
9805 <const name="String" value="2"/>
9806 </enum>
9807
9808 <enum
9809 name="DataFlags"
9810 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9811 >
9812 <const name="None" value="0x00"/>
9813 <const name="Mandatory" value="0x01"/>
9814 <const name="Expert" value="0x02"/>
9815 <const name="Array" value="0x04"/>
9816 <const name="FlagMask" value="0x07"/>
9817 </enum>
9818
9819 <enum
9820 name="MediumFormatCapabilities"
9821 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
9822 >
9823 <desc>
9824 Medium format capability flags.
9825 </desc>
9826
9827 <const name="Uuid" value="0x01">
9828 <desc>
9829 Supports UUIDs as expected by VirtualBox code.
9830 </desc>
9831 </const>
9832
9833 <const name="CreateFixed" value="0x02">
9834 <desc>
9835 Supports creating fixed size images, allocating all space instantly.
9836 </desc>
9837 </const>
9838
9839 <const name="CreateDynamic" value="0x04">
9840 <desc>
9841 Supports creating dynamically growing images, allocating space on
9842 demand.
9843 </desc>
9844 </const>
9845
9846 <const name="CreateSplit2G" value="0x08">
9847 <desc>
9848 Supports creating images split in chunks of a bit less than 2 GBytes.
9849 </desc>
9850 </const>
9851
9852 <const name="Differencing" value="0x10">
9853 <desc>
9854 Supports being used as a format for differencing media (see <link
9855 to="IMedium::createDiffStorage"/>).
9856 </desc>
9857 </const>
9858
9859 <const name="Asynchronous" value="0x20">
9860 <desc>
9861 Supports asynchronous I/O operations for at least some configurations.
9862 </desc>
9863 </const>
9864
9865 <const name="File" value="0x40">
9866 <desc>
9867 The format backend operates on files (the <link to="IMedium::location"/>
9868 attribute of the medium specifies a file used to store medium
9869 data; for a list of supported file extensions see
9870 <link to="IMediumFormat::fileExtensions"/>).
9871 </desc>
9872 </const>
9873
9874 <const name="Properties" value="0x80">
9875 <desc>
9876 The format backend uses the property interface to configure the storage
9877 location and properties (the <link to="IMediumFormat::describeProperties"/>
9878 method is used to get access to properties supported by the given medium format).
9879 </desc>
9880 </const>
9881
9882 <const name="CapabilityMask" value="0xFF"/>
9883 </enum>
9884
9885 <interface
9886 name="IMediumFormat" extends="$unknown"
9887 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
9888 wsmap="managed"
9889 >
9890 <desc>
9891 The IMediumFormat interface represents a medium format.
9892
9893 Each medium format has an associated backend which is used to handle
9894 media stored in this format. This interface provides information
9895 about the properties of the associated backend.
9896
9897 Each medium format is identified by a string represented by the
9898 <link to="#id"/> attribute. This string is used in calls like
9899 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9900 format.
9901
9902 The list of all supported medium formats can be obtained using
9903 <link to="ISystemProperties::mediumFormats"/>.
9904
9905 <see>IMedium</see>
9906 </desc>
9907
9908 <attribute name="id" type="wstring" readonly="yes">
9909 <desc>
9910 Identifier of this format.
9911
9912 The format identifier is a non-@c null non-empty ASCII string. Note that
9913 this string is case-insensitive. This means that, for example, all of
9914 the following strings:
9915 <pre>
9916 "VDI"
9917 "vdi"
9918 "VdI"</pre>
9919 refer to the same medium format.
9920
9921 This string is used in methods of other interfaces where it is necessary
9922 to specify a medium format, such as
9923 <link to="IVirtualBox::createHardDisk"/>.
9924 </desc>
9925 </attribute>
9926
9927 <attribute name="name" type="wstring" readonly="yes">
9928 <desc>
9929 Human readable description of this format.
9930
9931 Mainly for use in file open dialogs.
9932 </desc>
9933 </attribute>
9934
9935 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9936 <desc>
9937 Array of strings containing the supported file extensions.
9938
9939 The first extension in the array is the extension preferred by the
9940 backend. It is recommended to use this extension when specifying a
9941 location of the storage unit for a new medium.
9942
9943 Note that some backends do not work on files, so this array may be
9944 empty.
9945
9946 <see>IMediumFormat::capabilities</see>
9947 </desc>
9948 </attribute>
9949
9950 <attribute name="capabilities" type="unsigned long" readonly="yes">
9951 <desc>
9952 Capabilities of the format as a set of bit flags.
9953
9954 For the meaning of individual capability flags see
9955 <link to="MediumFormatCapabilities"/>.
9956 </desc>
9957 </attribute>
9958
9959 <method name="describeProperties">
9960 <desc>
9961 Returns several arrays describing the properties supported by this
9962 format.
9963
9964 An element with the given index in each array describes one
9965 property. Thus, the number of elements in each returned array is the
9966 same and corresponds to the number of supported properties.
9967
9968 The returned arrays are filled in only if the
9969 <link to="MediumFormatCapabilities_Properties"/> flag is set.
9970 All arguments must be non-@c null.
9971
9972 <see>DataType</see>
9973 <see>DataFlags</see>
9974 </desc>
9975
9976 <param name="names" type="wstring" safearray="yes" dir="out">
9977 <desc>Array of property names.</desc>
9978 </param>
9979 <param name="description" type="wstring" safearray="yes" dir="out">
9980 <desc>Array of property descriptions.</desc>
9981 </param>
9982 <param name="types" type="DataType" safearray="yes" dir="out">
9983 <desc>Array of property types.</desc>
9984 </param>
9985 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9986 <desc>Array of property flags.</desc>
9987 </param>
9988 <param name="defaults" type="wstring" safearray="yes" dir="out">
9989 <desc>Array of default property values.</desc>
9990 </param>
9991 </method>
9992
9993 </interface>
9994
9995
9996 <!--
9997 // IKeyboard
9998 /////////////////////////////////////////////////////////////////////////
9999 -->
10000
10001 <interface
10002 name="IKeyboard" extends="$unknown"
10003 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10004 wsmap="managed"
10005 >
10006 <desc>
10007 The IKeyboard interface represents the virtual machine's keyboard. Used
10008 in <link to="IConsole::keyboard"/>.
10009
10010 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10011 to the virtual machine.
10012
10013 </desc>
10014 <method name="putScancode">
10015 <desc>Sends a scancode to the keyboard.
10016
10017 <result name="VBOX_E_IPRT_ERROR">
10018 Could not send scan code to virtual keyboard.
10019 </result>
10020
10021 </desc>
10022 <param name="scancode" type="long" dir="in"/>
10023 </method>
10024
10025 <method name="putScancodes">
10026 <desc>Sends an array of scancodes to the keyboard.
10027
10028 <result name="VBOX_E_IPRT_ERROR">
10029 Could not send all scan codes to virtual keyboard.
10030 </result>
10031
10032 </desc>
10033 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10034 <param name="codesStored" type="unsigned long" dir="return"/>
10035 </method>
10036
10037 <method name="putCAD">
10038 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10039 function is nothing special, it is just a convenience function
10040 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10041
10042 <result name="VBOX_E_IPRT_ERROR">
10043 Could not send all scan codes to virtual keyboard.
10044 </result>
10045
10046 </desc>
10047 </method>
10048
10049 </interface>
10050
10051
10052 <!--
10053 // IMouse
10054 /////////////////////////////////////////////////////////////////////////
10055 -->
10056
10057 <enum
10058 name="MouseButtonState"
10059 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10060 >
10061 <desc>
10062 Mouse button state.
10063 </desc>
10064
10065 <const name="LeftButton" value="0x01"/>
10066 <const name="RightButton" value="0x02"/>
10067 <const name="MiddleButton" value="0x04"/>
10068 <const name="WheelUp" value="0x08"/>
10069 <const name="WheelDown" value="0x10"/>
10070 <const name="XButton1" value="0x20"/>
10071 <const name="XButton2" value="0x40"/>
10072 <const name="MouseStateMask" value="0x7F"/>
10073 </enum>
10074
10075 <interface
10076 name="IMouse" extends="$unknown"
10077 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
10078 wsmap="managed"
10079 >
10080 <desc>
10081 The IMouse interface represents the virtual machine's mouse. Used in
10082 <link to="IConsole::mouse"/>.
10083
10084 Through this interface, the virtual machine's virtual mouse can be
10085 controlled.
10086 </desc>
10087
10088 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10089 <desc>
10090 Whether the guest OS supports absolute mouse pointer positioning
10091 or not.
10092 <note>
10093 You can use the <link to="IMouseCapabilityChangedEvent"/>
10094 event to be instantly informed about changes of this attribute
10095 during virtual machine execution.
10096 </note>
10097 <see><link to="#putMouseEventAbsolute"/></see>
10098 </desc>
10099 </attribute>
10100
10101 <attribute name="relativeSupported" type="boolean" readonly="yes">
10102 <desc>
10103 Whether the guest OS supports relative mouse pointer positioning
10104 or not.
10105 <note>
10106 You can use the <link to="IMouseCapabilityChangedEvent"/>
10107 event to be instantly informed about changes of this attribute
10108 during virtual machine execution.
10109 </note>
10110 <see><link to="#putMouseEvent"/></see>
10111 </desc>
10112 </attribute>
10113
10114 <attribute name="needsHostCursor" type="boolean" readonly="yes">
10115 <desc>
10116 Whether the guest OS can currently switch to drawing it's own mouse
10117 cursor on demand.
10118 <note>
10119 You can use the <link to="IMouseCapabilityChangedEvent"/>
10120 event to be instantly informed about changes of this attribute
10121 during virtual machine execution.
10122 </note>
10123 <see><link to="#putMouseEvent"/></see>
10124 </desc>
10125 </attribute>
10126
10127 <method name="putMouseEvent">
10128 <desc>
10129 Initiates a mouse event using relative pointer movements
10130 along x and y axis.
10131
10132 <result name="E_ACCESSDENIED">
10133 Console not powered up.
10134 </result>
10135 <result name="VBOX_E_IPRT_ERROR">
10136 Could not send mouse event to virtual mouse.
10137 </result>
10138
10139 </desc>
10140
10141 <param name="dx" type="long" dir="in">
10142 <desc>
10143 Amount of pixels the mouse should move to the right.
10144 Negative values move the mouse to the left.
10145 </desc>
10146 </param>
10147 <param name="dy" type="long" dir="in">
10148 <desc>
10149 Amount of pixels the mouse should move downwards.
10150 Negative values move the mouse upwards.
10151 </desc>
10152 </param>
10153 <param name="dz" type="long" dir="in">
10154 <desc>
10155 Amount of mouse wheel moves.
10156 Positive values describe clockwise wheel rotations,
10157 negative values describe counterclockwise rotations.
10158 </desc>
10159 </param>
10160 <param name="dw" type="long" dir="in">
10161 <desc>
10162 Amount of horizontal mouse wheel moves.
10163 Positive values describe a movement to the left,
10164 negative values describe a movement to the right.
10165 </desc>
10166 </param>
10167 <param name="buttonState" type="long" dir="in">
10168 <desc>
10169 The current state of mouse buttons. Every bit represents
10170 a mouse button as follows:
10171 <table>
10172 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10173 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10174 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10175 </table>
10176 A value of <tt>1</tt> means the corresponding button is pressed.
10177 otherwise it is released.
10178 </desc>
10179 </param>
10180 </method>
10181
10182 <method name="putMouseEventAbsolute">
10183 <desc>
10184 Positions the mouse pointer using absolute x and y coordinates.
10185 These coordinates are expressed in pixels and
10186 start from <tt>[1,1]</tt> which corresponds to the top left
10187 corner of the virtual display.
10188
10189 <result name="E_ACCESSDENIED">
10190 Console not powered up.
10191 </result>
10192 <result name="VBOX_E_IPRT_ERROR">
10193 Could not send mouse event to virtual mouse.
10194 </result>
10195
10196 <note>
10197 This method will have effect only if absolute mouse
10198 positioning is supported by the guest OS.
10199 </note>
10200
10201 <see><link to="#absoluteSupported"/></see>
10202 </desc>
10203
10204 <param name="x" type="long" dir="in">
10205 <desc>
10206 X coordinate of the pointer in pixels, starting from @c 1.
10207 </desc>
10208 </param>
10209 <param name="y" type="long" dir="in">
10210 <desc>
10211 Y coordinate of the pointer in pixels, starting from @c 1.
10212 </desc>
10213 </param>
10214 <param name="dz" type="long" dir="in">
10215 <desc>
10216 Amount of mouse wheel moves.
10217 Positive values describe clockwise wheel rotations,
10218 negative values describe counterclockwise rotations.
10219 </desc>
10220 </param>
10221 <param name="dw" type="long" dir="in">
10222 <desc>
10223 Amount of horizontal mouse wheel moves.
10224 Positive values describe a movement to the left,
10225 negative values describe a movement to the right.
10226 </desc>
10227 </param>
10228 <param name="buttonState" type="long" dir="in">
10229 <desc>
10230 The current state of mouse buttons. Every bit represents
10231 a mouse button as follows:
10232 <table>
10233 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10234 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10235 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10236 </table>
10237 A value of @c 1 means the corresponding button is pressed.
10238 otherwise it is released.
10239 </desc>
10240 </param>
10241 </method>
10242
10243 </interface>
10244
10245 <!--
10246 // IDisplay
10247 /////////////////////////////////////////////////////////////////////////
10248 -->
10249
10250 <enum
10251 name="FramebufferPixelFormat"
10252 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10253 >
10254 <desc>
10255 Format of the video memory buffer. Constants represented by this enum can
10256 be used to test for particular values of <link
10257 to="IFramebuffer::pixelFormat"/>. See also <link
10258 to="IFramebuffer::requestResize"/>.
10259
10260 See also www.fourcc.org for more information about FOURCC pixel formats.
10261 </desc>
10262
10263 <const name="Opaque" value="0">
10264 <desc>
10265 Unknown buffer format (the user may not assume any particular format of
10266 the buffer).
10267 </desc>
10268 </const>
10269 <const name="FOURCC_RGB" value="0x32424752">
10270 <desc>
10271 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10272 bit layout).
10273 </desc>
10274 </const>
10275 </enum>
10276
10277 <interface
10278 name="IFramebuffer" extends="$unknown"
10279 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10280 wsmap="suppress"
10281 >
10282 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10283 <desc>Address of the start byte of the frame buffer.</desc>
10284 </attribute>
10285
10286 <attribute name="width" type="unsigned long" readonly="yes">
10287 <desc>Frame buffer width, in pixels.</desc>
10288 </attribute>
10289
10290 <attribute name="height" type="unsigned long" readonly="yes">
10291 <desc>Frame buffer height, in pixels.</desc>
10292 </attribute>
10293
10294 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10295 <desc>
10296 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10297 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10298 are: 8, 15, 16, 24 and 32.
10299 </desc>
10300 </attribute>
10301
10302 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10303 <desc>
10304 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10305 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10306 size of the scan line must be aligned to 32 bits.
10307 </desc>
10308 </attribute>
10309
10310 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10311 <desc>
10312 Frame buffer pixel format. It's either one of the values defined by <link
10313 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10314 <note>
10315 This attribute must never return <link
10316 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10317 <link to="#address"/> points to must be always known.
10318 </note>
10319 </desc>
10320 </attribute>
10321
10322 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10323 <desc>
10324 Defines whether this frame buffer uses the virtual video card's memory
10325 buffer (guest VRAM) directly or not. See <link
10326 to="IFramebuffer::requestResize"/> for more information.
10327 </desc>
10328 </attribute>
10329
10330 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10331 <desc>
10332 Hint from the frame buffer about how much of the standard
10333 screen height it wants to use for itself. This information is
10334 exposed to the guest through the VESA BIOS and VMMDev interface
10335 so that it can use it for determining its video mode table. It
10336 is not guaranteed that the guest respects the value.
10337 </desc>
10338 </attribute>
10339
10340 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10341 <desc>
10342 An alpha-blended overlay which is superposed over the frame buffer.
10343 The initial purpose is to allow the display of icons providing
10344 information about the VM state, including disk activity, in front
10345 ends which do not have other means of doing that. The overlay is
10346 designed to controlled exclusively by IDisplay. It has no locking
10347 of its own, and any changes made to it are not guaranteed to be
10348 visible until the affected portion of IFramebuffer is updated. The
10349 overlay can be created lazily the first time it is requested. This
10350 attribute can also return @c null to signal that the overlay is not
10351 implemented.
10352 </desc>
10353 </attribute>
10354
10355 <attribute name="winId" type="unsigned long long" readonly="yes">
10356 <desc>
10357 Platform-dependent identifier of the window where context of this
10358 frame buffer is drawn, or zero if there's no such window.
10359 </desc>
10360 </attribute>
10361
10362 <method name="lock">
10363 <desc>
10364 Locks the frame buffer.
10365 Gets called by the IDisplay object where this frame buffer is
10366 bound to.
10367 </desc>
10368 </method>
10369
10370 <method name="unlock">
10371 <desc>
10372 Unlocks the frame buffer.
10373 Gets called by the IDisplay object where this frame buffer is
10374 bound to.
10375 </desc>
10376 </method>
10377
10378 <method name="notifyUpdate">
10379 <desc>
10380 Informs about an update.
10381 Gets called by the display object where this buffer is
10382 registered.
10383 </desc>
10384 <param name="x" type="unsigned long" dir="in"/>
10385 <param name="y" type="unsigned long" dir="in"/>
10386 <param name="width" type="unsigned long" dir="in"/>
10387 <param name="height" type="unsigned long" dir="in"/>
10388 </method>
10389
10390 <method name="requestResize">
10391 <desc>
10392 Requests a size and pixel format change.
10393
10394 There are two modes of working with the video buffer of the virtual
10395 machine. The <i>indirect</i> mode implies that the IFramebuffer
10396 implementation allocates a memory buffer for the requested display mode
10397 and provides it to the virtual machine. In <i>direct</i> mode, the
10398 IFramebuffer implementation uses the memory buffer allocated and owned
10399 by the virtual machine. This buffer represents the video memory of the
10400 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10401 usually faster because the implementation gets a raw pointer to the
10402 guest VRAM buffer which it can directly use for visualizing the contents
10403 of the virtual display, as opposed to the indirect mode where the
10404 contents of guest VRAM are copied to the memory buffer provided by
10405 the implementation every time a display update occurs.
10406
10407 It is important to note that the direct mode is really fast only when
10408 the implementation uses the given guest VRAM buffer directly, for
10409 example, by blitting it to the window representing the virtual machine's
10410 display, which saves at least one copy operation comparing to the
10411 indirect mode. However, using the guest VRAM buffer directly is not
10412 always possible: the format and the color depth of this buffer may be
10413 not supported by the target window, or it may be unknown (opaque) as in
10414 case of text or non-linear multi-plane VGA video modes. In this case,
10415 the indirect mode (that is always available) should be used as a
10416 fallback: when the guest VRAM contents are copied to the
10417 implementation-provided memory buffer, color and format conversion is
10418 done automatically by the underlying code.
10419
10420 The @a pixelFormat parameter defines whether the direct mode is
10421 available or not. If @a pixelFormat is <link
10422 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10423 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10424 @a bytesPerLine parameters must be ignored and the implementation must use
10425 the indirect mode (where it provides its own buffer in one of the
10426 supported formats). In all other cases, @a pixelFormat together with
10427 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10428 buffer pointed to by the @a VRAM parameter and the implementation is
10429 free to choose which mode to use. To indicate that this frame buffer uses
10430 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10431 attribute must return @c true and <link to="#address"/> must
10432 return exactly the same address that is passed in the @a VRAM parameter
10433 of this method; otherwise it is assumed that the indirect strategy is
10434 chosen.
10435
10436 The @a width and @a height parameters represent the size of the
10437 requested display mode in both modes. In case of indirect mode, the
10438 provided memory buffer should be big enough to store data of the given
10439 display mode. In case of direct mode, it is guaranteed that the given
10440 @a VRAM buffer contains enough space to represent the display mode of the
10441 given size. Note that this frame buffer's <link to="#width"/> and <link
10442 to="#height"/> attributes must return exactly the same values as
10443 passed to this method after the resize is completed (see below).
10444
10445 The @a finished output parameter determines if the implementation has
10446 finished resizing the frame buffer or not. If, for some reason, the
10447 resize cannot be finished immediately during this call, @a finished
10448 must be set to @c false, and the implementation must call
10449 <link to="IDisplay::resizeCompleted"/> after it has returned from
10450 this method as soon as possible. If @a finished is @c false, the
10451 machine will not call any frame buffer methods until
10452 <link to="IDisplay::resizeCompleted"/> is called.
10453
10454 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10455 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10456 this frame buffer must return exactly the same values as specified in the
10457 parameters of this method, after the resize is completed. If the
10458 indirect mode is chosen, these attributes must return values describing
10459 the format of the implementation's own memory buffer <link
10460 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10461 value must always correlate with <link to="#pixelFormat"/>. Note that
10462 the <link to="#pixelFormat"/> attribute must never return <link
10463 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10464
10465 <note>
10466 This method is called by the IDisplay object under the
10467 <link to="#lock"/> provided by this IFramebuffer
10468 implementation. If this method returns @c false in @a finished, then
10469 this lock is not released until
10470 <link to="IDisplay::resizeCompleted"/> is called.
10471 </note>
10472 </desc>
10473 <param name="screenId" type="unsigned long" dir="in">
10474 <desc>
10475 Logical screen number. Must be used in the corresponding call to
10476 <link to="IDisplay::resizeCompleted"/> if this call is made.
10477 </desc>
10478 </param>
10479 <param name="pixelFormat" type="unsigned long" dir="in">
10480 <desc>
10481 Pixel format of the memory buffer pointed to by @a VRAM.
10482 See also <link to="FramebufferPixelFormat"/>.
10483 </desc>
10484 </param>
10485 <param name="VRAM" type="octet" mod="ptr" dir="in">
10486 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10487 </param>
10488 <param name="bitsPerPixel" type="unsigned long" dir="in">
10489 <desc>Color depth, bits per pixel.</desc>
10490 </param>
10491 <param name="bytesPerLine" type="unsigned long" dir="in">
10492 <desc>Size of one scan line, in bytes.</desc>
10493 </param>
10494 <param name="width" type="unsigned long" dir="in">
10495 <desc>Width of the guest display, in pixels.</desc>
10496 </param>
10497 <param name="height" type="unsigned long" dir="in">
10498 <desc>Height of the guest display, in pixels.</desc>
10499 </param>
10500 <param name="finished" type="boolean" dir="return">
10501 <desc>
10502 Can the VM start using the new frame buffer immediately
10503 after this method returns or it should wait for
10504 <link to="IDisplay::resizeCompleted"/>.
10505 </desc>
10506 </param>
10507 </method>
10508
10509 <method name="videoModeSupported">
10510 <desc>
10511 Returns whether the frame buffer implementation is willing to
10512 support a given video mode. In case it is not able to render
10513 the video mode (or for some reason not willing), it should
10514 return @c false. Usually this method is called when the guest
10515 asks the VMM device whether a given video mode is supported
10516 so the information returned is directly exposed to the guest.
10517 It is important that this method returns very quickly.
10518 </desc>
10519 <param name="width" type="unsigned long" dir="in"/>
10520 <param name="height" type="unsigned long" dir="in"/>
10521 <param name="bpp" type="unsigned long" dir="in"/>
10522 <param name="supported" type="boolean" dir="return"/>
10523 </method>
10524
10525 <method name="getVisibleRegion">
10526 <desc>
10527 Returns the visible region of this frame buffer.
10528
10529 If the @a rectangles parameter is @c null then the value of the
10530 @a count parameter is ignored and the number of elements necessary to
10531 describe the current visible region is returned in @a countCopied.
10532
10533 If @a rectangles is not @c null but @a count is less
10534 than the required number of elements to store region data, the method
10535 will report a failure. If @a count is equal or greater than the
10536 required number of elements, then the actual number of elements copied
10537 to the provided array will be returned in @a countCopied.
10538
10539 <note>
10540 The address of the provided array must be in the process space of
10541 this IFramebuffer object.
10542 </note>
10543 <note>
10544 Method not yet implemented.
10545 </note>
10546 </desc>
10547 <param name="rectangles" type="octet" mod="ptr" dir="in">
10548 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10549 </param>
10550 <param name="count" type="unsigned long" dir="in">
10551 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10552 </param>
10553 <param name="countCopied" type="unsigned long" dir="return">
10554 <desc>Number of elements copied to the @a rectangles array.</desc>
10555 </param>
10556 </method>
10557
10558 <method name="setVisibleRegion">
10559 <desc>
10560 Suggests a new visible region to this frame buffer. This region
10561 represents the area of the VM display which is a union of regions of
10562 all top-level windows of the guest operating system running inside the
10563 VM (if the Guest Additions for this system support this
10564 functionality). This information may be used by the frontends to
10565 implement the seamless desktop integration feature.
10566
10567 <note>
10568 The address of the provided array must be in the process space of
10569 this IFramebuffer object.
10570 </note>
10571 <note>
10572 The IFramebuffer implementation must make a copy of the provided
10573 array of rectangles.
10574 </note>
10575 <note>
10576 Method not yet implemented.
10577 </note>
10578 </desc>
10579 <param name="rectangles" type="octet" mod="ptr" dir="in">
10580 <desc>Pointer to the @c RTRECT array.</desc>
10581 </param>
10582 <param name="count" type="unsigned long" dir="in">
10583 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10584 </param>
10585 </method>
10586
10587 <method name="processVHWACommand">
10588 <desc>
10589 Posts a Video HW Acceleration Command to the frame buffer for processing.
10590 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10591 are posted from quest to the host to be processed by the host hardware.
10592
10593 <note>
10594 The address of the provided command must be in the process space of
10595 this IFramebuffer object.
10596 </note>
10597 </desc>
10598
10599 <param name="command" type="octet" mod="ptr" dir="in">
10600 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10601 </param>
10602 </method>
10603
10604 </interface>
10605
10606 <interface
10607 name="IFramebufferOverlay" extends="IFramebuffer"
10608 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10609 wsmap="suppress"
10610 >
10611 <desc>
10612 The IFramebufferOverlay interface represents an alpha blended overlay
10613 for displaying status icons above an IFramebuffer. It is always created
10614 not visible, so that it must be explicitly shown. It only covers a
10615 portion of the IFramebuffer, determined by its width, height and
10616 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10617 that order) format, and may be written to directly. Do re-read the
10618 width though, after setting it, as it may be adjusted (increased) to
10619 make it more suitable for the front end.
10620 </desc>
10621 <attribute name="x" type="unsigned long" readonly="yes">
10622 <desc>X position of the overlay, relative to the frame buffer.</desc>
10623 </attribute>
10624
10625 <attribute name="y" type="unsigned long" readonly="yes">
10626 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10627 </attribute>
10628
10629 <attribute name="visible" type="boolean" readonly="no">
10630 <desc>
10631 Whether the overlay is currently visible.
10632 </desc>
10633 </attribute>
10634
10635 <attribute name="alpha" type="unsigned long" readonly="no">
10636 <desc>
10637 The global alpha value for the overlay. This may or may not be
10638 supported by a given front end.
10639 </desc>
10640 </attribute>
10641
10642 <method name="move">
10643 <desc>
10644 Changes the overlay's position relative to the IFramebuffer.
10645 </desc>
10646 <param name="x" type="unsigned long" dir="in"/>
10647 <param name="y" type="unsigned long" dir="in"/>
10648 </method>
10649
10650 </interface>
10651
10652 <interface
10653 name="IDisplay" extends="$unknown"
10654 uuid="1fa79e39-0cc9-4ab3-9df3-ed3e96b42496"
10655 wsmap="managed"
10656 >
10657 <desc>
10658 The IDisplay interface represents the virtual machine's display.
10659
10660 The object implementing this interface is contained in each
10661 <link to="IConsole::display"/> attribute and represents the visual
10662 output of the virtual machine.
10663
10664 The virtual display supports pluggable output targets represented by the
10665 IFramebuffer interface. Examples of the output target are a window on
10666 the host computer or an RDP session's display on a remote computer.
10667 </desc>
10668 <method name="getScreenResolution">
10669 <desc>Queries display width, height and color depth for given screen.</desc>
10670 <param name="screenId" type="unsigned long" dir="in"/>
10671 <param name="width" type="unsigned long" dir="out"/>
10672 <param name="height" type="unsigned long" dir="out"/>
10673 <param name="bitsPerPixel" type="unsigned long" dir="out"/>
10674 </method>
10675
10676 <method name="setFramebuffer">
10677 <desc>
10678 Sets the framebuffer for given screen.
10679 </desc>
10680 <param name="screenId" type="unsigned long" dir="in"/>
10681 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10682 </method>
10683
10684 <method name="getFramebuffer">
10685 <desc>
10686 Queries the framebuffer for given screen.
10687 </desc>
10688 <param name="screenId" type="unsigned long" dir="in"/>
10689 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10690 <param name="xOrigin" type="long" dir="out"/>
10691 <param name="yOrigin" type="long" dir="out"/>
10692 </method>
10693
10694 <method name="setVideoModeHint">
10695 <desc>
10696 Asks VirtualBox to request the given video mode from
10697 the guest. This is just a hint and it cannot be guaranteed
10698 that the requested resolution will be used. Guest Additions
10699 are required for the request to be seen by guests. The caller
10700 should issue the request and wait for a resolution change and
10701 after a timeout retry.
10702
10703 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10704 parameters means that the corresponding values should be taken from the
10705 current video mode (i.e. left unchanged).
10706
10707 If the guest OS supports multi-monitor configuration then the @a display
10708 parameter specifies the number of the guest display to send the hint to:
10709 @c 0 is the primary display, @c 1 is the first secondary and
10710 so on. If the multi-monitor configuration is not supported, @a display
10711 must be @c 0.
10712
10713 <result name="E_INVALIDARG">
10714 The @a display is not associated with any monitor.
10715 </result>
10716
10717 </desc>
10718 <param name="width" type="unsigned long" dir="in"/>
10719 <param name="height" type="unsigned long" dir="in"/>
10720 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10721 <param name="display" type="unsigned long" dir="in"/>
10722 </method>
10723
10724 <method name="setSeamlessMode">
10725 <desc>
10726 Enables or disables seamless guest display rendering (seamless desktop
10727 integration) mode.
10728 <note>
10729 Calling this method has no effect if <link
10730 to="IGuest::supportsSeamless"/> returns @c false.
10731 </note>
10732 </desc>
10733 <param name="enabled" type="boolean" dir="in"/>
10734 </method>
10735
10736 <method name="takeScreenShot">
10737 <desc>
10738 Takes a screen shot of the requested size and copies it to the
10739 32-bpp buffer allocated by the caller and pointed to by @a address.
10740 A pixel consists of 4 bytes in order: B, G, R, 0.
10741
10742 <note>This API can be used only by the COM/XPCOM C++ API as it
10743 requires pointer support. Use <link to="#takeScreenShotToArray" />
10744 with other language bindings.
10745 </note>
10746
10747 <result name="E_NOTIMPL">
10748 Feature not implemented.
10749 </result>
10750 <result name="VBOX_E_IPRT_ERROR">
10751 Could not take a screenshot.
10752 </result>
10753
10754 </desc>
10755 <param name="screenId" type="unsigned long" dir="in"/>
10756 <param name="address" type="octet" mod="ptr" dir="in"/>
10757 <param name="width" type="unsigned long" dir="in"/>
10758 <param name="height" type="unsigned long" dir="in"/>
10759 </method>
10760
10761 <method name="takeScreenShotToArray">
10762 <desc>
10763 Takes a guest screen shot of the requested size and returns it as
10764 an array of bytes in uncompressed 32-bit RGBA format.
10765 A pixel consists of 4 bytes in order: R, G, B, 0xFF.
10766
10767 This API is slow, but could be the only option to get guest screenshot
10768 for scriptable languages not allowed to manipulate with addresses
10769 directly.
10770
10771 <result name="E_NOTIMPL">
10772 Feature not implemented.
10773 </result>
10774 <result name="VBOX_E_IPRT_ERROR">
10775 Could not take a screenshot.
10776 </result>
10777 </desc>
10778 <param name="screenId" type="unsigned long" dir="in">
10779 <desc>
10780 Monitor to take screenshot from.
10781 </desc>
10782 </param>
10783 <param name="width" type="unsigned long" dir="in">
10784 <desc>
10785 Desired image width.
10786 </desc>
10787 </param>
10788 <param name="height" type="unsigned long" dir="in">
10789 <desc>
10790 Desired image height.
10791 </desc>
10792 </param>
10793 <param name="screenData" type="octet" dir="return" safearray="yes">
10794 <desc>
10795 Array with resulting screen data.
10796 </desc>
10797 </param>
10798 </method>
10799
10800 <method name="drawToScreen">
10801 <desc>
10802 Draws a 32-bpp image of the specified size from the given buffer
10803 to the given point on the VM display.
10804
10805 <result name="E_NOTIMPL">
10806 Feature not implemented.
10807 </result>
10808 <result name="VBOX_E_IPRT_ERROR">
10809 Could not draw to screen.
10810 </result>
10811
10812 </desc>
10813 <param name="screenId" type="unsigned long" dir="in"/>
10814 <param name="address" type="octet" mod="ptr" dir="in"/>
10815 <param name="x" type="unsigned long" dir="in">
10816 <desc>Relative to the screen top left corner.</desc>
10817 </param>
10818 <param name="y" type="unsigned long" dir="in">
10819 <desc>Relative to the screen top left corner.</desc>
10820 </param>
10821 <param name="width" type="unsigned long" dir="in"/>
10822 <param name="height" type="unsigned long" dir="in"/>
10823 </method>
10824
10825 <method name="invalidateAndUpdate">
10826 <desc>
10827 Does a full invalidation of the VM display and instructs the VM
10828 to update it.
10829
10830 <result name="VBOX_E_IPRT_ERROR">
10831 Could not invalidate and update screen.
10832 </result>
10833
10834 </desc>
10835 </method>
10836
10837 <method name="resizeCompleted">
10838 <desc>
10839 Signals that a framebuffer has completed the resize operation.
10840
10841 <result name="VBOX_E_NOT_SUPPORTED">
10842 Operation only valid for external frame buffers.
10843 </result>
10844
10845 </desc>
10846 <param name="screenId" type="unsigned long" dir="in"/>
10847 </method>
10848
10849 <method name="completeVHWACommand">
10850 <desc>
10851 Signals that the Video HW Acceleration command has completed.
10852 </desc>
10853
10854 <param name="command" type="octet" mod="ptr" dir="in">
10855 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
10856 </param>
10857 </method>
10858
10859 </interface>
10860
10861 <!--
10862 // INetworkAdapter
10863 /////////////////////////////////////////////////////////////////////////
10864 -->
10865
10866 <enum
10867 name="NetworkAttachmentType"
10868 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10869 >
10870 <desc>
10871 Network attachment type.
10872 </desc>
10873
10874 <const name="Null" value="0">
10875 <desc>Null value, also means "not attached".</desc>
10876 </const>
10877 <const name="NAT" value="1"/>
10878 <const name="Bridged" value="2"/>
10879 <const name="Internal" value="3"/>
10880 <const name="HostOnly" value="4"/>
10881 <const name="VDE" value="5"/>
10882 </enum>
10883
10884 <enum
10885 name="NetworkAdapterType"
10886 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
10887 >
10888 <desc>
10889 Network adapter type.
10890 </desc>
10891
10892 <const name="Null" value="0">
10893 <desc>Null value (never used by the API).</desc>
10894 </const>
10895 <const name="Am79C970A" value="1">
10896 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
10897 </const>
10898 <const name="Am79C973" value="2">
10899 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
10900 </const>
10901 <const name="I82540EM" value="3">
10902 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
10903 </const>
10904 <const name="I82543GC" value="4">
10905 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
10906 </const>
10907 <const name="I82545EM" value="5">
10908 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
10909 </const>
10910 <const name="Virtio" value="6">
10911 <desc>Virtio network device.</desc>
10912 </const>
10913 </enum>
10914
10915 <interface
10916 name="INetworkAdapter" extends="$unknown"
10917 uuid="9bf58a46-c3f7-4f31-80fa-dde9a5dc0b7b"
10918 wsmap="managed"
10919 >
10920 <desc>
10921 Represents a virtual network adapter that is attached to a virtual machine.
10922 Each virtual machine has a fixed number of network adapter slots with one
10923 instance of this attached to each of them. Call
10924 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10925 is attached to a given slot in a given machine.
10926
10927 Each network adapter can be in one of five attachment modes, which are
10928 represented by the <link to="NetworkAttachmentType" /> enumeration;
10929 see the <link to="#attachmentType" /> attribute.
10930 </desc>
10931
10932 <attribute name="adapterType" type="NetworkAdapterType">
10933 <desc>
10934 Type of the virtual network adapter. Depending on this value,
10935 VirtualBox will provide a different virtual network hardware
10936 to the guest.
10937 </desc>
10938 </attribute>
10939
10940 <attribute name="slot" type="unsigned long" readonly="yes">
10941 <desc>
10942 Slot number this adapter is plugged into. Corresponds to
10943 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10944 to obtain this instance.
10945 </desc>
10946 </attribute>
10947
10948 <attribute name="enabled" type="boolean">
10949 <desc>
10950 Flag whether the network adapter is present in the
10951 guest system. If disabled, the virtual guest hardware will
10952 not contain this network adapter. Can only be changed when
10953 the VM is not running.
10954 </desc>
10955 </attribute>
10956
10957 <attribute name="MACAddress" type="wstring">
10958 <desc>
10959 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10960 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
10961 </desc>
10962 </attribute>
10963
10964 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10965
10966 <attribute name="hostInterface" type="wstring">
10967 <desc>
10968 Name of the host network interface the VM is attached to.
10969 </desc>
10970 </attribute>
10971
10972 <attribute name="internalNetwork" type="wstring">
10973 <desc>
10974 Name of the internal network the VM is attached to.
10975 </desc>
10976 </attribute>
10977
10978 <attribute name="NATNetwork" type="wstring">
10979 <desc>
10980 Name of the NAT network the VM is attached to.
10981 </desc>
10982 </attribute>
10983
10984 <attribute name="VDENetwork" type="wstring">
10985 <desc>
10986 Name of the VDE switch the VM is attached to.
10987 </desc>
10988 </attribute>
10989
10990 <attribute name="cableConnected" type="boolean">
10991 <desc>
10992 Flag whether the adapter reports the cable as connected or not.
10993 It can be used to report offline situations to a VM.
10994 </desc>
10995 </attribute>
10996
10997 <attribute name="lineSpeed" type="unsigned long">
10998 <desc>
10999 Line speed reported by custom drivers, in units of 1 kbps.
11000 </desc>
11001 </attribute>
11002
11003 <attribute name="traceEnabled" type="boolean">
11004 <desc>
11005 Flag whether network traffic from/to the network card should be traced.
11006 Can only be toggled when the VM is turned off.
11007 </desc>
11008 </attribute>
11009
11010 <attribute name="traceFile" type="wstring">
11011 <desc>
11012 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11013 will be used.
11014 </desc>
11015 </attribute>
11016
11017 <attribute name="natDriver" type="INATEngine" readonly="yes">
11018 <desc>
11019 Points to the NAT engine which handles the network address translation
11020 for this interface. This is active only when the interface actually uses
11021 NAT (see <link to="#attachToNAT" />).
11022 </desc>
11023 </attribute>
11024
11025 <attribute name="bootPriority" type="unsigned long">
11026 <desc>
11027 Network boot priority of the adapter. Priority 1 is highest. If not set,
11028 the priority is considered to be at the lowest possible setting.
11029 </desc>
11030 </attribute>
11031
11032 <attribute name="bandwidthLimit" type="unsigned long">
11033 <desc>
11034 Maximum throughput allowed for this network adapter, in units of 1 mbps.
11035 A zero value means uncapped/unlimited.
11036 </desc>
11037 </attribute>
11038
11039 <method name="attachToNAT">
11040 <desc>
11041 Attach the network adapter to the Network Address Translation (NAT) interface.
11042 </desc>
11043 </method>
11044
11045 <method name="attachToBridgedInterface">
11046 <desc>
11047 Attach the network adapter to a bridged host interface.
11048 </desc>
11049 </method>
11050
11051 <method name="attachToInternalNetwork">
11052 <desc>
11053 Attach the network adapter to an internal network.
11054 </desc>
11055 </method>
11056
11057 <method name="attachToHostOnlyInterface">
11058 <desc>
11059 Attach the network adapter to the host-only network.
11060 </desc>
11061 </method>
11062
11063 <method name="attachToVDE">
11064 <desc>
11065 Attach the network adapter to a VDE network.
11066 </desc>
11067 </method>
11068
11069 <method name="detach">
11070 <desc>
11071 Detach the network adapter
11072 </desc>
11073 </method>
11074 </interface>
11075
11076
11077 <!--
11078 // ISerialPort
11079 /////////////////////////////////////////////////////////////////////////
11080 -->
11081
11082 <enum
11083 name="PortMode"
11084 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11085 >
11086 <desc>
11087 The PortMode enumeration represents possible communication modes for
11088 the virtual serial port device.
11089 </desc>
11090
11091 <const name="Disconnected" value="0">
11092 <desc>Virtual device is not attached to any real host device.</desc>
11093 </const>
11094 <const name="HostPipe" value="1">
11095 <desc>Virtual device is attached to a host pipe.</desc>
11096 </const>
11097 <const name="HostDevice" value="2">
11098 <desc>Virtual device is attached to a host device.</desc>
11099 </const>
11100 <const name="RawFile" value="3">
11101 <desc>Virtual device is attached to a raw file.</desc>
11102 </const>
11103 </enum>
11104
11105 <interface
11106 name="ISerialPort" extends="$unknown"
11107 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11108 wsmap="managed"
11109 >
11110
11111 <desc>
11112 The ISerialPort interface represents the virtual serial port device.
11113
11114 The virtual serial port device acts like an ordinary serial port
11115 inside the virtual machine. This device communicates to the real
11116 serial port hardware in one of two modes: host pipe or host device.
11117
11118 In host pipe mode, the #path attribute specifies the path to the pipe on
11119 the host computer that represents a serial port. The #server attribute
11120 determines if this pipe is created by the virtual machine process at
11121 machine startup or it must already exist before starting machine
11122 execution.
11123
11124 In host device mode, the #path attribute specifies the name of the
11125 serial port device on the host computer.
11126
11127 There is also a third communication mode: the disconnected mode. In this
11128 mode, the guest OS running inside the virtual machine will be able to
11129 detect the serial port, but all port write operations will be discarded
11130 and all port read operations will return no data.
11131
11132 <see>IMachine::getSerialPort</see>
11133 </desc>
11134
11135 <attribute name="slot" type="unsigned long" readonly="yes">
11136 <desc>
11137 Slot number this serial port is plugged into. Corresponds to
11138 the value you pass to <link to="IMachine::getSerialPort"/>
11139 to obtain this instance.
11140 </desc>
11141 </attribute>
11142
11143 <attribute name="enabled" type="boolean">
11144 <desc>
11145 Flag whether the serial port is enabled. If disabled,
11146 the serial port will not be reported to the guest OS.
11147 </desc>
11148 </attribute>
11149
11150 <attribute name="IOBase" type="unsigned long">
11151 <desc>Base I/O address of the serial port.</desc>
11152 </attribute>
11153
11154 <attribute name="IRQ" type="unsigned long">
11155 <desc>IRQ number of the serial port.</desc>
11156 </attribute>
11157
11158 <attribute name="hostMode" type="PortMode">
11159 <desc>
11160 How is this port connected to the host.
11161 <note>
11162 Changing this attribute may fail if the conditions for
11163 <link to="#path"/> are not met.
11164 </note>
11165 </desc>
11166 </attribute>
11167
11168 <attribute name="server" type="boolean">
11169 <desc>
11170 Flag whether this serial port acts as a server (creates a new pipe on
11171 the host) or as a client (uses the existing pipe). This attribute is
11172 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11173 </desc>
11174 </attribute>
11175
11176 <attribute name="path" type="wstring">
11177 <desc>
11178 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11179 PortMode_HostPipe, or the host serial device name when
11180 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11181 cases, setting a @c null or empty string as the attribute's value
11182 is an error. Otherwise, the value of this property is ignored.
11183 </desc>
11184 </attribute>
11185
11186 </interface>
11187
11188 <!--
11189 // IParallelPort
11190 /////////////////////////////////////////////////////////////////////////
11191 -->
11192
11193 <interface
11194 name="IParallelPort" extends="$unknown"
11195 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11196 wsmap="managed"
11197 >
11198
11199 <desc>
11200 The IParallelPort interface represents the virtual parallel port device.
11201
11202 The virtual parallel port device acts like an ordinary parallel port
11203 inside the virtual machine. This device communicates to the real
11204 parallel port hardware using the name of the parallel device on the host
11205 computer specified in the #path attribute.
11206
11207 Each virtual parallel port device is assigned a base I/O address and an
11208 IRQ number that will be reported to the guest operating system and used
11209 to operate the given parallel port from within the virtual machine.
11210
11211 <see>IMachine::getParallelPort</see>
11212 </desc>
11213
11214 <attribute name="slot" type="unsigned long" readonly="yes">
11215 <desc>
11216 Slot number this parallel port is plugged into. Corresponds to
11217 the value you pass to <link to="IMachine::getParallelPort"/>
11218 to obtain this instance.
11219 </desc>
11220 </attribute>
11221
11222 <attribute name="enabled" type="boolean">
11223 <desc>
11224 Flag whether the parallel port is enabled. If disabled,
11225 the parallel port will not be reported to the guest OS.
11226 </desc>
11227 </attribute>
11228
11229 <attribute name="IOBase" type="unsigned long">
11230 <desc>Base I/O address of the parallel port.</desc>
11231 </attribute>
11232
11233 <attribute name="IRQ" type="unsigned long">
11234 <desc>IRQ number of the parallel port.</desc>
11235 </attribute>
11236
11237 <attribute name="path" type="wstring">
11238 <desc>
11239 Host parallel device name. If this parallel port is enabled, setting a
11240 @c null or an empty string as this attribute's value will result into
11241 an error.
11242 </desc>
11243 </attribute>
11244
11245 </interface>
11246
11247
11248 <!--
11249 // IMachineDebugger
11250 /////////////////////////////////////////////////////////////////////////
11251 -->
11252
11253 <interface
11254 name="IMachineDebugger" extends="$unknown"
11255 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11256 wsmap="suppress"
11257 >
11258 <method name="resetStats">
11259 <desc>
11260 Reset VM statistics.
11261 </desc>
11262 <param name="pattern" type="wstring" dir="in">
11263 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11264 </param>
11265 </method>
11266
11267 <method name="dumpStats">
11268 <desc>
11269 Dumps VM statistics.
11270 </desc>
11271 <param name="pattern" type="wstring" dir="in">
11272 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11273 </param>
11274 </method>
11275
11276 <method name="getStats">
11277 <desc>
11278 Get the VM statistics in a XMLish format.
11279 </desc>
11280 <param name="pattern" type="wstring" dir="in">
11281 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11282 </param>
11283 <param name="withDescriptions" type="boolean" dir="in">
11284 <desc>Whether to include the descriptions.</desc>
11285 </param>
11286 <param name="stats" type="wstring" dir="out">
11287 <desc>The XML document containing the statistics.</desc>
11288 </param>
11289 </method>
11290
11291 <method name="injectNMI">
11292 <desc>
11293 Inject an NMI into a running VT-x/AMD-V VM.
11294 </desc>
11295 </method>
11296
11297 <attribute name="singlestep" type="boolean">
11298 <desc>Switch for enabling singlestepping.</desc>
11299 </attribute>
11300
11301 <attribute name="recompileUser" type="boolean">
11302 <desc>Switch for forcing code recompilation for user mode code.</desc>
11303 </attribute>
11304
11305 <attribute name="recompileSupervisor" type="boolean">
11306 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11307 </attribute>
11308
11309 <attribute name="PATMEnabled" type="boolean">
11310 <desc>Switch for enabling and disabling the PATM component.</desc>
11311 </attribute>
11312
11313 <attribute name="CSAMEnabled" type="boolean">
11314 <desc>Switch for enabling and disabling the CSAM component.</desc>
11315 </attribute>
11316
11317 <attribute name="logEnabled" type="boolean">
11318 <desc>Switch for enabling and disabling logging.</desc>
11319 </attribute>
11320
11321 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11322 <desc>
11323 Flag indicating whether the VM is currently making use of CPU hardware
11324 virtualization extensions.
11325 </desc>
11326 </attribute>
11327
11328 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11329 <desc>
11330 Flag indicating whether the VM is currently making use of the nested paging
11331 CPU hardware virtualization extension.
11332 </desc>
11333 </attribute>
11334
11335 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11336 <desc>
11337 Flag indicating whether the VM is currently making use of the VPID
11338 VT-x extension.
11339 </desc>
11340 </attribute>
11341
11342 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11343 <desc>
11344 Flag indicating whether the VM is currently making use of the Physical
11345 Address Extension CPU feature.
11346 </desc>
11347 </attribute>
11348
11349 <attribute name="virtualTimeRate" type="unsigned long">
11350 <desc>
11351 The rate at which the virtual time runs expressed as a percentage.
11352 The accepted range is 2% to 20000%.
11353 </desc>
11354 </attribute>
11355
11356 <!-- @todo method for setting log flags, groups and destination! -->
11357
11358 <attribute name="VM" type="unsigned long long" readonly="yes">
11359 <desc>
11360 Gets the VM handle. This is only for internal use while
11361 we carve the details of this interface.
11362 </desc>
11363 </attribute>
11364
11365 </interface>
11366
11367 <!--
11368 // IUSBController
11369 /////////////////////////////////////////////////////////////////////////
11370 -->
11371
11372 <interface
11373 name="IUSBController" extends="$unknown"
11374 uuid="6fdcccc5-abd3-4fec-9387-2ad3914fc4a8"
11375 wsmap="managed"
11376 >
11377 <attribute name="enabled" type="boolean">
11378 <desc>
11379 Flag whether the USB controller is present in the
11380 guest system. If disabled, the virtual guest hardware will
11381 not contain any USB controller. Can only be changed when
11382 the VM is powered off.
11383 </desc>
11384 </attribute>
11385
11386 <attribute name="enabledEhci" type="boolean">
11387 <desc>
11388 Flag whether the USB EHCI controller is present in the
11389 guest system. If disabled, the virtual guest hardware will
11390 not contain a USB EHCI controller. Can only be changed when
11391 the VM is powered off.
11392 </desc>
11393 </attribute>
11394
11395 <attribute name="proxyAvailable" type="boolean" readonly="yes">
11396 <desc>
11397 Flag whether there is an USB proxy available.
11398 </desc>
11399 </attribute>
11400
11401 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11402 <desc>
11403 USB standard version which the controller implements.
11404 This is a BCD which means that the major version is in the
11405 high byte and minor version is in the low byte.
11406 </desc>
11407 </attribute>
11408
11409 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11410 <desc>
11411 List of USB device filters associated with the machine.
11412
11413 If the machine is currently running, these filters are activated
11414 every time a new (supported) USB device is attached to the host
11415 computer that was not ignored by global filters
11416 (<link to="IHost::USBDeviceFilters"/>).
11417
11418 These filters are also activated when the machine is powered up.
11419 They are run against a list of all currently available USB
11420 devices (in states
11421 <link to="USBDeviceState_Available"/>,
11422 <link to="USBDeviceState_Busy"/>,
11423 <link to="USBDeviceState_Held"/>) that were not previously
11424 ignored by global filters.
11425
11426 If at least one filter matches the USB device in question, this
11427 device is automatically captured (attached to) the virtual USB
11428 controller of this machine.
11429
11430 <see>IUSBDeviceFilter, ::IUSBController</see>
11431 </desc>
11432 </attribute>
11433
11434 <method name="createDeviceFilter">
11435 <desc>
11436 Creates a new USB device filter. All attributes except
11437 the filter name are set to empty (any match),
11438 <i>active</i> is @c false (the filter is not active).
11439
11440 The created filter can then be added to the list of filters using
11441 <link to="#insertDeviceFilter"/>.
11442
11443 <result name="VBOX_E_INVALID_VM_STATE">
11444 The virtual machine is not mutable.
11445 </result>
11446
11447 <see>#deviceFilters</see>
11448 </desc>
11449 <param name="name" type="wstring" dir="in">
11450 <desc>
11451 Filter name. See <link to="IUSBDeviceFilter::name"/>
11452 for more info.
11453 </desc>
11454 </param>
11455 <param name="filter" type="IUSBDeviceFilter" dir="return">
11456 <desc>Created filter object.</desc>
11457 </param>
11458 </method>
11459
11460 <method name="insertDeviceFilter">
11461 <desc>
11462 Inserts the given USB device to the specified position
11463 in the list of filters.
11464
11465 Positions are numbered starting from <tt>0</tt>. If the specified
11466 position is equal to or greater than the number of elements in
11467 the list, the filter is added to the end of the collection.
11468
11469 <note>
11470 Duplicates are not allowed, so an attempt to insert a
11471 filter that is already in the collection, will return an
11472 error.
11473 </note>
11474
11475 <result name="VBOX_E_INVALID_VM_STATE">
11476 Virtual machine is not mutable.
11477 </result>
11478 <result name="E_INVALIDARG">
11479 USB device filter not created within this VirtualBox instance.
11480 </result>
11481 <result name="VBOX_E_INVALID_OBJECT_STATE">
11482 USB device filter already in list.
11483 </result>
11484
11485 <see>#deviceFilters</see>
11486 </desc>
11487 <param name="position" type="unsigned long" dir="in">
11488 <desc>Position to insert the filter to.</desc>
11489 </param>
11490 <param name="filter" type="IUSBDeviceFilter" dir="in">
11491 <desc>USB device filter to insert.</desc>
11492 </param>
11493 </method>
11494
11495 <method name="removeDeviceFilter">
11496 <desc>
11497 Removes a USB device filter from the specified position in the
11498 list of filters.
11499
11500 Positions are numbered starting from <tt>0</tt>. Specifying a
11501 position equal to or greater than the number of elements in
11502 the list will produce an error.
11503
11504 <see>#deviceFilters</see>
11505
11506 <result name="VBOX_E_INVALID_VM_STATE">
11507 Virtual machine is not mutable.
11508 </result>
11509 <result name="E_INVALIDARG">
11510 USB device filter list empty or invalid @a position.
11511 </result>
11512
11513 </desc>
11514 <param name="position" type="unsigned long" dir="in">
11515 <desc>Position to remove the filter from.</desc>
11516 </param>
11517 <param name="filter" type="IUSBDeviceFilter" dir="return">
11518 <desc>Removed USB device filter.</desc>
11519 </param>
11520 </method>
11521
11522 </interface>
11523
11524
11525 <!--
11526 // IUSBDevice
11527 /////////////////////////////////////////////////////////////////////////
11528 -->
11529
11530 <interface
11531 name="IUSBDevice" extends="$unknown"
11532 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11533 wsmap="managed"
11534 >
11535 <desc>
11536 The IUSBDevice interface represents a virtual USB device attached to the
11537 virtual machine.
11538
11539 A collection of objects implementing this interface is stored in the
11540 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11541 attached to a running virtual machine's USB controller.
11542 </desc>
11543
11544 <attribute name="id" type="uuid" mod="string" readonly="yes">
11545 <desc>
11546 Unique USB device ID. This ID is built from #vendorId,
11547 #productId, #revision and #serialNumber.
11548 </desc>
11549 </attribute>
11550
11551 <attribute name="vendorId" type="unsigned short" readonly="yes">
11552 <desc>Vendor ID.</desc>
11553 </attribute>
11554
11555 <attribute name="productId" type="unsigned short" readonly="yes">
11556 <desc>Product ID.</desc>
11557 </attribute>
11558
11559 <attribute name="revision" type="unsigned short" readonly="yes">
11560 <desc>
11561 Product revision number. This is a packed BCD represented as
11562 unsigned short. The high byte is the integer part and the low
11563 byte is the decimal.
11564 </desc>
11565 </attribute>
11566
11567 <attribute name="manufacturer" type="wstring" readonly="yes">
11568 <desc>Manufacturer string.</desc>
11569 </attribute>
11570
11571 <attribute name="product" type="wstring" readonly="yes">
11572 <desc>Product string.</desc>
11573 </attribute>
11574
11575 <attribute name="serialNumber" type="wstring" readonly="yes">
11576 <desc>Serial number string.</desc>
11577 </attribute>
11578
11579 <attribute name="address" type="wstring" readonly="yes">
11580 <desc>Host specific address of the device.</desc>
11581 </attribute>
11582
11583 <attribute name="port" type="unsigned short" readonly="yes">
11584 <desc>
11585 Host USB port number the device is physically
11586 connected to.
11587 </desc>
11588 </attribute>
11589
11590 <attribute name="version" type="unsigned short" readonly="yes">
11591 <desc>
11592 The major USB version of the device - 1 or 2.
11593 </desc>
11594 </attribute>
11595
11596 <attribute name="portVersion" type="unsigned short" readonly="yes">
11597 <desc>
11598 The major USB version of the host USB port the device is
11599 physically connected to - 1 or 2. For devices not connected to
11600 anything this will have the same value as the version attribute.
11601 </desc>
11602 </attribute>
11603
11604 <attribute name="remote" type="boolean" readonly="yes">
11605 <desc>
11606 Whether the device is physically connected to a remote VRDP
11607 client or to a local host machine.
11608 </desc>
11609 </attribute>
11610
11611 </interface>
11612
11613
11614 <!--
11615 // IUSBDeviceFilter
11616 /////////////////////////////////////////////////////////////////////////
11617 -->
11618
11619 <interface
11620 name="IUSBDeviceFilter" extends="$unknown"
11621 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11622 wsmap="managed"
11623 >
11624 <desc>
11625 The IUSBDeviceFilter interface represents an USB device filter used
11626 to perform actions on a group of USB devices.
11627
11628 This type of filters is used by running virtual machines to
11629 automatically capture selected USB devices once they are physically
11630 attached to the host computer.
11631
11632 A USB device is matched to the given device filter if and only if all
11633 attributes of the device match the corresponding attributes of the
11634 filter (that is, attributes are joined together using the logical AND
11635 operation). On the other hand, all together, filters in the list of
11636 filters carry the semantics of the logical OR operation. So if it is
11637 desirable to create a match like "this vendor id OR this product id",
11638 one needs to create two filters and specify "any match" (see below)
11639 for unused attributes.
11640
11641 All filter attributes used for matching are strings. Each string
11642 is an expression representing a set of values of the corresponding
11643 device attribute, that will match the given filter. Currently, the
11644 following filtering expressions are supported:
11645
11646 <ul>
11647 <li><i>Interval filters</i>. Used to specify valid intervals for
11648 integer device attributes (Vendor ID, Product ID and Revision).
11649 The format of the string is:
11650
11651 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11652
11653 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11654 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11655 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11656 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11657 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11658 possible integer is assumed.
11659 </li>
11660 <li><i>Boolean filters</i>. Used to specify acceptable values for
11661 boolean device attributes. The format of the string is:
11662
11663 <tt>true|false|yes|no|0|1</tt>
11664
11665 </li>
11666 <li><i>Exact match</i>. Used to specify a single value for the given
11667 device attribute. Any string that doesn't start with <tt>int:</tt>
11668 represents the exact match. String device attributes are compared to
11669 this string including case of symbols. Integer attributes are first
11670 converted to a string (see individual filter attributes) and then
11671 compared ignoring case.
11672
11673 </li>
11674 <li><i>Any match</i>. Any value of the corresponding device attribute
11675 will match the given filter. An empty or @c null string is
11676 used to construct this type of filtering expressions.
11677
11678 </li>
11679 </ul>
11680
11681 <note>
11682 On the Windows host platform, interval filters are not currently
11683 available. Also all string filter attributes
11684 (<link to="#manufacturer"/>, <link to="#product"/>,
11685 <link to="#serialNumber"/>) are ignored, so they behave as
11686 <i>any match</i> no matter what string expression is specified.
11687 </note>
11688
11689 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11690 </desc>
11691
11692 <attribute name="name" type="wstring">
11693 <desc>
11694 Visible name for this filter.
11695 This name is used to visually distinguish one filter from another,
11696 so it can neither be @c null nor an empty string.
11697 </desc>
11698 </attribute>
11699
11700 <attribute name="active" type="boolean">
11701 <desc>Whether this filter active or has been temporarily disabled.</desc>
11702 </attribute>
11703
11704 <attribute name="vendorId" type="wstring">
11705 <desc>
11706 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11707 The string representation for the <i>exact matching</i>
11708 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11709 (including leading zeroes).
11710 </desc>
11711 </attribute>
11712
11713 <attribute name="productId" type="wstring">
11714 <desc>
11715 <link to="IUSBDevice::productId">Product ID</link> filter.
11716 The string representation for the <i>exact matching</i>
11717 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11718 (including leading zeroes).
11719 </desc>
11720 </attribute>
11721
11722 <attribute name="revision" type="wstring">
11723 <desc>
11724 <link to="IUSBDevice::productId">Product revision number</link>
11725 filter. The string representation for the <i>exact matching</i>
11726 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11727 of the integer part of the revision, and <tt>F</tt> is the
11728 decimal digit of its fractional part (including leading and
11729 trailing zeros).
11730 Note that for interval filters, it's best to use the hexadecimal
11731 form, because the revision is stored as a 16 bit packed BCD value;
11732 so the expression <tt>int:0x0100-0x0199</tt> will match any
11733 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11734 </desc>
11735 </attribute>
11736
11737 <attribute name="manufacturer" type="wstring">
11738 <desc>
11739 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11740 </desc>
11741 </attribute>
11742
11743 <attribute name="product" type="wstring">
11744 <desc>
11745 <link to="IUSBDevice::product">Product</link> filter.
11746 </desc>
11747 </attribute>
11748
11749 <attribute name="serialNumber" type="wstring">
11750 <desc>
11751 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11752 </desc>
11753 </attribute>
11754
11755 <attribute name="port" type="wstring">
11756 <desc>
11757 <link to="IUSBDevice::port">Host USB port</link> filter.
11758 </desc>
11759 </attribute>
11760
11761 <attribute name="remote" type="wstring">
11762 <desc>
11763 <link to="IUSBDevice::remote">Remote state</link> filter.
11764 <note>
11765 This filter makes sense only for machine USB filters,
11766 i.e. it is ignored by IHostUSBDeviceFilter objects.
11767 </note>
11768 </desc>
11769 </attribute>
11770
11771 <attribute name="maskedInterfaces" type="unsigned long">
11772 <desc>
11773 This is an advanced option for hiding one or more USB interfaces
11774 from the guest. The value is a bit mask where the bits that are set
11775 means the corresponding USB interface should be hidden, masked off
11776 if you like.
11777 This feature only works on Linux hosts.
11778 </desc>
11779 </attribute>
11780
11781 </interface>
11782
11783
11784 <!--
11785 // IHostUSBDevice
11786 /////////////////////////////////////////////////////////////////////////
11787 -->
11788
11789 <enum
11790 name="USBDeviceState"
11791 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11792 >
11793 <desc>
11794 USB device state. This enumeration represents all possible states
11795 of the USB device physically attached to the host computer regarding
11796 its state on the host computer and availability to guest computers
11797 (all currently running virtual machines).
11798
11799 Once a supported USB device is attached to the host, global USB
11800 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11801 either ignore the device, or put it to USBDeviceState_Held state, or do
11802 nothing. Unless the device is ignored by global filters, filters of all
11803 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11804 activated that can put it to USBDeviceState_Captured state.
11805
11806 If the device was ignored by global filters, or didn't match
11807 any filters at all (including guest ones), it is handled by the host
11808 in a normal way. In this case, the device state is determined by
11809 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11810 or USBDeviceState_Available, depending on the current device usage.
11811
11812 Besides auto-capturing based on filters, the device can be manually
11813 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11814 state is USBDeviceState_Busy, USBDeviceState_Available or
11815 USBDeviceState_Held.
11816
11817 <note>
11818 Due to differences in USB stack implementations in Linux and Win32,
11819 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11820 only to the Linux version of the product. This also means that (<link
11821 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11822 device state is USBDeviceState_Held.
11823 </note>
11824
11825 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11826 </desc>
11827
11828 <const name="NotSupported" value="0">
11829 <desc>
11830 Not supported by the VirtualBox server, not available to guests.
11831 </desc>
11832 </const>
11833 <const name="Unavailable" value="1">
11834 <desc>
11835 Being used by the host computer exclusively,
11836 not available to guests.
11837 </desc>
11838 </const>
11839 <const name="Busy" value="2">
11840 <desc>
11841 Being used by the host computer, potentially available to guests.
11842 </desc>
11843 </const>
11844 <const name="Available" value="3">
11845 <desc>
11846 Not used by the host computer, available to guests (the host computer
11847 can also start using the device at any time).
11848 </desc>
11849 </const>
11850 <const name="Held" value="4">
11851 <desc>
11852 Held by the VirtualBox server (ignored by the host computer),
11853 available to guests.
11854 </desc>
11855 </const>
11856 <const name="Captured" value="5">
11857 <desc>
11858 Captured by one of the guest computers, not available
11859 to anybody else.
11860 </desc>
11861 </const>
11862 </enum>
11863
11864 <interface
11865 name="IHostUSBDevice" extends="IUSBDevice"
11866 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11867 wsmap="managed"
11868 >
11869 <desc>
11870 The IHostUSBDevice interface represents a physical USB device attached
11871 to the host computer.
11872
11873 Besides properties inherited from IUSBDevice, this interface adds the
11874 <link to="#state"/> property that holds the current state of the USB
11875 device.
11876
11877 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11878 </desc>
11879
11880 <attribute name="state" type="USBDeviceState" readonly="yes">
11881 <desc>
11882 Current state of the device.
11883 </desc>
11884 </attribute>
11885
11886 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11887
11888 </interface>
11889
11890
11891 <!--
11892 // IHostUSBDeviceFilter
11893 /////////////////////////////////////////////////////////////////////////
11894 -->
11895
11896 <enum
11897 name="USBDeviceFilterAction"
11898 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11899 >
11900 <desc>
11901 Actions for host USB device filters.
11902 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11903 </desc>
11904
11905 <const name="Null" value="0">
11906 <desc>Null value (never used by the API).</desc>
11907 </const>
11908 <const name="Ignore" value="1">
11909 <desc>Ignore the matched USB device.</desc>
11910 </const>
11911 <const name="Hold" value="2">
11912 <desc>Hold the matched USB device.</desc>
11913 </const>
11914 </enum>
11915
11916 <interface
11917 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11918 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11919 wsmap="managed"
11920 >
11921 <desc>
11922 The IHostUSBDeviceFilter interface represents a global filter for a
11923 physical USB device used by the host computer. Used indirectly in
11924 <link to="IHost::USBDeviceFilters"/>.
11925
11926 Using filters of this type, the host computer determines the initial
11927 state of the USB device after it is physically attached to the
11928 host's USB controller.
11929
11930 <note>
11931 The <link to="IUSBDeviceFilter::remote"/> attribute is ignored by this type of
11932 filters, because it makes sense only for
11933 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11934 </note>
11935
11936 <see>IHost::USBDeviceFilters</see>
11937 </desc>
11938
11939 <attribute name="action" type="USBDeviceFilterAction">
11940 <desc>
11941 Action performed by the host when an attached USB device
11942 matches this filter.
11943 </desc>
11944 </attribute>
11945
11946 </interface>
11947
11948 <!--
11949 // IAudioAdapter
11950 /////////////////////////////////////////////////////////////////////////
11951 -->
11952
11953 <enum
11954 name="AudioDriverType"
11955 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11956 >
11957 <desc>
11958 Host audio driver type.
11959 </desc>
11960
11961 <const name="Null" value="0">
11962 <desc>Null value, also means "dummy audio driver".</desc>
11963 </const>
11964 <const name="WinMM" value="1">
11965 <desc>Windows multimedia (Windows hosts only).</desc>
11966 </const>
11967 <const name="OSS" value="2">
11968 <desc>Open Sound System (Linux hosts only).</desc>
11969 </const>
11970 <const name="ALSA" value="3">
11971 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
11972 </const>
11973 <const name="DirectSound" value="4">
11974 <desc>DirectSound (Windows hosts only).</desc>
11975 </const>
11976 <const name="CoreAudio" value="5">
11977 <desc>CoreAudio (Mac hosts only).</desc>
11978 </const>
11979 <const name="MMPM" value="6">
11980 <desc>Reserved for historical reasons.</desc>
11981 </const>
11982 <const name="Pulse" value="7">
11983 <desc>PulseAudio (Linux hosts only).</desc>
11984 </const>
11985 <const name="SolAudio" value="8">
11986 <desc>Solaris audio (Solaris hosts only).</desc>
11987 </const>
11988 </enum>
11989
11990 <enum
11991 name="AudioControllerType"
11992 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11993 >
11994 <desc>
11995 Virtual audio controller type.
11996 </desc>
11997
11998 <const name="AC97" value="0"/>
11999 <const name="SB16" value="1"/>
12000 <const name="HDA" value="2"/>
12001 </enum>
12002
12003 <interface
12004 name="IAudioAdapter" extends="$unknown"
12005 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
12006 wsmap="managed"
12007 >
12008 <desc>
12009 The IAudioAdapter interface represents the virtual audio adapter of
12010 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
12011 </desc>
12012 <attribute name="enabled" type="boolean">
12013 <desc>
12014 Flag whether the audio adapter is present in the
12015 guest system. If disabled, the virtual guest hardware will
12016 not contain any audio adapter. Can only be changed when
12017 the VM is not running.
12018 </desc>
12019 </attribute>
12020 <attribute name="audioController" type="AudioControllerType">
12021 <desc>
12022 The audio hardware we emulate.
12023 </desc>
12024 </attribute>
12025 <attribute name="audioDriver" type="AudioDriverType">
12026 <desc>
12027 Audio driver the adapter is connected to. This setting
12028 can only be changed when the VM is not running.
12029 </desc>
12030 </attribute>
12031 </interface>
12032
12033 <!--
12034 // IVRDPServer
12035 /////////////////////////////////////////////////////////////////////////
12036 -->
12037
12038 <enum
12039 name="VRDPAuthType"
12040 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
12041 >
12042 <desc>
12043 VRDP authentication type.
12044 </desc>
12045
12046 <const name="Null" value="0">
12047 <desc>Null value, also means "no authentication".</desc>
12048 </const>
12049 <const name="External" value="1"/>
12050 <const name="Guest" value="2"/>
12051 </enum>
12052
12053 <interface
12054 name="IVRDPServer" extends="$unknown"
12055 uuid="7aeeb530-0b08-41fe-835d-9be9ec1dbe5c"
12056 wsmap="managed"
12057 >
12058 <attribute name="enabled" type="boolean">
12059 <desc>VRDP server status.</desc>
12060 </attribute>
12061
12062 <attribute name="ports" type="wstring">
12063 <desc>
12064 VRDP server port numbers. The server will try to bind to one of free ports from the list.
12065 <note>
12066 This is a string of comma separated TCP port numbers or port number ranges.
12067 Example <tt>5000,5010-5012,5015</tt>
12068 </note>
12069 </desc>
12070 </attribute>
12071
12072 <attribute name="netAddress" type="wstring">
12073 <desc>VRDP server address.</desc>
12074 </attribute>
12075
12076 <attribute name="authType" type="VRDPAuthType">
12077 <desc>VRDP authentication method.</desc>
12078 </attribute>
12079
12080 <attribute name="authTimeout" type="unsigned long">
12081 <desc>Timeout for guest authentication. Milliseconds.</desc>
12082 </attribute>
12083
12084 <attribute name="allowMultiConnection" type="boolean">
12085 <desc>
12086 Flag whether multiple simultaneous connections to the VM are permitted.
12087 Note that this will be replaced by a more powerful mechanism in the future.
12088 </desc>
12089 </attribute>
12090
12091 <attribute name="reuseSingleConnection" type="boolean">
12092 <desc>
12093 Flag whether the existing connection must be dropped and a new connection
12094 must be established by the VRDP server, when a new client connects in single
12095 connection mode.
12096 </desc>
12097 </attribute>
12098
12099 <attribute name="videoChannel" type="boolean">
12100 <desc>
12101 Flag whether RDP video channel is supported.
12102 </desc>
12103 </attribute>
12104
12105 <attribute name="videoChannelQuality" type="unsigned long">
12106 <desc>
12107 Image quality in percents.
12108 </desc>
12109 </attribute>
12110
12111 </interface>
12112
12113
12114 <!--
12115 // ISharedFolder
12116 /////////////////////////////////////////////////////////////////////////
12117 -->
12118
12119 <interface
12120 name="ISharedFolder" extends="$unknown"
12121 uuid="8388da11-b559-4574-a5b7-2bd7acd5cef8"
12122 wsmap="struct"
12123 >
12124 <desc>
12125 The ISharedFolder interface represents a folder in the host computer's
12126 file system accessible from the guest OS running inside a virtual
12127 machine using an associated logical name.
12128
12129 There are three types of shared folders:
12130 <ul>
12131 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12132 folders available to all virtual machines.</li>
12133 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12134 VM-specific shared folders available to the given virtual machine at
12135 startup.</li>
12136 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12137 VM-specific shared folders created in the session context (for
12138 example, when the virtual machine is running) and automatically
12139 discarded when the session is closed (the VM is powered off).</li>
12140 </ul>
12141
12142 Logical names of shared folders must be unique within the given scope
12143 (global, permanent or transient). However, they do not need to be unique
12144 across scopes. In this case, the definition of the shared folder in a
12145 more specific scope takes precedence over definitions in all other
12146 scopes. The order of precedence is (more specific to more general):
12147 <ol>
12148 <li>Transient definitions</li>
12149 <li>Permanent definitions</li>
12150 <li>Global definitions</li>
12151 </ol>
12152
12153 For example, if MyMachine has a shared folder named
12154 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12155 transient shared folder named <tt>C_DRIVE</tt> (that points
12156 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12157 of <tt>C_DRIVE</tt> in the guest OS so
12158 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12159 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12160 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12161 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12162 to <tt>C:\\</tt> if it still exists.
12163
12164 Note that permanent and transient shared folders of different machines
12165 are in different name spaces, so they don't overlap and don't need to
12166 have unique logical names.
12167
12168 <note>
12169 Global shared folders are not implemented in the current version of the
12170 product.
12171 </note>
12172 </desc>
12173
12174 <attribute name="name" type="wstring" readonly="yes">
12175 <desc>Logical name of the shared folder.</desc>
12176 </attribute>
12177
12178 <attribute name="hostPath" type="wstring" readonly="yes">
12179 <desc>Full path to the shared folder in the host file system.</desc>
12180 </attribute>
12181
12182 <attribute name="accessible" type="boolean" readonly="yes">
12183 <desc>
12184 Whether the folder defined by the host path is currently
12185 accessible or not.
12186 For example, the folder can be unaccessible if it is placed
12187 on the network share that is not available by the time
12188 this property is read.
12189 </desc>
12190 </attribute>
12191
12192 <attribute name="writable" type="boolean" readonly="yes">
12193 <desc>
12194 Whether the folder defined by the host path is writable or
12195 not.
12196 </desc>
12197 </attribute>
12198
12199 <attribute name="autoMount" type="boolean" readonly="yes">
12200 <desc>
12201 Whether the folder gets automatically mounted by the guest or not.
12202 </desc>
12203 </attribute>
12204
12205 <attribute name="lastAccessError" type="wstring" readonly="yes">
12206 <desc>
12207 Text message that represents the result of the last accessibility
12208 check.
12209
12210 Accessibility checks are performed each time the <link to="#accessible"/>
12211 attribute is read. An empty string is returned if the last
12212 accessibility check was successful. A non-empty string indicates a
12213 failure and should normally describe a reason of the failure (for
12214 example, a file read error).
12215 </desc>
12216 </attribute>
12217
12218 </interface>
12219
12220 <!--
12221 // ISession
12222 /////////////////////////////////////////////////////////////////////////
12223 -->
12224
12225 <interface
12226 name="IInternalSessionControl" extends="$unknown"
12227 uuid="ef059f1d-2273-4f81-9342-c152a0d2cd40"
12228 internal="yes"
12229 wsmap="suppress"
12230 >
12231 <method name="getPID">
12232 <desc>PID of the process that has created this Session object.
12233 </desc>
12234 <param name="pid" type="unsigned long" dir="return"/>
12235 </method>
12236
12237 <method name="getRemoteConsole">
12238 <desc>
12239 Returns the console object suitable for remote control.
12240
12241 <result name="VBOX_E_INVALID_VM_STATE">
12242 Session state prevents operation.
12243 </result>
12244 <result name="VBOX_E_INVALID_OBJECT_STATE">
12245 Session type prevents operation.
12246 </result>
12247
12248 </desc>
12249 <param name="console" type="IConsole" dir="return"/>
12250 </method>
12251
12252 <method name="assignMachine">
12253 <desc>
12254 Assigns the machine object associated with this direct-type
12255 session or informs the session that it will be a remote one
12256 (if @a machine == @c null).
12257
12258 <result name="VBOX_E_INVALID_VM_STATE">
12259 Session state prevents operation.
12260 </result>
12261 <result name="VBOX_E_INVALID_OBJECT_STATE">
12262 Session type prevents operation.
12263 </result>
12264
12265 </desc>
12266 <param name="machine" type="IMachine" dir="in"/>
12267 </method>
12268
12269 <method name="assignRemoteMachine">
12270 <desc>
12271 Assigns the machine and the (remote) console object associated with
12272 this remote-type session.
12273
12274 <result name="VBOX_E_INVALID_VM_STATE">
12275 Session state prevents operation.
12276 </result>
12277
12278 </desc>
12279 <param name="machine" type="IMachine" dir="in"/>
12280 <param name="console" type="IConsole" dir="in"/>
12281 </method>
12282
12283 <method name="updateMachineState">
12284 <desc>
12285 Updates the machine state in the VM process.
12286 Must be called only in certain cases
12287 (see the method implementation).
12288
12289 <result name="VBOX_E_INVALID_VM_STATE">
12290 Session state prevents operation.
12291 </result>
12292 <result name="VBOX_E_INVALID_OBJECT_STATE">
12293 Session type prevents operation.
12294 </result>
12295
12296 </desc>
12297 <param name="aMachineState" type="MachineState" dir="in"/>
12298 </method>
12299
12300 <method name="uninitialize">
12301 <desc>
12302 Uninitializes (closes) this session. Used by VirtualBox to close
12303 the corresponding remote session when the direct session dies
12304 or gets closed.
12305
12306 <result name="VBOX_E_INVALID_VM_STATE">
12307 Session state prevents operation.
12308 </result>
12309
12310 </desc>
12311 </method>
12312
12313 <method name="onNetworkAdapterChange">
12314 <desc>
12315 Triggered when settings of a network adapter of the
12316 associated virtual machine have changed.
12317
12318 <result name="VBOX_E_INVALID_VM_STATE">
12319 Session state prevents operation.
12320 </result>
12321 <result name="VBOX_E_INVALID_OBJECT_STATE">
12322 Session type prevents operation.
12323 </result>
12324
12325 </desc>
12326 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12327 <param name="changeAdapter" type="boolean" dir="in"/>
12328 </method>
12329
12330 <method name="onSerialPortChange">
12331 <desc>
12332 Triggered when settings of a serial port of the
12333 associated virtual machine have changed.
12334
12335 <result name="VBOX_E_INVALID_VM_STATE">
12336 Session state prevents operation.
12337 </result>
12338 <result name="VBOX_E_INVALID_OBJECT_STATE">
12339 Session type prevents operation.
12340 </result>
12341
12342 </desc>
12343 <param name="serialPort" type="ISerialPort" dir="in"/>
12344 </method>
12345
12346 <method name="onParallelPortChange">
12347 <desc>
12348 Triggered when settings of a parallel port of the
12349 associated virtual machine have changed.
12350
12351 <result name="VBOX_E_INVALID_VM_STATE">
12352 Session state prevents operation.
12353 </result>
12354 <result name="VBOX_E_INVALID_OBJECT_STATE">
12355 Session type prevents operation.
12356 </result>
12357
12358 </desc>
12359 <param name="parallelPort" type="IParallelPort" dir="in"/>
12360 </method>
12361
12362 <method name="onStorageControllerChange">
12363 <desc>
12364 Triggered when settings of a storage controller of the
12365 associated virtual machine have changed.
12366
12367 <result name="VBOX_E_INVALID_VM_STATE">
12368 Session state prevents operation.
12369 </result>
12370 <result name="VBOX_E_INVALID_OBJECT_STATE">
12371 Session type prevents operation.
12372 </result>
12373
12374 </desc>
12375 </method>
12376
12377 <method name="onMediumChange">
12378 <desc>
12379 Triggered when attached media of the
12380 associated virtual machine have changed.
12381
12382 <result name="VBOX_E_INVALID_VM_STATE">
12383 Session state prevents operation.
12384 </result>
12385 <result name="VBOX_E_INVALID_OBJECT_STATE">
12386 Session type prevents operation.
12387 </result>
12388
12389 </desc>
12390
12391 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12392 <param name="force" type="boolean" dir="in"/>
12393 </method>
12394
12395 <method name="onCPUChange">
12396 <desc>
12397 Notification when a CPU changes.
12398 </desc>
12399 <param name="cpu" type="unsigned long" dir="in">
12400 <desc>The CPU which changed</desc>
12401 </param>
12402 <param name="add" type="boolean" dir="in">
12403 <desc>Flag whether the CPU was added or removed</desc>
12404 </param>
12405 </method>
12406
12407 <method name="onCPUPriorityChange">
12408 <desc>
12409 Notification when the CPU priority changes.
12410 </desc>
12411 <param name="priority" type="unsigned long" dir="in">
12412 <desc>The new CPU priority value. (1-100)</desc>
12413 </param>
12414 </method>
12415
12416 <method name="onVRDPServerChange">
12417 <desc>
12418 Triggered when settings of the VRDP server object of the
12419 associated virtual machine have changed.
12420
12421 <result name="VBOX_E_INVALID_VM_STATE">
12422 Session state prevents operation.
12423 </result>
12424 <result name="VBOX_E_INVALID_OBJECT_STATE">
12425 Session type prevents operation.
12426 </result>
12427
12428 </desc>
12429 <param name="restart" type="boolean" dir="in">
12430 <desc>Flag whether the server must be restarted</desc>
12431 </param>
12432 </method>
12433
12434 <method name="onUSBControllerChange">
12435 <desc>
12436 Triggered when settings of the USB controller object 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 </method>
12448
12449 <method name="onSharedFolderChange">
12450 <desc>
12451 Triggered when a permanent (global or machine) shared folder has been
12452 created or removed.
12453 <note>
12454 We don't pass shared folder parameters in this notification because
12455 the order in which parallel notifications are delivered is not defined,
12456 therefore it could happen that these parameters were outdated by the
12457 time of processing this notification.
12458 </note>
12459
12460 <result name="VBOX_E_INVALID_VM_STATE">
12461 Session state prevents operation.
12462 </result>
12463 <result name="VBOX_E_INVALID_OBJECT_STATE">
12464 Session type prevents operation.
12465 </result>
12466
12467 </desc>
12468 <param name="global" type="boolean" dir="in"/>
12469 </method>
12470
12471 <method name="onUSBDeviceAttach">
12472 <desc>
12473 Triggered when a request to capture a USB device (as a result
12474 of matched USB filters or direct call to
12475 <link to="IConsole::attachUSBDevice"/>) has completed.
12476 A @c null @a error object means success, otherwise it
12477 describes a failure.
12478
12479 <result name="VBOX_E_INVALID_VM_STATE">
12480 Session state prevents operation.
12481 </result>
12482 <result name="VBOX_E_INVALID_OBJECT_STATE">
12483 Session type prevents operation.
12484 </result>
12485
12486 </desc>
12487 <param name="device" type="IUSBDevice" dir="in"/>
12488 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12489 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12490 </method>
12491
12492 <method name="onUSBDeviceDetach">
12493 <desc>
12494 Triggered when a request to release the USB device (as a result
12495 of machine termination or direct call to
12496 <link to="IConsole::detachUSBDevice"/>) has completed.
12497 A @c null @a error object means success, otherwise it
12498 describes a failure.
12499
12500 <result name="VBOX_E_INVALID_VM_STATE">
12501 Session state prevents operation.
12502 </result>
12503 <result name="VBOX_E_INVALID_OBJECT_STATE">
12504 Session type prevents operation.
12505 </result>
12506
12507 </desc>
12508 <param name="id" type="uuid" mod="string" dir="in"/>
12509 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12510 </method>
12511
12512 <method name="onShowWindow">
12513 <desc>
12514 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12515 <link to="IMachine::showConsoleWindow"/> in order to notify
12516 console listeners
12517 <link to="ICanShowWindowEvent"/>
12518 and <link to="IShowWindowEvent"/>.
12519
12520 <result name="VBOX_E_INVALID_OBJECT_STATE">
12521 Session type prevents operation.
12522 </result>
12523
12524 </desc>
12525 <param name="check" type="boolean" dir="in"/>
12526 <param name="canShow" type="boolean" dir="out"/>
12527 <param name="winId" type="unsigned long long" dir="out"/>
12528 </method>
12529
12530 <method name="accessGuestProperty">
12531 <desc>
12532 Called by <link to="IMachine::getGuestProperty"/> and by
12533 <link to="IMachine::setGuestProperty"/> in order to read and
12534 modify guest properties.
12535
12536 <result name="VBOX_E_INVALID_VM_STATE">
12537 Machine session is not open.
12538 </result>
12539 <result name="VBOX_E_INVALID_OBJECT_STATE">
12540 Session type is not direct.
12541 </result>
12542
12543 </desc>
12544 <param name="name" type="wstring" dir="in"/>
12545 <param name="value" type="wstring" dir="in"/>
12546 <param name="flags" type="wstring" dir="in"/>
12547 <param name="isSetter" type="boolean" dir="in"/>
12548 <param name="retValue" type="wstring" dir="out"/>
12549 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12550 <param name="retFlags" type="wstring" dir="out"/>
12551 </method>
12552
12553 <method name="enumerateGuestProperties">
12554 <desc>
12555 Return a list of the guest properties matching a set of patterns along
12556 with their values, time stamps and flags.
12557
12558 <result name="VBOX_E_INVALID_VM_STATE">
12559 Machine session is not open.
12560 </result>
12561 <result name="VBOX_E_INVALID_OBJECT_STATE">
12562 Session type is not direct.
12563 </result>
12564
12565 </desc>
12566 <param name="patterns" type="wstring" dir="in">
12567 <desc>
12568 The patterns to match the properties against as a comma-separated
12569 string. If this is empty, all properties currently set will be
12570 returned.
12571 </desc>
12572 </param>
12573 <param name="key" type="wstring" dir="out" safearray="yes">
12574 <desc>
12575 The key names of the properties returned.
12576 </desc>
12577 </param>
12578 <param name="value" type="wstring" dir="out" safearray="yes">
12579 <desc>
12580 The values of the properties returned. The array entries match the
12581 corresponding entries in the @a key array.
12582 </desc>
12583 </param>
12584 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12585 <desc>
12586 The time stamps of the properties returned. The array entries match
12587 the corresponding entries in the @a key array.
12588 </desc>
12589 </param>
12590 <param name="flags" type="wstring" dir="out" safearray="yes">
12591 <desc>
12592 The flags of the properties returned. The array entries match the
12593 corresponding entries in the @a key array.
12594 </desc>
12595 </param>
12596 </method>
12597
12598 <method name="onlineMergeMedium">
12599 <desc>
12600 Triggers online merging of a hard disk. Used internally when deleting
12601 a snapshot while a VM referring to the same hard disk chain is running.
12602
12603 <result name="VBOX_E_INVALID_VM_STATE">
12604 Machine session is not open.
12605 </result>
12606 <result name="VBOX_E_INVALID_OBJECT_STATE">
12607 Session type is not direct.
12608 </result>
12609
12610 </desc>
12611 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
12612 <desc>The medium attachment to identify the medium chain.</desc>
12613 </param>
12614 <param name="sourceIdx" type="unsigned long" dir="in">
12615 <desc>The index of the source image in the chain.
12616 Redundant, but drastically reduces IPC.</desc>
12617 </param>
12618 <param name="targetIdx" type="unsigned long" dir="in">
12619 <desc>The index of the target image in the chain.
12620 Redundant, but drastically reduces IPC.</desc>
12621 </param>
12622 <param name="source" type="IMedium" dir="in">
12623 <desc>Merge source medium.</desc>
12624 </param>
12625 <param name="target" type="IMedium" dir="in">
12626 <desc>Merge target medium.</desc>
12627 </param>
12628 <param name="mergeForward" type="boolean" dir="in">
12629 <desc>Merge direction.</desc>
12630 </param>
12631 <param name="parentForTarget" type="IMedium" dir="in">
12632 <desc>For forward merges: new parent for target medium.</desc>
12633 </param>
12634 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
12635 <desc>For backward merges: list of media which need their parent UUID
12636 updated.</desc>
12637 </param>
12638 <param name="progress" type="IProgress" dir="in">
12639 <desc>
12640 Progress object for this operation.
12641 </desc>
12642 </param>
12643 </method>
12644
12645 </interface>
12646
12647 <interface
12648 name="ISession" extends="$unknown"
12649 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12650 wsmap="managed"
12651 >
12652 <desc>
12653 The ISession interface represents a client process and allows for locking
12654 virtual machines (represented by IMachine objects) to prevent conflicting
12655 changes to the machine.
12656
12657 Any caller wishing to manipulate a virtual machine needs to create a session
12658 object first, which lives in its own process space. Such session objects are
12659 then associated with <link to="IMachine" /> objects living in the VirtualBox
12660 server process to coordinate such changes.
12661
12662 There are two typical scenarios in which sessions are used:
12663
12664 <ul>
12665 <li>To alter machine settings or control a running virtual machine, one
12666 needs to lock a machine for a given session (client process) by calling
12667 <link to="IMachine::lockMachine"/>.
12668
12669 Whereas multiple sessions may control a running virtual machine, only
12670 one process can obtain a write lock on the machine to prevent conflicting
12671 changes. A write lock is also needed if a process wants to actually run a
12672 virtual machine in its own context, such as the VirtualBox GUI or
12673 VBoxHeadless front-ends. They must also lock a machine for their own
12674 sessions before they are allowed to power up the virtual machine.
12675
12676 As a result, no machine settings can be altered while another process is
12677 already using it, either because that process is modifying machine settings
12678 or because the machine is running.
12679 </li>
12680 <li>
12681 To start a VM using one of the existing VirtualBox front-ends (e.g. the
12682 VirtualBox GUI or VBoxHeadless), one would use
12683 <link to="IMachine::launchVMProcess"/>, which also takes a session object
12684 as its first parameter. This session then identifies the caller and lets the
12685 caller control the started machine (for example, pause machine execution or
12686 power it down) as well as be notified about machine execution state changes.
12687 </li>
12688 </ul>
12689
12690 How sessions objects are created in a client process depends on whether you use
12691 the Main API via COM or via the webservice:
12692
12693 <ul>
12694 <li>When using the COM API directly, an object of the Session class from the
12695 VirtualBox type library needs to be created. In regular COM C++ client code,
12696 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12697 This object will then act as a local session object in further calls to open
12698 a session.
12699 </li>
12700
12701 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12702 a session object automatically whenever <link to="IWebsessionManager::logon" />
12703 is called. A managed object reference to that session object can be retrieved by
12704 calling <link to="IWebsessionManager::getSessionObject" />.
12705 </li>
12706 </ul>
12707 </desc>
12708
12709 <attribute name="state" type="SessionState" readonly="yes">
12710 <desc>Current state of this session.</desc>
12711 </attribute>
12712
12713 <attribute name="type" type="SessionType" readonly="yes">
12714 <desc>
12715 Type of this session. The value of this attribute is valid only
12716 if the session currently has a machine locked (i.e. its
12717 <link to="#state" /> is Locked), otherwise an error will be returned.
12718 </desc>
12719 </attribute>
12720
12721 <attribute name="machine" type="IMachine" readonly="yes">
12722 <desc>Machine object associated with this session.</desc>
12723 </attribute>
12724
12725 <attribute name="console" type="IConsole" readonly="yes">
12726 <desc>Console object associated with this session.</desc>
12727 </attribute>
12728
12729 <method name="unlockMachine">
12730 <desc>
12731 Unlocks a machine that was previously locked for the current session.
12732
12733 Calling this method is required every time a machine has been locked
12734 for a particular session using the <link to="IMachine::launchVMProcess" />
12735 or <link to="IMachine::lockMachine" /> calls. Otherwise the state of
12736 the machine will be set to <link to="MachineState_Aborted" /> on the
12737 server, and changes made to the machine settings will be lost.
12738
12739 Generally, it is recommended to unlock all machines explicitly
12740 before terminating the application (regardless of the reason for
12741 the termination).
12742
12743 <note>
12744 Do not expect the session state (<link to="ISession::state" />
12745 to return to "Unlocked" immediately after you invoke this method,
12746 particularly if you have started a new VM process. The session
12747 state will automatically return to "Unlocked" once the VM is no
12748 longer executing, which can of course take a very long time.
12749 </note>
12750
12751 <result name="E_UNEXPECTED">
12752 Session is not locked.
12753 </result>
12754
12755 </desc>
12756 </method>
12757
12758 </interface>
12759
12760 <!--
12761 // IStorageController
12762 /////////////////////////////////////////////////////////////////////////
12763 -->
12764
12765 <enum
12766 name="StorageBus"
12767 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
12768 >
12769 <desc>
12770 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy);
12771 see <link to="IStorageController::bus" />.
12772 </desc>
12773 <const name="Null" value="0">
12774 <desc>@c null value. Never used by the API.</desc>
12775 </const>
12776 <const name="IDE" value="1"/>
12777 <const name="SATA" value="2"/>
12778 <const name="SCSI" value="3"/>
12779 <const name="Floppy" value="4"/>
12780 <const name="SAS" value="5"/>
12781 </enum>
12782
12783 <enum
12784 name="StorageControllerType"
12785 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
12786 >
12787 <desc>
12788 The exact variant of storage controller hardware presented
12789 to the guest; see <link to="IStorageController::controllerType" />.
12790 </desc>
12791
12792 <const name="Null" value="0">
12793 <desc>@c null value. Never used by the API.</desc>
12794 </const>
12795 <const name="LsiLogic" value="1">
12796 <desc>A SCSI controller of the LsiLogic variant.</desc>
12797 </const>
12798 <const name="BusLogic" value="2">
12799 <desc>A SCSI controller of the BusLogic variant.</desc>
12800 </const>
12801 <const name="IntelAhci" value="3">
12802 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
12803 </const>
12804 <const name="PIIX3" value="4">
12805 <desc>An IDE controller of the PIIX3 variant.</desc>
12806 </const>
12807 <const name="PIIX4" value="5">
12808 <desc>An IDE controller of the PIIX4 variant.</desc>
12809 </const>
12810 <const name="ICH6" value="6">
12811 <desc>An IDE controller of the ICH6 variant.</desc>
12812 </const>
12813 <const name="I82078" value="7">
12814 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
12815 </const>
12816 <const name="LsiLogicSas" value="8">
12817 <desc>A variant of the LsiLogic controller using SAS.</desc>
12818 </const>
12819 </enum>
12820
12821 <interface
12822 name="IStorageController" extends="$unknown"
12823 uuid="fd93adc0-bbaa-4256-9e6e-00e29f9151c9"
12824 wsmap="managed"
12825 >
12826 <desc>
12827 Represents a storage controller that is attached to a virtual machine
12828 (<link to="IMachine" />). Just as drives (hard disks, DVDs, FDs) are
12829 attached to storage controllers in a real computer, virtual drives
12830 (represented by <link to="IMediumAttachment" />) are attached to virtual
12831 storage controllers, represented by this interface.
12832
12833 As opposed to physical hardware, VirtualBox has a very generic concept
12834 of a storage controller, and for purposes of the Main API, all virtual
12835 storage is attached to virtual machines via instances of this interface.
12836 There are five types of such virtual storage controllers: IDE, SCSI, SATA,
12837 SAS and Floppy (see <link to="#bus" />). Depending on which of these four
12838 is used, certain sub-types may be available and can be selected in
12839 <link to="#controllerType" />.
12840
12841 Depending on these settings, the guest operating system might see
12842 significantly different virtual hardware.
12843 </desc>
12844
12845 <attribute name="name" type="wstring" readonly="yes">
12846 <desc>
12847 Name of the storage controller, as originally specified with
12848 <link to="IMachine::addStorageController" />. This then uniquely
12849 identifies this controller with other method calls such as
12850 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
12851 </desc>
12852 </attribute>
12853
12854 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12855 <desc>
12856 Maximum number of devices which can be attached to one port.
12857 </desc>
12858 </attribute>
12859
12860 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12861 <desc>
12862 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12863 </desc>
12864 </attribute>
12865
12866 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12867 <desc>
12868 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12869 </desc>
12870 </attribute>
12871
12872 <attribute name="instance" type="unsigned long">
12873 <desc>
12874 The instance number of the device in the running VM.
12875 </desc>
12876 </attribute>
12877
12878 <attribute name="portCount" type="unsigned long">
12879 <desc>
12880 The number of currently usable ports on the controller.
12881 The minimum and maximum number of ports for one controller are
12882 stored in <link to="IStorageController::minPortCount"/>
12883 and <link to="IStorageController::maxPortCount"/>.
12884 </desc>
12885 </attribute>
12886
12887 <attribute name="bus" type="StorageBus" readonly="yes">
12888 <desc>
12889 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy).
12890 </desc>
12891 </attribute>
12892
12893 <attribute name="controllerType" type="StorageControllerType">
12894 <desc>
12895 The exact variant of storage controller hardware presented
12896 to the guest.
12897 Depending on this value, VirtualBox will provide a different
12898 virtual storage controller hardware to the guest.
12899 For SATA, SAS and floppy controllers, only one variant is
12900 available, but for IDE and SCSI, there are several.
12901
12902 For SCSI controllers, the default type is LsiLogic.
12903 </desc>
12904 </attribute>
12905
12906 <attribute name="useHostIOCache" type="boolean">
12907 <desc>
12908 If true, the storage controller emulation will use a dedicated I/O thread, enable the host I/O
12909 caches and use synchronous file APIs on the host. This was the only option in the API before
12910 VirtualBox 3.2 and is still the default for IDE controllers.
12911
12912 If false, the host I/O cache will be disabled for image files attached to this storage controller.
12913 Instead, the storage controller emulation will use asynchronous I/O APIs on the host. This makes
12914 it possible to turn off the host I/O caches because the emulation can handle unaligned access to
12915 the file. This should be used on OS X and Linux hosts if a high I/O load is expected or many
12916 virtual machines are running at the same time to prevent I/O cache related hangs.
12917 This option new with the API of VirtualBox 3.2 and is now the default for non-IDE storage controllers.
12918 </desc>
12919 </attribute>
12920
12921 <method name="getIDEEmulationPort">
12922 <desc>
12923 Gets the corresponding port number which is emulated as an IDE device.
12924 Works only with SATA controllers.
12925
12926 <result name="E_INVALIDARG">
12927 The @a devicePosition is not in the range 0 to 3.
12928 </result>
12929 <result name="E_NOTIMPL">
12930 The storage controller type is not SATAIntelAhci.
12931 </result>
12932
12933 </desc>
12934 <param name="devicePosition" type="long" dir="in"/>
12935 <param name="portNumber" type="long" dir="return"/>
12936 </method>
12937
12938 <method name="setIDEEmulationPort">
12939 <desc>
12940 Sets the port number which is emulated as an IDE device.
12941 Works only with SATA controllers.
12942
12943 <result name="E_INVALIDARG">
12944 The @a devicePosition is not in the range 0 to 3 or the
12945 @a portNumber is not in the range 0 to 29.
12946 </result>
12947 <result name="E_NOTIMPL">
12948 The storage controller type is not SATAIntelAhci.
12949 </result>
12950
12951 </desc>
12952 <param name="devicePosition" type="long" dir="in"/>
12953 <param name="portNumber" type="long" dir="in"/>
12954 </method>
12955
12956 </interface>
12957
12958<if target="wsdl">
12959
12960 <!--
12961 // IManagedObjectRef
12962 /////////////////////////////////////////////////////////////////////////
12963 -->
12964
12965 <interface
12966 name="IManagedObjectRef" extends="$unknown"
12967 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12968 internal="yes"
12969 wsmap="managed"
12970 wscpp="hardcoded"
12971 >
12972 <desc>
12973 Managed object reference.
12974
12975 Only within the webservice, a managed object reference (which is really
12976 an opaque number) allows a webservice client to address an object
12977 that lives in the address space of the webservice server.
12978
12979 Behind each managed object reference, there is a COM object that lives
12980 in the webservice server's address space. The COM object is not freed
12981 until the managed object reference is released, either by an explicit
12982 call to <link to="IManagedObjectRef::release" /> or by logging off from
12983 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12984 all objects created during the webservice session.
12985
12986 Whenever a method call of the VirtualBox API returns a COM object, the
12987 webservice representation of that method will instead return a
12988 managed object reference, which can then be used to invoke methods
12989 on that object.
12990 </desc>
12991
12992 <method name="getInterfaceName">
12993 <desc>
12994 Returns the name of the interface that this managed object represents,
12995 for example, "IMachine", as a string.
12996 </desc>
12997 <param name="return" type="wstring" dir="return"/>
12998 </method>
12999
13000 <method name="release">
13001 <desc>
13002 Releases this managed object reference and frees the resources that
13003 were allocated for it in the webservice server process. After calling
13004 this method, the identifier of the reference can no longer be used.
13005 </desc>
13006 </method>
13007
13008 </interface>
13009
13010 <!--
13011 // IWebsessionManager
13012 /////////////////////////////////////////////////////////////////////////
13013 -->
13014
13015 <interface
13016 name="IWebsessionManager" extends="$unknown"
13017 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
13018 internal="yes"
13019 wsmap="global"
13020 wscpp="hardcoded"
13021 >
13022 <desc>
13023 Websession manager. This provides essential services
13024 to webservice clients.
13025 </desc>
13026 <method name="logon">
13027 <desc>
13028 Logs a new client onto the webservice and returns a managed object reference to
13029 the IVirtualBox instance, which the client can then use as a basis to further
13030 queries, since all calls to the VirtualBox API are based on the IVirtualBox
13031 interface, in one way or the other.
13032 </desc>
13033 <param name="username" type="wstring" dir="in"/>
13034 <param name="password" type="wstring" dir="in"/>
13035 <param name="return" type="IVirtualBox" dir="return"/>
13036 </method>
13037
13038 <method name="getSessionObject">
13039 <desc>
13040 Returns a managed object reference to the internal ISession object that was created
13041 for this web service session when the client logged on.
13042
13043 <see>ISession</see>
13044 </desc>
13045 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13046 <param name="return" type="ISession" dir="return"/>
13047 </method>
13048
13049 <method name="logoff">
13050 <desc>
13051 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
13052 and destroys all resources associated with the session (most importantly, all
13053 managed objects created in the server while the session was active).
13054 </desc>
13055 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13056 </method>
13057
13058 </interface>
13059
13060</if>
13061
13062 <!--
13063 // IPerformanceCollector & friends
13064 /////////////////////////////////////////////////////////////////////////
13065 -->
13066
13067 <interface
13068 name="IPerformanceMetric" extends="$unknown"
13069 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
13070 >
13071 <desc>
13072 The IPerformanceMetric interface represents parameters of the given
13073 performance metric.
13074 </desc>
13075
13076 <attribute name="metricName" type="wstring" readonly="yes">
13077 <desc>
13078 Name of the metric.
13079 </desc>
13080 </attribute>
13081
13082 <attribute name="object" type="$unknown" readonly="yes">
13083 <desc>
13084 Object this metric belongs to.
13085 </desc>
13086 </attribute>
13087
13088 <attribute name="description" type="wstring" readonly="yes">
13089 <desc>
13090 Textual description of the metric.
13091 </desc>
13092 </attribute>
13093
13094 <attribute name="period" type="unsigned long" readonly="yes">
13095 <desc>
13096 Time interval between samples, measured in seconds.
13097 </desc>
13098 </attribute>
13099
13100 <attribute name="count" type="unsigned long" readonly="yes">
13101 <desc>
13102 Number of recent samples retained by the performance collector for this
13103 metric.
13104
13105 When the collected sample count exceeds this number, older samples
13106 are discarded.
13107 </desc>
13108 </attribute>
13109
13110 <attribute name="unit" type="wstring" readonly="yes">
13111 <desc>
13112 Unit of measurement.
13113 </desc>
13114 </attribute>
13115
13116 <attribute name="minimumValue" type="long" readonly="yes">
13117 <desc>
13118 Minimum possible value of this metric.
13119 </desc>
13120 </attribute>
13121
13122 <attribute name="maximumValue" type="long" readonly="yes">
13123 <desc>
13124 Maximum possible value of this metric.
13125 </desc>
13126 </attribute>
13127 </interface>
13128
13129 <interface
13130 name="IPerformanceCollector" extends="$unknown"
13131 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
13132 wsmap="managed"
13133 >
13134 <desc>
13135 The IPerformanceCollector interface represents a service that collects
13136 and stores performance metrics data.
13137
13138 Performance metrics are associated with objects of interfaces like IHost
13139 and IMachine. Each object has a distinct set of performance metrics. The
13140 set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
13141
13142 Metric data is collected at the specified intervals and is retained
13143 internally. The interval and the number of retained samples can be set
13144 with <link to="IPerformanceCollector::setupMetrics" />. Both metric data
13145 and collection settings are not persistent, they are discarded as soon as
13146 VBoxSVC process terminates. Moreover, metric settings and data associated
13147 with a particular VM only exist while VM is running. They disappear as
13148 soon as VM shuts down. It is not possible to set up metrics for machines
13149 that are powered off. One needs to start VM first, then set up metric
13150 collection parameters.
13151
13152 Metrics are organized hierarchically, with each level separated by a
13153 slash (/) character. Generally, the scheme for metric names is like this:
13154
13155 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
13156
13157 "Category/Metric" together form the base metric name. A base metric is
13158 the smallest unit for which a sampling interval and the number of
13159 retained samples can be set. Only base metrics can be enabled and
13160 disabled. All sub-metrics are collected when their base metric is
13161 collected. Collected values for any set of sub-metrics can be queried
13162 with <link to="IPerformanceCollector::queryMetricsData" />.
13163
13164 For example "CPU/Load/User:avg" metric name stands for the "CPU"
13165 category, "Load" metric, "User" submetric, "average" aggregate. An
13166 aggregate function is computed over all retained data. Valid aggregate
13167 functions are:
13168
13169 <ul>
13170 <li>avg -- average</li>
13171 <li>min -- minimum</li>
13172 <li>max -- maximum</li>
13173 </ul>
13174
13175 When setting up metric parameters, querying metric data, enabling or
13176 disabling metrics wildcards can be used in metric names to specify a
13177 subset of metrics. For example, to select all CPU-related metrics
13178 use <tt>CPU/*</tt>, all averages can be queried using <tt>*:avg</tt> and
13179 so on. To query metric values without aggregates <tt>*:</tt> can be used.
13180
13181 The valid names for base metrics are:
13182
13183 <ul>
13184 <li>CPU/Load</li>
13185 <li>CPU/MHz</li>
13186 <li>RAM/Usage</li>
13187 </ul>
13188
13189 The general sequence for collecting and retrieving the metrics is:
13190 <ul>
13191 <li>
13192 Obtain an instance of IPerformanceCollector with
13193 <link to="IVirtualBox::performanceCollector" />
13194 </li>
13195 <li>
13196 Allocate and populate an array with references to objects the metrics
13197 will be collected for. Use references to IHost and IMachine objects.
13198 </li>
13199 <li>
13200 Allocate and populate an array with base metric names the data will
13201 be collected for.
13202 </li>
13203 <li>
13204 Call <link to="IPerformanceCollector::setupMetrics" />. From now on
13205 the metric data will be collected and stored.
13206 </li>
13207 <li>
13208 Wait for the data to get collected.
13209 </li>
13210 <li>
13211 Allocate and populate an array with references to objects the metric
13212 values will be queried for. You can re-use the object array used for
13213 setting base metrics.
13214 </li>
13215 <li>
13216 Allocate and populate an array with metric names the data will be
13217 collected for. Note that metric names differ from base metric names.
13218 </li>
13219 <li>
13220 Call <link to="IPerformanceCollector::queryMetricsData" />. The data
13221 that have been collected so far are returned. Note that the values
13222 are still retained internally and data collection continues.
13223 </li>
13224 </ul>
13225
13226 For an example of usage refer to the following files in VirtualBox SDK:
13227 <ul>
13228 <li>
13229 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13230 </li>
13231 <li>
13232 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13233 </li>
13234 </ul>
13235 </desc>
13236
13237 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13238 <desc>
13239 Array of unique names of metrics.
13240
13241 This array represents all metrics supported by the performance
13242 collector. Individual objects do not necessarily support all of them.
13243 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13244 list of supported metrics for a particular object.
13245 </desc>
13246 </attribute>
13247
13248 <method name="getMetrics">
13249 <desc>
13250 Returns parameters of specified metrics for a set of objects.
13251 <note>
13252 @c Null metrics array means all metrics. @c Null object array means
13253 all existing objects.
13254 </note>
13255 </desc>
13256 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13257 <desc>
13258 Metric name filter. Currently, only a comma-separated list of metrics
13259 is supported.
13260 </desc>
13261 </param>
13262 <param name="objects" type="$unknown" dir="in" safearray="yes">
13263 <desc>
13264 Set of objects to return metric parameters for.
13265 </desc>
13266 </param>
13267 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13268 <desc>
13269 Array of returned metric parameters.
13270 </desc>
13271 </param>
13272 </method>
13273
13274 <method name="setupMetrics">
13275 <desc>
13276 Sets parameters of specified base metrics for a set of objects. Returns
13277 an array of <link to="IPerformanceMetric" /> describing the metrics
13278 have been affected.
13279 <note>
13280 @c Null or empty metric name array means all metrics. @c Null or
13281 empty object array means all existing objects. If metric name array
13282 contains a single element and object array contains many, the single
13283 metric name array element is applied to each object array element to
13284 form metric/object pairs.
13285 </note>
13286 </desc>
13287 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13288 <desc>
13289 Metric name filter. Comma-separated list of metrics with wildcard
13290 support.
13291 </desc>
13292 </param>
13293 <param name="objects" type="$unknown" dir="in" safearray="yes">
13294 <desc>
13295 Set of objects to setup metric parameters for.
13296 </desc>
13297 </param>
13298 <param name="period" type="unsigned long" dir="in">
13299 <desc>
13300 Time interval in seconds between two consecutive samples of
13301 performance data.
13302 </desc>
13303 </param>
13304 <param name="count" type="unsigned long" dir="in">
13305 <desc>
13306 Number of samples to retain in performance data history. Older
13307 samples get discarded.
13308 </desc>
13309 </param>
13310 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13311 <desc>
13312 Array of metrics that have been modified by the call to this method.
13313 </desc>
13314 </param>
13315 </method>
13316
13317 <method name="enableMetrics">
13318 <desc>
13319 Turns on collecting specified base metrics. Returns an array of
13320 <link to="IPerformanceMetric" /> describing the metrics have been
13321 affected.
13322 <note>
13323 @c Null or empty metric name array means all metrics. @c Null or
13324 empty object array means all existing objects. If metric name array
13325 contains a single element and object array contains many, the single
13326 metric name array element is applied to each object array element to
13327 form metric/object pairs.
13328 </note>
13329 </desc>
13330 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13331 <desc>
13332 Metric name filter. Comma-separated list of metrics with wildcard
13333 support.
13334 </desc>
13335 </param>
13336 <param name="objects" type="$unknown" dir="in" safearray="yes">
13337 <desc>
13338 Set of objects to enable metrics for.
13339 </desc>
13340 </param>
13341 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13342 <desc>
13343 Array of metrics that have been modified by the call to this method.
13344 </desc>
13345 </param>
13346 </method>
13347
13348 <method name="disableMetrics">
13349 <desc>
13350 Turns off collecting specified base metrics. Returns an array of
13351 <link to="IPerformanceMetric" /> describing the metrics have been
13352 affected.
13353 <note>
13354 @c Null or empty metric name array means all metrics. @c Null or
13355 empty object array means all existing objects. If metric name array
13356 contains a single element and object array contains many, the single
13357 metric name array element is applied to each object array element to
13358 form metric/object pairs.
13359 </note>
13360 </desc>
13361 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13362 <desc>
13363 Metric name filter. Comma-separated list of metrics with wildcard
13364 support.
13365 </desc>
13366 </param>
13367 <param name="objects" type="$unknown" dir="in" safearray="yes">
13368 <desc>
13369 Set of objects to disable metrics for.
13370 </desc>
13371 </param>
13372 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13373 <desc>
13374 Array of metrics that have been modified by the call to this method.
13375 </desc>
13376 </param>
13377 </method>
13378
13379 <method name="queryMetricsData">
13380 <desc>
13381 Queries collected metrics data for a set of objects.
13382
13383 The data itself and related metric information are returned in seven
13384 parallel and one flattened array of arrays. Elements of
13385 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13386 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13387 the same index describe one set of values corresponding to a single
13388 metric.
13389
13390 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13391 start and length of a sub-array is indicated by
13392 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13393 value for metric <tt>metricNames[i]</tt> is at
13394 <tt>returnData[returnIndices[i]]</tt>.
13395
13396 <note>
13397 @c Null or empty metric name array means all metrics. @c Null or
13398 empty object array means all existing objects. If metric name array
13399 contains a single element and object array contains many, the single
13400 metric name array element is applied to each object array element to
13401 form metric/object pairs.
13402 </note>
13403 <note>
13404 Data collection continues behind the scenes after call to @c
13405 queryMetricsData. The return data can be seen as the snapshot of the
13406 current state at the time of @c queryMetricsData call. The internally
13407 kept metric values are not cleared by the call. This makes possible
13408 querying different subsets of metrics or aggregates with subsequent
13409 calls. If periodic querying is needed it is highly suggested to query
13410 the values with @c interval*count period to avoid confusion. This way
13411 a completely new set of data values will be provided by each query.
13412 </note>
13413 </desc>
13414 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13415 <desc>
13416 Metric name filter. Comma-separated list of metrics with wildcard
13417 support.
13418 </desc>
13419 </param>
13420 <param name="objects" type="$unknown" dir="in" safearray="yes">
13421 <desc>
13422 Set of objects to query metrics for.
13423 </desc>
13424 </param>
13425 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13426 <desc>
13427 Names of metrics returned in @c returnData.
13428 </desc>
13429 </param>
13430 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13431 <desc>
13432 Objects associated with metrics returned in @c returnData.
13433 </desc>
13434 </param>
13435 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13436 <desc>
13437 Units of measurement for each returned metric.
13438 </desc>
13439 </param>
13440 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13441 <desc>
13442 Divisor that should be applied to return values in order to get
13443 floating point values. For example:
13444 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13445 will retrieve the floating point value of i-th sample of the first
13446 metric.
13447 </desc>
13448 </param>
13449 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13450 <desc>
13451 Sequence numbers of the first elements of value sequences of
13452 particular metrics returned in @c returnData. For aggregate metrics
13453 it is the sequence number of the sample the aggregate started
13454 calculation from.
13455 </desc>
13456 </param>
13457 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13458 <desc>
13459 Indices of the first elements of value sequences of particular
13460 metrics returned in @c returnData.
13461 </desc>
13462 </param>
13463 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13464 <desc>
13465 Lengths of value sequences of particular metrics.
13466 </desc>
13467 </param>
13468 <param name="returnData" type="long" dir="return" safearray="yes">
13469 <desc>
13470 Flattened array of all metric data containing sequences of values for
13471 each metric.
13472 </desc>
13473 </param>
13474 </method>
13475
13476 </interface>
13477 <enum
13478 name="NATAliasMode"
13479 uuid="67772168-50d9-11df-9669-7fb714ee4fa1">
13480 <desc></desc>
13481 <const name="AliasLog" value="0x1">
13482 <desc></desc>
13483 </const>
13484 <const name="AliasProxyOnly" value="0x02">
13485 <desc></desc>
13486 </const>
13487 <const name="AliasUseSamePorts" value="0x04">
13488 <desc></desc>
13489 </const>
13490 </enum>
13491 <enum
13492 name="NATProtocol"
13493 uuid="e90164be-eb03-11de-94af-fff9b1c1b19f"
13494 >
13495 <desc>Protocol definitions used with NAT port-forwarding rules.</desc>
13496 <const name="UDP" value="0">
13497 <desc>Port-forwarding uses UDP protocol.</desc>
13498 </const>
13499 <const name="TCP" value="1">
13500 <desc>Port-forwarding uses TCP protocol.</desc>
13501 </const>
13502 </enum>
13503
13504 <interface
13505 name="INATEngine" extends="$unknown"
13506 uuid="4b286616-eb03-11de-b0fb-1701eca42246"
13507 wsmap="managed"
13508 >
13509 <desc>Interface for managing a NAT engine which is used with a virtual machine. This
13510 allows for changing NAT behavior such as port-forwarding rules. This interface is
13511 used in the <link to="INetworkAdapter::natDriver" /> attribute.</desc>
13512 <attribute name="network" type="wstring">
13513 <desc>The network attribute of the NAT engine (the same value is used with built-in
13514 DHCP server to fill corresponding fields of DHCP leases).</desc>
13515 </attribute>
13516 <attribute name="hostIP" type="wstring">
13517 <desc>IP of host interface to bind all opened sockets to.
13518 <note>Changing this does not change binding of port forwarding.</note>
13519 </desc>
13520 </attribute>
13521 <attribute name="tftpPrefix" type="wstring">
13522 <desc>TFTP prefix attribute which is used with the built-in DHCP server to fill
13523 the corresponding fields of DHCP leases.</desc>
13524 </attribute>
13525 <attribute name="tftpBootFile" type="wstring">
13526 <desc>TFTP boot file attribute which is used with the built-in DHCP server to fill
13527 the corresponding fields of DHCP leases.</desc>
13528 </attribute>
13529 <attribute name="tftpNextServer" type="wstring">
13530 <desc>TFTP server attribute which is used with the built-in DHCP server to fill
13531 the corresponding fields of DHCP leases.
13532 <note>The preferred form is IPv4 addresses.</note>
13533 </desc>
13534 </attribute>
13535 <attribute name="aliasMode" type="unsigned long">
13536 <desc></desc>
13537 </attribute>
13538 <attribute name="dnsPassDomain" type="boolean">
13539 <desc>Whether the DHCP server should pass the DNS domain used by the host.</desc>
13540 </attribute>
13541 <attribute name="dnsProxy" type="boolean">
13542 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
13543 of the DNS proxy and process traffic using DNS servers registered on the host.</desc>
13544 </attribute>
13545 <attribute name="dnsUseHostResolver" type="boolean">
13546 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
13547 of the DNS proxy and process traffic using the host resolver mechanism.</desc>
13548 </attribute>
13549 <attribute name="redirects" type="wstring" readonly="yes" safearray="yes">
13550 <desc>Array of NAT port-forwarding rules in string representation, in the following
13551 format: "name,protocol id,host ip,host port,guest ip,guest port".</desc>
13552 </attribute>
13553 <method name="setNetworkSettings">
13554 <desc>Sets network configuration of the NAT engine.</desc>
13555 <param name="mtu" type="unsigned long" dir="in">
13556 <desc>MTU (maximum transmission unit) of the NAT engine in bytes.</desc>
13557 </param>
13558 <param name="sockSnd" type="unsigned long" dir="in">
13559 <desc>Capacity of the socket send buffer in bytes when creating a new socket.</desc>
13560 </param>
13561 <param name="sockRcv" type="unsigned long" dir="in">
13562 <desc>Capacity of the socket receive buffer in bytes when creating a new socket.</desc>
13563 </param>
13564 <param name="TcpWndSnd" type="unsigned long" dir="in">
13565 <desc>Initial size of the NAT engine's sending TCP window in bytes when
13566 establishing a new TCP connection.</desc>
13567 </param>
13568 <param name="TcpWndRcv" type="unsigned long" dir="in">
13569 <desc>Initial size of the NAT engine's receiving TCP window in bytes when
13570 establishing a new TCP connection.</desc>
13571 </param>
13572 </method>
13573 <method name="getNetworkSettings">
13574 <desc>Returns network configuration of NAT engine. See <link to="#setNetworkSettings" />
13575 for parameter descriptions.</desc>
13576 <param name="mtu" type="unsigned long" dir="out" />
13577 <param name="sockSnd" type="unsigned long" dir="out" />
13578 <param name="sockRcv" type="unsigned long" dir="out" />
13579 <param name="TcpWndSnd" type="unsigned long" dir="out" />
13580 <param name="TcpWndRcv" type="unsigned long" dir="out" />
13581 </method>
13582 <method name="addRedirect">
13583 <desc>Adds a new NAT port-forwarding rule.</desc>
13584 <param name="name" type="wstring" dir="in">
13585 <desc>The name of the rule. An empty name is acceptable, in which case the NAT engine
13586 auto-generates one using the other parameters.</desc>
13587 </param>
13588 <param name="proto" type="NATProtocol" dir="in">
13589 <desc>Protocol handled with the rule.</desc>
13590 </param>
13591 <param name="hostIp" type="wstring" dir="in">
13592 <desc>IP of the host interface to which the rule should apply. An empty ip address is
13593 acceptable, in which case the NAT engine binds the handling socket to any interface.</desc>
13594 </param>
13595 <param name="hostPort" type="unsigned short" dir="in">
13596 <desc>The port number to listen on.</desc>
13597 </param>
13598 <param name="guestIp" type="wstring" dir="in">
13599 <desc>The IP address of the guest which the NAT engine will forward matching packets
13600 to. An empty IP address is acceptable, in which case the NAT engine will forward
13601 packets to the first DHCP lease (x.x.x.15).</desc>
13602 </param>
13603 <param name="guestPort" type="unsigned short" dir="in">
13604 <desc>The port number to forward.</desc>
13605 </param>
13606 </method>
13607 <method name="removeRedirect">
13608 <desc>Removes a port-forwarding rule that was previously registered.</desc>
13609 <param name="name" type="wstring" dir="in">
13610 <desc>The name of the rule to delete.</desc>
13611 </param>
13612 </method>
13613 </interface>
13614
13615 <enum
13616 name="VBoxEventType"
13617 uuid="2c76667e-6981-4122-a71a-cdfd6a6eb575">
13618
13619 <desc>
13620 Type of an event.
13621 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
13622 </desc>
13623
13624 <const name="Invalid" value="0">
13625 <desc>
13626 Invalid event, must be first.
13627 </desc>
13628 </const>
13629
13630 <const name="Any" value="1">
13631 <desc>
13632 Wildcard for all events.
13633 Events of this type are never delivered, and only used in
13634 registerListener() call to simplify registration.
13635 </desc>
13636 </const>
13637
13638 <const name="Vetoable" value="2">
13639 <desc>
13640 Wildcard for all vetoable events. Events of this type are never delivered, and only
13641 used in registerListener() call to simplify registration.
13642 </desc>
13643 </const>
13644
13645 <const name="MachineEvent" value="3">
13646 <desc>
13647 Wildcard for all machine events. Events of this type are never delivered, and only used in
13648 registerListener() call to simplify registration.
13649 </desc>
13650 </const>
13651
13652 <const name="SnapshotEvent" value="4">
13653 <desc>
13654 Wildcard for all snapshot events. Events of this type are never delivered, and only used in
13655 registerListener() call to simplify registration.
13656 </desc>
13657 </const>
13658
13659 <const name="InputEvent" value="5">
13660 <desc>
13661 Wildcard for all input device (keyboard, mouse) events.
13662 Events of this type are never delivered, and only used in
13663 registerListener() call to simplify registration.
13664 </desc>
13665 </const>
13666
13667 <const name="LastWildcard" value="31">
13668 <desc>
13669 Last wildcard.
13670 </desc>
13671 </const>
13672
13673 <const name="OnMachineStateChanged" value="32">
13674 <desc>
13675 See <link to="IMachineStateChangedEvent">IMachineStateChangedEvent</link>.
13676 </desc>
13677 </const>
13678 <const name="OnMachineDataChanged" value="33">
13679 <desc>
13680 See <link to="IMachineDataChangedEvent">IMachineDataChangedEvent</link>.
13681 </desc>
13682 </const>
13683 <const name="OnExtraDataChanged" value="34">
13684 <desc>
13685 See <link to="IExtraDataChangedEvent">IExtraDataChangedEvent</link>.
13686 </desc>
13687 </const>
13688 <const name="OnExtraDataCanChange" value="35">
13689 <desc>
13690 See <link to="IExtraDataCanChangeEvent">IExtraDataCanChangeEvent</link>.
13691 </desc>
13692 </const>
13693 <const name="OnMediumRegistered" value="36">
13694 <desc>
13695 See <link to="IMediumRegisteredEvent">IMediumRegisteredEvent</link>.
13696 </desc>
13697 </const>
13698 <const name="OnMachineRegistered" value="37">
13699 <desc>
13700 See <link to="IMachineRegisteredEvent">IMachineRegisteredEvent</link>.
13701 </desc>
13702 </const>
13703 <const name="OnSessionStateChanged" value="38">
13704 <desc>
13705 See <link to="ISessionStateChangedEvent">ISessionStateChangedEvent</link>.
13706 </desc>
13707 </const>
13708 <const name="OnSnapshotTaken" value="39">
13709 <desc>
13710 See <link to="ISnapshotTakenEvent">ISnapshotTakenEvent</link>.
13711 </desc>
13712 </const>
13713 <const name="OnSnapshotDeleted" value="40">
13714 <desc>
13715 See <link to="ISnapshotDeletedEvent">ISnapshotDeletedEvent</link>.
13716 </desc>
13717 </const>
13718 <const name="OnSnapshotChanged" value="41">
13719 <desc>
13720 See <link to="ISnapshotChangedEvent">ISnapshotChangedEvent</link>.
13721 </desc>
13722 </const>
13723 <const name="OnGuestPropertyChanged" value="42">
13724 <desc>
13725 See <link to="IGuestPropertyChangedEvent">IGuestPropertyChangedEvent</link>.
13726 </desc>
13727 </const>
13728 <!-- Console events -->
13729 <const name="OnMousePointerShapeChanged" value="43">
13730 <desc>
13731 See <link to="IMousePointerShapeChangedEvent">IMousePointerShapeChangedEvent</link>.
13732 </desc>
13733 </const>
13734 <const name="OnMouseCapabilityChanged" value="44">
13735 <desc>
13736 See <link to="IMouseCapabilityChangedEvent">IMouseCapabilityChangedEvent</link>.
13737 </desc>
13738 </const>
13739 <const name="OnKeyboardLedsChanged" value="45">
13740 <desc>
13741 See <link to="IKeyboardLedsChangedEvent">IKeyboardLedsChangedEvent</link>.
13742 </desc>
13743 </const>
13744 <const name="OnStateChanged" value="46">
13745 <desc>
13746 See <link to="IStateChangedEvent">IStateChangedEvent</link>.
13747 </desc>
13748 </const>
13749 <const name="OnAdditionsStateChanged" value="47">
13750 <desc>
13751 See <link to="IAdditionsStateChangedEvent">IAdditionsStateChangedEvent</link>.
13752 </desc>
13753 </const>
13754 <const name="OnNetworkAdapterChanged" value="48">
13755 <desc>
13756 See <link to="INetworkAdapterChangedEvent">INetworkAdapterChangedEvent</link>.
13757 </desc>
13758 </const>
13759 <const name="OnSerialPortChanged" value="49">
13760 <desc>
13761 See <link to="ISerialPortChangedEvent">ISerialPortChangedEvent</link>.
13762 </desc>
13763 </const>
13764 <const name="OnParallelPortChanged" value="50">
13765 <desc>
13766 See <link to="IParallelPortChangedEvent">IParallelPortChangedEvent</link>.
13767 </desc>
13768 </const>
13769 <const name="OnStorageControllerChanged" value="51">
13770 <desc>
13771 See <link to="IStorageControllerChangedEvent">IStorageControllerChangedEvent</link>.
13772 </desc>
13773 </const>
13774 <const name="OnMediumChanged" value="52">
13775 <desc>
13776 See <link to="IMediumChangedEvent">IMediumChangedEvent</link>.
13777 </desc>
13778 </const>
13779 <const name="OnVRDPServerChanged" value="53">
13780 <desc>
13781 See <link to="IVRDPServerChangedEvent">IVRDPServerChangedEvent</link>.
13782 </desc>
13783 </const>
13784 <const name="OnUSBControllerChanged" value="54">
13785 <desc>
13786 See <link to="IUSBControllerChangedEvent">IUSBControllerChangedEvent</link>.
13787 </desc>
13788 </const>
13789 <const name="OnUSBDeviceStateChanged" value="55">
13790 <desc>
13791 See <link to="IUSBDeviceStateChangedEvent">IUSBDeviceStateChangedEvent</link>.
13792 </desc>
13793 </const>
13794 <const name="OnSharedFolderChanged" value="56">
13795 <desc>
13796 See <link to="ISharedFolderChangedEvent">ISharedFolderChangedEvent</link>.
13797 </desc>
13798 </const>
13799 <const name="OnRuntimeError" value="57">
13800 <desc>
13801 See <link to="IRuntimeErrorEvent">IRuntimeErrorEvent</link>.
13802 </desc>
13803 </const>
13804 <const name="OnCanShowWindow" value="58">
13805 <desc>
13806 See <link to="ICanShowWindowEvent">ICanShowWindowEvent</link>.
13807 </desc>
13808 </const>
13809 <const name="OnShowWindow" value="59">
13810 <desc>
13811 See <link to="IShowWindowEvent">IShowWindowEvent</link>.
13812 </desc>
13813 </const>
13814 <const name="OnCPUChanged" value="60">
13815 <desc>
13816 See <link to="ICPUChangedEvent">ICPUChangedEvent</link>.
13817 </desc>
13818 </const>
13819 <const name="OnRemoteDisplayInfoChanged" value="61">
13820 <desc>
13821 See <link to="IRemoteDisplayInfoChangedEvent">IRemoteDisplayInfoChangedEvent</link>.
13822 </desc>
13823 </const>
13824 <const name="OnEventSourceChanged" value="62">
13825 <desc>
13826 See <link to="IEventSourceChangedEvent">IEventSourceChangedEvent</link>.
13827 </desc>
13828 </const>
13829 <const name="OnCPUPriorityChanged" value="63">
13830 <desc>
13831 See <link to="ICPUPriorityChangedEvent">ICPUPriorityChangedEvent</link>.
13832 </desc>
13833 </const>
13834 <!-- Last event marker -->
13835 <const name="Last" value="64">
13836 <desc>
13837 Must be last event, used for iterations and structures relying on numerical event values.
13838 </desc>
13839 </const>
13840
13841 </enum>
13842
13843 <interface
13844 name="IEventSource" extends="$unknown"
13845 uuid="3c670618-f727-4fe9-94d2-8243f489a033"
13846 wsmap="managed"
13847 >
13848 <desc>
13849 Event source. Generally, any object which could generate events can be an event source,
13850 or aggregate one. To simplify using one-way protocols such as webservices running on top of HTTP(S),
13851 an event source can work with listeners in either active or passive mode. In active mode it is up to
13852 the IEventSource implementation to call <link to="IEventListener::handleEvent" />, in passive mode the
13853 event source keeps track of pending events for each listener and returns available events on demand.
13854
13855 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
13856 </desc>
13857
13858 <method name="createListener">
13859 <desc>
13860 Creates a new listener object, useful for passive mode.
13861 </desc>
13862 <param name="listener" type="IEventListener" dir="return"/>
13863 </method>
13864
13865 <method name="registerListener">
13866 <desc>
13867 Register an event listener.
13868
13869 <note>
13870 To avoid system overload, the VirtualBox server process checks if passive event
13871 listeners call <link to="IEventSource::getEvent"/> frequently enough. In the
13872 current implementation, if more than 100 pending events are detected for a passive
13873 event listener, it is forcefully unregistered by the system, and further
13874 <link to="#getEvent" /> calls will return @c VBOX_E_OBJECT_NOT_FOUND.
13875 </note>
13876 </desc>
13877 <param name="listener" type="IEventListener" dir="in">
13878 <desc>Listener to register.</desc>
13879 </param>
13880 <param name="interesting" type="VBoxEventType" dir="in" safearray="yes">
13881 <desc>
13882 Event types listener is interested in. One can use wildcards like -
13883 <link to="VBoxEventType::Any"/> to specify wildcards, matching more
13884 than one event.
13885 </desc>
13886 </param>
13887 <param name="active" type="boolean" dir="in">
13888 <desc>
13889 Which mode this listener is operating in.
13890 In active mode, <link to="IEventListener::handleEvent" /> is called directly.
13891 In passive mode, an internal event queue is created for this this IEventListener.
13892 For each event coming in, it is added to queues for all interested registered passive
13893 listeners. It is then up to the external code to call the listener's
13894 <link to="IEventListener::handleEvent" /> method. When done with an event, the
13895 external code must call <link to="#eventProcessed" />.
13896 </desc>
13897 </param>
13898 </method>
13899
13900 <method name="unregisterListener">
13901 <desc>
13902 Unregister an event listener. If listener is passive, and some waitable events are still
13903 in queue they are marked as processed automatically.
13904 </desc>
13905 <param name="listener" type="IEventListener" dir="in">
13906 <desc>Listener to unregister.</desc>
13907 </param>
13908 </method>
13909
13910 <method name="fireEvent">
13911 <desc>
13912 Fire an event for this source.
13913 </desc>
13914 <param name="event" type="IEvent" dir="in">
13915 <desc>Event to deliver.</desc>
13916 </param>
13917 <param name="timeout" type="long" dir="in">
13918 <desc>
13919 Maximum time to wait for event processing (if event is waitable), in ms;
13920 0 = no wait, -1 = indefinite wait.
13921 </desc>
13922 </param>
13923 <param name="result" type="boolean" dir="return">
13924 <desc>true if an event was delivered to all targets, or is non-waitable.</desc>
13925 </param>
13926 </method>
13927
13928 <method name="getEvent">
13929 <desc>
13930 Get events from this peer's event queue (for passive mode). Calling this method
13931 regularly is required for passive event listeners to avoid system overload;
13932 see <link to="IEventSource::registerListener" /> for details.
13933
13934 <result name="VBOX_E_OBJECT_NOT_FOUND">
13935 Listener is not registered, or autounregistered.
13936 </result>
13937 </desc>
13938 <param name="listener" type="IEventListener" dir="in">
13939 <desc>Which listener to get data for.</desc>
13940 </param>
13941 <param name="timeout" type="long" dir="in">
13942 <desc>
13943 Maximum time to wait for events, in ms;
13944 0 = no wait, -1 = indefinite wait.
13945 </desc>
13946 </param>
13947 <param name="event" type="IEvent" dir="return">
13948 <desc>Event retrieved, or null if none available.</desc>
13949 </param>
13950 </method>
13951
13952 <method name="eventProcessed">
13953 <desc>
13954 Must be called for waitable events after a particular listener finished its
13955 event processing. When all listeners of a particular event have called this
13956 method, the system will then call <link to="IEvent::setProcessed" />.
13957 </desc>
13958 <param name="listener" type="IEventListener" dir="in">
13959 <desc>Which listener processed event.</desc>
13960 </param>
13961 <param name="event" type="IEvent" dir="in">
13962 <desc>Which event.</desc>
13963 </param>
13964 </method>
13965
13966 </interface>
13967
13968 <interface
13969 name="IEventListener" extends="$unknown"
13970 uuid="67099191-32e7-4f6c-85ee-422304c71b90"
13971 wsmap="managed"
13972 >
13973 <desc>
13974 Event listener. An event listener can work in either active or passive mode, depending on the way
13975 it was registered.
13976 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
13977 </desc>
13978
13979 <method name="handleEvent">
13980 <desc>
13981 Handle event callback (called directly by IEventSource in active mode, or could be
13982 called by event processor thread in passive mode).
13983 </desc>
13984 <param name="event" type="IEvent" dir="in">
13985 <desc>Event available.</desc>
13986 </param>
13987 </method>
13988
13989 </interface>
13990
13991 <interface
13992 name="IEvent" extends="$unknown"
13993 uuid="0ca2adba-8f30-401b-a8cd-fe31dbe839c0"
13994 wsmap="managed"
13995 >
13996 <desc>
13997 Abstract parent interface for VirtualBox events. Actual events will typically implement
13998 a more specific interface which derives from this (see below).
13999
14000 <b>Introduction to VirtualBox events</b>
14001
14002 Generally speaking, an event (represented by this interface) signals that something
14003 happened, while an event listener (see <link to="IEventListener" />) represents an
14004 entity that is interested in certain events. In order for this to work with
14005 unidirectional protocols (i.e. web services), the concepts of passive and active
14006 listener are used.
14007
14008 Event consumers can register themselves as listeners, providing an array of
14009 events they are interested in (see <link to="IEventSource::registerListener" />).
14010 When an event triggers, the listener is notified about the event. The exact
14011 mechanism of the notification depends on whether the listener was registered as
14012 an active or passive listener:
14013
14014 <ul>
14015 <li>An active listener is very similar to a callback: it is a function invoked
14016 by the API. As opposed to the callbacks that were used in the API before
14017 VirtualBox 3.3 however, events are now objects with an interface hierarchy.
14018 </li>
14019
14020 <li>Passive listeners are somewhat tricker to implement, but do not require
14021 a client function to be callable, which is not an option with scripting
14022 languages or web service clients. Internally the <link to="IEventSource" />
14023 implementation maintains an event queue for each passive listener, and
14024 newly arrived events are put in this queue. When the listener calls
14025 <link to="IEventSource::getEvent"/>, first element from its internal event
14026 queue is returned. When the client completes processing of an event,
14027 the <link to="IEventSource::eventProcessed" /> function must be called,
14028 acknowledging that the event was processed. It supports implementing
14029 waitable events. On passive listener unregistration, all events from its
14030 queue are auto-acknowledged.
14031 </li>
14032 </ul>
14033
14034 Waitable events are useful in situations where the event generator wants to track
14035 delivery or a party wants to wait until all listeners have completed the event. A
14036 typical example would be a vetoable event (see <link to="IVetoEvent" />) where a
14037 listeners might veto a certain action, and thus the event producer has to make
14038 sure that all listeners have processed the event and not vetoed before taking
14039 the action.
14040
14041 A given event may have both passive and active listeners at the same time.
14042
14043 <b>Using events</b>
14044
14045 Any VirtualBox object capable of producing externally visible events provides an
14046 @c eventSource read-only attribute, which is of the type <link to="IEventSource" />.
14047 This event source object is notified by VirtualBox once something has happened, so
14048 consumers may register event listeners with this event source. To register a listener,
14049 an object implementing the <link to="IEventListener" /> interface must be provided.
14050 For active listeners, such an object is typically created by the consumer, while for
14051 passive listeners <link to="IEventSource::createListener" /> should be used. Please
14052 note that a listener created with @c createListener() must not be used as an active listener.
14053
14054 Once created, the listener must be registered to listen for the desired events
14055 (see <link to="IEventSource::registerListener" />), providing an array of
14056 <link to="VBoxEventType" /> enums. Those elements can either be the individual
14057 event IDs or wildcards matching multiple event IDs.
14058
14059 After registration, the callback's <link to="IEventListener::handleEvent" /> method is
14060 called automatically when the event is triggered, while passive listeners have to call
14061 <link to="IEventSource::getEvent" /> and <link to="IEventSource::eventProcessed" /> in
14062 an event processing loop.
14063
14064 The IEvent interface is an abstract parent interface for all such VirtualBox events
14065 coming in. As a result, the standard use pattern inside <link to="IEventListener::handleEvent" />
14066 or the event processing loop is to check the <link to="#type" /> attribute of the event and
14067 then cast to the appropriate specific interface using @c QueryInterface().
14068 </desc>
14069
14070 <attribute name="type" readonly="yes" type="VBoxEventType">
14071 <desc>
14072 Event type.
14073 </desc>
14074 </attribute>
14075
14076 <attribute name="source" readonly="yes" type="IEventSource">
14077 <desc>
14078 Source of this event.
14079 </desc>
14080 </attribute>
14081
14082 <attribute name="waitable" readonly="yes" type="boolean">
14083 <desc>
14084 If we can wait for this event being processed. If false, waitProcessed() returns immediately,
14085 and setProcessed() doesn't make sense. Non-waitable events are generally better performing,
14086 as no additional overhead associated with waitability imposed.
14087 Waitable events are needed when one need to be able to wait for particular event processed,
14088 for example for vetoable changes, or if event refers to some resource which need to be kept immutable
14089 until all consumers confirmed events.
14090 </desc>
14091 </attribute>
14092
14093 <method name="setProcessed">
14094 <desc>
14095 Internal method called by the system when all listeners of a particular event have called
14096 <link to="IEventSource::eventProcessed" />. This should not be called by client code.
14097 </desc>
14098 </method>
14099
14100 <method name="waitProcessed">
14101 <desc>
14102 Wait until time outs, or this event is processed. Event must be waitable for this operation to have
14103 described semantics, for non-waitable returns true immediately.
14104 </desc>
14105 <param name="timeout" type="long" dir="in">
14106 <desc>
14107 Maximum time to wait for event processeing, in ms;
14108 0 = no wait, -1 = indefinite wait.
14109 </desc>
14110 </param>
14111 <param name="result" type="boolean" dir="return">
14112 <desc>If this event was processed before timeout.</desc>
14113 </param>
14114 </method>
14115 </interface>
14116
14117
14118 <interface
14119 name="IMachineEvent" extends="IEvent"
14120 uuid="92ed7b1a-0d96-40ed-ae46-a564d484325e"
14121 wsmap="managed" id="MachineEvent"
14122 >
14123 <desc>Base abstract interface for all machine events.</desc>
14124
14125 <attribute name="machineId" readonly="yes" type="uuid" mod="string">
14126 <desc>ID of the machine this event relates to.</desc>
14127 </attribute>
14128
14129 </interface>
14130
14131 <interface
14132 name="IMachineStateChangedEvent" extends="IMachineEvent"
14133 uuid="5748F794-48DF-438D-85EB-98FFD70D18C9"
14134 wsmap="managed" autogen="VBoxEvent" id="OnMachineStateChanged"
14135 >
14136 <desc>Machine state change event.</desc>
14137
14138 <attribute name="state" readonly="yes" type="MachineState">
14139 <desc>New execution state.</desc>
14140 </attribute>
14141 </interface>
14142
14143 <interface
14144 name="IMachineDataChangedEvent" extends="IMachineEvent"
14145 uuid="6AA70A6C-0DCA-4810-8C5C-457B278E3D49"
14146 wsmap="managed" autogen="VBoxEvent" id="OnMachineDataChanged"
14147 >
14148 <desc>
14149 Any of the settings of the given machine has changed.
14150 </desc>
14151 </interface>
14152
14153 <interface
14154 name="IMediumRegisteredEvent" extends="IEvent"
14155 uuid="53fac49a-b7f1-4a5a-a4ef-a11dd9c2a458"
14156 wsmap="managed" autogen="VBoxEvent" id="OnMediumRegistered"
14157 >
14158 <desc>
14159 The given medium was registered or unregistered
14160 within this VirtualBox installation.
14161 </desc>
14162
14163 <attribute name="mediumId" readonly="yes" type="uuid" mod="string">
14164 <desc>ID of the medium this event relates to.</desc>
14165 </attribute>
14166
14167 <attribute name="mediumType" readonly="yes" type="DeviceType">
14168 <desc>Type of the medium this event relates to.</desc>
14169 </attribute>
14170
14171 <attribute name="registered" type="boolean" readonly="yes">
14172 <desc>
14173 If @c true, the medium was registered, otherwise it was
14174 unregistered.
14175 </desc>
14176 </attribute>
14177 </interface>
14178
14179 <interface
14180 name="IMachineRegisteredEvent" extends="IMachineEvent"
14181 uuid="c354a762-3ff2-4f2e-8f09-07382ee25088"
14182 wsmap="managed" autogen="VBoxEvent" id="OnMachineRegistered"
14183 >
14184 <desc>
14185 The given machine was registered or unregistered
14186 within this VirtualBox installation.
14187 </desc>
14188
14189 <attribute name="registered" type="boolean" readonly="yes">
14190 <desc>
14191 If @c true, the machine was registered, otherwise it was
14192 unregistered.
14193 </desc>
14194 </attribute>
14195 </interface>
14196
14197 <interface
14198 name="ISessionStateChangedEvent" extends="IMachineEvent"
14199 uuid="714a3eef-799a-4489-86cd-fe8e45b2ff8e"
14200 wsmap="managed" autogen="VBoxEvent" id="OnSessionStateChanged"
14201 >
14202 <desc>
14203 The state of the session for the given machine was changed.
14204 <see>IMachine::sessionState</see>
14205 </desc>
14206
14207 <attribute name="state" type="SessionState" readonly="yes">
14208 <desc>
14209 New session state.
14210 </desc>
14211 </attribute>
14212 </interface>
14213
14214 <interface
14215 name="IGuestPropertyChangedEvent" extends="IMachineEvent"
14216 uuid="3f63597a-26f1-4edb-8dd2-6bddd0912368"
14217 wsmap="managed" autogen="VBoxEvent" id="OnGuestPropertyChanged"
14218 >
14219 <desc>
14220 Notification when a guest property has changed.
14221 </desc>
14222
14223 <attribute name="name" readonly="yes" type="wstring">
14224 <desc>
14225 The name of the property that has changed.
14226 </desc>
14227 </attribute>
14228
14229 <attribute name="value" readonly="yes" type="wstring">
14230 <desc>
14231 The new property value.
14232 </desc>
14233 </attribute>
14234
14235 <attribute name="flags" readonly="yes" type="wstring">
14236 <desc>
14237 The new property flags.
14238 </desc>
14239 </attribute>
14240
14241 </interface>
14242
14243 <interface
14244 name="ISnapshotEvent" extends="IMachineEvent"
14245 uuid="21637b0e-34b8-42d3-acfb-7e96daf77c22"
14246 wsmap="managed" id="SnapshotEvent"
14247 >
14248 <desc>Base interface for all snapshot events.</desc>
14249
14250 <attribute name="snapshotId" readonly="yes" type="uuid" mod="string">
14251 <desc>ID of the snapshot this event relates to.</desc>
14252 </attribute>
14253
14254 </interface>
14255
14256 <interface
14257 name="ISnapshotTakenEvent" extends="ISnapshotEvent"
14258 uuid="d27c0b3d-6038-422c-b45e-6d4a0503d9f1"
14259 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotTaken"
14260 >
14261 <desc>
14262 A new snapshot of the machine has been taken.
14263 <see>ISnapshot</see>
14264 </desc>
14265 </interface>
14266
14267 <interface
14268 name="ISnapshotDeletedEvent" extends="ISnapshotEvent"
14269 uuid="c48f3401-4a9e-43f4-b7a7-54bd285e22f4"
14270 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotDeleted"
14271 >
14272 <desc>
14273 Snapshot of the given machine has been deleted.
14274
14275 <note>
14276 This notification is delivered <b>after</b> the snapshot
14277 object has been uninitialized on the server (so that any
14278 attempt to call its methods will return an error).
14279 </note>
14280
14281 <see>ISnapshot</see>
14282 </desc>
14283 </interface>
14284
14285 <interface
14286 name="ISnapshotChangedEvent" extends="ISnapshotEvent"
14287 uuid="07541941-8079-447a-a33e-47a69c7980db"
14288 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotChanged"
14289 >
14290 <desc>
14291 Snapshot properties (name and/or description) have been changed.
14292 <see>ISnapshot</see>
14293 </desc>
14294 </interface>
14295
14296 <interface
14297 name="IMousePointerShapeChangedEvent" extends="IEvent"
14298 uuid="a6dcf6e8-416b-4181-8c4a-45ec95177aef"
14299 wsmap="managed" autogen="VBoxEvent" id="OnMousePointerShapeChanged"
14300 >
14301 <desc>
14302 Notification when the guest mouse pointer shape has
14303 changed. The new shape data is given.
14304 </desc>
14305
14306 <attribute name="visible" type="boolean" readonly="yes">
14307 <desc>
14308 Flag whether the pointer is visible.
14309 </desc>
14310 </attribute>
14311 <attribute name="alpha" type="boolean" readonly="yes">
14312 <desc>
14313 Flag whether the pointer has an alpha channel.
14314 </desc>
14315 </attribute>
14316 <attribute name="xhot" type="unsigned long" readonly="yes">
14317 <desc>
14318 The pointer hot spot X coordinate.
14319 </desc>
14320 </attribute>
14321 <attribute name="yhot" type="unsigned long" readonly="yes">
14322 <desc>
14323 The pointer hot spot Y coordinate.
14324 </desc>
14325 </attribute>
14326 <attribute name="width" type="unsigned long" readonly="yes">
14327 <desc>
14328 Width of the pointer shape in pixels.
14329 </desc>
14330 </attribute>
14331 <attribute name="height" type="unsigned long" readonly="yes">
14332 <desc>
14333 Height of the pointer shape in pixels.
14334 </desc>
14335 </attribute>
14336 <attribute name="shape" type="octet" safearray="yes" readonly="yes">
14337 <desc>
14338 Shape buffer arrays.
14339
14340 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
14341 followed by a 32-bpp XOR (color) mask.
14342
14343 For pointers without alpha channel the XOR mask pixels are 32
14344 bit values: (lsb)BGR0(msb). For pointers with alpha channel
14345 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
14346
14347 An AND mask is used for pointers with alpha channel, so if the
14348 callback does not support alpha, the pointer could be
14349 displayed as a normal color pointer.
14350
14351 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
14352 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
14353 height</tt>. The padding bits at the end of each scanline are
14354 undefined.
14355
14356 The XOR mask follows the AND mask on the next 4-byte aligned
14357 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
14358 Bytes in the gap between the AND and the XOR mask are undefined.
14359 The XOR mask scanlines have no gap between them and the size of
14360 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
14361
14362 <note>
14363 If @a shape is 0, only the pointer visibility is changed.
14364 </note>
14365 </desc>
14366 </attribute>
14367 </interface>
14368
14369 <interface
14370 name="IMouseCapabilityChangedEvent" extends="IEvent"
14371 uuid="d633ad48-820c-4207-b46c-6bd3596640d5"
14372 wsmap="managed" autogen="VBoxEvent" id="OnMouseCapabilityChanged"
14373 >
14374 <desc>
14375 Notification when the mouse capabilities reported by the
14376 guest have changed. The new capabilities are passed.
14377 </desc>
14378 <attribute name="supportsAbsolute" type="boolean" readonly="yes">
14379 <desc>
14380 Supports absolute coordinates.
14381 </desc>
14382 </attribute>
14383 <attribute name="supportsRelative" type="boolean" readonly="yes">
14384 <desc>
14385 Supports relative coordinates.
14386 </desc>
14387 </attribute>
14388 <attribute name="needsHostCursor" type="boolean" readonly="yes">
14389 <desc>
14390 If host cursor is needed.
14391 </desc>
14392 </attribute>
14393 </interface>
14394
14395 <interface
14396 name="IKeyboardLedsChangedEvent" extends="IEvent"
14397 uuid="6DDEF35E-4737-457B-99FC-BC52C851A44F"
14398 wsmap="managed" autogen="VBoxEvent" id="OnKeyboardLedsChanged"
14399 >
14400 <desc>
14401 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
14402 to alter the state of the keyboard LEDs.
14403 </desc>
14404 <attribute name="numLock" type="boolean" readonly="yes">
14405 <desc>
14406 NumLock status.
14407 </desc>
14408 </attribute>
14409 <attribute name="capsLock" type="boolean" readonly="yes">
14410 <desc>
14411 CapsLock status.
14412 </desc>
14413 </attribute>
14414 <attribute name="scrollLock" type="boolean" readonly="yes">
14415 <desc>
14416 ScrollLock status.
14417 </desc>
14418 </attribute>
14419 </interface>
14420
14421 <interface
14422 name="IStateChangedEvent" extends="IEvent"
14423 uuid="4376693C-CF37-453B-9289-3B0F521CAF27"
14424 wsmap="managed" autogen="VBoxEvent" id="OnStateChanged"
14425 >
14426 <desc>
14427 Notification when the execution state of the machine has changed.
14428 The new state is given.
14429 </desc>
14430 <attribute name="state" type="MachineState" readonly="yes">
14431 <desc>
14432 New machine state.
14433 </desc>
14434 </attribute>
14435 </interface>
14436
14437 <interface
14438 name="IAdditionsStateChangedEvent" extends="IEvent"
14439 uuid="D70F7915-DA7C-44C8-A7AC-9F173490446A"
14440 wsmap="managed" autogen="VBoxEvent" id="OnAdditionsStateChanged"
14441 >
14442 <desc>
14443 Notification when a Guest Additions property changes.
14444 Interested callees should query IGuest attributes to
14445 find out what has changed.
14446 </desc>
14447 </interface>
14448
14449 <interface
14450 name="INetworkAdapterChangedEvent" extends="IEvent"
14451 uuid="08889892-1EC6-4883-801D-77F56CFD0103"
14452 wsmap="managed" autogen="VBoxEvent" id="OnNetworkAdapterChanged"
14453 >
14454 <desc>
14455 Notification when a property of one of the
14456 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
14457 changes. Interested callees should use INetworkAdapter methods and
14458 attributes to find out what has changed.
14459 </desc>
14460 <attribute name="networkAdapter" type="INetworkAdapter" readonly="yes">
14461 <desc>
14462 Network adapter that is subject to change.
14463 </desc>
14464 </attribute>
14465 </interface>
14466
14467 <interface
14468 name="ISerialPortChangedEvent" extends="IEvent"
14469 uuid="3BA329DC-659C-488B-835C-4ECA7AE71C6C"
14470 wsmap="managed" autogen="VBoxEvent" id="OnSerialPortChanged"
14471 >
14472 <desc>
14473 Notification when a property of one of the
14474 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
14475 Interested callees should use ISerialPort methods and attributes
14476 to find out what has changed.
14477 </desc>
14478 <attribute name="serialPort" type="ISerialPort" readonly="yes">
14479 <desc>
14480 Serial port that is subject to change.
14481 </desc>
14482 </attribute>
14483 </interface>
14484
14485 <interface
14486 name="IParallelPortChangedEvent" extends="IEvent"
14487 uuid="813C99FC-9849-4F47-813E-24A75DC85615"
14488 wsmap="managed" autogen="VBoxEvent" id="OnParallelPortChanged"
14489 >
14490 <desc>
14491 Notification when a property of one of the
14492 virtual <link to="IMachine::getParallelPort">parallel ports</link>
14493 changes. Interested callees should use ISerialPort methods and
14494 attributes to find out what has changed.
14495 </desc>
14496 <attribute name="parallelPort" type="IParallelPort" readonly="yes">
14497 <desc>
14498 Parallel port that is subject to change.
14499 </desc>
14500 </attribute>
14501 </interface>
14502
14503 <interface
14504 name="IStorageControllerChangedEvent" extends="IEvent"
14505 uuid="715212BF-DA59-426E-8230-3831FAA52C56"
14506 wsmap="managed" autogen="VBoxEvent" id="OnStorageControllerChanged"
14507 >
14508 <desc>
14509 Notification when a
14510 <link to="IMachine::mediumAttachments">medium attachment</link>
14511 changes.
14512 </desc>
14513 </interface>
14514
14515 <interface
14516 name="IMediumChangedEvent" extends="IEvent"
14517 uuid="0FE2DA40-5637-472A-9736-72019EABD7DE"
14518 wsmap="managed" autogen="VBoxEvent" id="OnMediumChanged"
14519 >
14520 <desc>
14521 Notification when a
14522 <link to="IMachine::mediumAttachments">medium attachment</link>
14523 changes.
14524 </desc>
14525 <attribute name="mediumAttachment" type="IMediumAttachment" readonly="yes">
14526 <desc>
14527 Medium attachment that is subject to change.
14528 </desc>
14529 </attribute>
14530 </interface>
14531
14532 <interface
14533 name="ICPUChangedEvent" extends="IEvent"
14534 uuid="D0F0BECC-EE17-4D17-A8CC-383B0EB55E9D"
14535 wsmap="managed" autogen="VBoxEvent" id="OnCPUChanged"
14536 >
14537 <desc>
14538 Notification when a CPU changes.
14539 </desc>
14540 <attribute name="cpu" type="unsigned long" readonly="yes">
14541 <desc>
14542 The CPU which changed.
14543 </desc>
14544 </attribute>
14545 <attribute name="add" type="boolean" readonly="yes">
14546 <desc>
14547 Flag whether the CPU was added or removed.
14548 </desc>
14549 </attribute>
14550 </interface>
14551
14552 <interface
14553 name="ICPUPriorityChangedEvent" extends="IEvent"
14554 uuid="657fe2fe-a75a-4cb6-8cf9-072aa41e7d75"
14555 wsmap="managed" autogen="VBoxEvent" id="OnCPUPriorityChanged"
14556 >
14557 <desc>
14558 Notification when the CPU priority changes.
14559 </desc>
14560 <attribute name="priority" type="unsigned long" readonly="yes">
14561 <desc>
14562 The new CPU priority value. (1-100)
14563 </desc>
14564 </attribute>
14565 </interface>
14566
14567 <interface
14568 name="IVRDPServerChangedEvent" extends="IEvent"
14569 uuid="726038B6-6279-4A7A-8037-D041693D1915"
14570 wsmap="managed" autogen="VBoxEvent" id="OnVRDPServerChanged"
14571 >
14572 <desc>
14573 Notification when a property of the
14574 <link to="IMachine::VRDPServer">VRDP server</link> changes.
14575 Interested callees should use IVRDPServer methods and attributes to
14576 find out what has changed.
14577 </desc>
14578 </interface>
14579
14580 <interface
14581 name="IRemoteDisplayInfoChangedEvent" extends="IEvent"
14582 uuid="65B556C5-2A99-47D8-B311-FC177F0914CD"
14583 wsmap="managed" autogen="VBoxEvent" id="OnRemoteDisplayInfoChanged"
14584 >
14585 <desc>
14586 Notification when the status of the VRDP server changes. Interested callees
14587 should use <link to="IConsole::remoteDisplayInfo">IRemoteDisplayInfo</link>
14588 attributes to find out what is the current status.
14589 </desc>
14590 </interface>
14591
14592 <interface
14593 name="IUSBControllerChangedEvent" extends="IEvent"
14594 uuid="93BADC0C-61D9-4940-A084-E6BB29AF3D83"
14595 wsmap="managed" autogen="VBoxEvent" id="OnUSBControllerChanged"
14596 >
14597 <desc>
14598 Notification when a property of the virtual
14599 <link to="IMachine::USBController">USB controller</link> changes.
14600 Interested callees should use IUSBController methods and attributes to
14601 find out what has changed.
14602 </desc>
14603 </interface>
14604
14605 <interface
14606 name="IUSBDeviceStateChangedEvent" extends="IEvent"
14607 uuid="806da61b-6679-422a-b629-51b06b0c6d93"
14608 wsmap="managed" autogen="VBoxEvent" id="OnUSBDeviceStateChanged"
14609 >
14610 <desc>
14611 Notification when a USB device is attached to or detached from
14612 the virtual USB controller.
14613
14614 This notification is sent as a result of the indirect
14615 request to attach the device because it matches one of the
14616 machine USB filters, or as a result of the direct request
14617 issued by <link to="IConsole::attachUSBDevice"/> or
14618 <link to="IConsole::detachUSBDevice"/>.
14619
14620 This notification is sent in case of both a succeeded and a
14621 failed request completion. When the request succeeds, the
14622 @a error parameter is @c null, and the given device has been
14623 already added to (when @a attached is @c true) or removed from
14624 (when @a attached is @c false) the collection represented by
14625 <link to="IConsole::USBDevices"/>. On failure, the collection
14626 doesn't change and the @a error parameter represents the error
14627 message describing the failure.
14628 </desc>
14629 <attribute name="device" type="IUSBDevice" readonly="yes">
14630 <desc>
14631 Device that is subject to state change.
14632 </desc>
14633 </attribute>
14634 <attribute name="attached" type="boolean" readonly="yes">
14635 <desc>
14636 @c true if the device was attached and @c false otherwise.
14637 </desc>
14638 </attribute>
14639 <attribute name="error" type="IVirtualBoxErrorInfo" readonly="yes">
14640 <desc>
14641 @c null on success or an error message object on failure.
14642 </desc>
14643 </attribute>
14644 </interface>
14645
14646 <interface
14647 name="ISharedFolderChangedEvent" extends="IEvent"
14648 uuid="B66349B5-3534-4239-B2DE-8E1535D94C0B"
14649 wsmap="managed" autogen="VBoxEvent" id="OnSharedFolderChanged"
14650 >
14651 <desc>
14652 Notification when a shared folder is added or removed.
14653 The @a scope argument defines one of three scopes:
14654 <link to="IVirtualBox::sharedFolders">global shared folders</link>
14655 (<link to="Scope_Global">Global</link>),
14656 <link to="IMachine::sharedFolders">permanent shared folders</link> of
14657 the machine (<link to="Scope_Machine">Machine</link>) or <link
14658 to="IConsole::sharedFolders">transient shared folders</link> of the
14659 machine (<link to="Scope_Session">Session</link>). Interested callees
14660 should use query the corresponding collections to find out what has
14661 changed.
14662 </desc>
14663 <attribute name="scope" type="Scope" readonly="yes">
14664 <desc>
14665 Scope of the notification.
14666 </desc>
14667 </attribute>
14668 </interface>
14669
14670 <interface
14671 name="IRuntimeErrorEvent" extends="IEvent"
14672 uuid="883DD18B-0721-4CDE-867C-1A82ABAF914C"
14673 wsmap="managed" autogen="VBoxEvent" id="OnRuntimeError"
14674 >
14675 <desc>
14676 Notification when an error happens during the virtual
14677 machine execution.
14678
14679 There are three kinds of runtime errors:
14680 <ul>
14681 <li><i>fatal</i></li>
14682 <li><i>non-fatal with retry</i></li>
14683 <li><i>non-fatal warnings</i></li>
14684 </ul>
14685
14686 <b>Fatal</b> errors are indicated by the @a fatal parameter set
14687 to @c true. In case of fatal errors, the virtual machine
14688 execution is always paused before calling this notification, and
14689 the notification handler is supposed either to immediately save
14690 the virtual machine state using <link to="IConsole::saveState"/>
14691 or power it off using <link to="IConsole::powerDown"/>.
14692 Resuming the execution can lead to unpredictable results.
14693
14694 <b>Non-fatal</b> errors and warnings are indicated by the
14695 @a fatal parameter set to @c false. If the virtual machine
14696 is in the Paused state by the time the error notification is
14697 received, it means that the user can <i>try to resume</i> the machine
14698 execution after attempting to solve the problem that caused the
14699 error. In this case, the notification handler is supposed
14700 to show an appropriate message to the user (depending on the
14701 value of the @a id parameter) that offers several actions such
14702 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
14703 wants to retry, the notification handler should continue
14704 the machine execution using the <link to="IConsole::resume"/>
14705 call. If the machine execution is not Paused during this
14706 notification, then it means this notification is a <i>warning</i>
14707 (for example, about a fatal condition that can happen very soon);
14708 no immediate action is required from the user, the machine
14709 continues its normal execution.
14710
14711 Note that in either case the notification handler
14712 <b>must not</b> perform any action directly on a thread
14713 where this notification is called. Everything it is allowed to
14714 do is to post a message to another thread that will then talk
14715 to the user and take the corresponding action.
14716
14717 Currently, the following error identifiers are known:
14718 <ul>
14719 <li><tt>"HostMemoryLow"</tt></li>
14720 <li><tt>"HostAudioNotResponding"</tt></li>
14721 <li><tt>"VDIStorageFull"</tt></li>
14722 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
14723 </ul>
14724 </desc>
14725 <attribute name="fatal" type="boolean" readonly="yes">
14726 <desc>
14727 Whether the error is fatal or not.
14728 </desc>
14729 </attribute>
14730 <attribute name="id" type="wstring" readonly="yes">
14731 <desc>
14732 Error identifier.
14733 </desc>
14734 </attribute>
14735 <attribute name="message" type="wstring" readonly="yes">
14736 <desc>
14737 Optional error message.
14738 </desc>
14739 </attribute>
14740 </interface>
14741
14742
14743 <interface
14744 name="IEventSourceChangedEvent" extends="IEvent"
14745 uuid="e7932cb8-f6d4-4ab6-9cbf-558eb8959a6a"
14746 waitable="yes"
14747 wsmap="managed" autogen="VBoxEvent" id="OnEventSourceChanged"
14748 >
14749 <desc>
14750 Notification when an event source state changes (listener added or removed).
14751 </desc>
14752
14753 <attribute name="listener" type="IEventListener" readonly="yes">
14754 <desc>
14755 Event listener which has changed.
14756 </desc>
14757 </attribute>
14758
14759 <attribute name="add" type="boolean" readonly="yes">
14760 <desc>
14761 Flag whether listener was added or removed.
14762 </desc>
14763 </attribute>
14764 </interface>
14765
14766 <interface
14767 name="IExtraDataChangedEvent" extends="IEvent"
14768 uuid="024F00CE-6E0B-492A-A8D0-968472A94DC7"
14769 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataChanged"
14770 >
14771 <desc>
14772 Notification when machine specific or global extra data
14773 has changed.
14774 </desc>
14775 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
14776 <desc>
14777 ID of the machine this event relates to.
14778 Null for global extra data changes.
14779 </desc>
14780 </attribute>
14781 <attribute name="key" type="wstring" readonly="yes">
14782 <desc>
14783 Extra data key that has changed.
14784 </desc>
14785 </attribute>
14786 <attribute name="value" type="wstring" readonly="yes">
14787 <desc>
14788 Extra data value for the given key.
14789 </desc>
14790 </attribute>
14791 </interface>
14792
14793 <interface
14794 name="IVetoEvent" extends="IEvent"
14795 uuid="9a1a4130-69fe-472f-ac10-c6fa25d75007"
14796 wsmap="managed"
14797 >
14798 <desc>Base abstract interface for veto events.</desc>
14799
14800 <method name="addVeto">
14801 <desc>
14802 Adds a veto on this event.
14803 </desc>
14804 <param name="reason" type="wstring" dir="in">
14805 <desc>
14806 Reason for veto, could be null or empty string.
14807 </desc>
14808 </param>
14809 </method>
14810
14811 <method name="isVetoed">
14812 <desc>
14813 If this event was vetoed.
14814 </desc>
14815 <param name="result" type="boolean" dir="return">
14816 <desc>
14817 Reason for veto.
14818 </desc>
14819 </param>
14820 </method>
14821
14822 <method name="getVetos">
14823 <desc>
14824 Current veto reason list, if size is 0 - no veto.
14825 </desc>
14826 <param name="result" type="wstring" dir="return" safearray="yes">
14827 <desc>
14828 Array of reasons for veto provided by different event handlers.
14829 </desc>
14830 </param>
14831 </method>
14832
14833 </interface>
14834
14835 <interface
14836 name="IExtraDataCanChangeEvent" extends="IVetoEvent"
14837 uuid="245d88bd-800a-40f8-87a6-170d02249a55"
14838 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataCanChange"
14839 waitable="true"
14840 >
14841 <desc>
14842 Notification when someone tries to change extra data for
14843 either the given machine or (if @c null) global extra data.
14844 This gives the chance to veto against changes.
14845 </desc>
14846 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
14847 <desc>
14848 ID of the machine this event relates to.
14849 Null for global extra data changes.
14850 </desc>
14851 </attribute>
14852 <attribute name="key" type="wstring" readonly="yes">
14853 <desc>
14854 Extra data key that has changed.
14855 </desc>
14856 </attribute>
14857 <attribute name="value" type="wstring" readonly="yes">
14858 <desc>
14859 Extra data value for the given key.
14860 </desc>
14861 </attribute>
14862 </interface>
14863
14864 <interface
14865 name="ICanShowWindowEvent" extends="IVetoEvent"
14866 uuid="adf292b0-92c9-4a77-9d35-e058b39fe0b9"
14867 wsmap="managed" autogen="VBoxEvent" id="OnCanShowWindow"
14868 waitable="true"
14869 >
14870 <desc>
14871 Notification when a call to
14872 <link to="IMachine::canShowConsoleWindow"/> is made by a
14873 front-end to check if a subsequent call to
14874 <link to="IMachine::showConsoleWindow"/> can succeed.
14875
14876 The callee should give an answer appropriate to the current
14877 machine state using event veto. This answer must
14878 remain valid at least until the next
14879 <link to="IConsole::state">machine state</link> change.
14880 </desc>
14881 </interface>
14882
14883 <interface
14884 name="IShowWindowEvent" extends="IEvent"
14885 uuid="B0A0904D-2F05-4D28-855F-488F96BAD2B2"
14886 wsmap="managed" autogen="VBoxEvent" id="OnShowWindow"
14887 waitable="true"
14888 >
14889 <desc>
14890 Notification when a call to
14891 <link to="IMachine::showConsoleWindow"/>
14892 requests the console window to be activated and brought to
14893 foreground on the desktop of the host PC.
14894
14895 This notification should cause the VM console process to
14896 perform the requested action as described above. If it is
14897 impossible to do it at a time of this notification, this
14898 method should return a failure.
14899
14900 Note that many modern window managers on many platforms
14901 implement some sort of focus stealing prevention logic, so
14902 that it may be impossible to activate a window without the
14903 help of the currently active application (which is supposedly
14904 an initiator of this notification). In this case, this method
14905 must return a non-zero identifier that represents the
14906 top-level window of the VM console process. The caller, if it
14907 represents a currently active process, is responsible to use
14908 this identifier (in a platform-dependent manner) to perform
14909 actual window activation.
14910
14911 This method must set @a winId to zero if it has performed all
14912 actions necessary to complete the request and the console
14913 window is now active and in foreground, to indicate that no
14914 further action is required on the caller's side.
14915 </desc>
14916 <attribute name="winId" type="unsigned long long">
14917 <desc>
14918 Platform-dependent identifier of the top-level VM console
14919 window, or zero if this method has performed all actions
14920 necessary to implement the <i>show window</i> semantics for
14921 the given platform and/or this VirtualBox front-end.
14922 </desc>
14923 </attribute>
14924 </interface>
14925
14926 <module name="VBoxSVC" context="LocalServer">
14927 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
14928 namespace="virtualbox.org">
14929 <interface name="IVirtualBox" default="yes"/>
14930 </class>
14931 </module>
14932
14933 <module name="VBoxC" context="InprocServer" threadingModel="Free">
14934 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
14935 namespace="virtualbox.org">
14936 <interface name="ISession" default="yes"/>
14937 </class>
14938
14939 <class name="Console" uuid="577230FF-164F-4CAC-8548-312D8275A4A7"
14940 namespace="virtualbox.org">
14941 <interface name="IConsole" default="yes"/>
14942 </class>
14943 </module>
14944
14945</library>
14946
14947</idl>
14948
14949<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
Note: See TracBrowser for help on using the repository browser.

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