VirtualBox

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

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

Main: support per-machine media registries in XML settings (not yet used)

  • Property svn:eol-style set to native
File size: 559.9 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4
5 Copyright (C) 2006-2010 Oracle Corporation
6
7 This file is part of VirtualBox Open Source Edition (OSE), as
8 available from http://www.virtualbox.org. This file is free software;
9 you can redistribute it and/or modify it under the terms of the GNU
10 General Public License (GPL) as published by the Free Software
11 Foundation, in version 2 as it comes in the "COPYING" file of the
12 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
13 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
14-->
15
16<!--
17 This is the master declaration for VirtualBox's Main API,
18 represented by COM/XPCOM and web service interfaces.
19
20 From this document, the build system generates several files
21 via XSLT that are then used during the build process.
22
23 Below is the list of XSL templates that operate on this file and
24 output files they generate. These XSL templates must be updated
25 whenever the schema of this file changes:
26
27 1. src/VBox/Main/idl/midl.xsl =>
28 out/<platform>/bin/sdk/idl/VirtualBox.idl
29 (MS COM interface definition file for Main API)
30
31 2. src/VBox/Main/idl/xpidl.xsl =>
32 out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
33 (XPCOM interface definition file for Main API)
34
35 3. src/VBox/Main/idl/doxygen.xsl =>
36 out/<platform>/obj/src/VBox/Main/VirtualBox.idl
37 (pseudo-IDL for Doxygen to generate the official Main API
38 documentation)
39
40 4. src/VBox/Main/webservice/*.xsl =>
41 a bunch of WSDL and C++ files
42 (VirtualBox web service sources and SOAP mappers;
43 see src/VBox/Main/webservice/Makefile.kmk for details)
44
45 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
46 out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
47 (smart Qt-based C++ wrapper classes for COM interfaces
48 of the Main API)
49
50 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
51 out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
52 (Main API TypeLib block for the WiX installer)
53
54 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
55 out/<platform>/obj/Runtime/errmsgvboxcomdata.h
56 (<result> extraction for the %Rhrc format specifier)
57-->
58
59<idl>
60
61<desc>
62 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
63 describes the so-called <i>VirtualBox Main API</i> which comprises all public
64 COM interfaces and components provided by the VirtualBox server and by the
65 VirtualBox client library.
66
67 VirtualBox employs a client-server design, meaning that whenever any part of
68 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
69 interface or any virtual machine --, a dedicated server process named
70 VBoxSVC runs in the background. This allows multiple processes working with
71 VirtualBox to cooperate without conflicts. These processes communicate to each
72 other using inter-process communication facilities provided by the COM
73 implementation of the host computer.
74
75 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
76 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
77 implementation, is used.
78
79 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
80 the VBoxManage command-line interface and the VBoxVRDP server) are technically
81 front-ends to the Main API and only use the interfaces that are documented
82 in this Main API documentation. This ensures that, with any given release
83 version of VirtualBox, all capabilities of the product that could be useful
84 to an external client program are always exposed by way of this API.
85
86 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
87 contains two public component classes:
88 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
89 implement IVirtualBox and ISession interfaces respectively. These two classes
90 are of supreme importance and will be needed in order for any front-end
91 program to do anything useful. It is recommended to read the documentation of
92 the mentioned interfaces first.
93
94 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
95 there can be only one object of this class on the local machine at any given
96 time. This object is a parent of many other objects in the VirtualBox COM
97 library and lives in the VBoxSVC process. In fact, when you create an instance
98 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
99 process is already running, starts it if not, and returns you a reference to
100 the <tt>VirtualBox</tt> object created in this process. When the last reference
101 to this object is released, the VBoxSVC process ends (with a 5 second delay to
102 protect from too frequent restarts).
103
104 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
105 as many <tt>Session</tt> objects as you need but all of them will live in a
106 process which issues the object instantiation call. <tt>Session</tt> objects
107 represent virtual machine sessions which are used to configure virtual
108 machines and control their execution.
109</desc>
110
111<if target="midl">
112 <cpp line="enum {"/>
113 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
114 <cpp line=" kTypeLibraryMinorVersion = 0"/>
115 <cpp line="};"/>
116</if>
117
118<if target="xpidl">
119 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
120 <cpp>
121/* currently, nsISupportsImpl.h lacks the below-like macros */
122
123#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
124#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
125#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI NS_IMPL_QUERY_INTERFACE3_CI
126#define NS_IMPL_THREADSAFE_QUERY_INTERFACE4_CI NS_IMPL_QUERY_INTERFACE4_CI
127
128
129#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
130# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
131 NS_IMPL_THREADSAFE_ADDREF(_class) \
132 NS_IMPL_THREADSAFE_RELEASE(_class) \
133 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
134 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
135#endif
136
137#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
138# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
139 NS_IMPL_THREADSAFE_ADDREF(_class) \
140 NS_IMPL_THREADSAFE_RELEASE(_class) \
141 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
142 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
143#endif
144
145#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_CI
146# define NS_IMPL_THREADSAFE_ISUPPORTS3_CI(_class, _i1, _i2, _i3) \
147 NS_IMPL_THREADSAFE_ADDREF(_class) \
148 NS_IMPL_THREADSAFE_RELEASE(_class) \
149 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI(_class, _i1, _i2, _i3) \
150 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
151#endif
152
153#ifndef NS_IMPL_THREADSAFE_ISUPPORTS4_CI
154# define NS_IMPL_THREADSAFE_ISUPPORTS4_CI(_class, _i1, _i2, _i3, _i4) \
155 NS_IMPL_THREADSAFE_ADDREF(_class) \
156 NS_IMPL_THREADSAFE_RELEASE(_class) \
157 NS_IMPL_THREADSAFE_QUERY_INTERFACE4_CI(_class, _i1, _i2, _i3, _i4) \
158 NS_IMPL_CI_INTERFACE_GETTER4(_class, _i1, _i2, _i3, _i4)
159#endif
160
161#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
162# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
163 NS_INTERFACE_MAP_BEGIN(_class) \
164 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
165 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
166 NS_IMPL_QUERY_CLASSINFO(_class) \
167 NS_INTERFACE_MAP_END
168#endif
169
170#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
171# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
172 _i2, _ic2) \
173 NS_INTERFACE_MAP_BEGIN(_class) \
174 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
175 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
176 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
177 NS_IMPL_QUERY_CLASSINFO(_class) \
178 NS_INTERFACE_MAP_END
179#endif
180
181#ifndef NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
182# define NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
183 _i2, _ic2, _i3, _ic3) \
184 NS_INTERFACE_MAP_BEGIN(_class) \
185 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
186 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
187 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i3, _ic3) \
188 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
189 NS_IMPL_QUERY_CLASSINFO(_class) \
190 NS_INTERFACE_MAP_END
191#endif
192
193#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
194#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
195#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
196
197#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
198# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
199 NS_IMPL_THREADSAFE_ADDREF(_class) \
200 NS_IMPL_THREADSAFE_RELEASE(_class) \
201 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
202 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
203#endif
204
205#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
206# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
207 _i2, _ic2) \
208 NS_IMPL_THREADSAFE_ADDREF(_class) \
209 NS_IMPL_THREADSAFE_RELEASE(_class) \
210 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
211 _i2, _ic2) \
212 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
213#endif
214
215#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI
216# define NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI(_class, _i1, _ic1, \
217 _i2, _ic2, _i3, _ic3) \
218 NS_IMPL_THREADSAFE_ADDREF(_class) \
219 NS_IMPL_THREADSAFE_RELEASE(_class) \
220 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
221 _i2, _ic2, _i3, _ic3) \
222 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
223#endif
224
225 </cpp>
226</if>
227
228<library
229 name="VirtualBox"
230 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
231 version="1.3"
232 desc="VirtualBox Type Library"
233 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
234 supportsErrorInfo="yes"
235>
236
237
238 <!--
239 // COM result codes for VirtualBox
240 /////////////////////////////////////////////////////////////////////////
241 -->
242
243 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
244 <desc>
245 This section describes all VirtualBox-specific COM result codes that may
246 be returned by methods of VirtualBox COM interfaces in addition to
247 standard COM result codes.
248
249 Note that along with the result code, every VirtualBox method returns
250 extended error information through the IVirtualBoxErrorInfo interface on
251 failure. This interface is a preferred way to present the error to the end
252 user because it contains a human readable description of the error. Raw
253 result codes, both standard and described in this section, are intended to
254 be used by programs to analyze the reason of a failure and select an
255 appropriate course of action without involving the end user (for example,
256 retry the operation later or make a different call).
257
258 The standard COM result codes that may originate from our methods include:
259
260 <table>
261 <tr><td>E_INVALIDARG</td>
262 <td>
263 Returned when the value of the method's argument is not within the range
264 of valid values. This should not be confused with situations when the
265 value is within the range but simply doesn't suit the current object
266 state and there is a possibility that it will be accepted later (in such
267 cases VirtualBox-specific codes are returned, for example,
268 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
269 </td>
270 </tr>
271 <tr><td>E_POINTER</td>
272 <td>
273 Returned if a memory pointer for the output argument is invalid (for
274 example, @c null). Note that when pointers representing input
275 arguments (such as strings) are invalid, E_INVALIDARG is returned.
276 </td>
277 </tr>
278 <tr><td>E_ACCESSDENIED</td>
279 <td>
280 Returned when the called object is not ready. Since the lifetime of a
281 public COM object cannot be fully controlled by the implementation,
282 VirtualBox maintains the readiness state for all objects it creates and
283 returns this code in response to any method call on the object that was
284 deactivated by VirtualBox and is not functioning any more.
285 </td>
286 </tr>
287 <tr><td>E_OUTOFMEMORY</td>
288 <td>
289 Returned when a memory allocation operation fails.
290 </td>
291 </tr>
292 </table>
293 </desc>
294 </descGroup>
295
296 <!--
297 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
298 everything in <result>/<desc> after (and including) the first dot, so express
299 the matter of the error code in the first sentence and keep it short.
300 -->
301
302 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
303 <desc>
304 Object corresponding to the supplied arguments does not exist.
305 </desc>
306 </result>
307
308 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
309 <desc>
310 Current virtual machine state prevents the operation.
311 </desc>
312 </result>
313
314 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
315 <desc>
316 Virtual machine error occurred attempting the operation.
317 </desc>
318 </result>
319
320 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
321 <desc>
322 File not accessible or erroneous file contents.
323 </desc>
324 </result>
325
326 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
327 <desc>
328 Runtime subsystem error.
329 </desc>
330 </result>
331
332 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
333 <desc>
334 Pluggable Device Manager error.
335 </desc>
336 </result>
337
338 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
339 <desc>
340 Current object state prohibits operation.
341 </desc>
342 </result>
343
344 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
345 <desc>
346 Host operating system related error.
347 </desc>
348 </result>
349
350 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
351 <desc>
352 Requested operation is not supported.
353 </desc>
354 </result>
355
356 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
357 <desc>
358 Invalid XML found.
359 </desc>
360 </result>
361
362 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
363 <desc>
364 Current session state prohibits operation.
365 </desc>
366 </result>
367
368 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
369 <desc>
370 Object being in use prohibits operation.
371 </desc>
372 </result>
373
374 <!--
375 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
376 everything in <result>/<desc> after (and including) the first dot, so express
377 the matter of the error code in the first sentence and keep it short.
378 -->
379
380 <descGroup/>
381
382 <!--
383 // all common enums
384 /////////////////////////////////////////////////////////////////////////
385 -->
386
387 <enum name="SettingsVersion"
388 uuid="52bd6f5f-1adb-4493-975d-581a9c4b803f"
389 >
390 <desc>Settings version of VirtualBox settings files. This is written to
391 the "version" attribute of the root "VirtualBox" element in the settings
392 file XML and indicates which VirtualBox version wrote the file.
393 </desc>
394
395 <const name="Null" value="0">
396 <desc>Null value, indicates invalid version.</desc>
397 </const>
398 <const name="v1_0" value="1">
399 <desc>Legacy settings version, not currently supported.</desc>
400 </const>
401 <const name="v1_1" value="2">
402 <desc>Legacy settings version, not currently supported.</desc>
403 </const>
404 <const name="v1_2" value="3">
405 <desc>Legacy settings version, not currently supported.</desc>
406 </const>
407 <const name="v1_3pre" value="4">
408 <desc>Legacy settings version, not currently supported.</desc>
409 </const>
410 <const name="v1_3" value="5">
411 <desc>Settings version "1.3", written by VirtualBox 2.0.12.</desc>
412 <!--
413 Machine XML: Capitalization of Uart, Lpt elements and many attributes changed.
414 -->
415 </const>
416 <const name="v1_4" value="6">
417 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
418 <!--
419 VirtualBox.xml: big DiskRegistry -> MediaRegistry revamp, various HardDisk types merged
420 (was VirtualDiskImage, VMDKImage, VHDImage, ISCSIHardDisk, CustomHardDisk, DiffHardDisk)
421 -->
422 </const>
423 <const name="v1_5" value="7">
424 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
425 <!-- 2008-09-04: 2.0.0 released
426 2008-11-20: settings version 1.5 introduced
427 2008-12-17: 2.1.0 released
428 Machine changes:
429 guest OS identifiers changed;
430 Machine/Hardware/Display/MonitorCount renamed to monitorCount;
431 Machine/Hardware/Display/Accelerate3D renamed to accelerate3D;
432 Machine/Hardware/CPU/CPUCount/@count changed to CPU/@count
433 -->
434 </const>
435 <const name="v1_6" value="8">
436 <desc>Settings version "1.6", written by VirtualBox 2.1.4 (at least).</desc>
437 <!-- 2008-12-17: 2.1.0 released
438 2008-12-19: settings version 1.6 introduced (is in 2.1 branch)
439 2009-04-08: 2.2.0 released
440 Machine changes: remove all Machine/Hardware/Network/Adapter/HostInterface[@TAPSetup or @TAPTerminate]/ attributes (done)
441 -->
442 </const>
443 <const name="v1_7" value="9">
444 <desc>Settings version "1.7", written by VirtualBox 2.2.x and 3.0.x.</desc>
445 <!-- 2008-12-17: 2.1.0 released
446 2009-03-11: settings version 1.7 introduced (is in 2.2 branch)
447 2009-04-08: 2.2.0 released
448 VirtualBox.xml additions: NetserviceRegistry with DHCPServers (done)
449 Machine changes: HardDiskAttachments is now StorageControllers (done)
450 -->
451 </const>
452 <const name="v1_8" value="10">
453 <desc>Intermediate settings version "1.8", understood by VirtualBox 3.1.x.</desc>
454 <!-- Machine additions: Display/@accelerate2DVideo (done)
455 -->
456 </const>
457 <const name="v1_9" value="11">
458 <desc>Settings version "1.9", written by VirtualBox 3.1.x.</desc>
459 <!-- The big storage controller / DVD / Floppy rework (done)
460 -->
461 </const>
462 <const name="v1_10" value="12">
463 <desc>Settings version "1.10", written by VirtualBox 3.2.x.</desc>
464 <!-- Machine changes: RTC localOrUTC (done)
465 CPU hot-plug support
466 -->
467 </const>
468 <const name="v1_11" value="13">
469 <desc>Settings version "1.11", written by VirtualBox 3.3.x.</desc>
470 <!-- Machine changes: HD Audio controller, per-machine disk registries
471 -->
472 </const>
473 <const name="Future" value="99999">
474 <desc>Settings version greater than "1.11", written by a future VirtualBox version.</desc>
475 </const>
476 </enum>
477
478 <enum
479 name="AccessMode"
480 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
481 >
482 <desc>
483 Access mode for opening files.
484 </desc>
485
486 <const name="ReadOnly" value="1"/>
487 <const name="ReadWrite" value="2"/>
488 </enum>
489
490 <enum
491 name="MachineState"
492 uuid="e998d075-543a-41fc-8aa9-5ca3e92393fd"
493 >
494 <desc>
495 Virtual machine execution state.
496
497 This enumeration represents possible values of the <link
498 to="IMachine::state"/> attribute.
499
500 Below is the basic virtual machine state diagram. It shows how the state
501 changes during virtual machine execution. The text in square braces shows
502 a method of the IConsole interface that performs the given state
503 transition.
504
505 <pre>
506 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
507 V |
508 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
509 | | | | V |
510 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
511 | | ^ | ^ |
512 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
513 | ^ | | | |
514 | | +-----------------------------------------+-|-------------------+ +
515 | | | | |
516 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
517 | | | |
518 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
519 | | |
520 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
521 </pre>
522
523 Note that states to the right from PoweredOff, Aborted and Saved in the
524 above diagram are called <i>online VM states</i>. These states
525 represent the virtual machine which is being executed in a dedicated
526 process (usually with a GUI window attached to it where you can see the
527 activity of the virtual machine and interact with it). There are two
528 special pseudo-states, FirstOnline and LastOnline, that can be used in
529 relational expressions to detect if the given machine state is online or
530 not:
531
532 <pre>
533 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
534 machine.GetState() &lt;= MachineState_LastOnline)
535 {
536 ...the machine is being executed...
537 }
538 </pre>
539
540 When the virtual machine is in one of the online VM states (that is, being
541 executed), only a few machine settings can be modified. Methods working
542 with such settings contain an explicit note about that. An attempt to
543 change any oter setting or perform a modifying operation during this time
544 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
545
546 All online states except Running, Paused and Stuck are transitional: they
547 represent temporary conditions of the virtual machine that will last as
548 long as the operation that initiated such a condition.
549
550 The Stuck state is a special case. It means that execution of the machine
551 has reached the "Guru Meditation" condition. This condition indicates an
552 internal VMM (virtual machine manager) failure which may happen as a
553 result of either an unhandled low-level virtual hardware exception or one
554 of the recompiler exceptions (such as the <i>too-many-traps</i>
555 condition).
556
557 Note also that any online VM state may transit to the Aborted state. This
558 happens if the process that is executing the virtual machine terminates
559 unexpectedly (for example, crashes). Other than that, the Aborted state is
560 equivalent to PoweredOff.
561
562 There are also a few additional state diagrams that do not deal with
563 virtual machine execution and therefore are shown separately. The states
564 shown on these diagrams are called <i>offline VM states</i> (this includes
565 PoweredOff, Aborted and Saved too).
566
567 The first diagram shows what happens when a lengthy setup operation is
568 being executed (such as <link to="IMachine::attachDevice"/>).
569
570 <pre>
571 +----------------------------------(same state as before the call)------+
572 | |
573 +-&gt; PoweredOff --+ |
574 | | |
575 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
576 | |
577 +-&gt; Saved -------+
578 </pre>
579
580 The next two diagrams demonstrate the process of taking a snapshot of a
581 powered off virtual machine, restoring the state to that as of a snapshot
582 or deleting a snapshot, respectively.
583
584 <pre>
585 +----------------------------------(same state as before the call)------+
586 | |
587 +-&gt; PoweredOff --+ |
588 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
589 +-&gt; Aborted -----+
590
591 +-&gt; PoweredOff --+
592 | |
593 | Aborted -----+--&gt;[restoreSnapshot() ]-------&gt; RestoringSnapshot -+
594 | | [deleteSnapshot() ]-------&gt; DeletingSnapshot --+
595 +-&gt; Saved -------+ |
596 | |
597 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
598 </pre>
599
600 Note that the Saving state is present in both the offline state group and
601 online state group. Currently, the only way to determine what group is
602 assumed in a particular case is to remember the previous machine state: if
603 it was Running or Paused, then Saving is an online state, otherwise it is
604 an offline state. This inconsistency may be removed in one of the future
605 versions of VirtualBox by adding a new state.
606
607 <note internal="yes">
608 For whoever decides to touch this enum: In order to keep the
609 comparisons involving FirstOnline and LastOnline pseudo-states valid,
610 the numeric values of these states must be correspondingly updated if
611 needed: for any online VM state, the condition
612 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
613 @c true. The same relates to transient states for which
614 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
615 @c true.
616 </note>
617 </desc>
618
619 <const name="Null" value="0">
620 <desc>Null value (never used by the API).</desc>
621 </const>
622 <const name="PoweredOff" value="1">
623 <desc>
624 The machine is not running and has no saved execution state; it has
625 either never been started or been shut down successfully.
626 </desc>
627 </const>
628 <const name="Saved" value="2">
629 <desc>
630 The machine is not currently running, but the execution state of the machine
631 has been saved to an external file when it was running, from where
632 it can be resumed.
633 </desc>
634 </const>
635 <const name="Teleported" value="3">
636 <desc>
637 The machine was teleported to a different host (or process) and then
638 powered off. Take care when powering it on again may corrupt resources
639 it shares with the teleportation target (e.g. disk and network).
640 </desc>
641 </const>
642 <const name="Aborted" value="4">
643 <desc>
644 The process running the machine has terminated abnormally. This may
645 indicate a crash of the VM process in host execution context, or
646 the VM process has been terminated externally.
647 </desc>
648 </const>
649 <const name="Running" value="5">
650 <desc>
651 The machine is currently being executed.
652 <note internal="yes">
653 For whoever decides to touch this enum: In order to keep the
654 comparisons in the old source code valid, this state must immediately
655 precede the Paused state.
656 TODO: Lift this spectacularly wonderful restriction.
657 </note>
658 </desc>
659 </const>
660 <const name="Paused" value="6">
661 <desc>
662 Execution of the machine has been paused.
663 <note internal="yes">
664 For whoever decides to touch this enum: In order to keep the
665 comparisons in the old source code valid, this state must immediately
666 follow the Running state.
667 TODO: Lift this spectacularly wonderful restriction.
668 </note>
669 </desc>
670 </const>
671 <const name="Stuck" value="7">
672 <desc>
673 Execution of the machine has reached the "Guru Meditation"
674 condition. This indicates a severe error in the hypervisor itself.
675 <note internal="yes">
676 bird: Why this uncool name? Could we rename it to "GuruMeditation" or
677 "Guru", perhaps? Or are there some other VMM states that are
678 intended to be lumped in here as well?
679 </note>
680 </desc>
681 </const>
682 <const name="Teleporting" value="8">
683 <desc>
684 The machine is about to be teleported to a different host or process.
685 It is possible to pause a machine in this state, but it will go to the
686 @c TeleportingPausedVM state and it will not be
687 possible to resume it again unless the teleportation fails.
688 </desc>
689 </const>
690 <const name="LiveSnapshotting" value="9">
691 <desc>
692 A live snapshot is being taken. The machine is running normally, but
693 some of the runtime configuration options are inaccessible. Also, if
694 paused while in this state it will transition to
695 @c Saving and it will not be resume the
696 execution until the snapshot operation has completed.
697 </desc>
698 </const>
699 <const name="Starting" value="10">
700 <desc>
701 Machine is being started after powering it on from a
702 zero execution state.
703 </desc>
704 </const>
705 <const name="Stopping" value="11">
706 <desc>
707 Machine is being normally stopped powering it off, or after the guest OS
708 has initiated a shutdown sequence.
709 </desc>
710 </const>
711 <const name="Saving" value="12">
712 <desc>
713 Machine is saving its execution state to a file, or an online
714 snapshot of the machine is being taken.
715 </desc>
716 </const>
717 <const name="Restoring" value="13">
718 <desc>
719 Execution state of the machine is being restored from a file
720 after powering it on from the saved execution state.
721 </desc>
722 </const>
723 <const name="TeleportingPausedVM" value="14">
724 <desc>
725 The machine is being teleported to another host or process, but it is
726 not running. This is the paused variant of the
727 @c state.
728 </desc>
729 </const>
730 <const name="TeleportingIn" value="15">
731 <desc>
732 Teleporting the machine state in from another host or process.
733 </desc>
734 </const>
735 <const name="DeletingSnapshotOnline" value="16">
736 <desc>
737 Like @c DeletingSnapshot, but the merging of media is ongoing in
738 the background while the machine is running.
739 </desc>
740 </const>
741 <const name="DeletingSnapshotPaused" value="17">
742 <desc>
743 Like @c DeletingSnapshotOnline, but the machine was paused when the
744 merging of differencing media was started.
745 </desc>
746 </const>
747 <const name="RestoringSnapshot" value="18">
748 <desc>
749 A machine snapshot is being restored; this typically does not take long.
750 </desc>
751 </const>
752 <const name="DeletingSnapshot" value="19">
753 <desc>
754 A machine snapshot is being deleted; this can take a long time since this
755 may require merging differencing media. This value indicates that the
756 machine is not running while the snapshot is being deleted.
757 </desc>
758 </const>
759 <const name="SettingUp" value="20">
760 <desc>
761 Lengthy setup operation is in progress.
762 </desc>
763 </const>
764
765 <const name="FirstOnline" value="5" wsmap="suppress"> <!-- Running -->
766 <desc>
767 Pseudo-state: first online state (for use in relational expressions).
768 </desc>
769 </const>
770 <const name="LastOnline" value="17" wsmap="suppress"> <!-- DeletingSnapshotPaused -->
771 <desc>
772 Pseudo-state: last online state (for use in relational expressions).
773 </desc>
774 </const>
775
776 <const name="FirstTransient" value="8" wsmap="suppress"> <!-- Teleporting -->
777 <desc>
778 Pseudo-state: first transient state (for use in relational expressions).
779 </desc>
780 </const>
781 <const name="LastTransient" value="20" wsmap="suppress"> <!-- SettingUp -->
782 <desc>
783 Pseudo-state: last transient state (for use in relational expressions).
784 </desc>
785 </const>
786
787 </enum>
788
789 <enum
790 name="SessionState"
791 uuid="cf2700c0-ea4b-47ae-9725-7810114b94d8"
792 >
793 <desc>
794 Session state. This enumeration represents possible values of
795 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
796 attributes.
797 </desc>
798
799 <const name="Null" value="0">
800 <desc>Null value (never used by the API).</desc>
801 </const>
802 <const name="Unlocked" value="1">
803 <desc>
804 In <link to="IMachine::sessionState"/>, this means that the machine
805 is not locked for any sessions.
806
807 In <link to="ISession::state"/>, this means that no machine is
808 currently locked for this session.
809 </desc>
810 </const>
811 <const name="Locked" value="2">
812 <desc>
813 In <link to="IMachine::sessionState"/>, this means that the machine
814 is currently locked for a session, whose process identifier can
815 then be found in the <link to="IMachine::sessionPid" /> attribute.
816
817 In <link to="ISession::state"/>, this means that a machine is
818 currently locked for this session, and the mutable machine object
819 can be found in the <link to="ISession::machine"/> attribute
820 (see <link to="IMachine::lockMachine" /> for details).
821 </desc>
822 </const>
823 <const name="Spawning" value="3">
824 <desc>
825 A new process is being spawned for the machine as a result of
826 <link to="IMachine::launchVMProcess"/> call. This state also occurs
827 as a short transient state during an <link to="IMachine::lockMachine"/>
828 call.
829 </desc>
830 </const>
831 <const name="Unlocking" value="4">
832 <desc>
833 The session is being unlocked.
834 </desc>
835 </const>
836 </enum>
837
838 <enum
839 name="CPUPropertyType"
840 uuid="24d356a6-2f45-4abd-b977-1cbe9c4701f5"
841 >
842 <desc>
843 Virtual CPU property type. This enumeration represents possible values of the
844 IMachine get- and setCPUProperty methods.
845 </desc>
846 <const name="Null" value="0">
847 <desc>Null value (never used by the API).</desc>
848 </const>
849 <const name="PAE" value="1">
850 <desc>
851 This setting determines whether VirtualBox will expose the Physical Address
852 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
853 is not available, it will not be reported.
854 </desc>
855 </const>
856 <const name="Synthetic" value="2">
857 <desc>
858 This setting determines whether VirtualBox will expose a synthetic CPU to the guest to allow
859 teleporting between host systems that differ significantly.
860 </desc>
861 </const>
862 </enum>
863
864
865 <enum
866 name="HWVirtExPropertyType"
867 uuid="ce81dfdd-d2b8-4a90-bbea-40ee8b7ffcee"
868 >
869 <desc>
870 Hardware virtualization property type. This enumeration represents possible values
871 for the <link to="IMachine::getHWVirtExProperty"/> and
872 <link to="IMachine::setHWVirtExProperty"/> methods.
873 </desc>
874 <const name="Null" value="0">
875 <desc>Null value (never used by the API).</desc>
876 </const>
877 <const name="Enabled" value="1">
878 <desc>
879 Whether hardware virtualization (VT-x/AMD-V) is enabled at all. If
880 such extensions are not available, they will not be used.
881 </desc>
882 </const>
883 <const name="Exclusive" value="2">
884 <desc>
885 Whether hardware virtualization is used exclusively by VirtualBox. When enabled,
886 VirtualBox assumes it can acquire full and exclusive access to the VT-x or AMD-V
887 feature of the host. To share these with other hypervisors, you must disable this property.
888 </desc>
889 </const>
890 <const name="VPID" value="3">
891 <desc>
892 Whether VT-x VPID is enabled. If this extension is not available, it will not be used.
893 </desc>
894 </const>
895 <const name="NestedPaging" value="4">
896 <desc>
897 Whether Nested Paging is enabled. If this extension is not available, it will not be used.
898 </desc>
899 </const>
900 <const name="LargePages" value="5">
901 <desc>
902 Whether large page allocation is enabled; requires nested paging and a 64 bits host.
903 </desc>
904 </const>
905 </enum>
906
907 <enum
908 name="LockType"
909 uuid="138b53f8-db4b-47c5-b32b-4ef52f769413"
910 >
911 <desc>
912 Used with <link to="IMachine::lockMachine" />.
913 </desc>
914 <const name="Write" value="2">
915 <desc>Lock the machine for writing.</desc>
916 </const>
917 <const name="Shared" value="1">
918 <desc>Request only a shared read lock for remote-controlling the machine.</desc>
919 </const>
920 </enum>
921
922 <enum
923 name="SessionType"
924 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
925 >
926 <desc>
927 Session type. This enumeration represents possible values of the
928 <link to="ISession::type"/> attribute.
929 </desc>
930
931 <const name="Null" value="0">
932 <desc>Null value (never used by the API).</desc>
933 </const>
934 <const name="WriteLock" value="1">
935 <desc>
936 Session has acquired an exclusive write lock on a machine
937 using <link to="IMachine::lockMachine"/>.
938 </desc>
939 </const>
940 <const name="Remote" value="2">
941 <desc>
942 Session has launched a VM process using
943 <link to="IMachine::launchVMProcess"/>
944 </desc>
945 </const>
946 <const name="Shared" value="3">
947 <desc>
948 Session has obtained a link to another session using
949 <link to="IMachine::lockMachine"/>
950 </desc>
951 </const>
952 </enum>
953
954 <enum
955 name="DeviceType"
956 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
957 >
958 <desc>
959 Device type.
960 </desc>
961 <const name="Null" value="0">
962 <desc>
963 Null value, may also mean "no device" (not allowed for
964 <link to="IConsole::getDeviceActivity"/>).
965 </desc>
966 </const>
967 <const name="Floppy" value="1">
968 <desc>Floppy device.</desc>
969 </const>
970 <const name="DVD" value="2">
971 <desc>CD/DVD-ROM device.</desc>
972 </const>
973 <const name="HardDisk" value="3">
974 <desc>Hard disk device.</desc>
975 </const>
976 <const name="Network" value="4">
977 <desc>Network device.</desc>
978 </const>
979 <const name="USB" value="5">
980 <desc>USB device.</desc>
981 </const>
982 <const name="SharedFolder" value="6">
983 <desc>Shared folder device.</desc>
984 </const>
985 </enum>
986
987 <enum
988 name="DeviceActivity"
989 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
990 >
991 <desc>
992 Device activity for <link to="IConsole::getDeviceActivity"/>.
993 </desc>
994
995 <const name="Null" value="0"/>
996 <const name="Idle" value="1"/>
997 <const name="Reading" value="2"/>
998 <const name="Writing" value="3"/>
999 </enum>
1000
1001 <enum
1002 name="ClipboardMode"
1003 uuid="33364716-4008-4701-8f14-be0fa3d62950"
1004 >
1005 <desc>
1006 Host-Guest clipboard interchange mode.
1007 </desc>
1008
1009 <const name="Disabled" value="0"/>
1010 <const name="HostToGuest" value="1"/>
1011 <const name="GuestToHost" value="2"/>
1012 <const name="Bidirectional" value="3"/>
1013 </enum>
1014
1015 <enum
1016 name="Scope"
1017 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
1018 >
1019 <desc>
1020 Scope of the operation.
1021
1022 A generic enumeration used in various methods to define the action or
1023 argument scope.
1024 </desc>
1025
1026 <const name="Global" value="0"/>
1027 <const name="Machine" value="1"/>
1028 <const name="Session" value="2"/>
1029 </enum>
1030
1031 <enum
1032 name="BIOSBootMenuMode"
1033 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
1034 >
1035 <desc>
1036 BIOS boot menu mode.
1037 </desc>
1038
1039 <const name="Disabled" value="0"/>
1040 <const name="MenuOnly" value="1"/>
1041 <const name="MessageAndMenu" value="2"/>
1042 </enum>
1043
1044 <enum
1045 name="ProcessorFeature"
1046 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
1047 >
1048 <desc>
1049 CPU features.
1050 </desc>
1051
1052 <const name="HWVirtEx" value="0"/>
1053 <const name="PAE" value="1"/>
1054 <const name="LongMode" value="2"/>
1055 <const name="NestedPaging" value="3"/>
1056 </enum>
1057
1058 <enum
1059 name="FirmwareType"
1060 uuid="b903f264-c230-483e-ac74-2b37ce60d371"
1061 >
1062 <desc>
1063 Firmware type.
1064 </desc>
1065 <const name="BIOS" value="1">
1066 <desc>BIOS Firmware.</desc>
1067 </const>
1068 <const name="EFI" value="2">
1069 <desc>EFI Firmware, bitness detetced basing on OS type.</desc>
1070 </const>
1071 <const name="EFI32" value="3">
1072 <desc>Efi firmware, 32-bit.</desc>
1073 </const>
1074 <const name="EFI64" value="4">
1075 <desc>Efi firmware, 64-bit.</desc>
1076 </const>
1077 <const name="EFIDUAL" value="5">
1078 <desc>Efi firmware, combined 32 and 64-bit.</desc>
1079 </const>
1080 </enum>
1081
1082 <enum
1083 name="PointingHidType"
1084 uuid="0d3c17a2-821a-4b2e-ae41-890c6c60aa97"
1085 >
1086 <desc>
1087 Type of pointing device used in a virtual machine.
1088 </desc>
1089 <const name="None" value="1">
1090 <desc>No mouse.</desc>
1091 </const>
1092 <const name="PS2Mouse" value="2">
1093 <desc>PS/2 auxillary device, a.k.a. mouse.</desc>
1094 </const>
1095 <const name="USBMouse" value="3">
1096 <desc>USB mouse (relative pointer).</desc>
1097 </const>
1098 <const name="USBTablet" value="4">
1099 <desc>USB tablet (absolute pointer).</desc>
1100 </const>
1101 <const name="ComboMouse" value="5">
1102 <desc>Combined device, working as PS/2 or USB mouse, depending on guest behavior.
1103 Using of such device can have negative performance implications. </desc>
1104 </const>
1105 </enum>
1106
1107 <enum
1108 name="KeyboardHidType"
1109 uuid="5a5b0996-3a3e-44bb-9019-56979812cbcc"
1110 >
1111 <desc>
1112 Type of keyboard device used in a virtual machine.
1113 </desc>
1114 <const name="None" value="1">
1115 <desc>No keyboard.</desc>
1116 </const>
1117 <const name="PS2Keyboard" value="2">
1118 <desc>PS/2 keyboard.</desc>
1119 </const>
1120 <const name="USBKeyboard" value="3">
1121 <desc>USB keyboard.</desc>
1122 </const>
1123 <const name="ComboKeyboard" value="4">
1124 <desc>Combined device, working as PS/2 or USB keyboard, depending on guest behavior.
1125 Using of such device can have negative performance implications. </desc>
1126 </const>
1127 </enum>
1128
1129 <!--
1130 // IVirtualBoxErrorInfo
1131 /////////////////////////////////////////////////////////////////////////
1132 -->
1133
1134 <interface
1135 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1136 uuid="e053d3c0-f493-491b-a735-3a9f0b1feed4"
1137 supportsErrorInfo="no"
1138 wsmap="managed"
1139 >
1140 <desc>
1141 The IVirtualBoxErrorInfo interface represents extended error information.
1142
1143 Extended error information can be set by VirtualBox components after
1144 unsuccessful or partially successful method invocation. This information
1145 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1146 and then shown to the client in addition to the plain 32-bit result code.
1147
1148 In MS COM, this interface extends the IErrorInfo interface,
1149 in XPCOM, it extends the nsIException interface. In both cases,
1150 it provides a set of common attributes to retrieve error
1151 information.
1152
1153 Sometimes invocation of some component's method may involve methods of
1154 other components that may also fail (independently of this method's
1155 failure), or a series of non-fatal errors may precede a fatal error that
1156 causes method failure. In cases like that, it may be desirable to preserve
1157 information about all errors happened during method invocation and deliver
1158 it to the caller. The <link to="#next"/> attribute is intended
1159 specifically for this purpose and allows to represent a chain of errors
1160 through a single IVirtualBoxErrorInfo object set after method invocation.
1161
1162 Note that errors are stored to a chain in the reverse order, i.e. the
1163 initial error object you query right after method invocation is the last
1164 error set by the callee, the object it points to in the @a next attribute
1165 is the previous error and so on, up to the first error (which is the last
1166 in the chain).
1167 </desc>
1168
1169 <attribute name="resultCode" type="long" readonly="yes">
1170 <desc>
1171 Result code of the error.
1172 Usually, it will be the same as the result code returned
1173 by the method that provided this error information, but not
1174 always. For example, on Win32, CoCreateInstance() will most
1175 likely return E_NOINTERFACE upon unsuccessful component
1176 instantiation attempt, but not the value the component factory
1177 returned. Value is typed 'long', not 'result',
1178 to make interface usable from scripting languages.
1179 <note>
1180 In MS COM, there is no equivalent.
1181 In XPCOM, it is the same as nsIException::result.
1182 </note>
1183 </desc>
1184 </attribute>
1185
1186 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1187 <desc>
1188 UUID of the interface that defined the error.
1189 <note>
1190 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1191 data type.
1192 In XPCOM, there is no equivalent.
1193 </note>
1194 </desc>
1195 </attribute>
1196
1197 <attribute name="component" type="wstring" readonly="yes">
1198 <desc>
1199 Name of the component that generated the error.
1200 <note>
1201 In MS COM, it is the same as IErrorInfo::GetSource.
1202 In XPCOM, there is no equivalent.
1203 </note>
1204 </desc>
1205 </attribute>
1206
1207 <attribute name="text" type="wstring" readonly="yes">
1208 <desc>
1209 Text description of the error.
1210 <note>
1211 In MS COM, it is the same as IErrorInfo::GetDescription.
1212 In XPCOM, it is the same as nsIException::message.
1213 </note>
1214 </desc>
1215 </attribute>
1216
1217 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1218 <desc>
1219 Next error object if there is any, or @c null otherwise.
1220 <note>
1221 In MS COM, there is no equivalent.
1222 In XPCOM, it is the same as nsIException::inner.
1223 </note>
1224 </desc>
1225 </attribute>
1226
1227 </interface>
1228
1229 <!--
1230 // IVirtualBox
1231 /////////////////////////////////////////////////////////////////////////
1232 -->
1233
1234 <interface
1235 name="IDHCPServer" extends="$unknown"
1236 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1237 wsmap="managed"
1238 >
1239 <desc>
1240 The IDHCPServer interface represents the vbox dhcp server configuration.
1241
1242 To enumerate all the dhcp servers on the host, use the
1243 <link to="IVirtualBox::DHCPServers"/> attribute.
1244 </desc>
1245
1246 <attribute name="enabled" type="boolean">
1247 <desc>
1248 specifies if the dhcp server is enabled
1249 </desc>
1250 </attribute>
1251
1252 <attribute name="IPAddress" type="wstring" readonly="yes">
1253 <desc>
1254 specifies server IP
1255 </desc>
1256 </attribute>
1257
1258 <attribute name="networkMask" type="wstring" readonly="yes">
1259 <desc>
1260 specifies server network mask
1261 </desc>
1262 </attribute>
1263
1264 <attribute name="networkName" type="wstring" readonly="yes">
1265 <desc>
1266 specifies internal network name the server is used for
1267 </desc>
1268 </attribute>
1269
1270 <attribute name="lowerIP" type="wstring" readonly="yes">
1271 <desc>
1272 specifies from IP adrres in server address range
1273 </desc>
1274 </attribute>
1275
1276 <attribute name="upperIP" type="wstring" readonly="yes">
1277 <desc>
1278 specifies to IP adrres in server address range
1279 </desc>
1280 </attribute>
1281
1282 <method name="setConfiguration">
1283 <desc>
1284 configures the server
1285 <result name="E_INVALIDARG">
1286 invalid configuration supplied
1287 </result>
1288 </desc>
1289 <param name="IPAddress" type="wstring" dir="in">
1290 <desc>
1291 server IP address
1292 </desc>
1293 </param>
1294 <param name="networkMask" type="wstring" dir="in">
1295 <desc>
1296 server network mask
1297 </desc>
1298 </param>
1299 <param name="FromIPAddress" type="wstring" dir="in">
1300 <desc>
1301 server From IP address for address range
1302 </desc>
1303 </param>
1304 <param name="ToIPAddress" type="wstring" dir="in">
1305 <desc>
1306 server To IP address for address range
1307 </desc>
1308 </param>
1309 </method>
1310
1311 <method name="start">
1312 <desc>
1313 Starts DHCP server process.
1314 <result name="E_FAIL">
1315 Failed to start the process.
1316 </result>
1317 </desc>
1318 <param name="networkName" type="wstring" dir="in">
1319 <desc>
1320 Name of internal network DHCP server should attach to.
1321 </desc>
1322 </param>
1323 <param name="trunkName" type="wstring" dir="in">
1324 <desc>
1325 Name of internal network trunk.
1326 </desc>
1327 </param>
1328 <param name="trunkType" type="wstring" dir="in">
1329 <desc>
1330 Type of internal network trunk.
1331 </desc>
1332 </param>
1333 </method>
1334
1335 <method name="stop">
1336 <desc>
1337 Stops DHCP server process.
1338 <result name="E_FAIL">
1339 Failed to stop the process.
1340 </result>
1341 </desc>
1342 </method>
1343 </interface>
1344
1345 <interface
1346 name="IVirtualBox" extends="$unknown"
1347 uuid="ec6cc7e7-06a2-4c5d-8993-1e3619c53817"
1348 wsmap="managed"
1349 >
1350 <desc>
1351 The IVirtualBox interface represents the main interface exposed by the
1352 product that provides virtual machine management.
1353
1354 An instance of IVirtualBox is required for the product to do anything
1355 useful. Even though the interface does not expose this, internally,
1356 IVirtualBox is implemented as a singleton and actually lives in the
1357 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1358 IVirtualBox can track the state of all virtual machines on a particular
1359 host, regardless of which frontend started them.
1360
1361 To enumerate all the virtual machines on the host, use the
1362 <link to="IVirtualBox::machines"/> attribute.
1363 </desc>
1364
1365 <attribute name="version" type="wstring" readonly="yes">
1366 <desc>
1367 A string representing the version number of the product. The
1368 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1369 last number represents the build number and will frequently change.
1370 </desc>
1371 </attribute>
1372
1373 <attribute name="revision" type="unsigned long" readonly="yes">
1374 <desc>
1375 The internal build revision number of the product.
1376 </desc>
1377 </attribute>
1378
1379 <attribute name="packageType" type="wstring" readonly="yes">
1380 <desc>
1381 A string representing the package type of this product. The
1382 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1383 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1384 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1385 this.
1386 </desc>
1387 </attribute>
1388
1389 <attribute name="homeFolder" type="wstring" readonly="yes">
1390 <desc>
1391 Full path to the directory where the global settings file,
1392 <tt>VirtualBox.xml</tt>, is stored.
1393
1394 In this version of VirtualBox, the value of this property is
1395 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1396 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1397 as determined by the host OS), and cannot be changed.
1398
1399 This path is also used as the base to resolve relative paths in
1400 places where relative paths are allowed (unless otherwise
1401 expressly indicated).
1402 </desc>
1403 </attribute>
1404
1405 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1406 <desc>
1407 Full name of the global settings file.
1408 The value of this property corresponds to the value of
1409 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1410 </desc>
1411 </attribute>
1412
1413 <attribute name="host" type="IHost" readonly="yes">
1414 <desc>Associated host object.</desc>
1415 </attribute>
1416
1417 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1418 <desc>Associated system information object.</desc>
1419 </attribute>
1420
1421 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1422 <desc>
1423 Array of machine objects registered within this VirtualBox instance.
1424 </desc>
1425 </attribute>
1426
1427 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1428 <desc>
1429 Array of medium objects known to this VirtualBox installation.
1430
1431 This array contains only base media. All differencing
1432 media of the given base medium can be enumerated using
1433 <link to="IMedium::children"/>.
1434 </desc>
1435 </attribute>
1436
1437 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1438 <desc>
1439 Array of CD/DVD image objects registered with this VirtualBox instance.
1440 </desc>
1441 </attribute>
1442
1443 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1444 <desc>
1445 Array of floppy image objects registered with this VirtualBox instance.
1446 </desc>
1447 </attribute>
1448
1449 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1450
1451 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1452
1453 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1454 <desc>
1455 Collection of global shared folders. Global shared folders are
1456 available to all virtual machines.
1457
1458 New shared folders are added to the collection using
1459 <link to="#createSharedFolder"/>. Existing shared folders can be
1460 removed using <link to="#removeSharedFolder"/>.
1461
1462 <note>
1463 In the current version of the product, global shared folders are not
1464 implemented and therefore this collection is always empty.
1465 </note>
1466 </desc>
1467 </attribute>
1468
1469 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1470 <desc>
1471 Associated performance collector object.
1472 </desc>
1473 </attribute>
1474
1475 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1476 <desc>
1477 dhcp server settings.
1478 </desc>
1479 </attribute>
1480
1481 <attribute name="eventSource" type="IEventSource" readonly="yes">
1482 <desc>
1483 Event source for VirtualBox events.
1484 </desc>
1485 </attribute>
1486
1487
1488 <method name="createMachine">
1489 <desc>
1490 Creates a new virtual machine.
1491
1492 The new machine is created unregistered, with the initial configuration
1493 set according to the specified guest OS type. A typical sequence of
1494 actions to create a new virtual machine is as follows:
1495
1496 <ol>
1497 <li>
1498 Call this method to have a new machine created. The returned machine
1499 object will be "mutable" allowing to change any machine property.
1500 </li>
1501
1502 <li>
1503 Configure the machine using the appropriate attributes and methods.
1504 </li>
1505
1506 <li>
1507 Call <link to="IMachine::saveSettings" /> to write the settings
1508 to the machine's XML settings file. The configuration of the newly
1509 created machine will not be saved to disk until this method is
1510 called.
1511 </li>
1512
1513 <li>
1514 Call <link to="#registerMachine" /> to add the machine to the list
1515 of machines known to VirtualBox.
1516 </li>
1517 </ol>
1518
1519 You should specify valid name for the newly created machine when calling
1520 this method. See the <link to="IMachine::name"/> attribute description
1521 for more details about the machine name.
1522
1523 The specified guest OS type identifier must match an ID of one of known
1524 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1525 array.
1526
1527 Every machine has a <i>settings file</i> that is used to store
1528 the machine configuration. This file is stored in a directory called the
1529 <i>machine settings subfolder</i>. Both the settings subfolder and file
1530 will have a name that corresponds to the name of the virtual machine.
1531 You can specify where to create the machine setting subfolder using the
1532 @a baseFolder argument. The base folder can be absolute (full path) or
1533 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1534 directory</link>.
1535
1536 If @a baseFolder is a @c null or empty string (which is recommended), the
1537 <link to="ISystemProperties::defaultMachineFolder">default machine
1538 settings folder</link> will be used as a base folder for the created
1539 machine. Otherwise the given base folder will be used. In either case,
1540 the full path to the resulting settings file has the following
1541 structure:
1542 <pre>
1543 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1544 </pre>
1545
1546 Note that if the resulting settings file already exists, this method
1547 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1548
1549 Optionally, you may specify an UUID of to assign to the created machine.
1550 However, this is not recommended and you should normally pass an empty
1551 (@c null) UUID to this method so that a new UUID will be automatically
1552 generated for every created machine. You can use UUID
1553 00000000-0000-0000-0000-000000000000 as @c null value.
1554
1555 <note>
1556 There is no way to change the name of the settings file or
1557 subfolder of the created machine directly.
1558 </note>
1559
1560 <result name="VBOX_E_OBJECT_NOT_FOUND">
1561 @a osTypeId is invalid.
1562 </result>
1563 <result name="VBOX_E_FILE_ERROR">
1564 Resulting settings file name is invalid or the settings file already
1565 exists or could not be created due to an I/O error.
1566 </result>
1567 <result name="E_INVALIDARG">
1568 @a name is empty or @c null.
1569 </result>
1570 </desc>
1571
1572 <param name="name" type="wstring" dir="in">
1573 <desc>Machine name.</desc>
1574 </param>
1575 <param name="osTypeId" type="wstring" dir="in">
1576 <desc>Guest OS Type ID.</desc>
1577 </param>
1578 <param name="baseFolder" type="wstring" dir="in">
1579 <desc>Base machine folder (optional).</desc>
1580 </param>
1581 <param name="id" type="uuid" mod="string" dir="in">
1582 <desc>Machine UUID (optional).</desc>
1583 </param>
1584 <param name="override" type="boolean" dir="in">
1585 <desc>Create the VM even if there are conflicting files.</desc>
1586 </param>
1587 <param name="machine" type="IMachine" dir="return">
1588 <desc>Created machine object.</desc>
1589 </param>
1590 </method>
1591
1592 <method name="createLegacyMachine">
1593 <desc>
1594 Creates a new virtual machine in "legacy" mode, using the specified
1595 settings file to store machine settings.
1596
1597 As opposed to machines created by <link to="#createMachine"/>,
1598 the settings file of the machine created in "legacy" mode is not
1599 automatically renamed when the machine name is changed -- it will always
1600 remain the same as specified in this method call.
1601
1602 The specified settings file name can be absolute (full path) or relative
1603 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1604 directory</link>. If the file name doesn't contain an extension, the
1605 default extension (.xml) will be appended.
1606
1607 Note that the configuration of the newly created machine is not
1608 saved to disk (and therefore no settings file is created)
1609 until <link to="IMachine::saveSettings"/> is called. If the
1610 specified settings file already exists, this method
1611 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1612
1613 See <link to="#createMachine"/> for more information.
1614
1615 @deprecated This method may be removed later. Use <link
1616 to="IVirtualBox::createMachine"/> instead.
1617
1618 <note>
1619 There is no way to change the name of the settings file
1620 of the machine created in "legacy" mode.
1621 </note>
1622
1623 <result name="VBOX_E_OBJECT_NOT_FOUND">
1624 @a osTypeId is invalid.
1625 </result>
1626 <result name="VBOX_E_FILE_ERROR">
1627 @a settingsFile is invalid or the settings file already exists or
1628 could not be created due to an I/O error.
1629 </result>
1630 <result name="E_INVALIDARG">
1631 @a name or @a settingsFile is empty or @c null.
1632 </result>
1633 </desc>
1634
1635 <param name="name" type="wstring" dir="in">
1636 <desc>Machine name.</desc>
1637 </param>
1638 <param name="osTypeId" type="wstring" dir="in">
1639 <desc>Machine OS Type ID.</desc>
1640 </param>
1641 <param name="settingsFile" type="wstring" dir="in">
1642 <desc>Name of the machine settings file.</desc>
1643 </param>
1644 <param name="id" type="uuid" mod="string" dir="in">
1645 <desc>Machine UUID (optional).</desc>
1646 </param>
1647 <param name="machine" type="IMachine" dir="return">
1648 <desc>Created machine object.</desc>
1649 </param>
1650 </method>
1651
1652 <method name="openMachine">
1653 <desc>
1654 Opens a virtual machine from the existing settings file.
1655 The opened machine remains unregistered until you call
1656 <link to="#registerMachine"/>.
1657
1658 The specified settings file name can be absolute
1659 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1660 VirtualBox home directory</link>. This file must exist
1661 and must be a valid machine settings file whose contents
1662 will be used to construct the machine object.
1663
1664 @deprecated Will be removed soon.
1665 <result name="VBOX_E_FILE_ERROR">
1666 Settings file name invalid, not found or sharing violation.
1667 </result>
1668 </desc>
1669 <param name="settingsFile" type="wstring" dir="in">
1670 <desc>
1671 Name of the machine settings file.
1672 </desc>
1673 </param>
1674 <param name="machine" type="IMachine" dir="return">
1675 <desc>Opened machine object.</desc>
1676 </param>
1677 <note>
1678 <link to="IMachine::settingsModified"/> will return
1679 @c false for the created machine, until any of machine settings
1680 are changed.
1681 </note>
1682 </method>
1683
1684 <method name="registerMachine">
1685 <desc>
1686
1687 Registers the machine previously created using
1688 <link to="#createMachine"/> or opened using
1689 <link to="#openMachine"/> within this VirtualBox installation. After
1690 successful method invocation, the
1691 <link to="IMachineRegisteredEvent"/> event is fired.
1692
1693 <note>
1694 This method implicitly calls <link to="IMachine::saveSettings"/>
1695 to save all current machine settings before registering it.
1696 </note>
1697
1698 <result name="VBOX_E_OBJECT_NOT_FOUND">
1699 No matching virtual machine found.
1700 </result>
1701 <result name="VBOX_E_INVALID_OBJECT_STATE">
1702 Virtual machine was not created within this VirtualBox instance.
1703 </result>
1704
1705 </desc>
1706 <param name="machine" type="IMachine" dir="in"/>
1707 </method>
1708
1709 <method name="getMachine">
1710 <desc>
1711 Attempts to find a virtual machine given its UUID.
1712 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1713 instead.
1714
1715 <result name="VBOX_E_OBJECT_NOT_FOUND">
1716 Could not find registered machine matching @a id.
1717 </result>
1718
1719 </desc>
1720 <param name="id" type="uuid" mod="string" dir="in"/>
1721 <param name="machine" type="IMachine" dir="return"/>
1722 </method>
1723
1724 <method name="findMachine">
1725 <desc>
1726 Attempts to find a virtual machine given its name.
1727 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1728 instead.
1729
1730 <result name="VBOX_E_OBJECT_NOT_FOUND">
1731 Could not find registered machine matching @a name.
1732 </result>
1733
1734 </desc>
1735 <param name="name" type="wstring" dir="in"/>
1736 <param name="machine" type="IMachine" dir="return"/>
1737 </method>
1738
1739 <method name="createAppliance">
1740 <desc>
1741 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1742 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1743 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1744 </desc>
1745 <param name="appliance" type="IAppliance" dir="return">
1746 <desc>New appliance.</desc>
1747 </param>
1748 </method>
1749
1750 <method name="createHardDisk">
1751 <desc>
1752 Creates a new base medium object that will use the given storage
1753 format and location for medium data.
1754
1755 Note that the actual storage unit is not created by this method. In
1756 order to do it, and before you are able to attach the created medium
1757 to virtual machines, you must call one of the following methods to
1758 allocate a format-specific storage unit at the specified location:
1759 <ul>
1760 <li><link to="IMedium::createBaseStorage"/></li>
1761 <li><link to="IMedium::createDiffStorage"/></li>
1762 </ul>
1763
1764 Some medium attributes, such as <link to="IMedium::id"/>, may
1765 remain uninitialized until the medium storage unit is successfully
1766 created by one of the above methods.
1767
1768 After the storage unit is successfully created, the medium gets
1769 remembered by this VirtualBox installation and will be accessible
1770 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
1771 methods. Remembered base medium are also returned as part of
1772 the <link to="#hardDisks"/> array. See IMedium for more details.
1773
1774 The list of all storage formats supported by this VirtualBox
1775 installation can be obtained using
1776 <link to="ISystemProperties::mediumFormats"/>. If the @a format
1777 attribute is empty or @c null then the default storage format
1778 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1779 be used for creating a storage unit of the medium.
1780
1781 Note that the format of the location string is storage format specific.
1782 See <link to="IMedium::location"/>, IMedium and
1783 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1784
1785 <result name="VBOX_E_OBJECT_NOT_FOUND">
1786 @a format identifier is invalid. See
1787 <link to="ISystemProperties::mediumFormats"/>.
1788 </result>
1789 <result name="VBOX_E_FILE_ERROR">
1790 @a location is a not valid file name (for file-based formats only).
1791 </result>
1792 </desc>
1793 <param name="format" type="wstring" dir="in">
1794 <desc>
1795 Identifier of the storage format to use for the new medium.
1796 </desc>
1797 </param>
1798 <param name="location" type="wstring" dir="in">
1799 <desc>
1800 Location of the storage unit for the new medium.
1801 </desc>
1802 </param>
1803 <param name="medium" type="IMedium" dir="return">
1804 <desc>Created medium object.</desc>
1805 </param>
1806 </method>
1807
1808 <method name="openHardDisk">
1809 <desc>
1810 Opens a medium from an existing location, optionally replacing
1811 the image UUID and/or parent UUID.
1812
1813 After the medium is successfully opened by this method, it gets
1814 remembered by (known to) this VirtualBox installation and will be
1815 accessible through <link to="#getHardDisk"/> and
1816 <link to="#findHardDisk"/> methods. Remembered base media
1817 are also returned as part of the <link to="#hardDisks"/> array and can
1818 be attached to virtual machines. See IMedium for more details.
1819
1820 If a differencing medium is to be opened by this method, the
1821 operation will succeed only if its parent medium and all ancestors,
1822 if any, are already known to this VirtualBox installation (for example,
1823 were opened by this method before).
1824
1825 This method tries to guess the storage format of the specified medium
1826 by reading medium data at the specified location.
1827
1828 If @a accessMode is ReadWrite (which it should be), the image is opened
1829 for read/write access and must have according permissions, as VirtualBox
1830 may actually write status information into the disk's metadata sections.
1831
1832 Note that write access is required for all typical image usage in VirtualBox,
1833 since VirtualBox may need to write metadata such as a UUID into the image.
1834 The only exception is opening a source image temporarily for copying and
1835 cloning when the image will quickly be closed again.
1836
1837 Note that the format of the location string is storage format specific.
1838 See <link to="IMedium::location"/>, IMedium and
1839 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1840
1841 <result name="VBOX_E_FILE_ERROR">
1842 Invalid medium storage file location or could not find the medium
1843 at the specified location.
1844 </result>
1845 <result name="VBOX_E_IPRT_ERROR">
1846 Could not get medium storage format.
1847 </result>
1848 <result name="E_INVALIDARG">
1849 Invalid medium storage format.
1850 </result>
1851
1852 </desc>
1853 <param name="location" type="wstring" dir="in">
1854 <desc>
1855 Location of the storage unit that contains medium data in one of
1856 the supported storage formats.
1857 </desc>
1858 </param>
1859 <param name="accessMode" type="AccessMode" dir="in">
1860 <desc>
1861 Determines whether to open the image in read/write or read-only mode.
1862 </desc>
1863 </param>
1864 <param name="setImageId" type="boolean" dir="in">
1865 <desc>
1866 Select whether a new image UUID is set or not.
1867 </desc>
1868 </param>
1869 <param name="imageId" type="uuid" mod="string" dir="in">
1870 <desc>
1871 New UUID for the image. If an empty string is passed, then a new
1872 UUID is automatically created. Specifying a zero UUIDs is not valid.
1873 </desc>
1874 </param>
1875 <param name="setParentId" type="boolean" dir="in">
1876 <desc>
1877 Select whether a new parent UUID is set or not.
1878 </desc>
1879 </param>
1880 <param name="parentId" type="uuid" mod="string" dir="in">
1881 <desc>
1882 New parent UUID for the image. If an empty string is passed, then a
1883 new UUID is automatically created, provided @a setParentId is
1884 @c true. A zero UUID is valid.
1885 </desc>
1886 </param>
1887 <param name="medium" type="IMedium" dir="return">
1888 <desc>Opened medium object.</desc>
1889 </param>
1890 </method>
1891
1892 <method name="getHardDisk" const="yes">
1893 <desc>
1894 Returns a medium with the given UUID.
1895
1896 The medium with the given UUID must be known to this VirtualBox
1897 installation, i.e. it must be previously created by
1898 <link to="#createHardDisk"/> or opened by <link
1899 to="#openHardDisk"/>, or attached to some known virtual machine.
1900
1901 <result name="VBOX_E_OBJECT_NOT_FOUND">
1902 No medium object matching @a id found.
1903 </result>
1904
1905 </desc>
1906 <param name="id" type="uuid" mod="string" dir="in">
1907 <desc>UUID of the medium to look for.</desc>
1908 </param>
1909 <param name="medium" type="IMedium" dir="return">
1910 <desc>Found medium object.</desc>
1911 </param>
1912 </method>
1913
1914 <method name="findHardDisk">
1915 <desc>
1916 Returns a medium that uses the given location to store medium data.
1917
1918 The given medium must be known to this VirtualBox installation, i.e.
1919 it must be previously created by
1920 <link to="#createHardDisk"/> or opened by <link
1921 to="#openHardDisk"/>, or attached to some known virtual machine.
1922
1923 The search is done by comparing the value of the @a location argument to
1924 the <link to="IMedium::location"/> attribute of each known medium.
1925
1926 For locations represented by file names in the host's file system, the
1927 requested location can be a path relative to the
1928 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1929 only a file name without any path is given, the
1930 <link to="ISystemProperties::defaultHardDiskFolder"> default medium
1931 folder</link> will be prepended to the file name before searching. Note
1932 that on case sensitive file systems, a case sensitive comparison is
1933 performed, otherwise the case of symbols in the file path is ignored.
1934
1935 <result name="VBOX_E_OBJECT_NOT_FOUND">
1936 No medium object matching @a location found.
1937 </result>
1938
1939 </desc>
1940 <param name="location" type="wstring" dir="in">
1941 <desc>Location string to search for.</desc>
1942 </param>
1943 <param name="medium" type="IMedium" dir="return">
1944 <desc>Found medium object.</desc>
1945 </param>
1946 </method>
1947
1948 <method name="openDVDImage">
1949 <desc>
1950 Opens a CD/DVD image contained in the specified file of the supported
1951 format and assigns it the given UUID.
1952
1953 After the image is successfully opened by this method, it gets
1954 remembered by (known to) this VirtualBox installation and will be
1955 accessible through <link to="#getDVDImage"/> and
1956 <link to="#findDVDImage"/> methods. Remembered images are also
1957 returned as part of the <link to="#DVDImages"/> array and can be mounted
1958 to virtual machines. See IMedium for more details.
1959
1960 See <link to="IMedium::location"/> to get more details about the format
1961 of the location string.
1962
1963 <note>
1964 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
1965 </note>
1966
1967 <result name="VBOX_E_FILE_ERROR">
1968 Invalid CD/DVD image file location or could not find the CD/DVD
1969 image at the specified location.
1970 </result>
1971 <result name="VBOX_E_INVALID_OBJECT_STATE">
1972 CD/DVD image already exists in the media registry.
1973 </result>
1974
1975 </desc>
1976 <param name="location" type="wstring" dir="in">
1977 <desc>
1978 Full path to the file that contains a valid CD/DVD image.
1979 </desc>
1980 </param>
1981 <param name="id" type="uuid" mod="string" dir="in">
1982 <desc>
1983 UUID to assign to the given image within this VirtualBox installation.
1984 If an empty (@c null) UUID is specified, the system will randomly
1985 generate a new UUID.
1986 </desc>
1987 </param>
1988 <param name="image" type="IMedium" dir="return">
1989 <desc>Opened CD/DVD image object.</desc>
1990 </param>
1991 </method>
1992
1993 <method name="getDVDImage">
1994 <desc>
1995 Returns a CD/DVD image with the given UUID.
1996
1997 The image with the given UUID must be known to this VirtualBox
1998 installation, i.e. it must be previously opened by <link
1999 to="#openDVDImage"/>, or mounted to some known virtual machine.
2000
2001 <result name="VBOX_E_OBJECT_NOT_FOUND">
2002 No matching DVD image found in the media registry.
2003 </result>
2004
2005 </desc>
2006 <param name="id" type="uuid" mod="string" dir="in">
2007 <desc>UUID of the image to look for.</desc>
2008 </param>
2009 <param name="image" type="IMedium" dir="return">
2010 <desc>Found CD/DVD image object.</desc>
2011 </param>
2012 </method>
2013
2014 <method name="findDVDImage">
2015 <desc>
2016 Returns a CD/DVD image with the given image location.
2017
2018 The image with the given UUID must be known to this VirtualBox
2019 installation, i.e. it must be previously opened by <link
2020 to="#openDVDImage"/>, or mounted to some known virtual machine.
2021
2022 The search is done by comparing the value of the @a location argument to
2023 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2024
2025 The requested location can be a path relative to the
2026 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2027 only a file name without any path is given, the
2028 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2029 folder</link> will be prepended to the file name before searching. Note
2030 that on case sensitive file systems, a case sensitive comparison is
2031 performed, otherwise the case in the file path is ignored.
2032
2033 <result name="VBOX_E_FILE_ERROR">
2034 Invalid image file location.
2035 </result>
2036 <result name="VBOX_E_OBJECT_NOT_FOUND">
2037 No matching DVD image found in the media registry.
2038 </result>
2039
2040 </desc>
2041 <param name="location" type="wstring" dir="in">
2042 <desc>CD/DVD image file path to look for.</desc>
2043 </param>
2044 <param name="image" type="IMedium" dir="return">
2045 <desc>Found CD/DVD image object.</desc>
2046 </param>
2047 </method>
2048
2049 <method name="openFloppyImage">
2050 <desc>
2051 Opens a floppy image contained in the specified file of the supported
2052 format and assigns it the given UUID.
2053
2054 After the image is successfully opened by this method, it gets
2055 remembered by (known to) this VirtualBox installation and will be
2056 accessible through <link to="#getFloppyImage"/> and
2057 <link to="#findFloppyImage"/> methods. Remembered images are also
2058 returned as part of the <link to="#floppyImages"/> array and can be
2059 mounted to virtual machines. See IMedium for more details.
2060
2061 See <link to="IMedium::location"/> to get more details about the format
2062 of the location string.
2063
2064 <result name="VBOX_E_FILE_ERROR">
2065 Invalid floppy image file location or could not find the floppy
2066 image at the specified location.
2067 </result>
2068 <result name="VBOX_E_INVALID_OBJECT_STATE">
2069 Floppy image already exists in the media registry.
2070 </result>
2071
2072 <note>
2073 Currently, only raw floppy images are supported by VirtualBox.
2074 </note>
2075 </desc>
2076 <param name="location" type="wstring" dir="in">
2077 <desc>
2078 Full path to the file that contains a valid floppy image.
2079 </desc>
2080 </param>
2081 <param name="id" type="uuid" mod="string" dir="in">
2082 <desc>
2083 UUID to assign to the given image file within this VirtualBox
2084 installation. If an empty (@c null) UUID is specified, the system will
2085 randomly generate a new UUID.
2086 </desc>
2087 </param>
2088 <param name="image" type="IMedium" dir="return">
2089 <desc>Opened floppy image object.</desc>
2090 </param>
2091 </method>
2092
2093 <method name="getFloppyImage">
2094 <desc>
2095 Returns a floppy image with the given UUID.
2096
2097 The image with the given UUID must be known to this VirtualBox
2098 installation, i.e. it must be previously opened by <link
2099 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2100
2101 <result name="VBOX_E_OBJECT_NOT_FOUND">
2102 No matching floppy image found in the media registry.
2103 </result>
2104
2105 </desc>
2106 <param name="id" type="uuid" mod="string" dir="in">
2107 <desc>UUID of the image to look for.</desc>
2108 </param>
2109 <param name="image" type="IMedium" dir="return">
2110 <desc>Found floppy image object.</desc>
2111 </param>
2112 </method>
2113
2114 <method name="findFloppyImage">
2115 <desc>
2116 Returns a floppy image with the given image location.
2117
2118 The image with the given UUID must be known to this VirtualBox
2119 installation, i.e. it must be previously opened by <link
2120 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2121
2122 The search is done by comparing the value of the @a location argument to
2123 the <link to="IMedium::location"/> attribute of each known floppy image.
2124
2125 The requested location can be a path relative to the
2126 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2127 only a file name without any path is given, the
2128 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2129 folder</link> will be prepended to the file name before searching. Note
2130 that on case sensitive file systems, a case sensitive comparison is
2131 performed, otherwise the case of symbols in the file path is ignored.
2132
2133 <result name="VBOX_E_FILE_ERROR">
2134 Invalid image file location.
2135 </result>
2136 <result name="VBOX_E_OBJECT_NOT_FOUND">
2137 No matching floppy image found in the media registry.
2138 </result>
2139
2140 </desc>
2141 <param name="location" type="wstring" dir="in">
2142 <desc>Floppy image file path to look for.</desc>
2143 </param>
2144 <param name="image" type="IMedium" dir="return">
2145 <desc>Found floppy image object.</desc>
2146 </param>
2147 </method>
2148
2149 <method name="getGuestOSType">
2150 <desc>
2151 Returns an object describing the specified guest OS type.
2152
2153 The requested guest OS type is specified using a string which is a
2154 mnemonic identifier of the guest operating system, such as
2155 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2156 particular virtual machine can be read or set using the
2157 <link to="IMachine::OSTypeId"/> attribute.
2158
2159 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2160 available guest OS type objects. Each object has an
2161 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2162 the guest OS this object describes.
2163
2164 <result name="E_INVALIDARG">
2165 @a id is not a valid Guest OS type.
2166 </result>
2167
2168 </desc>
2169 <param name="id" type="uuid" mod="string" dir="in">
2170 <desc>Guest OS type ID string.</desc>
2171 </param>
2172 <param name="type" type="IGuestOSType" dir="return">
2173 <desc>Guest OS type object.</desc>
2174 </param>
2175 </method>
2176
2177 <method name="createSharedFolder">
2178 <desc>
2179 Creates a new global shared folder by associating the given logical
2180 name with the given host path, adds it to the collection of shared
2181 folders and starts sharing it. Refer to the description of
2182 <link to="ISharedFolder"/> to read more about logical names.
2183 <note>
2184 In the current implementation, this operation is not
2185 implemented.
2186 </note>
2187 </desc>
2188 <param name="name" type="wstring" dir="in">
2189 <desc>Unique logical name of the shared folder.</desc>
2190 </param>
2191 <param name="hostPath" type="wstring" dir="in">
2192 <desc>Full path to the shared folder in the host file system.</desc>
2193 </param>
2194 <param name="writable" type="boolean" dir="in">
2195 <desc>Whether the share is writable or readonly</desc>
2196 </param>
2197 <param name="automount" type="boolean" dir="in">
2198 <desc>Whether the share gets automatically mounted by the guest
2199 or not.</desc>
2200 </param>
2201 </method>
2202
2203 <method name="removeSharedFolder">
2204 <desc>
2205 Removes the global shared folder with the given name previously
2206 created by <link to="#createSharedFolder"/> from the collection of
2207 shared folders and stops sharing it.
2208 <note>
2209 In the current implementation, this operation is not
2210 implemented.
2211 </note>
2212 </desc>
2213 <param name="name" type="wstring" dir="in">
2214 <desc>Logical name of the shared folder to remove.</desc>
2215 </param>
2216 </method>
2217
2218 <method name="getExtraDataKeys">
2219 <desc>
2220 Returns an array representing the global extra data keys which currently
2221 have values defined.
2222 </desc>
2223 <param name="value" type="wstring" dir="return" safearray="yes">
2224 <desc>Array of extra data keys.</desc>
2225 </param>
2226 </method>
2227
2228 <method name="getExtraData">
2229 <desc>
2230 Returns associated global extra data.
2231
2232 If the requested data @a key does not exist, this function will
2233 succeed and return an empty string in the @a value argument.
2234
2235 <result name="VBOX_E_FILE_ERROR">
2236 Settings file not accessible.
2237 </result>
2238 <result name="VBOX_E_XML_ERROR">
2239 Could not parse the settings file.
2240 </result>
2241
2242 </desc>
2243 <param name="key" type="wstring" dir="in">
2244 <desc>Name of the data key to get.</desc>
2245 </param>
2246 <param name="value" type="wstring" dir="return">
2247 <desc>Value of the requested data key.</desc>
2248 </param>
2249 </method>
2250
2251 <method name="setExtraData">
2252 <desc>
2253 Sets associated global extra data.
2254
2255 If you pass @c null or empty string as a key @a value, the given @a key
2256 will be deleted.
2257
2258 <note>
2259 Before performing the actual data change, this method will ask all
2260 registered event listener using the
2261 <link to="IExtraDataCanChangeEvent"/>
2262 notification for a permission. If one of the listeners refuses the
2263 new value, the change will not be performed.
2264 </note>
2265 <note>
2266 On success, the
2267 <link to="IExtraDataChangedEvent"/> notification
2268 is called to inform all registered listeners about a successful data
2269 change.
2270 </note>
2271
2272 <result name="VBOX_E_FILE_ERROR">
2273 Settings file not accessible.
2274 </result>
2275 <result name="VBOX_E_XML_ERROR">
2276 Could not parse the settings file.
2277 </result>
2278 <result name="E_ACCESSDENIED">
2279 Modification request refused.
2280 </result>
2281
2282 </desc>
2283 <param name="key" type="wstring" dir="in">
2284 <desc>Name of the data key to set.</desc>
2285 </param>
2286 <param name="value" type="wstring" dir="in">
2287 <desc>Value to assign to the key.</desc>
2288 </param>
2289 </method>
2290
2291 <method name="waitForPropertyChange">
2292 <desc>
2293 Blocks the caller until any of the properties represented by the
2294 @a what argument changes the value or until the given timeout interval
2295 expires.
2296
2297 The @a what argument is a comma separated list of property masks that
2298 describe properties the caller is interested in. The property mask is
2299 a string in the following format:
2300
2301 <pre>
2302 [[group.]subgroup.]name
2303 </pre>
2304
2305 where @c name is the property name and @c group, @c subgroup are zero
2306 or more property group specifiers. Each element (group or name) in
2307 the property mask may be either a Latin string or an asterisk symbol
2308 (@c "*") which is used to match any string for the given element. A
2309 property mask that doesn't contain asterisk symbols represents a
2310 single fully qualified property name.
2311
2312 Groups in the fully qualified property name go from more generic (the
2313 left-most part) to more specific (the right-most part). The first
2314 element is usually a name of the object the property belongs to. The
2315 second element may be either a property name, or a child object name,
2316 or an index if the preceding element names an object which is one of
2317 many objects of the same type. This way, property names form a
2318 hierarchy of properties. Here are some examples of property names:
2319
2320 <table>
2321 <tr>
2322 <td><tt>VirtualBox.version</tt></td>
2323 <td><link to="IVirtualBox::version"/> property</td>
2324 </tr>
2325 <tr>
2326 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2327 <td><link to="IMachine::name"/> property of the machine with the
2328 given UUID</td>
2329 </tr>
2330 </table>
2331
2332 Most property names directly correspond to the properties of objects
2333 (components) provided by the VirtualBox library and may be used to
2334 track changes to these properties. However, there may be
2335 pseudo-property names that don't correspond to any existing object's
2336 property directly, as well as there may be object properties that
2337 don't have a corresponding property name that is understood by this
2338 method, and therefore changes to such properties cannot be
2339 tracked. See individual object's property descriptions to get a
2340 fully qualified property name that can be used with this method (if
2341 any).
2342
2343 There is a special property mask @c "*" (i.e. a string consisting of a
2344 single asterisk symbol) that can be used to match all properties.
2345 Below are more examples of property masks:
2346
2347 <table>
2348 <tr>
2349 <td><tt>VirtualBox.*</tt></td>
2350 <td>Track all properties of the VirtualBox object</td>
2351 </tr>
2352 <tr>
2353 <td><tt>Machine.*.name</tt></td>
2354 <td>Track changes to the <link to="IMachine::name"/> property of
2355 all registered virtual machines</td>
2356 </tr>
2357 </table>
2358
2359 <note>
2360 This function is not implemented in the current version of the
2361 product.
2362 </note>
2363 </desc>
2364 <param name="what" type="wstring" dir="in">
2365 <desc>Comma separated list of property masks.</desc>
2366 </param>
2367 <param name="timeout" type="unsigned long" dir="in">
2368 <desc>
2369 Wait timeout in milliseconds.
2370 Specify -1 for an indefinite wait.
2371 </desc>
2372 </param>
2373 <param name="changed" type="wstring" dir="out">
2374 <desc>
2375 Comma separated list of properties that have been changed and caused
2376 this method to return to the caller.
2377 </desc>
2378 </param>
2379 <param name="values" type="wstring" dir="out">
2380 <desc>Reserved, not currently used.</desc>
2381 </param>
2382 </method>
2383
2384 <!--method name="createDHCPServerForInterface">
2385 <desc>
2386 Creates a dhcp server settings to be used for the given interface
2387 <result name="E_INVALIDARG">
2388 Host network interface @a name already exists.
2389 </result>
2390 </desc>
2391 <param name="interface" type="IHostNetworkInterface" dir="in">
2392 <desc>Network Interface</desc>
2393 </param>
2394 <param name="server" type="IDHCPServer" dir="out">
2395 <desc>Dhcp server settings</desc>
2396 </param>
2397 </method-->
2398
2399 <method name="createDHCPServer">
2400 <desc>
2401 Creates a dhcp server settings to be used for the given internal network name
2402 <result name="E_INVALIDARG">
2403 Host network interface @a name already exists.
2404 </result>
2405 </desc>
2406 <param name="name" type="wstring" dir="in">
2407 <desc>server name</desc>
2408 </param>
2409 <param name="server" type="IDHCPServer" dir="return">
2410 <desc>Dhcp server settings</desc>
2411 </param>
2412 </method>
2413
2414 <method name="findDHCPServerByNetworkName">
2415 <desc>
2416 Searches a dhcp server settings to be used for the given internal network name
2417 <result name="E_INVALIDARG">
2418 Host network interface @a name already exists.
2419 </result>
2420
2421 </desc>
2422 <param name="name" type="wstring" dir="in">
2423 <desc>server name</desc>
2424 </param>
2425 <param name="server" type="IDHCPServer" dir="return">
2426 <desc>Dhcp server settings</desc>
2427 </param>
2428 </method>
2429
2430 <!--method name="findDHCPServerForInterface">
2431 <desc>
2432 Searches a dhcp server settings to be used for the given interface
2433 <result name="E_INVALIDARG">
2434 Host network interface @a name already exists.
2435 </result>
2436 </desc>
2437 <param name="interface" type="IHostNetworkInterface" dir="in">
2438 <desc>Network Interface</desc>
2439 </param>
2440 <param name="server" type="IDHCPServer" dir="out">
2441 <desc>Dhcp server settings</desc>
2442 </param>
2443 </method-->
2444
2445 <method name="removeDHCPServer">
2446 <desc>
2447 Removes the dhcp server settings
2448 <result name="E_INVALIDARG">
2449 Host network interface @a name already exists.
2450 </result>
2451 </desc>
2452 <param name="server" type="IDHCPServer" dir="in">
2453 <desc>Dhcp server settings to be removed</desc>
2454 </param>
2455 </method>
2456
2457
2458 <method name="checkFirmwarePresent">
2459 <desc>
2460 Check if this VirtualBox installation has a firmware
2461 of the given type available, either system-wide or per-user.
2462 Optionally, this may return a hint where this firmware can be
2463 downloaded from.
2464 </desc>
2465 <param name="firmwareType" type="FirmwareType" dir="in">
2466 <desc>
2467 Type of firmware to check.
2468 </desc>
2469 </param>
2470 <param name="version" type="wstring" dir="in">
2471 <desc>Expected version number, usually empty string (presently ignored).</desc>
2472 </param>
2473
2474 <param name="url" type="wstring" dir="out">
2475 <desc>
2476 Suggested URL to download this firmware from.
2477 </desc>
2478 </param>
2479
2480 <param name="file" type="wstring" dir="out">
2481 <desc>
2482 Filename of firmware, only valid if result == TRUE.
2483 </desc>
2484 </param>
2485
2486 <param name="result" type="boolean" dir="return">
2487 <desc>If firmware of this type and version is available.</desc>
2488 </param>
2489 </method>
2490
2491 </interface>
2492
2493 <!--
2494 // IVFSExplorer
2495 /////////////////////////////////////////////////////////////////////////
2496 -->
2497
2498 <enum
2499 name="VFSType"
2500 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
2501 >
2502 <desc>
2503 Virtual file systems supported by VFSExplorer.
2504 </desc>
2505
2506 <const name="File" value="1" />
2507 <const name="Cloud" value="2" />
2508 <const name="S3" value="3" />
2509 <const name="WebDav" value="4" />
2510 </enum>
2511
2512 <enum
2513 name="VFSFileType"
2514 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
2515 >
2516 <desc>
2517 File types known by VFSExplorer.
2518 </desc>
2519
2520 <const name="Unknown" value="1" />
2521 <const name="Fifo" value="2" />
2522 <const name="DevChar" value="3" />
2523 <const name="Directory" value="4" />
2524 <const name="DevBlock" value="5" />
2525 <const name="File" value="6" />
2526 <const name="SymLink" value="7" />
2527 <const name="Socket" value="8" />
2528 <const name="WhiteOut" value="9" />
2529 </enum>
2530
2531 <interface
2532 name="IVFSExplorer" extends="$unknown"
2533 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
2534 wsmap="managed"
2535 >
2536 <desc>
2537 The VFSExplorer interface unifies access to different file system
2538 types. This includes local file systems as well remote file systems like
2539 S3. For a list of supported types see <link to="VFSType" />.
2540 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
2541 </desc>
2542
2543 <attribute name="path" type="wstring" readonly="yes">
2544 <desc>Returns the current path in the virtual file system.</desc>
2545 </attribute>
2546
2547 <attribute name="type" type="VFSType" readonly="yes">
2548 <desc>Returns the file system type which is currently in use.</desc>
2549 </attribute>
2550
2551 <method name="update">
2552 <desc>Updates the internal list of files/directories from the
2553 current directory level. Use <link to="#entryList" /> to get the full list
2554 after a call to this method.</desc>
2555
2556 <param name="aProgress" type="IProgress" dir="return">
2557 <desc>Progress object to track the operation completion.</desc>
2558 </param>
2559 </method>
2560
2561 <method name="cd">
2562 <desc>Change the current directory level.</desc>
2563
2564 <param name="aDir" type="wstring" dir="in">
2565 <desc>The name of the directory to go in.</desc>
2566 </param>
2567
2568 <param name="aProgress" type="IProgress" dir="return">
2569 <desc>Progress object to track the operation completion.</desc>
2570 </param>
2571 </method>
2572
2573 <method name="cdUp">
2574 <desc>Go one directory upwards from the current directory level.</desc>
2575
2576 <param name="aProgress" type="IProgress" dir="return">
2577 <desc>Progress object to track the operation completion.</desc>
2578 </param>
2579 </method>
2580
2581 <method name="entryList">
2582 <desc>Returns a list of files/directories after a call to <link
2583 to="#update" />. The user is responsible for keeping this internal
2584 list up do date.</desc>
2585
2586 <param name="aNames" type="wstring" safearray="yes" dir="out">
2587 <desc>The list of names for the entries.</desc>
2588 </param>
2589
2590 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
2591 <desc>The list of types for the entries.</desc>
2592 </param>
2593 </method>
2594
2595 <method name="exists">
2596 <desc>Checks if the given file list exists in the current directory
2597 level.</desc>
2598
2599 <param name="aNames" type="wstring" safearray="yes" dir="in">
2600 <desc>The names to check.</desc>
2601 </param>
2602
2603 <param name="aExists" type="wstring" safearray="yes" dir="return">
2604 <desc>The names which exist.</desc>
2605 </param>
2606 </method>
2607
2608 <method name="remove">
2609 <desc>Deletes the given files in the current directory level.</desc>
2610
2611 <param name="aNames" type="wstring" safearray="yes" dir="in">
2612 <desc>The names to remove.</desc>
2613 </param>
2614
2615 <param name="aProgress" type="IProgress" dir="return">
2616 <desc>Progress object to track the operation completion.</desc>
2617 </param>
2618 </method>
2619
2620 </interface>
2621
2622 <!--
2623 // IAppliance
2624 /////////////////////////////////////////////////////////////////////////
2625 -->
2626
2627 <interface
2628 name="IAppliance" extends="$unknown"
2629 uuid="fb61a4fc-57e7-48d6-859b-71f37d484cf2"
2630 wsmap="managed"
2631 >
2632 <desc>
2633 Represents a platform-independent appliance in OVF format. An instance of this is returned
2634 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
2635 virtual machines within an appliance with VirtualBox.
2636
2637 The OVF standard suggests two different physical file formats:
2638
2639 <ol>
2640 <li>If the appliance is distributed as a set of files, there must be at least one XML descriptor
2641 file that conforms to the OVF standard and carries an <tt>.ovf</tt> file extension. If
2642 this descriptor file references other files such as disk images, as OVF appliances typically
2643 do, those additional files must be in the same directory as the descriptor file.</li>
2644
2645 <li>If the appliance is distributed as a single file, it must be in TAR format and have the
2646 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
2647 files and optionally other files.
2648
2649 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
2650 be added with a later version.</li>
2651 </ol>
2652
2653 <b>Importing</b> an OVF appliance into VirtualBox as instances of
2654 <link to="IMachine" /> involves the following sequence of API calls:
2655
2656 <ol>
2657 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
2658 </li>
2659
2660 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
2661 would like to import. So long as this file is syntactically valid, this will succeed
2662 and fill the appliance object with the parsed data from the OVF file.
2663 </li>
2664
2665 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
2666 contents of the IAppliance attributes accordingly. These can be inspected by a
2667 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
2668 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
2669 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
2670 systems (machines) in the OVF, which in turn describe the virtual hardware prescribed
2671 by the OVF (network and hardware adapters, virtual disk images, memory size and so on).
2672 The GUI can then give the user the option to confirm and/or change these suggestions.
2673 </li>
2674
2675 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
2676 virtual system (machine) to override the suggestions made by the interpret() routine.
2677 </li>
2678
2679 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
2680 VirtualBox as instances of <link to="IMachine" /> that match the information in the
2681 virtual system descriptions. After this call suceeded, the UUIDs of the machines created
2682 can be found in the <link to="#machines" /> array attribute.
2683 </li>
2684 </ol>
2685
2686 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
2687
2688 <ol>
2689 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
2690 an empty IAppliance object.
2691 </li>
2692
2693 <li>For each machine you would like to export, call <link to="IMachine::export" />
2694 with the IAppliance object you just created. Each such call creates one instance of
2695 <link to="IVirtualSystemDescription" /> inside the appliance.
2696 </li>
2697
2698 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
2699 virtual system (machine) to override the suggestions made by the export() routine.
2700 </li>
2701
2702 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
2703 file written.</li>
2704 </ol>
2705
2706 </desc>
2707
2708 <attribute name="path" type="wstring" readonly="yes">
2709 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
2710 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
2711 <link to="#write" /> (for export).
2712 This attribute is empty until one of these methods has been called.
2713 </desc>
2714 </attribute>
2715
2716 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
2717 <desc>
2718 Array of virtual disk definitions. One such description exists for each
2719 disk definition in the OVF; each string array item represents one such piece of
2720 disk information, with the information fields separated by tab (\t) characters.
2721
2722 The caller should be prepared for additional fields being appended to
2723 this string in future versions of VirtualBox and therefore check for
2724 the number of tabs in the strings returned.
2725
2726 In the current version, the following eight fields are returned per string
2727 in the array:
2728
2729 <ol>
2730 <li>Disk ID (unique string identifier given to disk)</li>
2731
2732 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
2733
2734 <li>Populated size (optional unsigned integer indicating the current size of the
2735 disk; can be approximate; -1 if unspecified)</li>
2736
2737 <li>Format (string identifying the disk format, typically
2738 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
2739
2740 <li>Reference (where to find the disk image, typically a file name; if empty,
2741 then the disk should be created on import)</li>
2742
2743 <li>Image size (optional unsigned integer indicating the size of the image,
2744 which need not necessarily be the same as the values specified above, since
2745 the image may be compressed or sparse; -1 if not specified)</li>
2746
2747 <li>Chunk size (optional unsigned integer if the image is split into chunks;
2748 presently unsupported and always -1)</li>
2749
2750 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
2751 </ol>
2752 </desc>
2753 </attribute>
2754
2755 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
2756 <desc> Array of virtual system descriptions. One such description is created
2757 for each virtual system (machine) found in the OVF.
2758 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
2759 (for export) has been called.
2760 </desc>
2761 </attribute>
2762
2763 <attribute name="machines" type="wstring" readonly="yes" safearray="yes">
2764 <desc>
2765 Contains the UUIDs of the machines created from the information in this appliances. This is only
2766 relevant for the import case, and will only contain data after a call to <link to="#importMachines" />
2767 succeeded.
2768 </desc>
2769 </attribute>
2770
2771 <method name="read">
2772 <desc>
2773 Reads an OVF file into the appliance object.
2774
2775 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
2776 mere fact that this method returns successfully does not mean that VirtualBox supports all
2777 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
2778 </desc>
2779 <param name="file" type="wstring" dir="in">
2780 <desc>
2781 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
2782 on whether the appliance is distributed as a set of files or as a single file, respectively).
2783 </desc>
2784 </param>
2785 <param name="aProgress" type="IProgress" dir="return">
2786 <desc>Progress object to track the operation completion.</desc>
2787 </param>
2788 </method>
2789
2790 <method name="interpret">
2791 <desc>
2792 Interprets the OVF data that was read when the appliance was constructed. After
2793 calling this method, one can inspect the
2794 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
2795 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
2796 the appliance.
2797
2798 Calling this method is the second step of importing an appliance into VirtualBox;
2799 see <link to="IAppliance" /> for an overview.
2800
2801 After calling this method, one should call <link to="#getWarnings" /> to find out
2802 if problems were encountered during the processing which might later lead to
2803 errors.
2804 </desc>
2805 </method>
2806
2807 <method name="importMachines">
2808 <desc>
2809 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
2810 and other interfaces that match the information contained in the appliance as
2811 closely as possible, as represented by the import instructions in the
2812 <link to="#virtualSystemDescriptions" /> array.
2813
2814 Calling this method is the final step of importing an appliance into VirtualBox;
2815 see <link to="IAppliance" /> for an overview.
2816
2817 Since importing the appliance will most probably involve copying and converting
2818 disk images, which can take a long time, this method operates asynchronously and
2819 returns an IProgress object to allow the caller to monitor the progress.
2820
2821 After the import succeeded, the UUIDs of the IMachine instances created can be
2822 retrieved from the <link to="#machines" /> array attribute.
2823 </desc>
2824
2825 <param name="aProgress" type="IProgress" dir="return">
2826 <desc>Progress object to track the operation completion.</desc>
2827 </param>
2828 </method>
2829
2830 <method name="createVFSExplorer">
2831 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
2832
2833 <param name="aUri" type="wstring" dir="in">
2834 <desc>The URI describing the file system to use.</desc>
2835 </param>
2836
2837 <param name="aExplorer" type="IVFSExplorer" dir="return">
2838 <desc></desc>
2839 </param>
2840 </method>
2841
2842 <method name="write">
2843 <desc>
2844 Writes the contents of the appliance exports into a new OVF file.
2845
2846 Calling this method is the final step of exporting an appliance from VirtualBox;
2847 see <link to="IAppliance" /> for an overview.
2848
2849 Since exporting the appliance will most probably involve copying and converting
2850 disk images, which can take a long time, this method operates asynchronously and
2851 returns an IProgress object to allow the caller to monitor the progress.
2852 </desc>
2853 <param name="format" type="wstring" dir="in">
2854 <desc>
2855 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
2856 future versions of VirtualBox may support additional formats.
2857 </desc>
2858 </param>
2859 <param name="path" type="wstring" dir="in">
2860 <desc>
2861 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
2862 on whether the appliance is distributed as a set of files or as a single file, respectively).
2863 </desc>
2864 </param>
2865 <param name="aProgress" type="IProgress" dir="return">
2866 <desc>Progress object to track the operation completion.</desc>
2867 </param>
2868 </method>
2869
2870 <method name="getWarnings">
2871 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
2872
2873 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
2874 <desc></desc>
2875 </param>
2876 </method>
2877
2878 </interface>
2879
2880 <enum
2881 name="VirtualSystemDescriptionType"
2882 uuid="c0f8f135-3a1d-417d-afa6-b38b95a91f90"
2883 >
2884 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
2885 a configuration value.</desc>
2886
2887 <const name="Ignore" value="1" />
2888 <const name="OS" value="2" />
2889 <const name="Name" value="3" />
2890 <const name="Product" value="4" />
2891 <const name="Vendor" value="5" />
2892 <const name="Version" value="6" />
2893 <const name="ProductUrl" value="7" />
2894 <const name="VendorUrl" value="8" />
2895 <const name="Description" value="9" />
2896 <const name="License" value="10" />
2897 <const name="Miscellaneous" value="11" />
2898 <const name="CPU" value="12" />
2899 <const name="Memory" value="13" />
2900 <const name="HardDiskControllerIDE" value="14" />
2901 <const name="HardDiskControllerSATA" value="15" />
2902 <const name="HardDiskControllerSCSI" value="16" />
2903 <const name="HardDiskControllerSAS" value="17" />
2904 <const name="HardDiskImage" value="18" />
2905 <const name="Floppy" value="19" />
2906 <const name="CDROM" value="20" />
2907 <const name="NetworkAdapter" value="21" />
2908 <const name="USBController" value="22" />
2909 <const name="SoundCard" value="23" />
2910
2911 </enum>
2912
2913 <enum
2914 name="VirtualSystemDescriptionValueType"
2915 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
2916 >
2917 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
2918 type to fetch.</desc>
2919
2920 <const name="Reference" value="1" />
2921 <const name="Original" value="2" />
2922 <const name="Auto" value="3" />
2923 <const name="ExtraConfig" value="4" />
2924
2925 </enum>
2926
2927 <interface
2928 name="IVirtualSystemDescription" extends="$unknown"
2929 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
2930 wsmap="managed"
2931 >
2932
2933 <desc>Represents one virtual system (machine) in an appliance. This interface is used in
2934 the <link to="IAppliance::virtualSystemDescriptions" /> array. After
2935 <link to="IAppliance::interpret" /> has been called, that array contains information
2936 about how the virtual systems described in the OVF should best be imported into
2937 VirtualBox virtual machines. See <link to="IAppliance" /> for the steps required to
2938 import an OVF into VirtualBox.
2939 </desc>
2940
2941 <attribute name="count" type="unsigned long" readonly="yes">
2942 <desc>Return the number of virtual system description entries.</desc>
2943 </attribute>
2944
2945 <method name="getDescription">
2946 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
2947 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
2948
2949 The list below identifies the value sets that are possible depending on the
2950 <link to="VirtualSystemDescriptionType" /> enum value in the array item in @a aTypes[]. In each case,
2951 the array item with the same index in @a aOvfValues[] will contain the original value as contained
2952 in the OVF file (just for informational purposes), and the corresponding item in @a aVBoxValues[]
2953 will contain a suggested value to be used for VirtualBox. Depending on the description type,
2954 the @a aExtraConfigValues[] array item may also be used.
2955
2956 <ul>
2957 <li>
2958 "OS": the guest operating system type. There must be exactly one such array item on import. The
2959 corresponding item in @a aVBoxValues[] contains the suggested guest operating system for VirtualBox.
2960 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
2961 item in @a aOvfValues[] will contain a numerical value that described the operating system in the OVF.
2962 </li>
2963 <li>
2964 "Name": the name to give to the new virtual machine. There can be at most one such array item;
2965 if none is present on import, then an automatic name will be created from the operating system
2966 type. The correponding item im @a aOvfValues[] will contain the suggested virtual machine name
2967 from the OVF file, and @a aVBoxValues[] will contain a suggestion for a unique VirtualBox
2968 <link to="IMachine" /> name that does not exist yet.
2969 </li>
2970 <li>
2971 "Description": an arbitrary description.
2972 </li>
2973 <li>
2974 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
2975 code to display such a license for agreement; the Main API does not enforce any such policy.
2976 </li>
2977 <li>
2978 Miscellaneous: reserved for future use.
2979 </li>
2980 <li>
2981 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
2982 </li>
2983 <li>
2984 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
2985 is present on import, then VirtualBox will set a meaningful default based on the operating system
2986 type.
2987 </li>
2988 <li>
2989 "HardDiskControllerIDE": an IDE hard disk controller. There can be at most two such items.
2990 An optional value in @a aOvfValues[] and @a aVBoxValues[] can be "PIIX3" or "PIIX4" to specify
2991 the type of IDE controller; this corresponds to the ResourceSubType element which VirtualBox
2992 writes into the OVF.
2993 The matching item in the @a aRefs[] array will contain an integer that items of the "Harddisk"
2994 type can use to specify which hard disk controller a virtual disk should be connected to.
2995 Note that in OVF, an IDE controller has two channels, corresponding to "master" and "slave"
2996 in traditional terminology, whereas the IDE storage controller that VirtualBox supports in
2997 its virtual machines supports four channels (primary master, primary slave, secondary master,
2998 secondary slave) and thus maps to two IDE controllers in the OVF sense.
2999 </li>
3000 <li>
3001 "HardDiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3002 has no value in @a aOvfValues[] or @a aVBoxValues[].
3003 The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
3004 </li>
3005 <li>
3006 "HardDiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3007 The items in @a aOvfValues[] and @a aVBoxValues[] will either be "LsiLogic", "BusLogic" or
3008 "LsiLogicSas". (Note that in OVF, the LsiLogicSas controller is treated as a SCSI controller
3009 whereas VirtualBox considers it a class of storage controllers of its own; see
3010 <link to="StorageControllerType" />).
3011 The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
3012 </li>
3013 <li>
3014 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3015 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3016
3017 The array item in @a aOvfValues[] will contain the file specification from the OVF file (without
3018 a path since the image file should be in the same location as the OVF file itself), whereas the
3019 item in @a aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
3020 hard disk image. This means that on import the image will be copied and converted from the
3021 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3022 On import, the target image will also be registered with VirtualBox.
3023
3024 The matching item in the @a aExtraConfigValues[] array must contain a string of the following
3025 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3026 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3027 the image to. That number must be the index of an array item with one of the hard disk controller
3028 types (HardDiskControllerSCSI, HardDiskControllerSATA, HardDiskControllerIDE).
3029 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3030 this can be 0 or 1 for master or slave, respectively. For compatibility with VirtualBox versions
3031 before 3.2, the values 2 and 3 (for secondary master and secondary slave) are also supported, but
3032 no longer exported. For SATA and SCSI controllers, the channel can range from 0-29.
3033 </li>
3034 <li>
3035 "CDROM": a virtual CD-ROM drive. The matching item in @a aExtraConfigValue[] contains the same
3036 attachment information as with "HardDiskImage" items.
3037 </li>
3038 <li>
3039 "CDROM": a virtual floppy drive. The matching item in @a aExtraConfigValue[] contains the same
3040 attachment information as with "HardDiskImage" items.
3041 </li>
3042 <li>
3043 "NetworkAdapter": a network adapter. The array item in @a aVBoxValues[] will specify the hardware
3044 for the network adapter, whereas the array item in @a aExtraConfigValues[] will have a string
3045 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3046 </li>
3047 <li>
3048 "USBController": a USB controller. There can be at most one such item. If and only if such an
3049 item ispresent, USB support will be enabled for the new virtual machine.
3050 </li>
3051 <li>
3052 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3053 present, sound support will be enabled for the new virtual machine. Note that the virtual
3054 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3055 may be different from the virtual soundcard expected by the appliance.
3056 </li>
3057 </ul>
3058
3059 </desc>
3060
3061 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3062 <desc></desc>
3063 </param>
3064
3065 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3066 <desc></desc>
3067 </param>
3068
3069 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3070 <desc></desc>
3071 </param>
3072
3073 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3074 <desc></desc>
3075 </param>
3076
3077 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3078 <desc></desc>
3079 </param>
3080
3081 </method>
3082
3083 <method name="getDescriptionByType">
3084 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3085 should be returned.</desc>
3086
3087 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3088 <desc></desc>
3089 </param>
3090
3091 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3092 <desc></desc>
3093 </param>
3094
3095 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3096 <desc></desc>
3097 </param>
3098
3099 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3100 <desc></desc>
3101 </param>
3102
3103 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3104 <desc></desc>
3105 </param>
3106
3107 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3108 <desc></desc>
3109 </param>
3110
3111 </method>
3112
3113 <method name="getValuesByType">
3114 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3115 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3116 values.</desc>
3117
3118 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3119 <desc></desc>
3120 </param>
3121
3122 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3123 <desc></desc>
3124 </param>
3125
3126 <param name="aValues" type="wstring" dir="return" safearray="yes">
3127 <desc></desc>
3128 </param>
3129
3130 </method>
3131
3132 <method name="setFinalValues">
3133 <desc>
3134 This method allows the appliance's user to change the configuration for the virtual
3135 system descriptions. For each array item returned from <link to="#getDescription" />,
3136 you must pass in one boolean value and one configuration value.
3137
3138 Each item in the boolean array determines whether the particular configuration item
3139 should be enabled.
3140 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3141 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3142 and SoundCard.
3143
3144 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3145 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
3146 the configuration remains unchanged. Please see the documentation for getDescription()
3147 for valid configuration values for the individual array item types. If the
3148 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
3149 </desc>
3150
3151 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3152 <desc></desc>
3153 </param>
3154
3155 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
3156 <desc></desc>
3157 </param>
3158
3159 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3160 <desc></desc>
3161 </param>
3162 </method>
3163
3164 <method name="addDescription">
3165 <desc>
3166 This method adds an additional description entry to the stack of already
3167 available descriptions for this virtual system. This is handy for writing
3168 values which aren't directly supported by VirtualBox. One example would
3169 be the License type of <link to="VirtualSystemDescriptionType" />.
3170 </desc>
3171
3172 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3173 <desc></desc>
3174 </param>
3175
3176 <param name="aVBoxValue" type="wstring" dir="in">
3177 <desc></desc>
3178 </param>
3179
3180 <param name="aExtraConfigValue" type="wstring" dir="in">
3181 <desc></desc>
3182 </param>
3183 </method>
3184 </interface>
3185
3186
3187 <!--
3188 // IMachine
3189 /////////////////////////////////////////////////////////////////////////
3190 -->
3191
3192 <interface
3193 name="IInternalMachineControl" extends="$unknown"
3194 uuid="e2da8b1a-2ad1-490e-b29e-c33a144791b6"
3195 internal="yes"
3196 wsmap="suppress"
3197 >
3198 <method name="updateState">
3199 <desc>
3200 Updates the VM state.
3201 <note>
3202 This operation will also update the settings file with
3203 the correct information about the saved state file
3204 and delete this file from disk when appropriate.
3205 </note>
3206 </desc>
3207 <param name="state" type="MachineState" dir="in"/>
3208 </method>
3209
3210 <method name="getIPCId">
3211 <param name="id" type="wstring" dir="return"/>
3212 </method>
3213
3214 <method name="beginPowerUp">
3215 <desc>
3216 Tells VBoxSVC that <link to="IConsole::powerUp"/> is under ways and
3217 gives it the progress object that should be part of any pending
3218 <link to="IMachine::launchVMProcess"/> operations. The progress
3219 object may be called back to reflect an early cancelation, so some care
3220 have to be taken with respect to any cancelation callbacks. The console
3221 object will call <link to="IInternalMachineControl::endPowerUp"/>
3222 to signal the completion of the progress object.
3223 </desc>
3224 <param name="aProgress" type="IProgress" dir="in" />
3225 </method>
3226
3227 <method name="endPowerUp">
3228 <desc>
3229 Tells VBoxSVC that <link to="IConsole::powerUp"/> has completed.
3230 This method may query status information from the progress object it
3231 received in <link to="IInternalMachineControl::beginPowerUp"/> and copy
3232 it over to any in-progress <link to="IMachine::launchVMProcess"/>
3233 call in order to complete that progress object.
3234 </desc>
3235 <param name="result" type="long" dir="in"/>
3236 </method>
3237
3238 <method name="runUSBDeviceFilters">
3239 <desc>
3240 Asks the server to run USB devices filters of the associated
3241 machine against the given USB device and tell if there is
3242 a match.
3243 <note>
3244 Intended to be used only for remote USB devices. Local
3245 ones don't require to call this method (this is done
3246 implicitly by the Host and USBProxyService).
3247 </note>
3248 </desc>
3249 <param name="device" type="IUSBDevice" dir="in"/>
3250 <param name="matched" type="boolean" dir="out"/>
3251 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3252 </method>
3253
3254 <method name="captureUSBDevice">
3255 <desc>
3256 Requests a capture of the given host USB device.
3257 When the request is completed, the VM process will
3258 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3259 notification.
3260 </desc>
3261 <param name="id" type="uuid" mod="string" dir="in"/>
3262 </method>
3263
3264 <method name="detachUSBDevice">
3265 <desc>
3266 Notification that a VM is going to detach (@a done = @c false) or has
3267 already detached (@a done = @c true) the given USB device.
3268 When the @a done = @c true request is completed, the VM process will
3269 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3270 notification.
3271 <note>
3272 In the @a done = @c true case, the server must run its own filters
3273 and filters of all VMs but this one on the detached device
3274 as if it were just attached to the host computer.
3275 </note>
3276 </desc>
3277 <param name="id" type="uuid" mod="string" dir="in"/>
3278 <param name="done" type="boolean" dir="in"/>
3279 </method>
3280
3281 <method name="autoCaptureUSBDevices">
3282 <desc>
3283 Requests a capture all matching USB devices attached to the host.
3284 When the request is completed, the VM process will
3285 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3286 notification per every captured device.
3287 </desc>
3288 </method>
3289
3290 <method name="detachAllUSBDevices">
3291 <desc>
3292 Notification that a VM that is being powered down. The done
3293 parameter indicates whether which stage of the power down
3294 we're at. When @a done = @c false the VM is announcing its
3295 intentions, while when @a done = @c true the VM is reporting
3296 what it has done.
3297 <note>
3298 In the @a done = @c true case, the server must run its own filters
3299 and filters of all VMs but this one on all detach devices as
3300 if they were just attached to the host computer.
3301 </note>
3302 </desc>
3303 <param name="done" type="boolean" dir="in"/>
3304 </method>
3305
3306 <method name="onSessionEnd">
3307 <desc>
3308 Triggered by the given session object when the session is about
3309 to close normally.
3310 </desc>
3311 <param name="session" type="ISession" dir="in">
3312 <desc>Session that is being closed</desc>
3313 </param>
3314 <param name="progress" type="IProgress" dir="return">
3315 <desc>
3316 Used to wait until the corresponding machine is actually
3317 dissociated from the given session on the server.
3318 Returned only when this session is a direct one.
3319 </desc>
3320 </param>
3321 </method>
3322
3323 <method name="beginSavingState">
3324 <desc>
3325 Called by the VM process to inform the server it wants to
3326 save the current state and stop the VM execution.
3327 </desc>
3328 <param name="progress" type="IProgress" dir="in">
3329 <desc>
3330 Progress object created by the VM process to wait until
3331 the state is saved.
3332 </desc>
3333 </param>
3334 <param name="stateFilePath" type="wstring" dir="out">
3335 <desc>
3336 File path the VM process must save the execution state to.
3337 </desc>
3338 </param>
3339 </method>
3340
3341 <method name="endSavingState">
3342 <desc>
3343 Called by the VM process to inform the server that saving
3344 the state previously requested by #beginSavingState is either
3345 successfully finished or there was a failure.
3346
3347 <result name="VBOX_E_FILE_ERROR">
3348 Settings file not accessible.
3349 </result>
3350 <result name="VBOX_E_XML_ERROR">
3351 Could not parse the settings file.
3352 </result>
3353
3354 </desc>
3355
3356 <param name="success" type="boolean" dir="in">
3357 <desc>@c true to indicate success and @c false otherwise.
3358 </desc>
3359 </param>
3360 </method>
3361
3362 <method name="adoptSavedState">
3363 <desc>
3364 Gets called by IConsole::adoptSavedState.
3365 <result name="VBOX_E_FILE_ERROR">
3366 Invalid saved state file path.
3367 </result>
3368 </desc>
3369 <param name="savedStateFile" type="wstring" dir="in">
3370 <desc>Path to the saved state file to adopt.</desc>
3371 </param>
3372 </method>
3373
3374 <method name="beginTakingSnapshot">
3375 <desc>
3376 Called from the VM process to request from the server to perform the
3377 server-side actions of creating a snapshot (creating differencing images
3378 and the snapshot object).
3379
3380 <result name="VBOX_E_FILE_ERROR">
3381 Settings file not accessible.
3382 </result>
3383 <result name="VBOX_E_XML_ERROR">
3384 Could not parse the settings file.
3385 </result>
3386 </desc>
3387 <param name="initiator" type="IConsole" dir="in">
3388 <desc>The console object that initiated this call.</desc>
3389 </param>
3390 <param name="name" type="wstring" dir="in">
3391 <desc>Snapshot name.</desc>
3392 </param>
3393 <param name="description" type="wstring" dir="in">
3394 <desc>Snapshot description.</desc>
3395 </param>
3396 <param name="consoleProgress" type="IProgress" dir="in">
3397 <desc>
3398 Progress object created by the VM process tracking the
3399 snapshot's progress. This has the following sub-operations:
3400 <ul>
3401 <li>setting up (weight 1);</li>
3402 <li>one for each medium attachment that needs a differencing image (weight 1 each);</li>
3403 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3404 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3405 <li>finishing up (weight 1)</li>
3406 </ul>
3407 </desc>
3408 </param>
3409 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3410 <desc>
3411 Whether this is an online snapshot (i.e. the machine is running).
3412 </desc>
3413 </param>
3414 <param name="stateFilePath" type="wstring" dir="out">
3415 <desc>
3416 File path the VM process must save the execution state to.
3417 </desc>
3418 </param>
3419 </method>
3420
3421 <method name="endTakingSnapshot">
3422 <desc>
3423 Called by the VM process to inform the server that the snapshot
3424 previously requested by #beginTakingSnapshot is either
3425 successfully taken or there was a failure.
3426 </desc>
3427
3428 <param name="success" type="boolean" dir="in">
3429 <desc>@c true to indicate success and @c false otherwise</desc>
3430 </param>
3431 </method>
3432
3433 <method name="deleteSnapshot">
3434 <desc>
3435 Gets called by IConsole::deleteSnapshot.
3436 <result name="VBOX_E_INVALID_OBJECT_STATE">
3437 Snapshot has more than one child snapshot.
3438 </result>
3439 </desc>
3440 <param name="initiator" type="IConsole" dir="in">
3441 <desc>The console object that initiated this call.</desc>
3442 </param>
3443 <param name="id" type="uuid" mod="string" dir="in">
3444 <desc>UUID of the snapshot to delete.</desc>
3445 </param>
3446 <param name="machineState" type="MachineState" dir="out">
3447 <desc>New machine state after this operation is started.</desc>
3448 </param>
3449 <param name="progress" type="IProgress" dir="return">
3450 <desc>Progress object to track the operation completion.</desc>
3451 </param>
3452 </method>
3453
3454 <method name="finishOnlineMergeMedium">
3455 <desc>
3456 Gets called by IConsole::onlineMergeMedium.
3457 </desc>
3458 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
3459 <desc>The medium attachment which needs to be cleaned up.</desc>
3460 </param>
3461 <param name="source" type="IMedium" dir="in">
3462 <desc>Merge source medium.</desc>
3463 </param>
3464 <param name="target" type="IMedium" dir="in">
3465 <desc>Merge target medium.</desc>
3466 </param>
3467 <param name="mergeForward" type="boolean" dir="in">
3468 <desc>Merge direction.</desc>
3469 </param>
3470 <param name="parentForTarget" type="IMedium" dir="in">
3471 <desc>For forward merges: new parent for target medium.</desc>
3472 </param>
3473 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
3474 <desc>For backward merges: list of media which need their parent UUID
3475 updated.</desc>
3476 </param>
3477 </method>
3478
3479 <method name="restoreSnapshot">
3480 <desc>
3481 Gets called by IConsole::RestoreSnapshot.
3482 </desc>
3483 <param name="initiator" type="IConsole" dir="in">
3484 <desc>The console object that initiated this call.</desc>
3485 </param>
3486 <param name="snapshot" type="ISnapshot" dir="in">
3487 <desc>The snapshot to restore the VM state from.</desc>
3488 </param>
3489 <param name="machineState" type="MachineState" dir="out">
3490 <desc>New machine state after this operation is started.</desc>
3491 </param>
3492 <param name="progress" type="IProgress" dir="return">
3493 <desc>Progress object to track the operation completion.</desc>
3494 </param>
3495 </method>
3496
3497 <method name="pullGuestProperties">
3498 <desc>
3499 Get the list of the guest properties matching a set of patterns along
3500 with their values, time stamps and flags and give responsibility for
3501 managing properties to the console.
3502 </desc>
3503 <param name="name" type="wstring" dir="out" safearray="yes">
3504 <desc>
3505 The names of the properties returned.
3506 </desc>
3507 </param>
3508 <param name="value" type="wstring" dir="out" safearray="yes">
3509 <desc>
3510 The values of the properties returned. The array entries match the
3511 corresponding entries in the @a name array.
3512 </desc>
3513 </param>
3514 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3515 <desc>
3516 The time stamps of the properties returned. The array entries match
3517 the corresponding entries in the @a name array.
3518 </desc>
3519 </param>
3520 <param name="flags" type="wstring" dir="out" safearray="yes">
3521 <desc>
3522 The flags of the properties returned. The array entries match the
3523 corresponding entries in the @a name array.
3524 </desc>
3525 </param>
3526 </method>
3527
3528 <method name="pushGuestProperty">
3529 <desc>
3530 Update a single guest property in IMachine.
3531 </desc>
3532 <param name="name" type="wstring" dir="in">
3533 <desc>
3534 The name of the property to be updated.
3535 </desc>
3536 </param>
3537 <param name="value" type="wstring" dir="in">
3538 <desc>
3539 The value of the property.
3540 </desc>
3541 </param>
3542 <param name="timestamp" type="unsigned long long" dir="in">
3543 <desc>
3544 The timestamp of the property.
3545 </desc>
3546 </param>
3547 <param name="flags" type="wstring" dir="in">
3548 <desc>
3549 The flags of the property.
3550 </desc>
3551 </param>
3552 </method>
3553
3554 <method name="lockMedia">
3555 <desc>
3556 Locks all media attached to the machine for writing and parents of
3557 attached differencing media (if any) for reading. This operation is
3558 atomic so that if it fails no media is actually locked.
3559
3560 This method is intended to be called when the machine is in Starting or
3561 Restoring state. The locked media will be automatically unlocked when
3562 the machine is powered off or crashed.
3563 </desc>
3564 </method>
3565 <method name="unlockMedia">
3566 <desc>
3567 Unlocks all media previously locked using
3568 <link to="IInternalMachineControl::lockMedia"/>.
3569
3570 This method is intended to be used with teleportation so that it is
3571 possible to teleport between processes on the same machine.
3572 </desc>
3573 </method>
3574 </interface>
3575
3576 <interface
3577 name="IBIOSSettings" extends="$unknown"
3578 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3579 wsmap="managed"
3580 >
3581 <desc>
3582 The IBIOSSettings interface represents BIOS settings of the virtual
3583 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3584 </desc>
3585 <attribute name="logoFadeIn" type="boolean">
3586 <desc>Fade in flag for BIOS logo animation.</desc>
3587 </attribute>
3588
3589 <attribute name="logoFadeOut" type="boolean">
3590 <desc>Fade out flag for BIOS logo animation.</desc>
3591 </attribute>
3592
3593 <attribute name="logoDisplayTime" type="unsigned long">
3594 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3595 </attribute>
3596
3597 <attribute name="logoImagePath" type="wstring">
3598 <desc>
3599 Local file system path for external BIOS splash image. Empty string
3600 means the default image is shown on boot.
3601 </desc>
3602 </attribute>
3603
3604 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3605 <desc>Mode of the BIOS boot device menu.</desc>
3606 </attribute>
3607
3608 <attribute name="ACPIEnabled" type="boolean">
3609 <desc>ACPI support flag.</desc>
3610 </attribute>
3611
3612 <attribute name="IOAPICEnabled" type="boolean">
3613 <desc>
3614 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3615 and support IRQs above 15.
3616 </desc>
3617 </attribute>
3618
3619 <attribute name="timeOffset" type="long long">
3620 <desc>
3621 Offset in milliseconds from the host system time. This allows for
3622 guests running with a different system date/time than the host.
3623 It is equivalent to setting the system date/time in the BIOS except
3624 it is not an absolute value but a relative one. Guest Additions
3625 time synchronization honors this offset.
3626 </desc>
3627 </attribute>
3628
3629 <attribute name="PXEDebugEnabled" type="boolean">
3630 <desc>
3631 PXE debug logging flag. If set, VirtualBox will write extensive
3632 PXE trace information to the release log.
3633 </desc>
3634 </attribute>
3635
3636 </interface>
3637
3638 <enum name="CleanupMode"
3639 uuid="67897c50-7cca-47a9-83f6-ce8fd8eb5441">
3640 <desc>Cleanup mode, used with <link to="IMachine::unregister" />.
3641 </desc>
3642 <const name="UnregisterOnly" value="1">
3643 <desc>Unregister only the machine, but neither delete snapshots nor detach media.</desc>
3644 </const>
3645 <const name="DetachAllReturnNone" value="2">
3646 <desc>Delete all snapshots and detach all media but return none; this will keep all media registered.</desc>
3647 </const>
3648 <const name="DetachAllReturnHardDisksOnly" value="3">
3649 <desc>Delete all snapshots, detach all media and return hard disks for closing, but not removeable media.</desc>
3650 </const>
3651 <const name="Full" value="4">
3652 <desc>Delete all snapshots, detach all media and return all media for closing.</desc>
3653 </const>
3654 </enum>
3655
3656 <interface
3657 name="IMachine" extends="$unknown"
3658 uuid="082c38ff-d9b3-4b12-b540-01516a931f17"
3659 wsmap="managed"
3660 >
3661 <desc>
3662 The IMachine interface represents a virtual machine, or guest, created
3663 in VirtualBox.
3664
3665 This interface is used in two contexts. First of all, a collection of
3666 objects implementing this interface is stored in the
3667 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
3668 machines that are currently registered with this VirtualBox
3669 installation. Also, once a session has been opened for the given virtual
3670 machine (e.g. the virtual machine is running), the machine object
3671 associated with the open session can be queried from the session object;
3672 see <link to="ISession"/> for details.
3673
3674 The main role of this interface is to expose the settings of the virtual
3675 machine and provide methods to change various aspects of the virtual
3676 machine's configuration. For machine objects stored in the
3677 <link to="IVirtualBox::machines"/> collection, all attributes are
3678 read-only unless explicitly stated otherwise in individual attribute
3679 and method descriptions.
3680
3681 In order to change a machine setting, a session for this machine must be
3682 opened using one of the <link to="IMachine::lockMachine" /> or
3683 <link to="IMachine::launchVMProcess"/> methods. After the
3684 machine has been successfully locked for a session, a mutable machine object
3685 needs to be queried from the session object and then the desired settings
3686 changes can be applied to the returned object using IMachine attributes and
3687 methods. See the <link to="ISession"/> interface description for more
3688 information about sessions.
3689
3690 Note that IMachine does not provide methods to control virtual machine
3691 execution (such as start the machine, or power it down) -- these methods
3692 are grouped in a separate interface called <link to="IConsole" />.
3693
3694 <see>ISession, IConsole</see>
3695 </desc>
3696
3697 <attribute name="parent" type="IVirtualBox" readonly="yes">
3698 <desc>Associated parent object.</desc>
3699 </attribute>
3700
3701 <attribute name="accessible" type="boolean" readonly="yes">
3702 <desc>
3703 Whether this virtual machine is currently accessible or not.
3704
3705 A machine is always deemed accessible unless it is registered <i>and</i>
3706 its settings file cannot be read or parsed (either because the file itself
3707 is unavailable or has invalid XML contents).
3708
3709 Every time this property is read, the accessibility state of
3710 this machine is re-evaluated. If the returned value is @c false,
3711 the <link to="#accessError"/> property may be used to get the
3712 detailed error information describing the reason of
3713 inaccessibility, including XML error messages.
3714
3715 When the machine is inaccessible, only the following properties
3716 can be used on it:
3717 <ul>
3718 <li><link to="#parent"/></li>
3719 <li><link to="#id"/></li>
3720 <li><link to="#settingsFilePath"/></li>
3721 <li><link to="#accessible"/></li>
3722 <li><link to="#accessError"/></li>
3723 </ul>
3724
3725 An attempt to access any other property or method will return
3726 an error.
3727
3728 The only possible action you can perform on an inaccessible
3729 machine is to unregister it using the
3730 <link to="IMachine::unregister"/> call (or, to check
3731 for the accessibility state once more by querying this
3732 property).
3733
3734 <note>
3735 In the current implementation, once this property returns
3736 @c true, the machine will never become inaccessible
3737 later, even if its settings file cannot be successfully
3738 read/written any more (at least, until the VirtualBox
3739 server is restarted). This limitation may be removed in
3740 future releases.
3741 </note>
3742 </desc>
3743 </attribute>
3744
3745 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3746 <desc>
3747 Error information describing the reason of machine
3748 inaccessibility.
3749
3750 Reading this property is only valid after the last call to
3751 <link to="#accessible"/> returned @c false (i.e. the
3752 machine is currently unaccessible). Otherwise, a @c null
3753 IVirtualBoxErrorInfo object will be returned.
3754 </desc>
3755 </attribute>
3756
3757 <attribute name="name" type="wstring">
3758 <desc>
3759 Name of the virtual machine.
3760
3761 Besides being used for human-readable identification purposes
3762 everywhere in VirtualBox, the virtual machine name is also used
3763 as a name of the machine's settings file and as a name of the
3764 subdirectory this settings file resides in. Thus, every time you
3765 change the value of this property, the settings file will be
3766 renamed once you call <link to="#saveSettings"/> to confirm the
3767 change. The containing subdirectory will be also renamed, but
3768 only if it has exactly the same name as the settings file
3769 itself prior to changing this property (for backward compatibility
3770 with previous API releases). The above implies the following
3771 limitations:
3772 <ul>
3773 <li>The machine name cannot be empty.</li>
3774 <li>The machine name can contain only characters that are valid
3775 file name characters according to the rules of the file
3776 system used to store VirtualBox configuration.</li>
3777 <li>You cannot have two or more machines with the same name
3778 if they use the same subdirectory for storing the machine
3779 settings files.</li>
3780 <li>You cannot change the name of the machine if it is running,
3781 or if any file in the directory containing the settings file
3782 is being used by another running machine or by any other
3783 process in the host operating system at a time when
3784 <link to="#saveSettings"/> is called.
3785 </li>
3786 </ul>
3787 If any of the above limitations are hit, <link to="#saveSettings"/>
3788 will return an appropriate error message explaining the exact
3789 reason and the changes you made to this machine will not be
3790 saved.
3791 <note>
3792 For "legacy" machines created using the
3793 <link to="IVirtualBox::createLegacyMachine"/> call,
3794 the above naming limitations do not apply because the
3795 machine name does not affect the settings file name.
3796 The settings file name remains the same as it was specified
3797 during machine creation and never changes.
3798 </note>
3799 </desc>
3800 </attribute>
3801
3802 <attribute name="description" type="wstring">
3803 <desc>
3804 Description of the virtual machine.
3805
3806 The description attribute can contain any text and is
3807 typically used to describe the hardware and software
3808 configuration of the virtual machine in detail (i.e. network
3809 settings, versions of the installed software and so on).
3810 </desc>
3811 </attribute>
3812
3813 <attribute name="id" type="uuid" mod="string" readonly="yes">
3814 <desc>UUID of the virtual machine.</desc>
3815 </attribute>
3816
3817 <attribute name="OSTypeId" type="wstring">
3818 <desc>
3819 User-defined identifier of the Guest OS type.
3820 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
3821 an IGuestOSType object representing details about the given
3822 Guest OS type.
3823 <note>
3824 This value may differ from the value returned by
3825 <link to="IGuest::OSTypeId"/> if Guest Additions are
3826 installed to the guest OS.
3827 </note>
3828 </desc>
3829 </attribute>
3830
3831 <attribute name="HardwareVersion" type="wstring">
3832 <desc>Hardware version identifier. Internal use only for now.</desc>
3833 </attribute>
3834
3835 <attribute name="hardwareUUID" type="uuid" mod="string">
3836 <desc>
3837 The UUID presented to the guest via memory tables, hardware and guest
3838 properties. For most VMs this is the same as the @a id, but for VMs
3839 which have been cloned or teleported it may be the same as the source
3840 VM. This latter is because the guest shouldn't notice that it was
3841 cloned or teleported.
3842 </desc>
3843 </attribute>
3844
3845 <attribute name="CPUCount" type="unsigned long">
3846 <desc>Number of virtual CPUs in the VM.</desc>
3847 </attribute>
3848
3849 <attribute name="CPUHotPlugEnabled" type="boolean">
3850 <desc>
3851 This setting determines whether VirtualBox allows CPU
3852 hotplugging for this machine.</desc>
3853 </attribute>
3854
3855 <attribute name="CPUPriority" type="unsigned long">
3856 <desc>
3857 Priority of the virtual CPUs. Means to limit the number of CPU cycles
3858 a guest can use. The unit is percentage of host CPU cycles per second.
3859 The valid range is 1 - 100. 100 (the default) implies no limit.
3860 </desc>
3861 </attribute>
3862
3863 <attribute name="memorySize" type="unsigned long">
3864 <desc>System memory size in megabytes.</desc>
3865 </attribute>
3866
3867 <attribute name="memoryBalloonSize" type="unsigned long">
3868 <desc>Memory balloon size in megabytes.</desc>
3869 </attribute>
3870
3871 <attribute name="PageFusionEnabled" type="boolean">
3872 <desc>
3873 This setting determines whether VirtualBox allows page
3874 fusion for this machine (64 bits host only).
3875 </desc>
3876 </attribute>
3877
3878 <attribute name="VRAMSize" type="unsigned long">
3879 <desc>Video memory size in megabytes.</desc>
3880 </attribute>
3881
3882 <attribute name="accelerate3DEnabled" type="boolean" default="false">
3883 <desc>
3884 This setting determines whether VirtualBox allows this machine to make
3885 use of the 3D graphics support available on the host.</desc>
3886 </attribute>
3887
3888 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
3889 <desc>
3890 This setting determines whether VirtualBox allows this machine to make
3891 use of the 2D video acceleration support available on the host.</desc>
3892 </attribute>
3893
3894 <attribute name="monitorCount" type="unsigned long">
3895 <desc>
3896 Number of virtual monitors.
3897 <note>
3898 Only effective on Windows XP and later guests with
3899 Guest Additions installed.
3900 </note>
3901 </desc>
3902 </attribute>
3903
3904 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
3905 <desc>Object containing all BIOS settings.</desc>
3906 </attribute>
3907
3908 <attribute name="firmwareType" type="FirmwareType">
3909 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
3910 bootstrap in this VM.</desc>
3911 </attribute>
3912
3913 <attribute name="pointingHidType" type="PointingHidType">
3914 <desc>Type of pointing HID (such as mouse or tablet) used in this VM.
3915 The default is typically "PS2Mouse" but can vary depending on the
3916 requirements of the guest operating system.</desc>
3917 </attribute>
3918
3919 <attribute name="keyboardHidType" type="KeyboardHidType">
3920 <desc>Type of keyboard HID used in this VM.
3921 The default is typically "PS2Keyboard" but can vary depending on the
3922 requirements of the guest operating system.</desc>
3923 </attribute>
3924
3925 <attribute name="hpetEnabled" type="boolean">
3926 <desc>This attribute controls if High Precision Event Timer (HPET) is
3927 enabled in this VM. Use this property if you want to provide guests
3928 with additional time source, or if guest requires HPET to function correctly.
3929 Default is false.</desc>
3930 </attribute>
3931
3932 <attribute name="snapshotFolder" type="wstring">
3933 <desc>
3934 Full path to the directory used to store snapshot data
3935 (differencing media and saved state files) of this machine.
3936
3937 The initial value of this property is
3938 <tt>&lt;</tt><link to="#settingsFilePath">
3939 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3940 <link to="#id">machine_uuid</link>
3941 <tt>&gt;</tt>.
3942
3943 Currently, it is an error to try to change this property on
3944 a machine that has snapshots (because this would require to
3945 move possibly large files to a different location).
3946 A separate method will be available for this purpose later.
3947
3948 <note>
3949 Setting this property to @c null or to an empty string will restore
3950 the initial value.
3951 </note>
3952 <note>
3953 When setting this property, the specified path can be
3954 absolute (full path) or relative to the directory where the
3955 <link to="#settingsFilePath">machine settings file</link>
3956 is located. When reading this property, a full path is
3957 always returned.
3958 </note>
3959 <note>
3960 The specified path may not exist, it will be created
3961 when necessary.
3962 </note>
3963 </desc>
3964 </attribute>
3965
3966 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
3967 <desc>VRDP server object.</desc>
3968 </attribute>
3969
3970 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
3971 <desc>Array of media attached to this machine.</desc>
3972 </attribute>
3973
3974 <attribute name="USBController" type="IUSBController" readonly="yes">
3975 <desc>
3976 Associated USB controller object.
3977
3978 <note>
3979 If USB functionality is not available in the given edition of
3980 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3981 </note>
3982 </desc>
3983 </attribute>
3984
3985 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3986 <desc>Associated audio adapter, always present.</desc>
3987 </attribute>
3988
3989 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
3990 <desc>Array of storage controllers attached to this machine.</desc>
3991 </attribute>
3992
3993 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3994 <desc>
3995 Full name of the file containing machine settings data.
3996 </desc>
3997 </attribute>
3998
3999 <attribute name="settingsModified" type="boolean" readonly="yes">
4000 <desc>
4001 Whether the settings of this machine have been modified
4002 (but neither yet saved nor discarded).
4003 <note>
4004 Reading this property is only valid on instances returned
4005 by <link to="ISession::machine"/> and on new machines
4006 created by <link to="IVirtualBox::createMachine"/> or opened
4007 by <link to="IVirtualBox::openMachine"/> but not
4008 yet registered, or on unregistered machines after calling
4009 <link to="IMachine::unregister"/>. For all other
4010 cases, the settings can never be modified.
4011 </note>
4012 <note>
4013 For newly created unregistered machines, the value of this
4014 property is always @c true until <link to="#saveSettings"/>
4015 is called (no matter if any machine settings have been
4016 changed after the creation or not). For opened machines
4017 the value is set to @c false (and then follows to normal rules).
4018 </note>
4019 </desc>
4020 </attribute>
4021
4022 <attribute name="sessionState" type="SessionState" readonly="yes">
4023 <desc>Current session state for this machine.</desc>
4024 </attribute>
4025
4026 <attribute name="sessionType" type="wstring" readonly="yes">
4027 <desc>
4028 Type of the session. If <link to="#sessionState"/> is
4029 Spawning or Locked, this attribute contains the
4030 same value as passed to the
4031 <link to="IMachine::launchVMProcess"/> method in the
4032 @a type parameter. If the session was used with
4033 <link to="IMachine::lockMachine" />, or if
4034 <link to="#sessionState"/> is SessionClosed, the value of this
4035 attribute is an empty string.
4036 </desc>
4037 </attribute>
4038
4039 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4040 <desc>
4041 Identifier of the session process. This attribute contains the
4042 platform-dependent identifier of the process whose session was
4043 used with <link to="IMachine::lockMachine" /> call. The returned
4044 value is only valid if <link to="#sessionState"/> is Locked or
4045 Unlocking by the time this property is read.
4046 </desc>
4047 </attribute>
4048
4049 <attribute name="state" type="MachineState" readonly="yes">
4050 <desc>Current execution state of this machine.</desc>
4051 </attribute>
4052
4053 <attribute name="lastStateChange" type="long long" readonly="yes">
4054 <desc>
4055 Time stamp of the last execution state change,
4056 in milliseconds since 1970-01-01 UTC.
4057 </desc>
4058 </attribute>
4059
4060 <attribute name="stateFilePath" type="wstring" readonly="yes">
4061 <desc>
4062 Full path to the file that stores the execution state of
4063 the machine when it is in the <link to="MachineState_Saved"/> state.
4064 <note>
4065 When the machine is not in the Saved state, this attribute is
4066 an empty string.
4067 </note>
4068 </desc>
4069 </attribute>
4070
4071 <attribute name="logFolder" type="wstring" readonly="yes">
4072 <desc>
4073 Full path to the folder that stores a set of rotated log files
4074 recorded during machine execution. The most recent log file is
4075 named <tt>VBox.log</tt>, the previous log file is
4076 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4077 in the current version).
4078 </desc>
4079 </attribute>
4080
4081 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4082 <desc>
4083 Current snapshot of this machine. This is @c null if the machine
4084 currently has no snapshots. If it is not @c null, then it was
4085 set by one of <link to="IConsole::takeSnapshot" />,
4086 <link to="IConsole::deleteSnapshot" />
4087 or <link to="IConsole::restoreSnapshot" />, depending on which
4088 was called last. See <link to="ISnapshot"/> for details.
4089 </desc>
4090 </attribute>
4091
4092 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4093 <desc>
4094 Number of snapshots taken on this machine. Zero means the
4095 machine doesn't have any snapshots.
4096 </desc>
4097 </attribute>
4098
4099 <attribute name="currentStateModified" type="boolean" readonly="yes">
4100 <desc>
4101 Returns @c true if the current state of the machine is not
4102 identical to the state stored in the current snapshot.
4103
4104 The current state is identical to the current snapshot only
4105 directly after one of the following calls are made:
4106
4107 <ul>
4108 <li><link to="IConsole::restoreSnapshot"/>
4109 </li>
4110 <li><link to="IConsole::takeSnapshot"/> (issued on a
4111 "powered off" or "saved" machine, for which
4112 <link to="#settingsModified"/> returns @c false)
4113 </li>
4114 <li><link to="IMachine::setCurrentSnapshot"/>
4115 </li>
4116 </ul>
4117
4118 The current state remains identical until one of the following
4119 happens:
4120 <ul>
4121 <li>settings of the machine are changed</li>
4122 <li>the saved state is deleted</li>
4123 <li>the current snapshot is deleted</li>
4124 <li>an attempt to execute the machine is made</li>
4125 </ul>
4126
4127 <note>
4128 For machines that don't have snapshots, this property is
4129 always @c false.
4130 </note>
4131 </desc>
4132 </attribute>
4133
4134 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4135 <desc>
4136 Collection of shared folders for this machine (permanent shared
4137 folders). These folders are shared automatically at machine startup
4138 and available only to the guest OS installed within this machine.
4139
4140 New shared folders are added to the collection using
4141 <link to="#createSharedFolder"/>. Existing shared folders can be
4142 removed using <link to="#removeSharedFolder"/>.
4143 </desc>
4144 </attribute>
4145
4146 <attribute name="clipboardMode" type="ClipboardMode">
4147 <desc>
4148 Synchronization mode between the host OS clipboard
4149 and the guest OS clipboard.
4150 </desc>
4151 </attribute>
4152
4153 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4154 <desc>
4155 A comma-separated list of simple glob patterns. Changes to guest
4156 properties whose name matches one of the patterns will generate an
4157 <link to="IGuestPropertyChangedEvent"/> signal.
4158 </desc>
4159 </attribute>
4160
4161 <attribute name="teleporterEnabled" type="boolean">
4162 <desc>
4163 When set to @a true, the virtual machine becomes a target teleporter
4164 the next time it is powered on. This can only set to @a true when the
4165 VM is in the @a PoweredOff or @a Aborted state.
4166
4167 <!-- This property is automatically set to @a false when the VM is powered
4168 on. (bird: This doesn't work yet ) -->
4169 </desc>
4170 </attribute>
4171
4172 <attribute name="teleporterPort" type="unsigned long">
4173 <desc>
4174 The TCP port the target teleporter will listen for incoming
4175 teleportations on.
4176
4177 0 means the port is automatically selected upon power on. The actual
4178 value can be read from this property while the machine is waiting for
4179 incoming teleportations.
4180 </desc>
4181 </attribute>
4182
4183 <attribute name="teleporterAddress" type="wstring">
4184 <desc>
4185 The address the target teleporter will listen on. If set to an empty
4186 string, it will listen on all addresses.
4187 </desc>
4188 </attribute>
4189
4190 <attribute name="teleporterPassword" type="wstring">
4191 <desc>
4192 The password the to check for on the target teleporter. This is just a
4193 very basic measure to prevent simple hacks and operators accidentally
4194 beaming a virtual machine to the wrong place.
4195 </desc>
4196 </attribute>
4197
4198 <attribute name="RTCUseUTC" type="boolean">
4199 <desc>
4200 When set to @a true, the RTC device of the virtual machine will run
4201 in UTC time, otherwise in local time. Especially Unix guests prefer
4202 the time in UTC.
4203 </desc>
4204 </attribute>
4205
4206 <attribute name="ioCacheEnabled" type="boolean">
4207 <desc>
4208 When set to @a true, the builtin I/O cache of the virtual machine
4209 will be enabled.
4210 </desc>
4211 </attribute>
4212
4213 <attribute name="ioCacheSize" type="unsigned long">
4214 <desc>
4215 Maximum size of the I/O cache in MB.
4216 </desc>
4217 </attribute>
4218
4219 <method name="lockMachine">
4220 <desc>
4221 Locks the machine for the given session to enable the caller
4222 to make changes to the machine or start the VM or control
4223 VM execution.
4224
4225 There are two ways to lock a machine for such uses:
4226
4227 <ul>
4228 <li>If you want to make changes to the machine settings,
4229 you must obtain an exclusive write lock on the machine
4230 by setting @a lockType to @c Write.
4231
4232 This will only succeed if no other process has locked
4233 the machine to prevent conflicting changes. Only after
4234 an exclusive write lock has been obtained using this method, one
4235 can change all VM settings or execute the VM in the process
4236 space of the session object. (Note that the latter is only of
4237 interest if you actually want to write a new front-end for
4238 virtual machines; but this API gets called internally by
4239 the existing front-ends such as VBoxHeadless and the VirtualBox
4240 GUI to acquire a write lock on the machine that they are running.)
4241
4242 On success, write-locking the machine for a session creates
4243 a second copy of the IMachine object. It is this second object
4244 upon which changes can be made; in VirtualBox terminology, the
4245 second copy is "mutable". It is only this second, mutable machine
4246 object upon which you can call methods that change the
4247 machine state. After having called this method, you can
4248 obtain this second, mutable machine object using the
4249 <link to="ISession::machine" /> attribute.
4250 </li>
4251 <li>If you only want to check the machine state or control
4252 machine execution without actually changing machine
4253 settings (e.g. to get access to VM statistics or take
4254 a snapshot or save the machine state), then set the
4255 @a lockType argument to @c Shared.
4256
4257 If no other session has obtained a lock, you will obtain an
4258 exclusive write lock as described above. However, if another
4259 session has already obtained such a lock, then a link to that
4260 existing session will be established which allows you
4261 to control that existing session.
4262
4263 To find out which type of lock was obtained, you can
4264 inspect <link to="ISession::type" />, which will have been
4265 set to either @c WriteLock or @c Shared.
4266 </li>
4267 </ul>
4268
4269 In either case, you can get access to the <link to="IConsole" />
4270 object which controls VM execution.
4271
4272 Also in all of the above cases, one must always call
4273 <link to="ISession::unlockMachine" /> to release the lock on the machine, or
4274 the machine's state will eventually be set to "Aborted".
4275
4276 To change settings on a machine, the following sequence is typically
4277 performed:
4278
4279 <ol>
4280 <li>Call this method to obtain an exclusive write lock for the current session.</li>
4281
4282 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
4283
4284 <li>Change the settings of the machine by invoking IMachine methods.</li>
4285
4286 <li>Call <link to="IMachine::saveSettings" />.</li>
4287
4288 <li>Release the write lock by calling <link to="ISession::unlockMachine"/>.</li>
4289 </ol>
4290
4291 <result name="E_UNEXPECTED">
4292 Virtual machine not registered.
4293 </result>
4294 <result name="E_ACCESSDENIED">
4295 Process not started by OpenRemoteSession.
4296 </result>
4297 <result name="VBOX_E_INVALID_OBJECT_STATE">
4298 Session already open or being opened.
4299 </result>
4300 <result name="VBOX_E_VM_ERROR">
4301 Failed to assign machine to session.
4302 </result>
4303 </desc>
4304 <param name="session" type="ISession" dir="in">
4305 <desc>
4306 Session object for which the machine will be locked.
4307 </desc>
4308 </param>
4309 <param name="lockType" type="LockType" dir="in">
4310 <desc>
4311 If set to @c Write, then attempt to acquire an exclusive write lock or fail.
4312 If set to @c Shared, then either acquire an exclusive write lock or establish
4313 a link to an existing session.
4314 </desc>
4315 </param>
4316 </method>
4317
4318 <method name="launchVMProcess">
4319 <desc>
4320 Spawns a new process that will execute the virtual machine and obtains a shared
4321 lock on the machine for the calling session.
4322
4323 If launching the VM succeeds, the new VM process will create its own session
4324 and write-lock the machine for it, preventing conflicting changes from other
4325 processes. If the machine is already locked (because it is already running or
4326 because another session has a write lock), launching the VM process will therefore
4327 fail. Reversely, future attempts to obtain a write lock will also fail while the
4328 machine is running.
4329
4330 The caller's session object remains separate from the session opened by the new
4331 VM process. It receives its own <link to="IConsole" /> object which can be used
4332 to control machine execution, but it cannot be used to change all VM settings
4333 which would be available after a <link to="#lockMachine" /> call.
4334
4335 The caller must eventually release the session's shared lock by calling
4336 <link to="ISession::unlockMachine" /> on the local session object once this call
4337 has returned. However, the session's state (see <link to="ISession::state" />)
4338 will not return to "Unlocked" until the remote session has also unlocked
4339 the machine (i.e. the machine has stopped running).
4340
4341 Lauching a VM process can take some time (a new VM is started in a new process,
4342 for which memory and other resources need to be set up). Because of this,
4343 an <link to="IProgress" /> object is returned to allow the caller to wait
4344 for this asynchronous operation to be completed. Until then, the caller's
4345 session object remains in the "Unlocked" state, and its <link to="ISession::machine" />
4346 and <link to="ISession::console" /> attributes cannot be accessed.
4347 It is recommended to use <link to="IProgress::waitForCompletion" /> or
4348 similar calls to wait for completion. Completion is signalled when the VM
4349 is powered on. If launching the VM fails, error messages can be queried
4350 via the progress object, if available.
4351
4352 The progress object will have at least 2 sub-operations. The first
4353 operation covers the period up to the new VM process calls powerUp.
4354 The subsequent operations mirror the <link to="IConsole::powerUp"/>
4355 progress object. Because <link to="IConsole::powerUp"/> may require
4356 some extra sub-operations, the <link to="IProgress::operationCount"/>
4357 may change at the completion of operation.
4358
4359 For details on the teleportation progress operation, see
4360 <link to="IConsole::powerUp"/>.
4361
4362 The @a environment argument is a string containing definitions of
4363 environment variables in the following format:
4364 @code
4365 NAME[=VALUE]\n
4366 NAME[=VALUE]\n
4367 ...
4368 @endcode
4369 where <tt>\\n</tt> is the new line character. These environment
4370 variables will be appended to the environment of the VirtualBox server
4371 process. If an environment variable exists both in the server process
4372 and in this list, the value from this list takes precedence over the
4373 server's variable. If the value of the environment variable is
4374 omitted, this variable will be removed from the resulting environment.
4375 If the environment string is @c null or empty, the server environment
4376 is inherited by the started process as is.
4377
4378 <result name="E_UNEXPECTED">
4379 Virtual machine not registered.
4380 </result>
4381 <result name="E_INVALIDARG">
4382 Invalid session type @a type.
4383 </result>
4384 <result name="VBOX_E_OBJECT_NOT_FOUND">
4385 No machine matching @a machineId found.
4386 </result>
4387 <result name="VBOX_E_INVALID_OBJECT_STATE">
4388 Session already open or being opened.
4389 </result>
4390 <result name="VBOX_E_IPRT_ERROR">
4391 Launching process for machine failed.
4392 </result>
4393 <result name="VBOX_E_VM_ERROR">
4394 Failed to assign machine to session.
4395 </result>
4396 </desc>
4397 <param name="session" type="ISession" dir="in">
4398 <desc>
4399 Client session object to which the VM process will be connected (this
4400 must be in "Unlocked" state).
4401 </desc>
4402 </param>
4403 <param name="type" type="wstring" dir="in">
4404 <desc>
4405 Front-end to use for the new VM process. The following are currently supported:
4406 <ul>
4407 <li><tt>"gui"</tt>: VirtualBox Qt GUI front-end</li>
4408 <li><tt>"vrdp"</tt>: VBoxHeadless (VRDP Server) front-end</li>
4409 <li><tt>"sdl"</tt>: VirtualBox SDL front-end</li>
4410 </ul>
4411 </desc>
4412 </param>
4413 <param name="environment" type="wstring" dir="in">
4414 <desc>
4415 Environment to pass to the VM process.
4416 </desc>
4417 </param>
4418 <param name="progress" type="IProgress" dir="return">
4419 <desc>Progress object to track the operation completion.</desc>
4420 </param>
4421 </method>
4422
4423 <method name="setBootOrder">
4424 <desc>
4425 Puts the given device to the specified position in
4426 the boot order.
4427
4428 To indicate that no device is associated with the given position,
4429 <link to="DeviceType_Null"/> should be used.
4430
4431 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4432
4433 <result name="E_INVALIDARG">
4434 Boot @a position out of range.
4435 </result>
4436 <result name="E_NOTIMPL">
4437 Booting from USB @a device currently not supported.
4438 </result>
4439
4440 </desc>
4441 <param name="position" type="unsigned long" dir="in">
4442 <desc>
4443 Position in the boot order (@c 1 to the total number of
4444 devices the machine can boot from, as returned by
4445 <link to="ISystemProperties::maxBootPosition"/>).
4446 </desc>
4447 </param>
4448 <param name="device" type="DeviceType" dir="in">
4449 <desc>
4450 The type of the device used to boot at the given position.
4451 </desc>
4452 </param>
4453 </method>
4454
4455 <method name="getBootOrder" const="yes">
4456 <desc>
4457 Returns the device type that occupies the specified
4458 position in the boot order.
4459
4460 @todo [remove?]
4461 If the machine can have more than one device of the returned type
4462 (such as hard disks), then a separate method should be used to
4463 retrieve the individual device that occupies the given position.
4464
4465 If here are no devices at the given position, then
4466 <link to="DeviceType_Null"/> is returned.
4467
4468 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4469
4470 <result name="E_INVALIDARG">
4471 Boot @a position out of range.
4472 </result>
4473
4474 </desc>
4475 <param name="position" type="unsigned long" dir="in">
4476 <desc>
4477 Position in the boot order (@c 1 to the total number of
4478 devices the machine can boot from, as returned by
4479 <link to="ISystemProperties::maxBootPosition"/>).
4480 </desc>
4481 </param>
4482 <param name="device" type="DeviceType" dir="return">
4483 <desc>
4484 Device at the given position.
4485 </desc>
4486 </param>
4487 </method>
4488
4489 <method name="attachDevice">
4490 <desc>
4491 Attaches a device and optionally mounts a medium to the given storage
4492 controller (<link to="IStorageController" />, identified by @a name),
4493 at the indicated port and device.
4494
4495 This method is intended for managing storage devices in general (it works
4496 for both fixed and removable media) while a machine is powered off.
4497 In a VM's default configuration of virtual machines, the secondary
4498 master of the IDE controller is used for a CD/DVD drive.
4499
4500 For fixed media such as hard disks, the given medium identifier cannot
4501 be a zero UUID.
4502
4503 For storage devices supporting removable media (such as DVDs and floppies),
4504 you can also use <link to="IMachine::mountMedium"/> for changing the media
4505 while the machine is running. For those devices, you can also specify
4506 a zero UUID to indicate an empty drive or the UUID of a host drive;
4507 see <link to="IMediumAttachment" /> for details.
4508
4509 After calling this returns successfully, a new instance of
4510 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4511 attachments (see <link to="IMachine::mediumAttachments"/>).
4512
4513 The specified device slot must not have a device attached to it,
4514 or this method will fail.
4515
4516 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4517 information about attaching media.
4518
4519 <note>
4520 You cannot attach a device to a running machine. Also, you cannot
4521 attach a device to a newly created machine until this machine's
4522 settings are saved to disk using <link to="#saveSettings"/>.
4523 </note>
4524 <note>
4525 If the medium is being attached indirectly, a new differencing medium
4526 will implicitly be created for it and attached instead. If the
4527 changes made to the machine settings (including this indirect
4528 attachment) are later cancelled using <link to="#discardSettings"/>,
4529 this implicitly created differencing medium will implicitly
4530 be deleted.
4531 </note>
4532
4533 <result name="E_INVALIDARG">
4534 SATA device, SATA port, IDE port or IDE slot out of range.
4535 </result>
4536 <result name="VBOX_E_INVALID_OBJECT_STATE">
4537 Machine must be registered before media can be attached.
4538 </result>
4539 <result name="VBOX_E_INVALID_VM_STATE">
4540 Invalid machine state.
4541 </result>
4542 <result name="VBOX_E_OBJECT_IN_USE">
4543 A medium is already attached to this or another virtual machine.
4544 </result>
4545
4546 </desc>
4547 <param name="name" type="wstring" dir="in">
4548 <desc>Name of the storage controller to attach the device to.</desc>
4549 </param>
4550 <param name="controllerPort" type="long" dir="in">
4551 <desc>Port to attach the device to. For an IDE controller, 0 specifies
4552 the primary controller and 1 specifies the secondary controller.
4553 For a SCSI controller, this must range from 0 to 15; for a SATA controller,
4554 from 0 to 29; for an SAS controller, from 0 to 7.</desc>
4555 </param>
4556 <param name="device" type="long" dir="in">
4557 <desc>Device slot in the given port to attach the device to. This is only
4558 relevant for IDE controllers, for which 0 specifies the master device and
4559 1 specifies the slave device. For all other controller types, this must
4560 be 0.</desc>
4561 </param>
4562 <param name="type" type="DeviceType" dir="in">
4563 <desc>Device type of the attached device.</desc>
4564 </param>
4565 <param name="id" type="uuid" mod="string" dir="in">
4566 <desc>UUID of the medium to mount. Can be a zero UUID or the UUID of
4567 a host drive for removeable media; see <link to="IMediumAttachment" />
4568 for details.</desc>
4569 </param>
4570 </method>
4571
4572 <method name="detachDevice">
4573 <desc>
4574 Detaches the device attached to a device slot of the specified bus.
4575
4576 Detaching the device from the virtual machine is deferred. This means
4577 that the medium remains associated with the machine when this method
4578 returns and gets actually de-associated only after a successful
4579 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4580 for more detailed information about attaching media.
4581
4582 <note>
4583 You cannot detach a device from a running machine.
4584 </note>
4585 <note>
4586 Detaching differencing media implicitly created by <link
4587 to="#attachDevice"/> for the indirect attachment using this
4588 method will <b>not</b> implicitly delete them. The
4589 <link to="IMedium::deleteStorage"/> operation should be
4590 explicitly performed by the caller after the medium is successfully
4591 detached and the settings are saved with
4592 <link to="#saveSettings"/>, if it is the desired action.
4593 </note>
4594
4595 <result name="VBOX_E_INVALID_VM_STATE">
4596 Attempt to detach medium from a running virtual machine.
4597 </result>
4598 <result name="VBOX_E_OBJECT_NOT_FOUND">
4599 No medium attached to given slot/bus.
4600 </result>
4601 <result name="VBOX_E_NOT_SUPPORTED">
4602 Medium format does not support storage deletion.
4603 </result>
4604
4605 </desc>
4606 <param name="name" type="wstring" dir="in">
4607 <desc>Name of the storage controller to detach the medium from.</desc>
4608 </param>
4609 <param name="controllerPort" type="long" dir="in">
4610 <desc>Port number to detach the medium from.</desc>
4611 </param>
4612 <param name="device" type="long" dir="in">
4613 <desc>Device slot number to detach the medium from.</desc>
4614 </param>
4615 </method>
4616
4617 <method name="passthroughDevice">
4618 <desc>
4619 Sets the passthrough mode of an existing DVD device. Changing the
4620 setting while the VM is running is forbidden. The setting is only used
4621 if at VM start the device is configured as a host DVD drive, in all
4622 other cases it is ignored. The device must already exist; see
4623 <link to="IMachine::attachDevice"/> for how to attach a new device.
4624
4625 The @a controllerPort and @a device parameters specify the device slot and
4626 have have the same meaning as with <link to="IMachine::attachDevice" />.
4627
4628 <result name="E_INVALIDARG">
4629 SATA device, SATA port, IDE port or IDE slot out of range.
4630 </result>
4631 <result name="VBOX_E_INVALID_OBJECT_STATE">
4632 Attempt to modify an unregistered virtual machine.
4633 </result>
4634 <result name="VBOX_E_INVALID_VM_STATE">
4635 Invalid machine state.
4636 </result>
4637
4638 </desc>
4639 <param name="name" type="wstring" dir="in">
4640 <desc>Name of the storage controller.</desc>
4641 </param>
4642 <param name="controllerPort" type="long" dir="in">
4643 <desc>Storage controller port.</desc>
4644 </param>
4645 <param name="device" type="long" dir="in">
4646 <desc>Device slot in the given port.</desc>
4647 </param>
4648 <param name="passthrough" type="boolean" dir="in">
4649 <desc>New value for the passthrough setting.</desc>
4650 </param>
4651 </method>
4652
4653 <method name="mountMedium">
4654 <desc>
4655 Mounts a medium (<link to="IMedium" />, identified
4656 by the given UUID @a id) to the given storage controller
4657 (<link to="IStorageController" />, identified by @a name),
4658 at the indicated port and device. The device must already exist;
4659 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4660
4661 This method is intended only for managing removable media, where the
4662 device is fixed but media is changeable at runtime (such as DVDs
4663 and floppies). It cannot be used for fixed media such as hard disks.
4664
4665 The @a controllerPort and @a device parameters specify the device slot and
4666 have have the same meaning as with <link to="IMachine::attachDevice" />.
4667
4668 The specified device slot can have a medium mounted, which will be
4669 unmounted first. Specifying a zero UUID (or an empty string) for
4670 @a medium does just an unmount.
4671
4672 See <link to="IMedium"/> for more detailed information about
4673 attaching media.
4674
4675 <result name="E_INVALIDARG">
4676 SATA device, SATA port, IDE port or IDE slot out of range.
4677 </result>
4678 <result name="VBOX_E_INVALID_OBJECT_STATE">
4679 Attempt to attach medium to an unregistered virtual machine.
4680 </result>
4681 <result name="VBOX_E_INVALID_VM_STATE">
4682 Invalid machine state.
4683 </result>
4684 <result name="VBOX_E_OBJECT_IN_USE">
4685 Medium already attached to this or another virtual machine.
4686 </result>
4687
4688 </desc>
4689 <param name="name" type="wstring" dir="in">
4690 <desc>Name of the storage controller to attach the medium to.</desc>
4691 </param>
4692 <param name="controllerPort" type="long" dir="in">
4693 <desc>Port to attach the medium to.</desc>
4694 </param>
4695 <param name="device" type="long" dir="in">
4696 <desc>Device slot in the given port to attach the medium to.</desc>
4697 </param>
4698 <param name="medium" type="uuid" mod="string" dir="in">
4699 <desc>UUID of the medium to attach. A zero UUID means unmount the
4700 currently mounted medium.</desc>
4701 </param>
4702 <param name="force" type="boolean" dir="in">
4703 <desc>Allows to force unmount/mount of a medium which is locked by
4704 theDevice slot in the given port to attach the medium to.</desc>
4705 </param>
4706 </method>
4707
4708 <method name="getMedium" const="yes">
4709 <desc>
4710 Returns the virtual medium attached to a device slot of the specified
4711 bus.
4712
4713 Note that if the medium was indirectly attached by
4714 <link to="#mountMedium"/> to the given device slot then this
4715 method will return not the same object as passed to the
4716 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4717 more detailed information about mounting a medium.
4718
4719 <result name="VBOX_E_OBJECT_NOT_FOUND">
4720 No medium attached to given slot/bus.
4721 </result>
4722
4723 </desc>
4724 <param name="name" type="wstring" dir="in">
4725 <desc>Name of the storage controller the medium is attached to.</desc>
4726 </param>
4727 <param name="controllerPort" type="long" dir="in">
4728 <desc>Port to query.</desc>
4729 </param>
4730 <param name="device" type="long" dir="in">
4731 <desc>Device slot in the given port to query.</desc>
4732 </param>
4733 <param name="medium" type="IMedium" dir="return">
4734 <desc>Attached medium object.</desc>
4735 </param>
4736 </method>
4737
4738 <method name="getMediumAttachmentsOfController" const="yes">
4739 <desc>
4740 Returns an array of medium attachments which are attached to the
4741 the controller with the given name.
4742
4743 <result name="VBOX_E_OBJECT_NOT_FOUND">
4744 A storage controller with given name doesn't exist.
4745 </result>
4746 </desc>
4747 <param name="name" type="wstring" dir="in"/>
4748 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4749 </method>
4750
4751 <method name="getMediumAttachment" const="yes">
4752 <desc>
4753 Returns a medium attachment which corresponds to the controller with
4754 the given name, on the given port and device slot.
4755
4756 <result name="VBOX_E_OBJECT_NOT_FOUND">
4757 No attachment exists for the given controller/port/device combination.
4758 </result>
4759 </desc>
4760 <param name="name" type="wstring" dir="in"/>
4761 <param name="controllerPort" type="long" dir="in"/>
4762 <param name="device" type="long" dir="in"/>
4763 <param name="attachment" type="IMediumAttachment" dir="return"/>
4764 </method>
4765
4766 <method name="getNetworkAdapter" const="yes">
4767 <desc>
4768 Returns the network adapter associated with the given slot.
4769 Slots are numbered sequentially, starting with zero. The total
4770 number of adapters per machine is defined by the
4771 <link to="ISystemProperties::networkAdapterCount"/> property,
4772 so the maximum slot number is one less than that property's value.
4773
4774 <result name="E_INVALIDARG">
4775 Invalid @a slot number.
4776 </result>
4777
4778 </desc>
4779 <param name="slot" type="unsigned long" dir="in"/>
4780 <param name="adapter" type="INetworkAdapter" dir="return"/>
4781 </method>
4782
4783 <method name="addStorageController">
4784 <desc>
4785 Adds a new storage controller (SCSI, SAS or SATA controller) to the
4786 machine and returns it as an instance of
4787 <link to="IStorageController" />.
4788
4789 @a name identifies the controller for subsequent calls such as
4790 <link to="#getStorageControllerByName" />,
4791 <link to="#getStorageControllerByInstance" />,
4792 <link to="#removeStorageController" />,
4793 <link to="#attachDevice" /> or <link to="#mountMedium" />.
4794
4795 After the controller has been added, you can set its exact
4796 type by setting the <link to="IStorageController::controllerType" />.
4797
4798 <result name="VBOX_E_OBJECT_IN_USE">
4799 A storage controller with given name exists already.
4800 </result>
4801 <result name="E_INVALIDARG">
4802 Invalid @a controllerType.
4803 </result>
4804 </desc>
4805 <param name="name" type="wstring" dir="in"/>
4806 <param name="connectionType" type="StorageBus" dir="in"/>
4807 <param name="controller" type="IStorageController" dir="return"/>
4808 </method>
4809
4810 <method name="getStorageControllerByName" const="yes">
4811 <desc>
4812 Returns a storage controller with the given name.
4813
4814 <result name="VBOX_E_OBJECT_NOT_FOUND">
4815 A storage controller with given name doesn't exist.
4816 </result>
4817 </desc>
4818 <param name="name" type="wstring" dir="in"/>
4819 <param name="storageController" type="IStorageController" dir="return"/>
4820 </method>
4821
4822 <method name="getStorageControllerByInstance" const="yes">
4823 <desc>
4824 Returns a storage controller with the given instance number.
4825
4826 <result name="VBOX_E_OBJECT_NOT_FOUND">
4827 A storage controller with given instance number doesn't exist.
4828 </result>
4829 </desc>
4830 <param name="instance" type="unsigned long" dir="in"/>
4831 <param name="storageController" type="IStorageController" dir="return"/>
4832 </method>
4833
4834 <method name="removeStorageController">
4835 <desc>
4836 Removes a storage controller from the machine.
4837
4838 <result name="VBOX_E_OBJECT_NOT_FOUND">
4839 A storage controller with given name doesn't exist.
4840 </result>
4841 </desc>
4842 <param name="name" type="wstring" dir="in"/>
4843 </method>
4844
4845 <method name="getSerialPort" const="yes">
4846 <desc>
4847 Returns the serial port associated with the given slot.
4848 Slots are numbered sequentially, starting with zero. The total
4849 number of serial ports per machine is defined by the
4850 <link to="ISystemProperties::serialPortCount"/> property,
4851 so the maximum slot number is one less than that property's value.
4852
4853 <result name="E_INVALIDARG">
4854 Invalid @a slot number.
4855 </result>
4856
4857 </desc>
4858 <param name="slot" type="unsigned long" dir="in"/>
4859 <param name="port" type="ISerialPort" dir="return"/>
4860 </method>
4861
4862 <method name="getParallelPort" const="yes">
4863 <desc>
4864 Returns the parallel port associated with the given slot.
4865 Slots are numbered sequentially, starting with zero. The total
4866 number of parallel ports per machine is defined by the
4867 <link to="ISystemProperties::parallelPortCount"/> property,
4868 so the maximum slot number is one less than that property's value.
4869
4870 <result name="E_INVALIDARG">
4871 Invalid @a slot number.
4872 </result>
4873
4874 </desc>
4875 <param name="slot" type="unsigned long" dir="in"/>
4876 <param name="port" type="IParallelPort" dir="return"/>
4877 </method>
4878
4879 <method name="getExtraDataKeys">
4880 <desc>
4881 Returns an array representing the machine-specific extra data keys
4882 which currently have values defined.
4883 </desc>
4884 <param name="value" type="wstring" dir="return" safearray="yes">
4885 <desc>Array of extra data keys.</desc>
4886 </param>
4887 </method>
4888
4889 <method name="getExtraData">
4890 <desc>
4891 Returns associated machine-specific extra data.
4892
4893 If the requested data @a key does not exist, this function will
4894 succeed and return an empty string in the @a value argument.
4895
4896 <result name="VBOX_E_FILE_ERROR">
4897 Settings file not accessible.
4898 </result>
4899 <result name="VBOX_E_XML_ERROR">
4900 Could not parse the settings file.
4901 </result>
4902
4903 </desc>
4904 <param name="key" type="wstring" dir="in">
4905 <desc>Name of the data key to get.</desc>
4906 </param>
4907 <param name="value" type="wstring" dir="return">
4908 <desc>Value of the requested data key.</desc>
4909 </param>
4910 </method>
4911
4912 <method name="setExtraData">
4913 <desc>
4914 Sets associated machine-specific extra data.
4915
4916 If you pass @c null or an empty string as a key @a value, the given
4917 @a key will be deleted.
4918
4919 <note>
4920 Before performing the actual data change, this method will ask all
4921 registered listeners using the
4922 <link to="IExtraDataCanChangeEvent"/>
4923 notification for a permission. If one of the listeners refuses the
4924 new value, the change will not be performed.
4925 </note>
4926 <note>
4927 On success, the
4928 <link to="IExtraDataChangedEvent"/> notification
4929 is called to inform all registered listeners about a successful data
4930 change.
4931 </note>
4932 <note>
4933 This method can be called outside the machine session and therefore
4934 it's a caller's responsibility to handle possible race conditions
4935 when several clients change the same key at the same time.
4936 </note>
4937
4938 <result name="VBOX_E_FILE_ERROR">
4939 Settings file not accessible.
4940 </result>
4941 <result name="VBOX_E_XML_ERROR">
4942 Could not parse the settings file.
4943 </result>
4944
4945 </desc>
4946 <param name="key" type="wstring" dir="in">
4947 <desc>Name of the data key to set.</desc>
4948 </param>
4949 <param name="value" type="wstring" dir="in">
4950 <desc>Value to assign to the key.</desc>
4951 </param>
4952 </method>
4953
4954 <method name="getCPUProperty" const="yes">
4955 <desc>
4956 Returns the virtual CPU boolean value of the specified property.
4957
4958 <result name="E_INVALIDARG">
4959 Invalid property.
4960 </result>
4961
4962 </desc>
4963 <param name="property" type="CPUPropertyType" dir="in">
4964 <desc>
4965 Property type to query.
4966 </desc>
4967 </param>
4968 <param name="value" type="boolean" dir="return">
4969 <desc>
4970 Property value.
4971 </desc>
4972 </param>
4973 </method>
4974
4975 <method name="setCPUProperty">
4976 <desc>
4977 Sets the virtual CPU boolean value of the specified property.
4978
4979 <result name="E_INVALIDARG">
4980 Invalid property.
4981 </result>
4982
4983 </desc>
4984 <param name="property" type="CPUPropertyType" dir="in">
4985 <desc>
4986 Property type to query.
4987 </desc>
4988 </param>
4989 <param name="value" type="boolean" dir="in">
4990 <desc>
4991 Property value.
4992 </desc>
4993 </param>
4994 </method>
4995
4996 <method name="getCPUIDLeaf" const="yes">
4997 <desc>
4998 Returns the virtual CPU cpuid information for the specified leaf.
4999
5000 Currently supported index values for cpuid:
5001 Standard CPUID leafs: 0 - 0xA
5002 Extended CPUID leafs: 0x80000000 - 0x8000000A
5003
5004 See the Intel and AMD programmer's manuals for detailed information
5005 about the cpuid instruction and its leafs.
5006 <result name="E_INVALIDARG">
5007 Invalid id.
5008 </result>
5009
5010 </desc>
5011 <param name="id" type="unsigned long" dir="in">
5012 <desc>
5013 CPUID leaf index.
5014 </desc>
5015 </param>
5016 <param name="valEax" type="unsigned long" dir="out">
5017 <desc>
5018 CPUID leaf value for register eax.
5019 </desc>
5020 </param>
5021 <param name="valEbx" type="unsigned long" dir="out">
5022 <desc>
5023 CPUID leaf value for register ebx.
5024 </desc>
5025 </param>
5026 <param name="valEcx" type="unsigned long" dir="out">
5027 <desc>
5028 CPUID leaf value for register ecx.
5029 </desc>
5030 </param>
5031 <param name="valEdx" type="unsigned long" dir="out">
5032 <desc>
5033 CPUID leaf value for register edx.
5034 </desc>
5035 </param>
5036 </method>
5037
5038 <method name="setCPUIDLeaf">
5039 <desc>
5040 Sets the virtual CPU cpuid information for the specified leaf. Note that these values
5041 are not passed unmodified. VirtualBox clears features that it doesn't support.
5042
5043 Currently supported index values for cpuid:
5044 Standard CPUID leafs: 0 - 0xA
5045 Extended CPUID leafs: 0x80000000 - 0x8000000A
5046
5047 See the Intel and AMD programmer's manuals for detailed information
5048 about the cpuid instruction and its leafs.
5049
5050 Do not use this method unless you know exactly what you're doing. Misuse can lead to
5051 random crashes inside VMs.
5052 <result name="E_INVALIDARG">
5053 Invalid id.
5054 </result>
5055
5056 </desc>
5057 <param name="id" type="unsigned long" dir="in">
5058 <desc>
5059 CPUID leaf index.
5060 </desc>
5061 </param>
5062 <param name="valEax" type="unsigned long" dir="in">
5063 <desc>
5064 CPUID leaf value for register eax.
5065 </desc>
5066 </param>
5067 <param name="valEbx" type="unsigned long" dir="in">
5068 <desc>
5069 CPUID leaf value for register ebx.
5070 </desc>
5071 </param>
5072 <param name="valEcx" type="unsigned long" dir="in">
5073 <desc>
5074 CPUID leaf value for register ecx.
5075 </desc>
5076 </param>
5077 <param name="valEdx" type="unsigned long" dir="in">
5078 <desc>
5079 CPUID leaf value for register edx.
5080 </desc>
5081 </param>
5082 </method>
5083
5084 <method name="removeCPUIDLeaf">
5085 <desc>
5086 Removes the virtual CPU cpuid leaf for the specified index
5087
5088 <result name="E_INVALIDARG">
5089 Invalid id.
5090 </result>
5091
5092 </desc>
5093 <param name="id" type="unsigned long" dir="in">
5094 <desc>
5095 CPUID leaf index.
5096 </desc>
5097 </param>
5098 </method>
5099
5100 <method name="removeAllCPUIDLeaves">
5101 <desc>
5102 Removes all the virtual CPU cpuid leaves
5103 </desc>
5104 </method>
5105
5106 <method name="getHWVirtExProperty" const="yes">
5107 <desc>
5108 Returns the value of the specified hardware virtualization boolean property.
5109
5110 <result name="E_INVALIDARG">
5111 Invalid property.
5112 </result>
5113
5114 </desc>
5115 <param name="property" type="HWVirtExPropertyType" dir="in">
5116 <desc>
5117 Property type to query.
5118 </desc>
5119 </param>
5120 <param name="value" type="boolean" dir="return">
5121 <desc>
5122 Property value.
5123 </desc>
5124 </param>
5125 </method>
5126
5127 <method name="setHWVirtExProperty">
5128 <desc>
5129 Sets a new value for the specified hardware virtualization boolean property.
5130
5131 <result name="E_INVALIDARG">
5132 Invalid property.
5133 </result>
5134
5135 </desc>
5136 <param name="property" type="HWVirtExPropertyType" dir="in">
5137 <desc>
5138 Property type to set.
5139 </desc>
5140 </param>
5141 <param name="value" type="boolean" dir="in">
5142 <desc>
5143 New property value.
5144 </desc>
5145 </param>
5146 </method>
5147
5148 <method name="saveSettings">
5149 <desc>
5150 Saves any changes to machine settings made since the session
5151 has been opened or a new machine has been created, or since the
5152 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
5153 For registered machines, new settings become visible to all
5154 other VirtualBox clients after successful invocation of this
5155 method.
5156 <note>
5157 The method sends <link to="IMachineDataChangedEvent"/>
5158 notification event after the configuration has been successfully
5159 saved (only for registered machines).
5160 </note>
5161 <note>
5162 Calling this method is only valid on instances returned
5163 by <link to="ISession::machine"/> and on new machines
5164 created by <link to="IVirtualBox::createMachine"/> but not
5165 yet registered, or on unregistered machines after calling
5166 <link to="IMachine::unregister"/>.
5167 </note>
5168
5169 <result name="VBOX_E_FILE_ERROR">
5170 Settings file not accessible.
5171 </result>
5172 <result name="VBOX_E_XML_ERROR">
5173 Could not parse the settings file.
5174 </result>
5175 <result name="E_ACCESSDENIED">
5176 Modification request refused.
5177 </result>
5178
5179 </desc>
5180 </method>
5181
5182 <method name="discardSettings">
5183 <desc>
5184 Discards any changes to the machine settings made since the session
5185 has been opened or since the last call to <link to="#saveSettings"/>
5186 or <link to="#discardSettings"/>.
5187 <note>
5188 Calling this method is only valid on instances returned
5189 by <link to="ISession::machine"/> and on new machines
5190 created by <link to="IVirtualBox::createMachine"/> or
5191 opened by <link to="IVirtualBox::openMachine"/> but not
5192 yet registered, or on unregistered machines after calling
5193 <link to="IMachine::unregister"/>.
5194 </note>
5195
5196 <result name="VBOX_E_INVALID_VM_STATE">
5197 Virtual machine is not mutable.
5198 </result>
5199
5200 </desc>
5201 </method>
5202
5203 <method name="unregister">
5204 <desc>
5205 Unregisters the machine, which must have been previously registered using
5206 <link to="IVirtualBox::registerMachine"/>, and optionally do additional
5207 cleanup before the machine is unregistered.
5208
5209 This method does not delete any files. It only changes the machine configuration and
5210 the list of registered machines in the VirtualBox object. To delete the files which
5211 belonged to the machine, including the XML file of the machine itself, call
5212 <link to="#delete"/>, optionally with the array of IMedium objects which was returned
5213 from this method.
5214
5215 How thoroughly this method cleans up the machine configuration before unregistering
5216 the machine depends on the @a cleanupMode argument.
5217
5218 <ul>
5219 <li>With "UnregisterOnly", the machine will only be unregistered, but no additional
5220 cleanup will be performed. The call will fail if the machine is in "Saved" state
5221 or has any snapshots or any media attached (see <link to="IMediumAttachment" />.
5222 It is the responsibility of the caller to delete all such configuration in this mode.
5223 In this mode, the API behaves like the former @c IVirtualBox::unregisterMachine() API
5224 which it replaces.</li>
5225 <li>With "DetachAllReturnNone", the call will succeed even if the machine is in "Saved"
5226 state or if it has snapshots or media attached. All media attached to the current machine
5227 state or in snapshots will be detached. No medium objects will be returned; all of the
5228 machine's media will remain open.</li>
5229 <li>With "DetachAllReturnHardDisksOnly", the call will behave like with "DetachAllReturnNone",
5230 except that all the hard disk medium objects which were detached from the machine will
5231 be returned as an array. This allows for quickly passing them to the <link to="#delete" />
5232 API for closing and deletion.</li>
5233 <li>With "Full", the call will behave like with "DetachAllReturnHardDisksOnly", except
5234 that all media will be returned in the array, including removeable media like DVDs and
5235 floppies. This might be useful if the user wants to inspect in detail which media were
5236 attached to the machine. Be careful when passing the media array to <link to="#delete" />
5237 in that case because users will typically want to preserve ISO and RAW image files.</li>
5238 </ul>
5239
5240 This API does not verify whether the media files returned in the array are still
5241 attached to other machines (i.e. shared between several machines). If such a shared
5242 image is passed to <link to="#delete" /> however, closing the image will fail there
5243 and the image will be silently skipped.
5244
5245 A typical implementation will use "DetachAllReturnHardDisksOnly" and then pass the
5246 resulting IMedia array to <link to="#delete"/>. This way, the machine is completely
5247 deleted with all its saved states and hard disk images, but images for removeable
5248 drives (such as ISO and RAW files) will remain on disk.
5249
5250 The call will fail if the machine is currently locked (see <link to="ISession" />).
5251 It implicitly calls <link to="#saveSettings"/> to save all current machine settings
5252 before unregistering it.
5253
5254 After successful method invocation, the <link to="IMachineRegisteredEvent"/> event
5255 is fired.
5256
5257 <note>
5258 If the given machine is inaccessible (see <link to="#accessible"/>), it
5259 will be unregistered and fully uninitialized right afterwards. As a result,
5260 the returned machine object will be unusable and an attempt to call
5261 <b>any</b> method will return the "Object not ready" error.
5262 </note>
5263
5264 <result name="VBOX_E_INVALID_OBJECT_STATE">
5265 Machine is currently locked for a session.
5266 </result>
5267 </desc>
5268
5269 <param name="cleanupMode" type="CleanupMode" dir="in">
5270 <desc>How to clean up after the machine has been unregistered.</desc>
5271 </param>
5272 <param name="aMedia" type="IMedium" safearray="yes" dir="return">
5273 <desc>List of media detached from the machine, depending on the @a cleanupMode parameter.</desc>
5274 </param>
5275 </method>
5276
5277 <method name="delete">
5278 <desc>
5279 Deletes the files associated with this machine from disk. If medium objects are passed
5280 in with the @a aMedia argument, they are closed and, if closing was succesful, their
5281 storage files are deleted as well. For convenience, this array of media files can be
5282 the same as the one returned from a previous <link to="#unregister" /> call.
5283
5284 This method must only be called on machines which are either write-locked (i.e. on instances
5285 returned by <link to="ISession::machine"/>) or on unregistered machines (i.e. not yet
5286 registered machines created by <link to="IVirtualBox::createMachine"/> or opened by
5287 <link to="IVirtualBox::openMachine"/>, or after having called <link to="#unregister"/>).
5288
5289 The following files will be deleted by this method:
5290 <ul>
5291 <li>If <link to="#unregister" /> had been previously called with a @a cleanupMode
5292 argument other than "UnregisterOnly", this will delete all saved state files that
5293 the machine had in use; possibly one if the machine was in "Saved" state and one
5294 for each online snapshot that the machine had.</li>
5295 <li>On each medium object passed in the @a aMedia array, this will call
5296 <link to="IMedium::close" />. If that succeeds, this will attempt to delete the
5297 medium's storage on disk. Since the close() call will fail if the medium is still
5298 in use, e.g. because it is still attached to a second machine; in that case the
5299 storage will not be deleted.</li>
5300 <li>Finally, the machine's own XML file will be deleted.</li>
5301 </ul>
5302
5303 Since deleting large disk image files can be a time-consuming I/O operation, this
5304 method operates asynchronously and returns an IProgress object to allow the caller
5305 to monitor the progress. There will be one sub-operation for each file that is
5306 being deleted (saved state or medium storage file).
5307
5308 <note>
5309 <link to="#settingsModified"/> will return @c true after this
5310 method successfully returns.
5311 </note>
5312
5313 <result name="VBOX_E_INVALID_VM_STATE">
5314 Machine is registered but not write-locked.
5315 </result>
5316 <result name="VBOX_E_IPRT_ERROR">
5317 Could not delete the settings file.
5318 </result>
5319 </desc>
5320 <param name="aMedia" type="IMedium" safearray="yes" dir="in">
5321 <desc>List of media to be closed and whose storage files will be deleted.</desc>
5322 </param>
5323 <param name="aProgress" type="IProgress" dir="return">
5324 <desc>Progress object to track the operation completion.</desc>
5325 </param>
5326 </method>
5327
5328 <method name="export">
5329 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5330 steps required to export VirtualBox machines to OVF.
5331 </desc>
5332
5333 <param name="aAppliance" type="IAppliance" dir="in">
5334 <desc>Appliance to export this machine to.</desc>
5335 </param>
5336 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5337 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5338 </param>
5339 </method >
5340
5341 <method name="getSnapshot">
5342 <desc>
5343 Returns a snapshot of this machine with the given UUID.
5344 A @c null UUID can be used to obtain the first snapshot
5345 taken on this machine. This is useful if you want to traverse
5346 the whole tree of snapshots starting from the root.
5347
5348 <result name="VBOX_E_OBJECT_NOT_FOUND">
5349 Virtual machine has no snapshots or snapshot not found.
5350 </result>
5351
5352 </desc>
5353 <param name="id" type="uuid" mod="string" dir="in">
5354 <desc>UUID of the snapshot to get</desc>
5355 </param>
5356 <param name="snapshot" type="ISnapshot" dir="return">
5357 <desc>Snapshot object with the given UUID.</desc>
5358 </param>
5359 </method>
5360
5361 <method name="findSnapshot">
5362 <desc>
5363 Returns a snapshot of this machine with the given name.
5364
5365 <result name="VBOX_E_OBJECT_NOT_FOUND">
5366 Virtual machine has no snapshots or snapshot not found.
5367 </result>
5368
5369 </desc>
5370 <param name="name" type="wstring" dir="in">
5371 <desc>Name of the snapshot to find</desc>
5372 </param>
5373 <param name="snapshot" type="ISnapshot" dir="return">
5374 <desc>Snapshot object with the given name.</desc>
5375 </param>
5376 </method>
5377
5378 <method name="setCurrentSnapshot">
5379 <desc>
5380 Sets the current snapshot of this machine.
5381 <note>
5382 In the current implementation, this operation is not
5383 implemented.
5384 </note>
5385 </desc>
5386 <param name="id" type="uuid" mod="string" dir="in">
5387 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5388 </param>
5389 </method>
5390
5391 <method name="createSharedFolder">
5392 <desc>
5393 Creates a new permanent shared folder by associating the given logical
5394 name with the given host path, adds it to the collection of shared
5395 folders and starts sharing it. Refer to the description of
5396 <link to="ISharedFolder"/> to read more about logical names.
5397
5398 <result name="VBOX_E_OBJECT_IN_USE">
5399 Shared folder already exists.
5400 </result>
5401 <result name="VBOX_E_FILE_ERROR">
5402 Shared folder @a hostPath not accessible.
5403 </result>
5404
5405 </desc>
5406 <param name="name" type="wstring" dir="in">
5407 <desc>Unique logical name of the shared folder.</desc>
5408 </param>
5409 <param name="hostPath" type="wstring" dir="in">
5410 <desc>Full path to the shared folder in the host file system.</desc>
5411 </param>
5412 <param name="writable" type="boolean" dir="in">
5413 <desc>Whether the share is writable or readonly.</desc>
5414 </param>
5415 <param name="automount" type="boolean" dir="in">
5416 <desc>Whether the share gets automatically mounted by the guest
5417 or not.</desc>
5418 </param>
5419 </method>
5420
5421 <method name="removeSharedFolder">
5422 <desc>
5423 Removes the permanent shared folder with the given name previously
5424 created by <link to="#createSharedFolder"/> from the collection of
5425 shared folders and stops sharing it.
5426
5427 <result name="VBOX_E_INVALID_VM_STATE">
5428 Virtual machine is not mutable.
5429 </result>
5430 <result name="VBOX_E_OBJECT_NOT_FOUND">
5431 Shared folder @a name does not exist.
5432 </result>
5433
5434 </desc>
5435 <param name="name" type="wstring" dir="in">
5436 <desc>Logical name of the shared folder to remove.</desc>
5437 </param>
5438 </method>
5439
5440 <method name="canShowConsoleWindow">
5441 <desc>
5442 Returns @c true if the VM console process can activate the
5443 console window and bring it to foreground on the desktop of
5444 the host PC.
5445 <note>
5446 This method will fail if a session for this machine is not
5447 currently open.
5448 </note>
5449
5450 <result name="VBOX_E_INVALID_VM_STATE">
5451 Machine session is not open.
5452 </result>
5453
5454 </desc>
5455 <param name="canShow" type="boolean" dir="return">
5456 <desc>
5457 @c true if the console window can be shown and @c false otherwise.
5458 </desc>
5459 </param>
5460 </method>
5461
5462 <method name="showConsoleWindow">
5463 <desc>
5464 Activates the console window and brings it to foreground on
5465 the desktop of the host PC. Many modern window managers on
5466 many platforms implement some sort of focus stealing
5467 prevention logic, so that it may be impossible to activate
5468 a window without the help of the currently active
5469 application. In this case, this method will return a non-zero
5470 identifier that represents the top-level window of the VM
5471 console process. The caller, if it represents a currently
5472 active process, is responsible to use this identifier (in a
5473 platform-dependent manner) to perform actual window
5474 activation.
5475 <note>
5476 This method will fail if a session for this machine is not
5477 currently open.
5478 </note>
5479
5480 <result name="VBOX_E_INVALID_VM_STATE">
5481 Machine session is not open.
5482 </result>
5483
5484 </desc>
5485 <param name="winId" type="unsigned long long" dir="return">
5486 <desc>
5487 Platform-dependent identifier of the top-level VM console
5488 window, or zero if this method has performed all actions
5489 necessary to implement the <i>show window</i> semantics for
5490 the given platform and/or VirtualBox front-end.
5491 </desc>
5492 </param>
5493 </method>
5494
5495 <method name="getGuestProperty" const="yes">
5496 <desc>
5497 Reads an entry from the machine's guest property store.
5498
5499 <result name="VBOX_E_INVALID_VM_STATE">
5500 Machine session is not open.
5501 </result>
5502
5503 </desc>
5504 <param name="name" type="wstring" dir="in">
5505 <desc>
5506 The name of the property to read.
5507 </desc>
5508 </param>
5509 <param name="value" type="wstring" dir="out">
5510 <desc>
5511 The value of the property. If the property does not exist then this
5512 will be empty.
5513 </desc>
5514 </param>
5515 <param name="timestamp" type="unsigned long long" dir="out">
5516 <desc>
5517 The time at which the property was last modified, as seen by the
5518 server process.
5519 </desc>
5520 </param>
5521 <param name="flags" type="wstring" dir="out">
5522 <desc>
5523 Additional property parameters, passed as a comma-separated list of
5524 "name=value" type entries.
5525 </desc>
5526 </param>
5527 </method>
5528
5529 <method name="getGuestPropertyValue" const="yes">
5530 <desc>
5531 Reads a value from the machine's guest property store.
5532
5533 <result name="VBOX_E_INVALID_VM_STATE">
5534 Machine session is not open.
5535 </result>
5536
5537 </desc>
5538 <param name="property" type="wstring" dir="in">
5539 <desc>
5540 The name of the property to read.
5541 </desc>
5542 </param>
5543 <param name="value" type="wstring" dir="return">
5544 <desc>
5545 The value of the property. If the property does not exist then this
5546 will be empty.
5547 </desc>
5548 </param>
5549 </method>
5550
5551 <method name="getGuestPropertyTimestamp" const="yes">
5552 <desc>
5553 Reads a property timestamp from the machine's guest property store.
5554
5555 <result name="VBOX_E_INVALID_VM_STATE">
5556 Machine session is not open.
5557 </result>
5558
5559 </desc>
5560 <param name="property" type="wstring" dir="in">
5561 <desc>
5562 The name of the property to read.
5563 </desc>
5564 </param>
5565 <param name="value" type="unsigned long long" dir="return">
5566 <desc>
5567 The timestamp. If the property does not exist then this will be
5568 empty.
5569 </desc>
5570 </param>
5571 </method>
5572
5573 <method name="setGuestProperty">
5574 <desc>
5575 Sets, changes or deletes an entry in the machine's guest property
5576 store.
5577
5578 <result name="E_ACCESSDENIED">
5579 Property cannot be changed.
5580 </result>
5581 <result name="E_INVALIDARG">
5582 Invalid @a flags.
5583 </result>
5584 <result name="VBOX_E_INVALID_VM_STATE">
5585 Virtual machine is not mutable or session not open.
5586 </result>
5587 <result name="VBOX_E_INVALID_OBJECT_STATE">
5588 Cannot set transient property when machine not running.
5589 </result>
5590
5591 </desc>
5592 <param name="property" type="wstring" dir="in">
5593 <desc>
5594 The name of the property to set, change or delete.
5595 </desc>
5596 </param>
5597 <param name="value" type="wstring" dir="in">
5598 <desc>
5599 The new value of the property to set, change or delete. If the
5600 property does not yet exist and value is non-empty, it will be
5601 created. If the value is @c null or empty, the property will be
5602 deleted if it exists.
5603 </desc>
5604 </param>
5605 <param name="flags" type="wstring" dir="in">
5606 <desc>
5607 Additional property parameters, passed as a comma-separated list of
5608 "name=value" type entries.
5609 </desc>
5610 </param>
5611 </method>
5612
5613 <method name="setGuestPropertyValue">
5614 <desc>
5615 Sets, changes or deletes a value in the machine's guest property
5616 store. The flags field will be left unchanged or created empty for a
5617 new property.
5618
5619 <result name="E_ACCESSDENIED">
5620 Property cannot be changed.
5621 </result>
5622 <result name="VBOX_E_INVALID_VM_STATE">
5623 Virtual machine is not mutable or session not open.
5624 </result>
5625 <result name="VBOX_E_INVALID_OBJECT_STATE">
5626 Cannot set transient property when machine not running.
5627 </result>
5628 </desc>
5629
5630 <param name="property" type="wstring" dir="in">
5631 <desc>
5632 The name of the property to set, change or delete.
5633 </desc>
5634 </param>
5635 <param name="value" type="wstring" dir="in">
5636 <desc>
5637 The new value of the property to set, change or delete. If the
5638 property does not yet exist and value is non-empty, it will be
5639 created. If the value is @c null or empty, the property will be
5640 deleted if it exists.
5641 </desc>
5642 </param>
5643 </method>
5644
5645 <method name="enumerateGuestProperties">
5646 <desc>
5647 Return a list of the guest properties matching a set of patterns along
5648 with their values, time stamps and flags.
5649 </desc>
5650 <param name="patterns" type="wstring" dir="in">
5651 <desc>
5652 The patterns to match the properties against, separated by '|'
5653 characters. If this is empty or @c null, all properties will match.
5654 </desc>
5655 </param>
5656 <param name="name" type="wstring" dir="out" safearray="yes">
5657 <desc>
5658 The names of the properties returned.
5659 </desc>
5660 </param>
5661 <param name="value" type="wstring" dir="out" safearray="yes">
5662 <desc>
5663 The values of the properties returned. The array entries match the
5664 corresponding entries in the @a name array.
5665 </desc>
5666 </param>
5667 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5668 <desc>
5669 The time stamps of the properties returned. The array entries match
5670 the corresponding entries in the @a name array.
5671 </desc>
5672 </param>
5673 <param name="flags" type="wstring" dir="out" safearray="yes">
5674 <desc>
5675 The flags of the properties returned. The array entries match the
5676 corresponding entries in the @a name array.
5677 </desc>
5678 </param>
5679 </method>
5680
5681 <method name="querySavedThumbnailSize">
5682 <desc>
5683 Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.
5684 </desc>
5685 <param name="screenId" type="unsigned long" dir="in">
5686 <desc>
5687 Saved guest screen to query info from.
5688 </desc>
5689 </param>
5690 <param name="size" type="unsigned long" dir="out">
5691 <desc>
5692 Size of buffer required to store the bitmap.
5693 </desc>
5694 </param>
5695 <param name="width" type="unsigned long" dir="out">
5696 <desc>
5697 Bitmap width.
5698 </desc>
5699 </param>
5700 <param name="height" type="unsigned long" dir="out">
5701 <desc>
5702 Bitmap height.
5703 </desc>
5704 </param>
5705 </method>
5706
5707 <method name="readSavedThumbnailToArray">
5708 <desc>
5709 Thumbnail is retrieved to an array of bytes in uncompressed 32-bit BGRA or RGBA format.
5710 </desc>
5711 <param name="screenId" type="unsigned long" dir="in">
5712 <desc>
5713 Saved guest screen to read from.
5714 </desc>
5715 </param>
5716 <param name="BGR" type="boolean" dir="in">
5717 <desc>
5718 How to order bytes in the pixel. A pixel consists of 4 bytes. If this parameter is true, then
5719 bytes order is: B, G, R, 0xFF. If this parameter is false, then bytes order is: R, G, B, 0xFF.
5720 </desc>
5721 </param>
5722 <param name="width" type="unsigned long" dir="out">
5723 <desc>
5724 Bitmap width.
5725 </desc>
5726 </param>
5727 <param name="height" type="unsigned long" dir="out">
5728 <desc>
5729 Bitmap height.
5730 </desc>
5731 </param>
5732 <param name="data" type="octet" dir="return" safearray="yes">
5733 <desc>
5734 Array with resulting bitmap data.
5735 </desc>
5736 </param>
5737 </method>
5738
5739 <method name="querySavedScreenshotPNGSize">
5740 <desc>
5741 Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.
5742 </desc>
5743 <param name="screenId" type="unsigned long" dir="in">
5744 <desc>
5745 Saved guest screen to query info from.
5746 </desc>
5747 </param>
5748 <param name="size" type="unsigned long" dir="out">
5749 <desc>
5750 Size of buffer required to store the PNG binary data.
5751 </desc>
5752 </param>
5753 <param name="width" type="unsigned long" dir="out">
5754 <desc>
5755 Image width.
5756 </desc>
5757 </param>
5758 <param name="height" type="unsigned long" dir="out">
5759 <desc>
5760 Image height.
5761 </desc>
5762 </param>
5763 </method>
5764
5765 <method name="readSavedScreenshotPNGToArray">
5766 <desc>
5767 Screenshot in PNG format is retrieved to an array of bytes.
5768 </desc>
5769 <param name="screenId" type="unsigned long" dir="in">
5770 <desc>
5771 Saved guest screen to read from.
5772 </desc>
5773 </param>
5774 <param name="width" type="unsigned long" dir="out">
5775 <desc>
5776 Image width.
5777 </desc>
5778 </param>
5779 <param name="height" type="unsigned long" dir="out">
5780 <desc>
5781 Image height.
5782 </desc>
5783 </param>
5784 <param name="data" type="octet" dir="return" safearray="yes">
5785 <desc>
5786 Array with resulting PNG data.
5787 </desc>
5788 </param>
5789 </method>
5790
5791 <method name="hotPlugCPU">
5792 <desc>
5793 Plugs a CPU into the machine.
5794 </desc>
5795 <param name="cpu" type="unsigned long" dir="in">
5796 <desc>
5797 The CPU id to insert.
5798 </desc>
5799 </param>
5800 </method>
5801
5802 <method name="hotUnplugCPU">
5803 <desc>
5804 Removes a CPU from the machine.
5805 </desc>
5806 <param name="cpu" type="unsigned long" dir="in">
5807 <desc>
5808 The CPU id to remove.
5809 </desc>
5810 </param>
5811 </method>
5812
5813 <method name="getCPUStatus">
5814 <desc>
5815 Returns the current status of the given CPU.
5816 </desc>
5817 <param name="cpu" type="unsigned long" dir="in">
5818 <desc>
5819 The CPU id to check for.
5820 </desc>
5821 </param>
5822 <param name="attached" type="boolean" dir="return">
5823 <desc>
5824 Status of the CPU.
5825 </desc>
5826 </param>
5827 </method>
5828
5829 <method name="queryLogFilename">
5830 <desc>
5831 Queries for the VM log file name of an given index. Returns an empty
5832 string if a log file with that index doesn't exists.
5833 </desc>
5834 <param name="idx" type="unsigned long" dir="in">
5835 <desc>
5836 Which log file name to query. 0=current log file.
5837 </desc>
5838 </param>
5839 <param name="filename" type="wstring" dir="return">
5840 <desc>
5841 On return the full path to the log file or an empty string on error.
5842 </desc>
5843 </param>
5844 </method>
5845
5846 <method name="readLog">
5847 <desc>
5848 Reads the VM log file. The chunk size is limited, so even if you
5849 ask for a big piece there might be less data returned.
5850 </desc>
5851 <param name="idx" type="unsigned long" dir="in">
5852 <desc>
5853 Which log file to read. 0=current log file.
5854 </desc>
5855 </param>
5856 <param name="offset" type="unsigned long long" dir="in">
5857 <desc>
5858 Offset in the log file.
5859 </desc>
5860 </param>
5861 <param name="size" type="unsigned long long" dir="in">
5862 <desc>
5863 Chunk size to read in the log file.
5864 </desc>
5865 </param>
5866 <param name="data" type="octet" dir="return" safearray="yes">
5867 <desc>
5868 Data read from the log file. A data size of 0 means end of file
5869 if the requested chunk size was not 0. This is the unprocessed
5870 file data, i.e. the line ending style depends on the platform of
5871 the system the server is running on.
5872 </desc>
5873 </param>
5874 </method>
5875 </interface>
5876
5877 <!--
5878 // IConsole
5879 /////////////////////////////////////////////////////////////////////////
5880 -->
5881
5882 <interface
5883 name="IRemoteDisplayInfo" extends="$unknown"
5884 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
5885 wsmap="struct"
5886 >
5887 <desc>
5888 Contains information about the remote display (VRDP) capabilities and status.
5889 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5890 </desc>
5891
5892 <attribute name="active" type="boolean" readonly="yes">
5893 <desc>
5894 Whether the remote display connection is active.
5895 </desc>
5896 </attribute>
5897
5898 <attribute name="port" type="long" readonly="yes">
5899 <desc>
5900 VRDP server port number. If this property is equal to <tt>0</tt>, then
5901 the VRDP server failed to start, usually because there are no free TCP
5902 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
5903 server has not yet been started.
5904 </desc>
5905 </attribute>
5906
5907 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5908 <desc>
5909 How many times a client connected.
5910 </desc>
5911 </attribute>
5912
5913 <attribute name="beginTime" type="long long" readonly="yes">
5914 <desc>
5915 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5916 </desc>
5917 </attribute>
5918
5919 <attribute name="endTime" type="long long" readonly="yes">
5920 <desc>
5921 When the last connection was terminated or the current time, if
5922 connection is still active, in milliseconds since 1970-01-01 UTC.
5923 </desc>
5924 </attribute>
5925
5926 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5927 <desc>
5928 How many bytes were sent in last or current, if still active, connection.
5929 </desc>
5930 </attribute>
5931
5932 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5933 <desc>
5934 How many bytes were sent in all connections.
5935 </desc>
5936 </attribute>
5937
5938 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5939 <desc>
5940 How many bytes were received in last or current, if still active, connection.
5941 </desc>
5942 </attribute>
5943
5944 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5945 <desc>
5946 How many bytes were received in all connections.
5947 </desc>
5948 </attribute>
5949
5950 <attribute name="user" type="wstring" readonly="yes">
5951 <desc>
5952 Login user name supplied by the client.
5953 </desc>
5954 </attribute>
5955
5956 <attribute name="domain" type="wstring" readonly="yes">
5957 <desc>
5958 Login domain name supplied by the client.
5959 </desc>
5960 </attribute>
5961
5962 <attribute name="clientName" type="wstring" readonly="yes">
5963 <desc>
5964 The client name supplied by the client.
5965 </desc>
5966 </attribute>
5967
5968 <attribute name="clientIP" type="wstring" readonly="yes">
5969 <desc>
5970 The IP address of the client.
5971 </desc>
5972 </attribute>
5973
5974 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5975 <desc>
5976 The client software version number.
5977 </desc>
5978 </attribute>
5979
5980 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5981 <desc>
5982 Public key exchange method used when connection was established.
5983 Values: 0 - RDP4 public key exchange scheme.
5984 1 - X509 certificates were sent to client.
5985 </desc>
5986 </attribute>
5987
5988 </interface>
5989
5990 <interface
5991 name="IConsole" extends="$unknown"
5992 uuid="03cb7897-ea17-4e6c-81ae-4bd90be2fde2"
5993 wsmap="managed"
5994 >
5995 <desc>
5996 The IConsole interface represents an interface to control virtual
5997 machine execution.
5998
5999 A console object gets created when a machine has been locked for a
6000 particular session (client process) using <link to="IMachine::lockMachine" />
6001 or <link to="IMachine::launchVMProcess"/>. The console object can
6002 then be found in the session's <link to="ISession::console" /> attribute.
6003
6004 Methods of the IConsole interface allow the caller to query the current
6005 virtual machine execution state, pause the machine or power it down, save
6006 the machine state or take a snapshot, attach and detach removable media
6007 and so on.
6008
6009 <see>ISession</see>
6010 </desc>
6011
6012 <attribute name="machine" type="IMachine" readonly="yes">
6013 <desc>
6014 Machine object this console is sessioned with.
6015 <note>
6016 This is a convenience property, it has the same value as
6017 <link to="ISession::machine"/> of the corresponding session
6018 object.
6019 </note>
6020 </desc>
6021 </attribute>
6022
6023 <attribute name="state" type="MachineState" readonly="yes">
6024 <desc>
6025 Current execution state of the machine.
6026 <note>
6027 This property always returns the same value as the corresponding
6028 property of the IMachine object this console is sessioned with.
6029 For the process that owns (executes) the VM, this is the
6030 preferable way of querying the VM state, because no IPC
6031 calls are made.
6032 </note>
6033 </desc>
6034 </attribute>
6035
6036 <attribute name="guest" type="IGuest" readonly="yes">
6037 <desc>Guest object.</desc>
6038 </attribute>
6039
6040 <attribute name="keyboard" type="IKeyboard" readonly="yes">
6041 <desc>
6042 Virtual keyboard object.
6043 <note>
6044 If the machine is not running, any attempt to use
6045 the returned object will result in an error.
6046 </note>
6047 </desc>
6048 </attribute>
6049
6050 <attribute name="mouse" type="IMouse" readonly="yes">
6051 <desc>
6052 Virtual mouse object.
6053 <note>
6054 If the machine is not running, any attempt to use
6055 the returned object will result in an error.
6056 </note>
6057 </desc>
6058 </attribute>
6059
6060 <attribute name="display" type="IDisplay" readonly="yes">
6061 <desc>Virtual display object.
6062 <note>
6063 If the machine is not running, any attempt to use
6064 the returned object will result in an error.
6065 </note>
6066 </desc>
6067 </attribute>
6068
6069 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6070 <desc>Debugging interface.</desc>
6071 </attribute>
6072
6073 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6074 <desc>
6075 Collection of USB devices currently attached to the virtual
6076 USB controller.
6077 <note>
6078 The collection is empty if the machine is not running.
6079 </note>
6080 </desc>
6081 </attribute>
6082
6083 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6084 <desc>
6085 List of USB devices currently attached to the remote VRDP client.
6086 Once a new device is physically attached to the remote host computer,
6087 it appears in this list and remains there until detached.
6088 </desc>
6089 </attribute>
6090
6091 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6092 <desc>
6093 Collection of shared folders for the current session. These folders
6094 are called transient shared folders because they are available to the
6095 guest OS running inside the associated virtual machine only for the
6096 duration of the session (as opposed to
6097 <link to="IMachine::sharedFolders"/> which represent permanent shared
6098 folders). When the session is closed (e.g. the machine is powered down),
6099 these folders are automatically discarded.
6100
6101 New shared folders are added to the collection using
6102 <link to="#createSharedFolder"/>. Existing shared folders can be
6103 removed using <link to="#removeSharedFolder"/>.
6104 </desc>
6105 </attribute>
6106
6107 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6108 <desc>
6109 Interface that provides information on Remote Display (VRDP) connection.
6110 </desc>
6111 </attribute>
6112
6113 <attribute name="eventSource" type="IEventSource" readonly="yes">
6114 <desc>
6115 Event source for console events.
6116 </desc>
6117 </attribute>
6118
6119 <method name="powerUp">
6120 <desc>
6121 Starts the virtual machine execution using the current machine
6122 state (that is, its current execution state, current settings and
6123 current storage devices).
6124
6125 <note>
6126 This method is only useful for front-ends that want to actually
6127 execute virtual machines in their own process (like the VirtualBox
6128 or VBoxSDL front-ends). Unless you are intending to write such a
6129 front-end, do not call this method. If you simply want to
6130 start virtual machine execution using one of the existing front-ends
6131 (for example the VirtualBox GUI or headless server), use
6132 <link to="IMachine::launchVMProcess"/> instead; these
6133 front-ends will power up the machine automatically for you.
6134 </note>
6135
6136 If the machine is powered off or aborted, the execution will
6137 start from the beginning (as if the real hardware were just
6138 powered on).
6139
6140 If the machine is in the <link to="MachineState_Saved"/> state,
6141 it will continue its execution the point where the state has
6142 been saved.
6143
6144 If the machine <link to="IMachine::teleporterEnabled"/> property is
6145 enabled on the machine being powered up, the machine will wait for an
6146 incoming teleportation in the <link to="MachineState_TeleportingIn"/>
6147 state. The returned progress object will have at least three
6148 operations where the last three are defined as: (1) powering up and
6149 starting TCP server, (2) waiting for incoming teleportations, and
6150 (3) perform teleportation. These operations will be reflected as the
6151 last three operations of the progress objected returned by
6152 <link to="IMachine::launchVMProcess"/> as well.
6153
6154 <see>#saveState</see>
6155
6156 <result name="VBOX_E_INVALID_VM_STATE">
6157 Virtual machine already running.
6158 </result>
6159 <result name="VBOX_E_HOST_ERROR">
6160 Host interface does not exist or name not set.
6161 </result>
6162 <result name="VBOX_E_FILE_ERROR">
6163 Invalid saved state file.
6164 </result>
6165 </desc>
6166 <param name="progress" type="IProgress" dir="return">
6167 <desc>Progress object to track the operation completion.</desc>
6168 </param>
6169 </method>
6170
6171 <method name="powerUpPaused">
6172 <desc>
6173 Identical to powerUp except that the VM will enter the
6174 <link to="MachineState_Paused"/> state, instead of
6175 <link to="MachineState_Running"/>.
6176
6177 <see>#powerUp</see>
6178 <result name="VBOX_E_INVALID_VM_STATE">
6179 Virtual machine already running.
6180 </result>
6181 <result name="VBOX_E_HOST_ERROR">
6182 Host interface does not exist or name not set.
6183 </result>
6184 <result name="VBOX_E_FILE_ERROR">
6185 Invalid saved state file.
6186 </result>
6187 </desc>
6188 <param name="progress" type="IProgress" dir="return">
6189 <desc>Progress object to track the operation completion.</desc>
6190 </param>
6191 </method>
6192
6193 <method name="powerDown">
6194 <desc>
6195 Initiates the power down procedure to stop the virtual machine
6196 execution.
6197
6198 The completion of the power down procedure is tracked using the returned
6199 IProgress object. After the operation is complete, the machine will go
6200 to the PoweredOff state.
6201 <result name="VBOX_E_INVALID_VM_STATE">
6202 Virtual machine must be Running, Paused or Stuck to be powered down.
6203 </result>
6204 </desc>
6205 <param name="progress" type="IProgress" dir="return">
6206 <desc>Progress object to track the operation completion.</desc>
6207 </param>
6208 </method>
6209
6210 <method name="reset">
6211 <desc>Resets the virtual machine.
6212 <result name="VBOX_E_INVALID_VM_STATE">
6213 Virtual machine not in Running state.
6214 </result>
6215 <result name="VBOX_E_VM_ERROR">
6216 Virtual machine error in reset operation.
6217 </result>
6218 </desc>
6219 </method>
6220
6221 <method name="pause">
6222 <desc>Pauses the virtual machine execution.
6223 <result name="VBOX_E_INVALID_VM_STATE">
6224 Virtual machine not in Running state.
6225 </result>
6226 <result name="VBOX_E_VM_ERROR">
6227 Virtual machine error in suspend operation.
6228 </result>
6229 </desc>
6230 </method>
6231
6232 <method name="resume">
6233 <desc>Resumes the virtual machine execution.
6234 <result name="VBOX_E_INVALID_VM_STATE">
6235 Virtual machine not in Paused state.
6236 </result>
6237 <result name="VBOX_E_VM_ERROR">
6238 Virtual machine error in resume operation.
6239 </result>
6240 </desc>
6241 </method>
6242
6243 <method name="powerButton">
6244 <desc>Sends the ACPI power button event to the guest.
6245 <result name="VBOX_E_INVALID_VM_STATE">
6246 Virtual machine not in Running state.
6247 </result>
6248 <result name="VBOX_E_PDM_ERROR">
6249 Controlled power off failed.
6250 </result>
6251 </desc>
6252 </method>
6253
6254 <method name="sleepButton">
6255 <desc>Sends the ACPI sleep button event to the guest.
6256 <result name="VBOX_E_INVALID_VM_STATE">
6257 Virtual machine not in Running state.
6258 </result>
6259 <result name="VBOX_E_PDM_ERROR">
6260 Sending sleep button event failed.
6261 </result>
6262 </desc>
6263 </method>
6264
6265 <method name="getPowerButtonHandled">
6266 <desc>Checks if the last power button event was handled by guest.
6267 <result name="VBOX_E_PDM_ERROR">
6268 Checking if the event was handled by the guest OS failed.
6269 </result>
6270 </desc>
6271 <param name="handled" type="boolean" dir="return"/>
6272 </method>
6273
6274 <method name="getGuestEnteredACPIMode">
6275 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6276 G1 (sleeping). If this method returns @c false, the guest will
6277 most likely not respond to external ACPI events.
6278 <result name="VBOX_E_INVALID_VM_STATE">
6279 Virtual machine not in Running state.
6280 </result>
6281 </desc>
6282 <param name="entered" type="boolean" dir="return"/>
6283 </method>
6284
6285 <method name="saveState">
6286 <desc>
6287 Saves the current execution state of a running virtual machine
6288 and stops its execution.
6289
6290 After this operation completes, the machine will go to the
6291 Saved state. Next time it is powered up, this state will
6292 be restored and the machine will continue its execution from
6293 the place where it was saved.
6294
6295 This operation differs from taking a snapshot to the effect
6296 that it doesn't create new differencing media. Also, once
6297 the machine is powered up from the state saved using this method,
6298 the saved state is deleted, so it will be impossible to return
6299 to this state later.
6300
6301 <note>
6302 On success, this method implicitly calls
6303 <link to="IMachine::saveSettings"/> to save all current machine
6304 settings (including runtime changes to the DVD medium, etc.).
6305 Together with the impossibility to change any VM settings when it is
6306 in the Saved state, this guarantees adequate hardware
6307 configuration of the machine when it is restored from the saved
6308 state file.
6309 </note>
6310
6311 <note>
6312 The machine must be in the Running or Paused state, otherwise
6313 the operation will fail.
6314 </note>
6315 <result name="VBOX_E_INVALID_VM_STATE">
6316 Virtual machine state neither Running nor Paused.
6317 </result>
6318 <result name="VBOX_E_FILE_ERROR">
6319 Failed to create directory for saved state file.
6320 </result>
6321
6322 <see><link to="#takeSnapshot"/></see>
6323 </desc>
6324 <param name="progress" type="IProgress" dir="return">
6325 <desc>Progress object to track the operation completion.</desc>
6326 </param>
6327 </method>
6328
6329 <method name="adoptSavedState">
6330 <desc>
6331 Associates the given saved state file to the virtual machine.
6332
6333 On success, the machine will go to the Saved state. Next time it is
6334 powered up, it will be restored from the adopted saved state and
6335 continue execution from the place where the saved state file was
6336 created.
6337
6338 The specified saved state file path may be absolute or relative to the
6339 folder the VM normally saves the state to (usually,
6340 <link to="IMachine::snapshotFolder"/>).
6341
6342 <note>
6343 It's a caller's responsibility to make sure the given saved state
6344 file is compatible with the settings of this virtual machine that
6345 represent its virtual hardware (memory size, storage disk configuration
6346 etc.). If there is a mismatch, the behavior of the virtual machine
6347 is undefined.
6348 </note>
6349 <result name="VBOX_E_INVALID_VM_STATE">
6350 Virtual machine state neither PoweredOff nor Aborted.
6351 </result>
6352 </desc>
6353 <param name="savedStateFile" type="wstring" dir="in">
6354 <desc>Path to the saved state file to adopt.</desc>
6355 </param>
6356 </method>
6357
6358 <method name="discardSavedState">
6359 <desc>
6360 Forcibly resets the machine to "Powered Off" state if it is
6361 currently in the "Saved" state (previously created by <link to="#saveState"/>)
6362 and deletes the file into which the machine state was saved.
6363 Next time the machine is powered up, a clean boot will occur.
6364 <note>
6365 This operation is equivalent to resetting or powering off
6366 the machine without doing a proper shutdown of the guest
6367 operating system; as with resetting a running phyiscal
6368 computer, it can can lead to data loss.
6369 </note>
6370 <result name="VBOX_E_INVALID_VM_STATE">
6371 Virtual machine not in state Saved.
6372 </result>
6373 </desc>
6374 </method>
6375
6376 <method name="getDeviceActivity">
6377 <desc>
6378 Gets the current activity type of a given device or device group.
6379 <result name="E_INVALIDARG">
6380 Invalid device type.
6381 </result>
6382 </desc>
6383 <param name="type" type="DeviceType" dir="in"/>
6384 <param name="activity" type="DeviceActivity" dir="return"/>
6385 </method>
6386
6387 <method name="attachUSBDevice">
6388 <desc>
6389 Attaches a host USB device with the given UUID to the
6390 USB controller of the virtual machine.
6391
6392 The device needs to be in one of the following states:
6393 <link to="USBDeviceState_Busy"/>,
6394 <link to="USBDeviceState_Available"/> or
6395 <link to="USBDeviceState_Held"/>,
6396 otherwise an error is immediately returned.
6397
6398 When the device state is
6399 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6400 be returned if the host computer refuses to release it for some reason.
6401
6402 <see>IUSBController::deviceFilters, USBDeviceState</see>
6403 <result name="VBOX_E_INVALID_VM_STATE">
6404 Virtual machine state neither Running nor Paused.
6405 </result>
6406 <result name="VBOX_E_PDM_ERROR">
6407 Virtual machine does not have a USB controller.
6408 </result>
6409 </desc>
6410 <param name="id" type="uuid" mod="string" dir="in">
6411 <desc>UUID of the host USB device to attach.</desc>
6412 </param>
6413 </method>
6414
6415 <method name="detachUSBDevice">
6416 <desc>
6417 Detaches an USB device with the given UUID from the USB controller
6418 of the virtual machine.
6419
6420 After this method succeeds, the VirtualBox server re-initiates
6421 all USB filters as if the device were just physically attached
6422 to the host, but filters of this machine are ignored to avoid
6423 a possible automatic re-attachment.
6424
6425 <see>IUSBController::deviceFilters, USBDeviceState</see>
6426
6427 <result name="VBOX_E_PDM_ERROR">
6428 Virtual machine does not have a USB controller.
6429 </result>
6430 <result name="E_INVALIDARG">
6431 USB device not attached to this virtual machine.
6432 </result>
6433 </desc>
6434 <param name="id" type="uuid" mod="string" dir="in">
6435 <desc>UUID of the USB device to detach.</desc>
6436 </param>
6437 <param name="device" type="IUSBDevice" dir="return">
6438 <desc>Detached USB device.</desc>
6439 </param>
6440 </method>
6441
6442 <method name="findUSBDeviceByAddress">
6443 <desc>
6444 Searches for a USB device with the given host address.
6445
6446 <result name="VBOX_E_OBJECT_NOT_FOUND">
6447 Given @c name does not correspond to any USB device.
6448 </result>
6449
6450 <see>IUSBDevice::address</see>
6451 </desc>
6452 <param name="name" type="wstring" dir="in">
6453 <desc>
6454 Address of the USB device (as assigned by the host) to
6455 search for.
6456 </desc>
6457 </param>
6458 <param name="device" type="IUSBDevice" dir="return">
6459 <desc>Found USB device object.</desc>
6460 </param>
6461 </method>
6462
6463 <method name="findUSBDeviceById">
6464 <desc>
6465 Searches for a USB device with the given UUID.
6466
6467 <result name="VBOX_E_OBJECT_NOT_FOUND">
6468 Given @c id does not correspond to any USB device.
6469 </result>
6470
6471 <see>IUSBDevice::id</see>
6472 </desc>
6473 <param name="id" type="uuid" mod="string" dir="in">
6474 <desc>UUID of the USB device to search for.</desc>
6475 </param>
6476 <param name="device" type="IUSBDevice" dir="return">
6477 <desc>Found USB device object.</desc>
6478 </param>
6479 </method>
6480
6481 <method name="createSharedFolder">
6482 <desc>
6483 Creates a transient new shared folder by associating the given logical
6484 name with the given host path, adds it to the collection of shared
6485 folders and starts sharing it. Refer to the description of
6486 <link to="ISharedFolder"/> to read more about logical names.
6487
6488 <result name="VBOX_E_INVALID_VM_STATE">
6489 Virtual machine in Saved state or currently changing state.
6490 </result>
6491 <result name="VBOX_E_FILE_ERROR">
6492 Shared folder already exists or not accessible.
6493 </result>
6494 </desc>
6495 <param name="name" type="wstring" dir="in">
6496 <desc>Unique logical name of the shared folder.</desc>
6497 </param>
6498 <param name="hostPath" type="wstring" dir="in">
6499 <desc>Full path to the shared folder in the host file system.</desc>
6500 </param>
6501 <param name="writable" type="boolean" dir="in">
6502 <desc>Whether the share is writable or readonly</desc>
6503 </param>
6504 <param name="automount" type="boolean" dir="in">
6505 <desc>Whether the share gets automatically mounted by the guest
6506 or not.</desc>
6507 </param>
6508 </method>
6509
6510 <method name="removeSharedFolder">
6511 <desc>
6512 Removes a transient shared folder with the given name previously
6513 created by <link to="#createSharedFolder"/> from the collection of
6514 shared folders and stops sharing it.
6515 <result name="VBOX_E_INVALID_VM_STATE">
6516 Virtual machine in Saved state or currently changing state.
6517 </result>
6518 <result name="VBOX_E_FILE_ERROR">
6519 Shared folder does not exists.
6520 </result>
6521 </desc>
6522 <param name="name" type="wstring" dir="in">
6523 <desc>Logical name of the shared folder to remove.</desc>
6524 </param>
6525 </method>
6526
6527 <method name="takeSnapshot">
6528 <desc>
6529 Saves the current execution state
6530 and all settings of the machine and creates differencing images
6531 for all normal (non-independent) media.
6532 See <link to="ISnapshot" /> for an introduction to snapshots.
6533
6534 This method can be called for a PoweredOff, Saved (see
6535 <link to="#saveState"/>), Running or
6536 Paused virtual machine. When the machine is PoweredOff, an
6537 offline snapshot is created. When the machine is Running a live
6538 snapshot is created, and an online snapshot is is created when Paused.
6539
6540 The taken snapshot is always based on the
6541 <link to="IMachine::currentSnapshot">current snapshot</link>
6542 of the associated virtual machine and becomes a new current snapshot.
6543
6544 <note>
6545 This method implicitly calls <link to="IMachine::saveSettings"/> to
6546 save all current machine settings before taking an offline snapshot.
6547 </note>
6548
6549 <result name="VBOX_E_INVALID_VM_STATE">
6550 Virtual machine currently changing state.
6551 </result>
6552 </desc>
6553 <param name="name" type="wstring" dir="in">
6554 <desc>Short name for the snapshot.</desc>
6555 </param>
6556 <param name="description" type="wstring" dir="in">
6557 <desc>Optional description of the snapshot.</desc>
6558 </param>
6559 <param name="progress" type="IProgress" dir="return">
6560 <desc>Progress object to track the operation completion.</desc>
6561 </param>
6562 </method>
6563
6564 <method name="deleteSnapshot">
6565 <desc>
6566 Starts deleting the specified snapshot asynchronously.
6567 See <link to="ISnapshot" /> for an introduction to snapshots.
6568
6569 The execution state and settings of the associated machine stored in
6570 the snapshot will be deleted. The contents of all differencing media of
6571 this snapshot will be merged with the contents of their dependent child
6572 media to keep the medium chain valid (in other words, all changes
6573 represented by media being deleted will be propagated to their child
6574 medium). After that, this snapshot's differencing medium will be
6575 deleted. The parent of this snapshot will become a new parent for all
6576 its child snapshots.
6577
6578 If the deleted snapshot is the current one, its parent snapshot will
6579 become a new current snapshot. The current machine state is not directly
6580 affected in this case, except that currently attached differencing
6581 media based on media of the deleted snapshot will be also merged as
6582 described above.
6583
6584 If the deleted snapshot is the first or current snapshot, then the
6585 respective IMachine attributes will be adjusted. Deleting the current
6586 snapshot will also implicitly call <link to="IMachine::saveSettings"/>
6587 to make all current machine settings permanent.
6588
6589 Deleting a snapshot has the following preconditions:
6590
6591 <ul>
6592 <li>Child media of all normal media of the deleted snapshot
6593 must be accessible (see <link to="IMedium::state"/>) for this
6594 operation to succeed. In particular, this means that all virtual
6595 machines, whose media are directly or indirectly based on the
6596 media of deleted snapshot, must be powered off.</li>
6597
6598 <li>You cannot delete the snapshot if a medium attached to it has
6599 more than once child medium (differencing images) because otherwise
6600 merging would be impossible. This might be the case if there is
6601 more than one child snapshot or differencing images were created
6602 for other reason (e.g. implicitly because of multiple machine
6603 attachments).</li>
6604 </ul>
6605
6606
6607 The virtual machine's <link to="IMachine::state">state</link> is
6608 changed to "DeletingSnapshot", "DeletingSnapshotOnline" or
6609 "DeletingSnapshotPaused" while this operation is in progress.
6610
6611 <note>
6612 Merging medium contents can be very time and disk space
6613 consuming, if these media are big in size and have many
6614 children. However, if the snapshot being deleted is the last
6615 (head) snapshot on the branch, the operation will be rather
6616 quick.
6617 </note>
6618 <result name="VBOX_E_INVALID_VM_STATE">
6619 The running virtual machine prevents deleting this snapshot. This
6620 happens only in very specific situations, usually snapshots can be
6621 deleted without trouble while a VM is running. The error message
6622 text explains the reason for the failure.
6623 </result>
6624 </desc>
6625 <param name="id" type="uuid" mod="string" dir="in">
6626 <desc>UUID of the snapshot to delete.</desc>
6627 </param>
6628 <param name="progress" type="IProgress" dir="return">
6629 <desc>Progress object to track the operation completion.</desc>
6630 </param>
6631 </method>
6632
6633 <method name="restoreSnapshot">
6634 <desc>
6635 Starts resetting the machine's current state to the state contained
6636 in the given snapshot, asynchronously. All current settings of the
6637 machine will be reset and changes stored in differencing media
6638 will be lost.
6639 See <link to="ISnapshot" /> for an introduction to snapshots.
6640
6641 After this operation is successfully completed, new empty differencing
6642 media are created for all normal media of the machine.
6643
6644 If the given snapshot is an online snapshot, the machine will go to
6645 the <link to="MachineState_Saved"> saved state</link>, so that the
6646 next time it is powered on, the execution state will be restored
6647 from the state of the snapshot.
6648
6649 <note>
6650 The machine must not be running, otherwise the operation will fail.
6651 </note>
6652
6653 <note>
6654 If the machine state is <link to="MachineState_Saved">Saved</link>
6655 prior to this operation, the saved state file will be implicitly
6656 deleted (as if <link to="IConsole::discardSavedState"/> were
6657 called).
6658 </note>
6659
6660 <result name="VBOX_E_INVALID_VM_STATE">
6661 Virtual machine is running.
6662 </result>
6663 </desc>
6664 <param name="snapshot" type="ISnapshot" dir="in">
6665 <desc>The snapshot to restore the VM state from.</desc>
6666 </param>
6667 <param name="progress" type="IProgress" dir="return">
6668 <desc>Progress object to track the operation completion.</desc>
6669 </param>
6670 </method>
6671
6672 <method name="teleport">
6673 <desc>
6674 Teleport the VM to a different host machine or process.
6675
6676 TODO explain the details.
6677
6678 <result name="VBOX_E_INVALID_VM_STATE">
6679 Virtual machine not running or paused.
6680 </result>
6681 </desc>
6682 <param name="hostname" type="wstring" dir="in">
6683 <desc>The name or IP of the host to teleport to.</desc>
6684 </param>
6685 <param name="tcpport" type="unsigned long" dir="in">
6686 <desc>The TCP port to connect to (1..65535).</desc>
6687 </param>
6688 <param name="password" type="wstring" dir="in">
6689 <desc>The password.</desc>
6690 </param>
6691 <param name="maxDowntime" type="unsigned long" dir="in">
6692 <desc>
6693 The maximum allowed downtime given as milliseconds. 0 is not a valid
6694 value. Recommended value: 250 ms.
6695
6696 The higher the value is, the greater the chance for a successful
6697 teleportation. A small value may easily result in the teleportation
6698 process taking hours and eventually fail.
6699
6700 <note>
6701 The current implementation treats this a guideline, not as an
6702 absolute rule.
6703 </note>
6704 </desc>
6705 </param>
6706 <param name="progress" type="IProgress" dir="return">
6707 <desc>Progress object to track the operation completion.</desc>
6708 </param>
6709 </method>
6710
6711 </interface>
6712
6713 <!--
6714 // IHost
6715 /////////////////////////////////////////////////////////////////////////
6716 -->
6717
6718 <enum
6719 name="HostNetworkInterfaceMediumType"
6720 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6721 >
6722 <desc>
6723 Type of encapsulation. Ethernet encapsulation includes both wired and
6724 wireless Ethernet connections.
6725 <see>IHostNetworkInterface</see>
6726 </desc>
6727
6728 <const name="Unknown" value="0">
6729 <desc>
6730 The type of interface cannot be determined.
6731 </desc>
6732 </const>
6733 <const name="Ethernet" value="1">
6734 <desc>
6735 Ethernet frame encapsulation.
6736 </desc>
6737 </const>
6738 <const name="PPP" value="2">
6739 <desc>
6740 Point-to-point protocol encapsulation.
6741 </desc>
6742 </const>
6743 <const name="SLIP" value="3">
6744 <desc>
6745 Serial line IP encapsulation.
6746 </desc>
6747 </const>
6748 </enum>
6749
6750 <enum
6751 name="HostNetworkInterfaceStatus"
6752 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6753 >
6754 <desc>
6755 Current status of the interface.
6756 <see>IHostNetworkInterface</see>
6757 </desc>
6758
6759 <const name="Unknown" value="0">
6760 <desc>
6761 The state of interface cannot be determined.
6762 </desc>
6763 </const>
6764 <const name="Up" value="1">
6765 <desc>
6766 The interface is fully operational.
6767 </desc>
6768 </const>
6769 <const name="Down" value="2">
6770 <desc>
6771 The interface is not functioning.
6772 </desc>
6773 </const>
6774 </enum>
6775
6776 <enum
6777 name="HostNetworkInterfaceType"
6778 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6779 >
6780 <desc>
6781 Network interface type.
6782 </desc>
6783 <const name="Bridged" value="1"/>
6784 <const name="HostOnly" value="2"/>
6785 </enum>
6786
6787 <interface
6788 name="IHostNetworkInterface" extends="$unknown"
6789 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6790 wsmap="managed"
6791 >
6792 <desc>
6793 Represents one of host's network interfaces. IP V6 address and network
6794 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6795 separated by colons.
6796 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6797 </desc>
6798 <attribute name="name" type="wstring" readonly="yes">
6799 <desc>Returns the host network interface name.</desc>
6800 </attribute>
6801
6802 <attribute name="id" type="uuid" mod="string" readonly="yes">
6803 <desc>Returns the interface UUID.</desc>
6804 </attribute>
6805
6806 <attribute name="networkName" type="wstring" readonly="yes">
6807 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6808 </attribute>
6809
6810 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6811 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6812 </attribute>
6813
6814 <attribute name="IPAddress" type="wstring" readonly="yes">
6815 <desc>Returns the IP V4 address of the interface.</desc>
6816 </attribute>
6817
6818 <attribute name="networkMask" type="wstring" readonly="yes">
6819 <desc>Returns the network mask of the interface.</desc>
6820 </attribute>
6821
6822 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6823 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6824 </attribute>
6825
6826 <attribute name="IPV6Address" type="wstring" readonly="yes">
6827 <desc>Returns the IP V6 address of the interface.</desc>
6828 </attribute>
6829
6830 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6831 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6832 </attribute>
6833
6834 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6835 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6836 </attribute>
6837
6838 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6839 <desc>Type of protocol encapsulation used.</desc>
6840 </attribute>
6841
6842 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6843 <desc>Status of the interface.</desc>
6844 </attribute>
6845
6846 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6847 <desc>specifies the host interface type.</desc>
6848 </attribute>
6849
6850 <method name="enableStaticIpConfig">
6851 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6852 <param name="IPAddress" type="wstring" dir="in">
6853 <desc>
6854 IP address.
6855 </desc>
6856 </param>
6857 <param name="networkMask" type="wstring" dir="in">
6858 <desc>
6859 network mask.
6860 </desc>
6861 </param>
6862 </method>
6863
6864 <method name="enableStaticIpConfigV6">
6865 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6866 <param name="IPV6Address" type="wstring" dir="in">
6867 <desc>
6868 IP address.
6869 </desc>
6870 </param>
6871 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6872 <desc>
6873 network mask.
6874 </desc>
6875 </param>
6876 </method>
6877
6878 <method name="enableDynamicIpConfig">
6879 <desc>enables the dynamic IP configuration.</desc>
6880 </method>
6881
6882 <method name="dhcpRediscover">
6883 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6884 </method>
6885
6886 </interface>
6887
6888 <interface
6889 name="IHost" extends="$unknown"
6890 uuid="35b004f4-7806-4009-bfa8-d1308adba7e5"
6891 wsmap="managed"
6892 >
6893 <desc>
6894 The IHost interface represents the physical machine that this VirtualBox
6895 installation runs on.
6896
6897 An object implementing this interface is returned by the
6898 <link to="IVirtualBox::host" /> attribute. This interface contains
6899 read-only information about the host's physical hardware (such as what
6900 processors and disks are available, what the host operating system is,
6901 and so on) and also allows for manipulating some of the host's hardware,
6902 such as global USB device filters and host interface networking.
6903
6904 </desc>
6905 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
6906 <desc>List of DVD drives available on the host.</desc>
6907 </attribute>
6908
6909 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
6910 <desc>List of floppy drives available on the host.</desc>
6911 </attribute>
6912
6913 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6914 <desc>
6915 List of USB devices currently attached to the host.
6916 Once a new device is physically attached to the host computer,
6917 it appears in this list and remains there until detached.
6918
6919 <note>
6920 If USB functionality is not available in the given edition of
6921 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6922 </note>
6923 </desc>
6924 </attribute>
6925
6926 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
6927 <desc>
6928 List of USB device filters in action.
6929 When a new device is physically attached to the host computer,
6930 filters from this list are applied to it (in order they are stored
6931 in the list). The first matched filter will determine the
6932 <link to="IHostUSBDeviceFilter::action">action</link>
6933 performed on the device.
6934
6935 Unless the device is ignored by these filters, filters of all
6936 currently running virtual machines
6937 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6938
6939 <note>
6940 If USB functionality is not available in the given edition of
6941 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6942 </note>
6943
6944 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6945 </desc>
6946 </attribute>
6947
6948 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6949 <desc>List of host network interfaces currently defined on the host.</desc>
6950 </attribute>
6951
6952 <attribute name="processorCount" type="unsigned long" readonly="yes">
6953 <desc>Number of (logical) CPUs installed in the host system.</desc>
6954 </attribute>
6955
6956 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6957 <desc>Number of (logical) CPUs online in the host system.</desc>
6958 </attribute>
6959
6960 <attribute name="processorCoreCount" type="unsigned long" readonly="yes">
6961 <desc>Number of physical processor cores installed in the host system.</desc>
6962 </attribute>
6963
6964 <method name="getProcessorSpeed">
6965 <desc>Query the (approximate) maximum speed of a specified host CPU in
6966 Megahertz.
6967 </desc>
6968 <param name="cpuId" type="unsigned long" dir="in">
6969 <desc>
6970 Identifier of the CPU.
6971 </desc>
6972 </param>
6973 <param name="speed" type="unsigned long" dir="return">
6974 <desc>
6975 Speed value. 0 is returned if value is not known or @a cpuId is
6976 invalid.
6977 </desc>
6978 </param>
6979 </method>
6980
6981 <method name="getProcessorFeature">
6982 <desc>Query whether a CPU feature is supported or not.</desc>
6983 <param name="feature" type="ProcessorFeature" dir="in">
6984 <desc>
6985 CPU Feature identifier.
6986 </desc>
6987 </param>
6988 <param name="supported" type="boolean" dir="return">
6989 <desc>
6990 Feature is supported or not.
6991 </desc>
6992 </param>
6993 </method>
6994
6995 <method name="getProcessorDescription">
6996 <desc>Query the model string of a specified host CPU.
6997 </desc>
6998 <param name="cpuId" type="unsigned long" dir="in">
6999 <desc>
7000 Identifier of the CPU.
7001 <note>
7002 The current implementation might not necessarily return the
7003 description for this exact CPU.
7004 </note>
7005 </desc>
7006 </param>
7007 <param name="description" type="wstring" dir="return">
7008 <desc>
7009 Model string. An empty string is returned if value is not known or
7010 @a cpuId is invalid.
7011 </desc>
7012 </param>
7013 </method>
7014
7015 <method name="getProcessorCPUIDLeaf">
7016 <desc>
7017 Returns the CPU cpuid information for the specified leaf.
7018 </desc>
7019 <param name="cpuId" type="unsigned long" dir="in">
7020 <desc>
7021 Identifier of the CPU. The CPU most be online.
7022 <note>
7023 The current implementation might not necessarily return the
7024 description for this exact CPU.
7025 </note>
7026 </desc>
7027 </param>
7028 <param name="leaf" type="unsigned long" dir="in">
7029 <desc>
7030 CPUID leaf index (eax).
7031 </desc>
7032 </param>
7033 <param name="subLeaf" type="unsigned long" dir="in">
7034 <desc>
7035 CPUID leaf sub index (ecx). This currently only applies to cache
7036 information on Intel CPUs. Use 0 if retriving values for
7037 <link to="IMachine::setCPUIDLeaf"/>.
7038 </desc>
7039 </param>
7040 <param name="valEax" type="unsigned long" dir="out">
7041 <desc>
7042 CPUID leaf value for register eax.
7043 </desc>
7044 </param>
7045 <param name="valEbx" type="unsigned long" dir="out">
7046 <desc>
7047 CPUID leaf value for register ebx.
7048 </desc>
7049 </param>
7050 <param name="valEcx" type="unsigned long" dir="out">
7051 <desc>
7052 CPUID leaf value for register ecx.
7053 </desc>
7054 </param>
7055 <param name="valEdx" type="unsigned long" dir="out">
7056 <desc>
7057 CPUID leaf value for register edx.
7058 </desc>
7059 </param>
7060 </method>
7061
7062 <attribute name="memorySize" type="unsigned long" readonly="yes">
7063 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7064 </attribute>
7065
7066 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7067 <desc>Available system memory in the host system.</desc>
7068 </attribute>
7069
7070 <attribute name="operatingSystem" type="wstring" readonly="yes">
7071 <desc>Name of the host system's operating system.</desc>
7072 </attribute>
7073
7074 <attribute name="OSVersion" type="wstring" readonly="yes">
7075 <desc>Host operating system's version string.</desc>
7076 </attribute>
7077
7078 <attribute name="UTCTime" type="long long" readonly="yes">
7079 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7080 </attribute>
7081
7082 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
7083 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
7084 </attribute>
7085
7086 <method name="createHostOnlyNetworkInterface">
7087 <desc>
7088 Creates a new adapter for Host Only Networking.
7089 <result name="E_INVALIDARG">
7090 Host network interface @a name already exists.
7091 </result>
7092 </desc>
7093 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7094 <desc>
7095 Created host interface object.
7096 </desc>
7097 </param>
7098 <param name="progress" type="IProgress" dir="return">
7099 <desc>
7100 Progress object to track the operation completion.
7101 </desc>
7102 </param>
7103 </method>
7104
7105 <method name="removeHostOnlyNetworkInterface">
7106 <desc>
7107 Removes the given Host Only Networking interface.
7108 <result name="VBOX_E_OBJECT_NOT_FOUND">
7109 No host network interface matching @a id found.
7110 </result>
7111 </desc>
7112 <param name="id" type="uuid" mod="string" dir="in">
7113 <desc>
7114 Adapter GUID.
7115 </desc>
7116 </param>
7117 <param name="progress" type="IProgress" dir="return">
7118 <desc>
7119 Progress object to track the operation completion.
7120 </desc>
7121 </param>
7122 </method>
7123
7124 <method name="createUSBDeviceFilter">
7125 <desc>
7126 Creates a new USB device filter. All attributes except
7127 the filter name are set to empty (any match),
7128 <i>active</i> is @c false (the filter is not active).
7129
7130 The created filter can be added to the list of filters using
7131 <link to="#insertUSBDeviceFilter"/>.
7132
7133 <see>#USBDeviceFilters</see>
7134 </desc>
7135 <param name="name" type="wstring" dir="in">
7136 <desc>
7137 Filter name. See <link to="IUSBDeviceFilter::name"/> for more information.
7138 </desc>
7139 </param>
7140 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7141 <desc>Created filter object.</desc>
7142 </param>
7143 </method>
7144
7145 <method name="insertUSBDeviceFilter">
7146 <desc>
7147 Inserts the given USB device to the specified position
7148 in the list of filters.
7149
7150 Positions are numbered starting from @c 0. If the specified
7151 position is equal to or greater than the number of elements in
7152 the list, the filter is added at the end of the collection.
7153
7154 <note>
7155 Duplicates are not allowed, so an attempt to insert a
7156 filter already in the list is an error.
7157 </note>
7158 <note>
7159 If USB functionality is not available in the given edition of
7160 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7161 </note>
7162
7163 <see>#USBDeviceFilters</see>
7164
7165 <result name="VBOX_E_INVALID_OBJECT_STATE">
7166 USB device filter is not created within this VirtualBox instance.
7167 </result>
7168 <result name="E_INVALIDARG">
7169 USB device filter already in list.
7170 </result>
7171
7172 </desc>
7173 <param name="position" type="unsigned long" dir="in">
7174 <desc>Position to insert the filter to.</desc>
7175 </param>
7176 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7177 <desc>USB device filter to insert.</desc>
7178 </param>
7179 </method>
7180
7181 <method name="removeUSBDeviceFilter">
7182 <desc>
7183 Removes a USB device filter from the specified position in the
7184 list of filters.
7185
7186 Positions are numbered starting from @c 0. Specifying a
7187 position equal to or greater than the number of elements in
7188 the list will produce an error.
7189
7190 <note>
7191 If USB functionality is not available in the given edition of
7192 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7193 </note>
7194
7195 <see>#USBDeviceFilters</see>
7196
7197 <result name="E_INVALIDARG">
7198 USB device filter list empty or invalid @a position.
7199 </result>
7200
7201 </desc>
7202 <param name="position" type="unsigned long" dir="in">
7203 <desc>Position to remove the filter from.</desc>
7204 </param>
7205 </method>
7206
7207 <method name="findHostDVDDrive">
7208 <desc>
7209 Searches for a host DVD drive with the given @c name.
7210
7211 <result name="VBOX_E_OBJECT_NOT_FOUND">
7212 Given @c name does not correspond to any host drive.
7213 </result>
7214
7215 </desc>
7216 <param name="name" type="wstring" dir="in">
7217 <desc>Name of the host drive to search for</desc>
7218 </param>
7219 <param name="drive" type="IMedium" dir="return">
7220 <desc>Found host drive object</desc>
7221 </param>
7222 </method>
7223
7224 <method name="findHostFloppyDrive">
7225 <desc>
7226 Searches for a host floppy drive with the given @c name.
7227
7228 <result name="VBOX_E_OBJECT_NOT_FOUND">
7229 Given @c name does not correspond to any host floppy drive.
7230 </result>
7231
7232 </desc>
7233 <param name="name" type="wstring" dir="in">
7234 <desc>Name of the host floppy drive to search for</desc>
7235 </param>
7236 <param name="drive" type="IMedium" dir="return">
7237 <desc>Found host floppy drive object</desc>
7238 </param>
7239 </method>
7240
7241 <method name="findHostNetworkInterfaceByName">
7242 <desc>
7243 Searches through all host network interfaces for an interface with
7244 the given @c name.
7245 <note>
7246 The method returns an error if the given @c name does not
7247 correspond to any host network interface.
7248 </note>
7249 </desc>
7250 <param name="name" type="wstring" dir="in">
7251 <desc>Name of the host network interface to search for.</desc>
7252 </param>
7253 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7254 <desc>Found host network interface object.</desc>
7255 </param>
7256 </method>
7257 <method name="findHostNetworkInterfaceById">
7258 <desc>
7259 Searches through all host network interfaces for an interface with
7260 the given GUID.
7261 <note>
7262 The method returns an error if the given GUID does not
7263 correspond to any host network interface.
7264 </note>
7265 </desc>
7266 <param name="id" type="uuid" mod="string" dir="in">
7267 <desc>GUID of the host network interface to search for.</desc>
7268 </param>
7269 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7270 <desc>Found host network interface object.</desc>
7271 </param>
7272 </method>
7273 <method name="findHostNetworkInterfacesOfType">
7274 <desc>
7275 Searches through all host network interfaces and returns a list of interfaces of the specified type
7276 </desc>
7277 <param name="type" type="HostNetworkInterfaceType" dir="in">
7278 <desc>type of the host network interfaces to search for.</desc>
7279 </param>
7280 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7281 <desc>Found host network interface objects.</desc>
7282 </param>
7283 </method>
7284
7285 <method name="findUSBDeviceById">
7286 <desc>
7287 Searches for a USB device with the given UUID.
7288
7289 <result name="VBOX_E_OBJECT_NOT_FOUND">
7290 Given @c id does not correspond to any USB device.
7291 </result>
7292
7293 <see>IHostUSBDevice::id</see>
7294 </desc>
7295 <param name="id" type="uuid" mod="string" dir="in">
7296 <desc>UUID of the USB device to search for.</desc>
7297 </param>
7298 <param name="device" type="IHostUSBDevice" dir="return">
7299 <desc>Found USB device object.</desc>
7300 </param>
7301 </method>
7302
7303 <method name="findUSBDeviceByAddress">
7304 <desc>
7305 Searches for a USB device with the given host address.
7306
7307 <result name="VBOX_E_OBJECT_NOT_FOUND">
7308 Given @c name does not correspond to any USB device.
7309 </result>
7310
7311 <see>IHostUSBDevice::address</see>
7312 </desc>
7313 <param name="name" type="wstring" dir="in">
7314 <desc>
7315 Address of the USB device (as assigned by the host) to
7316 search for.
7317 </desc>
7318 </param>
7319 <param name="device" type="IHostUSBDevice" dir="return">
7320 <desc>Found USB device object.</desc>
7321 </param>
7322 </method>
7323
7324 </interface>
7325
7326 <!--
7327 // ISystemProperties
7328 /////////////////////////////////////////////////////////////////////////
7329 -->
7330
7331 <interface
7332 name="ISystemProperties"
7333 extends="$unknown"
7334 uuid="07c3ffd8-8f59-49cc-b608-53a332e85cc3"
7335 wsmap="managed"
7336 >
7337 <desc>
7338 The ISystemProperties interface represents global properties of the given
7339 VirtualBox installation.
7340
7341 These properties define limits and default values for various attributes
7342 and parameters. Most of the properties are read-only, but some can be
7343 changed by a user.
7344 </desc>
7345
7346 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7347 <desc>Minimum guest system memory in Megabytes.</desc>
7348 </attribute>
7349
7350 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7351 <desc>Maximum guest system memory in Megabytes.</desc>
7352 </attribute>
7353
7354 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7355 <desc>Minimum guest video memory in Megabytes.</desc>
7356 </attribute>
7357
7358 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7359 <desc>Maximum guest video memory in Megabytes.</desc>
7360 </attribute>
7361
7362 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7363 <desc>Minimum CPU count.</desc>
7364 </attribute>
7365
7366 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7367 <desc>Maximum CPU count.</desc>
7368 </attribute>
7369
7370 <attribute name="maxGuestMonitors" type="unsigned long" readonly="yes">
7371 <desc>Maximum of monitors which could be connected.</desc>
7372 </attribute>
7373
7374 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7375 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7376 </attribute>
7377
7378 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7379 <desc>
7380 Number of network adapters associated with every
7381 <link to="IMachine"/> instance.
7382 </desc>
7383 </attribute>
7384
7385 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7386 <desc>
7387 Number of serial ports associated with every
7388 <link to="IMachine"/> instance.
7389 </desc>
7390 </attribute>
7391
7392 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7393 <desc>
7394 Number of parallel ports associated with every
7395 <link to="IMachine"/> instance.
7396 </desc>
7397 </attribute>
7398
7399 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7400 <desc>
7401 Maximum device position in the boot order. This value corresponds
7402 to the total number of devices a machine can boot from, to make it
7403 possible to include all possible devices to the boot list.
7404 <see><link to="IMachine::setBootOrder"/></see>
7405 </desc>
7406 </attribute>
7407
7408 <attribute name="defaultMachineFolder" type="wstring">
7409 <desc>
7410 Full path to the default directory used to create new or open
7411 existing machines when a settings file name contains no
7412 path.
7413
7414 The initial value of this property is
7415 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7416 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7417
7418 <note>
7419 Setting this property to @c null or an empty string will restore the
7420 initial value.
7421 </note>
7422 <note>
7423 When settings this property, the specified path can be
7424 absolute (full path) or relative
7425 to the <link to="IVirtualBox::homeFolder">
7426 VirtualBox home directory</link>.
7427 When reading this property, a full path is
7428 always returned.
7429 </note>
7430 <note>
7431 The specified path may not exist, it will be created
7432 when necessary.
7433 </note>
7434
7435 <see>
7436 <link to="IVirtualBox::createMachine"/>,
7437 <link to="IVirtualBox::openMachine"/>
7438 </see>
7439 </desc>
7440 </attribute>
7441
7442 <attribute name="defaultHardDiskFolder" type="wstring">
7443 <desc>
7444 Full path to the default directory used to create new or open existing
7445 virtual disks.
7446
7447 This path is used when the storage unit of a hard disk is a regular file
7448 in the host's file system and only a file name that contains no path is
7449 given.
7450
7451 The initial value of this property is
7452 <tt>&lt;</tt>
7453 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7454 <tt>&gt;/HardDisks</tt>.
7455
7456 <note>
7457 Setting this property to @c null or empty string will restore the
7458 initial value.
7459 </note>
7460 <note>
7461 When settings this property, the specified path can be relative
7462 to the
7463 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7464 absolute. When reading this property, a full path is
7465 always returned.
7466 </note>
7467 <note>
7468 The specified path may not exist, it will be created
7469 when necessary.
7470 </note>
7471
7472 <see>
7473 IMedium,
7474 <link to="IVirtualBox::createHardDisk"/>,
7475 <link to="IVirtualBox::openHardDisk"/>,
7476 <link to="IMedium::location"/>
7477 </see>
7478 </desc>
7479 </attribute>
7480
7481 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7482 <desc>
7483 List of all medium storage formats supported by this VirtualBox
7484 installation.
7485
7486 Keep in mind that the medium format identifier
7487 (<link to="IMediumFormat::id"/>) used in other API calls like
7488 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7489 medium format is a case-insensitive string. This means that, for
7490 example, all of the following strings:
7491 <pre>
7492 "VDI"
7493 "vdi"
7494 "VdI"</pre>
7495 refer to the same medium format.
7496
7497 Note that the virtual medium framework is backend-based, therefore
7498 the list of supported formats depends on what backends are currently
7499 installed.
7500
7501 <see>
7502 <link to="IMediumFormat"/>,
7503 </see>
7504 </desc>
7505 </attribute>
7506
7507 <attribute name="defaultHardDiskFormat" type="wstring">
7508 <desc>
7509 Identifier of the default medium format used by VirtualBox.
7510
7511 The medium format set by this attribute is used by VirtualBox
7512 when the medium format was not specified explicitly. One example is
7513 <link to="IVirtualBox::createHardDisk"/> with the empty
7514 format argument. A more complex example is implicit creation of
7515 differencing media when taking a snapshot of a virtual machine:
7516 this operation will try to use a format of the parent medium first
7517 and if this format does not support differencing media the default
7518 format specified by this argument will be used.
7519
7520 The list of supported medium formats may be obtained by the
7521 <link to="#mediumFormats"/> call. Note that the default medium
7522 format must have a capability to create differencing media;
7523 otherwise operations that create media implicitly may fail
7524 unexpectedly.
7525
7526 The initial value of this property is <tt>"VDI"</tt> in the current
7527 version of the VirtualBox product, but may change in the future.
7528
7529 <note>
7530 Setting this property to @c null or empty string will restore the
7531 initial value.
7532 </note>
7533
7534 <see>
7535 <link to="#mediumFormats"/>,
7536 <link to="IMediumFormat::id"/>,
7537 <link to="IVirtualBox::createHardDisk"/>
7538 </see>
7539 </desc>
7540 </attribute>
7541
7542 <attribute name="freeDiskSpaceWarning" type="unsigned long long">
7543 <desc>Issue a warning if the free disk space is below (or in some disk
7544 intensive operation is expected to go below) the given size in
7545 Megabytes.</desc>
7546 </attribute>
7547
7548 <attribute name="freeDiskSpacePercentWarning" type="unsigned long">
7549 <desc>Issue a warning if the free disk space is below (or in some disk
7550 intensive operation is expected to go below) the given percentage.</desc>
7551 </attribute>
7552
7553 <attribute name="freeDiskSpaceError" type="unsigned long long">
7554 <desc>Issue an error if the free disk space is below (or in some disk
7555 intensive operation is expected to go below) the given size in
7556 Megabytes.</desc>
7557 </attribute>
7558
7559 <attribute name="freeDiskSpacePercentError" type="unsigned long">
7560 <desc>Issue an error if the free disk space is below (or in some disk
7561 intensive operation is expected to go below) the given percentage.</desc>
7562 </attribute>
7563
7564 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7565 <desc>
7566 Library that provides authentication for VRDP clients. The library
7567 is used if a virtual machine's authentication type is set to "external"
7568 in the VM RemoteDisplay configuration.
7569
7570 The system library extension (".DLL" or ".so") must be omitted.
7571 A full path can be specified; if not, then the library must reside on the
7572 system's default library path.
7573
7574 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7575 of that name in one of the default VirtualBox library directories.
7576
7577 For details about VirtualBox authentication libraries and how to implement
7578 them, please refer to the VirtualBox manual.
7579
7580 <note>
7581 Setting this property to @c null or empty string will restore the
7582 initial value.
7583 </note>
7584 </desc>
7585 </attribute>
7586
7587 <attribute name="webServiceAuthLibrary" type="wstring">
7588 <desc>
7589 Library that provides authentication for webservice clients. The library
7590 is used if a virtual machine's authentication type is set to "external"
7591 in the VM RemoteDisplay configuration and will be called from
7592 within the <link to="IWebsessionManager::logon" /> implementation.
7593
7594 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7595 there is no per-VM setting for this, as the webservice is a global
7596 resource (if it is running). Only for this setting (for the webservice),
7597 setting this value to a literal <tt>"null"</tt> string disables authentication,
7598 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7599 no matter what user name and password are supplied.
7600
7601 The initial value of this property is <tt>"VRDPAuth"</tt>,
7602 meaning that the webservice will use the same authentication
7603 library that is used by default for VBoxVRDP (again, see
7604 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7605 The format and calling convention of authentication libraries
7606 is the same for the webservice as it is for VBoxVRDP.
7607
7608 <note>
7609 Setting this property to @c null or empty string will restore the
7610 initial value.
7611 </note>
7612 </desc>
7613 </attribute>
7614
7615 <attribute name="LogHistoryCount" type="unsigned long">
7616 <desc>
7617 This value specifies how many old release log files are kept.
7618 </desc>
7619 </attribute>
7620
7621 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7622 <desc>This value hold the default audio driver for the current
7623 system.</desc>
7624 </attribute>
7625
7626 <method name="getMaxDevicesPerPortForStorageBus">
7627 <desc>Returns the maximum number of devices which can be attached to a port
7628 for the given storage bus.</desc>
7629
7630 <param name="bus" type="StorageBus" dir="in">
7631 <desc>The storage bus type to get the value for.</desc>
7632 </param>
7633
7634 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
7635 <desc>The maximum number of devices which can eb attached to the port for the given
7636 storage bus.</desc>
7637 </param>
7638 </method>
7639
7640 <method name="getMinPortCountForStorageBus">
7641 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
7642
7643 <param name="bus" type="StorageBus" dir="in">
7644 <desc>The storage bus type to get the value for.</desc>
7645 </param>
7646
7647 <param name="minPortCount" type="unsigned long" dir="return">
7648 <desc>The minimum number of ports for the given storage bus.</desc>
7649 </param>
7650 </method>
7651
7652 <method name="getMaxPortCountForStorageBus">
7653 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
7654
7655 <param name="bus" type="StorageBus" dir="in">
7656 <desc>The storage bus type to get the value for.</desc>
7657 </param>
7658
7659 <param name="maxPortCount" type="unsigned long" dir="return">
7660 <desc>The maximum number of ports for the given storage bus.</desc>
7661 </param>
7662 </method>
7663
7664 <method name="getMaxInstancesOfStorageBus">
7665 <desc>Returns the maximum number of storage bus instances which
7666 can be configured for each VM. This corresponds to the number of
7667 storage controllers one can have.</desc>
7668
7669 <param name="bus" type="StorageBus" dir="in">
7670 <desc>The storage bus type to get the value for.</desc>
7671 </param>
7672
7673 <param name="maxInstances" type="unsigned long" dir="return">
7674 <desc>The maximum number of instances for the given storage bus.</desc>
7675 </param>
7676 </method>
7677
7678 <method name="getDeviceTypesForStorageBus">
7679 <desc>Returns list of all the supported device types
7680 (<link to="DeviceType"/>) for the given type of storage
7681 bus.</desc>
7682
7683 <param name="bus" type="StorageBus" dir="in">
7684 <desc>The storage bus type to get the value for.</desc>
7685 </param>
7686
7687 <param name="deviceTypes" type="DeviceType" safearray="yes" dir="return">
7688 <desc>The list of all supported device types for the given storage bus.</desc>
7689 </param>
7690 </method>
7691 </interface>
7692
7693 <!--
7694 // IGuest
7695 /////////////////////////////////////////////////////////////////////////
7696 -->
7697
7698 <interface
7699 name="IGuestOSType" extends="$unknown"
7700 uuid="e3f6727e-a09b-41ea-a824-864a176472f3"
7701 wsmap="struct"
7702 >
7703 <desc>
7704 </desc>
7705
7706 <attribute name="familyId" type="wstring" readonly="yes">
7707 <desc>Guest OS family identifier string.</desc>
7708 </attribute>
7709
7710 <attribute name="familyDescription" type="wstring" readonly="yes">
7711 <desc>Human readable description of the guest OS family.</desc>
7712 </attribute>
7713
7714 <attribute name="id" type="wstring" readonly="yes">
7715 <desc>Guest OS identifier string.</desc>
7716 </attribute>
7717
7718 <attribute name="description" type="wstring" readonly="yes">
7719 <desc>Human readable description of the guest OS.</desc>
7720 </attribute>
7721
7722 <attribute name="is64Bit" type="boolean" readonly="yes">
7723 <desc>Returns @c true if the given OS is 64-bit</desc>
7724 </attribute>
7725
7726 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7727 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7728 </attribute>
7729
7730 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7731 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7732 </attribute>
7733
7734 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7735 <desc>Recommended RAM size in Megabytes.</desc>
7736 </attribute>
7737
7738 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7739 <desc>Recommended video RAM size in Megabytes.</desc>
7740 </attribute>
7741
7742 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7743 <desc>Recommended hard disk size in Megabytes.</desc>
7744 </attribute>
7745
7746 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7747 <desc>Returns recommended network adapter for this OS type.</desc>
7748 </attribute>
7749
7750 <attribute name="recommendedPae" type="boolean" readonly="yes">
7751 <desc>Returns @c true if using PAE is recommended for this OS type.</desc>
7752 </attribute>
7753
7754 <attribute name="recommendedDvdStorageController" type="StorageControllerType" readonly="yes">
7755 <desc>Recommended storage controller type for DVD/CD drives.</desc>
7756 </attribute>
7757
7758 <attribute name="recommendedDvdStorageBus" type="StorageBus" readonly="yes">
7759 <desc>Recommended storage bus type for DVD/CD drives.</desc>
7760 </attribute>
7761
7762 <attribute name="recommendedHdStorageController" type="StorageControllerType" readonly="yes">
7763 <desc>Recommended storage controller type for HD drives.</desc>
7764 </attribute>
7765
7766 <attribute name="recommendedHdStorageBus" type="StorageBus" readonly="yes">
7767 <desc>Recommended storage bus type for HD drives.</desc>
7768 </attribute>
7769
7770 <attribute name="recommendedFirmware" type="FirmwareType" readonly="yes">
7771 <desc>Recommended firmware type.</desc>
7772 </attribute>
7773
7774 <attribute name="recommendedUsbHid" type="boolean" readonly="yes">
7775 <desc>Returns @c true if using USB Human Interface Devices, such as keyboard and mouse recommended.</desc>
7776 </attribute>
7777
7778 <attribute name="recommendedHpet" type="boolean" readonly="yes">
7779 <desc>Returns @c true if using HPET is recommended for this OS type.</desc>
7780 </attribute>
7781
7782 <attribute name="recommendedUsbTablet" type="boolean" readonly="yes">
7783 <desc>Returns @c true if using a USB Tablet is recommended.</desc>
7784 </attribute>
7785
7786 <attribute name="recommendedRtcUseUtc" type="boolean" readonly="yes">
7787 <desc>Returns @c true if the RTC of this VM should be set to UTC</desc>
7788 </attribute>
7789
7790 </interface>
7791
7792 <interface
7793 name="IGuest" extends="$unknown"
7794 uuid="d915dff1-ed38-495a-91f1-ab6c53932468"
7795 wsmap="managed"
7796 >
7797 <desc>
7798 The IGuest interface represents information about the operating system
7799 running inside the virtual machine. Used in
7800 <link to="IConsole::guest"/>.
7801
7802 IGuest provides information about the guest operating system, whether
7803 Guest Additions are installed and other OS-specific virtual machine
7804 properties.
7805 </desc>
7806
7807 <attribute name="OSTypeId" type="wstring" readonly="yes">
7808 <desc>
7809 Identifier of the Guest OS type as reported by the Guest
7810 Additions.
7811 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7812 an IGuestOSType object representing details about the given
7813 Guest OS type.
7814 <note>
7815 If Guest Additions are not installed, this value will be
7816 the same as <link to="IMachine::OSTypeId"/>.
7817 </note>
7818 </desc>
7819 </attribute>
7820
7821 <attribute name="additionsActive" type="boolean" readonly="yes">
7822 <desc>
7823 Flag whether the Guest Additions are installed and active
7824 in which case their version will be returned by the
7825 <link to="#additionsVersion"/> property.
7826 </desc>
7827 </attribute>
7828
7829 <attribute name="additionsVersion" type="wstring" readonly="yes">
7830 <desc>
7831 Version of the Guest Additions including the revision (3 decimal numbers
7832 separated by dots + revision number) installed on the guest or empty
7833 when the Additions are not installed.
7834 </desc>
7835 </attribute>
7836
7837 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7838 <desc>
7839 Flag whether seamless guest display rendering (seamless desktop
7840 integration) is supported.
7841 </desc>
7842 </attribute>
7843
7844 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7845 <desc>
7846 Flag whether the guest is in graphics mode. If it is not, then
7847 seamless rendering will not work, resize hints are not immediately
7848 acted on and guest display resizes are probably not initiated by
7849 the guest additions.
7850 </desc>
7851 </attribute>
7852
7853 <attribute name="memoryBalloonSize" type="unsigned long">
7854 <desc>Guest system memory balloon size in megabytes (transient property).</desc>
7855 </attribute>
7856
7857 <attribute name="pageFusionEnabled" type="boolean">
7858 <desc>Flag whether page fusion is enabled or not.</desc>
7859 </attribute>
7860
7861 <attribute name="statisticsUpdateInterval" type="unsigned long">
7862 <desc>Interval to update guest statistics in seconds.</desc>
7863 </attribute>
7864
7865 <method name="internalGetStatistics">
7866 <desc>
7867 Internal method; do not use as it might change at any time
7868 </desc>
7869 <param name="cpuUser" type="unsigned long" dir="out">
7870 <desc>Percentage of processor time spent in user mode as seen by the guest</desc>
7871 </param>
7872 <param name="cpuKernel" type="unsigned long" dir="out">
7873 <desc>Percentage of processor time spent in kernel mode as seen by the guest</desc>
7874 </param>
7875 <param name="cpuIdle" type="unsigned long" dir="out">
7876 <desc>Percentage of processor time spent idling as seen by the guest</desc>
7877 </param>
7878 <param name="memTotal" type="unsigned long" dir="out">
7879 <desc>Total amount of physical guest RAM</desc>
7880 </param>
7881 <param name="memFree" type="unsigned long" dir="out">
7882 <desc>Free amount of physical guest RAM</desc>
7883 </param>
7884 <param name="memBalloon" type="unsigned long" dir="out">
7885 <desc>Amount of ballooned physical guest RAM</desc>
7886 </param>
7887 <param name="memShared" type="unsigned long" dir="out">
7888 <desc>Amount of shared physical guest RAM</desc>
7889 </param>
7890 <param name="memCache" type="unsigned long" dir="out">
7891 <desc>Total amount of guest (disk) cache memory</desc>
7892 </param>
7893 <param name="pagedTotal" type="unsigned long" dir="out">
7894 <desc>Total amount of space in the page file</desc>
7895 </param>
7896 <param name="memAllocTotal" type="unsigned long" dir="out">
7897 <desc>Total amount of memory allocated by the hypervisor</desc>
7898 </param>
7899 <param name="memFreeTotal" type="unsigned long" dir="out">
7900 <desc>Total amount of free memory available in the hypervisor</desc>
7901 </param>
7902 <param name="memBalloonTotal" type="unsigned long" dir="out">
7903 <desc>Total amount of memory ballooned by the hypervisor</desc>
7904 </param>
7905 <param name="memSharedTotal" type="unsigned long" dir="out">
7906 <desc>Total amount of shared memory in the hypervisor</desc>
7907 </param>
7908 </method>
7909
7910 <method name="setCredentials">
7911 <desc>
7912 Store login credentials that can be queried by guest operating
7913 systems with Additions installed. The credentials are transient
7914 to the session and the guest may also choose to erase them. Note
7915 that the caller cannot determine whether the guest operating system
7916 has queried or made use of the credentials.
7917
7918 <result name="VBOX_E_VM_ERROR">
7919 VMM device is not available.
7920 </result>
7921
7922 </desc>
7923 <param name="userName" type="wstring" dir="in">
7924 <desc>User name string, can be empty</desc>
7925 </param>
7926 <param name="password" type="wstring" dir="in">
7927 <desc>Password string, can be empty</desc>
7928 </param>
7929 <param name="domain" type="wstring" dir="in">
7930 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7931 </param>
7932 <param name="allowInteractiveLogon" type="boolean" dir="in">
7933 <desc>
7934 Flag whether the guest should alternatively allow the user to
7935 interactively specify different credentials. This flag might
7936 not be supported by all versions of the Additions.
7937 </desc>
7938 </param>
7939 </method>
7940
7941 <method name="executeProcess">
7942 <desc>
7943 Executes an existing program inside the guest VM.
7944
7945 <result name="VBOX_E_IPRT_ERROR">
7946 Could not execute process.
7947 </result>
7948
7949 </desc>
7950 <param name="execName" type="wstring" dir="in">
7951 <desc>
7952 Full path name of the command to execute on the guest; the
7953 commands has to exists in the guest VM in order to be executed.
7954 </desc>
7955 </param>
7956 <param name="flags" type="unsigned long" dir="in">
7957 <desc>
7958 Execution flags - currently not supported and therefore
7959 has to be set to 0.
7960 </desc>
7961 </param>
7962 <param name="arguments" type="wstring" safearray="yes" dir="in">
7963 <desc>
7964 Array of arguments passed to the execution command.
7965 </desc>
7966 </param>
7967 <param name="environment" type="wstring" safearray="yes" dir="in">
7968 <desc>
7969 Environment variables that can be set while the command is being
7970 executed, in form of "NAME=VALUE"; one pair per entry. To unset a
7971 variable just set its name ("NAME") without a value.
7972 </desc>
7973 </param>
7974 <param name="userName" type="wstring" dir="in">
7975 <desc>
7976 User name under which the command will be executed; has to exist
7977 and have the appropriate rights to execute programs in the VM.
7978 </desc>
7979 </param>
7980 <param name="password" type="wstring" dir="in">
7981 <desc>
7982 Password of the user account specified.
7983 </desc>
7984 </param>
7985 <param name="timeoutMS" type="unsigned long" dir="in">
7986 <desc>
7987 The maximum timeout value (in msec) to wait for finished program
7988 execution. Pass 0 for an infinite timeout.
7989 </desc>
7990 </param>
7991 <param name="pid" type="unsigned long" dir="out">
7992 <desc>
7993 The PID (process ID) of the started command for later reference.
7994 </desc>
7995 </param>
7996 <param name="progress" type="IProgress" dir="return">
7997 <desc>Progress object to track the operation completion.</desc>
7998 </param>
7999 </method>
8000
8001 <method name="getProcessOutput">
8002 <desc>
8003 Retrieves output of a formerly started process.
8004
8005 <result name="VBOX_E_IPRT_ERROR">
8006 Could not retrieve output.
8007 </result>
8008
8009 </desc>
8010 <param name="pid" type="unsigned long" dir="in">
8011 <desc>
8012 Process id returned by earlier executeProcess() call.
8013 </desc>
8014 </param>
8015 <param name="flags" type="unsigned long" dir="in">
8016 <desc>
8017 Flags describing which output to retrieve.
8018 </desc>
8019 </param>
8020 <param name="timeoutMS" type="unsigned long" dir="in">
8021 <desc>
8022 The maximum timeout value (in msec) to wait for output
8023 data. Pass 0 for an infinite timeout.
8024 </desc>
8025 </param>
8026 <param name="size" type="unsigned long long" dir="in">
8027 <desc>
8028 Size in bytes to read in the buffer.
8029 </desc>
8030 </param>
8031 <param name="data" type="octet" dir="return" safearray="yes">
8032 <desc>
8033 Buffer for retrieving the actual output. A data size of 0 means end of file
8034 if the requested size was not 0. This is the unprocessed
8035 output data, i.e. the line ending style depends on the platform of
8036 the system the server is running on.
8037 </desc>
8038 </param>
8039 </method>
8040
8041 <method name="getProcessStatus">
8042 <desc>
8043 Retrieves status, exit code and the exit reason of a formerly started process.
8044
8045 <result name="VBOX_E_IPRT_ERROR">
8046 Process with specified PID was not found.
8047 </result>
8048
8049 </desc>
8050 <param name="pid" type="unsigned long" dir="in">
8051 <desc>
8052 Process id returned by earlier executeProcess() call.
8053 </desc>
8054 </param>
8055 <param name="exitcode" type="unsigned long" dir="out">
8056 <desc>
8057 The exit code (if available).
8058 </desc>
8059 </param>
8060 <param name="flags" type="unsigned long" dir="out">
8061 <desc>
8062 Additional flags of process status (not used at the moment).
8063 </desc>
8064 </param>
8065 <param name="reason" type="unsigned long" dir="return">
8066 <desc>
8067 The current process status.
8068 </desc>
8069 </param>
8070 </method>
8071
8072 </interface>
8073
8074
8075 <!--
8076 // IProgress
8077 /////////////////////////////////////////////////////////////////////////
8078 -->
8079
8080 <interface
8081 name="IProgress" extends="$unknown"
8082 uuid="856aa038-853f-42e2-acf7-6e7b02dbe294"
8083 wsmap="managed"
8084 >
8085 <desc>
8086 The IProgress interface is used to track and control
8087 asynchronous tasks within VirtualBox.
8088
8089 An instance of this is returned every time VirtualBox starts
8090 an asynchronous task (in other words, a separate thread) which
8091 continues to run after a method call returns. For example,
8092 <link to="IConsole::saveState" />, which saves the state of
8093 a running virtual machine, can take a long time to complete.
8094 To be able to display a progress bar, a user interface such as
8095 the VirtualBox graphical user interface can use the IProgress
8096 object returned by that method.
8097
8098 Note that IProgress is a "read-only" interface in the sense
8099 that only the VirtualBox internals behind the Main API can
8100 create and manipulate progress objects, whereas client code
8101 can only use the IProgress object to monitor a task's
8102 progress and, if <link to="#cancelable" /> is @c true,
8103 cancel the task by calling <link to="#cancel" />.
8104
8105 A task represented by IProgress consists of either one or
8106 several sub-operations that run sequentially, one by one (see
8107 <link to="#operation" /> and <link to="#operationCount" />).
8108 Every operation is identified by a number (starting from 0)
8109 and has a separate description.
8110
8111 You can find the individual percentage of completion of the current
8112 operation in <link to="#operationPercent" /> and the
8113 percentage of completion of the task as a whole
8114 in <link to="#percent" />.
8115
8116 Similarly, you can wait for the completion of a particular
8117 operation via <link to="#waitForOperationCompletion" /> or
8118 for the completion of the whole task via
8119 <link to="#waitForCompletion" />.
8120 </desc>
8121
8122 <attribute name="id" type="uuid" mod="string" readonly="yes">
8123 <desc>ID of the task.</desc>
8124 </attribute>
8125
8126 <attribute name="description" type="wstring" readonly="yes">
8127 <desc>Description of the task.</desc>
8128 </attribute>
8129
8130 <attribute name="initiator" type="$unknown" readonly="yes">
8131 <desc>Initiator of the task.</desc>
8132 </attribute>
8133
8134 <attribute name="cancelable" type="boolean" readonly="yes">
8135 <desc>Whether the task can be interrupted.</desc>
8136 </attribute>
8137
8138 <attribute name="percent" type="unsigned long" readonly="yes">
8139 <desc>
8140 Current progress value of the task as a whole, in percent.
8141 This value depends on how many operations are already complete.
8142 Returns 100 if <link to="#completed" /> is @c true.
8143 </desc>
8144 </attribute>
8145
8146 <attribute name="timeRemaining" type="long" readonly="yes">
8147 <desc>
8148 Estimated remaining time until the task completes, in
8149 seconds. Returns 0 once the task has completed; returns -1
8150 if the remaining time cannot be computed, in particular if
8151 the current progress is 0.
8152
8153 Even if a value is returned, the estimate will be unreliable
8154 for low progress values. It will become more reliable as the
8155 task progresses; it is not recommended to display an ETA
8156 before at least 20% of a task have completed.
8157 </desc>
8158 </attribute>
8159
8160 <attribute name="completed" type="boolean" readonly="yes">
8161 <desc>Whether the task has been completed.</desc>
8162 </attribute>
8163
8164 <attribute name="canceled" type="boolean" readonly="yes">
8165 <desc>Whether the task has been canceled.</desc>
8166 </attribute>
8167
8168 <attribute name="resultCode" type="long" readonly="yes">
8169 <desc>
8170 Result code of the progress task.
8171 Valid only if <link to="#completed"/> is @c true.
8172 </desc>
8173 </attribute>
8174
8175 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
8176 <desc>
8177 Extended information about the unsuccessful result of the
8178 progress operation. May be @c null if no extended information
8179 is available.
8180 Valid only if <link to="#completed"/> is @c true and
8181 <link to="#resultCode"/> indicates a failure.
8182 </desc>
8183 </attribute>
8184
8185 <attribute name="operationCount" type="unsigned long" readonly="yes">
8186 <desc>
8187 Number of sub-operations this task is divided into.
8188 Every task consists of at least one suboperation.
8189 </desc>
8190 </attribute>
8191
8192 <attribute name="operation" type="unsigned long" readonly="yes">
8193 <desc>Number of the sub-operation being currently executed.</desc>
8194 </attribute>
8195
8196 <attribute name="operationDescription" type="wstring" readonly="yes">
8197 <desc>
8198 Description of the sub-operation being currently executed.
8199 </desc>
8200 </attribute>
8201
8202 <attribute name="operationPercent" type="unsigned long" readonly="yes">
8203 <desc>Progress value of the current sub-operation only, in percent.</desc>
8204 </attribute>
8205
8206 <attribute name="timeout" type="unsigned long">
8207 <desc>
8208 When non-zero, this specifies the number of milliseconds after which
8209 the operation will automatically be canceled. This can only be set on
8210 cancelable objects.
8211 </desc>
8212 </attribute>
8213
8214 <method name="setCurrentOperationProgress">
8215 <desc>Internal method, not to be called externally.</desc>
8216 <param name="percent" type="unsigned long" dir="in" />
8217 </method>
8218 <method name="setNextOperation">
8219 <desc>Internal method, not to be called externally.</desc>
8220 <param name="nextOperationDescription" type="wstring" dir="in" />
8221 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8222 </method>
8223
8224 <method name="waitForCompletion">
8225 <desc>
8226 Waits until the task is done (including all sub-operations)
8227 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8228
8229 Note that the VirtualBox/XPCOM/COM/native event queues of the calling
8230 thread are not processed while waiting. Neglecting event queues may
8231 have dire consequences (degrade performance, resource hogs,
8232 deadlocks, etc.), this is specially so for the main thread on
8233 platforms using XPCOM. Callers are adviced wait for short periods
8234 and service their event queues between calls, or to create a worker
8235 thread to do the waiting.
8236
8237 <result name="VBOX_E_IPRT_ERROR">
8238 Failed to wait for task completion.
8239 </result>
8240 </desc>
8241
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="waitForOperationCompletion">
8250 <desc>
8251 Waits until the given operation is done with a given timeout in
8252 milliseconds; specify -1 for an indefinite wait.
8253
8254 See <link to="#waitForCompletion"> for event queue considerations.</link>
8255
8256 <result name="VBOX_E_IPRT_ERROR">
8257 Failed to wait for operation completion.
8258 </result>
8259
8260 </desc>
8261 <param name="operation" type="unsigned long" dir="in">
8262 <desc>
8263 Number of the operation to wait for.
8264 Must be less than <link to="#operationCount"/>.
8265 </desc>
8266 </param>
8267 <param name="timeout" type="long" dir="in">
8268 <desc>
8269 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8270 </desc>
8271 </param>
8272 </method>
8273
8274 <method name="cancel">
8275 <desc>
8276 Cancels the task.
8277 <note>
8278 If <link to="#cancelable"/> is @c false, then this method will fail.
8279 </note>
8280
8281 <result name="VBOX_E_INVALID_OBJECT_STATE">
8282 Operation cannot be canceled.
8283 </result>
8284
8285 </desc>
8286 </method>
8287
8288 </interface>
8289
8290 <!--
8291 // ISnapshot
8292 /////////////////////////////////////////////////////////////////////////
8293 -->
8294
8295 <interface
8296 name="ISnapshot" extends="$unknown"
8297 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8298 wsmap="managed"
8299 >
8300 <desc>
8301 The ISnapshot interface represents a snapshot of the virtual
8302 machine.
8303
8304 Together with the differencing media that are created
8305 when a snapshot is taken, a machine can be brought back to
8306 the exact state it was in when the snapshot was taken.
8307
8308 The ISnapshot interface has no methods, only attributes; snapshots
8309 are controlled through methods of the <link to="IConsole" /> interface
8310 which also manage the media associated with the snapshot.
8311 The following operations exist:
8312
8313 <ul>
8314 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8315 by creating new, empty differencing images for the machine's
8316 media and saving the VM settings and (if the VM is running)
8317 the current VM state in the snapshot.
8318
8319 The differencing images will then receive all data written to
8320 the machine's media, while their parent (base) images
8321 remain unmodified after the snapshot has been taken (see
8322 <link to="IMedium" /> for details about differencing images).
8323 This simplifies restoring a machine to the state of a snapshot:
8324 only the differencing images need to be deleted.
8325
8326 The current machine state is not changed by taking a snapshot.
8327 If the machine is running, it will resume execution after the
8328 snapshot has been taken.
8329 </li>
8330
8331 <li><link to="IConsole::restoreSnapshot"/>: this goes back to
8332 a previous snapshot. This resets the machine's state to that of
8333 the previous snapshot by deleting the differencing image of each
8334 of the machine's media and setting the machine's settings
8335 and state to the state that was saved in the snapshot (if any).
8336
8337 This destroys the machine's current state.
8338 </li>
8339
8340 <li><link to="IConsole::deleteSnapshot"/>: deletes a snapshot
8341 without affecting the current machine state.
8342
8343 This does not change the machine, but instead frees the resources
8344 allocated when the snapshot was taken: the settings and machine state
8345 is deleted (if any), and the snapshot's differencing image for each
8346 of the machine's media gets merged with its parent image.
8347
8348 Neither the current machine state nor other snapshots are affected
8349 by this operation, except that parent media will be modified
8350 to contain the disk data associated with the snapshot being deleted.
8351 </li>
8352 </ul>
8353
8354 Each snapshot contains the settings of the virtual machine (hardware
8355 configuration etc.). In addition, if the machine was running when the
8356 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8357 the current VM state is saved in the snapshot (similarly to what happens
8358 when a VM's state is saved). The snapshot is then said to
8359 be <i>online</i> because when restoring it, the VM will be running.
8360
8361 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8362 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8363
8364 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8365 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8366 it then contains a so-called "zero execution state", representing a
8367 machine that is powered off.
8368
8369 <h3>Snapshot branches and the "current" snapshot</h3>
8370
8371 Snapshots can be chained, whereby every next snapshot is based on the
8372 previous one. This chaining is related to medium branching
8373 (see the <link to="IMedium"/> description) in that every time
8374 a new snapshot is created, a new differencing medium is implicitly
8375 created for all normal media attached to the machine.
8376
8377 Each virtual machine has a "current snapshot", identified by
8378 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8379 to the last snapshot in the chain. In a future version of VirtualBox,
8380 it will be possible to reset a machine's current state to that of an
8381 earlier snapshot without deleting the current state so that it will be
8382 possible to create alternative snapshot paths in a snapshot tree.
8383
8384 In the current implementation, multiple snapshot branches within one
8385 virtual machine are not allowed. Every machine has a single branch,
8386 and <link to="IConsole::takeSnapshot"/> operation adds a new
8387 snapshot to the top of that branch.
8388 </desc>
8389
8390 <attribute name="id" type="uuid" mod="string" readonly="yes">
8391 <desc>UUID of the snapshot.</desc>
8392 </attribute>
8393
8394 <attribute name="name" type="wstring">
8395 <desc>Short name of the snapshot.</desc>
8396 </attribute>
8397
8398 <attribute name="description" type="wstring">
8399 <desc>Optional description of the snapshot.</desc>
8400 </attribute>
8401
8402 <attribute name="timeStamp" type="long long" readonly="yes">
8403 <desc>
8404 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8405 </desc>
8406 </attribute>
8407
8408 <attribute name="online" type="boolean" readonly="yes">
8409 <desc>
8410 @c true if this snapshot is an online snapshot and @c false otherwise.
8411
8412 When this attribute is @c true, the
8413 <link to="IMachine::stateFilePath"/> attribute of the
8414 <link to="#machine"/> object associated with this snapshot
8415 will point to the saved state file. Otherwise, it will be
8416 an empty string.
8417 </desc>
8418 </attribute>
8419
8420 <attribute name="machine" type="IMachine" readonly="yes">
8421 <desc>
8422 Virtual machine this snapshot is taken on. This object
8423 stores all settings the machine had when taking this snapshot.
8424 <note>
8425 The returned machine object is immutable, i.e. no
8426 any settings can be changed.
8427 </note>
8428 </desc>
8429 </attribute>
8430
8431 <attribute name="parent" type="ISnapshot" readonly="yes">
8432 <desc>
8433 Parent snapshot (a snapshot this one is based on), or
8434 @c null if the snapshot has no parent (i.e. is the first snapshot).
8435 </desc>
8436 </attribute>
8437
8438 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8439 <desc>
8440 Child snapshots (all snapshots having this one as a parent).
8441 </desc>
8442 </attribute>
8443
8444 </interface>
8445
8446
8447 <!--
8448 // IMedium
8449 /////////////////////////////////////////////////////////////////////////
8450 -->
8451
8452 <enum
8453 name="MediumState"
8454 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8455 >
8456 <desc>
8457 Virtual medium state.
8458 <see>IMedium</see>
8459 </desc>
8460
8461 <const name="NotCreated" value="0">
8462 <desc>
8463 Associated medium storage does not exist (either was not created yet or
8464 was deleted).
8465 </desc>
8466 </const>
8467 <const name="Created" value="1">
8468 <desc>
8469 Associated storage exists and accessible; this gets set if the
8470 accessibility check performed by <link to="IMedium::refreshState" />
8471 was successful.
8472 </desc>
8473 </const>
8474 <const name="LockedRead" value="2">
8475 <desc>
8476 Medium is locked for reading (see <link to="IMedium::lockRead"/>),
8477 no data modification is possible.
8478 </desc>
8479 </const>
8480 <const name="LockedWrite" value="3">
8481 <desc>
8482 Medium is locked for writing (see <link to="IMedium::lockWrite"/>),
8483 no concurrent data reading or modification is possible.
8484 </desc>
8485 </const>
8486 <const name="Inaccessible" value="4">
8487 <desc>
8488 Medium accessiblity check (see <link to="IMedium::refreshState" />) has
8489 not yet been performed, or else, associated medium storage is not
8490 accessible. In the first case, <link to="IMedium::lastAccessError"/>
8491 is empty, in the second case, it describes the error that occured.
8492 </desc>
8493 </const>
8494 <const name="Creating" value="5">
8495 <desc>
8496 Associated medium storage is being created.
8497 </desc>
8498 </const>
8499 <const name="Deleting" value="6">
8500 <desc>
8501 Associated medium storage is being deleted.
8502 </desc>
8503 </const>
8504 </enum>
8505
8506 <enum
8507 name="MediumType"
8508 uuid="46bf1fd4-ad86-4ded-8c49-28bd2d148e5a"
8509 >
8510 <desc>
8511 Virtual medium type.
8512 <see>IMedium</see>
8513 </desc>
8514
8515 <const name="Normal" value="0">
8516 <desc>
8517 Normal medium (attached directly or indirectly, preserved
8518 when taking snapshots).
8519 </desc>
8520 </const>
8521 <const name="Immutable" value="1">
8522 <desc>
8523 Immutable medium (attached indirectly, changes are wiped out
8524 the next time the virtual machine is started).
8525 </desc>
8526 </const>
8527 <const name="Writethrough" value="2">
8528 <desc>
8529 Write through medium (attached directly, ignored when
8530 taking snapshots).
8531 </desc>
8532 </const>
8533 <const name="Shareable" value="3">
8534 <desc>
8535 Allow using this medium concurrently by several machines.
8536 <note>Present since VirtualBox 3.2.0, and accepted since 3.2.8.</note>
8537 </desc>
8538 </const>
8539 </enum>
8540
8541 <enum
8542 name="MediumVariant"
8543 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8544 >
8545 <desc>
8546 Virtual medium image variant. More than one flag may be set.
8547 <see>IMedium</see>
8548 </desc>
8549
8550 <const name="Standard" value="0">
8551 <desc>
8552 No particular variant requested, results in using the backend default.
8553 </desc>
8554 </const>
8555 <const name="VmdkSplit2G" value="0x01">
8556 <desc>
8557 VMDK image split in chunks of less than 2GByte.
8558 </desc>
8559 </const>
8560 <const name="VmdkStreamOptimized" value="0x04">
8561 <desc>
8562 VMDK streamOptimized image. Special import/export format which is
8563 read-only/append-only.
8564 </desc>
8565 </const>
8566 <const name="VmdkESX" value="0x08">
8567 <desc>
8568 VMDK format variant used on ESX products.
8569 </desc>
8570 </const>
8571 <const name="Fixed" value="0x10000">
8572 <desc>
8573 Fixed image. Only allowed for base images.
8574 </desc>
8575 </const>
8576 <const name="Diff" value="0x20000">
8577 <desc>
8578 Differencing image. Only allowed for child images.
8579 </desc>
8580 </const>
8581 </enum>
8582
8583 <interface
8584 name="IMediumAttachment" extends="$unknown"
8585 uuid="c29452cc-ca72-404b-9261-cfc514f1e412"
8586 wsmap="struct"
8587 >
8588 <desc>
8589 The IMediumAttachment interface links storage media to virtual machines.
8590 For each medium (<link to="IMedium"/>) which has been attached to a
8591 storage controller (<link to="IStorageController"/>) of a machine
8592 (<link to="IMachine"/>) via the <link to="IMachine::attachDevice" />
8593 method, one instance of IMediumAttachment is added to the machine's
8594 <link to="IMachine::mediumAttachments"/> array attribute.
8595
8596 Each medium attachment specifies the storage controller as well as a
8597 port and device number and the IMedium instance representing a virtual
8598 hard disk or floppy or DVD image.
8599
8600 For removeable media (DVDs or floppies), there are two additional
8601 options. For one, the IMedium instance can be @c null to represent
8602 an empty drive with no media inserted (see <link to="IMachine::mountMedium" />);
8603 secondly, the medium can be one of the pseudo-media for host drives
8604 listed in <link to="IHost::DVDDrives"/> or <link to="IHost::floppyDrives"/>.
8605 </desc>
8606
8607 <attribute name="medium" type="IMedium" readonly="yes">
8608 <desc>Medium object associated with this attachment; it
8609 can be @c null for removable devices.</desc>
8610 </attribute>
8611
8612 <attribute name="controller" type="wstring" readonly="yes">
8613 <desc>Name of the storage controller of this attachment; this
8614 refers to one of the controllers in <link to="IMachine::storageControllers" />
8615 by name.</desc>
8616 </attribute>
8617
8618 <attribute name="port" type="long" readonly="yes">
8619 <desc>Port number of this attachment.
8620 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8621 </desc>
8622 </attribute>
8623
8624 <attribute name="device" type="long" readonly="yes">
8625 <desc>Device slot number of this attachment.
8626 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8627 </desc>
8628 </attribute>
8629
8630 <attribute name="type" type="DeviceType" readonly="yes">
8631 <desc>Device type of this attachment.</desc>
8632 </attribute>
8633
8634 <attribute name="passthrough" type="boolean" readonly="yes">
8635 <desc>Pass I/O requests through to a device on the host.</desc>
8636 </attribute>
8637
8638 <attribute name="bandwidthLimit" type="unsigned long">
8639 <desc>
8640 Maximum throughput allowed for this medium attachment, in units of 1 mbps.
8641 A zero value means uncapped/unlimited.
8642 </desc>
8643 </attribute>
8644
8645 </interface>
8646
8647 <interface
8648 name="IMedium" extends="$unknown"
8649 uuid="858ea9d3-9ade-4aa7-91b7-d8a40f8f9b16"
8650 wsmap="managed"
8651 >
8652 <desc>
8653 The IMedium interface represents virtual storage for a machine's
8654 hard disks, CD/DVD or floppy drives. It will typically represent
8655 a disk image on the host, for example a VDI or VMDK file representing
8656 a virtual hard disk, or an ISO or RAW file representing virtual
8657 removable media, but can also point to a network location (e.g.
8658 for iSCSI targets).
8659
8660 Instances of IMedium are connected to virtual machines by way of
8661 medium attachments (see <link to="IMediumAttachment" />), which link
8662 the storage medium to a particular device slot of a storage controller
8663 of the virtual machine.
8664 In the VirtualBox API, virtual storage is therefore always represented
8665 by the following chain of object links:
8666
8667 <ul>
8668 <li><link to="IMachine::storageControllers"/> contains an array of
8669 storage controllers (IDE, SATA, SCSI, SAS or a floppy controller;
8670 these are instances of <link to="IStorageController"/>).</li>
8671 <li><link to="IMachine::mediumAttachments"/> contains an array of
8672 medium attachments (instances of <link to="IMediumAttachment"/>),
8673 each containing a storage controller from the above array, a
8674 port/device specification, and an instance of IMedium representing
8675 the medium storage (image file).
8676
8677 For removable media, the storage medium is optional; a medium
8678 attachment with no medium represents a CD/DVD or floppy drive
8679 with no medium inserted. By contrast, hard disk attachments
8680 will always have an IMedium object attached.</li>
8681 <li>Each IMedium in turn points to a storage unit (such as a file
8682 on the host computer or a network resource) that holds actual
8683 data. This location is represented by the <link to="#location"/>
8684 attribute.</li>
8685 </ul>
8686
8687 Existing media are opened using the following methods, depending on the
8688 media type:
8689 <ul>
8690 <li><link to="IVirtualBox::openHardDisk"/></li>
8691 <li><link to="IVirtualBox::openDVDImage"/></li>
8692 <li><link to="IVirtualBox::openFloppyImage"/></li>
8693 </ul>
8694
8695 New hard disk media can be created with the VirtualBox API using the
8696 <link to="IVirtualBox::createHardDisk"/> method.
8697
8698 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8699 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8700 type in a regular file.
8701
8702 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8703 drive; in that case the <link to="#id" /> attribute contains the UUID of
8704 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8705
8706 <h3>Known media</h3>
8707
8708 When an existing medium is opened for the first time, it is automatically
8709 remembered by the given VirtualBox installation or, in other words, becomes
8710 a <i>known medium</i>. Known media are stored in the media
8711 registry transparently maintained by VirtualBox and stored in settings
8712 files so that this registry is preserved when VirtualBox is not running.
8713
8714 Newly created virtual media are remembered only when the associated
8715 storage unit is actually created.
8716
8717 All known media can be enumerated using
8718 <link to="IVirtualBox::hardDisks"/>,
8719 <link to="IVirtualBox::DVDImages"/> and
8720 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8721 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8722 and similar methods or by location using
8723 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8724
8725 Only known media can be attached to virtual machines.
8726
8727 Removing known media from the media registry is performed when the given
8728 medium is closed using the <link to="#close"/> method or when its
8729 associated storage unit is deleted.
8730
8731 <h3>Accessibility checks</h3>
8732
8733 VirtualBox defers media accessibility checks until the <link to="#refreshState" />
8734 method is called explicitly on a medium. This is done to make the VirtualBox object
8735 ready for serving requests as fast as possible and let the end-user
8736 application decide if it needs to check media accessibility right away or not.
8737
8738 As a result, when VirtualBox starts up (e.g. the VirtualBox
8739 object gets created for the first time), all known media are in the
8740 "Inaccessible" state, but the value of the <link to="#lastAccessError"/>
8741 attribute is an empty string because no actual accessibility check has
8742 been made yet.
8743
8744 After calling <link to="#refreshState" />, a medium is considered
8745 <i>accessible</i> if its storage unit can be read. In that case, the
8746 <link to="#state"/> attribute has a value of "Created". If the storage
8747 unit cannot be read (for example, because it is located on a disconnected
8748 network resource, or was accidentally deleted outside VirtualBox),
8749 the medium is considered <i>inaccessible</i>, which is indicated by the
8750 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8751 obtained by reading the <link to="#lastAccessError"/> attribute.
8752
8753 <h3>Medium types</h3>
8754
8755 There are four types of medium behavior (see <link to="MediumType" />):
8756 "normal", "immutable", "writethrough" and "shareable", represented by the
8757 <link to="#type"/> attribute. The type of the medium defines how the
8758 medium is attached to a virtual machine and what happens when a
8759 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8760 attached medium is taken. At the moment DVD and floppy media are always
8761 of type "writethrough".
8762
8763 All media can be also divided in two groups: <i>base</i> media and
8764 <i>differencing</i> media. A base medium contains all sectors of the
8765 medium data in its own storage and therefore can be used independently.
8766 In contrast, a differencing mediun is a "delta" to some other medium and
8767 contains only those sectors which differ from that other medium, which is
8768 then called a <i>parent</i>. The differencing medium is said to be
8769 <i>linked to</i> that parent. The parent may be itself a differencing
8770 medium, thus forming a chain of linked media. The last element in that
8771 chain must always be a base medium. Note that several differencing
8772 media may be linked to the same parent medium.
8773
8774 Differencing media can be distinguished from base media by querying the
8775 <link to="#parent"/> attribute: base media do not have parents they would
8776 depend on, so the value of this attribute is always @c null for them.
8777 Using this attribute, it is possible to walk up the medium tree (from the
8778 child medium to its parent). It is also possible to walk down the tree
8779 using the <link to="#children"/> attribute.
8780
8781 Note that the type of all differencing media is "normal"; all other
8782 values are meaningless for them. Base media may be of any type.
8783
8784 <h3>Creating hard disks</h3>
8785
8786 New base hard disks are created using
8787 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8788 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8789 disks are usually implicitly created by VirtualBox when needed but may
8790 also be created explicitly using <link to="#createDiffStorage"/>.
8791
8792 After the hard disk is successfully created (including the storage unit)
8793 or opened, it becomes a known hard disk (remembered in the internal media
8794 registry). Known hard disks can be attached to a virtual machine, accessed
8795 through <link to="IVirtualBox::getHardDisk"/> and
8796 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8797 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8798
8799 The following methods, besides <link to="IMedium::close"/>,
8800 automatically remove the hard disk from the media registry:
8801 <ul>
8802 <li><link to="#deleteStorage"/></li>
8803 <li><link to="#mergeTo"/></li>
8804 </ul>
8805
8806 If the storage unit of the hard disk is a regular file in the host's
8807 file system then the rules stated in the description of the
8808 <link to="IMedium::location"/> attribute apply when setting its value. In
8809 addition, a plain file name without any path may be given, in which case
8810 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8811 folder</link> will be prepended to it.
8812
8813 <h4>Automatic composition of the file name part</h4>
8814
8815 Another extension to the <link to="IMedium::location"/> attribute is that
8816 there is a possibility to cause VirtualBox to compose a unique value for
8817 the file name part of the location using the UUID of the hard disk. This
8818 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
8819 e.g. before the storage unit is created, and works as follows. You set the
8820 value of the <link to="IMedium::location"/> attribute to a location
8821 specification which only contains the path specification but not the file
8822 name part and ends with either a forward slash or a backslash character.
8823 In response, VirtualBox will generate a new UUID for the hard disk and
8824 compose the file name using the following pattern:
8825 <pre>
8826 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8827 </pre>
8828 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8829 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8830 is the default extension for the storage format of this hard disk. After
8831 that, you may call any of the methods that create a new hard disk storage
8832 unit and they will use the generated UUID and file name.
8833
8834 <h3>Attaching Hard Disks</h3>
8835
8836 Hard disks are attached to virtual machines using the
8837 <link to="IMachine::attachDevice"/> method and detached using the
8838 <link to="IMachine::detachDevice"/> method. Depending on their
8839 <link to="#type"/>, hard disks are attached either
8840 <i>directly</i> or <i>indirectly</i>.
8841
8842 When a hard disk is being attached directly, it is associated with the
8843 virtual machine and used for hard disk operations when the machine is
8844 running. When a hard disk is being attached indirectly, a new differencing
8845 hard disk linked to it is implicitly created and this differencing hard
8846 disk is associated with the machine and used for hard disk operations.
8847 This also means that if <link to="IMachine::attachDevice"/> performs
8848 a direct attachment then the same hard disk will be returned in response
8849 to the subsequent <link to="IMachine::getMedium"/> call; however if
8850 an indirect attachment is performed then
8851 <link to="IMachine::getMedium"/> will return the implicitly created
8852 differencing hard disk, not the original one passed to <link
8853 to="IMachine::attachDevice"/>. In detail:
8854
8855 <ul>
8856 <li><b>Normal base</b> hard disks that do not have children (i.e.
8857 differencing hard disks linked to them) and that are not already
8858 attached to virtual machines in snapshots are attached <b>directly</b>.
8859 Otherwise, they are attached <b>indirectly</b> because having
8860 dependent children or being part of the snapshot makes it impossible
8861 to modify hard disk contents without breaking the integrity of the
8862 dependent party. The <link to="#readOnly"/> attribute allows to
8863 quickly determine the kind of the attachment for the given hard
8864 disk. Note that if a normal base hard disk is to be indirectly
8865 attached to a virtual machine with snapshots then a special
8866 procedure called <i>smart attachment</i> is performed (see below).</li>
8867 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
8868 they are attached <b>directly</b> if they do not have children and are
8869 not attached to virtual machines in snapshots, and <b>indirectly</b>
8870 otherwise. Note that the smart attachment procedure is never performed
8871 for differencing hard disks.</li>
8872 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
8873 they are designed to be non-writable. If an immutable hard disk is
8874 attached to a virtual machine with snapshots then a special
8875 procedure called smart attachment is performed (see below).</li>
8876 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
8877 also as designed. This also means that writethrough hard disks cannot
8878 have other hard disks linked to them at all.</li>
8879 <li><b>Shareable</b> hard disks are always attached <b>directly</b>,
8880 also as designed. This also means that shareable hard disks cannot
8881 have other hard disks linked to them at all. They behave almost
8882 like writethrough hard disks, except that shareable hard disks can
8883 be attached to several virtual machines which are running, allowing
8884 concurrent accesses. You need special cluster software running in
8885 the virtual machines to make use of such disks.</li>
8886 </ul>
8887
8888 Note that the same hard disk, regardless of its type, may be attached to
8889 more than one virtual machine at a time. In this case, the machine that is
8890 started first gains exclusive access to the hard disk and attempts to
8891 start other machines having this hard disk attached will fail until the
8892 first machine is powered down.
8893
8894 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8895 that the given hard disk remains associated with the given machine after a
8896 successful <link to="IMachine::detachDevice"/> call until
8897 <link to="IMachine::saveSettings"/> is called to save all changes to
8898 machine settings to disk. This deferring is necessary to guarantee that
8899 the hard disk configuration may be restored at any time by a call to
8900 <link to="IMachine::discardSettings"/> before the settings
8901 are saved (committed).
8902
8903 Note that if <link to="IMachine::discardSettings"/> is called after
8904 indirectly attaching some hard disks to the machine but before a call to
8905 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8906 all differencing hard disks implicitly created by
8907 <link to="IMachine::attachDevice"/> for these indirect attachments.
8908 Such implicitly created hard disks will also be immediately deleted when
8909 detached explicitly using the <link to="IMachine::detachDevice"/>
8910 call if it is made before <link to="IMachine::saveSettings"/>. This
8911 implicit deletion is safe because newly created differencing hard
8912 disks do not contain any user data.
8913
8914 However, keep in mind that detaching differencing hard disks that were
8915 implicitly created by <link to="IMachine::attachDevice"/>
8916 before the last <link to="IMachine::saveSettings"/> call will
8917 <b>not</b> implicitly delete them as they may already contain some data
8918 (for example, as a result of virtual machine execution). If these hard
8919 disks are no more necessary, the caller can always delete them explicitly
8920 using <link to="#deleteStorage"/> after they are actually de-associated
8921 from this machine by the <link to="IMachine::saveSettings"/> call.
8922
8923 <h3>Smart Attachment</h3>
8924
8925 When normal base or immutable hard disks are indirectly attached to a
8926 virtual machine then some additional steps are performed to make sure the
8927 virtual machine will have the most recent "view" of the hard disk being
8928 attached. These steps include walking through the machine's snapshots
8929 starting from the current one and going through ancestors up to the first
8930 snapshot. Hard disks attached to the virtual machine in all
8931 of the encountered snapshots are checked whether they are descendants of
8932 the given normal base or immutable hard disk. The first found child (which
8933 is the differencing hard disk) will be used instead of the normal base or
8934 immutable hard disk as a parent for creating a new differencing hard disk
8935 that will be actually attached to the machine. And only if no descendants
8936 are found or if the virtual machine does not have any snapshots then the
8937 normal base or immutable hard disk will be used itself as a parent for
8938 this differencing hard disk.
8939
8940 It is easier to explain what smart attachment does using the
8941 following example:
8942 <pre>
8943BEFORE attaching B.vdi: AFTER attaching B.vdi:
8944
8945Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8946 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8947 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8948 Snapshot 4 (none) Snapshot 4 (none)
8949 CurState (none) CurState (D3->D2.vdi)
8950
8951 NOT
8952 ...
8953 CurState (D3->B.vdi)
8954 </pre>
8955 The first column is the virtual machine configuration before the base hard
8956 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8957 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8958 mean that the hard disk that is actually attached to the machine is a
8959 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8960 another hard disk, <tt>B.vdi</tt>.
8961
8962 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8963 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8964 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8965 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8966 it cannot be attached directly and needs an indirect attachment (i.e.
8967 implicit creation of a new differencing hard disk). Due to the smart
8968 attachment procedure, the new differencing hard disk
8969 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8970 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8971 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8972 machine.
8973
8974 Note that if there is more than one descendant hard disk of the given base
8975 hard disk found in a snapshot, and there is an exact device, channel and
8976 bus match, then this exact match will be used. Otherwise, the youngest
8977 descendant will be picked up.
8978
8979 There is one more important aspect of the smart attachment procedure which
8980 is not related to snapshots at all. Before walking through the snapshots
8981 as described above, the backup copy of the current list of hard disk
8982 attachment is searched for descendants. This backup copy is created when
8983 the hard disk configuration is changed for the first time after the last
8984 <link to="IMachine::saveSettings"/> call and used by
8985 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8986 changes. When such a descendant is found in this backup copy, it will be
8987 simply re-attached back, without creating a new differencing hard disk for
8988 it. This optimization is necessary to make it possible to re-attach the
8989 base or immutable hard disk to a different bus, channel or device slot
8990 without losing the contents of the differencing hard disk actually
8991 attached to the machine in place of it.
8992 </desc>
8993
8994 <attribute name="id" type="uuid" mod="string" readonly="yes">
8995 <desc>
8996 UUID of the medium. For a newly created medium, this value is a randomly
8997 generated UUID.
8998
8999 <note>
9000 For media in one of MediumState_NotCreated, MediumState_Creating or
9001 MediumState_Deleting states, the value of this property is undefined
9002 and will most likely be an empty UUID.
9003 </note>
9004 </desc>
9005 </attribute>
9006
9007 <attribute name="description" type="wstring">
9008 <desc>
9009 Optional description of the medium. For a newly created medium the value
9010 of this attribute is an empty string.
9011
9012 Medium types that don't support this attribute will return E_NOTIMPL in
9013 attempt to get or set this attribute's value.
9014
9015 <note>
9016 For some storage types, reading this attribute may return an outdated
9017 (last known) value when <link to="#state"/> is <link
9018 to="MediumState_Inaccessible"/> or <link
9019 to="MediumState_LockedWrite"/> because the value of this attribute is
9020 stored within the storage unit itself. Also note that changing the
9021 attribute value is not possible in such case, as well as when the
9022 medium is the <link to="MediumState_LockedRead"/> state.
9023 </note>
9024 </desc>
9025 </attribute>
9026
9027 <attribute name="state" type="MediumState" readonly="yes">
9028 <desc>
9029 Returns the current medium state, which is the last state set by
9030 the accessibility check performed by <link to="#refreshState"/>.
9031 If that method has not yet been called on the medium, the state
9032 is "Inaccessible"; as opposed to truly inaccessible media, the
9033 value of <link to="#lastAccessError"/> will be an empty string in
9034 that case.
9035
9036 <note>As of version 3.1, this no longer performs an accessibility check
9037 automatically; call <link to="#refreshState"/> for that.
9038 </note>
9039 </desc>
9040 </attribute>
9041
9042 <attribute name="variant" type="MediumVariant" readonly="yes">
9043 <desc>
9044 Returns the storage format variant information for this medium.
9045 Before <link to="#refreshState"/> is called this method returns
9046 an undefined value.
9047 </desc>
9048 </attribute>
9049
9050 <attribute name="location" type="wstring">
9051 <desc>
9052 Location of the storage unit holding medium data.
9053
9054 The format of the location string is medium type specific. For medium
9055 types using regular files in a host's file system, the location
9056 string is the full file name.
9057
9058 Some medium types may support changing the storage unit location by
9059 simply changing the value of this property. If this operation is not
9060 supported, the implementation will return E_NOTIMPL in attempt to set
9061 this attribute's value.
9062
9063 When setting a value of the location attribute which is a regular file
9064 in the host's file system, the given file name may be either relative to
9065 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
9066 absolute. Note that if the given location specification does not contain
9067 the file extension part then a proper default extension will be
9068 automatically appended by the implementation depending on the medium type.
9069 </desc>
9070 </attribute>
9071
9072 <attribute name="name" type="wstring" readonly="yes">
9073 <desc>
9074 Name of the storage unit holding medium data.
9075
9076 The returned string is a short version of the <link to="#location"/>
9077 attribute that is suitable for representing the medium in situations
9078 where the full location specification is too long (such as lists
9079 and comboboxes in GUI frontends). This string is also used by frontends
9080 to sort the media list alphabetically when needed.
9081
9082 For example, for locations that are regular files in the host's file
9083 system, the value of this attribute is just the file name (+ extension),
9084 without the path specification.
9085
9086 Note that as opposed to the <link to="#location"/> attribute, the name
9087 attribute will not necessary be unique for a list of media of the
9088 given type and format.
9089 </desc>
9090 </attribute>
9091
9092 <attribute name="deviceType" type="DeviceType" readonly="yes">
9093 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
9094 medium.</desc>
9095 </attribute>
9096
9097 <attribute name="hostDrive" type="boolean" readonly="yes">
9098 <desc>True if this corresponds to a drive on the host.</desc>
9099 </attribute>
9100
9101 <attribute name="size" type="unsigned long long" readonly="yes">
9102 <desc>
9103 Physical size of the storage unit used to hold medium data (in bytes).
9104
9105 <note>
9106 For media whose <link to="#state"/> is <link
9107 to="MediumState_Inaccessible"/>, the value of this property is the
9108 last known size. For <link to="MediumState_NotCreated"/> media,
9109 the returned value is zero.
9110 </note>
9111 </desc>
9112 </attribute>
9113
9114 <attribute name="format" type="wstring" readonly="yes">
9115 <desc>
9116 Storage format of this medium.
9117
9118 The value of this attribute is a string that specifies a backend used
9119 to store medium data. The storage format is defined when you create a
9120 new medium or automatically detected when you open an existing medium,
9121 and cannot be changed later.
9122
9123 The list of all storage formats supported by this VirtualBox
9124 installation can be obtained using
9125 <link to="ISystemProperties::mediumFormats"/>.
9126 </desc>
9127 </attribute>
9128
9129 <attribute name="mediumFormat" type="IMediumFormat" readonly="yes">
9130 <desc>
9131 Storage medium format object corresponding to this medium.
9132
9133 The value of this attribute is a reference to the medium format object
9134 that specifies the backend properties used to store medium data. The
9135 storage format is defined when you create a new medium or automatically
9136 detected when you open an existing medium, and cannot be changed later.
9137
9138 <note>@c null is returned if there is no associated medium format
9139 object. This can e.g. happen for medium objects representing host
9140 drives and other special medium objects.</note>
9141 </desc>
9142 </attribute>
9143
9144 <attribute name="type" type="MediumType">
9145 <desc>
9146 Type (role) of this medium.
9147
9148 The following constraints apply when changing the value of this
9149 attribute:
9150 <ul>
9151 <li>If a medium is attached to a virtual machine (either in the
9152 current state or in one of the snapshots), its type cannot be
9153 changed.
9154 </li>
9155 <li>As long as the medium has children, its type cannot be set
9156 to <link to="MediumType_Writethrough"/>.
9157 </li>
9158 <li>The type of all differencing media is
9159 <link to="MediumType_Normal"/> and cannot be changed.
9160 </li>
9161 </ul>
9162
9163 The type of a newly created or opened medium is set to
9164 <link to="MediumType_Normal"/>, except for DVD and floppy media,
9165 which have a type of <link to="MediumType_Writethrough"/>.
9166 </desc>
9167 </attribute>
9168
9169 <attribute name="parent" type="IMedium" readonly="yes">
9170 <desc>
9171 Parent of this medium (the medium this medium is directly based
9172 on).
9173
9174 Only differencing media have parents. For base (non-differencing)
9175 media, @c null is returned.
9176 </desc>
9177 </attribute>
9178
9179 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
9180 <desc>
9181 Children of this medium (all differencing media directly based
9182 on this medium). A @c null array is returned if this medium
9183 does not have any children.
9184 </desc>
9185 </attribute>
9186
9187 <attribute name="base" type="IMedium" readonly="yes">
9188 <desc>
9189 Base medium of this medium.
9190
9191 If this is a differencing medium, its base medium is the medium
9192 the given medium branch starts from. For all other types of media, this
9193 property returns the medium object itself (i.e. the same object this
9194 property is read on).
9195 </desc>
9196 </attribute>
9197
9198 <attribute name="readOnly" type="boolean" readonly="yes">
9199 <desc>
9200 Returns @c true if this medium is read-only and @c false otherwise.
9201
9202 A medium is considered to be read-only when its contents cannot be
9203 modified without breaking the integrity of other parties that depend on
9204 this medium such as its child media or snapshots of virtual machines
9205 where this medium is attached to these machines. If there are no
9206 children and no such snapshots then there is no dependency and the
9207 medium is not read-only.
9208
9209 The value of this attribute can be used to determine the kind of the
9210 attachment that will take place when attaching this medium to a
9211 virtual machine. If the value is @c false then the medium will
9212 be attached directly. If the value is @c true then the medium
9213 will be attached indirectly by creating a new differencing child
9214 medium for that. See the interface description for more information.
9215
9216 Note that all <link to="MediumType_Immutable">Immutable</link> media
9217 are always read-only while all
9218 <link to="MediumType_Writethrough">Writethrough</link> media are
9219 always not.
9220
9221 <note>
9222 The read-only condition represented by this attribute is related to
9223 the medium type and usage, not to the current
9224 <link to="IMedium::state">medium state</link> and not to the read-only
9225 state of the storage unit.
9226 </note>
9227 </desc>
9228 </attribute>
9229
9230 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9231 <desc>
9232 Logical size of this medium (in megabytes), as reported to the
9233 guest OS running inside the virtual machine this medium is
9234 attached to. The logical size is defined when the medium is created
9235 and cannot be changed later.
9236
9237 <note>
9238 Reading this property on a differencing medium will return the size
9239 of its <link to="#base"/> medium.
9240 </note>
9241 <note>
9242 For media whose state is <link to="#state"/> is <link
9243 to="MediumState_Inaccessible"/>, the value of this property is the
9244 last known logical size. For <link to="MediumState_NotCreated"/>
9245 media, the returned value is zero.
9246 </note>
9247 </desc>
9248 </attribute>
9249
9250 <attribute name="autoReset" type="boolean">
9251 <desc>
9252 Whether this differencing medium will be automatically reset each
9253 time a virtual machine it is attached to is powered up. This
9254 attribute is automatically set to @c true for the last
9255 differencing image of an "immutable" medium (see
9256 <link to="MediumType" />).
9257
9258 See <link to="#reset"/> for more information about resetting
9259 differencing media.
9260
9261 <note>
9262 Reading this property on a base (non-differencing) medium will
9263 always @c false. Changing the value of this property in this
9264 case is not supported.
9265 </note>
9266
9267 <result name="VBOX_E_NOT_SUPPORTED">
9268 This is not a differencing medium (when changing the attribute
9269 value).
9270 </result>
9271 </desc>
9272 </attribute>
9273
9274 <attribute name="lastAccessError" type="wstring" readonly="yes">
9275 <desc>
9276 Text message that represents the result of the last accessibility
9277 check performed by <link to="#refreshState"/>.
9278
9279 An empty string is returned if the last accessibility check
9280 was successful or has not yet been called. As a result, if
9281 <link to="#state" /> is "Inaccessible" and this attribute is empty,
9282 then <link to="#refreshState"/> has yet to be called; this is the
9283 default value of media after VirtualBox initialization.
9284 A non-empty string indicates a failure and should normally describe
9285 a reason of the failure (for example, a file read error).
9286 </desc>
9287 </attribute>
9288
9289 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9290 <desc>
9291 Array of UUIDs of all machines this medium is attached to.
9292
9293 A @c null array is returned if this medium is not attached to any
9294 machine or to any machine's snapshot.
9295
9296 <note>
9297 The returned array will include a machine even if this medium is not
9298 attached to that machine in the current state but attached to it in
9299 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9300 details.
9301 </note>
9302 </desc>
9303 </attribute>
9304
9305 <method name="refreshState">
9306 <desc>
9307 If the current medium state (see <link to="MediumState"/>) is one of
9308 "Created", "Inaccessible" or "LockedRead", then this performs an
9309 accessibility check on the medium and sets the value of the <link to="#state"/>
9310 attribute accordingly; that value is also returned for convenience.
9311
9312 For all other state values, this does not perform a refresh but returns
9313 the state only.
9314
9315 The refresh, if performed, may take a long time (several seconds or even
9316 minutes, depending on the storage unit location and format) because it performs an
9317 accessibility check of the storage unit. This check may cause a significant
9318 delay if the storage unit of the given medium is, for example, a file located
9319 on a network share which is not currently accessible due to connectivity
9320 problems. In that case, the call will not return until a timeout
9321 interval defined by the host OS for this operation expires. For this reason,
9322 it is recommended to never read this attribute on the main UI thread to avoid
9323 making the UI unresponsive.
9324
9325 If the last known state of the medium is "Created" and the accessibility
9326 check fails, then the state would be set to "Inaccessible", and
9327 <link to="#lastAccessError"/> may be used to get more details about the
9328 failure. If the state of the medium is "LockedRead", then it remains the
9329 same, and a non-empty value of <link to="#lastAccessError"/> will
9330 indicate a failed accessibility check in this case.
9331
9332 Note that not all medium states are applicable to all medium types.
9333 </desc>
9334 <param name="state" type="MediumState" dir="return">
9335 <desc>
9336 New medium state.
9337 </desc>
9338 </param>
9339 </method>
9340
9341 <method name="getSnapshotIds">
9342 <desc>
9343 Returns an array of UUIDs of all snapshots of the given machine where
9344 this medium is attached to.
9345
9346 If the medium is attached to the machine in the current state, then the
9347 first element in the array will always be the ID of the queried machine
9348 (i.e. the value equal to the @c machineId argument), followed by
9349 snapshot IDs (if any).
9350
9351 If the medium is not attached to the machine in the current state, then
9352 the array will contain only snapshot IDs.
9353
9354 The returned array may be @c null if this medium is not attached
9355 to the given machine at all, neither in the current state nor in one of
9356 the snapshots.
9357 </desc>
9358 <param name="machineId" type="uuid" mod="string" dir="in">
9359 <desc>
9360 UUID of the machine to query.
9361 </desc>
9362 </param>
9363 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9364 <desc>
9365 Array of snapshot UUIDs of the given machine using this medium.
9366 </desc>
9367 </param>
9368 </method>
9369
9370 <method name="lockRead">
9371 <desc>
9372 Locks this medium for reading.
9373
9374 A read lock is shared: many clients can simultaneously lock the
9375 same medium for reading unless it is already locked for writing (see
9376 <link to="#lockWrite"/>) in which case an error is returned.
9377
9378 When the medium is locked for reading, it cannot be modified
9379 from within VirtualBox. This means that any method that changes
9380 the properties of this medium or contents of the storage unit
9381 will return an error (unless explicitly stated otherwise). That
9382 includes an attempt to start a virtual machine that wants to
9383 write to the the medium.
9384
9385 When the virtual machine is started up, it locks for reading all
9386 media it uses in read-only mode. If some medium cannot be locked
9387 for reading, the startup procedure will fail.
9388 A medium is typically locked for reading while it is used by a running
9389 virtual machine but has a depending differencing image that receives
9390 the actual write operations. This way one base medium can have
9391 multiple child differencing images which can be written to
9392 simultaneously. Read-only media such as DVD and floppy images are
9393 also locked for reading only (so they can be in use by multiple
9394 machines simultaneously).
9395
9396 A medium is also locked for reading when it is the source of a
9397 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9398
9399 The medium locked for reading must be unlocked using the <link
9400 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9401 can be nested and must be followed by the same number of paired
9402 <link to="#unlockRead"/> calls.
9403
9404 This method sets the medium state (see <link to="#state"/>) to
9405 "LockedRead" on success. The medium's previous state must be
9406 one of "Created", "Inaccessible" or "LockedRead".
9407
9408 Locking an inaccessible medium is not an error; this method performs
9409 a logical lock that prevents modifications of this medium through
9410 the VirtualBox API, not a physical file-system lock of the underlying
9411 storage unit.
9412
9413 This method returns the current state of the medium
9414 <i>before</i> the operation.
9415
9416 <result name="VBOX_E_INVALID_OBJECT_STATE">
9417 Invalid medium state (e.g. not created, locked, inaccessible,
9418 creating, deleting).
9419 </result>
9420
9421 </desc>
9422 <param name="state" type="MediumState" dir="return">
9423 <desc>
9424 State of the medium after the operation.
9425 </desc>
9426 </param>
9427 </method>
9428
9429 <method name="unlockRead">
9430 <desc>
9431 Cancels the read lock previously set by <link to="#lockRead"/>.
9432
9433 For both success and failure, this method returns the current state
9434 of the medium <i>after</i> the operation.
9435
9436 See <link to="#lockRead"/> for more details.
9437
9438 <result name="VBOX_E_INVALID_OBJECT_STATE">
9439 Medium not locked for reading.
9440 </result>
9441
9442 </desc>
9443 <param name="state" type="MediumState" dir="return">
9444 <desc>
9445 State of the medium after the operation.
9446 </desc>
9447 </param>
9448 </method>
9449
9450 <method name="lockWrite">
9451 <desc>
9452 Locks this medium for writing.
9453
9454 A write lock, as opposed to <link to="#lockRead"/>, is
9455 exclusive: there may be only one client holding a write lock,
9456 and there may be no read locks while the write lock is held.
9457 As a result, read-locking fails if a write lock is held, and
9458 write-locking fails if either a read or another write lock is held.
9459
9460 When a medium is locked for writing, it cannot be modified
9461 from within VirtualBox, and it is not guaranteed that the values
9462 of its properties are up-to-date. Any method that changes the
9463 properties of this medium or contents of the storage unit will
9464 return an error (unless explicitly stated otherwise).
9465
9466 When a virtual machine is started up, it locks for writing all
9467 media it uses to write data to. If any medium could not be locked
9468 for writing, the startup procedure will fail. If a medium has
9469 differencing images, then while the machine is running, only
9470 the last ("leaf") differencing image is locked for writing,
9471 whereas its parents are locked for reading only.
9472
9473 A medium is also locked for writing when it is the target of a
9474 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9475
9476 The medium locked for writing must be unlocked using the <link
9477 to="#unlockWrite"/> method. Write locks <i>cannot</i> be nested.
9478
9479 This method sets the medium state (see <link to="#state"/>) to
9480 "LockedWrite" on success. The medium's previous state must be
9481 either "Created" or "Inaccessible".
9482
9483 Locking an inaccessible medium is not an error; this method performs
9484 a logical lock that prevents modifications of this medium through
9485 the VirtualBox API, not a physical file-system lock of the underlying
9486 storage unit.
9487
9488 For both, success and failure, this method returns the current
9489 state of the medium <i>before</i> the operation.
9490
9491 <result name="VBOX_E_INVALID_OBJECT_STATE">
9492 Invalid medium state (e.g. not created, locked, inaccessible,
9493 creating, deleting).
9494 </result>
9495
9496 </desc>
9497 <param name="state" type="MediumState" dir="return">
9498 <desc>
9499 State of the medium after the operation.
9500 </desc>
9501 </param>
9502 </method>
9503
9504 <method name="unlockWrite">
9505 <desc>
9506 Cancels the write lock previously set by <link to="#lockWrite"/>.
9507
9508 For both success and failure, this method returns the current
9509 state of the medium <i>after</i> the operation.
9510
9511 See <link to="#lockWrite"/> for more details.
9512
9513 <result name="VBOX_E_INVALID_OBJECT_STATE">
9514 Medium not locked for writing.
9515 </result>
9516
9517 </desc>
9518 <param name="state" type="MediumState" dir="return">
9519 <desc>
9520 State of the medium after the operation.
9521 </desc>
9522 </param>
9523 </method>
9524
9525 <method name="close">
9526 <desc>
9527 Closes this medium.
9528
9529 The medium must not be attached to any known virtual machine
9530 and must not have any known child media, otherwise the
9531 operation will fail.
9532
9533 When the medium is successfully closed, it gets removed from
9534 the list of remembered media, but its storage unit is not
9535 deleted. In particular, this means that this medium can be
9536 later opened again using the <link
9537 to="IVirtualBox::openHardDisk"/> call.
9538
9539 Note that after this method successfully returns, the given medium
9540 object becomes uninitialized. This means that any attempt
9541 to call any of its methods or attributes will fail with the
9542 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9543
9544 <result name="VBOX_E_INVALID_OBJECT_STATE">
9545 Invalid medium state (other than not created, created or
9546 inaccessible).
9547 </result>
9548 <result name="VBOX_E_OBJECT_IN_USE">
9549 Medium attached to virtual machine.
9550 </result>
9551 <result name="VBOX_E_FILE_ERROR">
9552 Settings file not accessible.
9553 </result>
9554 <result name="VBOX_E_XML_ERROR">
9555 Could not parse the settings file.
9556 </result>
9557
9558 </desc>
9559 </method>
9560
9561 <!-- storage methods -->
9562
9563 <method name="getProperty">
9564 <desc>
9565 Returns the value of the custom medium property with the given name.
9566
9567 The list of all properties supported by the given medium format can
9568 be obtained with <link to="IMediumFormat::describeProperties"/>.
9569
9570 Note that if this method returns an empty string in @a value, the
9571 requested property is supported but currently not assigned any value.
9572
9573 <result name="VBOX_E_OBJECT_NOT_FOUND">
9574 Requested property does not exist (not supported by the format).
9575 </result>
9576 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9577 </desc>
9578 <param name="name" type="wstring" dir="in">
9579 <desc>Name of the property to get.</desc>
9580 </param>
9581 <param name="value" type="wstring" dir="return">
9582 <desc>Current property value.</desc>
9583 </param>
9584 </method>
9585
9586 <method name="setProperty">
9587 <desc>
9588 Sets the value of the custom medium property with the given name.
9589
9590 The list of all properties supported by the given medium format can
9591 be obtained with <link to="IMediumFormat::describeProperties"/>.
9592
9593 Note that setting the property value to @c null or an empty string is
9594 equivalent to deleting the existing value. A default value (if it is
9595 defined for this property) will be used by the format backend in this
9596 case.
9597
9598 <result name="VBOX_E_OBJECT_NOT_FOUND">
9599 Requested property does not exist (not supported by the format).
9600 </result>
9601 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9602 </desc>
9603 <param name="name" type="wstring" dir="in">
9604 <desc>Name of the property to set.</desc>
9605 </param>
9606 <param name="value" type="wstring" dir="in">
9607 <desc>Property value to set.</desc>
9608 </param>
9609 </method>
9610
9611 <method name="getProperties">
9612 <desc>
9613 Returns values for a group of properties in one call.
9614
9615 The names of the properties to get are specified using the @a names
9616 argument which is a list of comma-separated property names or
9617 an empty string if all properties are to be returned. Note that currently
9618 the value of this argument is ignored and the method always returns all
9619 existing properties.
9620
9621 The list of all properties supported by the given medium format can
9622 be obtained with <link to="IMediumFormat::describeProperties"/>.
9623
9624 The method returns two arrays, the array of property names corresponding
9625 to the @a names argument and the current values of these properties.
9626 Both arrays have the same number of elements with each elemend at the
9627 given index in the first array corresponds to an element at the same
9628 index in the second array.
9629
9630 Note that for properties that do not have assigned values,
9631 an empty string is returned at the appropriate index in the
9632 @a returnValues array.
9633
9634 </desc>
9635 <param name="names" type="wstring" dir="in">
9636 <desc>
9637 Names of properties to get.
9638 </desc>
9639 </param>
9640 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9641 <desc>Names of returned properties.</desc>
9642 </param>
9643 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9644 <desc>Values of returned properties.</desc>
9645 </param>
9646 </method>
9647
9648 <method name="setProperties">
9649 <desc>
9650 Sets values for a group of properties in one call.
9651
9652 The names of the properties to set are passed in the @a names
9653 array along with the new values for them in the @a values array. Both
9654 arrays have the same number of elements with each elemend at the given
9655 index in the first array corresponding to an element at the same index
9656 in the second array.
9657
9658 If there is at least one property name in @a names that is not valid,
9659 the method will fail before changing the values of any other properties
9660 from the @a names array.
9661
9662 Using this method over <link to="#setProperty"/> is preferred if you
9663 need to set several properties at once since it will result into less
9664 IPC calls.
9665
9666 The list of all properties supported by the given medium format can
9667 be obtained with <link to="IMediumFormat::describeProperties"/>.
9668
9669 Note that setting the property value to @c null or an empty string is
9670 equivalent to deleting the existing value. A default value (if it is
9671 defined for this property) will be used by the format backend in this
9672 case.
9673 </desc>
9674 <param name="names" type="wstring" safearray="yes" dir="in">
9675 <desc>Names of properties to set.</desc>
9676 </param>
9677 <param name="values" type="wstring" safearray="yes" dir="in">
9678 <desc>Values of properties to set.</desc>
9679 </param>
9680 </method>
9681
9682 <!-- storage methods -->
9683
9684 <method name="createBaseStorage">
9685 <desc>
9686 Starts creating a hard disk storage unit (fixed/dynamic, according
9687 to the variant flags) in in the background. The previous storage unit
9688 created for this object, if any, must first be deleted using
9689 <link to="#deleteStorage"/>, otherwise the operation will fail.
9690
9691 Before the operation starts, the medium is placed in
9692 <link to="MediumState_Creating"/> state. If the create operation
9693 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
9694 state.
9695
9696 After the returned progress object reports that the operation has
9697 successfully completed, the medium state will be set to <link
9698 to="MediumState_Created"/>, the medium will be remembered by this
9699 VirtualBox installation and may be attached to virtual machines.
9700
9701 <result name="VBOX_E_NOT_SUPPORTED">
9702 The variant of storage creation operation is not supported. See <link
9703 to="IMediumFormat::capabilities"/>.
9704 </result>
9705 </desc>
9706 <param name="logicalSize" type="unsigned long long" dir="in">
9707 <desc>Maximum logical size of the medium in megabytes.</desc>
9708 </param>
9709 <param name="variant" type="MediumVariant" dir="in">
9710 <desc>Exact image variant which should be created.</desc>
9711 </param>
9712 <param name="progress" type="IProgress" dir="return">
9713 <desc>Progress object to track the operation completion.</desc>
9714 </param>
9715 </method>
9716
9717 <method name="deleteStorage">
9718 <desc>
9719 Starts deleting the storage unit of this medium.
9720
9721 The medium must not be attached to any known virtual machine and must
9722 not have any known child media, otherwise the operation will fail.
9723 It will also fail if there is no storage unit to delete or if deletion
9724 is already in progress, or if the medium is being in use (locked for
9725 read or for write) or inaccessible. Therefore, the only valid state for
9726 this operation to succeed is <link to="MediumState_Created"/>.
9727
9728 Before the operation starts, the medium is placed in
9729 <link to="MediumState_Deleting"/> state and gets removed from the list
9730 of remembered hard disks (media registry). If the delete operation
9731 fails, the medium will be remembered again and placed back to
9732 <link to="MediumState_Created"/> state.
9733
9734 After the returned progress object reports that the operation is
9735 complete, the medium state will be set to
9736 <link to="MediumState_NotCreated"/> and you will be able to use one of
9737 the storage creation methods to create it again.
9738
9739 <see>#close()</see>
9740
9741 <result name="VBOX_E_OBJECT_IN_USE">
9742 Medium is attached to a virtual machine.
9743 </result>
9744 <result name="VBOX_E_NOT_SUPPORTED">
9745 Storage deletion is not allowed because neither of storage creation
9746 operations are supported. See
9747 <link to="IMediumFormat::capabilities"/>.
9748 </result>
9749
9750 <note>
9751 If the deletion operation fails, it is not guaranteed that the storage
9752 unit still exists. You may check the <link to="IMedium::state"/> value
9753 to answer this question.
9754 </note>
9755 </desc>
9756 <param name="progress" type="IProgress" dir="return">
9757 <desc>Progress object to track the operation completion.</desc>
9758 </param>
9759 </method>
9760
9761 <!-- diff methods -->
9762
9763 <method name="createDiffStorage">
9764 <desc>
9765 Starts creating an empty differencing storage unit based on this
9766 medium in the format and at the location defined by the @a target
9767 argument.
9768
9769 The target medium must be in <link to="MediumState_NotCreated"/>
9770 state (i.e. must not have an existing storage unit). Upon successful
9771 completion, this operation will set the type of the target medium to
9772 <link to="MediumType_Normal"/> and create a storage unit necessary to
9773 represent the differencing medium data in the given format (according
9774 to the storage format of the target object).
9775
9776 After the returned progress object reports that the operation is
9777 successfully complete, the target medium gets remembered by this
9778 VirtualBox installation and may be attached to virtual machines.
9779
9780 <note>
9781 The medium will be set to <link to="MediumState_LockedRead"/>
9782 state for the duration of this operation.
9783 </note>
9784 <result name="VBOX_E_OBJECT_IN_USE">
9785 Medium not in @c NotCreated state.
9786 </result>
9787 </desc>
9788 <param name="target" type="IMedium" dir="in">
9789 <desc>Target medium.</desc>
9790 </param>
9791 <param name="variant" type="MediumVariant" dir="in">
9792 <desc>Exact image variant which should be created.</desc>
9793 </param>
9794 <param name="progress" type="IProgress" dir="return">
9795 <desc>Progress object to track the operation completion.</desc>
9796 </param>
9797 </method>
9798
9799 <method name="mergeTo">
9800 <desc>
9801 Starts merging the contents of this medium and all intermediate
9802 differencing media in the chain to the given target medium.
9803
9804 The target medium must be either a descendant of this medium or
9805 its ancestor (otherwise this method will immediately return a failure).
9806 It follows that there are two logical directions of the merge operation:
9807 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9808 ancestor (<i>backward merge</i>). Let us consider the following medium
9809 chain:
9810
9811 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9812
9813 Here, calling this method on the <tt>Base</tt> medium object with
9814 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9815 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9816 merge. Note that in both cases the contents of the resulting medium
9817 will be the same, the only difference is the medium object that takes
9818 the result of the merge operation. In case of the forward merge in the
9819 above example, the result will be written to <tt>Diff_2</tt>; in case of
9820 the backward merge, the result will be written to <tt>Base</tt>. In
9821 other words, the result of the operation is always stored in the target
9822 medium.
9823
9824 Upon successful operation completion, the storage units of all media in
9825 the chain between this (source) medium and the target medium, including
9826 the source medium itself, will be automatically deleted and the
9827 relevant medium objects (including this medium) will become
9828 uninitialized. This means that any attempt to call any of
9829 their methods or attributes will fail with the
9830 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9831 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9832 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> media.
9833 Note that <tt>Diff_2</tt> in this case will become a base medium
9834 itself since it will no longer be based on any other medium.
9835
9836 Considering the above, all of the following conditions must be met in
9837 order for the merge operation to succeed:
9838 <ul>
9839 <li>
9840 Neither this (source) medium nor any intermediate
9841 differencing medium in the chain between it and the target
9842 medium is attached to any virtual machine.
9843 </li>
9844 <li>
9845 Neither the source medium nor the target medium is an
9846 <link to="MediumType_Immutable"/> medium.
9847 </li>
9848 <li>
9849 The part of the medium tree from the source medium to the
9850 target medium is a linear chain, i.e. all medium in this
9851 chain have exactly one child which is the next medium in this
9852 chain. The only exception from this rule is the target medium in
9853 the forward merge operation; it is allowed to have any number of
9854 child media because the merge operation will not change its
9855 logical contents (as it is seen by the guest OS or by children).
9856 </li>
9857 <li>
9858 None of the involved media are in
9859 <link to="MediumState_LockedRead"/> or
9860 <link to="MediumState_LockedWrite"/> state.
9861 </li>
9862 </ul>
9863
9864 <note>
9865 This (source) medium and all intermediates will be placed to <link
9866 to="MediumState_Deleting"/> state and the target medium will be
9867 placed to <link to="MediumState_LockedWrite"/> state and for the
9868 duration of this operation.
9869 </note>
9870 </desc>
9871 <param name="target" type="IMedium" dir="in">
9872 <desc>Target medium.</desc>
9873 </param>
9874 <param name="progress" type="IProgress" dir="return">
9875 <desc>Progress object to track the operation completion.</desc>
9876 </param>
9877 </method>
9878
9879 <!-- clone method -->
9880
9881 <method name="cloneTo">
9882 <desc>
9883 Starts creating a clone of this medium in the format and at the
9884 location defined by the @a target argument.
9885
9886 The target medium must be either in <link to="MediumState_NotCreated"/>
9887 state (i.e. must not have an existing storage unit) or in
9888 <link to="MediumState_Created"/> state (i.e. created and not locked, and
9889 big enough to hold the data or else the copy will be partial). Upon
9890 successful completion, the cloned medium will contain exactly the
9891 same sector data as the medium being cloned, except that in the
9892 first case a new UUID for the clone will be randomly generated, and in
9893 the second case the UUID will remain unchanged.
9894
9895 The @a parent argument defines which medium will be the parent
9896 of the clone. Passing a @c null reference indicates that the clone will
9897 be a base image, i.e. completely independent. It is possible to specify
9898 an arbitrary medium for this parameter, including the parent of the
9899 medium which is being cloned. Even cloning to a child of the source
9900 medium is possible. Note that when cloning to an existing image, the
9901 @a parent irgument is ignored.
9902
9903 After the returned progress object reports that the operation is
9904 successfully complete, the target medium gets remembered by this
9905 VirtualBox installation and may be attached to virtual machines.
9906
9907 <note>
9908 This medium will be placed to <link to="MediumState_LockedRead"/>
9909 state for the duration of this operation.
9910 </note>
9911 <result name="E_NOTIMPL">
9912 The specified cloning variant is not supported at the moment.
9913 </result>
9914 </desc>
9915 <param name="target" type="IMedium" dir="in">
9916 <desc>Target medium.</desc>
9917 </param>
9918 <param name="variant" type="MediumVariant" dir="in">
9919 <desc>Exact image variant which should be created.</desc>
9920 </param>
9921 <param name="parent" type="IMedium" dir="in">
9922 <desc>Parent of the cloned medium.</desc>
9923 </param>
9924 <param name="progress" type="IProgress" dir="return">
9925 <desc>Progress object to track the operation completion.</desc>
9926 </param>
9927 </method>
9928
9929 <!-- other methods -->
9930
9931 <method name="compact">
9932 <desc>
9933 Starts compacting of this medium. This means that the medium is
9934 transformed into a possibly more compact storage representation.
9935 This potentially creates temporary images, which can require a
9936 substantial amount of additional disk space.
9937
9938 This medium will be placed to <link to="MediumState_LockedWrite"/>
9939 state and all its parent media (if any) will be placed to
9940 <link to="MediumState_LockedRead"/> state for the duration of this
9941 operation.
9942
9943 Please note that the results can be either returned straight away,
9944 or later as the result of the background operation via the object
9945 returned via the @a progress parameter.
9946
9947 <result name="VBOX_E_NOT_SUPPORTED">
9948 Medium format does not support compacting (but potentially
9949 needs it).
9950 </result>
9951 </desc>
9952 <param name="progress" type="IProgress" dir="return">
9953 <desc>Progress object to track the operation completion.</desc>
9954 </param>
9955 </method>
9956
9957 <method name="resize">
9958 <desc>
9959 Starts resizing this medium. This means that the nominal size of the
9960 medium is set to the new value. Both increasing and decreasing the
9961 size is possible, and there are no safety checks, since VirtualBox
9962 does not make any assumptions about the medium contents.
9963
9964 Resizing usually needs additional disk space, and possibly also
9965 some temporary disk space. Note that resize does not create a full
9966 temporary copy of the medium, so the additional disk space requirement
9967 is usually much lower than using the clone operation.
9968
9969 This medium will be placed to <link to="MediumState_LockedWrite"/>
9970 state for the duration of this operation.
9971
9972 Please note that the results can be either returned straight away,
9973 or later as the result of the background operation via the object
9974 returned via the @a progress parameter.
9975
9976 <result name="VBOX_E_NOT_SUPPORTED">
9977 Medium format does not support resizing.
9978 </result>
9979 </desc>
9980 <param name="logicalSize" type="unsigned long long" dir="in">
9981 <desc>New nominal capacity of the medium in megabytes.</desc>
9982 </param>
9983 <param name="progress" type="IProgress" dir="return">
9984 <desc>Progress object to track the operation completion.</desc>
9985 </param>
9986 </method>
9987
9988 <method name="reset">
9989 <desc>
9990 Starts erasing the contents of this differencing medium.
9991
9992 This operation will reset the differencing medium to its initial
9993 state when it does not contain any sector data and any read operation is
9994 redirected to its parent medium. This automatically gets called
9995 during VM power-up for every medium whose <link to="#autoReset" />
9996 attribute is @c true.
9997
9998 The medium will be write-locked for the duration of this operation (see
9999 <link to="#lockWrite" />).
10000
10001 <result name="VBOX_E_NOT_SUPPORTED">
10002 This is not a differencing medium.
10003 </result>
10004 <result name="VBOX_E_INVALID_OBJECT_STATE">
10005 Medium is not in <link to="MediumState_Created"/> or
10006 <link to="MediumState_Inaccessible"/> state.
10007 </result>
10008 </desc>
10009 <param name="progress" type="IProgress" dir="return">
10010 <desc>Progress object to track the operation completion.</desc>
10011 </param>
10012 </method>
10013
10014 </interface>
10015
10016
10017 <!--
10018 // IMediumFormat
10019 /////////////////////////////////////////////////////////////////////////
10020 -->
10021
10022 <enum
10023 name="DataType"
10024 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
10025 >
10026 <const name="Int32" value="0"/>
10027 <const name="Int8" value="1"/>
10028 <const name="String" value="2"/>
10029 </enum>
10030
10031 <enum
10032 name="DataFlags"
10033 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
10034 >
10035 <const name="None" value="0x00"/>
10036 <const name="Mandatory" value="0x01"/>
10037 <const name="Expert" value="0x02"/>
10038 <const name="Array" value="0x04"/>
10039 <const name="FlagMask" value="0x07"/>
10040 </enum>
10041
10042 <enum
10043 name="MediumFormatCapabilities"
10044 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
10045 >
10046 <desc>
10047 Medium format capability flags.
10048 </desc>
10049
10050 <const name="Uuid" value="0x01">
10051 <desc>
10052 Supports UUIDs as expected by VirtualBox code.
10053 </desc>
10054 </const>
10055
10056 <const name="CreateFixed" value="0x02">
10057 <desc>
10058 Supports creating fixed size images, allocating all space instantly.
10059 </desc>
10060 </const>
10061
10062 <const name="CreateDynamic" value="0x04">
10063 <desc>
10064 Supports creating dynamically growing images, allocating space on
10065 demand.
10066 </desc>
10067 </const>
10068
10069 <const name="CreateSplit2G" value="0x08">
10070 <desc>
10071 Supports creating images split in chunks of a bit less than 2 GBytes.
10072 </desc>
10073 </const>
10074
10075 <const name="Differencing" value="0x10">
10076 <desc>
10077 Supports being used as a format for differencing media (see <link
10078 to="IMedium::createDiffStorage"/>).
10079 </desc>
10080 </const>
10081
10082 <const name="Asynchronous" value="0x20">
10083 <desc>
10084 Supports asynchronous I/O operations for at least some configurations.
10085 </desc>
10086 </const>
10087
10088 <const name="File" value="0x40">
10089 <desc>
10090 The format backend operates on files (the <link to="IMedium::location"/>
10091 attribute of the medium specifies a file used to store medium
10092 data; for a list of supported file extensions see
10093 <link to="IMediumFormat::fileExtensions"/>).
10094 </desc>
10095 </const>
10096
10097 <const name="Properties" value="0x80">
10098 <desc>
10099 The format backend uses the property interface to configure the storage
10100 location and properties (the <link to="IMediumFormat::describeProperties"/>
10101 method is used to get access to properties supported by the given medium format).
10102 </desc>
10103 </const>
10104
10105 <const name="CapabilityMask" value="0xFF"/>
10106 </enum>
10107
10108 <interface
10109 name="IMediumFormat" extends="$unknown"
10110 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
10111 wsmap="managed"
10112 >
10113 <desc>
10114 The IMediumFormat interface represents a medium format.
10115
10116 Each medium format has an associated backend which is used to handle
10117 media stored in this format. This interface provides information
10118 about the properties of the associated backend.
10119
10120 Each medium format is identified by a string represented by the
10121 <link to="#id"/> attribute. This string is used in calls like
10122 <link to="IVirtualBox::createHardDisk"/> to specify the desired
10123 format.
10124
10125 The list of all supported medium formats can be obtained using
10126 <link to="ISystemProperties::mediumFormats"/>.
10127
10128 <see>IMedium</see>
10129 </desc>
10130
10131 <attribute name="id" type="wstring" readonly="yes">
10132 <desc>
10133 Identifier of this format.
10134
10135 The format identifier is a non-@c null non-empty ASCII string. Note that
10136 this string is case-insensitive. This means that, for example, all of
10137 the following strings:
10138 <pre>
10139 "VDI"
10140 "vdi"
10141 "VdI"</pre>
10142 refer to the same medium format.
10143
10144 This string is used in methods of other interfaces where it is necessary
10145 to specify a medium format, such as
10146 <link to="IVirtualBox::createHardDisk"/>.
10147 </desc>
10148 </attribute>
10149
10150 <attribute name="name" type="wstring" readonly="yes">
10151 <desc>
10152 Human readable description of this format.
10153
10154 Mainly for use in file open dialogs.
10155 </desc>
10156 </attribute>
10157
10158 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
10159 <desc>
10160 Array of strings containing the supported file extensions.
10161
10162 The first extension in the array is the extension preferred by the
10163 backend. It is recommended to use this extension when specifying a
10164 location of the storage unit for a new medium.
10165
10166 Note that some backends do not work on files, so this array may be
10167 empty.
10168
10169 <see>IMediumFormat::capabilities</see>
10170 </desc>
10171 </attribute>
10172
10173 <attribute name="capabilities" type="unsigned long" readonly="yes">
10174 <desc>
10175 Capabilities of the format as a set of bit flags.
10176
10177 For the meaning of individual capability flags see
10178 <link to="MediumFormatCapabilities"/>.
10179 </desc>
10180 </attribute>
10181
10182 <method name="describeProperties">
10183 <desc>
10184 Returns several arrays describing the properties supported by this
10185 format.
10186
10187 An element with the given index in each array describes one
10188 property. Thus, the number of elements in each returned array is the
10189 same and corresponds to the number of supported properties.
10190
10191 The returned arrays are filled in only if the
10192 <link to="MediumFormatCapabilities_Properties"/> flag is set.
10193 All arguments must be non-@c null.
10194
10195 <see>DataType</see>
10196 <see>DataFlags</see>
10197 </desc>
10198
10199 <param name="names" type="wstring" safearray="yes" dir="out">
10200 <desc>Array of property names.</desc>
10201 </param>
10202 <param name="description" type="wstring" safearray="yes" dir="out">
10203 <desc>Array of property descriptions.</desc>
10204 </param>
10205 <param name="types" type="DataType" safearray="yes" dir="out">
10206 <desc>Array of property types.</desc>
10207 </param>
10208 <param name="flags" type="unsigned long" safearray="yes" dir="out">
10209 <desc>Array of property flags.</desc>
10210 </param>
10211 <param name="defaults" type="wstring" safearray="yes" dir="out">
10212 <desc>Array of default property values.</desc>
10213 </param>
10214 </method>
10215
10216 </interface>
10217
10218
10219 <!--
10220 // IKeyboard
10221 /////////////////////////////////////////////////////////////////////////
10222 -->
10223
10224 <interface
10225 name="IKeyboard" extends="$unknown"
10226 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10227 wsmap="managed"
10228 >
10229 <desc>
10230 The IKeyboard interface represents the virtual machine's keyboard. Used
10231 in <link to="IConsole::keyboard"/>.
10232
10233 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10234 to the virtual machine.
10235
10236 </desc>
10237 <method name="putScancode">
10238 <desc>Sends a scancode to the keyboard.
10239
10240 <result name="VBOX_E_IPRT_ERROR">
10241 Could not send scan code to virtual keyboard.
10242 </result>
10243
10244 </desc>
10245 <param name="scancode" type="long" dir="in"/>
10246 </method>
10247
10248 <method name="putScancodes">
10249 <desc>Sends an array of scancodes to the keyboard.
10250
10251 <result name="VBOX_E_IPRT_ERROR">
10252 Could not send all scan codes to virtual keyboard.
10253 </result>
10254
10255 </desc>
10256 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10257 <param name="codesStored" type="unsigned long" dir="return"/>
10258 </method>
10259
10260 <method name="putCAD">
10261 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10262 function is nothing special, it is just a convenience function
10263 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10264
10265 <result name="VBOX_E_IPRT_ERROR">
10266 Could not send all scan codes to virtual keyboard.
10267 </result>
10268
10269 </desc>
10270 </method>
10271
10272 </interface>
10273
10274
10275 <!--
10276 // IMouse
10277 /////////////////////////////////////////////////////////////////////////
10278 -->
10279
10280 <enum
10281 name="MouseButtonState"
10282 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10283 >
10284 <desc>
10285 Mouse button state.
10286 </desc>
10287
10288 <const name="LeftButton" value="0x01"/>
10289 <const name="RightButton" value="0x02"/>
10290 <const name="MiddleButton" value="0x04"/>
10291 <const name="WheelUp" value="0x08"/>
10292 <const name="WheelDown" value="0x10"/>
10293 <const name="XButton1" value="0x20"/>
10294 <const name="XButton2" value="0x40"/>
10295 <const name="MouseStateMask" value="0x7F"/>
10296 </enum>
10297
10298 <interface
10299 name="IMouse" extends="$unknown"
10300 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
10301 wsmap="managed"
10302 >
10303 <desc>
10304 The IMouse interface represents the virtual machine's mouse. Used in
10305 <link to="IConsole::mouse"/>.
10306
10307 Through this interface, the virtual machine's virtual mouse can be
10308 controlled.
10309 </desc>
10310
10311 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10312 <desc>
10313 Whether the guest OS supports absolute mouse pointer positioning
10314 or not.
10315 <note>
10316 You can use the <link to="IMouseCapabilityChangedEvent"/>
10317 event to be instantly informed about changes of this attribute
10318 during virtual machine execution.
10319 </note>
10320 <see><link to="#putMouseEventAbsolute"/></see>
10321 </desc>
10322 </attribute>
10323
10324 <attribute name="relativeSupported" type="boolean" readonly="yes">
10325 <desc>
10326 Whether the guest OS supports relative mouse pointer positioning
10327 or not.
10328 <note>
10329 You can use the <link to="IMouseCapabilityChangedEvent"/>
10330 event to be instantly informed about changes of this attribute
10331 during virtual machine execution.
10332 </note>
10333 <see><link to="#putMouseEvent"/></see>
10334 </desc>
10335 </attribute>
10336
10337 <attribute name="needsHostCursor" type="boolean" readonly="yes">
10338 <desc>
10339 Whether the guest OS can currently switch to drawing it's own mouse
10340 cursor on demand.
10341 <note>
10342 You can use the <link to="IMouseCapabilityChangedEvent"/>
10343 event to be instantly informed about changes of this attribute
10344 during virtual machine execution.
10345 </note>
10346 <see><link to="#putMouseEvent"/></see>
10347 </desc>
10348 </attribute>
10349
10350 <method name="putMouseEvent">
10351 <desc>
10352 Initiates a mouse event using relative pointer movements
10353 along x and y axis.
10354
10355 <result name="E_ACCESSDENIED">
10356 Console not powered up.
10357 </result>
10358 <result name="VBOX_E_IPRT_ERROR">
10359 Could not send mouse event to virtual mouse.
10360 </result>
10361
10362 </desc>
10363
10364 <param name="dx" type="long" dir="in">
10365 <desc>
10366 Amount of pixels the mouse should move to the right.
10367 Negative values move the mouse to the left.
10368 </desc>
10369 </param>
10370 <param name="dy" type="long" dir="in">
10371 <desc>
10372 Amount of pixels the mouse should move downwards.
10373 Negative values move the mouse upwards.
10374 </desc>
10375 </param>
10376 <param name="dz" type="long" dir="in">
10377 <desc>
10378 Amount of mouse wheel moves.
10379 Positive values describe clockwise wheel rotations,
10380 negative values describe counterclockwise rotations.
10381 </desc>
10382 </param>
10383 <param name="dw" type="long" dir="in">
10384 <desc>
10385 Amount of horizontal mouse wheel moves.
10386 Positive values describe a movement to the left,
10387 negative values describe a movement to the right.
10388 </desc>
10389 </param>
10390 <param name="buttonState" type="long" dir="in">
10391 <desc>
10392 The current state of mouse buttons. Every bit represents
10393 a mouse button as follows:
10394 <table>
10395 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10396 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10397 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10398 </table>
10399 A value of <tt>1</tt> means the corresponding button is pressed.
10400 otherwise it is released.
10401 </desc>
10402 </param>
10403 </method>
10404
10405 <method name="putMouseEventAbsolute">
10406 <desc>
10407 Positions the mouse pointer using absolute x and y coordinates.
10408 These coordinates are expressed in pixels and
10409 start from <tt>[1,1]</tt> which corresponds to the top left
10410 corner of the virtual display.
10411
10412 <result name="E_ACCESSDENIED">
10413 Console not powered up.
10414 </result>
10415 <result name="VBOX_E_IPRT_ERROR">
10416 Could not send mouse event to virtual mouse.
10417 </result>
10418
10419 <note>
10420 This method will have effect only if absolute mouse
10421 positioning is supported by the guest OS.
10422 </note>
10423
10424 <see><link to="#absoluteSupported"/></see>
10425 </desc>
10426
10427 <param name="x" type="long" dir="in">
10428 <desc>
10429 X coordinate of the pointer in pixels, starting from @c 1.
10430 </desc>
10431 </param>
10432 <param name="y" type="long" dir="in">
10433 <desc>
10434 Y coordinate of the pointer in pixels, starting from @c 1.
10435 </desc>
10436 </param>
10437 <param name="dz" type="long" dir="in">
10438 <desc>
10439 Amount of mouse wheel moves.
10440 Positive values describe clockwise wheel rotations,
10441 negative values describe counterclockwise rotations.
10442 </desc>
10443 </param>
10444 <param name="dw" type="long" dir="in">
10445 <desc>
10446 Amount of horizontal mouse wheel moves.
10447 Positive values describe a movement to the left,
10448 negative values describe a movement to the right.
10449 </desc>
10450 </param>
10451 <param name="buttonState" type="long" dir="in">
10452 <desc>
10453 The current state of mouse buttons. Every bit represents
10454 a mouse button as follows:
10455 <table>
10456 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10457 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10458 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10459 </table>
10460 A value of @c 1 means the corresponding button is pressed.
10461 otherwise it is released.
10462 </desc>
10463 </param>
10464 </method>
10465
10466 </interface>
10467
10468 <!--
10469 // IDisplay
10470 /////////////////////////////////////////////////////////////////////////
10471 -->
10472
10473 <enum
10474 name="FramebufferPixelFormat"
10475 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10476 >
10477 <desc>
10478 Format of the video memory buffer. Constants represented by this enum can
10479 be used to test for particular values of <link
10480 to="IFramebuffer::pixelFormat"/>. See also <link
10481 to="IFramebuffer::requestResize"/>.
10482
10483 See also www.fourcc.org for more information about FOURCC pixel formats.
10484 </desc>
10485
10486 <const name="Opaque" value="0">
10487 <desc>
10488 Unknown buffer format (the user may not assume any particular format of
10489 the buffer).
10490 </desc>
10491 </const>
10492 <const name="FOURCC_RGB" value="0x32424752">
10493 <desc>
10494 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10495 bit layout).
10496 </desc>
10497 </const>
10498 </enum>
10499
10500 <interface
10501 name="IFramebuffer" extends="$unknown"
10502 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10503 wsmap="suppress"
10504 >
10505 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10506 <desc>Address of the start byte of the frame buffer.</desc>
10507 </attribute>
10508
10509 <attribute name="width" type="unsigned long" readonly="yes">
10510 <desc>Frame buffer width, in pixels.</desc>
10511 </attribute>
10512
10513 <attribute name="height" type="unsigned long" readonly="yes">
10514 <desc>Frame buffer height, in pixels.</desc>
10515 </attribute>
10516
10517 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10518 <desc>
10519 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10520 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10521 are: 8, 15, 16, 24 and 32.
10522 </desc>
10523 </attribute>
10524
10525 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10526 <desc>
10527 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10528 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10529 size of the scan line must be aligned to 32 bits.
10530 </desc>
10531 </attribute>
10532
10533 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10534 <desc>
10535 Frame buffer pixel format. It's either one of the values defined by <link
10536 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10537 <note>
10538 This attribute must never return <link
10539 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10540 <link to="#address"/> points to must be always known.
10541 </note>
10542 </desc>
10543 </attribute>
10544
10545 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10546 <desc>
10547 Defines whether this frame buffer uses the virtual video card's memory
10548 buffer (guest VRAM) directly or not. See <link
10549 to="IFramebuffer::requestResize"/> for more information.
10550 </desc>
10551 </attribute>
10552
10553 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10554 <desc>
10555 Hint from the frame buffer about how much of the standard
10556 screen height it wants to use for itself. This information is
10557 exposed to the guest through the VESA BIOS and VMMDev interface
10558 so that it can use it for determining its video mode table. It
10559 is not guaranteed that the guest respects the value.
10560 </desc>
10561 </attribute>
10562
10563 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10564 <desc>
10565 An alpha-blended overlay which is superposed over the frame buffer.
10566 The initial purpose is to allow the display of icons providing
10567 information about the VM state, including disk activity, in front
10568 ends which do not have other means of doing that. The overlay is
10569 designed to controlled exclusively by IDisplay. It has no locking
10570 of its own, and any changes made to it are not guaranteed to be
10571 visible until the affected portion of IFramebuffer is updated. The
10572 overlay can be created lazily the first time it is requested. This
10573 attribute can also return @c null to signal that the overlay is not
10574 implemented.
10575 </desc>
10576 </attribute>
10577
10578 <attribute name="winId" type="unsigned long long" readonly="yes">
10579 <desc>
10580 Platform-dependent identifier of the window where context of this
10581 frame buffer is drawn, or zero if there's no such window.
10582 </desc>
10583 </attribute>
10584
10585 <method name="lock">
10586 <desc>
10587 Locks the frame buffer.
10588 Gets called by the IDisplay object where this frame buffer is
10589 bound to.
10590 </desc>
10591 </method>
10592
10593 <method name="unlock">
10594 <desc>
10595 Unlocks the frame buffer.
10596 Gets called by the IDisplay object where this frame buffer is
10597 bound to.
10598 </desc>
10599 </method>
10600
10601 <method name="notifyUpdate">
10602 <desc>
10603 Informs about an update.
10604 Gets called by the display object where this buffer is
10605 registered.
10606 </desc>
10607 <param name="x" type="unsigned long" dir="in"/>
10608 <param name="y" type="unsigned long" dir="in"/>
10609 <param name="width" type="unsigned long" dir="in"/>
10610 <param name="height" type="unsigned long" dir="in"/>
10611 </method>
10612
10613 <method name="requestResize">
10614 <desc>
10615 Requests a size and pixel format change.
10616
10617 There are two modes of working with the video buffer of the virtual
10618 machine. The <i>indirect</i> mode implies that the IFramebuffer
10619 implementation allocates a memory buffer for the requested display mode
10620 and provides it to the virtual machine. In <i>direct</i> mode, the
10621 IFramebuffer implementation uses the memory buffer allocated and owned
10622 by the virtual machine. This buffer represents the video memory of the
10623 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10624 usually faster because the implementation gets a raw pointer to the
10625 guest VRAM buffer which it can directly use for visualizing the contents
10626 of the virtual display, as opposed to the indirect mode where the
10627 contents of guest VRAM are copied to the memory buffer provided by
10628 the implementation every time a display update occurs.
10629
10630 It is important to note that the direct mode is really fast only when
10631 the implementation uses the given guest VRAM buffer directly, for
10632 example, by blitting it to the window representing the virtual machine's
10633 display, which saves at least one copy operation comparing to the
10634 indirect mode. However, using the guest VRAM buffer directly is not
10635 always possible: the format and the color depth of this buffer may be
10636 not supported by the target window, or it may be unknown (opaque) as in
10637 case of text or non-linear multi-plane VGA video modes. In this case,
10638 the indirect mode (that is always available) should be used as a
10639 fallback: when the guest VRAM contents are copied to the
10640 implementation-provided memory buffer, color and format conversion is
10641 done automatically by the underlying code.
10642
10643 The @a pixelFormat parameter defines whether the direct mode is
10644 available or not. If @a pixelFormat is <link
10645 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10646 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10647 @a bytesPerLine parameters must be ignored and the implementation must use
10648 the indirect mode (where it provides its own buffer in one of the
10649 supported formats). In all other cases, @a pixelFormat together with
10650 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10651 buffer pointed to by the @a VRAM parameter and the implementation is
10652 free to choose which mode to use. To indicate that this frame buffer uses
10653 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10654 attribute must return @c true and <link to="#address"/> must
10655 return exactly the same address that is passed in the @a VRAM parameter
10656 of this method; otherwise it is assumed that the indirect strategy is
10657 chosen.
10658
10659 The @a width and @a height parameters represent the size of the
10660 requested display mode in both modes. In case of indirect mode, the
10661 provided memory buffer should be big enough to store data of the given
10662 display mode. In case of direct mode, it is guaranteed that the given
10663 @a VRAM buffer contains enough space to represent the display mode of the
10664 given size. Note that this frame buffer's <link to="#width"/> and <link
10665 to="#height"/> attributes must return exactly the same values as
10666 passed to this method after the resize is completed (see below).
10667
10668 The @a finished output parameter determines if the implementation has
10669 finished resizing the frame buffer or not. If, for some reason, the
10670 resize cannot be finished immediately during this call, @a finished
10671 must be set to @c false, and the implementation must call
10672 <link to="IDisplay::resizeCompleted"/> after it has returned from
10673 this method as soon as possible. If @a finished is @c false, the
10674 machine will not call any frame buffer methods until
10675 <link to="IDisplay::resizeCompleted"/> is called.
10676
10677 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10678 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10679 this frame buffer must return exactly the same values as specified in the
10680 parameters of this method, after the resize is completed. If the
10681 indirect mode is chosen, these attributes must return values describing
10682 the format of the implementation's own memory buffer <link
10683 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10684 value must always correlate with <link to="#pixelFormat"/>. Note that
10685 the <link to="#pixelFormat"/> attribute must never return <link
10686 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10687
10688 <note>
10689 This method is called by the IDisplay object under the
10690 <link to="#lock"/> provided by this IFramebuffer
10691 implementation. If this method returns @c false in @a finished, then
10692 this lock is not released until
10693 <link to="IDisplay::resizeCompleted"/> is called.
10694 </note>
10695 </desc>
10696 <param name="screenId" type="unsigned long" dir="in">
10697 <desc>
10698 Logical screen number. Must be used in the corresponding call to
10699 <link to="IDisplay::resizeCompleted"/> if this call is made.
10700 </desc>
10701 </param>
10702 <param name="pixelFormat" type="unsigned long" dir="in">
10703 <desc>
10704 Pixel format of the memory buffer pointed to by @a VRAM.
10705 See also <link to="FramebufferPixelFormat"/>.
10706 </desc>
10707 </param>
10708 <param name="VRAM" type="octet" mod="ptr" dir="in">
10709 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10710 </param>
10711 <param name="bitsPerPixel" type="unsigned long" dir="in">
10712 <desc>Color depth, bits per pixel.</desc>
10713 </param>
10714 <param name="bytesPerLine" type="unsigned long" dir="in">
10715 <desc>Size of one scan line, in bytes.</desc>
10716 </param>
10717 <param name="width" type="unsigned long" dir="in">
10718 <desc>Width of the guest display, in pixels.</desc>
10719 </param>
10720 <param name="height" type="unsigned long" dir="in">
10721 <desc>Height of the guest display, in pixels.</desc>
10722 </param>
10723 <param name="finished" type="boolean" dir="return">
10724 <desc>
10725 Can the VM start using the new frame buffer immediately
10726 after this method returns or it should wait for
10727 <link to="IDisplay::resizeCompleted"/>.
10728 </desc>
10729 </param>
10730 </method>
10731
10732 <method name="videoModeSupported">
10733 <desc>
10734 Returns whether the frame buffer implementation is willing to
10735 support a given video mode. In case it is not able to render
10736 the video mode (or for some reason not willing), it should
10737 return @c false. Usually this method is called when the guest
10738 asks the VMM device whether a given video mode is supported
10739 so the information returned is directly exposed to the guest.
10740 It is important that this method returns very quickly.
10741 </desc>
10742 <param name="width" type="unsigned long" dir="in"/>
10743 <param name="height" type="unsigned long" dir="in"/>
10744 <param name="bpp" type="unsigned long" dir="in"/>
10745 <param name="supported" type="boolean" dir="return"/>
10746 </method>
10747
10748 <method name="getVisibleRegion">
10749 <desc>
10750 Returns the visible region of this frame buffer.
10751
10752 If the @a rectangles parameter is @c null then the value of the
10753 @a count parameter is ignored and the number of elements necessary to
10754 describe the current visible region is returned in @a countCopied.
10755
10756 If @a rectangles is not @c null but @a count is less
10757 than the required number of elements to store region data, the method
10758 will report a failure. If @a count is equal or greater than the
10759 required number of elements, then the actual number of elements copied
10760 to the provided array will be returned in @a countCopied.
10761
10762 <note>
10763 The address of the provided array must be in the process space of
10764 this IFramebuffer object.
10765 </note>
10766 <note>
10767 Method not yet implemented.
10768 </note>
10769 </desc>
10770 <param name="rectangles" type="octet" mod="ptr" dir="in">
10771 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10772 </param>
10773 <param name="count" type="unsigned long" dir="in">
10774 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10775 </param>
10776 <param name="countCopied" type="unsigned long" dir="return">
10777 <desc>Number of elements copied to the @a rectangles array.</desc>
10778 </param>
10779 </method>
10780
10781 <method name="setVisibleRegion">
10782 <desc>
10783 Suggests a new visible region to this frame buffer. This region
10784 represents the area of the VM display which is a union of regions of
10785 all top-level windows of the guest operating system running inside the
10786 VM (if the Guest Additions for this system support this
10787 functionality). This information may be used by the frontends to
10788 implement the seamless desktop integration feature.
10789
10790 <note>
10791 The address of the provided array must be in the process space of
10792 this IFramebuffer object.
10793 </note>
10794 <note>
10795 The IFramebuffer implementation must make a copy of the provided
10796 array of rectangles.
10797 </note>
10798 <note>
10799 Method not yet implemented.
10800 </note>
10801 </desc>
10802 <param name="rectangles" type="octet" mod="ptr" dir="in">
10803 <desc>Pointer to the @c RTRECT array.</desc>
10804 </param>
10805 <param name="count" type="unsigned long" dir="in">
10806 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10807 </param>
10808 </method>
10809
10810 <method name="processVHWACommand">
10811 <desc>
10812 Posts a Video HW Acceleration Command to the frame buffer for processing.
10813 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10814 are posted from quest to the host to be processed by the host hardware.
10815
10816 <note>
10817 The address of the provided command must be in the process space of
10818 this IFramebuffer object.
10819 </note>
10820 </desc>
10821
10822 <param name="command" type="octet" mod="ptr" dir="in">
10823 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10824 </param>
10825 </method>
10826
10827 </interface>
10828
10829 <interface
10830 name="IFramebufferOverlay" extends="IFramebuffer"
10831 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10832 wsmap="suppress"
10833 >
10834 <desc>
10835 The IFramebufferOverlay interface represents an alpha blended overlay
10836 for displaying status icons above an IFramebuffer. It is always created
10837 not visible, so that it must be explicitly shown. It only covers a
10838 portion of the IFramebuffer, determined by its width, height and
10839 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10840 that order) format, and may be written to directly. Do re-read the
10841 width though, after setting it, as it may be adjusted (increased) to
10842 make it more suitable for the front end.
10843 </desc>
10844 <attribute name="x" type="unsigned long" readonly="yes">
10845 <desc>X position of the overlay, relative to the frame buffer.</desc>
10846 </attribute>
10847
10848 <attribute name="y" type="unsigned long" readonly="yes">
10849 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10850 </attribute>
10851
10852 <attribute name="visible" type="boolean" readonly="no">
10853 <desc>
10854 Whether the overlay is currently visible.
10855 </desc>
10856 </attribute>
10857
10858 <attribute name="alpha" type="unsigned long" readonly="no">
10859 <desc>
10860 The global alpha value for the overlay. This may or may not be
10861 supported by a given front end.
10862 </desc>
10863 </attribute>
10864
10865 <method name="move">
10866 <desc>
10867 Changes the overlay's position relative to the IFramebuffer.
10868 </desc>
10869 <param name="x" type="unsigned long" dir="in"/>
10870 <param name="y" type="unsigned long" dir="in"/>
10871 </method>
10872
10873 </interface>
10874
10875 <interface
10876 name="IDisplay" extends="$unknown"
10877 uuid="1fa79e39-0cc9-4ab3-9df3-ed3e96b42496"
10878 wsmap="managed"
10879 >
10880 <desc>
10881 The IDisplay interface represents the virtual machine's display.
10882
10883 The object implementing this interface is contained in each
10884 <link to="IConsole::display"/> attribute and represents the visual
10885 output of the virtual machine.
10886
10887 The virtual display supports pluggable output targets represented by the
10888 IFramebuffer interface. Examples of the output target are a window on
10889 the host computer or an RDP session's display on a remote computer.
10890 </desc>
10891 <method name="getScreenResolution">
10892 <desc>Queries display width, height and color depth for given screen.</desc>
10893 <param name="screenId" type="unsigned long" dir="in"/>
10894 <param name="width" type="unsigned long" dir="out"/>
10895 <param name="height" type="unsigned long" dir="out"/>
10896 <param name="bitsPerPixel" type="unsigned long" dir="out"/>
10897 </method>
10898
10899 <method name="setFramebuffer">
10900 <desc>
10901 Sets the framebuffer for given screen.
10902 </desc>
10903 <param name="screenId" type="unsigned long" dir="in"/>
10904 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10905 </method>
10906
10907 <method name="getFramebuffer">
10908 <desc>
10909 Queries the framebuffer for given screen.
10910 </desc>
10911 <param name="screenId" type="unsigned long" dir="in"/>
10912 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10913 <param name="xOrigin" type="long" dir="out"/>
10914 <param name="yOrigin" type="long" dir="out"/>
10915 </method>
10916
10917 <method name="setVideoModeHint">
10918 <desc>
10919 Asks VirtualBox to request the given video mode from
10920 the guest. This is just a hint and it cannot be guaranteed
10921 that the requested resolution will be used. Guest Additions
10922 are required for the request to be seen by guests. The caller
10923 should issue the request and wait for a resolution change and
10924 after a timeout retry.
10925
10926 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10927 parameters means that the corresponding values should be taken from the
10928 current video mode (i.e. left unchanged).
10929
10930 If the guest OS supports multi-monitor configuration then the @a display
10931 parameter specifies the number of the guest display to send the hint to:
10932 @c 0 is the primary display, @c 1 is the first secondary and
10933 so on. If the multi-monitor configuration is not supported, @a display
10934 must be @c 0.
10935
10936 <result name="E_INVALIDARG">
10937 The @a display is not associated with any monitor.
10938 </result>
10939
10940 </desc>
10941 <param name="width" type="unsigned long" dir="in"/>
10942 <param name="height" type="unsigned long" dir="in"/>
10943 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10944 <param name="display" type="unsigned long" dir="in"/>
10945 </method>
10946
10947 <method name="setSeamlessMode">
10948 <desc>
10949 Enables or disables seamless guest display rendering (seamless desktop
10950 integration) mode.
10951 <note>
10952 Calling this method has no effect if <link
10953 to="IGuest::supportsSeamless"/> returns @c false.
10954 </note>
10955 </desc>
10956 <param name="enabled" type="boolean" dir="in"/>
10957 </method>
10958
10959 <method name="takeScreenShot">
10960 <desc>
10961 Takes a screen shot of the requested size and copies it to the
10962 32-bpp buffer allocated by the caller and pointed to by @a address.
10963 A pixel consists of 4 bytes in order: B, G, R, 0.
10964
10965 <note>This API can be used only by the COM/XPCOM C++ API as it
10966 requires pointer support. Use <link to="#takeScreenShotToArray" />
10967 with other language bindings.
10968 </note>
10969
10970 <result name="E_NOTIMPL">
10971 Feature not implemented.
10972 </result>
10973 <result name="VBOX_E_IPRT_ERROR">
10974 Could not take a screenshot.
10975 </result>
10976
10977 </desc>
10978 <param name="screenId" type="unsigned long" dir="in"/>
10979 <param name="address" type="octet" mod="ptr" dir="in"/>
10980 <param name="width" type="unsigned long" dir="in"/>
10981 <param name="height" type="unsigned long" dir="in"/>
10982 </method>
10983
10984 <method name="takeScreenShotToArray">
10985 <desc>
10986 Takes a guest screen shot of the requested size and returns it as
10987 an array of bytes in uncompressed 32-bit RGBA format.
10988 A pixel consists of 4 bytes in order: R, G, B, 0xFF.
10989
10990 This API is slow, but could be the only option to get guest screenshot
10991 for scriptable languages not allowed to manipulate with addresses
10992 directly.
10993
10994 <result name="E_NOTIMPL">
10995 Feature not implemented.
10996 </result>
10997 <result name="VBOX_E_IPRT_ERROR">
10998 Could not take a screenshot.
10999 </result>
11000 </desc>
11001 <param name="screenId" type="unsigned long" dir="in">
11002 <desc>
11003 Monitor to take screenshot from.
11004 </desc>
11005 </param>
11006 <param name="width" type="unsigned long" dir="in">
11007 <desc>
11008 Desired image width.
11009 </desc>
11010 </param>
11011 <param name="height" type="unsigned long" dir="in">
11012 <desc>
11013 Desired image height.
11014 </desc>
11015 </param>
11016 <param name="screenData" type="octet" dir="return" safearray="yes">
11017 <desc>
11018 Array with resulting screen data.
11019 </desc>
11020 </param>
11021 </method>
11022
11023 <method name="drawToScreen">
11024 <desc>
11025 Draws a 32-bpp image of the specified size from the given buffer
11026 to the given point on the VM display.
11027
11028 <result name="E_NOTIMPL">
11029 Feature not implemented.
11030 </result>
11031 <result name="VBOX_E_IPRT_ERROR">
11032 Could not draw to screen.
11033 </result>
11034
11035 </desc>
11036 <param name="screenId" type="unsigned long" dir="in"/>
11037 <param name="address" type="octet" mod="ptr" dir="in"/>
11038 <param name="x" type="unsigned long" dir="in">
11039 <desc>Relative to the screen top left corner.</desc>
11040 </param>
11041 <param name="y" type="unsigned long" dir="in">
11042 <desc>Relative to the screen top left corner.</desc>
11043 </param>
11044 <param name="width" type="unsigned long" dir="in"/>
11045 <param name="height" type="unsigned long" dir="in"/>
11046 </method>
11047
11048 <method name="invalidateAndUpdate">
11049 <desc>
11050 Does a full invalidation of the VM display and instructs the VM
11051 to update it.
11052
11053 <result name="VBOX_E_IPRT_ERROR">
11054 Could not invalidate and update screen.
11055 </result>
11056
11057 </desc>
11058 </method>
11059
11060 <method name="resizeCompleted">
11061 <desc>
11062 Signals that a framebuffer has completed the resize operation.
11063
11064 <result name="VBOX_E_NOT_SUPPORTED">
11065 Operation only valid for external frame buffers.
11066 </result>
11067
11068 </desc>
11069 <param name="screenId" type="unsigned long" dir="in"/>
11070 </method>
11071
11072 <method name="completeVHWACommand">
11073 <desc>
11074 Signals that the Video HW Acceleration command has completed.
11075 </desc>
11076
11077 <param name="command" type="octet" mod="ptr" dir="in">
11078 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
11079 </param>
11080 </method>
11081
11082 </interface>
11083
11084 <!--
11085 // INetworkAdapter
11086 /////////////////////////////////////////////////////////////////////////
11087 -->
11088
11089 <enum
11090 name="NetworkAttachmentType"
11091 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
11092 >
11093 <desc>
11094 Network attachment type.
11095 </desc>
11096
11097 <const name="Null" value="0">
11098 <desc>Null value, also means "not attached".</desc>
11099 </const>
11100 <const name="NAT" value="1"/>
11101 <const name="Bridged" value="2"/>
11102 <const name="Internal" value="3"/>
11103 <const name="HostOnly" value="4"/>
11104 <const name="VDE" value="5"/>
11105 </enum>
11106
11107 <enum
11108 name="NetworkAdapterType"
11109 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
11110 >
11111 <desc>
11112 Network adapter type.
11113 </desc>
11114
11115 <const name="Null" value="0">
11116 <desc>Null value (never used by the API).</desc>
11117 </const>
11118 <const name="Am79C970A" value="1">
11119 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
11120 </const>
11121 <const name="Am79C973" value="2">
11122 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
11123 </const>
11124 <const name="I82540EM" value="3">
11125 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
11126 </const>
11127 <const name="I82543GC" value="4">
11128 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
11129 </const>
11130 <const name="I82545EM" value="5">
11131 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
11132 </const>
11133 <const name="Virtio" value="6">
11134 <desc>Virtio network device.</desc>
11135 </const>
11136 </enum>
11137
11138 <interface
11139 name="INetworkAdapter" extends="$unknown"
11140 uuid="9bf58a46-c3f7-4f31-80fa-dde9a5dc0b7b"
11141 wsmap="managed"
11142 >
11143 <desc>
11144 Represents a virtual network adapter that is attached to a virtual machine.
11145 Each virtual machine has a fixed number of network adapter slots with one
11146 instance of this attached to each of them. Call
11147 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
11148 is attached to a given slot in a given machine.
11149
11150 Each network adapter can be in one of five attachment modes, which are
11151 represented by the <link to="NetworkAttachmentType" /> enumeration;
11152 see the <link to="#attachmentType" /> attribute.
11153 </desc>
11154
11155 <attribute name="adapterType" type="NetworkAdapterType">
11156 <desc>
11157 Type of the virtual network adapter. Depending on this value,
11158 VirtualBox will provide a different virtual network hardware
11159 to the guest.
11160 </desc>
11161 </attribute>
11162
11163 <attribute name="slot" type="unsigned long" readonly="yes">
11164 <desc>
11165 Slot number this adapter is plugged into. Corresponds to
11166 the value you pass to <link to="IMachine::getNetworkAdapter"/>
11167 to obtain this instance.
11168 </desc>
11169 </attribute>
11170
11171 <attribute name="enabled" type="boolean">
11172 <desc>
11173 Flag whether the network adapter is present in the
11174 guest system. If disabled, the virtual guest hardware will
11175 not contain this network adapter. Can only be changed when
11176 the VM is not running.
11177 </desc>
11178 </attribute>
11179
11180 <attribute name="MACAddress" type="wstring">
11181 <desc>
11182 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
11183 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
11184 </desc>
11185 </attribute>
11186
11187 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
11188
11189 <attribute name="hostInterface" type="wstring">
11190 <desc>
11191 Name of the host network interface the VM is attached to.
11192 </desc>
11193 </attribute>
11194
11195 <attribute name="internalNetwork" type="wstring">
11196 <desc>
11197 Name of the internal network the VM is attached to.
11198 </desc>
11199 </attribute>
11200
11201 <attribute name="NATNetwork" type="wstring">
11202 <desc>
11203 Name of the NAT network the VM is attached to.
11204 </desc>
11205 </attribute>
11206
11207 <attribute name="VDENetwork" type="wstring">
11208 <desc>
11209 Name of the VDE switch the VM is attached to.
11210 </desc>
11211 </attribute>
11212
11213 <attribute name="cableConnected" type="boolean">
11214 <desc>
11215 Flag whether the adapter reports the cable as connected or not.
11216 It can be used to report offline situations to a VM.
11217 </desc>
11218 </attribute>
11219
11220 <attribute name="lineSpeed" type="unsigned long">
11221 <desc>
11222 Line speed reported by custom drivers, in units of 1 kbps.
11223 </desc>
11224 </attribute>
11225
11226 <attribute name="traceEnabled" type="boolean">
11227 <desc>
11228 Flag whether network traffic from/to the network card should be traced.
11229 Can only be toggled when the VM is turned off.
11230 </desc>
11231 </attribute>
11232
11233 <attribute name="traceFile" type="wstring">
11234 <desc>
11235 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11236 will be used.
11237 </desc>
11238 </attribute>
11239
11240 <attribute name="natDriver" type="INATEngine" readonly="yes">
11241 <desc>
11242 Points to the NAT engine which handles the network address translation
11243 for this interface. This is active only when the interface actually uses
11244 NAT (see <link to="#attachToNAT" />).
11245 </desc>
11246 </attribute>
11247
11248 <attribute name="bootPriority" type="unsigned long">
11249 <desc>
11250 Network boot priority of the adapter. Priority 1 is highest. If not set,
11251 the priority is considered to be at the lowest possible setting.
11252 </desc>
11253 </attribute>
11254
11255 <attribute name="bandwidthLimit" type="unsigned long">
11256 <desc>
11257 Maximum throughput allowed for this network adapter, in units of 1 mbps.
11258 A zero value means uncapped/unlimited.
11259 </desc>
11260 </attribute>
11261
11262 <method name="attachToNAT">
11263 <desc>
11264 Attach the network adapter to the Network Address Translation (NAT) interface.
11265 </desc>
11266 </method>
11267
11268 <method name="attachToBridgedInterface">
11269 <desc>
11270 Attach the network adapter to a bridged host interface.
11271 </desc>
11272 </method>
11273
11274 <method name="attachToInternalNetwork">
11275 <desc>
11276 Attach the network adapter to an internal network.
11277 </desc>
11278 </method>
11279
11280 <method name="attachToHostOnlyInterface">
11281 <desc>
11282 Attach the network adapter to the host-only network.
11283 </desc>
11284 </method>
11285
11286 <method name="attachToVDE">
11287 <desc>
11288 Attach the network adapter to a VDE network.
11289 </desc>
11290 </method>
11291
11292 <method name="detach">
11293 <desc>
11294 Detach the network adapter
11295 </desc>
11296 </method>
11297 </interface>
11298
11299
11300 <!--
11301 // ISerialPort
11302 /////////////////////////////////////////////////////////////////////////
11303 -->
11304
11305 <enum
11306 name="PortMode"
11307 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11308 >
11309 <desc>
11310 The PortMode enumeration represents possible communication modes for
11311 the virtual serial port device.
11312 </desc>
11313
11314 <const name="Disconnected" value="0">
11315 <desc>Virtual device is not attached to any real host device.</desc>
11316 </const>
11317 <const name="HostPipe" value="1">
11318 <desc>Virtual device is attached to a host pipe.</desc>
11319 </const>
11320 <const name="HostDevice" value="2">
11321 <desc>Virtual device is attached to a host device.</desc>
11322 </const>
11323 <const name="RawFile" value="3">
11324 <desc>Virtual device is attached to a raw file.</desc>
11325 </const>
11326 </enum>
11327
11328 <interface
11329 name="ISerialPort" extends="$unknown"
11330 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11331 wsmap="managed"
11332 >
11333
11334 <desc>
11335 The ISerialPort interface represents the virtual serial port device.
11336
11337 The virtual serial port device acts like an ordinary serial port
11338 inside the virtual machine. This device communicates to the real
11339 serial port hardware in one of two modes: host pipe or host device.
11340
11341 In host pipe mode, the #path attribute specifies the path to the pipe on
11342 the host computer that represents a serial port. The #server attribute
11343 determines if this pipe is created by the virtual machine process at
11344 machine startup or it must already exist before starting machine
11345 execution.
11346
11347 In host device mode, the #path attribute specifies the name of the
11348 serial port device on the host computer.
11349
11350 There is also a third communication mode: the disconnected mode. In this
11351 mode, the guest OS running inside the virtual machine will be able to
11352 detect the serial port, but all port write operations will be discarded
11353 and all port read operations will return no data.
11354
11355 <see>IMachine::getSerialPort</see>
11356 </desc>
11357
11358 <attribute name="slot" type="unsigned long" readonly="yes">
11359 <desc>
11360 Slot number this serial port is plugged into. Corresponds to
11361 the value you pass to <link to="IMachine::getSerialPort"/>
11362 to obtain this instance.
11363 </desc>
11364 </attribute>
11365
11366 <attribute name="enabled" type="boolean">
11367 <desc>
11368 Flag whether the serial port is enabled. If disabled,
11369 the serial port will not be reported to the guest OS.
11370 </desc>
11371 </attribute>
11372
11373 <attribute name="IOBase" type="unsigned long">
11374 <desc>Base I/O address of the serial port.</desc>
11375 </attribute>
11376
11377 <attribute name="IRQ" type="unsigned long">
11378 <desc>IRQ number of the serial port.</desc>
11379 </attribute>
11380
11381 <attribute name="hostMode" type="PortMode">
11382 <desc>
11383 How is this port connected to the host.
11384 <note>
11385 Changing this attribute may fail if the conditions for
11386 <link to="#path"/> are not met.
11387 </note>
11388 </desc>
11389 </attribute>
11390
11391 <attribute name="server" type="boolean">
11392 <desc>
11393 Flag whether this serial port acts as a server (creates a new pipe on
11394 the host) or as a client (uses the existing pipe). This attribute is
11395 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11396 </desc>
11397 </attribute>
11398
11399 <attribute name="path" type="wstring">
11400 <desc>
11401 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11402 PortMode_HostPipe, or the host serial device name when
11403 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11404 cases, setting a @c null or empty string as the attribute's value
11405 is an error. Otherwise, the value of this property is ignored.
11406 </desc>
11407 </attribute>
11408
11409 </interface>
11410
11411 <!--
11412 // IParallelPort
11413 /////////////////////////////////////////////////////////////////////////
11414 -->
11415
11416 <interface
11417 name="IParallelPort" extends="$unknown"
11418 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11419 wsmap="managed"
11420 >
11421
11422 <desc>
11423 The IParallelPort interface represents the virtual parallel port device.
11424
11425 The virtual parallel port device acts like an ordinary parallel port
11426 inside the virtual machine. This device communicates to the real
11427 parallel port hardware using the name of the parallel device on the host
11428 computer specified in the #path attribute.
11429
11430 Each virtual parallel port device is assigned a base I/O address and an
11431 IRQ number that will be reported to the guest operating system and used
11432 to operate the given parallel port from within the virtual machine.
11433
11434 <see>IMachine::getParallelPort</see>
11435 </desc>
11436
11437 <attribute name="slot" type="unsigned long" readonly="yes">
11438 <desc>
11439 Slot number this parallel port is plugged into. Corresponds to
11440 the value you pass to <link to="IMachine::getParallelPort"/>
11441 to obtain this instance.
11442 </desc>
11443 </attribute>
11444
11445 <attribute name="enabled" type="boolean">
11446 <desc>
11447 Flag whether the parallel port is enabled. If disabled,
11448 the parallel port will not be reported to the guest OS.
11449 </desc>
11450 </attribute>
11451
11452 <attribute name="IOBase" type="unsigned long">
11453 <desc>Base I/O address of the parallel port.</desc>
11454 </attribute>
11455
11456 <attribute name="IRQ" type="unsigned long">
11457 <desc>IRQ number of the parallel port.</desc>
11458 </attribute>
11459
11460 <attribute name="path" type="wstring">
11461 <desc>
11462 Host parallel device name. If this parallel port is enabled, setting a
11463 @c null or an empty string as this attribute's value will result into
11464 an error.
11465 </desc>
11466 </attribute>
11467
11468 </interface>
11469
11470
11471 <!--
11472 // IMachineDebugger
11473 /////////////////////////////////////////////////////////////////////////
11474 -->
11475
11476 <interface
11477 name="IMachineDebugger" extends="$unknown"
11478 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11479 wsmap="suppress"
11480 >
11481 <method name="resetStats">
11482 <desc>
11483 Reset VM statistics.
11484 </desc>
11485 <param name="pattern" type="wstring" dir="in">
11486 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11487 </param>
11488 </method>
11489
11490 <method name="dumpStats">
11491 <desc>
11492 Dumps VM statistics.
11493 </desc>
11494 <param name="pattern" type="wstring" dir="in">
11495 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11496 </param>
11497 </method>
11498
11499 <method name="getStats">
11500 <desc>
11501 Get the VM statistics in a XMLish format.
11502 </desc>
11503 <param name="pattern" type="wstring" dir="in">
11504 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11505 </param>
11506 <param name="withDescriptions" type="boolean" dir="in">
11507 <desc>Whether to include the descriptions.</desc>
11508 </param>
11509 <param name="stats" type="wstring" dir="out">
11510 <desc>The XML document containing the statistics.</desc>
11511 </param>
11512 </method>
11513
11514 <method name="injectNMI">
11515 <desc>
11516 Inject an NMI into a running VT-x/AMD-V VM.
11517 </desc>
11518 </method>
11519
11520 <attribute name="singlestep" type="boolean">
11521 <desc>Switch for enabling singlestepping.</desc>
11522 </attribute>
11523
11524 <attribute name="recompileUser" type="boolean">
11525 <desc>Switch for forcing code recompilation for user mode code.</desc>
11526 </attribute>
11527
11528 <attribute name="recompileSupervisor" type="boolean">
11529 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11530 </attribute>
11531
11532 <attribute name="PATMEnabled" type="boolean">
11533 <desc>Switch for enabling and disabling the PATM component.</desc>
11534 </attribute>
11535
11536 <attribute name="CSAMEnabled" type="boolean">
11537 <desc>Switch for enabling and disabling the CSAM component.</desc>
11538 </attribute>
11539
11540 <attribute name="logEnabled" type="boolean">
11541 <desc>Switch for enabling and disabling logging.</desc>
11542 </attribute>
11543
11544 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11545 <desc>
11546 Flag indicating whether the VM is currently making use of CPU hardware
11547 virtualization extensions.
11548 </desc>
11549 </attribute>
11550
11551 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11552 <desc>
11553 Flag indicating whether the VM is currently making use of the nested paging
11554 CPU hardware virtualization extension.
11555 </desc>
11556 </attribute>
11557
11558 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11559 <desc>
11560 Flag indicating whether the VM is currently making use of the VPID
11561 VT-x extension.
11562 </desc>
11563 </attribute>
11564
11565 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11566 <desc>
11567 Flag indicating whether the VM is currently making use of the Physical
11568 Address Extension CPU feature.
11569 </desc>
11570 </attribute>
11571
11572 <attribute name="virtualTimeRate" type="unsigned long">
11573 <desc>
11574 The rate at which the virtual time runs expressed as a percentage.
11575 The accepted range is 2% to 20000%.
11576 </desc>
11577 </attribute>
11578
11579 <!-- @todo method for setting log flags, groups and destination! -->
11580
11581 <attribute name="VM" type="unsigned long long" readonly="yes">
11582 <desc>
11583 Gets the VM handle. This is only for internal use while
11584 we carve the details of this interface.
11585 </desc>
11586 </attribute>
11587
11588 </interface>
11589
11590 <!--
11591 // IUSBController
11592 /////////////////////////////////////////////////////////////////////////
11593 -->
11594
11595 <interface
11596 name="IUSBController" extends="$unknown"
11597 uuid="6fdcccc5-abd3-4fec-9387-2ad3914fc4a8"
11598 wsmap="managed"
11599 >
11600 <attribute name="enabled" type="boolean">
11601 <desc>
11602 Flag whether the USB controller is present in the
11603 guest system. If disabled, the virtual guest hardware will
11604 not contain any USB controller. Can only be changed when
11605 the VM is powered off.
11606 </desc>
11607 </attribute>
11608
11609 <attribute name="enabledEhci" type="boolean">
11610 <desc>
11611 Flag whether the USB EHCI controller is present in the
11612 guest system. If disabled, the virtual guest hardware will
11613 not contain a USB EHCI controller. Can only be changed when
11614 the VM is powered off.
11615 </desc>
11616 </attribute>
11617
11618 <attribute name="proxyAvailable" type="boolean" readonly="yes">
11619 <desc>
11620 Flag whether there is an USB proxy available.
11621 </desc>
11622 </attribute>
11623
11624 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11625 <desc>
11626 USB standard version which the controller implements.
11627 This is a BCD which means that the major version is in the
11628 high byte and minor version is in the low byte.
11629 </desc>
11630 </attribute>
11631
11632 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11633 <desc>
11634 List of USB device filters associated with the machine.
11635
11636 If the machine is currently running, these filters are activated
11637 every time a new (supported) USB device is attached to the host
11638 computer that was not ignored by global filters
11639 (<link to="IHost::USBDeviceFilters"/>).
11640
11641 These filters are also activated when the machine is powered up.
11642 They are run against a list of all currently available USB
11643 devices (in states
11644 <link to="USBDeviceState_Available"/>,
11645 <link to="USBDeviceState_Busy"/>,
11646 <link to="USBDeviceState_Held"/>) that were not previously
11647 ignored by global filters.
11648
11649 If at least one filter matches the USB device in question, this
11650 device is automatically captured (attached to) the virtual USB
11651 controller of this machine.
11652
11653 <see>IUSBDeviceFilter, ::IUSBController</see>
11654 </desc>
11655 </attribute>
11656
11657 <method name="createDeviceFilter">
11658 <desc>
11659 Creates a new USB device filter. All attributes except
11660 the filter name are set to empty (any match),
11661 <i>active</i> is @c false (the filter is not active).
11662
11663 The created filter can then be added to the list of filters using
11664 <link to="#insertDeviceFilter"/>.
11665
11666 <result name="VBOX_E_INVALID_VM_STATE">
11667 The virtual machine is not mutable.
11668 </result>
11669
11670 <see>#deviceFilters</see>
11671 </desc>
11672 <param name="name" type="wstring" dir="in">
11673 <desc>
11674 Filter name. See <link to="IUSBDeviceFilter::name"/>
11675 for more info.
11676 </desc>
11677 </param>
11678 <param name="filter" type="IUSBDeviceFilter" dir="return">
11679 <desc>Created filter object.</desc>
11680 </param>
11681 </method>
11682
11683 <method name="insertDeviceFilter">
11684 <desc>
11685 Inserts the given USB device to the specified position
11686 in the list of filters.
11687
11688 Positions are numbered starting from <tt>0</tt>. If the specified
11689 position is equal to or greater than the number of elements in
11690 the list, the filter is added to the end of the collection.
11691
11692 <note>
11693 Duplicates are not allowed, so an attempt to insert a
11694 filter that is already in the collection, will return an
11695 error.
11696 </note>
11697
11698 <result name="VBOX_E_INVALID_VM_STATE">
11699 Virtual machine is not mutable.
11700 </result>
11701 <result name="E_INVALIDARG">
11702 USB device filter not created within this VirtualBox instance.
11703 </result>
11704 <result name="VBOX_E_INVALID_OBJECT_STATE">
11705 USB device filter already in list.
11706 </result>
11707
11708 <see>#deviceFilters</see>
11709 </desc>
11710 <param name="position" type="unsigned long" dir="in">
11711 <desc>Position to insert the filter to.</desc>
11712 </param>
11713 <param name="filter" type="IUSBDeviceFilter" dir="in">
11714 <desc>USB device filter to insert.</desc>
11715 </param>
11716 </method>
11717
11718 <method name="removeDeviceFilter">
11719 <desc>
11720 Removes a USB device filter from the specified position in the
11721 list of filters.
11722
11723 Positions are numbered starting from <tt>0</tt>. Specifying a
11724 position equal to or greater than the number of elements in
11725 the list will produce an error.
11726
11727 <see>#deviceFilters</see>
11728
11729 <result name="VBOX_E_INVALID_VM_STATE">
11730 Virtual machine is not mutable.
11731 </result>
11732 <result name="E_INVALIDARG">
11733 USB device filter list empty or invalid @a position.
11734 </result>
11735
11736 </desc>
11737 <param name="position" type="unsigned long" dir="in">
11738 <desc>Position to remove the filter from.</desc>
11739 </param>
11740 <param name="filter" type="IUSBDeviceFilter" dir="return">
11741 <desc>Removed USB device filter.</desc>
11742 </param>
11743 </method>
11744
11745 </interface>
11746
11747
11748 <!--
11749 // IUSBDevice
11750 /////////////////////////////////////////////////////////////////////////
11751 -->
11752
11753 <interface
11754 name="IUSBDevice" extends="$unknown"
11755 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11756 wsmap="managed"
11757 >
11758 <desc>
11759 The IUSBDevice interface represents a virtual USB device attached to the
11760 virtual machine.
11761
11762 A collection of objects implementing this interface is stored in the
11763 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11764 attached to a running virtual machine's USB controller.
11765 </desc>
11766
11767 <attribute name="id" type="uuid" mod="string" readonly="yes">
11768 <desc>
11769 Unique USB device ID. This ID is built from #vendorId,
11770 #productId, #revision and #serialNumber.
11771 </desc>
11772 </attribute>
11773
11774 <attribute name="vendorId" type="unsigned short" readonly="yes">
11775 <desc>Vendor ID.</desc>
11776 </attribute>
11777
11778 <attribute name="productId" type="unsigned short" readonly="yes">
11779 <desc>Product ID.</desc>
11780 </attribute>
11781
11782 <attribute name="revision" type="unsigned short" readonly="yes">
11783 <desc>
11784 Product revision number. This is a packed BCD represented as
11785 unsigned short. The high byte is the integer part and the low
11786 byte is the decimal.
11787 </desc>
11788 </attribute>
11789
11790 <attribute name="manufacturer" type="wstring" readonly="yes">
11791 <desc>Manufacturer string.</desc>
11792 </attribute>
11793
11794 <attribute name="product" type="wstring" readonly="yes">
11795 <desc>Product string.</desc>
11796 </attribute>
11797
11798 <attribute name="serialNumber" type="wstring" readonly="yes">
11799 <desc>Serial number string.</desc>
11800 </attribute>
11801
11802 <attribute name="address" type="wstring" readonly="yes">
11803 <desc>Host specific address of the device.</desc>
11804 </attribute>
11805
11806 <attribute name="port" type="unsigned short" readonly="yes">
11807 <desc>
11808 Host USB port number the device is physically
11809 connected to.
11810 </desc>
11811 </attribute>
11812
11813 <attribute name="version" type="unsigned short" readonly="yes">
11814 <desc>
11815 The major USB version of the device - 1 or 2.
11816 </desc>
11817 </attribute>
11818
11819 <attribute name="portVersion" type="unsigned short" readonly="yes">
11820 <desc>
11821 The major USB version of the host USB port the device is
11822 physically connected to - 1 or 2. For devices not connected to
11823 anything this will have the same value as the version attribute.
11824 </desc>
11825 </attribute>
11826
11827 <attribute name="remote" type="boolean" readonly="yes">
11828 <desc>
11829 Whether the device is physically connected to a remote VRDP
11830 client or to a local host machine.
11831 </desc>
11832 </attribute>
11833
11834 </interface>
11835
11836
11837 <!--
11838 // IUSBDeviceFilter
11839 /////////////////////////////////////////////////////////////////////////
11840 -->
11841
11842 <interface
11843 name="IUSBDeviceFilter" extends="$unknown"
11844 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11845 wsmap="managed"
11846 >
11847 <desc>
11848 The IUSBDeviceFilter interface represents an USB device filter used
11849 to perform actions on a group of USB devices.
11850
11851 This type of filters is used by running virtual machines to
11852 automatically capture selected USB devices once they are physically
11853 attached to the host computer.
11854
11855 A USB device is matched to the given device filter if and only if all
11856 attributes of the device match the corresponding attributes of the
11857 filter (that is, attributes are joined together using the logical AND
11858 operation). On the other hand, all together, filters in the list of
11859 filters carry the semantics of the logical OR operation. So if it is
11860 desirable to create a match like "this vendor id OR this product id",
11861 one needs to create two filters and specify "any match" (see below)
11862 for unused attributes.
11863
11864 All filter attributes used for matching are strings. Each string
11865 is an expression representing a set of values of the corresponding
11866 device attribute, that will match the given filter. Currently, the
11867 following filtering expressions are supported:
11868
11869 <ul>
11870 <li><i>Interval filters</i>. Used to specify valid intervals for
11871 integer device attributes (Vendor ID, Product ID and Revision).
11872 The format of the string is:
11873
11874 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11875
11876 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11877 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11878 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11879 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11880 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11881 possible integer is assumed.
11882 </li>
11883 <li><i>Boolean filters</i>. Used to specify acceptable values for
11884 boolean device attributes. The format of the string is:
11885
11886 <tt>true|false|yes|no|0|1</tt>
11887
11888 </li>
11889 <li><i>Exact match</i>. Used to specify a single value for the given
11890 device attribute. Any string that doesn't start with <tt>int:</tt>
11891 represents the exact match. String device attributes are compared to
11892 this string including case of symbols. Integer attributes are first
11893 converted to a string (see individual filter attributes) and then
11894 compared ignoring case.
11895
11896 </li>
11897 <li><i>Any match</i>. Any value of the corresponding device attribute
11898 will match the given filter. An empty or @c null string is
11899 used to construct this type of filtering expressions.
11900
11901 </li>
11902 </ul>
11903
11904 <note>
11905 On the Windows host platform, interval filters are not currently
11906 available. Also all string filter attributes
11907 (<link to="#manufacturer"/>, <link to="#product"/>,
11908 <link to="#serialNumber"/>) are ignored, so they behave as
11909 <i>any match</i> no matter what string expression is specified.
11910 </note>
11911
11912 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11913 </desc>
11914
11915 <attribute name="name" type="wstring">
11916 <desc>
11917 Visible name for this filter.
11918 This name is used to visually distinguish one filter from another,
11919 so it can neither be @c null nor an empty string.
11920 </desc>
11921 </attribute>
11922
11923 <attribute name="active" type="boolean">
11924 <desc>Whether this filter active or has been temporarily disabled.</desc>
11925 </attribute>
11926
11927 <attribute name="vendorId" type="wstring">
11928 <desc>
11929 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11930 The string representation for the <i>exact matching</i>
11931 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11932 (including leading zeroes).
11933 </desc>
11934 </attribute>
11935
11936 <attribute name="productId" type="wstring">
11937 <desc>
11938 <link to="IUSBDevice::productId">Product ID</link> filter.
11939 The string representation for the <i>exact matching</i>
11940 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11941 (including leading zeroes).
11942 </desc>
11943 </attribute>
11944
11945 <attribute name="revision" type="wstring">
11946 <desc>
11947 <link to="IUSBDevice::productId">Product revision number</link>
11948 filter. The string representation for the <i>exact matching</i>
11949 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11950 of the integer part of the revision, and <tt>F</tt> is the
11951 decimal digit of its fractional part (including leading and
11952 trailing zeros).
11953 Note that for interval filters, it's best to use the hexadecimal
11954 form, because the revision is stored as a 16 bit packed BCD value;
11955 so the expression <tt>int:0x0100-0x0199</tt> will match any
11956 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11957 </desc>
11958 </attribute>
11959
11960 <attribute name="manufacturer" type="wstring">
11961 <desc>
11962 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11963 </desc>
11964 </attribute>
11965
11966 <attribute name="product" type="wstring">
11967 <desc>
11968 <link to="IUSBDevice::product">Product</link> filter.
11969 </desc>
11970 </attribute>
11971
11972 <attribute name="serialNumber" type="wstring">
11973 <desc>
11974 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11975 </desc>
11976 </attribute>
11977
11978 <attribute name="port" type="wstring">
11979 <desc>
11980 <link to="IUSBDevice::port">Host USB port</link> filter.
11981 </desc>
11982 </attribute>
11983
11984 <attribute name="remote" type="wstring">
11985 <desc>
11986 <link to="IUSBDevice::remote">Remote state</link> filter.
11987 <note>
11988 This filter makes sense only for machine USB filters,
11989 i.e. it is ignored by IHostUSBDeviceFilter objects.
11990 </note>
11991 </desc>
11992 </attribute>
11993
11994 <attribute name="maskedInterfaces" type="unsigned long">
11995 <desc>
11996 This is an advanced option for hiding one or more USB interfaces
11997 from the guest. The value is a bit mask where the bits that are set
11998 means the corresponding USB interface should be hidden, masked off
11999 if you like.
12000 This feature only works on Linux hosts.
12001 </desc>
12002 </attribute>
12003
12004 </interface>
12005
12006
12007 <!--
12008 // IHostUSBDevice
12009 /////////////////////////////////////////////////////////////////////////
12010 -->
12011
12012 <enum
12013 name="USBDeviceState"
12014 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
12015 >
12016 <desc>
12017 USB device state. This enumeration represents all possible states
12018 of the USB device physically attached to the host computer regarding
12019 its state on the host computer and availability to guest computers
12020 (all currently running virtual machines).
12021
12022 Once a supported USB device is attached to the host, global USB
12023 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
12024 either ignore the device, or put it to USBDeviceState_Held state, or do
12025 nothing. Unless the device is ignored by global filters, filters of all
12026 currently running guests (<link to="IUSBController::deviceFilters"/>) are
12027 activated that can put it to USBDeviceState_Captured state.
12028
12029 If the device was ignored by global filters, or didn't match
12030 any filters at all (including guest ones), it is handled by the host
12031 in a normal way. In this case, the device state is determined by
12032 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
12033 or USBDeviceState_Available, depending on the current device usage.
12034
12035 Besides auto-capturing based on filters, the device can be manually
12036 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
12037 state is USBDeviceState_Busy, USBDeviceState_Available or
12038 USBDeviceState_Held.
12039
12040 <note>
12041 Due to differences in USB stack implementations in Linux and Win32,
12042 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
12043 only to the Linux version of the product. This also means that (<link
12044 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
12045 device state is USBDeviceState_Held.
12046 </note>
12047
12048 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
12049 </desc>
12050
12051 <const name="NotSupported" value="0">
12052 <desc>
12053 Not supported by the VirtualBox server, not available to guests.
12054 </desc>
12055 </const>
12056 <const name="Unavailable" value="1">
12057 <desc>
12058 Being used by the host computer exclusively,
12059 not available to guests.
12060 </desc>
12061 </const>
12062 <const name="Busy" value="2">
12063 <desc>
12064 Being used by the host computer, potentially available to guests.
12065 </desc>
12066 </const>
12067 <const name="Available" value="3">
12068 <desc>
12069 Not used by the host computer, available to guests (the host computer
12070 can also start using the device at any time).
12071 </desc>
12072 </const>
12073 <const name="Held" value="4">
12074 <desc>
12075 Held by the VirtualBox server (ignored by the host computer),
12076 available to guests.
12077 </desc>
12078 </const>
12079 <const name="Captured" value="5">
12080 <desc>
12081 Captured by one of the guest computers, not available
12082 to anybody else.
12083 </desc>
12084 </const>
12085 </enum>
12086
12087 <interface
12088 name="IHostUSBDevice" extends="IUSBDevice"
12089 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
12090 wsmap="managed"
12091 >
12092 <desc>
12093 The IHostUSBDevice interface represents a physical USB device attached
12094 to the host computer.
12095
12096 Besides properties inherited from IUSBDevice, this interface adds the
12097 <link to="#state"/> property that holds the current state of the USB
12098 device.
12099
12100 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
12101 </desc>
12102
12103 <attribute name="state" type="USBDeviceState" readonly="yes">
12104 <desc>
12105 Current state of the device.
12106 </desc>
12107 </attribute>
12108
12109 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
12110
12111 </interface>
12112
12113
12114 <!--
12115 // IHostUSBDeviceFilter
12116 /////////////////////////////////////////////////////////////////////////
12117 -->
12118
12119 <enum
12120 name="USBDeviceFilterAction"
12121 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
12122 >
12123 <desc>
12124 Actions for host USB device filters.
12125 <see>IHostUSBDeviceFilter, USBDeviceState</see>
12126 </desc>
12127
12128 <const name="Null" value="0">
12129 <desc>Null value (never used by the API).</desc>
12130 </const>
12131 <const name="Ignore" value="1">
12132 <desc>Ignore the matched USB device.</desc>
12133 </const>
12134 <const name="Hold" value="2">
12135 <desc>Hold the matched USB device.</desc>
12136 </const>
12137 </enum>
12138
12139 <interface
12140 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
12141 uuid="4cc70246-d74a-400f-8222-3900489c0374"
12142 wsmap="managed"
12143 >
12144 <desc>
12145 The IHostUSBDeviceFilter interface represents a global filter for a
12146 physical USB device used by the host computer. Used indirectly in
12147 <link to="IHost::USBDeviceFilters"/>.
12148
12149 Using filters of this type, the host computer determines the initial
12150 state of the USB device after it is physically attached to the
12151 host's USB controller.
12152
12153 <note>
12154 The <link to="IUSBDeviceFilter::remote"/> attribute is ignored by this type of
12155 filters, because it makes sense only for
12156 <link to="IUSBController::deviceFilters">machine USB filters</link>.
12157 </note>
12158
12159 <see>IHost::USBDeviceFilters</see>
12160 </desc>
12161
12162 <attribute name="action" type="USBDeviceFilterAction">
12163 <desc>
12164 Action performed by the host when an attached USB device
12165 matches this filter.
12166 </desc>
12167 </attribute>
12168
12169 </interface>
12170
12171 <!--
12172 // IAudioAdapter
12173 /////////////////////////////////////////////////////////////////////////
12174 -->
12175
12176 <enum
12177 name="AudioDriverType"
12178 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
12179 >
12180 <desc>
12181 Host audio driver type.
12182 </desc>
12183
12184 <const name="Null" value="0">
12185 <desc>Null value, also means "dummy audio driver".</desc>
12186 </const>
12187 <const name="WinMM" value="1">
12188 <desc>Windows multimedia (Windows hosts only).</desc>
12189 </const>
12190 <const name="OSS" value="2">
12191 <desc>Open Sound System (Linux hosts only).</desc>
12192 </const>
12193 <const name="ALSA" value="3">
12194 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
12195 </const>
12196 <const name="DirectSound" value="4">
12197 <desc>DirectSound (Windows hosts only).</desc>
12198 </const>
12199 <const name="CoreAudio" value="5">
12200 <desc>CoreAudio (Mac hosts only).</desc>
12201 </const>
12202 <const name="MMPM" value="6">
12203 <desc>Reserved for historical reasons.</desc>
12204 </const>
12205 <const name="Pulse" value="7">
12206 <desc>PulseAudio (Linux hosts only).</desc>
12207 </const>
12208 <const name="SolAudio" value="8">
12209 <desc>Solaris audio (Solaris hosts only).</desc>
12210 </const>
12211 </enum>
12212
12213 <enum
12214 name="AudioControllerType"
12215 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
12216 >
12217 <desc>
12218 Virtual audio controller type.
12219 </desc>
12220
12221 <const name="AC97" value="0"/>
12222 <const name="SB16" value="1"/>
12223 <const name="HDA" value="2"/>
12224 </enum>
12225
12226 <interface
12227 name="IAudioAdapter" extends="$unknown"
12228 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
12229 wsmap="managed"
12230 >
12231 <desc>
12232 The IAudioAdapter interface represents the virtual audio adapter of
12233 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
12234 </desc>
12235 <attribute name="enabled" type="boolean">
12236 <desc>
12237 Flag whether the audio adapter is present in the
12238 guest system. If disabled, the virtual guest hardware will
12239 not contain any audio adapter. Can only be changed when
12240 the VM is not running.
12241 </desc>
12242 </attribute>
12243 <attribute name="audioController" type="AudioControllerType">
12244 <desc>
12245 The audio hardware we emulate.
12246 </desc>
12247 </attribute>
12248 <attribute name="audioDriver" type="AudioDriverType">
12249 <desc>
12250 Audio driver the adapter is connected to. This setting
12251 can only be changed when the VM is not running.
12252 </desc>
12253 </attribute>
12254 </interface>
12255
12256 <!--
12257 // IVRDPServer
12258 /////////////////////////////////////////////////////////////////////////
12259 -->
12260
12261 <enum
12262 name="VRDPAuthType"
12263 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
12264 >
12265 <desc>
12266 VRDP authentication type.
12267 </desc>
12268
12269 <const name="Null" value="0">
12270 <desc>Null value, also means "no authentication".</desc>
12271 </const>
12272 <const name="External" value="1"/>
12273 <const name="Guest" value="2"/>
12274 </enum>
12275
12276 <interface
12277 name="IVRDPServer" extends="$unknown"
12278 uuid="7aeeb530-0b08-41fe-835d-9be9ec1dbe5c"
12279 wsmap="managed"
12280 >
12281 <attribute name="enabled" type="boolean">
12282 <desc>VRDP server status.</desc>
12283 </attribute>
12284
12285 <attribute name="ports" type="wstring">
12286 <desc>
12287 VRDP server port numbers. The server will try to bind to one of free ports from the list.
12288 <note>
12289 This is a string of comma separated TCP port numbers or port number ranges.
12290 Example <tt>5000,5010-5012,5015</tt>
12291 </note>
12292 </desc>
12293 </attribute>
12294
12295 <attribute name="netAddress" type="wstring">
12296 <desc>VRDP server address.</desc>
12297 </attribute>
12298
12299 <attribute name="authType" type="VRDPAuthType">
12300 <desc>VRDP authentication method.</desc>
12301 </attribute>
12302
12303 <attribute name="authTimeout" type="unsigned long">
12304 <desc>Timeout for guest authentication. Milliseconds.</desc>
12305 </attribute>
12306
12307 <attribute name="allowMultiConnection" type="boolean">
12308 <desc>
12309 Flag whether multiple simultaneous connections to the VM are permitted.
12310 Note that this will be replaced by a more powerful mechanism in the future.
12311 </desc>
12312 </attribute>
12313
12314 <attribute name="reuseSingleConnection" type="boolean">
12315 <desc>
12316 Flag whether the existing connection must be dropped and a new connection
12317 must be established by the VRDP server, when a new client connects in single
12318 connection mode.
12319 </desc>
12320 </attribute>
12321
12322 <attribute name="videoChannel" type="boolean">
12323 <desc>
12324 Flag whether RDP video channel is supported.
12325 </desc>
12326 </attribute>
12327
12328 <attribute name="videoChannelQuality" type="unsigned long">
12329 <desc>
12330 Image quality in percents.
12331 </desc>
12332 </attribute>
12333
12334 </interface>
12335
12336
12337 <!--
12338 // ISharedFolder
12339 /////////////////////////////////////////////////////////////////////////
12340 -->
12341
12342 <interface
12343 name="ISharedFolder" extends="$unknown"
12344 uuid="8388da11-b559-4574-a5b7-2bd7acd5cef8"
12345 wsmap="struct"
12346 >
12347 <desc>
12348 The ISharedFolder interface represents a folder in the host computer's
12349 file system accessible from the guest OS running inside a virtual
12350 machine using an associated logical name.
12351
12352 There are three types of shared folders:
12353 <ul>
12354 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12355 folders available to all virtual machines.</li>
12356 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12357 VM-specific shared folders available to the given virtual machine at
12358 startup.</li>
12359 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12360 VM-specific shared folders created in the session context (for
12361 example, when the virtual machine is running) and automatically
12362 discarded when the session is closed (the VM is powered off).</li>
12363 </ul>
12364
12365 Logical names of shared folders must be unique within the given scope
12366 (global, permanent or transient). However, they do not need to be unique
12367 across scopes. In this case, the definition of the shared folder in a
12368 more specific scope takes precedence over definitions in all other
12369 scopes. The order of precedence is (more specific to more general):
12370 <ol>
12371 <li>Transient definitions</li>
12372 <li>Permanent definitions</li>
12373 <li>Global definitions</li>
12374 </ol>
12375
12376 For example, if MyMachine has a shared folder named
12377 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12378 transient shared folder named <tt>C_DRIVE</tt> (that points
12379 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12380 of <tt>C_DRIVE</tt> in the guest OS so
12381 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12382 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12383 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12384 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12385 to <tt>C:\\</tt> if it still exists.
12386
12387 Note that permanent and transient shared folders of different machines
12388 are in different name spaces, so they don't overlap and don't need to
12389 have unique logical names.
12390
12391 <note>
12392 Global shared folders are not implemented in the current version of the
12393 product.
12394 </note>
12395 </desc>
12396
12397 <attribute name="name" type="wstring" readonly="yes">
12398 <desc>Logical name of the shared folder.</desc>
12399 </attribute>
12400
12401 <attribute name="hostPath" type="wstring" readonly="yes">
12402 <desc>Full path to the shared folder in the host file system.</desc>
12403 </attribute>
12404
12405 <attribute name="accessible" type="boolean" readonly="yes">
12406 <desc>
12407 Whether the folder defined by the host path is currently
12408 accessible or not.
12409 For example, the folder can be unaccessible if it is placed
12410 on the network share that is not available by the time
12411 this property is read.
12412 </desc>
12413 </attribute>
12414
12415 <attribute name="writable" type="boolean" readonly="yes">
12416 <desc>
12417 Whether the folder defined by the host path is writable or
12418 not.
12419 </desc>
12420 </attribute>
12421
12422 <attribute name="autoMount" type="boolean" readonly="yes">
12423 <desc>
12424 Whether the folder gets automatically mounted by the guest or not.
12425 </desc>
12426 </attribute>
12427
12428 <attribute name="lastAccessError" type="wstring" readonly="yes">
12429 <desc>
12430 Text message that represents the result of the last accessibility
12431 check.
12432
12433 Accessibility checks are performed each time the <link to="#accessible"/>
12434 attribute is read. An empty string is returned if the last
12435 accessibility check was successful. A non-empty string indicates a
12436 failure and should normally describe a reason of the failure (for
12437 example, a file read error).
12438 </desc>
12439 </attribute>
12440
12441 </interface>
12442
12443 <!--
12444 // ISession
12445 /////////////////////////////////////////////////////////////////////////
12446 -->
12447
12448 <interface
12449 name="IInternalSessionControl" extends="$unknown"
12450 uuid="ef059f1d-2273-4f81-9342-c152a0d2cd40"
12451 internal="yes"
12452 wsmap="suppress"
12453 >
12454 <method name="getPID">
12455 <desc>PID of the process that has created this Session object.
12456 </desc>
12457 <param name="pid" type="unsigned long" dir="return"/>
12458 </method>
12459
12460 <method name="getRemoteConsole">
12461 <desc>
12462 Returns the console object suitable for remote control.
12463
12464 <result name="VBOX_E_INVALID_VM_STATE">
12465 Session state prevents operation.
12466 </result>
12467 <result name="VBOX_E_INVALID_OBJECT_STATE">
12468 Session type prevents operation.
12469 </result>
12470
12471 </desc>
12472 <param name="console" type="IConsole" dir="return"/>
12473 </method>
12474
12475 <method name="assignMachine">
12476 <desc>
12477 Assigns the machine object associated with this direct-type
12478 session or informs the session that it will be a remote one
12479 (if @a machine == @c null).
12480
12481 <result name="VBOX_E_INVALID_VM_STATE">
12482 Session state prevents operation.
12483 </result>
12484 <result name="VBOX_E_INVALID_OBJECT_STATE">
12485 Session type prevents operation.
12486 </result>
12487
12488 </desc>
12489 <param name="machine" type="IMachine" dir="in"/>
12490 </method>
12491
12492 <method name="assignRemoteMachine">
12493 <desc>
12494 Assigns the machine and the (remote) console object associated with
12495 this remote-type session.
12496
12497 <result name="VBOX_E_INVALID_VM_STATE">
12498 Session state prevents operation.
12499 </result>
12500
12501 </desc>
12502 <param name="machine" type="IMachine" dir="in"/>
12503 <param name="console" type="IConsole" dir="in"/>
12504 </method>
12505
12506 <method name="updateMachineState">
12507 <desc>
12508 Updates the machine state in the VM process.
12509 Must be called only in certain cases
12510 (see the method implementation).
12511
12512 <result name="VBOX_E_INVALID_VM_STATE">
12513 Session state prevents operation.
12514 </result>
12515 <result name="VBOX_E_INVALID_OBJECT_STATE">
12516 Session type prevents operation.
12517 </result>
12518
12519 </desc>
12520 <param name="aMachineState" type="MachineState" dir="in"/>
12521 </method>
12522
12523 <method name="uninitialize">
12524 <desc>
12525 Uninitializes (closes) this session. Used by VirtualBox to close
12526 the corresponding remote session when the direct session dies
12527 or gets closed.
12528
12529 <result name="VBOX_E_INVALID_VM_STATE">
12530 Session state prevents operation.
12531 </result>
12532
12533 </desc>
12534 </method>
12535
12536 <method name="onNetworkAdapterChange">
12537 <desc>
12538 Triggered when settings of a network adapter of the
12539 associated virtual machine have changed.
12540
12541 <result name="VBOX_E_INVALID_VM_STATE">
12542 Session state prevents operation.
12543 </result>
12544 <result name="VBOX_E_INVALID_OBJECT_STATE">
12545 Session type prevents operation.
12546 </result>
12547
12548 </desc>
12549 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12550 <param name="changeAdapter" type="boolean" dir="in"/>
12551 </method>
12552
12553 <method name="onSerialPortChange">
12554 <desc>
12555 Triggered when settings of a serial port of the
12556 associated virtual machine have changed.
12557
12558 <result name="VBOX_E_INVALID_VM_STATE">
12559 Session state prevents operation.
12560 </result>
12561 <result name="VBOX_E_INVALID_OBJECT_STATE">
12562 Session type prevents operation.
12563 </result>
12564
12565 </desc>
12566 <param name="serialPort" type="ISerialPort" dir="in"/>
12567 </method>
12568
12569 <method name="onParallelPortChange">
12570 <desc>
12571 Triggered when settings of a parallel port of the
12572 associated virtual machine have changed.
12573
12574 <result name="VBOX_E_INVALID_VM_STATE">
12575 Session state prevents operation.
12576 </result>
12577 <result name="VBOX_E_INVALID_OBJECT_STATE">
12578 Session type prevents operation.
12579 </result>
12580
12581 </desc>
12582 <param name="parallelPort" type="IParallelPort" dir="in"/>
12583 </method>
12584
12585 <method name="onStorageControllerChange">
12586 <desc>
12587 Triggered when settings of a storage controller of the
12588 associated virtual machine have changed.
12589
12590 <result name="VBOX_E_INVALID_VM_STATE">
12591 Session state prevents operation.
12592 </result>
12593 <result name="VBOX_E_INVALID_OBJECT_STATE">
12594 Session type prevents operation.
12595 </result>
12596
12597 </desc>
12598 </method>
12599
12600 <method name="onMediumChange">
12601 <desc>
12602 Triggered when attached media of the
12603 associated virtual machine have changed.
12604
12605 <result name="VBOX_E_INVALID_VM_STATE">
12606 Session state prevents operation.
12607 </result>
12608 <result name="VBOX_E_INVALID_OBJECT_STATE">
12609 Session type prevents operation.
12610 </result>
12611
12612 </desc>
12613
12614 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12615 <param name="force" type="boolean" dir="in"/>
12616 </method>
12617
12618 <method name="onCPUChange">
12619 <desc>
12620 Notification when a CPU changes.
12621 </desc>
12622 <param name="cpu" type="unsigned long" dir="in">
12623 <desc>The CPU which changed</desc>
12624 </param>
12625 <param name="add" type="boolean" dir="in">
12626 <desc>Flag whether the CPU was added or removed</desc>
12627 </param>
12628 </method>
12629
12630 <method name="onCPUPriorityChange">
12631 <desc>
12632 Notification when the CPU priority changes.
12633 </desc>
12634 <param name="priority" type="unsigned long" dir="in">
12635 <desc>The new CPU priority value. (1-100)</desc>
12636 </param>
12637 </method>
12638
12639 <method name="onVRDPServerChange">
12640 <desc>
12641 Triggered when settings of the VRDP server object of the
12642 associated virtual machine have changed.
12643
12644 <result name="VBOX_E_INVALID_VM_STATE">
12645 Session state prevents operation.
12646 </result>
12647 <result name="VBOX_E_INVALID_OBJECT_STATE">
12648 Session type prevents operation.
12649 </result>
12650
12651 </desc>
12652 <param name="restart" type="boolean" dir="in">
12653 <desc>Flag whether the server must be restarted</desc>
12654 </param>
12655 </method>
12656
12657 <method name="onUSBControllerChange">
12658 <desc>
12659 Triggered when settings of the USB controller object of the
12660 associated virtual machine have changed.
12661
12662 <result name="VBOX_E_INVALID_VM_STATE">
12663 Session state prevents operation.
12664 </result>
12665 <result name="VBOX_E_INVALID_OBJECT_STATE">
12666 Session type prevents operation.
12667 </result>
12668
12669 </desc>
12670 </method>
12671
12672 <method name="onSharedFolderChange">
12673 <desc>
12674 Triggered when a permanent (global or machine) shared folder has been
12675 created or removed.
12676 <note>
12677 We don't pass shared folder parameters in this notification because
12678 the order in which parallel notifications are delivered is not defined,
12679 therefore it could happen that these parameters were outdated by the
12680 time of processing this notification.
12681 </note>
12682
12683 <result name="VBOX_E_INVALID_VM_STATE">
12684 Session state prevents operation.
12685 </result>
12686 <result name="VBOX_E_INVALID_OBJECT_STATE">
12687 Session type prevents operation.
12688 </result>
12689
12690 </desc>
12691 <param name="global" type="boolean" dir="in"/>
12692 </method>
12693
12694 <method name="onUSBDeviceAttach">
12695 <desc>
12696 Triggered when a request to capture a USB device (as a result
12697 of matched USB filters or direct call to
12698 <link to="IConsole::attachUSBDevice"/>) has completed.
12699 A @c null @a error object means success, otherwise it
12700 describes a failure.
12701
12702 <result name="VBOX_E_INVALID_VM_STATE">
12703 Session state prevents operation.
12704 </result>
12705 <result name="VBOX_E_INVALID_OBJECT_STATE">
12706 Session type prevents operation.
12707 </result>
12708
12709 </desc>
12710 <param name="device" type="IUSBDevice" dir="in"/>
12711 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12712 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12713 </method>
12714
12715 <method name="onUSBDeviceDetach">
12716 <desc>
12717 Triggered when a request to release the USB device (as a result
12718 of machine termination or direct call to
12719 <link to="IConsole::detachUSBDevice"/>) has completed.
12720 A @c null @a error object means success, otherwise it
12721 describes a failure.
12722
12723 <result name="VBOX_E_INVALID_VM_STATE">
12724 Session state prevents operation.
12725 </result>
12726 <result name="VBOX_E_INVALID_OBJECT_STATE">
12727 Session type prevents operation.
12728 </result>
12729
12730 </desc>
12731 <param name="id" type="uuid" mod="string" dir="in"/>
12732 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12733 </method>
12734
12735 <method name="onShowWindow">
12736 <desc>
12737 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12738 <link to="IMachine::showConsoleWindow"/> in order to notify
12739 console listeners
12740 <link to="ICanShowWindowEvent"/>
12741 and <link to="IShowWindowEvent"/>.
12742
12743 <result name="VBOX_E_INVALID_OBJECT_STATE">
12744 Session type prevents operation.
12745 </result>
12746
12747 </desc>
12748 <param name="check" type="boolean" dir="in"/>
12749 <param name="canShow" type="boolean" dir="out"/>
12750 <param name="winId" type="unsigned long long" dir="out"/>
12751 </method>
12752
12753 <method name="accessGuestProperty">
12754 <desc>
12755 Called by <link to="IMachine::getGuestProperty"/> and by
12756 <link to="IMachine::setGuestProperty"/> in order to read and
12757 modify guest properties.
12758
12759 <result name="VBOX_E_INVALID_VM_STATE">
12760 Machine session is not open.
12761 </result>
12762 <result name="VBOX_E_INVALID_OBJECT_STATE">
12763 Session type is not direct.
12764 </result>
12765
12766 </desc>
12767 <param name="name" type="wstring" dir="in"/>
12768 <param name="value" type="wstring" dir="in"/>
12769 <param name="flags" type="wstring" dir="in"/>
12770 <param name="isSetter" type="boolean" dir="in"/>
12771 <param name="retValue" type="wstring" dir="out"/>
12772 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12773 <param name="retFlags" type="wstring" dir="out"/>
12774 </method>
12775
12776 <method name="enumerateGuestProperties">
12777 <desc>
12778 Return a list of the guest properties matching a set of patterns along
12779 with their values, time stamps and flags.
12780
12781 <result name="VBOX_E_INVALID_VM_STATE">
12782 Machine session is not open.
12783 </result>
12784 <result name="VBOX_E_INVALID_OBJECT_STATE">
12785 Session type is not direct.
12786 </result>
12787
12788 </desc>
12789 <param name="patterns" type="wstring" dir="in">
12790 <desc>
12791 The patterns to match the properties against as a comma-separated
12792 string. If this is empty, all properties currently set will be
12793 returned.
12794 </desc>
12795 </param>
12796 <param name="key" type="wstring" dir="out" safearray="yes">
12797 <desc>
12798 The key names of the properties returned.
12799 </desc>
12800 </param>
12801 <param name="value" type="wstring" dir="out" safearray="yes">
12802 <desc>
12803 The values of the properties returned. The array entries match the
12804 corresponding entries in the @a key array.
12805 </desc>
12806 </param>
12807 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12808 <desc>
12809 The time stamps of the properties returned. The array entries match
12810 the corresponding entries in the @a key array.
12811 </desc>
12812 </param>
12813 <param name="flags" type="wstring" dir="out" safearray="yes">
12814 <desc>
12815 The flags of the properties returned. The array entries match the
12816 corresponding entries in the @a key array.
12817 </desc>
12818 </param>
12819 </method>
12820
12821 <method name="onlineMergeMedium">
12822 <desc>
12823 Triggers online merging of a hard disk. Used internally when deleting
12824 a snapshot while a VM referring to the same hard disk chain is running.
12825
12826 <result name="VBOX_E_INVALID_VM_STATE">
12827 Machine session is not open.
12828 </result>
12829 <result name="VBOX_E_INVALID_OBJECT_STATE">
12830 Session type is not direct.
12831 </result>
12832
12833 </desc>
12834 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
12835 <desc>The medium attachment to identify the medium chain.</desc>
12836 </param>
12837 <param name="sourceIdx" type="unsigned long" dir="in">
12838 <desc>The index of the source image in the chain.
12839 Redundant, but drastically reduces IPC.</desc>
12840 </param>
12841 <param name="targetIdx" type="unsigned long" dir="in">
12842 <desc>The index of the target image in the chain.
12843 Redundant, but drastically reduces IPC.</desc>
12844 </param>
12845 <param name="source" type="IMedium" dir="in">
12846 <desc>Merge source medium.</desc>
12847 </param>
12848 <param name="target" type="IMedium" dir="in">
12849 <desc>Merge target medium.</desc>
12850 </param>
12851 <param name="mergeForward" type="boolean" dir="in">
12852 <desc>Merge direction.</desc>
12853 </param>
12854 <param name="parentForTarget" type="IMedium" dir="in">
12855 <desc>For forward merges: new parent for target medium.</desc>
12856 </param>
12857 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
12858 <desc>For backward merges: list of media which need their parent UUID
12859 updated.</desc>
12860 </param>
12861 <param name="progress" type="IProgress" dir="in">
12862 <desc>
12863 Progress object for this operation.
12864 </desc>
12865 </param>
12866 </method>
12867
12868 </interface>
12869
12870 <interface
12871 name="ISession" extends="$unknown"
12872 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12873 wsmap="managed"
12874 >
12875 <desc>
12876 The ISession interface represents a client process and allows for locking
12877 virtual machines (represented by IMachine objects) to prevent conflicting
12878 changes to the machine.
12879
12880 Any caller wishing to manipulate a virtual machine needs to create a session
12881 object first, which lives in its own process space. Such session objects are
12882 then associated with <link to="IMachine" /> objects living in the VirtualBox
12883 server process to coordinate such changes.
12884
12885 There are two typical scenarios in which sessions are used:
12886
12887 <ul>
12888 <li>To alter machine settings or control a running virtual machine, one
12889 needs to lock a machine for a given session (client process) by calling
12890 <link to="IMachine::lockMachine"/>.
12891
12892 Whereas multiple sessions may control a running virtual machine, only
12893 one process can obtain a write lock on the machine to prevent conflicting
12894 changes. A write lock is also needed if a process wants to actually run a
12895 virtual machine in its own context, such as the VirtualBox GUI or
12896 VBoxHeadless front-ends. They must also lock a machine for their own
12897 sessions before they are allowed to power up the virtual machine.
12898
12899 As a result, no machine settings can be altered while another process is
12900 already using it, either because that process is modifying machine settings
12901 or because the machine is running.
12902 </li>
12903 <li>
12904 To start a VM using one of the existing VirtualBox front-ends (e.g. the
12905 VirtualBox GUI or VBoxHeadless), one would use
12906 <link to="IMachine::launchVMProcess"/>, which also takes a session object
12907 as its first parameter. This session then identifies the caller and lets the
12908 caller control the started machine (for example, pause machine execution or
12909 power it down) as well as be notified about machine execution state changes.
12910 </li>
12911 </ul>
12912
12913 How sessions objects are created in a client process depends on whether you use
12914 the Main API via COM or via the webservice:
12915
12916 <ul>
12917 <li>When using the COM API directly, an object of the Session class from the
12918 VirtualBox type library needs to be created. In regular COM C++ client code,
12919 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12920 This object will then act as a local session object in further calls to open
12921 a session.
12922 </li>
12923
12924 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12925 a session object automatically whenever <link to="IWebsessionManager::logon" />
12926 is called. A managed object reference to that session object can be retrieved by
12927 calling <link to="IWebsessionManager::getSessionObject" />.
12928 </li>
12929 </ul>
12930 </desc>
12931
12932 <attribute name="state" type="SessionState" readonly="yes">
12933 <desc>Current state of this session.</desc>
12934 </attribute>
12935
12936 <attribute name="type" type="SessionType" readonly="yes">
12937 <desc>
12938 Type of this session. The value of this attribute is valid only
12939 if the session currently has a machine locked (i.e. its
12940 <link to="#state" /> is Locked), otherwise an error will be returned.
12941 </desc>
12942 </attribute>
12943
12944 <attribute name="machine" type="IMachine" readonly="yes">
12945 <desc>Machine object associated with this session.</desc>
12946 </attribute>
12947
12948 <attribute name="console" type="IConsole" readonly="yes">
12949 <desc>Console object associated with this session.</desc>
12950 </attribute>
12951
12952 <method name="unlockMachine">
12953 <desc>
12954 Unlocks a machine that was previously locked for the current session.
12955
12956 Calling this method is required every time a machine has been locked
12957 for a particular session using the <link to="IMachine::launchVMProcess" />
12958 or <link to="IMachine::lockMachine" /> calls. Otherwise the state of
12959 the machine will be set to <link to="MachineState_Aborted" /> on the
12960 server, and changes made to the machine settings will be lost.
12961
12962 Generally, it is recommended to unlock all machines explicitly
12963 before terminating the application (regardless of the reason for
12964 the termination).
12965
12966 <note>
12967 Do not expect the session state (<link to="ISession::state" />
12968 to return to "Unlocked" immediately after you invoke this method,
12969 particularly if you have started a new VM process. The session
12970 state will automatically return to "Unlocked" once the VM is no
12971 longer executing, which can of course take a very long time.
12972 </note>
12973
12974 <result name="E_UNEXPECTED">
12975 Session is not locked.
12976 </result>
12977
12978 </desc>
12979 </method>
12980
12981 </interface>
12982
12983 <!--
12984 // IStorageController
12985 /////////////////////////////////////////////////////////////////////////
12986 -->
12987
12988 <enum
12989 name="StorageBus"
12990 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
12991 >
12992 <desc>
12993 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy);
12994 see <link to="IStorageController::bus" />.
12995 </desc>
12996 <const name="Null" value="0">
12997 <desc>@c null value. Never used by the API.</desc>
12998 </const>
12999 <const name="IDE" value="1"/>
13000 <const name="SATA" value="2"/>
13001 <const name="SCSI" value="3"/>
13002 <const name="Floppy" value="4"/>
13003 <const name="SAS" value="5"/>
13004 </enum>
13005
13006 <enum
13007 name="StorageControllerType"
13008 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
13009 >
13010 <desc>
13011 The exact variant of storage controller hardware presented
13012 to the guest; see <link to="IStorageController::controllerType" />.
13013 </desc>
13014
13015 <const name="Null" value="0">
13016 <desc>@c null value. Never used by the API.</desc>
13017 </const>
13018 <const name="LsiLogic" value="1">
13019 <desc>A SCSI controller of the LsiLogic variant.</desc>
13020 </const>
13021 <const name="BusLogic" value="2">
13022 <desc>A SCSI controller of the BusLogic variant.</desc>
13023 </const>
13024 <const name="IntelAhci" value="3">
13025 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
13026 </const>
13027 <const name="PIIX3" value="4">
13028 <desc>An IDE controller of the PIIX3 variant.</desc>
13029 </const>
13030 <const name="PIIX4" value="5">
13031 <desc>An IDE controller of the PIIX4 variant.</desc>
13032 </const>
13033 <const name="ICH6" value="6">
13034 <desc>An IDE controller of the ICH6 variant.</desc>
13035 </const>
13036 <const name="I82078" value="7">
13037 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
13038 </const>
13039 <const name="LsiLogicSas" value="8">
13040 <desc>A variant of the LsiLogic controller using SAS.</desc>
13041 </const>
13042 </enum>
13043
13044 <interface
13045 name="IStorageController" extends="$unknown"
13046 uuid="fd93adc0-bbaa-4256-9e6e-00e29f9151c9"
13047 wsmap="managed"
13048 >
13049 <desc>
13050 Represents a storage controller that is attached to a virtual machine
13051 (<link to="IMachine" />). Just as drives (hard disks, DVDs, FDs) are
13052 attached to storage controllers in a real computer, virtual drives
13053 (represented by <link to="IMediumAttachment" />) are attached to virtual
13054 storage controllers, represented by this interface.
13055
13056 As opposed to physical hardware, VirtualBox has a very generic concept
13057 of a storage controller, and for purposes of the Main API, all virtual
13058 storage is attached to virtual machines via instances of this interface.
13059 There are five types of such virtual storage controllers: IDE, SCSI, SATA,
13060 SAS and Floppy (see <link to="#bus" />). Depending on which of these four
13061 is used, certain sub-types may be available and can be selected in
13062 <link to="#controllerType" />.
13063
13064 Depending on these settings, the guest operating system might see
13065 significantly different virtual hardware.
13066 </desc>
13067
13068 <attribute name="name" type="wstring" readonly="yes">
13069 <desc>
13070 Name of the storage controller, as originally specified with
13071 <link to="IMachine::addStorageController" />. This then uniquely
13072 identifies this controller with other method calls such as
13073 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
13074 </desc>
13075 </attribute>
13076
13077 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
13078 <desc>
13079 Maximum number of devices which can be attached to one port.
13080 </desc>
13081 </attribute>
13082
13083 <attribute name="minPortCount" type="unsigned long" readonly="yes">
13084 <desc>
13085 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
13086 </desc>
13087 </attribute>
13088
13089 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
13090 <desc>
13091 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
13092 </desc>
13093 </attribute>
13094
13095 <attribute name="instance" type="unsigned long">
13096 <desc>
13097 The instance number of the device in the running VM.
13098 </desc>
13099 </attribute>
13100
13101 <attribute name="portCount" type="unsigned long">
13102 <desc>
13103 The number of currently usable ports on the controller.
13104 The minimum and maximum number of ports for one controller are
13105 stored in <link to="IStorageController::minPortCount"/>
13106 and <link to="IStorageController::maxPortCount"/>.
13107 </desc>
13108 </attribute>
13109
13110 <attribute name="bus" type="StorageBus" readonly="yes">
13111 <desc>
13112 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy).
13113 </desc>
13114 </attribute>
13115
13116 <attribute name="controllerType" type="StorageControllerType">
13117 <desc>
13118 The exact variant of storage controller hardware presented
13119 to the guest.
13120 Depending on this value, VirtualBox will provide a different
13121 virtual storage controller hardware to the guest.
13122 For SATA, SAS and floppy controllers, only one variant is
13123 available, but for IDE and SCSI, there are several.
13124
13125 For SCSI controllers, the default type is LsiLogic.
13126 </desc>
13127 </attribute>
13128
13129 <attribute name="useHostIOCache" type="boolean">
13130 <desc>
13131 If true, the storage controller emulation will use a dedicated I/O thread, enable the host I/O
13132 caches and use synchronous file APIs on the host. This was the only option in the API before
13133 VirtualBox 3.2 and is still the default for IDE controllers.
13134
13135 If false, the host I/O cache will be disabled for image files attached to this storage controller.
13136 Instead, the storage controller emulation will use asynchronous I/O APIs on the host. This makes
13137 it possible to turn off the host I/O caches because the emulation can handle unaligned access to
13138 the file. This should be used on OS X and Linux hosts if a high I/O load is expected or many
13139 virtual machines are running at the same time to prevent I/O cache related hangs.
13140 This option new with the API of VirtualBox 3.2 and is now the default for non-IDE storage controllers.
13141 </desc>
13142 </attribute>
13143
13144 <method name="getIDEEmulationPort">
13145 <desc>
13146 Gets the corresponding port number which is emulated as an IDE device.
13147 Works only with SATA controllers.
13148
13149 <result name="E_INVALIDARG">
13150 The @a devicePosition is not in the range 0 to 3.
13151 </result>
13152 <result name="E_NOTIMPL">
13153 The storage controller type is not SATAIntelAhci.
13154 </result>
13155
13156 </desc>
13157 <param name="devicePosition" type="long" dir="in"/>
13158 <param name="portNumber" type="long" dir="return"/>
13159 </method>
13160
13161 <method name="setIDEEmulationPort">
13162 <desc>
13163 Sets the port number which is emulated as an IDE device.
13164 Works only with SATA controllers.
13165
13166 <result name="E_INVALIDARG">
13167 The @a devicePosition is not in the range 0 to 3 or the
13168 @a portNumber is not in the range 0 to 29.
13169 </result>
13170 <result name="E_NOTIMPL">
13171 The storage controller type is not SATAIntelAhci.
13172 </result>
13173
13174 </desc>
13175 <param name="devicePosition" type="long" dir="in"/>
13176 <param name="portNumber" type="long" dir="in"/>
13177 </method>
13178
13179 </interface>
13180
13181<if target="wsdl">
13182
13183 <!--
13184 // IManagedObjectRef
13185 /////////////////////////////////////////////////////////////////////////
13186 -->
13187
13188 <interface
13189 name="IManagedObjectRef" extends="$unknown"
13190 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
13191 internal="yes"
13192 wsmap="managed"
13193 wscpp="hardcoded"
13194 >
13195 <desc>
13196 Managed object reference.
13197
13198 Only within the webservice, a managed object reference (which is really
13199 an opaque number) allows a webservice client to address an object
13200 that lives in the address space of the webservice server.
13201
13202 Behind each managed object reference, there is a COM object that lives
13203 in the webservice server's address space. The COM object is not freed
13204 until the managed object reference is released, either by an explicit
13205 call to <link to="IManagedObjectRef::release" /> or by logging off from
13206 the webservice (<link to="IWebsessionManager::logoff" />), which releases
13207 all objects created during the webservice session.
13208
13209 Whenever a method call of the VirtualBox API returns a COM object, the
13210 webservice representation of that method will instead return a
13211 managed object reference, which can then be used to invoke methods
13212 on that object.
13213 </desc>
13214
13215 <method name="getInterfaceName">
13216 <desc>
13217 Returns the name of the interface that this managed object represents,
13218 for example, "IMachine", as a string.
13219 </desc>
13220 <param name="return" type="wstring" dir="return"/>
13221 </method>
13222
13223 <method name="release">
13224 <desc>
13225 Releases this managed object reference and frees the resources that
13226 were allocated for it in the webservice server process. After calling
13227 this method, the identifier of the reference can no longer be used.
13228 </desc>
13229 </method>
13230
13231 </interface>
13232
13233 <!--
13234 // IWebsessionManager
13235 /////////////////////////////////////////////////////////////////////////
13236 -->
13237
13238 <interface
13239 name="IWebsessionManager" extends="$unknown"
13240 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
13241 internal="yes"
13242 wsmap="global"
13243 wscpp="hardcoded"
13244 >
13245 <desc>
13246 Websession manager. This provides essential services
13247 to webservice clients.
13248 </desc>
13249 <method name="logon">
13250 <desc>
13251 Logs a new client onto the webservice and returns a managed object reference to
13252 the IVirtualBox instance, which the client can then use as a basis to further
13253 queries, since all calls to the VirtualBox API are based on the IVirtualBox
13254 interface, in one way or the other.
13255 </desc>
13256 <param name="username" type="wstring" dir="in"/>
13257 <param name="password" type="wstring" dir="in"/>
13258 <param name="return" type="IVirtualBox" dir="return"/>
13259 </method>
13260
13261 <method name="getSessionObject">
13262 <desc>
13263 Returns a managed object reference to the internal ISession object that was created
13264 for this web service session when the client logged on.
13265
13266 <see>ISession</see>
13267 </desc>
13268 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13269 <param name="return" type="ISession" dir="return"/>
13270 </method>
13271
13272 <method name="logoff">
13273 <desc>
13274 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
13275 and destroys all resources associated with the session (most importantly, all
13276 managed objects created in the server while the session was active).
13277 </desc>
13278 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13279 </method>
13280
13281 </interface>
13282
13283</if>
13284
13285 <!--
13286 // IPerformanceCollector & friends
13287 /////////////////////////////////////////////////////////////////////////
13288 -->
13289
13290 <interface
13291 name="IPerformanceMetric" extends="$unknown"
13292 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
13293 >
13294 <desc>
13295 The IPerformanceMetric interface represents parameters of the given
13296 performance metric.
13297 </desc>
13298
13299 <attribute name="metricName" type="wstring" readonly="yes">
13300 <desc>
13301 Name of the metric.
13302 </desc>
13303 </attribute>
13304
13305 <attribute name="object" type="$unknown" readonly="yes">
13306 <desc>
13307 Object this metric belongs to.
13308 </desc>
13309 </attribute>
13310
13311 <attribute name="description" type="wstring" readonly="yes">
13312 <desc>
13313 Textual description of the metric.
13314 </desc>
13315 </attribute>
13316
13317 <attribute name="period" type="unsigned long" readonly="yes">
13318 <desc>
13319 Time interval between samples, measured in seconds.
13320 </desc>
13321 </attribute>
13322
13323 <attribute name="count" type="unsigned long" readonly="yes">
13324 <desc>
13325 Number of recent samples retained by the performance collector for this
13326 metric.
13327
13328 When the collected sample count exceeds this number, older samples
13329 are discarded.
13330 </desc>
13331 </attribute>
13332
13333 <attribute name="unit" type="wstring" readonly="yes">
13334 <desc>
13335 Unit of measurement.
13336 </desc>
13337 </attribute>
13338
13339 <attribute name="minimumValue" type="long" readonly="yes">
13340 <desc>
13341 Minimum possible value of this metric.
13342 </desc>
13343 </attribute>
13344
13345 <attribute name="maximumValue" type="long" readonly="yes">
13346 <desc>
13347 Maximum possible value of this metric.
13348 </desc>
13349 </attribute>
13350 </interface>
13351
13352 <interface
13353 name="IPerformanceCollector" extends="$unknown"
13354 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
13355 wsmap="managed"
13356 >
13357 <desc>
13358 The IPerformanceCollector interface represents a service that collects
13359 and stores performance metrics data.
13360
13361 Performance metrics are associated with objects of interfaces like IHost
13362 and IMachine. Each object has a distinct set of performance metrics. The
13363 set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
13364
13365 Metric data is collected at the specified intervals and is retained
13366 internally. The interval and the number of retained samples can be set
13367 with <link to="IPerformanceCollector::setupMetrics" />. Both metric data
13368 and collection settings are not persistent, they are discarded as soon as
13369 VBoxSVC process terminates. Moreover, metric settings and data associated
13370 with a particular VM only exist while VM is running. They disappear as
13371 soon as VM shuts down. It is not possible to set up metrics for machines
13372 that are powered off. One needs to start VM first, then set up metric
13373 collection parameters.
13374
13375 Metrics are organized hierarchically, with each level separated by a
13376 slash (/) character. Generally, the scheme for metric names is like this:
13377
13378 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
13379
13380 "Category/Metric" together form the base metric name. A base metric is
13381 the smallest unit for which a sampling interval and the number of
13382 retained samples can be set. Only base metrics can be enabled and
13383 disabled. All sub-metrics are collected when their base metric is
13384 collected. Collected values for any set of sub-metrics can be queried
13385 with <link to="IPerformanceCollector::queryMetricsData" />.
13386
13387 For example "CPU/Load/User:avg" metric name stands for the "CPU"
13388 category, "Load" metric, "User" submetric, "average" aggregate. An
13389 aggregate function is computed over all retained data. Valid aggregate
13390 functions are:
13391
13392 <ul>
13393 <li>avg -- average</li>
13394 <li>min -- minimum</li>
13395 <li>max -- maximum</li>
13396 </ul>
13397
13398 When setting up metric parameters, querying metric data, enabling or
13399 disabling metrics wildcards can be used in metric names to specify a
13400 subset of metrics. For example, to select all CPU-related metrics
13401 use <tt>CPU/*</tt>, all averages can be queried using <tt>*:avg</tt> and
13402 so on. To query metric values without aggregates <tt>*:</tt> can be used.
13403
13404 The valid names for base metrics are:
13405
13406 <ul>
13407 <li>CPU/Load</li>
13408 <li>CPU/MHz</li>
13409 <li>RAM/Usage</li>
13410 </ul>
13411
13412 The general sequence for collecting and retrieving the metrics is:
13413 <ul>
13414 <li>
13415 Obtain an instance of IPerformanceCollector with
13416 <link to="IVirtualBox::performanceCollector" />
13417 </li>
13418 <li>
13419 Allocate and populate an array with references to objects the metrics
13420 will be collected for. Use references to IHost and IMachine objects.
13421 </li>
13422 <li>
13423 Allocate and populate an array with base metric names the data will
13424 be collected for.
13425 </li>
13426 <li>
13427 Call <link to="IPerformanceCollector::setupMetrics" />. From now on
13428 the metric data will be collected and stored.
13429 </li>
13430 <li>
13431 Wait for the data to get collected.
13432 </li>
13433 <li>
13434 Allocate and populate an array with references to objects the metric
13435 values will be queried for. You can re-use the object array used for
13436 setting base metrics.
13437 </li>
13438 <li>
13439 Allocate and populate an array with metric names the data will be
13440 collected for. Note that metric names differ from base metric names.
13441 </li>
13442 <li>
13443 Call <link to="IPerformanceCollector::queryMetricsData" />. The data
13444 that have been collected so far are returned. Note that the values
13445 are still retained internally and data collection continues.
13446 </li>
13447 </ul>
13448
13449 For an example of usage refer to the following files in VirtualBox SDK:
13450 <ul>
13451 <li>
13452 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13453 </li>
13454 <li>
13455 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13456 </li>
13457 </ul>
13458 </desc>
13459
13460 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13461 <desc>
13462 Array of unique names of metrics.
13463
13464 This array represents all metrics supported by the performance
13465 collector. Individual objects do not necessarily support all of them.
13466 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13467 list of supported metrics for a particular object.
13468 </desc>
13469 </attribute>
13470
13471 <method name="getMetrics">
13472 <desc>
13473 Returns parameters of specified metrics for a set of objects.
13474 <note>
13475 @c Null metrics array means all metrics. @c Null object array means
13476 all existing objects.
13477 </note>
13478 </desc>
13479 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13480 <desc>
13481 Metric name filter. Currently, only a comma-separated list of metrics
13482 is supported.
13483 </desc>
13484 </param>
13485 <param name="objects" type="$unknown" dir="in" safearray="yes">
13486 <desc>
13487 Set of objects to return metric parameters for.
13488 </desc>
13489 </param>
13490 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13491 <desc>
13492 Array of returned metric parameters.
13493 </desc>
13494 </param>
13495 </method>
13496
13497 <method name="setupMetrics">
13498 <desc>
13499 Sets parameters of specified base metrics for a set of objects. Returns
13500 an array of <link to="IPerformanceMetric" /> describing the metrics
13501 have been affected.
13502 <note>
13503 @c Null or empty metric name array means all metrics. @c Null or
13504 empty object array means all existing objects. If metric name array
13505 contains a single element and object array contains many, the single
13506 metric name array element is applied to each object array element to
13507 form metric/object pairs.
13508 </note>
13509 </desc>
13510 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13511 <desc>
13512 Metric name filter. Comma-separated list of metrics with wildcard
13513 support.
13514 </desc>
13515 </param>
13516 <param name="objects" type="$unknown" dir="in" safearray="yes">
13517 <desc>
13518 Set of objects to setup metric parameters for.
13519 </desc>
13520 </param>
13521 <param name="period" type="unsigned long" dir="in">
13522 <desc>
13523 Time interval in seconds between two consecutive samples of
13524 performance data.
13525 </desc>
13526 </param>
13527 <param name="count" type="unsigned long" dir="in">
13528 <desc>
13529 Number of samples to retain in performance data history. Older
13530 samples get discarded.
13531 </desc>
13532 </param>
13533 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13534 <desc>
13535 Array of metrics that have been modified by the call to this method.
13536 </desc>
13537 </param>
13538 </method>
13539
13540 <method name="enableMetrics">
13541 <desc>
13542 Turns on collecting specified base metrics. Returns an array of
13543 <link to="IPerformanceMetric" /> describing the metrics have been
13544 affected.
13545 <note>
13546 @c Null or empty metric name array means all metrics. @c Null or
13547 empty object array means all existing objects. If metric name array
13548 contains a single element and object array contains many, the single
13549 metric name array element is applied to each object array element to
13550 form metric/object pairs.
13551 </note>
13552 </desc>
13553 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13554 <desc>
13555 Metric name filter. Comma-separated list of metrics with wildcard
13556 support.
13557 </desc>
13558 </param>
13559 <param name="objects" type="$unknown" dir="in" safearray="yes">
13560 <desc>
13561 Set of objects to enable metrics for.
13562 </desc>
13563 </param>
13564 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13565 <desc>
13566 Array of metrics that have been modified by the call to this method.
13567 </desc>
13568 </param>
13569 </method>
13570
13571 <method name="disableMetrics">
13572 <desc>
13573 Turns off collecting specified base metrics. Returns an array of
13574 <link to="IPerformanceMetric" /> describing the metrics have been
13575 affected.
13576 <note>
13577 @c Null or empty metric name array means all metrics. @c Null or
13578 empty object array means all existing objects. If metric name array
13579 contains a single element and object array contains many, the single
13580 metric name array element is applied to each object array element to
13581 form metric/object pairs.
13582 </note>
13583 </desc>
13584 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13585 <desc>
13586 Metric name filter. Comma-separated list of metrics with wildcard
13587 support.
13588 </desc>
13589 </param>
13590 <param name="objects" type="$unknown" dir="in" safearray="yes">
13591 <desc>
13592 Set of objects to disable metrics for.
13593 </desc>
13594 </param>
13595 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13596 <desc>
13597 Array of metrics that have been modified by the call to this method.
13598 </desc>
13599 </param>
13600 </method>
13601
13602 <method name="queryMetricsData">
13603 <desc>
13604 Queries collected metrics data for a set of objects.
13605
13606 The data itself and related metric information are returned in seven
13607 parallel and one flattened array of arrays. Elements of
13608 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13609 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13610 the same index describe one set of values corresponding to a single
13611 metric.
13612
13613 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13614 start and length of a sub-array is indicated by
13615 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13616 value for metric <tt>metricNames[i]</tt> is at
13617 <tt>returnData[returnIndices[i]]</tt>.
13618
13619 <note>
13620 @c Null or empty metric name array means all metrics. @c Null or
13621 empty object array means all existing objects. If metric name array
13622 contains a single element and object array contains many, the single
13623 metric name array element is applied to each object array element to
13624 form metric/object pairs.
13625 </note>
13626 <note>
13627 Data collection continues behind the scenes after call to @c
13628 queryMetricsData. The return data can be seen as the snapshot of the
13629 current state at the time of @c queryMetricsData call. The internally
13630 kept metric values are not cleared by the call. This makes possible
13631 querying different subsets of metrics or aggregates with subsequent
13632 calls. If periodic querying is needed it is highly suggested to query
13633 the values with @c interval*count period to avoid confusion. This way
13634 a completely new set of data values will be provided by each query.
13635 </note>
13636 </desc>
13637 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13638 <desc>
13639 Metric name filter. Comma-separated list of metrics with wildcard
13640 support.
13641 </desc>
13642 </param>
13643 <param name="objects" type="$unknown" dir="in" safearray="yes">
13644 <desc>
13645 Set of objects to query metrics for.
13646 </desc>
13647 </param>
13648 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13649 <desc>
13650 Names of metrics returned in @c returnData.
13651 </desc>
13652 </param>
13653 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13654 <desc>
13655 Objects associated with metrics returned in @c returnData.
13656 </desc>
13657 </param>
13658 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13659 <desc>
13660 Units of measurement for each returned metric.
13661 </desc>
13662 </param>
13663 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13664 <desc>
13665 Divisor that should be applied to return values in order to get
13666 floating point values. For example:
13667 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13668 will retrieve the floating point value of i-th sample of the first
13669 metric.
13670 </desc>
13671 </param>
13672 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13673 <desc>
13674 Sequence numbers of the first elements of value sequences of
13675 particular metrics returned in @c returnData. For aggregate metrics
13676 it is the sequence number of the sample the aggregate started
13677 calculation from.
13678 </desc>
13679 </param>
13680 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13681 <desc>
13682 Indices of the first elements of value sequences of particular
13683 metrics returned in @c returnData.
13684 </desc>
13685 </param>
13686 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13687 <desc>
13688 Lengths of value sequences of particular metrics.
13689 </desc>
13690 </param>
13691 <param name="returnData" type="long" dir="return" safearray="yes">
13692 <desc>
13693 Flattened array of all metric data containing sequences of values for
13694 each metric.
13695 </desc>
13696 </param>
13697 </method>
13698
13699 </interface>
13700 <enum
13701 name="NATAliasMode"
13702 uuid="67772168-50d9-11df-9669-7fb714ee4fa1">
13703 <desc></desc>
13704 <const name="AliasLog" value="0x1">
13705 <desc></desc>
13706 </const>
13707 <const name="AliasProxyOnly" value="0x02">
13708 <desc></desc>
13709 </const>
13710 <const name="AliasUseSamePorts" value="0x04">
13711 <desc></desc>
13712 </const>
13713 </enum>
13714 <enum
13715 name="NATProtocol"
13716 uuid="e90164be-eb03-11de-94af-fff9b1c1b19f"
13717 >
13718 <desc>Protocol definitions used with NAT port-forwarding rules.</desc>
13719 <const name="UDP" value="0">
13720 <desc>Port-forwarding uses UDP protocol.</desc>
13721 </const>
13722 <const name="TCP" value="1">
13723 <desc>Port-forwarding uses TCP protocol.</desc>
13724 </const>
13725 </enum>
13726
13727 <interface
13728 name="INATEngine" extends="$unknown"
13729 uuid="4b286616-eb03-11de-b0fb-1701eca42246"
13730 wsmap="managed"
13731 >
13732 <desc>Interface for managing a NAT engine which is used with a virtual machine. This
13733 allows for changing NAT behavior such as port-forwarding rules. This interface is
13734 used in the <link to="INetworkAdapter::natDriver" /> attribute.</desc>
13735 <attribute name="network" type="wstring">
13736 <desc>The network attribute of the NAT engine (the same value is used with built-in
13737 DHCP server to fill corresponding fields of DHCP leases).</desc>
13738 </attribute>
13739 <attribute name="hostIP" type="wstring">
13740 <desc>IP of host interface to bind all opened sockets to.
13741 <note>Changing this does not change binding of port forwarding.</note>
13742 </desc>
13743 </attribute>
13744 <attribute name="tftpPrefix" type="wstring">
13745 <desc>TFTP prefix attribute which is used with the built-in DHCP server to fill
13746 the corresponding fields of DHCP leases.</desc>
13747 </attribute>
13748 <attribute name="tftpBootFile" type="wstring">
13749 <desc>TFTP boot file attribute which is used with the built-in DHCP server to fill
13750 the corresponding fields of DHCP leases.</desc>
13751 </attribute>
13752 <attribute name="tftpNextServer" type="wstring">
13753 <desc>TFTP server attribute which is used with the built-in DHCP server to fill
13754 the corresponding fields of DHCP leases.
13755 <note>The preferred form is IPv4 addresses.</note>
13756 </desc>
13757 </attribute>
13758 <attribute name="aliasMode" type="unsigned long">
13759 <desc></desc>
13760 </attribute>
13761 <attribute name="dnsPassDomain" type="boolean">
13762 <desc>Whether the DHCP server should pass the DNS domain used by the host.</desc>
13763 </attribute>
13764 <attribute name="dnsProxy" type="boolean">
13765 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
13766 of the DNS proxy and process traffic using DNS servers registered on the host.</desc>
13767 </attribute>
13768 <attribute name="dnsUseHostResolver" type="boolean">
13769 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
13770 of the DNS proxy and process traffic using the host resolver mechanism.</desc>
13771 </attribute>
13772 <attribute name="redirects" type="wstring" readonly="yes" safearray="yes">
13773 <desc>Array of NAT port-forwarding rules in string representation, in the following
13774 format: "name,protocol id,host ip,host port,guest ip,guest port".</desc>
13775 </attribute>
13776 <method name="setNetworkSettings">
13777 <desc>Sets network configuration of the NAT engine.</desc>
13778 <param name="mtu" type="unsigned long" dir="in">
13779 <desc>MTU (maximum transmission unit) of the NAT engine in bytes.</desc>
13780 </param>
13781 <param name="sockSnd" type="unsigned long" dir="in">
13782 <desc>Capacity of the socket send buffer in bytes when creating a new socket.</desc>
13783 </param>
13784 <param name="sockRcv" type="unsigned long" dir="in">
13785 <desc>Capacity of the socket receive buffer in bytes when creating a new socket.</desc>
13786 </param>
13787 <param name="TcpWndSnd" type="unsigned long" dir="in">
13788 <desc>Initial size of the NAT engine's sending TCP window in bytes when
13789 establishing a new TCP connection.</desc>
13790 </param>
13791 <param name="TcpWndRcv" type="unsigned long" dir="in">
13792 <desc>Initial size of the NAT engine's receiving TCP window in bytes when
13793 establishing a new TCP connection.</desc>
13794 </param>
13795 </method>
13796 <method name="getNetworkSettings">
13797 <desc>Returns network configuration of NAT engine. See <link to="#setNetworkSettings" />
13798 for parameter descriptions.</desc>
13799 <param name="mtu" type="unsigned long" dir="out" />
13800 <param name="sockSnd" type="unsigned long" dir="out" />
13801 <param name="sockRcv" type="unsigned long" dir="out" />
13802 <param name="TcpWndSnd" type="unsigned long" dir="out" />
13803 <param name="TcpWndRcv" type="unsigned long" dir="out" />
13804 </method>
13805 <method name="addRedirect">
13806 <desc>Adds a new NAT port-forwarding rule.</desc>
13807 <param name="name" type="wstring" dir="in">
13808 <desc>The name of the rule. An empty name is acceptable, in which case the NAT engine
13809 auto-generates one using the other parameters.</desc>
13810 </param>
13811 <param name="proto" type="NATProtocol" dir="in">
13812 <desc>Protocol handled with the rule.</desc>
13813 </param>
13814 <param name="hostIp" type="wstring" dir="in">
13815 <desc>IP of the host interface to which the rule should apply. An empty ip address is
13816 acceptable, in which case the NAT engine binds the handling socket to any interface.</desc>
13817 </param>
13818 <param name="hostPort" type="unsigned short" dir="in">
13819 <desc>The port number to listen on.</desc>
13820 </param>
13821 <param name="guestIp" type="wstring" dir="in">
13822 <desc>The IP address of the guest which the NAT engine will forward matching packets
13823 to. An empty IP address is acceptable, in which case the NAT engine will forward
13824 packets to the first DHCP lease (x.x.x.15).</desc>
13825 </param>
13826 <param name="guestPort" type="unsigned short" dir="in">
13827 <desc>The port number to forward.</desc>
13828 </param>
13829 </method>
13830 <method name="removeRedirect">
13831 <desc>Removes a port-forwarding rule that was previously registered.</desc>
13832 <param name="name" type="wstring" dir="in">
13833 <desc>The name of the rule to delete.</desc>
13834 </param>
13835 </method>
13836 </interface>
13837
13838 <enum
13839 name="VBoxEventType"
13840 uuid="2c76667e-6981-4122-a71a-cdfd6a6eb575">
13841
13842 <desc>
13843 Type of an event.
13844 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
13845 </desc>
13846
13847 <const name="Invalid" value="0">
13848 <desc>
13849 Invalid event, must be first.
13850 </desc>
13851 </const>
13852
13853 <const name="Any" value="1">
13854 <desc>
13855 Wildcard for all events. Events of this type are never delivered, and only used in
13856 registerListener() call to simplify registration.
13857 </desc>
13858 </const>
13859
13860 <const name="MachineEvent" value="2">
13861 <desc>
13862 Wildcard for all machine events. Events of this type are never delivered, and only used in
13863 registerListener() call to simplify registration.
13864 </desc>
13865 </const>
13866
13867 <const name="SnapshotEvent" value="3">
13868 <desc>
13869 Wildcard for all snapshot events. Events of this type are never delivered, and only used in
13870 registerListener() call to simplify registration.
13871 </desc>
13872 </const>
13873
13874 <const name="InputEvent" value="4">
13875 <desc>
13876 Wildcard for all input device (keyboard, mouse) events.
13877 Events of this type are never delivered, and only used in
13878 registerListener() call to simplify registration.
13879 </desc>
13880 </const>
13881
13882 <const name="LastWildcard" value="31">
13883 <desc>
13884 Last wildcard.
13885 </desc>
13886 </const>
13887
13888 <const name="OnMachineStateChanged" value="32">
13889 <desc>
13890 <see>IMachineStateChangedEvent</see>
13891 </desc>
13892 </const>
13893 <const name="OnMachineDataChanged" value="33">
13894 <desc>
13895 <see>IMachineDataChangedEvent</see>
13896 </desc>
13897 </const>
13898 <const name="OnExtraDataChanged" value="34">
13899 <desc>
13900 <see>IExtraDataChangedEvent</see>
13901 </desc>
13902 </const>
13903 <const name="OnExtraDataCanChange" value="35">
13904 <desc>
13905 <see>IExtraDataCanChangeEvent</see>
13906 </desc>
13907 </const>
13908 <const name="OnMediumRegistered" value="36">
13909 <desc>
13910 <see>IMediumRegistered</see>
13911 </desc>
13912 </const>
13913 <const name="OnMachineRegistered" value="37">
13914 <desc>
13915 <see>IMachineRegisteredEvent</see>
13916 </desc>
13917 </const>
13918 <const name="OnSessionStateChanged" value="38">
13919 <desc>
13920 <see>ISessionStateChangedEvent</see>
13921 </desc>
13922 </const>
13923 <const name="OnSnapshotTaken" value="39">
13924 <desc>
13925 <see>ISnapshotTakenEvent</see>
13926 </desc>
13927 </const>
13928 <const name="OnSnapshotDeleted" value="40">
13929 <desc>
13930 <see>ISnapshotDeletedEvent</see>
13931 </desc>
13932 </const>
13933 <const name="OnSnapshotChanged" value="41">
13934 <desc>
13935 <see>ISnapshotChangedEvent</see>
13936 </desc>
13937 </const>
13938 <const name="OnGuestPropertyChanged" value="42">
13939 <desc>
13940 <see>IGuestPropertyChangedEvent</see>
13941 </desc>
13942 </const>
13943 <!-- Console events -->
13944 <const name="OnMousePointerShapeChanged" value="43">
13945 <desc>
13946 <see>IMousePointerShapeChangedEvent</see>
13947 </desc>
13948 </const>
13949 <const name="OnMouseCapabilityChanged" value="44">
13950 <desc>
13951 <see>IMouseCapabilityChangedEvent</see>
13952 </desc>
13953 </const>
13954 <const name="OnKeyboardLedsChanged" value="45">
13955 <desc>
13956 <see>IKeyboardLedsChangedEvent</see>
13957 </desc>
13958 </const>
13959 <const name="OnStateChanged" value="46">
13960 <desc>
13961 <see>IStateChangedEvent</see>
13962 </desc>
13963 </const>
13964 <const name="OnAdditionsStateChanged" value="47">
13965 <desc>
13966 <see>IAdditionsStateChangedEvent</see>
13967 </desc>
13968 </const>
13969 <const name="OnNetworkAdapterChanged" value="48">
13970 <desc>
13971 <see>INetworkAdapterChangedEvent</see>
13972 </desc>
13973 </const>
13974 <const name="OnSerialPortChanged" value="49">
13975 <desc>
13976 <see>ISerialPortChangedEvent</see>
13977 </desc>
13978 </const>
13979 <const name="OnParallelPortChanged" value="50">
13980 <desc>
13981 <see>IParallelPortChangedEvent</see>
13982 </desc>
13983 </const>
13984 <const name="OnStorageControllerChanged" value="51">
13985 <desc>
13986 <see>IStorageControllerChangedEvent</see>
13987 </desc>
13988 </const>
13989 <const name="OnMediumChanged" value="52">
13990 <desc>
13991 <see>IMediumChangedEvent</see>
13992 </desc>
13993 </const>
13994 <const name="OnVRDPServerChanged" value="53">
13995 <desc>
13996 <see>IVRDPServerChangedEvent</see>
13997 </desc>
13998 </const>
13999 <const name="OnUSBControllerChanged" value="54">
14000 <desc>
14001 <see>IUSBControllerChangedEvent</see>
14002 </desc>
14003 </const>
14004 <const name="OnUSBDeviceStateChanged" value="55">
14005 <desc>
14006 <see>IUSBDeviceStateChangedEvent</see>
14007 </desc>
14008 </const>
14009 <const name="OnSharedFolderChanged" value="56">
14010 <desc>
14011 <see>ISharedFolderChangedEvent</see>
14012 </desc>
14013 </const>
14014 <const name="OnRuntimeError" value="57">
14015 <desc>
14016 <see>IRuntimeErrorEvent</see>
14017 </desc>
14018 </const>
14019 <const name="OnCanShowWindow" value="58">
14020 <desc>
14021 <see>ICanShowWindowEvent</see>
14022 </desc>
14023 </const>
14024 <const name="OnShowWindow" value="59">
14025 <desc>
14026 <see>IShowWindowEvent</see>
14027 </desc>
14028 </const>
14029 <const name="OnCPUChanged" value="60">
14030 <desc>
14031 <see>ICPUChangedEvent</see>
14032 </desc>
14033 </const>
14034 <const name="OnRemoteDisplayInfoChanged" value="61">
14035 <desc>
14036 <see>IRemoteDisplayInfoChangedEvent</see>
14037 </desc>
14038 </const>
14039 <const name="OnEventSourceChanged" value="62">
14040 <desc>
14041 <see>IEventSourceChangedEvent</see>
14042 </desc>
14043 </const>
14044 <const name="OnCPUPriorityChanged" value="63">
14045 <desc>
14046 <see>ICPUPriorityChangedEvent</see>
14047 </desc>
14048 </const>
14049 <!-- Last event marker -->
14050 <const name="Last" value="64">
14051 <desc>
14052 Must be last event, used for iterations and structures relying on numerical event values.
14053 </desc>
14054 </const>
14055
14056 </enum>
14057
14058 <interface
14059 name="IEventSource" extends="$unknown"
14060 uuid="3c670618-f727-4fe9-94d2-8243f489a033"
14061 wsmap="managed"
14062 >
14063 <desc>
14064 Event source. Generally, any object which could generate events can be an event source,
14065 or aggregate one. To simplify using one-way protocols such as webservices running on top of HTTP(S),
14066 an event source can work with listeners in either active or passive mode. In active mode it is up to
14067 the IEventSource implementation to call <link to="IEventListener::handleEvent" />, in passive mode the
14068 event source keeps track of pending events for each listener and returns available events on demand.
14069
14070 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
14071 </desc>
14072
14073 <method name="createListener">
14074 <desc>
14075 Creates a new listener object, useful for passive mode.
14076 </desc>
14077 <param name="listener" type="IEventListener" dir="return"/>
14078 </method>
14079
14080 <method name="registerListener">
14081 <desc>
14082 Register an event listener.
14083
14084 <note>
14085 To avoid system overload, the VirtualBox server process checks if passive event
14086 listeners call <link to="IEventSource::getEvent"/> frequently enough. In the
14087 current implementation, if more than 100 pending events are detected for a passive
14088 event listener, it is forcefully unregistered by the system, and further
14089 <link to="#getEvent" /> calls will return @c VBOX_E_OBJECT_NOT_FOUND.
14090 </note>
14091 </desc>
14092 <param name="listener" type="IEventListener" dir="in">
14093 <desc>Listener to register.</desc>
14094 </param>
14095 <param name="interesting" type="VBoxEventType" dir="in" safearray="yes">
14096 <desc>
14097 Event types listener is interested in. One can use wildcards like -
14098 <link to="VBoxEventType::Any"/> to specify wildcards, matching more
14099 than one event.
14100 </desc>
14101 </param>
14102 <param name="active" type="boolean" dir="in">
14103 <desc>
14104 Which mode this listener is operating in.
14105 In active mode, <link to="IEventListener::handleEvent" /> is called directly.
14106 In passive mode, an internal event queue is created for this this IEventListener.
14107 For each event coming in, it is added to queues for all interested registered passive
14108 listeners. It is then up to the external code to call the listener's
14109 <link to="IEventListener::handleEvent" /> method. When done with an event, the
14110 external code must call <link to="#eventProcessed" />.
14111 </desc>
14112 </param>
14113 </method>
14114
14115 <method name="unregisterListener">
14116 <desc>
14117 Unregister an event listener. If listener is passive, and some waitable events are still
14118 in queue they are marked as processed automatically.
14119 </desc>
14120 <param name="listener" type="IEventListener" dir="in">
14121 <desc>Listener to unregister.</desc>
14122 </param>
14123 </method>
14124
14125 <method name="fireEvent">
14126 <desc>
14127 Fire an event for this source.
14128 </desc>
14129 <param name="event" type="IEvent" dir="in">
14130 <desc>Event to deliver.</desc>
14131 </param>
14132 <param name="timeout" type="long" dir="in">
14133 <desc>
14134 Maximum time to wait for event processing (if event is waitable), in ms;
14135 0 = no wait, -1 = indefinite wait.
14136 </desc>
14137 </param>
14138 <param name="result" type="boolean" dir="return">
14139 <desc>true if an event was delivered to all targets, or is non-waitable.</desc>
14140 </param>
14141 </method>
14142
14143 <method name="getEvent">
14144 <desc>
14145 Get events from this peer's event queue (for passive mode). Calling this method
14146 regularly is required for passive event listeners to avoid system overload;
14147 see <link to="IEventSource::registerListener" /> for details.
14148
14149 <result name="VBOX_E_OBJECT_NOT_FOUND">
14150 Listener is not registered, or autounregistered.
14151 </result>
14152 </desc>
14153 <param name="listener" type="IEventListener" dir="in">
14154 <desc>Which listener to get data for.</desc>
14155 </param>
14156 <param name="timeout" type="long" dir="in">
14157 <desc>
14158 Maximum time to wait for events, in ms;
14159 0 = no wait, -1 = indefinite wait.
14160 </desc>
14161 </param>
14162 <param name="event" type="IEvent" dir="return">
14163 <desc>Event retrieved, or null if none available.</desc>
14164 </param>
14165 </method>
14166
14167 <method name="eventProcessed">
14168 <desc>
14169 Must be called for waitable events after a particular listener finished its
14170 event processing. When all listeners of a particular event have called this
14171 method, the system will then call <link to="IEvent::setProcessed" />.
14172 </desc>
14173 <param name="listener" type="IEventListener" dir="in">
14174 <desc>Which listener processed event.</desc>
14175 </param>
14176 <param name="event" type="IEvent" dir="in">
14177 <desc>Which event.</desc>
14178 </param>
14179 </method>
14180
14181 </interface>
14182
14183 <interface
14184 name="IEventListener" extends="$unknown"
14185 uuid="67099191-32e7-4f6c-85ee-422304c71b90"
14186 wsmap="managed"
14187 >
14188 <desc>
14189 Event listener. An event listener can work in either active or passive mode, depending on the way
14190 it was registered.
14191 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
14192 </desc>
14193
14194 <method name="handleEvent">
14195 <desc>
14196 Handle event callback (called directly by IEventSource in active mode, or could be
14197 called by event processor thread in passive mode).
14198 </desc>
14199 <param name="event" type="IEvent" dir="in">
14200 <desc>Event available.</desc>
14201 </param>
14202 </method>
14203
14204 </interface>
14205
14206 <interface
14207 name="IEvent" extends="$unknown"
14208 uuid="0ca2adba-8f30-401b-a8cd-fe31dbe839c0"
14209 wsmap="managed"
14210 >
14211 <desc>
14212 Abstract parent interface for VirtualBox events. Actual events will typically implement
14213 a more specific interface which derives from this (see below).
14214
14215 <b>Introduction to VirtualBox events</b>
14216
14217 Generally speaking, an event (represented by this interface) signals that something
14218 happened, while an event listener (see <link to="IEventListener" /> represents an
14219 entity that is interested in certain events. In order for this to work with
14220 unidirectional protocols (i.e. web services), the concepts of passive and active
14221 listener are used.
14222
14223 Event consumers can register themselves as listeners, providing an array of
14224 events they are interested in (see <link to="IEventSource::registerListener" />).
14225 When an event triggers, the listener is notified about the event. The exact
14226 mechanism of the notification depends on whether the listener was registered as
14227 an active or passive listener:
14228
14229 <ul>
14230 <li>An active listener is very similar to a callback: it is a function invoked
14231 by the API. As opposed to the callbacks that were used in the API before
14232 VirtualBox 3.3 however, events are now objects with an interface hierarchy.
14233 </li>
14234
14235 <li>Passive listeners are somewhat tricker to implement, but do not require
14236 a client function to be callable, which is not an option with scripting
14237 languages or web service clients. Internally the <link to="IEventSource" />
14238 implementation maintains an event queue for each passive listener, and
14239 newly arrived events are put in this queue. When the listener calls
14240 <link to="IEventSource::getEvent"/>, all elements from its internal event
14241 queue are returned. When the client completes processing of an event,
14242 the <link to="IEventSource::eventProcessed" /> function must be called,
14243 acknowledging that the events were processed. It supports implementing
14244 waitable events. On passive listener unregistration, all events from its
14245 queue are auto-acknowledged.
14246 </li>
14247 </ul>
14248
14249 Waitable events are useful in situations where the event generator wants to track
14250 delivery or a party wants to wait until all listeners have completed the event. A
14251 typical example would be a vetoable event (see <link to="IVetoEvent" />) where a
14252 listeners might veto a certain action, and thus the event producer has to make
14253 sure that all listeners have processed the event and not vetoed before taking
14254 the action.
14255
14256 A given event may have both passive and active listeners at the same time.
14257
14258 <b>Using events</b>
14259
14260 Any VirtualBox object capable of producing externally visible events provides an
14261 @c eventSource read-only attribute, which is of the type <link to="IEventSource" />.
14262 This event source object is notified by VirtualBox once something has happened, so
14263 consumers may register event listeners with this event source. To register a listener,
14264 an object implementing the <link to="IEventListener" /> interface must be provided.
14265 For active listeners, such an object is typically created by the consumer, while for
14266 passive listeners <link to="IEventSource::createListener" /> should be used. Please
14267 note that a listener created with @c createListener() must not be used as an active listener.
14268
14269 Once created, the listener must be registered to listen for the desired events
14270 (see <link to="IEventSource::registerListener" />), providing an array of
14271 <link to="VBoxEventType" /> enums. Those elements can either be the individual
14272 event IDs or wildcards matching multiple event IDs.
14273
14274 After registration, the callback's <link to="IEventListener::handleEvent" /> method is
14275 called automatically when the event is triggered, while passive listeners have to call
14276 <link to="IEventSource::getEvent" /> and <link to="IEventSource::eventProcessed" /> in
14277 an event processing loop.
14278
14279 The IEvent interface is an abstract parent interface for all such VirtualBox events
14280 coming in. As a result, the standard use pattern inside <link to="IEventListener::handleEvent" />
14281 or the event processing loop is to check the <link to="#type" /> attribute of the event and
14282 then cast to the appropriate specific interface using @c QueryInterface().
14283 </desc>
14284
14285 <attribute name="type" readonly="yes" type="VBoxEventType">
14286 <desc>
14287 Event type.
14288 </desc>
14289 </attribute>
14290
14291 <attribute name="source" readonly="yes" type="IEventSource">
14292 <desc>
14293 Source of this event.
14294 </desc>
14295 </attribute>
14296
14297 <attribute name="waitable" readonly="yes" type="boolean">
14298 <desc>
14299 If we can wait for this event being processed. If false, waitProcessed() returns immediately,
14300 and setProcessed() doesn't make sense. Non-waitable events are generally better performing,
14301 as no additional overhead associated with waitability imposed.
14302 Waitable events are needed when one need to be able to wait for particular event processed,
14303 for example for vetoable changes, or if event refers to some resource which need to be kept immutable
14304 until all consumers confirmed events.
14305 </desc>
14306 </attribute>
14307
14308 <method name="setProcessed">
14309 <desc>
14310 Internal method called by the system when all listeners of a particular event have called
14311 <link to="IEventSource::eventProcessed" />. This should not be called by client code.
14312 </desc>
14313 </method>
14314
14315 <method name="waitProcessed">
14316 <desc>
14317 Wait until time outs, or this event is processed. Event must be waitable for this operation to have
14318 described semantics, for non-waitable returns true immediately.
14319 </desc>
14320 <param name="timeout" type="long" dir="in">
14321 <desc>
14322 Maximum time to wait for event processeing, in ms;
14323 0 = no wait, -1 = indefinite wait.
14324 </desc>
14325 </param>
14326 <param name="result" type="boolean" dir="return">
14327 <desc>If this event was processed before timeout.</desc>
14328 </param>
14329 </method>
14330 </interface>
14331
14332
14333 <interface
14334 name="IMachineEvent" extends="IEvent"
14335 uuid="92ed7b1a-0d96-40ed-ae46-a564d484325e"
14336 wsmap="managed" id="MachineEvent"
14337 >
14338 <desc>Base abstract interface for all machine events.</desc>
14339
14340 <attribute name="machineId" readonly="yes" type="uuid" mod="string">
14341 <desc>ID of the machine this event relates to.</desc>
14342 </attribute>
14343
14344 </interface>
14345
14346 <interface
14347 name="IMachineStateChangedEvent" extends="IMachineEvent"
14348 uuid="5748F794-48DF-438D-85EB-98FFD70D18C9"
14349 wsmap="managed" autogen="VBoxEvent" id="OnMachineStateChanged"
14350 >
14351 <desc>Machine state change event.</desc>
14352
14353 <attribute name="state" readonly="yes" type="MachineState">
14354 <desc>New execution state.</desc>
14355 </attribute>
14356 </interface>
14357
14358 <interface
14359 name="IMachineDataChangedEvent" extends="IMachineEvent"
14360 uuid="6AA70A6C-0DCA-4810-8C5C-457B278E3D49"
14361 wsmap="managed" autogen="VBoxEvent" id="OnMachineDataChanged"
14362 >
14363 <desc>
14364 Any of the settings of the given machine has changed.
14365 </desc>
14366 </interface>
14367
14368 <interface
14369 name="IMachineRegisteredEvent" extends="IMachineEvent"
14370 uuid="c354a762-3ff2-4f2e-8f09-07382ee25088"
14371 wsmap="managed" autogen="VBoxEvent" id="OnMachineRegistered"
14372 >
14373 <desc>
14374 The given machine was registered or unregistered
14375 within this VirtualBox installation.
14376 </desc>
14377
14378 <attribute name="registered" type="boolean" readonly="yes">
14379 <desc>
14380 If @c true, the machine was registered, otherwise it was
14381 unregistered.
14382 </desc>
14383 </attribute>
14384 </interface>
14385
14386 <interface
14387 name="ISessionStateChangedEvent" extends="IMachineEvent"
14388 uuid="714a3eef-799a-4489-86cd-fe8e45b2ff8e"
14389 wsmap="managed" autogen="VBoxEvent" id="OnSessionStateChanged"
14390 >
14391 <desc>
14392 The state of the session for the given machine was changed.
14393 <see>IMachine::sessionState</see>
14394 </desc>
14395
14396 <attribute name="state" type="SessionState" readonly="yes">
14397 <desc>
14398 New session state.
14399 </desc>
14400 </attribute>
14401 </interface>
14402
14403 <interface
14404 name="IGuestPropertyChangedEvent" extends="IMachineEvent"
14405 uuid="3f63597a-26f1-4edb-8dd2-6bddd0912368"
14406 wsmap="managed" autogen="VBoxEvent" id="OnGuestPropertyChanged"
14407 >
14408 <desc>
14409 Notification when a guest property has changed.
14410 </desc>
14411
14412 <attribute name="name" readonly="yes" type="wstring">
14413 <desc>
14414 The name of the property that has changed.
14415 </desc>
14416 </attribute>
14417
14418 <attribute name="value" readonly="yes" type="wstring">
14419 <desc>
14420 The new property value.
14421 </desc>
14422 </attribute>
14423
14424 <attribute name="flags" readonly="yes" type="wstring">
14425 <desc>
14426 The new property flags.
14427 </desc>
14428 </attribute>
14429
14430 </interface>
14431
14432 <interface
14433 name="ISnapshotEvent" extends="IMachineEvent"
14434 uuid="21637b0e-34b8-42d3-acfb-7e96daf77c22"
14435 wsmap="managed" id="SnapshotEvent"
14436 >
14437 <desc>Base interface for all snapshot events.</desc>
14438
14439 <attribute name="snapshotId" readonly="yes" type="uuid" mod="string">
14440 <desc>ID of the snapshot this event relates to.</desc>
14441 </attribute>
14442
14443 </interface>
14444
14445 <interface
14446 name="ISnapshotTakenEvent" extends="ISnapshotEvent"
14447 uuid="d27c0b3d-6038-422c-b45e-6d4a0503d9f1"
14448 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotTaken"
14449 >
14450 <desc>
14451 A new snapshot of the machine has been taken.
14452 <see>ISnapshot</see>
14453 </desc>
14454 </interface>
14455
14456 <interface
14457 name="ISnapshotDeletedEvent" extends="ISnapshotEvent"
14458 uuid="c48f3401-4a9e-43f4-b7a7-54bd285e22f4"
14459 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotDeleted"
14460 >
14461 <desc>
14462 Snapshot of the given machine has been deleted.
14463
14464 <note>
14465 This notification is delivered <b>after</b> the snapshot
14466 object has been uninitialized on the server (so that any
14467 attempt to call its methods will return an error).
14468 </note>
14469
14470 <see>ISnapshot</see>
14471 </desc>
14472 </interface>
14473
14474 <interface
14475 name="ISnapshotChangedEvent" extends="ISnapshotEvent"
14476 uuid="07541941-8079-447a-a33e-47a69c7980db"
14477 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotChanged"
14478 >
14479 <desc>
14480 Snapshot properties (name and/or description) have been changed.
14481 <see>ISnapshot</see>
14482 </desc>
14483 </interface>
14484
14485 <interface
14486 name="IMousePointerShapeChangedEvent" extends="IEvent"
14487 uuid="a6dcf6e8-416b-4181-8c4a-45ec95177aef"
14488 wsmap="managed" autogen="VBoxEvent" id="OnMousePointerShapeChanged"
14489 >
14490 <desc>
14491 Notification when the guest mouse pointer shape has
14492 changed. The new shape data is given.
14493 </desc>
14494
14495 <attribute name="visible" type="boolean" readonly="yes">
14496 <desc>
14497 Flag whether the pointer is visible.
14498 </desc>
14499 </attribute>
14500 <attribute name="alpha" type="boolean" readonly="yes">
14501 <desc>
14502 Flag whether the pointer has an alpha channel.
14503 </desc>
14504 </attribute>
14505 <attribute name="xhot" type="unsigned long" readonly="yes">
14506 <desc>
14507 The pointer hot spot X coordinate.
14508 </desc>
14509 </attribute>
14510 <attribute name="yhot" type="unsigned long" readonly="yes">
14511 <desc>
14512 The pointer hot spot Y coordinate.
14513 </desc>
14514 </attribute>
14515 <attribute name="width" type="unsigned long" readonly="yes">
14516 <desc>
14517 Width of the pointer shape in pixels.
14518 </desc>
14519 </attribute>
14520 <attribute name="height" type="unsigned long" readonly="yes">
14521 <desc>
14522 Height of the pointer shape in pixels.
14523 </desc>
14524 </attribute>
14525 <attribute name="shape" type="octet" safearray="yes" readonly="yes">
14526 <desc>
14527 Shape buffer arrays.
14528
14529 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
14530 followed by a 32-bpp XOR (color) mask.
14531
14532 For pointers without alpha channel the XOR mask pixels are 32
14533 bit values: (lsb)BGR0(msb). For pointers with alpha channel
14534 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
14535
14536 An AND mask is used for pointers with alpha channel, so if the
14537 callback does not support alpha, the pointer could be
14538 displayed as a normal color pointer.
14539
14540 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
14541 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
14542 height</tt>. The padding bits at the end of each scanline are
14543 undefined.
14544
14545 The XOR mask follows the AND mask on the next 4-byte aligned
14546 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
14547 Bytes in the gap between the AND and the XOR mask are undefined.
14548 The XOR mask scanlines have no gap between them and the size of
14549 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
14550
14551 <note>
14552 If @a shape is 0, only the pointer visibility is changed.
14553 </note>
14554 </desc>
14555 </attribute>
14556 </interface>
14557
14558 <interface
14559 name="IMouseCapabilityChangedEvent" extends="IEvent"
14560 uuid="d633ad48-820c-4207-b46c-6bd3596640d5"
14561 wsmap="managed" autogen="VBoxEvent" id="OnMouseCapabilityChanged"
14562 >
14563 <desc>
14564 Notification when the mouse capabilities reported by the
14565 guest have changed. The new capabilities are passed.
14566 </desc>
14567 <attribute name="supportsAbsolute" type="boolean" readonly="yes">
14568 <desc>
14569 Supports absolute coordinates.
14570 </desc>
14571 </attribute>
14572 <attribute name="supportsRelative" type="boolean" readonly="yes">
14573 <desc>
14574 Supports relative coordinates.
14575 </desc>
14576 </attribute>
14577 <attribute name="needsHostCursor" type="boolean" readonly="yes">
14578 <desc>
14579 If host cursor is needed.
14580 </desc>
14581 </attribute>
14582 </interface>
14583
14584 <interface
14585 name="IKeyboardLedsChangedEvent" extends="IEvent"
14586 uuid="6DDEF35E-4737-457B-99FC-BC52C851A44F"
14587 wsmap="managed" autogen="VBoxEvent" id="OnKeyboardLedsChanged"
14588 >
14589 <desc>
14590 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
14591 to alter the state of the keyboard LEDs.
14592 </desc>
14593 <attribute name="numLock" type="boolean" readonly="yes">
14594 <desc>
14595 NumLock status.
14596 </desc>
14597 </attribute>
14598 <attribute name="capsLock" type="boolean" readonly="yes">
14599 <desc>
14600 CapsLock status.
14601 </desc>
14602 </attribute>
14603 <attribute name="scrollLock" type="boolean" readonly="yes">
14604 <desc>
14605 ScrollLock status.
14606 </desc>
14607 </attribute>
14608 </interface>
14609
14610 <interface
14611 name="IStateChangedEvent" extends="IEvent"
14612 uuid="4376693C-CF37-453B-9289-3B0F521CAF27"
14613 wsmap="managed" autogen="VBoxEvent" id="OnStateChanged"
14614 >
14615 <desc>
14616 Notification when the execution state of the machine has changed.
14617 The new state is given.
14618 </desc>
14619 <attribute name="state" type="MachineState" readonly="yes">
14620 <desc>
14621 New machine state.
14622 </desc>
14623 </attribute>
14624 </interface>
14625
14626 <interface
14627 name="IAdditionsStateChangedEvent" extends="IEvent"
14628 uuid="D70F7915-DA7C-44C8-A7AC-9F173490446A"
14629 wsmap="managed" autogen="VBoxEvent" id="OnAdditionsStateChanged"
14630 >
14631 <desc>
14632 Notification when a Guest Additions property changes.
14633 Interested callees should query IGuest attributes to
14634 find out what has changed.
14635 </desc>
14636 </interface>
14637
14638 <interface
14639 name="INetworkAdapterChangedEvent" extends="IEvent"
14640 uuid="08889892-1EC6-4883-801D-77F56CFD0103"
14641 wsmap="managed" autogen="VBoxEvent" id="OnNetworkAdapterChanged"
14642 >
14643 <desc>
14644 Notification when a property of one of the
14645 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
14646 changes. Interested callees should use INetworkAdapter methods and
14647 attributes to find out what has changed.
14648 </desc>
14649 <attribute name="networkAdapter" type="INetworkAdapter" readonly="yes">
14650 <desc>
14651 Network adapter that is subject to change.
14652 </desc>
14653 </attribute>
14654 </interface>
14655
14656 <interface
14657 name="ISerialPortChangedEvent" extends="IEvent"
14658 uuid="3BA329DC-659C-488B-835C-4ECA7AE71C6C"
14659 wsmap="managed" autogen="VBoxEvent" id="OnSerialPortChanged"
14660 >
14661 <desc>
14662 Notification when a property of one of the
14663 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
14664 Interested callees should use ISerialPort methods and attributes
14665 to find out what has changed.
14666 </desc>
14667 <attribute name="serialPort" type="ISerialPort" readonly="yes">
14668 <desc>
14669 Serial port that is subject to change.
14670 </desc>
14671 </attribute>
14672 </interface>
14673
14674 <interface
14675 name="IParallelPortChangedEvent" extends="IEvent"
14676 uuid="813C99FC-9849-4F47-813E-24A75DC85615"
14677 wsmap="managed" autogen="VBoxEvent" id="OnParallelPortChanged"
14678 >
14679 <desc>
14680 Notification when a property of one of the
14681 virtual <link to="IMachine::getParallelPort">parallel ports</link>
14682 changes. Interested callees should use ISerialPort methods and
14683 attributes to find out what has changed.
14684 </desc>
14685 <attribute name="parallelPort" type="IParallelPort" readonly="yes">
14686 <desc>
14687 Parallel port that is subject to change.
14688 </desc>
14689 </attribute>
14690 </interface>
14691
14692 <interface
14693 name="IStorageControllerChangedEvent" extends="IEvent"
14694 uuid="715212BF-DA59-426E-8230-3831FAA52C56"
14695 wsmap="managed" autogen="VBoxEvent" id="OnStorageControllerChanged"
14696 >
14697 <desc>
14698 Notification when a
14699 <link to="IMachine::mediumAttachments">medium attachment</link>
14700 changes.
14701 </desc>
14702 </interface>
14703
14704 <interface
14705 name="IMediumChangedEvent" extends="IEvent"
14706 uuid="0FE2DA40-5637-472A-9736-72019EABD7DE"
14707 wsmap="managed" autogen="VBoxEvent" id="OnMediumChanged"
14708 >
14709 <desc>
14710 Notification when a
14711 <link to="IMachine::mediumAttachments">medium attachment</link>
14712 changes.
14713 </desc>
14714 <attribute name="mediumAttachment" type="IMediumAttachment" readonly="yes">
14715 <desc>
14716 Medium attachment that is subject to change.
14717 </desc>
14718 </attribute>
14719 </interface>
14720
14721 <interface
14722 name="ICPUChangedEvent" extends="IEvent"
14723 uuid="D0F0BECC-EE17-4D17-A8CC-383B0EB55E9D"
14724 wsmap="managed" autogen="VBoxEvent" id="OnCPUChanged"
14725 >
14726 <desc>
14727 Notification when a CPU changes.
14728 </desc>
14729 <attribute name="cpu" type="unsigned long" readonly="yes">
14730 <desc>
14731 The CPU which changed.
14732 </desc>
14733 </attribute>
14734 <attribute name="add" type="boolean" readonly="yes">
14735 <desc>
14736 Flag whether the CPU was added or removed.
14737 </desc>
14738 </attribute>
14739 </interface>
14740
14741 <interface
14742 name="ICPUPriorityChangedEvent" extends="IEvent"
14743 uuid="657fe2fe-a75a-4cb6-8cf9-072aa41e7d75"
14744 wsmap="managed" autogen="VBoxEvent" id="OnCPUPriorityChanged"
14745 >
14746 <desc>
14747 Notification when the CPU priority changes.
14748 </desc>
14749 <attribute name="priority" type="unsigned long" readonly="yes">
14750 <desc>
14751 The new CPU priority value. (1-100)
14752 </desc>
14753 </attribute>
14754 </interface>
14755
14756 <interface
14757 name="IVRDPServerChangedEvent" extends="IEvent"
14758 uuid="726038B6-6279-4A7A-8037-D041693D1915"
14759 wsmap="managed" autogen="VBoxEvent" id="OnVRDPServerChanged"
14760 >
14761 <desc>
14762 Notification when a property of the
14763 <link to="IMachine::VRDPServer">VRDP server</link> changes.
14764 Interested callees should use IVRDPServer methods and attributes to
14765 find out what has changed.
14766 </desc>
14767 </interface>
14768
14769 <interface
14770 name="IRemoteDisplayInfoChangedEvent" extends="IEvent"
14771 uuid="65B556C5-2A99-47D8-B311-FC177F0914CD"
14772 wsmap="managed" autogen="VBoxEvent" id="OnRemoteDisplayInfoChanged"
14773 >
14774 <desc>
14775 Notification when the status of the VRDP server changes. Interested callees
14776 should use <link to="IConsole::remoteDisplayInfo">IRemoteDisplayInfo</link>
14777 attributes to find out what is the current status.
14778 </desc>
14779 </interface>
14780
14781 <interface
14782 name="IUSBControllerChangedEvent" extends="IEvent"
14783 uuid="93BADC0C-61D9-4940-A084-E6BB29AF3D83"
14784 wsmap="managed" autogen="VBoxEvent" id="OnUSBControllerChanged"
14785 >
14786 <desc>
14787 Notification when a property of the virtual
14788 <link to="IMachine::USBController">USB controller</link> changes.
14789 Interested callees should use IUSBController methods and attributes to
14790 find out what has changed.
14791 </desc>
14792 </interface>
14793
14794 <interface
14795 name="IUSBDeviceStateChangedEvent" extends="IEvent"
14796 uuid="806da61b-6679-422a-b629-51b06b0c6d93"
14797 wsmap="managed" autogen="VBoxEvent" id="OnUSBDeviceStateChanged"
14798 >
14799 <desc>
14800 Notification when a USB device is attached to or detached from
14801 the virtual USB controller.
14802
14803 This notification is sent as a result of the indirect
14804 request to attach the device because it matches one of the
14805 machine USB filters, or as a result of the direct request
14806 issued by <link to="IConsole::attachUSBDevice"/> or
14807 <link to="IConsole::detachUSBDevice"/>.
14808
14809 This notification is sent in case of both a succeeded and a
14810 failed request completion. When the request succeeds, the
14811 @a error parameter is @c null, and the given device has been
14812 already added to (when @a attached is @c true) or removed from
14813 (when @a attached is @c false) the collection represented by
14814 <link to="IConsole::USBDevices"/>. On failure, the collection
14815 doesn't change and the @a error parameter represents the error
14816 message describing the failure.
14817 </desc>
14818 <attribute name="device" type="IUSBDevice" readonly="yes">
14819 <desc>
14820 Device that is subject to state change.
14821 </desc>
14822 </attribute>
14823 <attribute name="attached" type="boolean" readonly="yes">
14824 <desc>
14825 @c true if the device was attached and @c false otherwise.
14826 </desc>
14827 </attribute>
14828 <attribute name="error" type="IVirtualBoxErrorInfo" readonly="yes">
14829 <desc>
14830 @c null on success or an error message object on failure.
14831 </desc>
14832 </attribute>
14833 </interface>
14834
14835 <interface
14836 name="ISharedFolderChangedEvent" extends="IEvent"
14837 uuid="B66349B5-3534-4239-B2DE-8E1535D94C0B"
14838 wsmap="managed" autogen="VBoxEvent" id="OnSharedFolderChanged"
14839 >
14840 <desc>
14841 Notification when a shared folder is added or removed.
14842 The @a scope argument defines one of three scopes:
14843 <link to="IVirtualBox::sharedFolders">global shared folders</link>
14844 (<link to="Scope_Global">Global</link>),
14845 <link to="IMachine::sharedFolders">permanent shared folders</link> of
14846 the machine (<link to="Scope_Machine">Machine</link>) or <link
14847 to="IConsole::sharedFolders">transient shared folders</link> of the
14848 machine (<link to="Scope_Session">Session</link>). Interested callees
14849 should use query the corresponding collections to find out what has
14850 changed.
14851 </desc>
14852 <attribute name="scope" type="Scope" readonly="yes">
14853 <desc>
14854 Scope of the notification.
14855 </desc>
14856 </attribute>
14857 </interface>
14858
14859 <interface
14860 name="IRuntimeErrorEvent" extends="IEvent"
14861 uuid="883DD18B-0721-4CDE-867C-1A82ABAF914C"
14862 wsmap="managed" autogen="VBoxEvent" id="OnRuntimeError"
14863 >
14864 <desc>
14865 Notification when an error happens during the virtual
14866 machine execution.
14867
14868 There are three kinds of runtime errors:
14869 <ul>
14870 <li><i>fatal</i></li>
14871 <li><i>non-fatal with retry</i></li>
14872 <li><i>non-fatal warnings</i></li>
14873 </ul>
14874
14875 <b>Fatal</b> errors are indicated by the @a fatal parameter set
14876 to @c true. In case of fatal errors, the virtual machine
14877 execution is always paused before calling this notification, and
14878 the notification handler is supposed either to immediately save
14879 the virtual machine state using <link to="IConsole::saveState"/>
14880 or power it off using <link to="IConsole::powerDown"/>.
14881 Resuming the execution can lead to unpredictable results.
14882
14883 <b>Non-fatal</b> errors and warnings are indicated by the
14884 @a fatal parameter set to @c false. If the virtual machine
14885 is in the Paused state by the time the error notification is
14886 received, it means that the user can <i>try to resume</i> the machine
14887 execution after attempting to solve the problem that caused the
14888 error. In this case, the notification handler is supposed
14889 to show an appropriate message to the user (depending on the
14890 value of the @a id parameter) that offers several actions such
14891 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
14892 wants to retry, the notification handler should continue
14893 the machine execution using the <link to="IConsole::resume"/>
14894 call. If the machine execution is not Paused during this
14895 notification, then it means this notification is a <i>warning</i>
14896 (for example, about a fatal condition that can happen very soon);
14897 no immediate action is required from the user, the machine
14898 continues its normal execution.
14899
14900 Note that in either case the notification handler
14901 <b>must not</b> perform any action directly on a thread
14902 where this notification is called. Everything it is allowed to
14903 do is to post a message to another thread that will then talk
14904 to the user and take the corresponding action.
14905
14906 Currently, the following error identifiers are known:
14907 <ul>
14908 <li><tt>"HostMemoryLow"</tt></li>
14909 <li><tt>"HostAudioNotResponding"</tt></li>
14910 <li><tt>"VDIStorageFull"</tt></li>
14911 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
14912 </ul>
14913 </desc>
14914 <attribute name="fatal" type="boolean" readonly="yes">
14915 <desc>
14916 Whether the error is fatal or not.
14917 </desc>
14918 </attribute>
14919 <attribute name="id" type="wstring" readonly="yes">
14920 <desc>
14921 Error identifier.
14922 </desc>
14923 </attribute>
14924 <attribute name="message" type="wstring" readonly="yes">
14925 <desc>
14926 Optional error message.
14927 </desc>
14928 </attribute>
14929 </interface>
14930
14931
14932 <interface
14933 name="IEventSourceChangedEvent" extends="IEvent"
14934 uuid="e7932cb8-f6d4-4ab6-9cbf-558eb8959a6a"
14935 waitable="yes"
14936 wsmap="managed" autogen="VBoxEvent" id="OnEventSourceChanged"
14937 >
14938 <desc>
14939 Notification when an event source state changes (listener added or removed).
14940 </desc>
14941
14942 <attribute name="listener" type="IEventListener" readonly="yes">
14943 <desc>
14944 Event listener which has changed.
14945 </desc>
14946 </attribute>
14947
14948 <attribute name="add" type="boolean" readonly="yes">
14949 <desc>
14950 Flag whether listener was added or removed.
14951 </desc>
14952 </attribute>
14953 </interface>
14954
14955 <interface
14956 name="IExtraDataChangedEvent" extends="IEvent"
14957 uuid="024F00CE-6E0B-492A-A8D0-968472A94DC7"
14958 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataChanged"
14959 >
14960 <desc>
14961 Notification when machine specific or global extra data
14962 has changed.
14963 </desc>
14964 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
14965 <desc>
14966 ID of the machine this event relates to.
14967 Null for global extra data changes.
14968 </desc>
14969 </attribute>
14970 <attribute name="key" type="wstring" readonly="yes">
14971 <desc>
14972 Extra data key that has changed.
14973 </desc>
14974 </attribute>
14975 <attribute name="value" type="wstring" readonly="yes">
14976 <desc>
14977 Extra data value for the given key.
14978 </desc>
14979 </attribute>
14980 </interface>
14981
14982 <interface
14983 name="IVetoEvent" extends="IEvent"
14984 uuid="9a1a4130-69fe-472f-ac10-c6fa25d75007"
14985 wsmap="managed"
14986 >
14987 <desc>Base abstract interface for veto events.</desc>
14988
14989 <method name="addVeto">
14990 <desc>
14991 Adds a veto on this event.
14992 </desc>
14993 <param name="reason" type="wstring" dir="in">
14994 <desc>
14995 Reason for veto, could be null or empty string.
14996 </desc>
14997 </param>
14998 </method>
14999
15000 <method name="isVetoed">
15001 <desc>
15002 If this event was vetoed.
15003 </desc>
15004 <param name="result" type="boolean" dir="return">
15005 <desc>
15006 Reason for veto.
15007 </desc>
15008 </param>
15009 </method>
15010
15011 <method name="getVetos">
15012 <desc>
15013 Current veto reason list, if size is 0 - no veto.
15014 </desc>
15015 <param name="result" type="wstring" dir="return" safearray="yes">
15016 <desc>
15017 Array of reasons for veto provided by different event handlers.
15018 </desc>
15019 </param>
15020 </method>
15021
15022 </interface>
15023
15024 <interface
15025 name="IExtraDataCanChangeEvent" extends="IVetoEvent"
15026 uuid="245d88bd-800a-40f8-87a6-170d02249a55"
15027 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataCanChange"
15028 waitable="true"
15029 >
15030 <desc>
15031 Notification when someone tries to change extra data for
15032 either the given machine or (if @c null) global extra data.
15033 This gives the chance to veto against changes.
15034 </desc>
15035 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
15036 <desc>
15037 ID of the machine this event relates to.
15038 Null for global extra data changes.
15039 </desc>
15040 </attribute>
15041 <attribute name="key" type="wstring" readonly="yes">
15042 <desc>
15043 Extra data key that has changed.
15044 </desc>
15045 </attribute>
15046 <attribute name="value" type="wstring" readonly="yes">
15047 <desc>
15048 Extra data value for the given key.
15049 </desc>
15050 </attribute>
15051 </interface>
15052
15053 <interface
15054 name="ICanShowWindowEvent" extends="IVetoEvent"
15055 uuid="adf292b0-92c9-4a77-9d35-e058b39fe0b9"
15056 wsmap="managed" autogen="VBoxEvent" id="OnCanShowWindow"
15057 waitable="true"
15058 >
15059 <desc>
15060 Notification when a call to
15061 <link to="IMachine::canShowConsoleWindow"/> is made by a
15062 front-end to check if a subsequent call to
15063 <link to="IMachine::showConsoleWindow"/> can succeed.
15064
15065 The callee should give an answer appropriate to the current
15066 machine state using event veto. This answer must
15067 remain valid at least until the next
15068 <link to="IConsole::state">machine state</link> change.
15069 </desc>
15070 </interface>
15071
15072 <interface
15073 name="IShowWindowEvent" extends="IEvent"
15074 uuid="B0A0904D-2F05-4D28-855F-488F96BAD2B2"
15075 wsmap="managed" autogen="VBoxEvent" id="OnShowWindow"
15076 waitable="true"
15077 >
15078 <desc>
15079 Notification when a call to
15080 <link to="IMachine::showConsoleWindow"/>
15081 requests the console window to be activated and brought to
15082 foreground on the desktop of the host PC.
15083
15084 This notification should cause the VM console process to
15085 perform the requested action as described above. If it is
15086 impossible to do it at a time of this notification, this
15087 method should return a failure.
15088
15089 Note that many modern window managers on many platforms
15090 implement some sort of focus stealing prevention logic, so
15091 that it may be impossible to activate a window without the
15092 help of the currently active application (which is supposedly
15093 an initiator of this notification). In this case, this method
15094 must return a non-zero identifier that represents the
15095 top-level window of the VM console process. The caller, if it
15096 represents a currently active process, is responsible to use
15097 this identifier (in a platform-dependent manner) to perform
15098 actual window activation.
15099
15100 This method must set @a winId to zero if it has performed all
15101 actions necessary to complete the request and the console
15102 window is now active and in foreground, to indicate that no
15103 further action is required on the caller's side.
15104 </desc>
15105 <attribute name="winId" type="unsigned long long">
15106 <desc>
15107 Platform-dependent identifier of the top-level VM console
15108 window, or zero if this method has performed all actions
15109 necessary to implement the <i>show window</i> semantics for
15110 the given platform and/or this VirtualBox front-end.
15111 </desc>
15112 </attribute>
15113 </interface>
15114
15115 <module name="VBoxSVC" context="LocalServer">
15116 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
15117 namespace="virtualbox.org">
15118 <interface name="IVirtualBox" default="yes"/>
15119 </class>
15120 </module>
15121
15122 <module name="VBoxC" context="InprocServer" threadingModel="Free">
15123 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
15124 namespace="virtualbox.org">
15125 <interface name="ISession" default="yes"/>
15126 </class>
15127
15128 <class name="Console" uuid="577230FF-164F-4CAC-8548-312D8275A4A7"
15129 namespace="virtualbox.org">
15130 <interface name="IConsole" default="yes"/>
15131 </class>
15132 </module>
15133
15134</library>
15135
15136</idl>
15137
15138<!-- 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