VirtualBox

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

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

events: more on reusability

  • Property svn:eol-style set to native
File size: 554.9 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4
5 Copyright (C) 2006-2010 Oracle Corporation
6
7 This file is part of VirtualBox Open Source Edition (OSE), as
8 available from http://www.virtualbox.org. This file is free software;
9 you can redistribute it and/or modify it under the terms of the GNU
10 General Public License (GPL) as published by the Free Software
11 Foundation, in version 2 as it comes in the "COPYING" file of the
12 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
13 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
14-->
15
16<!--
17 This is the master declaration for VirtualBox's Main API,
18 represented by COM/XPCOM and web service interfaces.
19
20 From this document, the build system generates several files
21 via XSLT that are then used during the build process.
22
23 Below is the list of XSL templates that operate on this file and
24 output files they generate. These XSL templates must be updated
25 whenever the schema of this file changes:
26
27 1. src/VBox/Main/idl/midl.xsl =>
28 out/<platform>/bin/sdk/idl/VirtualBox.idl
29 (MS COM interface definition file for Main API)
30
31 2. src/VBox/Main/idl/xpidl.xsl =>
32 out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
33 (XPCOM interface definition file for Main API)
34
35 3. src/VBox/Main/idl/doxygen.xsl =>
36 out/<platform>/obj/src/VBox/Main/VirtualBox.idl
37 (pseudo-IDL for Doxygen to generate the official Main API
38 documentation)
39
40 4. src/VBox/Main/webservice/*.xsl =>
41 a bunch of WSDL and C++ files
42 (VirtualBox web service sources and SOAP mappers;
43 see src/VBox/Main/webservice/Makefile.kmk for details)
44
45 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
46 out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
47 (smart Qt-based C++ wrapper classes for COM interfaces
48 of the Main API)
49
50 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
51 out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
52 (Main API TypeLib block for the WiX installer)
53
54 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
55 out/<platform>/obj/Runtime/errmsgvboxcomdata.h
56 (<result> extraction for the %Rhrc format specifier)
57-->
58
59<idl>
60
61<desc>
62 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
63 describes the so-called <i>VirtualBox Main API</i> which comprises all public
64 COM interfaces and components provided by the VirtualBox server and by the
65 VirtualBox client library.
66
67 VirtualBox employs a client-server design, meaning that whenever any part of
68 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
69 interface or any virtual machine --, a dedicated server process named
70 VBoxSVC runs in the background. This allows multiple processes working with
71 VirtualBox to cooperate without conflicts. These processes communicate to each
72 other using inter-process communication facilities provided by the COM
73 implementation of the host computer.
74
75 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
76 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
77 implementation, is used.
78
79 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
80 the VBoxManage command-line interface and the VBoxVRDP server) are technically
81 front-ends to the Main API and only use the interfaces that are documented
82 in this Main API documentation. This ensures that, with any given release
83 version of VirtualBox, all capabilities of the product that could be useful
84 to an external client program are always exposed by way of this API.
85
86 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
87 contains two public component classes:
88 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
89 implement IVirtualBox and ISession interfaces respectively. These two classes
90 are of supreme importance and will be needed in order for any front-end
91 program to do anything useful. It is recommended to read the documentation of
92 the mentioned interfaces first.
93
94 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
95 there can be only one object of this class on the local machine at any given
96 time. This object is a parent of many other objects in the VirtualBox COM
97 library and lives in the VBoxSVC process. In fact, when you create an instance
98 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
99 process is already running, starts it if not, and returns you a reference to
100 the <tt>VirtualBox</tt> object created in this process. When the last reference
101 to this object is released, the VBoxSVC process ends (with a 5 second delay to
102 protect from too frequent restarts).
103
104 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
105 as many <tt>Session</tt> objects as you need but all of them will live in a
106 process which issues the object instantiation call. <tt>Session</tt> objects
107 represent virtual machine sessions which are used to configure virtual
108 machines and control their execution.
109</desc>
110
111<if target="midl">
112 <cpp line="enum {"/>
113 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
114 <cpp line=" kTypeLibraryMinorVersion = 0"/>
115 <cpp line="};"/>
116</if>
117
118<if target="xpidl">
119 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
120 <cpp>
121/* currently, nsISupportsImpl.h lacks the below-like macros */
122
123#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
124#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
125#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI NS_IMPL_QUERY_INTERFACE3_CI
126#define NS_IMPL_THREADSAFE_QUERY_INTERFACE4_CI NS_IMPL_QUERY_INTERFACE4_CI
127
128
129#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
130# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
131 NS_IMPL_THREADSAFE_ADDREF(_class) \
132 NS_IMPL_THREADSAFE_RELEASE(_class) \
133 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
134 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
135#endif
136
137#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
138# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
139 NS_IMPL_THREADSAFE_ADDREF(_class) \
140 NS_IMPL_THREADSAFE_RELEASE(_class) \
141 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
142 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
143#endif
144
145#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_CI
146# define NS_IMPL_THREADSAFE_ISUPPORTS3_CI(_class, _i1, _i2, _i3) \
147 NS_IMPL_THREADSAFE_ADDREF(_class) \
148 NS_IMPL_THREADSAFE_RELEASE(_class) \
149 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI(_class, _i1, _i2, _i3) \
150 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
151#endif
152
153#ifndef NS_IMPL_THREADSAFE_ISUPPORTS4_CI
154# define NS_IMPL_THREADSAFE_ISUPPORTS4_CI(_class, _i1, _i2, _i3, _i4) \
155 NS_IMPL_THREADSAFE_ADDREF(_class) \
156 NS_IMPL_THREADSAFE_RELEASE(_class) \
157 NS_IMPL_THREADSAFE_QUERY_INTERFACE4_CI(_class, _i1, _i2, _i3, _i4) \
158 NS_IMPL_CI_INTERFACE_GETTER4(_class, _i1, _i2, _i3, _i4)
159#endif
160
161#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
162# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
163 NS_INTERFACE_MAP_BEGIN(_class) \
164 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
165 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
166 NS_IMPL_QUERY_CLASSINFO(_class) \
167 NS_INTERFACE_MAP_END
168#endif
169
170#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
171# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
172 _i2, _ic2) \
173 NS_INTERFACE_MAP_BEGIN(_class) \
174 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
175 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
176 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
177 NS_IMPL_QUERY_CLASSINFO(_class) \
178 NS_INTERFACE_MAP_END
179#endif
180
181#ifndef NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
182# define NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
183 _i2, _ic2, _i3, _ic3) \
184 NS_INTERFACE_MAP_BEGIN(_class) \
185 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
186 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
187 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i3, _ic3) \
188 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
189 NS_IMPL_QUERY_CLASSINFO(_class) \
190 NS_INTERFACE_MAP_END
191#endif
192
193#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
194#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
195#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
196
197#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
198# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
199 NS_IMPL_THREADSAFE_ADDREF(_class) \
200 NS_IMPL_THREADSAFE_RELEASE(_class) \
201 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
202 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
203#endif
204
205#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
206# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
207 _i2, _ic2) \
208 NS_IMPL_THREADSAFE_ADDREF(_class) \
209 NS_IMPL_THREADSAFE_RELEASE(_class) \
210 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
211 _i2, _ic2) \
212 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
213#endif
214
215#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI
216# define NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI(_class, _i1, _ic1, \
217 _i2, _ic2, _i3, _ic3) \
218 NS_IMPL_THREADSAFE_ADDREF(_class) \
219 NS_IMPL_THREADSAFE_RELEASE(_class) \
220 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
221 _i2, _ic2, _i3, _ic3) \
222 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
223#endif
224
225 </cpp>
226</if>
227
228<library
229 name="VirtualBox"
230 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
231 version="1.3"
232 desc="VirtualBox Type Library"
233 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
234 supportsErrorInfo="yes"
235>
236
237
238 <!--
239 // COM result codes for VirtualBox
240 /////////////////////////////////////////////////////////////////////////
241 -->
242
243 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
244 <desc>
245 This section describes all VirtualBox-specific COM result codes that may
246 be returned by methods of VirtualBox COM interfaces in addition to
247 standard COM result codes.
248
249 Note that along with the result code, every VirtualBox method returns
250 extended error information through the IVirtualBoxErrorInfo interface on
251 failure. This interface is a preferred way to present the error to the end
252 user because it contains a human readable description of the error. Raw
253 result codes, both standard and described in this section, are intended to
254 be used by programs to analyze the reason of a failure and select an
255 appropriate course of action without involving the end user (for example,
256 retry the operation later or make a different call).
257
258 The standard COM result codes that may originate from our methods include:
259
260 <table>
261 <tr><td>E_INVALIDARG</td>
262 <td>
263 Returned when the value of the method's argument is not within the range
264 of valid values. This should not be confused with situations when the
265 value is within the range but simply doesn't suit the current object
266 state and there is a possibility that it will be accepted later (in such
267 cases VirtualBox-specific codes are returned, for example,
268 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
269 </td>
270 </tr>
271 <tr><td>E_POINTER</td>
272 <td>
273 Returned if a memory pointer for the output argument is invalid (for
274 example, @c null). Note that when pointers representing input
275 arguments (such as strings) are invalid, E_INVALIDARG is returned.
276 </td>
277 </tr>
278 <tr><td>E_ACCESSDENIED</td>
279 <td>
280 Returned when the called object is not ready. Since the lifetime of a
281 public COM object cannot be fully controlled by the implementation,
282 VirtualBox maintains the readiness state for all objects it creates and
283 returns this code in response to any method call on the object that was
284 deactivated by VirtualBox and is not functioning any more.
285 </td>
286 </tr>
287 <tr><td>E_OUTOFMEMORY</td>
288 <td>
289 Returned when a memory allocation operation fails.
290 </td>
291 </tr>
292 </table>
293 </desc>
294 </descGroup>
295
296 <!--
297 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
298 everything in <result>/<desc> after (and including) the first dot, so express
299 the matter of the error code in the first sentence and keep it short.
300 -->
301
302 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
303 <desc>
304 Object corresponding to the supplied arguments does not exist.
305 </desc>
306 </result>
307
308 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
309 <desc>
310 Current virtual machine state prevents the operation.
311 </desc>
312 </result>
313
314 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
315 <desc>
316 Virtual machine error occurred attempting the operation.
317 </desc>
318 </result>
319
320 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
321 <desc>
322 File not accessible or erroneous file contents.
323 </desc>
324 </result>
325
326 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
327 <desc>
328 Runtime subsystem error.
329 </desc>
330 </result>
331
332 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
333 <desc>
334 Pluggable Device Manager error.
335 </desc>
336 </result>
337
338 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
339 <desc>
340 Current object state prohibits operation.
341 </desc>
342 </result>
343
344 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
345 <desc>
346 Host operating system related error.
347 </desc>
348 </result>
349
350 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
351 <desc>
352 Requested operation is not supported.
353 </desc>
354 </result>
355
356 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
357 <desc>
358 Invalid XML found.
359 </desc>
360 </result>
361
362 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
363 <desc>
364 Current session state prohibits operation.
365 </desc>
366 </result>
367
368 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
369 <desc>
370 Object being in use prohibits operation.
371 </desc>
372 </result>
373
374 <!--
375 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
376 everything in <result>/<desc> after (and including) the first dot, so express
377 the matter of the error code in the first sentence and keep it short.
378 -->
379
380 <descGroup/>
381
382 <!--
383 // all common enums
384 /////////////////////////////////////////////////////////////////////////
385 -->
386
387 <enum name="SettingsVersion"
388 uuid="52bd6f5f-1adb-4493-975d-581a9c4b803f"
389 >
390 <desc>Settings version of VirtualBox settings files. This is written to
391 the "version" attribute of the root "VirtualBox" element in the settings
392 file XML and indicates which VirtualBox version wrote the file.
393 </desc>
394
395 <const name="Null" value="0">
396 <desc>Null value, indicates invalid version.</desc>
397 </const>
398 <const name="v1_0" value="1">
399 <desc>Legacy settings version, not currently supported.</desc>
400 </const>
401 <const name="v1_1" value="2">
402 <desc>Legacy settings version, not currently supported.</desc>
403 </const>
404 <const name="v1_2" value="3">
405 <desc>Legacy settings version, not currently supported.</desc>
406 </const>
407 <const name="v1_3pre" value="4">
408 <desc>Legacy settings version, not currently supported.</desc>
409 </const>
410 <const name="v1_3" value="5">
411 <desc>Settings version "1.3", written by VirtualBox 2.0.12.</desc>
412 <!--
413 Machine XML: Capitalization of Uart, Lpt elements and many attributes changed.
414 -->
415 </const>
416 <const name="v1_4" value="6">
417 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
418 <!--
419 VirtualBox.xml: big DiskRegistry -> MediaRegistry revamp, various HardDisk types merged
420 (was VirtualDiskImage, VMDKImage, VHDImage, ISCSIHardDisk, CustomHardDisk, DiffHardDisk)
421 -->
422 </const>
423 <const name="v1_5" value="7">
424 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
425 <!-- 2008-09-04: 2.0.0 released
426 2008-11-20: settings version 1.5 introduced
427 2008-12-17: 2.1.0 released
428 Machine changes:
429 guest OS identifiers changed;
430 Machine/Hardware/Display/MonitorCount renamed to monitorCount;
431 Machine/Hardware/Display/Accelerate3D renamed to accelerate3D;
432 Machine/Hardware/CPU/CPUCount/@count changed to CPU/@count
433 -->
434 </const>
435 <const name="v1_6" value="8">
436 <desc>Settings version "1.6", written by VirtualBox 2.1.4 (at least).</desc>
437 <!-- 2008-12-17: 2.1.0 released
438 2008-12-19: settings version 1.6 introduced (is in 2.1 branch)
439 2009-04-08: 2.2.0 released
440 Machine changes: remove all Machine/Hardware/Network/Adapter/HostInterface[@TAPSetup or @TAPTerminate]/ attributes (done)
441 -->
442 </const>
443 <const name="v1_7" value="9">
444 <desc>Settings version "1.7", written by VirtualBox 2.2.x and 3.0.x.</desc>
445 <!-- 2008-12-17: 2.1.0 released
446 2009-03-11: settings version 1.7 introduced (is in 2.2 branch)
447 2009-04-08: 2.2.0 released
448 VirtualBox.xml additions: NetserviceRegistry with DHCPServers (done)
449 Machine changes: HardDiskAttachments is now StorageControllers (done)
450 -->
451 </const>
452 <const name="v1_8" value="10">
453 <desc>Intermediate settings version "1.8", understood by VirtualBox 3.1.x.</desc>
454 <!-- Machine additions: Display/@accelerate2DVideo (done)
455 -->
456 </const>
457 <const name="v1_9" value="11">
458 <desc>Settings version "1.9", written by VirtualBox 3.1.x.</desc>
459 <!-- The big storage controller / DVD / Floppy rework (done)
460 -->
461 </const>
462 <const name="v1_10" value="12">
463 <desc>Settings version "1.10", written by VirtualBox 3.2.x.</desc>
464 <!-- Machine changes: RTC localOrUTC (done)
465 CPU hot-plug support
466 -->
467 </const>
468 <const name="v1_11" value="13">
469 <desc>Settings version "1.11", written by VirtualBox 3.3.x.</desc>
470 <!-- Machine changes: HD Audio controller, 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="IVirtualBox::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="A163C98F-8635-4AA8-B770-A9941737F3EF"
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="operationWeight" type="unsigned long" readonly="yes">
7958 <desc>Weight value of the current sub-operation only.</desc>
7959 </attribute>
7960
7961 <attribute name="timeout" type="unsigned long">
7962 <desc>
7963 When non-zero, this specifies the number of milliseconds after which
7964 the operation will automatically be canceled. This can only be set on
7965 cancelable objects.
7966 </desc>
7967 </attribute>
7968
7969 <method name="setCurrentOperationProgress">
7970 <desc>Internal method, not to be called externally.</desc>
7971 <param name="percent" type="unsigned long" dir="in" />
7972 </method>
7973 <method name="setNextOperation">
7974 <desc>Internal method, not to be called externally.</desc>
7975 <param name="nextOperationDescription" type="wstring" dir="in" />
7976 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
7977 </method>
7978
7979 <method name="waitForCompletion">
7980 <desc>
7981 Waits until the task is done (including all sub-operations)
7982 with a given timeout in milliseconds; specify -1 for an indefinite wait.
7983
7984 Note that the VirtualBox/XPCOM/COM/native event queues of the calling
7985 thread are not processed while waiting. Neglecting event queues may
7986 have dire consequences (degrade performance, resource hogs,
7987 deadlocks, etc.), this is specially so for the main thread on
7988 platforms using XPCOM. Callers are adviced wait for short periods
7989 and service their event queues between calls, or to create a worker
7990 thread to do the waiting.
7991
7992 <result name="VBOX_E_IPRT_ERROR">
7993 Failed to wait for task completion.
7994 </result>
7995 </desc>
7996
7997 <param name="timeout" type="long" dir="in">
7998 <desc>
7999 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8000 </desc>
8001 </param>
8002 </method>
8003
8004 <method name="waitForOperationCompletion">
8005 <desc>
8006 Waits until the given operation is done with a given timeout in
8007 milliseconds; specify -1 for an indefinite wait.
8008
8009 See <link to="#waitForCompletion"> for event queue considerations.</link>
8010
8011 <result name="VBOX_E_IPRT_ERROR">
8012 Failed to wait for operation completion.
8013 </result>
8014
8015 </desc>
8016 <param name="operation" type="unsigned long" dir="in">
8017 <desc>
8018 Number of the operation to wait for.
8019 Must be less than <link to="#operationCount"/>.
8020 </desc>
8021 </param>
8022 <param name="timeout" type="long" dir="in">
8023 <desc>
8024 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8025 </desc>
8026 </param>
8027 </method>
8028
8029 <method name="cancel">
8030 <desc>
8031 Cancels the task.
8032 <note>
8033 If <link to="#cancelable"/> is @c false, then this method will fail.
8034 </note>
8035
8036 <result name="VBOX_E_INVALID_OBJECT_STATE">
8037 Operation cannot be canceled.
8038 </result>
8039
8040 </desc>
8041 </method>
8042
8043 </interface>
8044
8045 <!--
8046 // ISnapshot
8047 /////////////////////////////////////////////////////////////////////////
8048 -->
8049
8050 <interface
8051 name="ISnapshot" extends="$unknown"
8052 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8053 wsmap="managed"
8054 >
8055 <desc>
8056 The ISnapshot interface represents a snapshot of the virtual
8057 machine.
8058
8059 Together with the differencing media that are created
8060 when a snapshot is taken, a machine can be brought back to
8061 the exact state it was in when the snapshot was taken.
8062
8063 The ISnapshot interface has no methods, only attributes; snapshots
8064 are controlled through methods of the <link to="IConsole" /> interface
8065 which also manage the media associated with the snapshot.
8066 The following operations exist:
8067
8068 <ul>
8069 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8070 by creating new, empty differencing images for the machine's
8071 media and saving the VM settings and (if the VM is running)
8072 the current VM state in the snapshot.
8073
8074 The differencing images will then receive all data written to
8075 the machine's media, while their parent (base) images
8076 remain unmodified after the snapshot has been taken (see
8077 <link to="IMedium" /> for details about differencing images).
8078 This simplifies restoring a machine to the state of a snapshot:
8079 only the differencing images need to be deleted.
8080
8081 The current machine state is not changed by taking a snapshot.
8082 If the machine is running, it will resume execution after the
8083 snapshot has been taken.
8084 </li>
8085
8086 <li><link to="IConsole::restoreSnapshot"/>: this goes back to
8087 a previous snapshot. This resets the machine's state to that of
8088 the previous snapshot by deleting the differencing image of each
8089 of the machine's media and setting the machine's settings
8090 and state to the state that was saved in the snapshot (if any).
8091
8092 This destroys the machine's current state.
8093 </li>
8094
8095 <li><link to="IConsole::deleteSnapshot"/>: deletes a snapshot
8096 without affecting the current machine state.
8097
8098 This does not change the machine, but instead frees the resources
8099 allocated when the snapshot was taken: the settings and machine state
8100 is deleted (if any), and the snapshot's differencing image for each
8101 of the machine's media gets merged with its parent image.
8102
8103 Neither the current machine state nor other snapshots are affected
8104 by this operation, except that parent media will be modified
8105 to contain the disk data associated with the snapshot being deleted.
8106 </li>
8107 </ul>
8108
8109 Each snapshot contains the settings of the virtual machine (hardware
8110 configuration etc.). In addition, if the machine was running when the
8111 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState::Running"/>),
8112 the current VM state is saved in the snapshot (similarly to what happens
8113 when a VM's state is saved). The snapshot is then said to
8114 be <i>online</i> because when restoring it, the VM will be running.
8115
8116 If the machine is saved (<link to="MachineState::Saved"/>), the snapshot
8117 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8118
8119 Otherwise, if the machine was not running (<link to="MachineState::PoweredOff"/>
8120 or <link to="MachineState::Aborted"/>), the snapshot is <i>offline</i>;
8121 it then contains a so-called "zero execution state", representing a
8122 machine that is powered off.
8123
8124 <h3>Snapshot branches and the "current" snapshot</h3>
8125
8126 Snapshots can be chained, whereby every next snapshot is based on the
8127 previous one. This chaining is related to medium branching
8128 (see the <link to="IMedium"/> description) in that every time
8129 a new snapshot is created, a new differencing medium is implicitly
8130 created for all normal media attached to the machine.
8131
8132 Each virtual machine has a "current snapshot", identified by
8133 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8134 to the last snapshot in the chain. In a future version of VirtualBox,
8135 it will be possible to reset a machine's current state to that of an
8136 earlier snapshot without deleting the current state so that it will be
8137 possible to create alternative snapshot paths in a snapshot tree.
8138
8139 In the current implementation, multiple snapshot branches within one
8140 virtual machine are not allowed. Every machine has a single branch,
8141 and <link to="IConsole::takeSnapshot"/> operation adds a new
8142 snapshot to the top of that branch.
8143 </desc>
8144
8145 <attribute name="id" type="uuid" mod="string" readonly="yes">
8146 <desc>UUID of the snapshot.</desc>
8147 </attribute>
8148
8149 <attribute name="name" type="wstring">
8150 <desc>Short name of the snapshot.</desc>
8151 </attribute>
8152
8153 <attribute name="description" type="wstring">
8154 <desc>Optional description of the snapshot.</desc>
8155 </attribute>
8156
8157 <attribute name="timeStamp" type="long long" readonly="yes">
8158 <desc>
8159 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8160 </desc>
8161 </attribute>
8162
8163 <attribute name="online" type="boolean" readonly="yes">
8164 <desc>
8165 @c true if this snapshot is an online snapshot and @c false otherwise.
8166
8167 When this attribute is @c true, the
8168 <link to="IMachine::stateFilePath"/> attribute of the
8169 <link to="#machine"/> object associated with this snapshot
8170 will point to the saved state file. Otherwise, it will be
8171 an empty string.
8172 </desc>
8173 </attribute>
8174
8175 <attribute name="machine" type="IMachine" readonly="yes">
8176 <desc>
8177 Virtual machine this snapshot is taken on. This object
8178 stores all settings the machine had when taking this snapshot.
8179 <note>
8180 The returned machine object is immutable, i.e. no
8181 any settings can be changed.
8182 </note>
8183 </desc>
8184 </attribute>
8185
8186 <attribute name="parent" type="ISnapshot" readonly="yes">
8187 <desc>
8188 Parent snapshot (a snapshot this one is based on), or
8189 @c null if the snapshot has no parent (i.e. is the first snapshot).
8190 </desc>
8191 </attribute>
8192
8193 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8194 <desc>
8195 Child snapshots (all snapshots having this one as a parent).
8196 </desc>
8197 </attribute>
8198
8199 </interface>
8200
8201
8202 <!--
8203 // IMedium
8204 /////////////////////////////////////////////////////////////////////////
8205 -->
8206
8207 <enum
8208 name="MediumState"
8209 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8210 >
8211 <desc>
8212 Virtual medium state.
8213 <see>IMedium</see>
8214 </desc>
8215
8216 <const name="NotCreated" value="0">
8217 <desc>
8218 Associated medium storage does not exist (either was not created yet or
8219 was deleted).
8220 </desc>
8221 </const>
8222 <const name="Created" value="1">
8223 <desc>
8224 Associated storage exists and accessible; this gets set if the
8225 accessibility check performed by <link to="IMedium::refreshState" />
8226 was successful.
8227 </desc>
8228 </const>
8229 <const name="LockedRead" value="2">
8230 <desc>
8231 Medium is locked for reading (see <link to="IMedium::lockRead"/>),
8232 no data modification is possible.
8233 </desc>
8234 </const>
8235 <const name="LockedWrite" value="3">
8236 <desc>
8237 Medium is locked for writing (see <link to="IMedium::lockWrite"/>),
8238 no concurrent data reading or modification is possible.
8239 </desc>
8240 </const>
8241 <const name="Inaccessible" value="4">
8242 <desc>
8243 Medium accessiblity check (see <link to="IMedium::refreshState" />) has
8244 not yet been performed, or else, associated medium storage is not
8245 accessible. In the first case, <link to="IMedium::lastAccessError"/>
8246 is empty, in the second case, it describes the error that occured.
8247 </desc>
8248 </const>
8249 <const name="Creating" value="5">
8250 <desc>
8251 Associated medium storage is being created.
8252 </desc>
8253 </const>
8254 <const name="Deleting" value="6">
8255 <desc>
8256 Associated medium storage is being deleted.
8257 </desc>
8258 </const>
8259 </enum>
8260
8261 <enum
8262 name="MediumType"
8263 uuid="46bf1fd4-ad86-4ded-8c49-28bd2d148e5a"
8264 >
8265 <desc>
8266 Virtual medium type.
8267 <see>IMedium</see>
8268 </desc>
8269
8270 <const name="Normal" value="0">
8271 <desc>
8272 Normal medium (attached directly or indirectly, preserved
8273 when taking snapshots).
8274 </desc>
8275 </const>
8276 <const name="Immutable" value="1">
8277 <desc>
8278 Immutable medium (attached indirectly, changes are wiped out
8279 the next time the virtual machine is started).
8280 </desc>
8281 </const>
8282 <const name="Writethrough" value="2">
8283 <desc>
8284 Write through medium (attached directly, ignored when
8285 taking snapshots).
8286 </desc>
8287 </const>
8288 <const name="Shareable" value="3">
8289 <desc>
8290 Allow using this medium concurrently by several machines.
8291 <note>Present since VirtualBox 3.2.0, and accepted since 3.2.8.</note>
8292 </desc>
8293 </const>
8294 </enum>
8295
8296 <enum
8297 name="MediumVariant"
8298 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8299 >
8300 <desc>
8301 Virtual medium image variant. More than one flag may be set.
8302 <see>IMedium</see>
8303 </desc>
8304
8305 <const name="Standard" value="0">
8306 <desc>
8307 No particular variant requested, results in using the backend default.
8308 </desc>
8309 </const>
8310 <const name="VmdkSplit2G" value="0x01">
8311 <desc>
8312 VMDK image split in chunks of less than 2GByte.
8313 </desc>
8314 </const>
8315 <const name="VmdkStreamOptimized" value="0x04">
8316 <desc>
8317 VMDK streamOptimized image. Special import/export format which is
8318 read-only/append-only.
8319 </desc>
8320 </const>
8321 <const name="VmdkESX" value="0x08">
8322 <desc>
8323 VMDK format variant used on ESX products.
8324 </desc>
8325 </const>
8326 <const name="Fixed" value="0x10000">
8327 <desc>
8328 Fixed image. Only allowed for base images.
8329 </desc>
8330 </const>
8331 <const name="Diff" value="0x20000">
8332 <desc>
8333 Differencing image. Only allowed for child images.
8334 </desc>
8335 </const>
8336 </enum>
8337
8338 <interface
8339 name="IMediumAttachment" extends="$unknown"
8340 uuid="c29452cc-ca72-404b-9261-cfc514f1e412"
8341 wsmap="struct"
8342 >
8343 <desc>
8344 The IMediumAttachment interface links storage media to virtual machines.
8345 For each medium (<link to="IMedium"/>) which has been attached to a
8346 storage controller (<link to="IStorageController"/>) of a machine
8347 (<link to="IMachine"/>) via the <link to="IMachine::attachDevice" />
8348 method, one instance of IMediumAttachment is added to the machine's
8349 <link to="IMachine::mediumAttachments"/> array attribute.
8350
8351 Each medium attachment specifies the storage controller as well as a
8352 port and device number and the IMedium instance representing a virtual
8353 hard disk or floppy or DVD image.
8354
8355 For removeable media (DVDs or floppies), there are two additional
8356 options. For one, the IMedium instance can be @c null to represent
8357 an empty drive with no media inserted (see <link to="IMachine::mountMedium" />);
8358 secondly, the medium can be one of the pseudo-media for host drives
8359 listed in <link to="IHost::DVDDrives"/> or <link to="IHost::floppyDrives"/>.
8360 </desc>
8361
8362 <attribute name="medium" type="IMedium" readonly="yes">
8363 <desc>Medium object associated with this attachment; it
8364 can be @c null for removable devices.</desc>
8365 </attribute>
8366
8367 <attribute name="controller" type="wstring" readonly="yes">
8368 <desc>Name of the storage controller of this attachment; this
8369 refers to one of the controllers in <link to="IMachine::storageControllers" />
8370 by name.</desc>
8371 </attribute>
8372
8373 <attribute name="port" type="long" readonly="yes">
8374 <desc>Port number of this attachment.
8375 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8376 </desc>
8377 </attribute>
8378
8379 <attribute name="device" type="long" readonly="yes">
8380 <desc>Device slot number of this attachment.
8381 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8382 </desc>
8383 </attribute>
8384
8385 <attribute name="type" type="DeviceType" readonly="yes">
8386 <desc>Device type of this attachment.</desc>
8387 </attribute>
8388
8389 <attribute name="passthrough" type="boolean" readonly="yes">
8390 <desc>Pass I/O requests through to a device on the host.</desc>
8391 </attribute>
8392
8393 <attribute name="bandwidthLimit" type="unsigned long">
8394 <desc>
8395 Maximum throughput allowed for this medium attachment, in units of 1 mbps.
8396 A zero value means uncapped/unlimited.
8397 </desc>
8398 </attribute>
8399
8400 </interface>
8401
8402 <interface
8403 name="IMedium" extends="$unknown"
8404 uuid="858ea9d3-9ade-4aa7-91b7-d8a40f8f9b16"
8405 wsmap="managed"
8406 >
8407 <desc>
8408 The IMedium interface represents virtual storage for a machine's
8409 hard disks, CD/DVD or floppy drives. It will typically represent
8410 a disk image on the host, for example a VDI or VMDK file representing
8411 a virtual hard disk, or an ISO or RAW file representing virtual
8412 removable media, but can also point to a network location (e.g.
8413 for iSCSI targets).
8414
8415 Instances of IMedium are connected to virtual machines by way of
8416 medium attachments (see <link to="IMediumAttachment" />), which link
8417 the storage medium to a particular device slot of a storage controller
8418 of the virtual machine.
8419 In the VirtualBox API, virtual storage is therefore always represented
8420 by the following chain of object links:
8421
8422 <ul>
8423 <li><link to="IMachine::storageControllers"/> contains an array of
8424 storage controllers (IDE, SATA, SCSI, SAS or a floppy controller;
8425 these are instances of <link to="IStorageController"/>).</li>
8426 <li><link to="IMachine::mediumAttachments"/> contains an array of
8427 medium attachments (instances of <link to="IMediumAttachment"/>),
8428 each containing a storage controller from the above array, a
8429 port/device specification, and an instance of IMedium representing
8430 the medium storage (image file).
8431
8432 For removable media, the storage medium is optional; a medium
8433 attachment with no medium represents a CD/DVD or floppy drive
8434 with no medium inserted. By contrast, hard disk attachments
8435 will always have an IMedium object attached.</li>
8436 <li>Each IMedium in turn points to a storage unit (such as a file
8437 on the host computer or a network resource) that holds actual
8438 data. This location is represented by the <link to="#location"/>
8439 attribute.</li>
8440 </ul>
8441
8442 Existing media are opened using <link to="IVirtualBox::openMedium"/>;
8443 new hard disk media can be created with the VirtualBox API using the
8444 <link to="IVirtualBox::createHardDisk"/> method.
8445
8446 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8447 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8448 type in a regular file.
8449
8450 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8451 drive; in that case the <link to="#id" /> attribute contains the UUID of
8452 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8453
8454 <h3>Known media</h3>
8455
8456 When an existing medium is opened for the first time, it is automatically
8457 remembered by the given VirtualBox installation or, in other words, becomes
8458 a <i>known medium</i>. Known media are stored in the media
8459 registry transparently maintained by VirtualBox and stored in settings
8460 files so that this registry is preserved when VirtualBox is not running.
8461
8462 Newly created virtual media are remembered only when the associated
8463 storage unit is actually created.
8464
8465 All known media can be enumerated using
8466 <link to="IVirtualBox::hardDisks"/>,
8467 <link to="IVirtualBox::DVDImages"/> and
8468 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8469 quickly found using the <link to="IVirtualBox::findMedium"/> method.
8470
8471 Only known media can be attached to virtual machines.
8472
8473 Removing known media from the media registry is performed when the given
8474 medium is closed using the <link to="#close"/> method or when its
8475 associated storage unit is deleted.
8476
8477 <h3>Accessibility checks</h3>
8478
8479 VirtualBox defers media accessibility checks until the <link to="#refreshState" />
8480 method is called explicitly on a medium. This is done to make the VirtualBox object
8481 ready for serving requests as fast as possible and let the end-user
8482 application decide if it needs to check media accessibility right away or not.
8483
8484 As a result, when VirtualBox starts up (e.g. the VirtualBox
8485 object gets created for the first time), all known media are in the
8486 "Inaccessible" state, but the value of the <link to="#lastAccessError"/>
8487 attribute is an empty string because no actual accessibility check has
8488 been made yet.
8489
8490 After calling <link to="#refreshState" />, a medium is considered
8491 <i>accessible</i> if its storage unit can be read. In that case, the
8492 <link to="#state"/> attribute has a value of "Created". If the storage
8493 unit cannot be read (for example, because it is located on a disconnected
8494 network resource, or was accidentally deleted outside VirtualBox),
8495 the medium is considered <i>inaccessible</i>, which is indicated by the
8496 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8497 obtained by reading the <link to="#lastAccessError"/> attribute.
8498
8499 <h3>Medium types</h3>
8500
8501 There are four types of medium behavior (see <link to="MediumType" />):
8502 "normal", "immutable", "writethrough" and "shareable", represented by the
8503 <link to="#type"/> attribute. The type of the medium defines how the
8504 medium is attached to a virtual machine and what happens when a
8505 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8506 attached medium is taken. At the moment DVD and floppy media are always
8507 of type "writethrough".
8508
8509 All media can be also divided in two groups: <i>base</i> media and
8510 <i>differencing</i> media. A base medium contains all sectors of the
8511 medium data in its own storage and therefore can be used independently.
8512 In contrast, a differencing mediun is a "delta" to some other medium and
8513 contains only those sectors which differ from that other medium, which is
8514 then called a <i>parent</i>. The differencing medium is said to be
8515 <i>linked to</i> that parent. The parent may be itself a differencing
8516 medium, thus forming a chain of linked media. The last element in that
8517 chain must always be a base medium. Note that several differencing
8518 media may be linked to the same parent medium.
8519
8520 Differencing media can be distinguished from base media by querying the
8521 <link to="#parent"/> attribute: base media do not have parents they would
8522 depend on, so the value of this attribute is always @c null for them.
8523 Using this attribute, it is possible to walk up the medium tree (from the
8524 child medium to its parent). It is also possible to walk down the tree
8525 using the <link to="#children"/> attribute.
8526
8527 Note that the type of all differencing media is "normal"; all other
8528 values are meaningless for them. Base media may be of any type.
8529
8530 <h3>Creating hard disks</h3>
8531
8532 New base hard disks are created using
8533 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8534 opened using <link to="IVirtualBox::openMedium"/>. Differencing hard
8535 disks are usually implicitly created by VirtualBox when needed but may
8536 also be created explicitly using <link to="#createDiffStorage"/>.
8537
8538 After the hard disk is successfully created (including the storage unit)
8539 or opened, it becomes a known hard disk (remembered in the internal media
8540 registry). Known hard disks can be attached to a virtual machine, accessed
8541 through <link to="IVirtualBox::findMedium"/> or enumerated using the
8542 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8543
8544 The following methods, besides <link to="IMedium::close"/>,
8545 automatically remove the hard disk from the media registry:
8546 <ul>
8547 <li><link to="#deleteStorage"/></li>
8548 <li><link to="#mergeTo"/></li>
8549 </ul>
8550
8551 If the storage unit of the hard disk is a regular file in the host's
8552 file system then the rules stated in the description of the
8553 <link to="IMedium::location"/> attribute apply when setting its value. In
8554 addition, a plain file name without any path may be given, in which case
8555 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8556 folder</link> will be prepended to it.
8557
8558 <h4>Automatic composition of the file name part</h4>
8559
8560 Another extension to the <link to="IMedium::location"/> attribute is that
8561 there is a possibility to cause VirtualBox to compose a unique value for
8562 the file name part of the location using the UUID of the hard disk. This
8563 applies only to hard disks in <link to="MediumState::NotCreated"/> state,
8564 e.g. before the storage unit is created, and works as follows. You set the
8565 value of the <link to="IMedium::location"/> attribute to a location
8566 specification which only contains the path specification but not the file
8567 name part and ends with either a forward slash or a backslash character.
8568 In response, VirtualBox will generate a new UUID for the hard disk and
8569 compose the file name using the following pattern:
8570 <pre>
8571 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8572 </pre>
8573 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8574 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8575 is the default extension for the storage format of this hard disk. After
8576 that, you may call any of the methods that create a new hard disk storage
8577 unit and they will use the generated UUID and file name.
8578
8579 <h3>Attaching Hard Disks</h3>
8580
8581 Hard disks are attached to virtual machines using the
8582 <link to="IMachine::attachDevice"/> method and detached using the
8583 <link to="IMachine::detachDevice"/> method. Depending on their
8584 <link to="#type"/>, hard disks are attached either
8585 <i>directly</i> or <i>indirectly</i>.
8586
8587 When a hard disk is being attached directly, it is associated with the
8588 virtual machine and used for hard disk operations when the machine is
8589 running. When a hard disk is being attached indirectly, a new differencing
8590 hard disk linked to it is implicitly created and this differencing hard
8591 disk is associated with the machine and used for hard disk operations.
8592 This also means that if <link to="IMachine::attachDevice"/> performs
8593 a direct attachment then the same hard disk will be returned in response
8594 to the subsequent <link to="IMachine::getMedium"/> call; however if
8595 an indirect attachment is performed then
8596 <link to="IMachine::getMedium"/> will return the implicitly created
8597 differencing hard disk, not the original one passed to <link
8598 to="IMachine::attachDevice"/>. In detail:
8599
8600 <ul>
8601 <li><b>Normal base</b> hard disks that do not have children (i.e.
8602 differencing hard disks linked to them) and that are not already
8603 attached to virtual machines in snapshots are attached <b>directly</b>.
8604 Otherwise, they are attached <b>indirectly</b> because having
8605 dependent children or being part of the snapshot makes it impossible
8606 to modify hard disk contents without breaking the integrity of the
8607 dependent party. The <link to="#readOnly"/> attribute allows to
8608 quickly determine the kind of the attachment for the given hard
8609 disk. Note that if a normal base hard disk is to be indirectly
8610 attached to a virtual machine with snapshots then a special
8611 procedure called <i>smart attachment</i> is performed (see below).</li>
8612 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
8613 they are attached <b>directly</b> if they do not have children and are
8614 not attached to virtual machines in snapshots, and <b>indirectly</b>
8615 otherwise. Note that the smart attachment procedure is never performed
8616 for differencing hard disks.</li>
8617 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
8618 they are designed to be non-writable. If an immutable hard disk is
8619 attached to a virtual machine with snapshots then a special
8620 procedure called smart attachment is performed (see below).</li>
8621 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
8622 also as designed. This also means that writethrough hard disks cannot
8623 have other hard disks linked to them at all.</li>
8624 <li><b>Shareable</b> hard disks are always attached <b>directly</b>,
8625 also as designed. This also means that shareable hard disks cannot
8626 have other hard disks linked to them at all. They behave almost
8627 like writethrough hard disks, except that shareable hard disks can
8628 be attached to several virtual machines which are running, allowing
8629 concurrent accesses. You need special cluster software running in
8630 the virtual machines to make use of such disks.</li>
8631 </ul>
8632
8633 Note that the same hard disk, regardless of its type, may be attached to
8634 more than one virtual machine at a time. In this case, the machine that is
8635 started first gains exclusive access to the hard disk and attempts to
8636 start other machines having this hard disk attached will fail until the
8637 first machine is powered down.
8638
8639 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8640 that the given hard disk remains associated with the given machine after a
8641 successful <link to="IMachine::detachDevice"/> call until
8642 <link to="IMachine::saveSettings"/> is called to save all changes to
8643 machine settings to disk. This deferring is necessary to guarantee that
8644 the hard disk configuration may be restored at any time by a call to
8645 <link to="IMachine::discardSettings"/> before the settings
8646 are saved (committed).
8647
8648 Note that if <link to="IMachine::discardSettings"/> is called after
8649 indirectly attaching some hard disks to the machine but before a call to
8650 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8651 all differencing hard disks implicitly created by
8652 <link to="IMachine::attachDevice"/> for these indirect attachments.
8653 Such implicitly created hard disks will also be immediately deleted when
8654 detached explicitly using the <link to="IMachine::detachDevice"/>
8655 call if it is made before <link to="IMachine::saveSettings"/>. This
8656 implicit deletion is safe because newly created differencing hard
8657 disks do not contain any user data.
8658
8659 However, keep in mind that detaching differencing hard disks that were
8660 implicitly created by <link to="IMachine::attachDevice"/>
8661 before the last <link to="IMachine::saveSettings"/> call will
8662 <b>not</b> implicitly delete them as they may already contain some data
8663 (for example, as a result of virtual machine execution). If these hard
8664 disks are no more necessary, the caller can always delete them explicitly
8665 using <link to="#deleteStorage"/> after they are actually de-associated
8666 from this machine by the <link to="IMachine::saveSettings"/> call.
8667
8668 <h3>Smart Attachment</h3>
8669
8670 When normal base or immutable hard disks are indirectly attached to a
8671 virtual machine then some additional steps are performed to make sure the
8672 virtual machine will have the most recent "view" of the hard disk being
8673 attached. These steps include walking through the machine's snapshots
8674 starting from the current one and going through ancestors up to the first
8675 snapshot. Hard disks attached to the virtual machine in all
8676 of the encountered snapshots are checked whether they are descendants of
8677 the given normal base or immutable hard disk. The first found child (which
8678 is the differencing hard disk) will be used instead of the normal base or
8679 immutable hard disk as a parent for creating a new differencing hard disk
8680 that will be actually attached to the machine. And only if no descendants
8681 are found or if the virtual machine does not have any snapshots then the
8682 normal base or immutable hard disk will be used itself as a parent for
8683 this differencing hard disk.
8684
8685 It is easier to explain what smart attachment does using the
8686 following example:
8687 <pre>
8688BEFORE attaching B.vdi: AFTER attaching B.vdi:
8689
8690Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8691 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8692 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8693 Snapshot 4 (none) Snapshot 4 (none)
8694 CurState (none) CurState (D3->D2.vdi)
8695
8696 NOT
8697 ...
8698 CurState (D3->B.vdi)
8699 </pre>
8700 The first column is the virtual machine configuration before the base hard
8701 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8702 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8703 mean that the hard disk that is actually attached to the machine is a
8704 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8705 another hard disk, <tt>B.vdi</tt>.
8706
8707 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8708 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8709 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8710 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8711 it cannot be attached directly and needs an indirect attachment (i.e.
8712 implicit creation of a new differencing hard disk). Due to the smart
8713 attachment procedure, the new differencing hard disk
8714 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8715 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8716 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8717 machine.
8718
8719 Note that if there is more than one descendant hard disk of the given base
8720 hard disk found in a snapshot, and there is an exact device, channel and
8721 bus match, then this exact match will be used. Otherwise, the youngest
8722 descendant will be picked up.
8723
8724 There is one more important aspect of the smart attachment procedure which
8725 is not related to snapshots at all. Before walking through the snapshots
8726 as described above, the backup copy of the current list of hard disk
8727 attachment is searched for descendants. This backup copy is created when
8728 the hard disk configuration is changed for the first time after the last
8729 <link to="IMachine::saveSettings"/> call and used by
8730 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8731 changes. When such a descendant is found in this backup copy, it will be
8732 simply re-attached back, without creating a new differencing hard disk for
8733 it. This optimization is necessary to make it possible to re-attach the
8734 base or immutable hard disk to a different bus, channel or device slot
8735 without losing the contents of the differencing hard disk actually
8736 attached to the machine in place of it.
8737 </desc>
8738
8739 <attribute name="id" type="uuid" mod="string" readonly="yes">
8740 <desc>
8741 UUID of the medium. For a newly created medium, this value is a randomly
8742 generated UUID.
8743
8744 <note>
8745 For media in one of MediumState_NotCreated, MediumState_Creating or
8746 MediumState_Deleting states, the value of this property is undefined
8747 and will most likely be an empty UUID.
8748 </note>
8749 </desc>
8750 </attribute>
8751
8752 <attribute name="description" type="wstring">
8753 <desc>
8754 Optional description of the medium. For a newly created medium the value
8755 of this attribute is an empty string.
8756
8757 Medium types that don't support this attribute will return E_NOTIMPL in
8758 attempt to get or set this attribute's value.
8759
8760 <note>
8761 For some storage types, reading this attribute may return an outdated
8762 (last known) value when <link to="#state"/> is <link
8763 to="MediumState::Inaccessible"/> or <link
8764 to="MediumState::LockedWrite"/> because the value of this attribute is
8765 stored within the storage unit itself. Also note that changing the
8766 attribute value is not possible in such case, as well as when the
8767 medium is the <link to="MediumState::LockedRead"/> state.
8768 </note>
8769 </desc>
8770 </attribute>
8771
8772 <attribute name="state" type="MediumState" readonly="yes">
8773 <desc>
8774 Returns the current medium state, which is the last state set by
8775 the accessibility check performed by <link to="#refreshState"/>.
8776 If that method has not yet been called on the medium, the state
8777 is "Inaccessible"; as opposed to truly inaccessible media, the
8778 value of <link to="#lastAccessError"/> will be an empty string in
8779 that case.
8780
8781 <note>As of version 3.1, this no longer performs an accessibility check
8782 automatically; call <link to="#refreshState"/> for that.
8783 </note>
8784 </desc>
8785 </attribute>
8786
8787 <attribute name="variant" type="MediumVariant" readonly="yes">
8788 <desc>
8789 Returns the storage format variant information for this medium.
8790 Before <link to="#refreshState"/> is called this method returns
8791 an undefined value.
8792 </desc>
8793 </attribute>
8794
8795 <attribute name="location" type="wstring">
8796 <desc>
8797 Location of the storage unit holding medium data.
8798
8799 The format of the location string is medium type specific. For medium
8800 types using regular files in a host's file system, the location
8801 string is the full file name.
8802
8803 Some medium types may support changing the storage unit location by
8804 simply changing the value of this property. If this operation is not
8805 supported, the implementation will return E_NOTIMPL in attempt to set
8806 this attribute's value.
8807
8808 When setting a value of the location attribute which is a regular file
8809 in the host's file system, the given file name may be either relative to
8810 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8811 absolute. Note that if the given location specification does not contain
8812 the file extension part then a proper default extension will be
8813 automatically appended by the implementation depending on the medium type.
8814 </desc>
8815 </attribute>
8816
8817 <attribute name="name" type="wstring" readonly="yes">
8818 <desc>
8819 Name of the storage unit holding medium data.
8820
8821 The returned string is a short version of the <link to="#location"/>
8822 attribute that is suitable for representing the medium in situations
8823 where the full location specification is too long (such as lists
8824 and comboboxes in GUI frontends). This string is also used by frontends
8825 to sort the media list alphabetically when needed.
8826
8827 For example, for locations that are regular files in the host's file
8828 system, the value of this attribute is just the file name (+ extension),
8829 without the path specification.
8830
8831 Note that as opposed to the <link to="#location"/> attribute, the name
8832 attribute will not necessary be unique for a list of media of the
8833 given type and format.
8834 </desc>
8835 </attribute>
8836
8837 <attribute name="deviceType" type="DeviceType" readonly="yes">
8838 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
8839 medium.</desc>
8840 </attribute>
8841
8842 <attribute name="hostDrive" type="boolean" readonly="yes">
8843 <desc>True if this corresponds to a drive on the host.</desc>
8844 </attribute>
8845
8846 <attribute name="size" type="unsigned long long" readonly="yes">
8847 <desc>
8848 Physical size of the storage unit used to hold medium data (in bytes).
8849
8850 <note>
8851 For media whose <link to="#state"/> is <link
8852 to="MediumState::Inaccessible"/>, the value of this property is the
8853 last known size. For <link to="MediumState::NotCreated"/> media,
8854 the returned value is zero.
8855 </note>
8856 </desc>
8857 </attribute>
8858
8859 <attribute name="format" type="wstring" readonly="yes">
8860 <desc>
8861 Storage format of this medium.
8862
8863 The value of this attribute is a string that specifies a backend used
8864 to store medium data. The storage format is defined when you create a
8865 new medium or automatically detected when you open an existing medium,
8866 and cannot be changed later.
8867
8868 The list of all storage formats supported by this VirtualBox
8869 installation can be obtained using
8870 <link to="ISystemProperties::mediumFormats"/>.
8871 </desc>
8872 </attribute>
8873
8874 <attribute name="mediumFormat" type="IMediumFormat" readonly="yes">
8875 <desc>
8876 Storage medium format object corresponding to this medium.
8877
8878 The value of this attribute is a reference to the medium format object
8879 that specifies the backend properties used to store medium data. The
8880 storage format is defined when you create a new medium or automatically
8881 detected when you open an existing medium, and cannot be changed later.
8882
8883 <note>@c null is returned if there is no associated medium format
8884 object. This can e.g. happen for medium objects representing host
8885 drives and other special medium objects.</note>
8886 </desc>
8887 </attribute>
8888
8889 <attribute name="type" type="MediumType">
8890 <desc>
8891 Type (role) of this medium.
8892
8893 The following constraints apply when changing the value of this
8894 attribute:
8895 <ul>
8896 <li>If a medium is attached to a virtual machine (either in the
8897 current state or in one of the snapshots), its type cannot be
8898 changed.
8899 </li>
8900 <li>As long as the medium has children, its type cannot be set
8901 to <link to="MediumType::Writethrough"/>.
8902 </li>
8903 <li>The type of all differencing media is
8904 <link to="MediumType::Normal"/> and cannot be changed.
8905 </li>
8906 </ul>
8907
8908 The type of a newly created or opened medium is set to
8909 <link to="MediumType::Normal"/>, except for DVD and floppy media,
8910 which have a type of <link to="MediumType::Writethrough"/>.
8911 </desc>
8912 </attribute>
8913
8914 <attribute name="parent" type="IMedium" readonly="yes">
8915 <desc>
8916 Parent of this medium (the medium this medium is directly based
8917 on).
8918
8919 Only differencing media have parents. For base (non-differencing)
8920 media, @c null is returned.
8921 </desc>
8922 </attribute>
8923
8924 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
8925 <desc>
8926 Children of this medium (all differencing media directly based
8927 on this medium). A @c null array is returned if this medium
8928 does not have any children.
8929 </desc>
8930 </attribute>
8931
8932 <attribute name="base" type="IMedium" readonly="yes">
8933 <desc>
8934 Base medium of this medium.
8935
8936 If this is a differencing medium, its base medium is the medium
8937 the given medium branch starts from. For all other types of media, this
8938 property returns the medium object itself (i.e. the same object this
8939 property is read on).
8940 </desc>
8941 </attribute>
8942
8943 <attribute name="readOnly" type="boolean" readonly="yes">
8944 <desc>
8945 Returns @c true if this medium is read-only and @c false otherwise.
8946
8947 A medium is considered to be read-only when its contents cannot be
8948 modified without breaking the integrity of other parties that depend on
8949 this medium such as its child media or snapshots of virtual machines
8950 where this medium is attached to these machines. If there are no
8951 children and no such snapshots then there is no dependency and the
8952 medium is not read-only.
8953
8954 The value of this attribute can be used to determine the kind of the
8955 attachment that will take place when attaching this medium to a
8956 virtual machine. If the value is @c false then the medium will
8957 be attached directly. If the value is @c true then the medium
8958 will be attached indirectly by creating a new differencing child
8959 medium for that. See the interface description for more information.
8960
8961 Note that all <link to="MediumType::Immutable">Immutable</link> media
8962 are always read-only while all
8963 <link to="MediumType::Writethrough">Writethrough</link> media are
8964 always not.
8965
8966 <note>
8967 The read-only condition represented by this attribute is related to
8968 the medium type and usage, not to the current
8969 <link to="IMedium::state">medium state</link> and not to the read-only
8970 state of the storage unit.
8971 </note>
8972 </desc>
8973 </attribute>
8974
8975 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
8976 <desc>
8977 Logical size of this medium (in megabytes), as reported to the
8978 guest OS running inside the virtual machine this medium is
8979 attached to. The logical size is defined when the medium is created
8980 and cannot be changed later.
8981
8982 <note>
8983 Reading this property on a differencing medium will return the size
8984 of its <link to="#base"/> medium.
8985 </note>
8986 <note>
8987 For media whose state is <link to="#state"/> is <link
8988 to="MediumState::Inaccessible"/>, the value of this property is the
8989 last known logical size. For <link to="MediumState::NotCreated"/>
8990 media, the returned value is zero.
8991 </note>
8992 </desc>
8993 </attribute>
8994
8995 <attribute name="autoReset" type="boolean">
8996 <desc>
8997 Whether this differencing medium will be automatically reset each
8998 time a virtual machine it is attached to is powered up. This
8999 attribute is automatically set to @c true for the last
9000 differencing image of an "immutable" medium (see
9001 <link to="MediumType" />).
9002
9003 See <link to="#reset"/> for more information about resetting
9004 differencing media.
9005
9006 <note>
9007 Reading this property on a base (non-differencing) medium will
9008 always @c false. Changing the value of this property in this
9009 case is not supported.
9010 </note>
9011
9012 <result name="VBOX_E_NOT_SUPPORTED">
9013 This is not a differencing medium (when changing the attribute
9014 value).
9015 </result>
9016 </desc>
9017 </attribute>
9018
9019 <attribute name="lastAccessError" type="wstring" readonly="yes">
9020 <desc>
9021 Text message that represents the result of the last accessibility
9022 check performed by <link to="#refreshState"/>.
9023
9024 An empty string is returned if the last accessibility check
9025 was successful or has not yet been called. As a result, if
9026 <link to="#state" /> is "Inaccessible" and this attribute is empty,
9027 then <link to="#refreshState"/> has yet to be called; this is the
9028 default value of media after VirtualBox initialization.
9029 A non-empty string indicates a failure and should normally describe
9030 a reason of the failure (for example, a file read error).
9031 </desc>
9032 </attribute>
9033
9034 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9035 <desc>
9036 Array of UUIDs of all machines this medium is attached to.
9037
9038 A @c null array is returned if this medium is not attached to any
9039 machine or to any machine's snapshot.
9040
9041 <note>
9042 The returned array will include a machine even if this medium is not
9043 attached to that machine in the current state but attached to it in
9044 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9045 details.
9046 </note>
9047 </desc>
9048 </attribute>
9049
9050 <method name="setIDs">
9051 <desc>
9052 Changes the UUID and parent UUID for a hard disk medium.
9053 </desc>
9054 <param name="setImageId" type="boolean" dir="in">
9055 <desc>
9056 Select whether a new image UUID is set or not.
9057 </desc>
9058 </param>
9059 <param name="imageId" type="uuid" mod="string" dir="in">
9060 <desc>
9061 New UUID for the image. If an empty string is passed, then a new
9062 UUID is automatically created, provided that @a setImageId is @c true.
9063 Specifying a zero UUID is not allowed.
9064 </desc>
9065 </param>
9066 <param name="setParentId" type="boolean" dir="in">
9067 <desc>
9068 Select whether a new parent UUID is set or not.
9069 </desc>
9070 </param>
9071 <param name="parentId" type="uuid" mod="string" dir="in">
9072 <desc>
9073 New parent UUID for the image. If an empty string is passed, then a
9074 new UUID is automatically created, provided @a setParentId is
9075 @c true. A zero UUID is valid.
9076 </desc>
9077 </param>
9078 <result name="E_INVALIDARG">
9079 Invalid parameter combination.
9080 </result>
9081 <result name="VBOX_E_NOT_SUPPORTED">
9082 Medium is not a hard disk medium.
9083 </result>
9084 </method>
9085
9086 <method name="refreshState">
9087 <desc>
9088 If the current medium state (see <link to="MediumState"/>) is one of
9089 "Created", "Inaccessible" or "LockedRead", then this performs an
9090 accessibility check on the medium and sets the value of the <link to="#state"/>
9091 attribute accordingly; that value is also returned for convenience.
9092
9093 For all other state values, this does not perform a refresh but returns
9094 the state only.
9095
9096 The refresh, if performed, may take a long time (several seconds or even
9097 minutes, depending on the storage unit location and format) because it performs an
9098 accessibility check of the storage unit. This check may cause a significant
9099 delay if the storage unit of the given medium is, for example, a file located
9100 on a network share which is not currently accessible due to connectivity
9101 problems. In that case, the call will not return until a timeout
9102 interval defined by the host OS for this operation expires. For this reason,
9103 it is recommended to never read this attribute on the main UI thread to avoid
9104 making the UI unresponsive.
9105
9106 If the last known state of the medium is "Created" and the accessibility
9107 check fails, then the state would be set to "Inaccessible", and
9108 <link to="#lastAccessError"/> may be used to get more details about the
9109 failure. If the state of the medium is "LockedRead", then it remains the
9110 same, and a non-empty value of <link to="#lastAccessError"/> will
9111 indicate a failed accessibility check in this case.
9112
9113 Note that not all medium states are applicable to all medium types.
9114 </desc>
9115 <param name="state" type="MediumState" dir="return">
9116 <desc>
9117 New medium state.
9118 </desc>
9119 </param>
9120 </method>
9121
9122 <method name="getSnapshotIds">
9123 <desc>
9124 Returns an array of UUIDs of all snapshots of the given machine where
9125 this medium is attached to.
9126
9127 If the medium is attached to the machine in the current state, then the
9128 first element in the array will always be the ID of the queried machine
9129 (i.e. the value equal to the @c machineId argument), followed by
9130 snapshot IDs (if any).
9131
9132 If the medium is not attached to the machine in the current state, then
9133 the array will contain only snapshot IDs.
9134
9135 The returned array may be @c null if this medium is not attached
9136 to the given machine at all, neither in the current state nor in one of
9137 the snapshots.
9138 </desc>
9139 <param name="machineId" type="uuid" mod="string" dir="in">
9140 <desc>
9141 UUID of the machine to query.
9142 </desc>
9143 </param>
9144 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9145 <desc>
9146 Array of snapshot UUIDs of the given machine using this medium.
9147 </desc>
9148 </param>
9149 </method>
9150
9151 <method name="lockRead">
9152 <desc>
9153 Locks this medium for reading.
9154
9155 A read lock is shared: many clients can simultaneously lock the
9156 same medium for reading unless it is already locked for writing (see
9157 <link to="#lockWrite"/>) in which case an error is returned.
9158
9159 When the medium is locked for reading, it cannot be modified
9160 from within VirtualBox. This means that any method that changes
9161 the properties of this medium or contents of the storage unit
9162 will return an error (unless explicitly stated otherwise). That
9163 includes an attempt to start a virtual machine that wants to
9164 write to the the medium.
9165
9166 When the virtual machine is started up, it locks for reading all
9167 media it uses in read-only mode. If some medium cannot be locked
9168 for reading, the startup procedure will fail.
9169 A medium is typically locked for reading while it is used by a running
9170 virtual machine but has a depending differencing image that receives
9171 the actual write operations. This way one base medium can have
9172 multiple child differencing images which can be written to
9173 simultaneously. Read-only media such as DVD and floppy images are
9174 also locked for reading only (so they can be in use by multiple
9175 machines simultaneously).
9176
9177 A medium is also locked for reading when it is the source of a
9178 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9179
9180 The medium locked for reading must be unlocked using the <link
9181 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9182 can be nested and must be followed by the same number of paired
9183 <link to="#unlockRead"/> calls.
9184
9185 This method sets the medium state (see <link to="#state"/>) to
9186 "LockedRead" on success. The medium's previous state must be
9187 one of "Created", "Inaccessible" or "LockedRead".
9188
9189 Locking an inaccessible medium is not an error; this method performs
9190 a logical lock that prevents modifications of this medium through
9191 the VirtualBox API, not a physical file-system lock of the underlying
9192 storage unit.
9193
9194 This method returns the current state of the medium
9195 <i>before</i> the operation.
9196
9197 <result name="VBOX_E_INVALID_OBJECT_STATE">
9198 Invalid medium state (e.g. not created, locked, inaccessible,
9199 creating, deleting).
9200 </result>
9201
9202 </desc>
9203 <param name="state" type="MediumState" dir="return">
9204 <desc>
9205 State of the medium after the operation.
9206 </desc>
9207 </param>
9208 </method>
9209
9210 <method name="unlockRead">
9211 <desc>
9212 Cancels the read lock previously set by <link to="#lockRead"/>.
9213
9214 For both success and failure, this method returns the current state
9215 of the medium <i>after</i> the operation.
9216
9217 See <link to="#lockRead"/> for more details.
9218
9219 <result name="VBOX_E_INVALID_OBJECT_STATE">
9220 Medium not locked for reading.
9221 </result>
9222
9223 </desc>
9224 <param name="state" type="MediumState" dir="return">
9225 <desc>
9226 State of the medium after the operation.
9227 </desc>
9228 </param>
9229 </method>
9230
9231 <method name="lockWrite">
9232 <desc>
9233 Locks this medium for writing.
9234
9235 A write lock, as opposed to <link to="#lockRead"/>, is
9236 exclusive: there may be only one client holding a write lock,
9237 and there may be no read locks while the write lock is held.
9238 As a result, read-locking fails if a write lock is held, and
9239 write-locking fails if either a read or another write lock is held.
9240
9241 When a medium is locked for writing, it cannot be modified
9242 from within VirtualBox, and it is not guaranteed that the values
9243 of its properties are up-to-date. Any method that changes the
9244 properties of this medium or contents of the storage unit will
9245 return an error (unless explicitly stated otherwise).
9246
9247 When a virtual machine is started up, it locks for writing all
9248 media it uses to write data to. If any medium could not be locked
9249 for writing, the startup procedure will fail. If a medium has
9250 differencing images, then while the machine is running, only
9251 the last ("leaf") differencing image is locked for writing,
9252 whereas its parents are locked for reading only.
9253
9254 A medium is also locked for writing when it is the target of a
9255 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9256
9257 The medium locked for writing must be unlocked using the <link
9258 to="#unlockWrite"/> method. Write locks <i>cannot</i> be nested.
9259
9260 This method sets the medium state (see <link to="#state"/>) to
9261 "LockedWrite" on success. The medium's previous state must be
9262 either "Created" or "Inaccessible".
9263
9264 Locking an inaccessible medium is not an error; this method performs
9265 a logical lock that prevents modifications of this medium through
9266 the VirtualBox API, not a physical file-system lock of the underlying
9267 storage unit.
9268
9269 For both, success and failure, this method returns the current
9270 state of the medium <i>before</i> the operation.
9271
9272 <result name="VBOX_E_INVALID_OBJECT_STATE">
9273 Invalid medium state (e.g. not created, locked, inaccessible,
9274 creating, deleting).
9275 </result>
9276
9277 </desc>
9278 <param name="state" type="MediumState" dir="return">
9279 <desc>
9280 State of the medium after the operation.
9281 </desc>
9282 </param>
9283 </method>
9284
9285 <method name="unlockWrite">
9286 <desc>
9287 Cancels the write lock previously set by <link to="#lockWrite"/>.
9288
9289 For both success and failure, this method returns the current
9290 state of the medium <i>after</i> the operation.
9291
9292 See <link to="#lockWrite"/> for more details.
9293
9294 <result name="VBOX_E_INVALID_OBJECT_STATE">
9295 Medium not locked for writing.
9296 </result>
9297
9298 </desc>
9299 <param name="state" type="MediumState" dir="return">
9300 <desc>
9301 State of the medium after the operation.
9302 </desc>
9303 </param>
9304 </method>
9305
9306 <method name="close">
9307 <desc>
9308 Closes this medium.
9309
9310 The medium must not be attached to any known virtual machine
9311 and must not have any known child media, otherwise the
9312 operation will fail.
9313
9314 When the medium is successfully closed, it is removed from
9315 the list of registered media, but its storage unit is not
9316 deleted. In particular, this means that this medium can
9317 later be opened again using the <link to="IVirtualBox::openMedium"/>
9318 call.
9319
9320 Note that after this method successfully returns, the given medium
9321 object becomes uninitialized. This means that any attempt
9322 to call any of its methods or attributes will fail with the
9323 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9324
9325 <result name="VBOX_E_INVALID_OBJECT_STATE">
9326 Invalid medium state (other than not created, created or
9327 inaccessible).
9328 </result>
9329 <result name="VBOX_E_OBJECT_IN_USE">
9330 Medium attached to virtual machine.
9331 </result>
9332 <result name="VBOX_E_FILE_ERROR">
9333 Settings file not accessible.
9334 </result>
9335 <result name="VBOX_E_XML_ERROR">
9336 Could not parse the settings file.
9337 </result>
9338
9339 </desc>
9340 </method>
9341
9342 <!-- storage methods -->
9343
9344 <method name="getProperty">
9345 <desc>
9346 Returns the value of the custom medium property with the given name.
9347
9348 The list of all properties supported by the given medium format can
9349 be obtained with <link to="IMediumFormat::describeProperties"/>.
9350
9351 Note that if this method returns an empty string in @a value, the
9352 requested property is supported but currently not assigned any value.
9353
9354 <result name="VBOX_E_OBJECT_NOT_FOUND">
9355 Requested property does not exist (not supported by the format).
9356 </result>
9357 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9358 </desc>
9359 <param name="name" type="wstring" dir="in">
9360 <desc>Name of the property to get.</desc>
9361 </param>
9362 <param name="value" type="wstring" dir="return">
9363 <desc>Current property value.</desc>
9364 </param>
9365 </method>
9366
9367 <method name="setProperty">
9368 <desc>
9369 Sets the value of the custom medium property with the given name.
9370
9371 The list of all properties supported by the given medium format can
9372 be obtained with <link to="IMediumFormat::describeProperties"/>.
9373
9374 Note that setting the property value to @c null or an empty string is
9375 equivalent to deleting the existing value. A default value (if it is
9376 defined for this property) will be used by the format backend in this
9377 case.
9378
9379 <result name="VBOX_E_OBJECT_NOT_FOUND">
9380 Requested property does not exist (not supported by the format).
9381 </result>
9382 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9383 </desc>
9384 <param name="name" type="wstring" dir="in">
9385 <desc>Name of the property to set.</desc>
9386 </param>
9387 <param name="value" type="wstring" dir="in">
9388 <desc>Property value to set.</desc>
9389 </param>
9390 </method>
9391
9392 <method name="getProperties">
9393 <desc>
9394 Returns values for a group of properties in one call.
9395
9396 The names of the properties to get are specified using the @a names
9397 argument which is a list of comma-separated property names or
9398 an empty string if all properties are to be returned. Note that currently
9399 the value of this argument is ignored and the method always returns all
9400 existing properties.
9401
9402 The list of all properties supported by the given medium format can
9403 be obtained with <link to="IMediumFormat::describeProperties"/>.
9404
9405 The method returns two arrays, the array of property names corresponding
9406 to the @a names argument and the current values of these properties.
9407 Both arrays have the same number of elements with each elemend at the
9408 given index in the first array corresponds to an element at the same
9409 index in the second array.
9410
9411 Note that for properties that do not have assigned values,
9412 an empty string is returned at the appropriate index in the
9413 @a returnValues array.
9414
9415 </desc>
9416 <param name="names" type="wstring" dir="in">
9417 <desc>
9418 Names of properties to get.
9419 </desc>
9420 </param>
9421 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9422 <desc>Names of returned properties.</desc>
9423 </param>
9424 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9425 <desc>Values of returned properties.</desc>
9426 </param>
9427 </method>
9428
9429 <method name="setProperties">
9430 <desc>
9431 Sets values for a group of properties in one call.
9432
9433 The names of the properties to set are passed in the @a names
9434 array along with the new values for them in the @a values array. Both
9435 arrays have the same number of elements with each elemend at the given
9436 index in the first array corresponding to an element at the same index
9437 in the second array.
9438
9439 If there is at least one property name in @a names that is not valid,
9440 the method will fail before changing the values of any other properties
9441 from the @a names array.
9442
9443 Using this method over <link to="#setProperty"/> is preferred if you
9444 need to set several properties at once since it will result into less
9445 IPC calls.
9446
9447 The list of all properties supported by the given medium format can
9448 be obtained with <link to="IMediumFormat::describeProperties"/>.
9449
9450 Note that setting the property value to @c null or an empty string is
9451 equivalent to deleting the existing value. A default value (if it is
9452 defined for this property) will be used by the format backend in this
9453 case.
9454 </desc>
9455 <param name="names" type="wstring" safearray="yes" dir="in">
9456 <desc>Names of properties to set.</desc>
9457 </param>
9458 <param name="values" type="wstring" safearray="yes" dir="in">
9459 <desc>Values of properties to set.</desc>
9460 </param>
9461 </method>
9462
9463 <!-- storage methods -->
9464
9465 <method name="createBaseStorage">
9466 <desc>
9467 Starts creating a hard disk storage unit (fixed/dynamic, according
9468 to the variant flags) in in the background. The previous storage unit
9469 created for this object, if any, must first be deleted using
9470 <link to="#deleteStorage"/>, otherwise the operation will fail.
9471
9472 Before the operation starts, the medium is placed in
9473 <link to="MediumState::Creating"/> state. If the create operation
9474 fails, the medium will be placed back in <link to="MediumState::NotCreated"/>
9475 state.
9476
9477 After the returned progress object reports that the operation has
9478 successfully completed, the medium state will be set to <link
9479 to="MediumState::Created"/>, the medium will be remembered by this
9480 VirtualBox installation and may be attached to virtual machines.
9481
9482 <result name="VBOX_E_NOT_SUPPORTED">
9483 The variant of storage creation operation is not supported. See <link
9484 to="IMediumFormat::capabilities"/>.
9485 </result>
9486 </desc>
9487 <param name="logicalSize" type="unsigned long long" dir="in">
9488 <desc>Maximum logical size of the medium in megabytes.</desc>
9489 </param>
9490 <param name="variant" type="MediumVariant" dir="in">
9491 <desc>Exact image variant which should be created.</desc>
9492 </param>
9493 <param name="progress" type="IProgress" dir="return">
9494 <desc>Progress object to track the operation completion.</desc>
9495 </param>
9496 </method>
9497
9498 <method name="deleteStorage">
9499 <desc>
9500 Starts deleting the storage unit of this medium.
9501
9502 The medium must not be attached to any known virtual machine and must
9503 not have any known child media, otherwise the operation will fail.
9504 It will also fail if there is no storage unit to delete or if deletion
9505 is already in progress, or if the medium is being in use (locked for
9506 read or for write) or inaccessible. Therefore, the only valid state for
9507 this operation to succeed is <link to="MediumState::Created"/>.
9508
9509 Before the operation starts, the medium is placed in
9510 <link to="MediumState::Deleting"/> state and gets removed from the list
9511 of remembered hard disks (media registry). If the delete operation
9512 fails, the medium will be remembered again and placed back to
9513 <link to="MediumState::Created"/> state.
9514
9515 After the returned progress object reports that the operation is
9516 complete, the medium state will be set to
9517 <link to="MediumState::NotCreated"/> and you will be able to use one of
9518 the storage creation methods to create it again.
9519
9520 <see>#close()</see>
9521
9522 <result name="VBOX_E_OBJECT_IN_USE">
9523 Medium is attached to a virtual machine.
9524 </result>
9525 <result name="VBOX_E_NOT_SUPPORTED">
9526 Storage deletion is not allowed because neither of storage creation
9527 operations are supported. See
9528 <link to="IMediumFormat::capabilities"/>.
9529 </result>
9530
9531 <note>
9532 If the deletion operation fails, it is not guaranteed that the storage
9533 unit still exists. You may check the <link to="IMedium::state"/> value
9534 to answer this question.
9535 </note>
9536 </desc>
9537 <param name="progress" type="IProgress" dir="return">
9538 <desc>Progress object to track the operation completion.</desc>
9539 </param>
9540 </method>
9541
9542 <!-- diff methods -->
9543
9544 <method name="createDiffStorage">
9545 <desc>
9546 Starts creating an empty differencing storage unit based on this
9547 medium in the format and at the location defined by the @a target
9548 argument.
9549
9550 The target medium must be in <link to="MediumState::NotCreated"/>
9551 state (i.e. must not have an existing storage unit). Upon successful
9552 completion, this operation will set the type of the target medium to
9553 <link to="MediumType::Normal"/> and create a storage unit necessary to
9554 represent the differencing medium data in the given format (according
9555 to the storage format of the target object).
9556
9557 After the returned progress object reports that the operation is
9558 successfully complete, the target medium gets remembered by this
9559 VirtualBox installation and may be attached to virtual machines.
9560
9561 <note>
9562 The medium will be set to <link to="MediumState::LockedRead"/>
9563 state for the duration of this operation.
9564 </note>
9565 <result name="VBOX_E_OBJECT_IN_USE">
9566 Medium not in @c NotCreated state.
9567 </result>
9568 </desc>
9569 <param name="target" type="IMedium" dir="in">
9570 <desc>Target medium.</desc>
9571 </param>
9572 <param name="variant" type="MediumVariant" dir="in">
9573 <desc>Exact image variant which should be created.</desc>
9574 </param>
9575 <param name="progress" type="IProgress" dir="return">
9576 <desc>Progress object to track the operation completion.</desc>
9577 </param>
9578 </method>
9579
9580 <method name="mergeTo">
9581 <desc>
9582 Starts merging the contents of this medium and all intermediate
9583 differencing media in the chain to the given target medium.
9584
9585 The target medium must be either a descendant of this medium or
9586 its ancestor (otherwise this method will immediately return a failure).
9587 It follows that there are two logical directions of the merge operation:
9588 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9589 ancestor (<i>backward merge</i>). Let us consider the following medium
9590 chain:
9591
9592 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9593
9594 Here, calling this method on the <tt>Base</tt> medium object with
9595 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9596 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9597 merge. Note that in both cases the contents of the resulting medium
9598 will be the same, the only difference is the medium object that takes
9599 the result of the merge operation. In case of the forward merge in the
9600 above example, the result will be written to <tt>Diff_2</tt>; in case of
9601 the backward merge, the result will be written to <tt>Base</tt>. In
9602 other words, the result of the operation is always stored in the target
9603 medium.
9604
9605 Upon successful operation completion, the storage units of all media in
9606 the chain between this (source) medium and the target medium, including
9607 the source medium itself, will be automatically deleted and the
9608 relevant medium objects (including this medium) will become
9609 uninitialized. This means that any attempt to call any of
9610 their methods or attributes will fail with the
9611 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9612 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9613 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> media.
9614 Note that <tt>Diff_2</tt> in this case will become a base medium
9615 itself since it will no longer be based on any other medium.
9616
9617 Considering the above, all of the following conditions must be met in
9618 order for the merge operation to succeed:
9619 <ul>
9620 <li>
9621 Neither this (source) medium nor any intermediate
9622 differencing medium in the chain between it and the target
9623 medium is attached to any virtual machine.
9624 </li>
9625 <li>
9626 Neither the source medium nor the target medium is an
9627 <link to="MediumType::Immutable"/> medium.
9628 </li>
9629 <li>
9630 The part of the medium tree from the source medium to the
9631 target medium is a linear chain, i.e. all medium in this
9632 chain have exactly one child which is the next medium in this
9633 chain. The only exception from this rule is the target medium in
9634 the forward merge operation; it is allowed to have any number of
9635 child media because the merge operation will not change its
9636 logical contents (as it is seen by the guest OS or by children).
9637 </li>
9638 <li>
9639 None of the involved media are in
9640 <link to="MediumState::LockedRead"/> or
9641 <link to="MediumState::LockedWrite"/> state.
9642 </li>
9643 </ul>
9644
9645 <note>
9646 This (source) medium and all intermediates will be placed to <link
9647 to="MediumState::Deleting"/> state and the target medium will be
9648 placed to <link to="MediumState::LockedWrite"/> state and for the
9649 duration of this operation.
9650 </note>
9651 </desc>
9652 <param name="target" type="IMedium" dir="in">
9653 <desc>Target medium.</desc>
9654 </param>
9655 <param name="progress" type="IProgress" dir="return">
9656 <desc>Progress object to track the operation completion.</desc>
9657 </param>
9658 </method>
9659
9660 <!-- clone method -->
9661
9662 <method name="cloneTo">
9663 <desc>
9664 Starts creating a clone of this medium in the format and at the
9665 location defined by the @a target argument.
9666
9667 The target medium must be either in <link to="MediumState::NotCreated"/>
9668 state (i.e. must not have an existing storage unit) or in
9669 <link to="MediumState::Created"/> state (i.e. created and not locked, and
9670 big enough to hold the data or else the copy will be partial). Upon
9671 successful completion, the cloned medium will contain exactly the
9672 same sector data as the medium being cloned, except that in the
9673 first case a new UUID for the clone will be randomly generated, and in
9674 the second case the UUID will remain unchanged.
9675
9676 The @a parent argument defines which medium will be the parent
9677 of the clone. Passing a @c null reference indicates that the clone will
9678 be a base image, i.e. completely independent. It is possible to specify
9679 an arbitrary medium for this parameter, including the parent of the
9680 medium which is being cloned. Even cloning to a child of the source
9681 medium is possible. Note that when cloning to an existing image, the
9682 @a parent irgument is ignored.
9683
9684 After the returned progress object reports that the operation is
9685 successfully complete, the target medium gets remembered by this
9686 VirtualBox installation and may be attached to virtual machines.
9687
9688 <note>
9689 This medium will be placed to <link to="MediumState::LockedRead"/>
9690 state for the duration of this operation.
9691 </note>
9692 <result name="E_NOTIMPL">
9693 The specified cloning variant is not supported at the moment.
9694 </result>
9695 </desc>
9696 <param name="target" type="IMedium" dir="in">
9697 <desc>Target medium.</desc>
9698 </param>
9699 <param name="variant" type="MediumVariant" dir="in">
9700 <desc>Exact image variant which should be created.</desc>
9701 </param>
9702 <param name="parent" type="IMedium" dir="in">
9703 <desc>Parent of the cloned medium.</desc>
9704 </param>
9705 <param name="progress" type="IProgress" dir="return">
9706 <desc>Progress object to track the operation completion.</desc>
9707 </param>
9708 </method>
9709
9710 <!-- other methods -->
9711
9712 <method name="compact">
9713 <desc>
9714 Starts compacting of this medium. This means that the medium is
9715 transformed into a possibly more compact storage representation.
9716 This potentially creates temporary images, which can require a
9717 substantial amount of additional disk space.
9718
9719 This medium will be placed to <link to="MediumState::LockedWrite"/>
9720 state and all its parent media (if any) will be placed to
9721 <link to="MediumState::LockedRead"/> state for the duration of this
9722 operation.
9723
9724 Please note that the results can be either returned straight away,
9725 or later as the result of the background operation via the object
9726 returned via the @a progress parameter.
9727
9728 <result name="VBOX_E_NOT_SUPPORTED">
9729 Medium format does not support compacting (but potentially
9730 needs it).
9731 </result>
9732 </desc>
9733 <param name="progress" type="IProgress" dir="return">
9734 <desc>Progress object to track the operation completion.</desc>
9735 </param>
9736 </method>
9737
9738 <method name="resize">
9739 <desc>
9740 Starts resizing this medium. This means that the nominal size of the
9741 medium is set to the new value. Both increasing and decreasing the
9742 size is possible, and there are no safety checks, since VirtualBox
9743 does not make any assumptions about the medium contents.
9744
9745 Resizing usually needs additional disk space, and possibly also
9746 some temporary disk space. Note that resize does not create a full
9747 temporary copy of the medium, so the additional disk space requirement
9748 is usually much lower than using the clone operation.
9749
9750 This medium will be placed to <link to="MediumState::LockedWrite"/>
9751 state for the duration of this operation.
9752
9753 Please note that the results can be either returned straight away,
9754 or later as the result of the background operation via the object
9755 returned via the @a progress parameter.
9756
9757 <result name="VBOX_E_NOT_SUPPORTED">
9758 Medium format does not support resizing.
9759 </result>
9760 </desc>
9761 <param name="logicalSize" type="unsigned long long" dir="in">
9762 <desc>New nominal capacity of the medium in megabytes.</desc>
9763 </param>
9764 <param name="progress" type="IProgress" dir="return">
9765 <desc>Progress object to track the operation completion.</desc>
9766 </param>
9767 </method>
9768
9769 <method name="reset">
9770 <desc>
9771 Starts erasing the contents of this differencing medium.
9772
9773 This operation will reset the differencing medium to its initial
9774 state when it does not contain any sector data and any read operation is
9775 redirected to its parent medium. This automatically gets called
9776 during VM power-up for every medium whose <link to="#autoReset" />
9777 attribute is @c true.
9778
9779 The medium will be write-locked for the duration of this operation (see
9780 <link to="#lockWrite" />).
9781
9782 <result name="VBOX_E_NOT_SUPPORTED">
9783 This is not a differencing medium.
9784 </result>
9785 <result name="VBOX_E_INVALID_OBJECT_STATE">
9786 Medium is not in <link to="MediumState::Created"/> or
9787 <link to="MediumState::Inaccessible"/> state.
9788 </result>
9789 </desc>
9790 <param name="progress" type="IProgress" dir="return">
9791 <desc>Progress object to track the operation completion.</desc>
9792 </param>
9793 </method>
9794
9795 </interface>
9796
9797
9798 <!--
9799 // IMediumFormat
9800 /////////////////////////////////////////////////////////////////////////
9801 -->
9802
9803 <enum
9804 name="DataType"
9805 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9806 >
9807 <const name="Int32" value="0"/>
9808 <const name="Int8" value="1"/>
9809 <const name="String" value="2"/>
9810 </enum>
9811
9812 <enum
9813 name="DataFlags"
9814 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9815 >
9816 <const name="None" value="0x00"/>
9817 <const name="Mandatory" value="0x01"/>
9818 <const name="Expert" value="0x02"/>
9819 <const name="Array" value="0x04"/>
9820 <const name="FlagMask" value="0x07"/>
9821 </enum>
9822
9823 <enum
9824 name="MediumFormatCapabilities"
9825 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
9826 >
9827 <desc>
9828 Medium format capability flags.
9829 </desc>
9830
9831 <const name="Uuid" value="0x01">
9832 <desc>
9833 Supports UUIDs as expected by VirtualBox code.
9834 </desc>
9835 </const>
9836
9837 <const name="CreateFixed" value="0x02">
9838 <desc>
9839 Supports creating fixed size images, allocating all space instantly.
9840 </desc>
9841 </const>
9842
9843 <const name="CreateDynamic" value="0x04">
9844 <desc>
9845 Supports creating dynamically growing images, allocating space on
9846 demand.
9847 </desc>
9848 </const>
9849
9850 <const name="CreateSplit2G" value="0x08">
9851 <desc>
9852 Supports creating images split in chunks of a bit less than 2 GBytes.
9853 </desc>
9854 </const>
9855
9856 <const name="Differencing" value="0x10">
9857 <desc>
9858 Supports being used as a format for differencing media (see <link
9859 to="IMedium::createDiffStorage"/>).
9860 </desc>
9861 </const>
9862
9863 <const name="Asynchronous" value="0x20">
9864 <desc>
9865 Supports asynchronous I/O operations for at least some configurations.
9866 </desc>
9867 </const>
9868
9869 <const name="File" value="0x40">
9870 <desc>
9871 The format backend operates on files (the <link to="IMedium::location"/>
9872 attribute of the medium specifies a file used to store medium
9873 data; for a list of supported file extensions see
9874 <link to="IMediumFormat::fileExtensions"/>).
9875 </desc>
9876 </const>
9877
9878 <const name="Properties" value="0x80">
9879 <desc>
9880 The format backend uses the property interface to configure the storage
9881 location and properties (the <link to="IMediumFormat::describeProperties"/>
9882 method is used to get access to properties supported by the given medium format).
9883 </desc>
9884 </const>
9885
9886 <const name="CapabilityMask" value="0xFF"/>
9887 </enum>
9888
9889 <interface
9890 name="IMediumFormat" extends="$unknown"
9891 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
9892 wsmap="managed"
9893 >
9894 <desc>
9895 The IMediumFormat interface represents a medium format.
9896
9897 Each medium format has an associated backend which is used to handle
9898 media stored in this format. This interface provides information
9899 about the properties of the associated backend.
9900
9901 Each medium format is identified by a string represented by the
9902 <link to="#id"/> attribute. This string is used in calls like
9903 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9904 format.
9905
9906 The list of all supported medium formats can be obtained using
9907 <link to="ISystemProperties::mediumFormats"/>.
9908
9909 <see>IMedium</see>
9910 </desc>
9911
9912 <attribute name="id" type="wstring" readonly="yes">
9913 <desc>
9914 Identifier of this format.
9915
9916 The format identifier is a non-@c null non-empty ASCII string. Note that
9917 this string is case-insensitive. This means that, for example, all of
9918 the following strings:
9919 <pre>
9920 "VDI"
9921 "vdi"
9922 "VdI"</pre>
9923 refer to the same medium format.
9924
9925 This string is used in methods of other interfaces where it is necessary
9926 to specify a medium format, such as
9927 <link to="IVirtualBox::createHardDisk"/>.
9928 </desc>
9929 </attribute>
9930
9931 <attribute name="name" type="wstring" readonly="yes">
9932 <desc>
9933 Human readable description of this format.
9934
9935 Mainly for use in file open dialogs.
9936 </desc>
9937 </attribute>
9938
9939 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9940 <desc>
9941 Array of strings containing the supported file extensions.
9942
9943 The first extension in the array is the extension preferred by the
9944 backend. It is recommended to use this extension when specifying a
9945 location of the storage unit for a new medium.
9946
9947 Note that some backends do not work on files, so this array may be
9948 empty.
9949
9950 <see>IMediumFormat::capabilities</see>
9951 </desc>
9952 </attribute>
9953
9954 <attribute name="capabilities" type="unsigned long" readonly="yes">
9955 <desc>
9956 Capabilities of the format as a set of bit flags.
9957
9958 For the meaning of individual capability flags see
9959 <link to="MediumFormatCapabilities"/>.
9960 </desc>
9961 </attribute>
9962
9963 <method name="describeProperties">
9964 <desc>
9965 Returns several arrays describing the properties supported by this
9966 format.
9967
9968 An element with the given index in each array describes one
9969 property. Thus, the number of elements in each returned array is the
9970 same and corresponds to the number of supported properties.
9971
9972 The returned arrays are filled in only if the
9973 <link to="MediumFormatCapabilities::Properties"/> flag is set.
9974 All arguments must be non-@c null.
9975
9976 <see>DataType</see>
9977 <see>DataFlags</see>
9978 </desc>
9979
9980 <param name="names" type="wstring" safearray="yes" dir="out">
9981 <desc>Array of property names.</desc>
9982 </param>
9983 <param name="description" type="wstring" safearray="yes" dir="out">
9984 <desc>Array of property descriptions.</desc>
9985 </param>
9986 <param name="types" type="DataType" safearray="yes" dir="out">
9987 <desc>Array of property types.</desc>
9988 </param>
9989 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9990 <desc>Array of property flags.</desc>
9991 </param>
9992 <param name="defaults" type="wstring" safearray="yes" dir="out">
9993 <desc>Array of default property values.</desc>
9994 </param>
9995 </method>
9996
9997 </interface>
9998
9999
10000 <!--
10001 // IKeyboard
10002 /////////////////////////////////////////////////////////////////////////
10003 -->
10004
10005 <interface
10006 name="IKeyboard" extends="$unknown"
10007 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10008 wsmap="managed"
10009 >
10010 <desc>
10011 The IKeyboard interface represents the virtual machine's keyboard. Used
10012 in <link to="IConsole::keyboard"/>.
10013
10014 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10015 to the virtual machine.
10016
10017 </desc>
10018 <method name="putScancode">
10019 <desc>Sends a scancode to the keyboard.
10020
10021 <result name="VBOX_E_IPRT_ERROR">
10022 Could not send scan code to virtual keyboard.
10023 </result>
10024
10025 </desc>
10026 <param name="scancode" type="long" dir="in"/>
10027 </method>
10028
10029 <method name="putScancodes">
10030 <desc>Sends an array of scancodes to the keyboard.
10031
10032 <result name="VBOX_E_IPRT_ERROR">
10033 Could not send all scan codes to virtual keyboard.
10034 </result>
10035
10036 </desc>
10037 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10038 <param name="codesStored" type="unsigned long" dir="return"/>
10039 </method>
10040
10041 <method name="putCAD">
10042 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10043 function is nothing special, it is just a convenience function
10044 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10045
10046 <result name="VBOX_E_IPRT_ERROR">
10047 Could not send all scan codes to virtual keyboard.
10048 </result>
10049
10050 </desc>
10051 </method>
10052
10053 </interface>
10054
10055
10056 <!--
10057 // IMouse
10058 /////////////////////////////////////////////////////////////////////////
10059 -->
10060
10061 <enum
10062 name="MouseButtonState"
10063 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10064 >
10065 <desc>
10066 Mouse button state.
10067 </desc>
10068
10069 <const name="LeftButton" value="0x01"/>
10070 <const name="RightButton" value="0x02"/>
10071 <const name="MiddleButton" value="0x04"/>
10072 <const name="WheelUp" value="0x08"/>
10073 <const name="WheelDown" value="0x10"/>
10074 <const name="XButton1" value="0x20"/>
10075 <const name="XButton2" value="0x40"/>
10076 <const name="MouseStateMask" value="0x7F"/>
10077 </enum>
10078
10079 <interface
10080 name="IMouse" extends="$unknown"
10081 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
10082 wsmap="managed"
10083 >
10084 <desc>
10085 The IMouse interface represents the virtual machine's mouse. Used in
10086 <link to="IConsole::mouse"/>.
10087
10088 Through this interface, the virtual machine's virtual mouse can be
10089 controlled.
10090 </desc>
10091
10092 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10093 <desc>
10094 Whether the guest OS supports absolute mouse pointer positioning
10095 or not.
10096 <note>
10097 You can use the <link to="IMouseCapabilityChangedEvent"/>
10098 event to be instantly informed about changes of this attribute
10099 during virtual machine execution.
10100 </note>
10101 <see><link to="#putMouseEventAbsolute"/></see>
10102 </desc>
10103 </attribute>
10104
10105 <attribute name="relativeSupported" type="boolean" readonly="yes">
10106 <desc>
10107 Whether the guest OS supports relative mouse pointer positioning
10108 or not.
10109 <note>
10110 You can use the <link to="IMouseCapabilityChangedEvent"/>
10111 event to be instantly informed about changes of this attribute
10112 during virtual machine execution.
10113 </note>
10114 <see><link to="#putMouseEvent"/></see>
10115 </desc>
10116 </attribute>
10117
10118 <attribute name="needsHostCursor" type="boolean" readonly="yes">
10119 <desc>
10120 Whether the guest OS can currently switch to drawing it's own mouse
10121 cursor on demand.
10122 <note>
10123 You can use the <link to="IMouseCapabilityChangedEvent"/>
10124 event to be instantly informed about changes of this attribute
10125 during virtual machine execution.
10126 </note>
10127 <see><link to="#putMouseEvent"/></see>
10128 </desc>
10129 </attribute>
10130
10131 <method name="putMouseEvent">
10132 <desc>
10133 Initiates a mouse event using relative pointer movements
10134 along x and y axis.
10135
10136 <result name="E_ACCESSDENIED">
10137 Console not powered up.
10138 </result>
10139 <result name="VBOX_E_IPRT_ERROR">
10140 Could not send mouse event to virtual mouse.
10141 </result>
10142
10143 </desc>
10144
10145 <param name="dx" type="long" dir="in">
10146 <desc>
10147 Amount of pixels the mouse should move to the right.
10148 Negative values move the mouse to the left.
10149 </desc>
10150 </param>
10151 <param name="dy" type="long" dir="in">
10152 <desc>
10153 Amount of pixels the mouse should move downwards.
10154 Negative values move the mouse upwards.
10155 </desc>
10156 </param>
10157 <param name="dz" type="long" dir="in">
10158 <desc>
10159 Amount of mouse wheel moves.
10160 Positive values describe clockwise wheel rotations,
10161 negative values describe counterclockwise rotations.
10162 </desc>
10163 </param>
10164 <param name="dw" type="long" dir="in">
10165 <desc>
10166 Amount of horizontal mouse wheel moves.
10167 Positive values describe a movement to the left,
10168 negative values describe a movement to the right.
10169 </desc>
10170 </param>
10171 <param name="buttonState" type="long" dir="in">
10172 <desc>
10173 The current state of mouse buttons. Every bit represents
10174 a mouse button as follows:
10175 <table>
10176 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10177 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10178 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10179 </table>
10180 A value of <tt>1</tt> means the corresponding button is pressed.
10181 otherwise it is released.
10182 </desc>
10183 </param>
10184 </method>
10185
10186 <method name="putMouseEventAbsolute">
10187 <desc>
10188 Positions the mouse pointer using absolute x and y coordinates.
10189 These coordinates are expressed in pixels and
10190 start from <tt>[1,1]</tt> which corresponds to the top left
10191 corner of the virtual display.
10192
10193 <result name="E_ACCESSDENIED">
10194 Console not powered up.
10195 </result>
10196 <result name="VBOX_E_IPRT_ERROR">
10197 Could not send mouse event to virtual mouse.
10198 </result>
10199
10200 <note>
10201 This method will have effect only if absolute mouse
10202 positioning is supported by the guest OS.
10203 </note>
10204
10205 <see><link to="#absoluteSupported"/></see>
10206 </desc>
10207
10208 <param name="x" type="long" dir="in">
10209 <desc>
10210 X coordinate of the pointer in pixels, starting from @c 1.
10211 </desc>
10212 </param>
10213 <param name="y" type="long" dir="in">
10214 <desc>
10215 Y coordinate of the pointer in pixels, starting from @c 1.
10216 </desc>
10217 </param>
10218 <param name="dz" type="long" dir="in">
10219 <desc>
10220 Amount of mouse wheel moves.
10221 Positive values describe clockwise wheel rotations,
10222 negative values describe counterclockwise rotations.
10223 </desc>
10224 </param>
10225 <param name="dw" type="long" dir="in">
10226 <desc>
10227 Amount of horizontal mouse wheel moves.
10228 Positive values describe a movement to the left,
10229 negative values describe a movement to the right.
10230 </desc>
10231 </param>
10232 <param name="buttonState" type="long" dir="in">
10233 <desc>
10234 The current state of mouse buttons. Every bit represents
10235 a mouse button as follows:
10236 <table>
10237 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10238 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10239 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10240 </table>
10241 A value of @c 1 means the corresponding button is pressed.
10242 otherwise it is released.
10243 </desc>
10244 </param>
10245 </method>
10246
10247 </interface>
10248
10249 <!--
10250 // IDisplay
10251 /////////////////////////////////////////////////////////////////////////
10252 -->
10253
10254 <enum
10255 name="FramebufferPixelFormat"
10256 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10257 >
10258 <desc>
10259 Format of the video memory buffer. Constants represented by this enum can
10260 be used to test for particular values of <link
10261 to="IFramebuffer::pixelFormat"/>. See also <link
10262 to="IFramebuffer::requestResize"/>.
10263
10264 See also www.fourcc.org for more information about FOURCC pixel formats.
10265 </desc>
10266
10267 <const name="Opaque" value="0">
10268 <desc>
10269 Unknown buffer format (the user may not assume any particular format of
10270 the buffer).
10271 </desc>
10272 </const>
10273 <const name="FOURCC_RGB" value="0x32424752">
10274 <desc>
10275 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10276 bit layout).
10277 </desc>
10278 </const>
10279 </enum>
10280
10281 <interface
10282 name="IFramebuffer" extends="$unknown"
10283 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10284 wsmap="suppress"
10285 >
10286 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10287 <desc>Address of the start byte of the frame buffer.</desc>
10288 </attribute>
10289
10290 <attribute name="width" type="unsigned long" readonly="yes">
10291 <desc>Frame buffer width, in pixels.</desc>
10292 </attribute>
10293
10294 <attribute name="height" type="unsigned long" readonly="yes">
10295 <desc>Frame buffer height, in pixels.</desc>
10296 </attribute>
10297
10298 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10299 <desc>
10300 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10301 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, valid values
10302 are: 8, 15, 16, 24 and 32.
10303 </desc>
10304 </attribute>
10305
10306 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10307 <desc>
10308 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10309 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, the
10310 size of the scan line must be aligned to 32 bits.
10311 </desc>
10312 </attribute>
10313
10314 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10315 <desc>
10316 Frame buffer pixel format. It's either one of the values defined by <link
10317 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10318 <note>
10319 This attribute must never return <link
10320 to="FramebufferPixelFormat::Opaque"/> -- the format of the buffer
10321 <link to="#address"/> points to must be always known.
10322 </note>
10323 </desc>
10324 </attribute>
10325
10326 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10327 <desc>
10328 Defines whether this frame buffer uses the virtual video card's memory
10329 buffer (guest VRAM) directly or not. See <link
10330 to="IFramebuffer::requestResize"/> for more information.
10331 </desc>
10332 </attribute>
10333
10334 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10335 <desc>
10336 Hint from the frame buffer about how much of the standard
10337 screen height it wants to use for itself. This information is
10338 exposed to the guest through the VESA BIOS and VMMDev interface
10339 so that it can use it for determining its video mode table. It
10340 is not guaranteed that the guest respects the value.
10341 </desc>
10342 </attribute>
10343
10344 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10345 <desc>
10346 An alpha-blended overlay which is superposed over the frame buffer.
10347 The initial purpose is to allow the display of icons providing
10348 information about the VM state, including disk activity, in front
10349 ends which do not have other means of doing that. The overlay is
10350 designed to controlled exclusively by IDisplay. It has no locking
10351 of its own, and any changes made to it are not guaranteed to be
10352 visible until the affected portion of IFramebuffer is updated. The
10353 overlay can be created lazily the first time it is requested. This
10354 attribute can also return @c null to signal that the overlay is not
10355 implemented.
10356 </desc>
10357 </attribute>
10358
10359 <attribute name="winId" type="unsigned long long" readonly="yes">
10360 <desc>
10361 Platform-dependent identifier of the window where context of this
10362 frame buffer is drawn, or zero if there's no such window.
10363 </desc>
10364 </attribute>
10365
10366 <method name="lock">
10367 <desc>
10368 Locks the frame buffer.
10369 Gets called by the IDisplay object where this frame buffer is
10370 bound to.
10371 </desc>
10372 </method>
10373
10374 <method name="unlock">
10375 <desc>
10376 Unlocks the frame buffer.
10377 Gets called by the IDisplay object where this frame buffer is
10378 bound to.
10379 </desc>
10380 </method>
10381
10382 <method name="notifyUpdate">
10383 <desc>
10384 Informs about an update.
10385 Gets called by the display object where this buffer is
10386 registered.
10387 </desc>
10388 <param name="x" type="unsigned long" dir="in"/>
10389 <param name="y" type="unsigned long" dir="in"/>
10390 <param name="width" type="unsigned long" dir="in"/>
10391 <param name="height" type="unsigned long" dir="in"/>
10392 </method>
10393
10394 <method name="requestResize">
10395 <desc>
10396 Requests a size and pixel format change.
10397
10398 There are two modes of working with the video buffer of the virtual
10399 machine. The <i>indirect</i> mode implies that the IFramebuffer
10400 implementation allocates a memory buffer for the requested display mode
10401 and provides it to the virtual machine. In <i>direct</i> mode, the
10402 IFramebuffer implementation uses the memory buffer allocated and owned
10403 by the virtual machine. This buffer represents the video memory of the
10404 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10405 usually faster because the implementation gets a raw pointer to the
10406 guest VRAM buffer which it can directly use for visualizing the contents
10407 of the virtual display, as opposed to the indirect mode where the
10408 contents of guest VRAM are copied to the memory buffer provided by
10409 the implementation every time a display update occurs.
10410
10411 It is important to note that the direct mode is really fast only when
10412 the implementation uses the given guest VRAM buffer directly, for
10413 example, by blitting it to the window representing the virtual machine's
10414 display, which saves at least one copy operation comparing to the
10415 indirect mode. However, using the guest VRAM buffer directly is not
10416 always possible: the format and the color depth of this buffer may be
10417 not supported by the target window, or it may be unknown (opaque) as in
10418 case of text or non-linear multi-plane VGA video modes. In this case,
10419 the indirect mode (that is always available) should be used as a
10420 fallback: when the guest VRAM contents are copied to the
10421 implementation-provided memory buffer, color and format conversion is
10422 done automatically by the underlying code.
10423
10424 The @a pixelFormat parameter defines whether the direct mode is
10425 available or not. If @a pixelFormat is <link
10426 to="FramebufferPixelFormat::Opaque"/> then direct access to the guest
10427 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10428 @a bytesPerLine parameters must be ignored and the implementation must use
10429 the indirect mode (where it provides its own buffer in one of the
10430 supported formats). In all other cases, @a pixelFormat together with
10431 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10432 buffer pointed to by the @a VRAM parameter and the implementation is
10433 free to choose which mode to use. To indicate that this frame buffer uses
10434 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10435 attribute must return @c true and <link to="#address"/> must
10436 return exactly the same address that is passed in the @a VRAM parameter
10437 of this method; otherwise it is assumed that the indirect strategy is
10438 chosen.
10439
10440 The @a width and @a height parameters represent the size of the
10441 requested display mode in both modes. In case of indirect mode, the
10442 provided memory buffer should be big enough to store data of the given
10443 display mode. In case of direct mode, it is guaranteed that the given
10444 @a VRAM buffer contains enough space to represent the display mode of the
10445 given size. Note that this frame buffer's <link to="#width"/> and <link
10446 to="#height"/> attributes must return exactly the same values as
10447 passed to this method after the resize is completed (see below).
10448
10449 The @a finished output parameter determines if the implementation has
10450 finished resizing the frame buffer or not. If, for some reason, the
10451 resize cannot be finished immediately during this call, @a finished
10452 must be set to @c false, and the implementation must call
10453 <link to="IDisplay::resizeCompleted"/> after it has returned from
10454 this method as soon as possible. If @a finished is @c false, the
10455 machine will not call any frame buffer methods until
10456 <link to="IDisplay::resizeCompleted"/> is called.
10457
10458 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10459 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10460 this frame buffer must return exactly the same values as specified in the
10461 parameters of this method, after the resize is completed. If the
10462 indirect mode is chosen, these attributes must return values describing
10463 the format of the implementation's own memory buffer <link
10464 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10465 value must always correlate with <link to="#pixelFormat"/>. Note that
10466 the <link to="#pixelFormat"/> attribute must never return <link
10467 to="FramebufferPixelFormat::Opaque"/> regardless of the selected mode.
10468
10469 <note>
10470 This method is called by the IDisplay object under the
10471 <link to="#lock"/> provided by this IFramebuffer
10472 implementation. If this method returns @c false in @a finished, then
10473 this lock is not released until
10474 <link to="IDisplay::resizeCompleted"/> is called.
10475 </note>
10476 </desc>
10477 <param name="screenId" type="unsigned long" dir="in">
10478 <desc>
10479 Logical screen number. Must be used in the corresponding call to
10480 <link to="IDisplay::resizeCompleted"/> if this call is made.
10481 </desc>
10482 </param>
10483 <param name="pixelFormat" type="unsigned long" dir="in">
10484 <desc>
10485 Pixel format of the memory buffer pointed to by @a VRAM.
10486 See also <link to="FramebufferPixelFormat"/>.
10487 </desc>
10488 </param>
10489 <param name="VRAM" type="octet" mod="ptr" dir="in">
10490 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10491 </param>
10492 <param name="bitsPerPixel" type="unsigned long" dir="in">
10493 <desc>Color depth, bits per pixel.</desc>
10494 </param>
10495 <param name="bytesPerLine" type="unsigned long" dir="in">
10496 <desc>Size of one scan line, in bytes.</desc>
10497 </param>
10498 <param name="width" type="unsigned long" dir="in">
10499 <desc>Width of the guest display, in pixels.</desc>
10500 </param>
10501 <param name="height" type="unsigned long" dir="in">
10502 <desc>Height of the guest display, in pixels.</desc>
10503 </param>
10504 <param name="finished" type="boolean" dir="return">
10505 <desc>
10506 Can the VM start using the new frame buffer immediately
10507 after this method returns or it should wait for
10508 <link to="IDisplay::resizeCompleted"/>.
10509 </desc>
10510 </param>
10511 </method>
10512
10513 <method name="videoModeSupported">
10514 <desc>
10515 Returns whether the frame buffer implementation is willing to
10516 support a given video mode. In case it is not able to render
10517 the video mode (or for some reason not willing), it should
10518 return @c false. Usually this method is called when the guest
10519 asks the VMM device whether a given video mode is supported
10520 so the information returned is directly exposed to the guest.
10521 It is important that this method returns very quickly.
10522 </desc>
10523 <param name="width" type="unsigned long" dir="in"/>
10524 <param name="height" type="unsigned long" dir="in"/>
10525 <param name="bpp" type="unsigned long" dir="in"/>
10526 <param name="supported" type="boolean" dir="return"/>
10527 </method>
10528
10529 <method name="getVisibleRegion">
10530 <desc>
10531 Returns the visible region of this frame buffer.
10532
10533 If the @a rectangles parameter is @c null then the value of the
10534 @a count parameter is ignored and the number of elements necessary to
10535 describe the current visible region is returned in @a countCopied.
10536
10537 If @a rectangles is not @c null but @a count is less
10538 than the required number of elements to store region data, the method
10539 will report a failure. If @a count is equal or greater than the
10540 required number of elements, then the actual number of elements copied
10541 to the provided array will be returned in @a countCopied.
10542
10543 <note>
10544 The address of the provided array must be in the process space of
10545 this IFramebuffer object.
10546 </note>
10547 <note>
10548 Method not yet implemented.
10549 </note>
10550 </desc>
10551 <param name="rectangles" type="octet" mod="ptr" dir="in">
10552 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10553 </param>
10554 <param name="count" type="unsigned long" dir="in">
10555 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10556 </param>
10557 <param name="countCopied" type="unsigned long" dir="return">
10558 <desc>Number of elements copied to the @a rectangles array.</desc>
10559 </param>
10560 </method>
10561
10562 <method name="setVisibleRegion">
10563 <desc>
10564 Suggests a new visible region to this frame buffer. This region
10565 represents the area of the VM display which is a union of regions of
10566 all top-level windows of the guest operating system running inside the
10567 VM (if the Guest Additions for this system support this
10568 functionality). This information may be used by the frontends to
10569 implement the seamless desktop integration feature.
10570
10571 <note>
10572 The address of the provided array must be in the process space of
10573 this IFramebuffer object.
10574 </note>
10575 <note>
10576 The IFramebuffer implementation must make a copy of the provided
10577 array of rectangles.
10578 </note>
10579 <note>
10580 Method not yet implemented.
10581 </note>
10582 </desc>
10583 <param name="rectangles" type="octet" mod="ptr" dir="in">
10584 <desc>Pointer to the @c RTRECT array.</desc>
10585 </param>
10586 <param name="count" type="unsigned long" dir="in">
10587 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10588 </param>
10589 </method>
10590
10591 <method name="processVHWACommand">
10592 <desc>
10593 Posts a Video HW Acceleration Command to the frame buffer for processing.
10594 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10595 are posted from quest to the host to be processed by the host hardware.
10596
10597 <note>
10598 The address of the provided command must be in the process space of
10599 this IFramebuffer object.
10600 </note>
10601 </desc>
10602
10603 <param name="command" type="octet" mod="ptr" dir="in">
10604 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10605 </param>
10606 </method>
10607
10608 </interface>
10609
10610 <interface
10611 name="IFramebufferOverlay" extends="IFramebuffer"
10612 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10613 wsmap="suppress"
10614 >
10615 <desc>
10616 The IFramebufferOverlay interface represents an alpha blended overlay
10617 for displaying status icons above an IFramebuffer. It is always created
10618 not visible, so that it must be explicitly shown. It only covers a
10619 portion of the IFramebuffer, determined by its width, height and
10620 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10621 that order) format, and may be written to directly. Do re-read the
10622 width though, after setting it, as it may be adjusted (increased) to
10623 make it more suitable for the front end.
10624 </desc>
10625 <attribute name="x" type="unsigned long" readonly="yes">
10626 <desc>X position of the overlay, relative to the frame buffer.</desc>
10627 </attribute>
10628
10629 <attribute name="y" type="unsigned long" readonly="yes">
10630 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10631 </attribute>
10632
10633 <attribute name="visible" type="boolean" readonly="no">
10634 <desc>
10635 Whether the overlay is currently visible.
10636 </desc>
10637 </attribute>
10638
10639 <attribute name="alpha" type="unsigned long" readonly="no">
10640 <desc>
10641 The global alpha value for the overlay. This may or may not be
10642 supported by a given front end.
10643 </desc>
10644 </attribute>
10645
10646 <method name="move">
10647 <desc>
10648 Changes the overlay's position relative to the IFramebuffer.
10649 </desc>
10650 <param name="x" type="unsigned long" dir="in"/>
10651 <param name="y" type="unsigned long" dir="in"/>
10652 </method>
10653
10654 </interface>
10655
10656 <interface
10657 name="IDisplay" extends="$unknown"
10658 uuid="1fa79e39-0cc9-4ab3-9df3-ed3e96b42496"
10659 wsmap="managed"
10660 >
10661 <desc>
10662 The IDisplay interface represents the virtual machine's display.
10663
10664 The object implementing this interface is contained in each
10665 <link to="IConsole::display"/> attribute and represents the visual
10666 output of the virtual machine.
10667
10668 The virtual display supports pluggable output targets represented by the
10669 IFramebuffer interface. Examples of the output target are a window on
10670 the host computer or an RDP session's display on a remote computer.
10671 </desc>
10672 <method name="getScreenResolution">
10673 <desc>Queries display width, height and color depth for given screen.</desc>
10674 <param name="screenId" type="unsigned long" dir="in"/>
10675 <param name="width" type="unsigned long" dir="out"/>
10676 <param name="height" type="unsigned long" dir="out"/>
10677 <param name="bitsPerPixel" type="unsigned long" dir="out"/>
10678 </method>
10679
10680 <method name="setFramebuffer">
10681 <desc>
10682 Sets the framebuffer for given screen.
10683 </desc>
10684 <param name="screenId" type="unsigned long" dir="in"/>
10685 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10686 </method>
10687
10688 <method name="getFramebuffer">
10689 <desc>
10690 Queries the framebuffer for given screen.
10691 </desc>
10692 <param name="screenId" type="unsigned long" dir="in"/>
10693 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10694 <param name="xOrigin" type="long" dir="out"/>
10695 <param name="yOrigin" type="long" dir="out"/>
10696 </method>
10697
10698 <method name="setVideoModeHint">
10699 <desc>
10700 Asks VirtualBox to request the given video mode from
10701 the guest. This is just a hint and it cannot be guaranteed
10702 that the requested resolution will be used. Guest Additions
10703 are required for the request to be seen by guests. The caller
10704 should issue the request and wait for a resolution change and
10705 after a timeout retry.
10706
10707 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10708 parameters means that the corresponding values should be taken from the
10709 current video mode (i.e. left unchanged).
10710
10711 If the guest OS supports multi-monitor configuration then the @a display
10712 parameter specifies the number of the guest display to send the hint to:
10713 @c 0 is the primary display, @c 1 is the first secondary and
10714 so on. If the multi-monitor configuration is not supported, @a display
10715 must be @c 0.
10716
10717 <result name="E_INVALIDARG">
10718 The @a display is not associated with any monitor.
10719 </result>
10720
10721 </desc>
10722 <param name="width" type="unsigned long" dir="in"/>
10723 <param name="height" type="unsigned long" dir="in"/>
10724 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10725 <param name="display" type="unsigned long" dir="in"/>
10726 </method>
10727
10728 <method name="setSeamlessMode">
10729 <desc>
10730 Enables or disables seamless guest display rendering (seamless desktop
10731 integration) mode.
10732 <note>
10733 Calling this method has no effect if <link
10734 to="IGuest::supportsSeamless"/> returns @c false.
10735 </note>
10736 </desc>
10737 <param name="enabled" type="boolean" dir="in"/>
10738 </method>
10739
10740 <method name="takeScreenShot">
10741 <desc>
10742 Takes a screen shot of the requested size and copies it to the
10743 32-bpp buffer allocated by the caller and pointed to by @a address.
10744 A pixel consists of 4 bytes in order: B, G, R, 0.
10745
10746 <note>This API can be used only by the COM/XPCOM C++ API as it
10747 requires pointer support. Use <link to="#takeScreenShotToArray" />
10748 with other language bindings.
10749 </note>
10750
10751 <result name="E_NOTIMPL">
10752 Feature not implemented.
10753 </result>
10754 <result name="VBOX_E_IPRT_ERROR">
10755 Could not take a screenshot.
10756 </result>
10757
10758 </desc>
10759 <param name="screenId" type="unsigned long" dir="in"/>
10760 <param name="address" type="octet" mod="ptr" dir="in"/>
10761 <param name="width" type="unsigned long" dir="in"/>
10762 <param name="height" type="unsigned long" dir="in"/>
10763 </method>
10764
10765 <method name="takeScreenShotToArray">
10766 <desc>
10767 Takes a guest screen shot of the requested size and returns it as
10768 an array of bytes in uncompressed 32-bit RGBA format.
10769 A pixel consists of 4 bytes in order: R, G, B, 0xFF.
10770
10771 This API is slow, but could be the only option to get guest screenshot
10772 for scriptable languages not allowed to manipulate with addresses
10773 directly.
10774
10775 <result name="E_NOTIMPL">
10776 Feature not implemented.
10777 </result>
10778 <result name="VBOX_E_IPRT_ERROR">
10779 Could not take a screenshot.
10780 </result>
10781 </desc>
10782 <param name="screenId" type="unsigned long" dir="in">
10783 <desc>
10784 Monitor to take screenshot from.
10785 </desc>
10786 </param>
10787 <param name="width" type="unsigned long" dir="in">
10788 <desc>
10789 Desired image width.
10790 </desc>
10791 </param>
10792 <param name="height" type="unsigned long" dir="in">
10793 <desc>
10794 Desired image height.
10795 </desc>
10796 </param>
10797 <param name="screenData" type="octet" dir="return" safearray="yes">
10798 <desc>
10799 Array with resulting screen data.
10800 </desc>
10801 </param>
10802 </method>
10803
10804 <method name="drawToScreen">
10805 <desc>
10806 Draws a 32-bpp image of the specified size from the given buffer
10807 to the given point on the VM display.
10808
10809 <result name="E_NOTIMPL">
10810 Feature not implemented.
10811 </result>
10812 <result name="VBOX_E_IPRT_ERROR">
10813 Could not draw to screen.
10814 </result>
10815
10816 </desc>
10817 <param name="screenId" type="unsigned long" dir="in"/>
10818 <param name="address" type="octet" mod="ptr" dir="in"/>
10819 <param name="x" type="unsigned long" dir="in">
10820 <desc>Relative to the screen top left corner.</desc>
10821 </param>
10822 <param name="y" type="unsigned long" dir="in">
10823 <desc>Relative to the screen top left corner.</desc>
10824 </param>
10825 <param name="width" type="unsigned long" dir="in"/>
10826 <param name="height" type="unsigned long" dir="in"/>
10827 </method>
10828
10829 <method name="invalidateAndUpdate">
10830 <desc>
10831 Does a full invalidation of the VM display and instructs the VM
10832 to update it.
10833
10834 <result name="VBOX_E_IPRT_ERROR">
10835 Could not invalidate and update screen.
10836 </result>
10837
10838 </desc>
10839 </method>
10840
10841 <method name="resizeCompleted">
10842 <desc>
10843 Signals that a framebuffer has completed the resize operation.
10844
10845 <result name="VBOX_E_NOT_SUPPORTED">
10846 Operation only valid for external frame buffers.
10847 </result>
10848
10849 </desc>
10850 <param name="screenId" type="unsigned long" dir="in"/>
10851 </method>
10852
10853 <method name="completeVHWACommand">
10854 <desc>
10855 Signals that the Video HW Acceleration command has completed.
10856 </desc>
10857
10858 <param name="command" type="octet" mod="ptr" dir="in">
10859 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
10860 </param>
10861 </method>
10862
10863 </interface>
10864
10865 <!--
10866 // INetworkAdapter
10867 /////////////////////////////////////////////////////////////////////////
10868 -->
10869
10870 <enum
10871 name="NetworkAttachmentType"
10872 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10873 >
10874 <desc>
10875 Network attachment type.
10876 </desc>
10877
10878 <const name="Null" value="0">
10879 <desc>Null value, also means "not attached".</desc>
10880 </const>
10881 <const name="NAT" value="1"/>
10882 <const name="Bridged" value="2"/>
10883 <const name="Internal" value="3"/>
10884 <const name="HostOnly" value="4"/>
10885 <const name="VDE" value="5"/>
10886 </enum>
10887
10888 <enum
10889 name="NetworkAdapterType"
10890 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
10891 >
10892 <desc>
10893 Network adapter type.
10894 </desc>
10895
10896 <const name="Null" value="0">
10897 <desc>Null value (never used by the API).</desc>
10898 </const>
10899 <const name="Am79C970A" value="1">
10900 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
10901 </const>
10902 <const name="Am79C973" value="2">
10903 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
10904 </const>
10905 <const name="I82540EM" value="3">
10906 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
10907 </const>
10908 <const name="I82543GC" value="4">
10909 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
10910 </const>
10911 <const name="I82545EM" value="5">
10912 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
10913 </const>
10914 <const name="Virtio" value="6">
10915 <desc>Virtio network device.</desc>
10916 </const>
10917 </enum>
10918
10919 <interface
10920 name="INetworkAdapter" extends="$unknown"
10921 uuid="9bf58a46-c3f7-4f31-80fa-dde9a5dc0b7b"
10922 wsmap="managed"
10923 >
10924 <desc>
10925 Represents a virtual network adapter that is attached to a virtual machine.
10926 Each virtual machine has a fixed number of network adapter slots with one
10927 instance of this attached to each of them. Call
10928 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10929 is attached to a given slot in a given machine.
10930
10931 Each network adapter can be in one of five attachment modes, which are
10932 represented by the <link to="NetworkAttachmentType" /> enumeration;
10933 see the <link to="#attachmentType" /> attribute.
10934 </desc>
10935
10936 <attribute name="adapterType" type="NetworkAdapterType">
10937 <desc>
10938 Type of the virtual network adapter. Depending on this value,
10939 VirtualBox will provide a different virtual network hardware
10940 to the guest.
10941 </desc>
10942 </attribute>
10943
10944 <attribute name="slot" type="unsigned long" readonly="yes">
10945 <desc>
10946 Slot number this adapter is plugged into. Corresponds to
10947 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10948 to obtain this instance.
10949 </desc>
10950 </attribute>
10951
10952 <attribute name="enabled" type="boolean">
10953 <desc>
10954 Flag whether the network adapter is present in the
10955 guest system. If disabled, the virtual guest hardware will
10956 not contain this network adapter. Can only be changed when
10957 the VM is not running.
10958 </desc>
10959 </attribute>
10960
10961 <attribute name="MACAddress" type="wstring">
10962 <desc>
10963 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10964 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
10965 </desc>
10966 </attribute>
10967
10968 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10969
10970 <attribute name="hostInterface" type="wstring">
10971 <desc>
10972 Name of the host network interface the VM is attached to.
10973 </desc>
10974 </attribute>
10975
10976 <attribute name="internalNetwork" type="wstring">
10977 <desc>
10978 Name of the internal network the VM is attached to.
10979 </desc>
10980 </attribute>
10981
10982 <attribute name="NATNetwork" type="wstring">
10983 <desc>
10984 Name of the NAT network the VM is attached to.
10985 </desc>
10986 </attribute>
10987
10988 <attribute name="VDENetwork" type="wstring">
10989 <desc>
10990 Name of the VDE switch the VM is attached to.
10991 </desc>
10992 </attribute>
10993
10994 <attribute name="cableConnected" type="boolean">
10995 <desc>
10996 Flag whether the adapter reports the cable as connected or not.
10997 It can be used to report offline situations to a VM.
10998 </desc>
10999 </attribute>
11000
11001 <attribute name="lineSpeed" type="unsigned long">
11002 <desc>
11003 Line speed reported by custom drivers, in units of 1 kbps.
11004 </desc>
11005 </attribute>
11006
11007 <attribute name="traceEnabled" type="boolean">
11008 <desc>
11009 Flag whether network traffic from/to the network card should be traced.
11010 Can only be toggled when the VM is turned off.
11011 </desc>
11012 </attribute>
11013
11014 <attribute name="traceFile" type="wstring">
11015 <desc>
11016 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11017 will be used.
11018 </desc>
11019 </attribute>
11020
11021 <attribute name="natDriver" type="INATEngine" readonly="yes">
11022 <desc>
11023 Points to the NAT engine which handles the network address translation
11024 for this interface. This is active only when the interface actually uses
11025 NAT (see <link to="#attachToNAT" />).
11026 </desc>
11027 </attribute>
11028
11029 <attribute name="bootPriority" type="unsigned long">
11030 <desc>
11031 Network boot priority of the adapter. Priority 1 is highest. If not set,
11032 the priority is considered to be at the lowest possible setting.
11033 </desc>
11034 </attribute>
11035
11036 <attribute name="bandwidthLimit" type="unsigned long">
11037 <desc>
11038 Maximum throughput allowed for this network adapter, in units of 1 mbps.
11039 A zero value means uncapped/unlimited.
11040 </desc>
11041 </attribute>
11042
11043 <method name="attachToNAT">
11044 <desc>
11045 Attach the network adapter to the Network Address Translation (NAT) interface.
11046 </desc>
11047 </method>
11048
11049 <method name="attachToBridgedInterface">
11050 <desc>
11051 Attach the network adapter to a bridged host interface.
11052 </desc>
11053 </method>
11054
11055 <method name="attachToInternalNetwork">
11056 <desc>
11057 Attach the network adapter to an internal network.
11058 </desc>
11059 </method>
11060
11061 <method name="attachToHostOnlyInterface">
11062 <desc>
11063 Attach the network adapter to the host-only network.
11064 </desc>
11065 </method>
11066
11067 <method name="attachToVDE">
11068 <desc>
11069 Attach the network adapter to a VDE network.
11070 </desc>
11071 </method>
11072
11073 <method name="detach">
11074 <desc>
11075 Detach the network adapter
11076 </desc>
11077 </method>
11078 </interface>
11079
11080
11081 <!--
11082 // ISerialPort
11083 /////////////////////////////////////////////////////////////////////////
11084 -->
11085
11086 <enum
11087 name="PortMode"
11088 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11089 >
11090 <desc>
11091 The PortMode enumeration represents possible communication modes for
11092 the virtual serial port device.
11093 </desc>
11094
11095 <const name="Disconnected" value="0">
11096 <desc>Virtual device is not attached to any real host device.</desc>
11097 </const>
11098 <const name="HostPipe" value="1">
11099 <desc>Virtual device is attached to a host pipe.</desc>
11100 </const>
11101 <const name="HostDevice" value="2">
11102 <desc>Virtual device is attached to a host device.</desc>
11103 </const>
11104 <const name="RawFile" value="3">
11105 <desc>Virtual device is attached to a raw file.</desc>
11106 </const>
11107 </enum>
11108
11109 <interface
11110 name="ISerialPort" extends="$unknown"
11111 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11112 wsmap="managed"
11113 >
11114
11115 <desc>
11116 The ISerialPort interface represents the virtual serial port device.
11117
11118 The virtual serial port device acts like an ordinary serial port
11119 inside the virtual machine. This device communicates to the real
11120 serial port hardware in one of two modes: host pipe or host device.
11121
11122 In host pipe mode, the #path attribute specifies the path to the pipe on
11123 the host computer that represents a serial port. The #server attribute
11124 determines if this pipe is created by the virtual machine process at
11125 machine startup or it must already exist before starting machine
11126 execution.
11127
11128 In host device mode, the #path attribute specifies the name of the
11129 serial port device on the host computer.
11130
11131 There is also a third communication mode: the disconnected mode. In this
11132 mode, the guest OS running inside the virtual machine will be able to
11133 detect the serial port, but all port write operations will be discarded
11134 and all port read operations will return no data.
11135
11136 <see>IMachine::getSerialPort</see>
11137 </desc>
11138
11139 <attribute name="slot" type="unsigned long" readonly="yes">
11140 <desc>
11141 Slot number this serial port is plugged into. Corresponds to
11142 the value you pass to <link to="IMachine::getSerialPort"/>
11143 to obtain this instance.
11144 </desc>
11145 </attribute>
11146
11147 <attribute name="enabled" type="boolean">
11148 <desc>
11149 Flag whether the serial port is enabled. If disabled,
11150 the serial port will not be reported to the guest OS.
11151 </desc>
11152 </attribute>
11153
11154 <attribute name="IOBase" type="unsigned long">
11155 <desc>Base I/O address of the serial port.</desc>
11156 </attribute>
11157
11158 <attribute name="IRQ" type="unsigned long">
11159 <desc>IRQ number of the serial port.</desc>
11160 </attribute>
11161
11162 <attribute name="hostMode" type="PortMode">
11163 <desc>
11164 How is this port connected to the host.
11165 <note>
11166 Changing this attribute may fail if the conditions for
11167 <link to="#path"/> are not met.
11168 </note>
11169 </desc>
11170 </attribute>
11171
11172 <attribute name="server" type="boolean">
11173 <desc>
11174 Flag whether this serial port acts as a server (creates a new pipe on
11175 the host) or as a client (uses the existing pipe). This attribute is
11176 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11177 </desc>
11178 </attribute>
11179
11180 <attribute name="path" type="wstring">
11181 <desc>
11182 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11183 PortMode_HostPipe, or the host serial device name when
11184 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11185 cases, setting a @c null or empty string as the attribute's value
11186 is an error. Otherwise, the value of this property is ignored.
11187 </desc>
11188 </attribute>
11189
11190 </interface>
11191
11192 <!--
11193 // IParallelPort
11194 /////////////////////////////////////////////////////////////////////////
11195 -->
11196
11197 <interface
11198 name="IParallelPort" extends="$unknown"
11199 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11200 wsmap="managed"
11201 >
11202
11203 <desc>
11204 The IParallelPort interface represents the virtual parallel port device.
11205
11206 The virtual parallel port device acts like an ordinary parallel port
11207 inside the virtual machine. This device communicates to the real
11208 parallel port hardware using the name of the parallel device on the host
11209 computer specified in the #path attribute.
11210
11211 Each virtual parallel port device is assigned a base I/O address and an
11212 IRQ number that will be reported to the guest operating system and used
11213 to operate the given parallel port from within the virtual machine.
11214
11215 <see>IMachine::getParallelPort</see>
11216 </desc>
11217
11218 <attribute name="slot" type="unsigned long" readonly="yes">
11219 <desc>
11220 Slot number this parallel port is plugged into. Corresponds to
11221 the value you pass to <link to="IMachine::getParallelPort"/>
11222 to obtain this instance.
11223 </desc>
11224 </attribute>
11225
11226 <attribute name="enabled" type="boolean">
11227 <desc>
11228 Flag whether the parallel port is enabled. If disabled,
11229 the parallel port will not be reported to the guest OS.
11230 </desc>
11231 </attribute>
11232
11233 <attribute name="IOBase" type="unsigned long">
11234 <desc>Base I/O address of the parallel port.</desc>
11235 </attribute>
11236
11237 <attribute name="IRQ" type="unsigned long">
11238 <desc>IRQ number of the parallel port.</desc>
11239 </attribute>
11240
11241 <attribute name="path" type="wstring">
11242 <desc>
11243 Host parallel device name. If this parallel port is enabled, setting a
11244 @c null or an empty string as this attribute's value will result into
11245 an error.
11246 </desc>
11247 </attribute>
11248
11249 </interface>
11250
11251
11252 <!--
11253 // IMachineDebugger
11254 /////////////////////////////////////////////////////////////////////////
11255 -->
11256
11257 <interface
11258 name="IMachineDebugger" extends="$unknown"
11259 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11260 wsmap="suppress"
11261 >
11262 <method name="resetStats">
11263 <desc>
11264 Reset VM statistics.
11265 </desc>
11266 <param name="pattern" type="wstring" dir="in">
11267 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11268 </param>
11269 </method>
11270
11271 <method name="dumpStats">
11272 <desc>
11273 Dumps VM statistics.
11274 </desc>
11275 <param name="pattern" type="wstring" dir="in">
11276 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11277 </param>
11278 </method>
11279
11280 <method name="getStats">
11281 <desc>
11282 Get the VM statistics in a XMLish format.
11283 </desc>
11284 <param name="pattern" type="wstring" dir="in">
11285 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11286 </param>
11287 <param name="withDescriptions" type="boolean" dir="in">
11288 <desc>Whether to include the descriptions.</desc>
11289 </param>
11290 <param name="stats" type="wstring" dir="out">
11291 <desc>The XML document containing the statistics.</desc>
11292 </param>
11293 </method>
11294
11295 <method name="injectNMI">
11296 <desc>
11297 Inject an NMI into a running VT-x/AMD-V VM.
11298 </desc>
11299 </method>
11300
11301 <attribute name="singlestep" type="boolean">
11302 <desc>Switch for enabling singlestepping.</desc>
11303 </attribute>
11304
11305 <attribute name="recompileUser" type="boolean">
11306 <desc>Switch for forcing code recompilation for user mode code.</desc>
11307 </attribute>
11308
11309 <attribute name="recompileSupervisor" type="boolean">
11310 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11311 </attribute>
11312
11313 <attribute name="PATMEnabled" type="boolean">
11314 <desc>Switch for enabling and disabling the PATM component.</desc>
11315 </attribute>
11316
11317 <attribute name="CSAMEnabled" type="boolean">
11318 <desc>Switch for enabling and disabling the CSAM component.</desc>
11319 </attribute>
11320
11321 <attribute name="logEnabled" type="boolean">
11322 <desc>Switch for enabling and disabling logging.</desc>
11323 </attribute>
11324
11325 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11326 <desc>
11327 Flag indicating whether the VM is currently making use of CPU hardware
11328 virtualization extensions.
11329 </desc>
11330 </attribute>
11331
11332 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11333 <desc>
11334 Flag indicating whether the VM is currently making use of the nested paging
11335 CPU hardware virtualization extension.
11336 </desc>
11337 </attribute>
11338
11339 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11340 <desc>
11341 Flag indicating whether the VM is currently making use of the VPID
11342 VT-x extension.
11343 </desc>
11344 </attribute>
11345
11346 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11347 <desc>
11348 Flag indicating whether the VM is currently making use of the Physical
11349 Address Extension CPU feature.
11350 </desc>
11351 </attribute>
11352
11353 <attribute name="virtualTimeRate" type="unsigned long">
11354 <desc>
11355 The rate at which the virtual time runs expressed as a percentage.
11356 The accepted range is 2% to 20000%.
11357 </desc>
11358 </attribute>
11359
11360 <!-- @todo method for setting log flags, groups and destination! -->
11361
11362 <attribute name="VM" type="unsigned long long" readonly="yes">
11363 <desc>
11364 Gets the VM handle. This is only for internal use while
11365 we carve the details of this interface.
11366 </desc>
11367 </attribute>
11368
11369 </interface>
11370
11371 <!--
11372 // IUSBController
11373 /////////////////////////////////////////////////////////////////////////
11374 -->
11375
11376 <interface
11377 name="IUSBController" extends="$unknown"
11378 uuid="6fdcccc5-abd3-4fec-9387-2ad3914fc4a8"
11379 wsmap="managed"
11380 >
11381 <attribute name="enabled" type="boolean">
11382 <desc>
11383 Flag whether the USB controller is present in the
11384 guest system. If disabled, the virtual guest hardware will
11385 not contain any USB controller. Can only be changed when
11386 the VM is powered off.
11387 </desc>
11388 </attribute>
11389
11390 <attribute name="enabledEhci" type="boolean">
11391 <desc>
11392 Flag whether the USB EHCI controller is present in the
11393 guest system. If disabled, the virtual guest hardware will
11394 not contain a USB EHCI controller. Can only be changed when
11395 the VM is powered off.
11396 </desc>
11397 </attribute>
11398
11399 <attribute name="proxyAvailable" type="boolean" readonly="yes">
11400 <desc>
11401 Flag whether there is an USB proxy available.
11402 </desc>
11403 </attribute>
11404
11405 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11406 <desc>
11407 USB standard version which the controller implements.
11408 This is a BCD which means that the major version is in the
11409 high byte and minor version is in the low byte.
11410 </desc>
11411 </attribute>
11412
11413 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11414 <desc>
11415 List of USB device filters associated with the machine.
11416
11417 If the machine is currently running, these filters are activated
11418 every time a new (supported) USB device is attached to the host
11419 computer that was not ignored by global filters
11420 (<link to="IHost::USBDeviceFilters"/>).
11421
11422 These filters are also activated when the machine is powered up.
11423 They are run against a list of all currently available USB
11424 devices (in states
11425 <link to="USBDeviceState::Available"/>,
11426 <link to="USBDeviceState::Busy"/>,
11427 <link to="USBDeviceState::Held"/>) that were not previously
11428 ignored by global filters.
11429
11430 If at least one filter matches the USB device in question, this
11431 device is automatically captured (attached to) the virtual USB
11432 controller of this machine.
11433
11434 <see>IUSBDeviceFilter, ::IUSBController</see>
11435 </desc>
11436 </attribute>
11437
11438 <method name="createDeviceFilter">
11439 <desc>
11440 Creates a new USB device filter. All attributes except
11441 the filter name are set to empty (any match),
11442 <i>active</i> is @c false (the filter is not active).
11443
11444 The created filter can then be added to the list of filters using
11445 <link to="#insertDeviceFilter"/>.
11446
11447 <result name="VBOX_E_INVALID_VM_STATE">
11448 The virtual machine is not mutable.
11449 </result>
11450
11451 <see>#deviceFilters</see>
11452 </desc>
11453 <param name="name" type="wstring" dir="in">
11454 <desc>
11455 Filter name. See <link to="IUSBDeviceFilter::name"/>
11456 for more info.
11457 </desc>
11458 </param>
11459 <param name="filter" type="IUSBDeviceFilter" dir="return">
11460 <desc>Created filter object.</desc>
11461 </param>
11462 </method>
11463
11464 <method name="insertDeviceFilter">
11465 <desc>
11466 Inserts the given USB device to the specified position
11467 in the list of filters.
11468
11469 Positions are numbered starting from <tt>0</tt>. If the specified
11470 position is equal to or greater than the number of elements in
11471 the list, the filter is added to the end of the collection.
11472
11473 <note>
11474 Duplicates are not allowed, so an attempt to insert a
11475 filter that is already in the collection, will return an
11476 error.
11477 </note>
11478
11479 <result name="VBOX_E_INVALID_VM_STATE">
11480 Virtual machine is not mutable.
11481 </result>
11482 <result name="E_INVALIDARG">
11483 USB device filter not created within this VirtualBox instance.
11484 </result>
11485 <result name="VBOX_E_INVALID_OBJECT_STATE">
11486 USB device filter already in list.
11487 </result>
11488
11489 <see>#deviceFilters</see>
11490 </desc>
11491 <param name="position" type="unsigned long" dir="in">
11492 <desc>Position to insert the filter to.</desc>
11493 </param>
11494 <param name="filter" type="IUSBDeviceFilter" dir="in">
11495 <desc>USB device filter to insert.</desc>
11496 </param>
11497 </method>
11498
11499 <method name="removeDeviceFilter">
11500 <desc>
11501 Removes a USB device filter from the specified position in the
11502 list of filters.
11503
11504 Positions are numbered starting from <tt>0</tt>. Specifying a
11505 position equal to or greater than the number of elements in
11506 the list will produce an error.
11507
11508 <see>#deviceFilters</see>
11509
11510 <result name="VBOX_E_INVALID_VM_STATE">
11511 Virtual machine is not mutable.
11512 </result>
11513 <result name="E_INVALIDARG">
11514 USB device filter list empty or invalid @a position.
11515 </result>
11516
11517 </desc>
11518 <param name="position" type="unsigned long" dir="in">
11519 <desc>Position to remove the filter from.</desc>
11520 </param>
11521 <param name="filter" type="IUSBDeviceFilter" dir="return">
11522 <desc>Removed USB device filter.</desc>
11523 </param>
11524 </method>
11525
11526 </interface>
11527
11528
11529 <!--
11530 // IUSBDevice
11531 /////////////////////////////////////////////////////////////////////////
11532 -->
11533
11534 <interface
11535 name="IUSBDevice" extends="$unknown"
11536 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11537 wsmap="managed"
11538 >
11539 <desc>
11540 The IUSBDevice interface represents a virtual USB device attached to the
11541 virtual machine.
11542
11543 A collection of objects implementing this interface is stored in the
11544 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11545 attached to a running virtual machine's USB controller.
11546 </desc>
11547
11548 <attribute name="id" type="uuid" mod="string" readonly="yes">
11549 <desc>
11550 Unique USB device ID. This ID is built from #vendorId,
11551 #productId, #revision and #serialNumber.
11552 </desc>
11553 </attribute>
11554
11555 <attribute name="vendorId" type="unsigned short" readonly="yes">
11556 <desc>Vendor ID.</desc>
11557 </attribute>
11558
11559 <attribute name="productId" type="unsigned short" readonly="yes">
11560 <desc>Product ID.</desc>
11561 </attribute>
11562
11563 <attribute name="revision" type="unsigned short" readonly="yes">
11564 <desc>
11565 Product revision number. This is a packed BCD represented as
11566 unsigned short. The high byte is the integer part and the low
11567 byte is the decimal.
11568 </desc>
11569 </attribute>
11570
11571 <attribute name="manufacturer" type="wstring" readonly="yes">
11572 <desc>Manufacturer string.</desc>
11573 </attribute>
11574
11575 <attribute name="product" type="wstring" readonly="yes">
11576 <desc>Product string.</desc>
11577 </attribute>
11578
11579 <attribute name="serialNumber" type="wstring" readonly="yes">
11580 <desc>Serial number string.</desc>
11581 </attribute>
11582
11583 <attribute name="address" type="wstring" readonly="yes">
11584 <desc>Host specific address of the device.</desc>
11585 </attribute>
11586
11587 <attribute name="port" type="unsigned short" readonly="yes">
11588 <desc>
11589 Host USB port number the device is physically
11590 connected to.
11591 </desc>
11592 </attribute>
11593
11594 <attribute name="version" type="unsigned short" readonly="yes">
11595 <desc>
11596 The major USB version of the device - 1 or 2.
11597 </desc>
11598 </attribute>
11599
11600 <attribute name="portVersion" type="unsigned short" readonly="yes">
11601 <desc>
11602 The major USB version of the host USB port the device is
11603 physically connected to - 1 or 2. For devices not connected to
11604 anything this will have the same value as the version attribute.
11605 </desc>
11606 </attribute>
11607
11608 <attribute name="remote" type="boolean" readonly="yes">
11609 <desc>
11610 Whether the device is physically connected to a remote VRDP
11611 client or to a local host machine.
11612 </desc>
11613 </attribute>
11614
11615 </interface>
11616
11617
11618 <!--
11619 // IUSBDeviceFilter
11620 /////////////////////////////////////////////////////////////////////////
11621 -->
11622
11623 <interface
11624 name="IUSBDeviceFilter" extends="$unknown"
11625 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11626 wsmap="managed"
11627 >
11628 <desc>
11629 The IUSBDeviceFilter interface represents an USB device filter used
11630 to perform actions on a group of USB devices.
11631
11632 This type of filters is used by running virtual machines to
11633 automatically capture selected USB devices once they are physically
11634 attached to the host computer.
11635
11636 A USB device is matched to the given device filter if and only if all
11637 attributes of the device match the corresponding attributes of the
11638 filter (that is, attributes are joined together using the logical AND
11639 operation). On the other hand, all together, filters in the list of
11640 filters carry the semantics of the logical OR operation. So if it is
11641 desirable to create a match like "this vendor id OR this product id",
11642 one needs to create two filters and specify "any match" (see below)
11643 for unused attributes.
11644
11645 All filter attributes used for matching are strings. Each string
11646 is an expression representing a set of values of the corresponding
11647 device attribute, that will match the given filter. Currently, the
11648 following filtering expressions are supported:
11649
11650 <ul>
11651 <li><i>Interval filters</i>. Used to specify valid intervals for
11652 integer device attributes (Vendor ID, Product ID and Revision).
11653 The format of the string is:
11654
11655 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11656
11657 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11658 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11659 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11660 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11661 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11662 possible integer is assumed.
11663 </li>
11664 <li><i>Boolean filters</i>. Used to specify acceptable values for
11665 boolean device attributes. The format of the string is:
11666
11667 <tt>true|false|yes|no|0|1</tt>
11668
11669 </li>
11670 <li><i>Exact match</i>. Used to specify a single value for the given
11671 device attribute. Any string that doesn't start with <tt>int:</tt>
11672 represents the exact match. String device attributes are compared to
11673 this string including case of symbols. Integer attributes are first
11674 converted to a string (see individual filter attributes) and then
11675 compared ignoring case.
11676
11677 </li>
11678 <li><i>Any match</i>. Any value of the corresponding device attribute
11679 will match the given filter. An empty or @c null string is
11680 used to construct this type of filtering expressions.
11681
11682 </li>
11683 </ul>
11684
11685 <note>
11686 On the Windows host platform, interval filters are not currently
11687 available. Also all string filter attributes
11688 (<link to="#manufacturer"/>, <link to="#product"/>,
11689 <link to="#serialNumber"/>) are ignored, so they behave as
11690 <i>any match</i> no matter what string expression is specified.
11691 </note>
11692
11693 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11694 </desc>
11695
11696 <attribute name="name" type="wstring">
11697 <desc>
11698 Visible name for this filter.
11699 This name is used to visually distinguish one filter from another,
11700 so it can neither be @c null nor an empty string.
11701 </desc>
11702 </attribute>
11703
11704 <attribute name="active" type="boolean">
11705 <desc>Whether this filter active or has been temporarily disabled.</desc>
11706 </attribute>
11707
11708 <attribute name="vendorId" type="wstring">
11709 <desc>
11710 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11711 The string representation for the <i>exact matching</i>
11712 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11713 (including leading zeroes).
11714 </desc>
11715 </attribute>
11716
11717 <attribute name="productId" type="wstring">
11718 <desc>
11719 <link to="IUSBDevice::productId">Product ID</link> filter.
11720 The string representation for the <i>exact matching</i>
11721 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11722 (including leading zeroes).
11723 </desc>
11724 </attribute>
11725
11726 <attribute name="revision" type="wstring">
11727 <desc>
11728 <link to="IUSBDevice::productId">Product revision number</link>
11729 filter. The string representation for the <i>exact matching</i>
11730 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11731 of the integer part of the revision, and <tt>F</tt> is the
11732 decimal digit of its fractional part (including leading and
11733 trailing zeros).
11734 Note that for interval filters, it's best to use the hexadecimal
11735 form, because the revision is stored as a 16 bit packed BCD value;
11736 so the expression <tt>int:0x0100-0x0199</tt> will match any
11737 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11738 </desc>
11739 </attribute>
11740
11741 <attribute name="manufacturer" type="wstring">
11742 <desc>
11743 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11744 </desc>
11745 </attribute>
11746
11747 <attribute name="product" type="wstring">
11748 <desc>
11749 <link to="IUSBDevice::product">Product</link> filter.
11750 </desc>
11751 </attribute>
11752
11753 <attribute name="serialNumber" type="wstring">
11754 <desc>
11755 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11756 </desc>
11757 </attribute>
11758
11759 <attribute name="port" type="wstring">
11760 <desc>
11761 <link to="IUSBDevice::port">Host USB port</link> filter.
11762 </desc>
11763 </attribute>
11764
11765 <attribute name="remote" type="wstring">
11766 <desc>
11767 <link to="IUSBDevice::remote">Remote state</link> filter.
11768 <note>
11769 This filter makes sense only for machine USB filters,
11770 i.e. it is ignored by IHostUSBDeviceFilter objects.
11771 </note>
11772 </desc>
11773 </attribute>
11774
11775 <attribute name="maskedInterfaces" type="unsigned long">
11776 <desc>
11777 This is an advanced option for hiding one or more USB interfaces
11778 from the guest. The value is a bit mask where the bits that are set
11779 means the corresponding USB interface should be hidden, masked off
11780 if you like.
11781 This feature only works on Linux hosts.
11782 </desc>
11783 </attribute>
11784
11785 </interface>
11786
11787
11788 <!--
11789 // IHostUSBDevice
11790 /////////////////////////////////////////////////////////////////////////
11791 -->
11792
11793 <enum
11794 name="USBDeviceState"
11795 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11796 >
11797 <desc>
11798 USB device state. This enumeration represents all possible states
11799 of the USB device physically attached to the host computer regarding
11800 its state on the host computer and availability to guest computers
11801 (all currently running virtual machines).
11802
11803 Once a supported USB device is attached to the host, global USB
11804 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11805 either ignore the device, or put it to USBDeviceState_Held state, or do
11806 nothing. Unless the device is ignored by global filters, filters of all
11807 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11808 activated that can put it to USBDeviceState_Captured state.
11809
11810 If the device was ignored by global filters, or didn't match
11811 any filters at all (including guest ones), it is handled by the host
11812 in a normal way. In this case, the device state is determined by
11813 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11814 or USBDeviceState_Available, depending on the current device usage.
11815
11816 Besides auto-capturing based on filters, the device can be manually
11817 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11818 state is USBDeviceState_Busy, USBDeviceState_Available or
11819 USBDeviceState_Held.
11820
11821 <note>
11822 Due to differences in USB stack implementations in Linux and Win32,
11823 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11824 only to the Linux version of the product. This also means that (<link
11825 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11826 device state is USBDeviceState_Held.
11827 </note>
11828
11829 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11830 </desc>
11831
11832 <const name="NotSupported" value="0">
11833 <desc>
11834 Not supported by the VirtualBox server, not available to guests.
11835 </desc>
11836 </const>
11837 <const name="Unavailable" value="1">
11838 <desc>
11839 Being used by the host computer exclusively,
11840 not available to guests.
11841 </desc>
11842 </const>
11843 <const name="Busy" value="2">
11844 <desc>
11845 Being used by the host computer, potentially available to guests.
11846 </desc>
11847 </const>
11848 <const name="Available" value="3">
11849 <desc>
11850 Not used by the host computer, available to guests (the host computer
11851 can also start using the device at any time).
11852 </desc>
11853 </const>
11854 <const name="Held" value="4">
11855 <desc>
11856 Held by the VirtualBox server (ignored by the host computer),
11857 available to guests.
11858 </desc>
11859 </const>
11860 <const name="Captured" value="5">
11861 <desc>
11862 Captured by one of the guest computers, not available
11863 to anybody else.
11864 </desc>
11865 </const>
11866 </enum>
11867
11868 <interface
11869 name="IHostUSBDevice" extends="IUSBDevice"
11870 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11871 wsmap="managed"
11872 >
11873 <desc>
11874 The IHostUSBDevice interface represents a physical USB device attached
11875 to the host computer.
11876
11877 Besides properties inherited from IUSBDevice, this interface adds the
11878 <link to="#state"/> property that holds the current state of the USB
11879 device.
11880
11881 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11882 </desc>
11883
11884 <attribute name="state" type="USBDeviceState" readonly="yes">
11885 <desc>
11886 Current state of the device.
11887 </desc>
11888 </attribute>
11889
11890 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11891
11892 </interface>
11893
11894
11895 <!--
11896 // IHostUSBDeviceFilter
11897 /////////////////////////////////////////////////////////////////////////
11898 -->
11899
11900 <enum
11901 name="USBDeviceFilterAction"
11902 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11903 >
11904 <desc>
11905 Actions for host USB device filters.
11906 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11907 </desc>
11908
11909 <const name="Null" value="0">
11910 <desc>Null value (never used by the API).</desc>
11911 </const>
11912 <const name="Ignore" value="1">
11913 <desc>Ignore the matched USB device.</desc>
11914 </const>
11915 <const name="Hold" value="2">
11916 <desc>Hold the matched USB device.</desc>
11917 </const>
11918 </enum>
11919
11920 <interface
11921 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11922 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11923 wsmap="managed"
11924 >
11925 <desc>
11926 The IHostUSBDeviceFilter interface represents a global filter for a
11927 physical USB device used by the host computer. Used indirectly in
11928 <link to="IHost::USBDeviceFilters"/>.
11929
11930 Using filters of this type, the host computer determines the initial
11931 state of the USB device after it is physically attached to the
11932 host's USB controller.
11933
11934 <note>
11935 The <link to="IUSBDeviceFilter::remote"/> attribute is ignored by this type of
11936 filters, because it makes sense only for
11937 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11938 </note>
11939
11940 <see>IHost::USBDeviceFilters</see>
11941 </desc>
11942
11943 <attribute name="action" type="USBDeviceFilterAction">
11944 <desc>
11945 Action performed by the host when an attached USB device
11946 matches this filter.
11947 </desc>
11948 </attribute>
11949
11950 </interface>
11951
11952 <!--
11953 // IAudioAdapter
11954 /////////////////////////////////////////////////////////////////////////
11955 -->
11956
11957 <enum
11958 name="AudioDriverType"
11959 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11960 >
11961 <desc>
11962 Host audio driver type.
11963 </desc>
11964
11965 <const name="Null" value="0">
11966 <desc>Null value, also means "dummy audio driver".</desc>
11967 </const>
11968 <const name="WinMM" value="1">
11969 <desc>Windows multimedia (Windows hosts only).</desc>
11970 </const>
11971 <const name="OSS" value="2">
11972 <desc>Open Sound System (Linux hosts only).</desc>
11973 </const>
11974 <const name="ALSA" value="3">
11975 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
11976 </const>
11977 <const name="DirectSound" value="4">
11978 <desc>DirectSound (Windows hosts only).</desc>
11979 </const>
11980 <const name="CoreAudio" value="5">
11981 <desc>CoreAudio (Mac hosts only).</desc>
11982 </const>
11983 <const name="MMPM" value="6">
11984 <desc>Reserved for historical reasons.</desc>
11985 </const>
11986 <const name="Pulse" value="7">
11987 <desc>PulseAudio (Linux hosts only).</desc>
11988 </const>
11989 <const name="SolAudio" value="8">
11990 <desc>Solaris audio (Solaris hosts only).</desc>
11991 </const>
11992 </enum>
11993
11994 <enum
11995 name="AudioControllerType"
11996 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11997 >
11998 <desc>
11999 Virtual audio controller type.
12000 </desc>
12001
12002 <const name="AC97" value="0"/>
12003 <const name="SB16" value="1"/>
12004 <const name="HDA" value="2"/>
12005 </enum>
12006
12007 <interface
12008 name="IAudioAdapter" extends="$unknown"
12009 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
12010 wsmap="managed"
12011 >
12012 <desc>
12013 The IAudioAdapter interface represents the virtual audio adapter of
12014 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
12015 </desc>
12016 <attribute name="enabled" type="boolean">
12017 <desc>
12018 Flag whether the audio adapter is present in the
12019 guest system. If disabled, the virtual guest hardware will
12020 not contain any audio adapter. Can only be changed when
12021 the VM is not running.
12022 </desc>
12023 </attribute>
12024 <attribute name="audioController" type="AudioControllerType">
12025 <desc>
12026 The audio hardware we emulate.
12027 </desc>
12028 </attribute>
12029 <attribute name="audioDriver" type="AudioDriverType">
12030 <desc>
12031 Audio driver the adapter is connected to. This setting
12032 can only be changed when the VM is not running.
12033 </desc>
12034 </attribute>
12035 </interface>
12036
12037 <!--
12038 // IVRDPServer
12039 /////////////////////////////////////////////////////////////////////////
12040 -->
12041
12042 <enum
12043 name="VRDPAuthType"
12044 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
12045 >
12046 <desc>
12047 VRDP authentication type.
12048 </desc>
12049
12050 <const name="Null" value="0">
12051 <desc>Null value, also means "no authentication".</desc>
12052 </const>
12053 <const name="External" value="1"/>
12054 <const name="Guest" value="2"/>
12055 </enum>
12056
12057 <interface
12058 name="IVRDPServer" extends="$unknown"
12059 uuid="7aeeb530-0b08-41fe-835d-9be9ec1dbe5c"
12060 wsmap="managed"
12061 >
12062 <attribute name="enabled" type="boolean">
12063 <desc>VRDP server status.</desc>
12064 </attribute>
12065
12066 <attribute name="ports" type="wstring">
12067 <desc>
12068 VRDP server port numbers. The server will try to bind to one of free ports from the list.
12069 <note>
12070 This is a string of comma separated TCP port numbers or port number ranges.
12071 Example <tt>5000,5010-5012,5015</tt>
12072 </note>
12073 </desc>
12074 </attribute>
12075
12076 <attribute name="netAddress" type="wstring">
12077 <desc>VRDP server address.</desc>
12078 </attribute>
12079
12080 <attribute name="authType" type="VRDPAuthType">
12081 <desc>VRDP authentication method.</desc>
12082 </attribute>
12083
12084 <attribute name="authTimeout" type="unsigned long">
12085 <desc>Timeout for guest authentication. Milliseconds.</desc>
12086 </attribute>
12087
12088 <attribute name="allowMultiConnection" type="boolean">
12089 <desc>
12090 Flag whether multiple simultaneous connections to the VM are permitted.
12091 Note that this will be replaced by a more powerful mechanism in the future.
12092 </desc>
12093 </attribute>
12094
12095 <attribute name="reuseSingleConnection" type="boolean">
12096 <desc>
12097 Flag whether the existing connection must be dropped and a new connection
12098 must be established by the VRDP server, when a new client connects in single
12099 connection mode.
12100 </desc>
12101 </attribute>
12102
12103 <attribute name="videoChannel" type="boolean">
12104 <desc>
12105 Flag whether RDP video channel is supported.
12106 </desc>
12107 </attribute>
12108
12109 <attribute name="videoChannelQuality" type="unsigned long">
12110 <desc>
12111 Image quality in percents.
12112 </desc>
12113 </attribute>
12114
12115 </interface>
12116
12117
12118 <!--
12119 // ISharedFolder
12120 /////////////////////////////////////////////////////////////////////////
12121 -->
12122
12123 <interface
12124 name="ISharedFolder" extends="$unknown"
12125 uuid="8388da11-b559-4574-a5b7-2bd7acd5cef8"
12126 wsmap="struct"
12127 >
12128 <desc>
12129 The ISharedFolder interface represents a folder in the host computer's
12130 file system accessible from the guest OS running inside a virtual
12131 machine using an associated logical name.
12132
12133 There are three types of shared folders:
12134 <ul>
12135 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12136 folders available to all virtual machines.</li>
12137 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12138 VM-specific shared folders available to the given virtual machine at
12139 startup.</li>
12140 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12141 VM-specific shared folders created in the session context (for
12142 example, when the virtual machine is running) and automatically
12143 discarded when the session is closed (the VM is powered off).</li>
12144 </ul>
12145
12146 Logical names of shared folders must be unique within the given scope
12147 (global, permanent or transient). However, they do not need to be unique
12148 across scopes. In this case, the definition of the shared folder in a
12149 more specific scope takes precedence over definitions in all other
12150 scopes. The order of precedence is (more specific to more general):
12151 <ol>
12152 <li>Transient definitions</li>
12153 <li>Permanent definitions</li>
12154 <li>Global definitions</li>
12155 </ol>
12156
12157 For example, if MyMachine has a shared folder named
12158 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12159 transient shared folder named <tt>C_DRIVE</tt> (that points
12160 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12161 of <tt>C_DRIVE</tt> in the guest OS so
12162 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12163 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12164 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12165 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12166 to <tt>C:\\</tt> if it still exists.
12167
12168 Note that permanent and transient shared folders of different machines
12169 are in different name spaces, so they don't overlap and don't need to
12170 have unique logical names.
12171
12172 <note>
12173 Global shared folders are not implemented in the current version of the
12174 product.
12175 </note>
12176 </desc>
12177
12178 <attribute name="name" type="wstring" readonly="yes">
12179 <desc>Logical name of the shared folder.</desc>
12180 </attribute>
12181
12182 <attribute name="hostPath" type="wstring" readonly="yes">
12183 <desc>Full path to the shared folder in the host file system.</desc>
12184 </attribute>
12185
12186 <attribute name="accessible" type="boolean" readonly="yes">
12187 <desc>
12188 Whether the folder defined by the host path is currently
12189 accessible or not.
12190 For example, the folder can be unaccessible if it is placed
12191 on the network share that is not available by the time
12192 this property is read.
12193 </desc>
12194 </attribute>
12195
12196 <attribute name="writable" type="boolean" readonly="yes">
12197 <desc>
12198 Whether the folder defined by the host path is writable or
12199 not.
12200 </desc>
12201 </attribute>
12202
12203 <attribute name="autoMount" type="boolean" readonly="yes">
12204 <desc>
12205 Whether the folder gets automatically mounted by the guest or not.
12206 </desc>
12207 </attribute>
12208
12209 <attribute name="lastAccessError" type="wstring" readonly="yes">
12210 <desc>
12211 Text message that represents the result of the last accessibility
12212 check.
12213
12214 Accessibility checks are performed each time the <link to="#accessible"/>
12215 attribute is read. An empty string is returned if the last
12216 accessibility check was successful. A non-empty string indicates a
12217 failure and should normally describe a reason of the failure (for
12218 example, a file read error).
12219 </desc>
12220 </attribute>
12221
12222 </interface>
12223
12224 <!--
12225 // ISession
12226 /////////////////////////////////////////////////////////////////////////
12227 -->
12228
12229 <interface
12230 name="IInternalSessionControl" extends="$unknown"
12231 uuid="ef059f1d-2273-4f81-9342-c152a0d2cd40"
12232 internal="yes"
12233 wsmap="suppress"
12234 >
12235 <method name="getPID">
12236 <desc>PID of the process that has created this Session object.
12237 </desc>
12238 <param name="pid" type="unsigned long" dir="return"/>
12239 </method>
12240
12241 <method name="getRemoteConsole">
12242 <desc>
12243 Returns the console object suitable for remote control.
12244
12245 <result name="VBOX_E_INVALID_VM_STATE">
12246 Session state prevents operation.
12247 </result>
12248 <result name="VBOX_E_INVALID_OBJECT_STATE">
12249 Session type prevents operation.
12250 </result>
12251
12252 </desc>
12253 <param name="console" type="IConsole" dir="return"/>
12254 </method>
12255
12256 <method name="assignMachine">
12257 <desc>
12258 Assigns the machine object associated with this direct-type
12259 session or informs the session that it will be a remote one
12260 (if @a machine == @c null).
12261
12262 <result name="VBOX_E_INVALID_VM_STATE">
12263 Session state prevents operation.
12264 </result>
12265 <result name="VBOX_E_INVALID_OBJECT_STATE">
12266 Session type prevents operation.
12267 </result>
12268
12269 </desc>
12270 <param name="machine" type="IMachine" dir="in"/>
12271 </method>
12272
12273 <method name="assignRemoteMachine">
12274 <desc>
12275 Assigns the machine and the (remote) console object associated with
12276 this remote-type session.
12277
12278 <result name="VBOX_E_INVALID_VM_STATE">
12279 Session state prevents operation.
12280 </result>
12281
12282 </desc>
12283 <param name="machine" type="IMachine" dir="in"/>
12284 <param name="console" type="IConsole" dir="in"/>
12285 </method>
12286
12287 <method name="updateMachineState">
12288 <desc>
12289 Updates the machine state in the VM process.
12290 Must be called only in certain cases
12291 (see the method implementation).
12292
12293 <result name="VBOX_E_INVALID_VM_STATE">
12294 Session state prevents operation.
12295 </result>
12296 <result name="VBOX_E_INVALID_OBJECT_STATE">
12297 Session type prevents operation.
12298 </result>
12299
12300 </desc>
12301 <param name="aMachineState" type="MachineState" dir="in"/>
12302 </method>
12303
12304 <method name="uninitialize">
12305 <desc>
12306 Uninitializes (closes) this session. Used by VirtualBox to close
12307 the corresponding remote session when the direct session dies
12308 or gets closed.
12309
12310 <result name="VBOX_E_INVALID_VM_STATE">
12311 Session state prevents operation.
12312 </result>
12313
12314 </desc>
12315 </method>
12316
12317 <method name="onNetworkAdapterChange">
12318 <desc>
12319 Triggered when settings of a network adapter of the
12320 associated virtual machine have changed.
12321
12322 <result name="VBOX_E_INVALID_VM_STATE">
12323 Session state prevents operation.
12324 </result>
12325 <result name="VBOX_E_INVALID_OBJECT_STATE">
12326 Session type prevents operation.
12327 </result>
12328
12329 </desc>
12330 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12331 <param name="changeAdapter" type="boolean" dir="in"/>
12332 </method>
12333
12334 <method name="onSerialPortChange">
12335 <desc>
12336 Triggered when settings of a serial port of the
12337 associated virtual machine have changed.
12338
12339 <result name="VBOX_E_INVALID_VM_STATE">
12340 Session state prevents operation.
12341 </result>
12342 <result name="VBOX_E_INVALID_OBJECT_STATE">
12343 Session type prevents operation.
12344 </result>
12345
12346 </desc>
12347 <param name="serialPort" type="ISerialPort" dir="in"/>
12348 </method>
12349
12350 <method name="onParallelPortChange">
12351 <desc>
12352 Triggered when settings of a parallel port of the
12353 associated virtual machine have changed.
12354
12355 <result name="VBOX_E_INVALID_VM_STATE">
12356 Session state prevents operation.
12357 </result>
12358 <result name="VBOX_E_INVALID_OBJECT_STATE">
12359 Session type prevents operation.
12360 </result>
12361
12362 </desc>
12363 <param name="parallelPort" type="IParallelPort" dir="in"/>
12364 </method>
12365
12366 <method name="onStorageControllerChange">
12367 <desc>
12368 Triggered when settings of a storage controller of the
12369 associated virtual machine have changed.
12370
12371 <result name="VBOX_E_INVALID_VM_STATE">
12372 Session state prevents operation.
12373 </result>
12374 <result name="VBOX_E_INVALID_OBJECT_STATE">
12375 Session type prevents operation.
12376 </result>
12377
12378 </desc>
12379 </method>
12380
12381 <method name="onMediumChange">
12382 <desc>
12383 Triggered when attached media of the
12384 associated virtual machine have changed.
12385
12386 <result name="VBOX_E_INVALID_VM_STATE">
12387 Session state prevents operation.
12388 </result>
12389 <result name="VBOX_E_INVALID_OBJECT_STATE">
12390 Session type prevents operation.
12391 </result>
12392
12393 </desc>
12394
12395 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12396 <param name="force" type="boolean" dir="in"/>
12397 </method>
12398
12399 <method name="onCPUChange">
12400 <desc>
12401 Notification when a CPU changes.
12402 </desc>
12403 <param name="cpu" type="unsigned long" dir="in">
12404 <desc>The CPU which changed</desc>
12405 </param>
12406 <param name="add" type="boolean" dir="in">
12407 <desc>Flag whether the CPU was added or removed</desc>
12408 </param>
12409 </method>
12410
12411 <method name="onCPUPriorityChange">
12412 <desc>
12413 Notification when the CPU priority changes.
12414 </desc>
12415 <param name="priority" type="unsigned long" dir="in">
12416 <desc>The new CPU priority value. (1-100)</desc>
12417 </param>
12418 </method>
12419
12420 <method name="onVRDPServerChange">
12421 <desc>
12422 Triggered when settings of the VRDP server object of the
12423 associated virtual machine have changed.
12424
12425 <result name="VBOX_E_INVALID_VM_STATE">
12426 Session state prevents operation.
12427 </result>
12428 <result name="VBOX_E_INVALID_OBJECT_STATE">
12429 Session type prevents operation.
12430 </result>
12431
12432 </desc>
12433 <param name="restart" type="boolean" dir="in">
12434 <desc>Flag whether the server must be restarted</desc>
12435 </param>
12436 </method>
12437
12438 <method name="onUSBControllerChange">
12439 <desc>
12440 Triggered when settings of the USB controller object of the
12441 associated virtual machine have changed.
12442
12443 <result name="VBOX_E_INVALID_VM_STATE">
12444 Session state prevents operation.
12445 </result>
12446 <result name="VBOX_E_INVALID_OBJECT_STATE">
12447 Session type prevents operation.
12448 </result>
12449
12450 </desc>
12451 </method>
12452
12453 <method name="onSharedFolderChange">
12454 <desc>
12455 Triggered when a permanent (global or machine) shared folder has been
12456 created or removed.
12457 <note>
12458 We don't pass shared folder parameters in this notification because
12459 the order in which parallel notifications are delivered is not defined,
12460 therefore it could happen that these parameters were outdated by the
12461 time of processing this notification.
12462 </note>
12463
12464 <result name="VBOX_E_INVALID_VM_STATE">
12465 Session state prevents operation.
12466 </result>
12467 <result name="VBOX_E_INVALID_OBJECT_STATE">
12468 Session type prevents operation.
12469 </result>
12470
12471 </desc>
12472 <param name="global" type="boolean" dir="in"/>
12473 </method>
12474
12475 <method name="onUSBDeviceAttach">
12476 <desc>
12477 Triggered when a request to capture a USB device (as a result
12478 of matched USB filters or direct call to
12479 <link to="IConsole::attachUSBDevice"/>) has completed.
12480 A @c null @a error object means success, otherwise it
12481 describes a failure.
12482
12483 <result name="VBOX_E_INVALID_VM_STATE">
12484 Session state prevents operation.
12485 </result>
12486 <result name="VBOX_E_INVALID_OBJECT_STATE">
12487 Session type prevents operation.
12488 </result>
12489
12490 </desc>
12491 <param name="device" type="IUSBDevice" dir="in"/>
12492 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12493 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12494 </method>
12495
12496 <method name="onUSBDeviceDetach">
12497 <desc>
12498 Triggered when a request to release the USB device (as a result
12499 of machine termination or direct call to
12500 <link to="IConsole::detachUSBDevice"/>) has completed.
12501 A @c null @a error object means success, otherwise it
12502 describes a failure.
12503
12504 <result name="VBOX_E_INVALID_VM_STATE">
12505 Session state prevents operation.
12506 </result>
12507 <result name="VBOX_E_INVALID_OBJECT_STATE">
12508 Session type prevents operation.
12509 </result>
12510
12511 </desc>
12512 <param name="id" type="uuid" mod="string" dir="in"/>
12513 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12514 </method>
12515
12516 <method name="onShowWindow">
12517 <desc>
12518 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12519 <link to="IMachine::showConsoleWindow"/> in order to notify
12520 console listeners
12521 <link to="ICanShowWindowEvent"/>
12522 and <link to="IShowWindowEvent"/>.
12523
12524 <result name="VBOX_E_INVALID_OBJECT_STATE">
12525 Session type prevents operation.
12526 </result>
12527
12528 </desc>
12529 <param name="check" type="boolean" dir="in"/>
12530 <param name="canShow" type="boolean" dir="out"/>
12531 <param name="winId" type="unsigned long long" dir="out"/>
12532 </method>
12533
12534 <method name="accessGuestProperty">
12535 <desc>
12536 Called by <link to="IMachine::getGuestProperty"/> and by
12537 <link to="IMachine::setGuestProperty"/> in order to read and
12538 modify guest properties.
12539
12540 <result name="VBOX_E_INVALID_VM_STATE">
12541 Machine session is not open.
12542 </result>
12543 <result name="VBOX_E_INVALID_OBJECT_STATE">
12544 Session type is not direct.
12545 </result>
12546
12547 </desc>
12548 <param name="name" type="wstring" dir="in"/>
12549 <param name="value" type="wstring" dir="in"/>
12550 <param name="flags" type="wstring" dir="in"/>
12551 <param name="isSetter" type="boolean" dir="in"/>
12552 <param name="retValue" type="wstring" dir="out"/>
12553 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12554 <param name="retFlags" type="wstring" dir="out"/>
12555 </method>
12556
12557 <method name="enumerateGuestProperties">
12558 <desc>
12559 Return a list of the guest properties matching a set of patterns along
12560 with their values, time stamps and flags.
12561
12562 <result name="VBOX_E_INVALID_VM_STATE">
12563 Machine session is not open.
12564 </result>
12565 <result name="VBOX_E_INVALID_OBJECT_STATE">
12566 Session type is not direct.
12567 </result>
12568
12569 </desc>
12570 <param name="patterns" type="wstring" dir="in">
12571 <desc>
12572 The patterns to match the properties against as a comma-separated
12573 string. If this is empty, all properties currently set will be
12574 returned.
12575 </desc>
12576 </param>
12577 <param name="key" type="wstring" dir="out" safearray="yes">
12578 <desc>
12579 The key names of the properties returned.
12580 </desc>
12581 </param>
12582 <param name="value" type="wstring" dir="out" safearray="yes">
12583 <desc>
12584 The values of the properties returned. The array entries match the
12585 corresponding entries in the @a key array.
12586 </desc>
12587 </param>
12588 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12589 <desc>
12590 The time stamps of the properties returned. The array entries match
12591 the corresponding entries in the @a key array.
12592 </desc>
12593 </param>
12594 <param name="flags" type="wstring" dir="out" safearray="yes">
12595 <desc>
12596 The flags of the properties returned. The array entries match the
12597 corresponding entries in the @a key array.
12598 </desc>
12599 </param>
12600 </method>
12601
12602 <method name="onlineMergeMedium">
12603 <desc>
12604 Triggers online merging of a hard disk. Used internally when deleting
12605 a snapshot while a VM referring to the same hard disk chain is running.
12606
12607 <result name="VBOX_E_INVALID_VM_STATE">
12608 Machine session is not open.
12609 </result>
12610 <result name="VBOX_E_INVALID_OBJECT_STATE">
12611 Session type is not direct.
12612 </result>
12613
12614 </desc>
12615 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
12616 <desc>The medium attachment to identify the medium chain.</desc>
12617 </param>
12618 <param name="sourceIdx" type="unsigned long" dir="in">
12619 <desc>The index of the source image in the chain.
12620 Redundant, but drastically reduces IPC.</desc>
12621 </param>
12622 <param name="targetIdx" type="unsigned long" dir="in">
12623 <desc>The index of the target image in the chain.
12624 Redundant, but drastically reduces IPC.</desc>
12625 </param>
12626 <param name="source" type="IMedium" dir="in">
12627 <desc>Merge source medium.</desc>
12628 </param>
12629 <param name="target" type="IMedium" dir="in">
12630 <desc>Merge target medium.</desc>
12631 </param>
12632 <param name="mergeForward" type="boolean" dir="in">
12633 <desc>Merge direction.</desc>
12634 </param>
12635 <param name="parentForTarget" type="IMedium" dir="in">
12636 <desc>For forward merges: new parent for target medium.</desc>
12637 </param>
12638 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
12639 <desc>For backward merges: list of media which need their parent UUID
12640 updated.</desc>
12641 </param>
12642 <param name="progress" type="IProgress" dir="in">
12643 <desc>
12644 Progress object for this operation.
12645 </desc>
12646 </param>
12647 </method>
12648
12649 </interface>
12650
12651 <interface
12652 name="ISession" extends="$unknown"
12653 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12654 wsmap="managed"
12655 >
12656 <desc>
12657 The ISession interface represents a client process and allows for locking
12658 virtual machines (represented by IMachine objects) to prevent conflicting
12659 changes to the machine.
12660
12661 Any caller wishing to manipulate a virtual machine needs to create a session
12662 object first, which lives in its own process space. Such session objects are
12663 then associated with <link to="IMachine" /> objects living in the VirtualBox
12664 server process to coordinate such changes.
12665
12666 There are two typical scenarios in which sessions are used:
12667
12668 <ul>
12669 <li>To alter machine settings or control a running virtual machine, one
12670 needs to lock a machine for a given session (client process) by calling
12671 <link to="IMachine::lockMachine"/>.
12672
12673 Whereas multiple sessions may control a running virtual machine, only
12674 one process can obtain a write lock on the machine to prevent conflicting
12675 changes. A write lock is also needed if a process wants to actually run a
12676 virtual machine in its own context, such as the VirtualBox GUI or
12677 VBoxHeadless front-ends. They must also lock a machine for their own
12678 sessions before they are allowed to power up the virtual machine.
12679
12680 As a result, no machine settings can be altered while another process is
12681 already using it, either because that process is modifying machine settings
12682 or because the machine is running.
12683 </li>
12684 <li>
12685 To start a VM using one of the existing VirtualBox front-ends (e.g. the
12686 VirtualBox GUI or VBoxHeadless), one would use
12687 <link to="IMachine::launchVMProcess"/>, which also takes a session object
12688 as its first parameter. This session then identifies the caller and lets the
12689 caller control the started machine (for example, pause machine execution or
12690 power it down) as well as be notified about machine execution state changes.
12691 </li>
12692 </ul>
12693
12694 How sessions objects are created in a client process depends on whether you use
12695 the Main API via COM or via the webservice:
12696
12697 <ul>
12698 <li>When using the COM API directly, an object of the Session class from the
12699 VirtualBox type library needs to be created. In regular COM C++ client code,
12700 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12701 This object will then act as a local session object in further calls to open
12702 a session.
12703 </li>
12704
12705 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12706 a session object automatically whenever <link to="IWebsessionManager::logon" />
12707 is called. A managed object reference to that session object can be retrieved by
12708 calling <link to="IWebsessionManager::getSessionObject" />.
12709 </li>
12710 </ul>
12711 </desc>
12712
12713 <attribute name="state" type="SessionState" readonly="yes">
12714 <desc>Current state of this session.</desc>
12715 </attribute>
12716
12717 <attribute name="type" type="SessionType" readonly="yes">
12718 <desc>
12719 Type of this session. The value of this attribute is valid only
12720 if the session currently has a machine locked (i.e. its
12721 <link to="#state" /> is Locked), otherwise an error will be returned.
12722 </desc>
12723 </attribute>
12724
12725 <attribute name="machine" type="IMachine" readonly="yes">
12726 <desc>Machine object associated with this session.</desc>
12727 </attribute>
12728
12729 <attribute name="console" type="IConsole" readonly="yes">
12730 <desc>Console object associated with this session.</desc>
12731 </attribute>
12732
12733 <method name="unlockMachine">
12734 <desc>
12735 Unlocks a machine that was previously locked for the current session.
12736
12737 Calling this method is required every time a machine has been locked
12738 for a particular session using the <link to="IMachine::launchVMProcess" />
12739 or <link to="IMachine::lockMachine" /> calls. Otherwise the state of
12740 the machine will be set to <link to="MachineState::Aborted" /> on the
12741 server, and changes made to the machine settings will be lost.
12742
12743 Generally, it is recommended to unlock all machines explicitly
12744 before terminating the application (regardless of the reason for
12745 the termination).
12746
12747 <note>
12748 Do not expect the session state (<link to="ISession::state" />
12749 to return to "Unlocked" immediately after you invoke this method,
12750 particularly if you have started a new VM process. The session
12751 state will automatically return to "Unlocked" once the VM is no
12752 longer executing, which can of course take a very long time.
12753 </note>
12754
12755 <result name="E_UNEXPECTED">
12756 Session is not locked.
12757 </result>
12758
12759 </desc>
12760 </method>
12761
12762 </interface>
12763
12764 <!--
12765 // IStorageController
12766 /////////////////////////////////////////////////////////////////////////
12767 -->
12768
12769 <enum
12770 name="StorageBus"
12771 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
12772 >
12773 <desc>
12774 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy);
12775 see <link to="IStorageController::bus" />.
12776 </desc>
12777 <const name="Null" value="0">
12778 <desc>@c null value. Never used by the API.</desc>
12779 </const>
12780 <const name="IDE" value="1"/>
12781 <const name="SATA" value="2"/>
12782 <const name="SCSI" value="3"/>
12783 <const name="Floppy" value="4"/>
12784 <const name="SAS" value="5"/>
12785 </enum>
12786
12787 <enum
12788 name="StorageControllerType"
12789 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
12790 >
12791 <desc>
12792 The exact variant of storage controller hardware presented
12793 to the guest; see <link to="IStorageController::controllerType" />.
12794 </desc>
12795
12796 <const name="Null" value="0">
12797 <desc>@c null value. Never used by the API.</desc>
12798 </const>
12799 <const name="LsiLogic" value="1">
12800 <desc>A SCSI controller of the LsiLogic variant.</desc>
12801 </const>
12802 <const name="BusLogic" value="2">
12803 <desc>A SCSI controller of the BusLogic variant.</desc>
12804 </const>
12805 <const name="IntelAhci" value="3">
12806 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
12807 </const>
12808 <const name="PIIX3" value="4">
12809 <desc>An IDE controller of the PIIX3 variant.</desc>
12810 </const>
12811 <const name="PIIX4" value="5">
12812 <desc>An IDE controller of the PIIX4 variant.</desc>
12813 </const>
12814 <const name="ICH6" value="6">
12815 <desc>An IDE controller of the ICH6 variant.</desc>
12816 </const>
12817 <const name="I82078" value="7">
12818 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
12819 </const>
12820 <const name="LsiLogicSas" value="8">
12821 <desc>A variant of the LsiLogic controller using SAS.</desc>
12822 </const>
12823 </enum>
12824
12825 <interface
12826 name="IStorageController" extends="$unknown"
12827 uuid="fd93adc0-bbaa-4256-9e6e-00e29f9151c9"
12828 wsmap="managed"
12829 >
12830 <desc>
12831 Represents a storage controller that is attached to a virtual machine
12832 (<link to="IMachine" />). Just as drives (hard disks, DVDs, FDs) are
12833 attached to storage controllers in a real computer, virtual drives
12834 (represented by <link to="IMediumAttachment" />) are attached to virtual
12835 storage controllers, represented by this interface.
12836
12837 As opposed to physical hardware, VirtualBox has a very generic concept
12838 of a storage controller, and for purposes of the Main API, all virtual
12839 storage is attached to virtual machines via instances of this interface.
12840 There are five types of such virtual storage controllers: IDE, SCSI, SATA,
12841 SAS and Floppy (see <link to="#bus" />). Depending on which of these four
12842 is used, certain sub-types may be available and can be selected in
12843 <link to="#controllerType" />.
12844
12845 Depending on these settings, the guest operating system might see
12846 significantly different virtual hardware.
12847 </desc>
12848
12849 <attribute name="name" type="wstring" readonly="yes">
12850 <desc>
12851 Name of the storage controller, as originally specified with
12852 <link to="IMachine::addStorageController" />. This then uniquely
12853 identifies this controller with other method calls such as
12854 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
12855 </desc>
12856 </attribute>
12857
12858 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12859 <desc>
12860 Maximum number of devices which can be attached to one port.
12861 </desc>
12862 </attribute>
12863
12864 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12865 <desc>
12866 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12867 </desc>
12868 </attribute>
12869
12870 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12871 <desc>
12872 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12873 </desc>
12874 </attribute>
12875
12876 <attribute name="instance" type="unsigned long">
12877 <desc>
12878 The instance number of the device in the running VM.
12879 </desc>
12880 </attribute>
12881
12882 <attribute name="portCount" type="unsigned long">
12883 <desc>
12884 The number of currently usable ports on the controller.
12885 The minimum and maximum number of ports for one controller are
12886 stored in <link to="IStorageController::minPortCount"/>
12887 and <link to="IStorageController::maxPortCount"/>.
12888 </desc>
12889 </attribute>
12890
12891 <attribute name="bus" type="StorageBus" readonly="yes">
12892 <desc>
12893 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy).
12894 </desc>
12895 </attribute>
12896
12897 <attribute name="controllerType" type="StorageControllerType">
12898 <desc>
12899 The exact variant of storage controller hardware presented
12900 to the guest.
12901 Depending on this value, VirtualBox will provide a different
12902 virtual storage controller hardware to the guest.
12903 For SATA, SAS and floppy controllers, only one variant is
12904 available, but for IDE and SCSI, there are several.
12905
12906 For SCSI controllers, the default type is LsiLogic.
12907 </desc>
12908 </attribute>
12909
12910 <attribute name="useHostIOCache" type="boolean">
12911 <desc>
12912 If true, the storage controller emulation will use a dedicated I/O thread, enable the host I/O
12913 caches and use synchronous file APIs on the host. This was the only option in the API before
12914 VirtualBox 3.2 and is still the default for IDE controllers.
12915
12916 If false, the host I/O cache will be disabled for image files attached to this storage controller.
12917 Instead, the storage controller emulation will use asynchronous I/O APIs on the host. This makes
12918 it possible to turn off the host I/O caches because the emulation can handle unaligned access to
12919 the file. This should be used on OS X and Linux hosts if a high I/O load is expected or many
12920 virtual machines are running at the same time to prevent I/O cache related hangs.
12921 This option new with the API of VirtualBox 3.2 and is now the default for non-IDE storage controllers.
12922 </desc>
12923 </attribute>
12924
12925 <method name="getIDEEmulationPort">
12926 <desc>
12927 Gets the corresponding port number which is emulated as an IDE device.
12928 Works only with SATA controllers.
12929
12930 <result name="E_INVALIDARG">
12931 The @a devicePosition is not in the range 0 to 3.
12932 </result>
12933 <result name="E_NOTIMPL">
12934 The storage controller type is not SATAIntelAhci.
12935 </result>
12936
12937 </desc>
12938 <param name="devicePosition" type="long" dir="in"/>
12939 <param name="portNumber" type="long" dir="return"/>
12940 </method>
12941
12942 <method name="setIDEEmulationPort">
12943 <desc>
12944 Sets the port number which is emulated as an IDE device.
12945 Works only with SATA controllers.
12946
12947 <result name="E_INVALIDARG">
12948 The @a devicePosition is not in the range 0 to 3 or the
12949 @a portNumber is not in the range 0 to 29.
12950 </result>
12951 <result name="E_NOTIMPL">
12952 The storage controller type is not SATAIntelAhci.
12953 </result>
12954
12955 </desc>
12956 <param name="devicePosition" type="long" dir="in"/>
12957 <param name="portNumber" type="long" dir="in"/>
12958 </method>
12959
12960 </interface>
12961
12962<if target="wsdl">
12963
12964 <!--
12965 // IManagedObjectRef
12966 /////////////////////////////////////////////////////////////////////////
12967 -->
12968
12969 <interface
12970 name="IManagedObjectRef" extends="$unknown"
12971 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12972 internal="yes"
12973 wsmap="managed"
12974 wscpp="hardcoded"
12975 >
12976 <desc>
12977 Managed object reference.
12978
12979 Only within the webservice, a managed object reference (which is really
12980 an opaque number) allows a webservice client to address an object
12981 that lives in the address space of the webservice server.
12982
12983 Behind each managed object reference, there is a COM object that lives
12984 in the webservice server's address space. The COM object is not freed
12985 until the managed object reference is released, either by an explicit
12986 call to <link to="IManagedObjectRef::release" /> or by logging off from
12987 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12988 all objects created during the webservice session.
12989
12990 Whenever a method call of the VirtualBox API returns a COM object, the
12991 webservice representation of that method will instead return a
12992 managed object reference, which can then be used to invoke methods
12993 on that object.
12994 </desc>
12995
12996 <method name="getInterfaceName">
12997 <desc>
12998 Returns the name of the interface that this managed object represents,
12999 for example, "IMachine", as a string.
13000 </desc>
13001 <param name="return" type="wstring" dir="return"/>
13002 </method>
13003
13004 <method name="release">
13005 <desc>
13006 Releases this managed object reference and frees the resources that
13007 were allocated for it in the webservice server process. After calling
13008 this method, the identifier of the reference can no longer be used.
13009 </desc>
13010 </method>
13011
13012 </interface>
13013
13014 <!--
13015 // IWebsessionManager
13016 /////////////////////////////////////////////////////////////////////////
13017 -->
13018
13019 <interface
13020 name="IWebsessionManager" extends="$unknown"
13021 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
13022 internal="yes"
13023 wsmap="global"
13024 wscpp="hardcoded"
13025 >
13026 <desc>
13027 Websession manager. This provides essential services
13028 to webservice clients.
13029 </desc>
13030 <method name="logon">
13031 <desc>
13032 Logs a new client onto the webservice and returns a managed object reference to
13033 the IVirtualBox instance, which the client can then use as a basis to further
13034 queries, since all calls to the VirtualBox API are based on the IVirtualBox
13035 interface, in one way or the other.
13036 </desc>
13037 <param name="username" type="wstring" dir="in"/>
13038 <param name="password" type="wstring" dir="in"/>
13039 <param name="return" type="IVirtualBox" dir="return"/>
13040 </method>
13041
13042 <method name="getSessionObject">
13043 <desc>
13044 Returns a managed object reference to the internal ISession object that was created
13045 for this web service session when the client logged on.
13046
13047 <see>ISession</see>
13048 </desc>
13049 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13050 <param name="return" type="ISession" dir="return"/>
13051 </method>
13052
13053 <method name="logoff">
13054 <desc>
13055 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
13056 and destroys all resources associated with the session (most importantly, all
13057 managed objects created in the server while the session was active).
13058 </desc>
13059 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13060 </method>
13061
13062 </interface>
13063
13064</if>
13065
13066 <!--
13067 // IPerformanceCollector & friends
13068 /////////////////////////////////////////////////////////////////////////
13069 -->
13070
13071 <interface
13072 name="IPerformanceMetric" extends="$unknown"
13073 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
13074 >
13075 <desc>
13076 The IPerformanceMetric interface represents parameters of the given
13077 performance metric.
13078 </desc>
13079
13080 <attribute name="metricName" type="wstring" readonly="yes">
13081 <desc>
13082 Name of the metric.
13083 </desc>
13084 </attribute>
13085
13086 <attribute name="object" type="$unknown" readonly="yes">
13087 <desc>
13088 Object this metric belongs to.
13089 </desc>
13090 </attribute>
13091
13092 <attribute name="description" type="wstring" readonly="yes">
13093 <desc>
13094 Textual description of the metric.
13095 </desc>
13096 </attribute>
13097
13098 <attribute name="period" type="unsigned long" readonly="yes">
13099 <desc>
13100 Time interval between samples, measured in seconds.
13101 </desc>
13102 </attribute>
13103
13104 <attribute name="count" type="unsigned long" readonly="yes">
13105 <desc>
13106 Number of recent samples retained by the performance collector for this
13107 metric.
13108
13109 When the collected sample count exceeds this number, older samples
13110 are discarded.
13111 </desc>
13112 </attribute>
13113
13114 <attribute name="unit" type="wstring" readonly="yes">
13115 <desc>
13116 Unit of measurement.
13117 </desc>
13118 </attribute>
13119
13120 <attribute name="minimumValue" type="long" readonly="yes">
13121 <desc>
13122 Minimum possible value of this metric.
13123 </desc>
13124 </attribute>
13125
13126 <attribute name="maximumValue" type="long" readonly="yes">
13127 <desc>
13128 Maximum possible value of this metric.
13129 </desc>
13130 </attribute>
13131 </interface>
13132
13133 <interface
13134 name="IPerformanceCollector" extends="$unknown"
13135 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
13136 wsmap="managed"
13137 >
13138 <desc>
13139 The IPerformanceCollector interface represents a service that collects
13140 and stores performance metrics data.
13141
13142 Performance metrics are associated with objects of interfaces like IHost
13143 and IMachine. Each object has a distinct set of performance metrics. The
13144 set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
13145
13146 Metric data is collected at the specified intervals and is retained
13147 internally. The interval and the number of retained samples can be set
13148 with <link to="IPerformanceCollector::setupMetrics" />. Both metric data
13149 and collection settings are not persistent, they are discarded as soon as
13150 VBoxSVC process terminates. Moreover, metric settings and data associated
13151 with a particular VM only exist while VM is running. They disappear as
13152 soon as VM shuts down. It is not possible to set up metrics for machines
13153 that are powered off. One needs to start VM first, then set up metric
13154 collection parameters.
13155
13156 Metrics are organized hierarchically, with each level separated by a
13157 slash (/) character. Generally, the scheme for metric names is like this:
13158
13159 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
13160
13161 "Category/Metric" together form the base metric name. A base metric is
13162 the smallest unit for which a sampling interval and the number of
13163 retained samples can be set. Only base metrics can be enabled and
13164 disabled. All sub-metrics are collected when their base metric is
13165 collected. Collected values for any set of sub-metrics can be queried
13166 with <link to="IPerformanceCollector::queryMetricsData" />.
13167
13168 For example "CPU/Load/User:avg" metric name stands for the "CPU"
13169 category, "Load" metric, "User" submetric, "average" aggregate. An
13170 aggregate function is computed over all retained data. Valid aggregate
13171 functions are:
13172
13173 <ul>
13174 <li>avg -- average</li>
13175 <li>min -- minimum</li>
13176 <li>max -- maximum</li>
13177 </ul>
13178
13179 When setting up metric parameters, querying metric data, enabling or
13180 disabling metrics wildcards can be used in metric names to specify a
13181 subset of metrics. For example, to select all CPU-related metrics
13182 use <tt>CPU/*</tt>, all averages can be queried using <tt>*:avg</tt> and
13183 so on. To query metric values without aggregates <tt>*:</tt> can be used.
13184
13185 The valid names for base metrics are:
13186
13187 <ul>
13188 <li>CPU/Load</li>
13189 <li>CPU/MHz</li>
13190 <li>RAM/Usage</li>
13191 </ul>
13192
13193 The general sequence for collecting and retrieving the metrics is:
13194 <ul>
13195 <li>
13196 Obtain an instance of IPerformanceCollector with
13197 <link to="IVirtualBox::performanceCollector" />
13198 </li>
13199 <li>
13200 Allocate and populate an array with references to objects the metrics
13201 will be collected for. Use references to IHost and IMachine objects.
13202 </li>
13203 <li>
13204 Allocate and populate an array with base metric names the data will
13205 be collected for.
13206 </li>
13207 <li>
13208 Call <link to="IPerformanceCollector::setupMetrics" />. From now on
13209 the metric data will be collected and stored.
13210 </li>
13211 <li>
13212 Wait for the data to get collected.
13213 </li>
13214 <li>
13215 Allocate and populate an array with references to objects the metric
13216 values will be queried for. You can re-use the object array used for
13217 setting base metrics.
13218 </li>
13219 <li>
13220 Allocate and populate an array with metric names the data will be
13221 collected for. Note that metric names differ from base metric names.
13222 </li>
13223 <li>
13224 Call <link to="IPerformanceCollector::queryMetricsData" />. The data
13225 that have been collected so far are returned. Note that the values
13226 are still retained internally and data collection continues.
13227 </li>
13228 </ul>
13229
13230 For an example of usage refer to the following files in VirtualBox SDK:
13231 <ul>
13232 <li>
13233 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13234 </li>
13235 <li>
13236 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13237 </li>
13238 </ul>
13239 </desc>
13240
13241 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13242 <desc>
13243 Array of unique names of metrics.
13244
13245 This array represents all metrics supported by the performance
13246 collector. Individual objects do not necessarily support all of them.
13247 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13248 list of supported metrics for a particular object.
13249 </desc>
13250 </attribute>
13251
13252 <method name="getMetrics">
13253 <desc>
13254 Returns parameters of specified metrics for a set of objects.
13255 <note>
13256 @c Null metrics array means all metrics. @c Null object array means
13257 all existing objects.
13258 </note>
13259 </desc>
13260 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13261 <desc>
13262 Metric name filter. Currently, only a comma-separated list of metrics
13263 is supported.
13264 </desc>
13265 </param>
13266 <param name="objects" type="$unknown" dir="in" safearray="yes">
13267 <desc>
13268 Set of objects to return metric parameters for.
13269 </desc>
13270 </param>
13271 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13272 <desc>
13273 Array of returned metric parameters.
13274 </desc>
13275 </param>
13276 </method>
13277
13278 <method name="setupMetrics">
13279 <desc>
13280 Sets parameters of specified base metrics for a set of objects. Returns
13281 an array of <link to="IPerformanceMetric" /> describing the metrics
13282 have been affected.
13283 <note>
13284 @c Null or empty metric name array means all metrics. @c Null or
13285 empty object array means all existing objects. If metric name array
13286 contains a single element and object array contains many, the single
13287 metric name array element is applied to each object array element to
13288 form metric/object pairs.
13289 </note>
13290 </desc>
13291 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13292 <desc>
13293 Metric name filter. Comma-separated list of metrics with wildcard
13294 support.
13295 </desc>
13296 </param>
13297 <param name="objects" type="$unknown" dir="in" safearray="yes">
13298 <desc>
13299 Set of objects to setup metric parameters for.
13300 </desc>
13301 </param>
13302 <param name="period" type="unsigned long" dir="in">
13303 <desc>
13304 Time interval in seconds between two consecutive samples of
13305 performance data.
13306 </desc>
13307 </param>
13308 <param name="count" type="unsigned long" dir="in">
13309 <desc>
13310 Number of samples to retain in performance data history. Older
13311 samples get discarded.
13312 </desc>
13313 </param>
13314 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13315 <desc>
13316 Array of metrics that have been modified by the call to this method.
13317 </desc>
13318 </param>
13319 </method>
13320
13321 <method name="enableMetrics">
13322 <desc>
13323 Turns on collecting specified base metrics. Returns an array of
13324 <link to="IPerformanceMetric" /> describing the metrics have been
13325 affected.
13326 <note>
13327 @c Null or empty metric name array means all metrics. @c Null or
13328 empty object array means all existing objects. If metric name array
13329 contains a single element and object array contains many, the single
13330 metric name array element is applied to each object array element to
13331 form metric/object pairs.
13332 </note>
13333 </desc>
13334 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13335 <desc>
13336 Metric name filter. Comma-separated list of metrics with wildcard
13337 support.
13338 </desc>
13339 </param>
13340 <param name="objects" type="$unknown" dir="in" safearray="yes">
13341 <desc>
13342 Set of objects to enable metrics for.
13343 </desc>
13344 </param>
13345 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13346 <desc>
13347 Array of metrics that have been modified by the call to this method.
13348 </desc>
13349 </param>
13350 </method>
13351
13352 <method name="disableMetrics">
13353 <desc>
13354 Turns off collecting specified base metrics. Returns an array of
13355 <link to="IPerformanceMetric" /> describing the metrics have been
13356 affected.
13357 <note>
13358 @c Null or empty metric name array means all metrics. @c Null or
13359 empty object array means all existing objects. If metric name array
13360 contains a single element and object array contains many, the single
13361 metric name array element is applied to each object array element to
13362 form metric/object pairs.
13363 </note>
13364 </desc>
13365 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13366 <desc>
13367 Metric name filter. Comma-separated list of metrics with wildcard
13368 support.
13369 </desc>
13370 </param>
13371 <param name="objects" type="$unknown" dir="in" safearray="yes">
13372 <desc>
13373 Set of objects to disable metrics for.
13374 </desc>
13375 </param>
13376 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13377 <desc>
13378 Array of metrics that have been modified by the call to this method.
13379 </desc>
13380 </param>
13381 </method>
13382
13383 <method name="queryMetricsData">
13384 <desc>
13385 Queries collected metrics data for a set of objects.
13386
13387 The data itself and related metric information are returned in seven
13388 parallel and one flattened array of arrays. Elements of
13389 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13390 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13391 the same index describe one set of values corresponding to a single
13392 metric.
13393
13394 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13395 start and length of a sub-array is indicated by
13396 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13397 value for metric <tt>metricNames[i]</tt> is at
13398 <tt>returnData[returnIndices[i]]</tt>.
13399
13400 <note>
13401 @c Null or empty metric name array means all metrics. @c Null or
13402 empty object array means all existing objects. If metric name array
13403 contains a single element and object array contains many, the single
13404 metric name array element is applied to each object array element to
13405 form metric/object pairs.
13406 </note>
13407 <note>
13408 Data collection continues behind the scenes after call to @c
13409 queryMetricsData. The return data can be seen as the snapshot of the
13410 current state at the time of @c queryMetricsData call. The internally
13411 kept metric values are not cleared by the call. This makes possible
13412 querying different subsets of metrics or aggregates with subsequent
13413 calls. If periodic querying is needed it is highly suggested to query
13414 the values with @c interval*count period to avoid confusion. This way
13415 a completely new set of data values will be provided by each query.
13416 </note>
13417 </desc>
13418 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13419 <desc>
13420 Metric name filter. Comma-separated list of metrics with wildcard
13421 support.
13422 </desc>
13423 </param>
13424 <param name="objects" type="$unknown" dir="in" safearray="yes">
13425 <desc>
13426 Set of objects to query metrics for.
13427 </desc>
13428 </param>
13429 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13430 <desc>
13431 Names of metrics returned in @c returnData.
13432 </desc>
13433 </param>
13434 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13435 <desc>
13436 Objects associated with metrics returned in @c returnData.
13437 </desc>
13438 </param>
13439 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13440 <desc>
13441 Units of measurement for each returned metric.
13442 </desc>
13443 </param>
13444 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13445 <desc>
13446 Divisor that should be applied to return values in order to get
13447 floating point values. For example:
13448 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13449 will retrieve the floating point value of i-th sample of the first
13450 metric.
13451 </desc>
13452 </param>
13453 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13454 <desc>
13455 Sequence numbers of the first elements of value sequences of
13456 particular metrics returned in @c returnData. For aggregate metrics
13457 it is the sequence number of the sample the aggregate started
13458 calculation from.
13459 </desc>
13460 </param>
13461 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13462 <desc>
13463 Indices of the first elements of value sequences of particular
13464 metrics returned in @c returnData.
13465 </desc>
13466 </param>
13467 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13468 <desc>
13469 Lengths of value sequences of particular metrics.
13470 </desc>
13471 </param>
13472 <param name="returnData" type="long" dir="return" safearray="yes">
13473 <desc>
13474 Flattened array of all metric data containing sequences of values for
13475 each metric.
13476 </desc>
13477 </param>
13478 </method>
13479
13480 </interface>
13481 <enum
13482 name="NATAliasMode"
13483 uuid="67772168-50d9-11df-9669-7fb714ee4fa1">
13484 <desc></desc>
13485 <const name="AliasLog" value="0x1">
13486 <desc></desc>
13487 </const>
13488 <const name="AliasProxyOnly" value="0x02">
13489 <desc></desc>
13490 </const>
13491 <const name="AliasUseSamePorts" value="0x04">
13492 <desc></desc>
13493 </const>
13494 </enum>
13495 <enum
13496 name="NATProtocol"
13497 uuid="e90164be-eb03-11de-94af-fff9b1c1b19f"
13498 >
13499 <desc>Protocol definitions used with NAT port-forwarding rules.</desc>
13500 <const name="UDP" value="0">
13501 <desc>Port-forwarding uses UDP protocol.</desc>
13502 </const>
13503 <const name="TCP" value="1">
13504 <desc>Port-forwarding uses TCP protocol.</desc>
13505 </const>
13506 </enum>
13507
13508 <interface
13509 name="INATEngine" extends="$unknown"
13510 uuid="4b286616-eb03-11de-b0fb-1701eca42246"
13511 wsmap="managed"
13512 >
13513 <desc>Interface for managing a NAT engine which is used with a virtual machine. This
13514 allows for changing NAT behavior such as port-forwarding rules. This interface is
13515 used in the <link to="INetworkAdapter::natDriver" /> attribute.</desc>
13516 <attribute name="network" type="wstring">
13517 <desc>The network attribute of the NAT engine (the same value is used with built-in
13518 DHCP server to fill corresponding fields of DHCP leases).</desc>
13519 </attribute>
13520 <attribute name="hostIP" type="wstring">
13521 <desc>IP of host interface to bind all opened sockets to.
13522 <note>Changing this does not change binding of port forwarding.</note>
13523 </desc>
13524 </attribute>
13525 <attribute name="tftpPrefix" type="wstring">
13526 <desc>TFTP prefix 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="tftpBootFile" type="wstring">
13530 <desc>TFTP boot file attribute which is used with the built-in DHCP server to fill
13531 the corresponding fields of DHCP leases.</desc>
13532 </attribute>
13533 <attribute name="tftpNextServer" type="wstring">
13534 <desc>TFTP server attribute which is used with the built-in DHCP server to fill
13535 the corresponding fields of DHCP leases.
13536 <note>The preferred form is IPv4 addresses.</note>
13537 </desc>
13538 </attribute>
13539 <attribute name="aliasMode" type="unsigned long">
13540 <desc></desc>
13541 </attribute>
13542 <attribute name="dnsPassDomain" type="boolean">
13543 <desc>Whether the DHCP server should pass the DNS domain used by the host.</desc>
13544 </attribute>
13545 <attribute name="dnsProxy" 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 DNS servers registered on the host.</desc>
13548 </attribute>
13549 <attribute name="dnsUseHostResolver" type="boolean">
13550 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
13551 of the DNS proxy and process traffic using the host resolver mechanism.</desc>
13552 </attribute>
13553 <attribute name="redirects" type="wstring" readonly="yes" safearray="yes">
13554 <desc>Array of NAT port-forwarding rules in string representation, in the following
13555 format: "name,protocol id,host ip,host port,guest ip,guest port".</desc>
13556 </attribute>
13557 <method name="setNetworkSettings">
13558 <desc>Sets network configuration of the NAT engine.</desc>
13559 <param name="mtu" type="unsigned long" dir="in">
13560 <desc>MTU (maximum transmission unit) of the NAT engine in bytes.</desc>
13561 </param>
13562 <param name="sockSnd" type="unsigned long" dir="in">
13563 <desc>Capacity of the socket send buffer in bytes when creating a new socket.</desc>
13564 </param>
13565 <param name="sockRcv" type="unsigned long" dir="in">
13566 <desc>Capacity of the socket receive buffer in bytes when creating a new socket.</desc>
13567 </param>
13568 <param name="TcpWndSnd" type="unsigned long" dir="in">
13569 <desc>Initial size of the NAT engine's sending TCP window in bytes when
13570 establishing a new TCP connection.</desc>
13571 </param>
13572 <param name="TcpWndRcv" type="unsigned long" dir="in">
13573 <desc>Initial size of the NAT engine's receiving TCP window in bytes when
13574 establishing a new TCP connection.</desc>
13575 </param>
13576 </method>
13577 <method name="getNetworkSettings">
13578 <desc>Returns network configuration of NAT engine. See <link to="#setNetworkSettings" />
13579 for parameter descriptions.</desc>
13580 <param name="mtu" type="unsigned long" dir="out" />
13581 <param name="sockSnd" type="unsigned long" dir="out" />
13582 <param name="sockRcv" type="unsigned long" dir="out" />
13583 <param name="TcpWndSnd" type="unsigned long" dir="out" />
13584 <param name="TcpWndRcv" type="unsigned long" dir="out" />
13585 </method>
13586 <method name="addRedirect">
13587 <desc>Adds a new NAT port-forwarding rule.</desc>
13588 <param name="name" type="wstring" dir="in">
13589 <desc>The name of the rule. An empty name is acceptable, in which case the NAT engine
13590 auto-generates one using the other parameters.</desc>
13591 </param>
13592 <param name="proto" type="NATProtocol" dir="in">
13593 <desc>Protocol handled with the rule.</desc>
13594 </param>
13595 <param name="hostIp" type="wstring" dir="in">
13596 <desc>IP of the host interface to which the rule should apply. An empty ip address is
13597 acceptable, in which case the NAT engine binds the handling socket to any interface.</desc>
13598 </param>
13599 <param name="hostPort" type="unsigned short" dir="in">
13600 <desc>The port number to listen on.</desc>
13601 </param>
13602 <param name="guestIp" type="wstring" dir="in">
13603 <desc>The IP address of the guest which the NAT engine will forward matching packets
13604 to. An empty IP address is acceptable, in which case the NAT engine will forward
13605 packets to the first DHCP lease (x.x.x.15).</desc>
13606 </param>
13607 <param name="guestPort" type="unsigned short" dir="in">
13608 <desc>The port number to forward.</desc>
13609 </param>
13610 </method>
13611 <method name="removeRedirect">
13612 <desc>Removes a port-forwarding rule that was previously registered.</desc>
13613 <param name="name" type="wstring" dir="in">
13614 <desc>The name of the rule to delete.</desc>
13615 </param>
13616 </method>
13617 </interface>
13618
13619 <enum
13620 name="VBoxEventType"
13621 uuid="2c76667e-6981-4122-a71a-cdfd6a6eb575">
13622
13623 <desc>
13624 Type of an event.
13625 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
13626 </desc>
13627
13628 <const name="Invalid" value="0">
13629 <desc>
13630 Invalid event, must be first.
13631 </desc>
13632 </const>
13633
13634 <const name="Any" value="1">
13635 <desc>
13636 Wildcard for all events.
13637 Events of this type are never delivered, and only used in
13638 registerListener() call to simplify registration.
13639 </desc>
13640 </const>
13641
13642 <const name="Vetoable" value="2">
13643 <desc>
13644 Wildcard for all vetoable events. Events of this type are never delivered, and only
13645 used in registerListener() call to simplify registration.
13646 </desc>
13647 </const>
13648
13649 <const name="MachineEvent" value="3">
13650 <desc>
13651 Wildcard for all machine events. Events of this type are never delivered, and only used in
13652 registerListener() call to simplify registration.
13653 </desc>
13654 </const>
13655
13656 <const name="SnapshotEvent" value="4">
13657 <desc>
13658 Wildcard for all snapshot events. Events of this type are never delivered, and only used in
13659 registerListener() call to simplify registration.
13660 </desc>
13661 </const>
13662
13663 <const name="InputEvent" value="5">
13664 <desc>
13665 Wildcard for all input device (keyboard, mouse) events.
13666 Events of this type are never delivered, and only used in
13667 registerListener() call to simplify registration.
13668 </desc>
13669 </const>
13670
13671 <const name="LastWildcard" value="31">
13672 <desc>
13673 Last wildcard.
13674 </desc>
13675 </const>
13676
13677 <const name="OnMachineStateChanged" value="32">
13678 <desc>
13679 See <link to="IMachineStateChangedEvent">IMachineStateChangedEvent</link>.
13680 </desc>
13681 </const>
13682 <const name="OnMachineDataChanged" value="33">
13683 <desc>
13684 See <link to="IMachineDataChangedEvent">IMachineDataChangedEvent</link>.
13685 </desc>
13686 </const>
13687 <const name="OnExtraDataChanged" value="34">
13688 <desc>
13689 See <link to="IExtraDataChangedEvent">IExtraDataChangedEvent</link>.
13690 </desc>
13691 </const>
13692 <const name="OnExtraDataCanChange" value="35">
13693 <desc>
13694 See <link to="IExtraDataCanChangeEvent">IExtraDataCanChangeEvent</link>.
13695 </desc>
13696 </const>
13697 <const name="OnMediumRegistered" value="36">
13698 <desc>
13699 See <link to="IMediumRegisteredEvent">IMediumRegisteredEvent</link>.
13700 </desc>
13701 </const>
13702 <const name="OnMachineRegistered" value="37">
13703 <desc>
13704 See <link to="IMachineRegisteredEvent">IMachineRegisteredEvent</link>.
13705 </desc>
13706 </const>
13707 <const name="OnSessionStateChanged" value="38">
13708 <desc>
13709 See <link to="ISessionStateChangedEvent">ISessionStateChangedEvent</link>.
13710 </desc>
13711 </const>
13712 <const name="OnSnapshotTaken" value="39">
13713 <desc>
13714 See <link to="ISnapshotTakenEvent">ISnapshotTakenEvent</link>.
13715 </desc>
13716 </const>
13717 <const name="OnSnapshotDeleted" value="40">
13718 <desc>
13719 See <link to="ISnapshotDeletedEvent">ISnapshotDeletedEvent</link>.
13720 </desc>
13721 </const>
13722 <const name="OnSnapshotChanged" value="41">
13723 <desc>
13724 See <link to="ISnapshotChangedEvent">ISnapshotChangedEvent</link>.
13725 </desc>
13726 </const>
13727 <const name="OnGuestPropertyChanged" value="42">
13728 <desc>
13729 See <link to="IGuestPropertyChangedEvent">IGuestPropertyChangedEvent</link>.
13730 </desc>
13731 </const>
13732 <!-- Console events -->
13733 <const name="OnMousePointerShapeChanged" value="43">
13734 <desc>
13735 See <link to="IMousePointerShapeChangedEvent">IMousePointerShapeChangedEvent</link>.
13736 </desc>
13737 </const>
13738 <const name="OnMouseCapabilityChanged" value="44">
13739 <desc>
13740 See <link to="IMouseCapabilityChangedEvent">IMouseCapabilityChangedEvent</link>.
13741 </desc>
13742 </const>
13743 <const name="OnKeyboardLedsChanged" value="45">
13744 <desc>
13745 See <link to="IKeyboardLedsChangedEvent">IKeyboardLedsChangedEvent</link>.
13746 </desc>
13747 </const>
13748 <const name="OnStateChanged" value="46">
13749 <desc>
13750 See <link to="IStateChangedEvent">IStateChangedEvent</link>.
13751 </desc>
13752 </const>
13753 <const name="OnAdditionsStateChanged" value="47">
13754 <desc>
13755 See <link to="IAdditionsStateChangedEvent">IAdditionsStateChangedEvent</link>.
13756 </desc>
13757 </const>
13758 <const name="OnNetworkAdapterChanged" value="48">
13759 <desc>
13760 See <link to="INetworkAdapterChangedEvent">INetworkAdapterChangedEvent</link>.
13761 </desc>
13762 </const>
13763 <const name="OnSerialPortChanged" value="49">
13764 <desc>
13765 See <link to="ISerialPortChangedEvent">ISerialPortChangedEvent</link>.
13766 </desc>
13767 </const>
13768 <const name="OnParallelPortChanged" value="50">
13769 <desc>
13770 See <link to="IParallelPortChangedEvent">IParallelPortChangedEvent</link>.
13771 </desc>
13772 </const>
13773 <const name="OnStorageControllerChanged" value="51">
13774 <desc>
13775 See <link to="IStorageControllerChangedEvent">IStorageControllerChangedEvent</link>.
13776 </desc>
13777 </const>
13778 <const name="OnMediumChanged" value="52">
13779 <desc>
13780 See <link to="IMediumChangedEvent">IMediumChangedEvent</link>.
13781 </desc>
13782 </const>
13783 <const name="OnVRDPServerChanged" value="53">
13784 <desc>
13785 See <link to="IVRDPServerChangedEvent">IVRDPServerChangedEvent</link>.
13786 </desc>
13787 </const>
13788 <const name="OnUSBControllerChanged" value="54">
13789 <desc>
13790 See <link to="IUSBControllerChangedEvent">IUSBControllerChangedEvent</link>.
13791 </desc>
13792 </const>
13793 <const name="OnUSBDeviceStateChanged" value="55">
13794 <desc>
13795 See <link to="IUSBDeviceStateChangedEvent">IUSBDeviceStateChangedEvent</link>.
13796 </desc>
13797 </const>
13798 <const name="OnSharedFolderChanged" value="56">
13799 <desc>
13800 See <link to="ISharedFolderChangedEvent">ISharedFolderChangedEvent</link>.
13801 </desc>
13802 </const>
13803 <const name="OnRuntimeError" value="57">
13804 <desc>
13805 See <link to="IRuntimeErrorEvent">IRuntimeErrorEvent</link>.
13806 </desc>
13807 </const>
13808 <const name="OnCanShowWindow" value="58">
13809 <desc>
13810 See <link to="ICanShowWindowEvent">ICanShowWindowEvent</link>.
13811 </desc>
13812 </const>
13813 <const name="OnShowWindow" value="59">
13814 <desc>
13815 See <link to="IShowWindowEvent">IShowWindowEvent</link>.
13816 </desc>
13817 </const>
13818 <const name="OnCPUChanged" value="60">
13819 <desc>
13820 See <link to="ICPUChangedEvent">ICPUChangedEvent</link>.
13821 </desc>
13822 </const>
13823 <const name="OnRemoteDisplayInfoChanged" value="61">
13824 <desc>
13825 See <link to="IRemoteDisplayInfoChangedEvent">IRemoteDisplayInfoChangedEvent</link>.
13826 </desc>
13827 </const>
13828 <const name="OnEventSourceChanged" value="62">
13829 <desc>
13830 See <link to="IEventSourceChangedEvent">IEventSourceChangedEvent</link>.
13831 </desc>
13832 </const>
13833 <const name="OnCPUPriorityChanged" value="63">
13834 <desc>
13835 See <link to="ICPUPriorityChangedEvent">ICPUPriorityChangedEvent</link>.
13836 </desc>
13837 </const>
13838 <!-- Last event marker -->
13839 <const name="Last" value="64">
13840 <desc>
13841 Must be last event, used for iterations and structures relying on numerical event values.
13842 </desc>
13843 </const>
13844
13845 </enum>
13846
13847 <interface
13848 name="IEventSource" extends="$unknown"
13849 uuid="3c670618-f727-4fe9-94d2-8243f489a033"
13850 wsmap="managed"
13851 >
13852 <desc>
13853 Event source. Generally, any object which could generate events can be an event source,
13854 or aggregate one. To simplify using one-way protocols such as webservices running on top of HTTP(S),
13855 an event source can work with listeners in either active or passive mode. In active mode it is up to
13856 the IEventSource implementation to call <link to="IEventListener::handleEvent" />, in passive mode the
13857 event source keeps track of pending events for each listener and returns available events on demand.
13858
13859 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
13860 </desc>
13861
13862 <method name="createListener">
13863 <desc>
13864 Creates a new listener object, useful for passive mode.
13865 </desc>
13866 <param name="listener" type="IEventListener" dir="return"/>
13867 </method>
13868
13869 <method name="registerListener">
13870 <desc>
13871 Register an event listener.
13872
13873 <note>
13874 To avoid system overload, the VirtualBox server process checks if passive event
13875 listeners call <link to="IEventSource::getEvent"/> frequently enough. In the
13876 current implementation, if more than 100 pending events are detected for a passive
13877 event listener, it is forcefully unregistered by the system, and further
13878 <link to="#getEvent" /> calls will return @c VBOX_E_OBJECT_NOT_FOUND.
13879 </note>
13880 </desc>
13881 <param name="listener" type="IEventListener" dir="in">
13882 <desc>Listener to register.</desc>
13883 </param>
13884 <param name="interesting" type="VBoxEventType" dir="in" safearray="yes">
13885 <desc>
13886 Event types listener is interested in. One can use wildcards like -
13887 <link to="VBoxEventType::Any"/> to specify wildcards, matching more
13888 than one event.
13889 </desc>
13890 </param>
13891 <param name="active" type="boolean" dir="in">
13892 <desc>
13893 Which mode this listener is operating in.
13894 In active mode, <link to="IEventListener::handleEvent" /> is called directly.
13895 In passive mode, an internal event queue is created for this this IEventListener.
13896 For each event coming in, it is added to queues for all interested registered passive
13897 listeners. It is then up to the external code to call the listener's
13898 <link to="IEventListener::handleEvent" /> method. When done with an event, the
13899 external code must call <link to="#eventProcessed" />.
13900 </desc>
13901 </param>
13902 </method>
13903
13904 <method name="unregisterListener">
13905 <desc>
13906 Unregister an event listener. If listener is passive, and some waitable events are still
13907 in queue they are marked as processed automatically.
13908 </desc>
13909 <param name="listener" type="IEventListener" dir="in">
13910 <desc>Listener to unregister.</desc>
13911 </param>
13912 </method>
13913
13914 <method name="fireEvent">
13915 <desc>
13916 Fire an event for this source.
13917 </desc>
13918 <param name="event" type="IEvent" dir="in">
13919 <desc>Event to deliver.</desc>
13920 </param>
13921 <param name="timeout" type="long" dir="in">
13922 <desc>
13923 Maximum time to wait for event processing (if event is waitable), in ms;
13924 0 = no wait, -1 = indefinite wait.
13925 </desc>
13926 </param>
13927 <param name="result" type="boolean" dir="return">
13928 <desc>true if an event was delivered to all targets, or is non-waitable.</desc>
13929 </param>
13930 </method>
13931
13932 <method name="getEvent">
13933 <desc>
13934 Get events from this peer's event queue (for passive mode). Calling this method
13935 regularly is required for passive event listeners to avoid system overload;
13936 see <link to="IEventSource::registerListener" /> for details.
13937
13938 <result name="VBOX_E_OBJECT_NOT_FOUND">
13939 Listener is not registered, or autounregistered.
13940 </result>
13941 </desc>
13942 <param name="listener" type="IEventListener" dir="in">
13943 <desc>Which listener to get data for.</desc>
13944 </param>
13945 <param name="timeout" type="long" dir="in">
13946 <desc>
13947 Maximum time to wait for events, in ms;
13948 0 = no wait, -1 = indefinite wait.
13949 </desc>
13950 </param>
13951 <param name="event" type="IEvent" dir="return">
13952 <desc>Event retrieved, or null if none available.</desc>
13953 </param>
13954 </method>
13955
13956 <method name="eventProcessed">
13957 <desc>
13958 Must be called for waitable events after a particular listener finished its
13959 event processing. When all listeners of a particular event have called this
13960 method, the system will then call <link to="IEvent::setProcessed" />.
13961 </desc>
13962 <param name="listener" type="IEventListener" dir="in">
13963 <desc>Which listener processed event.</desc>
13964 </param>
13965 <param name="event" type="IEvent" dir="in">
13966 <desc>Which event.</desc>
13967 </param>
13968 </method>
13969
13970 </interface>
13971
13972 <interface
13973 name="IEventListener" extends="$unknown"
13974 uuid="67099191-32e7-4f6c-85ee-422304c71b90"
13975 wsmap="managed"
13976 >
13977 <desc>
13978 Event listener. An event listener can work in either active or passive mode, depending on the way
13979 it was registered.
13980 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
13981 </desc>
13982
13983 <method name="handleEvent">
13984 <desc>
13985 Handle event callback (called directly by IEventSource in active mode, or could be
13986 called by event processor thread in passive mode).
13987 </desc>
13988 <param name="event" type="IEvent" dir="in">
13989 <desc>Event available.</desc>
13990 </param>
13991 </method>
13992
13993 </interface>
13994
13995 <interface
13996 name="IEvent" extends="$unknown"
13997 uuid="0ca2adba-8f30-401b-a8cd-fe31dbe839c0"
13998 wsmap="managed"
13999 >
14000 <desc>
14001 Abstract parent interface for VirtualBox events. Actual events will typically implement
14002 a more specific interface which derives from this (see below).
14003
14004 <b>Introduction to VirtualBox events</b>
14005
14006 Generally speaking, an event (represented by this interface) signals that something
14007 happened, while an event listener (see <link to="IEventListener" />) represents an
14008 entity that is interested in certain events. In order for this to work with
14009 unidirectional protocols (i.e. web services), the concepts of passive and active
14010 listener are used.
14011
14012 Event consumers can register themselves as listeners, providing an array of
14013 events they are interested in (see <link to="IEventSource::registerListener" />).
14014 When an event triggers, the listener is notified about the event. The exact
14015 mechanism of the notification depends on whether the listener was registered as
14016 an active or passive listener:
14017
14018 <ul>
14019 <li>An active listener is very similar to a callback: it is a function invoked
14020 by the API. As opposed to the callbacks that were used in the API before
14021 VirtualBox 3.3 however, events are now objects with an interface hierarchy.
14022 </li>
14023
14024 <li>Passive listeners are somewhat tricker to implement, but do not require
14025 a client function to be callable, which is not an option with scripting
14026 languages or web service clients. Internally the <link to="IEventSource" />
14027 implementation maintains an event queue for each passive listener, and
14028 newly arrived events are put in this queue. When the listener calls
14029 <link to="IEventSource::getEvent"/>, first element from its internal event
14030 queue is returned. When the client completes processing of an event,
14031 the <link to="IEventSource::eventProcessed" /> function must be called,
14032 acknowledging that the event was processed. It supports implementing
14033 waitable events. On passive listener unregistration, all events from its
14034 queue are auto-acknowledged.
14035 </li>
14036 </ul>
14037
14038 Waitable events are useful in situations where the event generator wants to track
14039 delivery or a party wants to wait until all listeners have completed the event. A
14040 typical example would be a vetoable event (see <link to="IVetoEvent" />) where a
14041 listeners might veto a certain action, and thus the event producer has to make
14042 sure that all listeners have processed the event and not vetoed before taking
14043 the action.
14044
14045 A given event may have both passive and active listeners at the same time.
14046
14047 <b>Using events</b>
14048
14049 Any VirtualBox object capable of producing externally visible events provides an
14050 @c eventSource read-only attribute, which is of the type <link to="IEventSource" />.
14051 This event source object is notified by VirtualBox once something has happened, so
14052 consumers may register event listeners with this event source. To register a listener,
14053 an object implementing the <link to="IEventListener" /> interface must be provided.
14054 For active listeners, such an object is typically created by the consumer, while for
14055 passive listeners <link to="IEventSource::createListener" /> should be used. Please
14056 note that a listener created with @c createListener() must not be used as an active listener.
14057
14058 Once created, the listener must be registered to listen for the desired events
14059 (see <link to="IEventSource::registerListener" />), providing an array of
14060 <link to="VBoxEventType" /> enums. Those elements can either be the individual
14061 event IDs or wildcards matching multiple event IDs.
14062
14063 After registration, the callback's <link to="IEventListener::handleEvent" /> method is
14064 called automatically when the event is triggered, while passive listeners have to call
14065 <link to="IEventSource::getEvent" /> and <link to="IEventSource::eventProcessed" /> in
14066 an event processing loop.
14067
14068 The IEvent interface is an abstract parent interface for all such VirtualBox events
14069 coming in. As a result, the standard use pattern inside <link to="IEventListener::handleEvent" />
14070 or the event processing loop is to check the <link to="#type" /> attribute of the event and
14071 then cast to the appropriate specific interface using @c QueryInterface().
14072 </desc>
14073
14074 <attribute name="type" readonly="yes" type="VBoxEventType">
14075 <desc>
14076 Event type.
14077 </desc>
14078 </attribute>
14079
14080 <attribute name="source" readonly="yes" type="IEventSource">
14081 <desc>
14082 Source of this event.
14083 </desc>
14084 </attribute>
14085
14086 <attribute name="waitable" readonly="yes" type="boolean">
14087 <desc>
14088 If we can wait for this event being processed. If false, waitProcessed() returns immediately,
14089 and setProcessed() doesn't make sense. Non-waitable events are generally better performing,
14090 as no additional overhead associated with waitability imposed.
14091 Waitable events are needed when one need to be able to wait for particular event processed,
14092 for example for vetoable changes, or if event refers to some resource which need to be kept immutable
14093 until all consumers confirmed events.
14094 </desc>
14095 </attribute>
14096
14097 <method name="setProcessed">
14098 <desc>
14099 Internal method called by the system when all listeners of a particular event have called
14100 <link to="IEventSource::eventProcessed" />. This should not be called by client code.
14101 </desc>
14102 </method>
14103
14104 <method name="waitProcessed">
14105 <desc>
14106 Wait until time outs, or this event is processed. Event must be waitable for this operation to have
14107 described semantics, for non-waitable returns true immediately.
14108 </desc>
14109 <param name="timeout" type="long" dir="in">
14110 <desc>
14111 Maximum time to wait for event processeing, in ms;
14112 0 = no wait, -1 = indefinite wait.
14113 </desc>
14114 </param>
14115 <param name="result" type="boolean" dir="return">
14116 <desc>If this event was processed before timeout.</desc>
14117 </param>
14118 </method>
14119 </interface>
14120
14121
14122 <interface
14123 name="IReusableEvent" extends="IEvent"
14124 uuid="69bfb134-80f6-4266-8e20-16371f68fa25"
14125 wsmap="managed"
14126 >
14127 <desc>Base abstract interface for all reusable events.</desc>
14128
14129 <attribute name="generation" readonly="yes" type="unsigned long">
14130 <desc>Current generation of event, incremented on reuse.</desc>
14131 </attribute>
14132
14133 <method name="reuse">
14134 <desc>
14135 Marks an event as reused, increments 'generation', fields shall no
14136 longer be considered valid.
14137 </desc>
14138 </method>
14139 </interface>
14140
14141 <interface
14142 name="IMachineEvent" extends="IEvent"
14143 uuid="92ed7b1a-0d96-40ed-ae46-a564d484325e"
14144 wsmap="managed" id="MachineEvent"
14145 >
14146 <desc>Base abstract interface for all machine events.</desc>
14147
14148 <attribute name="machineId" readonly="yes" type="uuid" mod="string">
14149 <desc>ID of the machine this event relates to.</desc>
14150 </attribute>
14151
14152 </interface>
14153
14154 <interface
14155 name="IMachineStateChangedEvent" extends="IMachineEvent"
14156 uuid="5748F794-48DF-438D-85EB-98FFD70D18C9"
14157 wsmap="managed" autogen="VBoxEvent" id="OnMachineStateChanged"
14158 >
14159 <desc>Machine state change event.</desc>
14160
14161 <attribute name="state" readonly="yes" type="MachineState">
14162 <desc>New execution state.</desc>
14163 </attribute>
14164 </interface>
14165
14166 <interface
14167 name="IMachineDataChangedEvent" extends="IMachineEvent"
14168 uuid="6AA70A6C-0DCA-4810-8C5C-457B278E3D49"
14169 wsmap="managed" autogen="VBoxEvent" id="OnMachineDataChanged"
14170 >
14171 <desc>
14172 Any of the settings of the given machine has changed.
14173 </desc>
14174 </interface>
14175
14176 <interface
14177 name="IMediumRegisteredEvent" extends="IEvent"
14178 uuid="53fac49a-b7f1-4a5a-a4ef-a11dd9c2a458"
14179 wsmap="managed" autogen="VBoxEvent" id="OnMediumRegistered"
14180 >
14181 <desc>
14182 The given medium was registered or unregistered
14183 within this VirtualBox installation.
14184 </desc>
14185
14186 <attribute name="mediumId" readonly="yes" type="uuid" mod="string">
14187 <desc>ID of the medium this event relates to.</desc>
14188 </attribute>
14189
14190 <attribute name="mediumType" readonly="yes" type="DeviceType">
14191 <desc>Type of the medium this event relates to.</desc>
14192 </attribute>
14193
14194 <attribute name="registered" type="boolean" readonly="yes">
14195 <desc>
14196 If @c true, the medium was registered, otherwise it was
14197 unregistered.
14198 </desc>
14199 </attribute>
14200 </interface>
14201
14202 <interface
14203 name="IMachineRegisteredEvent" extends="IMachineEvent"
14204 uuid="c354a762-3ff2-4f2e-8f09-07382ee25088"
14205 wsmap="managed" autogen="VBoxEvent" id="OnMachineRegistered"
14206 >
14207 <desc>
14208 The given machine was registered or unregistered
14209 within this VirtualBox installation.
14210 </desc>
14211
14212 <attribute name="registered" type="boolean" readonly="yes">
14213 <desc>
14214 If @c true, the machine was registered, otherwise it was
14215 unregistered.
14216 </desc>
14217 </attribute>
14218 </interface>
14219
14220 <interface
14221 name="ISessionStateChangedEvent" extends="IMachineEvent"
14222 uuid="714a3eef-799a-4489-86cd-fe8e45b2ff8e"
14223 wsmap="managed" autogen="VBoxEvent" id="OnSessionStateChanged"
14224 >
14225 <desc>
14226 The state of the session for the given machine was changed.
14227 <see>IMachine::sessionState</see>
14228 </desc>
14229
14230 <attribute name="state" type="SessionState" readonly="yes">
14231 <desc>
14232 New session state.
14233 </desc>
14234 </attribute>
14235 </interface>
14236
14237 <interface
14238 name="IGuestPropertyChangedEvent" extends="IMachineEvent"
14239 uuid="3f63597a-26f1-4edb-8dd2-6bddd0912368"
14240 wsmap="managed" autogen="VBoxEvent" id="OnGuestPropertyChanged"
14241 >
14242 <desc>
14243 Notification when a guest property has changed.
14244 </desc>
14245
14246 <attribute name="name" readonly="yes" type="wstring">
14247 <desc>
14248 The name of the property that has changed.
14249 </desc>
14250 </attribute>
14251
14252 <attribute name="value" readonly="yes" type="wstring">
14253 <desc>
14254 The new property value.
14255 </desc>
14256 </attribute>
14257
14258 <attribute name="flags" readonly="yes" type="wstring">
14259 <desc>
14260 The new property flags.
14261 </desc>
14262 </attribute>
14263
14264 </interface>
14265
14266 <interface
14267 name="ISnapshotEvent" extends="IMachineEvent"
14268 uuid="21637b0e-34b8-42d3-acfb-7e96daf77c22"
14269 wsmap="managed" id="SnapshotEvent"
14270 >
14271 <desc>Base interface for all snapshot events.</desc>
14272
14273 <attribute name="snapshotId" readonly="yes" type="uuid" mod="string">
14274 <desc>ID of the snapshot this event relates to.</desc>
14275 </attribute>
14276
14277 </interface>
14278
14279 <interface
14280 name="ISnapshotTakenEvent" extends="ISnapshotEvent"
14281 uuid="d27c0b3d-6038-422c-b45e-6d4a0503d9f1"
14282 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotTaken"
14283 >
14284 <desc>
14285 A new snapshot of the machine has been taken.
14286 <see>ISnapshot</see>
14287 </desc>
14288 </interface>
14289
14290 <interface
14291 name="ISnapshotDeletedEvent" extends="ISnapshotEvent"
14292 uuid="c48f3401-4a9e-43f4-b7a7-54bd285e22f4"
14293 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotDeleted"
14294 >
14295 <desc>
14296 Snapshot of the given machine has been deleted.
14297
14298 <note>
14299 This notification is delivered <b>after</b> the snapshot
14300 object has been uninitialized on the server (so that any
14301 attempt to call its methods will return an error).
14302 </note>
14303
14304 <see>ISnapshot</see>
14305 </desc>
14306 </interface>
14307
14308 <interface
14309 name="ISnapshotChangedEvent" extends="ISnapshotEvent"
14310 uuid="07541941-8079-447a-a33e-47a69c7980db"
14311 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotChanged"
14312 >
14313 <desc>
14314 Snapshot properties (name and/or description) have been changed.
14315 <see>ISnapshot</see>
14316 </desc>
14317 </interface>
14318
14319 <interface
14320 name="IMousePointerShapeChangedEvent" extends="IEvent"
14321 uuid="a6dcf6e8-416b-4181-8c4a-45ec95177aef"
14322 wsmap="managed" autogen="VBoxEvent" id="OnMousePointerShapeChanged"
14323 >
14324 <desc>
14325 Notification when the guest mouse pointer shape has
14326 changed. The new shape data is given.
14327 </desc>
14328
14329 <attribute name="visible" type="boolean" readonly="yes">
14330 <desc>
14331 Flag whether the pointer is visible.
14332 </desc>
14333 </attribute>
14334 <attribute name="alpha" type="boolean" readonly="yes">
14335 <desc>
14336 Flag whether the pointer has an alpha channel.
14337 </desc>
14338 </attribute>
14339 <attribute name="xhot" type="unsigned long" readonly="yes">
14340 <desc>
14341 The pointer hot spot X coordinate.
14342 </desc>
14343 </attribute>
14344 <attribute name="yhot" type="unsigned long" readonly="yes">
14345 <desc>
14346 The pointer hot spot Y coordinate.
14347 </desc>
14348 </attribute>
14349 <attribute name="width" type="unsigned long" readonly="yes">
14350 <desc>
14351 Width of the pointer shape in pixels.
14352 </desc>
14353 </attribute>
14354 <attribute name="height" type="unsigned long" readonly="yes">
14355 <desc>
14356 Height of the pointer shape in pixels.
14357 </desc>
14358 </attribute>
14359 <attribute name="shape" type="octet" safearray="yes" readonly="yes">
14360 <desc>
14361 Shape buffer arrays.
14362
14363 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
14364 followed by a 32-bpp XOR (color) mask.
14365
14366 For pointers without alpha channel the XOR mask pixels are 32
14367 bit values: (lsb)BGR0(msb). For pointers with alpha channel
14368 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
14369
14370 An AND mask is used for pointers with alpha channel, so if the
14371 callback does not support alpha, the pointer could be
14372 displayed as a normal color pointer.
14373
14374 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
14375 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
14376 height</tt>. The padding bits at the end of each scanline are
14377 undefined.
14378
14379 The XOR mask follows the AND mask on the next 4-byte aligned
14380 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
14381 Bytes in the gap between the AND and the XOR mask are undefined.
14382 The XOR mask scanlines have no gap between them and the size of
14383 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
14384
14385 <note>
14386 If @a shape is 0, only the pointer visibility is changed.
14387 </note>
14388 </desc>
14389 </attribute>
14390 </interface>
14391
14392 <interface
14393 name="IMouseCapabilityChangedEvent" extends="IEvent"
14394 uuid="d633ad48-820c-4207-b46c-6bd3596640d5"
14395 wsmap="managed" autogen="VBoxEvent" id="OnMouseCapabilityChanged"
14396 >
14397 <desc>
14398 Notification when the mouse capabilities reported by the
14399 guest have changed. The new capabilities are passed.
14400 </desc>
14401 <attribute name="supportsAbsolute" type="boolean" readonly="yes">
14402 <desc>
14403 Supports absolute coordinates.
14404 </desc>
14405 </attribute>
14406 <attribute name="supportsRelative" type="boolean" readonly="yes">
14407 <desc>
14408 Supports relative coordinates.
14409 </desc>
14410 </attribute>
14411 <attribute name="needsHostCursor" type="boolean" readonly="yes">
14412 <desc>
14413 If host cursor is needed.
14414 </desc>
14415 </attribute>
14416 </interface>
14417
14418 <interface
14419 name="IKeyboardLedsChangedEvent" extends="IEvent"
14420 uuid="6DDEF35E-4737-457B-99FC-BC52C851A44F"
14421 wsmap="managed" autogen="VBoxEvent" id="OnKeyboardLedsChanged"
14422 >
14423 <desc>
14424 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
14425 to alter the state of the keyboard LEDs.
14426 </desc>
14427 <attribute name="numLock" type="boolean" readonly="yes">
14428 <desc>
14429 NumLock status.
14430 </desc>
14431 </attribute>
14432 <attribute name="capsLock" type="boolean" readonly="yes">
14433 <desc>
14434 CapsLock status.
14435 </desc>
14436 </attribute>
14437 <attribute name="scrollLock" type="boolean" readonly="yes">
14438 <desc>
14439 ScrollLock status.
14440 </desc>
14441 </attribute>
14442 </interface>
14443
14444 <interface
14445 name="IStateChangedEvent" extends="IEvent"
14446 uuid="4376693C-CF37-453B-9289-3B0F521CAF27"
14447 wsmap="managed" autogen="VBoxEvent" id="OnStateChanged"
14448 >
14449 <desc>
14450 Notification when the execution state of the machine has changed.
14451 The new state is given.
14452 </desc>
14453 <attribute name="state" type="MachineState" readonly="yes">
14454 <desc>
14455 New machine state.
14456 </desc>
14457 </attribute>
14458 </interface>
14459
14460 <interface
14461 name="IAdditionsStateChangedEvent" extends="IEvent"
14462 uuid="D70F7915-DA7C-44C8-A7AC-9F173490446A"
14463 wsmap="managed" autogen="VBoxEvent" id="OnAdditionsStateChanged"
14464 >
14465 <desc>
14466 Notification when a Guest Additions property changes.
14467 Interested callees should query IGuest attributes to
14468 find out what has changed.
14469 </desc>
14470 </interface>
14471
14472 <interface
14473 name="INetworkAdapterChangedEvent" extends="IEvent"
14474 uuid="08889892-1EC6-4883-801D-77F56CFD0103"
14475 wsmap="managed" autogen="VBoxEvent" id="OnNetworkAdapterChanged"
14476 >
14477 <desc>
14478 Notification when a property of one of the
14479 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
14480 changes. Interested callees should use INetworkAdapter methods and
14481 attributes to find out what has changed.
14482 </desc>
14483 <attribute name="networkAdapter" type="INetworkAdapter" readonly="yes">
14484 <desc>
14485 Network adapter that is subject to change.
14486 </desc>
14487 </attribute>
14488 </interface>
14489
14490 <interface
14491 name="ISerialPortChangedEvent" extends="IEvent"
14492 uuid="3BA329DC-659C-488B-835C-4ECA7AE71C6C"
14493 wsmap="managed" autogen="VBoxEvent" id="OnSerialPortChanged"
14494 >
14495 <desc>
14496 Notification when a property of one of the
14497 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
14498 Interested callees should use ISerialPort methods and attributes
14499 to find out what has changed.
14500 </desc>
14501 <attribute name="serialPort" type="ISerialPort" readonly="yes">
14502 <desc>
14503 Serial port that is subject to change.
14504 </desc>
14505 </attribute>
14506 </interface>
14507
14508 <interface
14509 name="IParallelPortChangedEvent" extends="IEvent"
14510 uuid="813C99FC-9849-4F47-813E-24A75DC85615"
14511 wsmap="managed" autogen="VBoxEvent" id="OnParallelPortChanged"
14512 >
14513 <desc>
14514 Notification when a property of one of the
14515 virtual <link to="IMachine::getParallelPort">parallel ports</link>
14516 changes. Interested callees should use ISerialPort methods and
14517 attributes to find out what has changed.
14518 </desc>
14519 <attribute name="parallelPort" type="IParallelPort" readonly="yes">
14520 <desc>
14521 Parallel port that is subject to change.
14522 </desc>
14523 </attribute>
14524 </interface>
14525
14526 <interface
14527 name="IStorageControllerChangedEvent" extends="IEvent"
14528 uuid="715212BF-DA59-426E-8230-3831FAA52C56"
14529 wsmap="managed" autogen="VBoxEvent" id="OnStorageControllerChanged"
14530 >
14531 <desc>
14532 Notification when a
14533 <link to="IMachine::mediumAttachments">medium attachment</link>
14534 changes.
14535 </desc>
14536 </interface>
14537
14538 <interface
14539 name="IMediumChangedEvent" extends="IEvent"
14540 uuid="0FE2DA40-5637-472A-9736-72019EABD7DE"
14541 wsmap="managed" autogen="VBoxEvent" id="OnMediumChanged"
14542 >
14543 <desc>
14544 Notification when a
14545 <link to="IMachine::mediumAttachments">medium attachment</link>
14546 changes.
14547 </desc>
14548 <attribute name="mediumAttachment" type="IMediumAttachment" readonly="yes">
14549 <desc>
14550 Medium attachment that is subject to change.
14551 </desc>
14552 </attribute>
14553 </interface>
14554
14555 <interface
14556 name="ICPUChangedEvent" extends="IEvent"
14557 uuid="D0F0BECC-EE17-4D17-A8CC-383B0EB55E9D"
14558 wsmap="managed" autogen="VBoxEvent" id="OnCPUChanged"
14559 >
14560 <desc>
14561 Notification when a CPU changes.
14562 </desc>
14563 <attribute name="cpu" type="unsigned long" readonly="yes">
14564 <desc>
14565 The CPU which changed.
14566 </desc>
14567 </attribute>
14568 <attribute name="add" type="boolean" readonly="yes">
14569 <desc>
14570 Flag whether the CPU was added or removed.
14571 </desc>
14572 </attribute>
14573 </interface>
14574
14575 <interface
14576 name="ICPUPriorityChangedEvent" extends="IEvent"
14577 uuid="657fe2fe-a75a-4cb6-8cf9-072aa41e7d75"
14578 wsmap="managed" autogen="VBoxEvent" id="OnCPUPriorityChanged"
14579 >
14580 <desc>
14581 Notification when the CPU priority changes.
14582 </desc>
14583 <attribute name="priority" type="unsigned long" readonly="yes">
14584 <desc>
14585 The new CPU priority value. (1-100)
14586 </desc>
14587 </attribute>
14588 </interface>
14589
14590 <interface
14591 name="IVRDPServerChangedEvent" extends="IEvent"
14592 uuid="726038B6-6279-4A7A-8037-D041693D1915"
14593 wsmap="managed" autogen="VBoxEvent" id="OnVRDPServerChanged"
14594 >
14595 <desc>
14596 Notification when a property of the
14597 <link to="IMachine::VRDPServer">VRDP server</link> changes.
14598 Interested callees should use IVRDPServer methods and attributes to
14599 find out what has changed.
14600 </desc>
14601 </interface>
14602
14603 <interface
14604 name="IRemoteDisplayInfoChangedEvent" extends="IEvent"
14605 uuid="65B556C5-2A99-47D8-B311-FC177F0914CD"
14606 wsmap="managed" autogen="VBoxEvent" id="OnRemoteDisplayInfoChanged"
14607 >
14608 <desc>
14609 Notification when the status of the VRDP server changes. Interested callees
14610 should use <link to="IConsole::remoteDisplayInfo">IRemoteDisplayInfo</link>
14611 attributes to find out what is the current status.
14612 </desc>
14613 </interface>
14614
14615 <interface
14616 name="IUSBControllerChangedEvent" extends="IEvent"
14617 uuid="93BADC0C-61D9-4940-A084-E6BB29AF3D83"
14618 wsmap="managed" autogen="VBoxEvent" id="OnUSBControllerChanged"
14619 >
14620 <desc>
14621 Notification when a property of the virtual
14622 <link to="IMachine::USBController">USB controller</link> changes.
14623 Interested callees should use IUSBController methods and attributes to
14624 find out what has changed.
14625 </desc>
14626 </interface>
14627
14628 <interface
14629 name="IUSBDeviceStateChangedEvent" extends="IEvent"
14630 uuid="806da61b-6679-422a-b629-51b06b0c6d93"
14631 wsmap="managed" autogen="VBoxEvent" id="OnUSBDeviceStateChanged"
14632 >
14633 <desc>
14634 Notification when a USB device is attached to or detached from
14635 the virtual USB controller.
14636
14637 This notification is sent as a result of the indirect
14638 request to attach the device because it matches one of the
14639 machine USB filters, or as a result of the direct request
14640 issued by <link to="IConsole::attachUSBDevice"/> or
14641 <link to="IConsole::detachUSBDevice"/>.
14642
14643 This notification is sent in case of both a succeeded and a
14644 failed request completion. When the request succeeds, the
14645 @a error parameter is @c null, and the given device has been
14646 already added to (when @a attached is @c true) or removed from
14647 (when @a attached is @c false) the collection represented by
14648 <link to="IConsole::USBDevices"/>. On failure, the collection
14649 doesn't change and the @a error parameter represents the error
14650 message describing the failure.
14651 </desc>
14652 <attribute name="device" type="IUSBDevice" readonly="yes">
14653 <desc>
14654 Device that is subject to state change.
14655 </desc>
14656 </attribute>
14657 <attribute name="attached" type="boolean" readonly="yes">
14658 <desc>
14659 @c true if the device was attached and @c false otherwise.
14660 </desc>
14661 </attribute>
14662 <attribute name="error" type="IVirtualBoxErrorInfo" readonly="yes">
14663 <desc>
14664 @c null on success or an error message object on failure.
14665 </desc>
14666 </attribute>
14667 </interface>
14668
14669 <interface
14670 name="ISharedFolderChangedEvent" extends="IEvent"
14671 uuid="B66349B5-3534-4239-B2DE-8E1535D94C0B"
14672 wsmap="managed" autogen="VBoxEvent" id="OnSharedFolderChanged"
14673 >
14674 <desc>
14675 Notification when a shared folder is added or removed.
14676 The @a scope argument defines one of three scopes:
14677 <link to="IVirtualBox::sharedFolders">global shared folders</link>
14678 (<link to="Scope::Global">Global</link>),
14679 <link to="IMachine::sharedFolders">permanent shared folders</link> of
14680 the machine (<link to="Scope::Machine">Machine</link>) or <link
14681 to="IConsole::sharedFolders">transient shared folders</link> of the
14682 machine (<link to="Scope::Session">Session</link>). Interested callees
14683 should use query the corresponding collections to find out what has
14684 changed.
14685 </desc>
14686 <attribute name="scope" type="Scope" readonly="yes">
14687 <desc>
14688 Scope of the notification.
14689 </desc>
14690 </attribute>
14691 </interface>
14692
14693 <interface
14694 name="IRuntimeErrorEvent" extends="IEvent"
14695 uuid="883DD18B-0721-4CDE-867C-1A82ABAF914C"
14696 wsmap="managed" autogen="VBoxEvent" id="OnRuntimeError"
14697 >
14698 <desc>
14699 Notification when an error happens during the virtual
14700 machine execution.
14701
14702 There are three kinds of runtime errors:
14703 <ul>
14704 <li><i>fatal</i></li>
14705 <li><i>non-fatal with retry</i></li>
14706 <li><i>non-fatal warnings</i></li>
14707 </ul>
14708
14709 <b>Fatal</b> errors are indicated by the @a fatal parameter set
14710 to @c true. In case of fatal errors, the virtual machine
14711 execution is always paused before calling this notification, and
14712 the notification handler is supposed either to immediately save
14713 the virtual machine state using <link to="IConsole::saveState"/>
14714 or power it off using <link to="IConsole::powerDown"/>.
14715 Resuming the execution can lead to unpredictable results.
14716
14717 <b>Non-fatal</b> errors and warnings are indicated by the
14718 @a fatal parameter set to @c false. If the virtual machine
14719 is in the Paused state by the time the error notification is
14720 received, it means that the user can <i>try to resume</i> the machine
14721 execution after attempting to solve the problem that caused the
14722 error. In this case, the notification handler is supposed
14723 to show an appropriate message to the user (depending on the
14724 value of the @a id parameter) that offers several actions such
14725 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
14726 wants to retry, the notification handler should continue
14727 the machine execution using the <link to="IConsole::resume"/>
14728 call. If the machine execution is not Paused during this
14729 notification, then it means this notification is a <i>warning</i>
14730 (for example, about a fatal condition that can happen very soon);
14731 no immediate action is required from the user, the machine
14732 continues its normal execution.
14733
14734 Note that in either case the notification handler
14735 <b>must not</b> perform any action directly on a thread
14736 where this notification is called. Everything it is allowed to
14737 do is to post a message to another thread that will then talk
14738 to the user and take the corresponding action.
14739
14740 Currently, the following error identifiers are known:
14741 <ul>
14742 <li><tt>"HostMemoryLow"</tt></li>
14743 <li><tt>"HostAudioNotResponding"</tt></li>
14744 <li><tt>"VDIStorageFull"</tt></li>
14745 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
14746 </ul>
14747 </desc>
14748 <attribute name="fatal" type="boolean" readonly="yes">
14749 <desc>
14750 Whether the error is fatal or not.
14751 </desc>
14752 </attribute>
14753 <attribute name="id" type="wstring" readonly="yes">
14754 <desc>
14755 Error identifier.
14756 </desc>
14757 </attribute>
14758 <attribute name="message" type="wstring" readonly="yes">
14759 <desc>
14760 Optional error message.
14761 </desc>
14762 </attribute>
14763 </interface>
14764
14765
14766 <interface
14767 name="IEventSourceChangedEvent" extends="IEvent"
14768 uuid="e7932cb8-f6d4-4ab6-9cbf-558eb8959a6a"
14769 waitable="yes"
14770 wsmap="managed" autogen="VBoxEvent" id="OnEventSourceChanged"
14771 >
14772 <desc>
14773 Notification when an event source state changes (listener added or removed).
14774 </desc>
14775
14776 <attribute name="listener" type="IEventListener" readonly="yes">
14777 <desc>
14778 Event listener which has changed.
14779 </desc>
14780 </attribute>
14781
14782 <attribute name="add" type="boolean" readonly="yes">
14783 <desc>
14784 Flag whether listener was added or removed.
14785 </desc>
14786 </attribute>
14787 </interface>
14788
14789 <interface
14790 name="IExtraDataChangedEvent" extends="IEvent"
14791 uuid="024F00CE-6E0B-492A-A8D0-968472A94DC7"
14792 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataChanged"
14793 >
14794 <desc>
14795 Notification when machine specific or global extra data
14796 has changed.
14797 </desc>
14798 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
14799 <desc>
14800 ID of the machine this event relates to.
14801 Null for global extra data changes.
14802 </desc>
14803 </attribute>
14804 <attribute name="key" type="wstring" readonly="yes">
14805 <desc>
14806 Extra data key that has changed.
14807 </desc>
14808 </attribute>
14809 <attribute name="value" type="wstring" readonly="yes">
14810 <desc>
14811 Extra data value for the given key.
14812 </desc>
14813 </attribute>
14814 </interface>
14815
14816 <interface
14817 name="IVetoEvent" extends="IEvent"
14818 uuid="9a1a4130-69fe-472f-ac10-c6fa25d75007"
14819 wsmap="managed"
14820 >
14821 <desc>Base abstract interface for veto events.</desc>
14822
14823 <method name="addVeto">
14824 <desc>
14825 Adds a veto on this event.
14826 </desc>
14827 <param name="reason" type="wstring" dir="in">
14828 <desc>
14829 Reason for veto, could be null or empty string.
14830 </desc>
14831 </param>
14832 </method>
14833
14834 <method name="isVetoed">
14835 <desc>
14836 If this event was vetoed.
14837 </desc>
14838 <param name="result" type="boolean" dir="return">
14839 <desc>
14840 Reason for veto.
14841 </desc>
14842 </param>
14843 </method>
14844
14845 <method name="getVetos">
14846 <desc>
14847 Current veto reason list, if size is 0 - no veto.
14848 </desc>
14849 <param name="result" type="wstring" dir="return" safearray="yes">
14850 <desc>
14851 Array of reasons for veto provided by different event handlers.
14852 </desc>
14853 </param>
14854 </method>
14855
14856 </interface>
14857
14858 <interface
14859 name="IExtraDataCanChangeEvent" extends="IVetoEvent"
14860 uuid="245d88bd-800a-40f8-87a6-170d02249a55"
14861 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataCanChange"
14862 waitable="true"
14863 >
14864 <desc>
14865 Notification when someone tries to change extra data for
14866 either the given machine or (if @c null) global extra data.
14867 This gives the chance to veto against changes.
14868 </desc>
14869 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
14870 <desc>
14871 ID of the machine this event relates to.
14872 Null for global extra data changes.
14873 </desc>
14874 </attribute>
14875 <attribute name="key" type="wstring" readonly="yes">
14876 <desc>
14877 Extra data key that has changed.
14878 </desc>
14879 </attribute>
14880 <attribute name="value" type="wstring" readonly="yes">
14881 <desc>
14882 Extra data value for the given key.
14883 </desc>
14884 </attribute>
14885 </interface>
14886
14887 <interface
14888 name="ICanShowWindowEvent" extends="IVetoEvent"
14889 uuid="adf292b0-92c9-4a77-9d35-e058b39fe0b9"
14890 wsmap="managed" autogen="VBoxEvent" id="OnCanShowWindow"
14891 waitable="true"
14892 >
14893 <desc>
14894 Notification when a call to
14895 <link to="IMachine::canShowConsoleWindow"/> is made by a
14896 front-end to check if a subsequent call to
14897 <link to="IMachine::showConsoleWindow"/> can succeed.
14898
14899 The callee should give an answer appropriate to the current
14900 machine state using event veto. This answer must
14901 remain valid at least until the next
14902 <link to="IConsole::state">machine state</link> change.
14903 </desc>
14904 </interface>
14905
14906 <interface
14907 name="IShowWindowEvent" extends="IEvent"
14908 uuid="B0A0904D-2F05-4D28-855F-488F96BAD2B2"
14909 wsmap="managed" autogen="VBoxEvent" id="OnShowWindow"
14910 waitable="true"
14911 >
14912 <desc>
14913 Notification when a call to
14914 <link to="IMachine::showConsoleWindow"/>
14915 requests the console window to be activated and brought to
14916 foreground on the desktop of the host PC.
14917
14918 This notification should cause the VM console process to
14919 perform the requested action as described above. If it is
14920 impossible to do it at a time of this notification, this
14921 method should return a failure.
14922
14923 Note that many modern window managers on many platforms
14924 implement some sort of focus stealing prevention logic, so
14925 that it may be impossible to activate a window without the
14926 help of the currently active application (which is supposedly
14927 an initiator of this notification). In this case, this method
14928 must return a non-zero identifier that represents the
14929 top-level window of the VM console process. The caller, if it
14930 represents a currently active process, is responsible to use
14931 this identifier (in a platform-dependent manner) to perform
14932 actual window activation.
14933
14934 This method must set @a winId to zero if it has performed all
14935 actions necessary to complete the request and the console
14936 window is now active and in foreground, to indicate that no
14937 further action is required on the caller's side.
14938 </desc>
14939 <attribute name="winId" type="unsigned long long">
14940 <desc>
14941 Platform-dependent identifier of the top-level VM console
14942 window, or zero if this method has performed all actions
14943 necessary to implement the <i>show window</i> semantics for
14944 the given platform and/or this VirtualBox front-end.
14945 </desc>
14946 </attribute>
14947 </interface>
14948
14949 <module name="VBoxSVC" context="LocalServer">
14950 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
14951 namespace="virtualbox.org">
14952 <interface name="IVirtualBox" default="yes"/>
14953 </class>
14954 </module>
14955
14956 <module name="VBoxC" context="InprocServer" threadingModel="Free">
14957 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
14958 namespace="virtualbox.org">
14959 <interface name="ISession" default="yes"/>
14960 </class>
14961
14962 <class name="Console" uuid="577230FF-164F-4CAC-8548-312D8275A4A7"
14963 namespace="virtualbox.org">
14964 <interface name="IConsole" default="yes"/>
14965 </class>
14966 </module>
14967
14968</library>
14969
14970</idl>
14971
14972<!-- 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