VirtualBox

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

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

Main: new VirtualBox::ComposeMachineFilename() API; remove the 'default hard disk folder' concept and related APIs; GUI wizards need fixing

  • Property svn:eol-style set to native
File size: 565.2 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 4.0.x.</desc>
470 <!-- Machine changes: HD Audio controller, per-machine disk registries
471 -->
472 </const>
473 <const name="Future" value="99999">
474 <desc>Settings version greater than "1.11", written by a future VirtualBox version.</desc>
475 </const>
476 </enum>
477
478 <enum
479 name="AccessMode"
480 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
481 >
482 <desc>
483 Access mode for opening files.
484 </desc>
485
486 <const name="ReadOnly" value="1"/>
487 <const name="ReadWrite" value="2"/>
488 </enum>
489
490 <enum
491 name="MachineState"
492 uuid="ec6c6a9e-113d-4ff4-b44f-0b69f21c97fe"
493 >
494 <desc>
495 Virtual machine execution state.
496
497 This enumeration represents possible values of the <link
498 to="IMachine::state"/> attribute.
499
500 Below is the basic virtual machine state diagram. It shows how the state
501 changes during virtual machine execution. The text in square braces shows
502 a method of the IConsole interface that performs the given state
503 transition.
504
505 <pre>
506 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
507 V |
508 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
509 | | | | V |
510 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
511 | | ^ | ^ |
512 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
513 | ^ | | | |
514 | | +-----------------------------------------+-|-------------------+ +
515 | | | | |
516 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
517 | | | |
518 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
519 | | |
520 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
521 </pre>
522
523 Note that states to the right from PoweredOff, Aborted and Saved in the
524 above diagram are called <i>online VM states</i>. These states
525 represent the virtual machine which is being executed in a dedicated
526 process (usually with a GUI window attached to it where you can see the
527 activity of the virtual machine and interact with it). There are two
528 special pseudo-states, FirstOnline and LastOnline, that can be used in
529 relational expressions to detect if the given machine state is online or
530 not:
531
532 <pre>
533 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
534 machine.GetState() &lt;= MachineState_LastOnline)
535 {
536 ...the machine is being executed...
537 }
538 </pre>
539
540 When the virtual machine is in one of the online VM states (that is, being
541 executed), only a few machine settings can be modified. Methods working
542 with such settings contain an explicit note about that. An attempt to
543 change any oter setting or perform a modifying operation during this time
544 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
545
546 All online states except Running, Paused and Stuck are transitional: they
547 represent temporary conditions of the virtual machine that will last as
548 long as the operation that initiated such a condition.
549
550 The Stuck state is a special case. It means that execution of the machine
551 has reached the "Guru Meditation" condition. This condition indicates an
552 internal VMM (virtual machine manager) failure which may happen as a
553 result of either an unhandled low-level virtual hardware exception or one
554 of the recompiler exceptions (such as the <i>too-many-traps</i>
555 condition).
556
557 Note also that any online VM state may transit to the Aborted state. This
558 happens if the process that is executing the virtual machine terminates
559 unexpectedly (for example, crashes). Other than that, the Aborted state is
560 equivalent to PoweredOff.
561
562 There are also a few additional state diagrams that do not deal with
563 virtual machine execution and therefore are shown separately. The states
564 shown on these diagrams are called <i>offline VM states</i> (this includes
565 PoweredOff, Aborted and Saved too).
566
567 The first diagram shows what happens when a lengthy setup operation is
568 being executed (such as <link to="IMachine::attachDevice"/>).
569
570 <pre>
571 +----------------------------------(same state as before the call)------+
572 | |
573 +-&gt; PoweredOff --+ |
574 | | |
575 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
576 | |
577 +-&gt; Saved -------+
578 </pre>
579
580 The next two diagrams demonstrate the process of taking a snapshot of a
581 powered off virtual machine, restoring the state to that as of a snapshot
582 or deleting a snapshot, respectively.
583
584 <pre>
585 +----------------------------------(same state as before the call)------+
586 | |
587 +-&gt; PoweredOff --+ |
588 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
589 +-&gt; Aborted -----+
590
591 +-&gt; PoweredOff --+
592 | |
593 | Aborted -----+--&gt;[restoreSnapshot() ]-------&gt; RestoringSnapshot -+
594 | | [deleteSnapshot() ]-------&gt; DeletingSnapshot --+
595 +-&gt; Saved -------+ |
596 | |
597 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
598 </pre>
599
600 Note that the Saving state is present in both the offline state group and
601 online state group. Currently, the only way to determine what group is
602 assumed in a particular case is to remember the previous machine state: if
603 it was Running or Paused, then Saving is an online state, otherwise it is
604 an offline state. This inconsistency may be removed in one of the future
605 versions of VirtualBox by adding a new state.
606
607 <note internal="yes">
608 For whoever decides to touch this enum: In order to keep the
609 comparisons involving FirstOnline and LastOnline pseudo-states valid,
610 the numeric values of these states must be correspondingly updated if
611 needed: for any online VM state, the condition
612 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
613 @c true. The same relates to transient states for which
614 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
615 @c true.
616 </note>
617 </desc>
618
619 <const name="Null" value="0">
620 <desc>Null value (never used by the API).</desc>
621 </const>
622 <const name="PoweredOff" value="1">
623 <desc>
624 The machine is not running and has no saved execution state; it has
625 either never been started or been shut down successfully.
626 </desc>
627 </const>
628 <const name="Saved" value="2">
629 <desc>
630 The machine is not currently running, but the execution state of the machine
631 has been saved to an external file when it was running, from where
632 it can be resumed.
633 </desc>
634 </const>
635 <const name="Teleported" value="3">
636 <desc>
637 The machine was teleported to a different host (or process) and then
638 powered off. Take care when powering it on again may corrupt resources
639 it shares with the teleportation target (e.g. disk and network).
640 </desc>
641 </const>
642 <const name="Aborted" value="4">
643 <desc>
644 The process running the machine has terminated abnormally. This may
645 indicate a crash of the VM process in host execution context, or
646 the VM process has been terminated externally.
647 </desc>
648 </const>
649 <const name="Running" value="5">
650 <desc>
651 The machine is currently being executed.
652 <note internal="yes">
653 For whoever decides to touch this enum: In order to keep the
654 comparisons in the old source code valid, this state must immediately
655 precede the Paused state.
656 TODO: Lift this spectacularly wonderful restriction.
657 </note>
658 </desc>
659 </const>
660 <const name="Paused" value="6">
661 <desc>
662 Execution of the machine has been paused.
663 <note internal="yes">
664 For whoever decides to touch this enum: In order to keep the
665 comparisons in the old source code valid, this state must immediately
666 follow the Running state.
667 TODO: Lift this spectacularly wonderful restriction.
668 </note>
669 </desc>
670 </const>
671 <const name="Stuck" value="7">
672 <desc>
673 Execution of the machine has reached the "Guru Meditation"
674 condition. This indicates a severe error in the hypervisor itself.
675 <note internal="yes">
676 bird: Why this uncool name? Could we rename it to "GuruMeditation" or
677 "Guru", perhaps? Or are there some other VMM states that are
678 intended to be lumped in here as well?
679 </note>
680 </desc>
681 </const>
682 <const name="Teleporting" value="8">
683 <desc>
684 The machine is about to be teleported to a different host or process.
685 It is possible to pause a machine in this state, but it will go to the
686 @c TeleportingPausedVM state and it will not be
687 possible to resume it again unless the teleportation fails.
688 </desc>
689 </const>
690 <const name="LiveSnapshotting" value="9">
691 <desc>
692 A live snapshot is being taken. The machine is running normally, but
693 some of the runtime configuration options are inaccessible. Also, if
694 paused while in this state it will transition to
695 @c Saving and it will not be resume the
696 execution until the snapshot operation has completed.
697 </desc>
698 </const>
699 <const name="Starting" value="10">
700 <desc>
701 Machine is being started after powering it on from a
702 zero execution state.
703 </desc>
704 </const>
705 <const name="Stopping" value="11">
706 <desc>
707 Machine is being normally stopped powering it off, or after the guest OS
708 has initiated a shutdown sequence.
709 </desc>
710 </const>
711 <const name="Saving" value="12">
712 <desc>
713 Machine is saving its execution state to a file, or an online
714 snapshot of the machine is being taken.
715 </desc>
716 </const>
717 <const name="Restoring" value="13">
718 <desc>
719 Execution state of the machine is being restored from a file
720 after powering it on from the saved execution state.
721 </desc>
722 </const>
723 <const name="TeleportingPausedVM" value="14">
724 <desc>
725 The machine is being teleported to another host or process, but it is
726 not running. This is the paused variant of the
727 @c state.
728 </desc>
729 </const>
730 <const name="TeleportingIn" value="15">
731 <desc>
732 Teleporting the machine state in from another host or process.
733 </desc>
734 </const>
735 <const name="FaultTolerantSyncing" value="16">
736 <desc>
737 The machine is being synced with a fault tolerant VM running elsewhere.
738 </desc>
739 </const>
740 <const name="DeletingSnapshotOnline" value="17">
741 <desc>
742 Like @c DeletingSnapshot, but the merging of media is ongoing in
743 the background while the machine is running.
744 </desc>
745 </const>
746 <const name="DeletingSnapshotPaused" value="18">
747 <desc>
748 Like @c DeletingSnapshotOnline, but the machine was paused when the
749 merging of differencing media was started.
750 </desc>
751 </const>
752 <const name="RestoringSnapshot" value="19">
753 <desc>
754 A machine snapshot is being restored; this typically does not take long.
755 </desc>
756 </const>
757 <const name="DeletingSnapshot" value="20">
758 <desc>
759 A machine snapshot is being deleted; this can take a long time since this
760 may require merging differencing media. This value indicates that the
761 machine is not running while the snapshot is being deleted.
762 </desc>
763 </const>
764 <const name="SettingUp" value="21">
765 <desc>
766 Lengthy setup operation is in progress.
767 </desc>
768 </const>
769
770 <const name="FirstOnline" value="5" wsmap="suppress"> <!-- Running -->
771 <desc>
772 Pseudo-state: first online state (for use in relational expressions).
773 </desc>
774 </const>
775 <const name="LastOnline" value="18" wsmap="suppress"> <!-- DeletingSnapshotPaused -->
776 <desc>
777 Pseudo-state: last online state (for use in relational expressions).
778 </desc>
779 </const>
780
781 <const name="FirstTransient" value="8" wsmap="suppress"> <!-- Teleporting -->
782 <desc>
783 Pseudo-state: first transient state (for use in relational expressions).
784 </desc>
785 </const>
786 <const name="LastTransient" value="21" wsmap="suppress"> <!-- SettingUp -->
787 <desc>
788 Pseudo-state: last transient state (for use in relational expressions).
789 </desc>
790 </const>
791
792 </enum>
793
794 <enum
795 name="SessionState"
796 uuid="cf2700c0-ea4b-47ae-9725-7810114b94d8"
797 >
798 <desc>
799 Session state. This enumeration represents possible values of
800 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
801 attributes.
802 </desc>
803
804 <const name="Null" value="0">
805 <desc>Null value (never used by the API).</desc>
806 </const>
807 <const name="Unlocked" value="1">
808 <desc>
809 In <link to="IMachine::sessionState"/>, this means that the machine
810 is not locked for any sessions.
811
812 In <link to="ISession::state"/>, this means that no machine is
813 currently locked for this session.
814 </desc>
815 </const>
816 <const name="Locked" value="2">
817 <desc>
818 In <link to="IMachine::sessionState"/>, this means that the machine
819 is currently locked for a session, whose process identifier can
820 then be found in the <link to="IMachine::sessionPid" /> attribute.
821
822 In <link to="ISession::state"/>, this means that a machine is
823 currently locked for this session, and the mutable machine object
824 can be found in the <link to="ISession::machine"/> attribute
825 (see <link to="IMachine::lockMachine" /> for details).
826 </desc>
827 </const>
828 <const name="Spawning" value="3">
829 <desc>
830 A new process is being spawned for the machine as a result of
831 <link to="IMachine::launchVMProcess"/> call. This state also occurs
832 as a short transient state during an <link to="IMachine::lockMachine"/>
833 call.
834 </desc>
835 </const>
836 <const name="Unlocking" value="4">
837 <desc>
838 The session is being unlocked.
839 </desc>
840 </const>
841 </enum>
842
843 <enum
844 name="CPUPropertyType"
845 uuid="24d356a6-2f45-4abd-b977-1cbe9c4701f5"
846 >
847 <desc>
848 Virtual CPU property type. This enumeration represents possible values of the
849 IMachine get- and setCPUProperty methods.
850 </desc>
851 <const name="Null" value="0">
852 <desc>Null value (never used by the API).</desc>
853 </const>
854 <const name="PAE" value="1">
855 <desc>
856 This setting determines whether VirtualBox will expose the Physical Address
857 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
858 is not available, it will not be reported.
859 </desc>
860 </const>
861 <const name="Synthetic" value="2">
862 <desc>
863 This setting determines whether VirtualBox will expose a synthetic CPU to the guest to allow
864 teleporting between host systems that differ significantly.
865 </desc>
866 </const>
867 </enum>
868
869
870 <enum
871 name="HWVirtExPropertyType"
872 uuid="ce81dfdd-d2b8-4a90-bbea-40ee8b7ffcee"
873 >
874 <desc>
875 Hardware virtualization property type. This enumeration represents possible values
876 for the <link to="IMachine::getHWVirtExProperty"/> and
877 <link to="IMachine::setHWVirtExProperty"/> methods.
878 </desc>
879 <const name="Null" value="0">
880 <desc>Null value (never used by the API).</desc>
881 </const>
882 <const name="Enabled" value="1">
883 <desc>
884 Whether hardware virtualization (VT-x/AMD-V) is enabled at all. If
885 such extensions are not available, they will not be used.
886 </desc>
887 </const>
888 <const name="Exclusive" value="2">
889 <desc>
890 Whether hardware virtualization is used exclusively by VirtualBox. When enabled,
891 VirtualBox assumes it can acquire full and exclusive access to the VT-x or AMD-V
892 feature of the host. To share these with other hypervisors, you must disable this property.
893 </desc>
894 </const>
895 <const name="VPID" value="3">
896 <desc>
897 Whether VT-x VPID is enabled. If this extension is not available, it will not be used.
898 </desc>
899 </const>
900 <const name="NestedPaging" value="4">
901 <desc>
902 Whether Nested Paging is enabled. If this extension is not available, it will not be used.
903 </desc>
904 </const>
905 <const name="LargePages" value="5">
906 <desc>
907 Whether large page allocation is enabled; requires nested paging and a 64 bits host.
908 </desc>
909 </const>
910 <const name="Force" value="6">
911 <desc>
912 Whether the VM should fail to start if hardware virtualization (VT-x/AMD-V) cannot be used. If
913 not set, there will be an automatic fallback to software virtualization.
914 </desc>
915 </const>
916 </enum>
917
918 <enum
919 name="FaultToleranceState"
920 uuid="5124f7ec-6b67-493c-9dee-ee45a44114e1"
921 >
922 <desc>
923 Used with <link to="IMachine::faultToleranceState" />.
924 </desc>
925 <const name="Inactive" value="1">
926 <desc>No fault tolerance enabled.</desc>
927 </const>
928 <const name="Master" value="2">
929 <desc>Fault tolerant master VM.</desc>
930 </const>
931 <const name="Standby" value="3">
932 <desc>Fault tolerant standby VM.</desc>
933 </const>
934 </enum>
935
936 <enum
937 name="LockType"
938 uuid="138b53f8-db4b-47c5-b32b-4ef52f769413"
939 >
940 <desc>
941 Used with <link to="IMachine::lockMachine" />.
942 </desc>
943 <const name="Write" value="2">
944 <desc>Lock the machine for writing.</desc>
945 </const>
946 <const name="Shared" value="1">
947 <desc>Request only a shared read lock for remote-controlling the machine.</desc>
948 </const>
949 </enum>
950
951 <enum
952 name="SessionType"
953 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
954 >
955 <desc>
956 Session type. This enumeration represents possible values of the
957 <link to="ISession::type"/> attribute.
958 </desc>
959
960 <const name="Null" value="0">
961 <desc>Null value (never used by the API).</desc>
962 </const>
963 <const name="WriteLock" value="1">
964 <desc>
965 Session has acquired an exclusive write lock on a machine
966 using <link to="IMachine::lockMachine"/>.
967 </desc>
968 </const>
969 <const name="Remote" value="2">
970 <desc>
971 Session has launched a VM process using
972 <link to="IMachine::launchVMProcess"/>
973 </desc>
974 </const>
975 <const name="Shared" value="3">
976 <desc>
977 Session has obtained a link to another session using
978 <link to="IMachine::lockMachine"/>
979 </desc>
980 </const>
981 </enum>
982
983 <enum
984 name="DeviceType"
985 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
986 >
987 <desc>
988 Device type.
989 </desc>
990 <const name="Null" value="0">
991 <desc>
992 Null value, may also mean "no device" (not allowed for
993 <link to="IConsole::getDeviceActivity"/>).
994 </desc>
995 </const>
996 <const name="Floppy" value="1">
997 <desc>Floppy device.</desc>
998 </const>
999 <const name="DVD" value="2">
1000 <desc>CD/DVD-ROM device.</desc>
1001 </const>
1002 <const name="HardDisk" value="3">
1003 <desc>Hard disk device.</desc>
1004 </const>
1005 <const name="Network" value="4">
1006 <desc>Network device.</desc>
1007 </const>
1008 <const name="USB" value="5">
1009 <desc>USB device.</desc>
1010 </const>
1011 <const name="SharedFolder" value="6">
1012 <desc>Shared folder device.</desc>
1013 </const>
1014 </enum>
1015
1016 <enum
1017 name="DeviceActivity"
1018 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
1019 >
1020 <desc>
1021 Device activity for <link to="IConsole::getDeviceActivity"/>.
1022 </desc>
1023
1024 <const name="Null" value="0"/>
1025 <const name="Idle" value="1"/>
1026 <const name="Reading" value="2"/>
1027 <const name="Writing" value="3"/>
1028 </enum>
1029
1030 <enum
1031 name="ClipboardMode"
1032 uuid="33364716-4008-4701-8f14-be0fa3d62950"
1033 >
1034 <desc>
1035 Host-Guest clipboard interchange mode.
1036 </desc>
1037
1038 <const name="Disabled" value="0"/>
1039 <const name="HostToGuest" value="1"/>
1040 <const name="GuestToHost" value="2"/>
1041 <const name="Bidirectional" value="3"/>
1042 </enum>
1043
1044 <enum
1045 name="Scope"
1046 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
1047 >
1048 <desc>
1049 Scope of the operation.
1050
1051 A generic enumeration used in various methods to define the action or
1052 argument scope.
1053 </desc>
1054
1055 <const name="Global" value="0"/>
1056 <const name="Machine" value="1"/>
1057 <const name="Session" value="2"/>
1058 </enum>
1059
1060 <enum
1061 name="BIOSBootMenuMode"
1062 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
1063 >
1064 <desc>
1065 BIOS boot menu mode.
1066 </desc>
1067
1068 <const name="Disabled" value="0"/>
1069 <const name="MenuOnly" value="1"/>
1070 <const name="MessageAndMenu" value="2"/>
1071 </enum>
1072
1073 <enum
1074 name="ProcessorFeature"
1075 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
1076 >
1077 <desc>
1078 CPU features.
1079 </desc>
1080
1081 <const name="HWVirtEx" value="0"/>
1082 <const name="PAE" value="1"/>
1083 <const name="LongMode" value="2"/>
1084 <const name="NestedPaging" value="3"/>
1085 </enum>
1086
1087 <enum
1088 name="FirmwareType"
1089 uuid="b903f264-c230-483e-ac74-2b37ce60d371"
1090 >
1091 <desc>
1092 Firmware type.
1093 </desc>
1094 <const name="BIOS" value="1">
1095 <desc>BIOS Firmware.</desc>
1096 </const>
1097 <const name="EFI" value="2">
1098 <desc>EFI Firmware, bitness detetced basing on OS type.</desc>
1099 </const>
1100 <const name="EFI32" value="3">
1101 <desc>Efi firmware, 32-bit.</desc>
1102 </const>
1103 <const name="EFI64" value="4">
1104 <desc>Efi firmware, 64-bit.</desc>
1105 </const>
1106 <const name="EFIDUAL" value="5">
1107 <desc>Efi firmware, combined 32 and 64-bit.</desc>
1108 </const>
1109 </enum>
1110
1111 <enum
1112 name="PointingHidType"
1113 uuid="0d3c17a2-821a-4b2e-ae41-890c6c60aa97"
1114 >
1115 <desc>
1116 Type of pointing device used in a virtual machine.
1117 </desc>
1118 <const name="None" value="1">
1119 <desc>No mouse.</desc>
1120 </const>
1121 <const name="PS2Mouse" value="2">
1122 <desc>PS/2 auxillary device, a.k.a. mouse.</desc>
1123 </const>
1124 <const name="USBMouse" value="3">
1125 <desc>USB mouse (relative pointer).</desc>
1126 </const>
1127 <const name="USBTablet" value="4">
1128 <desc>USB tablet (absolute pointer).</desc>
1129 </const>
1130 <const name="ComboMouse" value="5">
1131 <desc>Combined device, working as PS/2 or USB mouse, depending on guest behavior.
1132 Using of such device can have negative performance implications. </desc>
1133 </const>
1134 </enum>
1135
1136 <enum
1137 name="KeyboardHidType"
1138 uuid="5a5b0996-3a3e-44bb-9019-56979812cbcc"
1139 >
1140 <desc>
1141 Type of keyboard device used in a virtual machine.
1142 </desc>
1143 <const name="None" value="1">
1144 <desc>No keyboard.</desc>
1145 </const>
1146 <const name="PS2Keyboard" value="2">
1147 <desc>PS/2 keyboard.</desc>
1148 </const>
1149 <const name="USBKeyboard" value="3">
1150 <desc>USB keyboard.</desc>
1151 </const>
1152 <const name="ComboKeyboard" value="4">
1153 <desc>Combined device, working as PS/2 or USB keyboard, depending on guest behavior.
1154 Using of such device can have negative performance implications. </desc>
1155 </const>
1156 </enum>
1157
1158 <!--
1159 // IVirtualBoxErrorInfo
1160 /////////////////////////////////////////////////////////////////////////
1161 -->
1162
1163 <interface
1164 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1165 uuid="e053d3c0-f493-491b-a735-3a9f0b1feed4"
1166 supportsErrorInfo="no"
1167 wsmap="managed"
1168 >
1169 <desc>
1170 The IVirtualBoxErrorInfo interface represents extended error information.
1171
1172 Extended error information can be set by VirtualBox components after
1173 unsuccessful or partially successful method invocation. This information
1174 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1175 and then shown to the client in addition to the plain 32-bit result code.
1176
1177 In MS COM, this interface extends the IErrorInfo interface,
1178 in XPCOM, it extends the nsIException interface. In both cases,
1179 it provides a set of common attributes to retrieve error
1180 information.
1181
1182 Sometimes invocation of some component's method may involve methods of
1183 other components that may also fail (independently of this method's
1184 failure), or a series of non-fatal errors may precede a fatal error that
1185 causes method failure. In cases like that, it may be desirable to preserve
1186 information about all errors happened during method invocation and deliver
1187 it to the caller. The <link to="#next"/> attribute is intended
1188 specifically for this purpose and allows to represent a chain of errors
1189 through a single IVirtualBoxErrorInfo object set after method invocation.
1190
1191 Note that errors are stored to a chain in the reverse order, i.e. the
1192 initial error object you query right after method invocation is the last
1193 error set by the callee, the object it points to in the @a next attribute
1194 is the previous error and so on, up to the first error (which is the last
1195 in the chain).
1196 </desc>
1197
1198 <attribute name="resultCode" type="long" readonly="yes">
1199 <desc>
1200 Result code of the error.
1201 Usually, it will be the same as the result code returned
1202 by the method that provided this error information, but not
1203 always. For example, on Win32, CoCreateInstance() will most
1204 likely return E_NOINTERFACE upon unsuccessful component
1205 instantiation attempt, but not the value the component factory
1206 returned. Value is typed 'long', not 'result',
1207 to make interface usable from scripting languages.
1208 <note>
1209 In MS COM, there is no equivalent.
1210 In XPCOM, it is the same as nsIException::result.
1211 </note>
1212 </desc>
1213 </attribute>
1214
1215 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1216 <desc>
1217 UUID of the interface that defined the error.
1218 <note>
1219 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1220 data type.
1221 In XPCOM, there is no equivalent.
1222 </note>
1223 </desc>
1224 </attribute>
1225
1226 <attribute name="component" type="wstring" readonly="yes">
1227 <desc>
1228 Name of the component that generated the error.
1229 <note>
1230 In MS COM, it is the same as IErrorInfo::GetSource.
1231 In XPCOM, there is no equivalent.
1232 </note>
1233 </desc>
1234 </attribute>
1235
1236 <attribute name="text" type="wstring" readonly="yes">
1237 <desc>
1238 Text description of the error.
1239 <note>
1240 In MS COM, it is the same as IErrorInfo::GetDescription.
1241 In XPCOM, it is the same as nsIException::message.
1242 </note>
1243 </desc>
1244 </attribute>
1245
1246 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1247 <desc>
1248 Next error object if there is any, or @c null otherwise.
1249 <note>
1250 In MS COM, there is no equivalent.
1251 In XPCOM, it is the same as nsIException::inner.
1252 </note>
1253 </desc>
1254 </attribute>
1255
1256 </interface>
1257
1258 <!--
1259 // IVirtualBox
1260 /////////////////////////////////////////////////////////////////////////
1261 -->
1262
1263 <interface
1264 name="IDHCPServer" extends="$unknown"
1265 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1266 wsmap="managed"
1267 >
1268 <desc>
1269 The IDHCPServer interface represents the vbox dhcp server configuration.
1270
1271 To enumerate all the dhcp servers on the host, use the
1272 <link to="IVirtualBox::DHCPServers"/> attribute.
1273 </desc>
1274
1275 <attribute name="enabled" type="boolean">
1276 <desc>
1277 specifies if the dhcp server is enabled
1278 </desc>
1279 </attribute>
1280
1281 <attribute name="IPAddress" type="wstring" readonly="yes">
1282 <desc>
1283 specifies server IP
1284 </desc>
1285 </attribute>
1286
1287 <attribute name="networkMask" type="wstring" readonly="yes">
1288 <desc>
1289 specifies server network mask
1290 </desc>
1291 </attribute>
1292
1293 <attribute name="networkName" type="wstring" readonly="yes">
1294 <desc>
1295 specifies internal network name the server is used for
1296 </desc>
1297 </attribute>
1298
1299 <attribute name="lowerIP" type="wstring" readonly="yes">
1300 <desc>
1301 specifies from IP adrres in server address range
1302 </desc>
1303 </attribute>
1304
1305 <attribute name="upperIP" type="wstring" readonly="yes">
1306 <desc>
1307 specifies to IP adrres in server address range
1308 </desc>
1309 </attribute>
1310
1311 <method name="setConfiguration">
1312 <desc>
1313 configures the server
1314 <result name="E_INVALIDARG">
1315 invalid configuration supplied
1316 </result>
1317 </desc>
1318 <param name="IPAddress" type="wstring" dir="in">
1319 <desc>
1320 server IP address
1321 </desc>
1322 </param>
1323 <param name="networkMask" type="wstring" dir="in">
1324 <desc>
1325 server network mask
1326 </desc>
1327 </param>
1328 <param name="FromIPAddress" type="wstring" dir="in">
1329 <desc>
1330 server From IP address for address range
1331 </desc>
1332 </param>
1333 <param name="ToIPAddress" type="wstring" dir="in">
1334 <desc>
1335 server To IP address for address range
1336 </desc>
1337 </param>
1338 </method>
1339
1340 <method name="start">
1341 <desc>
1342 Starts DHCP server process.
1343 <result name="E_FAIL">
1344 Failed to start the process.
1345 </result>
1346 </desc>
1347 <param name="networkName" type="wstring" dir="in">
1348 <desc>
1349 Name of internal network DHCP server should attach to.
1350 </desc>
1351 </param>
1352 <param name="trunkName" type="wstring" dir="in">
1353 <desc>
1354 Name of internal network trunk.
1355 </desc>
1356 </param>
1357 <param name="trunkType" type="wstring" dir="in">
1358 <desc>
1359 Type of internal network trunk.
1360 </desc>
1361 </param>
1362 </method>
1363
1364 <method name="stop">
1365 <desc>
1366 Stops DHCP server process.
1367 <result name="E_FAIL">
1368 Failed to stop the process.
1369 </result>
1370 </desc>
1371 </method>
1372 </interface>
1373
1374 <interface
1375 name="IVirtualBox" extends="$unknown"
1376 uuid="1489e5b2-40ed-4037-b8c9-d316bbf5e07c"
1377 wsmap="managed"
1378 >
1379 <desc>
1380 The IVirtualBox interface represents the main interface exposed by the
1381 product that provides virtual machine management.
1382
1383 An instance of IVirtualBox is required for the product to do anything
1384 useful. Even though the interface does not expose this, internally,
1385 IVirtualBox is implemented as a singleton and actually lives in the
1386 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1387 IVirtualBox can track the state of all virtual machines on a particular
1388 host, regardless of which frontend started them.
1389
1390 To enumerate all the virtual machines on the host, use the
1391 <link to="IVirtualBox::machines"/> attribute.
1392 </desc>
1393
1394 <attribute name="version" type="wstring" readonly="yes">
1395 <desc>
1396 A string representing the version number of the product. The
1397 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1398 last number represents the build number and will frequently change.
1399 </desc>
1400 </attribute>
1401
1402 <attribute name="revision" type="unsigned long" readonly="yes">
1403 <desc>
1404 The internal build revision number of the product.
1405 </desc>
1406 </attribute>
1407
1408 <attribute name="packageType" type="wstring" readonly="yes">
1409 <desc>
1410 A string representing the package type of this product. The
1411 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1412 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1413 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1414 this.
1415 </desc>
1416 </attribute>
1417
1418 <attribute name="homeFolder" type="wstring" readonly="yes">
1419 <desc>
1420 Full path to the directory where the global settings file,
1421 <tt>VirtualBox.xml</tt>, is stored.
1422
1423 In this version of VirtualBox, the value of this property is
1424 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1425 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1426 as determined by the host OS), and cannot be changed.
1427
1428 This path is also used as the base to resolve relative paths in
1429 places where relative paths are allowed (unless otherwise
1430 expressly indicated).
1431 </desc>
1432 </attribute>
1433
1434 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1435 <desc>
1436 Full name of the global settings file.
1437 The value of this property corresponds to the value of
1438 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1439 </desc>
1440 </attribute>
1441
1442 <attribute name="host" type="IHost" readonly="yes">
1443 <desc>Associated host object.</desc>
1444 </attribute>
1445
1446 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1447 <desc>Associated system information object.</desc>
1448 </attribute>
1449
1450 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1451 <desc>
1452 Array of machine objects registered within this VirtualBox instance.
1453 </desc>
1454 </attribute>
1455
1456 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1457 <desc>
1458 Array of medium objects known to this VirtualBox installation.
1459
1460 This array contains only base media. All differencing
1461 media of the given base medium can be enumerated using
1462 <link to="IMedium::children"/>.
1463 </desc>
1464 </attribute>
1465
1466 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1467 <desc>
1468 Array of CD/DVD image objects currently in use by this VirtualBox instance.
1469 </desc>
1470 </attribute>
1471
1472 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1473 <desc>
1474 Array of floppy image objects currently in use by this VirtualBox instance.
1475 </desc>
1476 </attribute>
1477
1478 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1479
1480 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1481
1482 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1483 <desc>
1484 Collection of global shared folders. Global shared folders are
1485 available to all virtual machines.
1486
1487 New shared folders are added to the collection using
1488 <link to="#createSharedFolder"/>. Existing shared folders can be
1489 removed using <link to="#removeSharedFolder"/>.
1490
1491 <note>
1492 In the current version of the product, global shared folders are not
1493 implemented and therefore this collection is always empty.
1494 </note>
1495 </desc>
1496 </attribute>
1497
1498 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1499 <desc>
1500 Associated performance collector object.
1501 </desc>
1502 </attribute>
1503
1504 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1505 <desc>
1506 dhcp server settings.
1507 </desc>
1508 </attribute>
1509
1510 <attribute name="eventSource" type="IEventSource" readonly="yes">
1511 <desc>
1512 Event source for VirtualBox events.
1513 </desc>
1514 </attribute>
1515
1516 <method name="composeMachineFilename">
1517 <desc>
1518 Returns the full path of the settings file name that <link to="#createMachine" />
1519 would use. This method gets called by createMachine(), but calling this method
1520 independently might be helpful if one needs to create the machine directory
1521 to place files (such as disk images) there before actually creating the machine.
1522
1523 See the <link to="IMachine::name"/> attribute description for more details about
1524 the machine name.
1525
1526 Every machine has a <i>settings file</i> that is used to store
1527 the machine configuration. This file is stored in a directory called the
1528 <i>machine settings subfolder</i>. Both the settings subfolder and file
1529 will have a name that corresponds to the name of the virtual machine.
1530 You can specify where to create the machine setting subfolder using the
1531 @a baseFolder argument. The base folder can be absolute (full path) or
1532 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1533 directory</link>.
1534
1535 If @a baseFolder is a @c null or empty string (which is recommended), the
1536 <link to="ISystemProperties::defaultMachineFolder">default machine
1537 settings folder</link> will be used as a base folder for the created
1538 machine. Otherwise the given base folder will be used. In either case,
1539 the full path to the resulting settings file has the following
1540 structure:
1541 <pre>
1542 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1543 </pre>
1544
1545
1546 This method does not access the host disks. In particular, it does not check for
1547 whether a machine of this name already exists.
1548 </desc>
1549 <param name="name" type="wstring" dir="in">
1550 <desc>Suggested machine name.</desc>
1551 </param>
1552 <param name="baseFolder" type="wstring" dir="in">
1553 <desc>Base machine folder (optional).</desc>
1554 </param>
1555 <param name="file" type="wstring" dir="return">
1556 <desc>Fully qualified path where the machine would be created.</desc>
1557 </param>
1558 </method>
1559
1560 <method name="createMachine">
1561 <desc>
1562 Creates a new virtual machine.
1563
1564 The new machine is created unregistered, with the initial configuration
1565 set according to the specified guest OS type. A typical sequence of
1566 actions to create a new virtual machine is as follows:
1567
1568 <ol>
1569 <li>
1570 Call this method to have a new machine created. The returned machine
1571 object will be "mutable" allowing to change any machine property.
1572 </li>
1573
1574 <li>
1575 Configure the machine using the appropriate attributes and methods.
1576 </li>
1577
1578 <li>
1579 Call <link to="IMachine::saveSettings" /> to write the settings
1580 to the machine's XML settings file. The configuration of the newly
1581 created machine will not be saved to disk until this method is
1582 called.
1583 </li>
1584
1585 <li>
1586 Call <link to="#registerMachine" /> to add the machine to the list
1587 of machines known to VirtualBox.
1588 </li>
1589 </ol>
1590
1591 The specified guest OS type identifier must match an ID of one of known
1592 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1593 array.
1594
1595 This method uses the <link to="#composeMachineFilename" /> method to determine
1596 where to create the machine's directory and settings file. Please refer
1597 to the additional remarks and restrictions there.
1598
1599 If the resulting settings file already exists, this method will fail
1600 with <link to="VBOX_E_FILE_ERROR"/>.
1601
1602 Optionally, you may specify an UUID of to assign to the created machine.
1603 However, this is not recommended and you should normally pass an empty
1604 (@c null) UUID to this method so that a new UUID will be automatically
1605 generated for every created machine. You can use UUID
1606 00000000-0000-0000-0000-000000000000 as @c null value.
1607
1608 <note>
1609 There is no way to change the name of the settings file or
1610 subfolder of the created machine directly.
1611 </note>
1612
1613 <result name="VBOX_E_OBJECT_NOT_FOUND">
1614 @a osTypeId is invalid.
1615 </result>
1616 <result name="VBOX_E_FILE_ERROR">
1617 Resulting settings file name is invalid or the settings file already
1618 exists or could not be created due to an I/O error.
1619 </result>
1620 <result name="E_INVALIDARG">
1621 @a name is empty or @c null.
1622 </result>
1623 </desc>
1624
1625 <param name="name" type="wstring" dir="in">
1626 <desc>Machine name.</desc>
1627 </param>
1628 <param name="osTypeId" type="wstring" dir="in">
1629 <desc>Guest OS Type ID.</desc>
1630 </param>
1631 <param name="baseFolder" type="wstring" dir="in">
1632 <desc>Base machine folder (optional).</desc>
1633 </param>
1634 <param name="id" type="uuid" mod="string" dir="in">
1635 <desc>Machine UUID (optional).</desc>
1636 </param>
1637 <param name="override" type="boolean" dir="in">
1638 <desc>Create the VM even if there are conflicting files.</desc>
1639 </param>
1640 <param name="machine" type="IMachine" dir="return">
1641 <desc>Created machine object.</desc>
1642 </param>
1643 </method>
1644
1645 <method name="openMachine">
1646 <desc>
1647 Opens a virtual machine from the existing settings file.
1648 The opened machine remains unregistered until you call
1649 <link to="#registerMachine"/>.
1650
1651 The specified settings file name can be absolute
1652 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1653 VirtualBox home directory</link>. This file must exist
1654 and must be a valid machine settings file whose contents
1655 will be used to construct the machine object.
1656
1657 <result name="VBOX_E_FILE_ERROR">
1658 Settings file name invalid, not found or sharing violation.
1659 </result>
1660 </desc>
1661 <param name="settingsFile" type="wstring" dir="in">
1662 <desc>
1663 Name of the machine settings file.
1664 </desc>
1665 </param>
1666 <param name="machine" type="IMachine" dir="return">
1667 <desc>Opened machine object.</desc>
1668 </param>
1669 <note>
1670 <link to="IMachine::settingsModified"/> will return
1671 @c false for the created machine, until any of machine settings
1672 are changed.
1673 </note>
1674 </method>
1675
1676 <method name="registerMachine">
1677 <desc>
1678
1679 Registers the machine previously created using
1680 <link to="#createMachine"/> or opened using
1681 <link to="#openMachine"/> within this VirtualBox installation. After
1682 successful method invocation, the
1683 <link to="IMachineRegisteredEvent"/> event is fired.
1684
1685 <note>
1686 This method implicitly calls <link to="IMachine::saveSettings"/>
1687 to save all current machine settings before registering it.
1688 </note>
1689
1690 <result name="VBOX_E_OBJECT_NOT_FOUND">
1691 No matching virtual machine found.
1692 </result>
1693 <result name="VBOX_E_INVALID_OBJECT_STATE">
1694 Virtual machine was not created within this VirtualBox instance.
1695 </result>
1696
1697 </desc>
1698 <param name="machine" type="IMachine" dir="in"/>
1699 </method>
1700
1701 <method name="getMachine">
1702 <desc>
1703 Attempts to find a virtual machine given its UUID.
1704 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1705 instead.
1706
1707 <result name="VBOX_E_OBJECT_NOT_FOUND">
1708 Could not find registered machine matching @a id.
1709 </result>
1710
1711 </desc>
1712 <param name="id" type="uuid" mod="string" dir="in"/>
1713 <param name="machine" type="IMachine" dir="return"/>
1714 </method>
1715
1716 <method name="findMachine">
1717 <desc>
1718 Attempts to find a virtual machine given its name.
1719 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1720 instead.
1721
1722 <result name="VBOX_E_OBJECT_NOT_FOUND">
1723 Could not find registered machine matching @a name.
1724 </result>
1725
1726 </desc>
1727 <param name="name" type="wstring" dir="in"/>
1728 <param name="machine" type="IMachine" dir="return"/>
1729 </method>
1730
1731 <method name="createAppliance">
1732 <desc>
1733 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1734 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1735 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1736 </desc>
1737 <param name="appliance" type="IAppliance" dir="return">
1738 <desc>New appliance.</desc>
1739 </param>
1740 </method>
1741
1742 <method name="createHardDisk">
1743 <desc>
1744 Creates a new base medium object that will use the given storage
1745 format and location for medium data.
1746
1747 Note that the actual storage unit is not created by this method. In
1748 order to do it, and before you are able to attach the created medium
1749 to virtual machines, you must call one of the following methods to
1750 allocate a format-specific storage unit at the specified location:
1751 <ul>
1752 <li><link to="IMedium::createBaseStorage"/></li>
1753 <li><link to="IMedium::createDiffStorage"/></li>
1754 </ul>
1755
1756 Some medium attributes, such as <link to="IMedium::id"/>, may
1757 remain uninitialized until the medium storage unit is successfully
1758 created by one of the above methods.
1759
1760 After the storage unit is successfully created, it will be
1761 accessible through the <link to="#findMedium"/> method and can
1762 be found in the <link to="#hardDisks"/> array.
1763
1764 The list of all storage formats supported by this VirtualBox
1765 installation can be obtained using
1766 <link to="ISystemProperties::mediumFormats"/>. If the @a format
1767 attribute is empty or @c null then the default storage format
1768 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1769 be used for creating a storage unit of the medium.
1770
1771 Note that the format of the location string is storage format specific.
1772 See <link to="IMedium::location"/> and IMedium for more details.
1773
1774 <result name="VBOX_E_OBJECT_NOT_FOUND">
1775 @a format identifier is invalid. See
1776 <link to="ISystemProperties::mediumFormats"/>.
1777 </result>
1778 <result name="VBOX_E_FILE_ERROR">
1779 @a location is a not valid file name (for file-based formats only).
1780 </result>
1781 </desc>
1782 <param name="format" type="wstring" dir="in">
1783 <desc>
1784 Identifier of the storage format to use for the new medium.
1785 </desc>
1786 </param>
1787 <param name="location" type="wstring" dir="in">
1788 <desc>
1789 Location of the storage unit for the new medium.
1790 </desc>
1791 </param>
1792 <param name="medium" type="IMedium" dir="return">
1793 <desc>Created medium object.</desc>
1794 </param>
1795 </method>
1796
1797 <method name="openMedium">
1798 <desc>
1799 Opens a medium from an existing storage location.
1800
1801 Once a medium has been opened, it can be passed to other VirtualBox
1802 methods, in particular to <link to="IMachine::attachDevice" />.
1803
1804 Depending on the given device type, the file at the storage location
1805 must be in one of the media formats understood by VirtualBox:
1806
1807 <ul>
1808 <li>With a "HardDisk" device type, the file must be a hard disk image
1809 in one of the formats supported by VirtualBox (see
1810 <link to="ISystemProperties::mediumFormats" />).
1811 After this method succeeds, if the medium is a base medium, it
1812 will be added to the <link to="#hardDisks"/> array attribute. </li>
1813 <li>With a "DVD" device type, the file must be an ISO 9960 CD/DVD image.
1814 After this method succeeds, the medium will be added to the
1815 <link to="#DVDImages"/> array attribute.</li>
1816 <li>With a "Floppy" device type, the file must be an RAW floppy image.
1817 After this method succeeds, the medium will be added to the
1818 <link to="#floppyImages"/> array attribute.</li>
1819 </ul>
1820
1821 After having been opened, the medium can be found by the <link to="#findMedium"/>
1822 method and can be attached to virtual machines. See <link to="IMedium" /> for more details.
1823
1824 The UUID of the newly opened medium will either be retrieved from the
1825 storage location, if the format supports it (e.g. for hard disk images),
1826 or a new UUID will be randomly generated (e.g. for ISO and RAW files).
1827 If for some reason you need to change the medium's UUID, use
1828 <link to="IMedium::setIDs" />.
1829
1830 If a differencing hard disk medium is to be opened by this method, the
1831 operation will succeed only if its parent medium and all ancestors,
1832 if any, are already known to this VirtualBox installation (for example,
1833 were opened by this method before).
1834
1835 This method attempts to guess the storage format of the specified medium
1836 by reading medium data at the specified location.
1837
1838 If @a accessMode is ReadWrite (which it should be for hard disks and floppies),
1839 the image is opened for read/write access and must have according permissions,
1840 as VirtualBox may actually write status information into the disk's metadata
1841 sections.
1842
1843 Note that write access is required for all typical hard disk usage in VirtualBox,
1844 since VirtualBox may need to write metadata such as a UUID into the image.
1845 The only exception is opening a source image temporarily for copying and
1846 cloning (see <link to="IMedium::cloneTo" /> when the image will be closed
1847 again soon.
1848
1849 The format of the location string is storage format specific. See
1850 <link to="IMedium::location"/> and IMedium for more details.
1851
1852 Prior to VirtualBox 3.3, opening a medium added it to a global media
1853 registry in the VirtualBox.xml file, which was shared between
1854 all machines and made transporting machines and their media from one
1855 host to another difficult.
1856
1857 Starting with VirtualBox 3.3, media are only added to a registry when
1858 they are attached to a machine. Machines created with VirtualBox 3.3
1859 or later can have their own media registry. As a result, a medium attached
1860 to such a machine will be remembered in that machine's XML settings file.
1861 Media attached to older machines will continue to be added to the global
1862 registry.
1863
1864 <result name="VBOX_E_FILE_ERROR">
1865 Invalid medium storage file location or could not find the medium
1866 at the specified location.
1867 </result>
1868 <result name="VBOX_E_IPRT_ERROR">
1869 Could not get medium storage format.
1870 </result>
1871 <result name="E_INVALIDARG">
1872 Invalid medium storage format.
1873 </result>
1874 <result name="VBOX_E_INVALID_OBJECT_STATE">
1875 Medium has already been added to a media registry.
1876 </result>
1877 </desc>
1878 <param name="location" type="wstring" dir="in">
1879 <desc>
1880 Location of the storage unit that contains medium data in one of
1881 the supported storage formats.
1882 </desc>
1883 </param>
1884 <param name="deviceType" type="DeviceType" dir="in">
1885 <desc>
1886 Must be one of "HardDisk", "DVD" or "Floppy".
1887 </desc>
1888 </param>
1889 <param name="accessMode" type="AccessMode" dir="in">
1890 <desc>Whether to open the image in read/write or read-only mode. For
1891 a "DVD" device type, this is ignored and read-only mode is always assumed.</desc>
1892 </param>
1893 <param name="medium" type="IMedium" dir="return">
1894 <desc>Opened medium object.</desc>
1895 </param>
1896 </method>
1897
1898 <method name="findMedium">
1899 <desc>
1900 Returns a medium of the given type that uses the given fully qualified
1901 location or UUID to store medium data.
1902
1903 The given medium must be known to this VirtualBox installation, i.e.
1904 it must be previously created by <link to="#createHardDisk"/> or opened
1905 by <link to="#openMedium"/>.
1906
1907 The search is done by comparing the value of the @a location argument to
1908 the <link to="IMedium::location"/> and <link to="IMedium::id" />
1909 attributes of each known medium.
1910
1911 On case sensitive file systems, a case sensitive comparison is performed,
1912 otherwise the case of symbols in the file path is ignored.
1913
1914 <result name="VBOX_E_OBJECT_NOT_FOUND">
1915 No medium object matching @a location found.
1916 </result>
1917 </desc>
1918 <param name="location" type="wstring" dir="in">
1919 <desc>What to search for. This can either be the UUID or the location string of an open medium.</desc>
1920 </param>
1921 <param name="type" type="DeviceType" dir="in">
1922 <desc>Device type (must be HardDisk, DVD or Floppy)</desc>
1923 </param>
1924 <param name="medium" type="IMedium" dir="return">
1925 <desc>Medium object, if found.</desc>
1926 </param>
1927 </method>
1928
1929 <method name="getGuestOSType">
1930 <desc>
1931 Returns an object describing the specified guest OS type.
1932
1933 The requested guest OS type is specified using a string which is a
1934 mnemonic identifier of the guest operating system, such as
1935 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
1936 particular virtual machine can be read or set using the
1937 <link to="IMachine::OSTypeId"/> attribute.
1938
1939 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
1940 available guest OS type objects. Each object has an
1941 <link to="IGuestOSType::id"/> attribute which contains an identifier of
1942 the guest OS this object describes.
1943
1944 <result name="E_INVALIDARG">
1945 @a id is not a valid Guest OS type.
1946 </result>
1947
1948 </desc>
1949 <param name="id" type="uuid" mod="string" dir="in">
1950 <desc>Guest OS type ID string.</desc>
1951 </param>
1952 <param name="type" type="IGuestOSType" dir="return">
1953 <desc>Guest OS type object.</desc>
1954 </param>
1955 </method>
1956
1957 <method name="createSharedFolder">
1958 <desc>
1959 Creates a new global shared folder by associating the given logical
1960 name with the given host path, adds it to the collection of shared
1961 folders and starts sharing it. Refer to the description of
1962 <link to="ISharedFolder"/> to read more about logical names.
1963 <note>
1964 In the current implementation, this operation is not
1965 implemented.
1966 </note>
1967 </desc>
1968 <param name="name" type="wstring" dir="in">
1969 <desc>Unique logical name of the shared folder.</desc>
1970 </param>
1971 <param name="hostPath" type="wstring" dir="in">
1972 <desc>Full path to the shared folder in the host file system.</desc>
1973 </param>
1974 <param name="writable" type="boolean" dir="in">
1975 <desc>Whether the share is writable or readonly</desc>
1976 </param>
1977 <param name="automount" type="boolean" dir="in">
1978 <desc>Whether the share gets automatically mounted by the guest
1979 or not.</desc>
1980 </param>
1981 </method>
1982
1983 <method name="removeSharedFolder">
1984 <desc>
1985 Removes the global shared folder with the given name previously
1986 created by <link to="#createSharedFolder"/> from the collection of
1987 shared folders and stops sharing it.
1988 <note>
1989 In the current implementation, this operation is not
1990 implemented.
1991 </note>
1992 </desc>
1993 <param name="name" type="wstring" dir="in">
1994 <desc>Logical name of the shared folder to remove.</desc>
1995 </param>
1996 </method>
1997
1998 <method name="getExtraDataKeys">
1999 <desc>
2000 Returns an array representing the global extra data keys which currently
2001 have values defined.
2002 </desc>
2003 <param name="value" type="wstring" dir="return" safearray="yes">
2004 <desc>Array of extra data keys.</desc>
2005 </param>
2006 </method>
2007
2008 <method name="getExtraData">
2009 <desc>
2010 Returns associated global extra data.
2011
2012 If the requested data @a key does not exist, this function will
2013 succeed and return an empty string in the @a value argument.
2014
2015 <result name="VBOX_E_FILE_ERROR">
2016 Settings file not accessible.
2017 </result>
2018 <result name="VBOX_E_XML_ERROR">
2019 Could not parse the settings file.
2020 </result>
2021
2022 </desc>
2023 <param name="key" type="wstring" dir="in">
2024 <desc>Name of the data key to get.</desc>
2025 </param>
2026 <param name="value" type="wstring" dir="return">
2027 <desc>Value of the requested data key.</desc>
2028 </param>
2029 </method>
2030
2031 <method name="setExtraData">
2032 <desc>
2033 Sets associated global extra data.
2034
2035 If you pass @c null or empty string as a key @a value, the given @a key
2036 will be deleted.
2037
2038 <note>
2039 Before performing the actual data change, this method will ask all
2040 registered event listener using the
2041 <link to="IExtraDataCanChangeEvent"/>
2042 notification for a permission. If one of the listeners refuses the
2043 new value, the change will not be performed.
2044 </note>
2045 <note>
2046 On success, the
2047 <link to="IExtraDataChangedEvent"/> notification
2048 is called to inform all registered listeners about a successful data
2049 change.
2050 </note>
2051
2052 <result name="VBOX_E_FILE_ERROR">
2053 Settings file not accessible.
2054 </result>
2055 <result name="VBOX_E_XML_ERROR">
2056 Could not parse the settings file.
2057 </result>
2058 <result name="E_ACCESSDENIED">
2059 Modification request refused.
2060 </result>
2061
2062 </desc>
2063 <param name="key" type="wstring" dir="in">
2064 <desc>Name of the data key to set.</desc>
2065 </param>
2066 <param name="value" type="wstring" dir="in">
2067 <desc>Value to assign to the key.</desc>
2068 </param>
2069 </method>
2070
2071 <method name="waitForPropertyChange">
2072 <desc>
2073 Blocks the caller until any of the properties represented by the
2074 @a what argument changes the value or until the given timeout interval
2075 expires.
2076
2077 The @a what argument is a comma separated list of property masks that
2078 describe properties the caller is interested in. The property mask is
2079 a string in the following format:
2080
2081 <pre>
2082 [[group.]subgroup.]name
2083 </pre>
2084
2085 where @c name is the property name and @c group, @c subgroup are zero
2086 or more property group specifiers. Each element (group or name) in
2087 the property mask may be either a Latin string or an asterisk symbol
2088 (@c "*") which is used to match any string for the given element. A
2089 property mask that doesn't contain asterisk symbols represents a
2090 single fully qualified property name.
2091
2092 Groups in the fully qualified property name go from more generic (the
2093 left-most part) to more specific (the right-most part). The first
2094 element is usually a name of the object the property belongs to. The
2095 second element may be either a property name, or a child object name,
2096 or an index if the preceding element names an object which is one of
2097 many objects of the same type. This way, property names form a
2098 hierarchy of properties. Here are some examples of property names:
2099
2100 <table>
2101 <tr>
2102 <td><tt>VirtualBox.version</tt></td>
2103 <td><link to="IVirtualBox::version"/> property</td>
2104 </tr>
2105 <tr>
2106 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2107 <td><link to="IMachine::name"/> property of the machine with the
2108 given UUID</td>
2109 </tr>
2110 </table>
2111
2112 Most property names directly correspond to the properties of objects
2113 (components) provided by the VirtualBox library and may be used to
2114 track changes to these properties. However, there may be
2115 pseudo-property names that don't correspond to any existing object's
2116 property directly, as well as there may be object properties that
2117 don't have a corresponding property name that is understood by this
2118 method, and therefore changes to such properties cannot be
2119 tracked. See individual object's property descriptions to get a
2120 fully qualified property name that can be used with this method (if
2121 any).
2122
2123 There is a special property mask @c "*" (i.e. a string consisting of a
2124 single asterisk symbol) that can be used to match all properties.
2125 Below are more examples of property masks:
2126
2127 <table>
2128 <tr>
2129 <td><tt>VirtualBox.*</tt></td>
2130 <td>Track all properties of the VirtualBox object</td>
2131 </tr>
2132 <tr>
2133 <td><tt>Machine.*.name</tt></td>
2134 <td>Track changes to the <link to="IMachine::name"/> property of
2135 all registered virtual machines</td>
2136 </tr>
2137 </table>
2138
2139 <note>
2140 This function is not implemented in the current version of the
2141 product.
2142 </note>
2143 </desc>
2144 <param name="what" type="wstring" dir="in">
2145 <desc>Comma separated list of property masks.</desc>
2146 </param>
2147 <param name="timeout" type="unsigned long" dir="in">
2148 <desc>
2149 Wait timeout in milliseconds.
2150 Specify -1 for an indefinite wait.
2151 </desc>
2152 </param>
2153 <param name="changed" type="wstring" dir="out">
2154 <desc>
2155 Comma separated list of properties that have been changed and caused
2156 this method to return to the caller.
2157 </desc>
2158 </param>
2159 <param name="values" type="wstring" dir="out">
2160 <desc>Reserved, not currently used.</desc>
2161 </param>
2162 </method>
2163
2164 <!--method name="createDHCPServerForInterface">
2165 <desc>
2166 Creates a dhcp server settings to be used for the given interface
2167 <result name="E_INVALIDARG">
2168 Host network interface @a name already exists.
2169 </result>
2170 </desc>
2171 <param name="interface" type="IHostNetworkInterface" dir="in">
2172 <desc>Network Interface</desc>
2173 </param>
2174 <param name="server" type="IDHCPServer" dir="out">
2175 <desc>Dhcp server settings</desc>
2176 </param>
2177 </method-->
2178
2179 <method name="createDHCPServer">
2180 <desc>
2181 Creates a dhcp server settings to be used for the given internal network name
2182 <result name="E_INVALIDARG">
2183 Host network interface @a name already exists.
2184 </result>
2185 </desc>
2186 <param name="name" type="wstring" dir="in">
2187 <desc>server name</desc>
2188 </param>
2189 <param name="server" type="IDHCPServer" dir="return">
2190 <desc>Dhcp server settings</desc>
2191 </param>
2192 </method>
2193
2194 <method name="findDHCPServerByNetworkName">
2195 <desc>
2196 Searches a dhcp server settings to be used for the given internal network name
2197 <result name="E_INVALIDARG">
2198 Host network interface @a name already exists.
2199 </result>
2200
2201 </desc>
2202 <param name="name" type="wstring" dir="in">
2203 <desc>server name</desc>
2204 </param>
2205 <param name="server" type="IDHCPServer" dir="return">
2206 <desc>Dhcp server settings</desc>
2207 </param>
2208 </method>
2209
2210 <!--method name="findDHCPServerForInterface">
2211 <desc>
2212 Searches a dhcp server settings to be used for the given interface
2213 <result name="E_INVALIDARG">
2214 Host network interface @a name already exists.
2215 </result>
2216 </desc>
2217 <param name="interface" type="IHostNetworkInterface" dir="in">
2218 <desc>Network Interface</desc>
2219 </param>
2220 <param name="server" type="IDHCPServer" dir="out">
2221 <desc>Dhcp server settings</desc>
2222 </param>
2223 </method-->
2224
2225 <method name="removeDHCPServer">
2226 <desc>
2227 Removes the dhcp server settings
2228 <result name="E_INVALIDARG">
2229 Host network interface @a name already exists.
2230 </result>
2231 </desc>
2232 <param name="server" type="IDHCPServer" dir="in">
2233 <desc>Dhcp server settings to be removed</desc>
2234 </param>
2235 </method>
2236
2237
2238 <method name="checkFirmwarePresent">
2239 <desc>
2240 Check if this VirtualBox installation has a firmware
2241 of the given type available, either system-wide or per-user.
2242 Optionally, this may return a hint where this firmware can be
2243 downloaded from.
2244 </desc>
2245 <param name="firmwareType" type="FirmwareType" dir="in">
2246 <desc>
2247 Type of firmware to check.
2248 </desc>
2249 </param>
2250 <param name="version" type="wstring" dir="in">
2251 <desc>Expected version number, usually empty string (presently ignored).</desc>
2252 </param>
2253
2254 <param name="url" type="wstring" dir="out">
2255 <desc>
2256 Suggested URL to download this firmware from.
2257 </desc>
2258 </param>
2259
2260 <param name="file" type="wstring" dir="out">
2261 <desc>
2262 Filename of firmware, only valid if result == TRUE.
2263 </desc>
2264 </param>
2265
2266 <param name="result" type="boolean" dir="return">
2267 <desc>If firmware of this type and version is available.</desc>
2268 </param>
2269 </method>
2270
2271 </interface>
2272
2273 <!--
2274 // IVFSExplorer
2275 /////////////////////////////////////////////////////////////////////////
2276 -->
2277
2278 <enum
2279 name="VFSType"
2280 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
2281 >
2282 <desc>
2283 Virtual file systems supported by VFSExplorer.
2284 </desc>
2285
2286 <const name="File" value="1" />
2287 <const name="Cloud" value="2" />
2288 <const name="S3" value="3" />
2289 <const name="WebDav" value="4" />
2290 </enum>
2291
2292 <enum
2293 name="VFSFileType"
2294 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
2295 >
2296 <desc>
2297 File types known by VFSExplorer.
2298 </desc>
2299
2300 <const name="Unknown" value="1" />
2301 <const name="Fifo" value="2" />
2302 <const name="DevChar" value="3" />
2303 <const name="Directory" value="4" />
2304 <const name="DevBlock" value="5" />
2305 <const name="File" value="6" />
2306 <const name="SymLink" value="7" />
2307 <const name="Socket" value="8" />
2308 <const name="WhiteOut" value="9" />
2309 </enum>
2310
2311 <interface
2312 name="IVFSExplorer" extends="$unknown"
2313 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
2314 wsmap="managed"
2315 >
2316 <desc>
2317 The VFSExplorer interface unifies access to different file system
2318 types. This includes local file systems as well remote file systems like
2319 S3. For a list of supported types see <link to="VFSType" />.
2320 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
2321 </desc>
2322
2323 <attribute name="path" type="wstring" readonly="yes">
2324 <desc>Returns the current path in the virtual file system.</desc>
2325 </attribute>
2326
2327 <attribute name="type" type="VFSType" readonly="yes">
2328 <desc>Returns the file system type which is currently in use.</desc>
2329 </attribute>
2330
2331 <method name="update">
2332 <desc>Updates the internal list of files/directories from the
2333 current directory level. Use <link to="#entryList" /> to get the full list
2334 after a call to this method.</desc>
2335
2336 <param name="aProgress" type="IProgress" dir="return">
2337 <desc>Progress object to track the operation completion.</desc>
2338 </param>
2339 </method>
2340
2341 <method name="cd">
2342 <desc>Change the current directory level.</desc>
2343
2344 <param name="aDir" type="wstring" dir="in">
2345 <desc>The name of the directory to go in.</desc>
2346 </param>
2347
2348 <param name="aProgress" type="IProgress" dir="return">
2349 <desc>Progress object to track the operation completion.</desc>
2350 </param>
2351 </method>
2352
2353 <method name="cdUp">
2354 <desc>Go one directory upwards from the current directory level.</desc>
2355
2356 <param name="aProgress" type="IProgress" dir="return">
2357 <desc>Progress object to track the operation completion.</desc>
2358 </param>
2359 </method>
2360
2361 <method name="entryList">
2362 <desc>Returns a list of files/directories after a call to <link
2363 to="#update" />. The user is responsible for keeping this internal
2364 list up do date.</desc>
2365
2366 <param name="aNames" type="wstring" safearray="yes" dir="out">
2367 <desc>The list of names for the entries.</desc>
2368 </param>
2369
2370 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
2371 <desc>The list of types for the entries.</desc>
2372 </param>
2373 </method>
2374
2375 <method name="exists">
2376 <desc>Checks if the given file list exists in the current directory
2377 level.</desc>
2378
2379 <param name="aNames" type="wstring" safearray="yes" dir="in">
2380 <desc>The names to check.</desc>
2381 </param>
2382
2383 <param name="aExists" type="wstring" safearray="yes" dir="return">
2384 <desc>The names which exist.</desc>
2385 </param>
2386 </method>
2387
2388 <method name="remove">
2389 <desc>Deletes the given files in the current directory level.</desc>
2390
2391 <param name="aNames" type="wstring" safearray="yes" dir="in">
2392 <desc>The names to remove.</desc>
2393 </param>
2394
2395 <param name="aProgress" type="IProgress" dir="return">
2396 <desc>Progress object to track the operation completion.</desc>
2397 </param>
2398 </method>
2399
2400 </interface>
2401
2402 <!--
2403 // IAppliance
2404 /////////////////////////////////////////////////////////////////////////
2405 -->
2406
2407 <interface
2408 name="IAppliance" extends="$unknown"
2409 uuid="7b148032-4124-4f46-b56a-b48ac1273f5a"
2410 wsmap="managed"
2411 >
2412 <desc>
2413 Represents a platform-independent appliance in OVF format. An instance of this is returned
2414 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
2415 virtual machines within an appliance with VirtualBox.
2416
2417 The OVF standard suggests two different physical file formats:
2418
2419 <ol>
2420 <li>If the appliance is distributed as a set of files, there must be at least one XML descriptor
2421 file that conforms to the OVF standard and carries an <tt>.ovf</tt> file extension. If
2422 this descriptor file references other files such as disk images, as OVF appliances typically
2423 do, those additional files must be in the same directory as the descriptor file.</li>
2424
2425 <li>If the appliance is distributed as a single file, it must be in TAR format and have the
2426 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
2427 files and optionally other files.
2428
2429 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
2430 be added with a later version.</li>
2431 </ol>
2432
2433 <b>Importing</b> an OVF appliance into VirtualBox as instances of
2434 <link to="IMachine" /> involves the following sequence of API calls:
2435
2436 <ol>
2437 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
2438 </li>
2439
2440 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
2441 would like to import. So long as this file is syntactically valid, this will succeed
2442 and fill the appliance object with the parsed data from the OVF file.
2443 </li>
2444
2445 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
2446 contents of the IAppliance attributes accordingly. These can be inspected by a
2447 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
2448 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
2449 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
2450 systems (machines) in the OVF, which in turn describe the virtual hardware prescribed
2451 by the OVF (network and hardware adapters, virtual disk images, memory size and so on).
2452 The GUI can then give the user the option to confirm and/or change these suggestions.
2453 </li>
2454
2455 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
2456 virtual system (machine) to override the suggestions made by the interpret() routine.
2457 </li>
2458
2459 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
2460 VirtualBox as instances of <link to="IMachine" /> that match the information in the
2461 virtual system descriptions. After this call suceeded, the UUIDs of the machines created
2462 can be found in the <link to="#machines" /> array attribute.
2463 </li>
2464 </ol>
2465
2466 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
2467
2468 <ol>
2469 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
2470 an empty IAppliance object.
2471 </li>
2472
2473 <li>For each machine you would like to export, call <link to="IMachine::export" />
2474 with the IAppliance object you just created. Each such call creates one instance of
2475 <link to="IVirtualSystemDescription" /> inside the appliance.
2476 </li>
2477
2478 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
2479 virtual system (machine) to override the suggestions made by the export() routine.
2480 </li>
2481
2482 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
2483 file written.</li>
2484 </ol>
2485
2486 </desc>
2487
2488 <attribute name="path" type="wstring" readonly="yes">
2489 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
2490 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
2491 <link to="#write" /> (for export).
2492 This attribute is empty until one of these methods has been called.
2493 </desc>
2494 </attribute>
2495
2496 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
2497 <desc>
2498 Array of virtual disk definitions. One such description exists for each
2499 disk definition in the OVF; each string array item represents one such piece of
2500 disk information, with the information fields separated by tab (\t) characters.
2501
2502 The caller should be prepared for additional fields being appended to
2503 this string in future versions of VirtualBox and therefore check for
2504 the number of tabs in the strings returned.
2505
2506 In the current version, the following eight fields are returned per string
2507 in the array:
2508
2509 <ol>
2510 <li>Disk ID (unique string identifier given to disk)</li>
2511
2512 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
2513
2514 <li>Populated size (optional unsigned integer indicating the current size of the
2515 disk; can be approximate; -1 if unspecified)</li>
2516
2517 <li>Format (string identifying the disk format, typically
2518 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
2519
2520 <li>Reference (where to find the disk image, typically a file name; if empty,
2521 then the disk should be created on import)</li>
2522
2523 <li>Image size (optional unsigned integer indicating the size of the image,
2524 which need not necessarily be the same as the values specified above, since
2525 the image may be compressed or sparse; -1 if not specified)</li>
2526
2527 <li>Chunk size (optional unsigned integer if the image is split into chunks;
2528 presently unsupported and always -1)</li>
2529
2530 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
2531 </ol>
2532 </desc>
2533 </attribute>
2534
2535 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
2536 <desc> Array of virtual system descriptions. One such description is created
2537 for each virtual system (machine) found in the OVF.
2538 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
2539 (for export) has been called.
2540 </desc>
2541 </attribute>
2542
2543 <attribute name="machines" type="wstring" readonly="yes" safearray="yes">
2544 <desc>
2545 Contains the UUIDs of the machines created from the information in this appliances. This is only
2546 relevant for the import case, and will only contain data after a call to <link to="#importMachines" />
2547 succeeded.
2548 </desc>
2549 </attribute>
2550
2551 <method name="read">
2552 <desc>
2553 Reads an OVF file into the appliance object.
2554
2555 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
2556 mere fact that this method returns successfully does not mean that VirtualBox supports all
2557 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
2558 </desc>
2559 <param name="file" type="wstring" dir="in">
2560 <desc>
2561 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
2562 on whether the appliance is distributed as a set of files or as a single file, respectively).
2563 </desc>
2564 </param>
2565 <param name="aProgress" type="IProgress" dir="return">
2566 <desc>Progress object to track the operation completion.</desc>
2567 </param>
2568 </method>
2569
2570 <method name="interpret">
2571 <desc>
2572 Interprets the OVF data that was read when the appliance was constructed. After
2573 calling this method, one can inspect the
2574 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
2575 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
2576 the appliance.
2577
2578 Calling this method is the second step of importing an appliance into VirtualBox;
2579 see <link to="IAppliance" /> for an overview.
2580
2581 After calling this method, one should call <link to="#getWarnings" /> to find out
2582 if problems were encountered during the processing which might later lead to
2583 errors.
2584 </desc>
2585 </method>
2586
2587 <method name="importMachines">
2588 <desc>
2589 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
2590 and other interfaces that match the information contained in the appliance as
2591 closely as possible, as represented by the import instructions in the
2592 <link to="#virtualSystemDescriptions" /> array.
2593
2594 Calling this method is the final step of importing an appliance into VirtualBox;
2595 see <link to="IAppliance" /> for an overview.
2596
2597 Since importing the appliance will most probably involve copying and converting
2598 disk images, which can take a long time, this method operates asynchronously and
2599 returns an IProgress object to allow the caller to monitor the progress.
2600
2601 After the import succeeded, the UUIDs of the IMachine instances created can be
2602 retrieved from the <link to="#machines" /> array attribute.
2603 </desc>
2604
2605 <param name="aProgress" type="IProgress" dir="return">
2606 <desc>Progress object to track the operation completion.</desc>
2607 </param>
2608 </method>
2609
2610 <method name="createVFSExplorer">
2611 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
2612
2613 <param name="aUri" type="wstring" dir="in">
2614 <desc>The URI describing the file system to use.</desc>
2615 </param>
2616
2617 <param name="aExplorer" type="IVFSExplorer" dir="return">
2618 <desc></desc>
2619 </param>
2620 </method>
2621
2622 <method name="write">
2623 <desc>
2624 Writes the contents of the appliance exports into a new OVF file.
2625
2626 Calling this method is the final step of exporting an appliance from VirtualBox;
2627 see <link to="IAppliance" /> for an overview.
2628
2629 Since exporting the appliance will most probably involve copying and converting
2630 disk images, which can take a long time, this method operates asynchronously and
2631 returns an IProgress object to allow the caller to monitor the progress.
2632 </desc>
2633 <param name="format" type="wstring" dir="in">
2634 <desc>
2635 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
2636 future versions of VirtualBox may support additional formats.
2637 </desc>
2638 </param>
2639 <param name="manifest" type="boolean" dir="in">
2640 <desc>
2641 Indicate if the optional manifest file (.mf) should be written. The manifest file
2642 is used for integrity checks prior import.
2643 </desc>
2644 </param>
2645 <param name="path" type="wstring" dir="in">
2646 <desc>
2647 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
2648 on whether the appliance is distributed as a set of files or as a single file, respectively).
2649 </desc>
2650 </param>
2651 <param name="progress" type="IProgress" dir="return">
2652 <desc>Progress object to track the operation completion.</desc>
2653 </param>
2654 </method>
2655
2656 <method name="getWarnings">
2657 <desc>Returns textual warnings which occurred during execution of <link to="#interpret" />.</desc>
2658
2659 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
2660 <desc></desc>
2661 </param>
2662 </method>
2663
2664 </interface>
2665
2666 <enum
2667 name="VirtualSystemDescriptionType"
2668 uuid="c0f8f135-3a1d-417d-afa6-b38b95a91f90"
2669 >
2670 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
2671 a configuration value.</desc>
2672
2673 <const name="Ignore" value="1" />
2674 <const name="OS" value="2" />
2675 <const name="Name" value="3" />
2676 <const name="Product" value="4" />
2677 <const name="Vendor" value="5" />
2678 <const name="Version" value="6" />
2679 <const name="ProductUrl" value="7" />
2680 <const name="VendorUrl" value="8" />
2681 <const name="Description" value="9" />
2682 <const name="License" value="10" />
2683 <const name="Miscellaneous" value="11" />
2684 <const name="CPU" value="12" />
2685 <const name="Memory" value="13" />
2686 <const name="HardDiskControllerIDE" value="14" />
2687 <const name="HardDiskControllerSATA" value="15" />
2688 <const name="HardDiskControllerSCSI" value="16" />
2689 <const name="HardDiskControllerSAS" value="17" />
2690 <const name="HardDiskImage" value="18" />
2691 <const name="Floppy" value="19" />
2692 <const name="CDROM" value="20" />
2693 <const name="NetworkAdapter" value="21" />
2694 <const name="USBController" value="22" />
2695 <const name="SoundCard" value="23" />
2696
2697 </enum>
2698
2699 <enum
2700 name="VirtualSystemDescriptionValueType"
2701 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
2702 >
2703 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
2704 type to fetch.</desc>
2705
2706 <const name="Reference" value="1" />
2707 <const name="Original" value="2" />
2708 <const name="Auto" value="3" />
2709 <const name="ExtraConfig" value="4" />
2710
2711 </enum>
2712
2713 <interface
2714 name="IVirtualSystemDescription" extends="$unknown"
2715 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
2716 wsmap="managed"
2717 >
2718
2719 <desc>Represents one virtual system (machine) in an appliance. This interface is used in
2720 the <link to="IAppliance::virtualSystemDescriptions" /> array. After
2721 <link to="IAppliance::interpret" /> has been called, that array contains information
2722 about how the virtual systems described in the OVF should best be imported into
2723 VirtualBox virtual machines. See <link to="IAppliance" /> for the steps required to
2724 import an OVF into VirtualBox.
2725 </desc>
2726
2727 <attribute name="count" type="unsigned long" readonly="yes">
2728 <desc>Return the number of virtual system description entries.</desc>
2729 </attribute>
2730
2731 <method name="getDescription">
2732 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
2733 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
2734
2735 The list below identifies the value sets that are possible depending on the
2736 <link to="VirtualSystemDescriptionType" /> enum value in the array item in @a aTypes[]. In each case,
2737 the array item with the same index in @a aOvfValues[] will contain the original value as contained
2738 in the OVF file (just for informational purposes), and the corresponding item in @a aVBoxValues[]
2739 will contain a suggested value to be used for VirtualBox. Depending on the description type,
2740 the @a aExtraConfigValues[] array item may also be used.
2741
2742 <ul>
2743 <li>
2744 "OS": the guest operating system type. There must be exactly one such array item on import. The
2745 corresponding item in @a aVBoxValues[] contains the suggested guest operating system for VirtualBox.
2746 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
2747 item in @a aOvfValues[] will contain a numerical value that described the operating system in the OVF.
2748 </li>
2749 <li>
2750 "Name": the name to give to the new virtual machine. There can be at most one such array item;
2751 if none is present on import, then an automatic name will be created from the operating system
2752 type. The correponding item im @a aOvfValues[] will contain the suggested virtual machine name
2753 from the OVF file, and @a aVBoxValues[] will contain a suggestion for a unique VirtualBox
2754 <link to="IMachine" /> name that does not exist yet.
2755 </li>
2756 <li>
2757 "Description": an arbitrary description.
2758 </li>
2759 <li>
2760 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
2761 code to display such a license for agreement; the Main API does not enforce any such policy.
2762 </li>
2763 <li>
2764 Miscellaneous: reserved for future use.
2765 </li>
2766 <li>
2767 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
2768 </li>
2769 <li>
2770 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
2771 is present on import, then VirtualBox will set a meaningful default based on the operating system
2772 type.
2773 </li>
2774 <li>
2775 "HardDiskControllerIDE": an IDE hard disk controller. There can be at most two such items.
2776 An optional value in @a aOvfValues[] and @a aVBoxValues[] can be "PIIX3" or "PIIX4" to specify
2777 the type of IDE controller; this corresponds to the ResourceSubType element which VirtualBox
2778 writes into the OVF.
2779 The matching item in the @a aRefs[] array will contain an integer that items of the "Harddisk"
2780 type can use to specify which hard disk controller a virtual disk should be connected to.
2781 Note that in OVF, an IDE controller has two channels, corresponding to "master" and "slave"
2782 in traditional terminology, whereas the IDE storage controller that VirtualBox supports in
2783 its virtual machines supports four channels (primary master, primary slave, secondary master,
2784 secondary slave) and thus maps to two IDE controllers in the OVF sense.
2785 </li>
2786 <li>
2787 "HardDiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
2788 has no value in @a aOvfValues[] or @a aVBoxValues[].
2789 The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
2790 </li>
2791 <li>
2792 "HardDiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
2793 The items in @a aOvfValues[] and @a aVBoxValues[] will either be "LsiLogic", "BusLogic" or
2794 "LsiLogicSas". (Note that in OVF, the LsiLogicSas controller is treated as a SCSI controller
2795 whereas VirtualBox considers it a class of storage controllers of its own; see
2796 <link to="StorageControllerType" />).
2797 The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
2798 </li>
2799 <li>
2800 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
2801 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
2802
2803 The array item in @a aOvfValues[] will contain the file specification from the OVF file (without
2804 a path since the image file should be in the same location as the OVF file itself), whereas the
2805 item in @a aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
2806 hard disk image. This means that on import the image will be copied and converted from the
2807 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
2808
2809 The matching item in the @a aExtraConfigValues[] array must contain a string of the following
2810 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
2811 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
2812 the image to. That number must be the index of an array item with one of the hard disk controller
2813 types (HardDiskControllerSCSI, HardDiskControllerSATA, HardDiskControllerIDE).
2814 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
2815 this can be 0 or 1 for master or slave, respectively. For compatibility with VirtualBox versions
2816 before 3.2, the values 2 and 3 (for secondary master and secondary slave) are also supported, but
2817 no longer exported. For SATA and SCSI controllers, the channel can range from 0-29.
2818 </li>
2819 <li>
2820 "CDROM": a virtual CD-ROM drive. The matching item in @a aExtraConfigValue[] contains the same
2821 attachment information as with "HardDiskImage" items.
2822 </li>
2823 <li>
2824 "CDROM": a virtual floppy drive. The matching item in @a aExtraConfigValue[] contains the same
2825 attachment information as with "HardDiskImage" items.
2826 </li>
2827 <li>
2828 "NetworkAdapter": a network adapter. The array item in @a aVBoxValues[] will specify the hardware
2829 for the network adapter, whereas the array item in @a aExtraConfigValues[] will have a string
2830 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
2831 </li>
2832 <li>
2833 "USBController": a USB controller. There can be at most one such item. If and only if such an
2834 item ispresent, USB support will be enabled for the new virtual machine.
2835 </li>
2836 <li>
2837 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
2838 present, sound support will be enabled for the new virtual machine. Note that the virtual
2839 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
2840 may be different from the virtual soundcard expected by the appliance.
2841 </li>
2842 </ul>
2843
2844 </desc>
2845
2846 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
2847 <desc></desc>
2848 </param>
2849
2850 <param name="aRefs" type="wstring" dir="out" safearray="yes">
2851 <desc></desc>
2852 </param>
2853
2854 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
2855 <desc></desc>
2856 </param>
2857
2858 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
2859 <desc></desc>
2860 </param>
2861
2862 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
2863 <desc></desc>
2864 </param>
2865
2866 </method>
2867
2868 <method name="getDescriptionByType">
2869 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
2870 should be returned.</desc>
2871
2872 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2873 <desc></desc>
2874 </param>
2875
2876 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
2877 <desc></desc>
2878 </param>
2879
2880 <param name="aRefs" type="wstring" dir="out" safearray="yes">
2881 <desc></desc>
2882 </param>
2883
2884 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
2885 <desc></desc>
2886 </param>
2887
2888 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
2889 <desc></desc>
2890 </param>
2891
2892 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
2893 <desc></desc>
2894 </param>
2895
2896 </method>
2897
2898 <method name="getValuesByType">
2899 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
2900 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
2901 values.</desc>
2902
2903 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2904 <desc></desc>
2905 </param>
2906
2907 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
2908 <desc></desc>
2909 </param>
2910
2911 <param name="aValues" type="wstring" dir="return" safearray="yes">
2912 <desc></desc>
2913 </param>
2914
2915 </method>
2916
2917 <method name="setFinalValues">
2918 <desc>
2919 This method allows the appliance's user to change the configuration for the virtual
2920 system descriptions. For each array item returned from <link to="#getDescription" />,
2921 you must pass in one boolean value and one configuration value.
2922
2923 Each item in the boolean array determines whether the particular configuration item
2924 should be enabled.
2925 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
2926 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
2927 and SoundCard.
2928
2929 For the "vbox" and "extra configuration" values, if you pass in the same arrays
2930 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
2931 the configuration remains unchanged. Please see the documentation for getDescription()
2932 for valid configuration values for the individual array item types. If the
2933 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
2934 </desc>
2935
2936 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
2937 <desc></desc>
2938 </param>
2939
2940 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
2941 <desc></desc>
2942 </param>
2943
2944 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
2945 <desc></desc>
2946 </param>
2947 </method>
2948
2949 <method name="addDescription">
2950 <desc>
2951 This method adds an additional description entry to the stack of already
2952 available descriptions for this virtual system. This is handy for writing
2953 values which aren't directly supported by VirtualBox. One example would
2954 be the License type of <link to="VirtualSystemDescriptionType" />.
2955 </desc>
2956
2957 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2958 <desc></desc>
2959 </param>
2960
2961 <param name="aVBoxValue" type="wstring" dir="in">
2962 <desc></desc>
2963 </param>
2964
2965 <param name="aExtraConfigValue" type="wstring" dir="in">
2966 <desc></desc>
2967 </param>
2968 </method>
2969 </interface>
2970
2971
2972 <!--
2973 // IMachine
2974 /////////////////////////////////////////////////////////////////////////
2975 -->
2976
2977 <interface
2978 name="IInternalMachineControl" extends="$unknown"
2979 uuid="e2da8b1a-2ad1-490e-b29e-c33a144791b6"
2980 internal="yes"
2981 wsmap="suppress"
2982 >
2983 <method name="setRemoveSavedStateFile">
2984 <desc>
2985 Updates the flag whether the saved state file is removed on a
2986 machine state change from Saved to PoweredOff.
2987 </desc>
2988 <param name="aRemove" type="boolean" dir="in"/>
2989 </method>
2990
2991 <method name="updateState">
2992 <desc>
2993 Updates the VM state.
2994 <note>
2995 This operation will also update the settings file with the correct
2996 information about the saved state file and delete this file from disk
2997 when appropriate.
2998 </note>
2999 </desc>
3000 <param name="state" type="MachineState" dir="in"/>
3001 </method>
3002
3003 <method name="getIPCId">
3004 <param name="id" type="wstring" dir="return"/>
3005 </method>
3006
3007 <method name="beginPowerUp">
3008 <desc>
3009 Tells VBoxSVC that <link to="IConsole::powerUp"/> is under ways and
3010 gives it the progress object that should be part of any pending
3011 <link to="IMachine::launchVMProcess"/> operations. The progress
3012 object may be called back to reflect an early cancelation, so some care
3013 have to be taken with respect to any cancelation callbacks. The console
3014 object will call <link to="IInternalMachineControl::endPowerUp"/>
3015 to signal the completion of the progress object.
3016 </desc>
3017 <param name="aProgress" type="IProgress" dir="in" />
3018 </method>
3019
3020 <method name="endPowerUp">
3021 <desc>
3022 Tells VBoxSVC that <link to="IConsole::powerUp"/> has completed.
3023 This method may query status information from the progress object it
3024 received in <link to="IInternalMachineControl::beginPowerUp"/> and copy
3025 it over to any in-progress <link to="IMachine::launchVMProcess"/>
3026 call in order to complete that progress object.
3027 </desc>
3028 <param name="result" type="long" dir="in"/>
3029 </method>
3030
3031 <method name="runUSBDeviceFilters">
3032 <desc>
3033 Asks the server to run USB devices filters of the associated
3034 machine against the given USB device and tell if there is
3035 a match.
3036 <note>
3037 Intended to be used only for remote USB devices. Local
3038 ones don't require to call this method (this is done
3039 implicitly by the Host and USBProxyService).
3040 </note>
3041 </desc>
3042 <param name="device" type="IUSBDevice" dir="in"/>
3043 <param name="matched" type="boolean" dir="out"/>
3044 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3045 </method>
3046
3047 <method name="captureUSBDevice">
3048 <desc>
3049 Requests a capture of the given host USB device.
3050 When the request is completed, the VM process will
3051 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3052 notification.
3053 </desc>
3054 <param name="id" type="uuid" mod="string" dir="in"/>
3055 </method>
3056
3057 <method name="detachUSBDevice">
3058 <desc>
3059 Notification that a VM is going to detach (@a done = @c false) or has
3060 already detached (@a done = @c true) the given USB device.
3061 When the @a done = @c true request is completed, the VM process will
3062 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3063 notification.
3064 <note>
3065 In the @a done = @c true case, the server must run its own filters
3066 and filters of all VMs but this one on the detached device
3067 as if it were just attached to the host computer.
3068 </note>
3069 </desc>
3070 <param name="id" type="uuid" mod="string" dir="in"/>
3071 <param name="done" type="boolean" dir="in"/>
3072 </method>
3073
3074 <method name="autoCaptureUSBDevices">
3075 <desc>
3076 Requests a capture all matching USB devices attached to the host.
3077 When the request is completed, the VM process will
3078 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3079 notification per every captured device.
3080 </desc>
3081 </method>
3082
3083 <method name="detachAllUSBDevices">
3084 <desc>
3085 Notification that a VM that is being powered down. The done
3086 parameter indicates whether which stage of the power down
3087 we're at. When @a done = @c false the VM is announcing its
3088 intentions, while when @a done = @c true the VM is reporting
3089 what it has done.
3090 <note>
3091 In the @a done = @c true case, the server must run its own filters
3092 and filters of all VMs but this one on all detach devices as
3093 if they were just attached to the host computer.
3094 </note>
3095 </desc>
3096 <param name="done" type="boolean" dir="in"/>
3097 </method>
3098
3099 <method name="onSessionEnd">
3100 <desc>
3101 Triggered by the given session object when the session is about
3102 to close normally.
3103 </desc>
3104 <param name="session" type="ISession" dir="in">
3105 <desc>Session that is being closed</desc>
3106 </param>
3107 <param name="progress" type="IProgress" dir="return">
3108 <desc>
3109 Used to wait until the corresponding machine is actually
3110 dissociated from the given session on the server.
3111 Returned only when this session is a direct one.
3112 </desc>
3113 </param>
3114 </method>
3115
3116 <method name="beginSavingState">
3117 <desc>
3118 Called by the VM process to inform the server it wants to
3119 save the current state and stop the VM execution.
3120 </desc>
3121 <param name="progress" type="IProgress" dir="in">
3122 <desc>
3123 Progress object created by the VM process to wait until
3124 the state is saved.
3125 </desc>
3126 </param>
3127 <param name="stateFilePath" type="wstring" dir="out">
3128 <desc>
3129 File path the VM process must save the execution state to.
3130 </desc>
3131 </param>
3132 </method>
3133
3134 <method name="endSavingState">
3135 <desc>
3136 Called by the VM process to inform the server that saving
3137 the state previously requested by #beginSavingState is either
3138 successfully finished or there was a failure.
3139
3140 <result name="VBOX_E_FILE_ERROR">
3141 Settings file not accessible.
3142 </result>
3143 <result name="VBOX_E_XML_ERROR">
3144 Could not parse the settings file.
3145 </result>
3146
3147 </desc>
3148
3149 <param name="success" type="boolean" dir="in">
3150 <desc>@c true to indicate success and @c false otherwise.
3151 </desc>
3152 </param>
3153 </method>
3154
3155 <method name="adoptSavedState">
3156 <desc>
3157 Gets called by IConsole::adoptSavedState.
3158 <result name="VBOX_E_FILE_ERROR">
3159 Invalid saved state file path.
3160 </result>
3161 </desc>
3162 <param name="savedStateFile" type="wstring" dir="in">
3163 <desc>Path to the saved state file to adopt.</desc>
3164 </param>
3165 </method>
3166
3167 <method name="beginTakingSnapshot">
3168 <desc>
3169 Called from the VM process to request from the server to perform the
3170 server-side actions of creating a snapshot (creating differencing images
3171 and the snapshot object).
3172
3173 <result name="VBOX_E_FILE_ERROR">
3174 Settings file not accessible.
3175 </result>
3176 <result name="VBOX_E_XML_ERROR">
3177 Could not parse the settings file.
3178 </result>
3179 </desc>
3180 <param name="initiator" type="IConsole" dir="in">
3181 <desc>The console object that initiated this call.</desc>
3182 </param>
3183 <param name="name" type="wstring" dir="in">
3184 <desc>Snapshot name.</desc>
3185 </param>
3186 <param name="description" type="wstring" dir="in">
3187 <desc>Snapshot description.</desc>
3188 </param>
3189 <param name="consoleProgress" type="IProgress" dir="in">
3190 <desc>
3191 Progress object created by the VM process tracking the
3192 snapshot's progress. This has the following sub-operations:
3193 <ul>
3194 <li>setting up (weight 1);</li>
3195 <li>one for each medium attachment that needs a differencing image (weight 1 each);</li>
3196 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3197 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3198 <li>finishing up (weight 1)</li>
3199 </ul>
3200 </desc>
3201 </param>
3202 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3203 <desc>
3204 Whether this is an online snapshot (i.e. the machine is running).
3205 </desc>
3206 </param>
3207 <param name="stateFilePath" type="wstring" dir="out">
3208 <desc>
3209 File path the VM process must save the execution state to.
3210 </desc>
3211 </param>
3212 </method>
3213
3214 <method name="endTakingSnapshot">
3215 <desc>
3216 Called by the VM process to inform the server that the snapshot
3217 previously requested by #beginTakingSnapshot is either
3218 successfully taken or there was a failure.
3219 </desc>
3220
3221 <param name="success" type="boolean" dir="in">
3222 <desc>@c true to indicate success and @c false otherwise</desc>
3223 </param>
3224 </method>
3225
3226 <method name="deleteSnapshot">
3227 <desc>
3228 Gets called by IConsole::deleteSnapshot.
3229 <result name="VBOX_E_INVALID_OBJECT_STATE">
3230 Snapshot has more than one child snapshot.
3231 </result>
3232 </desc>
3233 <param name="initiator" type="IConsole" dir="in">
3234 <desc>The console object that initiated this call.</desc>
3235 </param>
3236 <param name="id" type="uuid" mod="string" dir="in">
3237 <desc>UUID of the snapshot to delete.</desc>
3238 </param>
3239 <param name="machineState" type="MachineState" dir="out">
3240 <desc>New machine state after this operation is started.</desc>
3241 </param>
3242 <param name="progress" type="IProgress" dir="return">
3243 <desc>Progress object to track the operation completion.</desc>
3244 </param>
3245 </method>
3246
3247 <method name="finishOnlineMergeMedium">
3248 <desc>
3249 Gets called by IConsole::onlineMergeMedium.
3250 </desc>
3251 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
3252 <desc>The medium attachment which needs to be cleaned up.</desc>
3253 </param>
3254 <param name="source" type="IMedium" dir="in">
3255 <desc>Merge source medium.</desc>
3256 </param>
3257 <param name="target" type="IMedium" dir="in">
3258 <desc>Merge target medium.</desc>
3259 </param>
3260 <param name="mergeForward" type="boolean" dir="in">
3261 <desc>Merge direction.</desc>
3262 </param>
3263 <param name="parentForTarget" type="IMedium" dir="in">
3264 <desc>For forward merges: new parent for target medium.</desc>
3265 </param>
3266 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
3267 <desc>For backward merges: list of media which need their parent UUID
3268 updated.</desc>
3269 </param>
3270 </method>
3271
3272 <method name="restoreSnapshot">
3273 <desc>
3274 Gets called by IConsole::RestoreSnapshot.
3275 </desc>
3276 <param name="initiator" type="IConsole" dir="in">
3277 <desc>The console object that initiated this call.</desc>
3278 </param>
3279 <param name="snapshot" type="ISnapshot" dir="in">
3280 <desc>The snapshot to restore the VM state from.</desc>
3281 </param>
3282 <param name="machineState" type="MachineState" dir="out">
3283 <desc>New machine state after this operation is started.</desc>
3284 </param>
3285 <param name="progress" type="IProgress" dir="return">
3286 <desc>Progress object to track the operation completion.</desc>
3287 </param>
3288 </method>
3289
3290 <method name="pullGuestProperties">
3291 <desc>
3292 Get the list of the guest properties matching a set of patterns along
3293 with their values, time stamps and flags and give responsibility for
3294 managing properties to the console.
3295 </desc>
3296 <param name="name" type="wstring" dir="out" safearray="yes">
3297 <desc>
3298 The names of the properties returned.
3299 </desc>
3300 </param>
3301 <param name="value" type="wstring" dir="out" safearray="yes">
3302 <desc>
3303 The values of the properties returned. The array entries match the
3304 corresponding entries in the @a name array.
3305 </desc>
3306 </param>
3307 <param name="timestamp" type="long long" dir="out" safearray="yes">
3308 <desc>
3309 The time stamps of the properties returned. The array entries match
3310 the corresponding entries in the @a name array.
3311 </desc>
3312 </param>
3313 <param name="flags" type="wstring" dir="out" safearray="yes">
3314 <desc>
3315 The flags of the properties returned. The array entries match the
3316 corresponding entries in the @a name array.
3317 </desc>
3318 </param>
3319 </method>
3320
3321 <method name="pushGuestProperty">
3322 <desc>
3323 Update a single guest property in IMachine.
3324 </desc>
3325 <param name="name" type="wstring" dir="in">
3326 <desc>
3327 The name of the property to be updated.
3328 </desc>
3329 </param>
3330 <param name="value" type="wstring" dir="in">
3331 <desc>
3332 The value of the property.
3333 </desc>
3334 </param>
3335 <param name="timestamp" type="long long" dir="in">
3336 <desc>
3337 The timestamp of the property.
3338 </desc>
3339 </param>
3340 <param name="flags" type="wstring" dir="in">
3341 <desc>
3342 The flags of the property.
3343 </desc>
3344 </param>
3345 </method>
3346
3347 <method name="lockMedia">
3348 <desc>
3349 Locks all media attached to the machine for writing and parents of
3350 attached differencing media (if any) for reading. This operation is
3351 atomic so that if it fails no media is actually locked.
3352
3353 This method is intended to be called when the machine is in Starting or
3354 Restoring state. The locked media will be automatically unlocked when
3355 the machine is powered off or crashed.
3356 </desc>
3357 </method>
3358 <method name="unlockMedia">
3359 <desc>
3360 Unlocks all media previously locked using
3361 <link to="IInternalMachineControl::lockMedia"/>.
3362
3363 This method is intended to be used with teleportation so that it is
3364 possible to teleport between processes on the same machine.
3365 </desc>
3366 </method>
3367 </interface>
3368
3369 <interface
3370 name="IBIOSSettings" extends="$unknown"
3371 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3372 wsmap="managed"
3373 >
3374 <desc>
3375 The IBIOSSettings interface represents BIOS settings of the virtual
3376 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3377 </desc>
3378 <attribute name="logoFadeIn" type="boolean">
3379 <desc>Fade in flag for BIOS logo animation.</desc>
3380 </attribute>
3381
3382 <attribute name="logoFadeOut" type="boolean">
3383 <desc>Fade out flag for BIOS logo animation.</desc>
3384 </attribute>
3385
3386 <attribute name="logoDisplayTime" type="unsigned long">
3387 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3388 </attribute>
3389
3390 <attribute name="logoImagePath" type="wstring">
3391 <desc>
3392 Local file system path for external BIOS splash image. Empty string
3393 means the default image is shown on boot.
3394 </desc>
3395 </attribute>
3396
3397 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3398 <desc>Mode of the BIOS boot device menu.</desc>
3399 </attribute>
3400
3401 <attribute name="ACPIEnabled" type="boolean">
3402 <desc>ACPI support flag.</desc>
3403 </attribute>
3404
3405 <attribute name="IOAPICEnabled" type="boolean">
3406 <desc>
3407 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3408 and support IRQs above 15.
3409 </desc>
3410 </attribute>
3411
3412 <attribute name="timeOffset" type="long long">
3413 <desc>
3414 Offset in milliseconds from the host system time. This allows for
3415 guests running with a different system date/time than the host.
3416 It is equivalent to setting the system date/time in the BIOS except
3417 it is not an absolute value but a relative one. Guest Additions
3418 time synchronization honors this offset.
3419 </desc>
3420 </attribute>
3421
3422 <attribute name="PXEDebugEnabled" type="boolean">
3423 <desc>
3424 PXE debug logging flag. If set, VirtualBox will write extensive
3425 PXE trace information to the release log.
3426 </desc>
3427 </attribute>
3428
3429 </interface>
3430
3431 <enum name="CleanupMode"
3432 uuid="67897c50-7cca-47a9-83f6-ce8fd8eb5441">
3433 <desc>Cleanup mode, used with <link to="IMachine::unregister" />.
3434 </desc>
3435 <const name="UnregisterOnly" value="1">
3436 <desc>Unregister only the machine, but neither delete snapshots nor detach media.</desc>
3437 </const>
3438 <const name="DetachAllReturnNone" value="2">
3439 <desc>Delete all snapshots and detach all media but return none; this will keep all media registered.</desc>
3440 </const>
3441 <const name="DetachAllReturnHardDisksOnly" value="3">
3442 <desc>Delete all snapshots, detach all media and return hard disks for closing, but not removeable media.</desc>
3443 </const>
3444 <const name="Full" value="4">
3445 <desc>Delete all snapshots, detach all media and return all media for closing.</desc>
3446 </const>
3447 </enum>
3448
3449 <interface
3450 name="IMachine" extends="$unknown"
3451 uuid="5c91359b-5bdb-4518-9bd1-5f2c50a3c129"
3452 wsmap="managed"
3453 >
3454 <desc>
3455 The IMachine interface represents a virtual machine, or guest, created
3456 in VirtualBox.
3457
3458 This interface is used in two contexts. First of all, a collection of
3459 objects implementing this interface is stored in the
3460 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
3461 machines that are currently registered with this VirtualBox
3462 installation. Also, once a session has been opened for the given virtual
3463 machine (e.g. the virtual machine is running), the machine object
3464 associated with the open session can be queried from the session object;
3465 see <link to="ISession"/> for details.
3466
3467 The main role of this interface is to expose the settings of the virtual
3468 machine and provide methods to change various aspects of the virtual
3469 machine's configuration. For machine objects stored in the
3470 <link to="IVirtualBox::machines"/> collection, all attributes are
3471 read-only unless explicitly stated otherwise in individual attribute
3472 and method descriptions.
3473
3474 In order to change a machine setting, a session for this machine must be
3475 opened using one of the <link to="IMachine::lockMachine" /> or
3476 <link to="IMachine::launchVMProcess"/> methods. After the
3477 machine has been successfully locked for a session, a mutable machine object
3478 needs to be queried from the session object and then the desired settings
3479 changes can be applied to the returned object using IMachine attributes and
3480 methods. See the <link to="ISession"/> interface description for more
3481 information about sessions.
3482
3483 Note that IMachine does not provide methods to control virtual machine
3484 execution (such as start the machine, or power it down) -- these methods
3485 are grouped in a separate interface called <link to="IConsole" />.
3486
3487 <see>ISession, IConsole</see>
3488 </desc>
3489
3490 <attribute name="parent" type="IVirtualBox" readonly="yes">
3491 <desc>Associated parent object.</desc>
3492 </attribute>
3493
3494 <attribute name="accessible" type="boolean" readonly="yes">
3495 <desc>
3496 Whether this virtual machine is currently accessible or not.
3497
3498 A machine is always deemed accessible unless it is registered <i>and</i>
3499 its settings file cannot be read or parsed (either because the file itself
3500 is unavailable or has invalid XML contents).
3501
3502 Every time this property is read, the accessibility state of
3503 this machine is re-evaluated. If the returned value is @c false,
3504 the <link to="#accessError"/> property may be used to get the
3505 detailed error information describing the reason of
3506 inaccessibility, including XML error messages.
3507
3508 When the machine is inaccessible, only the following properties
3509 can be used on it:
3510 <ul>
3511 <li><link to="#parent"/></li>
3512 <li><link to="#id"/></li>
3513 <li><link to="#settingsFilePath"/></li>
3514 <li><link to="#accessible"/></li>
3515 <li><link to="#accessError"/></li>
3516 </ul>
3517
3518 An attempt to access any other property or method will return
3519 an error.
3520
3521 The only possible action you can perform on an inaccessible
3522 machine is to unregister it using the
3523 <link to="IMachine::unregister"/> call (or, to check
3524 for the accessibility state once more by querying this
3525 property).
3526
3527 <note>
3528 In the current implementation, once this property returns
3529 @c true, the machine will never become inaccessible
3530 later, even if its settings file cannot be successfully
3531 read/written any more (at least, until the VirtualBox
3532 server is restarted). This limitation may be removed in
3533 future releases.
3534 </note>
3535 </desc>
3536 </attribute>
3537
3538 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3539 <desc>
3540 Error information describing the reason of machine
3541 inaccessibility.
3542
3543 Reading this property is only valid after the last call to
3544 <link to="#accessible"/> returned @c false (i.e. the
3545 machine is currently unaccessible). Otherwise, a @c null
3546 IVirtualBoxErrorInfo object will be returned.
3547 </desc>
3548 </attribute>
3549
3550 <attribute name="name" type="wstring">
3551 <desc>
3552 Name of the virtual machine.
3553
3554 Besides being used for human-readable identification purposes
3555 everywhere in VirtualBox, the virtual machine name is also used
3556 as a name of the machine's settings file and as a name of the
3557 subdirectory this settings file resides in. Thus, every time you
3558 change the value of this property, the settings file will be
3559 renamed once you call <link to="#saveSettings"/> to confirm the
3560 change. The containing subdirectory will be also renamed, but
3561 only if it has exactly the same name as the settings file
3562 itself prior to changing this property (for backward compatibility
3563 with previous API releases). The above implies the following
3564 limitations:
3565 <ul>
3566 <li>The machine name cannot be empty.</li>
3567 <li>The machine name can contain only characters that are valid
3568 file name characters according to the rules of the file
3569 system used to store VirtualBox configuration.</li>
3570 <li>You cannot have two or more machines with the same name
3571 if they use the same subdirectory for storing the machine
3572 settings files.</li>
3573 <li>You cannot change the name of the machine if it is running,
3574 or if any file in the directory containing the settings file
3575 is being used by another running machine or by any other
3576 process in the host operating system at a time when
3577 <link to="#saveSettings"/> is called.
3578 </li>
3579 </ul>
3580 If any of the above limitations are hit, <link to="#saveSettings"/>
3581 will return an appropriate error message explaining the exact
3582 reason and the changes you made to this machine will not be saved.
3583 </desc>
3584 </attribute>
3585
3586 <attribute name="description" type="wstring">
3587 <desc>
3588 Description of the virtual machine.
3589
3590 The description attribute can contain any text and is
3591 typically used to describe the hardware and software
3592 configuration of the virtual machine in detail (i.e. network
3593 settings, versions of the installed software and so on).
3594 </desc>
3595 </attribute>
3596
3597 <attribute name="id" type="uuid" mod="string" readonly="yes">
3598 <desc>UUID of the virtual machine.</desc>
3599 </attribute>
3600
3601 <attribute name="OSTypeId" type="wstring">
3602 <desc>
3603 User-defined identifier of the Guest OS type.
3604 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
3605 an IGuestOSType object representing details about the given
3606 Guest OS type.
3607 <note>
3608 This value may differ from the value returned by
3609 <link to="IGuest::OSTypeId"/> if Guest Additions are
3610 installed to the guest OS.
3611 </note>
3612 </desc>
3613 </attribute>
3614
3615 <attribute name="HardwareVersion" type="wstring">
3616 <desc>Hardware version identifier. Internal use only for now.</desc>
3617 </attribute>
3618
3619 <attribute name="hardwareUUID" type="uuid" mod="string">
3620 <desc>
3621 The UUID presented to the guest via memory tables, hardware and guest
3622 properties. For most VMs this is the same as the @a id, but for VMs
3623 which have been cloned or teleported it may be the same as the source
3624 VM. This latter is because the guest shouldn't notice that it was
3625 cloned or teleported.
3626 </desc>
3627 </attribute>
3628
3629 <attribute name="CPUCount" type="unsigned long">
3630 <desc>Number of virtual CPUs in the VM.</desc>
3631 </attribute>
3632
3633 <attribute name="CPUHotPlugEnabled" type="boolean">
3634 <desc>
3635 This setting determines whether VirtualBox allows CPU
3636 hotplugging for this machine.</desc>
3637 </attribute>
3638
3639 <attribute name="CPUExecutionCap" type="unsigned long">
3640 <desc>
3641 Means to limit the number of CPU cycles a guest can use. The unit
3642 is percentage of host CPU cycles per second. The valid range
3643 is 1 - 100. 100 (the default) implies no limit.
3644 </desc>
3645 </attribute>
3646
3647 <attribute name="memorySize" type="unsigned long">
3648 <desc>System memory size in megabytes.</desc>
3649 </attribute>
3650
3651 <attribute name="memoryBalloonSize" type="unsigned long">
3652 <desc>Memory balloon size in megabytes.</desc>
3653 </attribute>
3654
3655 <attribute name="PageFusionEnabled" type="boolean">
3656 <desc>
3657 This setting determines whether VirtualBox allows page
3658 fusion for this machine (64 bits host only).
3659 </desc>
3660 </attribute>
3661
3662 <attribute name="VRAMSize" type="unsigned long">
3663 <desc>Video memory size in megabytes.</desc>
3664 </attribute>
3665
3666 <attribute name="accelerate3DEnabled" type="boolean" default="false">
3667 <desc>
3668 This setting determines whether VirtualBox allows this machine to make
3669 use of the 3D graphics support available on the host.</desc>
3670 </attribute>
3671
3672 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
3673 <desc>
3674 This setting determines whether VirtualBox allows this machine to make
3675 use of the 2D video acceleration support available on the host.</desc>
3676 </attribute>
3677
3678 <attribute name="monitorCount" type="unsigned long">
3679 <desc>
3680 Number of virtual monitors.
3681 <note>
3682 Only effective on Windows XP and later guests with
3683 Guest Additions installed.
3684 </note>
3685 </desc>
3686 </attribute>
3687
3688 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
3689 <desc>Object containing all BIOS settings.</desc>
3690 </attribute>
3691
3692 <attribute name="firmwareType" type="FirmwareType">
3693 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
3694 bootstrap in this VM.</desc>
3695 </attribute>
3696
3697 <attribute name="pointingHidType" type="PointingHidType">
3698 <desc>Type of pointing HID (such as mouse or tablet) used in this VM.
3699 The default is typically "PS2Mouse" but can vary depending on the
3700 requirements of the guest operating system.</desc>
3701 </attribute>
3702
3703 <attribute name="keyboardHidType" type="KeyboardHidType">
3704 <desc>Type of keyboard HID used in this VM.
3705 The default is typically "PS2Keyboard" but can vary depending on the
3706 requirements of the guest operating system.</desc>
3707 </attribute>
3708
3709 <attribute name="hpetEnabled" type="boolean">
3710 <desc>This attribute controls if High Precision Event Timer (HPET) is
3711 enabled in this VM. Use this property if you want to provide guests
3712 with additional time source, or if guest requires HPET to function correctly.
3713 Default is false.</desc>
3714 </attribute>
3715
3716 <attribute name="chipsetType" type="ChipsetType">
3717 <desc>Chipset type used in this VM.</desc>
3718 </attribute>
3719
3720 <attribute name="snapshotFolder" type="wstring">
3721 <desc>
3722 Full path to the directory used to store snapshot data
3723 (differencing media and saved state files) of this machine.
3724
3725 The initial value of this property is
3726 <tt>&lt;</tt><link to="#settingsFilePath">
3727 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3728 <link to="#id">machine_uuid</link>
3729 <tt>&gt;</tt>.
3730
3731 Currently, it is an error to try to change this property on
3732 a machine that has snapshots (because this would require to
3733 move possibly large files to a different location).
3734 A separate method will be available for this purpose later.
3735
3736 <note>
3737 Setting this property to @c null or to an empty string will restore
3738 the initial value.
3739 </note>
3740 <note>
3741 When setting this property, the specified path can be
3742 absolute (full path) or relative to the directory where the
3743 <link to="#settingsFilePath">machine settings file</link>
3744 is located. When reading this property, a full path is
3745 always returned.
3746 </note>
3747 <note>
3748 The specified path may not exist, it will be created
3749 when necessary.
3750 </note>
3751 </desc>
3752 </attribute>
3753
3754 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
3755 <desc>VRDP server object.</desc>
3756 </attribute>
3757
3758 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
3759 <desc>Array of media attached to this machine.</desc>
3760 </attribute>
3761
3762 <attribute name="USBController" type="IUSBController" readonly="yes">
3763 <desc>
3764 Associated USB controller object.
3765
3766 <note>
3767 If USB functionality is not available in the given edition of
3768 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3769 </note>
3770 </desc>
3771 </attribute>
3772
3773 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3774 <desc>Associated audio adapter, always present.</desc>
3775 </attribute>
3776
3777 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
3778 <desc>Array of storage controllers attached to this machine.</desc>
3779 </attribute>
3780
3781 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3782 <desc>
3783 Full name of the file containing machine settings data.
3784 </desc>
3785 </attribute>
3786
3787 <attribute name="settingsModified" type="boolean" readonly="yes">
3788 <desc>
3789 Whether the settings of this machine have been modified
3790 (but neither yet saved nor discarded).
3791 <note>
3792 Reading this property is only valid on instances returned
3793 by <link to="ISession::machine"/> and on new machines
3794 created by <link to="IVirtualBox::createMachine"/> or opened
3795 by <link to="IVirtualBox::openMachine"/> but not
3796 yet registered, or on unregistered machines after calling
3797 <link to="IMachine::unregister"/>. For all other
3798 cases, the settings can never be modified.
3799 </note>
3800 <note>
3801 For newly created unregistered machines, the value of this
3802 property is always @c true until <link to="#saveSettings"/>
3803 is called (no matter if any machine settings have been
3804 changed after the creation or not). For opened machines
3805 the value is set to @c false (and then follows to normal rules).
3806 </note>
3807 </desc>
3808 </attribute>
3809
3810 <attribute name="sessionState" type="SessionState" readonly="yes">
3811 <desc>Current session state for this machine.</desc>
3812 </attribute>
3813
3814 <attribute name="sessionType" type="wstring" readonly="yes">
3815 <desc>
3816 Type of the session. If <link to="#sessionState"/> is
3817 Spawning or Locked, this attribute contains the
3818 same value as passed to the
3819 <link to="IMachine::launchVMProcess"/> method in the
3820 @a type parameter. If the session was used with
3821 <link to="IMachine::lockMachine" />, or if
3822 <link to="#sessionState"/> is SessionClosed, the value of this
3823 attribute is an empty string.
3824 </desc>
3825 </attribute>
3826
3827 <attribute name="sessionPid" type="unsigned long" readonly="yes">
3828 <desc>
3829 Identifier of the session process. This attribute contains the
3830 platform-dependent identifier of the process whose session was
3831 used with <link to="IMachine::lockMachine" /> call. The returned
3832 value is only valid if <link to="#sessionState"/> is Locked or
3833 Unlocking by the time this property is read.
3834 </desc>
3835 </attribute>
3836
3837 <attribute name="state" type="MachineState" readonly="yes">
3838 <desc>Current execution state of this machine.</desc>
3839 </attribute>
3840
3841 <attribute name="lastStateChange" type="long long" readonly="yes">
3842 <desc>
3843 Time stamp of the last execution state change,
3844 in milliseconds since 1970-01-01 UTC.
3845 </desc>
3846 </attribute>
3847
3848 <attribute name="stateFilePath" type="wstring" readonly="yes">
3849 <desc>
3850 Full path to the file that stores the execution state of
3851 the machine when it is in the <link to="MachineState_Saved"/> state.
3852 <note>
3853 When the machine is not in the Saved state, this attribute is
3854 an empty string.
3855 </note>
3856 </desc>
3857 </attribute>
3858
3859 <attribute name="logFolder" type="wstring" readonly="yes">
3860 <desc>
3861 Full path to the folder that stores a set of rotated log files
3862 recorded during machine execution. The most recent log file is
3863 named <tt>VBox.log</tt>, the previous log file is
3864 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
3865 in the current version).
3866 </desc>
3867 </attribute>
3868
3869 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
3870 <desc>
3871 Current snapshot of this machine. This is @c null if the machine
3872 currently has no snapshots. If it is not @c null, then it was
3873 set by one of <link to="IConsole::takeSnapshot" />,
3874 <link to="IConsole::deleteSnapshot" />
3875 or <link to="IConsole::restoreSnapshot" />, depending on which
3876 was called last. See <link to="ISnapshot"/> for details.
3877 </desc>
3878 </attribute>
3879
3880 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
3881 <desc>
3882 Number of snapshots taken on this machine. Zero means the
3883 machine doesn't have any snapshots.
3884 </desc>
3885 </attribute>
3886
3887 <attribute name="currentStateModified" type="boolean" readonly="yes">
3888 <desc>
3889 Returns @c true if the current state of the machine is not
3890 identical to the state stored in the current snapshot.
3891
3892 The current state is identical to the current snapshot only
3893 directly after one of the following calls are made:
3894
3895 <ul>
3896 <li><link to="IConsole::restoreSnapshot"/>
3897 </li>
3898 <li><link to="IConsole::takeSnapshot"/> (issued on a
3899 "powered off" or "saved" machine, for which
3900 <link to="#settingsModified"/> returns @c false)
3901 </li>
3902 <li><link to="IMachine::setCurrentSnapshot"/>
3903 </li>
3904 </ul>
3905
3906 The current state remains identical until one of the following
3907 happens:
3908 <ul>
3909 <li>settings of the machine are changed</li>
3910 <li>the saved state is deleted</li>
3911 <li>the current snapshot is deleted</li>
3912 <li>an attempt to execute the machine is made</li>
3913 </ul>
3914
3915 <note>
3916 For machines that don't have snapshots, this property is
3917 always @c false.
3918 </note>
3919 </desc>
3920 </attribute>
3921
3922 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
3923 <desc>
3924 Collection of shared folders for this machine (permanent shared
3925 folders). These folders are shared automatically at machine startup
3926 and available only to the guest OS installed within this machine.
3927
3928 New shared folders are added to the collection using
3929 <link to="#createSharedFolder"/>. Existing shared folders can be
3930 removed using <link to="#removeSharedFolder"/>.
3931 </desc>
3932 </attribute>
3933
3934 <attribute name="clipboardMode" type="ClipboardMode">
3935 <desc>
3936 Synchronization mode between the host OS clipboard
3937 and the guest OS clipboard.
3938 </desc>
3939 </attribute>
3940
3941 <attribute name="guestPropertyNotificationPatterns" type="wstring">
3942 <desc>
3943 A comma-separated list of simple glob patterns. Changes to guest
3944 properties whose name matches one of the patterns will generate an
3945 <link to="IGuestPropertyChangedEvent"/> signal.
3946 </desc>
3947 </attribute>
3948
3949 <attribute name="teleporterEnabled" type="boolean">
3950 <desc>
3951 When set to @a true, the virtual machine becomes a target teleporter
3952 the next time it is powered on. This can only set to @a true when the
3953 VM is in the @a PoweredOff or @a Aborted state.
3954
3955 <!-- This property is automatically set to @a false when the VM is powered
3956 on. (bird: This doesn't work yet ) -->
3957 </desc>
3958 </attribute>
3959
3960 <attribute name="teleporterPort" type="unsigned long">
3961 <desc>
3962 The TCP port the target teleporter will listen for incoming
3963 teleportations on.
3964
3965 0 means the port is automatically selected upon power on. The actual
3966 value can be read from this property while the machine is waiting for
3967 incoming teleportations.
3968 </desc>
3969 </attribute>
3970
3971 <attribute name="teleporterAddress" type="wstring">
3972 <desc>
3973 The address the target teleporter will listen on. If set to an empty
3974 string, it will listen on all addresses.
3975 </desc>
3976 </attribute>
3977
3978 <attribute name="teleporterPassword" type="wstring">
3979 <desc>
3980 The password to check for on the target teleporter. This is just a
3981 very basic measure to prevent simple hacks and operators accidentally
3982 beaming a virtual machine to the wrong place.
3983 </desc>
3984 </attribute>
3985
3986 <attribute name="faultToleranceState" type="FaultToleranceState">
3987 <desc>
3988 Fault tolerance state; disabled, source or target.
3989 This property can be changed at any time. If you change it for a running
3990 VM, then the fault tolerance address and port must be set beforehand.
3991 </desc>
3992 </attribute>
3993
3994 <attribute name="faultTolerancePort" type="unsigned long">
3995 <desc>
3996 The TCP port the fault tolerance source or target will use for
3997 communication.
3998 </desc>
3999 </attribute>
4000
4001 <attribute name="faultToleranceAddress" type="wstring">
4002 <desc>
4003 The address the fault tolerance source or target.
4004 </desc>
4005 </attribute>
4006
4007 <attribute name="faultTolerancePassword" type="wstring">
4008 <desc>
4009 The password to check for on the standby VM. This is just a
4010 very basic measure to prevent simple hacks and operators accidentally
4011 choosing the wrong standby VM.
4012 </desc>
4013 </attribute>
4014
4015 <attribute name="faultToleranceSyncInterval" type="unsigned long">
4016 <desc>
4017 The interval in ms used for syncing the state between source and target.
4018 </desc>
4019 </attribute>
4020
4021 <attribute name="RTCUseUTC" type="boolean">
4022 <desc>
4023 When set to @a true, the RTC device of the virtual machine will run
4024 in UTC time, otherwise in local time. Especially Unix guests prefer
4025 the time in UTC.
4026 </desc>
4027 </attribute>
4028
4029 <attribute name="ioCacheEnabled" type="boolean">
4030 <desc>
4031 When set to @a true, the builtin I/O cache of the virtual machine
4032 will be enabled.
4033 </desc>
4034 </attribute>
4035
4036 <attribute name="ioCacheSize" type="unsigned long">
4037 <desc>
4038 Maximum size of the I/O cache in MB.
4039 </desc>
4040 </attribute>
4041
4042 <method name="lockMachine">
4043 <desc>
4044 Locks the machine for the given session to enable the caller
4045 to make changes to the machine or start the VM or control
4046 VM execution.
4047
4048 There are two ways to lock a machine for such uses:
4049
4050 <ul>
4051 <li>If you want to make changes to the machine settings,
4052 you must obtain an exclusive write lock on the machine
4053 by setting @a lockType to @c Write.
4054
4055 This will only succeed if no other process has locked
4056 the machine to prevent conflicting changes. Only after
4057 an exclusive write lock has been obtained using this method, one
4058 can change all VM settings or execute the VM in the process
4059 space of the session object. (Note that the latter is only of
4060 interest if you actually want to write a new front-end for
4061 virtual machines; but this API gets called internally by
4062 the existing front-ends such as VBoxHeadless and the VirtualBox
4063 GUI to acquire a write lock on the machine that they are running.)
4064
4065 On success, write-locking the machine for a session creates
4066 a second copy of the IMachine object. It is this second object
4067 upon which changes can be made; in VirtualBox terminology, the
4068 second copy is "mutable". It is only this second, mutable machine
4069 object upon which you can call methods that change the
4070 machine state. After having called this method, you can
4071 obtain this second, mutable machine object using the
4072 <link to="ISession::machine" /> attribute.
4073 </li>
4074 <li>If you only want to check the machine state or control
4075 machine execution without actually changing machine
4076 settings (e.g. to get access to VM statistics or take
4077 a snapshot or save the machine state), then set the
4078 @a lockType argument to @c Shared.
4079
4080 If no other session has obtained a lock, you will obtain an
4081 exclusive write lock as described above. However, if another
4082 session has already obtained such a lock, then a link to that
4083 existing session will be established which allows you
4084 to control that existing session.
4085
4086 To find out which type of lock was obtained, you can
4087 inspect <link to="ISession::type" />, which will have been
4088 set to either @c WriteLock or @c Shared.
4089 </li>
4090 </ul>
4091
4092 In either case, you can get access to the <link to="IConsole" />
4093 object which controls VM execution.
4094
4095 Also in all of the above cases, one must always call
4096 <link to="ISession::unlockMachine" /> to release the lock on the machine, or
4097 the machine's state will eventually be set to "Aborted".
4098
4099 To change settings on a machine, the following sequence is typically
4100 performed:
4101
4102 <ol>
4103 <li>Call this method to obtain an exclusive write lock for the current session.</li>
4104
4105 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
4106
4107 <li>Change the settings of the machine by invoking IMachine methods.</li>
4108
4109 <li>Call <link to="IMachine::saveSettings" />.</li>
4110
4111 <li>Release the write lock by calling <link to="ISession::unlockMachine"/>.</li>
4112 </ol>
4113
4114 <result name="E_UNEXPECTED">
4115 Virtual machine not registered.
4116 </result>
4117 <result name="E_ACCESSDENIED">
4118 Process not started by OpenRemoteSession.
4119 </result>
4120 <result name="VBOX_E_INVALID_OBJECT_STATE">
4121 Session already open or being opened.
4122 </result>
4123 <result name="VBOX_E_VM_ERROR">
4124 Failed to assign machine to session.
4125 </result>
4126 </desc>
4127 <param name="session" type="ISession" dir="in">
4128 <desc>
4129 Session object for which the machine will be locked.
4130 </desc>
4131 </param>
4132 <param name="lockType" type="LockType" dir="in">
4133 <desc>
4134 If set to @c Write, then attempt to acquire an exclusive write lock or fail.
4135 If set to @c Shared, then either acquire an exclusive write lock or establish
4136 a link to an existing session.
4137 </desc>
4138 </param>
4139 </method>
4140
4141 <method name="launchVMProcess">
4142 <desc>
4143 Spawns a new process that will execute the virtual machine and obtains a shared
4144 lock on the machine for the calling session.
4145
4146 If launching the VM succeeds, the new VM process will create its own session
4147 and write-lock the machine for it, preventing conflicting changes from other
4148 processes. If the machine is already locked (because it is already running or
4149 because another session has a write lock), launching the VM process will therefore
4150 fail. Reversely, future attempts to obtain a write lock will also fail while the
4151 machine is running.
4152
4153 The caller's session object remains separate from the session opened by the new
4154 VM process. It receives its own <link to="IConsole" /> object which can be used
4155 to control machine execution, but it cannot be used to change all VM settings
4156 which would be available after a <link to="#lockMachine" /> call.
4157
4158 The caller must eventually release the session's shared lock by calling
4159 <link to="ISession::unlockMachine" /> on the local session object once this call
4160 has returned. However, the session's state (see <link to="ISession::state" />)
4161 will not return to "Unlocked" until the remote session has also unlocked
4162 the machine (i.e. the machine has stopped running).
4163
4164 Lauching a VM process can take some time (a new VM is started in a new process,
4165 for which memory and other resources need to be set up). Because of this,
4166 an <link to="IProgress" /> object is returned to allow the caller to wait
4167 for this asynchronous operation to be completed. Until then, the caller's
4168 session object remains in the "Unlocked" state, and its <link to="ISession::machine" />
4169 and <link to="ISession::console" /> attributes cannot be accessed.
4170 It is recommended to use <link to="IProgress::waitForCompletion" /> or
4171 similar calls to wait for completion. Completion is signalled when the VM
4172 is powered on. If launching the VM fails, error messages can be queried
4173 via the progress object, if available.
4174
4175 The progress object will have at least 2 sub-operations. The first
4176 operation covers the period up to the new VM process calls powerUp.
4177 The subsequent operations mirror the <link to="IConsole::powerUp"/>
4178 progress object. Because <link to="IConsole::powerUp"/> may require
4179 some extra sub-operations, the <link to="IProgress::operationCount"/>
4180 may change at the completion of operation.
4181
4182 For details on the teleportation progress operation, see
4183 <link to="IConsole::powerUp"/>.
4184
4185 The @a environment argument is a string containing definitions of
4186 environment variables in the following format:
4187 @code
4188 NAME[=VALUE]\n
4189 NAME[=VALUE]\n
4190 ...
4191 @endcode
4192 where <tt>\\n</tt> is the new line character. These environment
4193 variables will be appended to the environment of the VirtualBox server
4194 process. If an environment variable exists both in the server process
4195 and in this list, the value from this list takes precedence over the
4196 server's variable. If the value of the environment variable is
4197 omitted, this variable will be removed from the resulting environment.
4198 If the environment string is @c null or empty, the server environment
4199 is inherited by the started process as is.
4200
4201 <result name="E_UNEXPECTED">
4202 Virtual machine not registered.
4203 </result>
4204 <result name="E_INVALIDARG">
4205 Invalid session type @a type.
4206 </result>
4207 <result name="VBOX_E_OBJECT_NOT_FOUND">
4208 No machine matching @a machineId found.
4209 </result>
4210 <result name="VBOX_E_INVALID_OBJECT_STATE">
4211 Session already open or being opened.
4212 </result>
4213 <result name="VBOX_E_IPRT_ERROR">
4214 Launching process for machine failed.
4215 </result>
4216 <result name="VBOX_E_VM_ERROR">
4217 Failed to assign machine to session.
4218 </result>
4219 </desc>
4220 <param name="session" type="ISession" dir="in">
4221 <desc>
4222 Client session object to which the VM process will be connected (this
4223 must be in "Unlocked" state).
4224 </desc>
4225 </param>
4226 <param name="type" type="wstring" dir="in">
4227 <desc>
4228 Front-end to use for the new VM process. The following are currently supported:
4229 <ul>
4230 <li><tt>"gui"</tt>: VirtualBox Qt GUI front-end</li>
4231 <li><tt>"vrdp"</tt>: VBoxHeadless (VRDP Server) front-end</li>
4232 <li><tt>"sdl"</tt>: VirtualBox SDL front-end</li>
4233 </ul>
4234 </desc>
4235 </param>
4236 <param name="environment" type="wstring" dir="in">
4237 <desc>
4238 Environment to pass to the VM process.
4239 </desc>
4240 </param>
4241 <param name="progress" type="IProgress" dir="return">
4242 <desc>Progress object to track the operation completion.</desc>
4243 </param>
4244 </method>
4245
4246 <method name="setBootOrder">
4247 <desc>
4248 Puts the given device to the specified position in
4249 the boot order.
4250
4251 To indicate that no device is associated with the given position,
4252 <link to="DeviceType_Null"/> should be used.
4253
4254 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4255
4256 <result name="E_INVALIDARG">
4257 Boot @a position out of range.
4258 </result>
4259 <result name="E_NOTIMPL">
4260 Booting from USB @a device currently not supported.
4261 </result>
4262
4263 </desc>
4264 <param name="position" type="unsigned long" dir="in">
4265 <desc>
4266 Position in the boot order (@c 1 to the total number of
4267 devices the machine can boot from, as returned by
4268 <link to="ISystemProperties::maxBootPosition"/>).
4269 </desc>
4270 </param>
4271 <param name="device" type="DeviceType" dir="in">
4272 <desc>
4273 The type of the device used to boot at the given position.
4274 </desc>
4275 </param>
4276 </method>
4277
4278 <method name="getBootOrder" const="yes">
4279 <desc>
4280 Returns the device type that occupies the specified
4281 position in the boot order.
4282
4283 @todo [remove?]
4284 If the machine can have more than one device of the returned type
4285 (such as hard disks), then a separate method should be used to
4286 retrieve the individual device that occupies the given position.
4287
4288 If here are no devices at the given position, then
4289 <link to="DeviceType_Null"/> is returned.
4290
4291 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4292
4293 <result name="E_INVALIDARG">
4294 Boot @a position out of range.
4295 </result>
4296
4297 </desc>
4298 <param name="position" type="unsigned long" dir="in">
4299 <desc>
4300 Position in the boot order (@c 1 to the total number of
4301 devices the machine can boot from, as returned by
4302 <link to="ISystemProperties::maxBootPosition"/>).
4303 </desc>
4304 </param>
4305 <param name="device" type="DeviceType" dir="return">
4306 <desc>
4307 Device at the given position.
4308 </desc>
4309 </param>
4310 </method>
4311
4312 <method name="attachDevice">
4313 <desc>
4314 Attaches a device and optionally mounts a medium to the given storage
4315 controller (<link to="IStorageController" />, identified by @a name),
4316 at the indicated port and device.
4317
4318 This method is intended for managing storage devices in general while a
4319 machine is powered off. It can be used to attach and detach fixed
4320 and removeable media. The following kind of media can be attached
4321 to a machine:
4322
4323 <ul>
4324 <li>For fixed and removable media, you can pass in a medium that was
4325 previously opened using <link to="IVirtualBox::openMedium" />.
4326 </li>
4327
4328 <li>Only for storage devices supporting removable media (such as
4329 DVDs and floppies), you can also specify a null pointer to
4330 indicate an empty drive or one of the medium objects listed
4331 in the <link to="IHost::DVDDrives" /> and <link to="IHost::floppyDrives"/>
4332 arrays to indicate a host drive.
4333 For removeable devices, you can also use <link to="IMachine::mountMedium"/>
4334 to change the media while the machine is running.
4335 </li>
4336 </ul>
4337
4338 In a VM's default configuration of virtual machines, the secondary
4339 master of the IDE controller is used for a CD/DVD drive.
4340
4341 After calling this returns successfully, a new instance of
4342 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4343 attachments (see <link to="IMachine::mediumAttachments"/>).
4344
4345 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4346 information about attaching media.
4347
4348 The specified device slot must not have a device attached to it,
4349 or this method will fail.
4350
4351 <note>
4352 You cannot attach a device to a newly created machine until
4353 this machine's settings are saved to disk using
4354 <link to="#saveSettings"/>.
4355 </note>
4356 <note>
4357 If the medium is being attached indirectly, a new differencing medium
4358 will implicitly be created for it and attached instead. If the
4359 changes made to the machine settings (including this indirect
4360 attachment) are later cancelled using <link to="#discardSettings"/>,
4361 this implicitly created differencing medium will implicitly
4362 be deleted.
4363 </note>
4364
4365 <result name="E_INVALIDARG">
4366 SATA device, SATA port, IDE port or IDE slot out of range, or
4367 file or UUID not found.
4368 </result>
4369 <result name="VBOX_E_INVALID_OBJECT_STATE">
4370 Machine must be registered before media can be attached.
4371 </result>
4372 <result name="VBOX_E_INVALID_VM_STATE">
4373 Invalid machine state.
4374 </result>
4375 <result name="VBOX_E_OBJECT_IN_USE">
4376 A medium is already attached to this or another virtual machine.
4377 </result>
4378
4379 </desc>
4380 <param name="name" type="wstring" dir="in">
4381 <desc>Name of the storage controller to attach the device to.</desc>
4382 </param>
4383 <param name="controllerPort" type="long" dir="in">
4384 <desc>Port to attach the device to. For an IDE controller, 0 specifies
4385 the primary controller and 1 specifies the secondary controller.
4386 For a SCSI controller, this must range from 0 to 15; for a SATA controller,
4387 from 0 to 29; for an SAS controller, from 0 to 7.</desc>
4388 </param>
4389 <param name="device" type="long" dir="in">
4390 <desc>Device slot in the given port to attach the device to. This is only
4391 relevant for IDE controllers, for which 0 specifies the master device and
4392 1 specifies the slave device. For all other controller types, this must
4393 be 0.</desc>
4394 </param>
4395 <param name="type" type="DeviceType" dir="in">
4396 <desc>Device type of the attached device. For media opened by
4397 <link to="IVirtualBox::openMedium" />, this must match the device type
4398 specified there.</desc>
4399 </param>
4400 <param name="medium" type="IMedium" dir="in">
4401 <desc>Medium to mount or NULL for an empty drive.</desc>
4402 </param>
4403 </method>
4404
4405 <method name="detachDevice">
4406 <desc>
4407 Detaches the device attached to a device slot of the specified bus.
4408
4409 Detaching the device from the virtual machine is deferred. This means
4410 that the medium remains associated with the machine when this method
4411 returns and gets actually de-associated only after a successful
4412 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4413 for more detailed information about attaching media.
4414
4415 <note>
4416 You cannot detach a device from a running machine.
4417 </note>
4418 <note>
4419 Detaching differencing media implicitly created by <link
4420 to="#attachDevice"/> for the indirect attachment using this
4421 method will <b>not</b> implicitly delete them. The
4422 <link to="IMedium::deleteStorage"/> operation should be
4423 explicitly performed by the caller after the medium is successfully
4424 detached and the settings are saved with
4425 <link to="#saveSettings"/>, if it is the desired action.
4426 </note>
4427
4428 <result name="VBOX_E_INVALID_VM_STATE">
4429 Attempt to detach medium from a running virtual machine.
4430 </result>
4431 <result name="VBOX_E_OBJECT_NOT_FOUND">
4432 No medium attached to given slot/bus.
4433 </result>
4434 <result name="VBOX_E_NOT_SUPPORTED">
4435 Medium format does not support storage deletion.
4436 </result>
4437
4438 </desc>
4439 <param name="name" type="wstring" dir="in">
4440 <desc>Name of the storage controller to detach the medium from.</desc>
4441 </param>
4442 <param name="controllerPort" type="long" dir="in">
4443 <desc>Port number to detach the medium from.</desc>
4444 </param>
4445 <param name="device" type="long" dir="in">
4446 <desc>Device slot number to detach the medium from.</desc>
4447 </param>
4448 </method>
4449
4450 <method name="passthroughDevice">
4451 <desc>
4452 Sets the passthrough mode of an existing DVD device. Changing the
4453 setting while the VM is running is forbidden. The setting is only used
4454 if at VM start the device is configured as a host DVD drive, in all
4455 other cases it is ignored. The device must already exist; see
4456 <link to="IMachine::attachDevice"/> for how to attach a new device.
4457
4458 The @a controllerPort and @a device parameters specify the device slot and
4459 have have the same meaning as with <link to="IMachine::attachDevice" />.
4460
4461 <result name="E_INVALIDARG">
4462 SATA device, SATA port, IDE port or IDE slot out of range.
4463 </result>
4464 <result name="VBOX_E_INVALID_OBJECT_STATE">
4465 Attempt to modify an unregistered virtual machine.
4466 </result>
4467 <result name="VBOX_E_INVALID_VM_STATE">
4468 Invalid machine state.
4469 </result>
4470
4471 </desc>
4472 <param name="name" type="wstring" dir="in">
4473 <desc>Name of the storage controller.</desc>
4474 </param>
4475 <param name="controllerPort" type="long" dir="in">
4476 <desc>Storage controller port.</desc>
4477 </param>
4478 <param name="device" type="long" dir="in">
4479 <desc>Device slot in the given port.</desc>
4480 </param>
4481 <param name="passthrough" type="boolean" dir="in">
4482 <desc>New value for the passthrough setting.</desc>
4483 </param>
4484 </method>
4485
4486 <method name="mountMedium">
4487 <desc>
4488 Mounts a medium (<link to="IMedium" />, identified
4489 by the given UUID @a id) to the given storage controller
4490 (<link to="IStorageController" />, identified by @a name),
4491 at the indicated port and device. The device must already exist;
4492 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4493
4494 This method is intended only for managing removable media, where the
4495 device is fixed but media is changeable at runtime (such as DVDs
4496 and floppies). It cannot be used for fixed media such as hard disks.
4497
4498 The @a controllerPort and @a device parameters specify the device slot and
4499 have have the same meaning as with <link to="IMachine::attachDevice" />.
4500
4501 The specified device slot can have a medium mounted, which will be
4502 unmounted first. Specifying a zero UUID (or an empty string) for
4503 @a medium does just an unmount.
4504
4505 See <link to="IMedium"/> for more detailed information about
4506 attaching media.
4507
4508 <result name="E_INVALIDARG">
4509 SATA device, SATA port, IDE port or IDE slot out of range.
4510 </result>
4511 <result name="VBOX_E_INVALID_OBJECT_STATE">
4512 Attempt to attach medium to an unregistered virtual machine.
4513 </result>
4514 <result name="VBOX_E_INVALID_VM_STATE">
4515 Invalid machine state.
4516 </result>
4517 <result name="VBOX_E_OBJECT_IN_USE">
4518 Medium already attached to this or another virtual machine.
4519 </result>
4520
4521 </desc>
4522 <param name="name" type="wstring" dir="in">
4523 <desc>Name of the storage controller to attach the medium to.</desc>
4524 </param>
4525 <param name="controllerPort" type="long" dir="in">
4526 <desc>Port to attach the medium to.</desc>
4527 </param>
4528 <param name="device" type="long" dir="in">
4529 <desc>Device slot in the given port to attach the medium to.</desc>
4530 </param>
4531 <param name="medium" type="IMedium" dir="in">
4532 <desc>Medium to mount or NULL for an empty drive.</desc>
4533 </param>
4534 <param name="force" type="boolean" dir="in">
4535 <desc>Allows to force unmount/mount of a medium which is locked by
4536 the device slot in the given port to attach the medium to.</desc>
4537 </param>
4538 </method>
4539
4540 <method name="getMedium" const="yes">
4541 <desc>
4542 Returns the virtual medium attached to a device slot of the specified
4543 bus.
4544
4545 Note that if the medium was indirectly attached by
4546 <link to="#mountMedium"/> to the given device slot then this
4547 method will return not the same object as passed to the
4548 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4549 more detailed information about mounting a medium.
4550
4551 <result name="VBOX_E_OBJECT_NOT_FOUND">
4552 No medium attached to given slot/bus.
4553 </result>
4554
4555 </desc>
4556 <param name="name" type="wstring" dir="in">
4557 <desc>Name of the storage controller the medium is attached to.</desc>
4558 </param>
4559 <param name="controllerPort" type="long" dir="in">
4560 <desc>Port to query.</desc>
4561 </param>
4562 <param name="device" type="long" dir="in">
4563 <desc>Device slot in the given port to query.</desc>
4564 </param>
4565 <param name="medium" type="IMedium" dir="return">
4566 <desc>Attached medium object.</desc>
4567 </param>
4568 </method>
4569
4570 <method name="getMediumAttachmentsOfController" const="yes">
4571 <desc>
4572 Returns an array of medium attachments which are attached to the
4573 the controller with the given name.
4574
4575 <result name="VBOX_E_OBJECT_NOT_FOUND">
4576 A storage controller with given name doesn't exist.
4577 </result>
4578 </desc>
4579 <param name="name" type="wstring" dir="in"/>
4580 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4581 </method>
4582
4583 <method name="getMediumAttachment" const="yes">
4584 <desc>
4585 Returns a medium attachment which corresponds to the controller with
4586 the given name, on the given port and device slot.
4587
4588 <result name="VBOX_E_OBJECT_NOT_FOUND">
4589 No attachment exists for the given controller/port/device combination.
4590 </result>
4591 </desc>
4592 <param name="name" type="wstring" dir="in"/>
4593 <param name="controllerPort" type="long" dir="in"/>
4594 <param name="device" type="long" dir="in"/>
4595 <param name="attachment" type="IMediumAttachment" dir="return"/>
4596 </method>
4597
4598 <method name="getNetworkAdapter" const="yes">
4599 <desc>
4600 Returns the network adapter associated with the given slot.
4601 Slots are numbered sequentially, starting with zero. The total
4602 number of adapters per machine is defined by the
4603 <link to="ISystemProperties::networkAdapterCount"/> property,
4604 so the maximum slot number is one less than that property's value.
4605
4606 <result name="E_INVALIDARG">
4607 Invalid @a slot number.
4608 </result>
4609
4610 </desc>
4611 <param name="slot" type="unsigned long" dir="in"/>
4612 <param name="adapter" type="INetworkAdapter" dir="return"/>
4613 </method>
4614
4615 <method name="addStorageController">
4616 <desc>
4617 Adds a new storage controller (SCSI, SAS or SATA controller) to the
4618 machine and returns it as an instance of
4619 <link to="IStorageController" />.
4620
4621 @a name identifies the controller for subsequent calls such as
4622 <link to="#getStorageControllerByName" />,
4623 <link to="#getStorageControllerByInstance" />,
4624 <link to="#removeStorageController" />,
4625 <link to="#attachDevice" /> or <link to="#mountMedium" />.
4626
4627 After the controller has been added, you can set its exact
4628 type by setting the <link to="IStorageController::controllerType" />.
4629
4630 <result name="VBOX_E_OBJECT_IN_USE">
4631 A storage controller with given name exists already.
4632 </result>
4633 <result name="E_INVALIDARG">
4634 Invalid @a controllerType.
4635 </result>
4636 </desc>
4637 <param name="name" type="wstring" dir="in"/>
4638 <param name="connectionType" type="StorageBus" dir="in"/>
4639 <param name="controller" type="IStorageController" dir="return"/>
4640 </method>
4641
4642 <method name="getStorageControllerByName" const="yes">
4643 <desc>
4644 Returns a storage controller with the given name.
4645
4646 <result name="VBOX_E_OBJECT_NOT_FOUND">
4647 A storage controller with given name doesn't exist.
4648 </result>
4649 </desc>
4650 <param name="name" type="wstring" dir="in"/>
4651 <param name="storageController" type="IStorageController" dir="return"/>
4652 </method>
4653
4654 <method name="getStorageControllerByInstance" const="yes">
4655 <desc>
4656 Returns a storage controller with the given instance number.
4657
4658 <result name="VBOX_E_OBJECT_NOT_FOUND">
4659 A storage controller with given instance number doesn't exist.
4660 </result>
4661 </desc>
4662 <param name="instance" type="unsigned long" dir="in"/>
4663 <param name="storageController" type="IStorageController" dir="return"/>
4664 </method>
4665
4666 <method name="removeStorageController">
4667 <desc>
4668 Removes a storage controller from the machine.
4669
4670 <result name="VBOX_E_OBJECT_NOT_FOUND">
4671 A storage controller with given name doesn't exist.
4672 </result>
4673 </desc>
4674 <param name="name" type="wstring" dir="in"/>
4675 </method>
4676
4677 <method name="getSerialPort" const="yes">
4678 <desc>
4679 Returns the serial port associated with the given slot.
4680 Slots are numbered sequentially, starting with zero. The total
4681 number of serial ports per machine is defined by the
4682 <link to="ISystemProperties::serialPortCount"/> property,
4683 so the maximum slot number is one less than that property's value.
4684
4685 <result name="E_INVALIDARG">
4686 Invalid @a slot number.
4687 </result>
4688
4689 </desc>
4690 <param name="slot" type="unsigned long" dir="in"/>
4691 <param name="port" type="ISerialPort" dir="return"/>
4692 </method>
4693
4694 <method name="getParallelPort" const="yes">
4695 <desc>
4696 Returns the parallel port associated with the given slot.
4697 Slots are numbered sequentially, starting with zero. The total
4698 number of parallel ports per machine is defined by the
4699 <link to="ISystemProperties::parallelPortCount"/> property,
4700 so the maximum slot number is one less than that property's value.
4701
4702 <result name="E_INVALIDARG">
4703 Invalid @a slot number.
4704 </result>
4705
4706 </desc>
4707 <param name="slot" type="unsigned long" dir="in"/>
4708 <param name="port" type="IParallelPort" dir="return"/>
4709 </method>
4710
4711 <method name="getExtraDataKeys">
4712 <desc>
4713 Returns an array representing the machine-specific extra data keys
4714 which currently have values defined.
4715 </desc>
4716 <param name="value" type="wstring" dir="return" safearray="yes">
4717 <desc>Array of extra data keys.</desc>
4718 </param>
4719 </method>
4720
4721 <method name="getExtraData">
4722 <desc>
4723 Returns associated machine-specific extra data.
4724
4725 If the requested data @a key does not exist, this function will
4726 succeed and return an empty string in the @a value argument.
4727
4728 <result name="VBOX_E_FILE_ERROR">
4729 Settings file not accessible.
4730 </result>
4731 <result name="VBOX_E_XML_ERROR">
4732 Could not parse the settings file.
4733 </result>
4734
4735 </desc>
4736 <param name="key" type="wstring" dir="in">
4737 <desc>Name of the data key to get.</desc>
4738 </param>
4739 <param name="value" type="wstring" dir="return">
4740 <desc>Value of the requested data key.</desc>
4741 </param>
4742 </method>
4743
4744 <method name="setExtraData">
4745 <desc>
4746 Sets associated machine-specific extra data.
4747
4748 If you pass @c null or an empty string as a key @a value, the given
4749 @a key will be deleted.
4750
4751 <note>
4752 Before performing the actual data change, this method will ask all
4753 registered listeners using the
4754 <link to="IExtraDataCanChangeEvent"/>
4755 notification for a permission. If one of the listeners refuses the
4756 new value, the change will not be performed.
4757 </note>
4758 <note>
4759 On success, the
4760 <link to="IExtraDataChangedEvent"/> notification
4761 is called to inform all registered listeners about a successful data
4762 change.
4763 </note>
4764 <note>
4765 This method can be called outside the machine session and therefore
4766 it's a caller's responsibility to handle possible race conditions
4767 when several clients change the same key at the same time.
4768 </note>
4769
4770 <result name="VBOX_E_FILE_ERROR">
4771 Settings file not accessible.
4772 </result>
4773 <result name="VBOX_E_XML_ERROR">
4774 Could not parse the settings file.
4775 </result>
4776
4777 </desc>
4778 <param name="key" type="wstring" dir="in">
4779 <desc>Name of the data key to set.</desc>
4780 </param>
4781 <param name="value" type="wstring" dir="in">
4782 <desc>Value to assign to the key.</desc>
4783 </param>
4784 </method>
4785
4786 <method name="getCPUProperty" const="yes">
4787 <desc>
4788 Returns the virtual CPU boolean value of the specified property.
4789
4790 <result name="E_INVALIDARG">
4791 Invalid property.
4792 </result>
4793
4794 </desc>
4795 <param name="property" type="CPUPropertyType" dir="in">
4796 <desc>
4797 Property type to query.
4798 </desc>
4799 </param>
4800 <param name="value" type="boolean" dir="return">
4801 <desc>
4802 Property value.
4803 </desc>
4804 </param>
4805 </method>
4806
4807 <method name="setCPUProperty">
4808 <desc>
4809 Sets the virtual CPU boolean value of the specified property.
4810
4811 <result name="E_INVALIDARG">
4812 Invalid property.
4813 </result>
4814
4815 </desc>
4816 <param name="property" type="CPUPropertyType" dir="in">
4817 <desc>
4818 Property type to query.
4819 </desc>
4820 </param>
4821 <param name="value" type="boolean" dir="in">
4822 <desc>
4823 Property value.
4824 </desc>
4825 </param>
4826 </method>
4827
4828 <method name="getCPUIDLeaf" const="yes">
4829 <desc>
4830 Returns the virtual CPU cpuid information for the specified leaf.
4831
4832 Currently supported index values for cpuid:
4833 Standard CPUID leafs: 0 - 0xA
4834 Extended CPUID leafs: 0x80000000 - 0x8000000A
4835
4836 See the Intel and AMD programmer's manuals for detailed information
4837 about the cpuid instruction and its leafs.
4838 <result name="E_INVALIDARG">
4839 Invalid id.
4840 </result>
4841
4842 </desc>
4843 <param name="id" type="unsigned long" dir="in">
4844 <desc>
4845 CPUID leaf index.
4846 </desc>
4847 </param>
4848 <param name="valEax" type="unsigned long" dir="out">
4849 <desc>
4850 CPUID leaf value for register eax.
4851 </desc>
4852 </param>
4853 <param name="valEbx" type="unsigned long" dir="out">
4854 <desc>
4855 CPUID leaf value for register ebx.
4856 </desc>
4857 </param>
4858 <param name="valEcx" type="unsigned long" dir="out">
4859 <desc>
4860 CPUID leaf value for register ecx.
4861 </desc>
4862 </param>
4863 <param name="valEdx" type="unsigned long" dir="out">
4864 <desc>
4865 CPUID leaf value for register edx.
4866 </desc>
4867 </param>
4868 </method>
4869
4870 <method name="setCPUIDLeaf">
4871 <desc>
4872 Sets the virtual CPU cpuid information for the specified leaf. Note that these values
4873 are not passed unmodified. VirtualBox clears features that it doesn't support.
4874
4875 Currently supported index values for cpuid:
4876 Standard CPUID leafs: 0 - 0xA
4877 Extended CPUID leafs: 0x80000000 - 0x8000000A
4878
4879 See the Intel and AMD programmer's manuals for detailed information
4880 about the cpuid instruction and its leafs.
4881
4882 Do not use this method unless you know exactly what you're doing. Misuse can lead to
4883 random crashes inside VMs.
4884 <result name="E_INVALIDARG">
4885 Invalid id.
4886 </result>
4887
4888 </desc>
4889 <param name="id" type="unsigned long" dir="in">
4890 <desc>
4891 CPUID leaf index.
4892 </desc>
4893 </param>
4894 <param name="valEax" type="unsigned long" dir="in">
4895 <desc>
4896 CPUID leaf value for register eax.
4897 </desc>
4898 </param>
4899 <param name="valEbx" type="unsigned long" dir="in">
4900 <desc>
4901 CPUID leaf value for register ebx.
4902 </desc>
4903 </param>
4904 <param name="valEcx" type="unsigned long" dir="in">
4905 <desc>
4906 CPUID leaf value for register ecx.
4907 </desc>
4908 </param>
4909 <param name="valEdx" type="unsigned long" dir="in">
4910 <desc>
4911 CPUID leaf value for register edx.
4912 </desc>
4913 </param>
4914 </method>
4915
4916 <method name="removeCPUIDLeaf">
4917 <desc>
4918 Removes the virtual CPU cpuid leaf for the specified index
4919
4920 <result name="E_INVALIDARG">
4921 Invalid id.
4922 </result>
4923
4924 </desc>
4925 <param name="id" type="unsigned long" dir="in">
4926 <desc>
4927 CPUID leaf index.
4928 </desc>
4929 </param>
4930 </method>
4931
4932 <method name="removeAllCPUIDLeaves">
4933 <desc>
4934 Removes all the virtual CPU cpuid leaves
4935 </desc>
4936 </method>
4937
4938 <method name="getHWVirtExProperty" const="yes">
4939 <desc>
4940 Returns the value of the specified hardware virtualization boolean property.
4941
4942 <result name="E_INVALIDARG">
4943 Invalid property.
4944 </result>
4945
4946 </desc>
4947 <param name="property" type="HWVirtExPropertyType" dir="in">
4948 <desc>
4949 Property type to query.
4950 </desc>
4951 </param>
4952 <param name="value" type="boolean" dir="return">
4953 <desc>
4954 Property value.
4955 </desc>
4956 </param>
4957 </method>
4958
4959 <method name="setHWVirtExProperty">
4960 <desc>
4961 Sets a new value for the specified hardware virtualization boolean property.
4962
4963 <result name="E_INVALIDARG">
4964 Invalid property.
4965 </result>
4966
4967 </desc>
4968 <param name="property" type="HWVirtExPropertyType" dir="in">
4969 <desc>
4970 Property type to set.
4971 </desc>
4972 </param>
4973 <param name="value" type="boolean" dir="in">
4974 <desc>
4975 New property value.
4976 </desc>
4977 </param>
4978 </method>
4979
4980 <method name="saveSettings">
4981 <desc>
4982 Saves any changes to machine settings made since the session
4983 has been opened or a new machine has been created, or since the
4984 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
4985 For registered machines, new settings become visible to all
4986 other VirtualBox clients after successful invocation of this
4987 method.
4988 <note>
4989 The method sends <link to="IMachineDataChangedEvent"/>
4990 notification event after the configuration has been successfully
4991 saved (only for registered machines).
4992 </note>
4993 <note>
4994 Calling this method is only valid on instances returned
4995 by <link to="ISession::machine"/> and on new machines
4996 created by <link to="IVirtualBox::createMachine"/> but not
4997 yet registered, or on unregistered machines after calling
4998 <link to="IMachine::unregister"/>.
4999 </note>
5000
5001 <result name="VBOX_E_FILE_ERROR">
5002 Settings file not accessible.
5003 </result>
5004 <result name="VBOX_E_XML_ERROR">
5005 Could not parse the settings file.
5006 </result>
5007 <result name="E_ACCESSDENIED">
5008 Modification request refused.
5009 </result>
5010
5011 </desc>
5012 </method>
5013
5014 <method name="discardSettings">
5015 <desc>
5016 Discards any changes to the machine settings made since the session
5017 has been opened or since the last call to <link to="#saveSettings"/>
5018 or <link to="#discardSettings"/>.
5019 <note>
5020 Calling this method is only valid on instances returned
5021 by <link to="ISession::machine"/> and on new machines
5022 created by <link to="IVirtualBox::createMachine"/> or
5023 opened by <link to="IVirtualBox::openMachine"/> but not
5024 yet registered, or on unregistered machines after calling
5025 <link to="IMachine::unregister"/>.
5026 </note>
5027
5028 <result name="VBOX_E_INVALID_VM_STATE">
5029 Virtual machine is not mutable.
5030 </result>
5031
5032 </desc>
5033 </method>
5034
5035 <method name="unregister">
5036 <desc>
5037 Unregisters the machine, which must have been previously registered using
5038 <link to="IVirtualBox::registerMachine"/>, and optionally do additional
5039 cleanup before the machine is unregistered.
5040
5041 This method does not delete any files. It only changes the machine configuration and
5042 the list of registered machines in the VirtualBox object. To delete the files which
5043 belonged to the machine, including the XML file of the machine itself, call
5044 <link to="#delete"/>, optionally with the array of IMedium objects which was returned
5045 from this method.
5046
5047 How thoroughly this method cleans up the machine configuration before unregistering
5048 the machine depends on the @a cleanupMode argument.
5049
5050 <ul>
5051 <li>With "UnregisterOnly", the machine will only be unregistered, but no additional
5052 cleanup will be performed. The call will fail if the machine is in "Saved" state
5053 or has any snapshots or any media attached (see <link to="IMediumAttachment" />.
5054 It is the responsibility of the caller to delete all such configuration in this mode.
5055 In this mode, the API behaves like the former @c IVirtualBox::unregisterMachine() API
5056 which it replaces.</li>
5057 <li>With "DetachAllReturnNone", the call will succeed even if the machine is in "Saved"
5058 state or if it has snapshots or media attached. All media attached to the current machine
5059 state or in snapshots will be detached. No medium objects will be returned; all of the
5060 machine's media will remain open.</li>
5061 <li>With "DetachAllReturnHardDisksOnly", the call will behave like with "DetachAllReturnNone",
5062 except that all the hard disk medium objects which were detached from the machine will
5063 be returned as an array. This allows for quickly passing them to the <link to="#delete" />
5064 API for closing and deletion.</li>
5065 <li>With "Full", the call will behave like with "DetachAllReturnHardDisksOnly", except
5066 that all media will be returned in the array, including removeable media like DVDs and
5067 floppies. This might be useful if the user wants to inspect in detail which media were
5068 attached to the machine. Be careful when passing the media array to <link to="#delete" />
5069 in that case because users will typically want to preserve ISO and RAW image files.</li>
5070 </ul>
5071
5072 This API does not verify whether the media files returned in the array are still
5073 attached to other machines (i.e. shared between several machines). If such a shared
5074 image is passed to <link to="#delete" /> however, closing the image will fail there
5075 and the image will be silently skipped.
5076
5077 A typical implementation will use "DetachAllReturnHardDisksOnly" and then pass the
5078 resulting IMedia array to <link to="#delete"/>. This way, the machine is completely
5079 deleted with all its saved states and hard disk images, but images for removeable
5080 drives (such as ISO and RAW files) will remain on disk.
5081
5082 The call will fail if the machine is currently locked (see <link to="ISession" />).
5083 It implicitly calls <link to="#saveSettings"/> to save all current machine settings
5084 before unregistering it.
5085
5086 After successful method invocation, the <link to="IMachineRegisteredEvent"/> event
5087 is fired.
5088
5089 <note>
5090 If the given machine is inaccessible (see <link to="#accessible"/>), it
5091 will be unregistered and fully uninitialized right afterwards. As a result,
5092 the returned machine object will be unusable and an attempt to call
5093 <b>any</b> method will return the "Object not ready" error.
5094 </note>
5095
5096 <result name="VBOX_E_INVALID_OBJECT_STATE">
5097 Machine is currently locked for a session.
5098 </result>
5099 </desc>
5100
5101 <param name="cleanupMode" type="CleanupMode" dir="in">
5102 <desc>How to clean up after the machine has been unregistered.</desc>
5103 </param>
5104 <param name="aMedia" type="IMedium" safearray="yes" dir="return">
5105 <desc>List of media detached from the machine, depending on the @a cleanupMode parameter.</desc>
5106 </param>
5107 </method>
5108
5109 <method name="delete">
5110 <desc>
5111 Deletes the files associated with this machine from disk. If medium objects are passed
5112 in with the @a aMedia argument, they are closed and, if closing was succesful, their
5113 storage files are deleted as well. For convenience, this array of media files can be
5114 the same as the one returned from a previous <link to="#unregister" /> call.
5115
5116 This method must only be called on machines which are either write-locked (i.e. on instances
5117 returned by <link to="ISession::machine"/>) or on unregistered machines (i.e. not yet
5118 registered machines created by <link to="IVirtualBox::createMachine"/> or opened by
5119 <link to="IVirtualBox::openMachine"/>, or after having called <link to="#unregister"/>).
5120
5121 The following files will be deleted by this method:
5122 <ul>
5123 <li>If <link to="#unregister" /> had been previously called with a @a cleanupMode
5124 argument other than "UnregisterOnly", this will delete all saved state files that
5125 the machine had in use; possibly one if the machine was in "Saved" state and one
5126 for each online snapshot that the machine had.</li>
5127 <li>On each medium object passed in the @a aMedia array, this will call
5128 <link to="IMedium::close" />. If that succeeds, this will attempt to delete the
5129 medium's storage on disk. Since the close() call will fail if the medium is still
5130 in use, e.g. because it is still attached to a second machine; in that case the
5131 storage will not be deleted.</li>
5132 <li>Finally, the machine's own XML file will be deleted.</li>
5133 </ul>
5134
5135 Since deleting large disk image files can be a time-consuming I/O operation, this
5136 method operates asynchronously and returns an IProgress object to allow the caller
5137 to monitor the progress. There will be one sub-operation for each file that is
5138 being deleted (saved state or medium storage file).
5139
5140 <note>
5141 <link to="#settingsModified"/> will return @c true after this
5142 method successfully returns.
5143 </note>
5144
5145 <result name="VBOX_E_INVALID_VM_STATE">
5146 Machine is registered but not write-locked.
5147 </result>
5148 <result name="VBOX_E_IPRT_ERROR">
5149 Could not delete the settings file.
5150 </result>
5151 </desc>
5152 <param name="aMedia" type="IMedium" safearray="yes" dir="in">
5153 <desc>List of media to be closed and whose storage files will be deleted.</desc>
5154 </param>
5155 <param name="aProgress" type="IProgress" dir="return">
5156 <desc>Progress object to track the operation completion.</desc>
5157 </param>
5158 </method>
5159
5160 <method name="export">
5161 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5162 steps required to export VirtualBox machines to OVF.
5163 </desc>
5164
5165 <param name="aAppliance" type="IAppliance" dir="in">
5166 <desc>Appliance to export this machine to.</desc>
5167 </param>
5168 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5169 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5170 </param>
5171 </method >
5172
5173 <method name="getSnapshot">
5174 <desc>
5175 Returns a snapshot of this machine with the given UUID.
5176 A @c null UUID can be used to obtain the first snapshot
5177 taken on this machine. This is useful if you want to traverse
5178 the whole tree of snapshots starting from the root.
5179
5180 <result name="VBOX_E_OBJECT_NOT_FOUND">
5181 Virtual machine has no snapshots or snapshot not found.
5182 </result>
5183
5184 </desc>
5185 <param name="id" type="uuid" mod="string" dir="in">
5186 <desc>UUID of the snapshot to get</desc>
5187 </param>
5188 <param name="snapshot" type="ISnapshot" dir="return">
5189 <desc>Snapshot object with the given UUID.</desc>
5190 </param>
5191 </method>
5192
5193 <method name="findSnapshot">
5194 <desc>
5195 Returns a snapshot of this machine with the given name.
5196
5197 <result name="VBOX_E_OBJECT_NOT_FOUND">
5198 Virtual machine has no snapshots or snapshot not found.
5199 </result>
5200
5201 </desc>
5202 <param name="name" type="wstring" dir="in">
5203 <desc>Name of the snapshot to find</desc>
5204 </param>
5205 <param name="snapshot" type="ISnapshot" dir="return">
5206 <desc>Snapshot object with the given name.</desc>
5207 </param>
5208 </method>
5209
5210 <method name="setCurrentSnapshot">
5211 <desc>
5212 Sets the current snapshot of this machine.
5213 <note>
5214 In the current implementation, this operation is not
5215 implemented.
5216 </note>
5217 </desc>
5218 <param name="id" type="uuid" mod="string" dir="in">
5219 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5220 </param>
5221 </method>
5222
5223 <method name="createSharedFolder">
5224 <desc>
5225 Creates a new permanent shared folder by associating the given logical
5226 name with the given host path, adds it to the collection of shared
5227 folders and starts sharing it. Refer to the description of
5228 <link to="ISharedFolder"/> to read more about logical names.
5229
5230 <result name="VBOX_E_OBJECT_IN_USE">
5231 Shared folder already exists.
5232 </result>
5233 <result name="VBOX_E_FILE_ERROR">
5234 Shared folder @a hostPath not accessible.
5235 </result>
5236
5237 </desc>
5238 <param name="name" type="wstring" dir="in">
5239 <desc>Unique logical name of the shared folder.</desc>
5240 </param>
5241 <param name="hostPath" type="wstring" dir="in">
5242 <desc>Full path to the shared folder in the host file system.</desc>
5243 </param>
5244 <param name="writable" type="boolean" dir="in">
5245 <desc>Whether the share is writable or readonly.</desc>
5246 </param>
5247 <param name="automount" type="boolean" dir="in">
5248 <desc>Whether the share gets automatically mounted by the guest
5249 or not.</desc>
5250 </param>
5251 </method>
5252
5253 <method name="removeSharedFolder">
5254 <desc>
5255 Removes the permanent shared folder with the given name previously
5256 created by <link to="#createSharedFolder"/> from the collection of
5257 shared folders and stops sharing it.
5258
5259 <result name="VBOX_E_INVALID_VM_STATE">
5260 Virtual machine is not mutable.
5261 </result>
5262 <result name="VBOX_E_OBJECT_NOT_FOUND">
5263 Shared folder @a name does not exist.
5264 </result>
5265
5266 </desc>
5267 <param name="name" type="wstring" dir="in">
5268 <desc>Logical name of the shared folder to remove.</desc>
5269 </param>
5270 </method>
5271
5272 <method name="canShowConsoleWindow">
5273 <desc>
5274 Returns @c true if the VM console process can activate the
5275 console window and bring it to foreground on the desktop of
5276 the host PC.
5277 <note>
5278 This method will fail if a session for this machine is not
5279 currently open.
5280 </note>
5281
5282 <result name="VBOX_E_INVALID_VM_STATE">
5283 Machine session is not open.
5284 </result>
5285
5286 </desc>
5287 <param name="canShow" type="boolean" dir="return">
5288 <desc>
5289 @c true if the console window can be shown and @c false otherwise.
5290 </desc>
5291 </param>
5292 </method>
5293
5294 <method name="showConsoleWindow">
5295 <desc>
5296 Activates the console window and brings it to foreground on
5297 the desktop of the host PC. Many modern window managers on
5298 many platforms implement some sort of focus stealing
5299 prevention logic, so that it may be impossible to activate
5300 a window without the help of the currently active
5301 application. In this case, this method will return a non-zero
5302 identifier that represents the top-level window of the VM
5303 console process. The caller, if it represents a currently
5304 active process, is responsible to use this identifier (in a
5305 platform-dependent manner) to perform actual window
5306 activation.
5307 <note>
5308 This method will fail if a session for this machine is not
5309 currently open.
5310 </note>
5311
5312 <result name="VBOX_E_INVALID_VM_STATE">
5313 Machine session is not open.
5314 </result>
5315
5316 </desc>
5317 <param name="winId" type="long long" dir="return">
5318 <desc>
5319 Platform-dependent identifier of the top-level VM console
5320 window, or zero if this method has performed all actions
5321 necessary to implement the <i>show window</i> semantics for
5322 the given platform and/or VirtualBox front-end.
5323 </desc>
5324 </param>
5325 </method>
5326
5327 <method name="getGuestProperty" const="yes">
5328 <desc>
5329 Reads an entry from the machine's guest property store.
5330
5331 <result name="VBOX_E_INVALID_VM_STATE">
5332 Machine session is not open.
5333 </result>
5334
5335 </desc>
5336 <param name="name" type="wstring" dir="in">
5337 <desc>
5338 The name of the property to read.
5339 </desc>
5340 </param>
5341 <param name="value" type="wstring" dir="out">
5342 <desc>
5343 The value of the property. If the property does not exist then this
5344 will be empty.
5345 </desc>
5346 </param>
5347 <param name="timestamp" type="long long" dir="out">
5348 <desc>
5349 The time at which the property was last modified, as seen by the
5350 server process.
5351 </desc>
5352 </param>
5353 <param name="flags" type="wstring" dir="out">
5354 <desc>
5355 Additional property parameters, passed as a comma-separated list of
5356 "name=value" type entries.
5357 </desc>
5358 </param>
5359 </method>
5360
5361 <method name="getGuestPropertyValue" const="yes">
5362 <desc>
5363 Reads a value from the machine's guest property store.
5364
5365 <result name="VBOX_E_INVALID_VM_STATE">
5366 Machine session is not open.
5367 </result>
5368
5369 </desc>
5370 <param name="property" type="wstring" dir="in">
5371 <desc>
5372 The name of the property to read.
5373 </desc>
5374 </param>
5375 <param name="value" type="wstring" dir="return">
5376 <desc>
5377 The value of the property. If the property does not exist then this
5378 will be empty.
5379 </desc>
5380 </param>
5381 </method>
5382
5383 <method name="getGuestPropertyTimestamp" const="yes">
5384 <desc>
5385 Reads a property timestamp from the machine's guest property store.
5386
5387 <result name="VBOX_E_INVALID_VM_STATE">
5388 Machine session is not open.
5389 </result>
5390
5391 </desc>
5392 <param name="property" type="wstring" dir="in">
5393 <desc>
5394 The name of the property to read.
5395 </desc>
5396 </param>
5397 <param name="value" type="long long" dir="return">
5398 <desc>
5399 The timestamp. If the property does not exist then this will be
5400 empty.
5401 </desc>
5402 </param>
5403 </method>
5404
5405 <method name="setGuestProperty">
5406 <desc>
5407 Sets, changes or deletes an entry in the machine's guest property
5408 store.
5409
5410 <result name="E_ACCESSDENIED">
5411 Property cannot be changed.
5412 </result>
5413 <result name="E_INVALIDARG">
5414 Invalid @a flags.
5415 </result>
5416 <result name="VBOX_E_INVALID_VM_STATE">
5417 Virtual machine is not mutable or session not open.
5418 </result>
5419 <result name="VBOX_E_INVALID_OBJECT_STATE">
5420 Cannot set transient property when machine not running.
5421 </result>
5422
5423 </desc>
5424 <param name="property" type="wstring" dir="in">
5425 <desc>
5426 The name of the property to set, change or delete.
5427 </desc>
5428 </param>
5429 <param name="value" type="wstring" dir="in">
5430 <desc>
5431 The new value of the property to set, change or delete. If the
5432 property does not yet exist and value is non-empty, it will be
5433 created. If the value is @c null or empty, the property will be
5434 deleted if it exists.
5435 </desc>
5436 </param>
5437 <param name="flags" type="wstring" dir="in">
5438 <desc>
5439 Additional property parameters, passed as a comma-separated list of
5440 "name=value" type entries.
5441 </desc>
5442 </param>
5443 </method>
5444
5445 <method name="setGuestPropertyValue">
5446 <desc>
5447 Sets, changes or deletes a value in the machine's guest property
5448 store. The flags field will be left unchanged or created empty for a
5449 new property.
5450
5451 <result name="E_ACCESSDENIED">
5452 Property cannot be changed.
5453 </result>
5454 <result name="VBOX_E_INVALID_VM_STATE">
5455 Virtual machine is not mutable or session not open.
5456 </result>
5457 <result name="VBOX_E_INVALID_OBJECT_STATE">
5458 Cannot set transient property when machine not running.
5459 </result>
5460 </desc>
5461
5462 <param name="property" type="wstring" dir="in">
5463 <desc>
5464 The name of the property to set, change or delete.
5465 </desc>
5466 </param>
5467 <param name="value" type="wstring" dir="in">
5468 <desc>
5469 The new value of the property to set, change or delete. If the
5470 property does not yet exist and value is non-empty, it will be
5471 created. If the value is @c null or empty, the property will be
5472 deleted if it exists.
5473 </desc>
5474 </param>
5475 </method>
5476
5477 <method name="enumerateGuestProperties">
5478 <desc>
5479 Return a list of the guest properties matching a set of patterns along
5480 with their values, time stamps and flags.
5481 </desc>
5482 <param name="patterns" type="wstring" dir="in">
5483 <desc>
5484 The patterns to match the properties against, separated by '|'
5485 characters. If this is empty or @c null, all properties will match.
5486 </desc>
5487 </param>
5488 <param name="name" type="wstring" dir="out" safearray="yes">
5489 <desc>
5490 The names of the properties returned.
5491 </desc>
5492 </param>
5493 <param name="value" type="wstring" dir="out" safearray="yes">
5494 <desc>
5495 The values of the properties returned. The array entries match the
5496 corresponding entries in the @a name array.
5497 </desc>
5498 </param>
5499 <param name="timestamp" type="long long" dir="out" safearray="yes">
5500 <desc>
5501 The time stamps of the properties returned. The array entries match
5502 the corresponding entries in the @a name array.
5503 </desc>
5504 </param>
5505 <param name="flags" type="wstring" dir="out" safearray="yes">
5506 <desc>
5507 The flags of the properties returned. The array entries match the
5508 corresponding entries in the @a name array.
5509 </desc>
5510 </param>
5511 </method>
5512
5513 <method name="querySavedGuestSize">
5514 <desc>
5515 Returns the guest dimensions from the saved state.
5516 </desc>
5517 <param name="screenId" type="unsigned long" dir="in">
5518 <desc>
5519 Saved guest screen to query info from.
5520 </desc>
5521 </param>
5522 <param name="width" type="unsigned long" dir="out">
5523 <desc>
5524 Guest width at the time of the saved state was taken.
5525 </desc>
5526 </param>
5527 <param name="height" type="unsigned long" dir="out">
5528 <desc>
5529 Guest height at the time of the saved state was taken.
5530 </desc>
5531 </param>
5532 </method>
5533
5534 <method name="querySavedThumbnailSize">
5535 <desc>
5536 Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.
5537 </desc>
5538 <param name="screenId" type="unsigned long" dir="in">
5539 <desc>
5540 Saved guest screen to query info from.
5541 </desc>
5542 </param>
5543 <param name="size" type="unsigned long" dir="out">
5544 <desc>
5545 Size of buffer required to store the bitmap.
5546 </desc>
5547 </param>
5548 <param name="width" type="unsigned long" dir="out">
5549 <desc>
5550 Bitmap width.
5551 </desc>
5552 </param>
5553 <param name="height" type="unsigned long" dir="out">
5554 <desc>
5555 Bitmap height.
5556 </desc>
5557 </param>
5558 </method>
5559
5560 <method name="readSavedThumbnailToArray">
5561 <desc>
5562 Thumbnail is retrieved to an array of bytes in uncompressed 32-bit BGRA or RGBA format.
5563 </desc>
5564 <param name="screenId" type="unsigned long" dir="in">
5565 <desc>
5566 Saved guest screen to read from.
5567 </desc>
5568 </param>
5569 <param name="BGR" type="boolean" dir="in">
5570 <desc>
5571 How to order bytes in the pixel. A pixel consists of 4 bytes. If this parameter is true, then
5572 bytes order is: B, G, R, 0xFF. If this parameter is false, then bytes order is: R, G, B, 0xFF.
5573 </desc>
5574 </param>
5575 <param name="width" type="unsigned long" dir="out">
5576 <desc>
5577 Bitmap width.
5578 </desc>
5579 </param>
5580 <param name="height" type="unsigned long" dir="out">
5581 <desc>
5582 Bitmap height.
5583 </desc>
5584 </param>
5585 <param name="data" type="octet" safearray="yes" dir="return">
5586 <desc>
5587 Array with resulting bitmap data.
5588 </desc>
5589 </param>
5590 </method>
5591
5592 <method name="readSavedThumbnailPNGToArray">
5593 <desc>
5594 Thumbnail in PNG format is retrieved to an array of bytes.
5595 </desc>
5596 <param name="screenId" type="unsigned long" dir="in">
5597 <desc>
5598 Saved guest screen to read from.
5599 </desc>
5600 </param>
5601 <param name="width" type="unsigned long" dir="out">
5602 <desc>
5603 Image width.
5604 </desc>
5605 </param>
5606 <param name="height" type="unsigned long" dir="out">
5607 <desc>
5608 Image height.
5609 </desc>
5610 </param>
5611 <param name="data" type="octet" dir="return" safearray="yes">
5612 <desc>
5613 Array with resulting PNG data.
5614 </desc>
5615 </param>
5616 </method>
5617
5618 <method name="querySavedScreenshotPNGSize">
5619 <desc>
5620 Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.
5621 </desc>
5622 <param name="screenId" type="unsigned long" dir="in">
5623 <desc>
5624 Saved guest screen to query info from.
5625 </desc>
5626 </param>
5627 <param name="size" type="unsigned long" dir="out">
5628 <desc>
5629 Size of buffer required to store the PNG binary data.
5630 </desc>
5631 </param>
5632 <param name="width" type="unsigned long" dir="out">
5633 <desc>
5634 Image width.
5635 </desc>
5636 </param>
5637 <param name="height" type="unsigned long" dir="out">
5638 <desc>
5639 Image height.
5640 </desc>
5641 </param>
5642 </method>
5643
5644 <method name="readSavedScreenshotPNGToArray">
5645 <desc>
5646 Screenshot in PNG format is retrieved to an array of bytes.
5647 </desc>
5648 <param name="screenId" type="unsigned long" dir="in">
5649 <desc>
5650 Saved guest screen to read from.
5651 </desc>
5652 </param>
5653 <param name="width" type="unsigned long" dir="out">
5654 <desc>
5655 Image width.
5656 </desc>
5657 </param>
5658 <param name="height" type="unsigned long" dir="out">
5659 <desc>
5660 Image height.
5661 </desc>
5662 </param>
5663 <param name="data" type="octet" dir="return" safearray="yes">
5664 <desc>
5665 Array with resulting PNG data.
5666 </desc>
5667 </param>
5668 </method>
5669
5670 <method name="hotPlugCPU">
5671 <desc>
5672 Plugs a CPU into the machine.
5673 </desc>
5674 <param name="cpu" type="unsigned long" dir="in">
5675 <desc>
5676 The CPU id to insert.
5677 </desc>
5678 </param>
5679 </method>
5680
5681 <method name="hotUnplugCPU">
5682 <desc>
5683 Removes a CPU from the machine.
5684 </desc>
5685 <param name="cpu" type="unsigned long" dir="in">
5686 <desc>
5687 The CPU id to remove.
5688 </desc>
5689 </param>
5690 </method>
5691
5692 <method name="getCPUStatus">
5693 <desc>
5694 Returns the current status of the given CPU.
5695 </desc>
5696 <param name="cpu" type="unsigned long" dir="in">
5697 <desc>
5698 The CPU id to check for.
5699 </desc>
5700 </param>
5701 <param name="attached" type="boolean" dir="return">
5702 <desc>
5703 Status of the CPU.
5704 </desc>
5705 </param>
5706 </method>
5707
5708 <method name="queryLogFilename">
5709 <desc>
5710 Queries for the VM log file name of an given index. Returns an empty
5711 string if a log file with that index doesn't exists.
5712 </desc>
5713 <param name="idx" type="unsigned long" dir="in">
5714 <desc>
5715 Which log file name to query. 0=current log file.
5716 </desc>
5717 </param>
5718 <param name="filename" type="wstring" dir="return">
5719 <desc>
5720 On return the full path to the log file or an empty string on error.
5721 </desc>
5722 </param>
5723 </method>
5724
5725 <method name="readLog">
5726 <desc>
5727 Reads the VM log file. The chunk size is limited, so even if you
5728 ask for a big piece there might be less data returned.
5729 </desc>
5730 <param name="idx" type="unsigned long" dir="in">
5731 <desc>
5732 Which log file to read. 0=current log file.
5733 </desc>
5734 </param>
5735 <param name="offset" type="long long" dir="in">
5736 <desc>
5737 Offset in the log file.
5738 </desc>
5739 </param>
5740 <param name="size" type="long long" dir="in">
5741 <desc>
5742 Chunk size to read in the log file.
5743 </desc>
5744 </param>
5745 <param name="data" type="octet" dir="return" safearray="yes">
5746 <desc>
5747 Data read from the log file. A data size of 0 means end of file
5748 if the requested chunk size was not 0. This is the unprocessed
5749 file data, i.e. the line ending style depends on the platform of
5750 the system the server is running on.
5751 </desc>
5752 </param>
5753 </method>
5754 </interface>
5755
5756 <!--
5757 // IConsole
5758 /////////////////////////////////////////////////////////////////////////
5759 -->
5760
5761 <interface
5762 name="IRemoteDisplayInfo" extends="$unknown"
5763 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
5764 wsmap="struct"
5765 >
5766 <desc>
5767 Contains information about the remote display (VRDP) capabilities and status.
5768 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5769 </desc>
5770
5771 <attribute name="active" type="boolean" readonly="yes">
5772 <desc>
5773 Whether the remote display connection is active.
5774 </desc>
5775 </attribute>
5776
5777 <attribute name="port" type="long" readonly="yes">
5778 <desc>
5779 VRDP server port number. If this property is equal to <tt>0</tt>, then
5780 the VRDP server failed to start, usually because there are no free TCP
5781 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
5782 server has not yet been started.
5783 </desc>
5784 </attribute>
5785
5786 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5787 <desc>
5788 How many times a client connected.
5789 </desc>
5790 </attribute>
5791
5792 <attribute name="beginTime" type="long long" readonly="yes">
5793 <desc>
5794 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5795 </desc>
5796 </attribute>
5797
5798 <attribute name="endTime" type="long long" readonly="yes">
5799 <desc>
5800 When the last connection was terminated or the current time, if
5801 connection is still active, in milliseconds since 1970-01-01 UTC.
5802 </desc>
5803 </attribute>
5804
5805 <attribute name="bytesSent" type="long long" readonly="yes">
5806 <desc>
5807 How many bytes were sent in last or current, if still active, connection.
5808 </desc>
5809 </attribute>
5810
5811 <attribute name="bytesSentTotal" type="long long" readonly="yes">
5812 <desc>
5813 How many bytes were sent in all connections.
5814 </desc>
5815 </attribute>
5816
5817 <attribute name="bytesReceived" type="long long" readonly="yes">
5818 <desc>
5819 How many bytes were received in last or current, if still active, connection.
5820 </desc>
5821 </attribute>
5822
5823 <attribute name="bytesReceivedTotal" type="long long" readonly="yes">
5824 <desc>
5825 How many bytes were received in all connections.
5826 </desc>
5827 </attribute>
5828
5829 <attribute name="user" type="wstring" readonly="yes">
5830 <desc>
5831 Login user name supplied by the client.
5832 </desc>
5833 </attribute>
5834
5835 <attribute name="domain" type="wstring" readonly="yes">
5836 <desc>
5837 Login domain name supplied by the client.
5838 </desc>
5839 </attribute>
5840
5841 <attribute name="clientName" type="wstring" readonly="yes">
5842 <desc>
5843 The client name supplied by the client.
5844 </desc>
5845 </attribute>
5846
5847 <attribute name="clientIP" type="wstring" readonly="yes">
5848 <desc>
5849 The IP address of the client.
5850 </desc>
5851 </attribute>
5852
5853 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5854 <desc>
5855 The client software version number.
5856 </desc>
5857 </attribute>
5858
5859 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5860 <desc>
5861 Public key exchange method used when connection was established.
5862 Values: 0 - RDP4 public key exchange scheme.
5863 1 - X509 certificates were sent to client.
5864 </desc>
5865 </attribute>
5866
5867 </interface>
5868
5869 <interface
5870 name="IConsole" extends="$unknown"
5871 uuid="03cb7897-ea17-4e6c-81ae-4bd90be2fde2"
5872 wsmap="managed"
5873 >
5874 <desc>
5875 The IConsole interface represents an interface to control virtual
5876 machine execution.
5877
5878 A console object gets created when a machine has been locked for a
5879 particular session (client process) using <link to="IMachine::lockMachine" />
5880 or <link to="IMachine::launchVMProcess"/>. The console object can
5881 then be found in the session's <link to="ISession::console" /> attribute.
5882
5883 Methods of the IConsole interface allow the caller to query the current
5884 virtual machine execution state, pause the machine or power it down, save
5885 the machine state or take a snapshot, attach and detach removable media
5886 and so on.
5887
5888 <see>ISession</see>
5889 </desc>
5890
5891 <attribute name="machine" type="IMachine" readonly="yes">
5892 <desc>
5893 Machine object this console is sessioned with.
5894 <note>
5895 This is a convenience property, it has the same value as
5896 <link to="ISession::machine"/> of the corresponding session
5897 object.
5898 </note>
5899 </desc>
5900 </attribute>
5901
5902 <attribute name="state" type="MachineState" readonly="yes">
5903 <desc>
5904 Current execution state of the machine.
5905 <note>
5906 This property always returns the same value as the corresponding
5907 property of the IMachine object this console is sessioned with.
5908 For the process that owns (executes) the VM, this is the
5909 preferable way of querying the VM state, because no IPC
5910 calls are made.
5911 </note>
5912 </desc>
5913 </attribute>
5914
5915 <attribute name="guest" type="IGuest" readonly="yes">
5916 <desc>Guest object.</desc>
5917 </attribute>
5918
5919 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5920 <desc>
5921 Virtual keyboard object.
5922 <note>
5923 If the machine is not running, any attempt to use
5924 the returned object will result in an error.
5925 </note>
5926 </desc>
5927 </attribute>
5928
5929 <attribute name="mouse" type="IMouse" readonly="yes">
5930 <desc>
5931 Virtual mouse object.
5932 <note>
5933 If the machine is not running, any attempt to use
5934 the returned object will result in an error.
5935 </note>
5936 </desc>
5937 </attribute>
5938
5939 <attribute name="display" type="IDisplay" readonly="yes">
5940 <desc>Virtual display object.
5941 <note>
5942 If the machine is not running, any attempt to use
5943 the returned object will result in an error.
5944 </note>
5945 </desc>
5946 </attribute>
5947
5948 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5949 <desc>Debugging interface.</desc>
5950 </attribute>
5951
5952 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
5953 <desc>
5954 Collection of USB devices currently attached to the virtual
5955 USB controller.
5956 <note>
5957 The collection is empty if the machine is not running.
5958 </note>
5959 </desc>
5960 </attribute>
5961
5962 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
5963 <desc>
5964 List of USB devices currently attached to the remote VRDP client.
5965 Once a new device is physically attached to the remote host computer,
5966 it appears in this list and remains there until detached.
5967 </desc>
5968 </attribute>
5969
5970 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
5971 <desc>
5972 Collection of shared folders for the current session. These folders
5973 are called transient shared folders because they are available to the
5974 guest OS running inside the associated virtual machine only for the
5975 duration of the session (as opposed to
5976 <link to="IMachine::sharedFolders"/> which represent permanent shared
5977 folders). When the session is closed (e.g. the machine is powered down),
5978 these folders are automatically discarded.
5979
5980 New shared folders are added to the collection using
5981 <link to="#createSharedFolder"/>. Existing shared folders can be
5982 removed using <link to="#removeSharedFolder"/>.
5983 </desc>
5984 </attribute>
5985
5986 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5987 <desc>
5988 Interface that provides information on Remote Display (VRDP) connection.
5989 </desc>
5990 </attribute>
5991
5992 <attribute name="eventSource" type="IEventSource" readonly="yes">
5993 <desc>
5994 Event source for console events.
5995 </desc>
5996 </attribute>
5997
5998 <method name="powerUp">
5999 <desc>
6000 Starts the virtual machine execution using the current machine
6001 state (that is, its current execution state, current settings and
6002 current storage devices).
6003
6004 <note>
6005 This method is only useful for front-ends that want to actually
6006 execute virtual machines in their own process (like the VirtualBox
6007 or VBoxSDL front-ends). Unless you are intending to write such a
6008 front-end, do not call this method. If you simply want to
6009 start virtual machine execution using one of the existing front-ends
6010 (for example the VirtualBox GUI or headless server), use
6011 <link to="IMachine::launchVMProcess"/> instead; these
6012 front-ends will power up the machine automatically for you.
6013 </note>
6014
6015 If the machine is powered off or aborted, the execution will
6016 start from the beginning (as if the real hardware were just
6017 powered on).
6018
6019 If the machine is in the <link to="MachineState_Saved"/> state,
6020 it will continue its execution the point where the state has
6021 been saved.
6022
6023 If the machine <link to="IMachine::teleporterEnabled"/> property is
6024 enabled on the machine being powered up, the machine will wait for an
6025 incoming teleportation in the <link to="MachineState_TeleportingIn"/>
6026 state. The returned progress object will have at least three
6027 operations where the last three are defined as: (1) powering up and
6028 starting TCP server, (2) waiting for incoming teleportations, and
6029 (3) perform teleportation. These operations will be reflected as the
6030 last three operations of the progress objected returned by
6031 <link to="IMachine::launchVMProcess"/> as well.
6032
6033 <see>#saveState</see>
6034
6035 <result name="VBOX_E_INVALID_VM_STATE">
6036 Virtual machine already running.
6037 </result>
6038 <result name="VBOX_E_HOST_ERROR">
6039 Host interface does not exist or name not set.
6040 </result>
6041 <result name="VBOX_E_FILE_ERROR">
6042 Invalid saved state file.
6043 </result>
6044 </desc>
6045 <param name="progress" type="IProgress" dir="return">
6046 <desc>Progress object to track the operation completion.</desc>
6047 </param>
6048 </method>
6049
6050 <method name="powerUpPaused">
6051 <desc>
6052 Identical to powerUp except that the VM will enter the
6053 <link to="MachineState_Paused"/> state, instead of
6054 <link to="MachineState_Running"/>.
6055
6056 <see>#powerUp</see>
6057 <result name="VBOX_E_INVALID_VM_STATE">
6058 Virtual machine already running.
6059 </result>
6060 <result name="VBOX_E_HOST_ERROR">
6061 Host interface does not exist or name not set.
6062 </result>
6063 <result name="VBOX_E_FILE_ERROR">
6064 Invalid saved state file.
6065 </result>
6066 </desc>
6067 <param name="progress" type="IProgress" dir="return">
6068 <desc>Progress object to track the operation completion.</desc>
6069 </param>
6070 </method>
6071
6072 <method name="powerDown">
6073 <desc>
6074 Initiates the power down procedure to stop the virtual machine
6075 execution.
6076
6077 The completion of the power down procedure is tracked using the returned
6078 IProgress object. After the operation is complete, the machine will go
6079 to the PoweredOff state.
6080 <result name="VBOX_E_INVALID_VM_STATE">
6081 Virtual machine must be Running, Paused or Stuck to be powered down.
6082 </result>
6083 </desc>
6084 <param name="progress" type="IProgress" dir="return">
6085 <desc>Progress object to track the operation completion.</desc>
6086 </param>
6087 </method>
6088
6089 <method name="reset">
6090 <desc>Resets the virtual machine.
6091 <result name="VBOX_E_INVALID_VM_STATE">
6092 Virtual machine not in Running state.
6093 </result>
6094 <result name="VBOX_E_VM_ERROR">
6095 Virtual machine error in reset operation.
6096 </result>
6097 </desc>
6098 </method>
6099
6100 <method name="pause">
6101 <desc>Pauses the virtual machine execution.
6102 <result name="VBOX_E_INVALID_VM_STATE">
6103 Virtual machine not in Running state.
6104 </result>
6105 <result name="VBOX_E_VM_ERROR">
6106 Virtual machine error in suspend operation.
6107 </result>
6108 </desc>
6109 </method>
6110
6111 <method name="resume">
6112 <desc>Resumes the virtual machine execution.
6113 <result name="VBOX_E_INVALID_VM_STATE">
6114 Virtual machine not in Paused state.
6115 </result>
6116 <result name="VBOX_E_VM_ERROR">
6117 Virtual machine error in resume operation.
6118 </result>
6119 </desc>
6120 </method>
6121
6122 <method name="powerButton">
6123 <desc>Sends the ACPI power button event to the guest.
6124 <result name="VBOX_E_INVALID_VM_STATE">
6125 Virtual machine not in Running state.
6126 </result>
6127 <result name="VBOX_E_PDM_ERROR">
6128 Controlled power off failed.
6129 </result>
6130 </desc>
6131 </method>
6132
6133 <method name="sleepButton">
6134 <desc>Sends the ACPI sleep button event to the guest.
6135 <result name="VBOX_E_INVALID_VM_STATE">
6136 Virtual machine not in Running state.
6137 </result>
6138 <result name="VBOX_E_PDM_ERROR">
6139 Sending sleep button event failed.
6140 </result>
6141 </desc>
6142 </method>
6143
6144 <method name="getPowerButtonHandled">
6145 <desc>Checks if the last power button event was handled by guest.
6146 <result name="VBOX_E_PDM_ERROR">
6147 Checking if the event was handled by the guest OS failed.
6148 </result>
6149 </desc>
6150 <param name="handled" type="boolean" dir="return"/>
6151 </method>
6152
6153 <method name="getGuestEnteredACPIMode">
6154 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6155 G1 (sleeping). If this method returns @c false, the guest will
6156 most likely not respond to external ACPI events.
6157 <result name="VBOX_E_INVALID_VM_STATE">
6158 Virtual machine not in Running state.
6159 </result>
6160 </desc>
6161 <param name="entered" type="boolean" dir="return"/>
6162 </method>
6163
6164 <method name="saveState">
6165 <desc>
6166 Saves the current execution state of a running virtual machine
6167 and stops its execution.
6168
6169 After this operation completes, the machine will go to the
6170 Saved state. Next time it is powered up, this state will
6171 be restored and the machine will continue its execution from
6172 the place where it was saved.
6173
6174 This operation differs from taking a snapshot to the effect
6175 that it doesn't create new differencing media. Also, once
6176 the machine is powered up from the state saved using this method,
6177 the saved state is deleted, so it will be impossible to return
6178 to this state later.
6179
6180 <note>
6181 On success, this method implicitly calls
6182 <link to="IMachine::saveSettings"/> to save all current machine
6183 settings (including runtime changes to the DVD medium, etc.).
6184 Together with the impossibility to change any VM settings when it is
6185 in the Saved state, this guarantees adequate hardware
6186 configuration of the machine when it is restored from the saved
6187 state file.
6188 </note>
6189
6190 <note>
6191 The machine must be in the Running or Paused state, otherwise
6192 the operation will fail.
6193 </note>
6194 <result name="VBOX_E_INVALID_VM_STATE">
6195 Virtual machine state neither Running nor Paused.
6196 </result>
6197 <result name="VBOX_E_FILE_ERROR">
6198 Failed to create directory for saved state file.
6199 </result>
6200
6201 <see><link to="#takeSnapshot"/></see>
6202 </desc>
6203 <param name="progress" type="IProgress" dir="return">
6204 <desc>Progress object to track the operation completion.</desc>
6205 </param>
6206 </method>
6207
6208 <method name="adoptSavedState">
6209 <desc>
6210 Associates the given saved state file to the virtual machine.
6211
6212 On success, the machine will go to the Saved state. Next time it is
6213 powered up, it will be restored from the adopted saved state and
6214 continue execution from the place where the saved state file was
6215 created.
6216
6217 The specified saved state file path may be absolute or relative to the
6218 folder the VM normally saves the state to (usually,
6219 <link to="IMachine::snapshotFolder"/>).
6220
6221 <note>
6222 It's a caller's responsibility to make sure the given saved state
6223 file is compatible with the settings of this virtual machine that
6224 represent its virtual hardware (memory size, storage disk configuration
6225 etc.). If there is a mismatch, the behavior of the virtual machine
6226 is undefined.
6227 </note>
6228 <result name="VBOX_E_INVALID_VM_STATE">
6229 Virtual machine state neither PoweredOff nor Aborted.
6230 </result>
6231 </desc>
6232 <param name="savedStateFile" type="wstring" dir="in">
6233 <desc>Path to the saved state file to adopt.</desc>
6234 </param>
6235 </method>
6236
6237 <method name="discardSavedState">
6238 <desc>
6239 Forcibly resets the machine to "Powered Off" state if it is
6240 currently in the "Saved" state (previously created by <link to="#saveState"/>).
6241 Next time the machine is powered up, a clean boot will occur.
6242 <note>
6243 This operation is equivalent to resetting or powering off
6244 the machine without doing a proper shutdown of the guest
6245 operating system; as with resetting a running phyiscal
6246 computer, it can can lead to data loss.
6247 </note>
6248 If @a fRemoveFile is @c true, the file in the machine directory
6249 into which the machine state was saved is also deleted. If
6250 this is @c false, then the state can be recovered and later
6251 re-inserted into a machine using <link to="#adoptSavedState" />.
6252 The location of the file can be found in the
6253 <link to="IMachine::stateFilePath" /> attribute.
6254 <result name="VBOX_E_INVALID_VM_STATE">
6255 Virtual machine not in state Saved.
6256 </result>
6257 </desc>
6258 <param name="fRemoveFile" type="boolean" dir="in" >
6259 <desc>Whether to also remove the saved state file.</desc>
6260 </param>
6261 </method>
6262
6263 <method name="getDeviceActivity">
6264 <desc>
6265 Gets the current activity type of a given device or device group.
6266 <result name="E_INVALIDARG">
6267 Invalid device type.
6268 </result>
6269 </desc>
6270 <param name="type" type="DeviceType" dir="in"/>
6271 <param name="activity" type="DeviceActivity" dir="return"/>
6272 </method>
6273
6274 <method name="attachUSBDevice">
6275 <desc>
6276 Attaches a host USB device with the given UUID to the
6277 USB controller of the virtual machine.
6278
6279 The device needs to be in one of the following states:
6280 <link to="USBDeviceState_Busy"/>,
6281 <link to="USBDeviceState_Available"/> or
6282 <link to="USBDeviceState_Held"/>,
6283 otherwise an error is immediately returned.
6284
6285 When the device state is
6286 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6287 be returned if the host computer refuses to release it for some reason.
6288
6289 <see>IUSBController::deviceFilters, USBDeviceState</see>
6290 <result name="VBOX_E_INVALID_VM_STATE">
6291 Virtual machine state neither Running nor Paused.
6292 </result>
6293 <result name="VBOX_E_PDM_ERROR">
6294 Virtual machine does not have a USB controller.
6295 </result>
6296 </desc>
6297 <param name="id" type="uuid" mod="string" dir="in">
6298 <desc>UUID of the host USB device to attach.</desc>
6299 </param>
6300 </method>
6301
6302 <method name="detachUSBDevice">
6303 <desc>
6304 Detaches an USB device with the given UUID from the USB controller
6305 of the virtual machine.
6306
6307 After this method succeeds, the VirtualBox server re-initiates
6308 all USB filters as if the device were just physically attached
6309 to the host, but filters of this machine are ignored to avoid
6310 a possible automatic re-attachment.
6311
6312 <see>IUSBController::deviceFilters, USBDeviceState</see>
6313
6314 <result name="VBOX_E_PDM_ERROR">
6315 Virtual machine does not have a USB controller.
6316 </result>
6317 <result name="E_INVALIDARG">
6318 USB device not attached to this virtual machine.
6319 </result>
6320 </desc>
6321 <param name="id" type="uuid" mod="string" dir="in">
6322 <desc>UUID of the USB device to detach.</desc>
6323 </param>
6324 <param name="device" type="IUSBDevice" dir="return">
6325 <desc>Detached USB device.</desc>
6326 </param>
6327 </method>
6328
6329 <method name="findUSBDeviceByAddress">
6330 <desc>
6331 Searches for a USB device with the given host address.
6332
6333 <result name="VBOX_E_OBJECT_NOT_FOUND">
6334 Given @c name does not correspond to any USB device.
6335 </result>
6336
6337 <see>IUSBDevice::address</see>
6338 </desc>
6339 <param name="name" type="wstring" dir="in">
6340 <desc>
6341 Address of the USB device (as assigned by the host) to
6342 search for.
6343 </desc>
6344 </param>
6345 <param name="device" type="IUSBDevice" dir="return">
6346 <desc>Found USB device object.</desc>
6347 </param>
6348 </method>
6349
6350 <method name="findUSBDeviceById">
6351 <desc>
6352 Searches for a USB device with the given UUID.
6353
6354 <result name="VBOX_E_OBJECT_NOT_FOUND">
6355 Given @c id does not correspond to any USB device.
6356 </result>
6357
6358 <see>IUSBDevice::id</see>
6359 </desc>
6360 <param name="id" type="uuid" mod="string" dir="in">
6361 <desc>UUID of the USB device to search for.</desc>
6362 </param>
6363 <param name="device" type="IUSBDevice" dir="return">
6364 <desc>Found USB device object.</desc>
6365 </param>
6366 </method>
6367
6368 <method name="createSharedFolder">
6369 <desc>
6370 Creates a transient new shared folder by associating the given logical
6371 name with the given host path, adds it to the collection of shared
6372 folders and starts sharing it. Refer to the description of
6373 <link to="ISharedFolder"/> to read more about logical names.
6374
6375 <result name="VBOX_E_INVALID_VM_STATE">
6376 Virtual machine in Saved state or currently changing state.
6377 </result>
6378 <result name="VBOX_E_FILE_ERROR">
6379 Shared folder already exists or not accessible.
6380 </result>
6381 </desc>
6382 <param name="name" type="wstring" dir="in">
6383 <desc>Unique logical name of the shared folder.</desc>
6384 </param>
6385 <param name="hostPath" type="wstring" dir="in">
6386 <desc>Full path to the shared folder in the host file system.</desc>
6387 </param>
6388 <param name="writable" type="boolean" dir="in">
6389 <desc>Whether the share is writable or readonly</desc>
6390 </param>
6391 <param name="automount" type="boolean" dir="in">
6392 <desc>Whether the share gets automatically mounted by the guest
6393 or not.</desc>
6394 </param>
6395 </method>
6396
6397 <method name="removeSharedFolder">
6398 <desc>
6399 Removes a transient shared folder with the given name previously
6400 created by <link to="#createSharedFolder"/> from the collection of
6401 shared folders and stops sharing it.
6402 <result name="VBOX_E_INVALID_VM_STATE">
6403 Virtual machine in Saved state or currently changing state.
6404 </result>
6405 <result name="VBOX_E_FILE_ERROR">
6406 Shared folder does not exists.
6407 </result>
6408 </desc>
6409 <param name="name" type="wstring" dir="in">
6410 <desc>Logical name of the shared folder to remove.</desc>
6411 </param>
6412 </method>
6413
6414 <method name="takeSnapshot">
6415 <desc>
6416 Saves the current execution state
6417 and all settings of the machine and creates differencing images
6418 for all normal (non-independent) media.
6419 See <link to="ISnapshot" /> for an introduction to snapshots.
6420
6421 This method can be called for a PoweredOff, Saved (see
6422 <link to="#saveState"/>), Running or
6423 Paused virtual machine. When the machine is PoweredOff, an
6424 offline snapshot is created. When the machine is Running a live
6425 snapshot is created, and an online snapshot is is created when Paused.
6426
6427 The taken snapshot is always based on the
6428 <link to="IMachine::currentSnapshot">current snapshot</link>
6429 of the associated virtual machine and becomes a new current snapshot.
6430
6431 <note>
6432 This method implicitly calls <link to="IMachine::saveSettings"/> to
6433 save all current machine settings before taking an offline snapshot.
6434 </note>
6435
6436 <result name="VBOX_E_INVALID_VM_STATE">
6437 Virtual machine currently changing state.
6438 </result>
6439 </desc>
6440 <param name="name" type="wstring" dir="in">
6441 <desc>Short name for the snapshot.</desc>
6442 </param>
6443 <param name="description" type="wstring" dir="in">
6444 <desc>Optional description of the snapshot.</desc>
6445 </param>
6446 <param name="progress" type="IProgress" dir="return">
6447 <desc>Progress object to track the operation completion.</desc>
6448 </param>
6449 </method>
6450
6451 <method name="deleteSnapshot">
6452 <desc>
6453 Starts deleting the specified snapshot asynchronously.
6454 See <link to="ISnapshot" /> for an introduction to snapshots.
6455
6456 The execution state and settings of the associated machine stored in
6457 the snapshot will be deleted. The contents of all differencing media of
6458 this snapshot will be merged with the contents of their dependent child
6459 media to keep the medium chain valid (in other words, all changes
6460 represented by media being deleted will be propagated to their child
6461 medium). After that, this snapshot's differencing medium will be
6462 deleted. The parent of this snapshot will become a new parent for all
6463 its child snapshots.
6464
6465 If the deleted snapshot is the current one, its parent snapshot will
6466 become a new current snapshot. The current machine state is not directly
6467 affected in this case, except that currently attached differencing
6468 media based on media of the deleted snapshot will be also merged as
6469 described above.
6470
6471 If the deleted snapshot is the first or current snapshot, then the
6472 respective IMachine attributes will be adjusted. Deleting the current
6473 snapshot will also implicitly call <link to="IMachine::saveSettings"/>
6474 to make all current machine settings permanent.
6475
6476 Deleting a snapshot has the following preconditions:
6477
6478 <ul>
6479 <li>Child media of all normal media of the deleted snapshot
6480 must be accessible (see <link to="IMedium::state"/>) for this
6481 operation to succeed. In particular, this means that all virtual
6482 machines, whose media are directly or indirectly based on the
6483 media of deleted snapshot, must be powered off.</li>
6484
6485 <li>You cannot delete the snapshot if a medium attached to it has
6486 more than once child medium (differencing images) because otherwise
6487 merging would be impossible. This might be the case if there is
6488 more than one child snapshot or differencing images were created
6489 for other reason (e.g. implicitly because of multiple machine
6490 attachments).</li>
6491 </ul>
6492
6493
6494 The virtual machine's <link to="IMachine::state">state</link> is
6495 changed to "DeletingSnapshot", "DeletingSnapshotOnline" or
6496 "DeletingSnapshotPaused" while this operation is in progress.
6497
6498 <note>
6499 Merging medium contents can be very time and disk space
6500 consuming, if these media are big in size and have many
6501 children. However, if the snapshot being deleted is the last
6502 (head) snapshot on the branch, the operation will be rather
6503 quick.
6504 </note>
6505 <result name="VBOX_E_INVALID_VM_STATE">
6506 The running virtual machine prevents deleting this snapshot. This
6507 happens only in very specific situations, usually snapshots can be
6508 deleted without trouble while a VM is running. The error message
6509 text explains the reason for the failure.
6510 </result>
6511 </desc>
6512 <param name="id" type="uuid" mod="string" dir="in">
6513 <desc>UUID of the snapshot to delete.</desc>
6514 </param>
6515 <param name="progress" type="IProgress" dir="return">
6516 <desc>Progress object to track the operation completion.</desc>
6517 </param>
6518 </method>
6519
6520 <method name="restoreSnapshot">
6521 <desc>
6522 Starts resetting the machine's current state to the state contained
6523 in the given snapshot, asynchronously. All current settings of the
6524 machine will be reset and changes stored in differencing media
6525 will be lost.
6526 See <link to="ISnapshot" /> for an introduction to snapshots.
6527
6528 After this operation is successfully completed, new empty differencing
6529 media are created for all normal media of the machine.
6530
6531 If the given snapshot is an online snapshot, the machine will go to
6532 the <link to="MachineState_Saved"> saved state</link>, so that the
6533 next time it is powered on, the execution state will be restored
6534 from the state of the snapshot.
6535
6536 <note>
6537 The machine must not be running, otherwise the operation will fail.
6538 </note>
6539
6540 <note>
6541 If the machine state is <link to="MachineState_Saved">Saved</link>
6542 prior to this operation, the saved state file will be implicitly
6543 deleted (as if <link to="IConsole::discardSavedState"/> were
6544 called).
6545 </note>
6546
6547 <result name="VBOX_E_INVALID_VM_STATE">
6548 Virtual machine is running.
6549 </result>
6550 </desc>
6551 <param name="snapshot" type="ISnapshot" dir="in">
6552 <desc>The snapshot to restore the VM state from.</desc>
6553 </param>
6554 <param name="progress" type="IProgress" dir="return">
6555 <desc>Progress object to track the operation completion.</desc>
6556 </param>
6557 </method>
6558
6559 <method name="teleport">
6560 <desc>
6561 Teleport the VM to a different host machine or process.
6562
6563 TODO explain the details.
6564
6565 <result name="VBOX_E_INVALID_VM_STATE">
6566 Virtual machine not running or paused.
6567 </result>
6568 </desc>
6569 <param name="hostname" type="wstring" dir="in">
6570 <desc>The name or IP of the host to teleport to.</desc>
6571 </param>
6572 <param name="tcpport" type="unsigned long" dir="in">
6573 <desc>The TCP port to connect to (1..65535).</desc>
6574 </param>
6575 <param name="password" type="wstring" dir="in">
6576 <desc>The password.</desc>
6577 </param>
6578 <param name="maxDowntime" type="unsigned long" dir="in">
6579 <desc>
6580 The maximum allowed downtime given as milliseconds. 0 is not a valid
6581 value. Recommended value: 250 ms.
6582
6583 The higher the value is, the greater the chance for a successful
6584 teleportation. A small value may easily result in the teleportation
6585 process taking hours and eventually fail.
6586
6587 <note>
6588 The current implementation treats this a guideline, not as an
6589 absolute rule.
6590 </note>
6591 </desc>
6592 </param>
6593 <param name="progress" type="IProgress" dir="return">
6594 <desc>Progress object to track the operation completion.</desc>
6595 </param>
6596 </method>
6597
6598 </interface>
6599
6600 <!--
6601 // IHost
6602 /////////////////////////////////////////////////////////////////////////
6603 -->
6604
6605 <enum
6606 name="HostNetworkInterfaceMediumType"
6607 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6608 >
6609 <desc>
6610 Type of encapsulation. Ethernet encapsulation includes both wired and
6611 wireless Ethernet connections.
6612 <see>IHostNetworkInterface</see>
6613 </desc>
6614
6615 <const name="Unknown" value="0">
6616 <desc>
6617 The type of interface cannot be determined.
6618 </desc>
6619 </const>
6620 <const name="Ethernet" value="1">
6621 <desc>
6622 Ethernet frame encapsulation.
6623 </desc>
6624 </const>
6625 <const name="PPP" value="2">
6626 <desc>
6627 Point-to-point protocol encapsulation.
6628 </desc>
6629 </const>
6630 <const name="SLIP" value="3">
6631 <desc>
6632 Serial line IP encapsulation.
6633 </desc>
6634 </const>
6635 </enum>
6636
6637 <enum
6638 name="HostNetworkInterfaceStatus"
6639 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6640 >
6641 <desc>
6642 Current status of the interface.
6643 <see>IHostNetworkInterface</see>
6644 </desc>
6645
6646 <const name="Unknown" value="0">
6647 <desc>
6648 The state of interface cannot be determined.
6649 </desc>
6650 </const>
6651 <const name="Up" value="1">
6652 <desc>
6653 The interface is fully operational.
6654 </desc>
6655 </const>
6656 <const name="Down" value="2">
6657 <desc>
6658 The interface is not functioning.
6659 </desc>
6660 </const>
6661 </enum>
6662
6663 <enum
6664 name="HostNetworkInterfaceType"
6665 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6666 >
6667 <desc>
6668 Network interface type.
6669 </desc>
6670 <const name="Bridged" value="1"/>
6671 <const name="HostOnly" value="2"/>
6672 </enum>
6673
6674 <interface
6675 name="IHostNetworkInterface" extends="$unknown"
6676 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6677 wsmap="managed"
6678 >
6679 <desc>
6680 Represents one of host's network interfaces. IP V6 address and network
6681 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6682 separated by colons.
6683 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6684 </desc>
6685 <attribute name="name" type="wstring" readonly="yes">
6686 <desc>Returns the host network interface name.</desc>
6687 </attribute>
6688
6689 <attribute name="id" type="uuid" mod="string" readonly="yes">
6690 <desc>Returns the interface UUID.</desc>
6691 </attribute>
6692
6693 <attribute name="networkName" type="wstring" readonly="yes">
6694 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6695 </attribute>
6696
6697 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6698 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6699 </attribute>
6700
6701 <attribute name="IPAddress" type="wstring" readonly="yes">
6702 <desc>Returns the IP V4 address of the interface.</desc>
6703 </attribute>
6704
6705 <attribute name="networkMask" type="wstring" readonly="yes">
6706 <desc>Returns the network mask of the interface.</desc>
6707 </attribute>
6708
6709 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6710 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6711 </attribute>
6712
6713 <attribute name="IPV6Address" type="wstring" readonly="yes">
6714 <desc>Returns the IP V6 address of the interface.</desc>
6715 </attribute>
6716
6717 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6718 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6719 </attribute>
6720
6721 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6722 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6723 </attribute>
6724
6725 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6726 <desc>Type of protocol encapsulation used.</desc>
6727 </attribute>
6728
6729 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6730 <desc>Status of the interface.</desc>
6731 </attribute>
6732
6733 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6734 <desc>specifies the host interface type.</desc>
6735 </attribute>
6736
6737 <method name="enableStaticIpConfig">
6738 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6739 <param name="IPAddress" type="wstring" dir="in">
6740 <desc>
6741 IP address.
6742 </desc>
6743 </param>
6744 <param name="networkMask" type="wstring" dir="in">
6745 <desc>
6746 network mask.
6747 </desc>
6748 </param>
6749 </method>
6750
6751 <method name="enableStaticIpConfigV6">
6752 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6753 <param name="IPV6Address" type="wstring" dir="in">
6754 <desc>
6755 IP address.
6756 </desc>
6757 </param>
6758 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6759 <desc>
6760 network mask.
6761 </desc>
6762 </param>
6763 </method>
6764
6765 <method name="enableDynamicIpConfig">
6766 <desc>enables the dynamic IP configuration.</desc>
6767 </method>
6768
6769 <method name="dhcpRediscover">
6770 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6771 </method>
6772
6773 </interface>
6774
6775 <interface
6776 name="IHost" extends="$unknown"
6777 uuid="35b004f4-7806-4009-bfa8-d1308adba7e5"
6778 wsmap="managed"
6779 >
6780 <desc>
6781 The IHost interface represents the physical machine that this VirtualBox
6782 installation runs on.
6783
6784 An object implementing this interface is returned by the
6785 <link to="IVirtualBox::host" /> attribute. This interface contains
6786 read-only information about the host's physical hardware (such as what
6787 processors and disks are available, what the host operating system is,
6788 and so on) and also allows for manipulating some of the host's hardware,
6789 such as global USB device filters and host interface networking.
6790
6791 </desc>
6792 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
6793 <desc>List of DVD drives available on the host.</desc>
6794 </attribute>
6795
6796 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
6797 <desc>List of floppy drives available on the host.</desc>
6798 </attribute>
6799
6800 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6801 <desc>
6802 List of USB devices currently attached to the host.
6803 Once a new device is physically attached to the host computer,
6804 it appears in this list and remains there until detached.
6805
6806 <note>
6807 If USB functionality is not available in the given edition of
6808 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6809 </note>
6810 </desc>
6811 </attribute>
6812
6813 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
6814 <desc>
6815 List of USB device filters in action.
6816 When a new device is physically attached to the host computer,
6817 filters from this list are applied to it (in order they are stored
6818 in the list). The first matched filter will determine the
6819 <link to="IHostUSBDeviceFilter::action">action</link>
6820 performed on the device.
6821
6822 Unless the device is ignored by these filters, filters of all
6823 currently running virtual machines
6824 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6825
6826 <note>
6827 If USB functionality is not available in the given edition of
6828 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6829 </note>
6830
6831 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6832 </desc>
6833 </attribute>
6834
6835 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6836 <desc>List of host network interfaces currently defined on the host.</desc>
6837 </attribute>
6838
6839 <attribute name="processorCount" type="unsigned long" readonly="yes">
6840 <desc>Number of (logical) CPUs installed in the host system.</desc>
6841 </attribute>
6842
6843 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6844 <desc>Number of (logical) CPUs online in the host system.</desc>
6845 </attribute>
6846
6847 <attribute name="processorCoreCount" type="unsigned long" readonly="yes">
6848 <desc>Number of physical processor cores installed in the host system.</desc>
6849 </attribute>
6850
6851 <method name="getProcessorSpeed">
6852 <desc>Query the (approximate) maximum speed of a specified host CPU in
6853 Megahertz.
6854 </desc>
6855 <param name="cpuId" type="unsigned long" dir="in">
6856 <desc>
6857 Identifier of the CPU.
6858 </desc>
6859 </param>
6860 <param name="speed" type="unsigned long" dir="return">
6861 <desc>
6862 Speed value. 0 is returned if value is not known or @a cpuId is
6863 invalid.
6864 </desc>
6865 </param>
6866 </method>
6867
6868 <method name="getProcessorFeature">
6869 <desc>Query whether a CPU feature is supported or not.</desc>
6870 <param name="feature" type="ProcessorFeature" dir="in">
6871 <desc>
6872 CPU Feature identifier.
6873 </desc>
6874 </param>
6875 <param name="supported" type="boolean" dir="return">
6876 <desc>
6877 Feature is supported or not.
6878 </desc>
6879 </param>
6880 </method>
6881
6882 <method name="getProcessorDescription">
6883 <desc>Query the model string of a specified host CPU.
6884 </desc>
6885 <param name="cpuId" type="unsigned long" dir="in">
6886 <desc>
6887 Identifier of the CPU.
6888 <note>
6889 The current implementation might not necessarily return the
6890 description for this exact CPU.
6891 </note>
6892 </desc>
6893 </param>
6894 <param name="description" type="wstring" dir="return">
6895 <desc>
6896 Model string. An empty string is returned if value is not known or
6897 @a cpuId is invalid.
6898 </desc>
6899 </param>
6900 </method>
6901
6902 <method name="getProcessorCPUIDLeaf">
6903 <desc>
6904 Returns the CPU cpuid information for the specified leaf.
6905 </desc>
6906 <param name="cpuId" type="unsigned long" dir="in">
6907 <desc>
6908 Identifier of the CPU. The CPU most be online.
6909 <note>
6910 The current implementation might not necessarily return the
6911 description for this exact CPU.
6912 </note>
6913 </desc>
6914 </param>
6915 <param name="leaf" type="unsigned long" dir="in">
6916 <desc>
6917 CPUID leaf index (eax).
6918 </desc>
6919 </param>
6920 <param name="subLeaf" type="unsigned long" dir="in">
6921 <desc>
6922 CPUID leaf sub index (ecx). This currently only applies to cache
6923 information on Intel CPUs. Use 0 if retriving values for
6924 <link to="IMachine::setCPUIDLeaf"/>.
6925 </desc>
6926 </param>
6927 <param name="valEax" type="unsigned long" dir="out">
6928 <desc>
6929 CPUID leaf value for register eax.
6930 </desc>
6931 </param>
6932 <param name="valEbx" type="unsigned long" dir="out">
6933 <desc>
6934 CPUID leaf value for register ebx.
6935 </desc>
6936 </param>
6937 <param name="valEcx" type="unsigned long" dir="out">
6938 <desc>
6939 CPUID leaf value for register ecx.
6940 </desc>
6941 </param>
6942 <param name="valEdx" type="unsigned long" dir="out">
6943 <desc>
6944 CPUID leaf value for register edx.
6945 </desc>
6946 </param>
6947 </method>
6948
6949 <attribute name="memorySize" type="unsigned long" readonly="yes">
6950 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6951 </attribute>
6952
6953 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6954 <desc>Available system memory in the host system.</desc>
6955 </attribute>
6956
6957 <attribute name="operatingSystem" type="wstring" readonly="yes">
6958 <desc>Name of the host system's operating system.</desc>
6959 </attribute>
6960
6961 <attribute name="OSVersion" type="wstring" readonly="yes">
6962 <desc>Host operating system's version string.</desc>
6963 </attribute>
6964
6965 <attribute name="UTCTime" type="long long" readonly="yes">
6966 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6967 </attribute>
6968
6969 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
6970 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
6971 </attribute>
6972
6973 <method name="createHostOnlyNetworkInterface">
6974 <desc>
6975 Creates a new adapter for Host Only Networking.
6976 <result name="E_INVALIDARG">
6977 Host network interface @a name already exists.
6978 </result>
6979 </desc>
6980 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6981 <desc>
6982 Created host interface object.
6983 </desc>
6984 </param>
6985 <param name="progress" type="IProgress" dir="return">
6986 <desc>
6987 Progress object to track the operation completion.
6988 </desc>
6989 </param>
6990 </method>
6991
6992 <method name="removeHostOnlyNetworkInterface">
6993 <desc>
6994 Removes the given Host Only Networking interface.
6995 <result name="VBOX_E_OBJECT_NOT_FOUND">
6996 No host network interface matching @a id found.
6997 </result>
6998 </desc>
6999 <param name="id" type="uuid" mod="string" dir="in">
7000 <desc>
7001 Adapter GUID.
7002 </desc>
7003 </param>
7004 <param name="progress" type="IProgress" dir="return">
7005 <desc>
7006 Progress object to track the operation completion.
7007 </desc>
7008 </param>
7009 </method>
7010
7011 <method name="createUSBDeviceFilter">
7012 <desc>
7013 Creates a new USB device filter. All attributes except
7014 the filter name are set to empty (any match),
7015 <i>active</i> is @c false (the filter is not active).
7016
7017 The created filter can be added to the list of filters using
7018 <link to="#insertUSBDeviceFilter"/>.
7019
7020 <see>#USBDeviceFilters</see>
7021 </desc>
7022 <param name="name" type="wstring" dir="in">
7023 <desc>
7024 Filter name. See <link to="IUSBDeviceFilter::name"/> for more information.
7025 </desc>
7026 </param>
7027 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7028 <desc>Created filter object.</desc>
7029 </param>
7030 </method>
7031
7032 <method name="insertUSBDeviceFilter">
7033 <desc>
7034 Inserts the given USB device to the specified position
7035 in the list of filters.
7036
7037 Positions are numbered starting from @c 0. If the specified
7038 position is equal to or greater than the number of elements in
7039 the list, the filter is added at the end of the collection.
7040
7041 <note>
7042 Duplicates are not allowed, so an attempt to insert a
7043 filter already in the list is an error.
7044 </note>
7045 <note>
7046 If USB functionality is not available in the given edition of
7047 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7048 </note>
7049
7050 <see>#USBDeviceFilters</see>
7051
7052 <result name="VBOX_E_INVALID_OBJECT_STATE">
7053 USB device filter is not created within this VirtualBox instance.
7054 </result>
7055 <result name="E_INVALIDARG">
7056 USB device filter already in list.
7057 </result>
7058
7059 </desc>
7060 <param name="position" type="unsigned long" dir="in">
7061 <desc>Position to insert the filter to.</desc>
7062 </param>
7063 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7064 <desc>USB device filter to insert.</desc>
7065 </param>
7066 </method>
7067
7068 <method name="removeUSBDeviceFilter">
7069 <desc>
7070 Removes a USB device filter from the specified position in the
7071 list of filters.
7072
7073 Positions are numbered starting from @c 0. Specifying a
7074 position equal to or greater than the number of elements in
7075 the list will produce an error.
7076
7077 <note>
7078 If USB functionality is not available in the given edition of
7079 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7080 </note>
7081
7082 <see>#USBDeviceFilters</see>
7083
7084 <result name="E_INVALIDARG">
7085 USB device filter list empty or invalid @a position.
7086 </result>
7087
7088 </desc>
7089 <param name="position" type="unsigned long" dir="in">
7090 <desc>Position to remove the filter from.</desc>
7091 </param>
7092 </method>
7093
7094 <method name="findHostDVDDrive">
7095 <desc>
7096 Searches for a host DVD drive with the given @c name.
7097
7098 <result name="VBOX_E_OBJECT_NOT_FOUND">
7099 Given @c name does not correspond to any host drive.
7100 </result>
7101
7102 </desc>
7103 <param name="name" type="wstring" dir="in">
7104 <desc>Name of the host drive to search for</desc>
7105 </param>
7106 <param name="drive" type="IMedium" dir="return">
7107 <desc>Found host drive object</desc>
7108 </param>
7109 </method>
7110
7111 <method name="findHostFloppyDrive">
7112 <desc>
7113 Searches for a host floppy drive with the given @c name.
7114
7115 <result name="VBOX_E_OBJECT_NOT_FOUND">
7116 Given @c name does not correspond to any host floppy drive.
7117 </result>
7118
7119 </desc>
7120 <param name="name" type="wstring" dir="in">
7121 <desc>Name of the host floppy drive to search for</desc>
7122 </param>
7123 <param name="drive" type="IMedium" dir="return">
7124 <desc>Found host floppy drive object</desc>
7125 </param>
7126 </method>
7127
7128 <method name="findHostNetworkInterfaceByName">
7129 <desc>
7130 Searches through all host network interfaces for an interface with
7131 the given @c name.
7132 <note>
7133 The method returns an error if the given @c name does not
7134 correspond to any host network interface.
7135 </note>
7136 </desc>
7137 <param name="name" type="wstring" dir="in">
7138 <desc>Name of the host network interface to search for.</desc>
7139 </param>
7140 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7141 <desc>Found host network interface object.</desc>
7142 </param>
7143 </method>
7144 <method name="findHostNetworkInterfaceById">
7145 <desc>
7146 Searches through all host network interfaces for an interface with
7147 the given GUID.
7148 <note>
7149 The method returns an error if the given GUID does not
7150 correspond to any host network interface.
7151 </note>
7152 </desc>
7153 <param name="id" type="uuid" mod="string" dir="in">
7154 <desc>GUID of the host network interface to search for.</desc>
7155 </param>
7156 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7157 <desc>Found host network interface object.</desc>
7158 </param>
7159 </method>
7160 <method name="findHostNetworkInterfacesOfType">
7161 <desc>
7162 Searches through all host network interfaces and returns a list of interfaces of the specified type
7163 </desc>
7164 <param name="type" type="HostNetworkInterfaceType" dir="in">
7165 <desc>type of the host network interfaces to search for.</desc>
7166 </param>
7167 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7168 <desc>Found host network interface objects.</desc>
7169 </param>
7170 </method>
7171
7172 <method name="findUSBDeviceById">
7173 <desc>
7174 Searches for a USB device with the given UUID.
7175
7176 <result name="VBOX_E_OBJECT_NOT_FOUND">
7177 Given @c id does not correspond to any USB device.
7178 </result>
7179
7180 <see>IHostUSBDevice::id</see>
7181 </desc>
7182 <param name="id" type="uuid" mod="string" dir="in">
7183 <desc>UUID of the USB device to search for.</desc>
7184 </param>
7185 <param name="device" type="IHostUSBDevice" dir="return">
7186 <desc>Found USB device object.</desc>
7187 </param>
7188 </method>
7189
7190 <method name="findUSBDeviceByAddress">
7191 <desc>
7192 Searches for a USB device with the given host address.
7193
7194 <result name="VBOX_E_OBJECT_NOT_FOUND">
7195 Given @c name does not correspond to any USB device.
7196 </result>
7197
7198 <see>IHostUSBDevice::address</see>
7199 </desc>
7200 <param name="name" type="wstring" dir="in">
7201 <desc>
7202 Address of the USB device (as assigned by the host) to
7203 search for.
7204 </desc>
7205 </param>
7206 <param name="device" type="IHostUSBDevice" dir="return">
7207 <desc>Found USB device object.</desc>
7208 </param>
7209 </method>
7210
7211 </interface>
7212
7213 <!--
7214 // ISystemProperties
7215 /////////////////////////////////////////////////////////////////////////
7216 -->
7217
7218 <interface
7219 name="ISystemProperties"
7220 extends="$unknown"
7221 uuid="f8fff1f1-eeb4-4483-a2a4-b4186fab5a1e"
7222 wsmap="managed"
7223 >
7224 <desc>
7225 The ISystemProperties interface represents global properties of the given
7226 VirtualBox installation.
7227
7228 These properties define limits and default values for various attributes
7229 and parameters. Most of the properties are read-only, but some can be
7230 changed by a user.
7231 </desc>
7232
7233 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7234 <desc>Minimum guest system memory in Megabytes.</desc>
7235 </attribute>
7236
7237 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7238 <desc>Maximum guest system memory in Megabytes.</desc>
7239 </attribute>
7240
7241 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7242 <desc>Minimum guest video memory in Megabytes.</desc>
7243 </attribute>
7244
7245 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7246 <desc>Maximum guest video memory in Megabytes.</desc>
7247 </attribute>
7248
7249 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7250 <desc>Minimum CPU count.</desc>
7251 </attribute>
7252
7253 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7254 <desc>Maximum CPU count.</desc>
7255 </attribute>
7256
7257 <attribute name="maxGuestMonitors" type="unsigned long" readonly="yes">
7258 <desc>Maximum of monitors which could be connected.</desc>
7259 </attribute>
7260
7261 <attribute name="infoVDSize" type="long long" readonly="yes">
7262 <desc>Maximum size of a virtual disk image in bytes. Informational value,
7263 does not reflect the limits of any virtual disk image format.</desc>
7264 </attribute>
7265
7266 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7267 <desc>
7268 Number of network adapters associated with every
7269 <link to="IMachine"/> instance.
7270 </desc>
7271 </attribute>
7272
7273 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7274 <desc>
7275 Number of serial ports associated with every
7276 <link to="IMachine"/> instance.
7277 </desc>
7278 </attribute>
7279
7280 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7281 <desc>
7282 Number of parallel ports associated with every
7283 <link to="IMachine"/> instance.
7284 </desc>
7285 </attribute>
7286
7287 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7288 <desc>
7289 Maximum device position in the boot order. This value corresponds
7290 to the total number of devices a machine can boot from, to make it
7291 possible to include all possible devices to the boot list.
7292 <see><link to="IMachine::setBootOrder"/></see>
7293 </desc>
7294 </attribute>
7295
7296 <attribute name="defaultMachineFolder" type="wstring">
7297 <desc>
7298 Full path to the default directory used to create new or open
7299 existing machines when a settings file name contains no
7300 path.
7301
7302 The initial value of this property is
7303 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7304 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7305
7306 <note>
7307 Setting this property to @c null or an empty string will restore the
7308 initial value.
7309 </note>
7310 <note>
7311 When settings this property, the specified path can be
7312 absolute (full path) or relative
7313 to the <link to="IVirtualBox::homeFolder">
7314 VirtualBox home directory</link>.
7315 When reading this property, a full path is
7316 always returned.
7317 </note>
7318 <note>
7319 The specified path may not exist, it will be created
7320 when necessary.
7321 </note>
7322
7323 <see>
7324 <link to="IVirtualBox::createMachine"/>,
7325 <link to="IVirtualBox::openMachine"/>
7326 </see>
7327 </desc>
7328 </attribute>
7329
7330 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7331 <desc>
7332 List of all medium storage formats supported by this VirtualBox
7333 installation.
7334
7335 Keep in mind that the medium format identifier
7336 (<link to="IMediumFormat::id"/>) used in other API calls like
7337 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7338 medium format is a case-insensitive string. This means that, for
7339 example, all of the following strings:
7340 <pre>
7341 "VDI"
7342 "vdi"
7343 "VdI"</pre>
7344 refer to the same medium format.
7345
7346 Note that the virtual medium framework is backend-based, therefore
7347 the list of supported formats depends on what backends are currently
7348 installed.
7349
7350 <see>
7351 <link to="IMediumFormat"/>,
7352 </see>
7353 </desc>
7354 </attribute>
7355
7356 <attribute name="defaultHardDiskFormat" type="wstring">
7357 <desc>
7358 Identifier of the default medium format used by VirtualBox.
7359
7360 The medium format set by this attribute is used by VirtualBox
7361 when the medium format was not specified explicitly. One example is
7362 <link to="IVirtualBox::createHardDisk"/> with the empty
7363 format argument. A more complex example is implicit creation of
7364 differencing media when taking a snapshot of a virtual machine:
7365 this operation will try to use a format of the parent medium first
7366 and if this format does not support differencing media the default
7367 format specified by this argument will be used.
7368
7369 The list of supported medium formats may be obtained by the
7370 <link to="#mediumFormats"/> call. Note that the default medium
7371 format must have a capability to create differencing media;
7372 otherwise operations that create media implicitly may fail
7373 unexpectedly.
7374
7375 The initial value of this property is <tt>"VDI"</tt> in the current
7376 version of the VirtualBox product, but may change in the future.
7377
7378 <note>
7379 Setting this property to @c null or empty string will restore the
7380 initial value.
7381 </note>
7382
7383 <see>
7384 <link to="#mediumFormats"/>,
7385 <link to="IMediumFormat::id"/>,
7386 <link to="IVirtualBox::createHardDisk"/>
7387 </see>
7388 </desc>
7389 </attribute>
7390
7391 <attribute name="freeDiskSpaceWarning" type="long long">
7392 <desc>Issue a warning if the free disk space is below (or in some disk
7393 intensive operation is expected to go below) the given size in
7394 bytes.</desc>
7395 </attribute>
7396
7397 <attribute name="freeDiskSpacePercentWarning" type="unsigned long">
7398 <desc>Issue a warning if the free disk space is below (or in some disk
7399 intensive operation is expected to go below) the given percentage.</desc>
7400 </attribute>
7401
7402 <attribute name="freeDiskSpaceError" type="long long">
7403 <desc>Issue an error if the free disk space is below (or in some disk
7404 intensive operation is expected to go below) the given size in
7405 bytes.</desc>
7406 </attribute>
7407
7408 <attribute name="freeDiskSpacePercentError" type="unsigned long">
7409 <desc>Issue an error if the free disk space is below (or in some disk
7410 intensive operation is expected to go below) the given percentage.</desc>
7411 </attribute>
7412
7413 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7414 <desc>
7415 Library that provides authentication for VRDP clients. The library
7416 is used if a virtual machine's authentication type is set to "external"
7417 in the VM RemoteDisplay configuration.
7418
7419 The system library extension (".DLL" or ".so") must be omitted.
7420 A full path can be specified; if not, then the library must reside on the
7421 system's default library path.
7422
7423 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7424 of that name in one of the default VirtualBox library directories.
7425
7426 For details about VirtualBox authentication libraries and how to implement
7427 them, please refer to the VirtualBox manual.
7428
7429 <note>
7430 Setting this property to @c null or empty string will restore the
7431 initial value.
7432 </note>
7433 </desc>
7434 </attribute>
7435
7436 <attribute name="webServiceAuthLibrary" type="wstring">
7437 <desc>
7438 Library that provides authentication for webservice clients. The library
7439 is used if a virtual machine's authentication type is set to "external"
7440 in the VM RemoteDisplay configuration and will be called from
7441 within the <link to="IWebsessionManager::logon" /> implementation.
7442
7443 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7444 there is no per-VM setting for this, as the webservice is a global
7445 resource (if it is running). Only for this setting (for the webservice),
7446 setting this value to a literal <tt>"null"</tt> string disables authentication,
7447 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7448 no matter what user name and password are supplied.
7449
7450 The initial value of this property is <tt>"VRDPAuth"</tt>,
7451 meaning that the webservice will use the same authentication
7452 library that is used by default for VBoxVRDP (again, see
7453 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7454 The format and calling convention of authentication libraries
7455 is the same for the webservice as it is for VBoxVRDP.
7456
7457 <note>
7458 Setting this property to @c null or empty string will restore the
7459 initial value.
7460 </note>
7461 </desc>
7462 </attribute>
7463
7464 <attribute name="LogHistoryCount" type="unsigned long">
7465 <desc>
7466 This value specifies how many old release log files are kept.
7467 </desc>
7468 </attribute>
7469
7470 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7471 <desc>This value hold the default audio driver for the current
7472 system.</desc>
7473 </attribute>
7474
7475 <method name="getMaxDevicesPerPortForStorageBus">
7476 <desc>Returns the maximum number of devices which can be attached to a port
7477 for the given storage bus.</desc>
7478
7479 <param name="bus" type="StorageBus" dir="in">
7480 <desc>The storage bus type to get the value for.</desc>
7481 </param>
7482
7483 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
7484 <desc>The maximum number of devices which can eb attached to the port for the given
7485 storage bus.</desc>
7486 </param>
7487 </method>
7488
7489 <method name="getMinPortCountForStorageBus">
7490 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
7491
7492 <param name="bus" type="StorageBus" dir="in">
7493 <desc>The storage bus type to get the value for.</desc>
7494 </param>
7495
7496 <param name="minPortCount" type="unsigned long" dir="return">
7497 <desc>The minimum number of ports for the given storage bus.</desc>
7498 </param>
7499 </method>
7500
7501 <method name="getMaxPortCountForStorageBus">
7502 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
7503
7504 <param name="bus" type="StorageBus" dir="in">
7505 <desc>The storage bus type to get the value for.</desc>
7506 </param>
7507
7508 <param name="maxPortCount" type="unsigned long" dir="return">
7509 <desc>The maximum number of ports for the given storage bus.</desc>
7510 </param>
7511 </method>
7512
7513 <method name="getMaxInstancesOfStorageBus">
7514 <desc>Returns the maximum number of storage bus instances which
7515 can be configured for each VM. This corresponds to the number of
7516 storage controllers one can have.</desc>
7517
7518 <param name="bus" type="StorageBus" dir="in">
7519 <desc>The storage bus type to get the value for.</desc>
7520 </param>
7521
7522 <param name="maxInstances" type="unsigned long" dir="return">
7523 <desc>The maximum number of instances for the given storage bus.</desc>
7524 </param>
7525 </method>
7526
7527 <method name="getDeviceTypesForStorageBus">
7528 <desc>Returns list of all the supported device types
7529 (<link to="DeviceType"/>) for the given type of storage
7530 bus.</desc>
7531
7532 <param name="bus" type="StorageBus" dir="in">
7533 <desc>The storage bus type to get the value for.</desc>
7534 </param>
7535
7536 <param name="deviceTypes" type="DeviceType" safearray="yes" dir="return">
7537 <desc>The list of all supported device types for the given storage bus.</desc>
7538 </param>
7539 </method>
7540
7541 <method name="getDefaultIoCacheSettingForStorageController">
7542 <desc>Returns the default I/O cache setting for the
7543 given storage controller</desc>
7544
7545 <param name="controllerType" type="StorageControllerType" dir="in">
7546 <desc>The storage controller to the setting for.</desc>
7547 </param>
7548
7549 <param name="enabled" type="boolean" dir="return">
7550 <desc>Returned flag indicating the default value</desc>
7551 </param>
7552 </method>
7553 </interface>
7554
7555 <!--
7556 // IGuest
7557 /////////////////////////////////////////////////////////////////////////
7558 -->
7559
7560 <interface
7561 name="IGuestOSType" extends="$unknown"
7562 uuid="432c1546-1354-4abf-bf08-878a32a373f5"
7563 wsmap="struct"
7564 >
7565 <desc>
7566 </desc>
7567
7568 <attribute name="familyId" type="wstring" readonly="yes">
7569 <desc>Guest OS family identifier string.</desc>
7570 </attribute>
7571
7572 <attribute name="familyDescription" type="wstring" readonly="yes">
7573 <desc>Human readable description of the guest OS family.</desc>
7574 </attribute>
7575
7576 <attribute name="id" type="wstring" readonly="yes">
7577 <desc>Guest OS identifier string.</desc>
7578 </attribute>
7579
7580 <attribute name="description" type="wstring" readonly="yes">
7581 <desc>Human readable description of the guest OS.</desc>
7582 </attribute>
7583
7584 <attribute name="is64Bit" type="boolean" readonly="yes">
7585 <desc>Returns @c true if the given OS is 64-bit</desc>
7586 </attribute>
7587
7588 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7589 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7590 </attribute>
7591
7592 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7593 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7594 </attribute>
7595
7596 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7597 <desc>Recommended RAM size in Megabytes.</desc>
7598 </attribute>
7599
7600 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7601 <desc>Recommended video RAM size in Megabytes.</desc>
7602 </attribute>
7603
7604 <attribute name="recommendedHDD" type="long long" readonly="yes">
7605 <desc>Recommended hard disk size in bytes.</desc>
7606 </attribute>
7607
7608 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7609 <desc>Returns recommended network adapter for this OS type.</desc>
7610 </attribute>
7611
7612 <attribute name="recommendedPae" type="boolean" readonly="yes">
7613 <desc>Returns @c true if using PAE is recommended for this OS type.</desc>
7614 </attribute>
7615
7616 <attribute name="recommendedDvdStorageController" type="StorageControllerType" readonly="yes">
7617 <desc>Recommended storage controller type for DVD/CD drives.</desc>
7618 </attribute>
7619
7620 <attribute name="recommendedDvdStorageBus" type="StorageBus" readonly="yes">
7621 <desc>Recommended storage bus type for DVD/CD drives.</desc>
7622 </attribute>
7623
7624 <attribute name="recommendedHdStorageController" type="StorageControllerType" readonly="yes">
7625 <desc>Recommended storage controller type for HD drives.</desc>
7626 </attribute>
7627
7628 <attribute name="recommendedHdStorageBus" type="StorageBus" readonly="yes">
7629 <desc>Recommended storage bus type for HD drives.</desc>
7630 </attribute>
7631
7632 <attribute name="recommendedFirmware" type="FirmwareType" readonly="yes">
7633 <desc>Recommended firmware type.</desc>
7634 </attribute>
7635
7636 <attribute name="recommendedUsbHid" type="boolean" readonly="yes">
7637 <desc>Returns @c true if using USB Human Interface Devices, such as keyboard and mouse recommended.</desc>
7638 </attribute>
7639
7640 <attribute name="recommendedHpet" type="boolean" readonly="yes">
7641 <desc>Returns @c true if using HPET is recommended for this OS type.</desc>
7642 </attribute>
7643
7644 <attribute name="recommendedUsbTablet" type="boolean" readonly="yes">
7645 <desc>Returns @c true if using a USB Tablet is recommended.</desc>
7646 </attribute>
7647
7648 <attribute name="recommendedRtcUseUtc" type="boolean" readonly="yes">
7649 <desc>Returns @c true if the RTC of this VM should be set to UTC</desc>
7650 </attribute>
7651
7652 <attribute name="recommendedChipset" type="ChipsetType" readonly="yes">
7653 <desc>Recommended chipset type.</desc>
7654 </attribute>
7655
7656 </interface>
7657
7658 <enum
7659 name="AdditionsRunLevelType"
7660 uuid="a25417ee-a9dd-4f5b-b0dc-377860087754"
7661 >
7662 <desc>
7663 Guest Additions run level type.
7664 </desc>
7665
7666 <const name="None" value="0">
7667 <desc>Guest Additions are not loaded.</desc>
7668 </const>
7669 <const name="System" value="1">
7670 <desc>Guest drivers are loaded.</desc>
7671 </const>
7672 <const name="Userland" value="2">
7673 <desc>Common components (such as application services) are loaded.</desc>
7674 </const>
7675 <const name="Desktop" value="3">
7676 <desc>Per-user desktop components are loaded.</desc>
7677 </const>
7678 </enum>
7679
7680 <enum
7681 name="ExecuteProcessFlag"
7682 uuid="9a24c17d-bd46-4207-b247-517fdd6d6b8f"
7683 >
7684 <desc>
7685 Guest process execution flags.
7686 </desc>
7687
7688 <const name="None" value="0">
7689 <desc>No flag set.</desc>
7690 </const>
7691
7692 <const name="IgnoreOrphanedProcesses" value="2">
7693 <desc>Do not report an error when executed processes are still alive when VBoxService or the guest OS is shutting down.</desc>
7694 </const>
7695 </enum>
7696
7697 <enum
7698 name="CopyFileFlag"
7699 uuid="23f79fdf-738a-493d-b80b-42d607c9b916"
7700 >
7701 <desc>
7702 Host/Guest copy flags.
7703 </desc>
7704
7705 <const name="None" value="0">
7706 <desc>No flag set.</desc>
7707 </const>
7708
7709 <const name="Recursive" value="2">
7710 <desc>Copy directories recursively.</desc>
7711 </const>
7712
7713 <const name="Update" value="4">
7714 <desc>Copy only when the source file is newer than the destination file or when the destination file is missing.</desc>
7715 </const>
7716
7717 <const name="FollowLinks" value="8">
7718 <desc>Follow symbolic links.</desc>
7719 </const>
7720 </enum>
7721
7722 <interface
7723 name="IGuest" extends="$unknown"
7724 uuid="c165a809-0882-4c76-9220-746da84b5ecf"
7725 wsmap="managed"
7726 >
7727 <desc>
7728 The IGuest interface represents information about the operating system
7729 running inside the virtual machine. Used in
7730 <link to="IConsole::guest"/>.
7731
7732 IGuest provides information about the guest operating system, whether
7733 Guest Additions are installed and other OS-specific virtual machine
7734 properties.
7735 </desc>
7736
7737 <attribute name="OSTypeId" type="wstring" readonly="yes">
7738 <desc>
7739 Identifier of the Guest OS type as reported by the Guest
7740 Additions.
7741 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7742 an IGuestOSType object representing details about the given
7743 Guest OS type.
7744 <note>
7745 If Guest Additions are not installed, this value will be
7746 the same as <link to="IMachine::OSTypeId"/>.
7747 </note>
7748 </desc>
7749 </attribute>
7750
7751 <attribute name="additionsRunLevel" type="AdditionsRunLevelType" readonly="yes">
7752 <desc>
7753 Current run level of the Guest Additions.
7754 </desc>
7755 </attribute>
7756
7757 <attribute name="additionsVersion" type="wstring" readonly="yes">
7758 <desc>
7759 Version of the Guest Additions including the revision (3 decimal numbers
7760 separated by dots + revision number) installed on the guest or empty
7761 when the Additions are not installed.
7762 </desc>
7763 </attribute>
7764
7765 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7766 <desc>
7767 Flag whether seamless guest display rendering (seamless desktop
7768 integration) is supported.
7769 </desc>
7770 </attribute>
7771
7772 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7773 <desc>
7774 Flag whether the guest is in graphics mode. If it is not, then
7775 seamless rendering will not work, resize hints are not immediately
7776 acted on and guest display resizes are probably not initiated by
7777 the guest additions.
7778 </desc>
7779 </attribute>
7780
7781 <attribute name="memoryBalloonSize" type="unsigned long">
7782 <desc>Guest system memory balloon size in megabytes (transient property).</desc>
7783 </attribute>
7784
7785 <attribute name="statisticsUpdateInterval" type="unsigned long">
7786 <desc>Interval to update guest statistics in seconds.</desc>
7787 </attribute>
7788
7789 <method name="internalGetStatistics">
7790 <desc>
7791 Internal method; do not use as it might change at any time
7792 </desc>
7793 <param name="cpuUser" type="unsigned long" dir="out">
7794 <desc>Percentage of processor time spent in user mode as seen by the guest</desc>
7795 </param>
7796 <param name="cpuKernel" type="unsigned long" dir="out">
7797 <desc>Percentage of processor time spent in kernel mode as seen by the guest</desc>
7798 </param>
7799 <param name="cpuIdle" type="unsigned long" dir="out">
7800 <desc>Percentage of processor time spent idling as seen by the guest</desc>
7801 </param>
7802 <param name="memTotal" type="unsigned long" dir="out">
7803 <desc>Total amount of physical guest RAM</desc>
7804 </param>
7805 <param name="memFree" type="unsigned long" dir="out">
7806 <desc>Free amount of physical guest RAM</desc>
7807 </param>
7808 <param name="memBalloon" type="unsigned long" dir="out">
7809 <desc>Amount of ballooned physical guest RAM</desc>
7810 </param>
7811 <param name="memShared" type="unsigned long" dir="out">
7812 <desc>Amount of shared physical guest RAM</desc>
7813 </param>
7814 <param name="memCache" type="unsigned long" dir="out">
7815 <desc>Total amount of guest (disk) cache memory</desc>
7816 </param>
7817 <param name="pagedTotal" type="unsigned long" dir="out">
7818 <desc>Total amount of space in the page file</desc>
7819 </param>
7820 <param name="memAllocTotal" type="unsigned long" dir="out">
7821 <desc>Total amount of memory allocated by the hypervisor</desc>
7822 </param>
7823 <param name="memFreeTotal" type="unsigned long" dir="out">
7824 <desc>Total amount of free memory available in the hypervisor</desc>
7825 </param>
7826 <param name="memBalloonTotal" type="unsigned long" dir="out">
7827 <desc>Total amount of memory ballooned by the hypervisor</desc>
7828 </param>
7829 <param name="memSharedTotal" type="unsigned long" dir="out">
7830 <desc>Total amount of shared memory in the hypervisor</desc>
7831 </param>
7832 </method>
7833
7834 <method name="getAdditionsStatus">
7835 <desc>
7836 Retrieve the current status of a certain Guest Additions run level.
7837
7838 <result name="VBOX_E_NOT_SUPPORTED">
7839 Wrong status level specified.
7840 </result>
7841
7842 </desc>
7843 <param name="level" type="AdditionsRunLevelType" dir="in">
7844 <desc>Status level to check</desc>
7845 </param>
7846 <param name="active" type="boolean" dir="return">
7847 <desc>Flag whether the status level has been reached or not</desc>
7848 </param>
7849 </method>
7850
7851 <method name="setCredentials">
7852 <desc>
7853 Store login credentials that can be queried by guest operating
7854 systems with Additions installed. The credentials are transient
7855 to the session and the guest may also choose to erase them. Note
7856 that the caller cannot determine whether the guest operating system
7857 has queried or made use of the credentials.
7858
7859 <result name="VBOX_E_VM_ERROR">
7860 VMM device is not available.
7861 </result>
7862
7863 </desc>
7864 <param name="userName" type="wstring" dir="in">
7865 <desc>User name string, can be empty</desc>
7866 </param>
7867 <param name="password" type="wstring" dir="in">
7868 <desc>Password string, can be empty</desc>
7869 </param>
7870 <param name="domain" type="wstring" dir="in">
7871 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7872 </param>
7873 <param name="allowInteractiveLogon" type="boolean" dir="in">
7874 <desc>
7875 Flag whether the guest should alternatively allow the user to
7876 interactively specify different credentials. This flag might
7877 not be supported by all versions of the Additions.
7878 </desc>
7879 </param>
7880 </method>
7881
7882 <method name="executeProcess">
7883 <desc>
7884 Executes an existing program inside the guest VM.
7885
7886 <result name="VBOX_E_IPRT_ERROR">
7887 Could not execute process.
7888 </result>
7889
7890 </desc>
7891 <param name="execName" type="wstring" dir="in">
7892 <desc>
7893 Full path name of the command to execute on the guest; the
7894 commands has to exists in the guest VM in order to be executed.
7895 </desc>
7896 </param>
7897 <param name="flags" type="unsigned long" dir="in">
7898 <desc>
7899 Execution flags - currently not supported and therefore
7900 has to be set to 0.
7901 </desc>
7902 </param>
7903 <param name="arguments" type="wstring" safearray="yes" dir="in">
7904 <desc>
7905 Array of arguments passed to the execution command.
7906 </desc>
7907 </param>
7908 <param name="environment" type="wstring" safearray="yes" dir="in">
7909 <desc>
7910 Environment variables that can be set while the command is being
7911 executed, in form of "NAME=VALUE"; one pair per entry. To unset a
7912 variable just set its name ("NAME") without a value.
7913 </desc>
7914 </param>
7915 <param name="userName" type="wstring" dir="in">
7916 <desc>
7917 User name under which the command will be executed; has to exist
7918 and have the appropriate rights to execute programs in the VM.
7919 </desc>
7920 </param>
7921 <param name="password" type="wstring" dir="in">
7922 <desc>
7923 Password of the user account specified.
7924 </desc>
7925 </param>
7926 <param name="timeoutMS" type="unsigned long" dir="in">
7927 <desc>
7928 The maximum timeout value (in msec) to wait for finished program
7929 execution. Pass 0 for an infinite timeout.
7930 </desc>
7931 </param>
7932 <param name="pid" type="unsigned long" dir="out">
7933 <desc>
7934 The PID (process ID) of the started command for later reference.
7935 </desc>
7936 </param>
7937 <param name="progress" type="IProgress" dir="return">
7938 <desc>Progress object to track the operation completion.</desc>
7939 </param>
7940 </method>
7941
7942 <method name="getProcessOutput">
7943 <desc>
7944 Retrieves output of a formerly started process.
7945
7946 <result name="VBOX_E_IPRT_ERROR">
7947 Could not retrieve output.
7948 </result>
7949
7950 </desc>
7951 <param name="pid" type="unsigned long" dir="in">
7952 <desc>
7953 Process id returned by earlier executeProcess() call.
7954 </desc>
7955 </param>
7956 <param name="flags" type="unsigned long" dir="in">
7957 <desc>
7958 Flags describing which output to retrieve.
7959 </desc>
7960 </param>
7961 <param name="timeoutMS" type="unsigned long" dir="in">
7962 <desc>
7963 The maximum timeout value (in msec) to wait for output
7964 data. Pass 0 for an infinite timeout.
7965 </desc>
7966 </param>
7967 <param name="size" type="long long" dir="in">
7968 <desc>
7969 Size in bytes to read in the buffer.
7970 </desc>
7971 </param>
7972 <param name="data" type="octet" dir="return" safearray="yes">
7973 <desc>
7974 Buffer for retrieving the actual output. A data size of 0 means end of file
7975 if the requested size was not 0. This is the unprocessed
7976 output data, i.e. the line ending style depends on the platform of
7977 the system the server is running on.
7978 </desc>
7979 </param>
7980 </method>
7981
7982 <method name="getProcessStatus">
7983 <desc>
7984 Retrieves status, exit code and the exit reason of a formerly started process.
7985
7986 <result name="VBOX_E_IPRT_ERROR">
7987 Process with specified PID was not found.
7988 </result>
7989
7990 </desc>
7991 <param name="pid" type="unsigned long" dir="in">
7992 <desc>
7993 Process id returned by earlier executeProcess() call.
7994 </desc>
7995 </param>
7996 <param name="exitcode" type="unsigned long" dir="out">
7997 <desc>
7998 The exit code (if available).
7999 </desc>
8000 </param>
8001 <param name="flags" type="unsigned long" dir="out">
8002 <desc>
8003 Additional flags of process status (not used at the moment).
8004 </desc>
8005 </param>
8006 <param name="reason" type="unsigned long" dir="return">
8007 <desc>
8008 The current process status.
8009 </desc>
8010 </param>
8011 </method>
8012
8013 <method name="copyToGuest">
8014 <desc>
8015 Copies files/directories from host to the guest.
8016
8017 <result name="VBOX_E_IPRT_ERROR">
8018 Error while copying.
8019 </result>
8020
8021 </desc>
8022 <param name="source" type="wstring" dir="in">
8023 <desc>
8024 Foo.
8025 </desc>
8026 </param>
8027 <param name="dest" type="wstring" dir="in">
8028 <desc>
8029 Bar.
8030 </desc>
8031 </param>
8032 <param name="flags" type="unsigned long" dir="in">
8033 <desc>
8034 Copy flags.
8035 </desc>
8036 </param>
8037 <param name="progress" type="IProgress" dir="return">
8038 <desc>Progress object to track the operation completion.</desc>
8039 </param>
8040 </method>
8041
8042 <method name="setProcessInput">
8043 <desc>
8044 Sends input into a formerly started process.
8045
8046 <result name="VBOX_E_IPRT_ERROR">
8047 Could not send input.
8048 </result>
8049
8050 </desc>
8051 <param name="pid" type="unsigned long" dir="in">
8052 <desc>
8053 Process id returned by earlier executeProcess() call.
8054 </desc>
8055 </param>
8056 <param name="flags" type="unsigned long" dir="in">
8057 <desc>
8058 Not used, must be set to zero.
8059 </desc>
8060 </param>
8061 <param name="timeoutMS" type="unsigned long" dir="in">
8062 <desc>
8063 The maximum timeout value (in msec) to wait for handling
8064 the input data. Pass 0 for an infinite timeout.
8065 </desc>
8066 </param>
8067 <param name="data" type="octet" dir="in" safearray="yes">
8068 <desc>
8069 Buffer of input data to send to the started process to.
8070 </desc>
8071 </param>
8072 <param name="written" type="unsigned long" dir="return">
8073 <desc>
8074 Number of bytes written.
8075 </desc>
8076 </param>
8077 </method>
8078
8079 </interface>
8080
8081
8082 <!--
8083 // IProgress
8084 /////////////////////////////////////////////////////////////////////////
8085 -->
8086
8087 <interface
8088 name="IProgress" extends="$unknown"
8089 uuid="A163C98F-8635-4AA8-B770-A9941737F3EF"
8090 wsmap="managed"
8091 >
8092 <desc>
8093 The IProgress interface is used to track and control
8094 asynchronous tasks within VirtualBox.
8095
8096 An instance of this is returned every time VirtualBox starts
8097 an asynchronous task (in other words, a separate thread) which
8098 continues to run after a method call returns. For example,
8099 <link to="IConsole::saveState" />, which saves the state of
8100 a running virtual machine, can take a long time to complete.
8101 To be able to display a progress bar, a user interface such as
8102 the VirtualBox graphical user interface can use the IProgress
8103 object returned by that method.
8104
8105 Note that IProgress is a "read-only" interface in the sense
8106 that only the VirtualBox internals behind the Main API can
8107 create and manipulate progress objects, whereas client code
8108 can only use the IProgress object to monitor a task's
8109 progress and, if <link to="#cancelable" /> is @c true,
8110 cancel the task by calling <link to="#cancel" />.
8111
8112 A task represented by IProgress consists of either one or
8113 several sub-operations that run sequentially, one by one (see
8114 <link to="#operation" /> and <link to="#operationCount" />).
8115 Every operation is identified by a number (starting from 0)
8116 and has a separate description.
8117
8118 You can find the individual percentage of completion of the current
8119 operation in <link to="#operationPercent" /> and the
8120 percentage of completion of the task as a whole
8121 in <link to="#percent" />.
8122
8123 Similarly, you can wait for the completion of a particular
8124 operation via <link to="#waitForOperationCompletion" /> or
8125 for the completion of the whole task via
8126 <link to="#waitForCompletion" />.
8127 </desc>
8128
8129 <attribute name="id" type="uuid" mod="string" readonly="yes">
8130 <desc>ID of the task.</desc>
8131 </attribute>
8132
8133 <attribute name="description" type="wstring" readonly="yes">
8134 <desc>Description of the task.</desc>
8135 </attribute>
8136
8137 <attribute name="initiator" type="$unknown" readonly="yes">
8138 <desc>Initiator of the task.</desc>
8139 </attribute>
8140
8141 <attribute name="cancelable" type="boolean" readonly="yes">
8142 <desc>Whether the task can be interrupted.</desc>
8143 </attribute>
8144
8145 <attribute name="percent" type="unsigned long" readonly="yes">
8146 <desc>
8147 Current progress value of the task as a whole, in percent.
8148 This value depends on how many operations are already complete.
8149 Returns 100 if <link to="#completed" /> is @c true.
8150 </desc>
8151 </attribute>
8152
8153 <attribute name="timeRemaining" type="long" readonly="yes">
8154 <desc>
8155 Estimated remaining time until the task completes, in
8156 seconds. Returns 0 once the task has completed; returns -1
8157 if the remaining time cannot be computed, in particular if
8158 the current progress is 0.
8159
8160 Even if a value is returned, the estimate will be unreliable
8161 for low progress values. It will become more reliable as the
8162 task progresses; it is not recommended to display an ETA
8163 before at least 20% of a task have completed.
8164 </desc>
8165 </attribute>
8166
8167 <attribute name="completed" type="boolean" readonly="yes">
8168 <desc>Whether the task has been completed.</desc>
8169 </attribute>
8170
8171 <attribute name="canceled" type="boolean" readonly="yes">
8172 <desc>Whether the task has been canceled.</desc>
8173 </attribute>
8174
8175 <attribute name="resultCode" type="long" readonly="yes">
8176 <desc>
8177 Result code of the progress task.
8178 Valid only if <link to="#completed"/> is @c true.
8179 </desc>
8180 </attribute>
8181
8182 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
8183 <desc>
8184 Extended information about the unsuccessful result of the
8185 progress operation. May be @c null if no extended information
8186 is available.
8187 Valid only if <link to="#completed"/> is @c true and
8188 <link to="#resultCode"/> indicates a failure.
8189 </desc>
8190 </attribute>
8191
8192 <attribute name="operationCount" type="unsigned long" readonly="yes">
8193 <desc>
8194 Number of sub-operations this task is divided into.
8195 Every task consists of at least one suboperation.
8196 </desc>
8197 </attribute>
8198
8199 <attribute name="operation" type="unsigned long" readonly="yes">
8200 <desc>Number of the sub-operation being currently executed.</desc>
8201 </attribute>
8202
8203 <attribute name="operationDescription" type="wstring" readonly="yes">
8204 <desc>
8205 Description of the sub-operation being currently executed.
8206 </desc>
8207 </attribute>
8208
8209 <attribute name="operationPercent" type="unsigned long" readonly="yes">
8210 <desc>Progress value of the current sub-operation only, in percent.</desc>
8211 </attribute>
8212
8213 <attribute name="operationWeight" type="unsigned long" readonly="yes">
8214 <desc>Weight value of the current sub-operation only.</desc>
8215 </attribute>
8216
8217 <attribute name="timeout" type="unsigned long">
8218 <desc>
8219 When non-zero, this specifies the number of milliseconds after which
8220 the operation will automatically be canceled. This can only be set on
8221 cancelable objects.
8222 </desc>
8223 </attribute>
8224
8225 <method name="setCurrentOperationProgress">
8226 <desc>Internal method, not to be called externally.</desc>
8227 <param name="percent" type="unsigned long" dir="in" />
8228 </method>
8229 <method name="setNextOperation">
8230 <desc>Internal method, not to be called externally.</desc>
8231 <param name="nextOperationDescription" type="wstring" dir="in" />
8232 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8233 </method>
8234
8235 <method name="waitForCompletion">
8236 <desc>
8237 Waits until the task is done (including all sub-operations)
8238 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8239
8240 Note that the VirtualBox/XPCOM/COM/native event queues of the calling
8241 thread are not processed while waiting. Neglecting event queues may
8242 have dire consequences (degrade performance, resource hogs,
8243 deadlocks, etc.), this is specially so for the main thread on
8244 platforms using XPCOM. Callers are adviced wait for short periods
8245 and service their event queues between calls, or to create a worker
8246 thread to do the waiting.
8247
8248 <result name="VBOX_E_IPRT_ERROR">
8249 Failed to wait for task completion.
8250 </result>
8251 </desc>
8252
8253 <param name="timeout" type="long" dir="in">
8254 <desc>
8255 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8256 </desc>
8257 </param>
8258 </method>
8259
8260 <method name="waitForOperationCompletion">
8261 <desc>
8262 Waits until the given operation is done with a given timeout in
8263 milliseconds; specify -1 for an indefinite wait.
8264
8265 See <link to="#waitForCompletion"> for event queue considerations.</link>
8266
8267 <result name="VBOX_E_IPRT_ERROR">
8268 Failed to wait for operation completion.
8269 </result>
8270
8271 </desc>
8272 <param name="operation" type="unsigned long" dir="in">
8273 <desc>
8274 Number of the operation to wait for.
8275 Must be less than <link to="#operationCount"/>.
8276 </desc>
8277 </param>
8278 <param name="timeout" type="long" dir="in">
8279 <desc>
8280 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8281 </desc>
8282 </param>
8283 </method>
8284
8285 <method name="cancel">
8286 <desc>
8287 Cancels the task.
8288 <note>
8289 If <link to="#cancelable"/> is @c false, then this method will fail.
8290 </note>
8291
8292 <result name="VBOX_E_INVALID_OBJECT_STATE">
8293 Operation cannot be canceled.
8294 </result>
8295
8296 </desc>
8297 </method>
8298
8299 </interface>
8300
8301 <!--
8302 // ISnapshot
8303 /////////////////////////////////////////////////////////////////////////
8304 -->
8305
8306 <interface
8307 name="ISnapshot" extends="$unknown"
8308 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8309 wsmap="managed"
8310 >
8311 <desc>
8312 The ISnapshot interface represents a snapshot of the virtual
8313 machine.
8314
8315 Together with the differencing media that are created
8316 when a snapshot is taken, a machine can be brought back to
8317 the exact state it was in when the snapshot was taken.
8318
8319 The ISnapshot interface has no methods, only attributes; snapshots
8320 are controlled through methods of the <link to="IConsole" /> interface
8321 which also manage the media associated with the snapshot.
8322 The following operations exist:
8323
8324 <ul>
8325 <li><link to="IConsole::takeSnapshot"/> creates a new snapshot
8326 by creating new, empty differencing images for the machine's
8327 media and saving the VM settings and (if the VM is running)
8328 the current VM state in the snapshot.
8329
8330 The differencing images will then receive all data written to
8331 the machine's media, while their parent (base) images
8332 remain unmodified after the snapshot has been taken (see
8333 <link to="IMedium" /> for details about differencing images).
8334 This simplifies restoring a machine to the state of a snapshot:
8335 only the differencing images need to be deleted.
8336
8337 The current machine state is not changed by taking a snapshot.
8338 If the machine is running, it will resume execution after the
8339 snapshot has been taken. After calling this,
8340 <link to="IMachine::currentSnapshot" /> is set to the snapshot
8341 just created.
8342 </li>
8343
8344 <li><link to="IConsole::restoreSnapshot"/> resets a machine to
8345 the state of a previous snapshot by deleting the differencing
8346 image of each of the machine's media and setting the machine's
8347 settings and state to the state that was saved in the snapshot (if any).
8348
8349 This destroys the machine's current state. After calling this,
8350 <link to="IMachine::currentSnapshot" /> is set to the snapshot that was
8351 restored.
8352 </li>
8353
8354 <li><link to="IConsole::deleteSnapshot"/> deletes a snapshot
8355 without affecting the current machine state.
8356
8357 This does not change the current machine state, but instead frees the
8358 resources allocated when the snapshot was taken: the settings and machine
8359 state file are deleted (if any), and the snapshot's differencing image for
8360 each of the machine's media gets merged with its parent image.
8361
8362 Neither the current machine state nor other snapshots are affected
8363 by this operation, except that parent media will be modified
8364 to contain the disk data associated with the snapshot being deleted.
8365
8366 When deleting the current snapshot, the <link to="IMachine::currentSnapshot" />
8367 attribute is set to the current snapshot's parent or NULL if it
8368 has no parent. Otherwise the attribute is unchanged.
8369 </li>
8370 </ul>
8371
8372 Each snapshot contains the settings of the virtual machine (hardware
8373 configuration etc.). In addition, if the machine was running when the
8374 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8375 the current VM state is saved in the snapshot (similarly to what happens
8376 when a VM's state is saved). The snapshot is then said to
8377 be <i>online</i> because when restoring it, the VM will be running.
8378
8379 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8380 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8381
8382 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8383 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8384 it then contains a so-called "zero execution state", representing a
8385 machine that is powered off.
8386 </desc>
8387
8388 <attribute name="id" type="uuid" mod="string" readonly="yes">
8389 <desc>UUID of the snapshot.</desc>
8390 </attribute>
8391
8392 <attribute name="name" type="wstring">
8393 <desc>Short name of the snapshot.</desc>
8394 </attribute>
8395
8396 <attribute name="description" type="wstring">
8397 <desc>Optional description of the snapshot.</desc>
8398 </attribute>
8399
8400 <attribute name="timeStamp" type="long long" readonly="yes">
8401 <desc>
8402 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8403 </desc>
8404 </attribute>
8405
8406 <attribute name="online" type="boolean" readonly="yes">
8407 <desc>
8408 @c true if this snapshot is an online snapshot and @c false otherwise.
8409
8410 When this attribute is @c true, the
8411 <link to="IMachine::stateFilePath"/> attribute of the
8412 <link to="#machine"/> object associated with this snapshot
8413 will point to the saved state file. Otherwise, it will be
8414 an empty string.
8415 </desc>
8416 </attribute>
8417
8418 <attribute name="machine" type="IMachine" readonly="yes">
8419 <desc>
8420 Virtual machine this snapshot is taken on. This object
8421 stores all settings the machine had when taking this snapshot.
8422 <note>
8423 The returned machine object is immutable, i.e. no
8424 any settings can be changed.
8425 </note>
8426 </desc>
8427 </attribute>
8428
8429 <attribute name="parent" type="ISnapshot" readonly="yes">
8430 <desc>
8431 Parent snapshot (a snapshot this one is based on), or
8432 @c null if the snapshot has no parent (i.e. is the first snapshot).
8433 </desc>
8434 </attribute>
8435
8436 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8437 <desc>
8438 Child snapshots (all snapshots having this one as a parent).
8439 </desc>
8440 </attribute>
8441
8442 </interface>
8443
8444
8445 <!--
8446 // IMedium
8447 /////////////////////////////////////////////////////////////////////////
8448 -->
8449
8450 <enum
8451 name="MediumState"
8452 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8453 >
8454 <desc>
8455 Virtual medium state.
8456 <see>IMedium</see>
8457 </desc>
8458
8459 <const name="NotCreated" value="0">
8460 <desc>
8461 Associated medium storage does not exist (either was not created yet or
8462 was deleted).
8463 </desc>
8464 </const>
8465 <const name="Created" value="1">
8466 <desc>
8467 Associated storage exists and accessible; this gets set if the
8468 accessibility check performed by <link to="IMedium::refreshState" />
8469 was successful.
8470 </desc>
8471 </const>
8472 <const name="LockedRead" value="2">
8473 <desc>
8474 Medium is locked for reading (see <link to="IMedium::lockRead"/>),
8475 no data modification is possible.
8476 </desc>
8477 </const>
8478 <const name="LockedWrite" value="3">
8479 <desc>
8480 Medium is locked for writing (see <link to="IMedium::lockWrite"/>),
8481 no concurrent data reading or modification is possible.
8482 </desc>
8483 </const>
8484 <const name="Inaccessible" value="4">
8485 <desc>
8486 Medium accessiblity check (see <link to="IMedium::refreshState" />) has
8487 not yet been performed, or else, associated medium storage is not
8488 accessible. In the first case, <link to="IMedium::lastAccessError"/>
8489 is empty, in the second case, it describes the error that occured.
8490 </desc>
8491 </const>
8492 <const name="Creating" value="5">
8493 <desc>
8494 Associated medium storage is being created.
8495 </desc>
8496 </const>
8497 <const name="Deleting" value="6">
8498 <desc>
8499 Associated medium storage is being deleted.
8500 </desc>
8501 </const>
8502 </enum>
8503
8504 <enum
8505 name="MediumType"
8506 uuid="46bf1fd4-ad86-4ded-8c49-28bd2d148e5a"
8507 >
8508 <desc>
8509 Virtual medium type.
8510 <see>IMedium</see>
8511 </desc>
8512
8513 <const name="Normal" value="0">
8514 <desc>
8515 Normal medium (attached directly or indirectly, preserved
8516 when taking snapshots).
8517 </desc>
8518 </const>
8519 <const name="Immutable" value="1">
8520 <desc>
8521 Immutable medium (attached indirectly, changes are wiped out
8522 the next time the virtual machine is started).
8523 </desc>
8524 </const>
8525 <const name="Writethrough" value="2">
8526 <desc>
8527 Write through medium (attached directly, ignored when
8528 taking snapshots).
8529 </desc>
8530 </const>
8531 <const name="Shareable" value="3">
8532 <desc>
8533 Allow using this medium concurrently by several machines.
8534 <note>Present since VirtualBox 3.2.0, and accepted since 3.2.8.</note>
8535 </desc>
8536 </const>
8537 </enum>
8538
8539 <enum
8540 name="MediumVariant"
8541 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8542 >
8543 <desc>
8544 Virtual medium image variant. More than one flag may be set.
8545 <see>IMedium</see>
8546 </desc>
8547
8548 <const name="Standard" value="0">
8549 <desc>
8550 No particular variant requested, results in using the backend default.
8551 </desc>
8552 </const>
8553 <const name="VmdkSplit2G" value="0x01">
8554 <desc>
8555 VMDK image split in chunks of less than 2GByte.
8556 </desc>
8557 </const>
8558 <const name="VmdkStreamOptimized" value="0x04">
8559 <desc>
8560 VMDK streamOptimized image. Special import/export format which is
8561 read-only/append-only.
8562 </desc>
8563 </const>
8564 <const name="VmdkESX" value="0x08">
8565 <desc>
8566 VMDK format variant used on ESX products.
8567 </desc>
8568 </const>
8569 <const name="Fixed" value="0x10000">
8570 <desc>
8571 Fixed image. Only allowed for base images.
8572 </desc>
8573 </const>
8574 <const name="Diff" value="0x20000">
8575 <desc>
8576 Differencing image. Only allowed for child images.
8577 </desc>
8578 </const>
8579 </enum>
8580
8581 <interface
8582 name="IMediumAttachment" extends="$unknown"
8583 uuid="c29452cc-ca72-404b-9261-cfc514f1e412"
8584 wsmap="struct"
8585 >
8586 <desc>
8587 The IMediumAttachment interface links storage media to virtual machines.
8588 For each medium (<link to="IMedium"/>) which has been attached to a
8589 storage controller (<link to="IStorageController"/>) of a machine
8590 (<link to="IMachine"/>) via the <link to="IMachine::attachDevice" />
8591 method, one instance of IMediumAttachment is added to the machine's
8592 <link to="IMachine::mediumAttachments"/> array attribute.
8593
8594 Each medium attachment specifies the storage controller as well as a
8595 port and device number and the IMedium instance representing a virtual
8596 hard disk or floppy or DVD image.
8597
8598 For removeable media (DVDs or floppies), there are two additional
8599 options. For one, the IMedium instance can be @c null to represent
8600 an empty drive with no media inserted (see <link to="IMachine::mountMedium" />);
8601 secondly, the medium can be one of the pseudo-media for host drives
8602 listed in <link to="IHost::DVDDrives"/> or <link to="IHost::floppyDrives"/>.
8603 </desc>
8604
8605 <attribute name="medium" type="IMedium" readonly="yes">
8606 <desc>Medium object associated with this attachment; it
8607 can be @c null for removable devices.</desc>
8608 </attribute>
8609
8610 <attribute name="controller" type="wstring" readonly="yes">
8611 <desc>Name of the storage controller of this attachment; this
8612 refers to one of the controllers in <link to="IMachine::storageControllers" />
8613 by name.</desc>
8614 </attribute>
8615
8616 <attribute name="port" type="long" readonly="yes">
8617 <desc>Port number of this attachment.
8618 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8619 </desc>
8620 </attribute>
8621
8622 <attribute name="device" type="long" readonly="yes">
8623 <desc>Device slot number of this attachment.
8624 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8625 </desc>
8626 </attribute>
8627
8628 <attribute name="type" type="DeviceType" readonly="yes">
8629 <desc>Device type of this attachment.</desc>
8630 </attribute>
8631
8632 <attribute name="passthrough" type="boolean" readonly="yes">
8633 <desc>Pass I/O requests through to a device on the host.</desc>
8634 </attribute>
8635
8636 <attribute name="bandwidthLimit" type="unsigned long">
8637 <desc>
8638 Maximum throughput allowed for this medium attachment, in units of 1 mbps.
8639 A zero value means uncapped/unlimited.
8640 </desc>
8641 </attribute>
8642
8643 </interface>
8644
8645 <interface
8646 name="IMedium" extends="$unknown"
8647 uuid="bfcf5b8c-5155-4f24-9414-9457054b16db"
8648 wsmap="managed"
8649 >
8650 <desc>
8651 The IMedium interface represents virtual storage for a machine's
8652 hard disks, CD/DVD or floppy drives. It will typically represent
8653 a disk image on the host, for example a VDI or VMDK file representing
8654 a virtual hard disk, or an ISO or RAW file representing virtual
8655 removable media, but can also point to a network location (e.g.
8656 for iSCSI targets).
8657
8658 Instances of IMedium are connected to virtual machines by way of
8659 medium attachments (see <link to="IMediumAttachment" />), which link
8660 the storage medium to a particular device slot of a storage controller
8661 of the virtual machine.
8662 In the VirtualBox API, virtual storage is therefore always represented
8663 by the following chain of object links:
8664
8665 <ul>
8666 <li><link to="IMachine::storageControllers"/> contains an array of
8667 storage controllers (IDE, SATA, SCSI, SAS or a floppy controller;
8668 these are instances of <link to="IStorageController"/>).</li>
8669 <li><link to="IMachine::mediumAttachments"/> contains an array of
8670 medium attachments (instances of <link to="IMediumAttachment"/>),
8671 each containing a storage controller from the above array, a
8672 port/device specification, and an instance of IMedium representing
8673 the medium storage (image file).
8674
8675 For removable media, the storage medium is optional; a medium
8676 attachment with no medium represents a CD/DVD or floppy drive
8677 with no medium inserted. By contrast, hard disk attachments
8678 will always have an IMedium object attached.</li>
8679 <li>Each IMedium in turn points to a storage unit (such as a file
8680 on the host computer or a network resource) that holds actual
8681 data. This location is represented by the <link to="#location"/>
8682 attribute.</li>
8683 </ul>
8684
8685 Existing media are opened using <link to="IVirtualBox::openMedium"/>;
8686 new hard disk media can be created with the VirtualBox API using the
8687 <link to="IVirtualBox::createHardDisk"/> method.
8688
8689 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8690 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8691 type in a regular file.
8692
8693 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8694 drive; in that case the <link to="#id" /> attribute contains the UUID of
8695 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8696
8697 <h3>Known media</h3>
8698
8699 When an existing medium is opened for the first time, it is automatically
8700 remembered by the given VirtualBox installation or, in other words, becomes
8701 a <i>known medium</i>. Known media are stored in the media
8702 registry transparently maintained by VirtualBox and stored in settings
8703 files so that this registry is preserved when VirtualBox is not running.
8704
8705 Newly created virtual media are remembered only when the associated
8706 storage unit is actually created.
8707
8708 All known media can be enumerated using
8709 <link to="IVirtualBox::hardDisks"/>,
8710 <link to="IVirtualBox::DVDImages"/> and
8711 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8712 quickly found using the <link to="IVirtualBox::findMedium"/> method.
8713
8714 Only known media can be attached to virtual machines.
8715
8716 Removing known media from the media registry is performed when the given
8717 medium is closed using the <link to="#close"/> method or when its
8718 associated storage unit is deleted.
8719
8720 <h3>Accessibility checks</h3>
8721
8722 VirtualBox defers media accessibility checks until the <link to="#refreshState" />
8723 method is called explicitly on a medium. This is done to make the VirtualBox object
8724 ready for serving requests as fast as possible and let the end-user
8725 application decide if it needs to check media accessibility right away or not.
8726
8727 As a result, when VirtualBox starts up (e.g. the VirtualBox
8728 object gets created for the first time), all known media are in the
8729 "Inaccessible" state, but the value of the <link to="#lastAccessError"/>
8730 attribute is an empty string because no actual accessibility check has
8731 been made yet.
8732
8733 After calling <link to="#refreshState" />, a medium is considered
8734 <i>accessible</i> if its storage unit can be read. In that case, the
8735 <link to="#state"/> attribute has a value of "Created". If the storage
8736 unit cannot be read (for example, because it is located on a disconnected
8737 network resource, or was accidentally deleted outside VirtualBox),
8738 the medium is considered <i>inaccessible</i>, which is indicated by the
8739 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8740 obtained by reading the <link to="#lastAccessError"/> attribute.
8741
8742 <h3>Medium types</h3>
8743
8744 There are four types of medium behavior (see <link to="MediumType" />):
8745 "normal", "immutable", "writethrough" and "shareable", represented by the
8746 <link to="#type"/> attribute. The type of the medium defines how the
8747 medium is attached to a virtual machine and what happens when a
8748 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8749 attached medium is taken. At the moment DVD and floppy media are always
8750 of type "writethrough".
8751
8752 All media can be also divided in two groups: <i>base</i> media and
8753 <i>differencing</i> media. A base medium contains all sectors of the
8754 medium data in its own storage and therefore can be used independently.
8755 In contrast, a differencing mediun is a "delta" to some other medium and
8756 contains only those sectors which differ from that other medium, which is
8757 then called a <i>parent</i>. The differencing medium is said to be
8758 <i>linked to</i> that parent. The parent may be itself a differencing
8759 medium, thus forming a chain of linked media. The last element in that
8760 chain must always be a base medium. Note that several differencing
8761 media may be linked to the same parent medium.
8762
8763 Differencing media can be distinguished from base media by querying the
8764 <link to="#parent"/> attribute: base media do not have parents they would
8765 depend on, so the value of this attribute is always @c null for them.
8766 Using this attribute, it is possible to walk up the medium tree (from the
8767 child medium to its parent). It is also possible to walk down the tree
8768 using the <link to="#children"/> attribute.
8769
8770 Note that the type of all differencing media is "normal"; all other
8771 values are meaningless for them. Base media may be of any type.
8772
8773 <h3>Creating hard disks</h3>
8774
8775 New base hard disks are created using
8776 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8777 opened using <link to="IVirtualBox::openMedium"/>. Differencing hard
8778 disks are usually implicitly created by VirtualBox when needed but may
8779 also be created explicitly using <link to="#createDiffStorage"/>.
8780
8781 After the hard disk is successfully created (including the storage unit)
8782 or opened, it becomes a known hard disk (remembered in the internal media
8783 registry). Known hard disks can be attached to a virtual machine, accessed
8784 through <link to="IVirtualBox::findMedium"/> or enumerated using the
8785 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8786
8787 The following methods, besides <link to="IMedium::close"/>,
8788 automatically remove the hard disk from the media registry:
8789 <ul>
8790 <li><link to="#deleteStorage"/></li>
8791 <li><link to="#mergeTo"/></li>
8792 </ul>
8793
8794 If the storage unit of the hard disk is a regular file in the host's
8795 file system then the rules stated in the description of the
8796 <link to="IMedium::location"/> attribute apply when setting its value.
8797
8798 <h4>Automatic composition of the file name part</h4>
8799
8800 Another extension to the <link to="IMedium::location"/> attribute is that
8801 there is a possibility to cause VirtualBox to compose a unique value for
8802 the file name part of the location using the UUID of the hard disk. This
8803 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
8804 e.g. before the storage unit is created, and works as follows. You set the
8805 value of the <link to="IMedium::location"/> attribute to a location
8806 specification which only contains the path specification but not the file
8807 name part and ends with either a forward slash or a backslash character.
8808 In response, VirtualBox will generate a new UUID for the hard disk and
8809 compose the file name using the following pattern:
8810 <pre>
8811 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8812 </pre>
8813 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8814 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8815 is the default extension for the storage format of this hard disk. After
8816 that, you may call any of the methods that create a new hard disk storage
8817 unit and they will use the generated UUID and file name.
8818
8819 <h3>Attaching Hard Disks</h3>
8820
8821 Hard disks are attached to virtual machines using the
8822 <link to="IMachine::attachDevice"/> method and detached using the
8823 <link to="IMachine::detachDevice"/> method. Depending on their
8824 <link to="#type"/>, hard disks are attached either
8825 <i>directly</i> or <i>indirectly</i>.
8826
8827 When a hard disk is being attached directly, it is associated with the
8828 virtual machine and used for hard disk operations when the machine is
8829 running. When a hard disk is being attached indirectly, a new differencing
8830 hard disk linked to it is implicitly created and this differencing hard
8831 disk is associated with the machine and used for hard disk operations.
8832 This also means that if <link to="IMachine::attachDevice"/> performs
8833 a direct attachment then the same hard disk will be returned in response
8834 to the subsequent <link to="IMachine::getMedium"/> call; however if
8835 an indirect attachment is performed then
8836 <link to="IMachine::getMedium"/> will return the implicitly created
8837 differencing hard disk, not the original one passed to <link
8838 to="IMachine::attachDevice"/>. In detail:
8839
8840 <ul>
8841 <li><b>Normal base</b> hard disks that do not have children (i.e.
8842 differencing hard disks linked to them) and that are not already
8843 attached to virtual machines in snapshots are attached <b>directly</b>.
8844 Otherwise, they are attached <b>indirectly</b> because having
8845 dependent children or being part of the snapshot makes it impossible
8846 to modify hard disk contents without breaking the integrity of the
8847 dependent party. The <link to="#readOnly"/> attribute allows to
8848 quickly determine the kind of the attachment for the given hard
8849 disk. Note that if a normal base hard disk is to be indirectly
8850 attached to a virtual machine with snapshots then a special
8851 procedure called <i>smart attachment</i> is performed (see below).</li>
8852 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
8853 they are attached <b>directly</b> if they do not have children and are
8854 not attached to virtual machines in snapshots, and <b>indirectly</b>
8855 otherwise. Note that the smart attachment procedure is never performed
8856 for differencing hard disks.</li>
8857 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
8858 they are designed to be non-writable. If an immutable hard disk is
8859 attached to a virtual machine with snapshots then a special
8860 procedure called smart attachment is performed (see below).</li>
8861 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
8862 also as designed. This also means that writethrough hard disks cannot
8863 have other hard disks linked to them at all.</li>
8864 <li><b>Shareable</b> hard disks are always attached <b>directly</b>,
8865 also as designed. This also means that shareable hard disks cannot
8866 have other hard disks linked to them at all. They behave almost
8867 like writethrough hard disks, except that shareable hard disks can
8868 be attached to several virtual machines which are running, allowing
8869 concurrent accesses. You need special cluster software running in
8870 the virtual machines to make use of such disks.</li>
8871 </ul>
8872
8873 Note that the same hard disk, regardless of its type, may be attached to
8874 more than one virtual machine at a time. In this case, the machine that is
8875 started first gains exclusive access to the hard disk and attempts to
8876 start other machines having this hard disk attached will fail until the
8877 first machine is powered down.
8878
8879 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8880 that the given hard disk remains associated with the given machine after a
8881 successful <link to="IMachine::detachDevice"/> call until
8882 <link to="IMachine::saveSettings"/> is called to save all changes to
8883 machine settings to disk. This deferring is necessary to guarantee that
8884 the hard disk configuration may be restored at any time by a call to
8885 <link to="IMachine::discardSettings"/> before the settings
8886 are saved (committed).
8887
8888 Note that if <link to="IMachine::discardSettings"/> is called after
8889 indirectly attaching some hard disks to the machine but before a call to
8890 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8891 all differencing hard disks implicitly created by
8892 <link to="IMachine::attachDevice"/> for these indirect attachments.
8893 Such implicitly created hard disks will also be immediately deleted when
8894 detached explicitly using the <link to="IMachine::detachDevice"/>
8895 call if it is made before <link to="IMachine::saveSettings"/>. This
8896 implicit deletion is safe because newly created differencing hard
8897 disks do not contain any user data.
8898
8899 However, keep in mind that detaching differencing hard disks that were
8900 implicitly created by <link to="IMachine::attachDevice"/>
8901 before the last <link to="IMachine::saveSettings"/> call will
8902 <b>not</b> implicitly delete them as they may already contain some data
8903 (for example, as a result of virtual machine execution). If these hard
8904 disks are no more necessary, the caller can always delete them explicitly
8905 using <link to="#deleteStorage"/> after they are actually de-associated
8906 from this machine by the <link to="IMachine::saveSettings"/> call.
8907
8908 <h3>Smart Attachment</h3>
8909
8910 When normal base or immutable hard disks are indirectly attached to a
8911 virtual machine then some additional steps are performed to make sure the
8912 virtual machine will have the most recent "view" of the hard disk being
8913 attached. These steps include walking through the machine's snapshots
8914 starting from the current one and going through ancestors up to the first
8915 snapshot. Hard disks attached to the virtual machine in all
8916 of the encountered snapshots are checked whether they are descendants of
8917 the given normal base or immutable hard disk. The first found child (which
8918 is the differencing hard disk) will be used instead of the normal base or
8919 immutable hard disk as a parent for creating a new differencing hard disk
8920 that will be actually attached to the machine. And only if no descendants
8921 are found or if the virtual machine does not have any snapshots then the
8922 normal base or immutable hard disk will be used itself as a parent for
8923 this differencing hard disk.
8924
8925 It is easier to explain what smart attachment does using the
8926 following example:
8927 <pre>
8928BEFORE attaching B.vdi: AFTER attaching B.vdi:
8929
8930Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8931 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8932 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8933 Snapshot 4 (none) Snapshot 4 (none)
8934 CurState (none) CurState (D3->D2.vdi)
8935
8936 NOT
8937 ...
8938 CurState (D3->B.vdi)
8939 </pre>
8940 The first column is the virtual machine configuration before the base hard
8941 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8942 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8943 mean that the hard disk that is actually attached to the machine is a
8944 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8945 another hard disk, <tt>B.vdi</tt>.
8946
8947 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8948 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8949 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8950 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8951 it cannot be attached directly and needs an indirect attachment (i.e.
8952 implicit creation of a new differencing hard disk). Due to the smart
8953 attachment procedure, the new differencing hard disk
8954 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8955 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8956 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8957 machine.
8958
8959 Note that if there is more than one descendant hard disk of the given base
8960 hard disk found in a snapshot, and there is an exact device, channel and
8961 bus match, then this exact match will be used. Otherwise, the youngest
8962 descendant will be picked up.
8963
8964 There is one more important aspect of the smart attachment procedure which
8965 is not related to snapshots at all. Before walking through the snapshots
8966 as described above, the backup copy of the current list of hard disk
8967 attachment is searched for descendants. This backup copy is created when
8968 the hard disk configuration is changed for the first time after the last
8969 <link to="IMachine::saveSettings"/> call and used by
8970 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8971 changes. When such a descendant is found in this backup copy, it will be
8972 simply re-attached back, without creating a new differencing hard disk for
8973 it. This optimization is necessary to make it possible to re-attach the
8974 base or immutable hard disk to a different bus, channel or device slot
8975 without losing the contents of the differencing hard disk actually
8976 attached to the machine in place of it.
8977 </desc>
8978
8979 <attribute name="id" type="uuid" mod="string" readonly="yes">
8980 <desc>
8981 UUID of the medium. For a newly created medium, this value is a randomly
8982 generated UUID.
8983
8984 <note>
8985 For media in one of MediumState_NotCreated, MediumState_Creating or
8986 MediumState_Deleting states, the value of this property is undefined
8987 and will most likely be an empty UUID.
8988 </note>
8989 </desc>
8990 </attribute>
8991
8992 <attribute name="description" type="wstring">
8993 <desc>
8994 Optional description of the medium. For a newly created medium the value
8995 of this attribute is an empty string.
8996
8997 Medium types that don't support this attribute will return E_NOTIMPL in
8998 attempt to get or set this attribute's value.
8999
9000 <note>
9001 For some storage types, reading this attribute may return an outdated
9002 (last known) value when <link to="#state"/> is <link
9003 to="MediumState_Inaccessible"/> or <link
9004 to="MediumState_LockedWrite"/> because the value of this attribute is
9005 stored within the storage unit itself. Also note that changing the
9006 attribute value is not possible in such case, as well as when the
9007 medium is the <link to="MediumState_LockedRead"/> state.
9008 </note>
9009 </desc>
9010 </attribute>
9011
9012 <attribute name="state" type="MediumState" readonly="yes">
9013 <desc>
9014 Returns the current medium state, which is the last state set by
9015 the accessibility check performed by <link to="#refreshState"/>.
9016 If that method has not yet been called on the medium, the state
9017 is "Inaccessible"; as opposed to truly inaccessible media, the
9018 value of <link to="#lastAccessError"/> will be an empty string in
9019 that case.
9020
9021 <note>As of version 3.1, this no longer performs an accessibility check
9022 automatically; call <link to="#refreshState"/> for that.
9023 </note>
9024 </desc>
9025 </attribute>
9026
9027 <attribute name="variant" type="MediumVariant" readonly="yes">
9028 <desc>
9029 Returns the storage format variant information for this medium.
9030 Before <link to="#refreshState"/> is called this method returns
9031 an undefined value.
9032 </desc>
9033 </attribute>
9034
9035 <attribute name="location" type="wstring">
9036 <desc>
9037 Location of the storage unit holding medium data.
9038
9039 The format of the location string is medium type specific. For medium
9040 types using regular files in a host's file system, the location
9041 string is the full file name.
9042
9043 Some medium types may support changing the storage unit location by
9044 simply changing the value of this property. If this operation is not
9045 supported, the implementation will return E_NOTIMPL in attempt to set
9046 this attribute's value.
9047
9048 When setting a value of the location attribute which is a regular file
9049 in the host's file system, the given file name may be either relative to
9050 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
9051 absolute. Note that if the given location specification does not contain
9052 the file extension part then a proper default extension will be
9053 automatically appended by the implementation depending on the medium type.
9054 </desc>
9055 </attribute>
9056
9057 <attribute name="name" type="wstring" readonly="yes">
9058 <desc>
9059 Name of the storage unit holding medium data.
9060
9061 The returned string is a short version of the <link to="#location"/>
9062 attribute that is suitable for representing the medium in situations
9063 where the full location specification is too long (such as lists
9064 and comboboxes in GUI frontends). This string is also used by frontends
9065 to sort the media list alphabetically when needed.
9066
9067 For example, for locations that are regular files in the host's file
9068 system, the value of this attribute is just the file name (+ extension),
9069 without the path specification.
9070
9071 Note that as opposed to the <link to="#location"/> attribute, the name
9072 attribute will not necessary be unique for a list of media of the
9073 given type and format.
9074 </desc>
9075 </attribute>
9076
9077 <attribute name="deviceType" type="DeviceType" readonly="yes">
9078 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
9079 medium.</desc>
9080 </attribute>
9081
9082 <attribute name="hostDrive" type="boolean" readonly="yes">
9083 <desc>True if this corresponds to a drive on the host.</desc>
9084 </attribute>
9085
9086 <attribute name="size" type="long long" readonly="yes">
9087 <desc>
9088 Physical size of the storage unit used to hold medium data (in bytes).
9089
9090 <note>
9091 For media whose <link to="#state"/> is <link
9092 to="MediumState_Inaccessible"/>, the value of this property is the
9093 last known size. For <link to="MediumState_NotCreated"/> media,
9094 the returned value is zero.
9095 </note>
9096 </desc>
9097 </attribute>
9098
9099 <attribute name="format" type="wstring" readonly="yes">
9100 <desc>
9101 Storage format of this medium.
9102
9103 The value of this attribute is a string that specifies a backend used
9104 to store medium data. The storage format is defined when you create a
9105 new medium or automatically detected when you open an existing medium,
9106 and cannot be changed later.
9107
9108 The list of all storage formats supported by this VirtualBox
9109 installation can be obtained using
9110 <link to="ISystemProperties::mediumFormats"/>.
9111 </desc>
9112 </attribute>
9113
9114 <attribute name="mediumFormat" type="IMediumFormat" readonly="yes">
9115 <desc>
9116 Storage medium format object corresponding to this medium.
9117
9118 The value of this attribute is a reference to the medium format object
9119 that specifies the backend properties used to store medium data. The
9120 storage format is defined when you create a new medium or automatically
9121 detected when you open an existing medium, and cannot be changed later.
9122
9123 <note>@c null is returned if there is no associated medium format
9124 object. This can e.g. happen for medium objects representing host
9125 drives and other special medium objects.</note>
9126 </desc>
9127 </attribute>
9128
9129 <attribute name="type" type="MediumType">
9130 <desc>
9131 Type (role) of this medium.
9132
9133 The following constraints apply when changing the value of this
9134 attribute:
9135 <ul>
9136 <li>If a medium is attached to a virtual machine (either in the
9137 current state or in one of the snapshots), its type cannot be
9138 changed.
9139 </li>
9140 <li>As long as the medium has children, its type cannot be set
9141 to <link to="MediumType_Writethrough"/>.
9142 </li>
9143 <li>The type of all differencing media is
9144 <link to="MediumType_Normal"/> and cannot be changed.
9145 </li>
9146 </ul>
9147
9148 The type of a newly created or opened medium is set to
9149 <link to="MediumType_Normal"/>, except for DVD and floppy media,
9150 which have a type of <link to="MediumType_Writethrough"/>.
9151 </desc>
9152 </attribute>
9153
9154 <attribute name="parent" type="IMedium" readonly="yes">
9155 <desc>
9156 Parent of this medium (the medium this medium is directly based
9157 on).
9158
9159 Only differencing media have parents. For base (non-differencing)
9160 media, @c null is returned.
9161 </desc>
9162 </attribute>
9163
9164 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
9165 <desc>
9166 Children of this medium (all differencing media directly based
9167 on this medium). A @c null array is returned if this medium
9168 does not have any children.
9169 </desc>
9170 </attribute>
9171
9172 <attribute name="base" type="IMedium" readonly="yes">
9173 <desc>
9174 Base medium of this medium.
9175
9176 If this is a differencing medium, its base medium is the medium
9177 the given medium branch starts from. For all other types of media, this
9178 property returns the medium object itself (i.e. the same object this
9179 property is read on).
9180 </desc>
9181 </attribute>
9182
9183 <attribute name="readOnly" type="boolean" readonly="yes">
9184 <desc>
9185 Returns @c true if this medium is read-only and @c false otherwise.
9186
9187 A medium is considered to be read-only when its contents cannot be
9188 modified without breaking the integrity of other parties that depend on
9189 this medium such as its child media or snapshots of virtual machines
9190 where this medium is attached to these machines. If there are no
9191 children and no such snapshots then there is no dependency and the
9192 medium is not read-only.
9193
9194 The value of this attribute can be used to determine the kind of the
9195 attachment that will take place when attaching this medium to a
9196 virtual machine. If the value is @c false then the medium will
9197 be attached directly. If the value is @c true then the medium
9198 will be attached indirectly by creating a new differencing child
9199 medium for that. See the interface description for more information.
9200
9201 Note that all <link to="MediumType_Immutable">Immutable</link> media
9202 are always read-only while all
9203 <link to="MediumType_Writethrough">Writethrough</link> media are
9204 always not.
9205
9206 <note>
9207 The read-only condition represented by this attribute is related to
9208 the medium type and usage, not to the current
9209 <link to="IMedium::state">medium state</link> and not to the read-only
9210 state of the storage unit.
9211 </note>
9212 </desc>
9213 </attribute>
9214
9215 <attribute name="logicalSize" type="long long" readonly="yes">
9216 <desc>
9217 Logical size of this medium (in bytes), as reported to the
9218 guest OS running inside the virtual machine this medium is
9219 attached to. The logical size is defined when the medium is created
9220 and cannot be changed later.
9221
9222 <note>
9223 Reading this property on a differencing medium will return the size
9224 of its <link to="#base"/> medium.
9225 </note>
9226 <note>
9227 For media whose state is <link to="#state"/> is <link
9228 to="MediumState_Inaccessible"/>, the value of this property is the
9229 last known logical size. For <link to="MediumState_NotCreated"/>
9230 media, the returned value is zero.
9231 </note>
9232 </desc>
9233 </attribute>
9234
9235 <attribute name="autoReset" type="boolean">
9236 <desc>
9237 Whether this differencing medium will be automatically reset each
9238 time a virtual machine it is attached to is powered up. This
9239 attribute is automatically set to @c true for the last
9240 differencing image of an "immutable" medium (see
9241 <link to="MediumType" />).
9242
9243 See <link to="#reset"/> for more information about resetting
9244 differencing media.
9245
9246 <note>
9247 Reading this property on a base (non-differencing) medium will
9248 always @c false. Changing the value of this property in this
9249 case is not supported.
9250 </note>
9251
9252 <result name="VBOX_E_NOT_SUPPORTED">
9253 This is not a differencing medium (when changing the attribute
9254 value).
9255 </result>
9256 </desc>
9257 </attribute>
9258
9259 <attribute name="lastAccessError" type="wstring" readonly="yes">
9260 <desc>
9261 Text message that represents the result of the last accessibility
9262 check performed by <link to="#refreshState"/>.
9263
9264 An empty string is returned if the last accessibility check
9265 was successful or has not yet been called. As a result, if
9266 <link to="#state" /> is "Inaccessible" and this attribute is empty,
9267 then <link to="#refreshState"/> has yet to be called; this is the
9268 default value of media after VirtualBox initialization.
9269 A non-empty string indicates a failure and should normally describe
9270 a reason of the failure (for example, a file read error).
9271 </desc>
9272 </attribute>
9273
9274 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9275 <desc>
9276 Array of UUIDs of all machines this medium is attached to.
9277
9278 A @c null array is returned if this medium is not attached to any
9279 machine or to any machine's snapshot.
9280
9281 <note>
9282 The returned array will include a machine even if this medium is not
9283 attached to that machine in the current state but attached to it in
9284 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9285 details.
9286 </note>
9287 </desc>
9288 </attribute>
9289
9290 <method name="setIDs">
9291 <desc>
9292 Changes the UUID and parent UUID for a hard disk medium.
9293 </desc>
9294 <param name="setImageId" type="boolean" dir="in">
9295 <desc>
9296 Select whether a new image UUID is set or not.
9297 </desc>
9298 </param>
9299 <param name="imageId" type="uuid" mod="string" dir="in">
9300 <desc>
9301 New UUID for the image. If an empty string is passed, then a new
9302 UUID is automatically created, provided that @a setImageId is @c true.
9303 Specifying a zero UUID is not allowed.
9304 </desc>
9305 </param>
9306 <param name="setParentId" type="boolean" dir="in">
9307 <desc>
9308 Select whether a new parent UUID is set or not.
9309 </desc>
9310 </param>
9311 <param name="parentId" type="uuid" mod="string" dir="in">
9312 <desc>
9313 New parent UUID for the image. If an empty string is passed, then a
9314 new UUID is automatically created, provided @a setParentId is
9315 @c true. A zero UUID is valid.
9316 </desc>
9317 </param>
9318 <result name="E_INVALIDARG">
9319 Invalid parameter combination.
9320 </result>
9321 <result name="VBOX_E_NOT_SUPPORTED">
9322 Medium is not a hard disk medium.
9323 </result>
9324 </method>
9325
9326 <method name="refreshState">
9327 <desc>
9328 If the current medium state (see <link to="MediumState"/>) is one of
9329 "Created", "Inaccessible" or "LockedRead", then this performs an
9330 accessibility check on the medium and sets the value of the <link to="#state"/>
9331 attribute accordingly; that value is also returned for convenience.
9332
9333 For all other state values, this does not perform a refresh but returns
9334 the state only.
9335
9336 The refresh, if performed, may take a long time (several seconds or even
9337 minutes, depending on the storage unit location and format) because it performs an
9338 accessibility check of the storage unit. This check may cause a significant
9339 delay if the storage unit of the given medium is, for example, a file located
9340 on a network share which is not currently accessible due to connectivity
9341 problems. In that case, the call will not return until a timeout
9342 interval defined by the host OS for this operation expires. For this reason,
9343 it is recommended to never read this attribute on the main UI thread to avoid
9344 making the UI unresponsive.
9345
9346 If the last known state of the medium is "Created" and the accessibility
9347 check fails, then the state would be set to "Inaccessible", and
9348 <link to="#lastAccessError"/> may be used to get more details about the
9349 failure. If the state of the medium is "LockedRead", then it remains the
9350 same, and a non-empty value of <link to="#lastAccessError"/> will
9351 indicate a failed accessibility check in this case.
9352
9353 Note that not all medium states are applicable to all medium types.
9354 </desc>
9355 <param name="state" type="MediumState" dir="return">
9356 <desc>
9357 New medium state.
9358 </desc>
9359 </param>
9360 </method>
9361
9362 <method name="getSnapshotIds">
9363 <desc>
9364 Returns an array of UUIDs of all snapshots of the given machine where
9365 this medium is attached to.
9366
9367 If the medium is attached to the machine in the current state, then the
9368 first element in the array will always be the ID of the queried machine
9369 (i.e. the value equal to the @c machineId argument), followed by
9370 snapshot IDs (if any).
9371
9372 If the medium is not attached to the machine in the current state, then
9373 the array will contain only snapshot IDs.
9374
9375 The returned array may be @c null if this medium is not attached
9376 to the given machine at all, neither in the current state nor in one of
9377 the snapshots.
9378 </desc>
9379 <param name="machineId" type="uuid" mod="string" dir="in">
9380 <desc>
9381 UUID of the machine to query.
9382 </desc>
9383 </param>
9384 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9385 <desc>
9386 Array of snapshot UUIDs of the given machine using this medium.
9387 </desc>
9388 </param>
9389 </method>
9390
9391 <method name="lockRead">
9392 <desc>
9393 Locks this medium for reading.
9394
9395 A read lock is shared: many clients can simultaneously lock the
9396 same medium for reading unless it is already locked for writing (see
9397 <link to="#lockWrite"/>) in which case an error is returned.
9398
9399 When the medium is locked for reading, it cannot be modified
9400 from within VirtualBox. This means that any method that changes
9401 the properties of this medium or contents of the storage unit
9402 will return an error (unless explicitly stated otherwise). That
9403 includes an attempt to start a virtual machine that wants to
9404 write to the the medium.
9405
9406 When the virtual machine is started up, it locks for reading all
9407 media it uses in read-only mode. If some medium cannot be locked
9408 for reading, the startup procedure will fail.
9409 A medium is typically locked for reading while it is used by a running
9410 virtual machine but has a depending differencing image that receives
9411 the actual write operations. This way one base medium can have
9412 multiple child differencing images which can be written to
9413 simultaneously. Read-only media such as DVD and floppy images are
9414 also locked for reading only (so they can be in use by multiple
9415 machines simultaneously).
9416
9417 A medium is also locked for reading when it is the source of a
9418 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9419
9420 The medium locked for reading must be unlocked using the <link
9421 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9422 can be nested and must be followed by the same number of paired
9423 <link to="#unlockRead"/> calls.
9424
9425 This method sets the medium state (see <link to="#state"/>) to
9426 "LockedRead" on success. The medium's previous state must be
9427 one of "Created", "Inaccessible" or "LockedRead".
9428
9429 Locking an inaccessible medium is not an error; this method performs
9430 a logical lock that prevents modifications of this medium through
9431 the VirtualBox API, not a physical file-system lock of the underlying
9432 storage unit.
9433
9434 This method returns the current state of the medium
9435 <i>before</i> the operation.
9436
9437 <result name="VBOX_E_INVALID_OBJECT_STATE">
9438 Invalid medium state (e.g. not created, locked, inaccessible,
9439 creating, deleting).
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="unlockRead">
9451 <desc>
9452 Cancels the read lock previously set by <link to="#lockRead"/>.
9453
9454 For both success and failure, this method returns the current state
9455 of the medium <i>after</i> the operation.
9456
9457 See <link to="#lockRead"/> for more details.
9458
9459 <result name="VBOX_E_INVALID_OBJECT_STATE">
9460 Medium not locked for reading.
9461 </result>
9462
9463 </desc>
9464 <param name="state" type="MediumState" dir="return">
9465 <desc>
9466 State of the medium after the operation.
9467 </desc>
9468 </param>
9469 </method>
9470
9471 <method name="lockWrite">
9472 <desc>
9473 Locks this medium for writing.
9474
9475 A write lock, as opposed to <link to="#lockRead"/>, is
9476 exclusive: there may be only one client holding a write lock,
9477 and there may be no read locks while the write lock is held.
9478 As a result, read-locking fails if a write lock is held, and
9479 write-locking fails if either a read or another write lock is held.
9480
9481 When a medium is locked for writing, it cannot be modified
9482 from within VirtualBox, and it is not guaranteed that the values
9483 of its properties are up-to-date. Any method that changes the
9484 properties of this medium or contents of the storage unit will
9485 return an error (unless explicitly stated otherwise).
9486
9487 When a virtual machine is started up, it locks for writing all
9488 media it uses to write data to. If any medium could not be locked
9489 for writing, the startup procedure will fail. If a medium has
9490 differencing images, then while the machine is running, only
9491 the last ("leaf") differencing image is locked for writing,
9492 whereas its parents are locked for reading only.
9493
9494 A medium is also locked for writing when it is the target of a
9495 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9496
9497 The medium locked for writing must be unlocked using the <link
9498 to="#unlockWrite"/> method. Write locks <i>cannot</i> be nested.
9499
9500 This method sets the medium state (see <link to="#state"/>) to
9501 "LockedWrite" on success. The medium's previous state must be
9502 either "Created" or "Inaccessible".
9503
9504 Locking an inaccessible medium is not an error; this method performs
9505 a logical lock that prevents modifications of this medium through
9506 the VirtualBox API, not a physical file-system lock of the underlying
9507 storage unit.
9508
9509 For both, success and failure, this method returns the current
9510 state of the medium <i>before</i> the operation.
9511
9512 <result name="VBOX_E_INVALID_OBJECT_STATE">
9513 Invalid medium state (e.g. not created, locked, inaccessible,
9514 creating, deleting).
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="unlockWrite">
9526 <desc>
9527 Cancels the write lock previously set by <link to="#lockWrite"/>.
9528
9529 For both success and failure, this method returns the current
9530 state of the medium <i>after</i> the operation.
9531
9532 See <link to="#lockWrite"/> for more details.
9533
9534 <result name="VBOX_E_INVALID_OBJECT_STATE">
9535 Medium not locked for writing.
9536 </result>
9537
9538 </desc>
9539 <param name="state" type="MediumState" dir="return">
9540 <desc>
9541 State of the medium after the operation.
9542 </desc>
9543 </param>
9544 </method>
9545
9546 <method name="close">
9547 <desc>
9548 Closes this medium.
9549
9550 The medium must not be attached to any known virtual machine
9551 and must not have any known child media, otherwise the
9552 operation will fail.
9553
9554 When the medium is successfully closed, it is removed from
9555 the list of registered media, but its storage unit is not
9556 deleted. In particular, this means that this medium can
9557 later be opened again using the <link to="IVirtualBox::openMedium"/>
9558 call.
9559
9560 Note that after this method successfully returns, the given medium
9561 object becomes uninitialized. This means that any attempt
9562 to call any of its methods or attributes will fail with the
9563 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9564
9565 <result name="VBOX_E_INVALID_OBJECT_STATE">
9566 Invalid medium state (other than not created, created or
9567 inaccessible).
9568 </result>
9569 <result name="VBOX_E_OBJECT_IN_USE">
9570 Medium attached to virtual machine.
9571 </result>
9572 <result name="VBOX_E_FILE_ERROR">
9573 Settings file not accessible.
9574 </result>
9575 <result name="VBOX_E_XML_ERROR">
9576 Could not parse the settings file.
9577 </result>
9578
9579 </desc>
9580 </method>
9581
9582 <!-- storage methods -->
9583
9584 <method name="getProperty">
9585 <desc>
9586 Returns the value of the custom medium property with the given name.
9587
9588 The list of all properties supported by the given medium format can
9589 be obtained with <link to="IMediumFormat::describeProperties"/>.
9590
9591 Note that if this method returns an empty string in @a value, the
9592 requested property is supported but currently not assigned any value.
9593
9594 <result name="VBOX_E_OBJECT_NOT_FOUND">
9595 Requested property does not exist (not supported by the format).
9596 </result>
9597 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9598 </desc>
9599 <param name="name" type="wstring" dir="in">
9600 <desc>Name of the property to get.</desc>
9601 </param>
9602 <param name="value" type="wstring" dir="return">
9603 <desc>Current property value.</desc>
9604 </param>
9605 </method>
9606
9607 <method name="setProperty">
9608 <desc>
9609 Sets the value of the custom medium property with the given name.
9610
9611 The list of all properties supported by the given medium format can
9612 be obtained with <link to="IMediumFormat::describeProperties"/>.
9613
9614 Note that setting the property value to @c null or an empty string is
9615 equivalent to deleting the existing value. A default value (if it is
9616 defined for this property) will be used by the format backend in this
9617 case.
9618
9619 <result name="VBOX_E_OBJECT_NOT_FOUND">
9620 Requested property does not exist (not supported by the format).
9621 </result>
9622 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9623 </desc>
9624 <param name="name" type="wstring" dir="in">
9625 <desc>Name of the property to set.</desc>
9626 </param>
9627 <param name="value" type="wstring" dir="in">
9628 <desc>Property value to set.</desc>
9629 </param>
9630 </method>
9631
9632 <method name="getProperties">
9633 <desc>
9634 Returns values for a group of properties in one call.
9635
9636 The names of the properties to get are specified using the @a names
9637 argument which is a list of comma-separated property names or
9638 an empty string if all properties are to be returned. Note that currently
9639 the value of this argument is ignored and the method always returns all
9640 existing properties.
9641
9642 The list of all properties supported by the given medium format can
9643 be obtained with <link to="IMediumFormat::describeProperties"/>.
9644
9645 The method returns two arrays, the array of property names corresponding
9646 to the @a names argument and the current values of these properties.
9647 Both arrays have the same number of elements with each elemend at the
9648 given index in the first array corresponds to an element at the same
9649 index in the second array.
9650
9651 Note that for properties that do not have assigned values,
9652 an empty string is returned at the appropriate index in the
9653 @a returnValues array.
9654
9655 </desc>
9656 <param name="names" type="wstring" dir="in">
9657 <desc>
9658 Names of properties to get.
9659 </desc>
9660 </param>
9661 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9662 <desc>Names of returned properties.</desc>
9663 </param>
9664 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9665 <desc>Values of returned properties.</desc>
9666 </param>
9667 </method>
9668
9669 <method name="setProperties">
9670 <desc>
9671 Sets values for a group of properties in one call.
9672
9673 The names of the properties to set are passed in the @a names
9674 array along with the new values for them in the @a values array. Both
9675 arrays have the same number of elements with each elemend at the given
9676 index in the first array corresponding to an element at the same index
9677 in the second array.
9678
9679 If there is at least one property name in @a names that is not valid,
9680 the method will fail before changing the values of any other properties
9681 from the @a names array.
9682
9683 Using this method over <link to="#setProperty"/> is preferred if you
9684 need to set several properties at once since it will result into less
9685 IPC calls.
9686
9687 The list of all properties supported by the given medium format can
9688 be obtained with <link to="IMediumFormat::describeProperties"/>.
9689
9690 Note that setting the property value to @c null or an empty string is
9691 equivalent to deleting the existing value. A default value (if it is
9692 defined for this property) will be used by the format backend in this
9693 case.
9694 </desc>
9695 <param name="names" type="wstring" safearray="yes" dir="in">
9696 <desc>Names of properties to set.</desc>
9697 </param>
9698 <param name="values" type="wstring" safearray="yes" dir="in">
9699 <desc>Values of properties to set.</desc>
9700 </param>
9701 </method>
9702
9703 <!-- storage methods -->
9704
9705 <method name="createBaseStorage">
9706 <desc>
9707 Starts creating a hard disk storage unit (fixed/dynamic, according
9708 to the variant flags) in in the background. The previous storage unit
9709 created for this object, if any, must first be deleted using
9710 <link to="#deleteStorage"/>, otherwise the operation will fail.
9711
9712 Before the operation starts, the medium is placed in
9713 <link to="MediumState_Creating"/> state. If the create operation
9714 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
9715 state.
9716
9717 After the returned progress object reports that the operation has
9718 successfully completed, the medium state will be set to <link
9719 to="MediumState_Created"/>, the medium will be remembered by this
9720 VirtualBox installation and may be attached to virtual machines.
9721
9722 <result name="VBOX_E_NOT_SUPPORTED">
9723 The variant of storage creation operation is not supported. See <link
9724 to="IMediumFormat::capabilities"/>.
9725 </result>
9726 </desc>
9727 <param name="logicalSize" type="long long" dir="in">
9728 <desc>Maximum logical size of the medium in bytes.</desc>
9729 </param>
9730 <param name="variant" type="MediumVariant" dir="in">
9731 <desc>Exact image variant which should be created.</desc>
9732 </param>
9733 <param name="progress" type="IProgress" dir="return">
9734 <desc>Progress object to track the operation completion.</desc>
9735 </param>
9736 </method>
9737
9738 <method name="deleteStorage">
9739 <desc>
9740 Starts deleting the storage unit of this medium.
9741
9742 The medium must not be attached to any known virtual machine and must
9743 not have any known child media, otherwise the operation will fail.
9744 It will also fail if there is no storage unit to delete or if deletion
9745 is already in progress, or if the medium is being in use (locked for
9746 read or for write) or inaccessible. Therefore, the only valid state for
9747 this operation to succeed is <link to="MediumState_Created"/>.
9748
9749 Before the operation starts, the medium is placed in
9750 <link to="MediumState_Deleting"/> state and gets removed from the list
9751 of remembered hard disks (media registry). If the delete operation
9752 fails, the medium will be remembered again and placed back to
9753 <link to="MediumState_Created"/> state.
9754
9755 After the returned progress object reports that the operation is
9756 complete, the medium state will be set to
9757 <link to="MediumState_NotCreated"/> and you will be able to use one of
9758 the storage creation methods to create it again.
9759
9760 <see>#close()</see>
9761
9762 <result name="VBOX_E_OBJECT_IN_USE">
9763 Medium is attached to a virtual machine.
9764 </result>
9765 <result name="VBOX_E_NOT_SUPPORTED">
9766 Storage deletion is not allowed because neither of storage creation
9767 operations are supported. See
9768 <link to="IMediumFormat::capabilities"/>.
9769 </result>
9770
9771 <note>
9772 If the deletion operation fails, it is not guaranteed that the storage
9773 unit still exists. You may check the <link to="IMedium::state"/> value
9774 to answer this question.
9775 </note>
9776 </desc>
9777 <param name="progress" type="IProgress" dir="return">
9778 <desc>Progress object to track the operation completion.</desc>
9779 </param>
9780 </method>
9781
9782 <!-- diff methods -->
9783
9784 <method name="createDiffStorage">
9785 <desc>
9786 Starts creating an empty differencing storage unit based on this
9787 medium in the format and at the location defined by the @a target
9788 argument.
9789
9790 The target medium must be in <link to="MediumState_NotCreated"/>
9791 state (i.e. must not have an existing storage unit). Upon successful
9792 completion, this operation will set the type of the target medium to
9793 <link to="MediumType_Normal"/> and create a storage unit necessary to
9794 represent the differencing medium data in the given format (according
9795 to the storage format of the target object).
9796
9797 After the returned progress object reports that the operation is
9798 successfully complete, the target medium gets remembered by this
9799 VirtualBox installation and may be attached to virtual machines.
9800
9801 <note>
9802 The medium will be set to <link to="MediumState_LockedRead"/>
9803 state for the duration of this operation.
9804 </note>
9805 <result name="VBOX_E_OBJECT_IN_USE">
9806 Medium not in @c NotCreated state.
9807 </result>
9808 </desc>
9809 <param name="target" type="IMedium" dir="in">
9810 <desc>Target medium.</desc>
9811 </param>
9812 <param name="variant" type="MediumVariant" dir="in">
9813 <desc>Exact image variant which should be created.</desc>
9814 </param>
9815 <param name="progress" type="IProgress" dir="return">
9816 <desc>Progress object to track the operation completion.</desc>
9817 </param>
9818 </method>
9819
9820 <method name="mergeTo">
9821 <desc>
9822 Starts merging the contents of this medium and all intermediate
9823 differencing media in the chain to the given target medium.
9824
9825 The target medium must be either a descendant of this medium or
9826 its ancestor (otherwise this method will immediately return a failure).
9827 It follows that there are two logical directions of the merge operation:
9828 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9829 ancestor (<i>backward merge</i>). Let us consider the following medium
9830 chain:
9831
9832 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9833
9834 Here, calling this method on the <tt>Base</tt> medium object with
9835 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9836 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9837 merge. Note that in both cases the contents of the resulting medium
9838 will be the same, the only difference is the medium object that takes
9839 the result of the merge operation. In case of the forward merge in the
9840 above example, the result will be written to <tt>Diff_2</tt>; in case of
9841 the backward merge, the result will be written to <tt>Base</tt>. In
9842 other words, the result of the operation is always stored in the target
9843 medium.
9844
9845 Upon successful operation completion, the storage units of all media in
9846 the chain between this (source) medium and the target medium, including
9847 the source medium itself, will be automatically deleted and the
9848 relevant medium objects (including this medium) will become
9849 uninitialized. This means that any attempt to call any of
9850 their methods or attributes will fail with the
9851 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9852 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9853 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> media.
9854 Note that <tt>Diff_2</tt> in this case will become a base medium
9855 itself since it will no longer be based on any other medium.
9856
9857 Considering the above, all of the following conditions must be met in
9858 order for the merge operation to succeed:
9859 <ul>
9860 <li>
9861 Neither this (source) medium nor any intermediate
9862 differencing medium in the chain between it and the target
9863 medium is attached to any virtual machine.
9864 </li>
9865 <li>
9866 Neither the source medium nor the target medium is an
9867 <link to="MediumType_Immutable"/> medium.
9868 </li>
9869 <li>
9870 The part of the medium tree from the source medium to the
9871 target medium is a linear chain, i.e. all medium in this
9872 chain have exactly one child which is the next medium in this
9873 chain. The only exception from this rule is the target medium in
9874 the forward merge operation; it is allowed to have any number of
9875 child media because the merge operation will not change its
9876 logical contents (as it is seen by the guest OS or by children).
9877 </li>
9878 <li>
9879 None of the involved media are in
9880 <link to="MediumState_LockedRead"/> or
9881 <link to="MediumState_LockedWrite"/> state.
9882 </li>
9883 </ul>
9884
9885 <note>
9886 This (source) medium and all intermediates will be placed to <link
9887 to="MediumState_Deleting"/> state and the target medium will be
9888 placed to <link to="MediumState_LockedWrite"/> state and for the
9889 duration of this operation.
9890 </note>
9891 </desc>
9892 <param name="target" type="IMedium" dir="in">
9893 <desc>Target medium.</desc>
9894 </param>
9895 <param name="progress" type="IProgress" dir="return">
9896 <desc>Progress object to track the operation completion.</desc>
9897 </param>
9898 </method>
9899
9900 <!-- clone method -->
9901
9902 <method name="cloneTo">
9903 <desc>
9904 Starts creating a clone of this medium in the format and at the
9905 location defined by the @a target argument.
9906
9907 The target medium must be either in <link to="MediumState_NotCreated"/>
9908 state (i.e. must not have an existing storage unit) or in
9909 <link to="MediumState_Created"/> state (i.e. created and not locked, and
9910 big enough to hold the data or else the copy will be partial). Upon
9911 successful completion, the cloned medium will contain exactly the
9912 same sector data as the medium being cloned, except that in the
9913 first case a new UUID for the clone will be randomly generated, and in
9914 the second case the UUID will remain unchanged.
9915
9916 The @a parent argument defines which medium will be the parent
9917 of the clone. Passing a @c null reference indicates that the clone will
9918 be a base image, i.e. completely independent. It is possible to specify
9919 an arbitrary medium for this parameter, including the parent of the
9920 medium which is being cloned. Even cloning to a child of the source
9921 medium is possible. Note that when cloning to an existing image, the
9922 @a parent irgument is ignored.
9923
9924 After the returned progress object reports that the operation is
9925 successfully complete, the target medium gets remembered by this
9926 VirtualBox installation and may be attached to virtual machines.
9927
9928 <note>
9929 This medium will be placed to <link to="MediumState_LockedRead"/>
9930 state for the duration of this operation.
9931 </note>
9932 <result name="E_NOTIMPL">
9933 The specified cloning variant is not supported at the moment.
9934 </result>
9935 </desc>
9936 <param name="target" type="IMedium" dir="in">
9937 <desc>Target medium.</desc>
9938 </param>
9939 <param name="variant" type="MediumVariant" dir="in">
9940 <desc>Exact image variant which should be created.</desc>
9941 </param>
9942 <param name="parent" type="IMedium" dir="in">
9943 <desc>Parent of the cloned medium.</desc>
9944 </param>
9945 <param name="progress" type="IProgress" dir="return">
9946 <desc>Progress object to track the operation completion.</desc>
9947 </param>
9948 </method>
9949
9950 <!-- other methods -->
9951
9952 <method name="compact">
9953 <desc>
9954 Starts compacting of this medium. This means that the medium is
9955 transformed into a possibly more compact storage representation.
9956 This potentially creates temporary images, which can require a
9957 substantial amount of additional disk space.
9958
9959 This medium will be placed to <link to="MediumState_LockedWrite"/>
9960 state and all its parent media (if any) will be placed to
9961 <link to="MediumState_LockedRead"/> state for the duration of this
9962 operation.
9963
9964 Please note that the results can be either returned straight away,
9965 or later as the result of the background operation via the object
9966 returned via the @a progress parameter.
9967
9968 <result name="VBOX_E_NOT_SUPPORTED">
9969 Medium format does not support compacting (but potentially
9970 needs it).
9971 </result>
9972 </desc>
9973 <param name="progress" type="IProgress" dir="return">
9974 <desc>Progress object to track the operation completion.</desc>
9975 </param>
9976 </method>
9977
9978 <method name="resize">
9979 <desc>
9980 Starts resizing this medium. This means that the nominal size of the
9981 medium is set to the new value. Both increasing and decreasing the
9982 size is possible, and there are no safety checks, since VirtualBox
9983 does not make any assumptions about the medium contents.
9984
9985 Resizing usually needs additional disk space, and possibly also
9986 some temporary disk space. Note that resize does not create a full
9987 temporary copy of the medium, so the additional disk space requirement
9988 is usually much lower than using the clone operation.
9989
9990 This medium will be placed to <link to="MediumState_LockedWrite"/>
9991 state for the duration of this operation.
9992
9993 Please note that the results can be either returned straight away,
9994 or later as the result of the background operation via the object
9995 returned via the @a progress parameter.
9996
9997 <result name="VBOX_E_NOT_SUPPORTED">
9998 Medium format does not support resizing.
9999 </result>
10000 </desc>
10001 <param name="logicalSize" type="long long" dir="in">
10002 <desc>New nominal capacity of the medium in bytes.</desc>
10003 </param>
10004 <param name="progress" type="IProgress" dir="return">
10005 <desc>Progress object to track the operation completion.</desc>
10006 </param>
10007 </method>
10008
10009 <method name="reset">
10010 <desc>
10011 Starts erasing the contents of this differencing medium.
10012
10013 This operation will reset the differencing medium to its initial
10014 state when it does not contain any sector data and any read operation is
10015 redirected to its parent medium. This automatically gets called
10016 during VM power-up for every medium whose <link to="#autoReset" />
10017 attribute is @c true.
10018
10019 The medium will be write-locked for the duration of this operation (see
10020 <link to="#lockWrite" />).
10021
10022 <result name="VBOX_E_NOT_SUPPORTED">
10023 This is not a differencing medium.
10024 </result>
10025 <result name="VBOX_E_INVALID_OBJECT_STATE">
10026 Medium is not in <link to="MediumState_Created"/> or
10027 <link to="MediumState_Inaccessible"/> state.
10028 </result>
10029 </desc>
10030 <param name="progress" type="IProgress" dir="return">
10031 <desc>Progress object to track the operation completion.</desc>
10032 </param>
10033 </method>
10034
10035 </interface>
10036
10037
10038 <!--
10039 // IMediumFormat
10040 /////////////////////////////////////////////////////////////////////////
10041 -->
10042
10043 <enum
10044 name="DataType"
10045 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
10046 >
10047 <const name="Int32" value="0"/>
10048 <const name="Int8" value="1"/>
10049 <const name="String" value="2"/>
10050 </enum>
10051
10052 <enum
10053 name="DataFlags"
10054 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
10055 >
10056 <const name="None" value="0x00"/>
10057 <const name="Mandatory" value="0x01"/>
10058 <const name="Expert" value="0x02"/>
10059 <const name="Array" value="0x04"/>
10060 <const name="FlagMask" value="0x07"/>
10061 </enum>
10062
10063 <enum
10064 name="MediumFormatCapabilities"
10065 uuid="7342ba79-7ce0-4d94-8f86-5ed5a185d9bd"
10066 >
10067 <desc>
10068 Medium format capability flags.
10069 </desc>
10070
10071 <const name="Uuid" value="0x01">
10072 <desc>
10073 Supports UUIDs as expected by VirtualBox code.
10074 </desc>
10075 </const>
10076
10077 <const name="CreateFixed" value="0x02">
10078 <desc>
10079 Supports creating fixed size images, allocating all space instantly.
10080 </desc>
10081 </const>
10082
10083 <const name="CreateDynamic" value="0x04">
10084 <desc>
10085 Supports creating dynamically growing images, allocating space on
10086 demand.
10087 </desc>
10088 </const>
10089
10090 <const name="CreateSplit2G" value="0x08">
10091 <desc>
10092 Supports creating images split in chunks of a bit less than 2 GBytes.
10093 </desc>
10094 </const>
10095
10096 <const name="Differencing" value="0x10">
10097 <desc>
10098 Supports being used as a format for differencing media (see <link
10099 to="IMedium::createDiffStorage"/>).
10100 </desc>
10101 </const>
10102
10103 <const name="Asynchronous" value="0x20">
10104 <desc>
10105 Supports asynchronous I/O operations for at least some configurations.
10106 </desc>
10107 </const>
10108
10109 <const name="File" value="0x40">
10110 <desc>
10111 The format backend operates on files (the <link to="IMedium::location"/>
10112 attribute of the medium specifies a file used to store medium
10113 data; for a list of supported file extensions see
10114 <link to="IMediumFormat::fileExtensions"/>).
10115 </desc>
10116 </const>
10117
10118 <const name="Properties" value="0x80">
10119 <desc>
10120 The format backend uses the property interface to configure the storage
10121 location and properties (the <link to="IMediumFormat::describeProperties"/>
10122 method is used to get access to properties supported by the given medium format).
10123 </desc>
10124 </const>
10125
10126 <const name="TcpNetworking" value="0x100">
10127 <desc>
10128 The format backend uses the TCP networking interface for network access.
10129 </desc>
10130 </const>
10131
10132 <const name="VFS" value="0x200">
10133 <desc>
10134 The format backend supports virtual filesystem functionality.
10135 </desc>
10136 </const>
10137
10138 <const name="CapabilityMask" value="0x3FF"/>
10139 </enum>
10140
10141 <interface
10142 name="IMediumFormat" extends="$unknown"
10143 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
10144 wsmap="managed"
10145 >
10146 <desc>
10147 The IMediumFormat interface represents a medium format.
10148
10149 Each medium format has an associated backend which is used to handle
10150 media stored in this format. This interface provides information
10151 about the properties of the associated backend.
10152
10153 Each medium format is identified by a string represented by the
10154 <link to="#id"/> attribute. This string is used in calls like
10155 <link to="IVirtualBox::createHardDisk"/> to specify the desired
10156 format.
10157
10158 The list of all supported medium formats can be obtained using
10159 <link to="ISystemProperties::mediumFormats"/>.
10160
10161 <see>IMedium</see>
10162 </desc>
10163
10164 <attribute name="id" type="wstring" readonly="yes">
10165 <desc>
10166 Identifier of this format.
10167
10168 The format identifier is a non-@c null non-empty ASCII string. Note that
10169 this string is case-insensitive. This means that, for example, all of
10170 the following strings:
10171 <pre>
10172 "VDI"
10173 "vdi"
10174 "VdI"</pre>
10175 refer to the same medium format.
10176
10177 This string is used in methods of other interfaces where it is necessary
10178 to specify a medium format, such as
10179 <link to="IVirtualBox::createHardDisk"/>.
10180 </desc>
10181 </attribute>
10182
10183 <attribute name="name" type="wstring" readonly="yes">
10184 <desc>
10185 Human readable description of this format.
10186
10187 Mainly for use in file open dialogs.
10188 </desc>
10189 </attribute>
10190
10191 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
10192 <desc>
10193 Array of strings containing the supported file extensions.
10194
10195 The first extension in the array is the extension preferred by the
10196 backend. It is recommended to use this extension when specifying a
10197 location of the storage unit for a new medium.
10198
10199 Note that some backends do not work on files, so this array may be
10200 empty.
10201
10202 <see>IMediumFormat::capabilities</see>
10203 </desc>
10204 </attribute>
10205
10206 <attribute name="capabilities" type="unsigned long" readonly="yes">
10207 <desc>
10208 Capabilities of the format as a set of bit flags.
10209
10210 For the meaning of individual capability flags see
10211 <link to="MediumFormatCapabilities"/>.
10212 </desc>
10213 </attribute>
10214
10215 <method name="describeProperties">
10216 <desc>
10217 Returns several arrays describing the properties supported by this
10218 format.
10219
10220 An element with the given index in each array describes one
10221 property. Thus, the number of elements in each returned array is the
10222 same and corresponds to the number of supported properties.
10223
10224 The returned arrays are filled in only if the
10225 <link to="MediumFormatCapabilities_Properties"/> flag is set.
10226 All arguments must be non-@c null.
10227
10228 <see>DataType</see>
10229 <see>DataFlags</see>
10230 </desc>
10231
10232 <param name="names" type="wstring" safearray="yes" dir="out">
10233 <desc>Array of property names.</desc>
10234 </param>
10235 <param name="description" type="wstring" safearray="yes" dir="out">
10236 <desc>Array of property descriptions.</desc>
10237 </param>
10238 <param name="types" type="DataType" safearray="yes" dir="out">
10239 <desc>Array of property types.</desc>
10240 </param>
10241 <param name="flags" type="unsigned long" safearray="yes" dir="out">
10242 <desc>Array of property flags.</desc>
10243 </param>
10244 <param name="defaults" type="wstring" safearray="yes" dir="out">
10245 <desc>Array of default property values.</desc>
10246 </param>
10247 </method>
10248
10249 </interface>
10250
10251
10252 <!--
10253 // IKeyboard
10254 /////////////////////////////////////////////////////////////////////////
10255 -->
10256
10257 <interface
10258 name="IKeyboard" extends="$unknown"
10259 uuid="f6916ec5-a881-4237-898f-7de58cf88672"
10260 wsmap="managed"
10261 >
10262 <desc>
10263 The IKeyboard interface represents the virtual machine's keyboard. Used
10264 in <link to="IConsole::keyboard"/>.
10265
10266 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10267 to the virtual machine.
10268
10269 </desc>
10270 <method name="putScancode">
10271 <desc>Sends a scancode to the keyboard.
10272
10273 <result name="VBOX_E_IPRT_ERROR">
10274 Could not send scan code to virtual keyboard.
10275 </result>
10276
10277 </desc>
10278 <param name="scancode" type="long" dir="in"/>
10279 </method>
10280
10281 <method name="putScancodes">
10282 <desc>Sends an array of scancodes to the keyboard.
10283
10284 <result name="VBOX_E_IPRT_ERROR">
10285 Could not send all scan codes to virtual keyboard.
10286 </result>
10287
10288 </desc>
10289 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10290 <param name="codesStored" type="unsigned long" dir="return"/>
10291 </method>
10292
10293 <method name="putCAD">
10294 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10295 function is nothing special, it is just a convenience function
10296 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10297
10298 <result name="VBOX_E_IPRT_ERROR">
10299 Could not send all scan codes to virtual keyboard.
10300 </result>
10301
10302 </desc>
10303 </method>
10304
10305 <attribute name="eventSource" type="IEventSource" readonly="yes">
10306 <desc>
10307 Event source for keyboard events.
10308 </desc>
10309 </attribute>
10310
10311 </interface>
10312
10313
10314 <!--
10315 // IMouse
10316 /////////////////////////////////////////////////////////////////////////
10317 -->
10318
10319 <enum
10320 name="MouseButtonState"
10321 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10322 >
10323 <desc>
10324 Mouse button state.
10325 </desc>
10326
10327 <const name="LeftButton" value="0x01"/>
10328 <const name="RightButton" value="0x02"/>
10329 <const name="MiddleButton" value="0x04"/>
10330 <const name="WheelUp" value="0x08"/>
10331 <const name="WheelDown" value="0x10"/>
10332 <const name="XButton1" value="0x20"/>
10333 <const name="XButton2" value="0x40"/>
10334 <const name="MouseStateMask" value="0x7F"/>
10335 </enum>
10336
10337 <interface
10338 name="IMouse" extends="$unknown"
10339 uuid="05044a52-7811-4f00-ae3a-0ab7ff707b10"
10340 wsmap="managed"
10341 >
10342 <desc>
10343 The IMouse interface represents the virtual machine's mouse. Used in
10344 <link to="IConsole::mouse"/>.
10345
10346 Through this interface, the virtual machine's virtual mouse can be
10347 controlled.
10348 </desc>
10349
10350 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10351 <desc>
10352 Whether the guest OS supports absolute mouse pointer positioning
10353 or not.
10354 <note>
10355 You can use the <link to="IMouseCapabilityChangedEvent"/>
10356 event to be instantly informed about changes of this attribute
10357 during virtual machine execution.
10358 </note>
10359 <see><link to="#putMouseEventAbsolute"/></see>
10360 </desc>
10361 </attribute>
10362
10363 <attribute name="relativeSupported" type="boolean" readonly="yes">
10364 <desc>
10365 Whether the guest OS supports relative mouse pointer positioning
10366 or not.
10367 <note>
10368 You can use the <link to="IMouseCapabilityChangedEvent"/>
10369 event to be instantly informed about changes of this attribute
10370 during virtual machine execution.
10371 </note>
10372 <see><link to="#putMouseEvent"/></see>
10373 </desc>
10374 </attribute>
10375
10376 <attribute name="needsHostCursor" type="boolean" readonly="yes">
10377 <desc>
10378 Whether the guest OS can currently switch to drawing it's own mouse
10379 cursor on demand.
10380 <note>
10381 You can use the <link to="IMouseCapabilityChangedEvent"/>
10382 event to be instantly informed about changes of this attribute
10383 during virtual machine execution.
10384 </note>
10385 <see><link to="#putMouseEvent"/></see>
10386 </desc>
10387 </attribute>
10388
10389 <method name="putMouseEvent">
10390 <desc>
10391 Initiates a mouse event using relative pointer movements
10392 along x and y axis.
10393
10394 <result name="E_ACCESSDENIED">
10395 Console not powered up.
10396 </result>
10397 <result name="VBOX_E_IPRT_ERROR">
10398 Could not send mouse event to virtual mouse.
10399 </result>
10400
10401 </desc>
10402
10403 <param name="dx" type="long" dir="in">
10404 <desc>
10405 Amount of pixels the mouse should move to the right.
10406 Negative values move the mouse to the left.
10407 </desc>
10408 </param>
10409 <param name="dy" type="long" dir="in">
10410 <desc>
10411 Amount of pixels the mouse should move downwards.
10412 Negative values move the mouse upwards.
10413 </desc>
10414 </param>
10415 <param name="dz" type="long" dir="in">
10416 <desc>
10417 Amount of mouse wheel moves.
10418 Positive values describe clockwise wheel rotations,
10419 negative values describe counterclockwise rotations.
10420 </desc>
10421 </param>
10422 <param name="dw" type="long" dir="in">
10423 <desc>
10424 Amount of horizontal mouse wheel moves.
10425 Positive values describe a movement to the left,
10426 negative values describe a movement to the right.
10427 </desc>
10428 </param>
10429 <param name="buttonState" type="long" dir="in">
10430 <desc>
10431 The current state of mouse buttons. Every bit represents
10432 a mouse button as follows:
10433 <table>
10434 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10435 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10436 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10437 </table>
10438 A value of <tt>1</tt> means the corresponding button is pressed.
10439 otherwise it is released.
10440 </desc>
10441 </param>
10442 </method>
10443
10444 <method name="putMouseEventAbsolute">
10445 <desc>
10446 Positions the mouse pointer using absolute x and y coordinates.
10447 These coordinates are expressed in pixels and
10448 start from <tt>[1,1]</tt> which corresponds to the top left
10449 corner of the virtual display.
10450
10451 <result name="E_ACCESSDENIED">
10452 Console not powered up.
10453 </result>
10454 <result name="VBOX_E_IPRT_ERROR">
10455 Could not send mouse event to virtual mouse.
10456 </result>
10457
10458 <note>
10459 This method will have effect only if absolute mouse
10460 positioning is supported by the guest OS.
10461 </note>
10462
10463 <see><link to="#absoluteSupported"/></see>
10464 </desc>
10465
10466 <param name="x" type="long" dir="in">
10467 <desc>
10468 X coordinate of the pointer in pixels, starting from @c 1.
10469 </desc>
10470 </param>
10471 <param name="y" type="long" dir="in">
10472 <desc>
10473 Y coordinate of the pointer in pixels, starting from @c 1.
10474 </desc>
10475 </param>
10476 <param name="dz" type="long" dir="in">
10477 <desc>
10478 Amount of mouse wheel moves.
10479 Positive values describe clockwise wheel rotations,
10480 negative values describe counterclockwise rotations.
10481 </desc>
10482 </param>
10483 <param name="dw" type="long" dir="in">
10484 <desc>
10485 Amount of horizontal mouse wheel moves.
10486 Positive values describe a movement to the left,
10487 negative values describe a movement to the right.
10488 </desc>
10489 </param>
10490 <param name="buttonState" type="long" dir="in">
10491 <desc>
10492 The current state of mouse buttons. Every bit represents
10493 a mouse button as follows:
10494 <table>
10495 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10496 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10497 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10498 </table>
10499 A value of @c 1 means the corresponding button is pressed.
10500 otherwise it is released.
10501 </desc>
10502 </param>
10503 </method>
10504
10505 <attribute name="eventSource" type="IEventSource" readonly="yes">
10506 <desc>
10507 Event source for mouse events.
10508 </desc>
10509 </attribute>
10510
10511 </interface>
10512
10513 <!--
10514 // IDisplay
10515 /////////////////////////////////////////////////////////////////////////
10516 -->
10517
10518 <enum
10519 name="FramebufferPixelFormat"
10520 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10521 >
10522 <desc>
10523 Format of the video memory buffer. Constants represented by this enum can
10524 be used to test for particular values of <link
10525 to="IFramebuffer::pixelFormat"/>. See also <link
10526 to="IFramebuffer::requestResize"/>.
10527
10528 See also www.fourcc.org for more information about FOURCC pixel formats.
10529 </desc>
10530
10531 <const name="Opaque" value="0">
10532 <desc>
10533 Unknown buffer format (the user may not assume any particular format of
10534 the buffer).
10535 </desc>
10536 </const>
10537 <const name="FOURCC_RGB" value="0x32424752">
10538 <desc>
10539 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10540 bit layout).
10541 </desc>
10542 </const>
10543 </enum>
10544
10545 <interface
10546 name="IFramebuffer" extends="$unknown"
10547 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10548 wsmap="suppress"
10549 >
10550 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10551 <desc>Address of the start byte of the frame buffer.</desc>
10552 </attribute>
10553
10554 <attribute name="width" type="unsigned long" readonly="yes">
10555 <desc>Frame buffer width, in pixels.</desc>
10556 </attribute>
10557
10558 <attribute name="height" type="unsigned long" readonly="yes">
10559 <desc>Frame buffer height, in pixels.</desc>
10560 </attribute>
10561
10562 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10563 <desc>
10564 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10565 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10566 are: 8, 15, 16, 24 and 32.
10567 </desc>
10568 </attribute>
10569
10570 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10571 <desc>
10572 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10573 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10574 size of the scan line must be aligned to 32 bits.
10575 </desc>
10576 </attribute>
10577
10578 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10579 <desc>
10580 Frame buffer pixel format. It's either one of the values defined by <link
10581 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10582 <note>
10583 This attribute must never return <link
10584 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10585 <link to="#address"/> points to must be always known.
10586 </note>
10587 </desc>
10588 </attribute>
10589
10590 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10591 <desc>
10592 Defines whether this frame buffer uses the virtual video card's memory
10593 buffer (guest VRAM) directly or not. See <link
10594 to="IFramebuffer::requestResize"/> for more information.
10595 </desc>
10596 </attribute>
10597
10598 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10599 <desc>
10600 Hint from the frame buffer about how much of the standard
10601 screen height it wants to use for itself. This information is
10602 exposed to the guest through the VESA BIOS and VMMDev interface
10603 so that it can use it for determining its video mode table. It
10604 is not guaranteed that the guest respects the value.
10605 </desc>
10606 </attribute>
10607
10608 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10609 <desc>
10610 An alpha-blended overlay which is superposed over the frame buffer.
10611 The initial purpose is to allow the display of icons providing
10612 information about the VM state, including disk activity, in front
10613 ends which do not have other means of doing that. The overlay is
10614 designed to controlled exclusively by IDisplay. It has no locking
10615 of its own, and any changes made to it are not guaranteed to be
10616 visible until the affected portion of IFramebuffer is updated. The
10617 overlay can be created lazily the first time it is requested. This
10618 attribute can also return @c null to signal that the overlay is not
10619 implemented.
10620 </desc>
10621 </attribute>
10622
10623 <attribute name="winId" type="long long" readonly="yes">
10624 <desc>
10625 Platform-dependent identifier of the window where context of this
10626 frame buffer is drawn, or zero if there's no such window.
10627 </desc>
10628 </attribute>
10629
10630 <method name="lock">
10631 <desc>
10632 Locks the frame buffer.
10633 Gets called by the IDisplay object where this frame buffer is
10634 bound to.
10635 </desc>
10636 </method>
10637
10638 <method name="unlock">
10639 <desc>
10640 Unlocks the frame buffer.
10641 Gets called by the IDisplay object where this frame buffer is
10642 bound to.
10643 </desc>
10644 </method>
10645
10646 <method name="notifyUpdate">
10647 <desc>
10648 Informs about an update.
10649 Gets called by the display object where this buffer is
10650 registered.
10651 </desc>
10652 <param name="x" type="unsigned long" dir="in"/>
10653 <param name="y" type="unsigned long" dir="in"/>
10654 <param name="width" type="unsigned long" dir="in"/>
10655 <param name="height" type="unsigned long" dir="in"/>
10656 </method>
10657
10658 <method name="requestResize">
10659 <desc>
10660 Requests a size and pixel format change.
10661
10662 There are two modes of working with the video buffer of the virtual
10663 machine. The <i>indirect</i> mode implies that the IFramebuffer
10664 implementation allocates a memory buffer for the requested display mode
10665 and provides it to the virtual machine. In <i>direct</i> mode, the
10666 IFramebuffer implementation uses the memory buffer allocated and owned
10667 by the virtual machine. This buffer represents the video memory of the
10668 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10669 usually faster because the implementation gets a raw pointer to the
10670 guest VRAM buffer which it can directly use for visualizing the contents
10671 of the virtual display, as opposed to the indirect mode where the
10672 contents of guest VRAM are copied to the memory buffer provided by
10673 the implementation every time a display update occurs.
10674
10675 It is important to note that the direct mode is really fast only when
10676 the implementation uses the given guest VRAM buffer directly, for
10677 example, by blitting it to the window representing the virtual machine's
10678 display, which saves at least one copy operation comparing to the
10679 indirect mode. However, using the guest VRAM buffer directly is not
10680 always possible: the format and the color depth of this buffer may be
10681 not supported by the target window, or it may be unknown (opaque) as in
10682 case of text or non-linear multi-plane VGA video modes. In this case,
10683 the indirect mode (that is always available) should be used as a
10684 fallback: when the guest VRAM contents are copied to the
10685 implementation-provided memory buffer, color and format conversion is
10686 done automatically by the underlying code.
10687
10688 The @a pixelFormat parameter defines whether the direct mode is
10689 available or not. If @a pixelFormat is <link
10690 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10691 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10692 @a bytesPerLine parameters must be ignored and the implementation must use
10693 the indirect mode (where it provides its own buffer in one of the
10694 supported formats). In all other cases, @a pixelFormat together with
10695 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10696 buffer pointed to by the @a VRAM parameter and the implementation is
10697 free to choose which mode to use. To indicate that this frame buffer uses
10698 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10699 attribute must return @c true and <link to="#address"/> must
10700 return exactly the same address that is passed in the @a VRAM parameter
10701 of this method; otherwise it is assumed that the indirect strategy is
10702 chosen.
10703
10704 The @a width and @a height parameters represent the size of the
10705 requested display mode in both modes. In case of indirect mode, the
10706 provided memory buffer should be big enough to store data of the given
10707 display mode. In case of direct mode, it is guaranteed that the given
10708 @a VRAM buffer contains enough space to represent the display mode of the
10709 given size. Note that this frame buffer's <link to="#width"/> and <link
10710 to="#height"/> attributes must return exactly the same values as
10711 passed to this method after the resize is completed (see below).
10712
10713 The @a finished output parameter determines if the implementation has
10714 finished resizing the frame buffer or not. If, for some reason, the
10715 resize cannot be finished immediately during this call, @a finished
10716 must be set to @c false, and the implementation must call
10717 <link to="IDisplay::resizeCompleted"/> after it has returned from
10718 this method as soon as possible. If @a finished is @c false, the
10719 machine will not call any frame buffer methods until
10720 <link to="IDisplay::resizeCompleted"/> is called.
10721
10722 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10723 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10724 this frame buffer must return exactly the same values as specified in the
10725 parameters of this method, after the resize is completed. If the
10726 indirect mode is chosen, these attributes must return values describing
10727 the format of the implementation's own memory buffer <link
10728 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10729 value must always correlate with <link to="#pixelFormat"/>. Note that
10730 the <link to="#pixelFormat"/> attribute must never return <link
10731 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10732
10733 <note>
10734 This method is called by the IDisplay object under the
10735 <link to="#lock"/> provided by this IFramebuffer
10736 implementation. If this method returns @c false in @a finished, then
10737 this lock is not released until
10738 <link to="IDisplay::resizeCompleted"/> is called.
10739 </note>
10740 </desc>
10741 <param name="screenId" type="unsigned long" dir="in">
10742 <desc>
10743 Logical screen number. Must be used in the corresponding call to
10744 <link to="IDisplay::resizeCompleted"/> if this call is made.
10745 </desc>
10746 </param>
10747 <param name="pixelFormat" type="unsigned long" dir="in">
10748 <desc>
10749 Pixel format of the memory buffer pointed to by @a VRAM.
10750 See also <link to="FramebufferPixelFormat"/>.
10751 </desc>
10752 </param>
10753 <param name="VRAM" type="octet" mod="ptr" dir="in">
10754 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10755 </param>
10756 <param name="bitsPerPixel" type="unsigned long" dir="in">
10757 <desc>Color depth, bits per pixel.</desc>
10758 </param>
10759 <param name="bytesPerLine" type="unsigned long" dir="in">
10760 <desc>Size of one scan line, in bytes.</desc>
10761 </param>
10762 <param name="width" type="unsigned long" dir="in">
10763 <desc>Width of the guest display, in pixels.</desc>
10764 </param>
10765 <param name="height" type="unsigned long" dir="in">
10766 <desc>Height of the guest display, in pixels.</desc>
10767 </param>
10768 <param name="finished" type="boolean" dir="return">
10769 <desc>
10770 Can the VM start using the new frame buffer immediately
10771 after this method returns or it should wait for
10772 <link to="IDisplay::resizeCompleted"/>.
10773 </desc>
10774 </param>
10775 </method>
10776
10777 <method name="videoModeSupported">
10778 <desc>
10779 Returns whether the frame buffer implementation is willing to
10780 support a given video mode. In case it is not able to render
10781 the video mode (or for some reason not willing), it should
10782 return @c false. Usually this method is called when the guest
10783 asks the VMM device whether a given video mode is supported
10784 so the information returned is directly exposed to the guest.
10785 It is important that this method returns very quickly.
10786 </desc>
10787 <param name="width" type="unsigned long" dir="in"/>
10788 <param name="height" type="unsigned long" dir="in"/>
10789 <param name="bpp" type="unsigned long" dir="in"/>
10790 <param name="supported" type="boolean" dir="return"/>
10791 </method>
10792
10793 <method name="getVisibleRegion">
10794 <desc>
10795 Returns the visible region of this frame buffer.
10796
10797 If the @a rectangles parameter is @c null then the value of the
10798 @a count parameter is ignored and the number of elements necessary to
10799 describe the current visible region is returned in @a countCopied.
10800
10801 If @a rectangles is not @c null but @a count is less
10802 than the required number of elements to store region data, the method
10803 will report a failure. If @a count is equal or greater than the
10804 required number of elements, then the actual number of elements copied
10805 to the provided array will be returned in @a countCopied.
10806
10807 <note>
10808 The address of the provided array must be in the process space of
10809 this IFramebuffer object.
10810 </note>
10811 <note>
10812 Method not yet implemented.
10813 </note>
10814 </desc>
10815 <param name="rectangles" type="octet" mod="ptr" dir="in">
10816 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10817 </param>
10818 <param name="count" type="unsigned long" dir="in">
10819 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10820 </param>
10821 <param name="countCopied" type="unsigned long" dir="return">
10822 <desc>Number of elements copied to the @a rectangles array.</desc>
10823 </param>
10824 </method>
10825
10826 <method name="setVisibleRegion">
10827 <desc>
10828 Suggests a new visible region to this frame buffer. This region
10829 represents the area of the VM display which is a union of regions of
10830 all top-level windows of the guest operating system running inside the
10831 VM (if the Guest Additions for this system support this
10832 functionality). This information may be used by the frontends to
10833 implement the seamless desktop integration feature.
10834
10835 <note>
10836 The address of the provided array must be in the process space of
10837 this IFramebuffer object.
10838 </note>
10839 <note>
10840 The IFramebuffer implementation must make a copy of the provided
10841 array of rectangles.
10842 </note>
10843 <note>
10844 Method not yet implemented.
10845 </note>
10846 </desc>
10847 <param name="rectangles" type="octet" mod="ptr" dir="in">
10848 <desc>Pointer to the @c RTRECT array.</desc>
10849 </param>
10850 <param name="count" type="unsigned long" dir="in">
10851 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10852 </param>
10853 </method>
10854
10855 <method name="processVHWACommand">
10856 <desc>
10857 Posts a Video HW Acceleration Command to the frame buffer for processing.
10858 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10859 are posted from quest to the host to be processed by the host hardware.
10860
10861 <note>
10862 The address of the provided command must be in the process space of
10863 this IFramebuffer object.
10864 </note>
10865 </desc>
10866
10867 <param name="command" type="octet" mod="ptr" dir="in">
10868 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10869 </param>
10870 </method>
10871
10872 </interface>
10873
10874 <interface
10875 name="IFramebufferOverlay" extends="IFramebuffer"
10876 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10877 wsmap="suppress"
10878 >
10879 <desc>
10880 The IFramebufferOverlay interface represents an alpha blended overlay
10881 for displaying status icons above an IFramebuffer. It is always created
10882 not visible, so that it must be explicitly shown. It only covers a
10883 portion of the IFramebuffer, determined by its width, height and
10884 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10885 that order) format, and may be written to directly. Do re-read the
10886 width though, after setting it, as it may be adjusted (increased) to
10887 make it more suitable for the front end.
10888 </desc>
10889 <attribute name="x" type="unsigned long" readonly="yes">
10890 <desc>X position of the overlay, relative to the frame buffer.</desc>
10891 </attribute>
10892
10893 <attribute name="y" type="unsigned long" readonly="yes">
10894 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10895 </attribute>
10896
10897 <attribute name="visible" type="boolean" readonly="no">
10898 <desc>
10899 Whether the overlay is currently visible.
10900 </desc>
10901 </attribute>
10902
10903 <attribute name="alpha" type="unsigned long" readonly="no">
10904 <desc>
10905 The global alpha value for the overlay. This may or may not be
10906 supported by a given front end.
10907 </desc>
10908 </attribute>
10909
10910 <method name="move">
10911 <desc>
10912 Changes the overlay's position relative to the IFramebuffer.
10913 </desc>
10914 <param name="x" type="unsigned long" dir="in"/>
10915 <param name="y" type="unsigned long" dir="in"/>
10916 </method>
10917
10918 </interface>
10919
10920 <interface
10921 name="IDisplay" extends="$unknown"
10922 uuid="09EED313-CD56-4D06-BD56-FAC0F716B5DD"
10923 wsmap="managed"
10924 >
10925 <desc>
10926 The IDisplay interface represents the virtual machine's display.
10927
10928 The object implementing this interface is contained in each
10929 <link to="IConsole::display"/> attribute and represents the visual
10930 output of the virtual machine.
10931
10932 The virtual display supports pluggable output targets represented by the
10933 IFramebuffer interface. Examples of the output target are a window on
10934 the host computer or an RDP session's display on a remote computer.
10935 </desc>
10936 <method name="getScreenResolution">
10937 <desc>Queries display width, height and color depth for given screen.</desc>
10938 <param name="screenId" type="unsigned long" dir="in"/>
10939 <param name="width" type="unsigned long" dir="out"/>
10940 <param name="height" type="unsigned long" dir="out"/>
10941 <param name="bitsPerPixel" type="unsigned long" dir="out"/>
10942 </method>
10943
10944 <method name="setFramebuffer">
10945 <desc>
10946 Sets the framebuffer for given screen.
10947 </desc>
10948 <param name="screenId" type="unsigned long" dir="in"/>
10949 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10950 </method>
10951
10952 <method name="getFramebuffer">
10953 <desc>
10954 Queries the framebuffer for given screen.
10955 </desc>
10956 <param name="screenId" type="unsigned long" dir="in"/>
10957 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10958 <param name="xOrigin" type="long" dir="out"/>
10959 <param name="yOrigin" type="long" dir="out"/>
10960 </method>
10961
10962 <method name="setVideoModeHint">
10963 <desc>
10964 Asks VirtualBox to request the given video mode from
10965 the guest. This is just a hint and it cannot be guaranteed
10966 that the requested resolution will be used. Guest Additions
10967 are required for the request to be seen by guests. The caller
10968 should issue the request and wait for a resolution change and
10969 after a timeout retry.
10970
10971 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10972 parameters means that the corresponding values should be taken from the
10973 current video mode (i.e. left unchanged).
10974
10975 If the guest OS supports multi-monitor configuration then the @a display
10976 parameter specifies the number of the guest display to send the hint to:
10977 @c 0 is the primary display, @c 1 is the first secondary and
10978 so on. If the multi-monitor configuration is not supported, @a display
10979 must be @c 0.
10980
10981 <result name="E_INVALIDARG">
10982 The @a display is not associated with any monitor.
10983 </result>
10984
10985 </desc>
10986 <param name="width" type="unsigned long" dir="in"/>
10987 <param name="height" type="unsigned long" dir="in"/>
10988 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10989 <param name="display" type="unsigned long" dir="in"/>
10990 </method>
10991
10992 <method name="setSeamlessMode">
10993 <desc>
10994 Enables or disables seamless guest display rendering (seamless desktop
10995 integration) mode.
10996 <note>
10997 Calling this method has no effect if <link
10998 to="IGuest::supportsSeamless"/> returns @c false.
10999 </note>
11000 </desc>
11001 <param name="enabled" type="boolean" dir="in"/>
11002 </method>
11003
11004 <method name="takeScreenShot">
11005 <desc>
11006 Takes a screen shot of the requested size and copies it to the
11007 32-bpp buffer allocated by the caller and pointed to by @a address.
11008 A pixel consists of 4 bytes in order: B, G, R, 0.
11009
11010 <note>This API can be used only by the COM/XPCOM C++ API as it
11011 requires pointer support. Use <link to="#takeScreenShotToArray" />
11012 with other language bindings.
11013 </note>
11014
11015 <result name="E_NOTIMPL">
11016 Feature not implemented.
11017 </result>
11018 <result name="VBOX_E_IPRT_ERROR">
11019 Could not take a screenshot.
11020 </result>
11021
11022 </desc>
11023 <param name="screenId" type="unsigned long" dir="in"/>
11024 <param name="address" type="octet" mod="ptr" dir="in"/>
11025 <param name="width" type="unsigned long" dir="in"/>
11026 <param name="height" type="unsigned long" dir="in"/>
11027 </method>
11028
11029 <method name="takeScreenShotToArray">
11030 <desc>
11031 Takes a guest screen shot of the requested size and returns it as
11032 an array of bytes in uncompressed 32-bit RGBA format.
11033 A pixel consists of 4 bytes in order: R, G, B, 0xFF.
11034
11035 This API is slow, but could be the only option to get guest screenshot
11036 for scriptable languages not allowed to manipulate with addresses
11037 directly.
11038
11039 <result name="E_NOTIMPL">
11040 Feature not implemented.
11041 </result>
11042 <result name="VBOX_E_IPRT_ERROR">
11043 Could not take a screenshot.
11044 </result>
11045 </desc>
11046 <param name="screenId" type="unsigned long" dir="in">
11047 <desc>
11048 Monitor to take screenshot from.
11049 </desc>
11050 </param>
11051 <param name="width" type="unsigned long" dir="in">
11052 <desc>
11053 Desired image width.
11054 </desc>
11055 </param>
11056 <param name="height" type="unsigned long" dir="in">
11057 <desc>
11058 Desired image height.
11059 </desc>
11060 </param>
11061 <param name="screenData" type="octet" dir="return" safearray="yes">
11062 <desc>
11063 Array with resulting screen data.
11064 </desc>
11065 </param>
11066 </method>
11067
11068 <method name="takeScreenShotPNGToArray">
11069 <desc>
11070 Takes a guest screen shot of the requested size and returns it as
11071 PNG image in array.
11072
11073 <result name="E_NOTIMPL">
11074 Feature not implemented.
11075 </result>
11076 <result name="VBOX_E_IPRT_ERROR">
11077 Could not take a screenshot.
11078 </result>
11079 </desc>
11080 <param name="screenId" type="unsigned long" dir="in">
11081 <desc>
11082 Monitor to take the screenshot from.
11083 </desc>
11084 </param>
11085 <param name="width" type="unsigned long" dir="in">
11086 <desc>
11087 Desired image width.
11088 </desc>
11089 </param>
11090 <param name="height" type="unsigned long" dir="in">
11091 <desc>
11092 Desired image height.
11093 </desc>
11094 </param>
11095 <param name="screenData" type="octet" dir="return" safearray="yes">
11096 <desc>
11097 Array with resulting screen data.
11098 </desc>
11099 </param>
11100 </method>
11101
11102 <method name="drawToScreen">
11103 <desc>
11104 Draws a 32-bpp image of the specified size from the given buffer
11105 to the given point on the VM display.
11106
11107 <result name="E_NOTIMPL">
11108 Feature not implemented.
11109 </result>
11110 <result name="VBOX_E_IPRT_ERROR">
11111 Could not draw to screen.
11112 </result>
11113
11114 </desc>
11115 <param name="screenId" type="unsigned long" dir="in">
11116 <desc>
11117 Monitor to take the screenshot from.
11118 </desc>
11119 </param>
11120 <param name="address" type="octet" mod="ptr" dir="in">
11121 <desc>
11122 Address to store the screenshot to
11123 </desc>
11124 </param>
11125 <param name="x" type="unsigned long" dir="in">
11126 <desc>
11127 Relative to the screen top left corner.
11128 </desc>
11129 </param>
11130 <param name="y" type="unsigned long" dir="in">
11131 <desc>
11132 Relative to the screen top left corner.
11133 </desc>
11134 </param>
11135 <param name="width" type="unsigned long" dir="in">
11136 <desc>
11137 Desired image width.
11138 </desc>
11139 </param>
11140 <param name="height" type="unsigned long" dir="in">
11141 <desc>
11142 Desired image height.
11143 </desc>
11144 </param>
11145 </method>
11146
11147 <method name="invalidateAndUpdate">
11148 <desc>
11149 Does a full invalidation of the VM display and instructs the VM
11150 to update it.
11151
11152 <result name="VBOX_E_IPRT_ERROR">
11153 Could not invalidate and update screen.
11154 </result>
11155
11156 </desc>
11157 </method>
11158
11159 <method name="resizeCompleted">
11160 <desc>
11161 Signals that a framebuffer has completed the resize operation.
11162
11163 <result name="VBOX_E_NOT_SUPPORTED">
11164 Operation only valid for external frame buffers.
11165 </result>
11166
11167 </desc>
11168 <param name="screenId" type="unsigned long" dir="in"/>
11169 </method>
11170
11171 <method name="completeVHWACommand">
11172 <desc>
11173 Signals that the Video HW Acceleration command has completed.
11174 </desc>
11175
11176 <param name="command" type="octet" mod="ptr" dir="in">
11177 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
11178 </param>
11179 </method>
11180
11181 </interface>
11182
11183 <!--
11184 // INetworkAdapter
11185 /////////////////////////////////////////////////////////////////////////
11186 -->
11187
11188 <enum
11189 name="NetworkAttachmentType"
11190 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
11191 >
11192 <desc>
11193 Network attachment type.
11194 </desc>
11195
11196 <const name="Null" value="0">
11197 <desc>Null value, also means "not attached".</desc>
11198 </const>
11199 <const name="NAT" value="1"/>
11200 <const name="Bridged" value="2"/>
11201 <const name="Internal" value="3"/>
11202 <const name="HostOnly" value="4"/>
11203 <const name="VDE" value="5"/>
11204 </enum>
11205
11206 <enum
11207 name="NetworkAdapterType"
11208 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
11209 >
11210 <desc>
11211 Network adapter type.
11212 </desc>
11213
11214 <const name="Null" value="0">
11215 <desc>Null value (never used by the API).</desc>
11216 </const>
11217 <const name="Am79C970A" value="1">
11218 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
11219 </const>
11220 <const name="Am79C973" value="2">
11221 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
11222 </const>
11223 <const name="I82540EM" value="3">
11224 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
11225 </const>
11226 <const name="I82543GC" value="4">
11227 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
11228 </const>
11229 <const name="I82545EM" value="5">
11230 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
11231 </const>
11232 <const name="Virtio" value="6">
11233 <desc>Virtio network device.</desc>
11234 </const>
11235 </enum>
11236
11237 <interface
11238 name="INetworkAdapter" extends="$unknown"
11239 uuid="9bf58a46-c3f7-4f31-80fa-dde9a5dc0b7b"
11240 wsmap="managed"
11241 >
11242 <desc>
11243 Represents a virtual network adapter that is attached to a virtual machine.
11244 Each virtual machine has a fixed number of network adapter slots with one
11245 instance of this attached to each of them. Call
11246 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
11247 is attached to a given slot in a given machine.
11248
11249 Each network adapter can be in one of five attachment modes, which are
11250 represented by the <link to="NetworkAttachmentType" /> enumeration;
11251 see the <link to="#attachmentType" /> attribute.
11252 </desc>
11253
11254 <attribute name="adapterType" type="NetworkAdapterType">
11255 <desc>
11256 Type of the virtual network adapter. Depending on this value,
11257 VirtualBox will provide a different virtual network hardware
11258 to the guest.
11259 </desc>
11260 </attribute>
11261
11262 <attribute name="slot" type="unsigned long" readonly="yes">
11263 <desc>
11264 Slot number this adapter is plugged into. Corresponds to
11265 the value you pass to <link to="IMachine::getNetworkAdapter"/>
11266 to obtain this instance.
11267 </desc>
11268 </attribute>
11269
11270 <attribute name="enabled" type="boolean">
11271 <desc>
11272 Flag whether the network adapter is present in the
11273 guest system. If disabled, the virtual guest hardware will
11274 not contain this network adapter. Can only be changed when
11275 the VM is not running.
11276 </desc>
11277 </attribute>
11278
11279 <attribute name="MACAddress" type="wstring">
11280 <desc>
11281 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
11282 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
11283 </desc>
11284 </attribute>
11285
11286 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
11287
11288 <attribute name="hostInterface" type="wstring">
11289 <desc>
11290 Name of the host network interface the VM is attached to.
11291 </desc>
11292 </attribute>
11293
11294 <attribute name="internalNetwork" type="wstring">
11295 <desc>
11296 Name of the internal network the VM is attached to.
11297 </desc>
11298 </attribute>
11299
11300 <attribute name="NATNetwork" type="wstring">
11301 <desc>
11302 Name of the NAT network the VM is attached to.
11303 </desc>
11304 </attribute>
11305
11306 <attribute name="VDENetwork" type="wstring">
11307 <desc>
11308 Name of the VDE switch the VM is attached to.
11309 </desc>
11310 </attribute>
11311
11312 <attribute name="cableConnected" type="boolean">
11313 <desc>
11314 Flag whether the adapter reports the cable as connected or not.
11315 It can be used to report offline situations to a VM.
11316 </desc>
11317 </attribute>
11318
11319 <attribute name="lineSpeed" type="unsigned long">
11320 <desc>
11321 Line speed reported by custom drivers, in units of 1 kbps.
11322 </desc>
11323 </attribute>
11324
11325 <attribute name="traceEnabled" type="boolean">
11326 <desc>
11327 Flag whether network traffic from/to the network card should be traced.
11328 Can only be toggled when the VM is turned off.
11329 </desc>
11330 </attribute>
11331
11332 <attribute name="traceFile" type="wstring">
11333 <desc>
11334 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11335 will be used.
11336 </desc>
11337 </attribute>
11338
11339 <attribute name="natDriver" type="INATEngine" readonly="yes">
11340 <desc>
11341 Points to the NAT engine which handles the network address translation
11342 for this interface. This is active only when the interface actually uses
11343 NAT (see <link to="#attachToNAT" />).
11344 </desc>
11345 </attribute>
11346
11347 <attribute name="bootPriority" type="unsigned long">
11348 <desc>
11349 Network boot priority of the adapter. Priority 1 is highest. If not set,
11350 the priority is considered to be at the lowest possible setting.
11351 </desc>
11352 </attribute>
11353
11354 <attribute name="bandwidthLimit" type="unsigned long">
11355 <desc>
11356 Maximum throughput allowed for this network adapter, in units of 1 mbps.
11357 A zero value means uncapped/unlimited.
11358 </desc>
11359 </attribute>
11360
11361 <method name="attachToNAT">
11362 <desc>
11363 Attach the network adapter to the Network Address Translation (NAT) interface.
11364 </desc>
11365 </method>
11366
11367 <method name="attachToBridgedInterface">
11368 <desc>
11369 Attach the network adapter to a bridged host interface.
11370 </desc>
11371 </method>
11372
11373 <method name="attachToInternalNetwork">
11374 <desc>
11375 Attach the network adapter to an internal network.
11376 </desc>
11377 </method>
11378
11379 <method name="attachToHostOnlyInterface">
11380 <desc>
11381 Attach the network adapter to the host-only network.
11382 </desc>
11383 </method>
11384
11385 <method name="attachToVDE">
11386 <desc>
11387 Attach the network adapter to a VDE network.
11388 </desc>
11389 </method>
11390
11391 <method name="detach">
11392 <desc>
11393 Detach the network adapter
11394 </desc>
11395 </method>
11396 </interface>
11397
11398
11399 <!--
11400 // ISerialPort
11401 /////////////////////////////////////////////////////////////////////////
11402 -->
11403
11404 <enum
11405 name="PortMode"
11406 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11407 >
11408 <desc>
11409 The PortMode enumeration represents possible communication modes for
11410 the virtual serial port device.
11411 </desc>
11412
11413 <const name="Disconnected" value="0">
11414 <desc>Virtual device is not attached to any real host device.</desc>
11415 </const>
11416 <const name="HostPipe" value="1">
11417 <desc>Virtual device is attached to a host pipe.</desc>
11418 </const>
11419 <const name="HostDevice" value="2">
11420 <desc>Virtual device is attached to a host device.</desc>
11421 </const>
11422 <const name="RawFile" value="3">
11423 <desc>Virtual device is attached to a raw file.</desc>
11424 </const>
11425 </enum>
11426
11427 <interface
11428 name="ISerialPort" extends="$unknown"
11429 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11430 wsmap="managed"
11431 >
11432
11433 <desc>
11434 The ISerialPort interface represents the virtual serial port device.
11435
11436 The virtual serial port device acts like an ordinary serial port
11437 inside the virtual machine. This device communicates to the real
11438 serial port hardware in one of two modes: host pipe or host device.
11439
11440 In host pipe mode, the #path attribute specifies the path to the pipe on
11441 the host computer that represents a serial port. The #server attribute
11442 determines if this pipe is created by the virtual machine process at
11443 machine startup or it must already exist before starting machine
11444 execution.
11445
11446 In host device mode, the #path attribute specifies the name of the
11447 serial port device on the host computer.
11448
11449 There is also a third communication mode: the disconnected mode. In this
11450 mode, the guest OS running inside the virtual machine will be able to
11451 detect the serial port, but all port write operations will be discarded
11452 and all port read operations will return no data.
11453
11454 <see>IMachine::getSerialPort</see>
11455 </desc>
11456
11457 <attribute name="slot" type="unsigned long" readonly="yes">
11458 <desc>
11459 Slot number this serial port is plugged into. Corresponds to
11460 the value you pass to <link to="IMachine::getSerialPort"/>
11461 to obtain this instance.
11462 </desc>
11463 </attribute>
11464
11465 <attribute name="enabled" type="boolean">
11466 <desc>
11467 Flag whether the serial port is enabled. If disabled,
11468 the serial port will not be reported to the guest OS.
11469 </desc>
11470 </attribute>
11471
11472 <attribute name="IOBase" type="unsigned long">
11473 <desc>Base I/O address of the serial port.</desc>
11474 </attribute>
11475
11476 <attribute name="IRQ" type="unsigned long">
11477 <desc>IRQ number of the serial port.</desc>
11478 </attribute>
11479
11480 <attribute name="hostMode" type="PortMode">
11481 <desc>
11482 How is this port connected to the host.
11483 <note>
11484 Changing this attribute may fail if the conditions for
11485 <link to="#path"/> are not met.
11486 </note>
11487 </desc>
11488 </attribute>
11489
11490 <attribute name="server" type="boolean">
11491 <desc>
11492 Flag whether this serial port acts as a server (creates a new pipe on
11493 the host) or as a client (uses the existing pipe). This attribute is
11494 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11495 </desc>
11496 </attribute>
11497
11498 <attribute name="path" type="wstring">
11499 <desc>
11500 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11501 PortMode_HostPipe, or the host serial device name when
11502 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11503 cases, setting a @c null or empty string as the attribute's value
11504 is an error. Otherwise, the value of this property is ignored.
11505 </desc>
11506 </attribute>
11507
11508 </interface>
11509
11510 <!--
11511 // IParallelPort
11512 /////////////////////////////////////////////////////////////////////////
11513 -->
11514
11515 <interface
11516 name="IParallelPort" extends="$unknown"
11517 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11518 wsmap="managed"
11519 >
11520
11521 <desc>
11522 The IParallelPort interface represents the virtual parallel port device.
11523
11524 The virtual parallel port device acts like an ordinary parallel port
11525 inside the virtual machine. This device communicates to the real
11526 parallel port hardware using the name of the parallel device on the host
11527 computer specified in the #path attribute.
11528
11529 Each virtual parallel port device is assigned a base I/O address and an
11530 IRQ number that will be reported to the guest operating system and used
11531 to operate the given parallel port from within the virtual machine.
11532
11533 <see>IMachine::getParallelPort</see>
11534 </desc>
11535
11536 <attribute name="slot" type="unsigned long" readonly="yes">
11537 <desc>
11538 Slot number this parallel port is plugged into. Corresponds to
11539 the value you pass to <link to="IMachine::getParallelPort"/>
11540 to obtain this instance.
11541 </desc>
11542 </attribute>
11543
11544 <attribute name="enabled" type="boolean">
11545 <desc>
11546 Flag whether the parallel port is enabled. If disabled,
11547 the parallel port will not be reported to the guest OS.
11548 </desc>
11549 </attribute>
11550
11551 <attribute name="IOBase" type="unsigned long">
11552 <desc>Base I/O address of the parallel port.</desc>
11553 </attribute>
11554
11555 <attribute name="IRQ" type="unsigned long">
11556 <desc>IRQ number of the parallel port.</desc>
11557 </attribute>
11558
11559 <attribute name="path" type="wstring">
11560 <desc>
11561 Host parallel device name. If this parallel port is enabled, setting a
11562 @c null or an empty string as this attribute's value will result into
11563 an error.
11564 </desc>
11565 </attribute>
11566
11567 </interface>
11568
11569
11570 <!--
11571 // IMachineDebugger
11572 /////////////////////////////////////////////////////////////////////////
11573 -->
11574
11575 <interface
11576 name="IMachineDebugger" extends="$unknown"
11577 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11578 wsmap="suppress"
11579 >
11580 <method name="resetStats">
11581 <desc>
11582 Reset VM statistics.
11583 </desc>
11584 <param name="pattern" type="wstring" dir="in">
11585 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11586 </param>
11587 </method>
11588
11589 <method name="dumpStats">
11590 <desc>
11591 Dumps VM statistics.
11592 </desc>
11593 <param name="pattern" type="wstring" dir="in">
11594 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11595 </param>
11596 </method>
11597
11598 <method name="getStats">
11599 <desc>
11600 Get the VM statistics in a XMLish format.
11601 </desc>
11602 <param name="pattern" type="wstring" dir="in">
11603 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11604 </param>
11605 <param name="withDescriptions" type="boolean" dir="in">
11606 <desc>Whether to include the descriptions.</desc>
11607 </param>
11608 <param name="stats" type="wstring" dir="out">
11609 <desc>The XML document containing the statistics.</desc>
11610 </param>
11611 </method>
11612
11613 <method name="injectNMI">
11614 <desc>
11615 Inject an NMI into a running VT-x/AMD-V VM.
11616 </desc>
11617 </method>
11618
11619 <attribute name="singlestep" type="boolean">
11620 <desc>Switch for enabling singlestepping.</desc>
11621 </attribute>
11622
11623 <attribute name="recompileUser" type="boolean">
11624 <desc>Switch for forcing code recompilation for user mode code.</desc>
11625 </attribute>
11626
11627 <attribute name="recompileSupervisor" type="boolean">
11628 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11629 </attribute>
11630
11631 <attribute name="PATMEnabled" type="boolean">
11632 <desc>Switch for enabling and disabling the PATM component.</desc>
11633 </attribute>
11634
11635 <attribute name="CSAMEnabled" type="boolean">
11636 <desc>Switch for enabling and disabling the CSAM component.</desc>
11637 </attribute>
11638
11639 <attribute name="logEnabled" type="boolean">
11640 <desc>Switch for enabling and disabling logging.</desc>
11641 </attribute>
11642
11643 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11644 <desc>
11645 Flag indicating whether the VM is currently making use of CPU hardware
11646 virtualization extensions.
11647 </desc>
11648 </attribute>
11649
11650 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11651 <desc>
11652 Flag indicating whether the VM is currently making use of the nested paging
11653 CPU hardware virtualization extension.
11654 </desc>
11655 </attribute>
11656
11657 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11658 <desc>
11659 Flag indicating whether the VM is currently making use of the VPID
11660 VT-x extension.
11661 </desc>
11662 </attribute>
11663
11664 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11665 <desc>
11666 Flag indicating whether the VM is currently making use of the Physical
11667 Address Extension CPU feature.
11668 </desc>
11669 </attribute>
11670
11671 <attribute name="virtualTimeRate" type="unsigned long">
11672 <desc>
11673 The rate at which the virtual time runs expressed as a percentage.
11674 The accepted range is 2% to 20000%.
11675 </desc>
11676 </attribute>
11677
11678 <!-- @todo method for setting log flags, groups and destination! -->
11679
11680 <attribute name="VM" type="long long" readonly="yes">
11681 <desc>
11682 Gets the VM handle. This is only for internal use while
11683 we carve the details of this interface.
11684 </desc>
11685 </attribute>
11686
11687 </interface>
11688
11689 <!--
11690 // IUSBController
11691 /////////////////////////////////////////////////////////////////////////
11692 -->
11693
11694 <interface
11695 name="IUSBController" extends="$unknown"
11696 uuid="6fdcccc5-abd3-4fec-9387-2ad3914fc4a8"
11697 wsmap="managed"
11698 >
11699 <attribute name="enabled" type="boolean">
11700 <desc>
11701 Flag whether the USB controller is present in the
11702 guest system. If disabled, the virtual guest hardware will
11703 not contain any USB controller. Can only be changed when
11704 the VM is powered off.
11705 </desc>
11706 </attribute>
11707
11708 <attribute name="enabledEhci" type="boolean">
11709 <desc>
11710 Flag whether the USB EHCI controller is present in the
11711 guest system. If disabled, the virtual guest hardware will
11712 not contain a USB EHCI controller. Can only be changed when
11713 the VM is powered off.
11714 </desc>
11715 </attribute>
11716
11717 <attribute name="proxyAvailable" type="boolean" readonly="yes">
11718 <desc>
11719 Flag whether there is an USB proxy available.
11720 </desc>
11721 </attribute>
11722
11723 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11724 <desc>
11725 USB standard version which the controller implements.
11726 This is a BCD which means that the major version is in the
11727 high byte and minor version is in the low byte.
11728 </desc>
11729 </attribute>
11730
11731 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11732 <desc>
11733 List of USB device filters associated with the machine.
11734
11735 If the machine is currently running, these filters are activated
11736 every time a new (supported) USB device is attached to the host
11737 computer that was not ignored by global filters
11738 (<link to="IHost::USBDeviceFilters"/>).
11739
11740 These filters are also activated when the machine is powered up.
11741 They are run against a list of all currently available USB
11742 devices (in states
11743 <link to="USBDeviceState_Available"/>,
11744 <link to="USBDeviceState_Busy"/>,
11745 <link to="USBDeviceState_Held"/>) that were not previously
11746 ignored by global filters.
11747
11748 If at least one filter matches the USB device in question, this
11749 device is automatically captured (attached to) the virtual USB
11750 controller of this machine.
11751
11752 <see>IUSBDeviceFilter, ::IUSBController</see>
11753 </desc>
11754 </attribute>
11755
11756 <method name="createDeviceFilter">
11757 <desc>
11758 Creates a new USB device filter. All attributes except
11759 the filter name are set to empty (any match),
11760 <i>active</i> is @c false (the filter is not active).
11761
11762 The created filter can then be added to the list of filters using
11763 <link to="#insertDeviceFilter"/>.
11764
11765 <result name="VBOX_E_INVALID_VM_STATE">
11766 The virtual machine is not mutable.
11767 </result>
11768
11769 <see>#deviceFilters</see>
11770 </desc>
11771 <param name="name" type="wstring" dir="in">
11772 <desc>
11773 Filter name. See <link to="IUSBDeviceFilter::name"/>
11774 for more info.
11775 </desc>
11776 </param>
11777 <param name="filter" type="IUSBDeviceFilter" dir="return">
11778 <desc>Created filter object.</desc>
11779 </param>
11780 </method>
11781
11782 <method name="insertDeviceFilter">
11783 <desc>
11784 Inserts the given USB device to the specified position
11785 in the list of filters.
11786
11787 Positions are numbered starting from <tt>0</tt>. If the specified
11788 position is equal to or greater than the number of elements in
11789 the list, the filter is added to the end of the collection.
11790
11791 <note>
11792 Duplicates are not allowed, so an attempt to insert a
11793 filter that is already in the collection, will return an
11794 error.
11795 </note>
11796
11797 <result name="VBOX_E_INVALID_VM_STATE">
11798 Virtual machine is not mutable.
11799 </result>
11800 <result name="E_INVALIDARG">
11801 USB device filter not created within this VirtualBox instance.
11802 </result>
11803 <result name="VBOX_E_INVALID_OBJECT_STATE">
11804 USB device filter already in list.
11805 </result>
11806
11807 <see>#deviceFilters</see>
11808 </desc>
11809 <param name="position" type="unsigned long" dir="in">
11810 <desc>Position to insert the filter to.</desc>
11811 </param>
11812 <param name="filter" type="IUSBDeviceFilter" dir="in">
11813 <desc>USB device filter to insert.</desc>
11814 </param>
11815 </method>
11816
11817 <method name="removeDeviceFilter">
11818 <desc>
11819 Removes a USB device filter from the specified position in the
11820 list of filters.
11821
11822 Positions are numbered starting from <tt>0</tt>. Specifying a
11823 position equal to or greater than the number of elements in
11824 the list will produce an error.
11825
11826 <see>#deviceFilters</see>
11827
11828 <result name="VBOX_E_INVALID_VM_STATE">
11829 Virtual machine is not mutable.
11830 </result>
11831 <result name="E_INVALIDARG">
11832 USB device filter list empty or invalid @a position.
11833 </result>
11834
11835 </desc>
11836 <param name="position" type="unsigned long" dir="in">
11837 <desc>Position to remove the filter from.</desc>
11838 </param>
11839 <param name="filter" type="IUSBDeviceFilter" dir="return">
11840 <desc>Removed USB device filter.</desc>
11841 </param>
11842 </method>
11843
11844 </interface>
11845
11846
11847 <!--
11848 // IUSBDevice
11849 /////////////////////////////////////////////////////////////////////////
11850 -->
11851
11852 <interface
11853 name="IUSBDevice" extends="$unknown"
11854 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11855 wsmap="managed"
11856 >
11857 <desc>
11858 The IUSBDevice interface represents a virtual USB device attached to the
11859 virtual machine.
11860
11861 A collection of objects implementing this interface is stored in the
11862 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11863 attached to a running virtual machine's USB controller.
11864 </desc>
11865
11866 <attribute name="id" type="uuid" mod="string" readonly="yes">
11867 <desc>
11868 Unique USB device ID. This ID is built from #vendorId,
11869 #productId, #revision and #serialNumber.
11870 </desc>
11871 </attribute>
11872
11873 <attribute name="vendorId" type="unsigned short" readonly="yes">
11874 <desc>Vendor ID.</desc>
11875 </attribute>
11876
11877 <attribute name="productId" type="unsigned short" readonly="yes">
11878 <desc>Product ID.</desc>
11879 </attribute>
11880
11881 <attribute name="revision" type="unsigned short" readonly="yes">
11882 <desc>
11883 Product revision number. This is a packed BCD represented as
11884 unsigned short. The high byte is the integer part and the low
11885 byte is the decimal.
11886 </desc>
11887 </attribute>
11888
11889 <attribute name="manufacturer" type="wstring" readonly="yes">
11890 <desc>Manufacturer string.</desc>
11891 </attribute>
11892
11893 <attribute name="product" type="wstring" readonly="yes">
11894 <desc>Product string.</desc>
11895 </attribute>
11896
11897 <attribute name="serialNumber" type="wstring" readonly="yes">
11898 <desc>Serial number string.</desc>
11899 </attribute>
11900
11901 <attribute name="address" type="wstring" readonly="yes">
11902 <desc>Host specific address of the device.</desc>
11903 </attribute>
11904
11905 <attribute name="port" type="unsigned short" readonly="yes">
11906 <desc>
11907 Host USB port number the device is physically
11908 connected to.
11909 </desc>
11910 </attribute>
11911
11912 <attribute name="version" type="unsigned short" readonly="yes">
11913 <desc>
11914 The major USB version of the device - 1 or 2.
11915 </desc>
11916 </attribute>
11917
11918 <attribute name="portVersion" type="unsigned short" readonly="yes">
11919 <desc>
11920 The major USB version of the host USB port the device is
11921 physically connected to - 1 or 2. For devices not connected to
11922 anything this will have the same value as the version attribute.
11923 </desc>
11924 </attribute>
11925
11926 <attribute name="remote" type="boolean" readonly="yes">
11927 <desc>
11928 Whether the device is physically connected to a remote VRDP
11929 client or to a local host machine.
11930 </desc>
11931 </attribute>
11932
11933 </interface>
11934
11935
11936 <!--
11937 // IUSBDeviceFilter
11938 /////////////////////////////////////////////////////////////////////////
11939 -->
11940
11941 <interface
11942 name="IUSBDeviceFilter" extends="$unknown"
11943 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11944 wsmap="managed"
11945 >
11946 <desc>
11947 The IUSBDeviceFilter interface represents an USB device filter used
11948 to perform actions on a group of USB devices.
11949
11950 This type of filters is used by running virtual machines to
11951 automatically capture selected USB devices once they are physically
11952 attached to the host computer.
11953
11954 A USB device is matched to the given device filter if and only if all
11955 attributes of the device match the corresponding attributes of the
11956 filter (that is, attributes are joined together using the logical AND
11957 operation). On the other hand, all together, filters in the list of
11958 filters carry the semantics of the logical OR operation. So if it is
11959 desirable to create a match like "this vendor id OR this product id",
11960 one needs to create two filters and specify "any match" (see below)
11961 for unused attributes.
11962
11963 All filter attributes used for matching are strings. Each string
11964 is an expression representing a set of values of the corresponding
11965 device attribute, that will match the given filter. Currently, the
11966 following filtering expressions are supported:
11967
11968 <ul>
11969 <li><i>Interval filters</i>. Used to specify valid intervals for
11970 integer device attributes (Vendor ID, Product ID and Revision).
11971 The format of the string is:
11972
11973 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11974
11975 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11976 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11977 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11978 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11979 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11980 possible integer is assumed.
11981 </li>
11982 <li><i>Boolean filters</i>. Used to specify acceptable values for
11983 boolean device attributes. The format of the string is:
11984
11985 <tt>true|false|yes|no|0|1</tt>
11986
11987 </li>
11988 <li><i>Exact match</i>. Used to specify a single value for the given
11989 device attribute. Any string that doesn't start with <tt>int:</tt>
11990 represents the exact match. String device attributes are compared to
11991 this string including case of symbols. Integer attributes are first
11992 converted to a string (see individual filter attributes) and then
11993 compared ignoring case.
11994
11995 </li>
11996 <li><i>Any match</i>. Any value of the corresponding device attribute
11997 will match the given filter. An empty or @c null string is
11998 used to construct this type of filtering expressions.
11999
12000 </li>
12001 </ul>
12002
12003 <note>
12004 On the Windows host platform, interval filters are not currently
12005 available. Also all string filter attributes
12006 (<link to="#manufacturer"/>, <link to="#product"/>,
12007 <link to="#serialNumber"/>) are ignored, so they behave as
12008 <i>any match</i> no matter what string expression is specified.
12009 </note>
12010
12011 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
12012 </desc>
12013
12014 <attribute name="name" type="wstring">
12015 <desc>
12016 Visible name for this filter.
12017 This name is used to visually distinguish one filter from another,
12018 so it can neither be @c null nor an empty string.
12019 </desc>
12020 </attribute>
12021
12022 <attribute name="active" type="boolean">
12023 <desc>Whether this filter active or has been temporarily disabled.</desc>
12024 </attribute>
12025
12026 <attribute name="vendorId" type="wstring">
12027 <desc>
12028 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
12029 The string representation for the <i>exact matching</i>
12030 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
12031 (including leading zeroes).
12032 </desc>
12033 </attribute>
12034
12035 <attribute name="productId" type="wstring">
12036 <desc>
12037 <link to="IUSBDevice::productId">Product ID</link> filter.
12038 The string representation for the <i>exact matching</i>
12039 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
12040 (including leading zeroes).
12041 </desc>
12042 </attribute>
12043
12044 <attribute name="revision" type="wstring">
12045 <desc>
12046 <link to="IUSBDevice::productId">Product revision number</link>
12047 filter. The string representation for the <i>exact matching</i>
12048 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
12049 of the integer part of the revision, and <tt>F</tt> is the
12050 decimal digit of its fractional part (including leading and
12051 trailing zeros).
12052 Note that for interval filters, it's best to use the hexadecimal
12053 form, because the revision is stored as a 16 bit packed BCD value;
12054 so the expression <tt>int:0x0100-0x0199</tt> will match any
12055 revision from <tt>1.0</tt> to <tt>1.99</tt>.
12056 </desc>
12057 </attribute>
12058
12059 <attribute name="manufacturer" type="wstring">
12060 <desc>
12061 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
12062 </desc>
12063 </attribute>
12064
12065 <attribute name="product" type="wstring">
12066 <desc>
12067 <link to="IUSBDevice::product">Product</link> filter.
12068 </desc>
12069 </attribute>
12070
12071 <attribute name="serialNumber" type="wstring">
12072 <desc>
12073 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
12074 </desc>
12075 </attribute>
12076
12077 <attribute name="port" type="wstring">
12078 <desc>
12079 <link to="IUSBDevice::port">Host USB port</link> filter.
12080 </desc>
12081 </attribute>
12082
12083 <attribute name="remote" type="wstring">
12084 <desc>
12085 <link to="IUSBDevice::remote">Remote state</link> filter.
12086 <note>
12087 This filter makes sense only for machine USB filters,
12088 i.e. it is ignored by IHostUSBDeviceFilter objects.
12089 </note>
12090 </desc>
12091 </attribute>
12092
12093 <attribute name="maskedInterfaces" type="unsigned long">
12094 <desc>
12095 This is an advanced option for hiding one or more USB interfaces
12096 from the guest. The value is a bit mask where the bits that are set
12097 means the corresponding USB interface should be hidden, masked off
12098 if you like.
12099 This feature only works on Linux hosts.
12100 </desc>
12101 </attribute>
12102
12103 </interface>
12104
12105
12106 <!--
12107 // IHostUSBDevice
12108 /////////////////////////////////////////////////////////////////////////
12109 -->
12110
12111 <enum
12112 name="USBDeviceState"
12113 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
12114 >
12115 <desc>
12116 USB device state. This enumeration represents all possible states
12117 of the USB device physically attached to the host computer regarding
12118 its state on the host computer and availability to guest computers
12119 (all currently running virtual machines).
12120
12121 Once a supported USB device is attached to the host, global USB
12122 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
12123 either ignore the device, or put it to USBDeviceState_Held state, or do
12124 nothing. Unless the device is ignored by global filters, filters of all
12125 currently running guests (<link to="IUSBController::deviceFilters"/>) are
12126 activated that can put it to USBDeviceState_Captured state.
12127
12128 If the device was ignored by global filters, or didn't match
12129 any filters at all (including guest ones), it is handled by the host
12130 in a normal way. In this case, the device state is determined by
12131 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
12132 or USBDeviceState_Available, depending on the current device usage.
12133
12134 Besides auto-capturing based on filters, the device can be manually
12135 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
12136 state is USBDeviceState_Busy, USBDeviceState_Available or
12137 USBDeviceState_Held.
12138
12139 <note>
12140 Due to differences in USB stack implementations in Linux and Win32,
12141 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
12142 only to the Linux version of the product. This also means that (<link
12143 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
12144 device state is USBDeviceState_Held.
12145 </note>
12146
12147 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
12148 </desc>
12149
12150 <const name="NotSupported" value="0">
12151 <desc>
12152 Not supported by the VirtualBox server, not available to guests.
12153 </desc>
12154 </const>
12155 <const name="Unavailable" value="1">
12156 <desc>
12157 Being used by the host computer exclusively,
12158 not available to guests.
12159 </desc>
12160 </const>
12161 <const name="Busy" value="2">
12162 <desc>
12163 Being used by the host computer, potentially available to guests.
12164 </desc>
12165 </const>
12166 <const name="Available" value="3">
12167 <desc>
12168 Not used by the host computer, available to guests (the host computer
12169 can also start using the device at any time).
12170 </desc>
12171 </const>
12172 <const name="Held" value="4">
12173 <desc>
12174 Held by the VirtualBox server (ignored by the host computer),
12175 available to guests.
12176 </desc>
12177 </const>
12178 <const name="Captured" value="5">
12179 <desc>
12180 Captured by one of the guest computers, not available
12181 to anybody else.
12182 </desc>
12183 </const>
12184 </enum>
12185
12186 <interface
12187 name="IHostUSBDevice" extends="IUSBDevice"
12188 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
12189 wsmap="managed"
12190 >
12191 <desc>
12192 The IHostUSBDevice interface represents a physical USB device attached
12193 to the host computer.
12194
12195 Besides properties inherited from IUSBDevice, this interface adds the
12196 <link to="#state"/> property that holds the current state of the USB
12197 device.
12198
12199 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
12200 </desc>
12201
12202 <attribute name="state" type="USBDeviceState" readonly="yes">
12203 <desc>
12204 Current state of the device.
12205 </desc>
12206 </attribute>
12207
12208 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
12209
12210 </interface>
12211
12212
12213 <!--
12214 // IHostUSBDeviceFilter
12215 /////////////////////////////////////////////////////////////////////////
12216 -->
12217
12218 <enum
12219 name="USBDeviceFilterAction"
12220 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
12221 >
12222 <desc>
12223 Actions for host USB device filters.
12224 <see>IHostUSBDeviceFilter, USBDeviceState</see>
12225 </desc>
12226
12227 <const name="Null" value="0">
12228 <desc>Null value (never used by the API).</desc>
12229 </const>
12230 <const name="Ignore" value="1">
12231 <desc>Ignore the matched USB device.</desc>
12232 </const>
12233 <const name="Hold" value="2">
12234 <desc>Hold the matched USB device.</desc>
12235 </const>
12236 </enum>
12237
12238 <interface
12239 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
12240 uuid="4cc70246-d74a-400f-8222-3900489c0374"
12241 wsmap="managed"
12242 >
12243 <desc>
12244 The IHostUSBDeviceFilter interface represents a global filter for a
12245 physical USB device used by the host computer. Used indirectly in
12246 <link to="IHost::USBDeviceFilters"/>.
12247
12248 Using filters of this type, the host computer determines the initial
12249 state of the USB device after it is physically attached to the
12250 host's USB controller.
12251
12252 <note>
12253 The <link to="IUSBDeviceFilter::remote"/> attribute is ignored by this type of
12254 filters, because it makes sense only for
12255 <link to="IUSBController::deviceFilters">machine USB filters</link>.
12256 </note>
12257
12258 <see>IHost::USBDeviceFilters</see>
12259 </desc>
12260
12261 <attribute name="action" type="USBDeviceFilterAction">
12262 <desc>
12263 Action performed by the host when an attached USB device
12264 matches this filter.
12265 </desc>
12266 </attribute>
12267
12268 </interface>
12269
12270 <!--
12271 // IAudioAdapter
12272 /////////////////////////////////////////////////////////////////////////
12273 -->
12274
12275 <enum
12276 name="AudioDriverType"
12277 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
12278 >
12279 <desc>
12280 Host audio driver type.
12281 </desc>
12282
12283 <const name="Null" value="0">
12284 <desc>Null value, also means "dummy audio driver".</desc>
12285 </const>
12286 <const name="WinMM" value="1">
12287 <desc>Windows multimedia (Windows hosts only).</desc>
12288 </const>
12289 <const name="OSS" value="2">
12290 <desc>Open Sound System (Linux hosts only).</desc>
12291 </const>
12292 <const name="ALSA" value="3">
12293 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
12294 </const>
12295 <const name="DirectSound" value="4">
12296 <desc>DirectSound (Windows hosts only).</desc>
12297 </const>
12298 <const name="CoreAudio" value="5">
12299 <desc>CoreAudio (Mac hosts only).</desc>
12300 </const>
12301 <const name="MMPM" value="6">
12302 <desc>Reserved for historical reasons.</desc>
12303 </const>
12304 <const name="Pulse" value="7">
12305 <desc>PulseAudio (Linux hosts only).</desc>
12306 </const>
12307 <const name="SolAudio" value="8">
12308 <desc>Solaris audio (Solaris hosts only).</desc>
12309 </const>
12310 </enum>
12311
12312 <enum
12313 name="AudioControllerType"
12314 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
12315 >
12316 <desc>
12317 Virtual audio controller type.
12318 </desc>
12319
12320 <const name="AC97" value="0"/>
12321 <const name="SB16" value="1"/>
12322 <const name="HDA" value="2"/>
12323 </enum>
12324
12325 <interface
12326 name="IAudioAdapter" extends="$unknown"
12327 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
12328 wsmap="managed"
12329 >
12330 <desc>
12331 The IAudioAdapter interface represents the virtual audio adapter of
12332 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
12333 </desc>
12334 <attribute name="enabled" type="boolean">
12335 <desc>
12336 Flag whether the audio adapter is present in the
12337 guest system. If disabled, the virtual guest hardware will
12338 not contain any audio adapter. Can only be changed when
12339 the VM is not running.
12340 </desc>
12341 </attribute>
12342 <attribute name="audioController" type="AudioControllerType">
12343 <desc>
12344 The audio hardware we emulate.
12345 </desc>
12346 </attribute>
12347 <attribute name="audioDriver" type="AudioDriverType">
12348 <desc>
12349 Audio driver the adapter is connected to. This setting
12350 can only be changed when the VM is not running.
12351 </desc>
12352 </attribute>
12353 </interface>
12354
12355 <!--
12356 // IVRDPServer
12357 /////////////////////////////////////////////////////////////////////////
12358 -->
12359
12360 <enum
12361 name="VRDPAuthType"
12362 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
12363 >
12364 <desc>
12365 VRDP authentication type.
12366 </desc>
12367
12368 <const name="Null" value="0">
12369 <desc>Null value, also means "no authentication".</desc>
12370 </const>
12371 <const name="External" value="1"/>
12372 <const name="Guest" value="2"/>
12373 </enum>
12374
12375 <interface
12376 name="IVRDPServer" extends="$unknown"
12377 uuid="7aeeb530-0b08-41fe-835d-9be9ec1dbe5c"
12378 wsmap="managed"
12379 >
12380 <attribute name="enabled" type="boolean">
12381 <desc>VRDP server status.</desc>
12382 </attribute>
12383
12384 <attribute name="ports" type="wstring">
12385 <desc>
12386 VRDP server port numbers. The server will try to bind to one of free ports from the list.
12387 <note>
12388 This is a string of comma separated TCP port numbers or port number ranges.
12389 Example <tt>5000,5010-5012,5015</tt>
12390 </note>
12391 </desc>
12392 </attribute>
12393
12394 <attribute name="netAddress" type="wstring">
12395 <desc>VRDP server address.</desc>
12396 </attribute>
12397
12398 <attribute name="authType" type="VRDPAuthType">
12399 <desc>VRDP authentication method.</desc>
12400 </attribute>
12401
12402 <attribute name="authTimeout" type="unsigned long">
12403 <desc>Timeout for guest authentication. Milliseconds.</desc>
12404 </attribute>
12405
12406 <attribute name="allowMultiConnection" type="boolean">
12407 <desc>
12408 Flag whether multiple simultaneous connections to the VM are permitted.
12409 Note that this will be replaced by a more powerful mechanism in the future.
12410 </desc>
12411 </attribute>
12412
12413 <attribute name="reuseSingleConnection" type="boolean">
12414 <desc>
12415 Flag whether the existing connection must be dropped and a new connection
12416 must be established by the VRDP server, when a new client connects in single
12417 connection mode.
12418 </desc>
12419 </attribute>
12420
12421 <attribute name="videoChannel" type="boolean">
12422 <desc>
12423 Flag whether RDP video channel is supported.
12424 </desc>
12425 </attribute>
12426
12427 <attribute name="videoChannelQuality" type="unsigned long">
12428 <desc>
12429 Image quality in percents.
12430 </desc>
12431 </attribute>
12432
12433 </interface>
12434
12435
12436 <!--
12437 // ISharedFolder
12438 /////////////////////////////////////////////////////////////////////////
12439 -->
12440
12441 <interface
12442 name="ISharedFolder" extends="$unknown"
12443 uuid="8388da11-b559-4574-a5b7-2bd7acd5cef8"
12444 wsmap="struct"
12445 >
12446 <desc>
12447 The ISharedFolder interface represents a folder in the host computer's
12448 file system accessible from the guest OS running inside a virtual
12449 machine using an associated logical name.
12450
12451 There are three types of shared folders:
12452 <ul>
12453 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12454 folders available to all virtual machines.</li>
12455 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12456 VM-specific shared folders available to the given virtual machine at
12457 startup.</li>
12458 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12459 VM-specific shared folders created in the session context (for
12460 example, when the virtual machine is running) and automatically
12461 discarded when the session is closed (the VM is powered off).</li>
12462 </ul>
12463
12464 Logical names of shared folders must be unique within the given scope
12465 (global, permanent or transient). However, they do not need to be unique
12466 across scopes. In this case, the definition of the shared folder in a
12467 more specific scope takes precedence over definitions in all other
12468 scopes. The order of precedence is (more specific to more general):
12469 <ol>
12470 <li>Transient definitions</li>
12471 <li>Permanent definitions</li>
12472 <li>Global definitions</li>
12473 </ol>
12474
12475 For example, if MyMachine has a shared folder named
12476 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12477 transient shared folder named <tt>C_DRIVE</tt> (that points
12478 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12479 of <tt>C_DRIVE</tt> in the guest OS so
12480 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12481 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12482 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12483 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12484 to <tt>C:\\</tt> if it still exists.
12485
12486 Note that permanent and transient shared folders of different machines
12487 are in different name spaces, so they don't overlap and don't need to
12488 have unique logical names.
12489
12490 <note>
12491 Global shared folders are not implemented in the current version of the
12492 product.
12493 </note>
12494 </desc>
12495
12496 <attribute name="name" type="wstring" readonly="yes">
12497 <desc>Logical name of the shared folder.</desc>
12498 </attribute>
12499
12500 <attribute name="hostPath" type="wstring" readonly="yes">
12501 <desc>Full path to the shared folder in the host file system.</desc>
12502 </attribute>
12503
12504 <attribute name="accessible" type="boolean" readonly="yes">
12505 <desc>
12506 Whether the folder defined by the host path is currently
12507 accessible or not.
12508 For example, the folder can be unaccessible if it is placed
12509 on the network share that is not available by the time
12510 this property is read.
12511 </desc>
12512 </attribute>
12513
12514 <attribute name="writable" type="boolean" readonly="yes">
12515 <desc>
12516 Whether the folder defined by the host path is writable or
12517 not.
12518 </desc>
12519 </attribute>
12520
12521 <attribute name="autoMount" type="boolean" readonly="yes">
12522 <desc>
12523 Whether the folder gets automatically mounted by the guest or not.
12524 </desc>
12525 </attribute>
12526
12527 <attribute name="lastAccessError" type="wstring" readonly="yes">
12528 <desc>
12529 Text message that represents the result of the last accessibility
12530 check.
12531
12532 Accessibility checks are performed each time the <link to="#accessible"/>
12533 attribute is read. An empty string is returned if the last
12534 accessibility check was successful. A non-empty string indicates a
12535 failure and should normally describe a reason of the failure (for
12536 example, a file read error).
12537 </desc>
12538 </attribute>
12539
12540 </interface>
12541
12542 <!--
12543 // ISession
12544 /////////////////////////////////////////////////////////////////////////
12545 -->
12546
12547 <interface
12548 name="IInternalSessionControl" extends="$unknown"
12549 uuid="0431ef9e-2c2e-42af-87d7-c8f52455f28a"
12550 internal="yes"
12551 wsmap="suppress"
12552 >
12553 <method name="getPID">
12554 <desc>PID of the process that has created this Session object.
12555 </desc>
12556 <param name="pid" type="unsigned long" dir="return"/>
12557 </method>
12558
12559 <method name="getRemoteConsole">
12560 <desc>
12561 Returns the console object suitable for remote control.
12562
12563 <result name="VBOX_E_INVALID_VM_STATE">
12564 Session state prevents operation.
12565 </result>
12566 <result name="VBOX_E_INVALID_OBJECT_STATE">
12567 Session type prevents operation.
12568 </result>
12569
12570 </desc>
12571 <param name="console" type="IConsole" dir="return"/>
12572 </method>
12573
12574 <method name="assignMachine">
12575 <desc>
12576 Assigns the machine object associated with this direct-type
12577 session or informs the session that it will be a remote one
12578 (if @a machine == @c null).
12579
12580 <result name="VBOX_E_INVALID_VM_STATE">
12581 Session state prevents operation.
12582 </result>
12583 <result name="VBOX_E_INVALID_OBJECT_STATE">
12584 Session type prevents operation.
12585 </result>
12586
12587 </desc>
12588 <param name="machine" type="IMachine" dir="in"/>
12589 </method>
12590
12591 <method name="assignRemoteMachine">
12592 <desc>
12593 Assigns the machine and the (remote) console object associated with
12594 this remote-type session.
12595
12596 <result name="VBOX_E_INVALID_VM_STATE">
12597 Session state prevents operation.
12598 </result>
12599
12600 </desc>
12601 <param name="machine" type="IMachine" dir="in"/>
12602 <param name="console" type="IConsole" dir="in"/>
12603 </method>
12604
12605 <method name="updateMachineState">
12606 <desc>
12607 Updates the machine state in the VM process.
12608 Must be called only in certain cases
12609 (see the method implementation).
12610
12611 <result name="VBOX_E_INVALID_VM_STATE">
12612 Session state prevents operation.
12613 </result>
12614 <result name="VBOX_E_INVALID_OBJECT_STATE">
12615 Session type prevents operation.
12616 </result>
12617
12618 </desc>
12619 <param name="aMachineState" type="MachineState" dir="in"/>
12620 </method>
12621
12622 <method name="uninitialize">
12623 <desc>
12624 Uninitializes (closes) this session. Used by VirtualBox to close
12625 the corresponding remote session when the direct session dies
12626 or gets closed.
12627
12628 <result name="VBOX_E_INVALID_VM_STATE">
12629 Session state prevents operation.
12630 </result>
12631
12632 </desc>
12633 </method>
12634
12635 <method name="onNetworkAdapterChange">
12636 <desc>
12637 Triggered when settings of a network adapter of the
12638 associated virtual machine have changed.
12639
12640 <result name="VBOX_E_INVALID_VM_STATE">
12641 Session state prevents operation.
12642 </result>
12643 <result name="VBOX_E_INVALID_OBJECT_STATE">
12644 Session type prevents operation.
12645 </result>
12646
12647 </desc>
12648 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12649 <param name="changeAdapter" type="boolean" dir="in"/>
12650 </method>
12651
12652 <method name="onSerialPortChange">
12653 <desc>
12654 Triggered when settings of a serial port of the
12655 associated virtual machine have changed.
12656
12657 <result name="VBOX_E_INVALID_VM_STATE">
12658 Session state prevents operation.
12659 </result>
12660 <result name="VBOX_E_INVALID_OBJECT_STATE">
12661 Session type prevents operation.
12662 </result>
12663
12664 </desc>
12665 <param name="serialPort" type="ISerialPort" dir="in"/>
12666 </method>
12667
12668 <method name="onParallelPortChange">
12669 <desc>
12670 Triggered when settings of a parallel port of the
12671 associated virtual machine have changed.
12672
12673 <result name="VBOX_E_INVALID_VM_STATE">
12674 Session state prevents operation.
12675 </result>
12676 <result name="VBOX_E_INVALID_OBJECT_STATE">
12677 Session type prevents operation.
12678 </result>
12679
12680 </desc>
12681 <param name="parallelPort" type="IParallelPort" dir="in"/>
12682 </method>
12683
12684 <method name="onStorageControllerChange">
12685 <desc>
12686 Triggered when settings of a storage controller of the
12687 associated virtual machine have changed.
12688
12689 <result name="VBOX_E_INVALID_VM_STATE">
12690 Session state prevents operation.
12691 </result>
12692 <result name="VBOX_E_INVALID_OBJECT_STATE">
12693 Session type prevents operation.
12694 </result>
12695
12696 </desc>
12697 </method>
12698
12699 <method name="onMediumChange">
12700 <desc>
12701 Triggered when attached media of the
12702 associated virtual machine have changed.
12703
12704 <result name="VBOX_E_INVALID_VM_STATE">
12705 Session state prevents operation.
12706 </result>
12707 <result name="VBOX_E_INVALID_OBJECT_STATE">
12708 Session type prevents operation.
12709 </result>
12710
12711 </desc>
12712
12713 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12714 <param name="force" type="boolean" dir="in"/>
12715 </method>
12716
12717 <method name="onCPUChange">
12718 <desc>
12719 Notification when a CPU changes.
12720 </desc>
12721 <param name="cpu" type="unsigned long" dir="in">
12722 <desc>The CPU which changed</desc>
12723 </param>
12724 <param name="add" type="boolean" dir="in">
12725 <desc>Flag whether the CPU was added or removed</desc>
12726 </param>
12727 </method>
12728
12729 <method name="onCPUExecutionCapChange">
12730 <desc>
12731 Notification when the CPU execution cap changes.
12732 </desc>
12733 <param name="executionCap" type="unsigned long" dir="in">
12734 <desc>The new CPU execution cap value. (1-100)</desc>
12735 </param>
12736 </method>
12737
12738 <method name="onVRDPServerChange">
12739 <desc>
12740 Triggered when settings of the VRDP server object of the
12741 associated virtual machine have changed.
12742
12743 <result name="VBOX_E_INVALID_VM_STATE">
12744 Session state prevents operation.
12745 </result>
12746 <result name="VBOX_E_INVALID_OBJECT_STATE">
12747 Session type prevents operation.
12748 </result>
12749
12750 </desc>
12751 <param name="restart" type="boolean" dir="in">
12752 <desc>Flag whether the server must be restarted</desc>
12753 </param>
12754 </method>
12755
12756 <method name="onUSBControllerChange">
12757 <desc>
12758 Triggered when settings of the USB controller object of the
12759 associated virtual machine have changed.
12760
12761 <result name="VBOX_E_INVALID_VM_STATE">
12762 Session state prevents operation.
12763 </result>
12764 <result name="VBOX_E_INVALID_OBJECT_STATE">
12765 Session type prevents operation.
12766 </result>
12767
12768 </desc>
12769 </method>
12770
12771 <method name="onSharedFolderChange">
12772 <desc>
12773 Triggered when a permanent (global or machine) shared folder has been
12774 created or removed.
12775 <note>
12776 We don't pass shared folder parameters in this notification because
12777 the order in which parallel notifications are delivered is not defined,
12778 therefore it could happen that these parameters were outdated by the
12779 time of processing this notification.
12780 </note>
12781
12782 <result name="VBOX_E_INVALID_VM_STATE">
12783 Session state prevents operation.
12784 </result>
12785 <result name="VBOX_E_INVALID_OBJECT_STATE">
12786 Session type prevents operation.
12787 </result>
12788
12789 </desc>
12790 <param name="global" type="boolean" dir="in"/>
12791 </method>
12792
12793 <method name="onUSBDeviceAttach">
12794 <desc>
12795 Triggered when a request to capture a USB device (as a result
12796 of matched USB filters or direct call to
12797 <link to="IConsole::attachUSBDevice"/>) has completed.
12798 A @c null @a error object means success, otherwise it
12799 describes a failure.
12800
12801 <result name="VBOX_E_INVALID_VM_STATE">
12802 Session state prevents operation.
12803 </result>
12804 <result name="VBOX_E_INVALID_OBJECT_STATE">
12805 Session type prevents operation.
12806 </result>
12807
12808 </desc>
12809 <param name="device" type="IUSBDevice" dir="in"/>
12810 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12811 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12812 </method>
12813
12814 <method name="onUSBDeviceDetach">
12815 <desc>
12816 Triggered when a request to release the USB device (as a result
12817 of machine termination or direct call to
12818 <link to="IConsole::detachUSBDevice"/>) has completed.
12819 A @c null @a error object means success, otherwise it
12820 describes a failure.
12821
12822 <result name="VBOX_E_INVALID_VM_STATE">
12823 Session state prevents operation.
12824 </result>
12825 <result name="VBOX_E_INVALID_OBJECT_STATE">
12826 Session type prevents operation.
12827 </result>
12828
12829 </desc>
12830 <param name="id" type="uuid" mod="string" dir="in"/>
12831 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12832 </method>
12833
12834 <method name="onShowWindow">
12835 <desc>
12836 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12837 <link to="IMachine::showConsoleWindow"/> in order to notify
12838 console listeners
12839 <link to="ICanShowWindowEvent"/>
12840 and <link to="IShowWindowEvent"/>.
12841
12842 <result name="VBOX_E_INVALID_OBJECT_STATE">
12843 Session type prevents operation.
12844 </result>
12845
12846 </desc>
12847 <param name="check" type="boolean" dir="in"/>
12848 <param name="canShow" type="boolean" dir="out"/>
12849 <param name="winId" type="long long" dir="out"/>
12850 </method>
12851
12852 <method name="accessGuestProperty">
12853 <desc>
12854 Called by <link to="IMachine::getGuestProperty"/> and by
12855 <link to="IMachine::setGuestProperty"/> in order to read and
12856 modify guest properties.
12857
12858 <result name="VBOX_E_INVALID_VM_STATE">
12859 Machine session is not open.
12860 </result>
12861 <result name="VBOX_E_INVALID_OBJECT_STATE">
12862 Session type is not direct.
12863 </result>
12864
12865 </desc>
12866 <param name="name" type="wstring" dir="in"/>
12867 <param name="value" type="wstring" dir="in"/>
12868 <param name="flags" type="wstring" dir="in"/>
12869 <param name="isSetter" type="boolean" dir="in"/>
12870 <param name="retValue" type="wstring" dir="out"/>
12871 <param name="retTimestamp" type="long long" dir="out"/>
12872 <param name="retFlags" type="wstring" dir="out"/>
12873 </method>
12874
12875 <method name="enumerateGuestProperties">
12876 <desc>
12877 Return a list of the guest properties matching a set of patterns along
12878 with their values, time stamps and flags.
12879
12880 <result name="VBOX_E_INVALID_VM_STATE">
12881 Machine session is not open.
12882 </result>
12883 <result name="VBOX_E_INVALID_OBJECT_STATE">
12884 Session type is not direct.
12885 </result>
12886
12887 </desc>
12888 <param name="patterns" type="wstring" dir="in">
12889 <desc>
12890 The patterns to match the properties against as a comma-separated
12891 string. If this is empty, all properties currently set will be
12892 returned.
12893 </desc>
12894 </param>
12895 <param name="key" type="wstring" dir="out" safearray="yes">
12896 <desc>
12897 The key names of the properties returned.
12898 </desc>
12899 </param>
12900 <param name="value" type="wstring" dir="out" safearray="yes">
12901 <desc>
12902 The values of the properties returned. The array entries match the
12903 corresponding entries in the @a key array.
12904 </desc>
12905 </param>
12906 <param name="timestamp" type="long long" dir="out" safearray="yes">
12907 <desc>
12908 The time stamps of the properties returned. The array entries match
12909 the corresponding entries in the @a key array.
12910 </desc>
12911 </param>
12912 <param name="flags" type="wstring" dir="out" safearray="yes">
12913 <desc>
12914 The flags of the properties returned. The array entries match the
12915 corresponding entries in the @a key array.
12916 </desc>
12917 </param>
12918 </method>
12919
12920 <method name="onlineMergeMedium">
12921 <desc>
12922 Triggers online merging of a hard disk. Used internally when deleting
12923 a snapshot while a VM referring to the same hard disk chain is running.
12924
12925 <result name="VBOX_E_INVALID_VM_STATE">
12926 Machine session is not open.
12927 </result>
12928 <result name="VBOX_E_INVALID_OBJECT_STATE">
12929 Session type is not direct.
12930 </result>
12931
12932 </desc>
12933 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
12934 <desc>The medium attachment to identify the medium chain.</desc>
12935 </param>
12936 <param name="sourceIdx" type="unsigned long" dir="in">
12937 <desc>The index of the source image in the chain.
12938 Redundant, but drastically reduces IPC.</desc>
12939 </param>
12940 <param name="targetIdx" type="unsigned long" dir="in">
12941 <desc>The index of the target image in the chain.
12942 Redundant, but drastically reduces IPC.</desc>
12943 </param>
12944 <param name="source" type="IMedium" dir="in">
12945 <desc>Merge source medium.</desc>
12946 </param>
12947 <param name="target" type="IMedium" dir="in">
12948 <desc>Merge target medium.</desc>
12949 </param>
12950 <param name="mergeForward" type="boolean" dir="in">
12951 <desc>Merge direction.</desc>
12952 </param>
12953 <param name="parentForTarget" type="IMedium" dir="in">
12954 <desc>For forward merges: new parent for target medium.</desc>
12955 </param>
12956 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
12957 <desc>For backward merges: list of media which need their parent UUID
12958 updated.</desc>
12959 </param>
12960 <param name="progress" type="IProgress" dir="in">
12961 <desc>
12962 Progress object for this operation.
12963 </desc>
12964 </param>
12965 </method>
12966
12967 </interface>
12968
12969 <interface
12970 name="ISession" extends="$unknown"
12971 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12972 wsmap="managed"
12973 >
12974 <desc>
12975 The ISession interface represents a client process and allows for locking
12976 virtual machines (represented by IMachine objects) to prevent conflicting
12977 changes to the machine.
12978
12979 Any caller wishing to manipulate a virtual machine needs to create a session
12980 object first, which lives in its own process space. Such session objects are
12981 then associated with <link to="IMachine" /> objects living in the VirtualBox
12982 server process to coordinate such changes.
12983
12984 There are two typical scenarios in which sessions are used:
12985
12986 <ul>
12987 <li>To alter machine settings or control a running virtual machine, one
12988 needs to lock a machine for a given session (client process) by calling
12989 <link to="IMachine::lockMachine"/>.
12990
12991 Whereas multiple sessions may control a running virtual machine, only
12992 one process can obtain a write lock on the machine to prevent conflicting
12993 changes. A write lock is also needed if a process wants to actually run a
12994 virtual machine in its own context, such as the VirtualBox GUI or
12995 VBoxHeadless front-ends. They must also lock a machine for their own
12996 sessions before they are allowed to power up the virtual machine.
12997
12998 As a result, no machine settings can be altered while another process is
12999 already using it, either because that process is modifying machine settings
13000 or because the machine is running.
13001 </li>
13002 <li>
13003 To start a VM using one of the existing VirtualBox front-ends (e.g. the
13004 VirtualBox GUI or VBoxHeadless), one would use
13005 <link to="IMachine::launchVMProcess"/>, which also takes a session object
13006 as its first parameter. This session then identifies the caller and lets the
13007 caller control the started machine (for example, pause machine execution or
13008 power it down) as well as be notified about machine execution state changes.
13009 </li>
13010 </ul>
13011
13012 How sessions objects are created in a client process depends on whether you use
13013 the Main API via COM or via the webservice:
13014
13015 <ul>
13016 <li>When using the COM API directly, an object of the Session class from the
13017 VirtualBox type library needs to be created. In regular COM C++ client code,
13018 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
13019 This object will then act as a local session object in further calls to open
13020 a session.
13021 </li>
13022
13023 <li>In the webservice, the session manager (IWebsessionManager) instead creates
13024 a session object automatically whenever <link to="IWebsessionManager::logon" />
13025 is called. A managed object reference to that session object can be retrieved by
13026 calling <link to="IWebsessionManager::getSessionObject" />.
13027 </li>
13028 </ul>
13029 </desc>
13030
13031 <attribute name="state" type="SessionState" readonly="yes">
13032 <desc>Current state of this session.</desc>
13033 </attribute>
13034
13035 <attribute name="type" type="SessionType" readonly="yes">
13036 <desc>
13037 Type of this session. The value of this attribute is valid only
13038 if the session currently has a machine locked (i.e. its
13039 <link to="#state" /> is Locked), otherwise an error will be returned.
13040 </desc>
13041 </attribute>
13042
13043 <attribute name="machine" type="IMachine" readonly="yes">
13044 <desc>Machine object associated with this session.</desc>
13045 </attribute>
13046
13047 <attribute name="console" type="IConsole" readonly="yes">
13048 <desc>Console object associated with this session.</desc>
13049 </attribute>
13050
13051 <method name="unlockMachine">
13052 <desc>
13053 Unlocks a machine that was previously locked for the current session.
13054
13055 Calling this method is required every time a machine has been locked
13056 for a particular session using the <link to="IMachine::launchVMProcess" />
13057 or <link to="IMachine::lockMachine" /> calls. Otherwise the state of
13058 the machine will be set to <link to="MachineState_Aborted" /> on the
13059 server, and changes made to the machine settings will be lost.
13060
13061 Generally, it is recommended to unlock all machines explicitly
13062 before terminating the application (regardless of the reason for
13063 the termination).
13064
13065 <note>
13066 Do not expect the session state (<link to="ISession::state" />
13067 to return to "Unlocked" immediately after you invoke this method,
13068 particularly if you have started a new VM process. The session
13069 state will automatically return to "Unlocked" once the VM is no
13070 longer executing, which can of course take a very long time.
13071 </note>
13072
13073 <result name="E_UNEXPECTED">
13074 Session is not locked.
13075 </result>
13076
13077 </desc>
13078 </method>
13079
13080 </interface>
13081
13082 <!--
13083 // IStorageController
13084 /////////////////////////////////////////////////////////////////////////
13085 -->
13086
13087 <enum
13088 name="StorageBus"
13089 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
13090 >
13091 <desc>
13092 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy);
13093 see <link to="IStorageController::bus" />.
13094 </desc>
13095 <const name="Null" value="0">
13096 <desc>@c null value. Never used by the API.</desc>
13097 </const>
13098 <const name="IDE" value="1"/>
13099 <const name="SATA" value="2"/>
13100 <const name="SCSI" value="3"/>
13101 <const name="Floppy" value="4"/>
13102 <const name="SAS" value="5"/>
13103 </enum>
13104
13105 <enum
13106 name="StorageControllerType"
13107 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
13108 >
13109 <desc>
13110 The exact variant of storage controller hardware presented
13111 to the guest; see <link to="IStorageController::controllerType" />.
13112 </desc>
13113
13114 <const name="Null" value="0">
13115 <desc>@c null value. Never used by the API.</desc>
13116 </const>
13117 <const name="LsiLogic" value="1">
13118 <desc>A SCSI controller of the LsiLogic variant.</desc>
13119 </const>
13120 <const name="BusLogic" value="2">
13121 <desc>A SCSI controller of the BusLogic variant.</desc>
13122 </const>
13123 <const name="IntelAhci" value="3">
13124 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
13125 </const>
13126 <const name="PIIX3" value="4">
13127 <desc>An IDE controller of the PIIX3 variant.</desc>
13128 </const>
13129 <const name="PIIX4" value="5">
13130 <desc>An IDE controller of the PIIX4 variant.</desc>
13131 </const>
13132 <const name="ICH6" value="6">
13133 <desc>An IDE controller of the ICH6 variant.</desc>
13134 </const>
13135 <const name="I82078" value="7">
13136 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
13137 </const>
13138 <const name="LsiLogicSas" value="8">
13139 <desc>A variant of the LsiLogic controller using SAS.</desc>
13140 </const>
13141 </enum>
13142
13143 <enum
13144 name="ChipsetType"
13145 uuid="8b4096a8-a7c3-4d3b-bbb1-05a0a51ec394"
13146 >
13147 <desc>
13148 Type of emulated chipset (mostly southbridge).
13149 </desc>
13150
13151 <const name="Null" value="0">
13152 <desc>@c null value. Never used by the API.</desc>
13153 </const>
13154 <const name="PIIX3" value="1">
13155 <desc>A PIIX3 (PCI IDE ISA Xcelerator) chipset.</desc>
13156 </const>
13157 <const name="ICH9" value="2">
13158 <desc>A ICH9 (I/O Controller Hub) chipset.</desc>
13159 </const>
13160 </enum>
13161
13162 <interface
13163 name="IStorageController" extends="$unknown"
13164 uuid="fd93adc0-bbaa-4256-9e6e-00e29f9151c9"
13165 wsmap="managed"
13166 >
13167 <desc>
13168 Represents a storage controller that is attached to a virtual machine
13169 (<link to="IMachine" />). Just as drives (hard disks, DVDs, FDs) are
13170 attached to storage controllers in a real computer, virtual drives
13171 (represented by <link to="IMediumAttachment" />) are attached to virtual
13172 storage controllers, represented by this interface.
13173
13174 As opposed to physical hardware, VirtualBox has a very generic concept
13175 of a storage controller, and for purposes of the Main API, all virtual
13176 storage is attached to virtual machines via instances of this interface.
13177 There are five types of such virtual storage controllers: IDE, SCSI, SATA,
13178 SAS and Floppy (see <link to="#bus" />). Depending on which of these four
13179 is used, certain sub-types may be available and can be selected in
13180 <link to="#controllerType" />.
13181
13182 Depending on these settings, the guest operating system might see
13183 significantly different virtual hardware.
13184 </desc>
13185
13186 <attribute name="name" type="wstring" readonly="yes">
13187 <desc>
13188 Name of the storage controller, as originally specified with
13189 <link to="IMachine::addStorageController" />. This then uniquely
13190 identifies this controller with other method calls such as
13191 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
13192 </desc>
13193 </attribute>
13194
13195 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
13196 <desc>
13197 Maximum number of devices which can be attached to one port.
13198 </desc>
13199 </attribute>
13200
13201 <attribute name="minPortCount" type="unsigned long" readonly="yes">
13202 <desc>
13203 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
13204 </desc>
13205 </attribute>
13206
13207 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
13208 <desc>
13209 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
13210 </desc>
13211 </attribute>
13212
13213 <attribute name="instance" type="unsigned long">
13214 <desc>
13215 The instance number of the device in the running VM.
13216 </desc>
13217 </attribute>
13218
13219 <attribute name="portCount" type="unsigned long">
13220 <desc>
13221 The number of currently usable ports on the controller.
13222 The minimum and maximum number of ports for one controller are
13223 stored in <link to="IStorageController::minPortCount"/>
13224 and <link to="IStorageController::maxPortCount"/>.
13225 </desc>
13226 </attribute>
13227
13228 <attribute name="bus" type="StorageBus" readonly="yes">
13229 <desc>
13230 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy).
13231 </desc>
13232 </attribute>
13233
13234 <attribute name="controllerType" type="StorageControllerType">
13235 <desc>
13236 The exact variant of storage controller hardware presented
13237 to the guest.
13238 Depending on this value, VirtualBox will provide a different
13239 virtual storage controller hardware to the guest.
13240 For SATA, SAS and floppy controllers, only one variant is
13241 available, but for IDE and SCSI, there are several.
13242
13243 For SCSI controllers, the default type is LsiLogic.
13244 </desc>
13245 </attribute>
13246
13247 <attribute name="useHostIOCache" type="boolean">
13248 <desc>
13249 If true, the storage controller emulation will use a dedicated I/O thread, enable the host I/O
13250 caches and use synchronous file APIs on the host. This was the only option in the API before
13251 VirtualBox 3.2 and is still the default for IDE controllers.
13252
13253 If false, the host I/O cache will be disabled for image files attached to this storage controller.
13254 Instead, the storage controller emulation will use asynchronous I/O APIs on the host. This makes
13255 it possible to turn off the host I/O caches because the emulation can handle unaligned access to
13256 the file. This should be used on OS X and Linux hosts if a high I/O load is expected or many
13257 virtual machines are running at the same time to prevent I/O cache related hangs.
13258 This option new with the API of VirtualBox 3.2 and is now the default for non-IDE storage controllers.
13259 </desc>
13260 </attribute>
13261
13262 <method name="getIDEEmulationPort">
13263 <desc>
13264 Gets the corresponding port number which is emulated as an IDE device.
13265 Works only with SATA controllers.
13266
13267 <result name="E_INVALIDARG">
13268 The @a devicePosition is not in the range 0 to 3.
13269 </result>
13270 <result name="E_NOTIMPL">
13271 The storage controller type is not SATAIntelAhci.
13272 </result>
13273
13274 </desc>
13275 <param name="devicePosition" type="long" dir="in"/>
13276 <param name="portNumber" type="long" dir="return"/>
13277 </method>
13278
13279 <method name="setIDEEmulationPort">
13280 <desc>
13281 Sets the port number which is emulated as an IDE device.
13282 Works only with SATA controllers.
13283
13284 <result name="E_INVALIDARG">
13285 The @a devicePosition is not in the range 0 to 3 or the
13286 @a portNumber is not in the range 0 to 29.
13287 </result>
13288 <result name="E_NOTIMPL">
13289 The storage controller type is not SATAIntelAhci.
13290 </result>
13291
13292 </desc>
13293 <param name="devicePosition" type="long" dir="in"/>
13294 <param name="portNumber" type="long" dir="in"/>
13295 </method>
13296
13297 </interface>
13298
13299<if target="wsdl">
13300
13301 <!--
13302 // IManagedObjectRef
13303 /////////////////////////////////////////////////////////////////////////
13304 -->
13305
13306 <interface
13307 name="IManagedObjectRef" extends="$unknown"
13308 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
13309 internal="yes"
13310 wsmap="managed"
13311 wscpp="hardcoded"
13312 >
13313 <desc>
13314 Managed object reference.
13315
13316 Only within the webservice, a managed object reference (which is really
13317 an opaque number) allows a webservice client to address an object
13318 that lives in the address space of the webservice server.
13319
13320 Behind each managed object reference, there is a COM object that lives
13321 in the webservice server's address space. The COM object is not freed
13322 until the managed object reference is released, either by an explicit
13323 call to <link to="IManagedObjectRef::release" /> or by logging off from
13324 the webservice (<link to="IWebsessionManager::logoff" />), which releases
13325 all objects created during the webservice session.
13326
13327 Whenever a method call of the VirtualBox API returns a COM object, the
13328 webservice representation of that method will instead return a
13329 managed object reference, which can then be used to invoke methods
13330 on that object.
13331 </desc>
13332
13333 <method name="getInterfaceName">
13334 <desc>
13335 Returns the name of the interface that this managed object represents,
13336 for example, "IMachine", as a string.
13337 </desc>
13338 <param name="return" type="wstring" dir="return"/>
13339 </method>
13340
13341 <method name="release">
13342 <desc>
13343 Releases this managed object reference and frees the resources that
13344 were allocated for it in the webservice server process. After calling
13345 this method, the identifier of the reference can no longer be used.
13346 </desc>
13347 </method>
13348
13349 </interface>
13350
13351 <!--
13352 // IWebsessionManager
13353 /////////////////////////////////////////////////////////////////////////
13354 -->
13355
13356 <interface
13357 name="IWebsessionManager" extends="$unknown"
13358 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
13359 internal="yes"
13360 wsmap="global"
13361 wscpp="hardcoded"
13362 >
13363 <desc>
13364 Websession manager. This provides essential services
13365 to webservice clients.
13366 </desc>
13367 <method name="logon">
13368 <desc>
13369 Logs a new client onto the webservice and returns a managed object reference to
13370 the IVirtualBox instance, which the client can then use as a basis to further
13371 queries, since all calls to the VirtualBox API are based on the IVirtualBox
13372 interface, in one way or the other.
13373 </desc>
13374 <param name="username" type="wstring" dir="in"/>
13375 <param name="password" type="wstring" dir="in"/>
13376 <param name="return" type="IVirtualBox" dir="return"/>
13377 </method>
13378
13379 <method name="getSessionObject">
13380 <desc>
13381 Returns a managed object reference to the internal ISession object that was created
13382 for this web service session when the client logged on.
13383
13384 <see>ISession</see>
13385 </desc>
13386 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13387 <param name="return" type="ISession" dir="return"/>
13388 </method>
13389
13390 <method name="logoff">
13391 <desc>
13392 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
13393 and destroys all resources associated with the session (most importantly, all
13394 managed objects created in the server while the session was active).
13395 </desc>
13396 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13397 </method>
13398
13399 </interface>
13400
13401</if>
13402
13403 <!--
13404 // IPerformanceCollector & friends
13405 /////////////////////////////////////////////////////////////////////////
13406 -->
13407
13408 <interface
13409 name="IPerformanceMetric" extends="$unknown"
13410 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
13411 >
13412 <desc>
13413 The IPerformanceMetric interface represents parameters of the given
13414 performance metric.
13415 </desc>
13416
13417 <attribute name="metricName" type="wstring" readonly="yes">
13418 <desc>
13419 Name of the metric.
13420 </desc>
13421 </attribute>
13422
13423 <attribute name="object" type="$unknown" readonly="yes">
13424 <desc>
13425 Object this metric belongs to.
13426 </desc>
13427 </attribute>
13428
13429 <attribute name="description" type="wstring" readonly="yes">
13430 <desc>
13431 Textual description of the metric.
13432 </desc>
13433 </attribute>
13434
13435 <attribute name="period" type="unsigned long" readonly="yes">
13436 <desc>
13437 Time interval between samples, measured in seconds.
13438 </desc>
13439 </attribute>
13440
13441 <attribute name="count" type="unsigned long" readonly="yes">
13442 <desc>
13443 Number of recent samples retained by the performance collector for this
13444 metric.
13445
13446 When the collected sample count exceeds this number, older samples
13447 are discarded.
13448 </desc>
13449 </attribute>
13450
13451 <attribute name="unit" type="wstring" readonly="yes">
13452 <desc>
13453 Unit of measurement.
13454 </desc>
13455 </attribute>
13456
13457 <attribute name="minimumValue" type="long" readonly="yes">
13458 <desc>
13459 Minimum possible value of this metric.
13460 </desc>
13461 </attribute>
13462
13463 <attribute name="maximumValue" type="long" readonly="yes">
13464 <desc>
13465 Maximum possible value of this metric.
13466 </desc>
13467 </attribute>
13468 </interface>
13469
13470 <interface
13471 name="IPerformanceCollector" extends="$unknown"
13472 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
13473 wsmap="managed"
13474 >
13475 <desc>
13476 The IPerformanceCollector interface represents a service that collects
13477 and stores performance metrics data.
13478
13479 Performance metrics are associated with objects of interfaces like IHost
13480 and IMachine. Each object has a distinct set of performance metrics. The
13481 set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
13482
13483 Metric data is collected at the specified intervals and is retained
13484 internally. The interval and the number of retained samples can be set
13485 with <link to="IPerformanceCollector::setupMetrics" />. Both metric data
13486 and collection settings are not persistent, they are discarded as soon as
13487 VBoxSVC process terminates. Moreover, metric settings and data associated
13488 with a particular VM only exist while VM is running. They disappear as
13489 soon as VM shuts down. It is not possible to set up metrics for machines
13490 that are powered off. One needs to start VM first, then set up metric
13491 collection parameters.
13492
13493 Metrics are organized hierarchically, with each level separated by a
13494 slash (/) character. Generally, the scheme for metric names is like this:
13495
13496 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
13497
13498 "Category/Metric" together form the base metric name. A base metric is
13499 the smallest unit for which a sampling interval and the number of
13500 retained samples can be set. Only base metrics can be enabled and
13501 disabled. All sub-metrics are collected when their base metric is
13502 collected. Collected values for any set of sub-metrics can be queried
13503 with <link to="IPerformanceCollector::queryMetricsData" />.
13504
13505 For example "CPU/Load/User:avg" metric name stands for the "CPU"
13506 category, "Load" metric, "User" submetric, "average" aggregate. An
13507 aggregate function is computed over all retained data. Valid aggregate
13508 functions are:
13509
13510 <ul>
13511 <li>avg -- average</li>
13512 <li>min -- minimum</li>
13513 <li>max -- maximum</li>
13514 </ul>
13515
13516 When setting up metric parameters, querying metric data, enabling or
13517 disabling metrics wildcards can be used in metric names to specify a
13518 subset of metrics. For example, to select all CPU-related metrics
13519 use <tt>CPU/*</tt>, all averages can be queried using <tt>*:avg</tt> and
13520 so on. To query metric values without aggregates <tt>*:</tt> can be used.
13521
13522 The valid names for base metrics are:
13523
13524 <ul>
13525 <li>CPU/Load</li>
13526 <li>CPU/MHz</li>
13527 <li>RAM/Usage</li>
13528 </ul>
13529
13530 The general sequence for collecting and retrieving the metrics is:
13531 <ul>
13532 <li>
13533 Obtain an instance of IPerformanceCollector with
13534 <link to="IVirtualBox::performanceCollector" />
13535 </li>
13536 <li>
13537 Allocate and populate an array with references to objects the metrics
13538 will be collected for. Use references to IHost and IMachine objects.
13539 </li>
13540 <li>
13541 Allocate and populate an array with base metric names the data will
13542 be collected for.
13543 </li>
13544 <li>
13545 Call <link to="IPerformanceCollector::setupMetrics" />. From now on
13546 the metric data will be collected and stored.
13547 </li>
13548 <li>
13549 Wait for the data to get collected.
13550 </li>
13551 <li>
13552 Allocate and populate an array with references to objects the metric
13553 values will be queried for. You can re-use the object array used for
13554 setting base metrics.
13555 </li>
13556 <li>
13557 Allocate and populate an array with metric names the data will be
13558 collected for. Note that metric names differ from base metric names.
13559 </li>
13560 <li>
13561 Call <link to="IPerformanceCollector::queryMetricsData" />. The data
13562 that have been collected so far are returned. Note that the values
13563 are still retained internally and data collection continues.
13564 </li>
13565 </ul>
13566
13567 For an example of usage refer to the following files in VirtualBox SDK:
13568 <ul>
13569 <li>
13570 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13571 </li>
13572 <li>
13573 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13574 </li>
13575 </ul>
13576 </desc>
13577
13578 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13579 <desc>
13580 Array of unique names of metrics.
13581
13582 This array represents all metrics supported by the performance
13583 collector. Individual objects do not necessarily support all of them.
13584 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13585 list of supported metrics for a particular object.
13586 </desc>
13587 </attribute>
13588
13589 <method name="getMetrics">
13590 <desc>
13591 Returns parameters of specified metrics for a set of objects.
13592 <note>
13593 @c Null metrics array means all metrics. @c Null object array means
13594 all existing objects.
13595 </note>
13596 </desc>
13597 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13598 <desc>
13599 Metric name filter. Currently, only a comma-separated list of metrics
13600 is supported.
13601 </desc>
13602 </param>
13603 <param name="objects" type="$unknown" dir="in" safearray="yes">
13604 <desc>
13605 Set of objects to return metric parameters for.
13606 </desc>
13607 </param>
13608 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13609 <desc>
13610 Array of returned metric parameters.
13611 </desc>
13612 </param>
13613 </method>
13614
13615 <method name="setupMetrics">
13616 <desc>
13617 Sets parameters of specified base metrics for a set of objects. Returns
13618 an array of <link to="IPerformanceMetric" /> describing the metrics
13619 have been affected.
13620 <note>
13621 @c Null or empty metric name array means all metrics. @c Null or
13622 empty object array means all existing objects. If metric name array
13623 contains a single element and object array contains many, the single
13624 metric name array element is applied to each object array element to
13625 form metric/object pairs.
13626 </note>
13627 </desc>
13628 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13629 <desc>
13630 Metric name filter. Comma-separated list of metrics with wildcard
13631 support.
13632 </desc>
13633 </param>
13634 <param name="objects" type="$unknown" dir="in" safearray="yes">
13635 <desc>
13636 Set of objects to setup metric parameters for.
13637 </desc>
13638 </param>
13639 <param name="period" type="unsigned long" dir="in">
13640 <desc>
13641 Time interval in seconds between two consecutive samples of
13642 performance data.
13643 </desc>
13644 </param>
13645 <param name="count" type="unsigned long" dir="in">
13646 <desc>
13647 Number of samples to retain in performance data history. Older
13648 samples get discarded.
13649 </desc>
13650 </param>
13651 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13652 <desc>
13653 Array of metrics that have been modified by the call to this method.
13654 </desc>
13655 </param>
13656 </method>
13657
13658 <method name="enableMetrics">
13659 <desc>
13660 Turns on collecting specified base metrics. Returns an array of
13661 <link to="IPerformanceMetric" /> describing the metrics have been
13662 affected.
13663 <note>
13664 @c Null or empty metric name array means all metrics. @c Null or
13665 empty object array means all existing objects. If metric name array
13666 contains a single element and object array contains many, the single
13667 metric name array element is applied to each object array element to
13668 form metric/object pairs.
13669 </note>
13670 </desc>
13671 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13672 <desc>
13673 Metric name filter. Comma-separated list of metrics with wildcard
13674 support.
13675 </desc>
13676 </param>
13677 <param name="objects" type="$unknown" dir="in" safearray="yes">
13678 <desc>
13679 Set of objects to enable metrics for.
13680 </desc>
13681 </param>
13682 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13683 <desc>
13684 Array of metrics that have been modified by the call to this method.
13685 </desc>
13686 </param>
13687 </method>
13688
13689 <method name="disableMetrics">
13690 <desc>
13691 Turns off collecting specified base metrics. Returns an array of
13692 <link to="IPerformanceMetric" /> describing the metrics have been
13693 affected.
13694 <note>
13695 @c Null or empty metric name array means all metrics. @c Null or
13696 empty object array means all existing objects. If metric name array
13697 contains a single element and object array contains many, the single
13698 metric name array element is applied to each object array element to
13699 form metric/object pairs.
13700 </note>
13701 </desc>
13702 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13703 <desc>
13704 Metric name filter. Comma-separated list of metrics with wildcard
13705 support.
13706 </desc>
13707 </param>
13708 <param name="objects" type="$unknown" dir="in" safearray="yes">
13709 <desc>
13710 Set of objects to disable metrics for.
13711 </desc>
13712 </param>
13713 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13714 <desc>
13715 Array of metrics that have been modified by the call to this method.
13716 </desc>
13717 </param>
13718 </method>
13719
13720 <method name="queryMetricsData">
13721 <desc>
13722 Queries collected metrics data for a set of objects.
13723
13724 The data itself and related metric information are returned in seven
13725 parallel and one flattened array of arrays. Elements of
13726 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13727 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13728 the same index describe one set of values corresponding to a single
13729 metric.
13730
13731 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13732 start and length of a sub-array is indicated by
13733 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13734 value for metric <tt>metricNames[i]</tt> is at
13735 <tt>returnData[returnIndices[i]]</tt>.
13736
13737 <note>
13738 @c Null or empty metric name array means all metrics. @c Null or
13739 empty object array means all existing objects. If metric name array
13740 contains a single element and object array contains many, the single
13741 metric name array element is applied to each object array element to
13742 form metric/object pairs.
13743 </note>
13744 <note>
13745 Data collection continues behind the scenes after call to @c
13746 queryMetricsData. The return data can be seen as the snapshot of the
13747 current state at the time of @c queryMetricsData call. The internally
13748 kept metric values are not cleared by the call. This makes possible
13749 querying different subsets of metrics or aggregates with subsequent
13750 calls. If periodic querying is needed it is highly suggested to query
13751 the values with @c interval*count period to avoid confusion. This way
13752 a completely new set of data values will be provided by each query.
13753 </note>
13754 </desc>
13755 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13756 <desc>
13757 Metric name filter. Comma-separated list of metrics with wildcard
13758 support.
13759 </desc>
13760 </param>
13761 <param name="objects" type="$unknown" dir="in" safearray="yes">
13762 <desc>
13763 Set of objects to query metrics for.
13764 </desc>
13765 </param>
13766 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13767 <desc>
13768 Names of metrics returned in @c returnData.
13769 </desc>
13770 </param>
13771 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13772 <desc>
13773 Objects associated with metrics returned in @c returnData.
13774 </desc>
13775 </param>
13776 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13777 <desc>
13778 Units of measurement for each returned metric.
13779 </desc>
13780 </param>
13781 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13782 <desc>
13783 Divisor that should be applied to return values in order to get
13784 floating point values. For example:
13785 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13786 will retrieve the floating point value of i-th sample of the first
13787 metric.
13788 </desc>
13789 </param>
13790 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13791 <desc>
13792 Sequence numbers of the first elements of value sequences of
13793 particular metrics returned in @c returnData. For aggregate metrics
13794 it is the sequence number of the sample the aggregate started
13795 calculation from.
13796 </desc>
13797 </param>
13798 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13799 <desc>
13800 Indices of the first elements of value sequences of particular
13801 metrics returned in @c returnData.
13802 </desc>
13803 </param>
13804 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13805 <desc>
13806 Lengths of value sequences of particular metrics.
13807 </desc>
13808 </param>
13809 <param name="returnData" type="long" dir="return" safearray="yes">
13810 <desc>
13811 Flattened array of all metric data containing sequences of values for
13812 each metric.
13813 </desc>
13814 </param>
13815 </method>
13816
13817 </interface>
13818 <enum
13819 name="NATAliasMode"
13820 uuid="67772168-50d9-11df-9669-7fb714ee4fa1">
13821 <desc></desc>
13822 <const name="AliasLog" value="0x1">
13823 <desc></desc>
13824 </const>
13825 <const name="AliasProxyOnly" value="0x02">
13826 <desc></desc>
13827 </const>
13828 <const name="AliasUseSamePorts" value="0x04">
13829 <desc></desc>
13830 </const>
13831 </enum>
13832 <enum
13833 name="NATProtocol"
13834 uuid="e90164be-eb03-11de-94af-fff9b1c1b19f"
13835 >
13836 <desc>Protocol definitions used with NAT port-forwarding rules.</desc>
13837 <const name="UDP" value="0">
13838 <desc>Port-forwarding uses UDP protocol.</desc>
13839 </const>
13840 <const name="TCP" value="1">
13841 <desc>Port-forwarding uses TCP protocol.</desc>
13842 </const>
13843 </enum>
13844
13845 <interface
13846 name="INATEngine" extends="$unknown"
13847 uuid="4b286616-eb03-11de-b0fb-1701eca42246"
13848 wsmap="managed"
13849 >
13850 <desc>Interface for managing a NAT engine which is used with a virtual machine. This
13851 allows for changing NAT behavior such as port-forwarding rules. This interface is
13852 used in the <link to="INetworkAdapter::natDriver" /> attribute.</desc>
13853 <attribute name="network" type="wstring">
13854 <desc>The network attribute of the NAT engine (the same value is used with built-in
13855 DHCP server to fill corresponding fields of DHCP leases).</desc>
13856 </attribute>
13857 <attribute name="hostIP" type="wstring">
13858 <desc>IP of host interface to bind all opened sockets to.
13859 <note>Changing this does not change binding of port forwarding.</note>
13860 </desc>
13861 </attribute>
13862 <attribute name="tftpPrefix" type="wstring">
13863 <desc>TFTP prefix attribute which is used with the built-in DHCP server to fill
13864 the corresponding fields of DHCP leases.</desc>
13865 </attribute>
13866 <attribute name="tftpBootFile" type="wstring">
13867 <desc>TFTP boot file attribute which is used with the built-in DHCP server to fill
13868 the corresponding fields of DHCP leases.</desc>
13869 </attribute>
13870 <attribute name="tftpNextServer" type="wstring">
13871 <desc>TFTP server attribute which is used with the built-in DHCP server to fill
13872 the corresponding fields of DHCP leases.
13873 <note>The preferred form is IPv4 addresses.</note>
13874 </desc>
13875 </attribute>
13876 <attribute name="aliasMode" type="unsigned long">
13877 <desc></desc>
13878 </attribute>
13879 <attribute name="dnsPassDomain" type="boolean">
13880 <desc>Whether the DHCP server should pass the DNS domain used by the host.</desc>
13881 </attribute>
13882 <attribute name="dnsProxy" type="boolean">
13883 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
13884 of the DNS proxy and process traffic using DNS servers registered on the host.</desc>
13885 </attribute>
13886 <attribute name="dnsUseHostResolver" type="boolean">
13887 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
13888 of the DNS proxy and process traffic using the host resolver mechanism.</desc>
13889 </attribute>
13890 <attribute name="redirects" type="wstring" readonly="yes" safearray="yes">
13891 <desc>Array of NAT port-forwarding rules in string representation, in the following
13892 format: "name,protocol id,host ip,host port,guest ip,guest port".</desc>
13893 </attribute>
13894 <method name="setNetworkSettings">
13895 <desc>Sets network configuration of the NAT engine.</desc>
13896 <param name="mtu" type="unsigned long" dir="in">
13897 <desc>MTU (maximum transmission unit) of the NAT engine in bytes.</desc>
13898 </param>
13899 <param name="sockSnd" type="unsigned long" dir="in">
13900 <desc>Capacity of the socket send buffer in bytes when creating a new socket.</desc>
13901 </param>
13902 <param name="sockRcv" type="unsigned long" dir="in">
13903 <desc>Capacity of the socket receive buffer in bytes when creating a new socket.</desc>
13904 </param>
13905 <param name="TcpWndSnd" type="unsigned long" dir="in">
13906 <desc>Initial size of the NAT engine's sending TCP window in bytes when
13907 establishing a new TCP connection.</desc>
13908 </param>
13909 <param name="TcpWndRcv" type="unsigned long" dir="in">
13910 <desc>Initial size of the NAT engine's receiving TCP window in bytes when
13911 establishing a new TCP connection.</desc>
13912 </param>
13913 </method>
13914 <method name="getNetworkSettings">
13915 <desc>Returns network configuration of NAT engine. See <link to="#setNetworkSettings" />
13916 for parameter descriptions.</desc>
13917 <param name="mtu" type="unsigned long" dir="out" />
13918 <param name="sockSnd" type="unsigned long" dir="out" />
13919 <param name="sockRcv" type="unsigned long" dir="out" />
13920 <param name="TcpWndSnd" type="unsigned long" dir="out" />
13921 <param name="TcpWndRcv" type="unsigned long" dir="out" />
13922 </method>
13923 <method name="addRedirect">
13924 <desc>Adds a new NAT port-forwarding rule.</desc>
13925 <param name="name" type="wstring" dir="in">
13926 <desc>The name of the rule. An empty name is acceptable, in which case the NAT engine
13927 auto-generates one using the other parameters.</desc>
13928 </param>
13929 <param name="proto" type="NATProtocol" dir="in">
13930 <desc>Protocol handled with the rule.</desc>
13931 </param>
13932 <param name="hostIp" type="wstring" dir="in">
13933 <desc>IP of the host interface to which the rule should apply. An empty ip address is
13934 acceptable, in which case the NAT engine binds the handling socket to any interface.</desc>
13935 </param>
13936 <param name="hostPort" type="unsigned short" dir="in">
13937 <desc>The port number to listen on.</desc>
13938 </param>
13939 <param name="guestIp" type="wstring" dir="in">
13940 <desc>The IP address of the guest which the NAT engine will forward matching packets
13941 to. An empty IP address is acceptable, in which case the NAT engine will forward
13942 packets to the first DHCP lease (x.x.x.15).</desc>
13943 </param>
13944 <param name="guestPort" type="unsigned short" dir="in">
13945 <desc>The port number to forward.</desc>
13946 </param>
13947 </method>
13948 <method name="removeRedirect">
13949 <desc>Removes a port-forwarding rule that was previously registered.</desc>
13950 <param name="name" type="wstring" dir="in">
13951 <desc>The name of the rule to delete.</desc>
13952 </param>
13953 </method>
13954 </interface>
13955
13956 <enum
13957 name="VBoxEventType"
13958 uuid="1728bb3b-4843-4f12-af67-f7a1f69f3a52">
13959
13960 <desc>
13961 Type of an event.
13962 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
13963 </desc>
13964
13965 <const name="Invalid" value="0">
13966 <desc>
13967 Invalid event, must be first.
13968 </desc>
13969 </const>
13970
13971 <const name="Any" value="1">
13972 <desc>
13973 Wildcard for all events.
13974 Events of this type are never delivered, and only used in
13975 registerListener() call to simplify registration.
13976 </desc>
13977 </const>
13978
13979 <const name="Vetoable" value="2">
13980 <desc>
13981 Wildcard for all vetoable events. Events of this type are never delivered, and only
13982 used in registerListener() call to simplify registration.
13983 </desc>
13984 </const>
13985
13986 <const name="MachineEvent" value="3">
13987 <desc>
13988 Wildcard for all machine events. Events of this type are never delivered, and only used in
13989 registerListener() call to simplify registration.
13990 </desc>
13991 </const>
13992
13993 <const name="SnapshotEvent" value="4">
13994 <desc>
13995 Wildcard for all snapshot events. Events of this type are never delivered, and only used in
13996 registerListener() call to simplify registration.
13997 </desc>
13998 </const>
13999
14000 <const name="InputEvent" value="5">
14001 <desc>
14002 Wildcard for all input device (keyboard, mouse) events.
14003 Events of this type are never delivered, and only used in
14004 registerListener() call to simplify registration.
14005 </desc>
14006 </const>
14007
14008 <const name="LastWildcard" value="31">
14009 <desc>
14010 Last wildcard.
14011 </desc>
14012 </const>
14013
14014 <const name="OnMachineStateChanged" value="32">
14015 <desc>
14016 See <link to="IMachineStateChangedEvent">IMachineStateChangedEvent</link>.
14017 </desc>
14018 </const>
14019 <const name="OnMachineDataChanged" value="33">
14020 <desc>
14021 See <link to="IMachineDataChangedEvent">IMachineDataChangedEvent</link>.
14022 </desc>
14023 </const>
14024 <const name="OnExtraDataChanged" value="34">
14025 <desc>
14026 See <link to="IExtraDataChangedEvent">IExtraDataChangedEvent</link>.
14027 </desc>
14028 </const>
14029 <const name="OnExtraDataCanChange" value="35">
14030 <desc>
14031 See <link to="IExtraDataCanChangeEvent">IExtraDataCanChangeEvent</link>.
14032 </desc>
14033 </const>
14034 <const name="OnMediumRegistered" value="36">
14035 <desc>
14036 See <link to="IMediumRegisteredEvent">IMediumRegisteredEvent</link>.
14037 </desc>
14038 </const>
14039 <const name="OnMachineRegistered" value="37">
14040 <desc>
14041 See <link to="IMachineRegisteredEvent">IMachineRegisteredEvent</link>.
14042 </desc>
14043 </const>
14044 <const name="OnSessionStateChanged" value="38">
14045 <desc>
14046 See <link to="ISessionStateChangedEvent">ISessionStateChangedEvent</link>.
14047 </desc>
14048 </const>
14049 <const name="OnSnapshotTaken" value="39">
14050 <desc>
14051 See <link to="ISnapshotTakenEvent">ISnapshotTakenEvent</link>.
14052 </desc>
14053 </const>
14054 <const name="OnSnapshotDeleted" value="40">
14055 <desc>
14056 See <link to="ISnapshotDeletedEvent">ISnapshotDeletedEvent</link>.
14057 </desc>
14058 </const>
14059 <const name="OnSnapshotChanged" value="41">
14060 <desc>
14061 See <link to="ISnapshotChangedEvent">ISnapshotChangedEvent</link>.
14062 </desc>
14063 </const>
14064 <const name="OnGuestPropertyChanged" value="42">
14065 <desc>
14066 See <link to="IGuestPropertyChangedEvent">IGuestPropertyChangedEvent</link>.
14067 </desc>
14068 </const>
14069 <!-- Console events -->
14070 <const name="OnMousePointerShapeChanged" value="43">
14071 <desc>
14072 See <link to="IMousePointerShapeChangedEvent">IMousePointerShapeChangedEvent</link>.
14073 </desc>
14074 </const>
14075 <const name="OnMouseCapabilityChanged" value="44">
14076 <desc>
14077 See <link to="IMouseCapabilityChangedEvent">IMouseCapabilityChangedEvent</link>.
14078 </desc>
14079 </const>
14080 <const name="OnKeyboardLedsChanged" value="45">
14081 <desc>
14082 See <link to="IKeyboardLedsChangedEvent">IKeyboardLedsChangedEvent</link>.
14083 </desc>
14084 </const>
14085 <const name="OnStateChanged" value="46">
14086 <desc>
14087 See <link to="IStateChangedEvent">IStateChangedEvent</link>.
14088 </desc>
14089 </const>
14090 <const name="OnAdditionsStateChanged" value="47">
14091 <desc>
14092 See <link to="IAdditionsStateChangedEvent">IAdditionsStateChangedEvent</link>.
14093 </desc>
14094 </const>
14095 <const name="OnNetworkAdapterChanged" value="48">
14096 <desc>
14097 See <link to="INetworkAdapterChangedEvent">INetworkAdapterChangedEvent</link>.
14098 </desc>
14099 </const>
14100 <const name="OnSerialPortChanged" value="49">
14101 <desc>
14102 See <link to="ISerialPortChangedEvent">ISerialPortChangedEvent</link>.
14103 </desc>
14104 </const>
14105 <const name="OnParallelPortChanged" value="50">
14106 <desc>
14107 See <link to="IParallelPortChangedEvent">IParallelPortChangedEvent</link>.
14108 </desc>
14109 </const>
14110 <const name="OnStorageControllerChanged" value="51">
14111 <desc>
14112 See <link to="IStorageControllerChangedEvent">IStorageControllerChangedEvent</link>.
14113 </desc>
14114 </const>
14115 <const name="OnMediumChanged" value="52">
14116 <desc>
14117 See <link to="IMediumChangedEvent">IMediumChangedEvent</link>.
14118 </desc>
14119 </const>
14120 <const name="OnVRDPServerChanged" value="53">
14121 <desc>
14122 See <link to="IVRDPServerChangedEvent">IVRDPServerChangedEvent</link>.
14123 </desc>
14124 </const>
14125 <const name="OnUSBControllerChanged" value="54">
14126 <desc>
14127 See <link to="IUSBControllerChangedEvent">IUSBControllerChangedEvent</link>.
14128 </desc>
14129 </const>
14130 <const name="OnUSBDeviceStateChanged" value="55">
14131 <desc>
14132 See <link to="IUSBDeviceStateChangedEvent">IUSBDeviceStateChangedEvent</link>.
14133 </desc>
14134 </const>
14135 <const name="OnSharedFolderChanged" value="56">
14136 <desc>
14137 See <link to="ISharedFolderChangedEvent">ISharedFolderChangedEvent</link>.
14138 </desc>
14139 </const>
14140 <const name="OnRuntimeError" value="57">
14141 <desc>
14142 See <link to="IRuntimeErrorEvent">IRuntimeErrorEvent</link>.
14143 </desc>
14144 </const>
14145 <const name="OnCanShowWindow" value="58">
14146 <desc>
14147 See <link to="ICanShowWindowEvent">ICanShowWindowEvent</link>.
14148 </desc>
14149 </const>
14150 <const name="OnShowWindow" value="59">
14151 <desc>
14152 See <link to="IShowWindowEvent">IShowWindowEvent</link>.
14153 </desc>
14154 </const>
14155 <const name="OnCPUChanged" value="60">
14156 <desc>
14157 See <link to="ICPUChangedEvent">ICPUChangedEvent</link>.
14158 </desc>
14159 </const>
14160 <const name="OnRemoteDisplayInfoChanged" value="61">
14161 <desc>
14162 See <link to="IRemoteDisplayInfoChangedEvent">IRemoteDisplayInfoChangedEvent</link>.
14163 </desc>
14164 </const>
14165 <const name="OnEventSourceChanged" value="62">
14166 <desc>
14167 See <link to="IEventSourceChangedEvent">IEventSourceChangedEvent</link>.
14168 </desc>
14169 </const>
14170 <const name="OnCPUExecutionCapChanged" value="63">
14171 <desc>
14172 See <link to="ICPUExecutionCapChangedEvent">ICPUExecutionCapChangedEvent</link>.
14173 </desc>
14174 </const>
14175 <const name="OnGuestKeyboardEvent" value="64">
14176 <desc>
14177 See <link to="IGuestKeyboardEvent">IGuestKeyboardEvent</link>.
14178 </desc>
14179 </const>
14180 <const name="OnGuestMouseEvent" value="65">
14181 <desc>
14182 See <link to="IGuestMouseEvent">IGuestMouseEvent</link>.
14183 </desc>
14184 </const>
14185 <!-- Last event marker -->
14186 <const name="Last" value="66">
14187 <desc>
14188 Must be last event, used for iterations and structures relying on numerical event values.
14189 </desc>
14190 </const>
14191
14192 </enum>
14193
14194 <interface
14195 name="IEventSource" extends="$unknown"
14196 uuid="3c670618-f727-4fe9-94d2-8243f489a033"
14197 wsmap="managed"
14198 >
14199 <desc>
14200 Event source. Generally, any object which could generate events can be an event source,
14201 or aggregate one. To simplify using one-way protocols such as webservices running on top of HTTP(S),
14202 an event source can work with listeners in either active or passive mode. In active mode it is up to
14203 the IEventSource implementation to call <link to="IEventListener::handleEvent" />, in passive mode the
14204 event source keeps track of pending events for each listener and returns available events on demand.
14205
14206 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
14207 </desc>
14208
14209 <method name="createListener">
14210 <desc>
14211 Creates a new listener object, useful for passive mode.
14212 </desc>
14213 <param name="listener" type="IEventListener" dir="return"/>
14214 </method>
14215
14216 <method name="registerListener">
14217 <desc>
14218 Register an event listener.
14219
14220 <note>
14221 To avoid system overload, the VirtualBox server process checks if passive event
14222 listeners call <link to="IEventSource::getEvent"/> frequently enough. In the
14223 current implementation, if more than 100 pending events are detected for a passive
14224 event listener, it is forcefully unregistered by the system, and further
14225 <link to="#getEvent" /> calls will return @c VBOX_E_OBJECT_NOT_FOUND.
14226 </note>
14227 </desc>
14228 <param name="listener" type="IEventListener" dir="in">
14229 <desc>Listener to register.</desc>
14230 </param>
14231 <param name="interesting" type="VBoxEventType" dir="in" safearray="yes">
14232 <desc>
14233 Event types listener is interested in. One can use wildcards like -
14234 <link to="VBoxEventType_Any"/> to specify wildcards, matching more
14235 than one event.
14236 </desc>
14237 </param>
14238 <param name="active" type="boolean" dir="in">
14239 <desc>
14240 Which mode this listener is operating in.
14241 In active mode, <link to="IEventListener::handleEvent" /> is called directly.
14242 In passive mode, an internal event queue is created for this this IEventListener.
14243 For each event coming in, it is added to queues for all interested registered passive
14244 listeners. It is then up to the external code to call the listener's
14245 <link to="IEventListener::handleEvent" /> method. When done with an event, the
14246 external code must call <link to="#eventProcessed" />.
14247 </desc>
14248 </param>
14249 </method>
14250
14251 <method name="unregisterListener">
14252 <desc>
14253 Unregister an event listener. If listener is passive, and some waitable events are still
14254 in queue they are marked as processed automatically.
14255 </desc>
14256 <param name="listener" type="IEventListener" dir="in">
14257 <desc>Listener to unregister.</desc>
14258 </param>
14259 </method>
14260
14261 <method name="fireEvent">
14262 <desc>
14263 Fire an event for this source.
14264 </desc>
14265 <param name="event" type="IEvent" dir="in">
14266 <desc>Event to deliver.</desc>
14267 </param>
14268 <param name="timeout" type="long" dir="in">
14269 <desc>
14270 Maximum time to wait for event processing (if event is waitable), in ms;
14271 0 = no wait, -1 = indefinite wait.
14272 </desc>
14273 </param>
14274 <param name="result" type="boolean" dir="return">
14275 <desc>true if an event was delivered to all targets, or is non-waitable.</desc>
14276 </param>
14277 </method>
14278
14279 <method name="getEvent">
14280 <desc>
14281 Get events from this peer's event queue (for passive mode). Calling this method
14282 regularly is required for passive event listeners to avoid system overload;
14283 see <link to="IEventSource::registerListener" /> for details.
14284
14285 <result name="VBOX_E_OBJECT_NOT_FOUND">
14286 Listener is not registered, or autounregistered.
14287 </result>
14288 </desc>
14289 <param name="listener" type="IEventListener" dir="in">
14290 <desc>Which listener to get data for.</desc>
14291 </param>
14292 <param name="timeout" type="long" dir="in">
14293 <desc>
14294 Maximum time to wait for events, in ms;
14295 0 = no wait, -1 = indefinite wait.
14296 </desc>
14297 </param>
14298 <param name="event" type="IEvent" dir="return">
14299 <desc>Event retrieved, or null if none available.</desc>
14300 </param>
14301 </method>
14302
14303 <method name="eventProcessed">
14304 <desc>
14305 Must be called for waitable events after a particular listener finished its
14306 event processing. When all listeners of a particular event have called this
14307 method, the system will then call <link to="IEvent::setProcessed" />.
14308 </desc>
14309 <param name="listener" type="IEventListener" dir="in">
14310 <desc>Which listener processed event.</desc>
14311 </param>
14312 <param name="event" type="IEvent" dir="in">
14313 <desc>Which event.</desc>
14314 </param>
14315 </method>
14316
14317 </interface>
14318
14319 <interface
14320 name="IEventListener" extends="$unknown"
14321 uuid="67099191-32e7-4f6c-85ee-422304c71b90"
14322 wsmap="managed"
14323 >
14324 <desc>
14325 Event listener. An event listener can work in either active or passive mode, depending on the way
14326 it was registered.
14327 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
14328 </desc>
14329
14330 <method name="handleEvent">
14331 <desc>
14332 Handle event callback (called directly by IEventSource in active mode, or could be
14333 called by event processor thread in passive mode).
14334 </desc>
14335 <param name="event" type="IEvent" dir="in">
14336 <desc>Event available.</desc>
14337 </param>
14338 </method>
14339
14340 </interface>
14341
14342 <interface
14343 name="IEvent" extends="$unknown"
14344 uuid="0ca2adba-8f30-401b-a8cd-fe31dbe839c0"
14345 wsmap="managed"
14346 >
14347 <desc>
14348 Abstract parent interface for VirtualBox events. Actual events will typically implement
14349 a more specific interface which derives from this (see below).
14350
14351 <b>Introduction to VirtualBox events</b>
14352
14353 Generally speaking, an event (represented by this interface) signals that something
14354 happened, while an event listener (see <link to="IEventListener" />) represents an
14355 entity that is interested in certain events. In order for this to work with
14356 unidirectional protocols (i.e. web services), the concepts of passive and active
14357 listener are used.
14358
14359 Event consumers can register themselves as listeners, providing an array of
14360 events they are interested in (see <link to="IEventSource::registerListener" />).
14361 When an event triggers, the listener is notified about the event. The exact
14362 mechanism of the notification depends on whether the listener was registered as
14363 an active or passive listener:
14364
14365 <ul>
14366 <li>An active listener is very similar to a callback: it is a function invoked
14367 by the API. As opposed to the callbacks that were used in the API before
14368 VirtualBox 3.3 however, events are now objects with an interface hierarchy.
14369 </li>
14370
14371 <li>Passive listeners are somewhat tricker to implement, but do not require
14372 a client function to be callable, which is not an option with scripting
14373 languages or web service clients. Internally the <link to="IEventSource" />
14374 implementation maintains an event queue for each passive listener, and
14375 newly arrived events are put in this queue. When the listener calls
14376 <link to="IEventSource::getEvent"/>, first element from its internal event
14377 queue is returned. When the client completes processing of an event,
14378 the <link to="IEventSource::eventProcessed" /> function must be called,
14379 acknowledging that the event was processed. It supports implementing
14380 waitable events. On passive listener unregistration, all events from its
14381 queue are auto-acknowledged.
14382 </li>
14383 </ul>
14384
14385 Waitable events are useful in situations where the event generator wants to track
14386 delivery or a party wants to wait until all listeners have completed the event. A
14387 typical example would be a vetoable event (see <link to="IVetoEvent" />) where a
14388 listeners might veto a certain action, and thus the event producer has to make
14389 sure that all listeners have processed the event and not vetoed before taking
14390 the action.
14391
14392 A given event may have both passive and active listeners at the same time.
14393
14394 <b>Using events</b>
14395
14396 Any VirtualBox object capable of producing externally visible events provides an
14397 @c eventSource read-only attribute, which is of the type <link to="IEventSource" />.
14398 This event source object is notified by VirtualBox once something has happened, so
14399 consumers may register event listeners with this event source. To register a listener,
14400 an object implementing the <link to="IEventListener" /> interface must be provided.
14401 For active listeners, such an object is typically created by the consumer, while for
14402 passive listeners <link to="IEventSource::createListener" /> should be used. Please
14403 note that a listener created with @c createListener() must not be used as an active listener.
14404
14405 Once created, the listener must be registered to listen for the desired events
14406 (see <link to="IEventSource::registerListener" />), providing an array of
14407 <link to="VBoxEventType" /> enums. Those elements can either be the individual
14408 event IDs or wildcards matching multiple event IDs.
14409
14410 After registration, the callback's <link to="IEventListener::handleEvent" /> method is
14411 called automatically when the event is triggered, while passive listeners have to call
14412 <link to="IEventSource::getEvent" /> and <link to="IEventSource::eventProcessed" /> in
14413 an event processing loop.
14414
14415 The IEvent interface is an abstract parent interface for all such VirtualBox events
14416 coming in. As a result, the standard use pattern inside <link to="IEventListener::handleEvent" />
14417 or the event processing loop is to check the <link to="#type" /> attribute of the event and
14418 then cast to the appropriate specific interface using @c QueryInterface().
14419 </desc>
14420
14421 <attribute name="type" readonly="yes" type="VBoxEventType">
14422 <desc>
14423 Event type.
14424 </desc>
14425 </attribute>
14426
14427 <attribute name="source" readonly="yes" type="IEventSource">
14428 <desc>
14429 Source of this event.
14430 </desc>
14431 </attribute>
14432
14433 <attribute name="waitable" readonly="yes" type="boolean">
14434 <desc>
14435 If we can wait for this event being processed. If false, waitProcessed() returns immediately,
14436 and setProcessed() doesn't make sense. Non-waitable events are generally better performing,
14437 as no additional overhead associated with waitability imposed.
14438 Waitable events are needed when one need to be able to wait for particular event processed,
14439 for example for vetoable changes, or if event refers to some resource which need to be kept immutable
14440 until all consumers confirmed events.
14441 </desc>
14442 </attribute>
14443
14444 <method name="setProcessed">
14445 <desc>
14446 Internal method called by the system when all listeners of a particular event have called
14447 <link to="IEventSource::eventProcessed" />. This should not be called by client code.
14448 </desc>
14449 </method>
14450
14451 <method name="waitProcessed">
14452 <desc>
14453 Wait until time outs, or this event is processed. Event must be waitable for this operation to have
14454 described semantics, for non-waitable returns true immediately.
14455 </desc>
14456 <param name="timeout" type="long" dir="in">
14457 <desc>
14458 Maximum time to wait for event processeing, in ms;
14459 0 = no wait, -1 = indefinite wait.
14460 </desc>
14461 </param>
14462 <param name="result" type="boolean" dir="return">
14463 <desc>If this event was processed before timeout.</desc>
14464 </param>
14465 </method>
14466 </interface>
14467
14468
14469 <interface
14470 name="IReusableEvent" extends="IEvent"
14471 uuid="69bfb134-80f6-4266-8e20-16371f68fa25"
14472 wsmap="managed"
14473 >
14474 <desc>Base abstract interface for all reusable events.</desc>
14475
14476 <attribute name="generation" readonly="yes" type="unsigned long">
14477 <desc>Current generation of event, incremented on reuse.</desc>
14478 </attribute>
14479
14480 <method name="reuse">
14481 <desc>
14482 Marks an event as reused, increments 'generation', fields shall no
14483 longer be considered valid.
14484 </desc>
14485 </method>
14486 </interface>
14487
14488 <interface
14489 name="IMachineEvent" extends="IEvent"
14490 uuid="92ed7b1a-0d96-40ed-ae46-a564d484325e"
14491 wsmap="managed" id="MachineEvent"
14492 >
14493 <desc>Base abstract interface for all machine events.</desc>
14494
14495 <attribute name="machineId" readonly="yes" type="uuid" mod="string">
14496 <desc>ID of the machine this event relates to.</desc>
14497 </attribute>
14498
14499 </interface>
14500
14501 <interface
14502 name="IMachineStateChangedEvent" extends="IMachineEvent"
14503 uuid="5748F794-48DF-438D-85EB-98FFD70D18C9"
14504 wsmap="managed" autogen="VBoxEvent" id="OnMachineStateChanged"
14505 >
14506 <desc>Machine state change event.</desc>
14507
14508 <attribute name="state" readonly="yes" type="MachineState">
14509 <desc>New execution state.</desc>
14510 </attribute>
14511 </interface>
14512
14513 <interface
14514 name="IMachineDataChangedEvent" extends="IMachineEvent"
14515 uuid="6AA70A6C-0DCA-4810-8C5C-457B278E3D49"
14516 wsmap="managed" autogen="VBoxEvent" id="OnMachineDataChanged"
14517 >
14518 <desc>
14519 Any of the settings of the given machine has changed.
14520 </desc>
14521 </interface>
14522
14523 <interface
14524 name="IMediumRegisteredEvent" extends="IEvent"
14525 uuid="53fac49a-b7f1-4a5a-a4ef-a11dd9c2a458"
14526 wsmap="managed" autogen="VBoxEvent" id="OnMediumRegistered"
14527 >
14528 <desc>
14529 The given medium was registered or unregistered
14530 within this VirtualBox installation.
14531 </desc>
14532
14533 <attribute name="mediumId" readonly="yes" type="uuid" mod="string">
14534 <desc>ID of the medium this event relates to.</desc>
14535 </attribute>
14536
14537 <attribute name="mediumType" readonly="yes" type="DeviceType">
14538 <desc>Type of the medium this event relates to.</desc>
14539 </attribute>
14540
14541 <attribute name="registered" type="boolean" readonly="yes">
14542 <desc>
14543 If @c true, the medium was registered, otherwise it was
14544 unregistered.
14545 </desc>
14546 </attribute>
14547 </interface>
14548
14549 <interface
14550 name="IMachineRegisteredEvent" extends="IMachineEvent"
14551 uuid="c354a762-3ff2-4f2e-8f09-07382ee25088"
14552 wsmap="managed" autogen="VBoxEvent" id="OnMachineRegistered"
14553 >
14554 <desc>
14555 The given machine was registered or unregistered
14556 within this VirtualBox installation.
14557 </desc>
14558
14559 <attribute name="registered" type="boolean" readonly="yes">
14560 <desc>
14561 If @c true, the machine was registered, otherwise it was
14562 unregistered.
14563 </desc>
14564 </attribute>
14565 </interface>
14566
14567 <interface
14568 name="ISessionStateChangedEvent" extends="IMachineEvent"
14569 uuid="714a3eef-799a-4489-86cd-fe8e45b2ff8e"
14570 wsmap="managed" autogen="VBoxEvent" id="OnSessionStateChanged"
14571 >
14572 <desc>
14573 The state of the session for the given machine was changed.
14574 <see>IMachine::sessionState</see>
14575 </desc>
14576
14577 <attribute name="state" type="SessionState" readonly="yes">
14578 <desc>
14579 New session state.
14580 </desc>
14581 </attribute>
14582 </interface>
14583
14584 <interface
14585 name="IGuestPropertyChangedEvent" extends="IMachineEvent"
14586 uuid="3f63597a-26f1-4edb-8dd2-6bddd0912368"
14587 wsmap="managed" autogen="VBoxEvent" id="OnGuestPropertyChanged"
14588 >
14589 <desc>
14590 Notification when a guest property has changed.
14591 </desc>
14592
14593 <attribute name="name" readonly="yes" type="wstring">
14594 <desc>
14595 The name of the property that has changed.
14596 </desc>
14597 </attribute>
14598
14599 <attribute name="value" readonly="yes" type="wstring">
14600 <desc>
14601 The new property value.
14602 </desc>
14603 </attribute>
14604
14605 <attribute name="flags" readonly="yes" type="wstring">
14606 <desc>
14607 The new property flags.
14608 </desc>
14609 </attribute>
14610
14611 </interface>
14612
14613 <interface
14614 name="ISnapshotEvent" extends="IMachineEvent"
14615 uuid="21637b0e-34b8-42d3-acfb-7e96daf77c22"
14616 wsmap="managed" id="SnapshotEvent"
14617 >
14618 <desc>Base interface for all snapshot events.</desc>
14619
14620 <attribute name="snapshotId" readonly="yes" type="uuid" mod="string">
14621 <desc>ID of the snapshot this event relates to.</desc>
14622 </attribute>
14623
14624 </interface>
14625
14626 <interface
14627 name="ISnapshotTakenEvent" extends="ISnapshotEvent"
14628 uuid="d27c0b3d-6038-422c-b45e-6d4a0503d9f1"
14629 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotTaken"
14630 >
14631 <desc>
14632 A new snapshot of the machine has been taken.
14633 <see>ISnapshot</see>
14634 </desc>
14635 </interface>
14636
14637 <interface
14638 name="ISnapshotDeletedEvent" extends="ISnapshotEvent"
14639 uuid="c48f3401-4a9e-43f4-b7a7-54bd285e22f4"
14640 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotDeleted"
14641 >
14642 <desc>
14643 Snapshot of the given machine has been deleted.
14644
14645 <note>
14646 This notification is delivered <b>after</b> the snapshot
14647 object has been uninitialized on the server (so that any
14648 attempt to call its methods will return an error).
14649 </note>
14650
14651 <see>ISnapshot</see>
14652 </desc>
14653 </interface>
14654
14655 <interface
14656 name="ISnapshotChangedEvent" extends="ISnapshotEvent"
14657 uuid="07541941-8079-447a-a33e-47a69c7980db"
14658 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotChanged"
14659 >
14660 <desc>
14661 Snapshot properties (name and/or description) have been changed.
14662 <see>ISnapshot</see>
14663 </desc>
14664 </interface>
14665
14666 <interface
14667 name="IMousePointerShapeChangedEvent" extends="IEvent"
14668 uuid="a6dcf6e8-416b-4181-8c4a-45ec95177aef"
14669 wsmap="managed" autogen="VBoxEvent" id="OnMousePointerShapeChanged"
14670 >
14671 <desc>
14672 Notification when the guest mouse pointer shape has
14673 changed. The new shape data is given.
14674 </desc>
14675
14676 <attribute name="visible" type="boolean" readonly="yes">
14677 <desc>
14678 Flag whether the pointer is visible.
14679 </desc>
14680 </attribute>
14681 <attribute name="alpha" type="boolean" readonly="yes">
14682 <desc>
14683 Flag whether the pointer has an alpha channel.
14684 </desc>
14685 </attribute>
14686 <attribute name="xhot" type="unsigned long" readonly="yes">
14687 <desc>
14688 The pointer hot spot X coordinate.
14689 </desc>
14690 </attribute>
14691 <attribute name="yhot" type="unsigned long" readonly="yes">
14692 <desc>
14693 The pointer hot spot Y coordinate.
14694 </desc>
14695 </attribute>
14696 <attribute name="width" type="unsigned long" readonly="yes">
14697 <desc>
14698 Width of the pointer shape in pixels.
14699 </desc>
14700 </attribute>
14701 <attribute name="height" type="unsigned long" readonly="yes">
14702 <desc>
14703 Height of the pointer shape in pixels.
14704 </desc>
14705 </attribute>
14706 <attribute name="shape" type="octet" safearray="yes" readonly="yes">
14707 <desc>
14708 Shape buffer arrays.
14709
14710 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
14711 followed by a 32-bpp XOR (color) mask.
14712
14713 For pointers without alpha channel the XOR mask pixels are 32
14714 bit values: (lsb)BGR0(msb). For pointers with alpha channel
14715 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
14716
14717 An AND mask is used for pointers with alpha channel, so if the
14718 callback does not support alpha, the pointer could be
14719 displayed as a normal color pointer.
14720
14721 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
14722 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
14723 height</tt>. The padding bits at the end of each scanline are
14724 undefined.
14725
14726 The XOR mask follows the AND mask on the next 4-byte aligned
14727 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
14728 Bytes in the gap between the AND and the XOR mask are undefined.
14729 The XOR mask scanlines have no gap between them and the size of
14730 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
14731
14732 <note>
14733 If @a shape is 0, only the pointer visibility is changed.
14734 </note>
14735 </desc>
14736 </attribute>
14737 </interface>
14738
14739 <interface
14740 name="IMouseCapabilityChangedEvent" extends="IEvent"
14741 uuid="d633ad48-820c-4207-b46c-6bd3596640d5"
14742 wsmap="managed" autogen="VBoxEvent" id="OnMouseCapabilityChanged"
14743 >
14744 <desc>
14745 Notification when the mouse capabilities reported by the
14746 guest have changed. The new capabilities are passed.
14747 </desc>
14748 <attribute name="supportsAbsolute" type="boolean" readonly="yes">
14749 <desc>
14750 Supports absolute coordinates.
14751 </desc>
14752 </attribute>
14753 <attribute name="supportsRelative" type="boolean" readonly="yes">
14754 <desc>
14755 Supports relative coordinates.
14756 </desc>
14757 </attribute>
14758 <attribute name="needsHostCursor" type="boolean" readonly="yes">
14759 <desc>
14760 If host cursor is needed.
14761 </desc>
14762 </attribute>
14763 </interface>
14764
14765 <interface
14766 name="IKeyboardLedsChangedEvent" extends="IEvent"
14767 uuid="6DDEF35E-4737-457B-99FC-BC52C851A44F"
14768 wsmap="managed" autogen="VBoxEvent" id="OnKeyboardLedsChanged"
14769 >
14770 <desc>
14771 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
14772 to alter the state of the keyboard LEDs.
14773 </desc>
14774 <attribute name="numLock" type="boolean" readonly="yes">
14775 <desc>
14776 NumLock status.
14777 </desc>
14778 </attribute>
14779 <attribute name="capsLock" type="boolean" readonly="yes">
14780 <desc>
14781 CapsLock status.
14782 </desc>
14783 </attribute>
14784 <attribute name="scrollLock" type="boolean" readonly="yes">
14785 <desc>
14786 ScrollLock status.
14787 </desc>
14788 </attribute>
14789 </interface>
14790
14791 <interface
14792 name="IStateChangedEvent" extends="IEvent"
14793 uuid="4376693C-CF37-453B-9289-3B0F521CAF27"
14794 wsmap="managed" autogen="VBoxEvent" id="OnStateChanged"
14795 >
14796 <desc>
14797 Notification when the execution state of the machine has changed.
14798 The new state is given.
14799 </desc>
14800 <attribute name="state" type="MachineState" readonly="yes">
14801 <desc>
14802 New machine state.
14803 </desc>
14804 </attribute>
14805 </interface>
14806
14807 <interface
14808 name="IAdditionsStateChangedEvent" extends="IEvent"
14809 uuid="D70F7915-DA7C-44C8-A7AC-9F173490446A"
14810 wsmap="managed" autogen="VBoxEvent" id="OnAdditionsStateChanged"
14811 >
14812 <desc>
14813 Notification when a Guest Additions property changes.
14814 Interested callees should query IGuest attributes to
14815 find out what has changed.
14816 </desc>
14817 </interface>
14818
14819 <interface
14820 name="INetworkAdapterChangedEvent" extends="IEvent"
14821 uuid="08889892-1EC6-4883-801D-77F56CFD0103"
14822 wsmap="managed" autogen="VBoxEvent" id="OnNetworkAdapterChanged"
14823 >
14824 <desc>
14825 Notification when a property of one of the
14826 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
14827 changes. Interested callees should use INetworkAdapter methods and
14828 attributes to find out what has changed.
14829 </desc>
14830 <attribute name="networkAdapter" type="INetworkAdapter" readonly="yes">
14831 <desc>
14832 Network adapter that is subject to change.
14833 </desc>
14834 </attribute>
14835 </interface>
14836
14837 <interface
14838 name="ISerialPortChangedEvent" extends="IEvent"
14839 uuid="3BA329DC-659C-488B-835C-4ECA7AE71C6C"
14840 wsmap="managed" autogen="VBoxEvent" id="OnSerialPortChanged"
14841 >
14842 <desc>
14843 Notification when a property of one of the
14844 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
14845 Interested callees should use ISerialPort methods and attributes
14846 to find out what has changed.
14847 </desc>
14848 <attribute name="serialPort" type="ISerialPort" readonly="yes">
14849 <desc>
14850 Serial port that is subject to change.
14851 </desc>
14852 </attribute>
14853 </interface>
14854
14855 <interface
14856 name="IParallelPortChangedEvent" extends="IEvent"
14857 uuid="813C99FC-9849-4F47-813E-24A75DC85615"
14858 wsmap="managed" autogen="VBoxEvent" id="OnParallelPortChanged"
14859 >
14860 <desc>
14861 Notification when a property of one of the
14862 virtual <link to="IMachine::getParallelPort">parallel ports</link>
14863 changes. Interested callees should use ISerialPort methods and
14864 attributes to find out what has changed.
14865 </desc>
14866 <attribute name="parallelPort" type="IParallelPort" readonly="yes">
14867 <desc>
14868 Parallel port that is subject to change.
14869 </desc>
14870 </attribute>
14871 </interface>
14872
14873 <interface
14874 name="IStorageControllerChangedEvent" extends="IEvent"
14875 uuid="715212BF-DA59-426E-8230-3831FAA52C56"
14876 wsmap="managed" autogen="VBoxEvent" id="OnStorageControllerChanged"
14877 >
14878 <desc>
14879 Notification when a
14880 <link to="IMachine::mediumAttachments">medium attachment</link>
14881 changes.
14882 </desc>
14883 </interface>
14884
14885 <interface
14886 name="IMediumChangedEvent" extends="IEvent"
14887 uuid="0FE2DA40-5637-472A-9736-72019EABD7DE"
14888 wsmap="managed" autogen="VBoxEvent" id="OnMediumChanged"
14889 >
14890 <desc>
14891 Notification when a
14892 <link to="IMachine::mediumAttachments">medium attachment</link>
14893 changes.
14894 </desc>
14895 <attribute name="mediumAttachment" type="IMediumAttachment" readonly="yes">
14896 <desc>
14897 Medium attachment that is subject to change.
14898 </desc>
14899 </attribute>
14900 </interface>
14901
14902 <interface
14903 name="ICPUChangedEvent" extends="IEvent"
14904 uuid="D0F0BECC-EE17-4D17-A8CC-383B0EB55E9D"
14905 wsmap="managed" autogen="VBoxEvent" id="OnCPUChanged"
14906 >
14907 <desc>
14908 Notification when a CPU changes.
14909 </desc>
14910 <attribute name="cpu" type="unsigned long" readonly="yes">
14911 <desc>
14912 The CPU which changed.
14913 </desc>
14914 </attribute>
14915 <attribute name="add" type="boolean" readonly="yes">
14916 <desc>
14917 Flag whether the CPU was added or removed.
14918 </desc>
14919 </attribute>
14920 </interface>
14921
14922 <interface
14923 name="ICPUExecutionCapChangedEvent" extends="IEvent"
14924 uuid="dfa7e4f5-b4a4-44ce-85a8-127ac5eb59dc"
14925 wsmap="managed" autogen="VBoxEvent" id="OnCPUExecutionCapChanged"
14926 >
14927 <desc>
14928 Notification when the CPU execution cap changes.
14929 </desc>
14930 <attribute name="executionCap" type="unsigned long" readonly="yes">
14931 <desc>
14932 The new CPU execution cap value. (1-100)
14933 </desc>
14934 </attribute>
14935 </interface>
14936
14937 <interface
14938 name="IGuestKeyboardEvent" extends="IEvent"
14939 uuid="88394258-7006-40d4-b339-472ee3801844"
14940 wsmap="managed" autogen="VBoxEvent" id="OnGuestKeyboardEvent"
14941 >
14942 <desc>
14943 Notification when guest keyboard event happens.
14944 </desc>
14945 <attribute name="scancodes" type="long" safearray="yes" readonly="yes">
14946 <desc>
14947 Array of scancodes.
14948 </desc>
14949 </attribute>
14950 </interface>
14951
14952 <interface
14953 name="IGuestMouseEvent" extends="IReusableEvent"
14954 uuid="1f85d35c-c524-40ff-8e98-307000df0992"
14955 wsmap="managed" autogen="VBoxEvent" id="OnGuestMouseEvent"
14956 >
14957 <desc>
14958 Notification when guest mouse event happens.
14959 </desc>
14960
14961 <attribute name="absolute" type="boolean" readonly="yes">
14962 <desc>
14963 If this event is relative or absolute.
14964 </desc>
14965 </attribute>
14966
14967 <attribute name="x" type="long" readonly="yes">
14968 <desc>
14969 New X position, or X delta.
14970 </desc>
14971 </attribute>
14972
14973 <attribute name="y" type="long" readonly="yes">
14974 <desc>
14975 New Y position, or Y delta.
14976 </desc>
14977 </attribute>
14978
14979 <attribute name="z" type="long" readonly="yes">
14980 <desc>
14981 Z delta.
14982 </desc>
14983 </attribute>
14984
14985 <attribute name="w" type="long" readonly="yes">
14986 <desc>
14987 W delta.
14988 </desc>
14989 </attribute>
14990
14991 <attribute name="buttons" type="long" readonly="yes">
14992 <desc>
14993 Button state bitmask.
14994 </desc>
14995 </attribute>
14996
14997 </interface>
14998
14999
15000 <interface
15001 name="IVRDPServerChangedEvent" extends="IEvent"
15002 uuid="726038B6-6279-4A7A-8037-D041693D1915"
15003 wsmap="managed" autogen="VBoxEvent" id="OnVRDPServerChanged"
15004 >
15005 <desc>
15006 Notification when a property of the
15007 <link to="IMachine::VRDPServer">VRDP server</link> changes.
15008 Interested callees should use IVRDPServer methods and attributes to
15009 find out what has changed.
15010 </desc>
15011 </interface>
15012
15013 <interface
15014 name="IRemoteDisplayInfoChangedEvent" extends="IEvent"
15015 uuid="65B556C5-2A99-47D8-B311-FC177F0914CD"
15016 wsmap="managed" autogen="VBoxEvent" id="OnRemoteDisplayInfoChanged"
15017 >
15018 <desc>
15019 Notification when the status of the VRDP server changes. Interested callees
15020 should use <link to="IConsole::remoteDisplayInfo">IRemoteDisplayInfo</link>
15021 attributes to find out what is the current status.
15022 </desc>
15023 </interface>
15024
15025 <interface
15026 name="IUSBControllerChangedEvent" extends="IEvent"
15027 uuid="93BADC0C-61D9-4940-A084-E6BB29AF3D83"
15028 wsmap="managed" autogen="VBoxEvent" id="OnUSBControllerChanged"
15029 >
15030 <desc>
15031 Notification when a property of the virtual
15032 <link to="IMachine::USBController">USB controller</link> changes.
15033 Interested callees should use IUSBController methods and attributes to
15034 find out what has changed.
15035 </desc>
15036 </interface>
15037
15038 <interface
15039 name="IUSBDeviceStateChangedEvent" extends="IEvent"
15040 uuid="806da61b-6679-422a-b629-51b06b0c6d93"
15041 wsmap="managed" autogen="VBoxEvent" id="OnUSBDeviceStateChanged"
15042 >
15043 <desc>
15044 Notification when a USB device is attached to or detached from
15045 the virtual USB controller.
15046
15047 This notification is sent as a result of the indirect
15048 request to attach the device because it matches one of the
15049 machine USB filters, or as a result of the direct request
15050 issued by <link to="IConsole::attachUSBDevice"/> or
15051 <link to="IConsole::detachUSBDevice"/>.
15052
15053 This notification is sent in case of both a succeeded and a
15054 failed request completion. When the request succeeds, the
15055 @a error parameter is @c null, and the given device has been
15056 already added to (when @a attached is @c true) or removed from
15057 (when @a attached is @c false) the collection represented by
15058 <link to="IConsole::USBDevices"/>. On failure, the collection
15059 doesn't change and the @a error parameter represents the error
15060 message describing the failure.
15061 </desc>
15062 <attribute name="device" type="IUSBDevice" readonly="yes">
15063 <desc>
15064 Device that is subject to state change.
15065 </desc>
15066 </attribute>
15067 <attribute name="attached" type="boolean" readonly="yes">
15068 <desc>
15069 @c true if the device was attached and @c false otherwise.
15070 </desc>
15071 </attribute>
15072 <attribute name="error" type="IVirtualBoxErrorInfo" readonly="yes">
15073 <desc>
15074 @c null on success or an error message object on failure.
15075 </desc>
15076 </attribute>
15077 </interface>
15078
15079 <interface
15080 name="ISharedFolderChangedEvent" extends="IEvent"
15081 uuid="B66349B5-3534-4239-B2DE-8E1535D94C0B"
15082 wsmap="managed" autogen="VBoxEvent" id="OnSharedFolderChanged"
15083 >
15084 <desc>
15085 Notification when a shared folder is added or removed.
15086 The @a scope argument defines one of three scopes:
15087 <link to="IVirtualBox::sharedFolders">global shared folders</link>
15088 (<link to="Scope_Global">Global</link>),
15089 <link to="IMachine::sharedFolders">permanent shared folders</link> of
15090 the machine (<link to="Scope_Machine">Machine</link>) or <link
15091 to="IConsole::sharedFolders">transient shared folders</link> of the
15092 machine (<link to="Scope_Session">Session</link>). Interested callees
15093 should use query the corresponding collections to find out what has
15094 changed.
15095 </desc>
15096 <attribute name="scope" type="Scope" readonly="yes">
15097 <desc>
15098 Scope of the notification.
15099 </desc>
15100 </attribute>
15101 </interface>
15102
15103 <interface
15104 name="IRuntimeErrorEvent" extends="IEvent"
15105 uuid="883DD18B-0721-4CDE-867C-1A82ABAF914C"
15106 wsmap="managed" autogen="VBoxEvent" id="OnRuntimeError"
15107 >
15108 <desc>
15109 Notification when an error happens during the virtual
15110 machine execution.
15111
15112 There are three kinds of runtime errors:
15113 <ul>
15114 <li><i>fatal</i></li>
15115 <li><i>non-fatal with retry</i></li>
15116 <li><i>non-fatal warnings</i></li>
15117 </ul>
15118
15119 <b>Fatal</b> errors are indicated by the @a fatal parameter set
15120 to @c true. In case of fatal errors, the virtual machine
15121 execution is always paused before calling this notification, and
15122 the notification handler is supposed either to immediately save
15123 the virtual machine state using <link to="IConsole::saveState"/>
15124 or power it off using <link to="IConsole::powerDown"/>.
15125 Resuming the execution can lead to unpredictable results.
15126
15127 <b>Non-fatal</b> errors and warnings are indicated by the
15128 @a fatal parameter set to @c false. If the virtual machine
15129 is in the Paused state by the time the error notification is
15130 received, it means that the user can <i>try to resume</i> the machine
15131 execution after attempting to solve the problem that caused the
15132 error. In this case, the notification handler is supposed
15133 to show an appropriate message to the user (depending on the
15134 value of the @a id parameter) that offers several actions such
15135 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
15136 wants to retry, the notification handler should continue
15137 the machine execution using the <link to="IConsole::resume"/>
15138 call. If the machine execution is not Paused during this
15139 notification, then it means this notification is a <i>warning</i>
15140 (for example, about a fatal condition that can happen very soon);
15141 no immediate action is required from the user, the machine
15142 continues its normal execution.
15143
15144 Note that in either case the notification handler
15145 <b>must not</b> perform any action directly on a thread
15146 where this notification is called. Everything it is allowed to
15147 do is to post a message to another thread that will then talk
15148 to the user and take the corresponding action.
15149
15150 Currently, the following error identifiers are known:
15151 <ul>
15152 <li><tt>"HostMemoryLow"</tt></li>
15153 <li><tt>"HostAudioNotResponding"</tt></li>
15154 <li><tt>"VDIStorageFull"</tt></li>
15155 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
15156 </ul>
15157 </desc>
15158 <attribute name="fatal" type="boolean" readonly="yes">
15159 <desc>
15160 Whether the error is fatal or not.
15161 </desc>
15162 </attribute>
15163 <attribute name="id" type="wstring" readonly="yes">
15164 <desc>
15165 Error identifier.
15166 </desc>
15167 </attribute>
15168 <attribute name="message" type="wstring" readonly="yes">
15169 <desc>
15170 Optional error message.
15171 </desc>
15172 </attribute>
15173 </interface>
15174
15175
15176 <interface
15177 name="IEventSourceChangedEvent" extends="IEvent"
15178 uuid="e7932cb8-f6d4-4ab6-9cbf-558eb8959a6a"
15179 waitable="yes"
15180 wsmap="managed" autogen="VBoxEvent" id="OnEventSourceChanged"
15181 >
15182 <desc>
15183 Notification when an event source state changes (listener added or removed).
15184 </desc>
15185
15186 <attribute name="listener" type="IEventListener" readonly="yes">
15187 <desc>
15188 Event listener which has changed.
15189 </desc>
15190 </attribute>
15191
15192 <attribute name="add" type="boolean" readonly="yes">
15193 <desc>
15194 Flag whether listener was added or removed.
15195 </desc>
15196 </attribute>
15197 </interface>
15198
15199 <interface
15200 name="IExtraDataChangedEvent" extends="IEvent"
15201 uuid="024F00CE-6E0B-492A-A8D0-968472A94DC7"
15202 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataChanged"
15203 >
15204 <desc>
15205 Notification when machine specific or global extra data
15206 has changed.
15207 </desc>
15208 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
15209 <desc>
15210 ID of the machine this event relates to.
15211 Null for global extra data changes.
15212 </desc>
15213 </attribute>
15214 <attribute name="key" type="wstring" readonly="yes">
15215 <desc>
15216 Extra data key that has changed.
15217 </desc>
15218 </attribute>
15219 <attribute name="value" type="wstring" readonly="yes">
15220 <desc>
15221 Extra data value for the given key.
15222 </desc>
15223 </attribute>
15224 </interface>
15225
15226 <interface
15227 name="IVetoEvent" extends="IEvent"
15228 uuid="9a1a4130-69fe-472f-ac10-c6fa25d75007"
15229 wsmap="managed"
15230 >
15231 <desc>Base abstract interface for veto events.</desc>
15232
15233 <method name="addVeto">
15234 <desc>
15235 Adds a veto on this event.
15236 </desc>
15237 <param name="reason" type="wstring" dir="in">
15238 <desc>
15239 Reason for veto, could be null or empty string.
15240 </desc>
15241 </param>
15242 </method>
15243
15244 <method name="isVetoed">
15245 <desc>
15246 If this event was vetoed.
15247 </desc>
15248 <param name="result" type="boolean" dir="return">
15249 <desc>
15250 Reason for veto.
15251 </desc>
15252 </param>
15253 </method>
15254
15255 <method name="getVetos">
15256 <desc>
15257 Current veto reason list, if size is 0 - no veto.
15258 </desc>
15259 <param name="result" type="wstring" dir="return" safearray="yes">
15260 <desc>
15261 Array of reasons for veto provided by different event handlers.
15262 </desc>
15263 </param>
15264 </method>
15265
15266 </interface>
15267
15268 <interface
15269 name="IExtraDataCanChangeEvent" extends="IVetoEvent"
15270 uuid="245d88bd-800a-40f8-87a6-170d02249a55"
15271 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataCanChange"
15272 waitable="true"
15273 >
15274 <desc>
15275 Notification when someone tries to change extra data for
15276 either the given machine or (if @c null) global extra data.
15277 This gives the chance to veto against changes.
15278 </desc>
15279 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
15280 <desc>
15281 ID of the machine this event relates to.
15282 Null for global extra data changes.
15283 </desc>
15284 </attribute>
15285 <attribute name="key" type="wstring" readonly="yes">
15286 <desc>
15287 Extra data key that has changed.
15288 </desc>
15289 </attribute>
15290 <attribute name="value" type="wstring" readonly="yes">
15291 <desc>
15292 Extra data value for the given key.
15293 </desc>
15294 </attribute>
15295 </interface>
15296
15297 <interface
15298 name="ICanShowWindowEvent" extends="IVetoEvent"
15299 uuid="adf292b0-92c9-4a77-9d35-e058b39fe0b9"
15300 wsmap="managed" autogen="VBoxEvent" id="OnCanShowWindow"
15301 waitable="true"
15302 >
15303 <desc>
15304 Notification when a call to
15305 <link to="IMachine::canShowConsoleWindow"/> is made by a
15306 front-end to check if a subsequent call to
15307 <link to="IMachine::showConsoleWindow"/> can succeed.
15308
15309 The callee should give an answer appropriate to the current
15310 machine state using event veto. This answer must
15311 remain valid at least until the next
15312 <link to="IConsole::state">machine state</link> change.
15313 </desc>
15314 </interface>
15315
15316 <interface
15317 name="IShowWindowEvent" extends="IEvent"
15318 uuid="B0A0904D-2F05-4D28-855F-488F96BAD2B2"
15319 wsmap="managed" autogen="VBoxEvent" id="OnShowWindow"
15320 waitable="true"
15321 >
15322 <desc>
15323 Notification when a call to
15324 <link to="IMachine::showConsoleWindow"/>
15325 requests the console window to be activated and brought to
15326 foreground on the desktop of the host PC.
15327
15328 This notification should cause the VM console process to
15329 perform the requested action as described above. If it is
15330 impossible to do it at a time of this notification, this
15331 method should return a failure.
15332
15333 Note that many modern window managers on many platforms
15334 implement some sort of focus stealing prevention logic, so
15335 that it may be impossible to activate a window without the
15336 help of the currently active application (which is supposedly
15337 an initiator of this notification). In this case, this method
15338 must return a non-zero identifier that represents the
15339 top-level window of the VM console process. The caller, if it
15340 represents a currently active process, is responsible to use
15341 this identifier (in a platform-dependent manner) to perform
15342 actual window activation.
15343
15344 This method must set @a winId to zero if it has performed all
15345 actions necessary to complete the request and the console
15346 window is now active and in foreground, to indicate that no
15347 further action is required on the caller's side.
15348 </desc>
15349 <attribute name="winId" type="long long">
15350 <desc>
15351 Platform-dependent identifier of the top-level VM console
15352 window, or zero if this method has performed all actions
15353 necessary to implement the <i>show window</i> semantics for
15354 the given platform and/or this VirtualBox front-end.
15355 </desc>
15356 </attribute>
15357 </interface>
15358
15359 <module name="VBoxSVC" context="LocalServer">
15360 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
15361 namespace="virtualbox.org">
15362 <interface name="IVirtualBox" default="yes"/>
15363 </class>
15364 </module>
15365
15366 <module name="VBoxC" context="InprocServer" threadingModel="Free">
15367 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
15368 namespace="virtualbox.org">
15369 <interface name="ISession" default="yes"/>
15370 </class>
15371
15372 <class name="Console" uuid="577230FF-164F-4CAC-8548-312D8275A4A7"
15373 namespace="virtualbox.org">
15374 <interface name="IConsole" default="yes"/>
15375 </class>
15376 </module>
15377
15378</library>
15379
15380</idl>
15381
15382<!-- 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