VirtualBox

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

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

Main: partial revert or r67042, bring back the overwrite parameter

  • Property svn:eol-style set to native
File size: 564.8 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 and the VBoxManage command-line interface) are technically
81 front-ends to the Main API and only use the interfaces that are documented
82 in this Main API documentation. This ensures that, with any given release
83 version of VirtualBox, all capabilities of the product that could be useful
84 to an external client program are always exposed by way of this API.
85
86 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
87 contains two public component classes:
88 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
89 implement IVirtualBox and ISession interfaces respectively. These two classes
90 are of supreme importance and will be needed in order for any front-end
91 program to do anything useful. It is recommended to read the documentation of
92 the mentioned interfaces first.
93
94 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
95 there can be only one object of this class on the local machine at any given
96 time. This object is a parent of many other objects in the VirtualBox COM
97 library and lives in the VBoxSVC process. In fact, when you create an instance
98 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
99 process is already running, starts it if not, and returns you a reference to
100 the <tt>VirtualBox</tt> object created in this process. When the last reference
101 to this object is released, the VBoxSVC process ends (with a 5 second delay to
102 protect from too frequent restarts).
103
104 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
105 as many <tt>Session</tt> objects as you need but all of them will live in a
106 process which issues the object instantiation call. <tt>Session</tt> objects
107 represent virtual machine sessions which are used to configure virtual
108 machines and control their execution.
109</desc>
110
111<if target="midl">
112 <cpp line="enum {"/>
113 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
114 <cpp line=" kTypeLibraryMinorVersion = 0"/>
115 <cpp line="};"/>
116</if>
117
118<if target="xpidl">
119 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
120 <cpp>
121/* currently, nsISupportsImpl.h lacks the below-like macros */
122
123#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
124#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
125#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI NS_IMPL_QUERY_INTERFACE3_CI
126#define NS_IMPL_THREADSAFE_QUERY_INTERFACE4_CI NS_IMPL_QUERY_INTERFACE4_CI
127
128
129#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
130# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
131 NS_IMPL_THREADSAFE_ADDREF(_class) \
132 NS_IMPL_THREADSAFE_RELEASE(_class) \
133 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
134 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
135#endif
136
137#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
138# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
139 NS_IMPL_THREADSAFE_ADDREF(_class) \
140 NS_IMPL_THREADSAFE_RELEASE(_class) \
141 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
142 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
143#endif
144
145#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_CI
146# define NS_IMPL_THREADSAFE_ISUPPORTS3_CI(_class, _i1, _i2, _i3) \
147 NS_IMPL_THREADSAFE_ADDREF(_class) \
148 NS_IMPL_THREADSAFE_RELEASE(_class) \
149 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI(_class, _i1, _i2, _i3) \
150 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
151#endif
152
153#ifndef NS_IMPL_THREADSAFE_ISUPPORTS4_CI
154# define NS_IMPL_THREADSAFE_ISUPPORTS4_CI(_class, _i1, _i2, _i3, _i4) \
155 NS_IMPL_THREADSAFE_ADDREF(_class) \
156 NS_IMPL_THREADSAFE_RELEASE(_class) \
157 NS_IMPL_THREADSAFE_QUERY_INTERFACE4_CI(_class, _i1, _i2, _i3, _i4) \
158 NS_IMPL_CI_INTERFACE_GETTER4(_class, _i1, _i2, _i3, _i4)
159#endif
160
161#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
162# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
163 NS_INTERFACE_MAP_BEGIN(_class) \
164 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
165 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
166 NS_IMPL_QUERY_CLASSINFO(_class) \
167 NS_INTERFACE_MAP_END
168#endif
169
170#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
171# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
172 _i2, _ic2) \
173 NS_INTERFACE_MAP_BEGIN(_class) \
174 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
175 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
176 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
177 NS_IMPL_QUERY_CLASSINFO(_class) \
178 NS_INTERFACE_MAP_END
179#endif
180
181#ifndef NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
182# define NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
183 _i2, _ic2, _i3, _ic3) \
184 NS_INTERFACE_MAP_BEGIN(_class) \
185 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
186 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
187 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i3, _ic3) \
188 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
189 NS_IMPL_QUERY_CLASSINFO(_class) \
190 NS_INTERFACE_MAP_END
191#endif
192
193#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
194#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
195#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
196
197#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
198# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
199 NS_IMPL_THREADSAFE_ADDREF(_class) \
200 NS_IMPL_THREADSAFE_RELEASE(_class) \
201 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
202 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
203#endif
204
205#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
206# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
207 _i2, _ic2) \
208 NS_IMPL_THREADSAFE_ADDREF(_class) \
209 NS_IMPL_THREADSAFE_RELEASE(_class) \
210 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
211 _i2, _ic2) \
212 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
213#endif
214
215#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI
216# define NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI(_class, _i1, _ic1, \
217 _i2, _ic2, _i3, _ic3) \
218 NS_IMPL_THREADSAFE_ADDREF(_class) \
219 NS_IMPL_THREADSAFE_RELEASE(_class) \
220 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
221 _i2, _ic2, _i3, _ic3) \
222 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
223#endif
224
225 </cpp>
226</if>
227
228<library
229 name="VirtualBox"
230 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
231 version="1.3"
232 desc="VirtualBox Type Library"
233 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
234 supportsErrorInfo="yes"
235>
236
237
238 <!--
239 // COM result codes for VirtualBox
240 /////////////////////////////////////////////////////////////////////////
241 -->
242
243 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
244 <desc>
245 This section describes all VirtualBox-specific COM result codes that may
246 be returned by methods of VirtualBox COM interfaces in addition to
247 standard COM result codes.
248
249 Note that along with the result code, every VirtualBox method returns
250 extended error information through the IVirtualBoxErrorInfo interface on
251 failure. This interface is a preferred way to present the error to the end
252 user because it contains a human readable description of the error. Raw
253 result codes, both standard and described in this section, are intended to
254 be used by programs to analyze the reason of a failure and select an
255 appropriate course of action without involving the end user (for example,
256 retry the operation later or make a different call).
257
258 The standard COM result codes that may originate from our methods include:
259
260 <table>
261 <tr><td>E_INVALIDARG</td>
262 <td>
263 Returned when the value of the method's argument is not within the range
264 of valid values. This should not be confused with situations when the
265 value is within the range but simply doesn't suit the current object
266 state and there is a possibility that it will be accepted later (in such
267 cases VirtualBox-specific codes are returned, for example,
268 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
269 </td>
270 </tr>
271 <tr><td>E_POINTER</td>
272 <td>
273 Returned if a memory pointer for the output argument is invalid (for
274 example, @c null). Note that when pointers representing input
275 arguments (such as strings) are invalid, E_INVALIDARG is returned.
276 </td>
277 </tr>
278 <tr><td>E_ACCESSDENIED</td>
279 <td>
280 Returned when the called object is not ready. Since the lifetime of a
281 public COM object cannot be fully controlled by the implementation,
282 VirtualBox maintains the readiness state for all objects it creates and
283 returns this code in response to any method call on the object that was
284 deactivated by VirtualBox and is not functioning any more.
285 </td>
286 </tr>
287 <tr><td>E_OUTOFMEMORY</td>
288 <td>
289 Returned when a memory allocation operation fails.
290 </td>
291 </tr>
292 </table>
293 </desc>
294 </descGroup>
295
296 <!--
297 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
298 everything in <result>/<desc> after (and including) the first dot, so express
299 the matter of the error code in the first sentence and keep it short.
300 -->
301
302 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
303 <desc>
304 Object corresponding to the supplied arguments does not exist.
305 </desc>
306 </result>
307
308 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
309 <desc>
310 Current virtual machine state prevents the operation.
311 </desc>
312 </result>
313
314 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
315 <desc>
316 Virtual machine error occurred attempting the operation.
317 </desc>
318 </result>
319
320 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
321 <desc>
322 File not accessible or erroneous file contents.
323 </desc>
324 </result>
325
326 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
327 <desc>
328 Runtime subsystem error.
329 </desc>
330 </result>
331
332 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
333 <desc>
334 Pluggable Device Manager error.
335 </desc>
336 </result>
337
338 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
339 <desc>
340 Current object state prohibits operation.
341 </desc>
342 </result>
343
344 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
345 <desc>
346 Host operating system related error.
347 </desc>
348 </result>
349
350 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
351 <desc>
352 Requested operation is not supported.
353 </desc>
354 </result>
355
356 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
357 <desc>
358 Invalid XML found.
359 </desc>
360 </result>
361
362 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
363 <desc>
364 Current session state prohibits operation.
365 </desc>
366 </result>
367
368 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
369 <desc>
370 Object being in use prohibits operation.
371 </desc>
372 </result>
373
374 <!--
375 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
376 everything in <result>/<desc> after (and including) the first dot, so express
377 the matter of the error code in the first sentence and keep it short.
378 -->
379
380 <descGroup/>
381
382 <!--
383 // all common enums
384 /////////////////////////////////////////////////////////////////////////
385 -->
386
387 <enum name="SettingsVersion"
388 uuid="52bd6f5f-1adb-4493-975d-581a9c4b803f"
389 >
390 <desc>Settings version of VirtualBox settings files. This is written to
391 the "version" attribute of the root "VirtualBox" element in the settings
392 file XML and indicates which VirtualBox version wrote the file.
393 </desc>
394
395 <const name="Null" value="0">
396 <desc>Null value, indicates invalid version.</desc>
397 </const>
398 <const name="v1_0" value="1">
399 <desc>Legacy settings version, not currently supported.</desc>
400 </const>
401 <const name="v1_1" value="2">
402 <desc>Legacy settings version, not currently supported.</desc>
403 </const>
404 <const name="v1_2" value="3">
405 <desc>Legacy settings version, not currently supported.</desc>
406 </const>
407 <const name="v1_3pre" value="4">
408 <desc>Legacy settings version, not currently supported.</desc>
409 </const>
410 <const name="v1_3" value="5">
411 <desc>Settings version "1.3", written by VirtualBox 2.0.12.</desc>
412 <!--
413 Machine XML: Capitalization of Uart, Lpt elements and many attributes changed.
414 -->
415 </const>
416 <const name="v1_4" value="6">
417 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
418 <!--
419 VirtualBox.xml: big DiskRegistry -> MediaRegistry revamp, various HardDisk types merged
420 (was VirtualDiskImage, VMDKImage, VHDImage, ISCSIHardDisk, CustomHardDisk, DiffHardDisk)
421 -->
422 </const>
423 <const name="v1_5" value="7">
424 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
425 <!-- 2008-09-04: 2.0.0 released
426 2008-11-20: settings version 1.5 introduced
427 2008-12-17: 2.1.0 released
428 Machine changes:
429 guest OS identifiers changed;
430 Machine/Hardware/Display/MonitorCount renamed to monitorCount;
431 Machine/Hardware/Display/Accelerate3D renamed to accelerate3D;
432 Machine/Hardware/CPU/CPUCount/@count changed to CPU/@count
433 -->
434 </const>
435 <const name="v1_6" value="8">
436 <desc>Settings version "1.6", written by VirtualBox 2.1.4 (at least).</desc>
437 <!-- 2008-12-17: 2.1.0 released
438 2008-12-19: settings version 1.6 introduced (is in 2.1 branch)
439 2009-04-08: 2.2.0 released
440 Machine changes: remove all Machine/Hardware/Network/Adapter/HostInterface[@TAPSetup or @TAPTerminate]/ attributes (done)
441 -->
442 </const>
443 <const name="v1_7" value="9">
444 <desc>Settings version "1.7", written by VirtualBox 2.2.x and 3.0.x.</desc>
445 <!-- 2008-12-17: 2.1.0 released
446 2009-03-11: settings version 1.7 introduced (is in 2.2 branch)
447 2009-04-08: 2.2.0 released
448 VirtualBox.xml additions: NetserviceRegistry with DHCPServers (done)
449 Machine changes: HardDiskAttachments is now StorageControllers (done)
450 -->
451 </const>
452 <const name="v1_8" value="10">
453 <desc>Intermediate settings version "1.8", understood by VirtualBox 3.1.x.</desc>
454 <!-- Machine additions: Display/@accelerate2DVideo (done)
455 -->
456 </const>
457 <const name="v1_9" value="11">
458 <desc>Settings version "1.9", written by VirtualBox 3.1.x.</desc>
459 <!-- The big storage controller / DVD / Floppy rework (done)
460 -->
461 </const>
462 <const name="v1_10" value="12">
463 <desc>Settings version "1.10", written by VirtualBox 3.2.x.</desc>
464 <!-- Machine changes: RTC localOrUTC (done)
465 CPU hot-plug support
466 -->
467 </const>
468 <const name="v1_11" value="13">
469 <desc>Settings version "1.11", written by VirtualBox 4.0.x.</desc>
470 <!-- Machine changes: HD Audio controller, per-machine disk registries
471 -->
472 </const>
473 <const name="Future" value="99999">
474 <desc>Settings version greater than "1.11", written by a future VirtualBox version.</desc>
475 </const>
476 </enum>
477
478 <enum
479 name="AccessMode"
480 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
481 >
482 <desc>
483 Access mode for opening files.
484 </desc>
485
486 <const name="ReadOnly" value="1"/>
487 <const name="ReadWrite" value="2"/>
488 </enum>
489
490 <enum
491 name="MachineState"
492 uuid="ec6c6a9e-113d-4ff4-b44f-0b69f21c97fe"
493 >
494 <desc>
495 Virtual machine execution state.
496
497 This enumeration represents possible values of the <link
498 to="IMachine::state"/> attribute.
499
500 Below is the basic virtual machine state diagram. It shows how the state
501 changes during virtual machine execution. The text in square braces shows
502 a method of the IConsole interface that performs the given state
503 transition.
504
505 <pre>
506 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
507 V |
508 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
509 | | | | V |
510 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
511 | | ^ | ^ |
512 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
513 | ^ | | | |
514 | | +-----------------------------------------+-|-------------------+ +
515 | | | | |
516 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
517 | | | |
518 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
519 | | |
520 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
521 </pre>
522
523 Note that states to the right from PoweredOff, Aborted and Saved in the
524 above diagram are called <i>online VM states</i>. These states
525 represent the virtual machine which is being executed in a dedicated
526 process (usually with a GUI window attached to it where you can see the
527 activity of the virtual machine and interact with it). There are two
528 special pseudo-states, FirstOnline and LastOnline, that can be used in
529 relational expressions to detect if the given machine state is online or
530 not:
531
532 <pre>
533 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
534 machine.GetState() &lt;= MachineState_LastOnline)
535 {
536 ...the machine is being executed...
537 }
538 </pre>
539
540 When the virtual machine is in one of the online VM states (that is, being
541 executed), only a few machine settings can be modified. Methods working
542 with such settings contain an explicit note about that. An attempt to
543 change any oter setting or perform a modifying operation during this time
544 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
545
546 All online states except Running, Paused and Stuck are transitional: they
547 represent temporary conditions of the virtual machine that will last as
548 long as the operation that initiated such a condition.
549
550 The Stuck state is a special case. It means that execution of the machine
551 has reached the "Guru Meditation" condition. This condition indicates an
552 internal VMM (virtual machine manager) failure which may happen as a
553 result of either an unhandled low-level virtual hardware exception or one
554 of the recompiler exceptions (such as the <i>too-many-traps</i>
555 condition).
556
557 Note also that any online VM state may transit to the Aborted state. This
558 happens if the process that is executing the virtual machine terminates
559 unexpectedly (for example, crashes). Other than that, the Aborted state is
560 equivalent to PoweredOff.
561
562 There are also a few additional state diagrams that do not deal with
563 virtual machine execution and therefore are shown separately. The states
564 shown on these diagrams are called <i>offline VM states</i> (this includes
565 PoweredOff, Aborted and Saved too).
566
567 The first diagram shows what happens when a lengthy setup operation is
568 being executed (such as <link to="IMachine::attachDevice"/>).
569
570 <pre>
571 +----------------------------------(same state as before the call)------+
572 | |
573 +-&gt; PoweredOff --+ |
574 | | |
575 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
576 | |
577 +-&gt; Saved -------+
578 </pre>
579
580 The next two diagrams demonstrate the process of taking a snapshot of a
581 powered off virtual machine, restoring the state to that as of a snapshot
582 or deleting a snapshot, respectively.
583
584 <pre>
585 +----------------------------------(same state as before the call)------+
586 | |
587 +-&gt; PoweredOff --+ |
588 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
589 +-&gt; Aborted -----+
590
591 +-&gt; PoweredOff --+
592 | |
593 | Aborted -----+--&gt;[restoreSnapshot() ]-------&gt; RestoringSnapshot -+
594 | | [deleteSnapshot() ]-------&gt; DeletingSnapshot --+
595 +-&gt; Saved -------+ |
596 | |
597 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
598 </pre>
599
600 Note that the Saving state is present in both the offline state group and
601 online state group. Currently, the only way to determine what group is
602 assumed in a particular case is to remember the previous machine state: if
603 it was Running or Paused, then Saving is an online state, otherwise it is
604 an offline state. This inconsistency may be removed in one of the future
605 versions of VirtualBox by adding a new state.
606
607 <note internal="yes">
608 For whoever decides to touch this enum: In order to keep the
609 comparisons involving FirstOnline and LastOnline pseudo-states valid,
610 the numeric values of these states must be correspondingly updated if
611 needed: for any online VM state, the condition
612 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
613 @c true. The same relates to transient states for which
614 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
615 @c true.
616 </note>
617 </desc>
618
619 <const name="Null" value="0">
620 <desc>Null value (never used by the API).</desc>
621 </const>
622 <const name="PoweredOff" value="1">
623 <desc>
624 The machine is not running and has no saved execution state; it has
625 either never been started or been shut down successfully.
626 </desc>
627 </const>
628 <const name="Saved" value="2">
629 <desc>
630 The machine is not currently running, but the execution state of the machine
631 has been saved to an external file when it was running, from where
632 it can be resumed.
633 </desc>
634 </const>
635 <const name="Teleported" value="3">
636 <desc>
637 The machine was teleported to a different host (or process) and then
638 powered off. Take care when powering it on again may corrupt resources
639 it shares with the teleportation target (e.g. disk and network).
640 </desc>
641 </const>
642 <const name="Aborted" value="4">
643 <desc>
644 The process running the machine has terminated abnormally. This may
645 indicate a crash of the VM process in host execution context, or
646 the VM process has been terminated externally.
647 </desc>
648 </const>
649 <const name="Running" value="5">
650 <desc>
651 The machine is currently being executed.
652 <note internal="yes">
653 For whoever decides to touch this enum: In order to keep the
654 comparisons in the old source code valid, this state must immediately
655 precede the Paused state.
656 TODO: Lift this spectacularly wonderful restriction.
657 </note>
658 </desc>
659 </const>
660 <const name="Paused" value="6">
661 <desc>
662 Execution of the machine has been paused.
663 <note internal="yes">
664 For whoever decides to touch this enum: In order to keep the
665 comparisons in the old source code valid, this state must immediately
666 follow the Running state.
667 TODO: Lift this spectacularly wonderful restriction.
668 </note>
669 </desc>
670 </const>
671 <const name="Stuck" value="7">
672 <desc>
673 Execution of the machine has reached the "Guru Meditation"
674 condition. This indicates a severe error in the hypervisor itself.
675 <note internal="yes">
676 bird: Why this uncool name? Could we rename it to "GuruMeditation" or
677 "Guru", perhaps? Or are there some other VMM states that are
678 intended to be lumped in here as well?
679 </note>
680 </desc>
681 </const>
682 <const name="Teleporting" value="8">
683 <desc>
684 The machine is about to be teleported to a different host or process.
685 It is possible to pause a machine in this state, but it will go to the
686 @c TeleportingPausedVM state and it will not be
687 possible to resume it again unless the teleportation fails.
688 </desc>
689 </const>
690 <const name="LiveSnapshotting" value="9">
691 <desc>
692 A live snapshot is being taken. The machine is running normally, but
693 some of the runtime configuration options are inaccessible. Also, if
694 paused while in this state it will transition to
695 @c Saving and it will not be resume the
696 execution until the snapshot operation has completed.
697 </desc>
698 </const>
699 <const name="Starting" value="10">
700 <desc>
701 Machine is being started after powering it on from a
702 zero execution state.
703 </desc>
704 </const>
705 <const name="Stopping" value="11">
706 <desc>
707 Machine is being normally stopped powering it off, or after the guest OS
708 has initiated a shutdown sequence.
709 </desc>
710 </const>
711 <const name="Saving" value="12">
712 <desc>
713 Machine is saving its execution state to a file, or an online
714 snapshot of the machine is being taken.
715 </desc>
716 </const>
717 <const name="Restoring" value="13">
718 <desc>
719 Execution state of the machine is being restored from a file
720 after powering it on from the saved execution state.
721 </desc>
722 </const>
723 <const name="TeleportingPausedVM" value="14">
724 <desc>
725 The machine is being teleported to another host or process, but it is
726 not running. This is the paused variant of the
727 @c state.
728 </desc>
729 </const>
730 <const name="TeleportingIn" value="15">
731 <desc>
732 Teleporting the machine state in from another host or process.
733 </desc>
734 </const>
735 <const name="FaultTolerantSyncing" value="16">
736 <desc>
737 The machine is being synced with a fault tolerant VM running elsewhere.
738 </desc>
739 </const>
740 <const name="DeletingSnapshotOnline" value="17">
741 <desc>
742 Like @c DeletingSnapshot, but the merging of media is ongoing in
743 the background while the machine is running.
744 </desc>
745 </const>
746 <const name="DeletingSnapshotPaused" value="18">
747 <desc>
748 Like @c DeletingSnapshotOnline, but the machine was paused when the
749 merging of differencing media was started.
750 </desc>
751 </const>
752 <const name="RestoringSnapshot" value="19">
753 <desc>
754 A machine snapshot is being restored; this typically does not take long.
755 </desc>
756 </const>
757 <const name="DeletingSnapshot" value="20">
758 <desc>
759 A machine snapshot is being deleted; this can take a long time since this
760 may require merging differencing media. This value indicates that the
761 machine is not running while the snapshot is being deleted.
762 </desc>
763 </const>
764 <const name="SettingUp" value="21">
765 <desc>
766 Lengthy setup operation is in progress.
767 </desc>
768 </const>
769
770 <const name="FirstOnline" value="5" wsmap="suppress"> <!-- Running -->
771 <desc>
772 Pseudo-state: first online state (for use in relational expressions).
773 </desc>
774 </const>
775 <const name="LastOnline" value="18" wsmap="suppress"> <!-- DeletingSnapshotPaused -->
776 <desc>
777 Pseudo-state: last online state (for use in relational expressions).
778 </desc>
779 </const>
780
781 <const name="FirstTransient" value="8" wsmap="suppress"> <!-- Teleporting -->
782 <desc>
783 Pseudo-state: first transient state (for use in relational expressions).
784 </desc>
785 </const>
786 <const name="LastTransient" value="21" wsmap="suppress"> <!-- SettingUp -->
787 <desc>
788 Pseudo-state: last transient state (for use in relational expressions).
789 </desc>
790 </const>
791
792 </enum>
793
794 <enum
795 name="SessionState"
796 uuid="cf2700c0-ea4b-47ae-9725-7810114b94d8"
797 >
798 <desc>
799 Session state. This enumeration represents possible values of
800 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
801 attributes.
802 </desc>
803
804 <const name="Null" value="0">
805 <desc>Null value (never used by the API).</desc>
806 </const>
807 <const name="Unlocked" value="1">
808 <desc>
809 In <link to="IMachine::sessionState"/>, this means that the machine
810 is not locked for any sessions.
811
812 In <link to="ISession::state"/>, this means that no machine is
813 currently locked for this session.
814 </desc>
815 </const>
816 <const name="Locked" value="2">
817 <desc>
818 In <link to="IMachine::sessionState"/>, this means that the machine
819 is currently locked for a session, whose process identifier can
820 then be found in the <link to="IMachine::sessionPid" /> attribute.
821
822 In <link to="ISession::state"/>, this means that a machine is
823 currently locked for this session, and the mutable machine object
824 can be found in the <link to="ISession::machine"/> attribute
825 (see <link to="IMachine::lockMachine" /> for details).
826 </desc>
827 </const>
828 <const name="Spawning" value="3">
829 <desc>
830 A new process is being spawned for the machine as a result of
831 <link to="IMachine::launchVMProcess"/> call. This state also occurs
832 as a short transient state during an <link to="IMachine::lockMachine"/>
833 call.
834 </desc>
835 </const>
836 <const name="Unlocking" value="4">
837 <desc>
838 The session is being unlocked.
839 </desc>
840 </const>
841 </enum>
842
843 <enum
844 name="CPUPropertyType"
845 uuid="24d356a6-2f45-4abd-b977-1cbe9c4701f5"
846 >
847 <desc>
848 Virtual CPU property type. This enumeration represents possible values of the
849 IMachine get- and setCPUProperty methods.
850 </desc>
851 <const name="Null" value="0">
852 <desc>Null value (never used by the API).</desc>
853 </const>
854 <const name="PAE" value="1">
855 <desc>
856 This setting determines whether VirtualBox will expose the Physical Address
857 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
858 is not available, it will not be reported.
859 </desc>
860 </const>
861 <const name="Synthetic" value="2">
862 <desc>
863 This setting determines whether VirtualBox will expose a synthetic CPU to the guest to allow
864 teleporting between host systems that differ significantly.
865 </desc>
866 </const>
867 </enum>
868
869
870 <enum
871 name="HWVirtExPropertyType"
872 uuid="ce81dfdd-d2b8-4a90-bbea-40ee8b7ffcee"
873 >
874 <desc>
875 Hardware virtualization property type. This enumeration represents possible values
876 for the <link to="IMachine::getHWVirtExProperty"/> and
877 <link to="IMachine::setHWVirtExProperty"/> methods.
878 </desc>
879 <const name="Null" value="0">
880 <desc>Null value (never used by the API).</desc>
881 </const>
882 <const name="Enabled" value="1">
883 <desc>
884 Whether hardware virtualization (VT-x/AMD-V) is enabled at all. If
885 such extensions are not available, they will not be used.
886 </desc>
887 </const>
888 <const name="Exclusive" value="2">
889 <desc>
890 Whether hardware virtualization is used exclusively by VirtualBox. When enabled,
891 VirtualBox assumes it can acquire full and exclusive access to the VT-x or AMD-V
892 feature of the host. To share these with other hypervisors, you must disable this property.
893 </desc>
894 </const>
895 <const name="VPID" value="3">
896 <desc>
897 Whether VT-x VPID is enabled. If this extension is not available, it will not be used.
898 </desc>
899 </const>
900 <const name="NestedPaging" value="4">
901 <desc>
902 Whether Nested Paging is enabled. If this extension is not available, it will not be used.
903 </desc>
904 </const>
905 <const name="LargePages" value="5">
906 <desc>
907 Whether large page allocation is enabled; requires nested paging and a 64 bits host.
908 </desc>
909 </const>
910 <const name="Force" value="6">
911 <desc>
912 Whether the VM should fail to start if hardware virtualization (VT-x/AMD-V) cannot be used. If
913 not set, there will be an automatic fallback to software virtualization.
914 </desc>
915 </const>
916 </enum>
917
918 <enum
919 name="FaultToleranceState"
920 uuid="5124f7ec-6b67-493c-9dee-ee45a44114e1"
921 >
922 <desc>
923 Used with <link to="IMachine::faultToleranceState" />.
924 </desc>
925 <const name="Inactive" value="1">
926 <desc>No fault tolerance enabled.</desc>
927 </const>
928 <const name="Master" value="2">
929 <desc>Fault tolerant master VM.</desc>
930 </const>
931 <const name="Standby" value="3">
932 <desc>Fault tolerant standby VM.</desc>
933 </const>
934 </enum>
935
936 <enum
937 name="LockType"
938 uuid="138b53f8-db4b-47c5-b32b-4ef52f769413"
939 >
940 <desc>
941 Used with <link to="IMachine::lockMachine" />.
942 </desc>
943 <const name="Write" value="2">
944 <desc>Lock the machine for writing.</desc>
945 </const>
946 <const name="Shared" value="1">
947 <desc>Request only a shared read lock for remote-controlling the machine.</desc>
948 </const>
949 </enum>
950
951 <enum
952 name="SessionType"
953 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
954 >
955 <desc>
956 Session type. This enumeration represents possible values of the
957 <link to="ISession::type"/> attribute.
958 </desc>
959
960 <const name="Null" value="0">
961 <desc>Null value (never used by the API).</desc>
962 </const>
963 <const name="WriteLock" value="1">
964 <desc>
965 Session has acquired an exclusive write lock on a machine
966 using <link to="IMachine::lockMachine"/>.
967 </desc>
968 </const>
969 <const name="Remote" value="2">
970 <desc>
971 Session has launched a VM process using
972 <link to="IMachine::launchVMProcess"/>
973 </desc>
974 </const>
975 <const name="Shared" value="3">
976 <desc>
977 Session has obtained a link to another session using
978 <link to="IMachine::lockMachine"/>
979 </desc>
980 </const>
981 </enum>
982
983 <enum
984 name="DeviceType"
985 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
986 >
987 <desc>
988 Device type.
989 </desc>
990 <const name="Null" value="0">
991 <desc>
992 Null value, may also mean "no device" (not allowed for
993 <link to="IConsole::getDeviceActivity"/>).
994 </desc>
995 </const>
996 <const name="Floppy" value="1">
997 <desc>Floppy device.</desc>
998 </const>
999 <const name="DVD" value="2">
1000 <desc>CD/DVD-ROM device.</desc>
1001 </const>
1002 <const name="HardDisk" value="3">
1003 <desc>Hard disk device.</desc>
1004 </const>
1005 <const name="Network" value="4">
1006 <desc>Network device.</desc>
1007 </const>
1008 <const name="USB" value="5">
1009 <desc>USB device.</desc>
1010 </const>
1011 <const name="SharedFolder" value="6">
1012 <desc>Shared folder device.</desc>
1013 </const>
1014 </enum>
1015
1016 <enum
1017 name="DeviceActivity"
1018 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
1019 >
1020 <desc>
1021 Device activity for <link to="IConsole::getDeviceActivity"/>.
1022 </desc>
1023
1024 <const name="Null" value="0"/>
1025 <const name="Idle" value="1"/>
1026 <const name="Reading" value="2"/>
1027 <const name="Writing" value="3"/>
1028 </enum>
1029
1030 <enum
1031 name="ClipboardMode"
1032 uuid="33364716-4008-4701-8f14-be0fa3d62950"
1033 >
1034 <desc>
1035 Host-Guest clipboard interchange mode.
1036 </desc>
1037
1038 <const name="Disabled" value="0"/>
1039 <const name="HostToGuest" value="1"/>
1040 <const name="GuestToHost" value="2"/>
1041 <const name="Bidirectional" value="3"/>
1042 </enum>
1043
1044 <enum
1045 name="Scope"
1046 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
1047 >
1048 <desc>
1049 Scope of the operation.
1050
1051 A generic enumeration used in various methods to define the action or
1052 argument scope.
1053 </desc>
1054
1055 <const name="Global" value="0"/>
1056 <const name="Machine" value="1"/>
1057 <const name="Session" value="2"/>
1058 </enum>
1059
1060 <enum
1061 name="BIOSBootMenuMode"
1062 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
1063 >
1064 <desc>
1065 BIOS boot menu mode.
1066 </desc>
1067
1068 <const name="Disabled" value="0"/>
1069 <const name="MenuOnly" value="1"/>
1070 <const name="MessageAndMenu" value="2"/>
1071 </enum>
1072
1073 <enum
1074 name="ProcessorFeature"
1075 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
1076 >
1077 <desc>
1078 CPU features.
1079 </desc>
1080
1081 <const name="HWVirtEx" value="0"/>
1082 <const name="PAE" value="1"/>
1083 <const name="LongMode" value="2"/>
1084 <const name="NestedPaging" value="3"/>
1085 </enum>
1086
1087 <enum
1088 name="FirmwareType"
1089 uuid="b903f264-c230-483e-ac74-2b37ce60d371"
1090 >
1091 <desc>
1092 Firmware type.
1093 </desc>
1094 <const name="BIOS" value="1">
1095 <desc>BIOS Firmware.</desc>
1096 </const>
1097 <const name="EFI" value="2">
1098 <desc>EFI Firmware, bitness detetced basing on OS type.</desc>
1099 </const>
1100 <const name="EFI32" value="3">
1101 <desc>Efi firmware, 32-bit.</desc>
1102 </const>
1103 <const name="EFI64" value="4">
1104 <desc>Efi firmware, 64-bit.</desc>
1105 </const>
1106 <const name="EFIDUAL" value="5">
1107 <desc>Efi firmware, combined 32 and 64-bit.</desc>
1108 </const>
1109 </enum>
1110
1111 <enum
1112 name="PointingHidType"
1113 uuid="0d3c17a2-821a-4b2e-ae41-890c6c60aa97"
1114 >
1115 <desc>
1116 Type of pointing device used in a virtual machine.
1117 </desc>
1118 <const name="None" value="1">
1119 <desc>No mouse.</desc>
1120 </const>
1121 <const name="PS2Mouse" value="2">
1122 <desc>PS/2 auxillary device, a.k.a. mouse.</desc>
1123 </const>
1124 <const name="USBMouse" value="3">
1125 <desc>USB mouse (relative pointer).</desc>
1126 </const>
1127 <const name="USBTablet" value="4">
1128 <desc>USB tablet (absolute pointer).</desc>
1129 </const>
1130 <const name="ComboMouse" value="5">
1131 <desc>Combined device, working as PS/2 or USB mouse, depending on guest behavior.
1132 Using of such device can have negative performance implications. </desc>
1133 </const>
1134 </enum>
1135
1136 <enum
1137 name="KeyboardHidType"
1138 uuid="5a5b0996-3a3e-44bb-9019-56979812cbcc"
1139 >
1140 <desc>
1141 Type of keyboard device used in a virtual machine.
1142 </desc>
1143 <const name="None" value="1">
1144 <desc>No keyboard.</desc>
1145 </const>
1146 <const name="PS2Keyboard" value="2">
1147 <desc>PS/2 keyboard.</desc>
1148 </const>
1149 <const name="USBKeyboard" value="3">
1150 <desc>USB keyboard.</desc>
1151 </const>
1152 <const name="ComboKeyboard" value="4">
1153 <desc>Combined device, working as PS/2 or USB keyboard, depending on guest behavior.
1154 Using of such device can have negative performance implications. </desc>
1155 </const>
1156 </enum>
1157
1158 <!--
1159 // IVirtualBoxErrorInfo
1160 /////////////////////////////////////////////////////////////////////////
1161 -->
1162
1163 <interface
1164 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1165 uuid="e053d3c0-f493-491b-a735-3a9f0b1feed4"
1166 supportsErrorInfo="no"
1167 wsmap="managed"
1168 >
1169 <desc>
1170 The IVirtualBoxErrorInfo interface represents extended error information.
1171
1172 Extended error information can be set by VirtualBox components after
1173 unsuccessful or partially successful method invocation. This information
1174 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1175 and then shown to the client in addition to the plain 32-bit result code.
1176
1177 In MS COM, this interface extends the IErrorInfo interface,
1178 in XPCOM, it extends the nsIException interface. In both cases,
1179 it provides a set of common attributes to retrieve error
1180 information.
1181
1182 Sometimes invocation of some component's method may involve methods of
1183 other components that may also fail (independently of this method's
1184 failure), or a series of non-fatal errors may precede a fatal error that
1185 causes method failure. In cases like that, it may be desirable to preserve
1186 information about all errors happened during method invocation and deliver
1187 it to the caller. The <link to="#next"/> attribute is intended
1188 specifically for this purpose and allows to represent a chain of errors
1189 through a single IVirtualBoxErrorInfo object set after method invocation.
1190
1191 Note that errors are stored to a chain in the reverse order, i.e. the
1192 initial error object you query right after method invocation is the last
1193 error set by the callee, the object it points to in the @a next attribute
1194 is the previous error and so on, up to the first error (which is the last
1195 in the chain).
1196 </desc>
1197
1198 <attribute name="resultCode" type="long" readonly="yes">
1199 <desc>
1200 Result code of the error.
1201 Usually, it will be the same as the result code returned
1202 by the method that provided this error information, but not
1203 always. For example, on Win32, CoCreateInstance() will most
1204 likely return E_NOINTERFACE upon unsuccessful component
1205 instantiation attempt, but not the value the component factory
1206 returned. Value is typed 'long', not 'result',
1207 to make interface usable from scripting languages.
1208 <note>
1209 In MS COM, there is no equivalent.
1210 In XPCOM, it is the same as nsIException::result.
1211 </note>
1212 </desc>
1213 </attribute>
1214
1215 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1216 <desc>
1217 UUID of the interface that defined the error.
1218 <note>
1219 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1220 data type.
1221 In XPCOM, there is no equivalent.
1222 </note>
1223 </desc>
1224 </attribute>
1225
1226 <attribute name="component" type="wstring" readonly="yes">
1227 <desc>
1228 Name of the component that generated the error.
1229 <note>
1230 In MS COM, it is the same as IErrorInfo::GetSource.
1231 In XPCOM, there is no equivalent.
1232 </note>
1233 </desc>
1234 </attribute>
1235
1236 <attribute name="text" type="wstring" readonly="yes">
1237 <desc>
1238 Text description of the error.
1239 <note>
1240 In MS COM, it is the same as IErrorInfo::GetDescription.
1241 In XPCOM, it is the same as nsIException::message.
1242 </note>
1243 </desc>
1244 </attribute>
1245
1246 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1247 <desc>
1248 Next error object if there is any, or @c null otherwise.
1249 <note>
1250 In MS COM, there is no equivalent.
1251 In XPCOM, it is the same as nsIException::inner.
1252 </note>
1253 </desc>
1254 </attribute>
1255
1256 </interface>
1257
1258 <!--
1259 // IVirtualBox
1260 /////////////////////////////////////////////////////////////////////////
1261 -->
1262
1263 <interface
1264 name="IDHCPServer" extends="$unknown"
1265 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1266 wsmap="managed"
1267 >
1268 <desc>
1269 The IDHCPServer interface represents the vbox dhcp server configuration.
1270
1271 To enumerate all the dhcp servers on the host, use the
1272 <link to="IVirtualBox::DHCPServers"/> attribute.
1273 </desc>
1274
1275 <attribute name="enabled" type="boolean">
1276 <desc>
1277 specifies if the dhcp server is enabled
1278 </desc>
1279 </attribute>
1280
1281 <attribute name="IPAddress" type="wstring" readonly="yes">
1282 <desc>
1283 specifies server IP
1284 </desc>
1285 </attribute>
1286
1287 <attribute name="networkMask" type="wstring" readonly="yes">
1288 <desc>
1289 specifies server network mask
1290 </desc>
1291 </attribute>
1292
1293 <attribute name="networkName" type="wstring" readonly="yes">
1294 <desc>
1295 specifies internal network name the server is used for
1296 </desc>
1297 </attribute>
1298
1299 <attribute name="lowerIP" type="wstring" readonly="yes">
1300 <desc>
1301 specifies from IP adrres in server address range
1302 </desc>
1303 </attribute>
1304
1305 <attribute name="upperIP" type="wstring" readonly="yes">
1306 <desc>
1307 specifies to IP adrres in server address range
1308 </desc>
1309 </attribute>
1310
1311 <method name="setConfiguration">
1312 <desc>
1313 configures the server
1314 <result name="E_INVALIDARG">
1315 invalid configuration supplied
1316 </result>
1317 </desc>
1318 <param name="IPAddress" type="wstring" dir="in">
1319 <desc>
1320 server IP address
1321 </desc>
1322 </param>
1323 <param name="networkMask" type="wstring" dir="in">
1324 <desc>
1325 server network mask
1326 </desc>
1327 </param>
1328 <param name="FromIPAddress" type="wstring" dir="in">
1329 <desc>
1330 server From IP address for address range
1331 </desc>
1332 </param>
1333 <param name="ToIPAddress" type="wstring" dir="in">
1334 <desc>
1335 server To IP address for address range
1336 </desc>
1337 </param>
1338 </method>
1339
1340 <method name="start">
1341 <desc>
1342 Starts DHCP server process.
1343 <result name="E_FAIL">
1344 Failed to start the process.
1345 </result>
1346 </desc>
1347 <param name="networkName" type="wstring" dir="in">
1348 <desc>
1349 Name of internal network DHCP server should attach to.
1350 </desc>
1351 </param>
1352 <param name="trunkName" type="wstring" dir="in">
1353 <desc>
1354 Name of internal network trunk.
1355 </desc>
1356 </param>
1357 <param name="trunkType" type="wstring" dir="in">
1358 <desc>
1359 Type of internal network trunk.
1360 </desc>
1361 </param>
1362 </method>
1363
1364 <method name="stop">
1365 <desc>
1366 Stops DHCP server process.
1367 <result name="E_FAIL">
1368 Failed to stop the process.
1369 </result>
1370 </desc>
1371 </method>
1372 </interface>
1373
1374 <interface
1375 name="IVirtualBox" extends="$unknown"
1376 uuid="6e123115-af60-49b3-9727-d3f302306cd2"
1377 wsmap="managed"
1378 >
1379 <desc>
1380 The IVirtualBox interface represents the main interface exposed by the
1381 product that provides virtual machine management.
1382
1383 An instance of IVirtualBox is required for the product to do anything
1384 useful. Even though the interface does not expose this, internally,
1385 IVirtualBox is implemented as a singleton and actually lives in the
1386 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1387 IVirtualBox can track the state of all virtual machines on a particular
1388 host, regardless of which frontend started them.
1389
1390 To enumerate all the virtual machines on the host, use the
1391 <link to="IVirtualBox::machines"/> attribute.
1392 </desc>
1393
1394 <attribute name="version" type="wstring" readonly="yes">
1395 <desc>
1396 A string representing the version number of the product. The
1397 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1398 last number represents the build number and will frequently change.
1399 </desc>
1400 </attribute>
1401
1402 <attribute name="revision" type="unsigned long" readonly="yes">
1403 <desc>
1404 The internal build revision number of the product.
1405 </desc>
1406 </attribute>
1407
1408 <attribute name="packageType" type="wstring" readonly="yes">
1409 <desc>
1410 A string representing the package type of this product. The
1411 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1412 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1413 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1414 this.
1415 </desc>
1416 </attribute>
1417
1418 <attribute name="homeFolder" type="wstring" readonly="yes">
1419 <desc>
1420 Full path to the directory where the global settings file,
1421 <tt>VirtualBox.xml</tt>, is stored.
1422
1423 In this version of VirtualBox, the value of this property is
1424 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1425 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1426 as determined by the host OS), and cannot be changed.
1427
1428 This path is also used as the base to resolve relative paths in
1429 places where relative paths are allowed (unless otherwise
1430 expressly indicated).
1431 </desc>
1432 </attribute>
1433
1434 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1435 <desc>
1436 Full name of the global settings file.
1437 The value of this property corresponds to the value of
1438 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1439 </desc>
1440 </attribute>
1441
1442 <attribute name="host" type="IHost" readonly="yes">
1443 <desc>Associated host object.</desc>
1444 </attribute>
1445
1446 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1447 <desc>Associated system information object.</desc>
1448 </attribute>
1449
1450 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1451 <desc>
1452 Array of machine objects registered within this VirtualBox instance.
1453 </desc>
1454 </attribute>
1455
1456 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1457 <desc>
1458 Array of medium objects known to this VirtualBox installation.
1459
1460 This array contains only base media. All differencing
1461 media of the given base medium can be enumerated using
1462 <link to="IMedium::children"/>.
1463 </desc>
1464 </attribute>
1465
1466 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1467 <desc>
1468 Array of CD/DVD image objects currently in use by this VirtualBox instance.
1469 </desc>
1470 </attribute>
1471
1472 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1473 <desc>
1474 Array of floppy image objects currently in use by this VirtualBox instance.
1475 </desc>
1476 </attribute>
1477
1478 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1479
1480 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1481
1482 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1483 <desc>
1484 Collection of global shared folders. Global shared folders are
1485 available to all virtual machines.
1486
1487 New shared folders are added to the collection using
1488 <link to="#createSharedFolder"/>. Existing shared folders can be
1489 removed using <link to="#removeSharedFolder"/>.
1490
1491 <note>
1492 In the current version of the product, global shared folders are not
1493 implemented and therefore this collection is always empty.
1494 </note>
1495 </desc>
1496 </attribute>
1497
1498 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1499 <desc>
1500 Associated performance collector object.
1501 </desc>
1502 </attribute>
1503
1504 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1505 <desc>
1506 dhcp server settings.
1507 </desc>
1508 </attribute>
1509
1510 <attribute name="eventSource" type="IEventSource" readonly="yes">
1511 <desc>
1512 Event source for VirtualBox events.
1513 </desc>
1514 </attribute>
1515
1516 <method name="composeMachineFilename">
1517 <desc>
1518 Returns a recommended full path of the settings file name for a new virtual
1519 machine.
1520
1521 This API serves two purposes:
1522
1523 <ul>
1524 <li>It gets called by <link to="#createMachine" /> if NULL is specified
1525 for the @a settingsFile argument there, which means that API should use
1526 a recommended default file name.</li>
1527
1528 <li>It can be called manually by a client software before creating a machine,
1529 e.g. if that client wants to pre-create the machine directory to create
1530 virtual hard disks in that directory together with the new machine
1531 settings file. In that case, the file name should be stripped from the
1532 full settings file path returned by this function to obtain the
1533 machine directory.</li>
1534 </ul>
1535
1536 See the <link to="IMachine::name"/> attribute description for more details about
1537 the machine name.
1538
1539 Every machine has a <i>settings file</i> that is used to store
1540 the machine configuration. This file is stored in a directory called the
1541 <i>machine settings subfolder</i>. Both the settings subfolder and file
1542 will have a name that corresponds to the name of the virtual machine.
1543 You can specify where to create the machine setting subfolder using the
1544 @a baseFolder argument.
1545
1546 If @a baseFolder is a @c null or empty string (which is recommended), the
1547 default machine settings folder
1548 (see <link to="ISystemProperties::defaultMachineFolder" />) will be used as
1549 a base folder for the created machine. Otherwise the given base folder
1550 will be used.
1551
1552 In either case, the full path to the resulting settings file has the
1553 following structure:
1554 <pre>
1555 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1556 </pre>
1557
1558 This method does not access the host disks. In particular, it does not check
1559 for whether a machine of this name already exists.
1560 </desc>
1561 <param name="name" type="wstring" dir="in">
1562 <desc>Suggested machine name.</desc>
1563 </param>
1564 <param name="baseFolder" type="wstring" dir="in">
1565 <desc>Base machine folder (optional).</desc>
1566 </param>
1567 <param name="file" type="wstring" dir="return">
1568 <desc>Fully qualified path where the machine would be created.</desc>
1569 </param>
1570 </method>
1571
1572 <method name="createMachine">
1573 <desc>
1574 Creates a new virtual machine by creating a machine settings file at
1575 the given location.
1576
1577 VirtualBox machine settings files use a custom XML dialect. Starting
1578 with VirtualBox 4.0, a ".vbox" extension is recommended, but not enforced,
1579 and machine files can be created at arbitrary locations. However, it is
1580 is recommended that machines are created in the "VirtualBox VMs" folder
1581 created in the user's home directory
1582 (e.g. "/home/user/VirtualBox VMs/name/name.vbox").
1583
1584 If you specify NULL for the @a settingsFile argument,
1585 <link to="#composeMachineFilename" /> is called automatically to have
1586 such a recommended name composed based on the machine name given in
1587 the @a name argument.
1588
1589 The new machine is created unregistered, with the initial configuration
1590 set according to the specified guest OS type. A typical sequence of
1591 actions to create a new virtual machine is as follows:
1592
1593 <ol>
1594 <li>
1595 Call this method to have a new machine created. The returned machine
1596 object will be "mutable" allowing to change any machine property.
1597 </li>
1598
1599 <li>
1600 Configure the machine using the appropriate attributes and methods.
1601 </li>
1602
1603 <li>
1604 Call <link to="IMachine::saveSettings" /> to write the settings
1605 to the machine's XML settings file. The configuration of the newly
1606 created machine will not be saved to disk until this method is
1607 called.
1608 </li>
1609
1610 <li>
1611 Call <link to="#registerMachine" /> to add the machine to the list
1612 of machines known to VirtualBox.
1613 </li>
1614 </ol>
1615
1616 The specified guest OS type identifier must match an ID of one of known
1617 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1618 array.
1619
1620 If the resulting settings file already exists, this method will fail
1621 with <link to="VBOX_E_FILE_ERROR"/>.
1622
1623 Optionally, you may specify an UUID of to assign to the created machine.
1624 However, this is not recommended and you should normally pass an empty
1625 (@c null) UUID to this method so that a new UUID will be automatically
1626 generated for every created machine. You can use UUID
1627 00000000-0000-0000-0000-000000000000 as @c null value.
1628
1629 <note>
1630 There is no way to change the name of the settings file or
1631 subfolder of the created machine directly.
1632 </note>
1633
1634 <result name="VBOX_E_OBJECT_NOT_FOUND">
1635 @a osTypeId is invalid.
1636 </result>
1637 <result name="VBOX_E_FILE_ERROR">
1638 Resulting settings file name is invalid or the settings file already
1639 exists or could not be created due to an I/O error.
1640 </result>
1641 <result name="E_INVALIDARG">
1642 @a name is empty or @c null.
1643 </result>
1644 </desc>
1645
1646 <param name="settingsFile" type="wstring" dir="in">
1647 <desc>Fully qualified path where the settings file should be created,
1648 or NULL for a default folder and file based on the @a name argument
1649 (see <link to="#composeMachineFilename" />).</desc>
1650 </param>
1651 <param name="name" type="wstring" dir="in">
1652 <desc>Machine name.</desc>
1653 </param>
1654 <param name="osTypeId" type="wstring" dir="in">
1655 <desc>Guest OS Type ID.</desc>
1656 </param>
1657 <param name="id" type="uuid" mod="string" dir="in">
1658 <desc>Machine UUID (optional).</desc>
1659 </param>
1660 <param name="forceOverwrite" type="boolean" dir="in">
1661 <desc>If true, an existing machine settings file will be overwritten.</desc>
1662 </param>
1663 <param name="machine" type="IMachine" dir="return">
1664 <desc>Created machine object.</desc>
1665 </param>
1666 </method>
1667
1668 <method name="openMachine">
1669 <desc>
1670 Opens a virtual machine from the existing settings file.
1671 The opened machine remains unregistered until you call
1672 <link to="#registerMachine"/>.
1673
1674 The specified settings file name can be absolute
1675 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1676 VirtualBox home directory</link>. This file must exist
1677 and must be a valid machine settings file whose contents
1678 will be used to construct the machine object.
1679
1680 <result name="VBOX_E_FILE_ERROR">
1681 Settings file name invalid, not found or sharing violation.
1682 </result>
1683 </desc>
1684 <param name="settingsFile" type="wstring" dir="in">
1685 <desc>
1686 Name of the machine settings file.
1687 </desc>
1688 </param>
1689 <param name="machine" type="IMachine" dir="return">
1690 <desc>Opened machine object.</desc>
1691 </param>
1692 <note>
1693 <link to="IMachine::settingsModified"/> will return
1694 @c false for the created machine, until any of machine settings
1695 are changed.
1696 </note>
1697 </method>
1698
1699 <method name="registerMachine">
1700 <desc>
1701
1702 Registers the machine previously created using
1703 <link to="#createMachine"/> or opened using
1704 <link to="#openMachine"/> within this VirtualBox installation. After
1705 successful method invocation, the
1706 <link to="IMachineRegisteredEvent"/> event is fired.
1707
1708 <note>
1709 This method implicitly calls <link to="IMachine::saveSettings"/>
1710 to save all current machine settings before registering it.
1711 </note>
1712
1713 <result name="VBOX_E_OBJECT_NOT_FOUND">
1714 No matching virtual machine found.
1715 </result>
1716 <result name="VBOX_E_INVALID_OBJECT_STATE">
1717 Virtual machine was not created within this VirtualBox instance.
1718 </result>
1719
1720 </desc>
1721 <param name="machine" type="IMachine" dir="in"/>
1722 </method>
1723
1724 <method name="findMachine">
1725 <desc>
1726 Attempts to find a virtual machine given its name or UUID.
1727
1728 <note>Inaccessible machines cannot be found by name, only by UUID, because their name
1729 cannot safely be determined.</note>
1730
1731 <result name="VBOX_E_OBJECT_NOT_FOUND">
1732 Could not find registered machine matching @a nameOrId.
1733 </result>
1734
1735 </desc>
1736 <param name="nameOrId" type="wstring" dir="in">
1737 <desc>What to search for. This can either be the UUID or the name of a virtual machine.</desc>
1738 </param>
1739 <param name="machine" type="IMachine" dir="return">
1740 <desc>Machine object, if found.</desc>
1741 </param>
1742 </method>
1743
1744 <method name="createAppliance">
1745 <desc>
1746 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1747 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1748 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1749 </desc>
1750 <param name="appliance" type="IAppliance" dir="return">
1751 <desc>New appliance.</desc>
1752 </param>
1753 </method>
1754
1755 <method name="createHardDisk">
1756 <desc>
1757 Creates a new base medium object that will use the given storage
1758 format and location for medium data.
1759
1760 Note that the actual storage unit is not created by this method. In
1761 order to do it, and before you are able to attach the created medium
1762 to virtual machines, you must call one of the following methods to
1763 allocate a format-specific storage unit at the specified location:
1764 <ul>
1765 <li><link to="IMedium::createBaseStorage"/></li>
1766 <li><link to="IMedium::createDiffStorage"/></li>
1767 </ul>
1768
1769 Some medium attributes, such as <link to="IMedium::id"/>, may
1770 remain uninitialized until the medium storage unit is successfully
1771 created by one of the above methods.
1772
1773 After the storage unit is successfully created, it will be
1774 accessible through the <link to="#findMedium"/> method and can
1775 be found in the <link to="#hardDisks"/> array.
1776
1777 The list of all storage formats supported by this VirtualBox
1778 installation can be obtained using
1779 <link to="ISystemProperties::mediumFormats"/>. If the @a format
1780 attribute is empty or @c null then the default storage format
1781 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1782 be used for creating a storage unit of the medium.
1783
1784 Note that the format of the location string is storage format specific.
1785 See <link to="IMedium::location"/> and IMedium for more details.
1786
1787 <result name="VBOX_E_OBJECT_NOT_FOUND">
1788 @a format identifier is invalid. See
1789 <link to="ISystemProperties::mediumFormats"/>.
1790 </result>
1791 <result name="VBOX_E_FILE_ERROR">
1792 @a location is a not valid file name (for file-based formats only).
1793 </result>
1794 </desc>
1795 <param name="format" type="wstring" dir="in">
1796 <desc>
1797 Identifier of the storage format to use for the new medium.
1798 </desc>
1799 </param>
1800 <param name="location" type="wstring" dir="in">
1801 <desc>
1802 Location of the storage unit for the new medium.
1803 </desc>
1804 </param>
1805 <param name="medium" type="IMedium" dir="return">
1806 <desc>Created medium object.</desc>
1807 </param>
1808 </method>
1809
1810 <method name="openMedium">
1811 <desc>
1812 Opens a medium from an existing storage location.
1813
1814 Once a medium has been opened, it can be passed to other VirtualBox
1815 methods, in particular to <link to="IMachine::attachDevice" />.
1816
1817 Depending on the given device type, the file at the storage location
1818 must be in one of the media formats understood by VirtualBox:
1819
1820 <ul>
1821 <li>With a "HardDisk" device type, the file must be a hard disk image
1822 in one of the formats supported by VirtualBox (see
1823 <link to="ISystemProperties::mediumFormats" />).
1824 After this method succeeds, if the medium is a base medium, it
1825 will be added to the <link to="#hardDisks"/> array attribute. </li>
1826 <li>With a "DVD" device type, the file must be an ISO 9960 CD/DVD image.
1827 After this method succeeds, the medium will be added to the
1828 <link to="#DVDImages"/> array attribute.</li>
1829 <li>With a "Floppy" device type, the file must be an RAW floppy image.
1830 After this method succeeds, the medium will be added to the
1831 <link to="#floppyImages"/> array attribute.</li>
1832 </ul>
1833
1834 After having been opened, the medium can be found by the <link to="#findMedium"/>
1835 method and can be attached to virtual machines. See <link to="IMedium" /> for more details.
1836
1837 The UUID of the newly opened medium will either be retrieved from the
1838 storage location, if the format supports it (e.g. for hard disk images),
1839 or a new UUID will be randomly generated (e.g. for ISO and RAW files).
1840 If for some reason you need to change the medium's UUID, use
1841 <link to="IMedium::setIDs" />.
1842
1843 If a differencing hard disk medium is to be opened by this method, the
1844 operation will succeed only if its parent medium and all ancestors,
1845 if any, are already known to this VirtualBox installation (for example,
1846 were opened by this method before).
1847
1848 This method attempts to guess the storage format of the specified medium
1849 by reading medium data at the specified location.
1850
1851 If @a accessMode is ReadWrite (which it should be for hard disks and floppies),
1852 the image is opened for read/write access and must have according permissions,
1853 as VirtualBox may actually write status information into the disk's metadata
1854 sections.
1855
1856 Note that write access is required for all typical hard disk usage in VirtualBox,
1857 since VirtualBox may need to write metadata such as a UUID into the image.
1858 The only exception is opening a source image temporarily for copying and
1859 cloning (see <link to="IMedium::cloneTo" /> when the image will be closed
1860 again soon.
1861
1862 The format of the location string is storage format specific. See
1863 <link to="IMedium::location"/> and IMedium for more details.
1864
1865 Prior to VirtualBox 3.3, opening a medium added it to a global media
1866 registry in the VirtualBox.xml file, which was shared between
1867 all machines and made transporting machines and their media from one
1868 host to another difficult.
1869
1870 Starting with VirtualBox 3.3, media are only added to a registry when
1871 they are attached to a machine. Machines created with VirtualBox 3.3
1872 or later can have their own media registry. As a result, a medium attached
1873 to such a machine will be remembered in that machine's XML settings file.
1874 Media attached to older machines will continue to be added to the global
1875 registry.
1876
1877 <result name="VBOX_E_FILE_ERROR">
1878 Invalid medium storage file location or could not find the medium
1879 at the specified location.
1880 </result>
1881 <result name="VBOX_E_IPRT_ERROR">
1882 Could not get medium storage format.
1883 </result>
1884 <result name="E_INVALIDARG">
1885 Invalid medium storage format.
1886 </result>
1887 <result name="VBOX_E_INVALID_OBJECT_STATE">
1888 Medium has already been added to a media registry.
1889 </result>
1890 </desc>
1891 <param name="location" type="wstring" dir="in">
1892 <desc>
1893 Location of the storage unit that contains medium data in one of
1894 the supported storage formats.
1895 </desc>
1896 </param>
1897 <param name="deviceType" type="DeviceType" dir="in">
1898 <desc>
1899 Must be one of "HardDisk", "DVD" or "Floppy".
1900 </desc>
1901 </param>
1902 <param name="accessMode" type="AccessMode" dir="in">
1903 <desc>Whether to open the image in read/write or read-only mode. For
1904 a "DVD" device type, this is ignored and read-only mode is always assumed.</desc>
1905 </param>
1906 <param name="medium" type="IMedium" dir="return">
1907 <desc>Opened medium object.</desc>
1908 </param>
1909 </method>
1910
1911 <method name="findMedium">
1912 <desc>
1913 Returns a medium of the given type that uses the given fully qualified
1914 location or UUID to store medium data.
1915
1916 The given medium must be known to this VirtualBox installation, i.e.
1917 it must be previously created by <link to="#createHardDisk"/> or opened
1918 by <link to="#openMedium"/>.
1919
1920 The search is done by comparing the value of the @a location argument to
1921 the <link to="IMedium::location"/> and <link to="IMedium::id" />
1922 attributes of each known medium.
1923
1924 On case sensitive file systems, a case sensitive comparison is performed,
1925 otherwise the case of symbols in the file path is ignored.
1926
1927 <result name="VBOX_E_OBJECT_NOT_FOUND">
1928 No medium object matching @a location found.
1929 </result>
1930 </desc>
1931 <param name="location" type="wstring" dir="in">
1932 <desc>What to search for. This can either be the UUID or the location string of an open medium.</desc>
1933 </param>
1934 <param name="type" type="DeviceType" dir="in">
1935 <desc>Device type (must be HardDisk, DVD or Floppy)</desc>
1936 </param>
1937 <param name="medium" type="IMedium" dir="return">
1938 <desc>Medium object, if found.</desc>
1939 </param>
1940 </method>
1941
1942 <method name="getGuestOSType">
1943 <desc>
1944 Returns an object describing the specified guest OS type.
1945
1946 The requested guest OS type is specified using a string which is a
1947 mnemonic identifier of the guest operating system, such as
1948 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
1949 particular virtual machine can be read or set using the
1950 <link to="IMachine::OSTypeId"/> attribute.
1951
1952 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
1953 available guest OS type objects. Each object has an
1954 <link to="IGuestOSType::id"/> attribute which contains an identifier of
1955 the guest OS this object describes.
1956
1957 <result name="E_INVALIDARG">
1958 @a id is not a valid Guest OS type.
1959 </result>
1960
1961 </desc>
1962 <param name="id" type="uuid" mod="string" dir="in">
1963 <desc>Guest OS type ID string.</desc>
1964 </param>
1965 <param name="type" type="IGuestOSType" dir="return">
1966 <desc>Guest OS type object.</desc>
1967 </param>
1968 </method>
1969
1970 <method name="createSharedFolder">
1971 <desc>
1972 Creates a new global shared folder by associating the given logical
1973 name with the given host path, adds it to the collection of shared
1974 folders and starts sharing it. Refer to the description of
1975 <link to="ISharedFolder"/> to read more about logical names.
1976 <note>
1977 In the current implementation, this operation is not
1978 implemented.
1979 </note>
1980 </desc>
1981 <param name="name" type="wstring" dir="in">
1982 <desc>Unique logical name of the shared folder.</desc>
1983 </param>
1984 <param name="hostPath" type="wstring" dir="in">
1985 <desc>Full path to the shared folder in the host file system.</desc>
1986 </param>
1987 <param name="writable" type="boolean" dir="in">
1988 <desc>Whether the share is writable or readonly</desc>
1989 </param>
1990 <param name="automount" type="boolean" dir="in">
1991 <desc>Whether the share gets automatically mounted by the guest
1992 or not.</desc>
1993 </param>
1994 </method>
1995
1996 <method name="removeSharedFolder">
1997 <desc>
1998 Removes the global shared folder with the given name previously
1999 created by <link to="#createSharedFolder"/> from the collection of
2000 shared folders and stops sharing it.
2001 <note>
2002 In the current implementation, this operation is not
2003 implemented.
2004 </note>
2005 </desc>
2006 <param name="name" type="wstring" dir="in">
2007 <desc>Logical name of the shared folder to remove.</desc>
2008 </param>
2009 </method>
2010
2011 <method name="getExtraDataKeys">
2012 <desc>
2013 Returns an array representing the global extra data keys which currently
2014 have values defined.
2015 </desc>
2016 <param name="value" type="wstring" dir="return" safearray="yes">
2017 <desc>Array of extra data keys.</desc>
2018 </param>
2019 </method>
2020
2021 <method name="getExtraData">
2022 <desc>
2023 Returns associated global extra data.
2024
2025 If the requested data @a key does not exist, this function will
2026 succeed and return an empty string in the @a value argument.
2027
2028 <result name="VBOX_E_FILE_ERROR">
2029 Settings file not accessible.
2030 </result>
2031 <result name="VBOX_E_XML_ERROR">
2032 Could not parse the settings file.
2033 </result>
2034
2035 </desc>
2036 <param name="key" type="wstring" dir="in">
2037 <desc>Name of the data key to get.</desc>
2038 </param>
2039 <param name="value" type="wstring" dir="return">
2040 <desc>Value of the requested data key.</desc>
2041 </param>
2042 </method>
2043
2044 <method name="setExtraData">
2045 <desc>
2046 Sets associated global extra data.
2047
2048 If you pass @c null or empty string as a key @a value, the given @a key
2049 will be deleted.
2050
2051 <note>
2052 Before performing the actual data change, this method will ask all
2053 registered event listener using the
2054 <link to="IExtraDataCanChangeEvent"/>
2055 notification for a permission. If one of the listeners refuses the
2056 new value, the change will not be performed.
2057 </note>
2058 <note>
2059 On success, the
2060 <link to="IExtraDataChangedEvent"/> notification
2061 is called to inform all registered listeners about a successful data
2062 change.
2063 </note>
2064
2065 <result name="VBOX_E_FILE_ERROR">
2066 Settings file not accessible.
2067 </result>
2068 <result name="VBOX_E_XML_ERROR">
2069 Could not parse the settings file.
2070 </result>
2071 <result name="E_ACCESSDENIED">
2072 Modification request refused.
2073 </result>
2074
2075 </desc>
2076 <param name="key" type="wstring" dir="in">
2077 <desc>Name of the data key to set.</desc>
2078 </param>
2079 <param name="value" type="wstring" dir="in">
2080 <desc>Value to assign to the key.</desc>
2081 </param>
2082 </method>
2083
2084 <!--method name="createDHCPServerForInterface">
2085 <desc>
2086 Creates a dhcp server settings to be used for the given interface
2087 <result name="E_INVALIDARG">
2088 Host network interface @a name already exists.
2089 </result>
2090 </desc>
2091 <param name="interface" type="IHostNetworkInterface" dir="in">
2092 <desc>Network Interface</desc>
2093 </param>
2094 <param name="server" type="IDHCPServer" dir="out">
2095 <desc>Dhcp server settings</desc>
2096 </param>
2097 </method-->
2098
2099 <method name="createDHCPServer">
2100 <desc>
2101 Creates a dhcp server settings to be used for the given internal network name
2102 <result name="E_INVALIDARG">
2103 Host network interface @a name already exists.
2104 </result>
2105 </desc>
2106 <param name="name" type="wstring" dir="in">
2107 <desc>server name</desc>
2108 </param>
2109 <param name="server" type="IDHCPServer" dir="return">
2110 <desc>Dhcp server settings</desc>
2111 </param>
2112 </method>
2113
2114 <method name="findDHCPServerByNetworkName">
2115 <desc>
2116 Searches a dhcp server settings to be used for the given internal network name
2117 <result name="E_INVALIDARG">
2118 Host network interface @a name already exists.
2119 </result>
2120
2121 </desc>
2122 <param name="name" type="wstring" dir="in">
2123 <desc>server name</desc>
2124 </param>
2125 <param name="server" type="IDHCPServer" dir="return">
2126 <desc>Dhcp server settings</desc>
2127 </param>
2128 </method>
2129
2130 <!--method name="findDHCPServerForInterface">
2131 <desc>
2132 Searches a dhcp server settings to be used for the given interface
2133 <result name="E_INVALIDARG">
2134 Host network interface @a name already exists.
2135 </result>
2136 </desc>
2137 <param name="interface" type="IHostNetworkInterface" dir="in">
2138 <desc>Network Interface</desc>
2139 </param>
2140 <param name="server" type="IDHCPServer" dir="out">
2141 <desc>Dhcp server settings</desc>
2142 </param>
2143 </method-->
2144
2145 <method name="removeDHCPServer">
2146 <desc>
2147 Removes the dhcp server settings
2148 <result name="E_INVALIDARG">
2149 Host network interface @a name already exists.
2150 </result>
2151 </desc>
2152 <param name="server" type="IDHCPServer" dir="in">
2153 <desc>Dhcp server settings to be removed</desc>
2154 </param>
2155 </method>
2156
2157
2158 <method name="checkFirmwarePresent">
2159 <desc>
2160 Check if this VirtualBox installation has a firmware
2161 of the given type available, either system-wide or per-user.
2162 Optionally, this may return a hint where this firmware can be
2163 downloaded from.
2164 </desc>
2165 <param name="firmwareType" type="FirmwareType" dir="in">
2166 <desc>
2167 Type of firmware to check.
2168 </desc>
2169 </param>
2170 <param name="version" type="wstring" dir="in">
2171 <desc>Expected version number, usually empty string (presently ignored).</desc>
2172 </param>
2173
2174 <param name="url" type="wstring" dir="out">
2175 <desc>
2176 Suggested URL to download this firmware from.
2177 </desc>
2178 </param>
2179
2180 <param name="file" type="wstring" dir="out">
2181 <desc>
2182 Filename of firmware, only valid if result == TRUE.
2183 </desc>
2184 </param>
2185
2186 <param name="result" type="boolean" dir="return">
2187 <desc>If firmware of this type and version is available.</desc>
2188 </param>
2189 </method>
2190
2191 <method name="VRDERegisterLibrary">
2192 <desc>
2193 Appends a VRDE library to this VirtualBox installation.
2194
2195 The library implements a VirtualBox Remote Desktop Extension (VRDE),
2196 which is used to remotely connect to the virtual machines.
2197
2198 The system library extension (".DLL" or ".so") must be omitted.
2199 The library must reside in the VirtualBox installation directory.
2200 </desc>
2201 <param name="name" type="wstring" dir="in">
2202 <desc>The library name.</desc>
2203 </param>
2204 </method>
2205
2206 <method name="VRDEUnregisterLibrary">
2207 <desc>
2208 Removes a VRDE library from this VirtualBox installation.
2209 </desc>
2210 <param name="name" type="wstring" dir="in">
2211 <desc>The library name.</desc>
2212 </param>
2213 </method>
2214
2215 <method name="VRDEListLibraries">
2216 <desc>
2217 List registered libraries.
2218 </desc>
2219 <param name="names" type="wstring" dir="return" safearray="yes">
2220 <desc>Array of names of the libraries.</desc>
2221 </param>
2222 </method>
2223
2224 </interface>
2225
2226 <!--
2227 // IVFSExplorer
2228 /////////////////////////////////////////////////////////////////////////
2229 -->
2230
2231 <enum
2232 name="VFSType"
2233 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
2234 >
2235 <desc>
2236 Virtual file systems supported by VFSExplorer.
2237 </desc>
2238
2239 <const name="File" value="1" />
2240 <const name="Cloud" value="2" />
2241 <const name="S3" value="3" />
2242 <const name="WebDav" value="4" />
2243 </enum>
2244
2245 <enum
2246 name="VFSFileType"
2247 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
2248 >
2249 <desc>
2250 File types known by VFSExplorer.
2251 </desc>
2252
2253 <const name="Unknown" value="1" />
2254 <const name="Fifo" value="2" />
2255 <const name="DevChar" value="3" />
2256 <const name="Directory" value="4" />
2257 <const name="DevBlock" value="5" />
2258 <const name="File" value="6" />
2259 <const name="SymLink" value="7" />
2260 <const name="Socket" value="8" />
2261 <const name="WhiteOut" value="9" />
2262 </enum>
2263
2264 <interface
2265 name="IVFSExplorer" extends="$unknown"
2266 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
2267 wsmap="managed"
2268 >
2269 <desc>
2270 The VFSExplorer interface unifies access to different file system
2271 types. This includes local file systems as well remote file systems like
2272 S3. For a list of supported types see <link to="VFSType" />.
2273 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
2274 </desc>
2275
2276 <attribute name="path" type="wstring" readonly="yes">
2277 <desc>Returns the current path in the virtual file system.</desc>
2278 </attribute>
2279
2280 <attribute name="type" type="VFSType" readonly="yes">
2281 <desc>Returns the file system type which is currently in use.</desc>
2282 </attribute>
2283
2284 <method name="update">
2285 <desc>Updates the internal list of files/directories from the
2286 current directory level. Use <link to="#entryList" /> to get the full list
2287 after a call to this method.</desc>
2288
2289 <param name="aProgress" type="IProgress" dir="return">
2290 <desc>Progress object to track the operation completion.</desc>
2291 </param>
2292 </method>
2293
2294 <method name="cd">
2295 <desc>Change the current directory level.</desc>
2296
2297 <param name="aDir" type="wstring" dir="in">
2298 <desc>The name of the directory to go in.</desc>
2299 </param>
2300
2301 <param name="aProgress" type="IProgress" dir="return">
2302 <desc>Progress object to track the operation completion.</desc>
2303 </param>
2304 </method>
2305
2306 <method name="cdUp">
2307 <desc>Go one directory upwards from the current directory level.</desc>
2308
2309 <param name="aProgress" type="IProgress" dir="return">
2310 <desc>Progress object to track the operation completion.</desc>
2311 </param>
2312 </method>
2313
2314 <method name="entryList">
2315 <desc>Returns a list of files/directories after a call to <link
2316 to="#update" />. The user is responsible for keeping this internal
2317 list up do date.</desc>
2318
2319 <param name="aNames" type="wstring" safearray="yes" dir="out">
2320 <desc>The list of names for the entries.</desc>
2321 </param>
2322
2323 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
2324 <desc>The list of types for the entries.</desc>
2325 </param>
2326 </method>
2327
2328 <method name="exists">
2329 <desc>Checks if the given file list exists in the current directory
2330 level.</desc>
2331
2332 <param name="aNames" type="wstring" safearray="yes" dir="in">
2333 <desc>The names to check.</desc>
2334 </param>
2335
2336 <param name="aExists" type="wstring" safearray="yes" dir="return">
2337 <desc>The names which exist.</desc>
2338 </param>
2339 </method>
2340
2341 <method name="remove">
2342 <desc>Deletes the given files in the current directory level.</desc>
2343
2344 <param name="aNames" type="wstring" safearray="yes" dir="in">
2345 <desc>The names to remove.</desc>
2346 </param>
2347
2348 <param name="aProgress" type="IProgress" dir="return">
2349 <desc>Progress object to track the operation completion.</desc>
2350 </param>
2351 </method>
2352
2353 </interface>
2354
2355 <!--
2356 // IAppliance
2357 /////////////////////////////////////////////////////////////////////////
2358 -->
2359
2360 <interface
2361 name="IAppliance" extends="$unknown"
2362 uuid="7b148032-4124-4f46-b56a-b48ac1273f5a"
2363 wsmap="managed"
2364 >
2365 <desc>
2366 Represents a platform-independent appliance in OVF format. An instance of this is returned
2367 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
2368 virtual machines within an appliance with VirtualBox.
2369
2370 The OVF standard suggests two different physical file formats:
2371
2372 <ol>
2373 <li>If the appliance is distributed as a set of files, there must be at least one XML descriptor
2374 file that conforms to the OVF standard and carries an <tt>.ovf</tt> file extension. If
2375 this descriptor file references other files such as disk images, as OVF appliances typically
2376 do, those additional files must be in the same directory as the descriptor file.</li>
2377
2378 <li>If the appliance is distributed as a single file, it must be in TAR format and have the
2379 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
2380 files and optionally other files.
2381
2382 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
2383 be added with a later version.</li>
2384 </ol>
2385
2386 <b>Importing</b> an OVF appliance into VirtualBox as instances of
2387 <link to="IMachine" /> involves the following sequence of API calls:
2388
2389 <ol>
2390 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
2391 </li>
2392
2393 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
2394 would like to import. So long as this file is syntactically valid, this will succeed
2395 and fill the appliance object with the parsed data from the OVF file.
2396 </li>
2397
2398 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
2399 contents of the IAppliance attributes accordingly. These can be inspected by a
2400 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
2401 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
2402 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
2403 systems (machines) in the OVF, which in turn describe the virtual hardware prescribed
2404 by the OVF (network and hardware adapters, virtual disk images, memory size and so on).
2405 The GUI can then give the user the option to confirm and/or change these suggestions.
2406 </li>
2407
2408 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
2409 virtual system (machine) to override the suggestions made by the interpret() routine.
2410 </li>
2411
2412 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
2413 VirtualBox as instances of <link to="IMachine" /> that match the information in the
2414 virtual system descriptions. After this call suceeded, the UUIDs of the machines created
2415 can be found in the <link to="#machines" /> array attribute.
2416 </li>
2417 </ol>
2418
2419 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
2420
2421 <ol>
2422 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
2423 an empty IAppliance object.
2424 </li>
2425
2426 <li>For each machine you would like to export, call <link to="IMachine::export" />
2427 with the IAppliance object you just created. Each such call creates one instance of
2428 <link to="IVirtualSystemDescription" /> inside the appliance.
2429 </li>
2430
2431 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
2432 virtual system (machine) to override the suggestions made by the export() routine.
2433 </li>
2434
2435 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
2436 file written.</li>
2437 </ol>
2438
2439 </desc>
2440
2441 <attribute name="path" type="wstring" readonly="yes">
2442 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
2443 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
2444 <link to="#write" /> (for export).
2445 This attribute is empty until one of these methods has been called.
2446 </desc>
2447 </attribute>
2448
2449 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
2450 <desc>
2451 Array of virtual disk definitions. One such description exists for each
2452 disk definition in the OVF; each string array item represents one such piece of
2453 disk information, with the information fields separated by tab (\t) characters.
2454
2455 The caller should be prepared for additional fields being appended to
2456 this string in future versions of VirtualBox and therefore check for
2457 the number of tabs in the strings returned.
2458
2459 In the current version, the following eight fields are returned per string
2460 in the array:
2461
2462 <ol>
2463 <li>Disk ID (unique string identifier given to disk)</li>
2464
2465 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
2466
2467 <li>Populated size (optional unsigned integer indicating the current size of the
2468 disk; can be approximate; -1 if unspecified)</li>
2469
2470 <li>Format (string identifying the disk format, typically
2471 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
2472
2473 <li>Reference (where to find the disk image, typically a file name; if empty,
2474 then the disk should be created on import)</li>
2475
2476 <li>Image size (optional unsigned integer indicating the size of the image,
2477 which need not necessarily be the same as the values specified above, since
2478 the image may be compressed or sparse; -1 if not specified)</li>
2479
2480 <li>Chunk size (optional unsigned integer if the image is split into chunks;
2481 presently unsupported and always -1)</li>
2482
2483 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
2484 </ol>
2485 </desc>
2486 </attribute>
2487
2488 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
2489 <desc> Array of virtual system descriptions. One such description is created
2490 for each virtual system (machine) found in the OVF.
2491 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
2492 (for export) has been called.
2493 </desc>
2494 </attribute>
2495
2496 <attribute name="machines" type="wstring" readonly="yes" safearray="yes">
2497 <desc>
2498 Contains the UUIDs of the machines created from the information in this appliances. This is only
2499 relevant for the import case, and will only contain data after a call to <link to="#importMachines" />
2500 succeeded.
2501 </desc>
2502 </attribute>
2503
2504 <method name="read">
2505 <desc>
2506 Reads an OVF file into the appliance object.
2507
2508 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
2509 mere fact that this method returns successfully does not mean that VirtualBox supports all
2510 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
2511 </desc>
2512 <param name="file" type="wstring" dir="in">
2513 <desc>
2514 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
2515 on whether the appliance is distributed as a set of files or as a single file, respectively).
2516 </desc>
2517 </param>
2518 <param name="aProgress" type="IProgress" dir="return">
2519 <desc>Progress object to track the operation completion.</desc>
2520 </param>
2521 </method>
2522
2523 <method name="interpret">
2524 <desc>
2525 Interprets the OVF data that was read when the appliance was constructed. After
2526 calling this method, one can inspect the
2527 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
2528 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
2529 the appliance.
2530
2531 Calling this method is the second step of importing an appliance into VirtualBox;
2532 see <link to="IAppliance" /> for an overview.
2533
2534 After calling this method, one should call <link to="#getWarnings" /> to find out
2535 if problems were encountered during the processing which might later lead to
2536 errors.
2537 </desc>
2538 </method>
2539
2540 <method name="importMachines">
2541 <desc>
2542 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
2543 and other interfaces that match the information contained in the appliance as
2544 closely as possible, as represented by the import instructions in the
2545 <link to="#virtualSystemDescriptions" /> array.
2546
2547 Calling this method is the final step of importing an appliance into VirtualBox;
2548 see <link to="IAppliance" /> for an overview.
2549
2550 Since importing the appliance will most probably involve copying and converting
2551 disk images, which can take a long time, this method operates asynchronously and
2552 returns an IProgress object to allow the caller to monitor the progress.
2553
2554 After the import succeeded, the UUIDs of the IMachine instances created can be
2555 retrieved from the <link to="#machines" /> array attribute.
2556 </desc>
2557
2558 <param name="aProgress" type="IProgress" dir="return">
2559 <desc>Progress object to track the operation completion.</desc>
2560 </param>
2561 </method>
2562
2563 <method name="createVFSExplorer">
2564 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
2565
2566 <param name="aUri" type="wstring" dir="in">
2567 <desc>The URI describing the file system to use.</desc>
2568 </param>
2569
2570 <param name="aExplorer" type="IVFSExplorer" dir="return">
2571 <desc></desc>
2572 </param>
2573 </method>
2574
2575 <method name="write">
2576 <desc>
2577 Writes the contents of the appliance exports into a new OVF file.
2578
2579 Calling this method is the final step of exporting an appliance from VirtualBox;
2580 see <link to="IAppliance" /> for an overview.
2581
2582 Since exporting the appliance will most probably involve copying and converting
2583 disk images, which can take a long time, this method operates asynchronously and
2584 returns an IProgress object to allow the caller to monitor the progress.
2585 </desc>
2586 <param name="format" type="wstring" dir="in">
2587 <desc>
2588 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
2589 future versions of VirtualBox may support additional formats.
2590 </desc>
2591 </param>
2592 <param name="manifest" type="boolean" dir="in">
2593 <desc>
2594 Indicate if the optional manifest file (.mf) should be written. The manifest file
2595 is used for integrity checks prior import.
2596 </desc>
2597 </param>
2598 <param name="path" type="wstring" dir="in">
2599 <desc>
2600 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
2601 on whether the appliance is distributed as a set of files or as a single file, respectively).
2602 </desc>
2603 </param>
2604 <param name="progress" type="IProgress" dir="return">
2605 <desc>Progress object to track the operation completion.</desc>
2606 </param>
2607 </method>
2608
2609 <method name="getWarnings">
2610 <desc>Returns textual warnings which occurred during execution of <link to="#interpret" />.</desc>
2611
2612 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
2613 <desc></desc>
2614 </param>
2615 </method>
2616
2617 </interface>
2618
2619 <enum
2620 name="VirtualSystemDescriptionType"
2621 uuid="c0f8f135-3a1d-417d-afa6-b38b95a91f90"
2622 >
2623 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
2624 a configuration value.</desc>
2625
2626 <const name="Ignore" value="1" />
2627 <const name="OS" value="2" />
2628 <const name="Name" value="3" />
2629 <const name="Product" value="4" />
2630 <const name="Vendor" value="5" />
2631 <const name="Version" value="6" />
2632 <const name="ProductUrl" value="7" />
2633 <const name="VendorUrl" value="8" />
2634 <const name="Description" value="9" />
2635 <const name="License" value="10" />
2636 <const name="Miscellaneous" value="11" />
2637 <const name="CPU" value="12" />
2638 <const name="Memory" value="13" />
2639 <const name="HardDiskControllerIDE" value="14" />
2640 <const name="HardDiskControllerSATA" value="15" />
2641 <const name="HardDiskControllerSCSI" value="16" />
2642 <const name="HardDiskControllerSAS" value="17" />
2643 <const name="HardDiskImage" value="18" />
2644 <const name="Floppy" value="19" />
2645 <const name="CDROM" value="20" />
2646 <const name="NetworkAdapter" value="21" />
2647 <const name="USBController" value="22" />
2648 <const name="SoundCard" value="23" />
2649
2650 </enum>
2651
2652 <enum
2653 name="VirtualSystemDescriptionValueType"
2654 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
2655 >
2656 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
2657 type to fetch.</desc>
2658
2659 <const name="Reference" value="1" />
2660 <const name="Original" value="2" />
2661 <const name="Auto" value="3" />
2662 <const name="ExtraConfig" value="4" />
2663
2664 </enum>
2665
2666 <interface
2667 name="IVirtualSystemDescription" extends="$unknown"
2668 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
2669 wsmap="managed"
2670 >
2671
2672 <desc>Represents one virtual system (machine) in an appliance. This interface is used in
2673 the <link to="IAppliance::virtualSystemDescriptions" /> array. After
2674 <link to="IAppliance::interpret" /> has been called, that array contains information
2675 about how the virtual systems described in the OVF should best be imported into
2676 VirtualBox virtual machines. See <link to="IAppliance" /> for the steps required to
2677 import an OVF into VirtualBox.
2678 </desc>
2679
2680 <attribute name="count" type="unsigned long" readonly="yes">
2681 <desc>Return the number of virtual system description entries.</desc>
2682 </attribute>
2683
2684 <method name="getDescription">
2685 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
2686 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
2687
2688 The list below identifies the value sets that are possible depending on the
2689 <link to="VirtualSystemDescriptionType" /> enum value in the array item in @a aTypes[]. In each case,
2690 the array item with the same index in @a aOvfValues[] will contain the original value as contained
2691 in the OVF file (just for informational purposes), and the corresponding item in @a aVBoxValues[]
2692 will contain a suggested value to be used for VirtualBox. Depending on the description type,
2693 the @a aExtraConfigValues[] array item may also be used.
2694
2695 <ul>
2696 <li>
2697 "OS": the guest operating system type. There must be exactly one such array item on import. The
2698 corresponding item in @a aVBoxValues[] contains the suggested guest operating system for VirtualBox.
2699 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
2700 item in @a aOvfValues[] will contain a numerical value that described the operating system in the OVF.
2701 </li>
2702 <li>
2703 "Name": the name to give to the new virtual machine. There can be at most one such array item;
2704 if none is present on import, then an automatic name will be created from the operating system
2705 type. The correponding item im @a aOvfValues[] will contain the suggested virtual machine name
2706 from the OVF file, and @a aVBoxValues[] will contain a suggestion for a unique VirtualBox
2707 <link to="IMachine" /> name that does not exist yet.
2708 </li>
2709 <li>
2710 "Description": an arbitrary description.
2711 </li>
2712 <li>
2713 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
2714 code to display such a license for agreement; the Main API does not enforce any such policy.
2715 </li>
2716 <li>
2717 Miscellaneous: reserved for future use.
2718 </li>
2719 <li>
2720 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
2721 </li>
2722 <li>
2723 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
2724 is present on import, then VirtualBox will set a meaningful default based on the operating system
2725 type.
2726 </li>
2727 <li>
2728 "HardDiskControllerIDE": an IDE hard disk controller. There can be at most two such items.
2729 An optional value in @a aOvfValues[] and @a aVBoxValues[] can be "PIIX3" or "PIIX4" to specify
2730 the type of IDE controller; this corresponds to the ResourceSubType element which VirtualBox
2731 writes into the OVF.
2732 The matching item in the @a aRefs[] array will contain an integer that items of the "Harddisk"
2733 type can use to specify which hard disk controller a virtual disk should be connected to.
2734 Note that in OVF, an IDE controller has two channels, corresponding to "master" and "slave"
2735 in traditional terminology, whereas the IDE storage controller that VirtualBox supports in
2736 its virtual machines supports four channels (primary master, primary slave, secondary master,
2737 secondary slave) and thus maps to two IDE controllers in the OVF sense.
2738 </li>
2739 <li>
2740 "HardDiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
2741 has no value in @a aOvfValues[] or @a aVBoxValues[].
2742 The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
2743 </li>
2744 <li>
2745 "HardDiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
2746 The items in @a aOvfValues[] and @a aVBoxValues[] will either be "LsiLogic", "BusLogic" or
2747 "LsiLogicSas". (Note that in OVF, the LsiLogicSas controller is treated as a SCSI controller
2748 whereas VirtualBox considers it a class of storage controllers of its own; see
2749 <link to="StorageControllerType" />).
2750 The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
2751 </li>
2752 <li>
2753 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
2754 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
2755
2756 The array item in @a aOvfValues[] will contain the file specification from the OVF file (without
2757 a path since the image file should be in the same location as the OVF file itself), whereas the
2758 item in @a aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
2759 hard disk image. This means that on import the image will be copied and converted from the
2760 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
2761
2762 The matching item in the @a aExtraConfigValues[] array must contain a string of the following
2763 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
2764 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
2765 the image to. That number must be the index of an array item with one of the hard disk controller
2766 types (HardDiskControllerSCSI, HardDiskControllerSATA, HardDiskControllerIDE).
2767 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
2768 this can be 0 or 1 for master or slave, respectively. For compatibility with VirtualBox versions
2769 before 3.2, the values 2 and 3 (for secondary master and secondary slave) are also supported, but
2770 no longer exported. For SATA and SCSI controllers, the channel can range from 0-29.
2771 </li>
2772 <li>
2773 "CDROM": a virtual CD-ROM drive. The matching item in @a aExtraConfigValue[] contains the same
2774 attachment information as with "HardDiskImage" items.
2775 </li>
2776 <li>
2777 "CDROM": a virtual floppy drive. The matching item in @a aExtraConfigValue[] contains the same
2778 attachment information as with "HardDiskImage" items.
2779 </li>
2780 <li>
2781 "NetworkAdapter": a network adapter. The array item in @a aVBoxValues[] will specify the hardware
2782 for the network adapter, whereas the array item in @a aExtraConfigValues[] will have a string
2783 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
2784 </li>
2785 <li>
2786 "USBController": a USB controller. There can be at most one such item. If and only if such an
2787 item ispresent, USB support will be enabled for the new virtual machine.
2788 </li>
2789 <li>
2790 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
2791 present, sound support will be enabled for the new virtual machine. Note that the virtual
2792 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
2793 may be different from the virtual soundcard expected by the appliance.
2794 </li>
2795 </ul>
2796
2797 </desc>
2798
2799 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
2800 <desc></desc>
2801 </param>
2802
2803 <param name="aRefs" type="wstring" dir="out" safearray="yes">
2804 <desc></desc>
2805 </param>
2806
2807 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
2808 <desc></desc>
2809 </param>
2810
2811 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
2812 <desc></desc>
2813 </param>
2814
2815 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
2816 <desc></desc>
2817 </param>
2818
2819 </method>
2820
2821 <method name="getDescriptionByType">
2822 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
2823 should be returned.</desc>
2824
2825 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2826 <desc></desc>
2827 </param>
2828
2829 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
2830 <desc></desc>
2831 </param>
2832
2833 <param name="aRefs" type="wstring" dir="out" safearray="yes">
2834 <desc></desc>
2835 </param>
2836
2837 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
2838 <desc></desc>
2839 </param>
2840
2841 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
2842 <desc></desc>
2843 </param>
2844
2845 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
2846 <desc></desc>
2847 </param>
2848
2849 </method>
2850
2851 <method name="getValuesByType">
2852 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
2853 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
2854 values.</desc>
2855
2856 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2857 <desc></desc>
2858 </param>
2859
2860 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
2861 <desc></desc>
2862 </param>
2863
2864 <param name="aValues" type="wstring" dir="return" safearray="yes">
2865 <desc></desc>
2866 </param>
2867
2868 </method>
2869
2870 <method name="setFinalValues">
2871 <desc>
2872 This method allows the appliance's user to change the configuration for the virtual
2873 system descriptions. For each array item returned from <link to="#getDescription" />,
2874 you must pass in one boolean value and one configuration value.
2875
2876 Each item in the boolean array determines whether the particular configuration item
2877 should be enabled.
2878 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
2879 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
2880 and SoundCard.
2881
2882 For the "vbox" and "extra configuration" values, if you pass in the same arrays
2883 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
2884 the configuration remains unchanged. Please see the documentation for getDescription()
2885 for valid configuration values for the individual array item types. If the
2886 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
2887 </desc>
2888
2889 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
2890 <desc></desc>
2891 </param>
2892
2893 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
2894 <desc></desc>
2895 </param>
2896
2897 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
2898 <desc></desc>
2899 </param>
2900 </method>
2901
2902 <method name="addDescription">
2903 <desc>
2904 This method adds an additional description entry to the stack of already
2905 available descriptions for this virtual system. This is handy for writing
2906 values which aren't directly supported by VirtualBox. One example would
2907 be the License type of <link to="VirtualSystemDescriptionType" />.
2908 </desc>
2909
2910 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2911 <desc></desc>
2912 </param>
2913
2914 <param name="aVBoxValue" type="wstring" dir="in">
2915 <desc></desc>
2916 </param>
2917
2918 <param name="aExtraConfigValue" type="wstring" dir="in">
2919 <desc></desc>
2920 </param>
2921 </method>
2922 </interface>
2923
2924
2925 <!--
2926 // IMachine
2927 /////////////////////////////////////////////////////////////////////////
2928 -->
2929
2930 <interface
2931 name="IInternalMachineControl" extends="$unknown"
2932 uuid="e2da8b1a-2ad1-490e-b29e-c33a144791b6"
2933 internal="yes"
2934 wsmap="suppress"
2935 >
2936 <method name="setRemoveSavedStateFile">
2937 <desc>
2938 Updates the flag whether the saved state file is removed on a
2939 machine state change from Saved to PoweredOff.
2940 </desc>
2941 <param name="aRemove" type="boolean" dir="in"/>
2942 </method>
2943
2944 <method name="updateState">
2945 <desc>
2946 Updates the VM state.
2947 <note>
2948 This operation will also update the settings file with the correct
2949 information about the saved state file and delete this file from disk
2950 when appropriate.
2951 </note>
2952 </desc>
2953 <param name="state" type="MachineState" dir="in"/>
2954 </method>
2955
2956 <method name="getIPCId">
2957 <param name="id" type="wstring" dir="return"/>
2958 </method>
2959
2960 <method name="beginPowerUp">
2961 <desc>
2962 Tells VBoxSVC that <link to="IConsole::powerUp"/> is under ways and
2963 gives it the progress object that should be part of any pending
2964 <link to="IMachine::launchVMProcess"/> operations. The progress
2965 object may be called back to reflect an early cancelation, so some care
2966 have to be taken with respect to any cancelation callbacks. The console
2967 object will call <link to="IInternalMachineControl::endPowerUp"/>
2968 to signal the completion of the progress object.
2969 </desc>
2970 <param name="aProgress" type="IProgress" dir="in" />
2971 </method>
2972
2973 <method name="endPowerUp">
2974 <desc>
2975 Tells VBoxSVC that <link to="IConsole::powerUp"/> has completed.
2976 This method may query status information from the progress object it
2977 received in <link to="IInternalMachineControl::beginPowerUp"/> and copy
2978 it over to any in-progress <link to="IMachine::launchVMProcess"/>
2979 call in order to complete that progress object.
2980 </desc>
2981 <param name="result" type="long" dir="in"/>
2982 </method>
2983
2984 <method name="runUSBDeviceFilters">
2985 <desc>
2986 Asks the server to run USB devices filters of the associated
2987 machine against the given USB device and tell if there is
2988 a match.
2989 <note>
2990 Intended to be used only for remote USB devices. Local
2991 ones don't require to call this method (this is done
2992 implicitly by the Host and USBProxyService).
2993 </note>
2994 </desc>
2995 <param name="device" type="IUSBDevice" dir="in"/>
2996 <param name="matched" type="boolean" dir="out"/>
2997 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
2998 </method>
2999
3000 <method name="captureUSBDevice">
3001 <desc>
3002 Requests a capture of the given host USB device.
3003 When the request is completed, the VM process will
3004 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3005 notification.
3006 </desc>
3007 <param name="id" type="uuid" mod="string" dir="in"/>
3008 </method>
3009
3010 <method name="detachUSBDevice">
3011 <desc>
3012 Notification that a VM is going to detach (@a done = @c false) or has
3013 already detached (@a done = @c true) the given USB device.
3014 When the @a done = @c true request is completed, the VM process will
3015 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3016 notification.
3017 <note>
3018 In the @a done = @c true case, the server must run its own filters
3019 and filters of all VMs but this one on the detached device
3020 as if it were just attached to the host computer.
3021 </note>
3022 </desc>
3023 <param name="id" type="uuid" mod="string" dir="in"/>
3024 <param name="done" type="boolean" dir="in"/>
3025 </method>
3026
3027 <method name="autoCaptureUSBDevices">
3028 <desc>
3029 Requests a capture all matching USB devices attached to the host.
3030 When the request is completed, the VM process will
3031 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3032 notification per every captured device.
3033 </desc>
3034 </method>
3035
3036 <method name="detachAllUSBDevices">
3037 <desc>
3038 Notification that a VM that is being powered down. The done
3039 parameter indicates whether which stage of the power down
3040 we're at. When @a done = @c false the VM is announcing its
3041 intentions, while when @a done = @c true the VM is reporting
3042 what it has done.
3043 <note>
3044 In the @a done = @c true case, the server must run its own filters
3045 and filters of all VMs but this one on all detach devices as
3046 if they were just attached to the host computer.
3047 </note>
3048 </desc>
3049 <param name="done" type="boolean" dir="in"/>
3050 </method>
3051
3052 <method name="onSessionEnd">
3053 <desc>
3054 Triggered by the given session object when the session is about
3055 to close normally.
3056 </desc>
3057 <param name="session" type="ISession" dir="in">
3058 <desc>Session that is being closed</desc>
3059 </param>
3060 <param name="progress" type="IProgress" dir="return">
3061 <desc>
3062 Used to wait until the corresponding machine is actually
3063 dissociated from the given session on the server.
3064 Returned only when this session is a direct one.
3065 </desc>
3066 </param>
3067 </method>
3068
3069 <method name="beginSavingState">
3070 <desc>
3071 Called by the VM process to inform the server it wants to
3072 save the current state and stop the VM execution.
3073 </desc>
3074 <param name="progress" type="IProgress" dir="in">
3075 <desc>
3076 Progress object created by the VM process to wait until
3077 the state is saved.
3078 </desc>
3079 </param>
3080 <param name="stateFilePath" type="wstring" dir="out">
3081 <desc>
3082 File path the VM process must save the execution state to.
3083 </desc>
3084 </param>
3085 </method>
3086
3087 <method name="endSavingState">
3088 <desc>
3089 Called by the VM process to inform the server that saving
3090 the state previously requested by #beginSavingState is either
3091 successfully finished or there was a failure.
3092
3093 <result name="VBOX_E_FILE_ERROR">
3094 Settings file not accessible.
3095 </result>
3096 <result name="VBOX_E_XML_ERROR">
3097 Could not parse the settings file.
3098 </result>
3099
3100 </desc>
3101
3102 <param name="success" type="boolean" dir="in">
3103 <desc>@c true to indicate success and @c false otherwise.
3104 </desc>
3105 </param>
3106 </method>
3107
3108 <method name="adoptSavedState">
3109 <desc>
3110 Gets called by IConsole::adoptSavedState.
3111 <result name="VBOX_E_FILE_ERROR">
3112 Invalid saved state file path.
3113 </result>
3114 </desc>
3115 <param name="savedStateFile" type="wstring" dir="in">
3116 <desc>Path to the saved state file to adopt.</desc>
3117 </param>
3118 </method>
3119
3120 <method name="beginTakingSnapshot">
3121 <desc>
3122 Called from the VM process to request from the server to perform the
3123 server-side actions of creating a snapshot (creating differencing images
3124 and the snapshot object).
3125
3126 <result name="VBOX_E_FILE_ERROR">
3127 Settings file not accessible.
3128 </result>
3129 <result name="VBOX_E_XML_ERROR">
3130 Could not parse the settings file.
3131 </result>
3132 </desc>
3133 <param name="initiator" type="IConsole" dir="in">
3134 <desc>The console object that initiated this call.</desc>
3135 </param>
3136 <param name="name" type="wstring" dir="in">
3137 <desc>Snapshot name.</desc>
3138 </param>
3139 <param name="description" type="wstring" dir="in">
3140 <desc>Snapshot description.</desc>
3141 </param>
3142 <param name="consoleProgress" type="IProgress" dir="in">
3143 <desc>
3144 Progress object created by the VM process tracking the
3145 snapshot's progress. This has the following sub-operations:
3146 <ul>
3147 <li>setting up (weight 1);</li>
3148 <li>one for each medium attachment that needs a differencing image (weight 1 each);</li>
3149 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3150 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3151 <li>finishing up (weight 1)</li>
3152 </ul>
3153 </desc>
3154 </param>
3155 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3156 <desc>
3157 Whether this is an online snapshot (i.e. the machine is running).
3158 </desc>
3159 </param>
3160 <param name="stateFilePath" type="wstring" dir="out">
3161 <desc>
3162 File path the VM process must save the execution state to.
3163 </desc>
3164 </param>
3165 </method>
3166
3167 <method name="endTakingSnapshot">
3168 <desc>
3169 Called by the VM process to inform the server that the snapshot
3170 previously requested by #beginTakingSnapshot is either
3171 successfully taken or there was a failure.
3172 </desc>
3173
3174 <param name="success" type="boolean" dir="in">
3175 <desc>@c true to indicate success and @c false otherwise</desc>
3176 </param>
3177 </method>
3178
3179 <method name="deleteSnapshot">
3180 <desc>
3181 Gets called by IConsole::deleteSnapshot.
3182 <result name="VBOX_E_INVALID_OBJECT_STATE">
3183 Snapshot has more than one child snapshot.
3184 </result>
3185 </desc>
3186 <param name="initiator" type="IConsole" dir="in">
3187 <desc>The console object that initiated this call.</desc>
3188 </param>
3189 <param name="id" type="uuid" mod="string" dir="in">
3190 <desc>UUID of the snapshot to delete.</desc>
3191 </param>
3192 <param name="machineState" type="MachineState" dir="out">
3193 <desc>New machine state after this operation is started.</desc>
3194 </param>
3195 <param name="progress" type="IProgress" dir="return">
3196 <desc>Progress object to track the operation completion.</desc>
3197 </param>
3198 </method>
3199
3200 <method name="finishOnlineMergeMedium">
3201 <desc>
3202 Gets called by IConsole::onlineMergeMedium.
3203 </desc>
3204 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
3205 <desc>The medium attachment which needs to be cleaned up.</desc>
3206 </param>
3207 <param name="source" type="IMedium" dir="in">
3208 <desc>Merge source medium.</desc>
3209 </param>
3210 <param name="target" type="IMedium" dir="in">
3211 <desc>Merge target medium.</desc>
3212 </param>
3213 <param name="mergeForward" type="boolean" dir="in">
3214 <desc>Merge direction.</desc>
3215 </param>
3216 <param name="parentForTarget" type="IMedium" dir="in">
3217 <desc>For forward merges: new parent for target medium.</desc>
3218 </param>
3219 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
3220 <desc>For backward merges: list of media which need their parent UUID
3221 updated.</desc>
3222 </param>
3223 </method>
3224
3225 <method name="restoreSnapshot">
3226 <desc>
3227 Gets called by IConsole::RestoreSnapshot.
3228 </desc>
3229 <param name="initiator" type="IConsole" dir="in">
3230 <desc>The console object that initiated this call.</desc>
3231 </param>
3232 <param name="snapshot" type="ISnapshot" dir="in">
3233 <desc>The snapshot to restore the VM state from.</desc>
3234 </param>
3235 <param name="machineState" type="MachineState" dir="out">
3236 <desc>New machine state after this operation is started.</desc>
3237 </param>
3238 <param name="progress" type="IProgress" dir="return">
3239 <desc>Progress object to track the operation completion.</desc>
3240 </param>
3241 </method>
3242
3243 <method name="pullGuestProperties">
3244 <desc>
3245 Get the list of the guest properties matching a set of patterns along
3246 with their values, time stamps and flags and give responsibility for
3247 managing properties to the console.
3248 </desc>
3249 <param name="name" type="wstring" dir="out" safearray="yes">
3250 <desc>
3251 The names of the properties returned.
3252 </desc>
3253 </param>
3254 <param name="value" type="wstring" dir="out" safearray="yes">
3255 <desc>
3256 The values of the properties returned. The array entries match the
3257 corresponding entries in the @a name array.
3258 </desc>
3259 </param>
3260 <param name="timestamp" type="long long" dir="out" safearray="yes">
3261 <desc>
3262 The time stamps of the properties returned. The array entries match
3263 the corresponding entries in the @a name array.
3264 </desc>
3265 </param>
3266 <param name="flags" type="wstring" dir="out" safearray="yes">
3267 <desc>
3268 The flags of the properties returned. The array entries match the
3269 corresponding entries in the @a name array.
3270 </desc>
3271 </param>
3272 </method>
3273
3274 <method name="pushGuestProperty">
3275 <desc>
3276 Update a single guest property in IMachine.
3277 </desc>
3278 <param name="name" type="wstring" dir="in">
3279 <desc>
3280 The name of the property to be updated.
3281 </desc>
3282 </param>
3283 <param name="value" type="wstring" dir="in">
3284 <desc>
3285 The value of the property.
3286 </desc>
3287 </param>
3288 <param name="timestamp" type="long long" dir="in">
3289 <desc>
3290 The timestamp of the property.
3291 </desc>
3292 </param>
3293 <param name="flags" type="wstring" dir="in">
3294 <desc>
3295 The flags of the property.
3296 </desc>
3297 </param>
3298 </method>
3299
3300 <method name="lockMedia">
3301 <desc>
3302 Locks all media attached to the machine for writing and parents of
3303 attached differencing media (if any) for reading. This operation is
3304 atomic so that if it fails no media is actually locked.
3305
3306 This method is intended to be called when the machine is in Starting or
3307 Restoring state. The locked media will be automatically unlocked when
3308 the machine is powered off or crashed.
3309 </desc>
3310 </method>
3311 <method name="unlockMedia">
3312 <desc>
3313 Unlocks all media previously locked using
3314 <link to="IInternalMachineControl::lockMedia"/>.
3315
3316 This method is intended to be used with teleportation so that it is
3317 possible to teleport between processes on the same machine.
3318 </desc>
3319 </method>
3320 </interface>
3321
3322 <interface
3323 name="IBIOSSettings" extends="$unknown"
3324 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3325 wsmap="managed"
3326 >
3327 <desc>
3328 The IBIOSSettings interface represents BIOS settings of the virtual
3329 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3330 </desc>
3331 <attribute name="logoFadeIn" type="boolean">
3332 <desc>Fade in flag for BIOS logo animation.</desc>
3333 </attribute>
3334
3335 <attribute name="logoFadeOut" type="boolean">
3336 <desc>Fade out flag for BIOS logo animation.</desc>
3337 </attribute>
3338
3339 <attribute name="logoDisplayTime" type="unsigned long">
3340 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3341 </attribute>
3342
3343 <attribute name="logoImagePath" type="wstring">
3344 <desc>
3345 Local file system path for external BIOS splash image. Empty string
3346 means the default image is shown on boot.
3347 </desc>
3348 </attribute>
3349
3350 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3351 <desc>Mode of the BIOS boot device menu.</desc>
3352 </attribute>
3353
3354 <attribute name="ACPIEnabled" type="boolean">
3355 <desc>ACPI support flag.</desc>
3356 </attribute>
3357
3358 <attribute name="IOAPICEnabled" type="boolean">
3359 <desc>
3360 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3361 and support IRQs above 15.
3362 </desc>
3363 </attribute>
3364
3365 <attribute name="timeOffset" type="long long">
3366 <desc>
3367 Offset in milliseconds from the host system time. This allows for
3368 guests running with a different system date/time than the host.
3369 It is equivalent to setting the system date/time in the BIOS except
3370 it is not an absolute value but a relative one. Guest Additions
3371 time synchronization honors this offset.
3372 </desc>
3373 </attribute>
3374
3375 <attribute name="PXEDebugEnabled" type="boolean">
3376 <desc>
3377 PXE debug logging flag. If set, VirtualBox will write extensive
3378 PXE trace information to the release log.
3379 </desc>
3380 </attribute>
3381
3382 </interface>
3383
3384 <enum name="CleanupMode"
3385 uuid="67897c50-7cca-47a9-83f6-ce8fd8eb5441">
3386 <desc>Cleanup mode, used with <link to="IMachine::unregister" />.
3387 </desc>
3388 <const name="UnregisterOnly" value="1">
3389 <desc>Unregister only the machine, but neither delete snapshots nor detach media.</desc>
3390 </const>
3391 <const name="DetachAllReturnNone" value="2">
3392 <desc>Delete all snapshots and detach all media but return none; this will keep all media registered.</desc>
3393 </const>
3394 <const name="DetachAllReturnHardDisksOnly" value="3">
3395 <desc>Delete all snapshots, detach all media and return hard disks for closing, but not removeable media.</desc>
3396 </const>
3397 <const name="Full" value="4">
3398 <desc>Delete all snapshots, detach all media and return all media for closing.</desc>
3399 </const>
3400 </enum>
3401
3402 <interface
3403 name="IMachine" extends="$unknown"
3404 uuid="cc4fec9a-3150-45df-9ee9-f00ba54d6ac3"
3405 wsmap="managed"
3406 >
3407 <desc>
3408 The IMachine interface represents a virtual machine, or guest, created
3409 in VirtualBox.
3410
3411 This interface is used in two contexts. First of all, a collection of
3412 objects implementing this interface is stored in the
3413 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
3414 machines that are currently registered with this VirtualBox
3415 installation. Also, once a session has been opened for the given virtual
3416 machine (e.g. the virtual machine is running), the machine object
3417 associated with the open session can be queried from the session object;
3418 see <link to="ISession"/> for details.
3419
3420 The main role of this interface is to expose the settings of the virtual
3421 machine and provide methods to change various aspects of the virtual
3422 machine's configuration. For machine objects stored in the
3423 <link to="IVirtualBox::machines"/> collection, all attributes are
3424 read-only unless explicitly stated otherwise in individual attribute
3425 and method descriptions.
3426
3427 In order to change a machine setting, a session for this machine must be
3428 opened using one of the <link to="IMachine::lockMachine" /> or
3429 <link to="IMachine::launchVMProcess"/> methods. After the
3430 machine has been successfully locked for a session, a mutable machine object
3431 needs to be queried from the session object and then the desired settings
3432 changes can be applied to the returned object using IMachine attributes and
3433 methods. See the <link to="ISession"/> interface description for more
3434 information about sessions.
3435
3436 Note that IMachine does not provide methods to control virtual machine
3437 execution (such as start the machine, or power it down) -- these methods
3438 are grouped in a separate interface called <link to="IConsole" />.
3439
3440 <see>ISession, IConsole</see>
3441 </desc>
3442
3443 <attribute name="parent" type="IVirtualBox" readonly="yes">
3444 <desc>Associated parent object.</desc>
3445 </attribute>
3446
3447 <attribute name="accessible" type="boolean" readonly="yes">
3448 <desc>
3449 Whether this virtual machine is currently accessible or not.
3450
3451 A machine is always deemed accessible unless it is registered <i>and</i>
3452 its settings file cannot be read or parsed (either because the file itself
3453 is unavailable or has invalid XML contents).
3454
3455 Every time this property is read, the accessibility state of
3456 this machine is re-evaluated. If the returned value is @c false,
3457 the <link to="#accessError"/> property may be used to get the
3458 detailed error information describing the reason of
3459 inaccessibility, including XML error messages.
3460
3461 When the machine is inaccessible, only the following properties
3462 can be used on it:
3463 <ul>
3464 <li><link to="#parent"/></li>
3465 <li><link to="#id"/></li>
3466 <li><link to="#settingsFilePath"/></li>
3467 <li><link to="#accessible"/></li>
3468 <li><link to="#accessError"/></li>
3469 </ul>
3470
3471 An attempt to access any other property or method will return
3472 an error.
3473
3474 The only possible action you can perform on an inaccessible
3475 machine is to unregister it using the
3476 <link to="IMachine::unregister"/> call (or, to check
3477 for the accessibility state once more by querying this
3478 property).
3479
3480 <note>
3481 In the current implementation, once this property returns
3482 @c true, the machine will never become inaccessible
3483 later, even if its settings file cannot be successfully
3484 read/written any more (at least, until the VirtualBox
3485 server is restarted). This limitation may be removed in
3486 future releases.
3487 </note>
3488 </desc>
3489 </attribute>
3490
3491 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3492 <desc>
3493 Error information describing the reason of machine
3494 inaccessibility.
3495
3496 Reading this property is only valid after the last call to
3497 <link to="#accessible"/> returned @c false (i.e. the
3498 machine is currently unaccessible). Otherwise, a @c null
3499 IVirtualBoxErrorInfo object will be returned.
3500 </desc>
3501 </attribute>
3502
3503 <attribute name="name" type="wstring">
3504 <desc>
3505 Name of the virtual machine.
3506
3507 Besides being used for human-readable identification purposes
3508 everywhere in VirtualBox, the virtual machine name is also used
3509 as a name of the machine's settings file and as a name of the
3510 subdirectory this settings file resides in. Thus, every time you
3511 change the value of this property, the settings file will be
3512 renamed once you call <link to="#saveSettings"/> to confirm the
3513 change. The containing subdirectory will be also renamed, but
3514 only if it has exactly the same name as the settings file
3515 itself prior to changing this property (for backward compatibility
3516 with previous API releases). The above implies the following
3517 limitations:
3518 <ul>
3519 <li>The machine name cannot be empty.</li>
3520 <li>The machine name can contain only characters that are valid
3521 file name characters according to the rules of the file
3522 system used to store VirtualBox configuration.</li>
3523 <li>You cannot have two or more machines with the same name
3524 if they use the same subdirectory for storing the machine
3525 settings files.</li>
3526 <li>You cannot change the name of the machine if it is running,
3527 or if any file in the directory containing the settings file
3528 is being used by another running machine or by any other
3529 process in the host operating system at a time when
3530 <link to="#saveSettings"/> is called.
3531 </li>
3532 </ul>
3533 If any of the above limitations are hit, <link to="#saveSettings"/>
3534 will return an appropriate error message explaining the exact
3535 reason and the changes you made to this machine will not be saved.
3536 </desc>
3537 </attribute>
3538
3539 <attribute name="description" type="wstring">
3540 <desc>
3541 Description of the virtual machine.
3542
3543 The description attribute can contain any text and is
3544 typically used to describe the hardware and software
3545 configuration of the virtual machine in detail (i.e. network
3546 settings, versions of the installed software and so on).
3547 </desc>
3548 </attribute>
3549
3550 <attribute name="id" type="uuid" mod="string" readonly="yes">
3551 <desc>UUID of the virtual machine.</desc>
3552 </attribute>
3553
3554 <attribute name="OSTypeId" type="wstring">
3555 <desc>
3556 User-defined identifier of the Guest OS type.
3557 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
3558 an IGuestOSType object representing details about the given
3559 Guest OS type.
3560 <note>
3561 This value may differ from the value returned by
3562 <link to="IGuest::OSTypeId"/> if Guest Additions are
3563 installed to the guest OS.
3564 </note>
3565 </desc>
3566 </attribute>
3567
3568 <attribute name="HardwareVersion" type="wstring">
3569 <desc>Hardware version identifier. Internal use only for now.</desc>
3570 </attribute>
3571
3572 <attribute name="hardwareUUID" type="uuid" mod="string">
3573 <desc>
3574 The UUID presented to the guest via memory tables, hardware and guest
3575 properties. For most VMs this is the same as the @a id, but for VMs
3576 which have been cloned or teleported it may be the same as the source
3577 VM. This latter is because the guest shouldn't notice that it was
3578 cloned or teleported.
3579 </desc>
3580 </attribute>
3581
3582 <attribute name="CPUCount" type="unsigned long">
3583 <desc>Number of virtual CPUs in the VM.</desc>
3584 </attribute>
3585
3586 <attribute name="CPUHotPlugEnabled" type="boolean">
3587 <desc>
3588 This setting determines whether VirtualBox allows CPU
3589 hotplugging for this machine.</desc>
3590 </attribute>
3591
3592 <attribute name="CPUExecutionCap" type="unsigned long">
3593 <desc>
3594 Means to limit the number of CPU cycles a guest can use. The unit
3595 is percentage of host CPU cycles per second. The valid range
3596 is 1 - 100. 100 (the default) implies no limit.
3597 </desc>
3598 </attribute>
3599
3600 <attribute name="memorySize" type="unsigned long">
3601 <desc>System memory size in megabytes.</desc>
3602 </attribute>
3603
3604 <attribute name="memoryBalloonSize" type="unsigned long">
3605 <desc>Memory balloon size in megabytes.</desc>
3606 </attribute>
3607
3608 <attribute name="PageFusionEnabled" type="boolean">
3609 <desc>
3610 This setting determines whether VirtualBox allows page
3611 fusion for this machine (64 bits host only).
3612 </desc>
3613 </attribute>
3614
3615 <attribute name="VRAMSize" type="unsigned long">
3616 <desc>Video memory size in megabytes.</desc>
3617 </attribute>
3618
3619 <attribute name="accelerate3DEnabled" type="boolean" default="false">
3620 <desc>
3621 This setting determines whether VirtualBox allows this machine to make
3622 use of the 3D graphics support available on the host.</desc>
3623 </attribute>
3624
3625 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
3626 <desc>
3627 This setting determines whether VirtualBox allows this machine to make
3628 use of the 2D video acceleration support available on the host.</desc>
3629 </attribute>
3630
3631 <attribute name="monitorCount" type="unsigned long">
3632 <desc>
3633 Number of virtual monitors.
3634 <note>
3635 Only effective on Windows XP and later guests with
3636 Guest Additions installed.
3637 </note>
3638 </desc>
3639 </attribute>
3640
3641 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
3642 <desc>Object containing all BIOS settings.</desc>
3643 </attribute>
3644
3645 <attribute name="firmwareType" type="FirmwareType">
3646 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
3647 bootstrap in this VM.</desc>
3648 </attribute>
3649
3650 <attribute name="pointingHidType" type="PointingHidType">
3651 <desc>Type of pointing HID (such as mouse or tablet) used in this VM.
3652 The default is typically "PS2Mouse" but can vary depending on the
3653 requirements of the guest operating system.</desc>
3654 </attribute>
3655
3656 <attribute name="keyboardHidType" type="KeyboardHidType">
3657 <desc>Type of keyboard HID used in this VM.
3658 The default is typically "PS2Keyboard" but can vary depending on the
3659 requirements of the guest operating system.</desc>
3660 </attribute>
3661
3662 <attribute name="hpetEnabled" type="boolean">
3663 <desc>This attribute controls if High Precision Event Timer (HPET) is
3664 enabled in this VM. Use this property if you want to provide guests
3665 with additional time source, or if guest requires HPET to function correctly.
3666 Default is false.</desc>
3667 </attribute>
3668
3669 <attribute name="chipsetType" type="ChipsetType">
3670 <desc>Chipset type used in this VM.</desc>
3671 </attribute>
3672
3673 <attribute name="snapshotFolder" type="wstring">
3674 <desc>
3675 Full path to the directory used to store snapshot data
3676 (differencing media and saved state files) of this machine.
3677
3678 The initial value of this property is
3679 <tt>&lt;</tt><link to="#settingsFilePath">
3680 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3681 <link to="#id">machine_uuid</link>
3682 <tt>&gt;</tt>.
3683
3684 Currently, it is an error to try to change this property on
3685 a machine that has snapshots (because this would require to
3686 move possibly large files to a different location).
3687 A separate method will be available for this purpose later.
3688
3689 <note>
3690 Setting this property to @c null or to an empty string will restore
3691 the initial value.
3692 </note>
3693 <note>
3694 When setting this property, the specified path can be
3695 absolute (full path) or relative to the directory where the
3696 <link to="#settingsFilePath">machine settings file</link>
3697 is located. When reading this property, a full path is
3698 always returned.
3699 </note>
3700 <note>
3701 The specified path may not exist, it will be created
3702 when necessary.
3703 </note>
3704 </desc>
3705 </attribute>
3706
3707 <attribute name="VRDEServer" type="IVRDEServer" readonly="yes">
3708 <desc>VirtualBox Remote Desktop Extension (VRDE) server object.</desc>
3709 </attribute>
3710
3711 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
3712 <desc>Array of media attached to this machine.</desc>
3713 </attribute>
3714
3715 <attribute name="USBController" type="IUSBController" readonly="yes">
3716 <desc>
3717 Associated USB controller object.
3718
3719 <note>
3720 If USB functionality is not available in the given edition of
3721 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3722 </note>
3723 </desc>
3724 </attribute>
3725
3726 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3727 <desc>Associated audio adapter, always present.</desc>
3728 </attribute>
3729
3730 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
3731 <desc>Array of storage controllers attached to this machine.</desc>
3732 </attribute>
3733
3734 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3735 <desc>
3736 Full name of the file containing machine settings data.
3737 </desc>
3738 </attribute>
3739
3740 <attribute name="settingsModified" type="boolean" readonly="yes">
3741 <desc>
3742 Whether the settings of this machine have been modified
3743 (but neither yet saved nor discarded).
3744 <note>
3745 Reading this property is only valid on instances returned
3746 by <link to="ISession::machine"/> and on new machines
3747 created by <link to="IVirtualBox::createMachine"/> or opened
3748 by <link to="IVirtualBox::openMachine"/> but not
3749 yet registered, or on unregistered machines after calling
3750 <link to="IMachine::unregister"/>. For all other
3751 cases, the settings can never be modified.
3752 </note>
3753 <note>
3754 For newly created unregistered machines, the value of this
3755 property is always @c true until <link to="#saveSettings"/>
3756 is called (no matter if any machine settings have been
3757 changed after the creation or not). For opened machines
3758 the value is set to @c false (and then follows to normal rules).
3759 </note>
3760 </desc>
3761 </attribute>
3762
3763 <attribute name="sessionState" type="SessionState" readonly="yes">
3764 <desc>Current session state for this machine.</desc>
3765 </attribute>
3766
3767 <attribute name="sessionType" type="wstring" readonly="yes">
3768 <desc>
3769 Type of the session. If <link to="#sessionState"/> is
3770 Spawning or Locked, this attribute contains the
3771 same value as passed to the
3772 <link to="IMachine::launchVMProcess"/> method in the
3773 @a type parameter. If the session was used with
3774 <link to="IMachine::lockMachine" />, or if
3775 <link to="#sessionState"/> is SessionClosed, the value of this
3776 attribute is an empty string.
3777 </desc>
3778 </attribute>
3779
3780 <attribute name="sessionPid" type="unsigned long" readonly="yes">
3781 <desc>
3782 Identifier of the session process. This attribute contains the
3783 platform-dependent identifier of the process whose session was
3784 used with <link to="IMachine::lockMachine" /> call. The returned
3785 value is only valid if <link to="#sessionState"/> is Locked or
3786 Unlocking by the time this property is read.
3787 </desc>
3788 </attribute>
3789
3790 <attribute name="state" type="MachineState" readonly="yes">
3791 <desc>Current execution state of this machine.</desc>
3792 </attribute>
3793
3794 <attribute name="lastStateChange" type="long long" readonly="yes">
3795 <desc>
3796 Time stamp of the last execution state change,
3797 in milliseconds since 1970-01-01 UTC.
3798 </desc>
3799 </attribute>
3800
3801 <attribute name="stateFilePath" type="wstring" readonly="yes">
3802 <desc>
3803 Full path to the file that stores the execution state of
3804 the machine when it is in the <link to="MachineState_Saved"/> state.
3805 <note>
3806 When the machine is not in the Saved state, this attribute is
3807 an empty string.
3808 </note>
3809 </desc>
3810 </attribute>
3811
3812 <attribute name="logFolder" type="wstring" readonly="yes">
3813 <desc>
3814 Full path to the folder that stores a set of rotated log files
3815 recorded during machine execution. The most recent log file is
3816 named <tt>VBox.log</tt>, the previous log file is
3817 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
3818 in the current version).
3819 </desc>
3820 </attribute>
3821
3822 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
3823 <desc>
3824 Current snapshot of this machine. This is @c null if the machine
3825 currently has no snapshots. If it is not @c null, then it was
3826 set by one of <link to="IConsole::takeSnapshot" />,
3827 <link to="IConsole::deleteSnapshot" />
3828 or <link to="IConsole::restoreSnapshot" />, depending on which
3829 was called last. See <link to="ISnapshot"/> for details.
3830 </desc>
3831 </attribute>
3832
3833 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
3834 <desc>
3835 Number of snapshots taken on this machine. Zero means the
3836 machine doesn't have any snapshots.
3837 </desc>
3838 </attribute>
3839
3840 <attribute name="currentStateModified" type="boolean" readonly="yes">
3841 <desc>
3842 Returns @c true if the current state of the machine is not
3843 identical to the state stored in the current snapshot.
3844
3845 The current state is identical to the current snapshot only
3846 directly after one of the following calls are made:
3847
3848 <ul>
3849 <li><link to="IConsole::restoreSnapshot"/>
3850 </li>
3851 <li><link to="IConsole::takeSnapshot"/> (issued on a
3852 "powered off" or "saved" machine, for which
3853 <link to="#settingsModified"/> returns @c false)
3854 </li>
3855 </ul>
3856
3857 The current state remains identical until one of the following
3858 happens:
3859 <ul>
3860 <li>settings of the machine are changed</li>
3861 <li>the saved state is deleted</li>
3862 <li>the current snapshot is deleted</li>
3863 <li>an attempt to execute the machine is made</li>
3864 </ul>
3865
3866 <note>
3867 For machines that don't have snapshots, this property is
3868 always @c false.
3869 </note>
3870 </desc>
3871 </attribute>
3872
3873 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
3874 <desc>
3875 Collection of shared folders for this machine (permanent shared
3876 folders). These folders are shared automatically at machine startup
3877 and available only to the guest OS installed within this machine.
3878
3879 New shared folders are added to the collection using
3880 <link to="#createSharedFolder"/>. Existing shared folders can be
3881 removed using <link to="#removeSharedFolder"/>.
3882 </desc>
3883 </attribute>
3884
3885 <attribute name="clipboardMode" type="ClipboardMode">
3886 <desc>
3887 Synchronization mode between the host OS clipboard
3888 and the guest OS clipboard.
3889 </desc>
3890 </attribute>
3891
3892 <attribute name="guestPropertyNotificationPatterns" type="wstring">
3893 <desc>
3894 A comma-separated list of simple glob patterns. Changes to guest
3895 properties whose name matches one of the patterns will generate an
3896 <link to="IGuestPropertyChangedEvent"/> signal.
3897 </desc>
3898 </attribute>
3899
3900 <attribute name="teleporterEnabled" type="boolean">
3901 <desc>
3902 When set to @a true, the virtual machine becomes a target teleporter
3903 the next time it is powered on. This can only set to @a true when the
3904 VM is in the @a PoweredOff or @a Aborted state.
3905
3906 <!-- This property is automatically set to @a false when the VM is powered
3907 on. (bird: This doesn't work yet ) -->
3908 </desc>
3909 </attribute>
3910
3911 <attribute name="teleporterPort" type="unsigned long">
3912 <desc>
3913 The TCP port the target teleporter will listen for incoming
3914 teleportations on.
3915
3916 0 means the port is automatically selected upon power on. The actual
3917 value can be read from this property while the machine is waiting for
3918 incoming teleportations.
3919 </desc>
3920 </attribute>
3921
3922 <attribute name="teleporterAddress" type="wstring">
3923 <desc>
3924 The address the target teleporter will listen on. If set to an empty
3925 string, it will listen on all addresses.
3926 </desc>
3927 </attribute>
3928
3929 <attribute name="teleporterPassword" type="wstring">
3930 <desc>
3931 The password to check for on the target teleporter. This is just a
3932 very basic measure to prevent simple hacks and operators accidentally
3933 beaming a virtual machine to the wrong place.
3934 </desc>
3935 </attribute>
3936
3937 <attribute name="faultToleranceState" type="FaultToleranceState">
3938 <desc>
3939 Fault tolerance state; disabled, source or target.
3940 This property can be changed at any time. If you change it for a running
3941 VM, then the fault tolerance address and port must be set beforehand.
3942 </desc>
3943 </attribute>
3944
3945 <attribute name="faultTolerancePort" type="unsigned long">
3946 <desc>
3947 The TCP port the fault tolerance source or target will use for
3948 communication.
3949 </desc>
3950 </attribute>
3951
3952 <attribute name="faultToleranceAddress" type="wstring">
3953 <desc>
3954 The address the fault tolerance source or target.
3955 </desc>
3956 </attribute>
3957
3958 <attribute name="faultTolerancePassword" type="wstring">
3959 <desc>
3960 The password to check for on the standby VM. This is just a
3961 very basic measure to prevent simple hacks and operators accidentally
3962 choosing the wrong standby VM.
3963 </desc>
3964 </attribute>
3965
3966 <attribute name="faultToleranceSyncInterval" type="unsigned long">
3967 <desc>
3968 The interval in ms used for syncing the state between source and target.
3969 </desc>
3970 </attribute>
3971
3972 <attribute name="RTCUseUTC" type="boolean">
3973 <desc>
3974 When set to @a true, the RTC device of the virtual machine will run
3975 in UTC time, otherwise in local time. Especially Unix guests prefer
3976 the time in UTC.
3977 </desc>
3978 </attribute>
3979
3980 <attribute name="ioCacheEnabled" type="boolean">
3981 <desc>
3982 When set to @a true, the builtin I/O cache of the virtual machine
3983 will be enabled.
3984 </desc>
3985 </attribute>
3986
3987 <attribute name="ioCacheSize" type="unsigned long">
3988 <desc>
3989 Maximum size of the I/O cache in MB.
3990 </desc>
3991 </attribute>
3992
3993 <method name="lockMachine">
3994 <desc>
3995 Locks the machine for the given session to enable the caller
3996 to make changes to the machine or start the VM or control
3997 VM execution.
3998
3999 There are two ways to lock a machine for such uses:
4000
4001 <ul>
4002 <li>If you want to make changes to the machine settings,
4003 you must obtain an exclusive write lock on the machine
4004 by setting @a lockType to @c Write.
4005
4006 This will only succeed if no other process has locked
4007 the machine to prevent conflicting changes. Only after
4008 an exclusive write lock has been obtained using this method, one
4009 can change all VM settings or execute the VM in the process
4010 space of the session object. (Note that the latter is only of
4011 interest if you actually want to write a new front-end for
4012 virtual machines; but this API gets called internally by
4013 the existing front-ends such as VBoxHeadless and the VirtualBox
4014 GUI to acquire a write lock on the machine that they are running.)
4015
4016 On success, write-locking the machine for a session creates
4017 a second copy of the IMachine object. It is this second object
4018 upon which changes can be made; in VirtualBox terminology, the
4019 second copy is "mutable". It is only this second, mutable machine
4020 object upon which you can call methods that change the
4021 machine state. After having called this method, you can
4022 obtain this second, mutable machine object using the
4023 <link to="ISession::machine" /> attribute.
4024 </li>
4025 <li>If you only want to check the machine state or control
4026 machine execution without actually changing machine
4027 settings (e.g. to get access to VM statistics or take
4028 a snapshot or save the machine state), then set the
4029 @a lockType argument to @c Shared.
4030
4031 If no other session has obtained a lock, you will obtain an
4032 exclusive write lock as described above. However, if another
4033 session has already obtained such a lock, then a link to that
4034 existing session will be established which allows you
4035 to control that existing session.
4036
4037 To find out which type of lock was obtained, you can
4038 inspect <link to="ISession::type" />, which will have been
4039 set to either @c WriteLock or @c Shared.
4040 </li>
4041 </ul>
4042
4043 In either case, you can get access to the <link to="IConsole" />
4044 object which controls VM execution.
4045
4046 Also in all of the above cases, one must always call
4047 <link to="ISession::unlockMachine" /> to release the lock on the machine, or
4048 the machine's state will eventually be set to "Aborted".
4049
4050 To change settings on a machine, the following sequence is typically
4051 performed:
4052
4053 <ol>
4054 <li>Call this method to obtain an exclusive write lock for the current session.</li>
4055
4056 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
4057
4058 <li>Change the settings of the machine by invoking IMachine methods.</li>
4059
4060 <li>Call <link to="IMachine::saveSettings" />.</li>
4061
4062 <li>Release the write lock by calling <link to="ISession::unlockMachine"/>.</li>
4063 </ol>
4064
4065 <result name="E_UNEXPECTED">
4066 Virtual machine not registered.
4067 </result>
4068 <result name="E_ACCESSDENIED">
4069 Process not started by OpenRemoteSession.
4070 </result>
4071 <result name="VBOX_E_INVALID_OBJECT_STATE">
4072 Session already open or being opened.
4073 </result>
4074 <result name="VBOX_E_VM_ERROR">
4075 Failed to assign machine to session.
4076 </result>
4077 </desc>
4078 <param name="session" type="ISession" dir="in">
4079 <desc>
4080 Session object for which the machine will be locked.
4081 </desc>
4082 </param>
4083 <param name="lockType" type="LockType" dir="in">
4084 <desc>
4085 If set to @c Write, then attempt to acquire an exclusive write lock or fail.
4086 If set to @c Shared, then either acquire an exclusive write lock or establish
4087 a link to an existing session.
4088 </desc>
4089 </param>
4090 </method>
4091
4092 <method name="launchVMProcess">
4093 <desc>
4094 Spawns a new process that will execute the virtual machine and obtains a shared
4095 lock on the machine for the calling session.
4096
4097 If launching the VM succeeds, the new VM process will create its own session
4098 and write-lock the machine for it, preventing conflicting changes from other
4099 processes. If the machine is already locked (because it is already running or
4100 because another session has a write lock), launching the VM process will therefore
4101 fail. Reversely, future attempts to obtain a write lock will also fail while the
4102 machine is running.
4103
4104 The caller's session object remains separate from the session opened by the new
4105 VM process. It receives its own <link to="IConsole" /> object which can be used
4106 to control machine execution, but it cannot be used to change all VM settings
4107 which would be available after a <link to="#lockMachine" /> call.
4108
4109 The caller must eventually release the session's shared lock by calling
4110 <link to="ISession::unlockMachine" /> on the local session object once this call
4111 has returned. However, the session's state (see <link to="ISession::state" />)
4112 will not return to "Unlocked" until the remote session has also unlocked
4113 the machine (i.e. the machine has stopped running).
4114
4115 Lauching a VM process can take some time (a new VM is started in a new process,
4116 for which memory and other resources need to be set up). Because of this,
4117 an <link to="IProgress" /> object is returned to allow the caller to wait
4118 for this asynchronous operation to be completed. Until then, the caller's
4119 session object remains in the "Unlocked" state, and its <link to="ISession::machine" />
4120 and <link to="ISession::console" /> attributes cannot be accessed.
4121 It is recommended to use <link to="IProgress::waitForCompletion" /> or
4122 similar calls to wait for completion. Completion is signalled when the VM
4123 is powered on. If launching the VM fails, error messages can be queried
4124 via the progress object, if available.
4125
4126 The progress object will have at least 2 sub-operations. The first
4127 operation covers the period up to the new VM process calls powerUp.
4128 The subsequent operations mirror the <link to="IConsole::powerUp"/>
4129 progress object. Because <link to="IConsole::powerUp"/> may require
4130 some extra sub-operations, the <link to="IProgress::operationCount"/>
4131 may change at the completion of operation.
4132
4133 For details on the teleportation progress operation, see
4134 <link to="IConsole::powerUp"/>.
4135
4136 The @a environment argument is a string containing definitions of
4137 environment variables in the following format:
4138 @code
4139 NAME[=VALUE]\n
4140 NAME[=VALUE]\n
4141 ...
4142 @endcode
4143 where <tt>\\n</tt> is the new line character. These environment
4144 variables will be appended to the environment of the VirtualBox server
4145 process. If an environment variable exists both in the server process
4146 and in this list, the value from this list takes precedence over the
4147 server's variable. If the value of the environment variable is
4148 omitted, this variable will be removed from the resulting environment.
4149 If the environment string is @c null or empty, the server environment
4150 is inherited by the started process as is.
4151
4152 <result name="E_UNEXPECTED">
4153 Virtual machine not registered.
4154 </result>
4155 <result name="E_INVALIDARG">
4156 Invalid session type @a type.
4157 </result>
4158 <result name="VBOX_E_OBJECT_NOT_FOUND">
4159 No machine matching @a machineId found.
4160 </result>
4161 <result name="VBOX_E_INVALID_OBJECT_STATE">
4162 Session already open or being opened.
4163 </result>
4164 <result name="VBOX_E_IPRT_ERROR">
4165 Launching process for machine failed.
4166 </result>
4167 <result name="VBOX_E_VM_ERROR">
4168 Failed to assign machine to session.
4169 </result>
4170 </desc>
4171 <param name="session" type="ISession" dir="in">
4172 <desc>
4173 Client session object to which the VM process will be connected (this
4174 must be in "Unlocked" state).
4175 </desc>
4176 </param>
4177 <param name="type" type="wstring" dir="in">
4178 <desc>
4179 Front-end to use for the new VM process. The following are currently supported:
4180 <ul>
4181 <li><tt>"gui"</tt>: VirtualBox Qt GUI front-end</li>
4182 <li><tt>"headless"</tt>: VBoxHeadless (VRDE Server) front-end</li>
4183 <li><tt>"sdl"</tt>: VirtualBox SDL front-end</li>
4184 </ul>
4185 </desc>
4186 </param>
4187 <param name="environment" type="wstring" dir="in">
4188 <desc>
4189 Environment to pass to the VM process.
4190 </desc>
4191 </param>
4192 <param name="progress" type="IProgress" dir="return">
4193 <desc>Progress object to track the operation completion.</desc>
4194 </param>
4195 </method>
4196
4197 <method name="setBootOrder">
4198 <desc>
4199 Puts the given device to the specified position in
4200 the boot order.
4201
4202 To indicate that no device is associated with the given position,
4203 <link to="DeviceType_Null"/> should be used.
4204
4205 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4206
4207 <result name="E_INVALIDARG">
4208 Boot @a position out of range.
4209 </result>
4210 <result name="E_NOTIMPL">
4211 Booting from USB @a device currently not supported.
4212 </result>
4213
4214 </desc>
4215 <param name="position" type="unsigned long" dir="in">
4216 <desc>
4217 Position in the boot order (@c 1 to the total number of
4218 devices the machine can boot from, as returned by
4219 <link to="ISystemProperties::maxBootPosition"/>).
4220 </desc>
4221 </param>
4222 <param name="device" type="DeviceType" dir="in">
4223 <desc>
4224 The type of the device used to boot at the given position.
4225 </desc>
4226 </param>
4227 </method>
4228
4229 <method name="getBootOrder" const="yes">
4230 <desc>
4231 Returns the device type that occupies the specified
4232 position in the boot order.
4233
4234 @todo [remove?]
4235 If the machine can have more than one device of the returned type
4236 (such as hard disks), then a separate method should be used to
4237 retrieve the individual device that occupies the given position.
4238
4239 If here are no devices at the given position, then
4240 <link to="DeviceType_Null"/> is returned.
4241
4242 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4243
4244 <result name="E_INVALIDARG">
4245 Boot @a position out of range.
4246 </result>
4247
4248 </desc>
4249 <param name="position" type="unsigned long" dir="in">
4250 <desc>
4251 Position in the boot order (@c 1 to the total number of
4252 devices the machine can boot from, as returned by
4253 <link to="ISystemProperties::maxBootPosition"/>).
4254 </desc>
4255 </param>
4256 <param name="device" type="DeviceType" dir="return">
4257 <desc>
4258 Device at the given position.
4259 </desc>
4260 </param>
4261 </method>
4262
4263 <method name="attachDevice">
4264 <desc>
4265 Attaches a device and optionally mounts a medium to the given storage
4266 controller (<link to="IStorageController" />, identified by @a name),
4267 at the indicated port and device.
4268
4269 This method is intended for managing storage devices in general while a
4270 machine is powered off. It can be used to attach and detach fixed
4271 and removeable media. The following kind of media can be attached
4272 to a machine:
4273
4274 <ul>
4275 <li>For fixed and removable media, you can pass in a medium that was
4276 previously opened using <link to="IVirtualBox::openMedium" />.
4277 </li>
4278
4279 <li>Only for storage devices supporting removable media (such as
4280 DVDs and floppies), you can also specify a null pointer to
4281 indicate an empty drive or one of the medium objects listed
4282 in the <link to="IHost::DVDDrives" /> and <link to="IHost::floppyDrives"/>
4283 arrays to indicate a host drive.
4284 For removeable devices, you can also use <link to="IMachine::mountMedium"/>
4285 to change the media while the machine is running.
4286 </li>
4287 </ul>
4288
4289 In a VM's default configuration of virtual machines, the secondary
4290 master of the IDE controller is used for a CD/DVD drive.
4291
4292 After calling this returns successfully, a new instance of
4293 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4294 attachments (see <link to="IMachine::mediumAttachments"/>).
4295
4296 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4297 information about attaching media.
4298
4299 The specified device slot must not have a device attached to it,
4300 or this method will fail.
4301
4302 <note>
4303 You cannot attach a device to a newly created machine until
4304 this machine's settings are saved to disk using
4305 <link to="#saveSettings"/>.
4306 </note>
4307 <note>
4308 If the medium is being attached indirectly, a new differencing medium
4309 will implicitly be created for it and attached instead. If the
4310 changes made to the machine settings (including this indirect
4311 attachment) are later cancelled using <link to="#discardSettings"/>,
4312 this implicitly created differencing medium will implicitly
4313 be deleted.
4314 </note>
4315
4316 <result name="E_INVALIDARG">
4317 SATA device, SATA port, IDE port or IDE slot out of range, or
4318 file or UUID not found.
4319 </result>
4320 <result name="VBOX_E_INVALID_OBJECT_STATE">
4321 Machine must be registered before media can be attached.
4322 </result>
4323 <result name="VBOX_E_INVALID_VM_STATE">
4324 Invalid machine state.
4325 </result>
4326 <result name="VBOX_E_OBJECT_IN_USE">
4327 A medium is already attached to this or another virtual machine.
4328 </result>
4329
4330 </desc>
4331 <param name="name" type="wstring" dir="in">
4332 <desc>Name of the storage controller to attach the device to.</desc>
4333 </param>
4334 <param name="controllerPort" type="long" dir="in">
4335 <desc>Port to attach the device to. For an IDE controller, 0 specifies
4336 the primary controller and 1 specifies the secondary controller.
4337 For a SCSI controller, this must range from 0 to 15; for a SATA controller,
4338 from 0 to 29; for an SAS controller, from 0 to 7.</desc>
4339 </param>
4340 <param name="device" type="long" dir="in">
4341 <desc>Device slot in the given port to attach the device to. This is only
4342 relevant for IDE controllers, for which 0 specifies the master device and
4343 1 specifies the slave device. For all other controller types, this must
4344 be 0.</desc>
4345 </param>
4346 <param name="type" type="DeviceType" dir="in">
4347 <desc>Device type of the attached device. For media opened by
4348 <link to="IVirtualBox::openMedium" />, this must match the device type
4349 specified there.</desc>
4350 </param>
4351 <param name="medium" type="IMedium" dir="in">
4352 <desc>Medium to mount or NULL for an empty drive.</desc>
4353 </param>
4354 </method>
4355
4356 <method name="detachDevice">
4357 <desc>
4358 Detaches the device attached to a device slot of the specified bus.
4359
4360 Detaching the device from the virtual machine is deferred. This means
4361 that the medium remains associated with the machine when this method
4362 returns and gets actually de-associated only after a successful
4363 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4364 for more detailed information about attaching media.
4365
4366 <note>
4367 You cannot detach a device from a running machine.
4368 </note>
4369 <note>
4370 Detaching differencing media implicitly created by <link
4371 to="#attachDevice"/> for the indirect attachment using this
4372 method will <b>not</b> implicitly delete them. The
4373 <link to="IMedium::deleteStorage"/> operation should be
4374 explicitly performed by the caller after the medium is successfully
4375 detached and the settings are saved with
4376 <link to="#saveSettings"/>, if it is the desired action.
4377 </note>
4378
4379 <result name="VBOX_E_INVALID_VM_STATE">
4380 Attempt to detach medium from a running virtual machine.
4381 </result>
4382 <result name="VBOX_E_OBJECT_NOT_FOUND">
4383 No medium attached to given slot/bus.
4384 </result>
4385 <result name="VBOX_E_NOT_SUPPORTED">
4386 Medium format does not support storage deletion.
4387 </result>
4388
4389 </desc>
4390 <param name="name" type="wstring" dir="in">
4391 <desc>Name of the storage controller to detach the medium from.</desc>
4392 </param>
4393 <param name="controllerPort" type="long" dir="in">
4394 <desc>Port number to detach the medium from.</desc>
4395 </param>
4396 <param name="device" type="long" dir="in">
4397 <desc>Device slot number to detach the medium from.</desc>
4398 </param>
4399 </method>
4400
4401 <method name="passthroughDevice">
4402 <desc>
4403 Sets the passthrough mode of an existing DVD device. Changing the
4404 setting while the VM is running is forbidden. The setting is only used
4405 if at VM start the device is configured as a host DVD drive, in all
4406 other cases it is ignored. The device must already exist; see
4407 <link to="IMachine::attachDevice"/> for how to attach a new device.
4408
4409 The @a controllerPort and @a device parameters specify the device slot and
4410 have have the same meaning as with <link to="IMachine::attachDevice" />.
4411
4412 <result name="E_INVALIDARG">
4413 SATA device, SATA port, IDE port or IDE slot out of range.
4414 </result>
4415 <result name="VBOX_E_INVALID_OBJECT_STATE">
4416 Attempt to modify an unregistered virtual machine.
4417 </result>
4418 <result name="VBOX_E_INVALID_VM_STATE">
4419 Invalid machine state.
4420 </result>
4421
4422 </desc>
4423 <param name="name" type="wstring" dir="in">
4424 <desc>Name of the storage controller.</desc>
4425 </param>
4426 <param name="controllerPort" type="long" dir="in">
4427 <desc>Storage controller port.</desc>
4428 </param>
4429 <param name="device" type="long" dir="in">
4430 <desc>Device slot in the given port.</desc>
4431 </param>
4432 <param name="passthrough" type="boolean" dir="in">
4433 <desc>New value for the passthrough setting.</desc>
4434 </param>
4435 </method>
4436
4437 <method name="mountMedium">
4438 <desc>
4439 Mounts a medium (<link to="IMedium" />, identified
4440 by the given UUID @a id) to the given storage controller
4441 (<link to="IStorageController" />, identified by @a name),
4442 at the indicated port and device. The device must already exist;
4443 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4444
4445 This method is intended only for managing removable media, where the
4446 device is fixed but media is changeable at runtime (such as DVDs
4447 and floppies). It cannot be used for fixed media such as hard disks.
4448
4449 The @a controllerPort and @a device parameters specify the device slot and
4450 have have the same meaning as with <link to="IMachine::attachDevice" />.
4451
4452 The specified device slot can have a medium mounted, which will be
4453 unmounted first. Specifying a zero UUID (or an empty string) for
4454 @a medium does just an unmount.
4455
4456 See <link to="IMedium"/> for more detailed information about
4457 attaching media.
4458
4459 <result name="E_INVALIDARG">
4460 SATA device, SATA port, IDE port or IDE slot out of range.
4461 </result>
4462 <result name="VBOX_E_INVALID_OBJECT_STATE">
4463 Attempt to attach medium to an unregistered virtual machine.
4464 </result>
4465 <result name="VBOX_E_INVALID_VM_STATE">
4466 Invalid machine state.
4467 </result>
4468 <result name="VBOX_E_OBJECT_IN_USE">
4469 Medium already attached to this or another virtual machine.
4470 </result>
4471
4472 </desc>
4473 <param name="name" type="wstring" dir="in">
4474 <desc>Name of the storage controller to attach the medium to.</desc>
4475 </param>
4476 <param name="controllerPort" type="long" dir="in">
4477 <desc>Port to attach the medium to.</desc>
4478 </param>
4479 <param name="device" type="long" dir="in">
4480 <desc>Device slot in the given port to attach the medium to.</desc>
4481 </param>
4482 <param name="medium" type="IMedium" dir="in">
4483 <desc>Medium to mount or NULL for an empty drive.</desc>
4484 </param>
4485 <param name="force" type="boolean" dir="in">
4486 <desc>Allows to force unmount/mount of a medium which is locked by
4487 the device slot in the given port to attach the medium to.</desc>
4488 </param>
4489 </method>
4490
4491 <method name="getMedium" const="yes">
4492 <desc>
4493 Returns the virtual medium attached to a device slot of the specified
4494 bus.
4495
4496 Note that if the medium was indirectly attached by
4497 <link to="#mountMedium"/> to the given device slot then this
4498 method will return not the same object as passed to the
4499 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4500 more detailed information about mounting a medium.
4501
4502 <result name="VBOX_E_OBJECT_NOT_FOUND">
4503 No medium attached to given slot/bus.
4504 </result>
4505
4506 </desc>
4507 <param name="name" type="wstring" dir="in">
4508 <desc>Name of the storage controller the medium is attached to.</desc>
4509 </param>
4510 <param name="controllerPort" type="long" dir="in">
4511 <desc>Port to query.</desc>
4512 </param>
4513 <param name="device" type="long" dir="in">
4514 <desc>Device slot in the given port to query.</desc>
4515 </param>
4516 <param name="medium" type="IMedium" dir="return">
4517 <desc>Attached medium object.</desc>
4518 </param>
4519 </method>
4520
4521 <method name="getMediumAttachmentsOfController" const="yes">
4522 <desc>
4523 Returns an array of medium attachments which are attached to the
4524 the controller with the given name.
4525
4526 <result name="VBOX_E_OBJECT_NOT_FOUND">
4527 A storage controller with given name doesn't exist.
4528 </result>
4529 </desc>
4530 <param name="name" type="wstring" dir="in"/>
4531 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4532 </method>
4533
4534 <method name="getMediumAttachment" const="yes">
4535 <desc>
4536 Returns a medium attachment which corresponds to the controller with
4537 the given name, on the given port and device slot.
4538
4539 <result name="VBOX_E_OBJECT_NOT_FOUND">
4540 No attachment exists for the given controller/port/device combination.
4541 </result>
4542 </desc>
4543 <param name="name" type="wstring" dir="in"/>
4544 <param name="controllerPort" type="long" dir="in"/>
4545 <param name="device" type="long" dir="in"/>
4546 <param name="attachment" type="IMediumAttachment" dir="return"/>
4547 </method>
4548
4549 <method name="getNetworkAdapter" const="yes">
4550 <desc>
4551 Returns the network adapter associated with the given slot.
4552 Slots are numbered sequentially, starting with zero. The total
4553 number of adapters per machine is defined by the
4554 <link to="ISystemProperties::networkAdapterCount"/> property,
4555 so the maximum slot number is one less than that property's value.
4556
4557 <result name="E_INVALIDARG">
4558 Invalid @a slot number.
4559 </result>
4560
4561 </desc>
4562 <param name="slot" type="unsigned long" dir="in"/>
4563 <param name="adapter" type="INetworkAdapter" dir="return"/>
4564 </method>
4565
4566 <method name="addStorageController">
4567 <desc>
4568 Adds a new storage controller (SCSI, SAS or SATA controller) to the
4569 machine and returns it as an instance of
4570 <link to="IStorageController" />.
4571
4572 @a name identifies the controller for subsequent calls such as
4573 <link to="#getStorageControllerByName" />,
4574 <link to="#getStorageControllerByInstance" />,
4575 <link to="#removeStorageController" />,
4576 <link to="#attachDevice" /> or <link to="#mountMedium" />.
4577
4578 After the controller has been added, you can set its exact
4579 type by setting the <link to="IStorageController::controllerType" />.
4580
4581 <result name="VBOX_E_OBJECT_IN_USE">
4582 A storage controller with given name exists already.
4583 </result>
4584 <result name="E_INVALIDARG">
4585 Invalid @a controllerType.
4586 </result>
4587 </desc>
4588 <param name="name" type="wstring" dir="in"/>
4589 <param name="connectionType" type="StorageBus" dir="in"/>
4590 <param name="controller" type="IStorageController" dir="return"/>
4591 </method>
4592
4593 <method name="getStorageControllerByName" const="yes">
4594 <desc>
4595 Returns a storage controller with the given name.
4596
4597 <result name="VBOX_E_OBJECT_NOT_FOUND">
4598 A storage controller with given name doesn't exist.
4599 </result>
4600 </desc>
4601 <param name="name" type="wstring" dir="in"/>
4602 <param name="storageController" type="IStorageController" dir="return"/>
4603 </method>
4604
4605 <method name="getStorageControllerByInstance" const="yes">
4606 <desc>
4607 Returns a storage controller with the given instance number.
4608
4609 <result name="VBOX_E_OBJECT_NOT_FOUND">
4610 A storage controller with given instance number doesn't exist.
4611 </result>
4612 </desc>
4613 <param name="instance" type="unsigned long" dir="in"/>
4614 <param name="storageController" type="IStorageController" dir="return"/>
4615 </method>
4616
4617 <method name="removeStorageController">
4618 <desc>
4619 Removes a storage controller from the machine.
4620
4621 <result name="VBOX_E_OBJECT_NOT_FOUND">
4622 A storage controller with given name doesn't exist.
4623 </result>
4624 </desc>
4625 <param name="name" type="wstring" dir="in"/>
4626 </method>
4627
4628 <method name="getSerialPort" const="yes">
4629 <desc>
4630 Returns the serial port associated with the given slot.
4631 Slots are numbered sequentially, starting with zero. The total
4632 number of serial ports per machine is defined by the
4633 <link to="ISystemProperties::serialPortCount"/> property,
4634 so the maximum slot number is one less than that property's value.
4635
4636 <result name="E_INVALIDARG">
4637 Invalid @a slot number.
4638 </result>
4639
4640 </desc>
4641 <param name="slot" type="unsigned long" dir="in"/>
4642 <param name="port" type="ISerialPort" dir="return"/>
4643 </method>
4644
4645 <method name="getParallelPort" const="yes">
4646 <desc>
4647 Returns the parallel port associated with the given slot.
4648 Slots are numbered sequentially, starting with zero. The total
4649 number of parallel ports per machine is defined by the
4650 <link to="ISystemProperties::parallelPortCount"/> property,
4651 so the maximum slot number is one less than that property's value.
4652
4653 <result name="E_INVALIDARG">
4654 Invalid @a slot number.
4655 </result>
4656
4657 </desc>
4658 <param name="slot" type="unsigned long" dir="in"/>
4659 <param name="port" type="IParallelPort" dir="return"/>
4660 </method>
4661
4662 <method name="getExtraDataKeys">
4663 <desc>
4664 Returns an array representing the machine-specific extra data keys
4665 which currently have values defined.
4666 </desc>
4667 <param name="value" type="wstring" dir="return" safearray="yes">
4668 <desc>Array of extra data keys.</desc>
4669 </param>
4670 </method>
4671
4672 <method name="getExtraData">
4673 <desc>
4674 Returns associated machine-specific extra data.
4675
4676 If the requested data @a key does not exist, this function will
4677 succeed and return an empty string in the @a value argument.
4678
4679 <result name="VBOX_E_FILE_ERROR">
4680 Settings file not accessible.
4681 </result>
4682 <result name="VBOX_E_XML_ERROR">
4683 Could not parse the settings file.
4684 </result>
4685
4686 </desc>
4687 <param name="key" type="wstring" dir="in">
4688 <desc>Name of the data key to get.</desc>
4689 </param>
4690 <param name="value" type="wstring" dir="return">
4691 <desc>Value of the requested data key.</desc>
4692 </param>
4693 </method>
4694
4695 <method name="setExtraData">
4696 <desc>
4697 Sets associated machine-specific extra data.
4698
4699 If you pass @c null or an empty string as a key @a value, the given
4700 @a key will be deleted.
4701
4702 <note>
4703 Before performing the actual data change, this method will ask all
4704 registered listeners using the
4705 <link to="IExtraDataCanChangeEvent"/>
4706 notification for a permission. If one of the listeners refuses the
4707 new value, the change will not be performed.
4708 </note>
4709 <note>
4710 On success, the
4711 <link to="IExtraDataChangedEvent"/> notification
4712 is called to inform all registered listeners about a successful data
4713 change.
4714 </note>
4715 <note>
4716 This method can be called outside the machine session and therefore
4717 it's a caller's responsibility to handle possible race conditions
4718 when several clients change the same key at the same time.
4719 </note>
4720
4721 <result name="VBOX_E_FILE_ERROR">
4722 Settings file not accessible.
4723 </result>
4724 <result name="VBOX_E_XML_ERROR">
4725 Could not parse the settings file.
4726 </result>
4727
4728 </desc>
4729 <param name="key" type="wstring" dir="in">
4730 <desc>Name of the data key to set.</desc>
4731 </param>
4732 <param name="value" type="wstring" dir="in">
4733 <desc>Value to assign to the key.</desc>
4734 </param>
4735 </method>
4736
4737 <method name="getCPUProperty" const="yes">
4738 <desc>
4739 Returns the virtual CPU boolean value of the specified property.
4740
4741 <result name="E_INVALIDARG">
4742 Invalid property.
4743 </result>
4744
4745 </desc>
4746 <param name="property" type="CPUPropertyType" dir="in">
4747 <desc>
4748 Property type to query.
4749 </desc>
4750 </param>
4751 <param name="value" type="boolean" dir="return">
4752 <desc>
4753 Property value.
4754 </desc>
4755 </param>
4756 </method>
4757
4758 <method name="setCPUProperty">
4759 <desc>
4760 Sets the virtual CPU boolean value of the specified property.
4761
4762 <result name="E_INVALIDARG">
4763 Invalid property.
4764 </result>
4765
4766 </desc>
4767 <param name="property" type="CPUPropertyType" dir="in">
4768 <desc>
4769 Property type to query.
4770 </desc>
4771 </param>
4772 <param name="value" type="boolean" dir="in">
4773 <desc>
4774 Property value.
4775 </desc>
4776 </param>
4777 </method>
4778
4779 <method name="getCPUIDLeaf" const="yes">
4780 <desc>
4781 Returns the virtual CPU cpuid information for the specified leaf.
4782
4783 Currently supported index values for cpuid:
4784 Standard CPUID leafs: 0 - 0xA
4785 Extended CPUID leafs: 0x80000000 - 0x8000000A
4786
4787 See the Intel and AMD programmer's manuals for detailed information
4788 about the cpuid instruction and its leafs.
4789 <result name="E_INVALIDARG">
4790 Invalid id.
4791 </result>
4792
4793 </desc>
4794 <param name="id" type="unsigned long" dir="in">
4795 <desc>
4796 CPUID leaf index.
4797 </desc>
4798 </param>
4799 <param name="valEax" type="unsigned long" dir="out">
4800 <desc>
4801 CPUID leaf value for register eax.
4802 </desc>
4803 </param>
4804 <param name="valEbx" type="unsigned long" dir="out">
4805 <desc>
4806 CPUID leaf value for register ebx.
4807 </desc>
4808 </param>
4809 <param name="valEcx" type="unsigned long" dir="out">
4810 <desc>
4811 CPUID leaf value for register ecx.
4812 </desc>
4813 </param>
4814 <param name="valEdx" type="unsigned long" dir="out">
4815 <desc>
4816 CPUID leaf value for register edx.
4817 </desc>
4818 </param>
4819 </method>
4820
4821 <method name="setCPUIDLeaf">
4822 <desc>
4823 Sets the virtual CPU cpuid information for the specified leaf. Note that these values
4824 are not passed unmodified. VirtualBox clears features that it doesn't support.
4825
4826 Currently supported index values for cpuid:
4827 Standard CPUID leafs: 0 - 0xA
4828 Extended CPUID leafs: 0x80000000 - 0x8000000A
4829
4830 See the Intel and AMD programmer's manuals for detailed information
4831 about the cpuid instruction and its leafs.
4832
4833 Do not use this method unless you know exactly what you're doing. Misuse can lead to
4834 random crashes inside VMs.
4835 <result name="E_INVALIDARG">
4836 Invalid id.
4837 </result>
4838
4839 </desc>
4840 <param name="id" type="unsigned long" dir="in">
4841 <desc>
4842 CPUID leaf index.
4843 </desc>
4844 </param>
4845 <param name="valEax" type="unsigned long" dir="in">
4846 <desc>
4847 CPUID leaf value for register eax.
4848 </desc>
4849 </param>
4850 <param name="valEbx" type="unsigned long" dir="in">
4851 <desc>
4852 CPUID leaf value for register ebx.
4853 </desc>
4854 </param>
4855 <param name="valEcx" type="unsigned long" dir="in">
4856 <desc>
4857 CPUID leaf value for register ecx.
4858 </desc>
4859 </param>
4860 <param name="valEdx" type="unsigned long" dir="in">
4861 <desc>
4862 CPUID leaf value for register edx.
4863 </desc>
4864 </param>
4865 </method>
4866
4867 <method name="removeCPUIDLeaf">
4868 <desc>
4869 Removes the virtual CPU cpuid leaf for the specified index
4870
4871 <result name="E_INVALIDARG">
4872 Invalid id.
4873 </result>
4874
4875 </desc>
4876 <param name="id" type="unsigned long" dir="in">
4877 <desc>
4878 CPUID leaf index.
4879 </desc>
4880 </param>
4881 </method>
4882
4883 <method name="removeAllCPUIDLeaves">
4884 <desc>
4885 Removes all the virtual CPU cpuid leaves
4886 </desc>
4887 </method>
4888
4889 <method name="getHWVirtExProperty" const="yes">
4890 <desc>
4891 Returns the value of the specified hardware virtualization boolean property.
4892
4893 <result name="E_INVALIDARG">
4894 Invalid property.
4895 </result>
4896
4897 </desc>
4898 <param name="property" type="HWVirtExPropertyType" dir="in">
4899 <desc>
4900 Property type to query.
4901 </desc>
4902 </param>
4903 <param name="value" type="boolean" dir="return">
4904 <desc>
4905 Property value.
4906 </desc>
4907 </param>
4908 </method>
4909
4910 <method name="setHWVirtExProperty">
4911 <desc>
4912 Sets a new value for the specified hardware virtualization boolean property.
4913
4914 <result name="E_INVALIDARG">
4915 Invalid property.
4916 </result>
4917
4918 </desc>
4919 <param name="property" type="HWVirtExPropertyType" dir="in">
4920 <desc>
4921 Property type to set.
4922 </desc>
4923 </param>
4924 <param name="value" type="boolean" dir="in">
4925 <desc>
4926 New property value.
4927 </desc>
4928 </param>
4929 </method>
4930
4931 <method name="saveSettings">
4932 <desc>
4933 Saves any changes to machine settings made since the session
4934 has been opened or a new machine has been created, or since the
4935 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
4936 For registered machines, new settings become visible to all
4937 other VirtualBox clients after successful invocation of this
4938 method.
4939 <note>
4940 The method sends <link to="IMachineDataChangedEvent"/>
4941 notification event after the configuration has been successfully
4942 saved (only for registered machines).
4943 </note>
4944 <note>
4945 Calling this method is only valid on instances returned
4946 by <link to="ISession::machine"/> and on new machines
4947 created by <link to="IVirtualBox::createMachine"/> but not
4948 yet registered, or on unregistered machines after calling
4949 <link to="IMachine::unregister"/>.
4950 </note>
4951
4952 <result name="VBOX_E_FILE_ERROR">
4953 Settings file not accessible.
4954 </result>
4955 <result name="VBOX_E_XML_ERROR">
4956 Could not parse the settings file.
4957 </result>
4958 <result name="E_ACCESSDENIED">
4959 Modification request refused.
4960 </result>
4961
4962 </desc>
4963 </method>
4964
4965 <method name="discardSettings">
4966 <desc>
4967 Discards any changes to the machine settings made since the session
4968 has been opened or since the last call to <link to="#saveSettings"/>
4969 or <link to="#discardSettings"/>.
4970 <note>
4971 Calling this method is only valid on instances returned
4972 by <link to="ISession::machine"/> and on new machines
4973 created by <link to="IVirtualBox::createMachine"/> or
4974 opened by <link to="IVirtualBox::openMachine"/> but not
4975 yet registered, or on unregistered machines after calling
4976 <link to="IMachine::unregister"/>.
4977 </note>
4978
4979 <result name="VBOX_E_INVALID_VM_STATE">
4980 Virtual machine is not mutable.
4981 </result>
4982
4983 </desc>
4984 </method>
4985
4986 <method name="unregister">
4987 <desc>
4988 Unregisters the machine, which must have been previously registered using
4989 <link to="IVirtualBox::registerMachine"/>, and optionally do additional
4990 cleanup before the machine is unregistered.
4991
4992 This method does not delete any files. It only changes the machine configuration and
4993 the list of registered machines in the VirtualBox object. To delete the files which
4994 belonged to the machine, including the XML file of the machine itself, call
4995 <link to="#delete"/>, optionally with the array of IMedium objects which was returned
4996 from this method.
4997
4998 How thoroughly this method cleans up the machine configuration before unregistering
4999 the machine depends on the @a cleanupMode argument.
5000
5001 <ul>
5002 <li>With "UnregisterOnly", the machine will only be unregistered, but no additional
5003 cleanup will be performed. The call will fail if the machine is in "Saved" state
5004 or has any snapshots or any media attached (see <link to="IMediumAttachment" />.
5005 It is the responsibility of the caller to delete all such configuration in this mode.
5006 In this mode, the API behaves like the former @c IVirtualBox::unregisterMachine() API
5007 which it replaces.</li>
5008 <li>With "DetachAllReturnNone", the call will succeed even if the machine is in "Saved"
5009 state or if it has snapshots or media attached. All media attached to the current machine
5010 state or in snapshots will be detached. No medium objects will be returned; all of the
5011 machine's media will remain open.</li>
5012 <li>With "DetachAllReturnHardDisksOnly", the call will behave like with "DetachAllReturnNone",
5013 except that all the hard disk medium objects which were detached from the machine will
5014 be returned as an array. This allows for quickly passing them to the <link to="#delete" />
5015 API for closing and deletion.</li>
5016 <li>With "Full", the call will behave like with "DetachAllReturnHardDisksOnly", except
5017 that all media will be returned in the array, including removeable media like DVDs and
5018 floppies. This might be useful if the user wants to inspect in detail which media were
5019 attached to the machine. Be careful when passing the media array to <link to="#delete" />
5020 in that case because users will typically want to preserve ISO and RAW image files.</li>
5021 </ul>
5022
5023 This API does not verify whether the media files returned in the array are still
5024 attached to other machines (i.e. shared between several machines). If such a shared
5025 image is passed to <link to="#delete" /> however, closing the image will fail there
5026 and the image will be silently skipped.
5027
5028 A typical implementation will use "DetachAllReturnHardDisksOnly" and then pass the
5029 resulting IMedia array to <link to="#delete"/>. This way, the machine is completely
5030 deleted with all its saved states and hard disk images, but images for removeable
5031 drives (such as ISO and RAW files) will remain on disk.
5032
5033 The call will fail if the machine is currently locked (see <link to="ISession" />).
5034 It implicitly calls <link to="#saveSettings"/> to save all current machine settings
5035 before unregistering it.
5036
5037 After successful method invocation, the <link to="IMachineRegisteredEvent"/> event
5038 is fired.
5039
5040 <note>
5041 If the given machine is inaccessible (see <link to="#accessible"/>), it
5042 will be unregistered and fully uninitialized right afterwards. As a result,
5043 the returned machine object will be unusable and an attempt to call
5044 <b>any</b> method will return the "Object not ready" error.
5045 </note>
5046
5047 <result name="VBOX_E_INVALID_OBJECT_STATE">
5048 Machine is currently locked for a session.
5049 </result>
5050 </desc>
5051
5052 <param name="cleanupMode" type="CleanupMode" dir="in">
5053 <desc>How to clean up after the machine has been unregistered.</desc>
5054 </param>
5055 <param name="aMedia" type="IMedium" safearray="yes" dir="return">
5056 <desc>List of media detached from the machine, depending on the @a cleanupMode parameter.</desc>
5057 </param>
5058 </method>
5059
5060 <method name="delete">
5061 <desc>
5062 Deletes the files associated with this machine from disk. If medium objects are passed
5063 in with the @a aMedia argument, they are closed and, if closing was succesful, their
5064 storage files are deleted as well. For convenience, this array of media files can be
5065 the same as the one returned from a previous <link to="#unregister" /> call.
5066
5067 This method must only be called on machines which are either write-locked (i.e. on instances
5068 returned by <link to="ISession::machine"/>) or on unregistered machines (i.e. not yet
5069 registered machines created by <link to="IVirtualBox::createMachine"/> or opened by
5070 <link to="IVirtualBox::openMachine"/>, or after having called <link to="#unregister"/>).
5071
5072 The following files will be deleted by this method:
5073 <ul>
5074 <li>If <link to="#unregister" /> had been previously called with a @a cleanupMode
5075 argument other than "UnregisterOnly", this will delete all saved state files that
5076 the machine had in use; possibly one if the machine was in "Saved" state and one
5077 for each online snapshot that the machine had.</li>
5078 <li>On each medium object passed in the @a aMedia array, this will call
5079 <link to="IMedium::close" />. If that succeeds, this will attempt to delete the
5080 medium's storage on disk. Since the close() call will fail if the medium is still
5081 in use, e.g. because it is still attached to a second machine; in that case the
5082 storage will not be deleted.</li>
5083 <li>Finally, the machine's own XML file will be deleted.</li>
5084 </ul>
5085
5086 Since deleting large disk image files can be a time-consuming I/O operation, this
5087 method operates asynchronously and returns an IProgress object to allow the caller
5088 to monitor the progress. There will be one sub-operation for each file that is
5089 being deleted (saved state or medium storage file).
5090
5091 <note>
5092 <link to="#settingsModified"/> will return @c true after this
5093 method successfully returns.
5094 </note>
5095
5096 <result name="VBOX_E_INVALID_VM_STATE">
5097 Machine is registered but not write-locked.
5098 </result>
5099 <result name="VBOX_E_IPRT_ERROR">
5100 Could not delete the settings file.
5101 </result>
5102 </desc>
5103 <param name="aMedia" type="IMedium" safearray="yes" dir="in">
5104 <desc>List of media to be closed and whose storage files will be deleted.</desc>
5105 </param>
5106 <param name="aProgress" type="IProgress" dir="return">
5107 <desc>Progress object to track the operation completion.</desc>
5108 </param>
5109 </method>
5110
5111 <method name="export">
5112 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5113 steps required to export VirtualBox machines to OVF.
5114 </desc>
5115
5116 <param name="aAppliance" type="IAppliance" dir="in">
5117 <desc>Appliance to export this machine to.</desc>
5118 </param>
5119 <param name="location" type="wstring" dir="in">
5120 <desc>The target location.</desc>
5121 </param>
5122 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5123 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5124 </param>
5125 </method >
5126
5127 <method name="findSnapshot">
5128 <desc>
5129 Returns a snapshot of this machine with the given name or UUID.
5130
5131 Returns a snapshot of this machine with the given UUID.
5132 A @c null argument can be used to obtain the first snapshot
5133 taken on this machine. This is useful if you want to traverse
5134 the whole tree of snapshots starting from the root.
5135
5136 <result name="VBOX_E_OBJECT_NOT_FOUND">
5137 Virtual machine has no snapshots or snapshot not found.
5138 </result>
5139
5140 </desc>
5141 <param name="nameOrId" type="wstring" dir="in">
5142 <desc>What to search for. Name or UUID of the snapshot to find</desc>
5143 </param>
5144 <param name="snapshot" type="ISnapshot" dir="return">
5145 <desc>Snapshot object with the given name.</desc>
5146 </param>
5147 </method>
5148
5149 <method name="createSharedFolder">
5150 <desc>
5151 Creates a new permanent shared folder by associating the given logical
5152 name with the given host path, adds it to the collection of shared
5153 folders and starts sharing it. Refer to the description of
5154 <link to="ISharedFolder"/> to read more about logical names.
5155
5156 <result name="VBOX_E_OBJECT_IN_USE">
5157 Shared folder already exists.
5158 </result>
5159 <result name="VBOX_E_FILE_ERROR">
5160 Shared folder @a hostPath not accessible.
5161 </result>
5162
5163 </desc>
5164 <param name="name" type="wstring" dir="in">
5165 <desc>Unique logical name of the shared folder.</desc>
5166 </param>
5167 <param name="hostPath" type="wstring" dir="in">
5168 <desc>Full path to the shared folder in the host file system.</desc>
5169 </param>
5170 <param name="writable" type="boolean" dir="in">
5171 <desc>Whether the share is writable or readonly.</desc>
5172 </param>
5173 <param name="automount" type="boolean" dir="in">
5174 <desc>Whether the share gets automatically mounted by the guest
5175 or not.</desc>
5176 </param>
5177 </method>
5178
5179 <method name="removeSharedFolder">
5180 <desc>
5181 Removes the permanent shared folder with the given name previously
5182 created by <link to="#createSharedFolder"/> from the collection of
5183 shared folders and stops sharing it.
5184
5185 <result name="VBOX_E_INVALID_VM_STATE">
5186 Virtual machine is not mutable.
5187 </result>
5188 <result name="VBOX_E_OBJECT_NOT_FOUND">
5189 Shared folder @a name does not exist.
5190 </result>
5191
5192 </desc>
5193 <param name="name" type="wstring" dir="in">
5194 <desc>Logical name of the shared folder to remove.</desc>
5195 </param>
5196 </method>
5197
5198 <method name="canShowConsoleWindow">
5199 <desc>
5200 Returns @c true if the VM console process can activate the
5201 console window and bring it to foreground on the desktop of
5202 the host PC.
5203 <note>
5204 This method will fail if a session for this machine is not
5205 currently open.
5206 </note>
5207
5208 <result name="VBOX_E_INVALID_VM_STATE">
5209 Machine session is not open.
5210 </result>
5211
5212 </desc>
5213 <param name="canShow" type="boolean" dir="return">
5214 <desc>
5215 @c true if the console window can be shown and @c false otherwise.
5216 </desc>
5217 </param>
5218 </method>
5219
5220 <method name="showConsoleWindow">
5221 <desc>
5222 Activates the console window and brings it to foreground on
5223 the desktop of the host PC. Many modern window managers on
5224 many platforms implement some sort of focus stealing
5225 prevention logic, so that it may be impossible to activate
5226 a window without the help of the currently active
5227 application. In this case, this method will return a non-zero
5228 identifier that represents the top-level window of the VM
5229 console process. The caller, if it represents a currently
5230 active process, is responsible to use this identifier (in a
5231 platform-dependent manner) to perform actual window
5232 activation.
5233 <note>
5234 This method will fail if a session for this machine is not
5235 currently open.
5236 </note>
5237
5238 <result name="VBOX_E_INVALID_VM_STATE">
5239 Machine session is not open.
5240 </result>
5241
5242 </desc>
5243 <param name="winId" type="long long" dir="return">
5244 <desc>
5245 Platform-dependent identifier of the top-level VM console
5246 window, or zero if this method has performed all actions
5247 necessary to implement the <i>show window</i> semantics for
5248 the given platform and/or VirtualBox front-end.
5249 </desc>
5250 </param>
5251 </method>
5252
5253 <method name="getGuestProperty" const="yes">
5254 <desc>
5255 Reads an entry from the machine's guest property store.
5256
5257 <result name="VBOX_E_INVALID_VM_STATE">
5258 Machine session is not open.
5259 </result>
5260
5261 </desc>
5262 <param name="name" type="wstring" dir="in">
5263 <desc>
5264 The name of the property to read.
5265 </desc>
5266 </param>
5267 <param name="value" type="wstring" dir="out">
5268 <desc>
5269 The value of the property. If the property does not exist then this
5270 will be empty.
5271 </desc>
5272 </param>
5273 <param name="timestamp" type="long long" dir="out">
5274 <desc>
5275 The time at which the property was last modified, as seen by the
5276 server process.
5277 </desc>
5278 </param>
5279 <param name="flags" type="wstring" dir="out">
5280 <desc>
5281 Additional property parameters, passed as a comma-separated list of
5282 "name=value" type entries.
5283 </desc>
5284 </param>
5285 </method>
5286
5287 <method name="getGuestPropertyValue" const="yes">
5288 <desc>
5289 Reads a value from the machine's guest property store.
5290
5291 <result name="VBOX_E_INVALID_VM_STATE">
5292 Machine session is not open.
5293 </result>
5294
5295 </desc>
5296 <param name="property" type="wstring" dir="in">
5297 <desc>
5298 The name of the property to read.
5299 </desc>
5300 </param>
5301 <param name="value" type="wstring" dir="return">
5302 <desc>
5303 The value of the property. If the property does not exist then this
5304 will be empty.
5305 </desc>
5306 </param>
5307 </method>
5308
5309 <method name="getGuestPropertyTimestamp" const="yes">
5310 <desc>
5311 Reads a property timestamp from the machine's guest property store.
5312
5313 <result name="VBOX_E_INVALID_VM_STATE">
5314 Machine session is not open.
5315 </result>
5316
5317 </desc>
5318 <param name="property" type="wstring" dir="in">
5319 <desc>
5320 The name of the property to read.
5321 </desc>
5322 </param>
5323 <param name="value" type="long long" dir="return">
5324 <desc>
5325 The timestamp. If the property does not exist then this will be
5326 empty.
5327 </desc>
5328 </param>
5329 </method>
5330
5331 <method name="setGuestProperty">
5332 <desc>
5333 Sets, changes or deletes an entry in the machine's guest property
5334 store.
5335
5336 <result name="E_ACCESSDENIED">
5337 Property cannot be changed.
5338 </result>
5339 <result name="E_INVALIDARG">
5340 Invalid @a flags.
5341 </result>
5342 <result name="VBOX_E_INVALID_VM_STATE">
5343 Virtual machine is not mutable or session not open.
5344 </result>
5345 <result name="VBOX_E_INVALID_OBJECT_STATE">
5346 Cannot set transient property when machine not running.
5347 </result>
5348
5349 </desc>
5350 <param name="property" type="wstring" dir="in">
5351 <desc>
5352 The name of the property to set, change or delete.
5353 </desc>
5354 </param>
5355 <param name="value" type="wstring" dir="in">
5356 <desc>
5357 The new value of the property to set, change or delete. If the
5358 property does not yet exist and value is non-empty, it will be
5359 created. If the value is @c null or empty, the property will be
5360 deleted if it exists.
5361 </desc>
5362 </param>
5363 <param name="flags" type="wstring" dir="in">
5364 <desc>
5365 Additional property parameters, passed as a comma-separated list of
5366 "name=value" type entries.
5367 </desc>
5368 </param>
5369 </method>
5370
5371 <method name="setGuestPropertyValue">
5372 <desc>
5373 Sets, changes or deletes a value in the machine's guest property
5374 store. The flags field will be left unchanged or created empty for a
5375 new property.
5376
5377 <result name="E_ACCESSDENIED">
5378 Property cannot be changed.
5379 </result>
5380 <result name="VBOX_E_INVALID_VM_STATE">
5381 Virtual machine is not mutable or session not open.
5382 </result>
5383 <result name="VBOX_E_INVALID_OBJECT_STATE">
5384 Cannot set transient property when machine not running.
5385 </result>
5386 </desc>
5387
5388 <param name="property" type="wstring" dir="in">
5389 <desc>
5390 The name of the property to set, change or delete.
5391 </desc>
5392 </param>
5393 <param name="value" type="wstring" dir="in">
5394 <desc>
5395 The new value of the property to set, change or delete. If the
5396 property does not yet exist and value is non-empty, it will be
5397 created. If the value is @c null or empty, the property will be
5398 deleted if it exists.
5399 </desc>
5400 </param>
5401 </method>
5402
5403 <method name="enumerateGuestProperties">
5404 <desc>
5405 Return a list of the guest properties matching a set of patterns along
5406 with their values, time stamps and flags.
5407 </desc>
5408 <param name="patterns" type="wstring" dir="in">
5409 <desc>
5410 The patterns to match the properties against, separated by '|'
5411 characters. If this is empty or @c null, all properties will match.
5412 </desc>
5413 </param>
5414 <param name="name" type="wstring" dir="out" safearray="yes">
5415 <desc>
5416 The names of the properties returned.
5417 </desc>
5418 </param>
5419 <param name="value" type="wstring" dir="out" safearray="yes">
5420 <desc>
5421 The values of the properties returned. The array entries match the
5422 corresponding entries in the @a name array.
5423 </desc>
5424 </param>
5425 <param name="timestamp" type="long long" dir="out" safearray="yes">
5426 <desc>
5427 The time stamps of the properties returned. The array entries match
5428 the corresponding entries in the @a name array.
5429 </desc>
5430 </param>
5431 <param name="flags" type="wstring" dir="out" safearray="yes">
5432 <desc>
5433 The flags of the properties returned. The array entries match the
5434 corresponding entries in the @a name array.
5435 </desc>
5436 </param>
5437 </method>
5438
5439 <method name="querySavedGuestSize">
5440 <desc>
5441 Returns the guest dimensions from the saved state.
5442 </desc>
5443 <param name="screenId" type="unsigned long" dir="in">
5444 <desc>
5445 Saved guest screen to query info from.
5446 </desc>
5447 </param>
5448 <param name="width" type="unsigned long" dir="out">
5449 <desc>
5450 Guest width at the time of the saved state was taken.
5451 </desc>
5452 </param>
5453 <param name="height" type="unsigned long" dir="out">
5454 <desc>
5455 Guest height at the time of the saved state was taken.
5456 </desc>
5457 </param>
5458 </method>
5459
5460 <method name="querySavedThumbnailSize">
5461 <desc>
5462 Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.
5463 </desc>
5464 <param name="screenId" type="unsigned long" dir="in">
5465 <desc>
5466 Saved guest screen to query info from.
5467 </desc>
5468 </param>
5469 <param name="size" type="unsigned long" dir="out">
5470 <desc>
5471 Size of buffer required to store the bitmap.
5472 </desc>
5473 </param>
5474 <param name="width" type="unsigned long" dir="out">
5475 <desc>
5476 Bitmap width.
5477 </desc>
5478 </param>
5479 <param name="height" type="unsigned long" dir="out">
5480 <desc>
5481 Bitmap height.
5482 </desc>
5483 </param>
5484 </method>
5485
5486 <method name="readSavedThumbnailToArray">
5487 <desc>
5488 Thumbnail is retrieved to an array of bytes in uncompressed 32-bit BGRA or RGBA format.
5489 </desc>
5490 <param name="screenId" type="unsigned long" dir="in">
5491 <desc>
5492 Saved guest screen to read from.
5493 </desc>
5494 </param>
5495 <param name="BGR" type="boolean" dir="in">
5496 <desc>
5497 How to order bytes in the pixel. A pixel consists of 4 bytes. If this parameter is true, then
5498 bytes order is: B, G, R, 0xFF. If this parameter is false, then bytes order is: R, G, B, 0xFF.
5499 </desc>
5500 </param>
5501 <param name="width" type="unsigned long" dir="out">
5502 <desc>
5503 Bitmap width.
5504 </desc>
5505 </param>
5506 <param name="height" type="unsigned long" dir="out">
5507 <desc>
5508 Bitmap height.
5509 </desc>
5510 </param>
5511 <param name="data" type="octet" safearray="yes" dir="return">
5512 <desc>
5513 Array with resulting bitmap data.
5514 </desc>
5515 </param>
5516 </method>
5517
5518 <method name="readSavedThumbnailPNGToArray">
5519 <desc>
5520 Thumbnail in PNG format is retrieved to an array of bytes.
5521 </desc>
5522 <param name="screenId" type="unsigned long" dir="in">
5523 <desc>
5524 Saved guest screen to read from.
5525 </desc>
5526 </param>
5527 <param name="width" type="unsigned long" dir="out">
5528 <desc>
5529 Image width.
5530 </desc>
5531 </param>
5532 <param name="height" type="unsigned long" dir="out">
5533 <desc>
5534 Image height.
5535 </desc>
5536 </param>
5537 <param name="data" type="octet" dir="return" safearray="yes">
5538 <desc>
5539 Array with resulting PNG data.
5540 </desc>
5541 </param>
5542 </method>
5543
5544 <method name="querySavedScreenshotPNGSize">
5545 <desc>
5546 Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.
5547 </desc>
5548 <param name="screenId" type="unsigned long" dir="in">
5549 <desc>
5550 Saved guest screen to query info from.
5551 </desc>
5552 </param>
5553 <param name="size" type="unsigned long" dir="out">
5554 <desc>
5555 Size of buffer required to store the PNG binary data.
5556 </desc>
5557 </param>
5558 <param name="width" type="unsigned long" dir="out">
5559 <desc>
5560 Image width.
5561 </desc>
5562 </param>
5563 <param name="height" type="unsigned long" dir="out">
5564 <desc>
5565 Image height.
5566 </desc>
5567 </param>
5568 </method>
5569
5570 <method name="readSavedScreenshotPNGToArray">
5571 <desc>
5572 Screenshot in PNG format is retrieved to an array of bytes.
5573 </desc>
5574 <param name="screenId" type="unsigned long" dir="in">
5575 <desc>
5576 Saved guest screen to read from.
5577 </desc>
5578 </param>
5579 <param name="width" type="unsigned long" dir="out">
5580 <desc>
5581 Image width.
5582 </desc>
5583 </param>
5584 <param name="height" type="unsigned long" dir="out">
5585 <desc>
5586 Image height.
5587 </desc>
5588 </param>
5589 <param name="data" type="octet" dir="return" safearray="yes">
5590 <desc>
5591 Array with resulting PNG data.
5592 </desc>
5593 </param>
5594 </method>
5595
5596 <method name="hotPlugCPU">
5597 <desc>
5598 Plugs a CPU into the machine.
5599 </desc>
5600 <param name="cpu" type="unsigned long" dir="in">
5601 <desc>
5602 The CPU id to insert.
5603 </desc>
5604 </param>
5605 </method>
5606
5607 <method name="hotUnplugCPU">
5608 <desc>
5609 Removes a CPU from the machine.
5610 </desc>
5611 <param name="cpu" type="unsigned long" dir="in">
5612 <desc>
5613 The CPU id to remove.
5614 </desc>
5615 </param>
5616 </method>
5617
5618 <method name="getCPUStatus">
5619 <desc>
5620 Returns the current status of the given CPU.
5621 </desc>
5622 <param name="cpu" type="unsigned long" dir="in">
5623 <desc>
5624 The CPU id to check for.
5625 </desc>
5626 </param>
5627 <param name="attached" type="boolean" dir="return">
5628 <desc>
5629 Status of the CPU.
5630 </desc>
5631 </param>
5632 </method>
5633
5634 <method name="queryLogFilename">
5635 <desc>
5636 Queries for the VM log file name of an given index. Returns an empty
5637 string if a log file with that index doesn't exists.
5638 </desc>
5639 <param name="idx" type="unsigned long" dir="in">
5640 <desc>
5641 Which log file name to query. 0=current log file.
5642 </desc>
5643 </param>
5644 <param name="filename" type="wstring" dir="return">
5645 <desc>
5646 On return the full path to the log file or an empty string on error.
5647 </desc>
5648 </param>
5649 </method>
5650
5651 <method name="readLog">
5652 <desc>
5653 Reads the VM log file. The chunk size is limited, so even if you
5654 ask for a big piece there might be less data returned.
5655 </desc>
5656 <param name="idx" type="unsigned long" dir="in">
5657 <desc>
5658 Which log file to read. 0=current log file.
5659 </desc>
5660 </param>
5661 <param name="offset" type="long long" dir="in">
5662 <desc>
5663 Offset in the log file.
5664 </desc>
5665 </param>
5666 <param name="size" type="long long" dir="in">
5667 <desc>
5668 Chunk size to read in the log file.
5669 </desc>
5670 </param>
5671 <param name="data" type="octet" dir="return" safearray="yes">
5672 <desc>
5673 Data read from the log file. A data size of 0 means end of file
5674 if the requested chunk size was not 0. This is the unprocessed
5675 file data, i.e. the line ending style depends on the platform of
5676 the system the server is running on.
5677 </desc>
5678 </param>
5679 </method>
5680 </interface>
5681
5682 <!--
5683 // IConsole
5684 /////////////////////////////////////////////////////////////////////////
5685 -->
5686
5687 <interface
5688 name="IVRDEServerInfo" extends="$unknown"
5689 uuid="6890123c-5218-42ba-9afd-c71699475115"
5690 wsmap="struct"
5691 >
5692 <desc>
5693 Contains information about the remote desktop (VRDE) server capabilities and status.
5694 This is used in the <link to="IConsole::VRDEServerInfo" /> attribute.
5695 </desc>
5696
5697 <attribute name="active" type="boolean" readonly="yes">
5698 <desc>
5699 Whether the remote desktop connection is active.
5700 </desc>
5701 </attribute>
5702
5703 <attribute name="port" type="long" readonly="yes">
5704 <desc>
5705 VRDE server port number. If this property is equal to <tt>0</tt>, then
5706 the VRDE server failed to start, usually because there are no free IP
5707 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDE
5708 server has not yet been started.
5709 </desc>
5710 </attribute>
5711
5712 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5713 <desc>
5714 How many times a client connected.
5715 </desc>
5716 </attribute>
5717
5718 <attribute name="beginTime" type="long long" readonly="yes">
5719 <desc>
5720 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5721 </desc>
5722 </attribute>
5723
5724 <attribute name="endTime" type="long long" readonly="yes">
5725 <desc>
5726 When the last connection was terminated or the current time, if
5727 connection is still active, in milliseconds since 1970-01-01 UTC.
5728 </desc>
5729 </attribute>
5730
5731 <attribute name="bytesSent" type="long long" readonly="yes">
5732 <desc>
5733 How many bytes were sent in last or current, if still active, connection.
5734 </desc>
5735 </attribute>
5736
5737 <attribute name="bytesSentTotal" type="long long" readonly="yes">
5738 <desc>
5739 How many bytes were sent in all connections.
5740 </desc>
5741 </attribute>
5742
5743 <attribute name="bytesReceived" type="long long" readonly="yes">
5744 <desc>
5745 How many bytes were received in last or current, if still active, connection.
5746 </desc>
5747 </attribute>
5748
5749 <attribute name="bytesReceivedTotal" type="long long" readonly="yes">
5750 <desc>
5751 How many bytes were received in all connections.
5752 </desc>
5753 </attribute>
5754
5755 <attribute name="user" type="wstring" readonly="yes">
5756 <desc>
5757 Login user name supplied by the client.
5758 </desc>
5759 </attribute>
5760
5761 <attribute name="domain" type="wstring" readonly="yes">
5762 <desc>
5763 Login domain name supplied by the client.
5764 </desc>
5765 </attribute>
5766
5767 <attribute name="clientName" type="wstring" readonly="yes">
5768 <desc>
5769 The client name supplied by the client.
5770 </desc>
5771 </attribute>
5772
5773 <attribute name="clientIP" type="wstring" readonly="yes">
5774 <desc>
5775 The IP address of the client.
5776 </desc>
5777 </attribute>
5778
5779 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5780 <desc>
5781 The client software version number.
5782 </desc>
5783 </attribute>
5784
5785 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5786 <desc>
5787 Public key exchange method used when connection was established.
5788 Values: 0 - RDP4 public key exchange scheme.
5789 1 - X509 certificates were sent to client.
5790 </desc>
5791 </attribute>
5792
5793 </interface>
5794
5795 <interface
5796 name="IConsole" extends="$unknown"
5797 uuid="3c4a453e-d27b-44a2-b59d-dda6e1835e57"
5798 wsmap="managed"
5799 >
5800 <desc>
5801 The IConsole interface represents an interface to control virtual
5802 machine execution.
5803
5804 A console object gets created when a machine has been locked for a
5805 particular session (client process) using <link to="IMachine::lockMachine" />
5806 or <link to="IMachine::launchVMProcess"/>. The console object can
5807 then be found in the session's <link to="ISession::console" /> attribute.
5808
5809 Methods of the IConsole interface allow the caller to query the current
5810 virtual machine execution state, pause the machine or power it down, save
5811 the machine state or take a snapshot, attach and detach removable media
5812 and so on.
5813
5814 <see>ISession</see>
5815 </desc>
5816
5817 <attribute name="machine" type="IMachine" readonly="yes">
5818 <desc>
5819 Machine object this console is sessioned with.
5820 <note>
5821 This is a convenience property, it has the same value as
5822 <link to="ISession::machine"/> of the corresponding session
5823 object.
5824 </note>
5825 </desc>
5826 </attribute>
5827
5828 <attribute name="state" type="MachineState" readonly="yes">
5829 <desc>
5830 Current execution state of the machine.
5831 <note>
5832 This property always returns the same value as the corresponding
5833 property of the IMachine object this console is sessioned with.
5834 For the process that owns (executes) the VM, this is the
5835 preferable way of querying the VM state, because no IPC
5836 calls are made.
5837 </note>
5838 </desc>
5839 </attribute>
5840
5841 <attribute name="guest" type="IGuest" readonly="yes">
5842 <desc>Guest object.</desc>
5843 </attribute>
5844
5845 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5846 <desc>
5847 Virtual keyboard object.
5848 <note>
5849 If the machine is not running, any attempt to use
5850 the returned object will result in an error.
5851 </note>
5852 </desc>
5853 </attribute>
5854
5855 <attribute name="mouse" type="IMouse" readonly="yes">
5856 <desc>
5857 Virtual mouse object.
5858 <note>
5859 If the machine is not running, any attempt to use
5860 the returned object will result in an error.
5861 </note>
5862 </desc>
5863 </attribute>
5864
5865 <attribute name="display" type="IDisplay" readonly="yes">
5866 <desc>Virtual display object.
5867 <note>
5868 If the machine is not running, any attempt to use
5869 the returned object will result in an error.
5870 </note>
5871 </desc>
5872 </attribute>
5873
5874 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5875 <desc>Debugging interface.</desc>
5876 </attribute>
5877
5878 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
5879 <desc>
5880 Collection of USB devices currently attached to the virtual
5881 USB controller.
5882 <note>
5883 The collection is empty if the machine is not running.
5884 </note>
5885 </desc>
5886 </attribute>
5887
5888 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
5889 <desc>
5890 List of USB devices currently attached to the remote VRDE client.
5891 Once a new device is physically attached to the remote host computer,
5892 it appears in this list and remains there until detached.
5893 </desc>
5894 </attribute>
5895
5896 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
5897 <desc>
5898 Collection of shared folders for the current session. These folders
5899 are called transient shared folders because they are available to the
5900 guest OS running inside the associated virtual machine only for the
5901 duration of the session (as opposed to
5902 <link to="IMachine::sharedFolders"/> which represent permanent shared
5903 folders). When the session is closed (e.g. the machine is powered down),
5904 these folders are automatically discarded.
5905
5906 New shared folders are added to the collection using
5907 <link to="#createSharedFolder"/>. Existing shared folders can be
5908 removed using <link to="#removeSharedFolder"/>.
5909 </desc>
5910 </attribute>
5911
5912 <attribute name="VRDEServerInfo" type="IVRDEServerInfo" readonly="yes">
5913 <desc>
5914 Interface that provides information on Remote Desktop Extension (VRDE) connection.
5915 </desc>
5916 </attribute>
5917
5918 <attribute name="eventSource" type="IEventSource" readonly="yes">
5919 <desc>
5920 Event source for console events.
5921 </desc>
5922 </attribute>
5923
5924 <method name="powerUp">
5925 <desc>
5926 Starts the virtual machine execution using the current machine
5927 state (that is, its current execution state, current settings and
5928 current storage devices).
5929
5930 <note>
5931 This method is only useful for front-ends that want to actually
5932 execute virtual machines in their own process (like the VirtualBox
5933 or VBoxSDL front-ends). Unless you are intending to write such a
5934 front-end, do not call this method. If you simply want to
5935 start virtual machine execution using one of the existing front-ends
5936 (for example the VirtualBox GUI or headless server), use
5937 <link to="IMachine::launchVMProcess"/> instead; these
5938 front-ends will power up the machine automatically for you.
5939 </note>
5940
5941 If the machine is powered off or aborted, the execution will
5942 start from the beginning (as if the real hardware were just
5943 powered on).
5944
5945 If the machine is in the <link to="MachineState_Saved"/> state,
5946 it will continue its execution the point where the state has
5947 been saved.
5948
5949 If the machine <link to="IMachine::teleporterEnabled"/> property is
5950 enabled on the machine being powered up, the machine will wait for an
5951 incoming teleportation in the <link to="MachineState_TeleportingIn"/>
5952 state. The returned progress object will have at least three
5953 operations where the last three are defined as: (1) powering up and
5954 starting TCP server, (2) waiting for incoming teleportations, and
5955 (3) perform teleportation. These operations will be reflected as the
5956 last three operations of the progress objected returned by
5957 <link to="IMachine::launchVMProcess"/> as well.
5958
5959 <see>#saveState</see>
5960
5961 <result name="VBOX_E_INVALID_VM_STATE">
5962 Virtual machine already running.
5963 </result>
5964 <result name="VBOX_E_HOST_ERROR">
5965 Host interface does not exist or name not set.
5966 </result>
5967 <result name="VBOX_E_FILE_ERROR">
5968 Invalid saved state file.
5969 </result>
5970 </desc>
5971 <param name="progress" type="IProgress" dir="return">
5972 <desc>Progress object to track the operation completion.</desc>
5973 </param>
5974 </method>
5975
5976 <method name="powerUpPaused">
5977 <desc>
5978 Identical to powerUp except that the VM will enter the
5979 <link to="MachineState_Paused"/> state, instead of
5980 <link to="MachineState_Running"/>.
5981
5982 <see>#powerUp</see>
5983 <result name="VBOX_E_INVALID_VM_STATE">
5984 Virtual machine already running.
5985 </result>
5986 <result name="VBOX_E_HOST_ERROR">
5987 Host interface does not exist or name not set.
5988 </result>
5989 <result name="VBOX_E_FILE_ERROR">
5990 Invalid saved state file.
5991 </result>
5992 </desc>
5993 <param name="progress" type="IProgress" dir="return">
5994 <desc>Progress object to track the operation completion.</desc>
5995 </param>
5996 </method>
5997
5998 <method name="powerDown">
5999 <desc>
6000 Initiates the power down procedure to stop the virtual machine
6001 execution.
6002
6003 The completion of the power down procedure is tracked using the returned
6004 IProgress object. After the operation is complete, the machine will go
6005 to the PoweredOff state.
6006 <result name="VBOX_E_INVALID_VM_STATE">
6007 Virtual machine must be Running, Paused or Stuck to be powered down.
6008 </result>
6009 </desc>
6010 <param name="progress" type="IProgress" dir="return">
6011 <desc>Progress object to track the operation completion.</desc>
6012 </param>
6013 </method>
6014
6015 <method name="reset">
6016 <desc>Resets the virtual machine.
6017 <result name="VBOX_E_INVALID_VM_STATE">
6018 Virtual machine not in Running state.
6019 </result>
6020 <result name="VBOX_E_VM_ERROR">
6021 Virtual machine error in reset operation.
6022 </result>
6023 </desc>
6024 </method>
6025
6026 <method name="pause">
6027 <desc>Pauses the virtual machine execution.
6028 <result name="VBOX_E_INVALID_VM_STATE">
6029 Virtual machine not in Running state.
6030 </result>
6031 <result name="VBOX_E_VM_ERROR">
6032 Virtual machine error in suspend operation.
6033 </result>
6034 </desc>
6035 </method>
6036
6037 <method name="resume">
6038 <desc>Resumes the virtual machine execution.
6039 <result name="VBOX_E_INVALID_VM_STATE">
6040 Virtual machine not in Paused state.
6041 </result>
6042 <result name="VBOX_E_VM_ERROR">
6043 Virtual machine error in resume operation.
6044 </result>
6045 </desc>
6046 </method>
6047
6048 <method name="powerButton">
6049 <desc>Sends the ACPI power button event to the guest.
6050 <result name="VBOX_E_INVALID_VM_STATE">
6051 Virtual machine not in Running state.
6052 </result>
6053 <result name="VBOX_E_PDM_ERROR">
6054 Controlled power off failed.
6055 </result>
6056 </desc>
6057 </method>
6058
6059 <method name="sleepButton">
6060 <desc>Sends the ACPI sleep button event to the guest.
6061 <result name="VBOX_E_INVALID_VM_STATE">
6062 Virtual machine not in Running state.
6063 </result>
6064 <result name="VBOX_E_PDM_ERROR">
6065 Sending sleep button event failed.
6066 </result>
6067 </desc>
6068 </method>
6069
6070 <method name="getPowerButtonHandled">
6071 <desc>Checks if the last power button event was handled by guest.
6072 <result name="VBOX_E_PDM_ERROR">
6073 Checking if the event was handled by the guest OS failed.
6074 </result>
6075 </desc>
6076 <param name="handled" type="boolean" dir="return"/>
6077 </method>
6078
6079 <method name="getGuestEnteredACPIMode">
6080 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6081 G1 (sleeping). If this method returns @c false, the guest will
6082 most likely not respond to external ACPI events.
6083 <result name="VBOX_E_INVALID_VM_STATE">
6084 Virtual machine not in Running state.
6085 </result>
6086 </desc>
6087 <param name="entered" type="boolean" dir="return"/>
6088 </method>
6089
6090 <method name="saveState">
6091 <desc>
6092 Saves the current execution state of a running virtual machine
6093 and stops its execution.
6094
6095 After this operation completes, the machine will go to the
6096 Saved state. Next time it is powered up, this state will
6097 be restored and the machine will continue its execution from
6098 the place where it was saved.
6099
6100 This operation differs from taking a snapshot to the effect
6101 that it doesn't create new differencing media. Also, once
6102 the machine is powered up from the state saved using this method,
6103 the saved state is deleted, so it will be impossible to return
6104 to this state later.
6105
6106 <note>
6107 On success, this method implicitly calls
6108 <link to="IMachine::saveSettings"/> to save all current machine
6109 settings (including runtime changes to the DVD medium, etc.).
6110 Together with the impossibility to change any VM settings when it is
6111 in the Saved state, this guarantees adequate hardware
6112 configuration of the machine when it is restored from the saved
6113 state file.
6114 </note>
6115
6116 <note>
6117 The machine must be in the Running or Paused state, otherwise
6118 the operation will fail.
6119 </note>
6120 <result name="VBOX_E_INVALID_VM_STATE">
6121 Virtual machine state neither Running nor Paused.
6122 </result>
6123 <result name="VBOX_E_FILE_ERROR">
6124 Failed to create directory for saved state file.
6125 </result>
6126
6127 <see><link to="#takeSnapshot"/></see>
6128 </desc>
6129 <param name="progress" type="IProgress" dir="return">
6130 <desc>Progress object to track the operation completion.</desc>
6131 </param>
6132 </method>
6133
6134 <method name="adoptSavedState">
6135 <desc>
6136 Associates the given saved state file to the virtual machine.
6137
6138 On success, the machine will go to the Saved state. Next time it is
6139 powered up, it will be restored from the adopted saved state and
6140 continue execution from the place where the saved state file was
6141 created.
6142
6143 The specified saved state file path may be absolute or relative to the
6144 folder the VM normally saves the state to (usually,
6145 <link to="IMachine::snapshotFolder"/>).
6146
6147 <note>
6148 It's a caller's responsibility to make sure the given saved state
6149 file is compatible with the settings of this virtual machine that
6150 represent its virtual hardware (memory size, storage disk configuration
6151 etc.). If there is a mismatch, the behavior of the virtual machine
6152 is undefined.
6153 </note>
6154 <result name="VBOX_E_INVALID_VM_STATE">
6155 Virtual machine state neither PoweredOff nor Aborted.
6156 </result>
6157 </desc>
6158 <param name="savedStateFile" type="wstring" dir="in">
6159 <desc>Path to the saved state file to adopt.</desc>
6160 </param>
6161 </method>
6162
6163 <method name="discardSavedState">
6164 <desc>
6165 Forcibly resets the machine to "Powered Off" state if it is
6166 currently in the "Saved" state (previously created by <link to="#saveState"/>).
6167 Next time the machine is powered up, a clean boot will occur.
6168 <note>
6169 This operation is equivalent to resetting or powering off
6170 the machine without doing a proper shutdown of the guest
6171 operating system; as with resetting a running phyiscal
6172 computer, it can can lead to data loss.
6173 </note>
6174 If @a fRemoveFile is @c true, the file in the machine directory
6175 into which the machine state was saved is also deleted. If
6176 this is @c false, then the state can be recovered and later
6177 re-inserted into a machine using <link to="#adoptSavedState" />.
6178 The location of the file can be found in the
6179 <link to="IMachine::stateFilePath" /> attribute.
6180 <result name="VBOX_E_INVALID_VM_STATE">
6181 Virtual machine not in state Saved.
6182 </result>
6183 </desc>
6184 <param name="fRemoveFile" type="boolean" dir="in" >
6185 <desc>Whether to also remove the saved state file.</desc>
6186 </param>
6187 </method>
6188
6189 <method name="getDeviceActivity">
6190 <desc>
6191 Gets the current activity type of a given device or device group.
6192 <result name="E_INVALIDARG">
6193 Invalid device type.
6194 </result>
6195 </desc>
6196 <param name="type" type="DeviceType" dir="in"/>
6197 <param name="activity" type="DeviceActivity" dir="return"/>
6198 </method>
6199
6200 <method name="attachUSBDevice">
6201 <desc>
6202 Attaches a host USB device with the given UUID to the
6203 USB controller of the virtual machine.
6204
6205 The device needs to be in one of the following states:
6206 <link to="USBDeviceState_Busy"/>,
6207 <link to="USBDeviceState_Available"/> or
6208 <link to="USBDeviceState_Held"/>,
6209 otherwise an error is immediately returned.
6210
6211 When the device state is
6212 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6213 be returned if the host computer refuses to release it for some reason.
6214
6215 <see>IUSBController::deviceFilters, USBDeviceState</see>
6216 <result name="VBOX_E_INVALID_VM_STATE">
6217 Virtual machine state neither Running nor Paused.
6218 </result>
6219 <result name="VBOX_E_PDM_ERROR">
6220 Virtual machine does not have a USB controller.
6221 </result>
6222 </desc>
6223 <param name="id" type="uuid" mod="string" dir="in">
6224 <desc>UUID of the host USB device to attach.</desc>
6225 </param>
6226 </method>
6227
6228 <method name="detachUSBDevice">
6229 <desc>
6230 Detaches an USB device with the given UUID from the USB controller
6231 of the virtual machine.
6232
6233 After this method succeeds, the VirtualBox server re-initiates
6234 all USB filters as if the device were just physically attached
6235 to the host, but filters of this machine are ignored to avoid
6236 a possible automatic re-attachment.
6237
6238 <see>IUSBController::deviceFilters, USBDeviceState</see>
6239
6240 <result name="VBOX_E_PDM_ERROR">
6241 Virtual machine does not have a USB controller.
6242 </result>
6243 <result name="E_INVALIDARG">
6244 USB device not attached to this virtual machine.
6245 </result>
6246 </desc>
6247 <param name="id" type="uuid" mod="string" dir="in">
6248 <desc>UUID of the USB device to detach.</desc>
6249 </param>
6250 <param name="device" type="IUSBDevice" dir="return">
6251 <desc>Detached USB device.</desc>
6252 </param>
6253 </method>
6254
6255 <method name="findUSBDeviceByAddress">
6256 <desc>
6257 Searches for a USB device with the given host address.
6258
6259 <result name="VBOX_E_OBJECT_NOT_FOUND">
6260 Given @c name does not correspond to any USB device.
6261 </result>
6262
6263 <see>IUSBDevice::address</see>
6264 </desc>
6265 <param name="name" type="wstring" dir="in">
6266 <desc>
6267 Address of the USB device (as assigned by the host) to
6268 search for.
6269 </desc>
6270 </param>
6271 <param name="device" type="IUSBDevice" dir="return">
6272 <desc>Found USB device object.</desc>
6273 </param>
6274 </method>
6275
6276 <method name="findUSBDeviceById">
6277 <desc>
6278 Searches for a USB device with the given UUID.
6279
6280 <result name="VBOX_E_OBJECT_NOT_FOUND">
6281 Given @c id does not correspond to any USB device.
6282 </result>
6283
6284 <see>IUSBDevice::id</see>
6285 </desc>
6286 <param name="id" type="uuid" mod="string" dir="in">
6287 <desc>UUID of the USB device to search for.</desc>
6288 </param>
6289 <param name="device" type="IUSBDevice" dir="return">
6290 <desc>Found USB device object.</desc>
6291 </param>
6292 </method>
6293
6294 <method name="createSharedFolder">
6295 <desc>
6296 Creates a transient new shared folder by associating the given logical
6297 name with the given host path, adds it to the collection of shared
6298 folders and starts sharing it. Refer to the description of
6299 <link to="ISharedFolder"/> to read more about logical names.
6300
6301 <result name="VBOX_E_INVALID_VM_STATE">
6302 Virtual machine in Saved state or currently changing state.
6303 </result>
6304 <result name="VBOX_E_FILE_ERROR">
6305 Shared folder already exists or not accessible.
6306 </result>
6307 </desc>
6308 <param name="name" type="wstring" dir="in">
6309 <desc>Unique logical name of the shared folder.</desc>
6310 </param>
6311 <param name="hostPath" type="wstring" dir="in">
6312 <desc>Full path to the shared folder in the host file system.</desc>
6313 </param>
6314 <param name="writable" type="boolean" dir="in">
6315 <desc>Whether the share is writable or readonly</desc>
6316 </param>
6317 <param name="automount" type="boolean" dir="in">
6318 <desc>Whether the share gets automatically mounted by the guest
6319 or not.</desc>
6320 </param>
6321 </method>
6322
6323 <method name="removeSharedFolder">
6324 <desc>
6325 Removes a transient shared folder with the given name previously
6326 created by <link to="#createSharedFolder"/> from the collection of
6327 shared folders and stops sharing it.
6328 <result name="VBOX_E_INVALID_VM_STATE">
6329 Virtual machine in Saved state or currently changing state.
6330 </result>
6331 <result name="VBOX_E_FILE_ERROR">
6332 Shared folder does not exists.
6333 </result>
6334 </desc>
6335 <param name="name" type="wstring" dir="in">
6336 <desc>Logical name of the shared folder to remove.</desc>
6337 </param>
6338 </method>
6339
6340 <method name="takeSnapshot">
6341 <desc>
6342 Saves the current execution state
6343 and all settings of the machine and creates differencing images
6344 for all normal (non-independent) media.
6345 See <link to="ISnapshot" /> for an introduction to snapshots.
6346
6347 This method can be called for a PoweredOff, Saved (see
6348 <link to="#saveState"/>), Running or
6349 Paused virtual machine. When the machine is PoweredOff, an
6350 offline snapshot is created. When the machine is Running a live
6351 snapshot is created, and an online snapshot is is created when Paused.
6352
6353 The taken snapshot is always based on the
6354 <link to="IMachine::currentSnapshot">current snapshot</link>
6355 of the associated virtual machine and becomes a new current snapshot.
6356
6357 <note>
6358 This method implicitly calls <link to="IMachine::saveSettings"/> to
6359 save all current machine settings before taking an offline snapshot.
6360 </note>
6361
6362 <result name="VBOX_E_INVALID_VM_STATE">
6363 Virtual machine currently changing state.
6364 </result>
6365 </desc>
6366 <param name="name" type="wstring" dir="in">
6367 <desc>Short name for the snapshot.</desc>
6368 </param>
6369 <param name="description" type="wstring" dir="in">
6370 <desc>Optional description of the snapshot.</desc>
6371 </param>
6372 <param name="progress" type="IProgress" dir="return">
6373 <desc>Progress object to track the operation completion.</desc>
6374 </param>
6375 </method>
6376
6377 <method name="deleteSnapshot">
6378 <desc>
6379 Starts deleting the specified snapshot asynchronously.
6380 See <link to="ISnapshot" /> for an introduction to snapshots.
6381
6382 The execution state and settings of the associated machine stored in
6383 the snapshot will be deleted. The contents of all differencing media of
6384 this snapshot will be merged with the contents of their dependent child
6385 media to keep the medium chain valid (in other words, all changes
6386 represented by media being deleted will be propagated to their child
6387 medium). After that, this snapshot's differencing medium will be
6388 deleted. The parent of this snapshot will become a new parent for all
6389 its child snapshots.
6390
6391 If the deleted snapshot is the current one, its parent snapshot will
6392 become a new current snapshot. The current machine state is not directly
6393 affected in this case, except that currently attached differencing
6394 media based on media of the deleted snapshot will be also merged as
6395 described above.
6396
6397 If the deleted snapshot is the first or current snapshot, then the
6398 respective IMachine attributes will be adjusted. Deleting the current
6399 snapshot will also implicitly call <link to="IMachine::saveSettings"/>
6400 to make all current machine settings permanent.
6401
6402 Deleting a snapshot has the following preconditions:
6403
6404 <ul>
6405 <li>Child media of all normal media of the deleted snapshot
6406 must be accessible (see <link to="IMedium::state"/>) for this
6407 operation to succeed. In particular, this means that all virtual
6408 machines, whose media are directly or indirectly based on the
6409 media of deleted snapshot, must be powered off.</li>
6410
6411 <li>You cannot delete the snapshot if a medium attached to it has
6412 more than once child medium (differencing images) because otherwise
6413 merging would be impossible. This might be the case if there is
6414 more than one child snapshot or differencing images were created
6415 for other reason (e.g. implicitly because of multiple machine
6416 attachments).</li>
6417 </ul>
6418
6419
6420 The virtual machine's <link to="IMachine::state">state</link> is
6421 changed to "DeletingSnapshot", "DeletingSnapshotOnline" or
6422 "DeletingSnapshotPaused" while this operation is in progress.
6423
6424 <note>
6425 Merging medium contents can be very time and disk space
6426 consuming, if these media are big in size and have many
6427 children. However, if the snapshot being deleted is the last
6428 (head) snapshot on the branch, the operation will be rather
6429 quick.
6430 </note>
6431 <result name="VBOX_E_INVALID_VM_STATE">
6432 The running virtual machine prevents deleting this snapshot. This
6433 happens only in very specific situations, usually snapshots can be
6434 deleted without trouble while a VM is running. The error message
6435 text explains the reason for the failure.
6436 </result>
6437 </desc>
6438 <param name="id" type="uuid" mod="string" dir="in">
6439 <desc>UUID of the snapshot to delete.</desc>
6440 </param>
6441 <param name="progress" type="IProgress" dir="return">
6442 <desc>Progress object to track the operation completion.</desc>
6443 </param>
6444 </method>
6445
6446 <method name="restoreSnapshot">
6447 <desc>
6448 Starts resetting the machine's current state to the state contained
6449 in the given snapshot, asynchronously. All current settings of the
6450 machine will be reset and changes stored in differencing media
6451 will be lost.
6452 See <link to="ISnapshot" /> for an introduction to snapshots.
6453
6454 After this operation is successfully completed, new empty differencing
6455 media are created for all normal media of the machine.
6456
6457 If the given snapshot is an online snapshot, the machine will go to
6458 the <link to="MachineState_Saved"> saved state</link>, so that the
6459 next time it is powered on, the execution state will be restored
6460 from the state of the snapshot.
6461
6462 <note>
6463 The machine must not be running, otherwise the operation will fail.
6464 </note>
6465
6466 <note>
6467 If the machine state is <link to="MachineState_Saved">Saved</link>
6468 prior to this operation, the saved state file will be implicitly
6469 deleted (as if <link to="IConsole::discardSavedState"/> were
6470 called).
6471 </note>
6472
6473 <result name="VBOX_E_INVALID_VM_STATE">
6474 Virtual machine is running.
6475 </result>
6476 </desc>
6477 <param name="snapshot" type="ISnapshot" dir="in">
6478 <desc>The snapshot to restore the VM state from.</desc>
6479 </param>
6480 <param name="progress" type="IProgress" dir="return">
6481 <desc>Progress object to track the operation completion.</desc>
6482 </param>
6483 </method>
6484
6485 <method name="teleport">
6486 <desc>
6487 Teleport the VM to a different host machine or process.
6488
6489 TODO explain the details.
6490
6491 <result name="VBOX_E_INVALID_VM_STATE">
6492 Virtual machine not running or paused.
6493 </result>
6494 </desc>
6495 <param name="hostname" type="wstring" dir="in">
6496 <desc>The name or IP of the host to teleport to.</desc>
6497 </param>
6498 <param name="tcpport" type="unsigned long" dir="in">
6499 <desc>The TCP port to connect to (1..65535).</desc>
6500 </param>
6501 <param name="password" type="wstring" dir="in">
6502 <desc>The password.</desc>
6503 </param>
6504 <param name="maxDowntime" type="unsigned long" dir="in">
6505 <desc>
6506 The maximum allowed downtime given as milliseconds. 0 is not a valid
6507 value. Recommended value: 250 ms.
6508
6509 The higher the value is, the greater the chance for a successful
6510 teleportation. A small value may easily result in the teleportation
6511 process taking hours and eventually fail.
6512
6513 <note>
6514 The current implementation treats this a guideline, not as an
6515 absolute rule.
6516 </note>
6517 </desc>
6518 </param>
6519 <param name="progress" type="IProgress" dir="return">
6520 <desc>Progress object to track the operation completion.</desc>
6521 </param>
6522 </method>
6523
6524 </interface>
6525
6526 <!--
6527 // IHost
6528 /////////////////////////////////////////////////////////////////////////
6529 -->
6530
6531 <enum
6532 name="HostNetworkInterfaceMediumType"
6533 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6534 >
6535 <desc>
6536 Type of encapsulation. Ethernet encapsulation includes both wired and
6537 wireless Ethernet connections.
6538 <see>IHostNetworkInterface</see>
6539 </desc>
6540
6541 <const name="Unknown" value="0">
6542 <desc>
6543 The type of interface cannot be determined.
6544 </desc>
6545 </const>
6546 <const name="Ethernet" value="1">
6547 <desc>
6548 Ethernet frame encapsulation.
6549 </desc>
6550 </const>
6551 <const name="PPP" value="2">
6552 <desc>
6553 Point-to-point protocol encapsulation.
6554 </desc>
6555 </const>
6556 <const name="SLIP" value="3">
6557 <desc>
6558 Serial line IP encapsulation.
6559 </desc>
6560 </const>
6561 </enum>
6562
6563 <enum
6564 name="HostNetworkInterfaceStatus"
6565 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6566 >
6567 <desc>
6568 Current status of the interface.
6569 <see>IHostNetworkInterface</see>
6570 </desc>
6571
6572 <const name="Unknown" value="0">
6573 <desc>
6574 The state of interface cannot be determined.
6575 </desc>
6576 </const>
6577 <const name="Up" value="1">
6578 <desc>
6579 The interface is fully operational.
6580 </desc>
6581 </const>
6582 <const name="Down" value="2">
6583 <desc>
6584 The interface is not functioning.
6585 </desc>
6586 </const>
6587 </enum>
6588
6589 <enum
6590 name="HostNetworkInterfaceType"
6591 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6592 >
6593 <desc>
6594 Network interface type.
6595 </desc>
6596 <const name="Bridged" value="1"/>
6597 <const name="HostOnly" value="2"/>
6598 </enum>
6599
6600 <interface
6601 name="IHostNetworkInterface" extends="$unknown"
6602 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6603 wsmap="managed"
6604 >
6605 <desc>
6606 Represents one of host's network interfaces. IP V6 address and network
6607 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6608 separated by colons.
6609 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6610 </desc>
6611 <attribute name="name" type="wstring" readonly="yes">
6612 <desc>Returns the host network interface name.</desc>
6613 </attribute>
6614
6615 <attribute name="id" type="uuid" mod="string" readonly="yes">
6616 <desc>Returns the interface UUID.</desc>
6617 </attribute>
6618
6619 <attribute name="networkName" type="wstring" readonly="yes">
6620 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6621 </attribute>
6622
6623 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6624 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6625 </attribute>
6626
6627 <attribute name="IPAddress" type="wstring" readonly="yes">
6628 <desc>Returns the IP V4 address of the interface.</desc>
6629 </attribute>
6630
6631 <attribute name="networkMask" type="wstring" readonly="yes">
6632 <desc>Returns the network mask of the interface.</desc>
6633 </attribute>
6634
6635 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6636 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6637 </attribute>
6638
6639 <attribute name="IPV6Address" type="wstring" readonly="yes">
6640 <desc>Returns the IP V6 address of the interface.</desc>
6641 </attribute>
6642
6643 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6644 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6645 </attribute>
6646
6647 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6648 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6649 </attribute>
6650
6651 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6652 <desc>Type of protocol encapsulation used.</desc>
6653 </attribute>
6654
6655 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6656 <desc>Status of the interface.</desc>
6657 </attribute>
6658
6659 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6660 <desc>specifies the host interface type.</desc>
6661 </attribute>
6662
6663 <method name="enableStaticIpConfig">
6664 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6665 <param name="IPAddress" type="wstring" dir="in">
6666 <desc>
6667 IP address.
6668 </desc>
6669 </param>
6670 <param name="networkMask" type="wstring" dir="in">
6671 <desc>
6672 network mask.
6673 </desc>
6674 </param>
6675 </method>
6676
6677 <method name="enableStaticIpConfigV6">
6678 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6679 <param name="IPV6Address" type="wstring" dir="in">
6680 <desc>
6681 IP address.
6682 </desc>
6683 </param>
6684 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6685 <desc>
6686 network mask.
6687 </desc>
6688 </param>
6689 </method>
6690
6691 <method name="enableDynamicIpConfig">
6692 <desc>enables the dynamic IP configuration.</desc>
6693 </method>
6694
6695 <method name="dhcpRediscover">
6696 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6697 </method>
6698
6699 </interface>
6700
6701 <interface
6702 name="IHost" extends="$unknown"
6703 uuid="35b004f4-7806-4009-bfa8-d1308adba7e5"
6704 wsmap="managed"
6705 >
6706 <desc>
6707 The IHost interface represents the physical machine that this VirtualBox
6708 installation runs on.
6709
6710 An object implementing this interface is returned by the
6711 <link to="IVirtualBox::host" /> attribute. This interface contains
6712 read-only information about the host's physical hardware (such as what
6713 processors and disks are available, what the host operating system is,
6714 and so on) and also allows for manipulating some of the host's hardware,
6715 such as global USB device filters and host interface networking.
6716
6717 </desc>
6718 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
6719 <desc>List of DVD drives available on the host.</desc>
6720 </attribute>
6721
6722 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
6723 <desc>List of floppy drives available on the host.</desc>
6724 </attribute>
6725
6726 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6727 <desc>
6728 List of USB devices currently attached to the host.
6729 Once a new device is physically attached to the host computer,
6730 it appears in this list and remains there until detached.
6731
6732 <note>
6733 If USB functionality is not available in the given edition of
6734 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6735 </note>
6736 </desc>
6737 </attribute>
6738
6739 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
6740 <desc>
6741 List of USB device filters in action.
6742 When a new device is physically attached to the host computer,
6743 filters from this list are applied to it (in order they are stored
6744 in the list). The first matched filter will determine the
6745 <link to="IHostUSBDeviceFilter::action">action</link>
6746 performed on the device.
6747
6748 Unless the device is ignored by these filters, filters of all
6749 currently running virtual machines
6750 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6751
6752 <note>
6753 If USB functionality is not available in the given edition of
6754 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6755 </note>
6756
6757 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6758 </desc>
6759 </attribute>
6760
6761 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6762 <desc>List of host network interfaces currently defined on the host.</desc>
6763 </attribute>
6764
6765 <attribute name="processorCount" type="unsigned long" readonly="yes">
6766 <desc>Number of (logical) CPUs installed in the host system.</desc>
6767 </attribute>
6768
6769 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6770 <desc>Number of (logical) CPUs online in the host system.</desc>
6771 </attribute>
6772
6773 <attribute name="processorCoreCount" type="unsigned long" readonly="yes">
6774 <desc>Number of physical processor cores installed in the host system.</desc>
6775 </attribute>
6776
6777 <method name="getProcessorSpeed">
6778 <desc>Query the (approximate) maximum speed of a specified host CPU in
6779 Megahertz.
6780 </desc>
6781 <param name="cpuId" type="unsigned long" dir="in">
6782 <desc>
6783 Identifier of the CPU.
6784 </desc>
6785 </param>
6786 <param name="speed" type="unsigned long" dir="return">
6787 <desc>
6788 Speed value. 0 is returned if value is not known or @a cpuId is
6789 invalid.
6790 </desc>
6791 </param>
6792 </method>
6793
6794 <method name="getProcessorFeature">
6795 <desc>Query whether a CPU feature is supported or not.</desc>
6796 <param name="feature" type="ProcessorFeature" dir="in">
6797 <desc>
6798 CPU Feature identifier.
6799 </desc>
6800 </param>
6801 <param name="supported" type="boolean" dir="return">
6802 <desc>
6803 Feature is supported or not.
6804 </desc>
6805 </param>
6806 </method>
6807
6808 <method name="getProcessorDescription">
6809 <desc>Query the model string of a specified host CPU.
6810 </desc>
6811 <param name="cpuId" type="unsigned long" dir="in">
6812 <desc>
6813 Identifier of the CPU.
6814 <note>
6815 The current implementation might not necessarily return the
6816 description for this exact CPU.
6817 </note>
6818 </desc>
6819 </param>
6820 <param name="description" type="wstring" dir="return">
6821 <desc>
6822 Model string. An empty string is returned if value is not known or
6823 @a cpuId is invalid.
6824 </desc>
6825 </param>
6826 </method>
6827
6828 <method name="getProcessorCPUIDLeaf">
6829 <desc>
6830 Returns the CPU cpuid information for the specified leaf.
6831 </desc>
6832 <param name="cpuId" type="unsigned long" dir="in">
6833 <desc>
6834 Identifier of the CPU. The CPU most be online.
6835 <note>
6836 The current implementation might not necessarily return the
6837 description for this exact CPU.
6838 </note>
6839 </desc>
6840 </param>
6841 <param name="leaf" type="unsigned long" dir="in">
6842 <desc>
6843 CPUID leaf index (eax).
6844 </desc>
6845 </param>
6846 <param name="subLeaf" type="unsigned long" dir="in">
6847 <desc>
6848 CPUID leaf sub index (ecx). This currently only applies to cache
6849 information on Intel CPUs. Use 0 if retriving values for
6850 <link to="IMachine::setCPUIDLeaf"/>.
6851 </desc>
6852 </param>
6853 <param name="valEax" type="unsigned long" dir="out">
6854 <desc>
6855 CPUID leaf value for register eax.
6856 </desc>
6857 </param>
6858 <param name="valEbx" type="unsigned long" dir="out">
6859 <desc>
6860 CPUID leaf value for register ebx.
6861 </desc>
6862 </param>
6863 <param name="valEcx" type="unsigned long" dir="out">
6864 <desc>
6865 CPUID leaf value for register ecx.
6866 </desc>
6867 </param>
6868 <param name="valEdx" type="unsigned long" dir="out">
6869 <desc>
6870 CPUID leaf value for register edx.
6871 </desc>
6872 </param>
6873 </method>
6874
6875 <attribute name="memorySize" type="unsigned long" readonly="yes">
6876 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6877 </attribute>
6878
6879 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6880 <desc>Available system memory in the host system.</desc>
6881 </attribute>
6882
6883 <attribute name="operatingSystem" type="wstring" readonly="yes">
6884 <desc>Name of the host system's operating system.</desc>
6885 </attribute>
6886
6887 <attribute name="OSVersion" type="wstring" readonly="yes">
6888 <desc>Host operating system's version string.</desc>
6889 </attribute>
6890
6891 <attribute name="UTCTime" type="long long" readonly="yes">
6892 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6893 </attribute>
6894
6895 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
6896 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
6897 </attribute>
6898
6899 <method name="createHostOnlyNetworkInterface">
6900 <desc>
6901 Creates a new adapter for Host Only Networking.
6902 <result name="E_INVALIDARG">
6903 Host network interface @a name already exists.
6904 </result>
6905 </desc>
6906 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6907 <desc>
6908 Created host interface object.
6909 </desc>
6910 </param>
6911 <param name="progress" type="IProgress" dir="return">
6912 <desc>
6913 Progress object to track the operation completion.
6914 </desc>
6915 </param>
6916 </method>
6917
6918 <method name="removeHostOnlyNetworkInterface">
6919 <desc>
6920 Removes the given Host Only Networking interface.
6921 <result name="VBOX_E_OBJECT_NOT_FOUND">
6922 No host network interface matching @a id found.
6923 </result>
6924 </desc>
6925 <param name="id" type="uuid" mod="string" dir="in">
6926 <desc>
6927 Adapter GUID.
6928 </desc>
6929 </param>
6930 <param name="progress" type="IProgress" dir="return">
6931 <desc>
6932 Progress object to track the operation completion.
6933 </desc>
6934 </param>
6935 </method>
6936
6937 <method name="createUSBDeviceFilter">
6938 <desc>
6939 Creates a new USB device filter. All attributes except
6940 the filter name are set to empty (any match),
6941 <i>active</i> is @c false (the filter is not active).
6942
6943 The created filter can be added to the list of filters using
6944 <link to="#insertUSBDeviceFilter"/>.
6945
6946 <see>#USBDeviceFilters</see>
6947 </desc>
6948 <param name="name" type="wstring" dir="in">
6949 <desc>
6950 Filter name. See <link to="IUSBDeviceFilter::name"/> for more information.
6951 </desc>
6952 </param>
6953 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6954 <desc>Created filter object.</desc>
6955 </param>
6956 </method>
6957
6958 <method name="insertUSBDeviceFilter">
6959 <desc>
6960 Inserts the given USB device to the specified position
6961 in the list of filters.
6962
6963 Positions are numbered starting from @c 0. If the specified
6964 position is equal to or greater than the number of elements in
6965 the list, the filter is added at the end of the collection.
6966
6967 <note>
6968 Duplicates are not allowed, so an attempt to insert a
6969 filter already in the list is an error.
6970 </note>
6971 <note>
6972 If USB functionality is not available in the given edition of
6973 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6974 </note>
6975
6976 <see>#USBDeviceFilters</see>
6977
6978 <result name="VBOX_E_INVALID_OBJECT_STATE">
6979 USB device filter is not created within this VirtualBox instance.
6980 </result>
6981 <result name="E_INVALIDARG">
6982 USB device filter already in list.
6983 </result>
6984
6985 </desc>
6986 <param name="position" type="unsigned long" dir="in">
6987 <desc>Position to insert the filter to.</desc>
6988 </param>
6989 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
6990 <desc>USB device filter to insert.</desc>
6991 </param>
6992 </method>
6993
6994 <method name="removeUSBDeviceFilter">
6995 <desc>
6996 Removes a USB device filter from the specified position in the
6997 list of filters.
6998
6999 Positions are numbered starting from @c 0. Specifying a
7000 position equal to or greater than the number of elements in
7001 the list will produce an error.
7002
7003 <note>
7004 If USB functionality is not available in the given edition of
7005 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7006 </note>
7007
7008 <see>#USBDeviceFilters</see>
7009
7010 <result name="E_INVALIDARG">
7011 USB device filter list empty or invalid @a position.
7012 </result>
7013
7014 </desc>
7015 <param name="position" type="unsigned long" dir="in">
7016 <desc>Position to remove the filter from.</desc>
7017 </param>
7018 </method>
7019
7020 <method name="findHostDVDDrive">
7021 <desc>
7022 Searches for a host DVD drive with the given @c name.
7023
7024 <result name="VBOX_E_OBJECT_NOT_FOUND">
7025 Given @c name does not correspond to any host drive.
7026 </result>
7027
7028 </desc>
7029 <param name="name" type="wstring" dir="in">
7030 <desc>Name of the host drive to search for</desc>
7031 </param>
7032 <param name="drive" type="IMedium" dir="return">
7033 <desc>Found host drive object</desc>
7034 </param>
7035 </method>
7036
7037 <method name="findHostFloppyDrive">
7038 <desc>
7039 Searches for a host floppy drive with the given @c name.
7040
7041 <result name="VBOX_E_OBJECT_NOT_FOUND">
7042 Given @c name does not correspond to any host floppy drive.
7043 </result>
7044
7045 </desc>
7046 <param name="name" type="wstring" dir="in">
7047 <desc>Name of the host floppy drive to search for</desc>
7048 </param>
7049 <param name="drive" type="IMedium" dir="return">
7050 <desc>Found host floppy drive object</desc>
7051 </param>
7052 </method>
7053
7054 <method name="findHostNetworkInterfaceByName">
7055 <desc>
7056 Searches through all host network interfaces for an interface with
7057 the given @c name.
7058 <note>
7059 The method returns an error if the given @c name does not
7060 correspond to any host network interface.
7061 </note>
7062 </desc>
7063 <param name="name" type="wstring" dir="in">
7064 <desc>Name of the host network interface to search for.</desc>
7065 </param>
7066 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7067 <desc>Found host network interface object.</desc>
7068 </param>
7069 </method>
7070 <method name="findHostNetworkInterfaceById">
7071 <desc>
7072 Searches through all host network interfaces for an interface with
7073 the given GUID.
7074 <note>
7075 The method returns an error if the given GUID does not
7076 correspond to any host network interface.
7077 </note>
7078 </desc>
7079 <param name="id" type="uuid" mod="string" dir="in">
7080 <desc>GUID of the host network interface to search for.</desc>
7081 </param>
7082 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7083 <desc>Found host network interface object.</desc>
7084 </param>
7085 </method>
7086 <method name="findHostNetworkInterfacesOfType">
7087 <desc>
7088 Searches through all host network interfaces and returns a list of interfaces of the specified type
7089 </desc>
7090 <param name="type" type="HostNetworkInterfaceType" dir="in">
7091 <desc>type of the host network interfaces to search for.</desc>
7092 </param>
7093 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7094 <desc>Found host network interface objects.</desc>
7095 </param>
7096 </method>
7097
7098 <method name="findUSBDeviceById">
7099 <desc>
7100 Searches for a USB device with the given UUID.
7101
7102 <result name="VBOX_E_OBJECT_NOT_FOUND">
7103 Given @c id does not correspond to any USB device.
7104 </result>
7105
7106 <see>IHostUSBDevice::id</see>
7107 </desc>
7108 <param name="id" type="uuid" mod="string" dir="in">
7109 <desc>UUID of the USB device to search for.</desc>
7110 </param>
7111 <param name="device" type="IHostUSBDevice" dir="return">
7112 <desc>Found USB device object.</desc>
7113 </param>
7114 </method>
7115
7116 <method name="findUSBDeviceByAddress">
7117 <desc>
7118 Searches for a USB device with the given host address.
7119
7120 <result name="VBOX_E_OBJECT_NOT_FOUND">
7121 Given @c name does not correspond to any USB device.
7122 </result>
7123
7124 <see>IHostUSBDevice::address</see>
7125 </desc>
7126 <param name="name" type="wstring" dir="in">
7127 <desc>
7128 Address of the USB device (as assigned by the host) to
7129 search for.
7130 </desc>
7131 </param>
7132 <param name="device" type="IHostUSBDevice" dir="return">
7133 <desc>Found USB device object.</desc>
7134 </param>
7135 </method>
7136
7137 </interface>
7138
7139 <!--
7140 // ISystemProperties
7141 /////////////////////////////////////////////////////////////////////////
7142 -->
7143
7144 <interface
7145 name="ISystemProperties"
7146 extends="$unknown"
7147 uuid="2af0100b-fda2-4c6a-8e8f-31e4ba871886"
7148 wsmap="managed"
7149 >
7150 <desc>
7151 The ISystemProperties interface represents global properties of the given
7152 VirtualBox installation.
7153
7154 These properties define limits and default values for various attributes
7155 and parameters. Most of the properties are read-only, but some can be
7156 changed by a user.
7157 </desc>
7158
7159 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7160 <desc>Minimum guest system memory in Megabytes.</desc>
7161 </attribute>
7162
7163 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7164 <desc>Maximum guest system memory in Megabytes.</desc>
7165 </attribute>
7166
7167 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7168 <desc>Minimum guest video memory in Megabytes.</desc>
7169 </attribute>
7170
7171 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7172 <desc>Maximum guest video memory in Megabytes.</desc>
7173 </attribute>
7174
7175 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7176 <desc>Minimum CPU count.</desc>
7177 </attribute>
7178
7179 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7180 <desc>Maximum CPU count.</desc>
7181 </attribute>
7182
7183 <attribute name="maxGuestMonitors" type="unsigned long" readonly="yes">
7184 <desc>Maximum of monitors which could be connected.</desc>
7185 </attribute>
7186
7187 <attribute name="infoVDSize" type="long long" readonly="yes">
7188 <desc>Maximum size of a virtual disk image in bytes. Informational value,
7189 does not reflect the limits of any virtual disk image format.</desc>
7190 </attribute>
7191
7192 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7193 <desc>
7194 Number of network adapters associated with every
7195 <link to="IMachine"/> instance.
7196 </desc>
7197 </attribute>
7198
7199 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7200 <desc>
7201 Number of serial ports associated with every
7202 <link to="IMachine"/> instance.
7203 </desc>
7204 </attribute>
7205
7206 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7207 <desc>
7208 Number of parallel ports associated with every
7209 <link to="IMachine"/> instance.
7210 </desc>
7211 </attribute>
7212
7213 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7214 <desc>
7215 Maximum device position in the boot order. This value corresponds
7216 to the total number of devices a machine can boot from, to make it
7217 possible to include all possible devices to the boot list.
7218 <see><link to="IMachine::setBootOrder"/></see>
7219 </desc>
7220 </attribute>
7221
7222 <attribute name="defaultMachineFolder" type="wstring">
7223 <desc>
7224 Full path to the default directory used to create new or open
7225 existing machines when a settings file name contains no
7226 path.
7227
7228 The initial value of this property is
7229 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7230 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7231
7232 <note>
7233 Setting this property to @c null or an empty string will restore the
7234 initial value.
7235 </note>
7236 <note>
7237 When settings this property, the specified path can be
7238 absolute (full path) or relative
7239 to the <link to="IVirtualBox::homeFolder">
7240 VirtualBox home directory</link>.
7241 When reading this property, a full path is
7242 always returned.
7243 </note>
7244 <note>
7245 The specified path may not exist, it will be created
7246 when necessary.
7247 </note>
7248
7249 <see>
7250 <link to="IVirtualBox::createMachine"/>,
7251 <link to="IVirtualBox::openMachine"/>
7252 </see>
7253 </desc>
7254 </attribute>
7255
7256 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7257 <desc>
7258 List of all medium storage formats supported by this VirtualBox
7259 installation.
7260
7261 Keep in mind that the medium format identifier
7262 (<link to="IMediumFormat::id"/>) used in other API calls like
7263 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7264 medium format is a case-insensitive string. This means that, for
7265 example, all of the following strings:
7266 <pre>
7267 "VDI"
7268 "vdi"
7269 "VdI"</pre>
7270 refer to the same medium format.
7271
7272 Note that the virtual medium framework is backend-based, therefore
7273 the list of supported formats depends on what backends are currently
7274 installed.
7275
7276 <see>
7277 <link to="IMediumFormat"/>,
7278 </see>
7279 </desc>
7280 </attribute>
7281
7282 <attribute name="defaultHardDiskFormat" type="wstring">
7283 <desc>
7284 Identifier of the default medium format used by VirtualBox.
7285
7286 The medium format set by this attribute is used by VirtualBox
7287 when the medium format was not specified explicitly. One example is
7288 <link to="IVirtualBox::createHardDisk"/> with the empty
7289 format argument. A more complex example is implicit creation of
7290 differencing media when taking a snapshot of a virtual machine:
7291 this operation will try to use a format of the parent medium first
7292 and if this format does not support differencing media the default
7293 format specified by this argument will be used.
7294
7295 The list of supported medium formats may be obtained by the
7296 <link to="#mediumFormats"/> call. Note that the default medium
7297 format must have a capability to create differencing media;
7298 otherwise operations that create media implicitly may fail
7299 unexpectedly.
7300
7301 The initial value of this property is <tt>"VDI"</tt> in the current
7302 version of the VirtualBox product, but may change in the future.
7303
7304 <note>
7305 Setting this property to @c null or empty string will restore the
7306 initial value.
7307 </note>
7308
7309 <see>
7310 <link to="#mediumFormats"/>,
7311 <link to="IMediumFormat::id"/>,
7312 <link to="IVirtualBox::createHardDisk"/>
7313 </see>
7314 </desc>
7315 </attribute>
7316
7317 <attribute name="freeDiskSpaceWarning" type="long long">
7318 <desc>Issue a warning if the free disk space is below (or in some disk
7319 intensive operation is expected to go below) the given size in
7320 bytes.</desc>
7321 </attribute>
7322
7323 <attribute name="freeDiskSpacePercentWarning" type="unsigned long">
7324 <desc>Issue a warning if the free disk space is below (or in some disk
7325 intensive operation is expected to go below) the given percentage.</desc>
7326 </attribute>
7327
7328 <attribute name="freeDiskSpaceError" type="long long">
7329 <desc>Issue an error if the free disk space is below (or in some disk
7330 intensive operation is expected to go below) the given size in
7331 bytes.</desc>
7332 </attribute>
7333
7334 <attribute name="freeDiskSpacePercentError" type="unsigned long">
7335 <desc>Issue an error if the free disk space is below (or in some disk
7336 intensive operation is expected to go below) the given percentage.</desc>
7337 </attribute>
7338
7339 <attribute name="VRDEAuthLibrary" type="wstring">
7340 <desc>
7341 Library that provides authentication for Remote Desktop clients. The library
7342 is used if a virtual machine's authentication type is set to "external"
7343 in the VM RemoteDisplay configuration.
7344
7345 The system library extension (".DLL" or ".so") must be omitted.
7346 A full path can be specified; if not, then the library must reside on the
7347 system's default library path.
7348
7349 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7350 of that name in one of the default VirtualBox library directories.
7351
7352 For details about VirtualBox authentication libraries and how to implement
7353 them, please refer to the VirtualBox manual.
7354
7355 <note>
7356 Setting this property to @c null or empty string will restore the
7357 initial value.
7358 </note>
7359 </desc>
7360 </attribute>
7361
7362 <attribute name="webServiceAuthLibrary" type="wstring">
7363 <desc>
7364 Library that provides authentication for webservice clients. The library
7365 is used if a virtual machine's authentication type is set to "external"
7366 in the VM RemoteDisplay configuration and will be called from
7367 within the <link to="IWebsessionManager::logon" /> implementation.
7368
7369 As opposed to <link to="ISystemProperties::VRDEAuthLibrary" />,
7370 there is no per-VM setting for this, as the webservice is a global
7371 resource (if it is running). Only for this setting (for the webservice),
7372 setting this value to a literal <tt>"null"</tt> string disables authentication,
7373 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7374 no matter what user name and password are supplied.
7375
7376 The initial value of this property is <tt>"VRDPAuth"</tt>,
7377 meaning that the webservice will use the same authentication
7378 library that is used by default for VRDE (again, see
7379 <link to="ISystemProperties::VRDEAuthLibrary" />).
7380 The format and calling convention of authentication libraries
7381 is the same for the webservice as it is for VRDE.
7382
7383 <note>
7384 Setting this property to @c null or empty string will restore the
7385 initial value.
7386 </note>
7387 </desc>
7388 </attribute>
7389
7390 <attribute name="defaultVRDELibrary" type="wstring">
7391 <desc>
7392 Default VRDE library.
7393
7394 The default value of this property is an empty string, which means that the
7395 VRDE is not available.
7396
7397 For details about VirtualBox Remote Desktop Extension and how to implement
7398 it, please refer to the VirtualBox SDK.
7399 </desc>
7400 </attribute>
7401
7402 <attribute name="LogHistoryCount" type="unsigned long">
7403 <desc>
7404 This value specifies how many old release log files are kept.
7405 </desc>
7406 </attribute>
7407
7408 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7409 <desc>This value hold the default audio driver for the current
7410 system.</desc>
7411 </attribute>
7412
7413 <method name="getMaxDevicesPerPortForStorageBus">
7414 <desc>Returns the maximum number of devices which can be attached to a port
7415 for the given storage bus.</desc>
7416
7417 <param name="bus" type="StorageBus" dir="in">
7418 <desc>The storage bus type to get the value for.</desc>
7419 </param>
7420
7421 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
7422 <desc>The maximum number of devices which can eb attached to the port for the given
7423 storage bus.</desc>
7424 </param>
7425 </method>
7426
7427 <method name="getMinPortCountForStorageBus">
7428 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
7429
7430 <param name="bus" type="StorageBus" dir="in">
7431 <desc>The storage bus type to get the value for.</desc>
7432 </param>
7433
7434 <param name="minPortCount" type="unsigned long" dir="return">
7435 <desc>The minimum number of ports for the given storage bus.</desc>
7436 </param>
7437 </method>
7438
7439 <method name="getMaxPortCountForStorageBus">
7440 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
7441
7442 <param name="bus" type="StorageBus" dir="in">
7443 <desc>The storage bus type to get the value for.</desc>
7444 </param>
7445
7446 <param name="maxPortCount" type="unsigned long" dir="return">
7447 <desc>The maximum number of ports for the given storage bus.</desc>
7448 </param>
7449 </method>
7450
7451 <method name="getMaxInstancesOfStorageBus">
7452 <desc>Returns the maximum number of storage bus instances which
7453 can be configured for each VM. This corresponds to the number of
7454 storage controllers one can have.</desc>
7455
7456 <param name="bus" type="StorageBus" dir="in">
7457 <desc>The storage bus type to get the value for.</desc>
7458 </param>
7459
7460 <param name="maxInstances" type="unsigned long" dir="return">
7461 <desc>The maximum number of instances for the given storage bus.</desc>
7462 </param>
7463 </method>
7464
7465 <method name="getDeviceTypesForStorageBus">
7466 <desc>Returns list of all the supported device types
7467 (<link to="DeviceType"/>) for the given type of storage
7468 bus.</desc>
7469
7470 <param name="bus" type="StorageBus" dir="in">
7471 <desc>The storage bus type to get the value for.</desc>
7472 </param>
7473
7474 <param name="deviceTypes" type="DeviceType" safearray="yes" dir="return">
7475 <desc>The list of all supported device types for the given storage bus.</desc>
7476 </param>
7477 </method>
7478
7479 <method name="getDefaultIoCacheSettingForStorageController">
7480 <desc>Returns the default I/O cache setting for the
7481 given storage controller</desc>
7482
7483 <param name="controllerType" type="StorageControllerType" dir="in">
7484 <desc>The storage controller to the setting for.</desc>
7485 </param>
7486
7487 <param name="enabled" type="boolean" dir="return">
7488 <desc>Returned flag indicating the default value</desc>
7489 </param>
7490 </method>
7491 </interface>
7492
7493 <!--
7494 // IGuest
7495 /////////////////////////////////////////////////////////////////////////
7496 -->
7497
7498 <interface
7499 name="IGuestOSType" extends="$unknown"
7500 uuid="432c1546-1354-4abf-bf08-878a32a373f5"
7501 wsmap="struct"
7502 >
7503 <desc>
7504 </desc>
7505
7506 <attribute name="familyId" type="wstring" readonly="yes">
7507 <desc>Guest OS family identifier string.</desc>
7508 </attribute>
7509
7510 <attribute name="familyDescription" type="wstring" readonly="yes">
7511 <desc>Human readable description of the guest OS family.</desc>
7512 </attribute>
7513
7514 <attribute name="id" type="wstring" readonly="yes">
7515 <desc>Guest OS identifier string.</desc>
7516 </attribute>
7517
7518 <attribute name="description" type="wstring" readonly="yes">
7519 <desc>Human readable description of the guest OS.</desc>
7520 </attribute>
7521
7522 <attribute name="is64Bit" type="boolean" readonly="yes">
7523 <desc>Returns @c true if the given OS is 64-bit</desc>
7524 </attribute>
7525
7526 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7527 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7528 </attribute>
7529
7530 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7531 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7532 </attribute>
7533
7534 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7535 <desc>Recommended RAM size in Megabytes.</desc>
7536 </attribute>
7537
7538 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7539 <desc>Recommended video RAM size in Megabytes.</desc>
7540 </attribute>
7541
7542 <attribute name="recommendedHDD" type="long long" readonly="yes">
7543 <desc>Recommended hard disk size in bytes.</desc>
7544 </attribute>
7545
7546 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7547 <desc>Returns recommended network adapter for this OS type.</desc>
7548 </attribute>
7549
7550 <attribute name="recommendedPae" type="boolean" readonly="yes">
7551 <desc>Returns @c true if using PAE is recommended for this OS type.</desc>
7552 </attribute>
7553
7554 <attribute name="recommendedDvdStorageController" type="StorageControllerType" readonly="yes">
7555 <desc>Recommended storage controller type for DVD/CD drives.</desc>
7556 </attribute>
7557
7558 <attribute name="recommendedDvdStorageBus" type="StorageBus" readonly="yes">
7559 <desc>Recommended storage bus type for DVD/CD drives.</desc>
7560 </attribute>
7561
7562 <attribute name="recommendedHdStorageController" type="StorageControllerType" readonly="yes">
7563 <desc>Recommended storage controller type for HD drives.</desc>
7564 </attribute>
7565
7566 <attribute name="recommendedHdStorageBus" type="StorageBus" readonly="yes">
7567 <desc>Recommended storage bus type for HD drives.</desc>
7568 </attribute>
7569
7570 <attribute name="recommendedFirmware" type="FirmwareType" readonly="yes">
7571 <desc>Recommended firmware type.</desc>
7572 </attribute>
7573
7574 <attribute name="recommendedUsbHid" type="boolean" readonly="yes">
7575 <desc>Returns @c true if using USB Human Interface Devices, such as keyboard and mouse recommended.</desc>
7576 </attribute>
7577
7578 <attribute name="recommendedHpet" type="boolean" readonly="yes">
7579 <desc>Returns @c true if using HPET is recommended for this OS type.</desc>
7580 </attribute>
7581
7582 <attribute name="recommendedUsbTablet" type="boolean" readonly="yes">
7583 <desc>Returns @c true if using a USB Tablet is recommended.</desc>
7584 </attribute>
7585
7586 <attribute name="recommendedRtcUseUtc" type="boolean" readonly="yes">
7587 <desc>Returns @c true if the RTC of this VM should be set to UTC</desc>
7588 </attribute>
7589
7590 <attribute name="recommendedChipset" type="ChipsetType" readonly="yes">
7591 <desc>Recommended chipset type.</desc>
7592 </attribute>
7593
7594 <attribute name="recommendedAudioController" type="AudioControllerType" readonly="yes">
7595 <desc>Recommended audio type.</desc>
7596 </attribute>
7597
7598 </interface>
7599
7600 <enum
7601 name="AdditionsRunLevelType"
7602 uuid="a25417ee-a9dd-4f5b-b0dc-377860087754"
7603 >
7604 <desc>
7605 Guest Additions run level type.
7606 </desc>
7607
7608 <const name="None" value="0">
7609 <desc>Guest Additions are not loaded.</desc>
7610 </const>
7611 <const name="System" value="1">
7612 <desc>Guest drivers are loaded.</desc>
7613 </const>
7614 <const name="Userland" value="2">
7615 <desc>Common components (such as application services) are loaded.</desc>
7616 </const>
7617 <const name="Desktop" value="3">
7618 <desc>Per-user desktop components are loaded.</desc>
7619 </const>
7620 </enum>
7621
7622 <enum
7623 name="ExecuteProcessFlag"
7624 uuid="9a24c17d-bd46-4207-b247-517fdd6d6b8f"
7625 >
7626 <desc>
7627 Guest process execution flags.
7628 </desc>
7629
7630 <const name="None" value="0">
7631 <desc>No flag set.</desc>
7632 </const>
7633
7634 <const name="IgnoreOrphanedProcesses" value="2">
7635 <desc>Do not report an error when executed processes are still alive when VBoxService or the guest OS is shutting down.</desc>
7636 </const>
7637 </enum>
7638
7639 <enum
7640 name="ProcessInputFlag"
7641 uuid="5d38c1dd-2604-4ddf-92e5-0c0cdd3bdbd5"
7642 >
7643 <desc>
7644 Guest process input flags.
7645 </desc>
7646
7647 <const name="None" value="0">
7648 <desc>No flag set.</desc>
7649 </const>
7650 <const name="EndOfFile" value="1">
7651 <desc>End of file (input) reached.</desc>
7652 </const>
7653 </enum>
7654
7655 <enum
7656 name="CopyFileFlag"
7657 uuid="23f79fdf-738a-493d-b80b-42d607c9b916"
7658 >
7659 <desc>
7660 Host/Guest copy flags.
7661 </desc>
7662
7663 <const name="None" value="0">
7664 <desc>No flag set.</desc>
7665 </const>
7666
7667 <const name="Recursive" value="1">
7668 <desc>Copy directories recursively.</desc>
7669 </const>
7670
7671 <const name="Update" value="2">
7672 <desc>Copy only when the source file is newer than the destination file or when the destination file is missing.</desc>
7673 </const>
7674
7675 <const name="FollowLinks" value="4">
7676 <desc>Follow symbolic links.</desc>
7677 </const>
7678 </enum>
7679
7680 <interface
7681 name="IGuest" extends="$unknown"
7682 uuid="ed69cdce-2905-4275-872b-3c743a85c584"
7683 wsmap="managed"
7684 >
7685 <desc>
7686 The IGuest interface represents information about the operating system
7687 running inside the virtual machine. Used in
7688 <link to="IConsole::guest"/>.
7689
7690 IGuest provides information about the guest operating system, whether
7691 Guest Additions are installed and other OS-specific virtual machine
7692 properties.
7693 </desc>
7694
7695 <attribute name="OSTypeId" type="wstring" readonly="yes">
7696 <desc>
7697 Identifier of the Guest OS type as reported by the Guest
7698 Additions.
7699 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7700 an IGuestOSType object representing details about the given
7701 Guest OS type.
7702 <note>
7703 If Guest Additions are not installed, this value will be
7704 the same as <link to="IMachine::OSTypeId"/>.
7705 </note>
7706 </desc>
7707 </attribute>
7708
7709 <attribute name="additionsRunLevel" type="AdditionsRunLevelType" readonly="yes">
7710 <desc>
7711 Current run level of the Guest Additions.
7712 </desc>
7713 </attribute>
7714
7715 <attribute name="additionsVersion" type="wstring" readonly="yes">
7716 <desc>
7717 Version of the Guest Additions including the revision (3 decimal numbers
7718 separated by dots + revision number) installed on the guest or empty
7719 when the Additions are not installed.
7720 </desc>
7721 </attribute>
7722
7723 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7724 <desc>
7725 Flag whether seamless guest display rendering (seamless desktop
7726 integration) is supported.
7727 </desc>
7728 </attribute>
7729
7730 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7731 <desc>
7732 Flag whether the guest is in graphics mode. If it is not, then
7733 seamless rendering will not work, resize hints are not immediately
7734 acted on and guest display resizes are probably not initiated by
7735 the guest additions.
7736 </desc>
7737 </attribute>
7738
7739 <attribute name="memoryBalloonSize" type="unsigned long">
7740 <desc>Guest system memory balloon size in megabytes (transient property).</desc>
7741 </attribute>
7742
7743 <attribute name="statisticsUpdateInterval" type="unsigned long">
7744 <desc>Interval to update guest statistics in seconds.</desc>
7745 </attribute>
7746
7747 <method name="internalGetStatistics">
7748 <desc>
7749 Internal method; do not use as it might change at any time
7750 </desc>
7751 <param name="cpuUser" type="unsigned long" dir="out">
7752 <desc>Percentage of processor time spent in user mode as seen by the guest</desc>
7753 </param>
7754 <param name="cpuKernel" type="unsigned long" dir="out">
7755 <desc>Percentage of processor time spent in kernel mode as seen by the guest</desc>
7756 </param>
7757 <param name="cpuIdle" type="unsigned long" dir="out">
7758 <desc>Percentage of processor time spent idling as seen by the guest</desc>
7759 </param>
7760 <param name="memTotal" type="unsigned long" dir="out">
7761 <desc>Total amount of physical guest RAM</desc>
7762 </param>
7763 <param name="memFree" type="unsigned long" dir="out">
7764 <desc>Free amount of physical guest RAM</desc>
7765 </param>
7766 <param name="memBalloon" type="unsigned long" dir="out">
7767 <desc>Amount of ballooned physical guest RAM</desc>
7768 </param>
7769 <param name="memShared" type="unsigned long" dir="out">
7770 <desc>Amount of shared physical guest RAM</desc>
7771 </param>
7772 <param name="memCache" type="unsigned long" dir="out">
7773 <desc>Total amount of guest (disk) cache memory</desc>
7774 </param>
7775 <param name="pagedTotal" type="unsigned long" dir="out">
7776 <desc>Total amount of space in the page file</desc>
7777 </param>
7778 <param name="memAllocTotal" type="unsigned long" dir="out">
7779 <desc>Total amount of memory allocated by the hypervisor</desc>
7780 </param>
7781 <param name="memFreeTotal" type="unsigned long" dir="out">
7782 <desc>Total amount of free memory available in the hypervisor</desc>
7783 </param>
7784 <param name="memBalloonTotal" type="unsigned long" dir="out">
7785 <desc>Total amount of memory ballooned by the hypervisor</desc>
7786 </param>
7787 <param name="memSharedTotal" type="unsigned long" dir="out">
7788 <desc>Total amount of shared memory in the hypervisor</desc>
7789 </param>
7790 </method>
7791
7792 <method name="getAdditionsStatus">
7793 <desc>
7794 Retrieve the current status of a certain Guest Additions run level.
7795
7796 <result name="VBOX_E_NOT_SUPPORTED">
7797 Wrong status level specified.
7798 </result>
7799
7800 </desc>
7801 <param name="level" type="AdditionsRunLevelType" dir="in">
7802 <desc>Status level to check</desc>
7803 </param>
7804 <param name="active" type="boolean" dir="return">
7805 <desc>Flag whether the status level has been reached or not</desc>
7806 </param>
7807 </method>
7808
7809 <method name="setCredentials">
7810 <desc>
7811 Store login credentials that can be queried by guest operating
7812 systems with Additions installed. The credentials are transient
7813 to the session and the guest may also choose to erase them. Note
7814 that the caller cannot determine whether the guest operating system
7815 has queried or made use of the credentials.
7816
7817 <result name="VBOX_E_VM_ERROR">
7818 VMM device is not available.
7819 </result>
7820
7821 </desc>
7822 <param name="userName" type="wstring" dir="in">
7823 <desc>User name string, can be empty</desc>
7824 </param>
7825 <param name="password" type="wstring" dir="in">
7826 <desc>Password string, can be empty</desc>
7827 </param>
7828 <param name="domain" type="wstring" dir="in">
7829 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7830 </param>
7831 <param name="allowInteractiveLogon" type="boolean" dir="in">
7832 <desc>
7833 Flag whether the guest should alternatively allow the user to
7834 interactively specify different credentials. This flag might
7835 not be supported by all versions of the Additions.
7836 </desc>
7837 </param>
7838 </method>
7839
7840 <method name="executeProcess">
7841 <desc>
7842 Executes an existing program inside the guest VM.
7843
7844 <result name="VBOX_E_IPRT_ERROR">
7845 Could not execute process.
7846 </result>
7847
7848 </desc>
7849 <param name="execName" type="wstring" dir="in">
7850 <desc>
7851 Full path name of the command to execute on the guest; the
7852 commands has to exists in the guest VM in order to be executed.
7853 </desc>
7854 </param>
7855 <param name="flags" type="unsigned long" dir="in">
7856 <desc>
7857 Execution flags - currently not supported and therefore
7858 has to be set to 0.
7859 </desc>
7860 </param>
7861 <param name="arguments" type="wstring" safearray="yes" dir="in">
7862 <desc>
7863 Array of arguments passed to the execution command.
7864 </desc>
7865 </param>
7866 <param name="environment" type="wstring" safearray="yes" dir="in">
7867 <desc>
7868 Environment variables that can be set while the command is being
7869 executed, in form of "NAME=VALUE"; one pair per entry. To unset a
7870 variable just set its name ("NAME") without a value.
7871 </desc>
7872 </param>
7873 <param name="userName" type="wstring" dir="in">
7874 <desc>
7875 User name under which the command will be executed; has to exist
7876 and have the appropriate rights to execute programs in the VM.
7877 </desc>
7878 </param>
7879 <param name="password" type="wstring" dir="in">
7880 <desc>
7881 Password of the user account specified.
7882 </desc>
7883 </param>
7884 <param name="timeoutMS" type="unsigned long" dir="in">
7885 <desc>
7886 The maximum timeout value (in msec) to wait for finished program
7887 execution. Pass 0 for an infinite timeout.
7888 </desc>
7889 </param>
7890 <param name="pid" type="unsigned long" dir="out">
7891 <desc>
7892 The PID (process ID) of the started command for later reference.
7893 </desc>
7894 </param>
7895 <param name="progress" type="IProgress" dir="return">
7896 <desc>Progress object to track the operation completion.</desc>
7897 </param>
7898 </method>
7899
7900 <method name="getProcessOutput">
7901 <desc>
7902 Retrieves output of a formerly started process.
7903
7904 <result name="VBOX_E_IPRT_ERROR">
7905 Could not retrieve output.
7906 </result>
7907
7908 </desc>
7909 <param name="pid" type="unsigned long" dir="in">
7910 <desc>
7911 Process id returned by earlier executeProcess() call.
7912 </desc>
7913 </param>
7914 <param name="flags" type="unsigned long" dir="in">
7915 <desc>
7916 Flags describing which output to retrieve.
7917 </desc>
7918 </param>
7919 <param name="timeoutMS" type="unsigned long" dir="in">
7920 <desc>
7921 The maximum timeout value (in msec) to wait for output
7922 data. Pass 0 for an infinite timeout.
7923 </desc>
7924 </param>
7925 <param name="size" type="long long" dir="in">
7926 <desc>
7927 Size in bytes to read in the buffer.
7928 </desc>
7929 </param>
7930 <param name="data" type="octet" dir="return" safearray="yes">
7931 <desc>
7932 Buffer for retrieving the actual output. A data size of 0 means end of file
7933 if the requested size was not 0. This is the unprocessed
7934 output data, i.e. the line ending style depends on the platform of
7935 the system the server is running on.
7936 </desc>
7937 </param>
7938 </method>
7939
7940 <method name="getProcessStatus">
7941 <desc>
7942 Retrieves status, exit code and the exit reason of a formerly started process.
7943
7944 <result name="VBOX_E_IPRT_ERROR">
7945 Process with specified PID was not found.
7946 </result>
7947
7948 </desc>
7949 <param name="pid" type="unsigned long" dir="in">
7950 <desc>
7951 Process id returned by earlier executeProcess() call.
7952 </desc>
7953 </param>
7954 <param name="exitcode" type="unsigned long" dir="out">
7955 <desc>
7956 The exit code (if available).
7957 </desc>
7958 </param>
7959 <param name="flags" type="unsigned long" dir="out">
7960 <desc>
7961 Additional flags of process status (not used at the moment).
7962 </desc>
7963 </param>
7964 <param name="reason" type="unsigned long" dir="return">
7965 <desc>
7966 The current process status.
7967 </desc>
7968 </param>
7969 </method>
7970
7971 <method name="copyToGuest">
7972 <desc>
7973 Copies files/directories from host to the guest.
7974
7975 <result name="VBOX_E_IPRT_ERROR">
7976 Error while copying.
7977 </result>
7978
7979 </desc>
7980 <param name="source" type="wstring" dir="in">
7981 <desc>
7982 Foo.
7983 </desc>
7984 </param>
7985 <param name="dest" type="wstring" dir="in">
7986 <desc>
7987 Bar.
7988 </desc>
7989 </param>
7990 <param name="userName" type="wstring" dir="in">
7991 <desc>
7992 User name under which the copy command will be executed; the
7993 user has to exist and have the appropriate rights to write to
7994 the destination path.
7995 </desc>
7996 </param>
7997 <param name="password" type="wstring" dir="in">
7998 <desc>
7999 Password of the user account specified.
8000 </desc>
8001 </param>
8002 <param name="flags" type="unsigned long" dir="in">
8003 <desc>
8004 Copy flags.
8005 </desc>
8006 </param>
8007 <param name="progress" type="IProgress" dir="return">
8008 <desc>Progress object to track the operation completion.</desc>
8009 </param>
8010 </method>
8011
8012 <method name="setProcessInput">
8013 <desc>
8014 Sends input into a formerly started process.
8015
8016 <result name="VBOX_E_IPRT_ERROR">
8017 Could not send input.
8018 </result>
8019
8020 </desc>
8021 <param name="pid" type="unsigned long" dir="in">
8022 <desc>
8023 Process id returned by earlier executeProcess() call.
8024 </desc>
8025 </param>
8026 <param name="flags" type="unsigned long" dir="in">
8027 <desc>
8028 Not used, must be set to zero.
8029 </desc>
8030 </param>
8031 <param name="data" type="octet" dir="in" safearray="yes">
8032 <desc>
8033 Buffer of input data to send to the started process to.
8034 </desc>
8035 </param>
8036 <param name="written" type="unsigned long" dir="return">
8037 <desc>
8038 Number of bytes written.
8039 </desc>
8040 </param>
8041 </method>
8042
8043 </interface>
8044
8045
8046 <!--
8047 // IProgress
8048 /////////////////////////////////////////////////////////////////////////
8049 -->
8050
8051 <interface
8052 name="IProgress" extends="$unknown"
8053 uuid="A163C98F-8635-4AA8-B770-A9941737F3EF"
8054 wsmap="managed"
8055 >
8056 <desc>
8057 The IProgress interface is used to track and control
8058 asynchronous tasks within VirtualBox.
8059
8060 An instance of this is returned every time VirtualBox starts
8061 an asynchronous task (in other words, a separate thread) which
8062 continues to run after a method call returns. For example,
8063 <link to="IConsole::saveState" />, which saves the state of
8064 a running virtual machine, can take a long time to complete.
8065 To be able to display a progress bar, a user interface such as
8066 the VirtualBox graphical user interface can use the IProgress
8067 object returned by that method.
8068
8069 Note that IProgress is a "read-only" interface in the sense
8070 that only the VirtualBox internals behind the Main API can
8071 create and manipulate progress objects, whereas client code
8072 can only use the IProgress object to monitor a task's
8073 progress and, if <link to="#cancelable" /> is @c true,
8074 cancel the task by calling <link to="#cancel" />.
8075
8076 A task represented by IProgress consists of either one or
8077 several sub-operations that run sequentially, one by one (see
8078 <link to="#operation" /> and <link to="#operationCount" />).
8079 Every operation is identified by a number (starting from 0)
8080 and has a separate description.
8081
8082 You can find the individual percentage of completion of the current
8083 operation in <link to="#operationPercent" /> and the
8084 percentage of completion of the task as a whole
8085 in <link to="#percent" />.
8086
8087 Similarly, you can wait for the completion of a particular
8088 operation via <link to="#waitForOperationCompletion" /> or
8089 for the completion of the whole task via
8090 <link to="#waitForCompletion" />.
8091 </desc>
8092
8093 <attribute name="id" type="uuid" mod="string" readonly="yes">
8094 <desc>ID of the task.</desc>
8095 </attribute>
8096
8097 <attribute name="description" type="wstring" readonly="yes">
8098 <desc>Description of the task.</desc>
8099 </attribute>
8100
8101 <attribute name="initiator" type="$unknown" readonly="yes">
8102 <desc>Initiator of the task.</desc>
8103 </attribute>
8104
8105 <attribute name="cancelable" type="boolean" readonly="yes">
8106 <desc>Whether the task can be interrupted.</desc>
8107 </attribute>
8108
8109 <attribute name="percent" type="unsigned long" readonly="yes">
8110 <desc>
8111 Current progress value of the task as a whole, in percent.
8112 This value depends on how many operations are already complete.
8113 Returns 100 if <link to="#completed" /> is @c true.
8114 </desc>
8115 </attribute>
8116
8117 <attribute name="timeRemaining" type="long" readonly="yes">
8118 <desc>
8119 Estimated remaining time until the task completes, in
8120 seconds. Returns 0 once the task has completed; returns -1
8121 if the remaining time cannot be computed, in particular if
8122 the current progress is 0.
8123
8124 Even if a value is returned, the estimate will be unreliable
8125 for low progress values. It will become more reliable as the
8126 task progresses; it is not recommended to display an ETA
8127 before at least 20% of a task have completed.
8128 </desc>
8129 </attribute>
8130
8131 <attribute name="completed" type="boolean" readonly="yes">
8132 <desc>Whether the task has been completed.</desc>
8133 </attribute>
8134
8135 <attribute name="canceled" type="boolean" readonly="yes">
8136 <desc>Whether the task has been canceled.</desc>
8137 </attribute>
8138
8139 <attribute name="resultCode" type="long" readonly="yes">
8140 <desc>
8141 Result code of the progress task.
8142 Valid only if <link to="#completed"/> is @c true.
8143 </desc>
8144 </attribute>
8145
8146 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
8147 <desc>
8148 Extended information about the unsuccessful result of the
8149 progress operation. May be @c null if no extended information
8150 is available.
8151 Valid only if <link to="#completed"/> is @c true and
8152 <link to="#resultCode"/> indicates a failure.
8153 </desc>
8154 </attribute>
8155
8156 <attribute name="operationCount" type="unsigned long" readonly="yes">
8157 <desc>
8158 Number of sub-operations this task is divided into.
8159 Every task consists of at least one suboperation.
8160 </desc>
8161 </attribute>
8162
8163 <attribute name="operation" type="unsigned long" readonly="yes">
8164 <desc>Number of the sub-operation being currently executed.</desc>
8165 </attribute>
8166
8167 <attribute name="operationDescription" type="wstring" readonly="yes">
8168 <desc>
8169 Description of the sub-operation being currently executed.
8170 </desc>
8171 </attribute>
8172
8173 <attribute name="operationPercent" type="unsigned long" readonly="yes">
8174 <desc>Progress value of the current sub-operation only, in percent.</desc>
8175 </attribute>
8176
8177 <attribute name="operationWeight" type="unsigned long" readonly="yes">
8178 <desc>Weight value of the current sub-operation only.</desc>
8179 </attribute>
8180
8181 <attribute name="timeout" type="unsigned long">
8182 <desc>
8183 When non-zero, this specifies the number of milliseconds after which
8184 the operation will automatically be canceled. This can only be set on
8185 cancelable objects.
8186 </desc>
8187 </attribute>
8188
8189 <method name="setCurrentOperationProgress">
8190 <desc>Internal method, not to be called externally.</desc>
8191 <param name="percent" type="unsigned long" dir="in" />
8192 </method>
8193 <method name="setNextOperation">
8194 <desc>Internal method, not to be called externally.</desc>
8195 <param name="nextOperationDescription" type="wstring" dir="in" />
8196 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8197 </method>
8198
8199 <method name="waitForCompletion">
8200 <desc>
8201 Waits until the task is done (including all sub-operations)
8202 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8203
8204 Note that the VirtualBox/XPCOM/COM/native event queues of the calling
8205 thread are not processed while waiting. Neglecting event queues may
8206 have dire consequences (degrade performance, resource hogs,
8207 deadlocks, etc.), this is specially so for the main thread on
8208 platforms using XPCOM. Callers are adviced wait for short periods
8209 and service their event queues between calls, or to create a worker
8210 thread to do the waiting.
8211
8212 <result name="VBOX_E_IPRT_ERROR">
8213 Failed to wait for task completion.
8214 </result>
8215 </desc>
8216
8217 <param name="timeout" type="long" dir="in">
8218 <desc>
8219 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8220 </desc>
8221 </param>
8222 </method>
8223
8224 <method name="waitForOperationCompletion">
8225 <desc>
8226 Waits until the given operation is done with a given timeout in
8227 milliseconds; specify -1 for an indefinite wait.
8228
8229 See <link to="#waitForCompletion"> for event queue considerations.</link>
8230
8231 <result name="VBOX_E_IPRT_ERROR">
8232 Failed to wait for operation completion.
8233 </result>
8234
8235 </desc>
8236 <param name="operation" type="unsigned long" dir="in">
8237 <desc>
8238 Number of the operation to wait for.
8239 Must be less than <link to="#operationCount"/>.
8240 </desc>
8241 </param>
8242 <param name="timeout" type="long" dir="in">
8243 <desc>
8244 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8245 </desc>
8246 </param>
8247 </method>
8248
8249 <method name="cancel">
8250 <desc>
8251 Cancels the task.
8252 <note>
8253 If <link to="#cancelable"/> is @c false, then this method will fail.
8254 </note>
8255
8256 <result name="VBOX_E_INVALID_OBJECT_STATE">
8257 Operation cannot be canceled.
8258 </result>
8259
8260 </desc>
8261 </method>
8262
8263 </interface>
8264
8265 <!--
8266 // ISnapshot
8267 /////////////////////////////////////////////////////////////////////////
8268 -->
8269
8270 <interface
8271 name="ISnapshot" extends="$unknown"
8272 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8273 wsmap="managed"
8274 >
8275 <desc>
8276 The ISnapshot interface represents a snapshot of the virtual
8277 machine.
8278
8279 Together with the differencing media that are created
8280 when a snapshot is taken, a machine can be brought back to
8281 the exact state it was in when the snapshot was taken.
8282
8283 The ISnapshot interface has no methods, only attributes; snapshots
8284 are controlled through methods of the <link to="IConsole" /> interface
8285 which also manage the media associated with the snapshot.
8286 The following operations exist:
8287
8288 <ul>
8289 <li><link to="IConsole::takeSnapshot"/> creates a new snapshot
8290 by creating new, empty differencing images for the machine's
8291 media and saving the VM settings and (if the VM is running)
8292 the current VM state in the snapshot.
8293
8294 The differencing images will then receive all data written to
8295 the machine's media, while their parent (base) images
8296 remain unmodified after the snapshot has been taken (see
8297 <link to="IMedium" /> for details about differencing images).
8298 This simplifies restoring a machine to the state of a snapshot:
8299 only the differencing images need to be deleted.
8300
8301 The current machine state is not changed by taking a snapshot.
8302 If the machine is running, it will resume execution after the
8303 snapshot has been taken. After calling this,
8304 <link to="IMachine::currentSnapshot" /> is set to the snapshot
8305 just created.
8306 </li>
8307
8308 <li><link to="IConsole::restoreSnapshot"/> resets a machine to
8309 the state of a previous snapshot by deleting the differencing
8310 image of each of the machine's media and setting the machine's
8311 settings and state to the state that was saved in the snapshot (if any).
8312
8313 This destroys the machine's current state. After calling this,
8314 <link to="IMachine::currentSnapshot" /> is set to the snapshot that was
8315 restored.
8316 </li>
8317
8318 <li><link to="IConsole::deleteSnapshot"/> deletes a snapshot
8319 without affecting the current machine state.
8320
8321 This does not change the current machine state, but instead frees the
8322 resources allocated when the snapshot was taken: the settings and machine
8323 state file are deleted (if any), and the snapshot's differencing image for
8324 each of the machine's media gets merged with its parent image.
8325
8326 Neither the current machine state nor other snapshots are affected
8327 by this operation, except that parent media will be modified
8328 to contain the disk data associated with the snapshot being deleted.
8329
8330 When deleting the current snapshot, the <link to="IMachine::currentSnapshot" />
8331 attribute is set to the current snapshot's parent or NULL if it
8332 has no parent. Otherwise the attribute is unchanged.
8333 </li>
8334 </ul>
8335
8336 Each snapshot contains the settings of the virtual machine (hardware
8337 configuration etc.). In addition, if the machine was running when the
8338 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8339 the current VM state is saved in the snapshot (similarly to what happens
8340 when a VM's state is saved). The snapshot is then said to
8341 be <i>online</i> because when restoring it, the VM will be running.
8342
8343 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8344 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8345
8346 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8347 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8348 it then contains a so-called "zero execution state", representing a
8349 machine that is powered off.
8350 </desc>
8351
8352 <attribute name="id" type="uuid" mod="string" readonly="yes">
8353 <desc>UUID of the snapshot.</desc>
8354 </attribute>
8355
8356 <attribute name="name" type="wstring">
8357 <desc>Short name of the snapshot.</desc>
8358 </attribute>
8359
8360 <attribute name="description" type="wstring">
8361 <desc>Optional description of the snapshot.</desc>
8362 </attribute>
8363
8364 <attribute name="timeStamp" type="long long" readonly="yes">
8365 <desc>
8366 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8367 </desc>
8368 </attribute>
8369
8370 <attribute name="online" type="boolean" readonly="yes">
8371 <desc>
8372 @c true if this snapshot is an online snapshot and @c false otherwise.
8373
8374 When this attribute is @c true, the
8375 <link to="IMachine::stateFilePath"/> attribute of the
8376 <link to="#machine"/> object associated with this snapshot
8377 will point to the saved state file. Otherwise, it will be
8378 an empty string.
8379 </desc>
8380 </attribute>
8381
8382 <attribute name="machine" type="IMachine" readonly="yes">
8383 <desc>
8384 Virtual machine this snapshot is taken on. This object
8385 stores all settings the machine had when taking this snapshot.
8386 <note>
8387 The returned machine object is immutable, i.e. no
8388 any settings can be changed.
8389 </note>
8390 </desc>
8391 </attribute>
8392
8393 <attribute name="parent" type="ISnapshot" readonly="yes">
8394 <desc>
8395 Parent snapshot (a snapshot this one is based on), or
8396 @c null if the snapshot has no parent (i.e. is the first snapshot).
8397 </desc>
8398 </attribute>
8399
8400 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8401 <desc>
8402 Child snapshots (all snapshots having this one as a parent).
8403 </desc>
8404 </attribute>
8405
8406 </interface>
8407
8408
8409 <!--
8410 // IMedium
8411 /////////////////////////////////////////////////////////////////////////
8412 -->
8413
8414 <enum
8415 name="MediumState"
8416 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8417 >
8418 <desc>
8419 Virtual medium state.
8420 <see>IMedium</see>
8421 </desc>
8422
8423 <const name="NotCreated" value="0">
8424 <desc>
8425 Associated medium storage does not exist (either was not created yet or
8426 was deleted).
8427 </desc>
8428 </const>
8429 <const name="Created" value="1">
8430 <desc>
8431 Associated storage exists and accessible; this gets set if the
8432 accessibility check performed by <link to="IMedium::refreshState" />
8433 was successful.
8434 </desc>
8435 </const>
8436 <const name="LockedRead" value="2">
8437 <desc>
8438 Medium is locked for reading (see <link to="IMedium::lockRead"/>),
8439 no data modification is possible.
8440 </desc>
8441 </const>
8442 <const name="LockedWrite" value="3">
8443 <desc>
8444 Medium is locked for writing (see <link to="IMedium::lockWrite"/>),
8445 no concurrent data reading or modification is possible.
8446 </desc>
8447 </const>
8448 <const name="Inaccessible" value="4">
8449 <desc>
8450 Medium accessiblity check (see <link to="IMedium::refreshState" />) has
8451 not yet been performed, or else, associated medium storage is not
8452 accessible. In the first case, <link to="IMedium::lastAccessError"/>
8453 is empty, in the second case, it describes the error that occured.
8454 </desc>
8455 </const>
8456 <const name="Creating" value="5">
8457 <desc>
8458 Associated medium storage is being created.
8459 </desc>
8460 </const>
8461 <const name="Deleting" value="6">
8462 <desc>
8463 Associated medium storage is being deleted.
8464 </desc>
8465 </const>
8466 </enum>
8467
8468 <enum
8469 name="MediumType"
8470 uuid="19388a99-8e70-4bd4-9a95-90cbc513ef6d"
8471 >
8472 <desc>
8473 Virtual medium type.
8474 <see>IMedium</see>
8475 </desc>
8476
8477 <const name="Normal" value="0">
8478 <desc>
8479 Normal medium (attached directly or indirectly, preserved
8480 when taking snapshots).
8481 </desc>
8482 </const>
8483 <const name="Immutable" value="1">
8484 <desc>
8485 Immutable medium (attached indirectly, changes are wiped out
8486 the next time the virtual machine is started).
8487 </desc>
8488 </const>
8489 <const name="Writethrough" value="2">
8490 <desc>
8491 Write through medium (attached directly, ignored when
8492 taking snapshots).
8493 </desc>
8494 </const>
8495 <const name="Shareable" value="3">
8496 <desc>
8497 Allow using this medium concurrently by several machines.
8498 <note>Present since VirtualBox 3.2.0, and accepted since 3.2.8.</note>
8499 </desc>
8500 </const>
8501 <const name="Readonly" value="4">
8502 <desc>
8503 A readonly medium, which can of course be used by several machines.
8504 <note>Present and accepted since VirtualBox 4.0.</note>
8505 </desc>
8506 </const>
8507 </enum>
8508
8509 <enum
8510 name="MediumVariant"
8511 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8512 >
8513 <desc>
8514 Virtual medium image variant. More than one flag may be set.
8515 <see>IMedium</see>
8516 </desc>
8517
8518 <const name="Standard" value="0">
8519 <desc>
8520 No particular variant requested, results in using the backend default.
8521 </desc>
8522 </const>
8523 <const name="VmdkSplit2G" value="0x01">
8524 <desc>
8525 VMDK image split in chunks of less than 2GByte.
8526 </desc>
8527 </const>
8528 <const name="VmdkStreamOptimized" value="0x04">
8529 <desc>
8530 VMDK streamOptimized image. Special import/export format which is
8531 read-only/append-only.
8532 </desc>
8533 </const>
8534 <const name="VmdkESX" value="0x08">
8535 <desc>
8536 VMDK format variant used on ESX products.
8537 </desc>
8538 </const>
8539 <const name="Fixed" value="0x10000">
8540 <desc>
8541 Fixed image. Only allowed for base images.
8542 </desc>
8543 </const>
8544 <const name="Diff" value="0x20000">
8545 <desc>
8546 Differencing image. Only allowed for child images.
8547 </desc>
8548 </const>
8549 </enum>
8550
8551 <interface
8552 name="IMediumAttachment" extends="$unknown"
8553 uuid="c29452cc-ca72-404b-9261-cfc514f1e412"
8554 wsmap="struct"
8555 >
8556 <desc>
8557 The IMediumAttachment interface links storage media to virtual machines.
8558 For each medium (<link to="IMedium"/>) which has been attached to a
8559 storage controller (<link to="IStorageController"/>) of a machine
8560 (<link to="IMachine"/>) via the <link to="IMachine::attachDevice" />
8561 method, one instance of IMediumAttachment is added to the machine's
8562 <link to="IMachine::mediumAttachments"/> array attribute.
8563
8564 Each medium attachment specifies the storage controller as well as a
8565 port and device number and the IMedium instance representing a virtual
8566 hard disk or floppy or DVD image.
8567
8568 For removeable media (DVDs or floppies), there are two additional
8569 options. For one, the IMedium instance can be @c null to represent
8570 an empty drive with no media inserted (see <link to="IMachine::mountMedium" />);
8571 secondly, the medium can be one of the pseudo-media for host drives
8572 listed in <link to="IHost::DVDDrives"/> or <link to="IHost::floppyDrives"/>.
8573 </desc>
8574
8575 <attribute name="medium" type="IMedium" readonly="yes">
8576 <desc>Medium object associated with this attachment; it
8577 can be @c null for removable devices.</desc>
8578 </attribute>
8579
8580 <attribute name="controller" type="wstring" readonly="yes">
8581 <desc>Name of the storage controller of this attachment; this
8582 refers to one of the controllers in <link to="IMachine::storageControllers" />
8583 by name.</desc>
8584 </attribute>
8585
8586 <attribute name="port" type="long" readonly="yes">
8587 <desc>Port number of this attachment.
8588 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8589 </desc>
8590 </attribute>
8591
8592 <attribute name="device" type="long" readonly="yes">
8593 <desc>Device slot number of this attachment.
8594 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8595 </desc>
8596 </attribute>
8597
8598 <attribute name="type" type="DeviceType" readonly="yes">
8599 <desc>Device type of this attachment.</desc>
8600 </attribute>
8601
8602 <attribute name="passthrough" type="boolean" readonly="yes">
8603 <desc>Pass I/O requests through to a device on the host.</desc>
8604 </attribute>
8605
8606 <attribute name="bandwidthLimit" type="unsigned long">
8607 <desc>
8608 Maximum throughput allowed for this medium attachment, in units of 1 mbps.
8609 A zero value means uncapped/unlimited.
8610 </desc>
8611 </attribute>
8612
8613 </interface>
8614
8615 <interface
8616 name="IMedium" extends="$unknown"
8617 uuid="bfcf5b8c-5155-4f24-9414-9457054b16db"
8618 wsmap="managed"
8619 >
8620 <desc>
8621 The IMedium interface represents virtual storage for a machine's
8622 hard disks, CD/DVD or floppy drives. It will typically represent
8623 a disk image on the host, for example a VDI or VMDK file representing
8624 a virtual hard disk, or an ISO or RAW file representing virtual
8625 removable media, but can also point to a network location (e.g.
8626 for iSCSI targets).
8627
8628 Instances of IMedium are connected to virtual machines by way of
8629 medium attachments (see <link to="IMediumAttachment" />), which link
8630 the storage medium to a particular device slot of a storage controller
8631 of the virtual machine.
8632 In the VirtualBox API, virtual storage is therefore always represented
8633 by the following chain of object links:
8634
8635 <ul>
8636 <li><link to="IMachine::storageControllers"/> contains an array of
8637 storage controllers (IDE, SATA, SCSI, SAS or a floppy controller;
8638 these are instances of <link to="IStorageController"/>).</li>
8639 <li><link to="IMachine::mediumAttachments"/> contains an array of
8640 medium attachments (instances of <link to="IMediumAttachment"/>),
8641 each containing a storage controller from the above array, a
8642 port/device specification, and an instance of IMedium representing
8643 the medium storage (image file).
8644
8645 For removable media, the storage medium is optional; a medium
8646 attachment with no medium represents a CD/DVD or floppy drive
8647 with no medium inserted. By contrast, hard disk attachments
8648 will always have an IMedium object attached.</li>
8649 <li>Each IMedium in turn points to a storage unit (such as a file
8650 on the host computer or a network resource) that holds actual
8651 data. This location is represented by the <link to="#location"/>
8652 attribute.</li>
8653 </ul>
8654
8655 Existing media are opened using <link to="IVirtualBox::openMedium"/>;
8656 new hard disk media can be created with the VirtualBox API using the
8657 <link to="IVirtualBox::createHardDisk"/> method.
8658
8659 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8660 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8661 type in a regular file.
8662
8663 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8664 drive; in that case the <link to="#id" /> attribute contains the UUID of
8665 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8666
8667 <h3>Known media</h3>
8668
8669 When an existing medium is opened for the first time, it is automatically
8670 remembered by the given VirtualBox installation or, in other words, becomes
8671 a <i>known medium</i>. Known media are stored in the media
8672 registry transparently maintained by VirtualBox and stored in settings
8673 files so that this registry is preserved when VirtualBox is not running.
8674
8675 Newly created virtual media are remembered only when the associated
8676 storage unit is actually created.
8677
8678 All known media can be enumerated using
8679 <link to="IVirtualBox::hardDisks"/>,
8680 <link to="IVirtualBox::DVDImages"/> and
8681 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8682 quickly found using the <link to="IVirtualBox::findMedium"/> method.
8683
8684 Only known media can be attached to virtual machines.
8685
8686 Removing known media from the media registry is performed when the given
8687 medium is closed using the <link to="#close"/> method or when its
8688 associated storage unit is deleted.
8689
8690 <h3>Accessibility checks</h3>
8691
8692 VirtualBox defers media accessibility checks until the <link to="#refreshState" />
8693 method is called explicitly on a medium. This is done to make the VirtualBox object
8694 ready for serving requests as fast as possible and let the end-user
8695 application decide if it needs to check media accessibility right away or not.
8696
8697 As a result, when VirtualBox starts up (e.g. the VirtualBox
8698 object gets created for the first time), all known media are in the
8699 "Inaccessible" state, but the value of the <link to="#lastAccessError"/>
8700 attribute is an empty string because no actual accessibility check has
8701 been made yet.
8702
8703 After calling <link to="#refreshState" />, a medium is considered
8704 <i>accessible</i> if its storage unit can be read. In that case, the
8705 <link to="#state"/> attribute has a value of "Created". If the storage
8706 unit cannot be read (for example, because it is located on a disconnected
8707 network resource, or was accidentally deleted outside VirtualBox),
8708 the medium is considered <i>inaccessible</i>, which is indicated by the
8709 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8710 obtained by reading the <link to="#lastAccessError"/> attribute.
8711
8712 <h3>Medium types</h3>
8713
8714 There are four types of medium behavior (see <link to="MediumType" />):
8715 "normal", "immutable", "writethrough" and "shareable", represented by the
8716 <link to="#type"/> attribute. The type of the medium defines how the
8717 medium is attached to a virtual machine and what happens when a
8718 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8719 attached medium is taken. At the moment DVD and floppy media are always
8720 of type "writethrough".
8721
8722 All media can be also divided in two groups: <i>base</i> media and
8723 <i>differencing</i> media. A base medium contains all sectors of the
8724 medium data in its own storage and therefore can be used independently.
8725 In contrast, a differencing mediun is a "delta" to some other medium and
8726 contains only those sectors which differ from that other medium, which is
8727 then called a <i>parent</i>. The differencing medium is said to be
8728 <i>linked to</i> that parent. The parent may be itself a differencing
8729 medium, thus forming a chain of linked media. The last element in that
8730 chain must always be a base medium. Note that several differencing
8731 media may be linked to the same parent medium.
8732
8733 Differencing media can be distinguished from base media by querying the
8734 <link to="#parent"/> attribute: base media do not have parents they would
8735 depend on, so the value of this attribute is always @c null for them.
8736 Using this attribute, it is possible to walk up the medium tree (from the
8737 child medium to its parent). It is also possible to walk down the tree
8738 using the <link to="#children"/> attribute.
8739
8740 Note that the type of all differencing media is "normal"; all other
8741 values are meaningless for them. Base media may be of any type.
8742
8743 <h3>Creating hard disks</h3>
8744
8745 New base hard disks are created using
8746 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8747 opened using <link to="IVirtualBox::openMedium"/>. Differencing hard
8748 disks are usually implicitly created by VirtualBox when needed but may
8749 also be created explicitly using <link to="#createDiffStorage"/>.
8750
8751 After the hard disk is successfully created (including the storage unit)
8752 or opened, it becomes a known hard disk (remembered in the internal media
8753 registry). Known hard disks can be attached to a virtual machine, accessed
8754 through <link to="IVirtualBox::findMedium"/> or enumerated using the
8755 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8756
8757 The following methods, besides <link to="IMedium::close"/>,
8758 automatically remove the hard disk from the media registry:
8759 <ul>
8760 <li><link to="#deleteStorage"/></li>
8761 <li><link to="#mergeTo"/></li>
8762 </ul>
8763
8764 If the storage unit of the hard disk is a regular file in the host's
8765 file system then the rules stated in the description of the
8766 <link to="IMedium::location"/> attribute apply when setting its value.
8767
8768 <h4>Automatic composition of the file name part</h4>
8769
8770 Another extension to the <link to="IMedium::location"/> attribute is that
8771 there is a possibility to cause VirtualBox to compose a unique value for
8772 the file name part of the location using the UUID of the hard disk. This
8773 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
8774 e.g. before the storage unit is created, and works as follows. You set the
8775 value of the <link to="IMedium::location"/> attribute to a location
8776 specification which only contains the path specification but not the file
8777 name part and ends with either a forward slash or a backslash character.
8778 In response, VirtualBox will generate a new UUID for the hard disk and
8779 compose the file name using the following pattern:
8780 <pre>
8781 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8782 </pre>
8783 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8784 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8785 is the default extension for the storage format of this hard disk. After
8786 that, you may call any of the methods that create a new hard disk storage
8787 unit and they will use the generated UUID and file name.
8788
8789 <h3>Attaching Hard Disks</h3>
8790
8791 Hard disks are attached to virtual machines using the
8792 <link to="IMachine::attachDevice"/> method and detached using the
8793 <link to="IMachine::detachDevice"/> method. Depending on their
8794 <link to="#type"/>, hard disks are attached either
8795 <i>directly</i> or <i>indirectly</i>.
8796
8797 When a hard disk is being attached directly, it is associated with the
8798 virtual machine and used for hard disk operations when the machine is
8799 running. When a hard disk is being attached indirectly, a new differencing
8800 hard disk linked to it is implicitly created and this differencing hard
8801 disk is associated with the machine and used for hard disk operations.
8802 This also means that if <link to="IMachine::attachDevice"/> performs
8803 a direct attachment then the same hard disk will be returned in response
8804 to the subsequent <link to="IMachine::getMedium"/> call; however if
8805 an indirect attachment is performed then
8806 <link to="IMachine::getMedium"/> will return the implicitly created
8807 differencing hard disk, not the original one passed to <link
8808 to="IMachine::attachDevice"/>. In detail:
8809
8810 <ul>
8811 <li><b>Normal base</b> hard disks that do not have children (i.e.
8812 differencing hard disks linked to them) and that are not already
8813 attached to virtual machines in snapshots are attached <b>directly</b>.
8814 Otherwise, they are attached <b>indirectly</b> because having
8815 dependent children or being part of the snapshot makes it impossible
8816 to modify hard disk contents without breaking the integrity of the
8817 dependent party. The <link to="#readOnly"/> attribute allows to
8818 quickly determine the kind of the attachment for the given hard
8819 disk. Note that if a normal base hard disk is to be indirectly
8820 attached to a virtual machine with snapshots then a special
8821 procedure called <i>smart attachment</i> is performed (see below).</li>
8822 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
8823 they are attached <b>directly</b> if they do not have children and are
8824 not attached to virtual machines in snapshots, and <b>indirectly</b>
8825 otherwise. Note that the smart attachment procedure is never performed
8826 for differencing hard disks.</li>
8827 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
8828 they are designed to be non-writable. If an immutable hard disk is
8829 attached to a virtual machine with snapshots then a special
8830 procedure called smart attachment is performed (see below).</li>
8831 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
8832 also as designed. This also means that writethrough hard disks cannot
8833 have other hard disks linked to them at all.</li>
8834 <li><b>Shareable</b> hard disks are always attached <b>directly</b>,
8835 also as designed. This also means that shareable hard disks cannot
8836 have other hard disks linked to them at all. They behave almost
8837 like writethrough hard disks, except that shareable hard disks can
8838 be attached to several virtual machines which are running, allowing
8839 concurrent accesses. You need special cluster software running in
8840 the virtual machines to make use of such disks.</li>
8841 </ul>
8842
8843 Note that the same hard disk, regardless of its type, may be attached to
8844 more than one virtual machine at a time. In this case, the machine that is
8845 started first gains exclusive access to the hard disk and attempts to
8846 start other machines having this hard disk attached will fail until the
8847 first machine is powered down.
8848
8849 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8850 that the given hard disk remains associated with the given machine after a
8851 successful <link to="IMachine::detachDevice"/> call until
8852 <link to="IMachine::saveSettings"/> is called to save all changes to
8853 machine settings to disk. This deferring is necessary to guarantee that
8854 the hard disk configuration may be restored at any time by a call to
8855 <link to="IMachine::discardSettings"/> before the settings
8856 are saved (committed).
8857
8858 Note that if <link to="IMachine::discardSettings"/> is called after
8859 indirectly attaching some hard disks to the machine but before a call to
8860 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8861 all differencing hard disks implicitly created by
8862 <link to="IMachine::attachDevice"/> for these indirect attachments.
8863 Such implicitly created hard disks will also be immediately deleted when
8864 detached explicitly using the <link to="IMachine::detachDevice"/>
8865 call if it is made before <link to="IMachine::saveSettings"/>. This
8866 implicit deletion is safe because newly created differencing hard
8867 disks do not contain any user data.
8868
8869 However, keep in mind that detaching differencing hard disks that were
8870 implicitly created by <link to="IMachine::attachDevice"/>
8871 before the last <link to="IMachine::saveSettings"/> call will
8872 <b>not</b> implicitly delete them as they may already contain some data
8873 (for example, as a result of virtual machine execution). If these hard
8874 disks are no more necessary, the caller can always delete them explicitly
8875 using <link to="#deleteStorage"/> after they are actually de-associated
8876 from this machine by the <link to="IMachine::saveSettings"/> call.
8877
8878 <h3>Smart Attachment</h3>
8879
8880 When normal base or immutable hard disks are indirectly attached to a
8881 virtual machine then some additional steps are performed to make sure the
8882 virtual machine will have the most recent "view" of the hard disk being
8883 attached. These steps include walking through the machine's snapshots
8884 starting from the current one and going through ancestors up to the first
8885 snapshot. Hard disks attached to the virtual machine in all
8886 of the encountered snapshots are checked whether they are descendants of
8887 the given normal base or immutable hard disk. The first found child (which
8888 is the differencing hard disk) will be used instead of the normal base or
8889 immutable hard disk as a parent for creating a new differencing hard disk
8890 that will be actually attached to the machine. And only if no descendants
8891 are found or if the virtual machine does not have any snapshots then the
8892 normal base or immutable hard disk will be used itself as a parent for
8893 this differencing hard disk.
8894
8895 It is easier to explain what smart attachment does using the
8896 following example:
8897 <pre>
8898BEFORE attaching B.vdi: AFTER attaching B.vdi:
8899
8900Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8901 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8902 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8903 Snapshot 4 (none) Snapshot 4 (none)
8904 CurState (none) CurState (D3->D2.vdi)
8905
8906 NOT
8907 ...
8908 CurState (D3->B.vdi)
8909 </pre>
8910 The first column is the virtual machine configuration before the base hard
8911 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8912 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8913 mean that the hard disk that is actually attached to the machine is a
8914 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8915 another hard disk, <tt>B.vdi</tt>.
8916
8917 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8918 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8919 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8920 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8921 it cannot be attached directly and needs an indirect attachment (i.e.
8922 implicit creation of a new differencing hard disk). Due to the smart
8923 attachment procedure, the new differencing hard disk
8924 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8925 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8926 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8927 machine.
8928
8929 Note that if there is more than one descendant hard disk of the given base
8930 hard disk found in a snapshot, and there is an exact device, channel and
8931 bus match, then this exact match will be used. Otherwise, the youngest
8932 descendant will be picked up.
8933
8934 There is one more important aspect of the smart attachment procedure which
8935 is not related to snapshots at all. Before walking through the snapshots
8936 as described above, the backup copy of the current list of hard disk
8937 attachment is searched for descendants. This backup copy is created when
8938 the hard disk configuration is changed for the first time after the last
8939 <link to="IMachine::saveSettings"/> call and used by
8940 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8941 changes. When such a descendant is found in this backup copy, it will be
8942 simply re-attached back, without creating a new differencing hard disk for
8943 it. This optimization is necessary to make it possible to re-attach the
8944 base or immutable hard disk to a different bus, channel or device slot
8945 without losing the contents of the differencing hard disk actually
8946 attached to the machine in place of it.
8947 </desc>
8948
8949 <attribute name="id" type="uuid" mod="string" readonly="yes">
8950 <desc>
8951 UUID of the medium. For a newly created medium, this value is a randomly
8952 generated UUID.
8953
8954 <note>
8955 For media in one of MediumState_NotCreated, MediumState_Creating or
8956 MediumState_Deleting states, the value of this property is undefined
8957 and will most likely be an empty UUID.
8958 </note>
8959 </desc>
8960 </attribute>
8961
8962 <attribute name="description" type="wstring">
8963 <desc>
8964 Optional description of the medium. For a newly created medium the value
8965 of this attribute is an empty string.
8966
8967 Medium types that don't support this attribute will return E_NOTIMPL in
8968 attempt to get or set this attribute's value.
8969
8970 <note>
8971 For some storage types, reading this attribute may return an outdated
8972 (last known) value when <link to="#state"/> is <link
8973 to="MediumState_Inaccessible"/> or <link
8974 to="MediumState_LockedWrite"/> because the value of this attribute is
8975 stored within the storage unit itself. Also note that changing the
8976 attribute value is not possible in such case, as well as when the
8977 medium is the <link to="MediumState_LockedRead"/> state.
8978 </note>
8979 </desc>
8980 </attribute>
8981
8982 <attribute name="state" type="MediumState" readonly="yes">
8983 <desc>
8984 Returns the current medium state, which is the last state set by
8985 the accessibility check performed by <link to="#refreshState"/>.
8986 If that method has not yet been called on the medium, the state
8987 is "Inaccessible"; as opposed to truly inaccessible media, the
8988 value of <link to="#lastAccessError"/> will be an empty string in
8989 that case.
8990
8991 <note>As of version 3.1, this no longer performs an accessibility check
8992 automatically; call <link to="#refreshState"/> for that.
8993 </note>
8994 </desc>
8995 </attribute>
8996
8997 <attribute name="variant" type="MediumVariant" readonly="yes">
8998 <desc>
8999 Returns the storage format variant information for this medium.
9000 Before <link to="#refreshState"/> is called this method returns
9001 an undefined value.
9002 </desc>
9003 </attribute>
9004
9005 <attribute name="location" type="wstring">
9006 <desc>
9007 Location of the storage unit holding medium data.
9008
9009 The format of the location string is medium type specific. For medium
9010 types using regular files in a host's file system, the location
9011 string is the full file name.
9012
9013 Some medium types may support changing the storage unit location by
9014 simply changing the value of this property. If this operation is not
9015 supported, the implementation will return E_NOTIMPL in attempt to set
9016 this attribute's value.
9017
9018 When setting a value of the location attribute which is a regular file
9019 in the host's file system, the given file name may be either relative to
9020 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
9021 absolute. Note that if the given location specification does not contain
9022 the file extension part then a proper default extension will be
9023 automatically appended by the implementation depending on the medium type.
9024 </desc>
9025 </attribute>
9026
9027 <attribute name="name" type="wstring" readonly="yes">
9028 <desc>
9029 Name of the storage unit holding medium data.
9030
9031 The returned string is a short version of the <link to="#location"/>
9032 attribute that is suitable for representing the medium in situations
9033 where the full location specification is too long (such as lists
9034 and comboboxes in GUI frontends). This string is also used by frontends
9035 to sort the media list alphabetically when needed.
9036
9037 For example, for locations that are regular files in the host's file
9038 system, the value of this attribute is just the file name (+ extension),
9039 without the path specification.
9040
9041 Note that as opposed to the <link to="#location"/> attribute, the name
9042 attribute will not necessary be unique for a list of media of the
9043 given type and format.
9044 </desc>
9045 </attribute>
9046
9047 <attribute name="deviceType" type="DeviceType" readonly="yes">
9048 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
9049 medium.</desc>
9050 </attribute>
9051
9052 <attribute name="hostDrive" type="boolean" readonly="yes">
9053 <desc>True if this corresponds to a drive on the host.</desc>
9054 </attribute>
9055
9056 <attribute name="size" type="long long" readonly="yes">
9057 <desc>
9058 Physical size of the storage unit used to hold medium data (in bytes).
9059
9060 <note>
9061 For media whose <link to="#state"/> is <link
9062 to="MediumState_Inaccessible"/>, the value of this property is the
9063 last known size. For <link to="MediumState_NotCreated"/> media,
9064 the returned value is zero.
9065 </note>
9066 </desc>
9067 </attribute>
9068
9069 <attribute name="format" type="wstring" readonly="yes">
9070 <desc>
9071 Storage format of this medium.
9072
9073 The value of this attribute is a string that specifies a backend used
9074 to store medium data. The storage format is defined when you create a
9075 new medium or automatically detected when you open an existing medium,
9076 and cannot be changed later.
9077
9078 The list of all storage formats supported by this VirtualBox
9079 installation can be obtained using
9080 <link to="ISystemProperties::mediumFormats"/>.
9081 </desc>
9082 </attribute>
9083
9084 <attribute name="mediumFormat" type="IMediumFormat" readonly="yes">
9085 <desc>
9086 Storage medium format object corresponding to this medium.
9087
9088 The value of this attribute is a reference to the medium format object
9089 that specifies the backend properties used to store medium data. The
9090 storage format is defined when you create a new medium or automatically
9091 detected when you open an existing medium, and cannot be changed later.
9092
9093 <note>@c null is returned if there is no associated medium format
9094 object. This can e.g. happen for medium objects representing host
9095 drives and other special medium objects.</note>
9096 </desc>
9097 </attribute>
9098
9099 <attribute name="type" type="MediumType">
9100 <desc>
9101 Type (role) of this medium.
9102
9103 The following constraints apply when changing the value of this
9104 attribute:
9105 <ul>
9106 <li>If a medium is attached to a virtual machine (either in the
9107 current state or in one of the snapshots), its type cannot be
9108 changed.
9109 </li>
9110 <li>As long as the medium has children, its type cannot be set
9111 to <link to="MediumType_Writethrough"/>.
9112 </li>
9113 <li>The type of all differencing media is
9114 <link to="MediumType_Normal"/> and cannot be changed.
9115 </li>
9116 </ul>
9117
9118 The type of a newly created or opened medium is set to
9119 <link to="MediumType_Normal"/>, except for DVD and floppy media,
9120 which have a type of <link to="MediumType_Writethrough"/>.
9121 </desc>
9122 </attribute>
9123
9124 <attribute name="parent" type="IMedium" readonly="yes">
9125 <desc>
9126 Parent of this medium (the medium this medium is directly based
9127 on).
9128
9129 Only differencing media have parents. For base (non-differencing)
9130 media, @c null is returned.
9131 </desc>
9132 </attribute>
9133
9134 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
9135 <desc>
9136 Children of this medium (all differencing media directly based
9137 on this medium). A @c null array is returned if this medium
9138 does not have any children.
9139 </desc>
9140 </attribute>
9141
9142 <attribute name="base" type="IMedium" readonly="yes">
9143 <desc>
9144 Base medium of this medium.
9145
9146 If this is a differencing medium, its base medium is the medium
9147 the given medium branch starts from. For all other types of media, this
9148 property returns the medium object itself (i.e. the same object this
9149 property is read on).
9150 </desc>
9151 </attribute>
9152
9153 <attribute name="readOnly" type="boolean" readonly="yes">
9154 <desc>
9155 Returns @c true if this medium is read-only and @c false otherwise.
9156
9157 A medium is considered to be read-only when its contents cannot be
9158 modified without breaking the integrity of other parties that depend on
9159 this medium such as its child media or snapshots of virtual machines
9160 where this medium is attached to these machines. If there are no
9161 children and no such snapshots then there is no dependency and the
9162 medium is not read-only.
9163
9164 The value of this attribute can be used to determine the kind of the
9165 attachment that will take place when attaching this medium to a
9166 virtual machine. If the value is @c false then the medium will
9167 be attached directly. If the value is @c true then the medium
9168 will be attached indirectly by creating a new differencing child
9169 medium for that. See the interface description for more information.
9170
9171 Note that all <link to="MediumType_Immutable">Immutable</link> media
9172 are always read-only while all
9173 <link to="MediumType_Writethrough">Writethrough</link> media are
9174 always not.
9175
9176 <note>
9177 The read-only condition represented by this attribute is related to
9178 the medium type and usage, not to the current
9179 <link to="IMedium::state">medium state</link> and not to the read-only
9180 state of the storage unit.
9181 </note>
9182 </desc>
9183 </attribute>
9184
9185 <attribute name="logicalSize" type="long long" readonly="yes">
9186 <desc>
9187 Logical size of this medium (in bytes), as reported to the
9188 guest OS running inside the virtual machine this medium is
9189 attached to. The logical size is defined when the medium is created
9190 and cannot be changed later.
9191
9192 <note>
9193 Reading this property on a differencing medium will return the size
9194 of its <link to="#base"/> medium.
9195 </note>
9196 <note>
9197 For media whose state is <link to="#state"/> is <link
9198 to="MediumState_Inaccessible"/>, the value of this property is the
9199 last known logical size. For <link to="MediumState_NotCreated"/>
9200 media, the returned value is zero.
9201 </note>
9202 </desc>
9203 </attribute>
9204
9205 <attribute name="autoReset" type="boolean">
9206 <desc>
9207 Whether this differencing medium will be automatically reset each
9208 time a virtual machine it is attached to is powered up. This
9209 attribute is automatically set to @c true for the last
9210 differencing image of an "immutable" medium (see
9211 <link to="MediumType" />).
9212
9213 See <link to="#reset"/> for more information about resetting
9214 differencing media.
9215
9216 <note>
9217 Reading this property on a base (non-differencing) medium will
9218 always @c false. Changing the value of this property in this
9219 case is not supported.
9220 </note>
9221
9222 <result name="VBOX_E_NOT_SUPPORTED">
9223 This is not a differencing medium (when changing the attribute
9224 value).
9225 </result>
9226 </desc>
9227 </attribute>
9228
9229 <attribute name="lastAccessError" type="wstring" readonly="yes">
9230 <desc>
9231 Text message that represents the result of the last accessibility
9232 check performed by <link to="#refreshState"/>.
9233
9234 An empty string is returned if the last accessibility check
9235 was successful or has not yet been called. As a result, if
9236 <link to="#state" /> is "Inaccessible" and this attribute is empty,
9237 then <link to="#refreshState"/> has yet to be called; this is the
9238 default value of media after VirtualBox initialization.
9239 A non-empty string indicates a failure and should normally describe
9240 a reason of the failure (for example, a file read error).
9241 </desc>
9242 </attribute>
9243
9244 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9245 <desc>
9246 Array of UUIDs of all machines this medium is attached to.
9247
9248 A @c null array is returned if this medium is not attached to any
9249 machine or to any machine's snapshot.
9250
9251 <note>
9252 The returned array will include a machine even if this medium is not
9253 attached to that machine in the current state but attached to it in
9254 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9255 details.
9256 </note>
9257 </desc>
9258 </attribute>
9259
9260 <method name="setIDs">
9261 <desc>
9262 Changes the UUID and parent UUID for a hard disk medium.
9263 </desc>
9264 <param name="setImageId" type="boolean" dir="in">
9265 <desc>
9266 Select whether a new image UUID is set or not.
9267 </desc>
9268 </param>
9269 <param name="imageId" type="uuid" mod="string" dir="in">
9270 <desc>
9271 New UUID for the image. If an empty string is passed, then a new
9272 UUID is automatically created, provided that @a setImageId is @c true.
9273 Specifying a zero UUID is not allowed.
9274 </desc>
9275 </param>
9276 <param name="setParentId" type="boolean" dir="in">
9277 <desc>
9278 Select whether a new parent UUID is set or not.
9279 </desc>
9280 </param>
9281 <param name="parentId" type="uuid" mod="string" dir="in">
9282 <desc>
9283 New parent UUID for the image. If an empty string is passed, then a
9284 new UUID is automatically created, provided @a setParentId is
9285 @c true. A zero UUID is valid.
9286 </desc>
9287 </param>
9288 <result name="E_INVALIDARG">
9289 Invalid parameter combination.
9290 </result>
9291 <result name="VBOX_E_NOT_SUPPORTED">
9292 Medium is not a hard disk medium.
9293 </result>
9294 </method>
9295
9296 <method name="refreshState">
9297 <desc>
9298 If the current medium state (see <link to="MediumState"/>) is one of
9299 "Created", "Inaccessible" or "LockedRead", then this performs an
9300 accessibility check on the medium and sets the value of the <link to="#state"/>
9301 attribute accordingly; that value is also returned for convenience.
9302
9303 For all other state values, this does not perform a refresh but returns
9304 the state only.
9305
9306 The refresh, if performed, may take a long time (several seconds or even
9307 minutes, depending on the storage unit location and format) because it performs an
9308 accessibility check of the storage unit. This check may cause a significant
9309 delay if the storage unit of the given medium is, for example, a file located
9310 on a network share which is not currently accessible due to connectivity
9311 problems. In that case, the call will not return until a timeout
9312 interval defined by the host OS for this operation expires. For this reason,
9313 it is recommended to never read this attribute on the main UI thread to avoid
9314 making the UI unresponsive.
9315
9316 If the last known state of the medium is "Created" and the accessibility
9317 check fails, then the state would be set to "Inaccessible", and
9318 <link to="#lastAccessError"/> may be used to get more details about the
9319 failure. If the state of the medium is "LockedRead", then it remains the
9320 same, and a non-empty value of <link to="#lastAccessError"/> will
9321 indicate a failed accessibility check in this case.
9322
9323 Note that not all medium states are applicable to all medium types.
9324 </desc>
9325 <param name="state" type="MediumState" dir="return">
9326 <desc>
9327 New medium state.
9328 </desc>
9329 </param>
9330 </method>
9331
9332 <method name="getSnapshotIds">
9333 <desc>
9334 Returns an array of UUIDs of all snapshots of the given machine where
9335 this medium is attached to.
9336
9337 If the medium is attached to the machine in the current state, then the
9338 first element in the array will always be the ID of the queried machine
9339 (i.e. the value equal to the @c machineId argument), followed by
9340 snapshot IDs (if any).
9341
9342 If the medium is not attached to the machine in the current state, then
9343 the array will contain only snapshot IDs.
9344
9345 The returned array may be @c null if this medium is not attached
9346 to the given machine at all, neither in the current state nor in one of
9347 the snapshots.
9348 </desc>
9349 <param name="machineId" type="uuid" mod="string" dir="in">
9350 <desc>
9351 UUID of the machine to query.
9352 </desc>
9353 </param>
9354 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9355 <desc>
9356 Array of snapshot UUIDs of the given machine using this medium.
9357 </desc>
9358 </param>
9359 </method>
9360
9361 <method name="lockRead">
9362 <desc>
9363 Locks this medium for reading.
9364
9365 A read lock is shared: many clients can simultaneously lock the
9366 same medium for reading unless it is already locked for writing (see
9367 <link to="#lockWrite"/>) in which case an error is returned.
9368
9369 When the medium is locked for reading, it cannot be modified
9370 from within VirtualBox. This means that any method that changes
9371 the properties of this medium or contents of the storage unit
9372 will return an error (unless explicitly stated otherwise). That
9373 includes an attempt to start a virtual machine that wants to
9374 write to the the medium.
9375
9376 When the virtual machine is started up, it locks for reading all
9377 media it uses in read-only mode. If some medium cannot be locked
9378 for reading, the startup procedure will fail.
9379 A medium is typically locked for reading while it is used by a running
9380 virtual machine but has a depending differencing image that receives
9381 the actual write operations. This way one base medium can have
9382 multiple child differencing images which can be written to
9383 simultaneously. Read-only media such as DVD and floppy images are
9384 also locked for reading only (so they can be in use by multiple
9385 machines simultaneously).
9386
9387 A medium is also locked for reading when it is the source of a
9388 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9389
9390 The medium locked for reading must be unlocked using the <link
9391 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9392 can be nested and must be followed by the same number of paired
9393 <link to="#unlockRead"/> calls.
9394
9395 This method sets the medium state (see <link to="#state"/>) to
9396 "LockedRead" on success. The medium's previous state must be
9397 one of "Created", "Inaccessible" or "LockedRead".
9398
9399 Locking an inaccessible medium is not an error; this method performs
9400 a logical lock that prevents modifications of this medium through
9401 the VirtualBox API, not a physical file-system lock of the underlying
9402 storage unit.
9403
9404 This method returns the current state of the medium
9405 <i>before</i> the operation.
9406
9407 <result name="VBOX_E_INVALID_OBJECT_STATE">
9408 Invalid medium state (e.g. not created, locked, inaccessible,
9409 creating, deleting).
9410 </result>
9411
9412 </desc>
9413 <param name="state" type="MediumState" dir="return">
9414 <desc>
9415 State of the medium after the operation.
9416 </desc>
9417 </param>
9418 </method>
9419
9420 <method name="unlockRead">
9421 <desc>
9422 Cancels the read lock previously set by <link to="#lockRead"/>.
9423
9424 For both success and failure, this method returns the current state
9425 of the medium <i>after</i> the operation.
9426
9427 See <link to="#lockRead"/> for more details.
9428
9429 <result name="VBOX_E_INVALID_OBJECT_STATE">
9430 Medium not locked for reading.
9431 </result>
9432
9433 </desc>
9434 <param name="state" type="MediumState" dir="return">
9435 <desc>
9436 State of the medium after the operation.
9437 </desc>
9438 </param>
9439 </method>
9440
9441 <method name="lockWrite">
9442 <desc>
9443 Locks this medium for writing.
9444
9445 A write lock, as opposed to <link to="#lockRead"/>, is
9446 exclusive: there may be only one client holding a write lock,
9447 and there may be no read locks while the write lock is held.
9448 As a result, read-locking fails if a write lock is held, and
9449 write-locking fails if either a read or another write lock is held.
9450
9451 When a medium is locked for writing, it cannot be modified
9452 from within VirtualBox, and it is not guaranteed that the values
9453 of its properties are up-to-date. Any method that changes the
9454 properties of this medium or contents of the storage unit will
9455 return an error (unless explicitly stated otherwise).
9456
9457 When a virtual machine is started up, it locks for writing all
9458 media it uses to write data to. If any medium could not be locked
9459 for writing, the startup procedure will fail. If a medium has
9460 differencing images, then while the machine is running, only
9461 the last ("leaf") differencing image is locked for writing,
9462 whereas its parents are locked for reading only.
9463
9464 A medium is also locked for writing when it is the target of a
9465 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9466
9467 The medium locked for writing must be unlocked using the <link
9468 to="#unlockWrite"/> method. Write locks <i>cannot</i> be nested.
9469
9470 This method sets the medium state (see <link to="#state"/>) to
9471 "LockedWrite" on success. The medium's previous state must be
9472 either "Created" or "Inaccessible".
9473
9474 Locking an inaccessible medium is not an error; this method performs
9475 a logical lock that prevents modifications of this medium through
9476 the VirtualBox API, not a physical file-system lock of the underlying
9477 storage unit.
9478
9479 For both, success and failure, this method returns the current
9480 state of the medium <i>before</i> the operation.
9481
9482 <result name="VBOX_E_INVALID_OBJECT_STATE">
9483 Invalid medium state (e.g. not created, locked, inaccessible,
9484 creating, deleting).
9485 </result>
9486
9487 </desc>
9488 <param name="state" type="MediumState" dir="return">
9489 <desc>
9490 State of the medium after the operation.
9491 </desc>
9492 </param>
9493 </method>
9494
9495 <method name="unlockWrite">
9496 <desc>
9497 Cancels the write lock previously set by <link to="#lockWrite"/>.
9498
9499 For both success and failure, this method returns the current
9500 state of the medium <i>after</i> the operation.
9501
9502 See <link to="#lockWrite"/> for more details.
9503
9504 <result name="VBOX_E_INVALID_OBJECT_STATE">
9505 Medium not locked for writing.
9506 </result>
9507
9508 </desc>
9509 <param name="state" type="MediumState" dir="return">
9510 <desc>
9511 State of the medium after the operation.
9512 </desc>
9513 </param>
9514 </method>
9515
9516 <method name="close">
9517 <desc>
9518 Closes this medium.
9519
9520 The medium must not be attached to any known virtual machine
9521 and must not have any known child media, otherwise the
9522 operation will fail.
9523
9524 When the medium is successfully closed, it is removed from
9525 the list of registered media, but its storage unit is not
9526 deleted. In particular, this means that this medium can
9527 later be opened again using the <link to="IVirtualBox::openMedium"/>
9528 call.
9529
9530 Note that after this method successfully returns, the given medium
9531 object becomes uninitialized. This means that any attempt
9532 to call any of its methods or attributes will fail with the
9533 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9534
9535 <result name="VBOX_E_INVALID_OBJECT_STATE">
9536 Invalid medium state (other than not created, created or
9537 inaccessible).
9538 </result>
9539 <result name="VBOX_E_OBJECT_IN_USE">
9540 Medium attached to virtual machine.
9541 </result>
9542 <result name="VBOX_E_FILE_ERROR">
9543 Settings file not accessible.
9544 </result>
9545 <result name="VBOX_E_XML_ERROR">
9546 Could not parse the settings file.
9547 </result>
9548
9549 </desc>
9550 </method>
9551
9552 <!-- storage methods -->
9553
9554 <method name="getProperty">
9555 <desc>
9556 Returns the value of the custom medium property with the given name.
9557
9558 The list of all properties supported by the given medium format can
9559 be obtained with <link to="IMediumFormat::describeProperties"/>.
9560
9561 Note that if this method returns an empty string in @a value, the
9562 requested property is supported but currently not assigned any value.
9563
9564 <result name="VBOX_E_OBJECT_NOT_FOUND">
9565 Requested property does not exist (not supported by the format).
9566 </result>
9567 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9568 </desc>
9569 <param name="name" type="wstring" dir="in">
9570 <desc>Name of the property to get.</desc>
9571 </param>
9572 <param name="value" type="wstring" dir="return">
9573 <desc>Current property value.</desc>
9574 </param>
9575 </method>
9576
9577 <method name="setProperty">
9578 <desc>
9579 Sets the value of the custom medium property with the given name.
9580
9581 The list of all properties supported by the given medium format can
9582 be obtained with <link to="IMediumFormat::describeProperties"/>.
9583
9584 Note that setting the property value to @c null or an empty string is
9585 equivalent to deleting the existing value. A default value (if it is
9586 defined for this property) will be used by the format backend in this
9587 case.
9588
9589 <result name="VBOX_E_OBJECT_NOT_FOUND">
9590 Requested property does not exist (not supported by the format).
9591 </result>
9592 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9593 </desc>
9594 <param name="name" type="wstring" dir="in">
9595 <desc>Name of the property to set.</desc>
9596 </param>
9597 <param name="value" type="wstring" dir="in">
9598 <desc>Property value to set.</desc>
9599 </param>
9600 </method>
9601
9602 <method name="getProperties">
9603 <desc>
9604 Returns values for a group of properties in one call.
9605
9606 The names of the properties to get are specified using the @a names
9607 argument which is a list of comma-separated property names or
9608 an empty string if all properties are to be returned. Note that currently
9609 the value of this argument is ignored and the method always returns all
9610 existing properties.
9611
9612 The list of all properties supported by the given medium format can
9613 be obtained with <link to="IMediumFormat::describeProperties"/>.
9614
9615 The method returns two arrays, the array of property names corresponding
9616 to the @a names argument and the current values of these properties.
9617 Both arrays have the same number of elements with each elemend at the
9618 given index in the first array corresponds to an element at the same
9619 index in the second array.
9620
9621 Note that for properties that do not have assigned values,
9622 an empty string is returned at the appropriate index in the
9623 @a returnValues array.
9624
9625 </desc>
9626 <param name="names" type="wstring" dir="in">
9627 <desc>
9628 Names of properties to get.
9629 </desc>
9630 </param>
9631 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9632 <desc>Names of returned properties.</desc>
9633 </param>
9634 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9635 <desc>Values of returned properties.</desc>
9636 </param>
9637 </method>
9638
9639 <method name="setProperties">
9640 <desc>
9641 Sets values for a group of properties in one call.
9642
9643 The names of the properties to set are passed in the @a names
9644 array along with the new values for them in the @a values array. Both
9645 arrays have the same number of elements with each elemend at the given
9646 index in the first array corresponding to an element at the same index
9647 in the second array.
9648
9649 If there is at least one property name in @a names that is not valid,
9650 the method will fail before changing the values of any other properties
9651 from the @a names array.
9652
9653 Using this method over <link to="#setProperty"/> is preferred if you
9654 need to set several properties at once since it will result into less
9655 IPC calls.
9656
9657 The list of all properties supported by the given medium format can
9658 be obtained with <link to="IMediumFormat::describeProperties"/>.
9659
9660 Note that setting the property value to @c null or an empty string is
9661 equivalent to deleting the existing value. A default value (if it is
9662 defined for this property) will be used by the format backend in this
9663 case.
9664 </desc>
9665 <param name="names" type="wstring" safearray="yes" dir="in">
9666 <desc>Names of properties to set.</desc>
9667 </param>
9668 <param name="values" type="wstring" safearray="yes" dir="in">
9669 <desc>Values of properties to set.</desc>
9670 </param>
9671 </method>
9672
9673 <!-- storage methods -->
9674
9675 <method name="createBaseStorage">
9676 <desc>
9677 Starts creating a hard disk storage unit (fixed/dynamic, according
9678 to the variant flags) in in the background. The previous storage unit
9679 created for this object, if any, must first be deleted using
9680 <link to="#deleteStorage"/>, otherwise the operation will fail.
9681
9682 Before the operation starts, the medium is placed in
9683 <link to="MediumState_Creating"/> state. If the create operation
9684 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
9685 state.
9686
9687 After the returned progress object reports that the operation has
9688 successfully completed, the medium state will be set to <link
9689 to="MediumState_Created"/>, the medium will be remembered by this
9690 VirtualBox installation and may be attached to virtual machines.
9691
9692 <result name="VBOX_E_NOT_SUPPORTED">
9693 The variant of storage creation operation is not supported. See <link
9694 to="IMediumFormat::capabilities"/>.
9695 </result>
9696 </desc>
9697 <param name="logicalSize" type="long long" dir="in">
9698 <desc>Maximum logical size of the medium in bytes.</desc>
9699 </param>
9700 <param name="variant" type="MediumVariant" dir="in">
9701 <desc>Exact image variant which should be created.</desc>
9702 </param>
9703 <param name="progress" type="IProgress" dir="return">
9704 <desc>Progress object to track the operation completion.</desc>
9705 </param>
9706 </method>
9707
9708 <method name="deleteStorage">
9709 <desc>
9710 Starts deleting the storage unit of this medium.
9711
9712 The medium must not be attached to any known virtual machine and must
9713 not have any known child media, otherwise the operation will fail.
9714 It will also fail if there is no storage unit to delete or if deletion
9715 is already in progress, or if the medium is being in use (locked for
9716 read or for write) or inaccessible. Therefore, the only valid state for
9717 this operation to succeed is <link to="MediumState_Created"/>.
9718
9719 Before the operation starts, the medium is placed in
9720 <link to="MediumState_Deleting"/> state and gets removed from the list
9721 of remembered hard disks (media registry). If the delete operation
9722 fails, the medium will be remembered again and placed back to
9723 <link to="MediumState_Created"/> state.
9724
9725 After the returned progress object reports that the operation is
9726 complete, the medium state will be set to
9727 <link to="MediumState_NotCreated"/> and you will be able to use one of
9728 the storage creation methods to create it again.
9729
9730 <see>#close()</see>
9731
9732 <result name="VBOX_E_OBJECT_IN_USE">
9733 Medium is attached to a virtual machine.
9734 </result>
9735 <result name="VBOX_E_NOT_SUPPORTED">
9736 Storage deletion is not allowed because neither of storage creation
9737 operations are supported. See
9738 <link to="IMediumFormat::capabilities"/>.
9739 </result>
9740
9741 <note>
9742 If the deletion operation fails, it is not guaranteed that the storage
9743 unit still exists. You may check the <link to="IMedium::state"/> value
9744 to answer this question.
9745 </note>
9746 </desc>
9747 <param name="progress" type="IProgress" dir="return">
9748 <desc>Progress object to track the operation completion.</desc>
9749 </param>
9750 </method>
9751
9752 <!-- diff methods -->
9753
9754 <method name="createDiffStorage">
9755 <desc>
9756 Starts creating an empty differencing storage unit based on this
9757 medium in the format and at the location defined by the @a target
9758 argument.
9759
9760 The target medium must be in <link to="MediumState_NotCreated"/>
9761 state (i.e. must not have an existing storage unit). Upon successful
9762 completion, this operation will set the type of the target medium to
9763 <link to="MediumType_Normal"/> and create a storage unit necessary to
9764 represent the differencing medium data in the given format (according
9765 to the storage format of the target object).
9766
9767 After the returned progress object reports that the operation is
9768 successfully complete, the target medium gets remembered by this
9769 VirtualBox installation and may be attached to virtual machines.
9770
9771 <note>
9772 The medium will be set to <link to="MediumState_LockedRead"/>
9773 state for the duration of this operation.
9774 </note>
9775 <result name="VBOX_E_OBJECT_IN_USE">
9776 Medium not in @c NotCreated state.
9777 </result>
9778 </desc>
9779 <param name="target" type="IMedium" dir="in">
9780 <desc>Target medium.</desc>
9781 </param>
9782 <param name="variant" type="MediumVariant" dir="in">
9783 <desc>Exact image variant which should be created.</desc>
9784 </param>
9785 <param name="progress" type="IProgress" dir="return">
9786 <desc>Progress object to track the operation completion.</desc>
9787 </param>
9788 </method>
9789
9790 <method name="mergeTo">
9791 <desc>
9792 Starts merging the contents of this medium and all intermediate
9793 differencing media in the chain to the given target medium.
9794
9795 The target medium must be either a descendant of this medium or
9796 its ancestor (otherwise this method will immediately return a failure).
9797 It follows that there are two logical directions of the merge operation:
9798 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9799 ancestor (<i>backward merge</i>). Let us consider the following medium
9800 chain:
9801
9802 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9803
9804 Here, calling this method on the <tt>Base</tt> medium object with
9805 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9806 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9807 merge. Note that in both cases the contents of the resulting medium
9808 will be the same, the only difference is the medium object that takes
9809 the result of the merge operation. In case of the forward merge in the
9810 above example, the result will be written to <tt>Diff_2</tt>; in case of
9811 the backward merge, the result will be written to <tt>Base</tt>. In
9812 other words, the result of the operation is always stored in the target
9813 medium.
9814
9815 Upon successful operation completion, the storage units of all media in
9816 the chain between this (source) medium and the target medium, including
9817 the source medium itself, will be automatically deleted and the
9818 relevant medium objects (including this medium) will become
9819 uninitialized. This means that any attempt to call any of
9820 their methods or attributes will fail with the
9821 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9822 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9823 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> media.
9824 Note that <tt>Diff_2</tt> in this case will become a base medium
9825 itself since it will no longer be based on any other medium.
9826
9827 Considering the above, all of the following conditions must be met in
9828 order for the merge operation to succeed:
9829 <ul>
9830 <li>
9831 Neither this (source) medium nor any intermediate
9832 differencing medium in the chain between it and the target
9833 medium is attached to any virtual machine.
9834 </li>
9835 <li>
9836 Neither the source medium nor the target medium is an
9837 <link to="MediumType_Immutable"/> medium.
9838 </li>
9839 <li>
9840 The part of the medium tree from the source medium to the
9841 target medium is a linear chain, i.e. all medium in this
9842 chain have exactly one child which is the next medium in this
9843 chain. The only exception from this rule is the target medium in
9844 the forward merge operation; it is allowed to have any number of
9845 child media because the merge operation will not change its
9846 logical contents (as it is seen by the guest OS or by children).
9847 </li>
9848 <li>
9849 None of the involved media are in
9850 <link to="MediumState_LockedRead"/> or
9851 <link to="MediumState_LockedWrite"/> state.
9852 </li>
9853 </ul>
9854
9855 <note>
9856 This (source) medium and all intermediates will be placed to <link
9857 to="MediumState_Deleting"/> state and the target medium will be
9858 placed to <link to="MediumState_LockedWrite"/> state and for the
9859 duration of this operation.
9860 </note>
9861 </desc>
9862 <param name="target" type="IMedium" dir="in">
9863 <desc>Target medium.</desc>
9864 </param>
9865 <param name="progress" type="IProgress" dir="return">
9866 <desc>Progress object to track the operation completion.</desc>
9867 </param>
9868 </method>
9869
9870 <!-- clone method -->
9871
9872 <method name="cloneTo">
9873 <desc>
9874 Starts creating a clone of this medium in the format and at the
9875 location defined by the @a target argument.
9876
9877 The target medium must be either in <link to="MediumState_NotCreated"/>
9878 state (i.e. must not have an existing storage unit) or in
9879 <link to="MediumState_Created"/> state (i.e. created and not locked, and
9880 big enough to hold the data or else the copy will be partial). Upon
9881 successful completion, the cloned medium will contain exactly the
9882 same sector data as the medium being cloned, except that in the
9883 first case a new UUID for the clone will be randomly generated, and in
9884 the second case the UUID will remain unchanged.
9885
9886 The @a parent argument defines which medium will be the parent
9887 of the clone. Passing a @c null reference indicates that the clone will
9888 be a base image, i.e. completely independent. It is possible to specify
9889 an arbitrary medium for this parameter, including the parent of the
9890 medium which is being cloned. Even cloning to a child of the source
9891 medium is possible. Note that when cloning to an existing image, the
9892 @a parent irgument is ignored.
9893
9894 After the returned progress object reports that the operation is
9895 successfully complete, the target medium gets remembered by this
9896 VirtualBox installation and may be attached to virtual machines.
9897
9898 <note>
9899 This medium will be placed to <link to="MediumState_LockedRead"/>
9900 state for the duration of this operation.
9901 </note>
9902 <result name="E_NOTIMPL">
9903 The specified cloning variant is not supported at the moment.
9904 </result>
9905 </desc>
9906 <param name="target" type="IMedium" dir="in">
9907 <desc>Target medium.</desc>
9908 </param>
9909 <param name="variant" type="MediumVariant" dir="in">
9910 <desc>Exact image variant which should be created.</desc>
9911 </param>
9912 <param name="parent" type="IMedium" dir="in">
9913 <desc>Parent of the cloned medium.</desc>
9914 </param>
9915 <param name="progress" type="IProgress" dir="return">
9916 <desc>Progress object to track the operation completion.</desc>
9917 </param>
9918 </method>
9919
9920 <!-- other methods -->
9921
9922 <method name="compact">
9923 <desc>
9924 Starts compacting of this medium. This means that the medium is
9925 transformed into a possibly more compact storage representation.
9926 This potentially creates temporary images, which can require a
9927 substantial amount of additional disk space.
9928
9929 This medium will be placed to <link to="MediumState_LockedWrite"/>
9930 state and all its parent media (if any) will be placed to
9931 <link to="MediumState_LockedRead"/> state for the duration of this
9932 operation.
9933
9934 Please note that the results can be either returned straight away,
9935 or later as the result of the background operation via the object
9936 returned via the @a progress parameter.
9937
9938 <result name="VBOX_E_NOT_SUPPORTED">
9939 Medium format does not support compacting (but potentially
9940 needs it).
9941 </result>
9942 </desc>
9943 <param name="progress" type="IProgress" dir="return">
9944 <desc>Progress object to track the operation completion.</desc>
9945 </param>
9946 </method>
9947
9948 <method name="resize">
9949 <desc>
9950 Starts resizing this medium. This means that the nominal size of the
9951 medium is set to the new value. Both increasing and decreasing the
9952 size is possible, and there are no safety checks, since VirtualBox
9953 does not make any assumptions about the medium contents.
9954
9955 Resizing usually needs additional disk space, and possibly also
9956 some temporary disk space. Note that resize does not create a full
9957 temporary copy of the medium, so the additional disk space requirement
9958 is usually much lower than using the clone operation.
9959
9960 This medium will be placed to <link to="MediumState_LockedWrite"/>
9961 state for the duration of this operation.
9962
9963 Please note that the results can be either returned straight away,
9964 or later as the result of the background operation via the object
9965 returned via the @a progress parameter.
9966
9967 <result name="VBOX_E_NOT_SUPPORTED">
9968 Medium format does not support resizing.
9969 </result>
9970 </desc>
9971 <param name="logicalSize" type="long long" dir="in">
9972 <desc>New nominal capacity of the medium in bytes.</desc>
9973 </param>
9974 <param name="progress" type="IProgress" dir="return">
9975 <desc>Progress object to track the operation completion.</desc>
9976 </param>
9977 </method>
9978
9979 <method name="reset">
9980 <desc>
9981 Starts erasing the contents of this differencing medium.
9982
9983 This operation will reset the differencing medium to its initial
9984 state when it does not contain any sector data and any read operation is
9985 redirected to its parent medium. This automatically gets called
9986 during VM power-up for every medium whose <link to="#autoReset" />
9987 attribute is @c true.
9988
9989 The medium will be write-locked for the duration of this operation (see
9990 <link to="#lockWrite" />).
9991
9992 <result name="VBOX_E_NOT_SUPPORTED">
9993 This is not a differencing medium.
9994 </result>
9995 <result name="VBOX_E_INVALID_OBJECT_STATE">
9996 Medium is not in <link to="MediumState_Created"/> or
9997 <link to="MediumState_Inaccessible"/> state.
9998 </result>
9999 </desc>
10000 <param name="progress" type="IProgress" dir="return">
10001 <desc>Progress object to track the operation completion.</desc>
10002 </param>
10003 </method>
10004
10005 </interface>
10006
10007
10008 <!--
10009 // IMediumFormat
10010 /////////////////////////////////////////////////////////////////////////
10011 -->
10012
10013 <enum
10014 name="DataType"
10015 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
10016 >
10017 <const name="Int32" value="0"/>
10018 <const name="Int8" value="1"/>
10019 <const name="String" value="2"/>
10020 </enum>
10021
10022 <enum
10023 name="DataFlags"
10024 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
10025 >
10026 <const name="None" value="0x00"/>
10027 <const name="Mandatory" value="0x01"/>
10028 <const name="Expert" value="0x02"/>
10029 <const name="Array" value="0x04"/>
10030 <const name="FlagMask" value="0x07"/>
10031 </enum>
10032
10033 <enum
10034 name="MediumFormatCapabilities"
10035 uuid="7342ba79-7ce0-4d94-8f86-5ed5a185d9bd"
10036 >
10037 <desc>
10038 Medium format capability flags.
10039 </desc>
10040
10041 <const name="Uuid" value="0x01">
10042 <desc>
10043 Supports UUIDs as expected by VirtualBox code.
10044 </desc>
10045 </const>
10046
10047 <const name="CreateFixed" value="0x02">
10048 <desc>
10049 Supports creating fixed size images, allocating all space instantly.
10050 </desc>
10051 </const>
10052
10053 <const name="CreateDynamic" value="0x04">
10054 <desc>
10055 Supports creating dynamically growing images, allocating space on
10056 demand.
10057 </desc>
10058 </const>
10059
10060 <const name="CreateSplit2G" value="0x08">
10061 <desc>
10062 Supports creating images split in chunks of a bit less than 2 GBytes.
10063 </desc>
10064 </const>
10065
10066 <const name="Differencing" value="0x10">
10067 <desc>
10068 Supports being used as a format for differencing media (see <link
10069 to="IMedium::createDiffStorage"/>).
10070 </desc>
10071 </const>
10072
10073 <const name="Asynchronous" value="0x20">
10074 <desc>
10075 Supports asynchronous I/O operations for at least some configurations.
10076 </desc>
10077 </const>
10078
10079 <const name="File" value="0x40">
10080 <desc>
10081 The format backend operates on files (the <link to="IMedium::location"/>
10082 attribute of the medium specifies a file used to store medium
10083 data; for a list of supported file extensions see
10084 <link to="IMediumFormat::fileExtensions"/>).
10085 </desc>
10086 </const>
10087
10088 <const name="Properties" value="0x80">
10089 <desc>
10090 The format backend uses the property interface to configure the storage
10091 location and properties (the <link to="IMediumFormat::describeProperties"/>
10092 method is used to get access to properties supported by the given medium format).
10093 </desc>
10094 </const>
10095
10096 <const name="TcpNetworking" value="0x100">
10097 <desc>
10098 The format backend uses the TCP networking interface for network access.
10099 </desc>
10100 </const>
10101
10102 <const name="VFS" value="0x200">
10103 <desc>
10104 The format backend supports virtual filesystem functionality.
10105 </desc>
10106 </const>
10107
10108 <const name="CapabilityMask" value="0x3FF"/>
10109 </enum>
10110
10111 <interface
10112 name="IMediumFormat" extends="$unknown"
10113 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
10114 wsmap="managed"
10115 >
10116 <desc>
10117 The IMediumFormat interface represents a medium format.
10118
10119 Each medium format has an associated backend which is used to handle
10120 media stored in this format. This interface provides information
10121 about the properties of the associated backend.
10122
10123 Each medium format is identified by a string represented by the
10124 <link to="#id"/> attribute. This string is used in calls like
10125 <link to="IVirtualBox::createHardDisk"/> to specify the desired
10126 format.
10127
10128 The list of all supported medium formats can be obtained using
10129 <link to="ISystemProperties::mediumFormats"/>.
10130
10131 <see>IMedium</see>
10132 </desc>
10133
10134 <attribute name="id" type="wstring" readonly="yes">
10135 <desc>
10136 Identifier of this format.
10137
10138 The format identifier is a non-@c null non-empty ASCII string. Note that
10139 this string is case-insensitive. This means that, for example, all of
10140 the following strings:
10141 <pre>
10142 "VDI"
10143 "vdi"
10144 "VdI"</pre>
10145 refer to the same medium format.
10146
10147 This string is used in methods of other interfaces where it is necessary
10148 to specify a medium format, such as
10149 <link to="IVirtualBox::createHardDisk"/>.
10150 </desc>
10151 </attribute>
10152
10153 <attribute name="name" type="wstring" readonly="yes">
10154 <desc>
10155 Human readable description of this format.
10156
10157 Mainly for use in file open dialogs.
10158 </desc>
10159 </attribute>
10160
10161 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
10162 <desc>
10163 Array of strings containing the supported file extensions.
10164
10165 The first extension in the array is the extension preferred by the
10166 backend. It is recommended to use this extension when specifying a
10167 location of the storage unit for a new medium.
10168
10169 Note that some backends do not work on files, so this array may be
10170 empty.
10171
10172 <see>IMediumFormat::capabilities</see>
10173 </desc>
10174 </attribute>
10175
10176 <attribute name="capabilities" type="unsigned long" readonly="yes">
10177 <desc>
10178 Capabilities of the format as a set of bit flags.
10179
10180 For the meaning of individual capability flags see
10181 <link to="MediumFormatCapabilities"/>.
10182 </desc>
10183 </attribute>
10184
10185 <method name="describeProperties">
10186 <desc>
10187 Returns several arrays describing the properties supported by this
10188 format.
10189
10190 An element with the given index in each array describes one
10191 property. Thus, the number of elements in each returned array is the
10192 same and corresponds to the number of supported properties.
10193
10194 The returned arrays are filled in only if the
10195 <link to="MediumFormatCapabilities_Properties"/> flag is set.
10196 All arguments must be non-@c null.
10197
10198 <see>DataType</see>
10199 <see>DataFlags</see>
10200 </desc>
10201
10202 <param name="names" type="wstring" safearray="yes" dir="out">
10203 <desc>Array of property names.</desc>
10204 </param>
10205 <param name="description" type="wstring" safearray="yes" dir="out">
10206 <desc>Array of property descriptions.</desc>
10207 </param>
10208 <param name="types" type="DataType" safearray="yes" dir="out">
10209 <desc>Array of property types.</desc>
10210 </param>
10211 <param name="flags" type="unsigned long" safearray="yes" dir="out">
10212 <desc>Array of property flags.</desc>
10213 </param>
10214 <param name="defaults" type="wstring" safearray="yes" dir="out">
10215 <desc>Array of default property values.</desc>
10216 </param>
10217 </method>
10218
10219 </interface>
10220
10221
10222 <!--
10223 // IKeyboard
10224 /////////////////////////////////////////////////////////////////////////
10225 -->
10226
10227 <interface
10228 name="IKeyboard" extends="$unknown"
10229 uuid="f6916ec5-a881-4237-898f-7de58cf88672"
10230 wsmap="managed"
10231 >
10232 <desc>
10233 The IKeyboard interface represents the virtual machine's keyboard. Used
10234 in <link to="IConsole::keyboard"/>.
10235
10236 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10237 to the virtual machine.
10238
10239 </desc>
10240 <method name="putScancode">
10241 <desc>Sends a scancode to the keyboard.
10242
10243 <result name="VBOX_E_IPRT_ERROR">
10244 Could not send scan code to virtual keyboard.
10245 </result>
10246
10247 </desc>
10248 <param name="scancode" type="long" dir="in"/>
10249 </method>
10250
10251 <method name="putScancodes">
10252 <desc>Sends an array of scancodes to the keyboard.
10253
10254 <result name="VBOX_E_IPRT_ERROR">
10255 Could not send all scan codes to virtual keyboard.
10256 </result>
10257
10258 </desc>
10259 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10260 <param name="codesStored" type="unsigned long" dir="return"/>
10261 </method>
10262
10263 <method name="putCAD">
10264 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10265 function is nothing special, it is just a convenience function
10266 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10267
10268 <result name="VBOX_E_IPRT_ERROR">
10269 Could not send all scan codes to virtual keyboard.
10270 </result>
10271
10272 </desc>
10273 </method>
10274
10275 <attribute name="eventSource" type="IEventSource" readonly="yes">
10276 <desc>
10277 Event source for keyboard events.
10278 </desc>
10279 </attribute>
10280
10281 </interface>
10282
10283
10284 <!--
10285 // IMouse
10286 /////////////////////////////////////////////////////////////////////////
10287 -->
10288
10289 <enum
10290 name="MouseButtonState"
10291 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10292 >
10293 <desc>
10294 Mouse button state.
10295 </desc>
10296
10297 <const name="LeftButton" value="0x01"/>
10298 <const name="RightButton" value="0x02"/>
10299 <const name="MiddleButton" value="0x04"/>
10300 <const name="WheelUp" value="0x08"/>
10301 <const name="WheelDown" value="0x10"/>
10302 <const name="XButton1" value="0x20"/>
10303 <const name="XButton2" value="0x40"/>
10304 <const name="MouseStateMask" value="0x7F"/>
10305 </enum>
10306
10307 <interface
10308 name="IMouse" extends="$unknown"
10309 uuid="05044a52-7811-4f00-ae3a-0ab7ff707b10"
10310 wsmap="managed"
10311 >
10312 <desc>
10313 The IMouse interface represents the virtual machine's mouse. Used in
10314 <link to="IConsole::mouse"/>.
10315
10316 Through this interface, the virtual machine's virtual mouse can be
10317 controlled.
10318 </desc>
10319
10320 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10321 <desc>
10322 Whether the guest OS supports absolute mouse pointer positioning
10323 or not.
10324 <note>
10325 You can use the <link to="IMouseCapabilityChangedEvent"/>
10326 event to be instantly informed about changes of this attribute
10327 during virtual machine execution.
10328 </note>
10329 <see><link to="#putMouseEventAbsolute"/></see>
10330 </desc>
10331 </attribute>
10332
10333 <attribute name="relativeSupported" type="boolean" readonly="yes">
10334 <desc>
10335 Whether the guest OS supports relative mouse pointer positioning
10336 or not.
10337 <note>
10338 You can use the <link to="IMouseCapabilityChangedEvent"/>
10339 event to be instantly informed about changes of this attribute
10340 during virtual machine execution.
10341 </note>
10342 <see><link to="#putMouseEvent"/></see>
10343 </desc>
10344 </attribute>
10345
10346 <attribute name="needsHostCursor" type="boolean" readonly="yes">
10347 <desc>
10348 Whether the guest OS can currently switch to drawing it's own mouse
10349 cursor on demand.
10350 <note>
10351 You can use the <link to="IMouseCapabilityChangedEvent"/>
10352 event to be instantly informed about changes of this attribute
10353 during virtual machine execution.
10354 </note>
10355 <see><link to="#putMouseEvent"/></see>
10356 </desc>
10357 </attribute>
10358
10359 <method name="putMouseEvent">
10360 <desc>
10361 Initiates a mouse event using relative pointer movements
10362 along x and y axis.
10363
10364 <result name="E_ACCESSDENIED">
10365 Console not powered up.
10366 </result>
10367 <result name="VBOX_E_IPRT_ERROR">
10368 Could not send mouse event to virtual mouse.
10369 </result>
10370
10371 </desc>
10372
10373 <param name="dx" type="long" dir="in">
10374 <desc>
10375 Amount of pixels the mouse should move to the right.
10376 Negative values move the mouse to the left.
10377 </desc>
10378 </param>
10379 <param name="dy" type="long" dir="in">
10380 <desc>
10381 Amount of pixels the mouse should move downwards.
10382 Negative values move the mouse upwards.
10383 </desc>
10384 </param>
10385 <param name="dz" type="long" dir="in">
10386 <desc>
10387 Amount of mouse wheel moves.
10388 Positive values describe clockwise wheel rotations,
10389 negative values describe counterclockwise rotations.
10390 </desc>
10391 </param>
10392 <param name="dw" type="long" dir="in">
10393 <desc>
10394 Amount of horizontal mouse wheel moves.
10395 Positive values describe a movement to the left,
10396 negative values describe a movement to the right.
10397 </desc>
10398 </param>
10399 <param name="buttonState" type="long" dir="in">
10400 <desc>
10401 The current state of mouse buttons. Every bit represents
10402 a mouse button as follows:
10403 <table>
10404 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10405 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10406 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10407 </table>
10408 A value of <tt>1</tt> means the corresponding button is pressed.
10409 otherwise it is released.
10410 </desc>
10411 </param>
10412 </method>
10413
10414 <method name="putMouseEventAbsolute">
10415 <desc>
10416 Positions the mouse pointer using absolute x and y coordinates.
10417 These coordinates are expressed in pixels and
10418 start from <tt>[1,1]</tt> which corresponds to the top left
10419 corner of the virtual display.
10420
10421 <result name="E_ACCESSDENIED">
10422 Console not powered up.
10423 </result>
10424 <result name="VBOX_E_IPRT_ERROR">
10425 Could not send mouse event to virtual mouse.
10426 </result>
10427
10428 <note>
10429 This method will have effect only if absolute mouse
10430 positioning is supported by the guest OS.
10431 </note>
10432
10433 <see><link to="#absoluteSupported"/></see>
10434 </desc>
10435
10436 <param name="x" type="long" dir="in">
10437 <desc>
10438 X coordinate of the pointer in pixels, starting from @c 1.
10439 </desc>
10440 </param>
10441 <param name="y" type="long" dir="in">
10442 <desc>
10443 Y coordinate of the pointer in pixels, starting from @c 1.
10444 </desc>
10445 </param>
10446 <param name="dz" type="long" dir="in">
10447 <desc>
10448 Amount of mouse wheel moves.
10449 Positive values describe clockwise wheel rotations,
10450 negative values describe counterclockwise rotations.
10451 </desc>
10452 </param>
10453 <param name="dw" type="long" dir="in">
10454 <desc>
10455 Amount of horizontal mouse wheel moves.
10456 Positive values describe a movement to the left,
10457 negative values describe a movement to the right.
10458 </desc>
10459 </param>
10460 <param name="buttonState" type="long" dir="in">
10461 <desc>
10462 The current state of mouse buttons. Every bit represents
10463 a mouse button as follows:
10464 <table>
10465 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10466 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10467 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10468 </table>
10469 A value of @c 1 means the corresponding button is pressed.
10470 otherwise it is released.
10471 </desc>
10472 </param>
10473 </method>
10474
10475 <attribute name="eventSource" type="IEventSource" readonly="yes">
10476 <desc>
10477 Event source for mouse events.
10478 </desc>
10479 </attribute>
10480
10481 </interface>
10482
10483 <!--
10484 // IDisplay
10485 /////////////////////////////////////////////////////////////////////////
10486 -->
10487
10488 <enum
10489 name="FramebufferPixelFormat"
10490 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10491 >
10492 <desc>
10493 Format of the video memory buffer. Constants represented by this enum can
10494 be used to test for particular values of <link
10495 to="IFramebuffer::pixelFormat"/>. See also <link
10496 to="IFramebuffer::requestResize"/>.
10497
10498 See also www.fourcc.org for more information about FOURCC pixel formats.
10499 </desc>
10500
10501 <const name="Opaque" value="0">
10502 <desc>
10503 Unknown buffer format (the user may not assume any particular format of
10504 the buffer).
10505 </desc>
10506 </const>
10507 <const name="FOURCC_RGB" value="0x32424752">
10508 <desc>
10509 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10510 bit layout).
10511 </desc>
10512 </const>
10513 </enum>
10514
10515 <interface
10516 name="IFramebuffer" extends="$unknown"
10517 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10518 wsmap="suppress"
10519 >
10520 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10521 <desc>Address of the start byte of the frame buffer.</desc>
10522 </attribute>
10523
10524 <attribute name="width" type="unsigned long" readonly="yes">
10525 <desc>Frame buffer width, in pixels.</desc>
10526 </attribute>
10527
10528 <attribute name="height" type="unsigned long" readonly="yes">
10529 <desc>Frame buffer height, in pixels.</desc>
10530 </attribute>
10531
10532 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10533 <desc>
10534 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10535 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10536 are: 8, 15, 16, 24 and 32.
10537 </desc>
10538 </attribute>
10539
10540 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10541 <desc>
10542 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10543 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10544 size of the scan line must be aligned to 32 bits.
10545 </desc>
10546 </attribute>
10547
10548 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10549 <desc>
10550 Frame buffer pixel format. It's either one of the values defined by <link
10551 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10552 <note>
10553 This attribute must never return <link
10554 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10555 <link to="#address"/> points to must be always known.
10556 </note>
10557 </desc>
10558 </attribute>
10559
10560 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10561 <desc>
10562 Defines whether this frame buffer uses the virtual video card's memory
10563 buffer (guest VRAM) directly or not. See <link
10564 to="IFramebuffer::requestResize"/> for more information.
10565 </desc>
10566 </attribute>
10567
10568 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10569 <desc>
10570 Hint from the frame buffer about how much of the standard
10571 screen height it wants to use for itself. This information is
10572 exposed to the guest through the VESA BIOS and VMMDev interface
10573 so that it can use it for determining its video mode table. It
10574 is not guaranteed that the guest respects the value.
10575 </desc>
10576 </attribute>
10577
10578 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10579 <desc>
10580 An alpha-blended overlay which is superposed over the frame buffer.
10581 The initial purpose is to allow the display of icons providing
10582 information about the VM state, including disk activity, in front
10583 ends which do not have other means of doing that. The overlay is
10584 designed to controlled exclusively by IDisplay. It has no locking
10585 of its own, and any changes made to it are not guaranteed to be
10586 visible until the affected portion of IFramebuffer is updated. The
10587 overlay can be created lazily the first time it is requested. This
10588 attribute can also return @c null to signal that the overlay is not
10589 implemented.
10590 </desc>
10591 </attribute>
10592
10593 <attribute name="winId" type="long long" readonly="yes">
10594 <desc>
10595 Platform-dependent identifier of the window where context of this
10596 frame buffer is drawn, or zero if there's no such window.
10597 </desc>
10598 </attribute>
10599
10600 <method name="lock">
10601 <desc>
10602 Locks the frame buffer.
10603 Gets called by the IDisplay object where this frame buffer is
10604 bound to.
10605 </desc>
10606 </method>
10607
10608 <method name="unlock">
10609 <desc>
10610 Unlocks the frame buffer.
10611 Gets called by the IDisplay object where this frame buffer is
10612 bound to.
10613 </desc>
10614 </method>
10615
10616 <method name="notifyUpdate">
10617 <desc>
10618 Informs about an update.
10619 Gets called by the display object where this buffer is
10620 registered.
10621 </desc>
10622 <param name="x" type="unsigned long" dir="in"/>
10623 <param name="y" type="unsigned long" dir="in"/>
10624 <param name="width" type="unsigned long" dir="in"/>
10625 <param name="height" type="unsigned long" dir="in"/>
10626 </method>
10627
10628 <method name="requestResize">
10629 <desc>
10630 Requests a size and pixel format change.
10631
10632 There are two modes of working with the video buffer of the virtual
10633 machine. The <i>indirect</i> mode implies that the IFramebuffer
10634 implementation allocates a memory buffer for the requested display mode
10635 and provides it to the virtual machine. In <i>direct</i> mode, the
10636 IFramebuffer implementation uses the memory buffer allocated and owned
10637 by the virtual machine. This buffer represents the video memory of the
10638 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10639 usually faster because the implementation gets a raw pointer to the
10640 guest VRAM buffer which it can directly use for visualizing the contents
10641 of the virtual display, as opposed to the indirect mode where the
10642 contents of guest VRAM are copied to the memory buffer provided by
10643 the implementation every time a display update occurs.
10644
10645 It is important to note that the direct mode is really fast only when
10646 the implementation uses the given guest VRAM buffer directly, for
10647 example, by blitting it to the window representing the virtual machine's
10648 display, which saves at least one copy operation comparing to the
10649 indirect mode. However, using the guest VRAM buffer directly is not
10650 always possible: the format and the color depth of this buffer may be
10651 not supported by the target window, or it may be unknown (opaque) as in
10652 case of text or non-linear multi-plane VGA video modes. In this case,
10653 the indirect mode (that is always available) should be used as a
10654 fallback: when the guest VRAM contents are copied to the
10655 implementation-provided memory buffer, color and format conversion is
10656 done automatically by the underlying code.
10657
10658 The @a pixelFormat parameter defines whether the direct mode is
10659 available or not. If @a pixelFormat is <link
10660 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10661 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10662 @a bytesPerLine parameters must be ignored and the implementation must use
10663 the indirect mode (where it provides its own buffer in one of the
10664 supported formats). In all other cases, @a pixelFormat together with
10665 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10666 buffer pointed to by the @a VRAM parameter and the implementation is
10667 free to choose which mode to use. To indicate that this frame buffer uses
10668 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10669 attribute must return @c true and <link to="#address"/> must
10670 return exactly the same address that is passed in the @a VRAM parameter
10671 of this method; otherwise it is assumed that the indirect strategy is
10672 chosen.
10673
10674 The @a width and @a height parameters represent the size of the
10675 requested display mode in both modes. In case of indirect mode, the
10676 provided memory buffer should be big enough to store data of the given
10677 display mode. In case of direct mode, it is guaranteed that the given
10678 @a VRAM buffer contains enough space to represent the display mode of the
10679 given size. Note that this frame buffer's <link to="#width"/> and <link
10680 to="#height"/> attributes must return exactly the same values as
10681 passed to this method after the resize is completed (see below).
10682
10683 The @a finished output parameter determines if the implementation has
10684 finished resizing the frame buffer or not. If, for some reason, the
10685 resize cannot be finished immediately during this call, @a finished
10686 must be set to @c false, and the implementation must call
10687 <link to="IDisplay::resizeCompleted"/> after it has returned from
10688 this method as soon as possible. If @a finished is @c false, the
10689 machine will not call any frame buffer methods until
10690 <link to="IDisplay::resizeCompleted"/> is called.
10691
10692 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10693 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10694 this frame buffer must return exactly the same values as specified in the
10695 parameters of this method, after the resize is completed. If the
10696 indirect mode is chosen, these attributes must return values describing
10697 the format of the implementation's own memory buffer <link
10698 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10699 value must always correlate with <link to="#pixelFormat"/>. Note that
10700 the <link to="#pixelFormat"/> attribute must never return <link
10701 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10702
10703 <note>
10704 This method is called by the IDisplay object under the
10705 <link to="#lock"/> provided by this IFramebuffer
10706 implementation. If this method returns @c false in @a finished, then
10707 this lock is not released until
10708 <link to="IDisplay::resizeCompleted"/> is called.
10709 </note>
10710 </desc>
10711 <param name="screenId" type="unsigned long" dir="in">
10712 <desc>
10713 Logical screen number. Must be used in the corresponding call to
10714 <link to="IDisplay::resizeCompleted"/> if this call is made.
10715 </desc>
10716 </param>
10717 <param name="pixelFormat" type="unsigned long" dir="in">
10718 <desc>
10719 Pixel format of the memory buffer pointed to by @a VRAM.
10720 See also <link to="FramebufferPixelFormat"/>.
10721 </desc>
10722 </param>
10723 <param name="VRAM" type="octet" mod="ptr" dir="in">
10724 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10725 </param>
10726 <param name="bitsPerPixel" type="unsigned long" dir="in">
10727 <desc>Color depth, bits per pixel.</desc>
10728 </param>
10729 <param name="bytesPerLine" type="unsigned long" dir="in">
10730 <desc>Size of one scan line, in bytes.</desc>
10731 </param>
10732 <param name="width" type="unsigned long" dir="in">
10733 <desc>Width of the guest display, in pixels.</desc>
10734 </param>
10735 <param name="height" type="unsigned long" dir="in">
10736 <desc>Height of the guest display, in pixels.</desc>
10737 </param>
10738 <param name="finished" type="boolean" dir="return">
10739 <desc>
10740 Can the VM start using the new frame buffer immediately
10741 after this method returns or it should wait for
10742 <link to="IDisplay::resizeCompleted"/>.
10743 </desc>
10744 </param>
10745 </method>
10746
10747 <method name="videoModeSupported">
10748 <desc>
10749 Returns whether the frame buffer implementation is willing to
10750 support a given video mode. In case it is not able to render
10751 the video mode (or for some reason not willing), it should
10752 return @c false. Usually this method is called when the guest
10753 asks the VMM device whether a given video mode is supported
10754 so the information returned is directly exposed to the guest.
10755 It is important that this method returns very quickly.
10756 </desc>
10757 <param name="width" type="unsigned long" dir="in"/>
10758 <param name="height" type="unsigned long" dir="in"/>
10759 <param name="bpp" type="unsigned long" dir="in"/>
10760 <param name="supported" type="boolean" dir="return"/>
10761 </method>
10762
10763 <method name="getVisibleRegion">
10764 <desc>
10765 Returns the visible region of this frame buffer.
10766
10767 If the @a rectangles parameter is @c null then the value of the
10768 @a count parameter is ignored and the number of elements necessary to
10769 describe the current visible region is returned in @a countCopied.
10770
10771 If @a rectangles is not @c null but @a count is less
10772 than the required number of elements to store region data, the method
10773 will report a failure. If @a count is equal or greater than the
10774 required number of elements, then the actual number of elements copied
10775 to the provided array will be returned in @a countCopied.
10776
10777 <note>
10778 The address of the provided array must be in the process space of
10779 this IFramebuffer object.
10780 </note>
10781 <note>
10782 Method not yet implemented.
10783 </note>
10784 </desc>
10785 <param name="rectangles" type="octet" mod="ptr" dir="in">
10786 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10787 </param>
10788 <param name="count" type="unsigned long" dir="in">
10789 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10790 </param>
10791 <param name="countCopied" type="unsigned long" dir="return">
10792 <desc>Number of elements copied to the @a rectangles array.</desc>
10793 </param>
10794 </method>
10795
10796 <method name="setVisibleRegion">
10797 <desc>
10798 Suggests a new visible region to this frame buffer. This region
10799 represents the area of the VM display which is a union of regions of
10800 all top-level windows of the guest operating system running inside the
10801 VM (if the Guest Additions for this system support this
10802 functionality). This information may be used by the frontends to
10803 implement the seamless desktop integration feature.
10804
10805 <note>
10806 The address of the provided array must be in the process space of
10807 this IFramebuffer object.
10808 </note>
10809 <note>
10810 The IFramebuffer implementation must make a copy of the provided
10811 array of rectangles.
10812 </note>
10813 <note>
10814 Method not yet implemented.
10815 </note>
10816 </desc>
10817 <param name="rectangles" type="octet" mod="ptr" dir="in">
10818 <desc>Pointer to the @c RTRECT array.</desc>
10819 </param>
10820 <param name="count" type="unsigned long" dir="in">
10821 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10822 </param>
10823 </method>
10824
10825 <method name="processVHWACommand">
10826 <desc>
10827 Posts a Video HW Acceleration Command to the frame buffer for processing.
10828 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10829 are posted from quest to the host to be processed by the host hardware.
10830
10831 <note>
10832 The address of the provided command must be in the process space of
10833 this IFramebuffer object.
10834 </note>
10835 </desc>
10836
10837 <param name="command" type="octet" mod="ptr" dir="in">
10838 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10839 </param>
10840 </method>
10841
10842 </interface>
10843
10844 <interface
10845 name="IFramebufferOverlay" extends="IFramebuffer"
10846 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10847 wsmap="suppress"
10848 >
10849 <desc>
10850 The IFramebufferOverlay interface represents an alpha blended overlay
10851 for displaying status icons above an IFramebuffer. It is always created
10852 not visible, so that it must be explicitly shown. It only covers a
10853 portion of the IFramebuffer, determined by its width, height and
10854 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10855 that order) format, and may be written to directly. Do re-read the
10856 width though, after setting it, as it may be adjusted (increased) to
10857 make it more suitable for the front end.
10858 </desc>
10859 <attribute name="x" type="unsigned long" readonly="yes">
10860 <desc>X position of the overlay, relative to the frame buffer.</desc>
10861 </attribute>
10862
10863 <attribute name="y" type="unsigned long" readonly="yes">
10864 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10865 </attribute>
10866
10867 <attribute name="visible" type="boolean" readonly="no">
10868 <desc>
10869 Whether the overlay is currently visible.
10870 </desc>
10871 </attribute>
10872
10873 <attribute name="alpha" type="unsigned long" readonly="no">
10874 <desc>
10875 The global alpha value for the overlay. This may or may not be
10876 supported by a given front end.
10877 </desc>
10878 </attribute>
10879
10880 <method name="move">
10881 <desc>
10882 Changes the overlay's position relative to the IFramebuffer.
10883 </desc>
10884 <param name="x" type="unsigned long" dir="in"/>
10885 <param name="y" type="unsigned long" dir="in"/>
10886 </method>
10887
10888 </interface>
10889
10890 <interface
10891 name="IDisplay" extends="$unknown"
10892 uuid="09EED313-CD56-4D06-BD56-FAC0F716B5DD"
10893 wsmap="managed"
10894 >
10895 <desc>
10896 The IDisplay interface represents the virtual machine's display.
10897
10898 The object implementing this interface is contained in each
10899 <link to="IConsole::display"/> attribute and represents the visual
10900 output of the virtual machine.
10901
10902 The virtual display supports pluggable output targets represented by the
10903 IFramebuffer interface. Examples of the output target are a window on
10904 the host computer or an RDP session's display on a remote computer.
10905 </desc>
10906 <method name="getScreenResolution">
10907 <desc>Queries display width, height and color depth for given screen.</desc>
10908 <param name="screenId" type="unsigned long" dir="in"/>
10909 <param name="width" type="unsigned long" dir="out"/>
10910 <param name="height" type="unsigned long" dir="out"/>
10911 <param name="bitsPerPixel" type="unsigned long" dir="out"/>
10912 </method>
10913
10914 <method name="setFramebuffer">
10915 <desc>
10916 Sets the framebuffer for given screen.
10917 </desc>
10918 <param name="screenId" type="unsigned long" dir="in"/>
10919 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10920 </method>
10921
10922 <method name="getFramebuffer">
10923 <desc>
10924 Queries the framebuffer for given screen.
10925 </desc>
10926 <param name="screenId" type="unsigned long" dir="in"/>
10927 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10928 <param name="xOrigin" type="long" dir="out"/>
10929 <param name="yOrigin" type="long" dir="out"/>
10930 </method>
10931
10932 <method name="setVideoModeHint">
10933 <desc>
10934 Asks VirtualBox to request the given video mode from
10935 the guest. This is just a hint and it cannot be guaranteed
10936 that the requested resolution will be used. Guest Additions
10937 are required for the request to be seen by guests. The caller
10938 should issue the request and wait for a resolution change and
10939 after a timeout retry.
10940
10941 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10942 parameters means that the corresponding values should be taken from the
10943 current video mode (i.e. left unchanged).
10944
10945 If the guest OS supports multi-monitor configuration then the @a display
10946 parameter specifies the number of the guest display to send the hint to:
10947 @c 0 is the primary display, @c 1 is the first secondary and
10948 so on. If the multi-monitor configuration is not supported, @a display
10949 must be @c 0.
10950
10951 <result name="E_INVALIDARG">
10952 The @a display is not associated with any monitor.
10953 </result>
10954
10955 </desc>
10956 <param name="width" type="unsigned long" dir="in"/>
10957 <param name="height" type="unsigned long" dir="in"/>
10958 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10959 <param name="display" type="unsigned long" dir="in"/>
10960 </method>
10961
10962 <method name="setSeamlessMode">
10963 <desc>
10964 Enables or disables seamless guest display rendering (seamless desktop
10965 integration) mode.
10966 <note>
10967 Calling this method has no effect if <link
10968 to="IGuest::supportsSeamless"/> returns @c false.
10969 </note>
10970 </desc>
10971 <param name="enabled" type="boolean" dir="in"/>
10972 </method>
10973
10974 <method name="takeScreenShot">
10975 <desc>
10976 Takes a screen shot of the requested size and copies it to the
10977 32-bpp buffer allocated by the caller and pointed to by @a address.
10978 A pixel consists of 4 bytes in order: B, G, R, 0.
10979
10980 <note>This API can be used only by the COM/XPCOM C++ API as it
10981 requires pointer support. Use <link to="#takeScreenShotToArray" />
10982 with other language bindings.
10983 </note>
10984
10985 <result name="E_NOTIMPL">
10986 Feature not implemented.
10987 </result>
10988 <result name="VBOX_E_IPRT_ERROR">
10989 Could not take a screenshot.
10990 </result>
10991
10992 </desc>
10993 <param name="screenId" type="unsigned long" dir="in"/>
10994 <param name="address" type="octet" mod="ptr" dir="in"/>
10995 <param name="width" type="unsigned long" dir="in"/>
10996 <param name="height" type="unsigned long" dir="in"/>
10997 </method>
10998
10999 <method name="takeScreenShotToArray">
11000 <desc>
11001 Takes a guest screen shot of the requested size and returns it as
11002 an array of bytes in uncompressed 32-bit RGBA format.
11003 A pixel consists of 4 bytes in order: R, G, B, 0xFF.
11004
11005 This API is slow, but could be the only option to get guest screenshot
11006 for scriptable languages not allowed to manipulate with addresses
11007 directly.
11008
11009 <result name="E_NOTIMPL">
11010 Feature not implemented.
11011 </result>
11012 <result name="VBOX_E_IPRT_ERROR">
11013 Could not take a screenshot.
11014 </result>
11015 </desc>
11016 <param name="screenId" type="unsigned long" dir="in">
11017 <desc>
11018 Monitor to take screenshot from.
11019 </desc>
11020 </param>
11021 <param name="width" type="unsigned long" dir="in">
11022 <desc>
11023 Desired image width.
11024 </desc>
11025 </param>
11026 <param name="height" type="unsigned long" dir="in">
11027 <desc>
11028 Desired image height.
11029 </desc>
11030 </param>
11031 <param name="screenData" type="octet" dir="return" safearray="yes">
11032 <desc>
11033 Array with resulting screen data.
11034 </desc>
11035 </param>
11036 </method>
11037
11038 <method name="takeScreenShotPNGToArray">
11039 <desc>
11040 Takes a guest screen shot of the requested size and returns it as
11041 PNG image in array.
11042
11043 <result name="E_NOTIMPL">
11044 Feature not implemented.
11045 </result>
11046 <result name="VBOX_E_IPRT_ERROR">
11047 Could not take a screenshot.
11048 </result>
11049 </desc>
11050 <param name="screenId" type="unsigned long" dir="in">
11051 <desc>
11052 Monitor to take the screenshot from.
11053 </desc>
11054 </param>
11055 <param name="width" type="unsigned long" dir="in">
11056 <desc>
11057 Desired image width.
11058 </desc>
11059 </param>
11060 <param name="height" type="unsigned long" dir="in">
11061 <desc>
11062 Desired image height.
11063 </desc>
11064 </param>
11065 <param name="screenData" type="octet" dir="return" safearray="yes">
11066 <desc>
11067 Array with resulting screen data.
11068 </desc>
11069 </param>
11070 </method>
11071
11072 <method name="drawToScreen">
11073 <desc>
11074 Draws a 32-bpp image of the specified size from the given buffer
11075 to the given point on the VM display.
11076
11077 <result name="E_NOTIMPL">
11078 Feature not implemented.
11079 </result>
11080 <result name="VBOX_E_IPRT_ERROR">
11081 Could not draw to screen.
11082 </result>
11083
11084 </desc>
11085 <param name="screenId" type="unsigned long" dir="in">
11086 <desc>
11087 Monitor to take the screenshot from.
11088 </desc>
11089 </param>
11090 <param name="address" type="octet" mod="ptr" dir="in">
11091 <desc>
11092 Address to store the screenshot to
11093 </desc>
11094 </param>
11095 <param name="x" type="unsigned long" dir="in">
11096 <desc>
11097 Relative to the screen top left corner.
11098 </desc>
11099 </param>
11100 <param name="y" type="unsigned long" dir="in">
11101 <desc>
11102 Relative to the screen top left corner.
11103 </desc>
11104 </param>
11105 <param name="width" type="unsigned long" dir="in">
11106 <desc>
11107 Desired image width.
11108 </desc>
11109 </param>
11110 <param name="height" type="unsigned long" dir="in">
11111 <desc>
11112 Desired image height.
11113 </desc>
11114 </param>
11115 </method>
11116
11117 <method name="invalidateAndUpdate">
11118 <desc>
11119 Does a full invalidation of the VM display and instructs the VM
11120 to update it.
11121
11122 <result name="VBOX_E_IPRT_ERROR">
11123 Could not invalidate and update screen.
11124 </result>
11125
11126 </desc>
11127 </method>
11128
11129 <method name="resizeCompleted">
11130 <desc>
11131 Signals that a framebuffer has completed the resize operation.
11132
11133 <result name="VBOX_E_NOT_SUPPORTED">
11134 Operation only valid for external frame buffers.
11135 </result>
11136
11137 </desc>
11138 <param name="screenId" type="unsigned long" dir="in"/>
11139 </method>
11140
11141 <method name="completeVHWACommand">
11142 <desc>
11143 Signals that the Video HW Acceleration command has completed.
11144 </desc>
11145
11146 <param name="command" type="octet" mod="ptr" dir="in">
11147 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
11148 </param>
11149 </method>
11150
11151 </interface>
11152
11153 <!--
11154 // INetworkAdapter
11155 /////////////////////////////////////////////////////////////////////////
11156 -->
11157
11158 <enum
11159 name="NetworkAttachmentType"
11160 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
11161 >
11162 <desc>
11163 Network attachment type.
11164 </desc>
11165
11166 <const name="Null" value="0">
11167 <desc>Null value, also means "not attached".</desc>
11168 </const>
11169 <const name="NAT" value="1"/>
11170 <const name="Bridged" value="2"/>
11171 <const name="Internal" value="3"/>
11172 <const name="HostOnly" value="4"/>
11173 <const name="VDE" value="5"/>
11174 </enum>
11175
11176 <enum
11177 name="NetworkAdapterType"
11178 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
11179 >
11180 <desc>
11181 Network adapter type.
11182 </desc>
11183
11184 <const name="Null" value="0">
11185 <desc>Null value (never used by the API).</desc>
11186 </const>
11187 <const name="Am79C970A" value="1">
11188 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
11189 </const>
11190 <const name="Am79C973" value="2">
11191 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
11192 </const>
11193 <const name="I82540EM" value="3">
11194 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
11195 </const>
11196 <const name="I82543GC" value="4">
11197 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
11198 </const>
11199 <const name="I82545EM" value="5">
11200 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
11201 </const>
11202 <const name="Virtio" value="6">
11203 <desc>Virtio network device.</desc>
11204 </const>
11205 </enum>
11206
11207 <interface
11208 name="INetworkAdapter" extends="$unknown"
11209 uuid="9bf58a46-c3f7-4f31-80fa-dde9a5dc0b7b"
11210 wsmap="managed"
11211 >
11212 <desc>
11213 Represents a virtual network adapter that is attached to a virtual machine.
11214 Each virtual machine has a fixed number of network adapter slots with one
11215 instance of this attached to each of them. Call
11216 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
11217 is attached to a given slot in a given machine.
11218
11219 Each network adapter can be in one of five attachment modes, which are
11220 represented by the <link to="NetworkAttachmentType" /> enumeration;
11221 see the <link to="#attachmentType" /> attribute.
11222 </desc>
11223
11224 <attribute name="adapterType" type="NetworkAdapterType">
11225 <desc>
11226 Type of the virtual network adapter. Depending on this value,
11227 VirtualBox will provide a different virtual network hardware
11228 to the guest.
11229 </desc>
11230 </attribute>
11231
11232 <attribute name="slot" type="unsigned long" readonly="yes">
11233 <desc>
11234 Slot number this adapter is plugged into. Corresponds to
11235 the value you pass to <link to="IMachine::getNetworkAdapter"/>
11236 to obtain this instance.
11237 </desc>
11238 </attribute>
11239
11240 <attribute name="enabled" type="boolean">
11241 <desc>
11242 Flag whether the network adapter is present in the
11243 guest system. If disabled, the virtual guest hardware will
11244 not contain this network adapter. Can only be changed when
11245 the VM is not running.
11246 </desc>
11247 </attribute>
11248
11249 <attribute name="MACAddress" type="wstring">
11250 <desc>
11251 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
11252 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
11253 </desc>
11254 </attribute>
11255
11256 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
11257
11258 <attribute name="hostInterface" type="wstring">
11259 <desc>
11260 Name of the host network interface the VM is attached to.
11261 </desc>
11262 </attribute>
11263
11264 <attribute name="internalNetwork" type="wstring">
11265 <desc>
11266 Name of the internal network the VM is attached to.
11267 </desc>
11268 </attribute>
11269
11270 <attribute name="NATNetwork" type="wstring">
11271 <desc>
11272 Name of the NAT network the VM is attached to.
11273 </desc>
11274 </attribute>
11275
11276 <attribute name="VDENetwork" type="wstring">
11277 <desc>
11278 Name of the VDE switch the VM is attached to.
11279 </desc>
11280 </attribute>
11281
11282 <attribute name="cableConnected" type="boolean">
11283 <desc>
11284 Flag whether the adapter reports the cable as connected or not.
11285 It can be used to report offline situations to a VM.
11286 </desc>
11287 </attribute>
11288
11289 <attribute name="lineSpeed" type="unsigned long">
11290 <desc>
11291 Line speed reported by custom drivers, in units of 1 kbps.
11292 </desc>
11293 </attribute>
11294
11295 <attribute name="traceEnabled" type="boolean">
11296 <desc>
11297 Flag whether network traffic from/to the network card should be traced.
11298 Can only be toggled when the VM is turned off.
11299 </desc>
11300 </attribute>
11301
11302 <attribute name="traceFile" type="wstring">
11303 <desc>
11304 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11305 will be used.
11306 </desc>
11307 </attribute>
11308
11309 <attribute name="natDriver" type="INATEngine" readonly="yes">
11310 <desc>
11311 Points to the NAT engine which handles the network address translation
11312 for this interface. This is active only when the interface actually uses
11313 NAT (see <link to="#attachToNAT" />).
11314 </desc>
11315 </attribute>
11316
11317 <attribute name="bootPriority" type="unsigned long">
11318 <desc>
11319 Network boot priority of the adapter. Priority 1 is highest. If not set,
11320 the priority is considered to be at the lowest possible setting.
11321 </desc>
11322 </attribute>
11323
11324 <attribute name="bandwidthLimit" type="unsigned long">
11325 <desc>
11326 Maximum throughput allowed for this network adapter, in units of 1 mbps.
11327 A zero value means uncapped/unlimited.
11328 </desc>
11329 </attribute>
11330
11331 <method name="attachToNAT">
11332 <desc>
11333 Attach the network adapter to the Network Address Translation (NAT) interface.
11334 </desc>
11335 </method>
11336
11337 <method name="attachToBridgedInterface">
11338 <desc>
11339 Attach the network adapter to a bridged host interface.
11340 </desc>
11341 </method>
11342
11343 <method name="attachToInternalNetwork">
11344 <desc>
11345 Attach the network adapter to an internal network.
11346 </desc>
11347 </method>
11348
11349 <method name="attachToHostOnlyInterface">
11350 <desc>
11351 Attach the network adapter to the host-only network.
11352 </desc>
11353 </method>
11354
11355 <method name="attachToVDE">
11356 <desc>
11357 Attach the network adapter to a VDE network.
11358 </desc>
11359 </method>
11360
11361 <method name="detach">
11362 <desc>
11363 Detach the network adapter
11364 </desc>
11365 </method>
11366 </interface>
11367
11368
11369 <!--
11370 // ISerialPort
11371 /////////////////////////////////////////////////////////////////////////
11372 -->
11373
11374 <enum
11375 name="PortMode"
11376 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11377 >
11378 <desc>
11379 The PortMode enumeration represents possible communication modes for
11380 the virtual serial port device.
11381 </desc>
11382
11383 <const name="Disconnected" value="0">
11384 <desc>Virtual device is not attached to any real host device.</desc>
11385 </const>
11386 <const name="HostPipe" value="1">
11387 <desc>Virtual device is attached to a host pipe.</desc>
11388 </const>
11389 <const name="HostDevice" value="2">
11390 <desc>Virtual device is attached to a host device.</desc>
11391 </const>
11392 <const name="RawFile" value="3">
11393 <desc>Virtual device is attached to a raw file.</desc>
11394 </const>
11395 </enum>
11396
11397 <interface
11398 name="ISerialPort" extends="$unknown"
11399 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11400 wsmap="managed"
11401 >
11402
11403 <desc>
11404 The ISerialPort interface represents the virtual serial port device.
11405
11406 The virtual serial port device acts like an ordinary serial port
11407 inside the virtual machine. This device communicates to the real
11408 serial port hardware in one of two modes: host pipe or host device.
11409
11410 In host pipe mode, the #path attribute specifies the path to the pipe on
11411 the host computer that represents a serial port. The #server attribute
11412 determines if this pipe is created by the virtual machine process at
11413 machine startup or it must already exist before starting machine
11414 execution.
11415
11416 In host device mode, the #path attribute specifies the name of the
11417 serial port device on the host computer.
11418
11419 There is also a third communication mode: the disconnected mode. In this
11420 mode, the guest OS running inside the virtual machine will be able to
11421 detect the serial port, but all port write operations will be discarded
11422 and all port read operations will return no data.
11423
11424 <see>IMachine::getSerialPort</see>
11425 </desc>
11426
11427 <attribute name="slot" type="unsigned long" readonly="yes">
11428 <desc>
11429 Slot number this serial port is plugged into. Corresponds to
11430 the value you pass to <link to="IMachine::getSerialPort"/>
11431 to obtain this instance.
11432 </desc>
11433 </attribute>
11434
11435 <attribute name="enabled" type="boolean">
11436 <desc>
11437 Flag whether the serial port is enabled. If disabled,
11438 the serial port will not be reported to the guest OS.
11439 </desc>
11440 </attribute>
11441
11442 <attribute name="IOBase" type="unsigned long">
11443 <desc>Base I/O address of the serial port.</desc>
11444 </attribute>
11445
11446 <attribute name="IRQ" type="unsigned long">
11447 <desc>IRQ number of the serial port.</desc>
11448 </attribute>
11449
11450 <attribute name="hostMode" type="PortMode">
11451 <desc>
11452 How is this port connected to the host.
11453 <note>
11454 Changing this attribute may fail if the conditions for
11455 <link to="#path"/> are not met.
11456 </note>
11457 </desc>
11458 </attribute>
11459
11460 <attribute name="server" type="boolean">
11461 <desc>
11462 Flag whether this serial port acts as a server (creates a new pipe on
11463 the host) or as a client (uses the existing pipe). This attribute is
11464 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11465 </desc>
11466 </attribute>
11467
11468 <attribute name="path" type="wstring">
11469 <desc>
11470 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11471 PortMode_HostPipe, or the host serial device name when
11472 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11473 cases, setting a @c null or empty string as the attribute's value
11474 is an error. Otherwise, the value of this property is ignored.
11475 </desc>
11476 </attribute>
11477
11478 </interface>
11479
11480 <!--
11481 // IParallelPort
11482 /////////////////////////////////////////////////////////////////////////
11483 -->
11484
11485 <interface
11486 name="IParallelPort" extends="$unknown"
11487 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11488 wsmap="managed"
11489 >
11490
11491 <desc>
11492 The IParallelPort interface represents the virtual parallel port device.
11493
11494 The virtual parallel port device acts like an ordinary parallel port
11495 inside the virtual machine. This device communicates to the real
11496 parallel port hardware using the name of the parallel device on the host
11497 computer specified in the #path attribute.
11498
11499 Each virtual parallel port device is assigned a base I/O address and an
11500 IRQ number that will be reported to the guest operating system and used
11501 to operate the given parallel port from within the virtual machine.
11502
11503 <see>IMachine::getParallelPort</see>
11504 </desc>
11505
11506 <attribute name="slot" type="unsigned long" readonly="yes">
11507 <desc>
11508 Slot number this parallel port is plugged into. Corresponds to
11509 the value you pass to <link to="IMachine::getParallelPort"/>
11510 to obtain this instance.
11511 </desc>
11512 </attribute>
11513
11514 <attribute name="enabled" type="boolean">
11515 <desc>
11516 Flag whether the parallel port is enabled. If disabled,
11517 the parallel port will not be reported to the guest OS.
11518 </desc>
11519 </attribute>
11520
11521 <attribute name="IOBase" type="unsigned long">
11522 <desc>Base I/O address of the parallel port.</desc>
11523 </attribute>
11524
11525 <attribute name="IRQ" type="unsigned long">
11526 <desc>IRQ number of the parallel port.</desc>
11527 </attribute>
11528
11529 <attribute name="path" type="wstring">
11530 <desc>
11531 Host parallel device name. If this parallel port is enabled, setting a
11532 @c null or an empty string as this attribute's value will result into
11533 an error.
11534 </desc>
11535 </attribute>
11536
11537 </interface>
11538
11539
11540 <!--
11541 // IMachineDebugger
11542 /////////////////////////////////////////////////////////////////////////
11543 -->
11544
11545 <interface
11546 name="IMachineDebugger" extends="$unknown"
11547 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11548 wsmap="suppress"
11549 >
11550 <method name="resetStats">
11551 <desc>
11552 Reset VM statistics.
11553 </desc>
11554 <param name="pattern" type="wstring" dir="in">
11555 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11556 </param>
11557 </method>
11558
11559 <method name="dumpStats">
11560 <desc>
11561 Dumps VM statistics.
11562 </desc>
11563 <param name="pattern" type="wstring" dir="in">
11564 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11565 </param>
11566 </method>
11567
11568 <method name="getStats">
11569 <desc>
11570 Get the VM statistics in a XMLish format.
11571 </desc>
11572 <param name="pattern" type="wstring" dir="in">
11573 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11574 </param>
11575 <param name="withDescriptions" type="boolean" dir="in">
11576 <desc>Whether to include the descriptions.</desc>
11577 </param>
11578 <param name="stats" type="wstring" dir="out">
11579 <desc>The XML document containing the statistics.</desc>
11580 </param>
11581 </method>
11582
11583 <method name="injectNMI">
11584 <desc>
11585 Inject an NMI into a running VT-x/AMD-V VM.
11586 </desc>
11587 </method>
11588
11589 <attribute name="singlestep" type="boolean">
11590 <desc>Switch for enabling singlestepping.</desc>
11591 </attribute>
11592
11593 <attribute name="recompileUser" type="boolean">
11594 <desc>Switch for forcing code recompilation for user mode code.</desc>
11595 </attribute>
11596
11597 <attribute name="recompileSupervisor" type="boolean">
11598 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11599 </attribute>
11600
11601 <attribute name="PATMEnabled" type="boolean">
11602 <desc>Switch for enabling and disabling the PATM component.</desc>
11603 </attribute>
11604
11605 <attribute name="CSAMEnabled" type="boolean">
11606 <desc>Switch for enabling and disabling the CSAM component.</desc>
11607 </attribute>
11608
11609 <attribute name="logEnabled" type="boolean">
11610 <desc>Switch for enabling and disabling logging.</desc>
11611 </attribute>
11612
11613 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11614 <desc>
11615 Flag indicating whether the VM is currently making use of CPU hardware
11616 virtualization extensions.
11617 </desc>
11618 </attribute>
11619
11620 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11621 <desc>
11622 Flag indicating whether the VM is currently making use of the nested paging
11623 CPU hardware virtualization extension.
11624 </desc>
11625 </attribute>
11626
11627 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11628 <desc>
11629 Flag indicating whether the VM is currently making use of the VPID
11630 VT-x extension.
11631 </desc>
11632 </attribute>
11633
11634 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11635 <desc>
11636 Flag indicating whether the VM is currently making use of the Physical
11637 Address Extension CPU feature.
11638 </desc>
11639 </attribute>
11640
11641 <attribute name="virtualTimeRate" type="unsigned long">
11642 <desc>
11643 The rate at which the virtual time runs expressed as a percentage.
11644 The accepted range is 2% to 20000%.
11645 </desc>
11646 </attribute>
11647
11648 <!-- @todo method for setting log flags, groups and destination! -->
11649
11650 <attribute name="VM" type="long long" readonly="yes">
11651 <desc>
11652 Gets the VM handle. This is only for internal use while
11653 we carve the details of this interface.
11654 </desc>
11655 </attribute>
11656
11657 </interface>
11658
11659 <!--
11660 // IUSBController
11661 /////////////////////////////////////////////////////////////////////////
11662 -->
11663
11664 <interface
11665 name="IUSBController" extends="$unknown"
11666 uuid="6fdcccc5-abd3-4fec-9387-2ad3914fc4a8"
11667 wsmap="managed"
11668 >
11669 <attribute name="enabled" type="boolean">
11670 <desc>
11671 Flag whether the USB controller is present in the
11672 guest system. If disabled, the virtual guest hardware will
11673 not contain any USB controller. Can only be changed when
11674 the VM is powered off.
11675 </desc>
11676 </attribute>
11677
11678 <attribute name="enabledEhci" type="boolean">
11679 <desc>
11680 Flag whether the USB EHCI controller is present in the
11681 guest system. If disabled, the virtual guest hardware will
11682 not contain a USB EHCI controller. Can only be changed when
11683 the VM is powered off.
11684 </desc>
11685 </attribute>
11686
11687 <attribute name="proxyAvailable" type="boolean" readonly="yes">
11688 <desc>
11689 Flag whether there is an USB proxy available.
11690 </desc>
11691 </attribute>
11692
11693 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11694 <desc>
11695 USB standard version which the controller implements.
11696 This is a BCD which means that the major version is in the
11697 high byte and minor version is in the low byte.
11698 </desc>
11699 </attribute>
11700
11701 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11702 <desc>
11703 List of USB device filters associated with the machine.
11704
11705 If the machine is currently running, these filters are activated
11706 every time a new (supported) USB device is attached to the host
11707 computer that was not ignored by global filters
11708 (<link to="IHost::USBDeviceFilters"/>).
11709
11710 These filters are also activated when the machine is powered up.
11711 They are run against a list of all currently available USB
11712 devices (in states
11713 <link to="USBDeviceState_Available"/>,
11714 <link to="USBDeviceState_Busy"/>,
11715 <link to="USBDeviceState_Held"/>) that were not previously
11716 ignored by global filters.
11717
11718 If at least one filter matches the USB device in question, this
11719 device is automatically captured (attached to) the virtual USB
11720 controller of this machine.
11721
11722 <see>IUSBDeviceFilter, ::IUSBController</see>
11723 </desc>
11724 </attribute>
11725
11726 <method name="createDeviceFilter">
11727 <desc>
11728 Creates a new USB device filter. All attributes except
11729 the filter name are set to empty (any match),
11730 <i>active</i> is @c false (the filter is not active).
11731
11732 The created filter can then be added to the list of filters using
11733 <link to="#insertDeviceFilter"/>.
11734
11735 <result name="VBOX_E_INVALID_VM_STATE">
11736 The virtual machine is not mutable.
11737 </result>
11738
11739 <see>#deviceFilters</see>
11740 </desc>
11741 <param name="name" type="wstring" dir="in">
11742 <desc>
11743 Filter name. See <link to="IUSBDeviceFilter::name"/>
11744 for more info.
11745 </desc>
11746 </param>
11747 <param name="filter" type="IUSBDeviceFilter" dir="return">
11748 <desc>Created filter object.</desc>
11749 </param>
11750 </method>
11751
11752 <method name="insertDeviceFilter">
11753 <desc>
11754 Inserts the given USB device to the specified position
11755 in the list of filters.
11756
11757 Positions are numbered starting from <tt>0</tt>. If the specified
11758 position is equal to or greater than the number of elements in
11759 the list, the filter is added to the end of the collection.
11760
11761 <note>
11762 Duplicates are not allowed, so an attempt to insert a
11763 filter that is already in the collection, will return an
11764 error.
11765 </note>
11766
11767 <result name="VBOX_E_INVALID_VM_STATE">
11768 Virtual machine is not mutable.
11769 </result>
11770 <result name="E_INVALIDARG">
11771 USB device filter not created within this VirtualBox instance.
11772 </result>
11773 <result name="VBOX_E_INVALID_OBJECT_STATE">
11774 USB device filter already in list.
11775 </result>
11776
11777 <see>#deviceFilters</see>
11778 </desc>
11779 <param name="position" type="unsigned long" dir="in">
11780 <desc>Position to insert the filter to.</desc>
11781 </param>
11782 <param name="filter" type="IUSBDeviceFilter" dir="in">
11783 <desc>USB device filter to insert.</desc>
11784 </param>
11785 </method>
11786
11787 <method name="removeDeviceFilter">
11788 <desc>
11789 Removes a USB device filter from the specified position in the
11790 list of filters.
11791
11792 Positions are numbered starting from <tt>0</tt>. Specifying a
11793 position equal to or greater than the number of elements in
11794 the list will produce an error.
11795
11796 <see>#deviceFilters</see>
11797
11798 <result name="VBOX_E_INVALID_VM_STATE">
11799 Virtual machine is not mutable.
11800 </result>
11801 <result name="E_INVALIDARG">
11802 USB device filter list empty or invalid @a position.
11803 </result>
11804
11805 </desc>
11806 <param name="position" type="unsigned long" dir="in">
11807 <desc>Position to remove the filter from.</desc>
11808 </param>
11809 <param name="filter" type="IUSBDeviceFilter" dir="return">
11810 <desc>Removed USB device filter.</desc>
11811 </param>
11812 </method>
11813
11814 </interface>
11815
11816
11817 <!--
11818 // IUSBDevice
11819 /////////////////////////////////////////////////////////////////////////
11820 -->
11821
11822 <interface
11823 name="IUSBDevice" extends="$unknown"
11824 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11825 wsmap="managed"
11826 >
11827 <desc>
11828 The IUSBDevice interface represents a virtual USB device attached to the
11829 virtual machine.
11830
11831 A collection of objects implementing this interface is stored in the
11832 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11833 attached to a running virtual machine's USB controller.
11834 </desc>
11835
11836 <attribute name="id" type="uuid" mod="string" readonly="yes">
11837 <desc>
11838 Unique USB device ID. This ID is built from #vendorId,
11839 #productId, #revision and #serialNumber.
11840 </desc>
11841 </attribute>
11842
11843 <attribute name="vendorId" type="unsigned short" readonly="yes">
11844 <desc>Vendor ID.</desc>
11845 </attribute>
11846
11847 <attribute name="productId" type="unsigned short" readonly="yes">
11848 <desc>Product ID.</desc>
11849 </attribute>
11850
11851 <attribute name="revision" type="unsigned short" readonly="yes">
11852 <desc>
11853 Product revision number. This is a packed BCD represented as
11854 unsigned short. The high byte is the integer part and the low
11855 byte is the decimal.
11856 </desc>
11857 </attribute>
11858
11859 <attribute name="manufacturer" type="wstring" readonly="yes">
11860 <desc>Manufacturer string.</desc>
11861 </attribute>
11862
11863 <attribute name="product" type="wstring" readonly="yes">
11864 <desc>Product string.</desc>
11865 </attribute>
11866
11867 <attribute name="serialNumber" type="wstring" readonly="yes">
11868 <desc>Serial number string.</desc>
11869 </attribute>
11870
11871 <attribute name="address" type="wstring" readonly="yes">
11872 <desc>Host specific address of the device.</desc>
11873 </attribute>
11874
11875 <attribute name="port" type="unsigned short" readonly="yes">
11876 <desc>
11877 Host USB port number the device is physically
11878 connected to.
11879 </desc>
11880 </attribute>
11881
11882 <attribute name="version" type="unsigned short" readonly="yes">
11883 <desc>
11884 The major USB version of the device - 1 or 2.
11885 </desc>
11886 </attribute>
11887
11888 <attribute name="portVersion" type="unsigned short" readonly="yes">
11889 <desc>
11890 The major USB version of the host USB port the device is
11891 physically connected to - 1 or 2. For devices not connected to
11892 anything this will have the same value as the version attribute.
11893 </desc>
11894 </attribute>
11895
11896 <attribute name="remote" type="boolean" readonly="yes">
11897 <desc>
11898 Whether the device is physically connected to a remote VRDE
11899 client or to a local host machine.
11900 </desc>
11901 </attribute>
11902
11903 </interface>
11904
11905
11906 <!--
11907 // IUSBDeviceFilter
11908 /////////////////////////////////////////////////////////////////////////
11909 -->
11910
11911 <interface
11912 name="IUSBDeviceFilter" extends="$unknown"
11913 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11914 wsmap="managed"
11915 >
11916 <desc>
11917 The IUSBDeviceFilter interface represents an USB device filter used
11918 to perform actions on a group of USB devices.
11919
11920 This type of filters is used by running virtual machines to
11921 automatically capture selected USB devices once they are physically
11922 attached to the host computer.
11923
11924 A USB device is matched to the given device filter if and only if all
11925 attributes of the device match the corresponding attributes of the
11926 filter (that is, attributes are joined together using the logical AND
11927 operation). On the other hand, all together, filters in the list of
11928 filters carry the semantics of the logical OR operation. So if it is
11929 desirable to create a match like "this vendor id OR this product id",
11930 one needs to create two filters and specify "any match" (see below)
11931 for unused attributes.
11932
11933 All filter attributes used for matching are strings. Each string
11934 is an expression representing a set of values of the corresponding
11935 device attribute, that will match the given filter. Currently, the
11936 following filtering expressions are supported:
11937
11938 <ul>
11939 <li><i>Interval filters</i>. Used to specify valid intervals for
11940 integer device attributes (Vendor ID, Product ID and Revision).
11941 The format of the string is:
11942
11943 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11944
11945 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11946 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11947 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11948 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11949 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11950 possible integer is assumed.
11951 </li>
11952 <li><i>Boolean filters</i>. Used to specify acceptable values for
11953 boolean device attributes. The format of the string is:
11954
11955 <tt>true|false|yes|no|0|1</tt>
11956
11957 </li>
11958 <li><i>Exact match</i>. Used to specify a single value for the given
11959 device attribute. Any string that doesn't start with <tt>int:</tt>
11960 represents the exact match. String device attributes are compared to
11961 this string including case of symbols. Integer attributes are first
11962 converted to a string (see individual filter attributes) and then
11963 compared ignoring case.
11964
11965 </li>
11966 <li><i>Any match</i>. Any value of the corresponding device attribute
11967 will match the given filter. An empty or @c null string is
11968 used to construct this type of filtering expressions.
11969
11970 </li>
11971 </ul>
11972
11973 <note>
11974 On the Windows host platform, interval filters are not currently
11975 available. Also all string filter attributes
11976 (<link to="#manufacturer"/>, <link to="#product"/>,
11977 <link to="#serialNumber"/>) are ignored, so they behave as
11978 <i>any match</i> no matter what string expression is specified.
11979 </note>
11980
11981 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11982 </desc>
11983
11984 <attribute name="name" type="wstring">
11985 <desc>
11986 Visible name for this filter.
11987 This name is used to visually distinguish one filter from another,
11988 so it can neither be @c null nor an empty string.
11989 </desc>
11990 </attribute>
11991
11992 <attribute name="active" type="boolean">
11993 <desc>Whether this filter active or has been temporarily disabled.</desc>
11994 </attribute>
11995
11996 <attribute name="vendorId" type="wstring">
11997 <desc>
11998 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11999 The string representation for the <i>exact matching</i>
12000 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
12001 (including leading zeroes).
12002 </desc>
12003 </attribute>
12004
12005 <attribute name="productId" type="wstring">
12006 <desc>
12007 <link to="IUSBDevice::productId">Product ID</link> filter.
12008 The string representation for the <i>exact matching</i>
12009 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
12010 (including leading zeroes).
12011 </desc>
12012 </attribute>
12013
12014 <attribute name="revision" type="wstring">
12015 <desc>
12016 <link to="IUSBDevice::productId">Product revision number</link>
12017 filter. The string representation for the <i>exact matching</i>
12018 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
12019 of the integer part of the revision, and <tt>F</tt> is the
12020 decimal digit of its fractional part (including leading and
12021 trailing zeros).
12022 Note that for interval filters, it's best to use the hexadecimal
12023 form, because the revision is stored as a 16 bit packed BCD value;
12024 so the expression <tt>int:0x0100-0x0199</tt> will match any
12025 revision from <tt>1.0</tt> to <tt>1.99</tt>.
12026 </desc>
12027 </attribute>
12028
12029 <attribute name="manufacturer" type="wstring">
12030 <desc>
12031 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
12032 </desc>
12033 </attribute>
12034
12035 <attribute name="product" type="wstring">
12036 <desc>
12037 <link to="IUSBDevice::product">Product</link> filter.
12038 </desc>
12039 </attribute>
12040
12041 <attribute name="serialNumber" type="wstring">
12042 <desc>
12043 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
12044 </desc>
12045 </attribute>
12046
12047 <attribute name="port" type="wstring">
12048 <desc>
12049 <link to="IUSBDevice::port">Host USB port</link> filter.
12050 </desc>
12051 </attribute>
12052
12053 <attribute name="remote" type="wstring">
12054 <desc>
12055 <link to="IUSBDevice::remote">Remote state</link> filter.
12056 <note>
12057 This filter makes sense only for machine USB filters,
12058 i.e. it is ignored by IHostUSBDeviceFilter objects.
12059 </note>
12060 </desc>
12061 </attribute>
12062
12063 <attribute name="maskedInterfaces" type="unsigned long">
12064 <desc>
12065 This is an advanced option for hiding one or more USB interfaces
12066 from the guest. The value is a bit mask where the bits that are set
12067 means the corresponding USB interface should be hidden, masked off
12068 if you like.
12069 This feature only works on Linux hosts.
12070 </desc>
12071 </attribute>
12072
12073 </interface>
12074
12075
12076 <!--
12077 // IHostUSBDevice
12078 /////////////////////////////////////////////////////////////////////////
12079 -->
12080
12081 <enum
12082 name="USBDeviceState"
12083 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
12084 >
12085 <desc>
12086 USB device state. This enumeration represents all possible states
12087 of the USB device physically attached to the host computer regarding
12088 its state on the host computer and availability to guest computers
12089 (all currently running virtual machines).
12090
12091 Once a supported USB device is attached to the host, global USB
12092 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
12093 either ignore the device, or put it to USBDeviceState_Held state, or do
12094 nothing. Unless the device is ignored by global filters, filters of all
12095 currently running guests (<link to="IUSBController::deviceFilters"/>) are
12096 activated that can put it to USBDeviceState_Captured state.
12097
12098 If the device was ignored by global filters, or didn't match
12099 any filters at all (including guest ones), it is handled by the host
12100 in a normal way. In this case, the device state is determined by
12101 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
12102 or USBDeviceState_Available, depending on the current device usage.
12103
12104 Besides auto-capturing based on filters, the device can be manually
12105 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
12106 state is USBDeviceState_Busy, USBDeviceState_Available or
12107 USBDeviceState_Held.
12108
12109 <note>
12110 Due to differences in USB stack implementations in Linux and Win32,
12111 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
12112 only to the Linux version of the product. This also means that (<link
12113 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
12114 device state is USBDeviceState_Held.
12115 </note>
12116
12117 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
12118 </desc>
12119
12120 <const name="NotSupported" value="0">
12121 <desc>
12122 Not supported by the VirtualBox server, not available to guests.
12123 </desc>
12124 </const>
12125 <const name="Unavailable" value="1">
12126 <desc>
12127 Being used by the host computer exclusively,
12128 not available to guests.
12129 </desc>
12130 </const>
12131 <const name="Busy" value="2">
12132 <desc>
12133 Being used by the host computer, potentially available to guests.
12134 </desc>
12135 </const>
12136 <const name="Available" value="3">
12137 <desc>
12138 Not used by the host computer, available to guests (the host computer
12139 can also start using the device at any time).
12140 </desc>
12141 </const>
12142 <const name="Held" value="4">
12143 <desc>
12144 Held by the VirtualBox server (ignored by the host computer),
12145 available to guests.
12146 </desc>
12147 </const>
12148 <const name="Captured" value="5">
12149 <desc>
12150 Captured by one of the guest computers, not available
12151 to anybody else.
12152 </desc>
12153 </const>
12154 </enum>
12155
12156 <interface
12157 name="IHostUSBDevice" extends="IUSBDevice"
12158 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
12159 wsmap="managed"
12160 >
12161 <desc>
12162 The IHostUSBDevice interface represents a physical USB device attached
12163 to the host computer.
12164
12165 Besides properties inherited from IUSBDevice, this interface adds the
12166 <link to="#state"/> property that holds the current state of the USB
12167 device.
12168
12169 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
12170 </desc>
12171
12172 <attribute name="state" type="USBDeviceState" readonly="yes">
12173 <desc>
12174 Current state of the device.
12175 </desc>
12176 </attribute>
12177
12178 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
12179
12180 </interface>
12181
12182
12183 <!--
12184 // IHostUSBDeviceFilter
12185 /////////////////////////////////////////////////////////////////////////
12186 -->
12187
12188 <enum
12189 name="USBDeviceFilterAction"
12190 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
12191 >
12192 <desc>
12193 Actions for host USB device filters.
12194 <see>IHostUSBDeviceFilter, USBDeviceState</see>
12195 </desc>
12196
12197 <const name="Null" value="0">
12198 <desc>Null value (never used by the API).</desc>
12199 </const>
12200 <const name="Ignore" value="1">
12201 <desc>Ignore the matched USB device.</desc>
12202 </const>
12203 <const name="Hold" value="2">
12204 <desc>Hold the matched USB device.</desc>
12205 </const>
12206 </enum>
12207
12208 <interface
12209 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
12210 uuid="4cc70246-d74a-400f-8222-3900489c0374"
12211 wsmap="managed"
12212 >
12213 <desc>
12214 The IHostUSBDeviceFilter interface represents a global filter for a
12215 physical USB device used by the host computer. Used indirectly in
12216 <link to="IHost::USBDeviceFilters"/>.
12217
12218 Using filters of this type, the host computer determines the initial
12219 state of the USB device after it is physically attached to the
12220 host's USB controller.
12221
12222 <note>
12223 The <link to="IUSBDeviceFilter::remote"/> attribute is ignored by this type of
12224 filters, because it makes sense only for
12225 <link to="IUSBController::deviceFilters">machine USB filters</link>.
12226 </note>
12227
12228 <see>IHost::USBDeviceFilters</see>
12229 </desc>
12230
12231 <attribute name="action" type="USBDeviceFilterAction">
12232 <desc>
12233 Action performed by the host when an attached USB device
12234 matches this filter.
12235 </desc>
12236 </attribute>
12237
12238 </interface>
12239
12240 <!--
12241 // IAudioAdapter
12242 /////////////////////////////////////////////////////////////////////////
12243 -->
12244
12245 <enum
12246 name="AudioDriverType"
12247 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
12248 >
12249 <desc>
12250 Host audio driver type.
12251 </desc>
12252
12253 <const name="Null" value="0">
12254 <desc>Null value, also means "dummy audio driver".</desc>
12255 </const>
12256 <const name="WinMM" value="1">
12257 <desc>Windows multimedia (Windows hosts only).</desc>
12258 </const>
12259 <const name="OSS" value="2">
12260 <desc>Open Sound System (Linux hosts only).</desc>
12261 </const>
12262 <const name="ALSA" value="3">
12263 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
12264 </const>
12265 <const name="DirectSound" value="4">
12266 <desc>DirectSound (Windows hosts only).</desc>
12267 </const>
12268 <const name="CoreAudio" value="5">
12269 <desc>CoreAudio (Mac hosts only).</desc>
12270 </const>
12271 <const name="MMPM" value="6">
12272 <desc>Reserved for historical reasons.</desc>
12273 </const>
12274 <const name="Pulse" value="7">
12275 <desc>PulseAudio (Linux hosts only).</desc>
12276 </const>
12277 <const name="SolAudio" value="8">
12278 <desc>Solaris audio (Solaris hosts only).</desc>
12279 </const>
12280 </enum>
12281
12282 <enum
12283 name="AudioControllerType"
12284 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
12285 >
12286 <desc>
12287 Virtual audio controller type.
12288 </desc>
12289
12290 <const name="AC97" value="0"/>
12291 <const name="SB16" value="1"/>
12292 <const name="HDA" value="2"/>
12293 </enum>
12294
12295 <interface
12296 name="IAudioAdapter" extends="$unknown"
12297 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
12298 wsmap="managed"
12299 >
12300 <desc>
12301 The IAudioAdapter interface represents the virtual audio adapter of
12302 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
12303 </desc>
12304 <attribute name="enabled" type="boolean">
12305 <desc>
12306 Flag whether the audio adapter is present in the
12307 guest system. If disabled, the virtual guest hardware will
12308 not contain any audio adapter. Can only be changed when
12309 the VM is not running.
12310 </desc>
12311 </attribute>
12312 <attribute name="audioController" type="AudioControllerType">
12313 <desc>
12314 The audio hardware we emulate.
12315 </desc>
12316 </attribute>
12317 <attribute name="audioDriver" type="AudioDriverType">
12318 <desc>
12319 Audio driver the adapter is connected to. This setting
12320 can only be changed when the VM is not running.
12321 </desc>
12322 </attribute>
12323 </interface>
12324
12325 <enum
12326 name="AuthType"
12327 uuid="7eef6ef6-98c2-4dc2-ab35-10d2b292028d"
12328 >
12329 <desc>
12330 VirtualBox authentication type.
12331 </desc>
12332
12333 <const name="Null" value="0">
12334 <desc>Null value, also means "no authentication".</desc>
12335 </const>
12336 <const name="External" value="1"/>
12337 <const name="Guest" value="2"/>
12338 </enum>
12339
12340 <!--
12341 // IVRDEServer
12342 /////////////////////////////////////////////////////////////////////////
12343 -->
12344
12345 <interface
12346 name="IVRDEServer" extends="$unknown"
12347 uuid="f68a6b34-6f09-4040-8de1-e8d746c4a9ea"
12348 wsmap="managed"
12349 >
12350 <attribute name="enabled" type="boolean">
12351 <desc>VRDE server status.</desc>
12352 </attribute>
12353
12354 <attribute name="authType" type="AuthType">
12355 <desc>VRDE authentication method.</desc>
12356 </attribute>
12357
12358 <attribute name="authTimeout" type="unsigned long">
12359 <desc>Timeout for guest authentication. Milliseconds.</desc>
12360 </attribute>
12361
12362 <attribute name="allowMultiConnection" type="boolean">
12363 <desc>
12364 Flag whether multiple simultaneous connections to the VM are permitted.
12365 Note that this will be replaced by a more powerful mechanism in the future.
12366 </desc>
12367 </attribute>
12368
12369 <attribute name="reuseSingleConnection" type="boolean">
12370 <desc>
12371 Flag whether the existing connection must be dropped and a new connection
12372 must be established by the VRDE server, when a new client connects in single
12373 connection mode.
12374 </desc>
12375 </attribute>
12376
12377 <attribute name="videoChannel" type="boolean">
12378 <desc>
12379 Flag whether video redirectiron channel is enabled.
12380 </desc>
12381 </attribute>
12382
12383 <attribute name="videoChannelQuality" type="unsigned long">
12384 <desc>
12385 Image quality in percents.
12386 </desc>
12387 </attribute>
12388
12389 <method name="setVRDEProperty">
12390 <desc>
12391 Sets a VRDE specific property string.
12392
12393 If you pass @c null or empty string as a key @a value, the given @a key
12394 will be deleted.
12395
12396 </desc>
12397 <param name="key" type="wstring" dir="in">
12398 <desc>Name of the key to set.</desc>
12399 </param>
12400 <param name="value" type="wstring" dir="in">
12401 <desc>Value to assign to the key.</desc>
12402 </param>
12403 </method>
12404
12405 <method name="getVRDEProperty">
12406 <desc>
12407 Returns a VRDE specific property string.
12408
12409 If the requested data @a key does not exist, this function will
12410 succeed and return an empty string in the @a value argument.
12411
12412 </desc>
12413 <param name="key" type="wstring" dir="in">
12414 <desc>Name of the key to get.</desc>
12415 </param>
12416 <param name="value" type="wstring" dir="return">
12417 <desc>Value of the requested key.</desc>
12418 </param>
12419 </method>
12420
12421 </interface>
12422
12423
12424 <!--
12425 // ISharedFolder
12426 /////////////////////////////////////////////////////////////////////////
12427 -->
12428
12429 <interface
12430 name="ISharedFolder" extends="$unknown"
12431 uuid="8388da11-b559-4574-a5b7-2bd7acd5cef8"
12432 wsmap="struct"
12433 >
12434 <desc>
12435 The ISharedFolder interface represents a folder in the host computer's
12436 file system accessible from the guest OS running inside a virtual
12437 machine using an associated logical name.
12438
12439 There are three types of shared folders:
12440 <ul>
12441 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12442 folders available to all virtual machines.</li>
12443 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12444 VM-specific shared folders available to the given virtual machine at
12445 startup.</li>
12446 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12447 VM-specific shared folders created in the session context (for
12448 example, when the virtual machine is running) and automatically
12449 discarded when the session is closed (the VM is powered off).</li>
12450 </ul>
12451
12452 Logical names of shared folders must be unique within the given scope
12453 (global, permanent or transient). However, they do not need to be unique
12454 across scopes. In this case, the definition of the shared folder in a
12455 more specific scope takes precedence over definitions in all other
12456 scopes. The order of precedence is (more specific to more general):
12457 <ol>
12458 <li>Transient definitions</li>
12459 <li>Permanent definitions</li>
12460 <li>Global definitions</li>
12461 </ol>
12462
12463 For example, if MyMachine has a shared folder named
12464 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12465 transient shared folder named <tt>C_DRIVE</tt> (that points
12466 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12467 of <tt>C_DRIVE</tt> in the guest OS so
12468 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12469 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12470 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12471 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12472 to <tt>C:\\</tt> if it still exists.
12473
12474 Note that permanent and transient shared folders of different machines
12475 are in different name spaces, so they don't overlap and don't need to
12476 have unique logical names.
12477
12478 <note>
12479 Global shared folders are not implemented in the current version of the
12480 product.
12481 </note>
12482 </desc>
12483
12484 <attribute name="name" type="wstring" readonly="yes">
12485 <desc>Logical name of the shared folder.</desc>
12486 </attribute>
12487
12488 <attribute name="hostPath" type="wstring" readonly="yes">
12489 <desc>Full path to the shared folder in the host file system.</desc>
12490 </attribute>
12491
12492 <attribute name="accessible" type="boolean" readonly="yes">
12493 <desc>
12494 Whether the folder defined by the host path is currently
12495 accessible or not.
12496 For example, the folder can be unaccessible if it is placed
12497 on the network share that is not available by the time
12498 this property is read.
12499 </desc>
12500 </attribute>
12501
12502 <attribute name="writable" type="boolean" readonly="yes">
12503 <desc>
12504 Whether the folder defined by the host path is writable or
12505 not.
12506 </desc>
12507 </attribute>
12508
12509 <attribute name="autoMount" type="boolean" readonly="yes">
12510 <desc>
12511 Whether the folder gets automatically mounted by the guest or not.
12512 </desc>
12513 </attribute>
12514
12515 <attribute name="lastAccessError" type="wstring" readonly="yes">
12516 <desc>
12517 Text message that represents the result of the last accessibility
12518 check.
12519
12520 Accessibility checks are performed each time the <link to="#accessible"/>
12521 attribute is read. An empty string is returned if the last
12522 accessibility check was successful. A non-empty string indicates a
12523 failure and should normally describe a reason of the failure (for
12524 example, a file read error).
12525 </desc>
12526 </attribute>
12527
12528 </interface>
12529
12530 <!--
12531 // ISession
12532 /////////////////////////////////////////////////////////////////////////
12533 -->
12534
12535 <interface
12536 name="IInternalSessionControl" extends="$unknown"
12537 uuid="06ef98a7-f7c0-45ba-bf99-9aca7a4d5530"
12538 internal="yes"
12539 wsmap="suppress"
12540 >
12541 <method name="getPID">
12542 <desc>PID of the process that has created this Session object.
12543 </desc>
12544 <param name="pid" type="unsigned long" dir="return"/>
12545 </method>
12546
12547 <method name="getRemoteConsole">
12548 <desc>
12549 Returns the console object suitable for remote control.
12550
12551 <result name="VBOX_E_INVALID_VM_STATE">
12552 Session state prevents operation.
12553 </result>
12554 <result name="VBOX_E_INVALID_OBJECT_STATE">
12555 Session type prevents operation.
12556 </result>
12557
12558 </desc>
12559 <param name="console" type="IConsole" dir="return"/>
12560 </method>
12561
12562 <method name="assignMachine">
12563 <desc>
12564 Assigns the machine object associated with this direct-type
12565 session or informs the session that it will be a remote one
12566 (if @a machine == @c null).
12567
12568 <result name="VBOX_E_INVALID_VM_STATE">
12569 Session state prevents operation.
12570 </result>
12571 <result name="VBOX_E_INVALID_OBJECT_STATE">
12572 Session type prevents operation.
12573 </result>
12574
12575 </desc>
12576 <param name="machine" type="IMachine" dir="in"/>
12577 </method>
12578
12579 <method name="assignRemoteMachine">
12580 <desc>
12581 Assigns the machine and the (remote) console object associated with
12582 this remote-type session.
12583
12584 <result name="VBOX_E_INVALID_VM_STATE">
12585 Session state prevents operation.
12586 </result>
12587
12588 </desc>
12589 <param name="machine" type="IMachine" dir="in"/>
12590 <param name="console" type="IConsole" dir="in"/>
12591 </method>
12592
12593 <method name="updateMachineState">
12594 <desc>
12595 Updates the machine state in the VM process.
12596 Must be called only in certain cases
12597 (see the method implementation).
12598
12599 <result name="VBOX_E_INVALID_VM_STATE">
12600 Session state prevents operation.
12601 </result>
12602 <result name="VBOX_E_INVALID_OBJECT_STATE">
12603 Session type prevents operation.
12604 </result>
12605
12606 </desc>
12607 <param name="aMachineState" type="MachineState" dir="in"/>
12608 </method>
12609
12610 <method name="uninitialize">
12611 <desc>
12612 Uninitializes (closes) this session. Used by VirtualBox to close
12613 the corresponding remote session when the direct session dies
12614 or gets closed.
12615
12616 <result name="VBOX_E_INVALID_VM_STATE">
12617 Session state prevents operation.
12618 </result>
12619
12620 </desc>
12621 </method>
12622
12623 <method name="onNetworkAdapterChange">
12624 <desc>
12625 Triggered when settings of a network adapter of the
12626 associated virtual machine have changed.
12627
12628 <result name="VBOX_E_INVALID_VM_STATE">
12629 Session state prevents operation.
12630 </result>
12631 <result name="VBOX_E_INVALID_OBJECT_STATE">
12632 Session type prevents operation.
12633 </result>
12634
12635 </desc>
12636 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12637 <param name="changeAdapter" type="boolean" dir="in"/>
12638 </method>
12639
12640 <method name="onSerialPortChange">
12641 <desc>
12642 Triggered when settings of a serial port of the
12643 associated virtual machine have changed.
12644
12645 <result name="VBOX_E_INVALID_VM_STATE">
12646 Session state prevents operation.
12647 </result>
12648 <result name="VBOX_E_INVALID_OBJECT_STATE">
12649 Session type prevents operation.
12650 </result>
12651
12652 </desc>
12653 <param name="serialPort" type="ISerialPort" dir="in"/>
12654 </method>
12655
12656 <method name="onParallelPortChange">
12657 <desc>
12658 Triggered when settings of a parallel port of the
12659 associated virtual machine have changed.
12660
12661 <result name="VBOX_E_INVALID_VM_STATE">
12662 Session state prevents operation.
12663 </result>
12664 <result name="VBOX_E_INVALID_OBJECT_STATE">
12665 Session type prevents operation.
12666 </result>
12667
12668 </desc>
12669 <param name="parallelPort" type="IParallelPort" dir="in"/>
12670 </method>
12671
12672 <method name="onStorageControllerChange">
12673 <desc>
12674 Triggered when settings of a storage controller of the
12675 associated virtual machine have changed.
12676
12677 <result name="VBOX_E_INVALID_VM_STATE">
12678 Session state prevents operation.
12679 </result>
12680 <result name="VBOX_E_INVALID_OBJECT_STATE">
12681 Session type prevents operation.
12682 </result>
12683
12684 </desc>
12685 </method>
12686
12687 <method name="onMediumChange">
12688 <desc>
12689 Triggered when attached media of the
12690 associated virtual machine have changed.
12691
12692 <result name="VBOX_E_INVALID_VM_STATE">
12693 Session state prevents operation.
12694 </result>
12695 <result name="VBOX_E_INVALID_OBJECT_STATE">
12696 Session type prevents operation.
12697 </result>
12698
12699 </desc>
12700
12701 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12702 <param name="force" type="boolean" dir="in"/>
12703 </method>
12704
12705 <method name="onCPUChange">
12706 <desc>
12707 Notification when a CPU changes.
12708 </desc>
12709 <param name="cpu" type="unsigned long" dir="in">
12710 <desc>The CPU which changed</desc>
12711 </param>
12712 <param name="add" type="boolean" dir="in">
12713 <desc>Flag whether the CPU was added or removed</desc>
12714 </param>
12715 </method>
12716
12717 <method name="onCPUExecutionCapChange">
12718 <desc>
12719 Notification when the CPU execution cap changes.
12720 </desc>
12721 <param name="executionCap" type="unsigned long" dir="in">
12722 <desc>The new CPU execution cap value. (1-100)</desc>
12723 </param>
12724 </method>
12725
12726 <method name="onVRDEServerChange">
12727 <desc>
12728 Triggered when settings of the VRDE server object of the
12729 associated virtual machine have changed.
12730
12731 <result name="VBOX_E_INVALID_VM_STATE">
12732 Session state prevents operation.
12733 </result>
12734 <result name="VBOX_E_INVALID_OBJECT_STATE">
12735 Session type prevents operation.
12736 </result>
12737
12738 </desc>
12739 <param name="restart" type="boolean" dir="in">
12740 <desc>Flag whether the server must be restarted</desc>
12741 </param>
12742 </method>
12743
12744 <method name="onUSBControllerChange">
12745 <desc>
12746 Triggered when settings of the USB controller object of the
12747 associated virtual machine have changed.
12748
12749 <result name="VBOX_E_INVALID_VM_STATE">
12750 Session state prevents operation.
12751 </result>
12752 <result name="VBOX_E_INVALID_OBJECT_STATE">
12753 Session type prevents operation.
12754 </result>
12755
12756 </desc>
12757 </method>
12758
12759 <method name="onSharedFolderChange">
12760 <desc>
12761 Triggered when a permanent (global or machine) shared folder has been
12762 created or removed.
12763 <note>
12764 We don't pass shared folder parameters in this notification because
12765 the order in which parallel notifications are delivered is not defined,
12766 therefore it could happen that these parameters were outdated by the
12767 time of processing this notification.
12768 </note>
12769
12770 <result name="VBOX_E_INVALID_VM_STATE">
12771 Session state prevents operation.
12772 </result>
12773 <result name="VBOX_E_INVALID_OBJECT_STATE">
12774 Session type prevents operation.
12775 </result>
12776
12777 </desc>
12778 <param name="global" type="boolean" dir="in"/>
12779 </method>
12780
12781 <method name="onUSBDeviceAttach">
12782 <desc>
12783 Triggered when a request to capture a USB device (as a result
12784 of matched USB filters or direct call to
12785 <link to="IConsole::attachUSBDevice"/>) has completed.
12786 A @c null @a error object means success, otherwise it
12787 describes a failure.
12788
12789 <result name="VBOX_E_INVALID_VM_STATE">
12790 Session state prevents operation.
12791 </result>
12792 <result name="VBOX_E_INVALID_OBJECT_STATE">
12793 Session type prevents operation.
12794 </result>
12795
12796 </desc>
12797 <param name="device" type="IUSBDevice" dir="in"/>
12798 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12799 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12800 </method>
12801
12802 <method name="onUSBDeviceDetach">
12803 <desc>
12804 Triggered when a request to release the USB device (as a result
12805 of machine termination or direct call to
12806 <link to="IConsole::detachUSBDevice"/>) has completed.
12807 A @c null @a error object means success, otherwise it
12808 describes a failure.
12809
12810 <result name="VBOX_E_INVALID_VM_STATE">
12811 Session state prevents operation.
12812 </result>
12813 <result name="VBOX_E_INVALID_OBJECT_STATE">
12814 Session type prevents operation.
12815 </result>
12816
12817 </desc>
12818 <param name="id" type="uuid" mod="string" dir="in"/>
12819 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12820 </method>
12821
12822 <method name="onShowWindow">
12823 <desc>
12824 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12825 <link to="IMachine::showConsoleWindow"/> in order to notify
12826 console listeners
12827 <link to="ICanShowWindowEvent"/>
12828 and <link to="IShowWindowEvent"/>.
12829
12830 <result name="VBOX_E_INVALID_OBJECT_STATE">
12831 Session type prevents operation.
12832 </result>
12833
12834 </desc>
12835 <param name="check" type="boolean" dir="in"/>
12836 <param name="canShow" type="boolean" dir="out"/>
12837 <param name="winId" type="long long" dir="out"/>
12838 </method>
12839
12840 <method name="accessGuestProperty">
12841 <desc>
12842 Called by <link to="IMachine::getGuestProperty"/> and by
12843 <link to="IMachine::setGuestProperty"/> in order to read and
12844 modify guest properties.
12845
12846 <result name="VBOX_E_INVALID_VM_STATE">
12847 Machine session is not open.
12848 </result>
12849 <result name="VBOX_E_INVALID_OBJECT_STATE">
12850 Session type is not direct.
12851 </result>
12852
12853 </desc>
12854 <param name="name" type="wstring" dir="in"/>
12855 <param name="value" type="wstring" dir="in"/>
12856 <param name="flags" type="wstring" dir="in"/>
12857 <param name="isSetter" type="boolean" dir="in"/>
12858 <param name="retValue" type="wstring" dir="out"/>
12859 <param name="retTimestamp" type="long long" dir="out"/>
12860 <param name="retFlags" type="wstring" dir="out"/>
12861 </method>
12862
12863 <method name="enumerateGuestProperties">
12864 <desc>
12865 Return a list of the guest properties matching a set of patterns along
12866 with their values, time stamps and flags.
12867
12868 <result name="VBOX_E_INVALID_VM_STATE">
12869 Machine session is not open.
12870 </result>
12871 <result name="VBOX_E_INVALID_OBJECT_STATE">
12872 Session type is not direct.
12873 </result>
12874
12875 </desc>
12876 <param name="patterns" type="wstring" dir="in">
12877 <desc>
12878 The patterns to match the properties against as a comma-separated
12879 string. If this is empty, all properties currently set will be
12880 returned.
12881 </desc>
12882 </param>
12883 <param name="key" type="wstring" dir="out" safearray="yes">
12884 <desc>
12885 The key names of the properties returned.
12886 </desc>
12887 </param>
12888 <param name="value" type="wstring" dir="out" safearray="yes">
12889 <desc>
12890 The values of the properties returned. The array entries match the
12891 corresponding entries in the @a key array.
12892 </desc>
12893 </param>
12894 <param name="timestamp" type="long long" dir="out" safearray="yes">
12895 <desc>
12896 The time stamps of the properties returned. The array entries match
12897 the corresponding entries in the @a key array.
12898 </desc>
12899 </param>
12900 <param name="flags" type="wstring" dir="out" safearray="yes">
12901 <desc>
12902 The flags of the properties returned. The array entries match the
12903 corresponding entries in the @a key array.
12904 </desc>
12905 </param>
12906 </method>
12907
12908 <method name="onlineMergeMedium">
12909 <desc>
12910 Triggers online merging of a hard disk. Used internally when deleting
12911 a snapshot while a VM referring to the same hard disk chain is running.
12912
12913 <result name="VBOX_E_INVALID_VM_STATE">
12914 Machine session is not open.
12915 </result>
12916 <result name="VBOX_E_INVALID_OBJECT_STATE">
12917 Session type is not direct.
12918 </result>
12919
12920 </desc>
12921 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
12922 <desc>The medium attachment to identify the medium chain.</desc>
12923 </param>
12924 <param name="sourceIdx" type="unsigned long" dir="in">
12925 <desc>The index of the source image in the chain.
12926 Redundant, but drastically reduces IPC.</desc>
12927 </param>
12928 <param name="targetIdx" type="unsigned long" dir="in">
12929 <desc>The index of the target image in the chain.
12930 Redundant, but drastically reduces IPC.</desc>
12931 </param>
12932 <param name="source" type="IMedium" dir="in">
12933 <desc>Merge source medium.</desc>
12934 </param>
12935 <param name="target" type="IMedium" dir="in">
12936 <desc>Merge target medium.</desc>
12937 </param>
12938 <param name="mergeForward" type="boolean" dir="in">
12939 <desc>Merge direction.</desc>
12940 </param>
12941 <param name="parentForTarget" type="IMedium" dir="in">
12942 <desc>For forward merges: new parent for target medium.</desc>
12943 </param>
12944 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
12945 <desc>For backward merges: list of media which need their parent UUID
12946 updated.</desc>
12947 </param>
12948 <param name="progress" type="IProgress" dir="in">
12949 <desc>
12950 Progress object for this operation.
12951 </desc>
12952 </param>
12953 </method>
12954
12955 </interface>
12956
12957 <interface
12958 name="ISession" extends="$unknown"
12959 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12960 wsmap="managed"
12961 >
12962 <desc>
12963 The ISession interface represents a client process and allows for locking
12964 virtual machines (represented by IMachine objects) to prevent conflicting
12965 changes to the machine.
12966
12967 Any caller wishing to manipulate a virtual machine needs to create a session
12968 object first, which lives in its own process space. Such session objects are
12969 then associated with <link to="IMachine" /> objects living in the VirtualBox
12970 server process to coordinate such changes.
12971
12972 There are two typical scenarios in which sessions are used:
12973
12974 <ul>
12975 <li>To alter machine settings or control a running virtual machine, one
12976 needs to lock a machine for a given session (client process) by calling
12977 <link to="IMachine::lockMachine"/>.
12978
12979 Whereas multiple sessions may control a running virtual machine, only
12980 one process can obtain a write lock on the machine to prevent conflicting
12981 changes. A write lock is also needed if a process wants to actually run a
12982 virtual machine in its own context, such as the VirtualBox GUI or
12983 VBoxHeadless front-ends. They must also lock a machine for their own
12984 sessions before they are allowed to power up the virtual machine.
12985
12986 As a result, no machine settings can be altered while another process is
12987 already using it, either because that process is modifying machine settings
12988 or because the machine is running.
12989 </li>
12990 <li>
12991 To start a VM using one of the existing VirtualBox front-ends (e.g. the
12992 VirtualBox GUI or VBoxHeadless), one would use
12993 <link to="IMachine::launchVMProcess"/>, which also takes a session object
12994 as its first parameter. This session then identifies the caller and lets the
12995 caller control the started machine (for example, pause machine execution or
12996 power it down) as well as be notified about machine execution state changes.
12997 </li>
12998 </ul>
12999
13000 How sessions objects are created in a client process depends on whether you use
13001 the Main API via COM or via the webservice:
13002
13003 <ul>
13004 <li>When using the COM API directly, an object of the Session class from the
13005 VirtualBox type library needs to be created. In regular COM C++ client code,
13006 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
13007 This object will then act as a local session object in further calls to open
13008 a session.
13009 </li>
13010
13011 <li>In the webservice, the session manager (IWebsessionManager) instead creates
13012 a session object automatically whenever <link to="IWebsessionManager::logon" />
13013 is called. A managed object reference to that session object can be retrieved by
13014 calling <link to="IWebsessionManager::getSessionObject" />.
13015 </li>
13016 </ul>
13017 </desc>
13018
13019 <attribute name="state" type="SessionState" readonly="yes">
13020 <desc>Current state of this session.</desc>
13021 </attribute>
13022
13023 <attribute name="type" type="SessionType" readonly="yes">
13024 <desc>
13025 Type of this session. The value of this attribute is valid only
13026 if the session currently has a machine locked (i.e. its
13027 <link to="#state" /> is Locked), otherwise an error will be returned.
13028 </desc>
13029 </attribute>
13030
13031 <attribute name="machine" type="IMachine" readonly="yes">
13032 <desc>Machine object associated with this session.</desc>
13033 </attribute>
13034
13035 <attribute name="console" type="IConsole" readonly="yes">
13036 <desc>Console object associated with this session.</desc>
13037 </attribute>
13038
13039 <method name="unlockMachine">
13040 <desc>
13041 Unlocks a machine that was previously locked for the current session.
13042
13043 Calling this method is required every time a machine has been locked
13044 for a particular session using the <link to="IMachine::launchVMProcess" />
13045 or <link to="IMachine::lockMachine" /> calls. Otherwise the state of
13046 the machine will be set to <link to="MachineState_Aborted" /> on the
13047 server, and changes made to the machine settings will be lost.
13048
13049 Generally, it is recommended to unlock all machines explicitly
13050 before terminating the application (regardless of the reason for
13051 the termination).
13052
13053 <note>
13054 Do not expect the session state (<link to="ISession::state" />
13055 to return to "Unlocked" immediately after you invoke this method,
13056 particularly if you have started a new VM process. The session
13057 state will automatically return to "Unlocked" once the VM is no
13058 longer executing, which can of course take a very long time.
13059 </note>
13060
13061 <result name="E_UNEXPECTED">
13062 Session is not locked.
13063 </result>
13064
13065 </desc>
13066 </method>
13067
13068 </interface>
13069
13070 <!--
13071 // IStorageController
13072 /////////////////////////////////////////////////////////////////////////
13073 -->
13074
13075 <enum
13076 name="StorageBus"
13077 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
13078 >
13079 <desc>
13080 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy);
13081 see <link to="IStorageController::bus" />.
13082 </desc>
13083 <const name="Null" value="0">
13084 <desc>@c null value. Never used by the API.</desc>
13085 </const>
13086 <const name="IDE" value="1"/>
13087 <const name="SATA" value="2"/>
13088 <const name="SCSI" value="3"/>
13089 <const name="Floppy" value="4"/>
13090 <const name="SAS" value="5"/>
13091 </enum>
13092
13093 <enum
13094 name="StorageControllerType"
13095 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
13096 >
13097 <desc>
13098 The exact variant of storage controller hardware presented
13099 to the guest; see <link to="IStorageController::controllerType" />.
13100 </desc>
13101
13102 <const name="Null" value="0">
13103 <desc>@c null value. Never used by the API.</desc>
13104 </const>
13105 <const name="LsiLogic" value="1">
13106 <desc>A SCSI controller of the LsiLogic variant.</desc>
13107 </const>
13108 <const name="BusLogic" value="2">
13109 <desc>A SCSI controller of the BusLogic variant.</desc>
13110 </const>
13111 <const name="IntelAhci" value="3">
13112 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
13113 </const>
13114 <const name="PIIX3" value="4">
13115 <desc>An IDE controller of the PIIX3 variant.</desc>
13116 </const>
13117 <const name="PIIX4" value="5">
13118 <desc>An IDE controller of the PIIX4 variant.</desc>
13119 </const>
13120 <const name="ICH6" value="6">
13121 <desc>An IDE controller of the ICH6 variant.</desc>
13122 </const>
13123 <const name="I82078" value="7">
13124 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
13125 </const>
13126 <const name="LsiLogicSas" value="8">
13127 <desc>A variant of the LsiLogic controller using SAS.</desc>
13128 </const>
13129 </enum>
13130
13131 <enum
13132 name="ChipsetType"
13133 uuid="8b4096a8-a7c3-4d3b-bbb1-05a0a51ec394"
13134 >
13135 <desc>
13136 Type of emulated chipset (mostly southbridge).
13137 </desc>
13138
13139 <const name="Null" value="0">
13140 <desc>@c null value. Never used by the API.</desc>
13141 </const>
13142 <const name="PIIX3" value="1">
13143 <desc>A PIIX3 (PCI IDE ISA Xcelerator) chipset.</desc>
13144 </const>
13145 <const name="ICH9" value="2">
13146 <desc>A ICH9 (I/O Controller Hub) chipset.</desc>
13147 </const>
13148 </enum>
13149
13150 <interface
13151 name="IStorageController" extends="$unknown"
13152 uuid="fd93adc0-bbaa-4256-9e6e-00e29f9151c9"
13153 wsmap="managed"
13154 >
13155 <desc>
13156 Represents a storage controller that is attached to a virtual machine
13157 (<link to="IMachine" />). Just as drives (hard disks, DVDs, FDs) are
13158 attached to storage controllers in a real computer, virtual drives
13159 (represented by <link to="IMediumAttachment" />) are attached to virtual
13160 storage controllers, represented by this interface.
13161
13162 As opposed to physical hardware, VirtualBox has a very generic concept
13163 of a storage controller, and for purposes of the Main API, all virtual
13164 storage is attached to virtual machines via instances of this interface.
13165 There are five types of such virtual storage controllers: IDE, SCSI, SATA,
13166 SAS and Floppy (see <link to="#bus" />). Depending on which of these four
13167 is used, certain sub-types may be available and can be selected in
13168 <link to="#controllerType" />.
13169
13170 Depending on these settings, the guest operating system might see
13171 significantly different virtual hardware.
13172 </desc>
13173
13174 <attribute name="name" type="wstring" readonly="yes">
13175 <desc>
13176 Name of the storage controller, as originally specified with
13177 <link to="IMachine::addStorageController" />. This then uniquely
13178 identifies this controller with other method calls such as
13179 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
13180 </desc>
13181 </attribute>
13182
13183 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
13184 <desc>
13185 Maximum number of devices which can be attached to one port.
13186 </desc>
13187 </attribute>
13188
13189 <attribute name="minPortCount" type="unsigned long" readonly="yes">
13190 <desc>
13191 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
13192 </desc>
13193 </attribute>
13194
13195 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
13196 <desc>
13197 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
13198 </desc>
13199 </attribute>
13200
13201 <attribute name="instance" type="unsigned long">
13202 <desc>
13203 The instance number of the device in the running VM.
13204 </desc>
13205 </attribute>
13206
13207 <attribute name="portCount" type="unsigned long">
13208 <desc>
13209 The number of currently usable ports on the controller.
13210 The minimum and maximum number of ports for one controller are
13211 stored in <link to="IStorageController::minPortCount"/>
13212 and <link to="IStorageController::maxPortCount"/>.
13213 </desc>
13214 </attribute>
13215
13216 <attribute name="bus" type="StorageBus" readonly="yes">
13217 <desc>
13218 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy).
13219 </desc>
13220 </attribute>
13221
13222 <attribute name="controllerType" type="StorageControllerType">
13223 <desc>
13224 The exact variant of storage controller hardware presented
13225 to the guest.
13226 Depending on this value, VirtualBox will provide a different
13227 virtual storage controller hardware to the guest.
13228 For SATA, SAS and floppy controllers, only one variant is
13229 available, but for IDE and SCSI, there are several.
13230
13231 For SCSI controllers, the default type is LsiLogic.
13232 </desc>
13233 </attribute>
13234
13235 <attribute name="useHostIOCache" type="boolean">
13236 <desc>
13237 If true, the storage controller emulation will use a dedicated I/O thread, enable the host I/O
13238 caches and use synchronous file APIs on the host. This was the only option in the API before
13239 VirtualBox 3.2 and is still the default for IDE controllers.
13240
13241 If false, the host I/O cache will be disabled for image files attached to this storage controller.
13242 Instead, the storage controller emulation will use asynchronous I/O APIs on the host. This makes
13243 it possible to turn off the host I/O caches because the emulation can handle unaligned access to
13244 the file. This should be used on OS X and Linux hosts if a high I/O load is expected or many
13245 virtual machines are running at the same time to prevent I/O cache related hangs.
13246 This option new with the API of VirtualBox 3.2 and is now the default for non-IDE storage controllers.
13247 </desc>
13248 </attribute>
13249
13250 <method name="getIDEEmulationPort">
13251 <desc>
13252 Gets the corresponding port number which is emulated as an IDE device.
13253 Works only with SATA controllers.
13254
13255 <result name="E_INVALIDARG">
13256 The @a devicePosition is not in the range 0 to 3.
13257 </result>
13258 <result name="E_NOTIMPL">
13259 The storage controller type is not SATAIntelAhci.
13260 </result>
13261
13262 </desc>
13263 <param name="devicePosition" type="long" dir="in"/>
13264 <param name="portNumber" type="long" dir="return"/>
13265 </method>
13266
13267 <method name="setIDEEmulationPort">
13268 <desc>
13269 Sets the port number which is emulated as an IDE device.
13270 Works only with SATA controllers.
13271
13272 <result name="E_INVALIDARG">
13273 The @a devicePosition is not in the range 0 to 3 or the
13274 @a portNumber is not in the range 0 to 29.
13275 </result>
13276 <result name="E_NOTIMPL">
13277 The storage controller type is not SATAIntelAhci.
13278 </result>
13279
13280 </desc>
13281 <param name="devicePosition" type="long" dir="in"/>
13282 <param name="portNumber" type="long" dir="in"/>
13283 </method>
13284
13285 </interface>
13286
13287<if target="wsdl">
13288
13289 <!--
13290 // IManagedObjectRef
13291 /////////////////////////////////////////////////////////////////////////
13292 -->
13293
13294 <interface
13295 name="IManagedObjectRef" extends="$unknown"
13296 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
13297 internal="yes"
13298 wsmap="managed"
13299 wscpp="hardcoded"
13300 >
13301 <desc>
13302 Managed object reference.
13303
13304 Only within the webservice, a managed object reference (which is really
13305 an opaque number) allows a webservice client to address an object
13306 that lives in the address space of the webservice server.
13307
13308 Behind each managed object reference, there is a COM object that lives
13309 in the webservice server's address space. The COM object is not freed
13310 until the managed object reference is released, either by an explicit
13311 call to <link to="IManagedObjectRef::release" /> or by logging off from
13312 the webservice (<link to="IWebsessionManager::logoff" />), which releases
13313 all objects created during the webservice session.
13314
13315 Whenever a method call of the VirtualBox API returns a COM object, the
13316 webservice representation of that method will instead return a
13317 managed object reference, which can then be used to invoke methods
13318 on that object.
13319 </desc>
13320
13321 <method name="getInterfaceName">
13322 <desc>
13323 Returns the name of the interface that this managed object represents,
13324 for example, "IMachine", as a string.
13325 </desc>
13326 <param name="return" type="wstring" dir="return"/>
13327 </method>
13328
13329 <method name="release">
13330 <desc>
13331 Releases this managed object reference and frees the resources that
13332 were allocated for it in the webservice server process. After calling
13333 this method, the identifier of the reference can no longer be used.
13334 </desc>
13335 </method>
13336
13337 </interface>
13338
13339 <!--
13340 // IWebsessionManager
13341 /////////////////////////////////////////////////////////////////////////
13342 -->
13343
13344 <interface
13345 name="IWebsessionManager" extends="$unknown"
13346 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
13347 internal="yes"
13348 wsmap="global"
13349 wscpp="hardcoded"
13350 >
13351 <desc>
13352 Websession manager. This provides essential services
13353 to webservice clients.
13354 </desc>
13355 <method name="logon">
13356 <desc>
13357 Logs a new client onto the webservice and returns a managed object reference to
13358 the IVirtualBox instance, which the client can then use as a basis to further
13359 queries, since all calls to the VirtualBox API are based on the IVirtualBox
13360 interface, in one way or the other.
13361 </desc>
13362 <param name="username" type="wstring" dir="in"/>
13363 <param name="password" type="wstring" dir="in"/>
13364 <param name="return" type="IVirtualBox" dir="return"/>
13365 </method>
13366
13367 <method name="getSessionObject">
13368 <desc>
13369 Returns a managed object reference to the internal ISession object that was created
13370 for this web service session when the client logged on.
13371
13372 <see>ISession</see>
13373 </desc>
13374 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13375 <param name="return" type="ISession" dir="return"/>
13376 </method>
13377
13378 <method name="logoff">
13379 <desc>
13380 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
13381 and destroys all resources associated with the session (most importantly, all
13382 managed objects created in the server while the session was active).
13383 </desc>
13384 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13385 </method>
13386
13387 </interface>
13388
13389</if>
13390
13391 <!--
13392 // IPerformanceCollector & friends
13393 /////////////////////////////////////////////////////////////////////////
13394 -->
13395
13396 <interface
13397 name="IPerformanceMetric" extends="$unknown"
13398 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
13399 >
13400 <desc>
13401 The IPerformanceMetric interface represents parameters of the given
13402 performance metric.
13403 </desc>
13404
13405 <attribute name="metricName" type="wstring" readonly="yes">
13406 <desc>
13407 Name of the metric.
13408 </desc>
13409 </attribute>
13410
13411 <attribute name="object" type="$unknown" readonly="yes">
13412 <desc>
13413 Object this metric belongs to.
13414 </desc>
13415 </attribute>
13416
13417 <attribute name="description" type="wstring" readonly="yes">
13418 <desc>
13419 Textual description of the metric.
13420 </desc>
13421 </attribute>
13422
13423 <attribute name="period" type="unsigned long" readonly="yes">
13424 <desc>
13425 Time interval between samples, measured in seconds.
13426 </desc>
13427 </attribute>
13428
13429 <attribute name="count" type="unsigned long" readonly="yes">
13430 <desc>
13431 Number of recent samples retained by the performance collector for this
13432 metric.
13433
13434 When the collected sample count exceeds this number, older samples
13435 are discarded.
13436 </desc>
13437 </attribute>
13438
13439 <attribute name="unit" type="wstring" readonly="yes">
13440 <desc>
13441 Unit of measurement.
13442 </desc>
13443 </attribute>
13444
13445 <attribute name="minimumValue" type="long" readonly="yes">
13446 <desc>
13447 Minimum possible value of this metric.
13448 </desc>
13449 </attribute>
13450
13451 <attribute name="maximumValue" type="long" readonly="yes">
13452 <desc>
13453 Maximum possible value of this metric.
13454 </desc>
13455 </attribute>
13456 </interface>
13457
13458 <interface
13459 name="IPerformanceCollector" extends="$unknown"
13460 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
13461 wsmap="managed"
13462 >
13463 <desc>
13464 The IPerformanceCollector interface represents a service that collects
13465 and stores performance metrics data.
13466
13467 Performance metrics are associated with objects of interfaces like IHost
13468 and IMachine. Each object has a distinct set of performance metrics. The
13469 set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
13470
13471 Metric data is collected at the specified intervals and is retained
13472 internally. The interval and the number of retained samples can be set
13473 with <link to="IPerformanceCollector::setupMetrics" />. Both metric data
13474 and collection settings are not persistent, they are discarded as soon as
13475 VBoxSVC process terminates. Moreover, metric settings and data associated
13476 with a particular VM only exist while VM is running. They disappear as
13477 soon as VM shuts down. It is not possible to set up metrics for machines
13478 that are powered off. One needs to start VM first, then set up metric
13479 collection parameters.
13480
13481 Metrics are organized hierarchically, with each level separated by a
13482 slash (/) character. Generally, the scheme for metric names is like this:
13483
13484 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
13485
13486 "Category/Metric" together form the base metric name. A base metric is
13487 the smallest unit for which a sampling interval and the number of
13488 retained samples can be set. Only base metrics can be enabled and
13489 disabled. All sub-metrics are collected when their base metric is
13490 collected. Collected values for any set of sub-metrics can be queried
13491 with <link to="IPerformanceCollector::queryMetricsData" />.
13492
13493 For example "CPU/Load/User:avg" metric name stands for the "CPU"
13494 category, "Load" metric, "User" submetric, "average" aggregate. An
13495 aggregate function is computed over all retained data. Valid aggregate
13496 functions are:
13497
13498 <ul>
13499 <li>avg -- average</li>
13500 <li>min -- minimum</li>
13501 <li>max -- maximum</li>
13502 </ul>
13503
13504 When setting up metric parameters, querying metric data, enabling or
13505 disabling metrics wildcards can be used in metric names to specify a
13506 subset of metrics. For example, to select all CPU-related metrics
13507 use <tt>CPU/*</tt>, all averages can be queried using <tt>*:avg</tt> and
13508 so on. To query metric values without aggregates <tt>*:</tt> can be used.
13509
13510 The valid names for base metrics are:
13511
13512 <ul>
13513 <li>CPU/Load</li>
13514 <li>CPU/MHz</li>
13515 <li>RAM/Usage</li>
13516 </ul>
13517
13518 The general sequence for collecting and retrieving the metrics is:
13519 <ul>
13520 <li>
13521 Obtain an instance of IPerformanceCollector with
13522 <link to="IVirtualBox::performanceCollector" />
13523 </li>
13524 <li>
13525 Allocate and populate an array with references to objects the metrics
13526 will be collected for. Use references to IHost and IMachine objects.
13527 </li>
13528 <li>
13529 Allocate and populate an array with base metric names the data will
13530 be collected for.
13531 </li>
13532 <li>
13533 Call <link to="IPerformanceCollector::setupMetrics" />. From now on
13534 the metric data will be collected and stored.
13535 </li>
13536 <li>
13537 Wait for the data to get collected.
13538 </li>
13539 <li>
13540 Allocate and populate an array with references to objects the metric
13541 values will be queried for. You can re-use the object array used for
13542 setting base metrics.
13543 </li>
13544 <li>
13545 Allocate and populate an array with metric names the data will be
13546 collected for. Note that metric names differ from base metric names.
13547 </li>
13548 <li>
13549 Call <link to="IPerformanceCollector::queryMetricsData" />. The data
13550 that have been collected so far are returned. Note that the values
13551 are still retained internally and data collection continues.
13552 </li>
13553 </ul>
13554
13555 For an example of usage refer to the following files in VirtualBox SDK:
13556 <ul>
13557 <li>
13558 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13559 </li>
13560 <li>
13561 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13562 </li>
13563 </ul>
13564 </desc>
13565
13566 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13567 <desc>
13568 Array of unique names of metrics.
13569
13570 This array represents all metrics supported by the performance
13571 collector. Individual objects do not necessarily support all of them.
13572 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13573 list of supported metrics for a particular object.
13574 </desc>
13575 </attribute>
13576
13577 <method name="getMetrics">
13578 <desc>
13579 Returns parameters of specified metrics for a set of objects.
13580 <note>
13581 @c Null metrics array means all metrics. @c Null object array means
13582 all existing objects.
13583 </note>
13584 </desc>
13585 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13586 <desc>
13587 Metric name filter. Currently, only a comma-separated list of metrics
13588 is supported.
13589 </desc>
13590 </param>
13591 <param name="objects" type="$unknown" dir="in" safearray="yes">
13592 <desc>
13593 Set of objects to return metric parameters for.
13594 </desc>
13595 </param>
13596 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13597 <desc>
13598 Array of returned metric parameters.
13599 </desc>
13600 </param>
13601 </method>
13602
13603 <method name="setupMetrics">
13604 <desc>
13605 Sets parameters of specified base metrics for a set of objects. Returns
13606 an array of <link to="IPerformanceMetric" /> describing the metrics
13607 have been affected.
13608 <note>
13609 @c Null or empty metric name array means all metrics. @c Null or
13610 empty object array means all existing objects. If metric name array
13611 contains a single element and object array contains many, the single
13612 metric name array element is applied to each object array element to
13613 form metric/object pairs.
13614 </note>
13615 </desc>
13616 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13617 <desc>
13618 Metric name filter. Comma-separated list of metrics with wildcard
13619 support.
13620 </desc>
13621 </param>
13622 <param name="objects" type="$unknown" dir="in" safearray="yes">
13623 <desc>
13624 Set of objects to setup metric parameters for.
13625 </desc>
13626 </param>
13627 <param name="period" type="unsigned long" dir="in">
13628 <desc>
13629 Time interval in seconds between two consecutive samples of
13630 performance data.
13631 </desc>
13632 </param>
13633 <param name="count" type="unsigned long" dir="in">
13634 <desc>
13635 Number of samples to retain in performance data history. Older
13636 samples get discarded.
13637 </desc>
13638 </param>
13639 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13640 <desc>
13641 Array of metrics that have been modified by the call to this method.
13642 </desc>
13643 </param>
13644 </method>
13645
13646 <method name="enableMetrics">
13647 <desc>
13648 Turns on collecting specified base metrics. Returns an array of
13649 <link to="IPerformanceMetric" /> describing the metrics have been
13650 affected.
13651 <note>
13652 @c Null or empty metric name array means all metrics. @c Null or
13653 empty object array means all existing objects. If metric name array
13654 contains a single element and object array contains many, the single
13655 metric name array element is applied to each object array element to
13656 form metric/object pairs.
13657 </note>
13658 </desc>
13659 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13660 <desc>
13661 Metric name filter. Comma-separated list of metrics with wildcard
13662 support.
13663 </desc>
13664 </param>
13665 <param name="objects" type="$unknown" dir="in" safearray="yes">
13666 <desc>
13667 Set of objects to enable metrics for.
13668 </desc>
13669 </param>
13670 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13671 <desc>
13672 Array of metrics that have been modified by the call to this method.
13673 </desc>
13674 </param>
13675 </method>
13676
13677 <method name="disableMetrics">
13678 <desc>
13679 Turns off collecting specified base metrics. Returns an array of
13680 <link to="IPerformanceMetric" /> describing the metrics have been
13681 affected.
13682 <note>
13683 @c Null or empty metric name array means all metrics. @c Null or
13684 empty object array means all existing objects. If metric name array
13685 contains a single element and object array contains many, the single
13686 metric name array element is applied to each object array element to
13687 form metric/object pairs.
13688 </note>
13689 </desc>
13690 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13691 <desc>
13692 Metric name filter. Comma-separated list of metrics with wildcard
13693 support.
13694 </desc>
13695 </param>
13696 <param name="objects" type="$unknown" dir="in" safearray="yes">
13697 <desc>
13698 Set of objects to disable metrics for.
13699 </desc>
13700 </param>
13701 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13702 <desc>
13703 Array of metrics that have been modified by the call to this method.
13704 </desc>
13705 </param>
13706 </method>
13707
13708 <method name="queryMetricsData">
13709 <desc>
13710 Queries collected metrics data for a set of objects.
13711
13712 The data itself and related metric information are returned in seven
13713 parallel and one flattened array of arrays. Elements of
13714 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13715 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13716 the same index describe one set of values corresponding to a single
13717 metric.
13718
13719 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13720 start and length of a sub-array is indicated by
13721 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13722 value for metric <tt>metricNames[i]</tt> is at
13723 <tt>returnData[returnIndices[i]]</tt>.
13724
13725 <note>
13726 @c Null or empty metric name array means all metrics. @c Null or
13727 empty object array means all existing objects. If metric name array
13728 contains a single element and object array contains many, the single
13729 metric name array element is applied to each object array element to
13730 form metric/object pairs.
13731 </note>
13732 <note>
13733 Data collection continues behind the scenes after call to @c
13734 queryMetricsData. The return data can be seen as the snapshot of the
13735 current state at the time of @c queryMetricsData call. The internally
13736 kept metric values are not cleared by the call. This makes possible
13737 querying different subsets of metrics or aggregates with subsequent
13738 calls. If periodic querying is needed it is highly suggested to query
13739 the values with @c interval*count period to avoid confusion. This way
13740 a completely new set of data values will be provided by each query.
13741 </note>
13742 </desc>
13743 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13744 <desc>
13745 Metric name filter. Comma-separated list of metrics with wildcard
13746 support.
13747 </desc>
13748 </param>
13749 <param name="objects" type="$unknown" dir="in" safearray="yes">
13750 <desc>
13751 Set of objects to query metrics for.
13752 </desc>
13753 </param>
13754 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13755 <desc>
13756 Names of metrics returned in @c returnData.
13757 </desc>
13758 </param>
13759 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13760 <desc>
13761 Objects associated with metrics returned in @c returnData.
13762 </desc>
13763 </param>
13764 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13765 <desc>
13766 Units of measurement for each returned metric.
13767 </desc>
13768 </param>
13769 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13770 <desc>
13771 Divisor that should be applied to return values in order to get
13772 floating point values. For example:
13773 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13774 will retrieve the floating point value of i-th sample of the first
13775 metric.
13776 </desc>
13777 </param>
13778 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13779 <desc>
13780 Sequence numbers of the first elements of value sequences of
13781 particular metrics returned in @c returnData. For aggregate metrics
13782 it is the sequence number of the sample the aggregate started
13783 calculation from.
13784 </desc>
13785 </param>
13786 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13787 <desc>
13788 Indices of the first elements of value sequences of particular
13789 metrics returned in @c returnData.
13790 </desc>
13791 </param>
13792 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13793 <desc>
13794 Lengths of value sequences of particular metrics.
13795 </desc>
13796 </param>
13797 <param name="returnData" type="long" dir="return" safearray="yes">
13798 <desc>
13799 Flattened array of all metric data containing sequences of values for
13800 each metric.
13801 </desc>
13802 </param>
13803 </method>
13804
13805 </interface>
13806 <enum
13807 name="NATAliasMode"
13808 uuid="67772168-50d9-11df-9669-7fb714ee4fa1">
13809 <desc></desc>
13810 <const name="AliasLog" value="0x1">
13811 <desc></desc>
13812 </const>
13813 <const name="AliasProxyOnly" value="0x02">
13814 <desc></desc>
13815 </const>
13816 <const name="AliasUseSamePorts" value="0x04">
13817 <desc></desc>
13818 </const>
13819 </enum>
13820 <enum
13821 name="NATProtocol"
13822 uuid="e90164be-eb03-11de-94af-fff9b1c1b19f"
13823 >
13824 <desc>Protocol definitions used with NAT port-forwarding rules.</desc>
13825 <const name="UDP" value="0">
13826 <desc>Port-forwarding uses UDP protocol.</desc>
13827 </const>
13828 <const name="TCP" value="1">
13829 <desc>Port-forwarding uses TCP protocol.</desc>
13830 </const>
13831 </enum>
13832
13833 <interface
13834 name="INATEngine" extends="$unknown"
13835 uuid="4b286616-eb03-11de-b0fb-1701eca42246"
13836 wsmap="managed"
13837 >
13838 <desc>Interface for managing a NAT engine which is used with a virtual machine. This
13839 allows for changing NAT behavior such as port-forwarding rules. This interface is
13840 used in the <link to="INetworkAdapter::natDriver" /> attribute.</desc>
13841 <attribute name="network" type="wstring">
13842 <desc>The network attribute of the NAT engine (the same value is used with built-in
13843 DHCP server to fill corresponding fields of DHCP leases).</desc>
13844 </attribute>
13845 <attribute name="hostIP" type="wstring">
13846 <desc>IP of host interface to bind all opened sockets to.
13847 <note>Changing this does not change binding of port forwarding.</note>
13848 </desc>
13849 </attribute>
13850 <attribute name="tftpPrefix" type="wstring">
13851 <desc>TFTP prefix attribute which is used with the built-in DHCP server to fill
13852 the corresponding fields of DHCP leases.</desc>
13853 </attribute>
13854 <attribute name="tftpBootFile" type="wstring">
13855 <desc>TFTP boot file attribute which is used with the built-in DHCP server to fill
13856 the corresponding fields of DHCP leases.</desc>
13857 </attribute>
13858 <attribute name="tftpNextServer" type="wstring">
13859 <desc>TFTP server attribute which is used with the built-in DHCP server to fill
13860 the corresponding fields of DHCP leases.
13861 <note>The preferred form is IPv4 addresses.</note>
13862 </desc>
13863 </attribute>
13864 <attribute name="aliasMode" type="unsigned long">
13865 <desc></desc>
13866 </attribute>
13867 <attribute name="dnsPassDomain" type="boolean">
13868 <desc>Whether the DHCP server should pass the DNS domain used by the host.</desc>
13869 </attribute>
13870 <attribute name="dnsProxy" type="boolean">
13871 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
13872 of the DNS proxy and process traffic using DNS servers registered on the host.</desc>
13873 </attribute>
13874 <attribute name="dnsUseHostResolver" type="boolean">
13875 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
13876 of the DNS proxy and process traffic using the host resolver mechanism.</desc>
13877 </attribute>
13878 <attribute name="redirects" type="wstring" readonly="yes" safearray="yes">
13879 <desc>Array of NAT port-forwarding rules in string representation, in the following
13880 format: "name,protocol id,host ip,host port,guest ip,guest port".</desc>
13881 </attribute>
13882 <method name="setNetworkSettings">
13883 <desc>Sets network configuration of the NAT engine.</desc>
13884 <param name="mtu" type="unsigned long" dir="in">
13885 <desc>MTU (maximum transmission unit) of the NAT engine in bytes.</desc>
13886 </param>
13887 <param name="sockSnd" type="unsigned long" dir="in">
13888 <desc>Capacity of the socket send buffer in bytes when creating a new socket.</desc>
13889 </param>
13890 <param name="sockRcv" type="unsigned long" dir="in">
13891 <desc>Capacity of the socket receive buffer in bytes when creating a new socket.</desc>
13892 </param>
13893 <param name="TcpWndSnd" type="unsigned long" dir="in">
13894 <desc>Initial size of the NAT engine's sending TCP window in bytes when
13895 establishing a new TCP connection.</desc>
13896 </param>
13897 <param name="TcpWndRcv" type="unsigned long" dir="in">
13898 <desc>Initial size of the NAT engine's receiving TCP window in bytes when
13899 establishing a new TCP connection.</desc>
13900 </param>
13901 </method>
13902 <method name="getNetworkSettings">
13903 <desc>Returns network configuration of NAT engine. See <link to="#setNetworkSettings" />
13904 for parameter descriptions.</desc>
13905 <param name="mtu" type="unsigned long" dir="out" />
13906 <param name="sockSnd" type="unsigned long" dir="out" />
13907 <param name="sockRcv" type="unsigned long" dir="out" />
13908 <param name="TcpWndSnd" type="unsigned long" dir="out" />
13909 <param name="TcpWndRcv" type="unsigned long" dir="out" />
13910 </method>
13911 <method name="addRedirect">
13912 <desc>Adds a new NAT port-forwarding rule.</desc>
13913 <param name="name" type="wstring" dir="in">
13914 <desc>The name of the rule. An empty name is acceptable, in which case the NAT engine
13915 auto-generates one using the other parameters.</desc>
13916 </param>
13917 <param name="proto" type="NATProtocol" dir="in">
13918 <desc>Protocol handled with the rule.</desc>
13919 </param>
13920 <param name="hostIp" type="wstring" dir="in">
13921 <desc>IP of the host interface to which the rule should apply. An empty ip address is
13922 acceptable, in which case the NAT engine binds the handling socket to any interface.</desc>
13923 </param>
13924 <param name="hostPort" type="unsigned short" dir="in">
13925 <desc>The port number to listen on.</desc>
13926 </param>
13927 <param name="guestIp" type="wstring" dir="in">
13928 <desc>The IP address of the guest which the NAT engine will forward matching packets
13929 to. An empty IP address is acceptable, in which case the NAT engine will forward
13930 packets to the first DHCP lease (x.x.x.15).</desc>
13931 </param>
13932 <param name="guestPort" type="unsigned short" dir="in">
13933 <desc>The port number to forward.</desc>
13934 </param>
13935 </method>
13936 <method name="removeRedirect">
13937 <desc>Removes a port-forwarding rule that was previously registered.</desc>
13938 <param name="name" type="wstring" dir="in">
13939 <desc>The name of the rule to delete.</desc>
13940 </param>
13941 </method>
13942 </interface>
13943
13944 <enum
13945 name="VBoxEventType"
13946 uuid="e085d0b1-05e6-4f40-a709-b7266fbdb236">
13947
13948 <desc>
13949 Type of an event.
13950 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
13951 </desc>
13952
13953 <const name="Invalid" value="0">
13954 <desc>
13955 Invalid event, must be first.
13956 </desc>
13957 </const>
13958
13959 <const name="Any" value="1">
13960 <desc>
13961 Wildcard for all events.
13962 Events of this type are never delivered, and only used in
13963 registerListener() call to simplify registration.
13964 </desc>
13965 </const>
13966
13967 <const name="Vetoable" value="2">
13968 <desc>
13969 Wildcard for all vetoable events. Events of this type are never delivered, and only
13970 used in registerListener() call to simplify registration.
13971 </desc>
13972 </const>
13973
13974 <const name="MachineEvent" value="3">
13975 <desc>
13976 Wildcard for all machine events. Events of this type are never delivered, and only used in
13977 registerListener() call to simplify registration.
13978 </desc>
13979 </const>
13980
13981 <const name="SnapshotEvent" value="4">
13982 <desc>
13983 Wildcard for all snapshot events. Events of this type are never delivered, and only used in
13984 registerListener() call to simplify registration.
13985 </desc>
13986 </const>
13987
13988 <const name="InputEvent" value="5">
13989 <desc>
13990 Wildcard for all input device (keyboard, mouse) events.
13991 Events of this type are never delivered, and only used in
13992 registerListener() call to simplify registration.
13993 </desc>
13994 </const>
13995
13996 <const name="LastWildcard" value="31">
13997 <desc>
13998 Last wildcard.
13999 </desc>
14000 </const>
14001
14002 <const name="OnMachineStateChanged" value="32">
14003 <desc>
14004 See <link to="IMachineStateChangedEvent">IMachineStateChangedEvent</link>.
14005 </desc>
14006 </const>
14007 <const name="OnMachineDataChanged" value="33">
14008 <desc>
14009 See <link to="IMachineDataChangedEvent">IMachineDataChangedEvent</link>.
14010 </desc>
14011 </const>
14012 <const name="OnExtraDataChanged" value="34">
14013 <desc>
14014 See <link to="IExtraDataChangedEvent">IExtraDataChangedEvent</link>.
14015 </desc>
14016 </const>
14017 <const name="OnExtraDataCanChange" value="35">
14018 <desc>
14019 See <link to="IExtraDataCanChangeEvent">IExtraDataCanChangeEvent</link>.
14020 </desc>
14021 </const>
14022 <const name="OnMediumRegistered" value="36">
14023 <desc>
14024 See <link to="IMediumRegisteredEvent">IMediumRegisteredEvent</link>.
14025 </desc>
14026 </const>
14027 <const name="OnMachineRegistered" value="37">
14028 <desc>
14029 See <link to="IMachineRegisteredEvent">IMachineRegisteredEvent</link>.
14030 </desc>
14031 </const>
14032 <const name="OnSessionStateChanged" value="38">
14033 <desc>
14034 See <link to="ISessionStateChangedEvent">ISessionStateChangedEvent</link>.
14035 </desc>
14036 </const>
14037 <const name="OnSnapshotTaken" value="39">
14038 <desc>
14039 See <link to="ISnapshotTakenEvent">ISnapshotTakenEvent</link>.
14040 </desc>
14041 </const>
14042 <const name="OnSnapshotDeleted" value="40">
14043 <desc>
14044 See <link to="ISnapshotDeletedEvent">ISnapshotDeletedEvent</link>.
14045 </desc>
14046 </const>
14047 <const name="OnSnapshotChanged" value="41">
14048 <desc>
14049 See <link to="ISnapshotChangedEvent">ISnapshotChangedEvent</link>.
14050 </desc>
14051 </const>
14052 <const name="OnGuestPropertyChanged" value="42">
14053 <desc>
14054 See <link to="IGuestPropertyChangedEvent">IGuestPropertyChangedEvent</link>.
14055 </desc>
14056 </const>
14057 <!-- Console events -->
14058 <const name="OnMousePointerShapeChanged" value="43">
14059 <desc>
14060 See <link to="IMousePointerShapeChangedEvent">IMousePointerShapeChangedEvent</link>.
14061 </desc>
14062 </const>
14063 <const name="OnMouseCapabilityChanged" value="44">
14064 <desc>
14065 See <link to="IMouseCapabilityChangedEvent">IMouseCapabilityChangedEvent</link>.
14066 </desc>
14067 </const>
14068 <const name="OnKeyboardLedsChanged" value="45">
14069 <desc>
14070 See <link to="IKeyboardLedsChangedEvent">IKeyboardLedsChangedEvent</link>.
14071 </desc>
14072 </const>
14073 <const name="OnStateChanged" value="46">
14074 <desc>
14075 See <link to="IStateChangedEvent">IStateChangedEvent</link>.
14076 </desc>
14077 </const>
14078 <const name="OnAdditionsStateChanged" value="47">
14079 <desc>
14080 See <link to="IAdditionsStateChangedEvent">IAdditionsStateChangedEvent</link>.
14081 </desc>
14082 </const>
14083 <const name="OnNetworkAdapterChanged" value="48">
14084 <desc>
14085 See <link to="INetworkAdapterChangedEvent">INetworkAdapterChangedEvent</link>.
14086 </desc>
14087 </const>
14088 <const name="OnSerialPortChanged" value="49">
14089 <desc>
14090 See <link to="ISerialPortChangedEvent">ISerialPortChangedEvent</link>.
14091 </desc>
14092 </const>
14093 <const name="OnParallelPortChanged" value="50">
14094 <desc>
14095 See <link to="IParallelPortChangedEvent">IParallelPortChangedEvent</link>.
14096 </desc>
14097 </const>
14098 <const name="OnStorageControllerChanged" value="51">
14099 <desc>
14100 See <link to="IStorageControllerChangedEvent">IStorageControllerChangedEvent</link>.
14101 </desc>
14102 </const>
14103 <const name="OnMediumChanged" value="52">
14104 <desc>
14105 See <link to="IMediumChangedEvent">IMediumChangedEvent</link>.
14106 </desc>
14107 </const>
14108 <const name="OnVRDEServerChanged" value="53">
14109 <desc>
14110 See <link to="IVRDEServerChangedEvent">IVRDEServerChangedEvent</link>.
14111 </desc>
14112 </const>
14113 <const name="OnUSBControllerChanged" value="54">
14114 <desc>
14115 See <link to="IUSBControllerChangedEvent">IUSBControllerChangedEvent</link>.
14116 </desc>
14117 </const>
14118 <const name="OnUSBDeviceStateChanged" value="55">
14119 <desc>
14120 See <link to="IUSBDeviceStateChangedEvent">IUSBDeviceStateChangedEvent</link>.
14121 </desc>
14122 </const>
14123 <const name="OnSharedFolderChanged" value="56">
14124 <desc>
14125 See <link to="ISharedFolderChangedEvent">ISharedFolderChangedEvent</link>.
14126 </desc>
14127 </const>
14128 <const name="OnRuntimeError" value="57">
14129 <desc>
14130 See <link to="IRuntimeErrorEvent">IRuntimeErrorEvent</link>.
14131 </desc>
14132 </const>
14133 <const name="OnCanShowWindow" value="58">
14134 <desc>
14135 See <link to="ICanShowWindowEvent">ICanShowWindowEvent</link>.
14136 </desc>
14137 </const>
14138 <const name="OnShowWindow" value="59">
14139 <desc>
14140 See <link to="IShowWindowEvent">IShowWindowEvent</link>.
14141 </desc>
14142 </const>
14143 <const name="OnCPUChanged" value="60">
14144 <desc>
14145 See <link to="ICPUChangedEvent">ICPUChangedEvent</link>.
14146 </desc>
14147 </const>
14148 <const name="OnVRDEServerInfoChanged" value="61">
14149 <desc>
14150 See <link to="IVRDEServerInfoChangedEvent">IVRDEServerInfoChangedEvent</link>.
14151 </desc>
14152 </const>
14153 <const name="OnEventSourceChanged" value="62">
14154 <desc>
14155 See <link to="IEventSourceChangedEvent">IEventSourceChangedEvent</link>.
14156 </desc>
14157 </const>
14158 <const name="OnCPUExecutionCapChanged" value="63">
14159 <desc>
14160 See <link to="ICPUExecutionCapChangedEvent">ICPUExecutionCapChangedEvent</link>.
14161 </desc>
14162 </const>
14163 <const name="OnGuestKeyboardEvent" value="64">
14164 <desc>
14165 See <link to="IGuestKeyboardEvent">IGuestKeyboardEvent</link>.
14166 </desc>
14167 </const>
14168 <const name="OnGuestMouseEvent" value="65">
14169 <desc>
14170 See <link to="IGuestMouseEvent">IGuestMouseEvent</link>.
14171 </desc>
14172 </const>
14173 <!-- Last event marker -->
14174 <const name="Last" value="66">
14175 <desc>
14176 Must be last event, used for iterations and structures relying on numerical event values.
14177 </desc>
14178 </const>
14179
14180 </enum>
14181
14182 <interface
14183 name="IEventSource" extends="$unknown"
14184 uuid="9b6e1aee-35f3-4f4d-b5bb-ed0ecefd8538"
14185 wsmap="managed"
14186 >
14187 <desc>
14188 Event source. Generally, any object which could generate events can be an event source,
14189 or aggregate one. To simplify using one-way protocols such as webservices running on top of HTTP(S),
14190 an event source can work with listeners in either active or passive mode. In active mode it is up to
14191 the IEventSource implementation to call <link to="IEventListener::handleEvent" />, in passive mode the
14192 event source keeps track of pending events for each listener and returns available events on demand.
14193
14194 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
14195 </desc>
14196
14197 <method name="createListener">
14198 <desc>
14199 Creates a new listener object, useful for passive mode.
14200 </desc>
14201 <param name="listener" type="IEventListener" dir="return"/>
14202 </method>
14203
14204 <method name="createAggregator">
14205 <desc>
14206 Creates a aggregator event source, collecting events from multiple sources.
14207 This way single listener can listen for events coming from multiple sources,
14208 using single blocking getEvent() of this aggregator.
14209 </desc>
14210 <param name="subordinates" type="IEventSource" dir="in" safearray="yes">
14211 <desc>
14212 Subordinate event source this one aggregatres.
14213 </desc>
14214 </param>
14215 <param name="result" type="IEventSource" dir="return"/>
14216 </method>
14217
14218 <method name="registerListener">
14219 <desc>
14220 Register an event listener.
14221
14222 <note>
14223 To avoid system overload, the VirtualBox server process checks if passive event
14224 listeners call <link to="IEventSource::getEvent"/> frequently enough. In the
14225 current implementation, if more than 500 pending events are detected for a passive
14226 event listener, it is forcefully unregistered by the system, and further
14227 <link to="#getEvent" /> calls will return @c VBOX_E_OBJECT_NOT_FOUND.
14228 </note>
14229 </desc>
14230 <param name="listener" type="IEventListener" dir="in">
14231 <desc>Listener to register.</desc>
14232 </param>
14233 <param name="interesting" type="VBoxEventType" dir="in" safearray="yes">
14234 <desc>
14235 Event types listener is interested in. One can use wildcards like -
14236 <link to="VBoxEventType_Any"/> to specify wildcards, matching more
14237 than one event.
14238 </desc>
14239 </param>
14240 <param name="active" type="boolean" dir="in">
14241 <desc>
14242 Which mode this listener is operating in.
14243 In active mode, <link to="IEventListener::handleEvent" /> is called directly.
14244 In passive mode, an internal event queue is created for this this IEventListener.
14245 For each event coming in, it is added to queues for all interested registered passive
14246 listeners. It is then up to the external code to call the listener's
14247 <link to="IEventListener::handleEvent" /> method. When done with an event, the
14248 external code must call <link to="#eventProcessed" />.
14249 </desc>
14250 </param>
14251 </method>
14252
14253 <method name="unregisterListener">
14254 <desc>
14255 Unregister an event listener. If listener is passive, and some waitable events are still
14256 in queue they are marked as processed automatically.
14257 </desc>
14258 <param name="listener" type="IEventListener" dir="in">
14259 <desc>Listener to unregister.</desc>
14260 </param>
14261 </method>
14262
14263 <method name="fireEvent">
14264 <desc>
14265 Fire an event for this source.
14266 </desc>
14267 <param name="event" type="IEvent" dir="in">
14268 <desc>Event to deliver.</desc>
14269 </param>
14270 <param name="timeout" type="long" dir="in">
14271 <desc>
14272 Maximum time to wait for event processing (if event is waitable), in ms;
14273 0 = no wait, -1 = indefinite wait.
14274 </desc>
14275 </param>
14276 <param name="result" type="boolean" dir="return">
14277 <desc>true if an event was delivered to all targets, or is non-waitable.</desc>
14278 </param>
14279 </method>
14280
14281 <method name="getEvent">
14282 <desc>
14283 Get events from this peer's event queue (for passive mode). Calling this method
14284 regularly is required for passive event listeners to avoid system overload;
14285 see <link to="IEventSource::registerListener" /> for details.
14286
14287 <result name="VBOX_E_OBJECT_NOT_FOUND">
14288 Listener is not registered, or autounregistered.
14289 </result>
14290 </desc>
14291 <param name="listener" type="IEventListener" dir="in">
14292 <desc>Which listener to get data for.</desc>
14293 </param>
14294 <param name="timeout" type="long" dir="in">
14295 <desc>
14296 Maximum time to wait for events, in ms;
14297 0 = no wait, -1 = indefinite wait.
14298 </desc>
14299 </param>
14300 <param name="event" type="IEvent" dir="return">
14301 <desc>Event retrieved, or null if none available.</desc>
14302 </param>
14303 </method>
14304
14305 <method name="eventProcessed">
14306 <desc>
14307 Must be called for waitable events after a particular listener finished its
14308 event processing. When all listeners of a particular event have called this
14309 method, the system will then call <link to="IEvent::setProcessed" />.
14310 </desc>
14311 <param name="listener" type="IEventListener" dir="in">
14312 <desc>Which listener processed event.</desc>
14313 </param>
14314 <param name="event" type="IEvent" dir="in">
14315 <desc>Which event.</desc>
14316 </param>
14317 </method>
14318
14319 </interface>
14320
14321 <interface
14322 name="IEventListener" extends="$unknown"
14323 uuid="67099191-32e7-4f6c-85ee-422304c71b90"
14324 wsmap="managed"
14325 >
14326 <desc>
14327 Event listener. An event listener can work in either active or passive mode, depending on the way
14328 it was registered.
14329 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
14330 </desc>
14331
14332 <method name="handleEvent">
14333 <desc>
14334 Handle event callback (called directly by IEventSource in active mode, or could be
14335 called by event processor thread in passive mode).
14336 </desc>
14337 <param name="event" type="IEvent" dir="in">
14338 <desc>Event available.</desc>
14339 </param>
14340 </method>
14341
14342 </interface>
14343
14344 <interface
14345 name="IEvent" extends="$unknown"
14346 uuid="0ca2adba-8f30-401b-a8cd-fe31dbe839c0"
14347 wsmap="managed"
14348 >
14349 <desc>
14350 Abstract parent interface for VirtualBox events. Actual events will typically implement
14351 a more specific interface which derives from this (see below).
14352
14353 <b>Introduction to VirtualBox events</b>
14354
14355 Generally speaking, an event (represented by this interface) signals that something
14356 happened, while an event listener (see <link to="IEventListener" />) represents an
14357 entity that is interested in certain events. In order for this to work with
14358 unidirectional protocols (i.e. web services), the concepts of passive and active
14359 listener are used.
14360
14361 Event consumers can register themselves as listeners, providing an array of
14362 events they are interested in (see <link to="IEventSource::registerListener" />).
14363 When an event triggers, the listener is notified about the event. The exact
14364 mechanism of the notification depends on whether the listener was registered as
14365 an active or passive listener:
14366
14367 <ul>
14368 <li>An active listener is very similar to a callback: it is a function invoked
14369 by the API. As opposed to the callbacks that were used in the API before
14370 VirtualBox 3.3 however, events are now objects with an interface hierarchy.
14371 </li>
14372
14373 <li>Passive listeners are somewhat tricker to implement, but do not require
14374 a client function to be callable, which is not an option with scripting
14375 languages or web service clients. Internally the <link to="IEventSource" />
14376 implementation maintains an event queue for each passive listener, and
14377 newly arrived events are put in this queue. When the listener calls
14378 <link to="IEventSource::getEvent"/>, first element from its internal event
14379 queue is returned. When the client completes processing of an event,
14380 the <link to="IEventSource::eventProcessed" /> function must be called,
14381 acknowledging that the event was processed. It supports implementing
14382 waitable events. On passive listener unregistration, all events from its
14383 queue are auto-acknowledged.
14384 </li>
14385 </ul>
14386
14387 Waitable events are useful in situations where the event generator wants to track
14388 delivery or a party wants to wait until all listeners have completed the event. A
14389 typical example would be a vetoable event (see <link to="IVetoEvent" />) where a
14390 listeners might veto a certain action, and thus the event producer has to make
14391 sure that all listeners have processed the event and not vetoed before taking
14392 the action.
14393
14394 A given event may have both passive and active listeners at the same time.
14395
14396 <b>Using events</b>
14397
14398 Any VirtualBox object capable of producing externally visible events provides an
14399 @c eventSource read-only attribute, which is of the type <link to="IEventSource" />.
14400 This event source object is notified by VirtualBox once something has happened, so
14401 consumers may register event listeners with this event source. To register a listener,
14402 an object implementing the <link to="IEventListener" /> interface must be provided.
14403 For active listeners, such an object is typically created by the consumer, while for
14404 passive listeners <link to="IEventSource::createListener" /> should be used. Please
14405 note that a listener created with @c createListener() must not be used as an active listener.
14406
14407 Once created, the listener must be registered to listen for the desired events
14408 (see <link to="IEventSource::registerListener" />), providing an array of
14409 <link to="VBoxEventType" /> enums. Those elements can either be the individual
14410 event IDs or wildcards matching multiple event IDs.
14411
14412 After registration, the callback's <link to="IEventListener::handleEvent" /> method is
14413 called automatically when the event is triggered, while passive listeners have to call
14414 <link to="IEventSource::getEvent" /> and <link to="IEventSource::eventProcessed" /> in
14415 an event processing loop.
14416
14417 The IEvent interface is an abstract parent interface for all such VirtualBox events
14418 coming in. As a result, the standard use pattern inside <link to="IEventListener::handleEvent" />
14419 or the event processing loop is to check the <link to="#type" /> attribute of the event and
14420 then cast to the appropriate specific interface using @c QueryInterface().
14421 </desc>
14422
14423 <attribute name="type" readonly="yes" type="VBoxEventType">
14424 <desc>
14425 Event type.
14426 </desc>
14427 </attribute>
14428
14429 <attribute name="source" readonly="yes" type="IEventSource">
14430 <desc>
14431 Source of this event.
14432 </desc>
14433 </attribute>
14434
14435 <attribute name="waitable" readonly="yes" type="boolean">
14436 <desc>
14437 If we can wait for this event being processed. If false, waitProcessed() returns immediately,
14438 and setProcessed() doesn't make sense. Non-waitable events are generally better performing,
14439 as no additional overhead associated with waitability imposed.
14440 Waitable events are needed when one need to be able to wait for particular event processed,
14441 for example for vetoable changes, or if event refers to some resource which need to be kept immutable
14442 until all consumers confirmed events.
14443 </desc>
14444 </attribute>
14445
14446 <method name="setProcessed">
14447 <desc>
14448 Internal method called by the system when all listeners of a particular event have called
14449 <link to="IEventSource::eventProcessed" />. This should not be called by client code.
14450 </desc>
14451 </method>
14452
14453 <method name="waitProcessed">
14454 <desc>
14455 Wait until time outs, or this event is processed. Event must be waitable for this operation to have
14456 described semantics, for non-waitable returns true immediately.
14457 </desc>
14458 <param name="timeout" type="long" dir="in">
14459 <desc>
14460 Maximum time to wait for event processeing, in ms;
14461 0 = no wait, -1 = indefinite wait.
14462 </desc>
14463 </param>
14464 <param name="result" type="boolean" dir="return">
14465 <desc>If this event was processed before timeout.</desc>
14466 </param>
14467 </method>
14468 </interface>
14469
14470
14471 <interface
14472 name="IReusableEvent" extends="IEvent"
14473 uuid="69bfb134-80f6-4266-8e20-16371f68fa25"
14474 wsmap="managed"
14475 >
14476 <desc>Base abstract interface for all reusable events.</desc>
14477
14478 <attribute name="generation" readonly="yes" type="unsigned long">
14479 <desc>Current generation of event, incremented on reuse.</desc>
14480 </attribute>
14481
14482 <method name="reuse">
14483 <desc>
14484 Marks an event as reused, increments 'generation', fields shall no
14485 longer be considered valid.
14486 </desc>
14487 </method>
14488 </interface>
14489
14490 <interface
14491 name="IMachineEvent" extends="IEvent"
14492 uuid="92ed7b1a-0d96-40ed-ae46-a564d484325e"
14493 wsmap="managed" id="MachineEvent"
14494 >
14495 <desc>Base abstract interface for all machine events.</desc>
14496
14497 <attribute name="machineId" readonly="yes" type="uuid" mod="string">
14498 <desc>ID of the machine this event relates to.</desc>
14499 </attribute>
14500
14501 </interface>
14502
14503 <interface
14504 name="IMachineStateChangedEvent" extends="IMachineEvent"
14505 uuid="5748F794-48DF-438D-85EB-98FFD70D18C9"
14506 wsmap="managed" autogen="VBoxEvent" id="OnMachineStateChanged"
14507 >
14508 <desc>Machine state change event.</desc>
14509
14510 <attribute name="state" readonly="yes" type="MachineState">
14511 <desc>New execution state.</desc>
14512 </attribute>
14513 </interface>
14514
14515 <interface
14516 name="IMachineDataChangedEvent" extends="IMachineEvent"
14517 uuid="6AA70A6C-0DCA-4810-8C5C-457B278E3D49"
14518 wsmap="managed" autogen="VBoxEvent" id="OnMachineDataChanged"
14519 >
14520 <desc>
14521 Any of the settings of the given machine has changed.
14522 </desc>
14523 </interface>
14524
14525 <interface
14526 name="IMediumRegisteredEvent" extends="IEvent"
14527 uuid="53fac49a-b7f1-4a5a-a4ef-a11dd9c2a458"
14528 wsmap="managed" autogen="VBoxEvent" id="OnMediumRegistered"
14529 >
14530 <desc>
14531 The given medium was registered or unregistered
14532 within this VirtualBox installation.
14533 </desc>
14534
14535 <attribute name="mediumId" readonly="yes" type="uuid" mod="string">
14536 <desc>ID of the medium this event relates to.</desc>
14537 </attribute>
14538
14539 <attribute name="mediumType" readonly="yes" type="DeviceType">
14540 <desc>Type of the medium this event relates to.</desc>
14541 </attribute>
14542
14543 <attribute name="registered" type="boolean" readonly="yes">
14544 <desc>
14545 If @c true, the medium was registered, otherwise it was
14546 unregistered.
14547 </desc>
14548 </attribute>
14549 </interface>
14550
14551 <interface
14552 name="IMachineRegisteredEvent" extends="IMachineEvent"
14553 uuid="c354a762-3ff2-4f2e-8f09-07382ee25088"
14554 wsmap="managed" autogen="VBoxEvent" id="OnMachineRegistered"
14555 >
14556 <desc>
14557 The given machine was registered or unregistered
14558 within this VirtualBox installation.
14559 </desc>
14560
14561 <attribute name="registered" type="boolean" readonly="yes">
14562 <desc>
14563 If @c true, the machine was registered, otherwise it was
14564 unregistered.
14565 </desc>
14566 </attribute>
14567 </interface>
14568
14569 <interface
14570 name="ISessionStateChangedEvent" extends="IMachineEvent"
14571 uuid="714a3eef-799a-4489-86cd-fe8e45b2ff8e"
14572 wsmap="managed" autogen="VBoxEvent" id="OnSessionStateChanged"
14573 >
14574 <desc>
14575 The state of the session for the given machine was changed.
14576 <see>IMachine::sessionState</see>
14577 </desc>
14578
14579 <attribute name="state" type="SessionState" readonly="yes">
14580 <desc>
14581 New session state.
14582 </desc>
14583 </attribute>
14584 </interface>
14585
14586 <interface
14587 name="IGuestPropertyChangedEvent" extends="IMachineEvent"
14588 uuid="3f63597a-26f1-4edb-8dd2-6bddd0912368"
14589 wsmap="managed" autogen="VBoxEvent" id="OnGuestPropertyChanged"
14590 >
14591 <desc>
14592 Notification when a guest property has changed.
14593 </desc>
14594
14595 <attribute name="name" readonly="yes" type="wstring">
14596 <desc>
14597 The name of the property that has changed.
14598 </desc>
14599 </attribute>
14600
14601 <attribute name="value" readonly="yes" type="wstring">
14602 <desc>
14603 The new property value.
14604 </desc>
14605 </attribute>
14606
14607 <attribute name="flags" readonly="yes" type="wstring">
14608 <desc>
14609 The new property flags.
14610 </desc>
14611 </attribute>
14612
14613 </interface>
14614
14615 <interface
14616 name="ISnapshotEvent" extends="IMachineEvent"
14617 uuid="21637b0e-34b8-42d3-acfb-7e96daf77c22"
14618 wsmap="managed" id="SnapshotEvent"
14619 >
14620 <desc>Base interface for all snapshot events.</desc>
14621
14622 <attribute name="snapshotId" readonly="yes" type="uuid" mod="string">
14623 <desc>ID of the snapshot this event relates to.</desc>
14624 </attribute>
14625
14626 </interface>
14627
14628 <interface
14629 name="ISnapshotTakenEvent" extends="ISnapshotEvent"
14630 uuid="d27c0b3d-6038-422c-b45e-6d4a0503d9f1"
14631 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotTaken"
14632 >
14633 <desc>
14634 A new snapshot of the machine has been taken.
14635 <see>ISnapshot</see>
14636 </desc>
14637 </interface>
14638
14639 <interface
14640 name="ISnapshotDeletedEvent" extends="ISnapshotEvent"
14641 uuid="c48f3401-4a9e-43f4-b7a7-54bd285e22f4"
14642 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotDeleted"
14643 >
14644 <desc>
14645 Snapshot of the given machine has been deleted.
14646
14647 <note>
14648 This notification is delivered <b>after</b> the snapshot
14649 object has been uninitialized on the server (so that any
14650 attempt to call its methods will return an error).
14651 </note>
14652
14653 <see>ISnapshot</see>
14654 </desc>
14655 </interface>
14656
14657 <interface
14658 name="ISnapshotChangedEvent" extends="ISnapshotEvent"
14659 uuid="07541941-8079-447a-a33e-47a69c7980db"
14660 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotChanged"
14661 >
14662 <desc>
14663 Snapshot properties (name and/or description) have been changed.
14664 <see>ISnapshot</see>
14665 </desc>
14666 </interface>
14667
14668 <interface
14669 name="IMousePointerShapeChangedEvent" extends="IEvent"
14670 uuid="a6dcf6e8-416b-4181-8c4a-45ec95177aef"
14671 wsmap="managed" autogen="VBoxEvent" id="OnMousePointerShapeChanged"
14672 >
14673 <desc>
14674 Notification when the guest mouse pointer shape has
14675 changed. The new shape data is given.
14676 </desc>
14677
14678 <attribute name="visible" type="boolean" readonly="yes">
14679 <desc>
14680 Flag whether the pointer is visible.
14681 </desc>
14682 </attribute>
14683 <attribute name="alpha" type="boolean" readonly="yes">
14684 <desc>
14685 Flag whether the pointer has an alpha channel.
14686 </desc>
14687 </attribute>
14688 <attribute name="xhot" type="unsigned long" readonly="yes">
14689 <desc>
14690 The pointer hot spot X coordinate.
14691 </desc>
14692 </attribute>
14693 <attribute name="yhot" type="unsigned long" readonly="yes">
14694 <desc>
14695 The pointer hot spot Y coordinate.
14696 </desc>
14697 </attribute>
14698 <attribute name="width" type="unsigned long" readonly="yes">
14699 <desc>
14700 Width of the pointer shape in pixels.
14701 </desc>
14702 </attribute>
14703 <attribute name="height" type="unsigned long" readonly="yes">
14704 <desc>
14705 Height of the pointer shape in pixels.
14706 </desc>
14707 </attribute>
14708 <attribute name="shape" type="octet" safearray="yes" readonly="yes">
14709 <desc>
14710 Shape buffer arrays.
14711
14712 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
14713 followed by a 32-bpp XOR (color) mask.
14714
14715 For pointers without alpha channel the XOR mask pixels are 32
14716 bit values: (lsb)BGR0(msb). For pointers with alpha channel
14717 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
14718
14719 An AND mask is used for pointers with alpha channel, so if the
14720 callback does not support alpha, the pointer could be
14721 displayed as a normal color pointer.
14722
14723 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
14724 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
14725 height</tt>. The padding bits at the end of each scanline are
14726 undefined.
14727
14728 The XOR mask follows the AND mask on the next 4-byte aligned
14729 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
14730 Bytes in the gap between the AND and the XOR mask are undefined.
14731 The XOR mask scanlines have no gap between them and the size of
14732 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
14733
14734 <note>
14735 If @a shape is 0, only the pointer visibility is changed.
14736 </note>
14737 </desc>
14738 </attribute>
14739 </interface>
14740
14741 <interface
14742 name="IMouseCapabilityChangedEvent" extends="IEvent"
14743 uuid="d633ad48-820c-4207-b46c-6bd3596640d5"
14744 wsmap="managed" autogen="VBoxEvent" id="OnMouseCapabilityChanged"
14745 >
14746 <desc>
14747 Notification when the mouse capabilities reported by the
14748 guest have changed. The new capabilities are passed.
14749 </desc>
14750 <attribute name="supportsAbsolute" type="boolean" readonly="yes">
14751 <desc>
14752 Supports absolute coordinates.
14753 </desc>
14754 </attribute>
14755 <attribute name="supportsRelative" type="boolean" readonly="yes">
14756 <desc>
14757 Supports relative coordinates.
14758 </desc>
14759 </attribute>
14760 <attribute name="needsHostCursor" type="boolean" readonly="yes">
14761 <desc>
14762 If host cursor is needed.
14763 </desc>
14764 </attribute>
14765 </interface>
14766
14767 <interface
14768 name="IKeyboardLedsChangedEvent" extends="IEvent"
14769 uuid="6DDEF35E-4737-457B-99FC-BC52C851A44F"
14770 wsmap="managed" autogen="VBoxEvent" id="OnKeyboardLedsChanged"
14771 >
14772 <desc>
14773 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
14774 to alter the state of the keyboard LEDs.
14775 </desc>
14776 <attribute name="numLock" type="boolean" readonly="yes">
14777 <desc>
14778 NumLock status.
14779 </desc>
14780 </attribute>
14781 <attribute name="capsLock" type="boolean" readonly="yes">
14782 <desc>
14783 CapsLock status.
14784 </desc>
14785 </attribute>
14786 <attribute name="scrollLock" type="boolean" readonly="yes">
14787 <desc>
14788 ScrollLock status.
14789 </desc>
14790 </attribute>
14791 </interface>
14792
14793 <interface
14794 name="IStateChangedEvent" extends="IEvent"
14795 uuid="4376693C-CF37-453B-9289-3B0F521CAF27"
14796 wsmap="managed" autogen="VBoxEvent" id="OnStateChanged"
14797 >
14798 <desc>
14799 Notification when the execution state of the machine has changed.
14800 The new state is given.
14801 </desc>
14802 <attribute name="state" type="MachineState" readonly="yes">
14803 <desc>
14804 New machine state.
14805 </desc>
14806 </attribute>
14807 </interface>
14808
14809 <interface
14810 name="IAdditionsStateChangedEvent" extends="IEvent"
14811 uuid="D70F7915-DA7C-44C8-A7AC-9F173490446A"
14812 wsmap="managed" autogen="VBoxEvent" id="OnAdditionsStateChanged"
14813 >
14814 <desc>
14815 Notification when a Guest Additions property changes.
14816 Interested callees should query IGuest attributes to
14817 find out what has changed.
14818 </desc>
14819 </interface>
14820
14821 <interface
14822 name="INetworkAdapterChangedEvent" extends="IEvent"
14823 uuid="08889892-1EC6-4883-801D-77F56CFD0103"
14824 wsmap="managed" autogen="VBoxEvent" id="OnNetworkAdapterChanged"
14825 >
14826 <desc>
14827 Notification when a property of one of the
14828 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
14829 changes. Interested callees should use INetworkAdapter methods and
14830 attributes to find out what has changed.
14831 </desc>
14832 <attribute name="networkAdapter" type="INetworkAdapter" readonly="yes">
14833 <desc>
14834 Network adapter that is subject to change.
14835 </desc>
14836 </attribute>
14837 </interface>
14838
14839 <interface
14840 name="ISerialPortChangedEvent" extends="IEvent"
14841 uuid="3BA329DC-659C-488B-835C-4ECA7AE71C6C"
14842 wsmap="managed" autogen="VBoxEvent" id="OnSerialPortChanged"
14843 >
14844 <desc>
14845 Notification when a property of one of the
14846 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
14847 Interested callees should use ISerialPort methods and attributes
14848 to find out what has changed.
14849 </desc>
14850 <attribute name="serialPort" type="ISerialPort" readonly="yes">
14851 <desc>
14852 Serial port that is subject to change.
14853 </desc>
14854 </attribute>
14855 </interface>
14856
14857 <interface
14858 name="IParallelPortChangedEvent" extends="IEvent"
14859 uuid="813C99FC-9849-4F47-813E-24A75DC85615"
14860 wsmap="managed" autogen="VBoxEvent" id="OnParallelPortChanged"
14861 >
14862 <desc>
14863 Notification when a property of one of the
14864 virtual <link to="IMachine::getParallelPort">parallel ports</link>
14865 changes. Interested callees should use ISerialPort methods and
14866 attributes to find out what has changed.
14867 </desc>
14868 <attribute name="parallelPort" type="IParallelPort" readonly="yes">
14869 <desc>
14870 Parallel port that is subject to change.
14871 </desc>
14872 </attribute>
14873 </interface>
14874
14875 <interface
14876 name="IStorageControllerChangedEvent" extends="IEvent"
14877 uuid="715212BF-DA59-426E-8230-3831FAA52C56"
14878 wsmap="managed" autogen="VBoxEvent" id="OnStorageControllerChanged"
14879 >
14880 <desc>
14881 Notification when a
14882 <link to="IMachine::mediumAttachments">medium attachment</link>
14883 changes.
14884 </desc>
14885 </interface>
14886
14887 <interface
14888 name="IMediumChangedEvent" extends="IEvent"
14889 uuid="0FE2DA40-5637-472A-9736-72019EABD7DE"
14890 wsmap="managed" autogen="VBoxEvent" id="OnMediumChanged"
14891 >
14892 <desc>
14893 Notification when a
14894 <link to="IMachine::mediumAttachments">medium attachment</link>
14895 changes.
14896 </desc>
14897 <attribute name="mediumAttachment" type="IMediumAttachment" readonly="yes">
14898 <desc>
14899 Medium attachment that is subject to change.
14900 </desc>
14901 </attribute>
14902 </interface>
14903
14904 <interface
14905 name="ICPUChangedEvent" extends="IEvent"
14906 uuid="D0F0BECC-EE17-4D17-A8CC-383B0EB55E9D"
14907 wsmap="managed" autogen="VBoxEvent" id="OnCPUChanged"
14908 >
14909 <desc>
14910 Notification when a CPU changes.
14911 </desc>
14912 <attribute name="cpu" type="unsigned long" readonly="yes">
14913 <desc>
14914 The CPU which changed.
14915 </desc>
14916 </attribute>
14917 <attribute name="add" type="boolean" readonly="yes">
14918 <desc>
14919 Flag whether the CPU was added or removed.
14920 </desc>
14921 </attribute>
14922 </interface>
14923
14924 <interface
14925 name="ICPUExecutionCapChangedEvent" extends="IEvent"
14926 uuid="dfa7e4f5-b4a4-44ce-85a8-127ac5eb59dc"
14927 wsmap="managed" autogen="VBoxEvent" id="OnCPUExecutionCapChanged"
14928 >
14929 <desc>
14930 Notification when the CPU execution cap changes.
14931 </desc>
14932 <attribute name="executionCap" type="unsigned long" readonly="yes">
14933 <desc>
14934 The new CPU execution cap value. (1-100)
14935 </desc>
14936 </attribute>
14937 </interface>
14938
14939 <interface
14940 name="IGuestKeyboardEvent" extends="IEvent"
14941 uuid="88394258-7006-40d4-b339-472ee3801844"
14942 wsmap="managed" autogen="VBoxEvent" id="OnGuestKeyboardEvent"
14943 >
14944 <desc>
14945 Notification when guest keyboard event happens.
14946 </desc>
14947 <attribute name="scancodes" type="long" safearray="yes" readonly="yes">
14948 <desc>
14949 Array of scancodes.
14950 </desc>
14951 </attribute>
14952 </interface>
14953
14954 <interface
14955 name="IGuestMouseEvent" extends="IReusableEvent"
14956 uuid="1f85d35c-c524-40ff-8e98-307000df0992"
14957 wsmap="managed" autogen="VBoxEvent" id="OnGuestMouseEvent"
14958 >
14959 <desc>
14960 Notification when guest mouse event happens.
14961 </desc>
14962
14963 <attribute name="absolute" type="boolean" readonly="yes">
14964 <desc>
14965 If this event is relative or absolute.
14966 </desc>
14967 </attribute>
14968
14969 <attribute name="x" type="long" readonly="yes">
14970 <desc>
14971 New X position, or X delta.
14972 </desc>
14973 </attribute>
14974
14975 <attribute name="y" type="long" readonly="yes">
14976 <desc>
14977 New Y position, or Y delta.
14978 </desc>
14979 </attribute>
14980
14981 <attribute name="z" type="long" readonly="yes">
14982 <desc>
14983 Z delta.
14984 </desc>
14985 </attribute>
14986
14987 <attribute name="w" type="long" readonly="yes">
14988 <desc>
14989 W delta.
14990 </desc>
14991 </attribute>
14992
14993 <attribute name="buttons" type="long" readonly="yes">
14994 <desc>
14995 Button state bitmask.
14996 </desc>
14997 </attribute>
14998
14999 </interface>
15000
15001
15002 <interface
15003 name="IVRDEServerChangedEvent" extends="IEvent"
15004 uuid="a06fd66a-3188-4c8c-8756-1395e8cb691c"
15005 wsmap="managed" autogen="VBoxEvent" id="OnVRDEServerChanged"
15006 >
15007 <desc>
15008 Notification when a property of the
15009 <link to="IMachine::VRDEServer">VRDE server</link> changes.
15010 Interested callees should use IVRDEServer methods and attributes to
15011 find out what has changed.
15012 </desc>
15013 </interface>
15014
15015 <interface
15016 name="IVRDEServerInfoChangedEvent" extends="IEvent"
15017 uuid="dd6a1080-e1b7-4339-a549-f0878115596e"
15018 wsmap="managed" autogen="VBoxEvent" id="OnVRDEServerInfoChanged"
15019 >
15020 <desc>
15021 Notification when the status of the VRDE server changes. Interested callees
15022 should use <link to="IConsole::VRDEServerInfo">IVRDEServerInfo</link>
15023 attributes to find out what is the current status.
15024 </desc>
15025 </interface>
15026
15027 <interface
15028 name="IUSBControllerChangedEvent" extends="IEvent"
15029 uuid="93BADC0C-61D9-4940-A084-E6BB29AF3D83"
15030 wsmap="managed" autogen="VBoxEvent" id="OnUSBControllerChanged"
15031 >
15032 <desc>
15033 Notification when a property of the virtual
15034 <link to="IMachine::USBController">USB controller</link> changes.
15035 Interested callees should use IUSBController methods and attributes to
15036 find out what has changed.
15037 </desc>
15038 </interface>
15039
15040 <interface
15041 name="IUSBDeviceStateChangedEvent" extends="IEvent"
15042 uuid="806da61b-6679-422a-b629-51b06b0c6d93"
15043 wsmap="managed" autogen="VBoxEvent" id="OnUSBDeviceStateChanged"
15044 >
15045 <desc>
15046 Notification when a USB device is attached to or detached from
15047 the virtual USB controller.
15048
15049 This notification is sent as a result of the indirect
15050 request to attach the device because it matches one of the
15051 machine USB filters, or as a result of the direct request
15052 issued by <link to="IConsole::attachUSBDevice"/> or
15053 <link to="IConsole::detachUSBDevice"/>.
15054
15055 This notification is sent in case of both a succeeded and a
15056 failed request completion. When the request succeeds, the
15057 @a error parameter is @c null, and the given device has been
15058 already added to (when @a attached is @c true) or removed from
15059 (when @a attached is @c false) the collection represented by
15060 <link to="IConsole::USBDevices"/>. On failure, the collection
15061 doesn't change and the @a error parameter represents the error
15062 message describing the failure.
15063 </desc>
15064 <attribute name="device" type="IUSBDevice" readonly="yes">
15065 <desc>
15066 Device that is subject to state change.
15067 </desc>
15068 </attribute>
15069 <attribute name="attached" type="boolean" readonly="yes">
15070 <desc>
15071 @c true if the device was attached and @c false otherwise.
15072 </desc>
15073 </attribute>
15074 <attribute name="error" type="IVirtualBoxErrorInfo" readonly="yes">
15075 <desc>
15076 @c null on success or an error message object on failure.
15077 </desc>
15078 </attribute>
15079 </interface>
15080
15081 <interface
15082 name="ISharedFolderChangedEvent" extends="IEvent"
15083 uuid="B66349B5-3534-4239-B2DE-8E1535D94C0B"
15084 wsmap="managed" autogen="VBoxEvent" id="OnSharedFolderChanged"
15085 >
15086 <desc>
15087 Notification when a shared folder is added or removed.
15088 The @a scope argument defines one of three scopes:
15089 <link to="IVirtualBox::sharedFolders">global shared folders</link>
15090 (<link to="Scope_Global">Global</link>),
15091 <link to="IMachine::sharedFolders">permanent shared folders</link> of
15092 the machine (<link to="Scope_Machine">Machine</link>) or <link
15093 to="IConsole::sharedFolders">transient shared folders</link> of the
15094 machine (<link to="Scope_Session">Session</link>). Interested callees
15095 should use query the corresponding collections to find out what has
15096 changed.
15097 </desc>
15098 <attribute name="scope" type="Scope" readonly="yes">
15099 <desc>
15100 Scope of the notification.
15101 </desc>
15102 </attribute>
15103 </interface>
15104
15105 <interface
15106 name="IRuntimeErrorEvent" extends="IEvent"
15107 uuid="883DD18B-0721-4CDE-867C-1A82ABAF914C"
15108 wsmap="managed" autogen="VBoxEvent" id="OnRuntimeError"
15109 >
15110 <desc>
15111 Notification when an error happens during the virtual
15112 machine execution.
15113
15114 There are three kinds of runtime errors:
15115 <ul>
15116 <li><i>fatal</i></li>
15117 <li><i>non-fatal with retry</i></li>
15118 <li><i>non-fatal warnings</i></li>
15119 </ul>
15120
15121 <b>Fatal</b> errors are indicated by the @a fatal parameter set
15122 to @c true. In case of fatal errors, the virtual machine
15123 execution is always paused before calling this notification, and
15124 the notification handler is supposed either to immediately save
15125 the virtual machine state using <link to="IConsole::saveState"/>
15126 or power it off using <link to="IConsole::powerDown"/>.
15127 Resuming the execution can lead to unpredictable results.
15128
15129 <b>Non-fatal</b> errors and warnings are indicated by the
15130 @a fatal parameter set to @c false. If the virtual machine
15131 is in the Paused state by the time the error notification is
15132 received, it means that the user can <i>try to resume</i> the machine
15133 execution after attempting to solve the problem that caused the
15134 error. In this case, the notification handler is supposed
15135 to show an appropriate message to the user (depending on the
15136 value of the @a id parameter) that offers several actions such
15137 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
15138 wants to retry, the notification handler should continue
15139 the machine execution using the <link to="IConsole::resume"/>
15140 call. If the machine execution is not Paused during this
15141 notification, then it means this notification is a <i>warning</i>
15142 (for example, about a fatal condition that can happen very soon);
15143 no immediate action is required from the user, the machine
15144 continues its normal execution.
15145
15146 Note that in either case the notification handler
15147 <b>must not</b> perform any action directly on a thread
15148 where this notification is called. Everything it is allowed to
15149 do is to post a message to another thread that will then talk
15150 to the user and take the corresponding action.
15151
15152 Currently, the following error identifiers are known:
15153 <ul>
15154 <li><tt>"HostMemoryLow"</tt></li>
15155 <li><tt>"HostAudioNotResponding"</tt></li>
15156 <li><tt>"VDIStorageFull"</tt></li>
15157 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
15158 </ul>
15159 </desc>
15160 <attribute name="fatal" type="boolean" readonly="yes">
15161 <desc>
15162 Whether the error is fatal or not.
15163 </desc>
15164 </attribute>
15165 <attribute name="id" type="wstring" readonly="yes">
15166 <desc>
15167 Error identifier.
15168 </desc>
15169 </attribute>
15170 <attribute name="message" type="wstring" readonly="yes">
15171 <desc>
15172 Optional error message.
15173 </desc>
15174 </attribute>
15175 </interface>
15176
15177
15178 <interface
15179 name="IEventSourceChangedEvent" extends="IEvent"
15180 uuid="e7932cb8-f6d4-4ab6-9cbf-558eb8959a6a"
15181 waitable="yes"
15182 wsmap="managed" autogen="VBoxEvent" id="OnEventSourceChanged"
15183 >
15184 <desc>
15185 Notification when an event source state changes (listener added or removed).
15186 </desc>
15187
15188 <attribute name="listener" type="IEventListener" readonly="yes">
15189 <desc>
15190 Event listener which has changed.
15191 </desc>
15192 </attribute>
15193
15194 <attribute name="add" type="boolean" readonly="yes">
15195 <desc>
15196 Flag whether listener was added or removed.
15197 </desc>
15198 </attribute>
15199 </interface>
15200
15201 <interface
15202 name="IExtraDataChangedEvent" extends="IEvent"
15203 uuid="024F00CE-6E0B-492A-A8D0-968472A94DC7"
15204 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataChanged"
15205 >
15206 <desc>
15207 Notification when machine specific or global extra data
15208 has changed.
15209 </desc>
15210 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
15211 <desc>
15212 ID of the machine this event relates to.
15213 Null for global extra data changes.
15214 </desc>
15215 </attribute>
15216 <attribute name="key" type="wstring" readonly="yes">
15217 <desc>
15218 Extra data key that has changed.
15219 </desc>
15220 </attribute>
15221 <attribute name="value" type="wstring" readonly="yes">
15222 <desc>
15223 Extra data value for the given key.
15224 </desc>
15225 </attribute>
15226 </interface>
15227
15228 <interface
15229 name="IVetoEvent" extends="IEvent"
15230 uuid="9a1a4130-69fe-472f-ac10-c6fa25d75007"
15231 wsmap="managed"
15232 >
15233 <desc>Base abstract interface for veto events.</desc>
15234
15235 <method name="addVeto">
15236 <desc>
15237 Adds a veto on this event.
15238 </desc>
15239 <param name="reason" type="wstring" dir="in">
15240 <desc>
15241 Reason for veto, could be null or empty string.
15242 </desc>
15243 </param>
15244 </method>
15245
15246 <method name="isVetoed">
15247 <desc>
15248 If this event was vetoed.
15249 </desc>
15250 <param name="result" type="boolean" dir="return">
15251 <desc>
15252 Reason for veto.
15253 </desc>
15254 </param>
15255 </method>
15256
15257 <method name="getVetos">
15258 <desc>
15259 Current veto reason list, if size is 0 - no veto.
15260 </desc>
15261 <param name="result" type="wstring" dir="return" safearray="yes">
15262 <desc>
15263 Array of reasons for veto provided by different event handlers.
15264 </desc>
15265 </param>
15266 </method>
15267
15268 </interface>
15269
15270 <interface
15271 name="IExtraDataCanChangeEvent" extends="IVetoEvent"
15272 uuid="245d88bd-800a-40f8-87a6-170d02249a55"
15273 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataCanChange"
15274 waitable="true"
15275 >
15276 <desc>
15277 Notification when someone tries to change extra data for
15278 either the given machine or (if @c null) global extra data.
15279 This gives the chance to veto against changes.
15280 </desc>
15281 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
15282 <desc>
15283 ID of the machine this event relates to.
15284 Null for global extra data changes.
15285 </desc>
15286 </attribute>
15287 <attribute name="key" type="wstring" readonly="yes">
15288 <desc>
15289 Extra data key that has changed.
15290 </desc>
15291 </attribute>
15292 <attribute name="value" type="wstring" readonly="yes">
15293 <desc>
15294 Extra data value for the given key.
15295 </desc>
15296 </attribute>
15297 </interface>
15298
15299 <interface
15300 name="ICanShowWindowEvent" extends="IVetoEvent"
15301 uuid="adf292b0-92c9-4a77-9d35-e058b39fe0b9"
15302 wsmap="managed" autogen="VBoxEvent" id="OnCanShowWindow"
15303 waitable="true"
15304 >
15305 <desc>
15306 Notification when a call to
15307 <link to="IMachine::canShowConsoleWindow"/> is made by a
15308 front-end to check if a subsequent call to
15309 <link to="IMachine::showConsoleWindow"/> can succeed.
15310
15311 The callee should give an answer appropriate to the current
15312 machine state using event veto. This answer must
15313 remain valid at least until the next
15314 <link to="IConsole::state">machine state</link> change.
15315 </desc>
15316 </interface>
15317
15318 <interface
15319 name="IShowWindowEvent" extends="IEvent"
15320 uuid="B0A0904D-2F05-4D28-855F-488F96BAD2B2"
15321 wsmap="managed" autogen="VBoxEvent" id="OnShowWindow"
15322 waitable="true"
15323 >
15324 <desc>
15325 Notification when a call to
15326 <link to="IMachine::showConsoleWindow"/>
15327 requests the console window to be activated and brought to
15328 foreground on the desktop of the host PC.
15329
15330 This notification should cause the VM console process to
15331 perform the requested action as described above. If it is
15332 impossible to do it at a time of this notification, this
15333 method should return a failure.
15334
15335 Note that many modern window managers on many platforms
15336 implement some sort of focus stealing prevention logic, so
15337 that it may be impossible to activate a window without the
15338 help of the currently active application (which is supposedly
15339 an initiator of this notification). In this case, this method
15340 must return a non-zero identifier that represents the
15341 top-level window of the VM console process. The caller, if it
15342 represents a currently active process, is responsible to use
15343 this identifier (in a platform-dependent manner) to perform
15344 actual window activation.
15345
15346 This method must set @a winId to zero if it has performed all
15347 actions necessary to complete the request and the console
15348 window is now active and in foreground, to indicate that no
15349 further action is required on the caller's side.
15350 </desc>
15351 <attribute name="winId" type="long long">
15352 <desc>
15353 Platform-dependent identifier of the top-level VM console
15354 window, or zero if this method has performed all actions
15355 necessary to implement the <i>show window</i> semantics for
15356 the given platform and/or this VirtualBox front-end.
15357 </desc>
15358 </attribute>
15359 </interface>
15360
15361 <module name="VBoxSVC" context="LocalServer">
15362 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
15363 namespace="virtualbox.org">
15364 <interface name="IVirtualBox" default="yes"/>
15365 </class>
15366 </module>
15367
15368 <module name="VBoxC" context="InprocServer" threadingModel="Free">
15369 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
15370 namespace="virtualbox.org">
15371 <interface name="ISession" default="yes"/>
15372 </class>
15373
15374 <class name="Console" uuid="577230FF-164F-4CAC-8548-312D8275A4A7"
15375 namespace="virtualbox.org">
15376 <interface name="IConsole" default="yes"/>
15377 </class>
15378 </module>
15379
15380</library>
15381
15382</idl>
15383
15384<!-- 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