VirtualBox

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

Last change on this file since 23599 was 23599, checked in by vboxsync, 15 years ago

Main: Live migration work.

  • Property svn:eol-style set to native
File size: 486.1 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * :tabSize=2:indentSize=2:noTabs=true:
5 * :folding=explicit:collapseFolds=1:
6 *
7 * Master declaration for VirtualBox's Main API, represented
8 * by COM/XPCOM and web service interfaces.
9 *
10 * From this document, the build system generates several files
11 * via XSLT that are then used during the build process.
12 *
13 * Below is the list of XSL templates that operate on this file and
14 * output files they generate. These XSL templates must be updated
15 * whenever the schema of this file changes:
16 *
17 * 1. src/VBox/Main/idl/midl.xsl =>
18 * out/<platform>/bin/sdk/idl/VirtualBox.idl
19 * (MS COM interface definition file for Main API)
20 *
21 * 2. src/VBox/Main/idl/xpidl.xsl =>
22 * out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
23 * (XPCOM interface definition file for Main API)
24 *
25 * 3. src/VBox/Main/idl/doxygen.xsl =>
26 * out/<platform>/obj/src/VBox/Main/VirtualBox.idl
27 * (pseudo-IDL for Doxygen to generate the official Main API
28 * documentation)
29 *
30 * 4. src/VBox/Main/webservice/*.xsl =>
31 * a bunch of WSDL and C++ files
32 * (VirtualBox web service sources and SOAP mappers;
33 * see src/VBox/Main/webservice/Makefile.kmk for details)
34 *
35 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
36 * out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
37 * (smart Qt-based C++ wrapper classes for COM interfaces
38 * of the Main API)
39 *
40 * 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
41 * out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
42 * (Main API TypeLib block for the WiX installer)
43 *
44 * 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
45 * out/<platform>/obj/Runtime/errmsgvboxcomdata.h
46 * (<result> extraction for the %Rhrc format specifier)
47 *
48 Copyright (C) 2006-2009 Sun Microsystems, Inc.
49
50 This file is part of VirtualBox Open Source Edition (OSE), as
51 available from http://www.virtualbox.org. This file is free software;
52 you can redistribute it and/or modify it under the terms of the GNU
53 General Public License (GPL) as published by the Free Software
54 Foundation, in version 2 as it comes in the "COPYING" file of the
55 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
56 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
57
58 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
59 Clara, CA 95054 USA or visit http://www.sun.com if you need
60 additional information or have any questions.
61-->
62
63<idl>
64
65<desc>
66 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
67 describes the so-called <i>VirtualBox Main API</i> which comprises all public
68 COM interfaces and components provided by the VirtualBox server and by the
69 VirtualBox client library.
70
71 VirtualBox employs a client-server design, meaning that whenever any part of
72 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
73 interface or any virtual machine --, a dedicated server process named
74 VBoxSVC runs in the background. This allows multiple processes working with
75 VirtualBox to cooperate without conflicts. These processes communicate to each
76 other using inter-process communication facilities provided by the COM
77 implementation of the host computer.
78
79 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
80 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
81 implementation, is used.
82
83 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
84 the VBoxManage command-line interface and the VBoxVRDP server) are technically
85 front-ends to the Main API and only use the interfaces that are documented
86 in this Main API documentation. This ensures that, with any given release
87 version of VirtualBox, all capabilities of the product that could be useful
88 to an external client program are always exposed by way of this API.
89
90 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
91 contains two public component classes:
92 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
93 implement IVirtualBox and ISession interfaces respectively. These two classes
94 are of supreme importance and will be needed in order for any front-end
95 program to do anything useful. It is recommended to read the documentation of
96 the mentioned interfaces first.
97
98 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
99 there can be only one object of this class on the local machine at any given
100 time. This object is a parent of many other objects in the VirtualBox COM
101 library and lives in the VBoxSVC process. In fact, when you create an instance
102 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
103 process is already running, starts it if not, and returns you a reference to
104 the <tt>VirtualBox</tt> object created in this process. When the last reference
105 to this object is released, the VBoxSVC process ends (with a 5 second delay to
106 protect from too frequent restarts).
107
108 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
109 as many <tt>Session</tt> objects as you need but all of them will live in a
110 process which issues the object instantiation call. <tt>Session</tt> objects
111 represent virtual machine sessions which are used to configure virtual
112 machines and control their execution.
113</desc>
114
115<if target="midl">
116 <cpp line="enum {"/>
117 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
118 <cpp line=" kTypeLibraryMinorVersion = 0"/>
119 <cpp line="};"/>
120</if>
121
122<if target="xpidl">
123 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
124 <cpp>
125/* currently, nsISupportsImpl.h lacks the below-like macros */
126
127#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
128#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
129#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI NS_IMPL_QUERY_INTERFACE3_CI
130
131#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
132# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
133 NS_IMPL_THREADSAFE_ADDREF(_class) \
134 NS_IMPL_THREADSAFE_RELEASE(_class) \
135 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
136 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
137#endif
138
139#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
140# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
141 NS_IMPL_THREADSAFE_ADDREF(_class) \
142 NS_IMPL_THREADSAFE_RELEASE(_class) \
143 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
144 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
145#endif
146
147#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_CI
148# define NS_IMPL_THREADSAFE_ISUPPORTS3_CI(_class, _i1, _i2, _i3) \
149 NS_IMPL_THREADSAFE_ADDREF(_class) \
150 NS_IMPL_THREADSAFE_RELEASE(_class) \
151 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI(_class, _i1, _i2, _i3) \
152 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
153#endif
154
155#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
156# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
157 NS_INTERFACE_MAP_BEGIN(_class) \
158 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
159 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
160 NS_IMPL_QUERY_CLASSINFO(_class) \
161 NS_INTERFACE_MAP_END
162#endif
163
164#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
165# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
166 _i2, _ic2) \
167 NS_INTERFACE_MAP_BEGIN(_class) \
168 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
169 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
170 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
171 NS_IMPL_QUERY_CLASSINFO(_class) \
172 NS_INTERFACE_MAP_END
173#endif
174
175#ifndef NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
176# define NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
177 _i2, _ic2, _i3, _ic3) \
178 NS_INTERFACE_MAP_BEGIN(_class) \
179 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
180 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
181 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i3, _ic3) \
182 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
183 NS_IMPL_QUERY_CLASSINFO(_class) \
184 NS_INTERFACE_MAP_END
185#endif
186
187#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
188#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
189#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
190
191#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
192# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
193 NS_IMPL_THREADSAFE_ADDREF(_class) \
194 NS_IMPL_THREADSAFE_RELEASE(_class) \
195 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
196 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
197#endif
198
199#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
200# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
201 _i2, _ic2) \
202 NS_IMPL_THREADSAFE_ADDREF(_class) \
203 NS_IMPL_THREADSAFE_RELEASE(_class) \
204 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
205 _i2, _ic2) \
206 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
207#endif
208
209#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI
210# define NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI(_class, _i1, _ic1, \
211 _i2, _ic2, _i3, _ic3) \
212 NS_IMPL_THREADSAFE_ADDREF(_class) \
213 NS_IMPL_THREADSAFE_RELEASE(_class) \
214 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
215 _i2, _ic2, _i3, _ic3) \
216 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
217#endif
218
219 </cpp>
220</if>
221
222<library
223 name="VirtualBox"
224 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
225 version="1.3"
226 desc="VirtualBox Type Library"
227 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
228 supportsErrorInfo="yes"
229>
230
231
232 <!--
233 // COM result codes for VirtualBox
234 /////////////////////////////////////////////////////////////////////////
235 -->
236
237 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
238 <desc>
239 This section describes all VirtualBox-specific COM result codes that may
240 be returned by methods of VirtualBox COM interfaces in addition to
241 standard COM result codes.
242
243 Note that along with the result code, every VirtualBox method returns
244 extended error information through the IVirtualBoxErrorInfo interface on
245 failure. This interface is a preferred way to present the error to the end
246 user because it contains a human readable description of the error. Raw
247 result codes, both standard and described in this section, are intended to
248 be used by programs to analyze the reason of a failure and select an
249 appropriate course of action without involving the end user (for example,
250 retry the operation later or make a different call).
251
252 The standard COM result codes that may originate from our methods include:
253
254 <table>
255 <tr><td>E_INVALIDARG</td>
256 <td>
257 Returned when the value of the method's argument is not within the range
258 of valid values. This should not be confused with situations when the
259 value is within the range but simply doesn't suit the current object
260 state and there is a possibility that it will be accepted later (in such
261 cases VirtualBox-specific codes are returned, for example,
262 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
263 </td>
264 </tr>
265 <tr><td>E_POINTER</td>
266 <td>
267 Returned if a memory pointer for the output argument is invalid (for
268 example, @c null). Note that when pointers representing input
269 arguments (such as strings) are invalid, E_INVALIDARG is returned.
270 </td>
271 </tr>
272 <tr><td>E_ACCESSDENIED</td>
273 <td>
274 Returned when the called object is not ready. Since the lifetime of a
275 public COM object cannot be fully controlled by the implementation,
276 VirtualBox maintains the readiness state for all objects it creates and
277 returns this code in response to any method call on the object that was
278 deactivated by VirtualBox and is not functioning any more.
279 </td>
280 </tr>
281 <tr><td>E_OUTOFMEMORY</td>
282 <td>
283 Returned when a memory allocation operation fails.
284 </td>
285 </tr>
286 </table>
287 </desc>
288 </descGroup>
289
290 <!--
291 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
292 everything in <result>/<desc> after (and including) the first dot, so express
293 the matter of the error code in the first sentence and keep it short.
294 -->
295
296 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
297 <desc>
298 Object corresponding to the supplied arguments does not exist.
299 </desc>
300 </result>
301
302 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
303 <desc>
304 Current virtual machine state prevents the operation.
305 </desc>
306 </result>
307
308 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
309 <desc>
310 Virtual machine error occurred attempting the operation.
311 </desc>
312 </result>
313
314 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
315 <desc>
316 File not accessible or erroneous file contents.
317 </desc>
318 </result>
319
320 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
321 <desc>
322 Runtime subsystem error.
323 </desc>
324 </result>
325
326 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
327 <desc>
328 Pluggable Device Manager error.
329 </desc>
330 </result>
331
332 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
333 <desc>
334 Current object state prohibits operation.
335 </desc>
336 </result>
337
338 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
339 <desc>
340 Host operating system related error.
341 </desc>
342 </result>
343
344 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
345 <desc>
346 Requested operation is not supported.
347 </desc>
348 </result>
349
350 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
351 <desc>
352 Invalid XML found.
353 </desc>
354 </result>
355
356 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
357 <desc>
358 Current session state prohibits operation.
359 </desc>
360 </result>
361
362 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
363 <desc>
364 Object being in use prohibits operation.
365 </desc>
366 </result>
367
368 <!--
369 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
370 everything in <result>/<desc> after (and including) the first dot, so express
371 the matter of the error code in the first sentence and keep it short.
372 -->
373
374 <descGroup/>
375
376 <!--
377 // all common enums
378 /////////////////////////////////////////////////////////////////////////
379 -->
380
381 <enum name="SettingsVersion"
382 uuid="52bd6f5f-1adb-4493-975d-581a9c4b803f"
383 >
384 <desc>Settings version of VirtualBox settings files. This is written to
385 the "version" attribute of the root "VirtualBox" element in the settings
386 file XML and indicates which VirtualBox version wrote the file.
387 </desc>
388
389 <const name="Null" value="0">
390 <desc>Null value, indicates invalid version.</desc>
391 </const>
392 <const name="v1_0" value="1">
393 <desc>Legacy settings version, not currently supported.</desc>
394 </const>
395 <const name="v1_1" value="2">
396 <desc>Legacy settings version, not currently supported.</desc>
397 </const>
398 <const name="v1_2" value="3">
399 <desc>Legacy settings version, not currently supported.</desc>
400 </const>
401 <const name="v1_3pre" value="4">
402 <desc>Legacy settings version, not currently supported.</desc>
403 </const>
404 <const name="v1_3" value="5">
405 <desc>Settings version "1.3", written by VirtualBox 2.0.12.</desc>
406 <!--
407 Machine XML: Capitalization of Uart, Lpt elements and many attributes changed.
408 -->
409 </const>
410 <const name="v1_4" value="6">
411 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
412 <!--
413 VirtualBox.xml: big DiskRegistry -> MediaRegistry revamp, various HardDisk types merged
414 (was VirtualDiskImage, VMDKImage, VHDImage, ISCSIHardDisk, CustomHardDisk, DiffHardDisk)
415 -->
416 </const>
417 <const name="v1_5" value="7">
418 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
419 <!-- 2008-09-04: 2.0.0 released
420 2008-11-20: settings version 1.5 introduced
421 2008-12-17: 2.1.0 released
422 Machine changes:
423 guest OS identifiers changed;
424 Machine/Hardware/Display/MonitorCount renamed to monitorCount;
425 Machine/Hardware/Display/Accelerate3D renamed to accelerate3D;
426 Machine/Hardware/CPU/CPUCount/@count changed to CPU/@count
427 -->
428 </const>
429 <const name="v1_6" value="8">
430 <desc>Settings version "1.6", written by VirtualBox 2.1.4 (at least).</desc>
431 <!-- 2008-12-17: 2.1.0 released
432 2008-12-19: settings version 1.6 introduced (is in 2.1 branch)
433 2009-04-08: 2.2.0 released
434 Machine changes: remove all Machine/Hardware/Network/Adapter/HostInterface[@TAPSetup or @TAPTerminate]/ attributes (done)
435 -->
436 </const>
437 <const name="v1_7" value="9">
438 <desc>Settings version "1.7", written by VirtualBox 2.2.x and 3.0.x.</desc>
439 <!-- 2008-12-17: 2.1.0 released
440 2009-03-11: settings version 1.7 introduced (is in 2.2 branch)
441 2009-04-08: 2.2.0 released
442 VirtualBox.xml additions: NetserviceRegistry with DHCPServers (done)
443 Machine changes: HardDiskAttachments is now StorageControllers (done)
444 -->
445 </const>
446 <const name="v1_8" value="10">
447 <desc>Intermediate settings version "1.8", understood by VirtualBox 3.1.x.</desc>
448 <!-- Machine additions: Display/@accelerate2DVideo (done)
449 -->
450 </const>
451 <const name="v1_9" value="11">
452 <desc>Settings version "1.9", written by VirtualBox 3.1.x.</desc>
453 <!-- The big storage controller / DVD / Floppy rework (done)
454 -->
455 </const>
456 <const name="Future" value="12">
457 <desc>Settings version greater than "1.9", written by a future VirtualBox version.</desc>
458 </const>
459 </enum>
460
461 <enum
462 name="AccessMode"
463 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
464 >
465 <desc>
466 Access mode for opening files.
467 </desc>
468
469 <const name="ReadOnly" value="1"/>
470 <const name="ReadWrite" value="2"/>
471 </enum>
472
473 <enum
474 name="MachineState"
475 uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
476 >
477 <desc>
478 Virtual machine execution state.
479
480 This enumeration represents possible values of the <link
481 to="IMachine::state"/> attribute.
482
483 Below is the basic virtual machine state diagram. It shows how the state
484 changes during virtual machine execution. The text in square braces shows
485 a method of the IConsole interface that performs the given state
486 transition.
487
488 <pre>
489 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
490 V |
491 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
492 | | | | V |
493 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
494 | | ^ | ^ |
495 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
496 | ^ | | | |
497 | | +-----------------------------------------+-|-------------------+ +
498 | | | | |
499 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
500 | | | |
501 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
502 | | |
503 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
504 </pre>
505
506 Note that states to the right from PoweredOff, Aborted and Saved in the
507 above diagram are called <i>online VM states</i>. These states
508 represent the virtual machine which is being executed in a dedicated
509 process (usually with a GUI window attached to it where you can see the
510 activity of the virtual machine and interact with it). There are two
511 special pseudo-states, FirstOnline and LastOnline, that can be used in
512 relational expressions to detect if the given machine state is online or
513 not:
514
515 <pre>
516 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
517 machine.GetState() &lt;= MachineState_LastOnline)
518 {
519 ...the machine is being executed...
520 }
521 </pre>
522
523 When the virtual machine is in one of the online VM states (that is, being
524 executed), only a few machine settings can be modified. Methods working
525 with such settings contain an explicit note about that. An attempt to
526 change any oter setting or perform a modifying operation during this time
527 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
528
529 All online states except Running, Paused and Stuck are transitional: they
530 represent temporary conditions of the virtual machine that will last as
531 long as the operation that initiated such a condition.
532
533 The Stuck state is a special case. It means that execution of the machine
534 has reached the "Guru Meditation" condition. This condition indicates an
535 internal VMM (virtual machine manager) failure which may happen as a
536 result of either an unhandled low-level virtual hardware exception or one
537 of the recompiler exceptions (such as the <i>too-many-traps</i>
538 condition).
539
540 Note also that any online VM state may transit to the Aborted state. This
541 happens if the process that is executing the virtual machine terminates
542 unexpectedly (for example, crashes). Other than that, the Aborted state is
543 equivalent to PoweredOff.
544
545 There are also a few additional state diagrams that do not deal with
546 virtual machine execution and therefore are shown separately. The states
547 shown on these diagrams are called <i>offline VM states</i> (this includes
548 PoweredOff, Aborted and Saved too).
549
550 The first diagram shows what happens when a lengthy setup operation is
551 being executed (such as <link to="IMachine::attachDevice"/>).
552
553 <pre>
554 +----------------------------------(same state as before the call)------+
555 | |
556 +-&gt; PoweredOff --+ |
557 | | |
558 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
559 | |
560 +-&gt; Saved -------+
561 </pre>
562
563 The next two diagrams demonstrate the process of taking a snapshot of a
564 powered off virtual machine and performing one of the "discard..."
565 operations, respectively.
566
567 <pre>
568 +----------------------------------(same state as before the call)------+
569 | |
570 +-&gt; PoweredOff --+ |
571 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
572 +-&gt; Aborted -----+
573
574 +-&gt; PoweredOff --+
575 | |
576 | Aborted -----+--&gt;[discardSnapshot() ]-------------&gt; Discarding --+
577 | | [discardCurrentState()] |
578 +-&gt; Saved -------+ [discardCurrentSnapshotAndState()] |
579 | |
580 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
581 </pre>
582
583 Note that the Saving state is present in both the offline state group and
584 online state group. Currently, the only way to determine what group is
585 assumed in a particular case is to remember the previous machine state: if
586 it was Running or Paused, then Saving is an online state, otherwise it is
587 an offline state. This inconsistency may be removed in one of the future
588 versions of VirtualBox by adding a new state.
589
590 <note internal="yes">
591 For whoever decides to touch this enum: In order to keep the
592 comparisons involving FirstOnline and LastOnline pseudo-states valid,
593 the numeric values of these states must be correspondingly updated if
594 needed: for any online VM state, the condition
595 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
596 @c true. The same relates to transient states for which
597 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
598 @c true.
599 </note>
600 </desc>
601
602 <const name="Null" value="0">
603 <desc>Null value (never used by the API).</desc>
604 </const>
605 <const name="PoweredOff" value="1">
606 <desc>
607 The machine is not running and has no saved execution state; it has
608 either never been started or been shut down successfully.
609 </desc>
610 </const>
611 <const name="Saved" value="2">
612 <desc>
613 The machine is not currently running, but the execution state of the machine
614 has been saved to an external file when it was running, from where
615 it can be resumed.
616 </desc>
617 </const>
618 <const name="Aborted" value="3">
619 <desc>
620 The process running the machine has terminated abnormally. This may
621 indicate a crash of the VM process in host execution context, or
622 the VM process has been terminated externally.
623 </desc>
624 </const>
625 <const name="Running" value="4">
626 <desc>
627 The machine is currently being executed.
628 <note internal="yes">
629 For whoever decides to touch this enum: In order to keep the
630 comparisons in the old source code valid, this state must immediately
631 precede the Paused state.
632 </note>
633 </desc>
634 </const>
635 <const name="Paused" value="5">
636 <desc>
637 Execution of the machine has been paused.
638 <note internal="yes">
639 For whoever decides to touch this enum: In order to keep the
640 comparisons in the old source code valid, this state must immediately
641 follow the Running state.
642 </note>
643 </desc>
644 </const>
645 <const name="Stuck" value="6">
646 <desc>
647 Execution of the machine has reached the "Guru Meditation"
648 condition. This indicates a severe error in the hypervisor itself.
649 </desc>
650 </const>
651 <const name="Starting" value="7">
652 <desc>
653 Machine is being started after powering it on from a
654 zero execution state.
655 </desc>
656 </const>
657 <const name="Stopping" value="8">
658 <desc>
659 Machine is being normally stopped powering it off, or after the guest OS
660 has initiated a shutdown sequence.
661 </desc>
662 </const>
663 <const name="Saving" value="9">
664 <desc>
665 Machine is saving its execution state to a file, or an online
666 snapshot of the machine is being taken.
667 </desc>
668 </const>
669 <const name="Restoring" value="10">
670 <desc>
671 Execution state of the machine is being restored from a file
672 after powering it on from the saved execution state.
673 </desc>
674 </const>
675 <const name="Discarding" value="11">
676 <desc>
677 Snapshot of the machine is being discarded.
678 </desc>
679 </const>
680 <const name="SettingUp" value="12">
681 <desc>
682 Lengthy setup operation is in progress.
683 </desc>
684 </const>
685
686 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
687 <desc>
688 Pseudo-state: first online state (for use in relational expressions).
689 </desc>
690 </const>
691 <const name="LastOnline" value="10" wsmap="suppress"> <!-- Restoring -->
692 <desc>
693 Pseudo-state: last online state (for use in relational expressions).
694 </desc>
695 </const>
696
697 <const name="FirstTransient" value="7" wsmap="suppress"> <!-- Starting -->
698 <desc>
699 Pseudo-state: first transient state (for use in relational expressions).
700 </desc>
701 </const>
702 <const name="LastTransient" value="12" wsmap="suppress"> <!-- SettingUp -->
703 <desc>
704 Pseudo-state: last transient state (for use in relational expressions).
705 </desc>
706 </const>
707
708 </enum>
709
710 <enum
711 name="SessionState"
712 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
713 >
714 <desc>
715 Session state. This enumeration represents possible values of
716 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
717 attributes. See individual enumerator descriptions for the meaning for
718 every value.
719 </desc>
720
721 <const name="Null" value="0">
722 <desc>Null value (never used by the API).</desc>
723 </const>
724 <const name="Closed" value="1">
725 <desc>
726 The machine has no open sessions (<link to="IMachine::sessionState"/>);
727 the session is closed (<link to="ISession::state"/>)
728 </desc>
729 </const>
730 <const name="Open" value="2">
731 <desc>
732 The machine has an open direct session (<link to="IMachine::sessionState"/>);
733 the session is open (<link to="ISession::state"/>)
734 </desc>
735 </const>
736 <const name="Spawning" value="3">
737 <desc>
738 A new (direct) session is being opened for the machine
739 as a result of <link to="IVirtualBox::openRemoteSession"/>
740 call (<link to="IMachine::sessionState"/>);
741 the session is currently being opened
742 as a result of <link to="IVirtualBox::openRemoteSession"/>
743 call (<link to="ISession::state"/>)
744 </desc>
745 </const>
746 <const name="Closing" value="4">
747 <desc>
748 The direct session is being closed (<link to="IMachine::sessionState"/>);
749 the session is being closed (<link to="ISession::state"/>)
750 </desc>
751 </const>
752 </enum>
753
754 <enum
755 name="SessionType"
756 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
757 >
758 <desc>
759 Session type. This enumeration represents possible values of the
760 <link to="ISession::type"/> attribute.
761 </desc>
762
763 <const name="Null" value="0">
764 <desc>Null value (never used by the API).</desc>
765 </const>
766 <const name="Direct" value="1">
767 <desc>
768 Direct session
769 (opened by <link to="IVirtualBox::openSession"/>)
770 </desc>
771 </const>
772 <const name="Remote" value="2">
773 <desc>
774 Remote session
775 (opened by <link to="IVirtualBox::openRemoteSession"/>)
776 </desc>
777 </const>
778 <const name="Existing" value="3">
779 <desc>
780 Existing session
781 (opened by <link to="IVirtualBox::openExistingSession"/>)
782 </desc>
783 </const>
784 </enum>
785
786 <enum
787 name="DeviceType"
788 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
789 >
790 <desc>
791 Device type.
792 </desc>
793 <const name="Null" value="0">
794 <desc>
795 Null value, may also mean "no device" (not allowed for
796 <link to="IConsole::getDeviceActivity"/>).
797 </desc>
798 </const>
799 <const name="Floppy" value="1">
800 <desc>Floppy device.</desc>
801 </const>
802 <const name="DVD" value="2">
803 <desc>CD/DVD-ROM device.</desc>
804 </const>
805 <const name="HardDisk" value="3">
806 <desc>Hard disk device.</desc>
807 </const>
808 <const name="Network" value="4">
809 <desc>Network device.</desc>
810 </const>
811 <const name="USB" value="5">
812 <desc>USB device.</desc>
813 </const>
814 <const name="SharedFolder" value="6">
815 <desc>Shared folder device.</desc>
816 </const>
817 </enum>
818
819 <enum
820 name="DeviceActivity"
821 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
822 >
823 <desc>
824 Device activity for <link to="IConsole::getDeviceActivity"/>.
825 </desc>
826
827 <const name="Null" value="0"/>
828 <const name="Idle" value="1"/>
829 <const name="Reading" value="2"/>
830 <const name="Writing" value="3"/>
831 </enum>
832
833 <enum
834 name="ClipboardMode"
835 uuid="33364716-4008-4701-8f14-be0fa3d62950"
836 >
837 <desc>
838 Host-Guest clipboard interchange mode.
839 </desc>
840
841 <const name="Disabled" value="0"/>
842 <const name="HostToGuest" value="1"/>
843 <const name="GuestToHost" value="2"/>
844 <const name="Bidirectional" value="3"/>
845 </enum>
846
847 <enum
848 name="Scope"
849 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
850 >
851 <desc>
852 Scope of the operation.
853
854 A generic enumeration used in various methods to define the action or
855 argument scope.
856 </desc>
857
858 <const name="Global" value="0"/>
859 <const name="Machine" value="1"/>
860 <const name="Session" value="2"/>
861 </enum>
862
863 <enum
864 name="GuestStatisticType"
865 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
866 >
867 <desc>
868 Statistics type for <link to="IGuest::getStatistic"/>.
869 </desc>
870
871 <const name="CPULoad_Idle" value="0">
872 <desc>
873 Idle CPU load (0-100%) for last interval.
874 </desc>
875 </const>
876 <const name="CPULoad_Kernel" value="1">
877 <desc>
878 Kernel CPU load (0-100%) for last interval.
879 </desc>
880 </const>
881 <const name="CPULoad_User" value="2">
882 <desc>
883 User CPU load (0-100%) for last interval.
884 </desc>
885 </const>
886 <const name="Threads" value="3">
887 <desc>
888 Total number of threads in the system.
889 </desc>
890 </const>
891 <const name="Processes" value="4">
892 <desc>
893 Total number of processes in the system.
894 </desc>
895 </const>
896 <const name="Handles" value="5">
897 <desc>
898 Total number of handles in the system.
899 </desc>
900 </const>
901 <const name="MemoryLoad" value="6">
902 <desc>
903 Memory load (0-100%).
904 </desc>
905 </const>
906 <const name="PhysMemTotal" value="7">
907 <desc>
908 Total physical memory in megabytes.
909 </desc>
910 </const>
911 <const name="PhysMemAvailable" value="8">
912 <desc>
913 Free physical memory in megabytes.
914 </desc>
915 </const>
916 <const name="PhysMemBalloon" value="9">
917 <desc>
918 Ballooned physical memory in megabytes.
919 </desc>
920 </const>
921 <const name="MemCommitTotal" value="10">
922 <desc>
923 Total amount of memory in the committed state in megabytes.
924 </desc>
925 </const>
926 <const name="MemKernelTotal" value="11">
927 <desc>
928 Total amount of memory used by the guest OS's kernel in megabytes.
929 </desc>
930 </const>
931 <const name="MemKernelPaged" value="12">
932 <desc>
933 Total amount of paged memory used by the guest OS's kernel in megabytes.
934 </desc>
935 </const>
936 <const name="MemKernelNonpaged" value="13">
937 <desc>
938 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
939 </desc>
940 </const>
941 <const name="MemSystemCache" value="14">
942 <desc>
943 Total amount of memory used by the guest OS's system cache in megabytes.
944 </desc>
945 </const>
946 <const name="PageFileSize" value="15">
947 <desc>
948 Pagefile size in megabytes.
949 </desc>
950 </const>
951 <const name="SampleNumber" value="16">
952 <desc>
953 Statistics sample number
954 </desc>
955 </const>
956 <const name="MaxVal" value="17"/>
957 </enum>
958
959 <enum
960 name="BIOSBootMenuMode"
961 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
962 >
963 <desc>
964 BIOS boot menu mode.
965 </desc>
966
967 <const name="Disabled" value="0"/>
968 <const name="MenuOnly" value="1"/>
969 <const name="MessageAndMenu" value="2"/>
970 </enum>
971
972 <enum
973 name="ProcessorFeature"
974 uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
975 >
976 <desc>
977 CPU features.
978 </desc>
979
980 <const name="HWVirtEx" value="0"/>
981 <const name="PAE" value="1"/>
982 <const name="LongMode" value="2"/>
983 </enum>
984
985 <enum
986 name="FirmwareType"
987 uuid="7ceea938-8b49-41e2-bb47-667219c0d586"
988 >
989 <desc>
990 Firmware type.
991 </desc>
992 <const name="BIOS" value="1">
993 <desc>BIOS Firmware.</desc>
994 </const>
995 <const name="EFI" value="2">
996 <desc>Efi firmware.</desc>
997 </const>
998 </enum>
999
1000 <!--
1001 // IVirtualBoxErrorInfo
1002 /////////////////////////////////////////////////////////////////////////
1003 -->
1004
1005 <interface
1006 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1007 uuid="4b86d186-407e-4f9e-8be8-e50061be8725"
1008 supportsErrorInfo="no"
1009 wsmap="managed"
1010 >
1011 <desc>
1012 The IVirtualBoxErrorInfo interface represents extended error information.
1013
1014 Extended error information can be set by VirtualBox components after
1015 unsuccessful or partially successful method invocation. This information
1016 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1017 and then shown to the client in addition to the plain 32-bit result code.
1018
1019 In MS COM, this interface extends the IErrorInfo interface,
1020 in XPCOM, it extends the nsIException interface. In both cases,
1021 it provides a set of common attributes to retrieve error
1022 information.
1023
1024 Sometimes invocation of some component's method may involve methods of
1025 other components that may also fail (independently of this method's
1026 failure), or a series of non-fatal errors may precede a fatal error that
1027 causes method failure. In cases like that, it may be desirable to preserve
1028 information about all errors happened during method invocation and deliver
1029 it to the caller. The <link to="#next"/> attribute is intended
1030 specifically for this purpose and allows to represent a chain of errors
1031 through a single IVirtualBoxErrorInfo object set after method invocation.
1032
1033 Note that errors are stored to a chain in the reverse order, i.e. the
1034 initial error object you query right after method invocation is the last
1035 error set by the callee, the object it points to in the @a next attribute
1036 is the previous error and so on, up to the first error (which is the last
1037 in the chain).
1038 </desc>
1039
1040 <attribute name="resultCode" type="long" readonly="yes">
1041 <desc>
1042 Result code of the error.
1043 Usually, it will be the same as the result code returned
1044 by the method that provided this error information, but not
1045 always. For example, on Win32, CoCreateInstance() will most
1046 likely return E_NOINTERFACE upon unsuccessful component
1047 instantiation attempt, but not the value the component factory
1048 returned. Value is typed 'long', not 'result',
1049 to make interface usable from scripting languages.
1050 <note>
1051 In MS COM, there is no equivalent.
1052 In XPCOM, it is the same as nsIException::result.
1053 </note>
1054 </desc>
1055 </attribute>
1056
1057 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1058 <desc>
1059 UUID of the interface that defined the error.
1060 <note>
1061 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1062 data type.
1063 In XPCOM, there is no equivalent.
1064 </note>
1065 </desc>
1066 </attribute>
1067
1068 <attribute name="component" type="wstring" readonly="yes">
1069 <desc>
1070 Name of the component that generated the error.
1071 <note>
1072 In MS COM, it is the same as IErrorInfo::GetSource.
1073 In XPCOM, there is no equivalent.
1074 </note>
1075 </desc>
1076 </attribute>
1077
1078 <attribute name="text" type="wstring" readonly="yes">
1079 <desc>
1080 Text description of the error.
1081 <note>
1082 In MS COM, it is the same as IErrorInfo::GetDescription.
1083 In XPCOM, it is the same as nsIException::message.
1084 </note>
1085 </desc>
1086 </attribute>
1087
1088 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1089 <desc>
1090 Next error object if there is any, or @c null otherwise.
1091 <note>
1092 In MS COM, there is no equivalent.
1093 In XPCOM, it is the same as nsIException::inner.
1094 </note>
1095 </desc>
1096 </attribute>
1097
1098 </interface>
1099
1100 <interface
1101 name="ILocalOwner" extends="$dispatched"
1102 uuid="308FF42A-DC45-49D4-A950-B1EEE5E00BB5" wsmap="suppress"
1103 >
1104 <desc>
1105 The ILocalOwner interface allows to register local objects
1106 (created without COM calls, but with new()).
1107 Once registered, calls to methods of such objects can be made
1108 from remote COM processes.
1109 The main usecase is the event callback implementation where
1110 API clients provide callback objects.
1111 </desc>
1112 <method name="setLocalObject">
1113 <desc>
1114 Set local object.
1115 </desc>
1116 <param name="object" type="$unknown" dir="in">
1117 <desc>Local object to forward requests to.
1118 If null, clears currently set local object.</desc>
1119 </param>
1120 </method>
1121 </interface>
1122
1123 <!--
1124 // IVirtualBox
1125 /////////////////////////////////////////////////////////////////////////
1126 -->
1127
1128 <interface
1129 name="IVirtualBoxCallback" extends="$unknown"
1130 uuid="9a65adf2-3ee6-406b-bca2-2b1fa05f0d0b"
1131 wsmap="suppress"
1132 >
1133
1134 <method name="onMachineStateChange">
1135 <desc>
1136 The execution state of the given machine has changed.
1137 <see>IMachine::state</see>
1138 </desc>
1139 <param name="machineId" type="uuid" mod="string" dir="in">
1140 <desc>ID of the machine this event relates to.</desc>
1141 </param>
1142 <param name="state" type="MachineState" dir="in">
1143 <desc>New execution state.</desc>
1144 </param>
1145 </method>
1146
1147 <method name="onMachineDataChange">
1148 <desc>
1149 Any of the settings of the given machine has changed.
1150 </desc>
1151 <param name="machineId" type="uuid" mod="string" dir="in">
1152 <desc>ID of the machine this event relates to.</desc>
1153 </param>
1154 </method>
1155
1156 <method name="onExtraDataCanChange">
1157 <desc>
1158 Notification when someone tries to change extra data for
1159 either the given machine or (if @c null) global extra data.
1160 This gives the chance to veto against changes.
1161 </desc>
1162 <param name="machineId" type="uuid" mod="string" dir="in">
1163 <desc>
1164 ID of the machine this event relates to
1165 (@c null ID for global extra data change requests).
1166 </desc>
1167 </param>
1168 <param name="key" type="wstring" dir="in">
1169 <desc>
1170 Extra data key for the attempted write.
1171 </desc>
1172 </param>
1173 <param name="value" type="wstring" dir="in">
1174 <desc>
1175 Extra data value for the given key.
1176 </desc>
1177 </param>
1178 <param name="error" type="wstring" dir="out">
1179 <desc>
1180 Optional error message describing the reason of the
1181 veto (ignored if this notification returns @c true).
1182 </desc>
1183 </param>
1184 <param name="allowChange" type="boolean" dir="return">
1185 <desc>
1186 Flag to indicate whether the callee agrees (@c true)
1187 or vetoes against the change (@c false).
1188 </desc>
1189 </param>
1190 </method>
1191
1192 <method name="onExtraDataChange">
1193 <desc>
1194 Notification when machine specific or global extra data
1195 has changed.
1196 </desc>
1197 <param name="machineId" type="uuid" mod="string" dir="in">
1198 <desc>
1199 ID of the machine this event relates to.
1200 Null for global extra data changes.
1201 </desc>
1202 </param>
1203 <param name="key" type="wstring" dir="in">
1204 <desc>
1205 Extra data key that has changed.
1206 </desc>
1207 </param>
1208 <param name="value" type="wstring" dir="in">
1209 <desc>
1210 Extra data value for the given key.
1211 </desc>
1212 </param>
1213 </method>
1214
1215 <method name="onMediumRegistered">
1216 <desc>
1217 The given medium was registered or unregistered
1218 within this VirtualBox installation.
1219
1220 The @a mediumType parameter describes what type of
1221 medium the specified @a mediumId refers to. Possible
1222 values are:
1223
1224 <ul>
1225 <li><link to="DeviceType_HardDisk"/>: the medium is a hard disk
1226 that, if registered, can be obtained using the
1227 <link to="IVirtualBox::getHardDisk"/> call.</li>
1228 <li><link to="DeviceType_DVD"/>: the medium is a CD/DVD image
1229 that, if registered, can be obtained using the
1230 <link to="IVirtualBox::getDVDImage"/> call.</li>
1231 <li><link to="DeviceType_Floppy"/>: the medium is a Floppy image
1232 that, if registered, can be obtained using the
1233 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1234 </ul>
1235
1236 Note that if this is a deregistration notification,
1237 there is no way to access the object representing the
1238 unregistered medium. It is supposed that the
1239 application will do required cleanup based on the
1240 @a mediumId value.
1241 </desc>
1242 <param name="mediumId" type="uuid" mod="string" dir="in">
1243 <desc>ID of the medium this event relates to.</desc>
1244 </param>
1245 <param name="mediumType" type="DeviceType" dir="in">
1246 <desc>Type of the medium this event relates to.</desc>
1247 </param>
1248 <param name="registered" type="boolean" dir="in">
1249 <desc>
1250 If @c true, the medium was registered, otherwise it was
1251 unregistered.
1252 </desc>
1253 </param>
1254 </method>
1255
1256 <method name="onMachineRegistered">
1257 <desc>
1258 The given machine was registered or unregistered
1259 within this VirtualBox installation.
1260 </desc>
1261 <param name="machineId" type="uuid" mod="string" dir="in">
1262 <desc>ID of the machine this event relates to.</desc>
1263 </param>
1264 <param name="registered" type="boolean" dir="in">
1265 <desc>
1266 If @c true, the machine was registered, otherwise it was
1267 unregistered.
1268 </desc>
1269 </param>
1270 </method>
1271
1272 <method name="onSessionStateChange">
1273 <desc>
1274 The state of the session for the given machine was changed.
1275 <see>IMachine::sessionState</see>
1276 </desc>
1277 <param name="machineId" type="uuid" mod="string" dir="in">
1278 <desc>ID of the machine this event relates to.</desc>
1279 </param>
1280 <param name="state" type="SessionState" dir="in">
1281 <desc>New session state.</desc>
1282 </param>
1283 </method>
1284
1285 <method name="onSnapshotTaken">
1286 <desc>
1287 A new snapshot of the machine has been taken.
1288 <see>ISnapshot</see>
1289 </desc>
1290 <param name="machineId" type="uuid" mod="string" dir="in">
1291 <desc>ID of the machine this event relates to.</desc>
1292 </param>
1293 <param name="snapshotId" type="uuid" mod="string" dir="in">
1294 <desc>ID of the new snapshot.</desc>
1295 </param>
1296 </method>
1297
1298 <method name="onSnapshotDiscarded">
1299 <desc>
1300 Snapshot of the given machine has been discarded.
1301
1302 <note>
1303 This notification is delivered <b>after</b> the snapshot
1304 object has been uninitialized on the server (so that any
1305 attempt to call its methods will return an error).
1306 </note>
1307
1308 <see>ISnapshot</see>
1309 </desc>
1310 <param name="machineId" type="uuid" mod="string" dir="in">
1311 <desc>ID of the machine this event relates to.</desc>
1312 </param>
1313 <param name="snapshotId" type="uuid" mod="string" dir="in">
1314 <desc>
1315 ID of the discarded snapshot. @c null means the current machine
1316 state has been discarded (restored from the current snapshot).
1317 </desc>
1318 </param>
1319 </method>
1320
1321 <method name="onSnapshotChange">
1322 <desc>
1323 Snapshot properties (name and/or description) have been changed.
1324 <see>ISnapshot</see>
1325 </desc>
1326 <param name="machineId" type="uuid" mod="string" dir="in">
1327 <desc>ID of the machine this event relates to.</desc>
1328 </param>
1329 <param name="snapshotId" type="uuid" mod="string" dir="in">
1330 <desc>ID of the changed snapshot.</desc>
1331 </param>
1332 </method>
1333
1334 <method name="onGuestPropertyChange">
1335 <desc>
1336 Notification when a guest property has changed.
1337 </desc>
1338 <param name="machineId" type="uuid" mod="string" dir="in">
1339 <desc>
1340 ID of the machine this event relates to.
1341 </desc>
1342 </param>
1343 <param name="name" type="wstring" dir="in">
1344 <desc>
1345 The name of the property that has changed.
1346 </desc>
1347 </param>
1348 <param name="value" type="wstring" dir="in">
1349 <desc>
1350 The new property value.
1351 </desc>
1352 </param>
1353 <param name="flags" type="wstring" dir="in">
1354 <desc>
1355 The new property flags.
1356 </desc>
1357 </param>
1358 </method>
1359
1360 </interface>
1361
1362 <interface
1363 name="IDHCPServer" extends="$unknown"
1364 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1365 wsmap="managed"
1366 >
1367 <desc>
1368 The IDHCPServer interface represents the vbox dhcp server configuration.
1369
1370 To enumerate all the dhcp servers on the host, use the
1371 <link to="IVirtualBox::DHCPServers"/> attribute.
1372 </desc>
1373
1374 <attribute name="enabled" type="boolean">
1375 <desc>
1376 specifies if the dhcp server is enabled
1377 </desc>
1378 </attribute>
1379
1380 <attribute name="IPAddress" type="wstring" readonly="yes">
1381 <desc>
1382 specifies server IP
1383 </desc>
1384 </attribute>
1385
1386 <attribute name="networkMask" type="wstring" readonly="yes">
1387 <desc>
1388 specifies server network mask
1389 </desc>
1390 </attribute>
1391
1392 <attribute name="networkName" type="wstring" readonly="yes">
1393 <desc>
1394 specifies internal network name the server is used for
1395 </desc>
1396 </attribute>
1397
1398 <attribute name="lowerIP" type="wstring" readonly="yes">
1399 <desc>
1400 specifies from IP adrres in server address range
1401 </desc>
1402 </attribute>
1403
1404 <attribute name="upperIP" type="wstring" readonly="yes">
1405 <desc>
1406 specifies to IP adrres in server address range
1407 </desc>
1408 </attribute>
1409
1410 <method name="setConfiguration">
1411 <desc>
1412 configures the server
1413 <result name="E_INVALIDARG">
1414 invalid configuration supplied
1415 </result>
1416 </desc>
1417 <param name="IPAddress" type="wstring" dir="in">
1418 <desc>
1419 server IP address
1420 </desc>
1421 </param>
1422 <param name="networkMask" type="wstring" dir="in">
1423 <desc>
1424 server network mask
1425 </desc>
1426 </param>
1427 <param name="FromIPAddress" type="wstring" dir="in">
1428 <desc>
1429 server From IP address for address range
1430 </desc>
1431 </param>
1432 <param name="ToIPAddress" type="wstring" dir="in">
1433 <desc>
1434 server To IP address for address range
1435 </desc>
1436 </param>
1437 </method>
1438
1439 <method name="start">
1440 <desc>
1441 Starts DHCP server process.
1442 <result name="E_FAIL">
1443 Failed to start the process.
1444 </result>
1445 </desc>
1446 <param name="networkName" type="wstring" dir="in">
1447 <desc>
1448 Name of internal network DHCP server should attach to.
1449 </desc>
1450 </param>
1451 <param name="trunkName" type="wstring" dir="in">
1452 <desc>
1453 Name of internal network trunk.
1454 </desc>
1455 </param>
1456 <param name="trunkType" type="wstring" dir="in">
1457 <desc>
1458 Type of internal network trunk.
1459 </desc>
1460 </param>
1461 </method>
1462
1463 <method name="stop">
1464 <desc>
1465 Stops DHCP server process.
1466 <result name="E_FAIL">
1467 Failed to stop the process.
1468 </result>
1469 </desc>
1470 </method>
1471 </interface>
1472
1473 <interface
1474 name="IVirtualBox" extends="$dispatched"
1475 uuid="c1b8d85d-8f44-4314-94fc-072332bdf852"
1476 wsmap="managed"
1477 >
1478 <desc>
1479 The IVirtualBox interface represents the main interface exposed by the
1480 product that provides virtual machine management.
1481
1482 An instance of IVirtualBox is required for the product to do anything
1483 useful. Even though the interface does not expose this, internally,
1484 IVirtualBox is implemented as a singleton and actually lives in the
1485 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1486 IVirtualBox can track the state of all virtual machines on a particular
1487 host, regardless of which frontend started them.
1488
1489 To enumerate all the virtual machines on the host, use the
1490 <link to="IVirtualBox::machines"/> attribute.
1491 </desc>
1492
1493 <attribute name="version" type="wstring" readonly="yes">
1494 <desc>
1495 A string representing the version number of the product. The
1496 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1497 last number represents the build number and will frequently change.
1498 </desc>
1499 </attribute>
1500
1501 <attribute name="revision" type="unsigned long" readonly="yes">
1502 <desc>
1503 The internal build revision number of the product.
1504 </desc>
1505 </attribute>
1506
1507 <attribute name="packageType" type="wstring" readonly="yes">
1508 <desc>
1509 A string representing the package type of this product. The
1510 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1511 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1512 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1513 this.
1514 </desc>
1515 </attribute>
1516
1517 <attribute name="homeFolder" type="wstring" readonly="yes">
1518 <desc>
1519 Full path to the directory where the global settings file,
1520 <tt>VirtualBox.xml</tt>, is stored.
1521
1522 In this version of VirtualBox, the value of this property is
1523 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1524 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1525 as determined by the host OS), and cannot be changed.
1526
1527 This path is also used as the base to resolve relative paths in
1528 places where relative paths are allowed (unless otherwise
1529 expressly indicated).
1530 </desc>
1531 </attribute>
1532
1533 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1534 <desc>
1535 Full name of the global settings file.
1536 The value of this property corresponds to the value of
1537 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1538 </desc>
1539 </attribute>
1540
1541 <attribute name="host" type="IHost" readonly="yes">
1542 <desc>Associated host object.</desc>
1543 </attribute>
1544
1545 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1546 <desc>Associated system information object.</desc>
1547 </attribute>
1548
1549 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1550 <desc>
1551 Array of machine objects registered within this VirtualBox instance.
1552 </desc>
1553 </attribute>
1554
1555 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1556 <desc>
1557 Array of medium objects known to this VirtualBox installation.
1558
1559 This array contains only base media. All differencing
1560 media of the given base medium can be enumerated using
1561 <link to="IMedium::children"/>.
1562 </desc>
1563 </attribute>
1564
1565 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1566 <desc>
1567 Array of CD/DVD image objects registered with this VirtualBox instance.
1568 </desc>
1569 </attribute>
1570
1571 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1572 <desc>
1573 Array of floppy image objects registered with this VirtualBox instance.
1574 </desc>
1575 </attribute>
1576
1577 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1578
1579 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1580
1581 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1582 <desc>
1583 Collection of global shared folders. Global shared folders are
1584 available to all virtual machines.
1585
1586 New shared folders are added to the collection using
1587 <link to="#createSharedFolder"/>. Existing shared folders can be
1588 removed using <link to="#removeSharedFolder"/>.
1589
1590 <note>
1591 In the current version of the product, global shared folders are not
1592 implemented and therefore this collection is always empty.
1593 </note>
1594 </desc>
1595 </attribute>
1596
1597 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1598 <desc>
1599 Associated performance collector object.
1600 </desc>
1601 </attribute>
1602
1603 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1604 <desc>
1605 dhcp server settings.
1606 </desc>
1607 </attribute>
1608
1609 <method name="createMachine">
1610 <desc>
1611 Creates a new virtual machine.
1612
1613 The new machine is created unregistered, with the initial configuration
1614 set according to the specified guest OS type. A typical sequence of
1615 actions to create a new virtual machine is as follows:
1616
1617 <ol>
1618 <li>
1619 Call this method to have a new machine created. The returned machine
1620 object will be "mutable" allowing to change any machine property.
1621 </li>
1622
1623 <li>
1624 Configure the machine using the appropriate attributes and methods.
1625 </li>
1626
1627 <li>
1628 Call <link to="IMachine::saveSettings" /> to write the settings
1629 to the machine's XML settings file. The configuration of the newly
1630 created machine will not be saved to disk until this method is
1631 called.
1632 </li>
1633
1634 <li>
1635 Call <link to="#registerMachine" /> to add the machine to the list
1636 of machines known to VirtualBox.
1637 </li>
1638 </ol>
1639
1640 You should specify valid name for the newly created machine when calling
1641 this method. See the <link to="IMachine::name"/> attribute description
1642 for more details about the machine name.
1643
1644 The specified guest OS type identifier must match an ID of one of known
1645 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1646 array.
1647
1648 Every machine has a <i>settings file</i> that is used to store
1649 the machine configuration. This file is stored in a directory called the
1650 <i>machine settings subfolder</i>. Both the settings subfolder and file
1651 will have a name that corresponds to the name of the virtual machine.
1652 You can specify where to create the machine setting subfolder using the
1653 @a baseFolder argument. The base folder can be absolute (full path) or
1654 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1655 directory</link>.
1656
1657 If @a baseFolder is a @c null or empty string (which is recommended), the
1658 <link to="ISystemProperties::defaultMachineFolder">default machine
1659 settings folder</link> will be used as a base folder for the created
1660 machine. Otherwise the given base folder will be used. In either case,
1661 the full path to the resulting settings file has the following
1662 structure:
1663 <pre>
1664 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1665 </pre>
1666
1667 Note that if the resulting settings file already exists, this method
1668 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1669
1670 Optionally, you may specify an UUID of to assign to the created machine.
1671 However, this is not recommended and you should normally pass an empty
1672 (@c null) UUID to this method so that a new UUID will be automatically
1673 generated for every created machine. You can use UUID
1674 00000000-0000-0000-0000-000000000000 as @c null value.
1675
1676 <note>
1677 There is no way to change the name of the settings file or
1678 subfolder of the created machine directly.
1679 </note>
1680
1681 <result name="VBOX_E_OBJECT_NOT_FOUND">
1682 @a osTypeId is invalid.
1683 </result>
1684 <result name="VBOX_E_FILE_ERROR">
1685 Resulting settings file name is invalid or the settings file already
1686 exists or could not be created due to an I/O error.
1687 </result>
1688 <result name="E_INVALIDARG">
1689 @a name is empty or @c null.
1690 </result>
1691 </desc>
1692
1693 <param name="name" type="wstring" dir="in">
1694 <desc>Machine name.</desc>
1695 </param>
1696 <param name="osTypeId" type="wstring" dir="in">
1697 <desc>Guest OS Type ID.</desc>
1698 </param>
1699 <param name="baseFolder" type="wstring" dir="in">
1700 <desc>Base machine folder (optional).</desc>
1701 </param>
1702 <param name="id" type="uuid" mod="string" dir="in">
1703 <desc>Machine UUID (optional).</desc>
1704 </param>
1705 <param name="machine" type="IMachine" dir="return">
1706 <desc>Created machine object.</desc>
1707 </param>
1708 </method>
1709
1710 <method name="createLegacyMachine">
1711 <desc>
1712 Creates a new virtual machine in "legacy" mode, using the specified
1713 settings file to store machine settings.
1714
1715 As opposed to machines created by <link to="#createMachine"/>,
1716 the settings file of the machine created in "legacy" mode is not
1717 automatically renamed when the machine name is changed -- it will always
1718 remain the same as specified in this method call.
1719
1720 The specified settings file name can be absolute (full path) or relative
1721 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1722 directory</link>. If the file name doesn't contain an extension, the
1723 default extension (.xml) will be appended.
1724
1725 Note that the configuration of the newly created machine is not
1726 saved to disk (and therefore no settings file is created)
1727 until <link to="IMachine::saveSettings"/> is called. If the
1728 specified settings file already exists, this method
1729 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1730
1731 See <link to="#createMachine"/> for more information.
1732
1733 @deprecated This method may be removed later. Use <link
1734 to="IVirtualBox::createMachine"/> instead.
1735
1736 <note>
1737 There is no way to change the name of the settings file
1738 of the machine created in "legacy" mode.
1739 </note>
1740
1741 <result name="VBOX_E_OBJECT_NOT_FOUND">
1742 @a osTypeId is invalid.
1743 </result>
1744 <result name="VBOX_E_FILE_ERROR">
1745 @a settingsFile is invalid or the settings file already exists or
1746 could not be created due to an I/O error.
1747 </result>
1748 <result name="E_INVALIDARG">
1749 @a name or @a settingsFile is empty or @c null.
1750 </result>
1751 </desc>
1752
1753 <param name="name" type="wstring" dir="in">
1754 <desc>Machine name.</desc>
1755 </param>
1756 <param name="osTypeId" type="wstring" dir="in">
1757 <desc>Machine OS Type ID.</desc>
1758 </param>
1759 <param name="settingsFile" type="wstring" dir="in">
1760 <desc>Name of the machine settings file.</desc>
1761 </param>
1762 <param name="id" type="uuid" mod="string" dir="in">
1763 <desc>Machine UUID (optional).</desc>
1764 </param>
1765 <param name="machine" type="IMachine" dir="return">
1766 <desc>Created machine object.</desc>
1767 </param>
1768 </method>
1769
1770 <method name="openMachine">
1771 <desc>
1772 Opens a virtual machine from the existing settings file.
1773 The opened machine remains unregistered until you call
1774 <link to="#registerMachine"/>.
1775
1776 The specified settings file name can be absolute
1777 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1778 VirtualBox home directory</link>. This file must exist
1779 and must be a valid machine settings file whose contents
1780 will be used to construct the machine object.
1781
1782 @deprecated Will be removed soon.
1783 <result name="VBOX_E_FILE_ERROR">
1784 Settings file name invalid, not found or sharing violation.
1785 </result>
1786 </desc>
1787 <param name="settingsFile" type="wstring" dir="in">
1788 <desc>
1789 Name of the machine settings file.
1790 </desc>
1791 </param>
1792 <param name="machine" type="IMachine" dir="return">
1793 <desc>Opened machine object.</desc>
1794 </param>
1795 <note>
1796 <link to="IMachine::settingsModified"/> will return
1797 @c false for the created machine, until any of machine settings
1798 are changed.
1799 </note>
1800 </method>
1801
1802 <method name="registerMachine">
1803 <desc>
1804
1805 Registers the machine previously created using
1806 <link to="#createMachine"/> or opened using
1807 <link to="#openMachine"/> within this VirtualBox installation. After
1808 successful method invocation, the
1809 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1810 to all registered callbacks.
1811
1812 <note>
1813 This method implicitly calls <link to="IMachine::saveSettings"/>
1814 to save all current machine settings before registering it.
1815 </note>
1816
1817 <result name="VBOX_E_OBJECT_NOT_FOUND">
1818 No matching virtual machine found.
1819 </result>
1820 <result name="VBOX_E_INVALID_OBJECT_STATE">
1821 Virtual machine was not created within this VirtualBox instance.
1822 </result>
1823
1824 </desc>
1825 <param name="machine" type="IMachine" dir="in"/>
1826 </method>
1827
1828 <method name="getMachine">
1829 <desc>
1830 Attempts to find a virtual machine given its UUID.
1831 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1832 instead.
1833
1834 <result name="VBOX_E_OBJECT_NOT_FOUND">
1835 Could not find registered machine matching @a id.
1836 </result>
1837
1838 </desc>
1839 <param name="id" type="uuid" mod="string" dir="in"/>
1840 <param name="machine" type="IMachine" dir="return"/>
1841 </method>
1842
1843 <method name="findMachine">
1844 <desc>
1845 Attempts to find a virtual machine given its name.
1846 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1847 instead.
1848
1849 <result name="VBOX_E_OBJECT_NOT_FOUND">
1850 Could not find registered machine matching @a name.
1851 </result>
1852
1853 </desc>
1854 <param name="name" type="wstring" dir="in"/>
1855 <param name="machine" type="IMachine" dir="return"/>
1856 </method>
1857
1858 <method name="unregisterMachine">
1859 <desc>
1860
1861 Unregisters the machine previously registered using
1862 <link to="#registerMachine"/>. After successful method invocation, the
1863 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1864 to all registered callbacks.
1865
1866 <note>
1867 The specified machine must not be in the Saved state, have an open
1868 (or a spawning) direct session associated with it, have snapshots or
1869 have hard disks attached.
1870 </note>
1871
1872 <note>
1873 This method implicitly calls <link to="IMachine::saveSettings"/> to
1874 save all current machine settings before unregistering it.
1875 </note>
1876
1877 <note>
1878 If the given machine is inaccessible (see
1879 <link to="IMachine::accessible"/>), it will be unregistered and
1880 fully uninitialized right afterwards. As a result, the returned
1881 machine object will be unusable and an attempt to call
1882 <b>any</b> method will return the "Object not ready" error.
1883 </note>
1884
1885 <result name="VBOX_E_OBJECT_NOT_FOUND">
1886 Could not find registered machine matching @a id.
1887 </result>
1888 <result name="VBOX_E_INVALID_VM_STATE">
1889 Machine is in Saved state.
1890 </result>
1891 <result name="VBOX_E_INVALID_OBJECT_STATE">
1892 Machine has snapshot or open session or hard disk attached.
1893 </result>
1894
1895 </desc>
1896 <param name="id" type="uuid" mod="string" dir="in">
1897 <desc>UUID of the machine to unregister.</desc>
1898 </param>
1899 <param name="machine" type="IMachine" dir="return">
1900 <desc>Unregistered machine object.</desc>
1901 </param>
1902 </method>
1903
1904 <method name="createAppliance">
1905 <desc>
1906 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1907 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1908 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1909 </desc>
1910 <param name="appliance" type="IAppliance" dir="return">
1911 <desc>New appliance.</desc>
1912 </param>
1913 </method>
1914
1915 <method name="createHardDisk">
1916 <desc>
1917 Creates a new base medium object that will use the given storage
1918 format and location for medium data.
1919
1920 Note that the actual storage unit is not created by this method. In
1921 order to do it, and before you are able to attach the created medium
1922 to virtual machines, you must call one of the following methods to
1923 allocate a format-specific storage unit at the specified location:
1924 <ul>
1925 <li><link to="IMedium::createBaseStorage"/></li>
1926 <li><link to="IMedium::createDiffStorage"/></li>
1927 </ul>
1928
1929 Some medium attributes, such as <link to="IMedium::id"/>, may
1930 remain uninitialized until the medium storage unit is successfully
1931 created by one of the above methods.
1932
1933 After the storage unit is successfully created, the medium gets
1934 remembered by this VirtualBox installation and will be accessible
1935 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
1936 methods. Remembered base medium are also returned as part of
1937 the <link to="#hardDisks"/> array. See IMedium for more details.
1938
1939 The list of all storage formats supported by this VirtualBox
1940 installation can be obtained using
1941 <link to="ISystemProperties::mediumFormats"/>. If the @a format
1942 attribute is empty or @c null then the default storage format
1943 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1944 be used for creating a storage unit of the medium.
1945
1946 Note that the format of the location string is storage format specific.
1947 See <link to="IMedium::location"/>, IMedium and
1948 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1949
1950 <result name="VBOX_E_OBJECT_NOT_FOUND">
1951 @a format identifier is invalid. See
1952 <link to="ISystemProperties::mediumFormats"/>.
1953 </result>
1954 <result name="VBOX_E_FILE_ERROR">
1955 @a location is a not valid file name (for file-based formats only).
1956 </result>
1957 </desc>
1958 <param name="format" type="wstring" dir="in">
1959 <desc>
1960 Identifier of the storage format to use for the new medium.
1961 </desc>
1962 </param>
1963 <param name="location" type="wstring" dir="in">
1964 <desc>
1965 Location of the storage unit for the new medium.
1966 </desc>
1967 </param>
1968 <param name="medium" type="IMedium" dir="return">
1969 <desc>Created medium object.</desc>
1970 </param>
1971 </method>
1972
1973 <method name="openHardDisk">
1974 <desc>
1975 Opens a medium from an existing location, optionally replacing
1976 the image UUID and/or parent UUID.
1977
1978 After the medium is successfully opened by this method, it gets
1979 remembered by (known to) this VirtualBox installation and will be
1980 accessible through <link to="#getHardDisk"/> and
1981 <link to="#findHardDisk"/> methods. Remembered base media
1982 are also returned as part of the <link to="#hardDisks"/> array and can
1983 be attached to virtual machines. See IMedium for more details.
1984
1985 If a differencing medium is to be opened by this method, the
1986 operation will succeed only if its parent medium and all ancestors,
1987 if any, are already known to this VirtualBox installation (for example,
1988 were opened by this method before).
1989
1990 This method tries to guess the storage format of the specified medium
1991 by reading medium data at the specified location.
1992
1993 If @a write is ReadWrite (which it should be), the image is opened for
1994 read/write access and must have according permissions, as VirtualBox
1995 may actually write status information into the disk's metadata sections.
1996
1997 Note that write access is required for all typical image usage in VirtualBox,
1998 since VirtualBox may need to write metadata such as a UUID into the image.
1999 The only exception is opening a source image temporarily for copying and
2000 cloning when the image will quickly be closed again.
2001
2002 Note that the format of the location string is storage format specific.
2003 See <link to="IMedium::location"/>, IMedium and
2004 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2005
2006 <result name="VBOX_E_FILE_ERROR">
2007 Invalid medium storage file location or could not find the medium
2008 at the specified location.
2009 </result>
2010 <result name="VBOX_E_IPRT_ERROR">
2011 Could not get medium storage format.
2012 </result>
2013 <result name="E_INVALIDARG">
2014 Invalid medium storage format.
2015 </result>
2016
2017 </desc>
2018 <param name="location" type="wstring" dir="in">
2019 <desc>
2020 Location of the storage unit that contains medium data in one of
2021 the supported storage formats.
2022 </desc>
2023 </param>
2024 <param name="accessMode" type="AccessMode" dir="in">
2025 <desc>
2026 Determines whether to open the image in read/write or read-only mode.
2027 </desc>
2028 </param>
2029 <param name="setImageId" type="boolean" dir="in">
2030 <desc>
2031 Select whether a new image UUID is set or not.
2032 </desc>
2033 </param>
2034 <param name="imageId" type="uuid" mod="string" dir="in">
2035 <desc>
2036 New UUID for the image. If an empty string is passed, then a new
2037 UUID is automatically created. Specifying a zero UUIDs is not valid.
2038 </desc>
2039 </param>
2040 <param name="setParentId" type="boolean" dir="in">
2041 <desc>
2042 Select whether a new parent UUID is set or not.
2043 </desc>
2044 </param>
2045 <param name="parentId" type="uuid" mod="string" dir="in">
2046 <desc>
2047 New parent UUID for the image. If an empty string is passed, then a
2048 new UUID is automatically created, provided @a setParentId is
2049 @c true. A zero UUID is valid.
2050 </desc>
2051 </param>
2052 <param name="medium" type="IMedium" dir="return">
2053 <desc>Opened medium object.</desc>
2054 </param>
2055 </method>
2056
2057 <method name="getHardDisk" const="yes">
2058 <desc>
2059 Returns a medium with the given UUID.
2060
2061 The medium with the given UUID must be known to this VirtualBox
2062 installation, i.e. it must be previously created by
2063 <link to="#createHardDisk"/> or opened by <link
2064 to="#openHardDisk"/>, or attached to some known virtual machine.
2065
2066 <result name="VBOX_E_OBJECT_NOT_FOUND">
2067 No medium object matching @a id found.
2068 </result>
2069
2070 </desc>
2071 <param name="id" type="uuid" mod="string" dir="in">
2072 <desc>UUID of the medium to look for.</desc>
2073 </param>
2074 <param name="medium" type="IMedium" dir="return">
2075 <desc>Found medium object.</desc>
2076 </param>
2077 </method>
2078
2079 <method name="findHardDisk">
2080 <desc>
2081 Returns a medium that uses the given location to store medium data.
2082
2083 The given medium must be known to this VirtualBox installation, i.e.
2084 it must be previously created by
2085 <link to="#createHardDisk"/> or opened by <link
2086 to="#openHardDisk"/>, or attached to some known virtual machine.
2087
2088 The search is done by comparing the value of the @a location argument to
2089 the <link to="IMedium::location"/> attribute of each known medium.
2090
2091 For locations represented by file names in the host's file system, the
2092 requested location can be a path relative to the
2093 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2094 only a file name without any path is given, the
2095 <link to="ISystemProperties::defaultHardDiskFolder"> default medium
2096 folder</link> will be prepended to the file name before searching. Note
2097 that on case sensitive file systems, a case sensitive comparison is
2098 performed, otherwise the case of symbols in the file path is ignored.
2099
2100 <result name="VBOX_E_OBJECT_NOT_FOUND">
2101 No medium object matching @a location found.
2102 </result>
2103
2104 </desc>
2105 <param name="location" type="wstring" dir="in">
2106 <desc>Location string to search for.</desc>
2107 </param>
2108 <param name="medium" type="IMedium" dir="return">
2109 <desc>Found medium object.</desc>
2110 </param>
2111 </method>
2112
2113 <method name="openDVDImage">
2114 <desc>
2115 Opens a CD/DVD image contained in the specified file of the supported
2116 format and assigns it the given UUID.
2117
2118 After the image is successfully opened by this method, it gets
2119 remembered by (known to) this VirtualBox installation and will be
2120 accessible through <link to="#getDVDImage"/> and
2121 <link to="#findDVDImage"/> methods. Remembered images are also
2122 returned as part of the <link to="#DVDImages"/> array and can be mounted
2123 to virtual machines. See IMedium for more details.
2124
2125 See <link to="IMedium::location"/> to get more details about the format
2126 of the location string.
2127
2128 <note>
2129 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2130 </note>
2131
2132 <result name="VBOX_E_FILE_ERROR">
2133 Invalid CD/DVD image file location or could not find the CD/DVD
2134 image at the specified location.
2135 </result>
2136 <result name="VBOX_E_INVALID_OBJECT_STATE">
2137 CD/DVD image already exists in the media registry.
2138 </result>
2139
2140 </desc>
2141 <param name="location" type="wstring" dir="in">
2142 <desc>
2143 Full path to the file that contains a valid CD/DVD image.
2144 </desc>
2145 </param>
2146 <param name="id" type="uuid" mod="string" dir="in">
2147 <desc>
2148 UUID to assign to the given image within this VirtualBox installation.
2149 If an empty (@c null) UUID is specified, the system will randomly
2150 generate a new UUID.
2151 </desc>
2152 </param>
2153 <param name="image" type="IMedium" dir="return">
2154 <desc>Opened CD/DVD image object.</desc>
2155 </param>
2156 </method>
2157
2158 <method name="getDVDImage">
2159 <desc>
2160 Returns a CD/DVD image with the given UUID.
2161
2162 The image with the given UUID must be known to this VirtualBox
2163 installation, i.e. it must be previously opened by <link
2164 to="#openDVDImage"/>, or mounted to some known virtual machine.
2165
2166 <result name="VBOX_E_OBJECT_NOT_FOUND">
2167 No matching DVD image found in the media registry.
2168 </result>
2169
2170 </desc>
2171 <param name="id" type="uuid" mod="string" dir="in">
2172 <desc>UUID of the image to look for.</desc>
2173 </param>
2174 <param name="image" type="IMedium" dir="return">
2175 <desc>Found CD/DVD image object.</desc>
2176 </param>
2177 </method>
2178
2179 <method name="findDVDImage">
2180 <desc>
2181 Returns a CD/DVD image with the given image location.
2182
2183 The image with the given UUID must be known to this VirtualBox
2184 installation, i.e. it must be previously opened by <link
2185 to="#openDVDImage"/>, or mounted to some known virtual machine.
2186
2187 The search is done by comparing the value of the @a location argument to
2188 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2189
2190 The requested location can be a path relative to the
2191 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2192 only a file name without any path is given, the
2193 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2194 folder</link> will be prepended to the file name before searching. Note
2195 that on case sensitive file systems, a case sensitive comparison is
2196 performed, otherwise the case in the file path is ignored.
2197
2198 <result name="VBOX_E_FILE_ERROR">
2199 Invalid image file location.
2200 </result>
2201 <result name="VBOX_E_OBJECT_NOT_FOUND">
2202 No matching DVD image found in the media registry.
2203 </result>
2204
2205 </desc>
2206 <param name="location" type="wstring" dir="in">
2207 <desc>CD/DVD image file path to look for.</desc>
2208 </param>
2209 <param name="image" type="IMedium" dir="return">
2210 <desc>Found CD/DVD image object.</desc>
2211 </param>
2212 </method>
2213
2214 <method name="openFloppyImage">
2215 <desc>
2216 Opens a floppy image contained in the specified file of the supported
2217 format and assigns it the given UUID.
2218
2219 After the image is successfully opened by this method, it gets
2220 remembered by (known to) this VirtualBox installation and will be
2221 accessible through <link to="#getFloppyImage"/> and
2222 <link to="#findFloppyImage"/> methods. Remembered images are also
2223 returned as part of the <link to="#floppyImages"/> array and can be
2224 mounted to virtual machines. See IMedium for more details.
2225
2226 See <link to="IMedium::location"/> to get more details about the format
2227 of the location string.
2228
2229 <result name="VBOX_E_FILE_ERROR">
2230 Invalid floppy image file location or could not find the floppy
2231 image at the specified location.
2232 </result>
2233 <result name="VBOX_E_INVALID_OBJECT_STATE">
2234 Floppy image already exists in the media registry.
2235 </result>
2236
2237 <note>
2238 Currently, only raw floppy images are supported by VirtualBox.
2239 </note>
2240 </desc>
2241 <param name="location" type="wstring" dir="in">
2242 <desc>
2243 Full path to the file that contains a valid floppy image.
2244 </desc>
2245 </param>
2246 <param name="id" type="uuid" mod="string" dir="in">
2247 <desc>
2248 UUID to assign to the given image file within this VirtualBox
2249 installation. If an empty (@c null) UUID is specified, the system will
2250 randomly generate a new UUID.
2251 </desc>
2252 </param>
2253 <param name="image" type="IMedium" dir="return">
2254 <desc>Opened floppy image object.</desc>
2255 </param>
2256 </method>
2257
2258 <method name="getFloppyImage">
2259 <desc>
2260 Returns a floppy image with the given UUID.
2261
2262 The image with the given UUID must be known to this VirtualBox
2263 installation, i.e. it must be previously opened by <link
2264 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2265
2266 <result name="VBOX_E_OBJECT_NOT_FOUND">
2267 No matching floppy image found in the media registry.
2268 </result>
2269
2270 </desc>
2271 <param name="id" type="uuid" mod="string" dir="in">
2272 <desc>UUID of the image to look for.</desc>
2273 </param>
2274 <param name="image" type="IMedium" dir="return">
2275 <desc>Found floppy image object.</desc>
2276 </param>
2277 </method>
2278
2279 <method name="findFloppyImage">
2280 <desc>
2281 Returns a floppy image with the given image location.
2282
2283 The image with the given UUID must be known to this VirtualBox
2284 installation, i.e. it must be previously opened by <link
2285 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2286
2287 The search is done by comparing the value of the @a location argument to
2288 the <link to="IMedium::location"/> attribute of each known floppy image.
2289
2290 The requested location can be a path relative to the
2291 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2292 only a file name without any path is given, the
2293 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2294 folder</link> will be prepended to the file name before searching. Note
2295 that on case sensitive file systems, a case sensitive comparison is
2296 performed, otherwise the case of symbols in the file path is ignored.
2297
2298 <result name="VBOX_E_FILE_ERROR">
2299 Invalid image file location.
2300 </result>
2301 <result name="VBOX_E_OBJECT_NOT_FOUND">
2302 No matching floppy image found in the media registry.
2303 </result>
2304
2305 </desc>
2306 <param name="location" type="wstring" dir="in">
2307 <desc>Floppy image file path to look for.</desc>
2308 </param>
2309 <param name="image" type="IMedium" dir="return">
2310 <desc>Found floppy image object.</desc>
2311 </param>
2312 </method>
2313
2314 <method name="getGuestOSType">
2315 <desc>
2316 Returns an object describing the specified guest OS type.
2317
2318 The requested guest OS type is specified using a string which is a
2319 mnemonic identifier of the guest operating system, such as
2320 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2321 particular virtual machine can be read or set using the
2322 <link to="IMachine::OSTypeId"/> attribute.
2323
2324 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2325 available guest OS type objects. Each object has an
2326 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2327 the guest OS this object describes.
2328
2329 <result name="E_INVALIDARG">
2330 @a id is not a valid Guest OS type.
2331 </result>
2332
2333 </desc>
2334 <param name="id" type="uuid" mod="string" dir="in">
2335 <desc>Guest OS type ID string.</desc>
2336 </param>
2337 <param name="type" type="IGuestOSType" dir="return">
2338 <desc>Guest OS type object.</desc>
2339 </param>
2340 </method>
2341
2342 <method name="createSharedFolder">
2343 <desc>
2344 Creates a new global shared folder by associating the given logical
2345 name with the given host path, adds it to the collection of shared
2346 folders and starts sharing it. Refer to the description of
2347 <link to="ISharedFolder"/> to read more about logical names.
2348 <note>
2349 In the current implementation, this operation is not
2350 implemented.
2351 </note>
2352 </desc>
2353 <param name="name" type="wstring" dir="in">
2354 <desc>Unique logical name of the shared folder.</desc>
2355 </param>
2356 <param name="hostPath" type="wstring" dir="in">
2357 <desc>Full path to the shared folder in the host file system.</desc>
2358 </param>
2359 <param name="writable" type="boolean" dir="in">
2360 <desc>Whether the share is writable or readonly</desc>
2361 </param>
2362 </method>
2363
2364 <method name="removeSharedFolder">
2365 <desc>
2366 Removes the global shared folder with the given name previously
2367 created by <link to="#createSharedFolder"/> from the collection of
2368 shared folders and stops sharing it.
2369 <note>
2370 In the current implementation, this operation is not
2371 implemented.
2372 </note>
2373 </desc>
2374 <param name="name" type="wstring" dir="in">
2375 <desc>Logical name of the shared folder to remove.</desc>
2376 </param>
2377 </method>
2378
2379 <method name="getExtraDataKeys">
2380 <desc>
2381 Returns an array representing the global extra data keys which currently
2382 have values defined.
2383 </desc>
2384 <param name="value" type="wstring" dir="return" safearray="yes">
2385 <desc>Array of extra data keys.</desc>
2386 </param>
2387 </method>
2388
2389 <method name="getExtraData">
2390 <desc>
2391 Returns associated global extra data.
2392
2393 If the requested data @a key does not exist, this function will
2394 succeed and return an empty string in the @a value argument.
2395
2396 <result name="VBOX_E_FILE_ERROR">
2397 Settings file not accessible.
2398 </result>
2399 <result name="VBOX_E_XML_ERROR">
2400 Could not parse the settings file.
2401 </result>
2402
2403 </desc>
2404 <param name="key" type="wstring" dir="in">
2405 <desc>Name of the data key to get.</desc>
2406 </param>
2407 <param name="value" type="wstring" dir="return">
2408 <desc>Value of the requested data key.</desc>
2409 </param>
2410 </method>
2411
2412 <method name="setExtraData">
2413 <desc>
2414 Sets associated global extra data.
2415
2416 If you pass @c null or empty string as a key @a value, the given @a key
2417 will be deleted.
2418
2419 <note>
2420 Before performing the actual data change, this method will ask all
2421 registered callbacks using the
2422 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2423 notification for a permission. If one of the callbacks refuses the
2424 new value, the change will not be performed.
2425 </note>
2426 <note>
2427 On success, the
2428 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2429 is called to inform all registered callbacks about a successful data
2430 change.
2431 </note>
2432
2433 <result name="VBOX_E_FILE_ERROR">
2434 Settings file not accessible.
2435 </result>
2436 <result name="VBOX_E_XML_ERROR">
2437 Could not parse the settings file.
2438 </result>
2439 <result name="E_ACCESSDENIED">
2440 Modification request refused.
2441 </result>
2442
2443 </desc>
2444 <param name="key" type="wstring" dir="in">
2445 <desc>Name of the data key to set.</desc>
2446 </param>
2447 <param name="value" type="wstring" dir="in">
2448 <desc>Value to assign to the key.</desc>
2449 </param>
2450 </method>
2451
2452 <method name="openSession">
2453 <desc>
2454 Opens a new direct session with the given virtual machine.
2455
2456 A direct session acts as a local lock on the given VM.
2457 There can be only one direct session open at a time for every
2458 virtual machine, protecting the VM from being manipulated by
2459 conflicting actions from different processes. Only after a
2460 direct session has been opened, one can change all VM settings
2461 and execute the VM in the process space of the session object.
2462
2463 Sessions therefore can be compared to mutex semaphores that
2464 lock a given VM for modification and execution.
2465 See <link to="ISession">ISession</link> for details.
2466
2467 <note>Unless you are writing a new VM frontend, you will not
2468 want to execute a VM in the current process. To spawn a new
2469 process that executes a VM, use
2470 <link to="IVirtualBox::openRemoteSession" />
2471 instead.</note>
2472
2473 Upon successful return, the session object can be used to
2474 get access to the machine and to the VM console.
2475
2476 In VirtualBox terminology, the machine becomes "mutable" after
2477 a session has been opened. Note that the "mutable" machine
2478 object, on which you may invoke IMachine methods to change its
2479 settings, will be a different object from the immutable IMachine
2480 objects returned by various IVirtualBox methods. To obtain a
2481 mutable IMachine object (upon which you can invoke settings methods),
2482 use the <link to="ISession::machine" /> attribute.
2483
2484 One must always call <link to="ISession::close" /> to release the
2485 lock on the machine, or the machine's state will eventually be
2486 set to "Aborted".
2487
2488 In other words, to change settings on a machine, the following
2489 sequence is typically performed:
2490
2491 <ol>
2492 <li>Call this method (openSession) to have a machine locked for
2493 the current session.</li>
2494
2495 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2496
2497 <li>Change the settings of the machine.</li>
2498
2499 <li>Call <link to="IMachine::saveSettings" />.</li>
2500
2501 <li>Close the session by calling <link to="ISession::close"/>.</li>
2502 </ol>
2503
2504 <result name="E_UNEXPECTED">
2505 Virtual machine not registered.
2506 </result>
2507 <result name="E_ACCESSDENIED">
2508 Process not started by OpenRemoteSession.
2509 </result>
2510 <result name="VBOX_E_OBJECT_NOT_FOUND">
2511 No matching virtual machine found.
2512 </result>
2513 <result name="VBOX_E_INVALID_OBJECT_STATE">
2514 Session already open or being opened.
2515 </result>
2516 <result name="VBOX_E_VM_ERROR">
2517 Failed to assign machine to session.
2518 </result>
2519
2520 </desc>
2521 <param name="session" type="ISession" dir="in">
2522 <desc>
2523 Session object that will represent the opened session after
2524 successful method invocation. This object must not represent
2525 the already open session.
2526 <note>
2527 This session will be automatically closed if the
2528 VirtualBox server is terminated for some reason.
2529 </note>
2530 </desc>
2531 </param>
2532 <param name="machineId" type="uuid" mod="string" dir="in">
2533 <desc>ID of the virtual machine to open a session with.</desc>
2534 </param>
2535 </method>
2536
2537 <method name="openRemoteSession">
2538 <desc>
2539 Spawns a new process that executes a virtual machine (called a
2540 "remote session").
2541
2542 Opening a remote session causes the VirtualBox server to start a new
2543 process that opens a direct session with the given VM. As a result, the
2544 VM is locked by that direct session in the new process, preventing
2545 conflicting changes from other processes. Since sessions act as locks
2546 that prevent conflicting changes, one cannot open a remote session
2547 for a VM that already has another open session (direct or remote), or
2548 is currently in the process of opening one (see <link
2549 to="IMachine::sessionState"/>).
2550
2551 While the remote session still provides some level of control over the
2552 VM execution to the caller (using the <link to="IConsole" /> interface),
2553 not all VM settings are available for modification within the remote
2554 session context.
2555
2556 This operation can take some time (a new VM is started in a new process,
2557 for which memory and other resources need to be set up). Because of this,
2558 an <link to="IProgress" /> is returned to allow the caller to wait for this
2559 asynchronous operation to be completed. Until then, the remote session
2560 object remains in the closed state, and accessing the machine or its
2561 console through it is invalid. It is recommended to use
2562 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2563 completion.
2564
2565 As with all <link to="ISession" /> objects, it is recommended to call
2566 <link to="ISession::close" /> on the local session object once openRemoteSession()
2567 has been called. However, the session's state (see <link to="ISession::state" />)
2568 will not return to "Closed" until the remote session has also closed (i.e.
2569 until the VM is no longer running). In that case, however, the state of
2570 the session will automatically change back to "Closed".
2571
2572 Currently supported session types (values of the @a type
2573 argument) are:
2574 <ul>
2575 <li><tt>"gui"</tt>: VirtualBox Qt GUI session</li>
2576 <li><tt>"vrdp"</tt>: VirtualBox VRDP Server session</li>
2577 <li><tt>"sdl"</tt>: VirtualBox SDL GUI session</li>
2578 </ul>
2579
2580 The @a environment argument is a string containing definitions of
2581 environment variables in the following format:
2582 @code
2583 NAME[=VALUE]\n
2584 NAME[=VALUE]\n
2585 ...
2586 @endcode
2587 where <tt>\\n</tt> is the new line character. These environment
2588 variables will be appended to the environment of the VirtualBox server
2589 process. If an environment variable exists both in the server process
2590 and in this list, the value from this list takes precedence over the
2591 server's variable. If the value of the environment variable is
2592 omitted, this variable will be removed from the resulting environment.
2593 If the environment string is @c null or empty, the server environment
2594 is inherited by the started process as is.
2595
2596 <see>openExistingSession</see>
2597
2598 <result name="E_UNEXPECTED">
2599 Virtual machine not registered.
2600 </result>
2601 <result name="E_INVALIDARG">
2602 Invalid session type @a type.
2603 </result>
2604 <result name="VBOX_E_OBJECT_NOT_FOUND">
2605 No machine matching @a machineId found.
2606 </result>
2607 <result name="VBOX_E_INVALID_OBJECT_STATE">
2608 Session already open or being opened.
2609 </result>
2610 <result name="VBOX_E_IPRT_ERROR">
2611 Launching process for machine failed.
2612 </result>
2613 <result name="VBOX_E_VM_ERROR">
2614 Failed to assign machine to session.
2615 </result>
2616
2617 </desc>
2618 <param name="session" type="ISession" dir="in">
2619 <desc>
2620 Session object that will represent the opened remote session
2621 after successful method invocation (this object must not
2622 represent an already open session).
2623 </desc>
2624 </param>
2625 <param name="machineId" type="uuid" mod="string" dir="in">
2626 <desc>ID of the virtual machine to open a session with.</desc>
2627 </param>
2628 <param name="type" type="wstring" dir="in">
2629 <desc>
2630 Type of the remote session (case sensitive).
2631 </desc>
2632 </param>
2633 <param name="environment" type="wstring" dir="in">
2634 <desc>
2635 Environment to pass to the opened session.
2636 </desc>
2637 </param>
2638 <param name="progress" type="IProgress" dir="return">
2639 <desc>Progress object to track the operation completion.</desc>
2640 </param>
2641 </method>
2642
2643 <method name="openExistingSession">
2644 <desc>
2645 Opens a new remote session with the virtual machine for
2646 which a direct session is already open.
2647
2648 The remote session provides some level of control over the VM
2649 execution (using the IConsole interface) to the caller; however,
2650 within the remote session context, not all VM settings are available
2651 for modification.
2652
2653 As opposed to <link to="#openRemoteSession"/>, the number of
2654 remote sessions opened this way is not limited by the API
2655
2656 <note>
2657 It is an error to open a remote session with the machine that
2658 doesn't have an open direct session.
2659 </note>
2660
2661 <result name="E_UNEXPECTED">
2662 Virtual machine not registered.
2663 </result>
2664 <result name="VBOX_E_OBJECT_NOT_FOUND">
2665 No machine matching @a machineId found.
2666 </result>
2667 <result name="VBOX_E_INVALID_OBJECT_STATE">
2668 Session already open or being opened.
2669 </result>
2670 <result name="VBOX_E_INVALID_SESSION_STATE">
2671 Direct session state not Open.
2672 </result>
2673 <result name="VBOX_E_VM_ERROR">
2674 Failed to get console object from direct session or assign
2675 machine to session.
2676 </result>
2677
2678 <see>openRemoteSession</see>
2679 </desc>
2680 <param name="session" type="ISession" dir="in">
2681 <desc>
2682 Session object that will represent the open remote session
2683 after successful method invocation. This object must not
2684 represent an already open session.
2685 <note>
2686 This session will be automatically closed when the peer
2687 (direct) session dies or gets closed.
2688 </note>
2689 </desc>
2690 </param>
2691 <param name="machineId" type="uuid" mod="string" dir="in">
2692 <desc>ID of the virtual machine to open a session with.</desc>
2693 </param>
2694 </method>
2695
2696 <method name="registerCallback">
2697 <desc>
2698 Registers a new global VirtualBox callback. The methods of the given
2699 callback object will be called by VirtualBox when an appropriate
2700 event occurs.
2701
2702 <result name="E_INVALIDARG">
2703 A @c null callback cannot be registered.
2704 </result>
2705
2706 </desc>
2707 <param name="callback" type="IVirtualBoxCallback" dir="in">
2708 <desc>Callback object to register.</desc>
2709 </param>
2710 </method>
2711
2712 <method name="unregisterCallback">
2713 <desc>
2714 Unregisters the previously registered global VirtualBox callback.
2715
2716 <result name="E_INVALIDARG">
2717 Specified @a callback not registered.
2718 </result>
2719
2720 </desc>
2721 <param name="callback" type="IVirtualBoxCallback" dir="in">
2722 <desc>Callback object to unregister.</desc>
2723 </param>
2724 </method>
2725
2726 <method name="waitForPropertyChange">
2727 <desc>
2728 Blocks the caller until any of the properties represented by the
2729 @a what argument changes the value or until the given timeout interval
2730 expires.
2731
2732 The @a what argument is a comma separated list of property masks that
2733 describe properties the caller is interested in. The property mask is
2734 a string in the following format:
2735
2736 <pre>
2737 [[group.]subgroup.]name
2738 </pre>
2739
2740 where @c name is the property name and @c group, @c subgroup are zero
2741 or more property group specifiers. Each element (group or name) in
2742 the property mask may be either a Latin string or an asterisk symbol
2743 (@c "*") which is used to match any string for the given element. A
2744 property mask that doesn't contain asterisk symbols represents a
2745 single fully qualified property name.
2746
2747 Groups in the fully qualified property name go from more generic (the
2748 left-most part) to more specific (the right-most part). The first
2749 element is usually a name of the object the property belongs to. The
2750 second element may be either a property name, or a child object name,
2751 or an index if the preceding element names an object which is one of
2752 many objects of the same type. This way, property names form a
2753 hierarchy of properties. Here are some examples of property names:
2754
2755 <table>
2756 <tr>
2757 <td><tt>VirtualBox.version</tt></td>
2758 <td><link to="IVirtualBox::version"/> property</td>
2759 </tr>
2760 <tr>
2761 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2762 <td><link to="IMachine::name"/> property of the machine with the
2763 given UUID</td>
2764 </tr>
2765 </table>
2766
2767 Most property names directly correspond to the properties of objects
2768 (components) provided by the VirtualBox library and may be used to
2769 track changes to these properties. However, there may be
2770 pseudo-property names that don't correspond to any existing object's
2771 property directly, as well as there may be object properties that
2772 don't have a corresponding property name that is understood by this
2773 method, and therefore changes to such properties cannot be
2774 tracked. See individual object's property descriptions to get a
2775 fully qualified property name that can be used with this method (if
2776 any).
2777
2778 There is a special property mask @c "*" (i.e. a string consisting of a
2779 single asterisk symbol) that can be used to match all properties.
2780 Below are more examples of property masks:
2781
2782 <table>
2783 <tr>
2784 <td><tt>VirtualBox.*</tt></td>
2785 <td>Track all properties of the VirtualBox object</td>
2786 </tr>
2787 <tr>
2788 <td><tt>Machine.*.name</tt></td>
2789 <td>Track changes to the <link to="IMachine::name"/> property of
2790 all registered virtual machines</td>
2791 </tr>
2792 </table>
2793
2794 <note>
2795 This function is not implemented in the current version of the
2796 product.
2797 </note>
2798 </desc>
2799 <param name="what" type="wstring" dir="in">
2800 <desc>Comma separated list of property masks.</desc>
2801 </param>
2802 <param name="timeout" type="unsigned long" dir="in">
2803 <desc>
2804 Wait timeout in milliseconds.
2805 Specify -1 for an indefinite wait.
2806 </desc>
2807 </param>
2808 <param name="changed" type="wstring" dir="out">
2809 <desc>
2810 Comma separated list of properties that have been changed and caused
2811 this method to return to the caller.
2812 </desc>
2813 </param>
2814 <param name="values" type="wstring" dir="out">
2815 <desc>Reserved, not currently used.</desc>
2816 </param>
2817 </method>
2818
2819 <!--method name="createDHCPServerForInterface">
2820 <desc>
2821 Creates a dhcp server settings to be used for the given interface
2822 <result name="E_INVALIDARG">
2823 Host network interface @a name already exists.
2824 </result>
2825 </desc>
2826 <param name="interface" type="IHostNetworkInterface" dir="in">
2827 <desc>Network Interface</desc>
2828 </param>
2829 <param name="server" type="IDHCPServer" dir="out">
2830 <desc>Dhcp server settings</desc>
2831 </param>
2832 </method-->
2833
2834 <method name="createDHCPServer">
2835 <desc>
2836 Creates a dhcp server settings to be used for the given internal network name
2837 <result name="E_INVALIDARG">
2838 Host network interface @a name already exists.
2839 </result>
2840 </desc>
2841 <param name="name" type="wstring" dir="in">
2842 <desc>server name</desc>
2843 </param>
2844 <param name="server" type="IDHCPServer" dir="return">
2845 <desc>Dhcp server settings</desc>
2846 </param>
2847 </method>
2848
2849 <method name="findDHCPServerByNetworkName">
2850 <desc>
2851 Searches a dhcp server settings to be used for the given internal network name
2852 <result name="E_INVALIDARG">
2853 Host network interface @a name already exists.
2854 </result>
2855
2856 </desc>
2857 <param name="name" type="wstring" dir="in">
2858 <desc>server name</desc>
2859 </param>
2860 <param name="server" type="IDHCPServer" dir="return">
2861 <desc>Dhcp server settings</desc>
2862 </param>
2863 </method>
2864
2865 <!--method name="findDHCPServerForInterface">
2866 <desc>
2867 Searches a dhcp server settings to be used for the given interface
2868 <result name="E_INVALIDARG">
2869 Host network interface @a name already exists.
2870 </result>
2871 </desc>
2872 <param name="interface" type="IHostNetworkInterface" dir="in">
2873 <desc>Network Interface</desc>
2874 </param>
2875 <param name="server" type="IDHCPServer" dir="out">
2876 <desc>Dhcp server settings</desc>
2877 </param>
2878 </method-->
2879
2880 <method name="removeDHCPServer">
2881 <desc>
2882 Removes the dhcp server settings
2883 <result name="E_INVALIDARG">
2884 Host network interface @a name already exists.
2885 </result>
2886 </desc>
2887 <param name="server" type="IDHCPServer" dir="in">
2888 <desc>Dhcp server settings to be removed</desc>
2889 </param>
2890 </method>
2891
2892 </interface>
2893
2894 <!--
2895 // IVFSExplorer
2896 /////////////////////////////////////////////////////////////////////////
2897 -->
2898
2899 <enum
2900 name="VFSType"
2901 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
2902 >
2903 <desc>
2904 Virtual file systems supported by VFSExplorer.
2905 </desc>
2906
2907 <const name="File" value="1" />
2908 <const name="Cloud" value="2" />
2909 <const name="S3" value="3" />
2910 <const name="WebDav" value="4" />
2911 </enum>
2912
2913 <enum
2914 name="VFSFileType"
2915 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
2916 >
2917 <desc>
2918 File types known by VFSExplorer.
2919 </desc>
2920
2921 <const name="Unknown" value="1" />
2922 <const name="Fifo" value="2" />
2923 <const name="DevChar" value="3" />
2924 <const name="Directory" value="4" />
2925 <const name="DevBlock" value="5" />
2926 <const name="File" value="6" />
2927 <const name="SymLink" value="7" />
2928 <const name="Socket" value="8" />
2929 <const name="WhiteOut" value="9" />
2930 </enum>
2931
2932 <interface
2933 name="IVFSExplorer" extends="$unknown"
2934 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
2935 wsmap="managed"
2936 >
2937 <desc>
2938 The VFSExplorer interface unifies access to different file system
2939 types. This includes local file systems as well remote file systems like
2940 S3. For a list of supported types see <link to="VFSType" />.
2941 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
2942 </desc>
2943
2944 <attribute name="path" type="wstring" readonly="yes">
2945 <desc>Returns the current path in the virtual file system.</desc>
2946 </attribute>
2947
2948 <attribute name="type" type="VFSType" readonly="yes">
2949 <desc>Returns the file system type which is currently in use.</desc>
2950 </attribute>
2951
2952 <method name="update">
2953 <desc>Updates the internal list of files/directories from the
2954 current directory level. Use <link to="#entryList" /> to get the full list
2955 after a call to this method.</desc>
2956
2957 <param name="aProgress" type="IProgress" dir="return">
2958 <desc>Progress object to track the operation completion.</desc>
2959 </param>
2960 </method>
2961
2962 <method name="cd">
2963 <desc>Change the current directory level.</desc>
2964
2965 <param name="aDir" type="wstring" dir="in">
2966 <desc>The name of the directory to go in.</desc>
2967 </param>
2968
2969 <param name="aProgress" type="IProgress" dir="return">
2970 <desc>Progress object to track the operation completion.</desc>
2971 </param>
2972 </method>
2973
2974 <method name="cdUp">
2975 <desc>Go one directory upwards from the current directory level.</desc>
2976
2977 <param name="aProgress" type="IProgress" dir="return">
2978 <desc>Progress object to track the operation completion.</desc>
2979 </param>
2980 </method>
2981
2982 <method name="entryList">
2983 <desc>Returns a list of files/directories after a call to <link
2984 to="#update" />. The user is responsible for keeping this internal
2985 list up do date.</desc>
2986
2987 <param name="aNames" type="wstring" safearray="yes" dir="out">
2988 <desc>The list of names for the entries.</desc>
2989 </param>
2990
2991 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
2992 <desc>The list of types for the entries.</desc>
2993 </param>
2994 </method>
2995
2996 <method name="exists">
2997 <desc>Checks if the given file list exists in the current directory
2998 level.</desc>
2999
3000 <param name="aNames" type="wstring" safearray="yes" dir="in">
3001 <desc>The names to check.</desc>
3002 </param>
3003
3004 <param name="aExists" type="wstring" safearray="yes" dir="return">
3005 <desc>The names which exist.</desc>
3006 </param>
3007 </method>
3008
3009 <method name="remove">
3010 <desc>Deletes the given files in the current directory level.</desc>
3011
3012 <param name="aNames" type="wstring" safearray="yes" dir="in">
3013 <desc>The names to remove.</desc>
3014 </param>
3015
3016 <param name="aProgress" type="IProgress" dir="return">
3017 <desc>Progress object to track the operation completion.</desc>
3018 </param>
3019 </method>
3020
3021 </interface>
3022
3023 <!--
3024 // IAppliance
3025 /////////////////////////////////////////////////////////////////////////
3026 -->
3027
3028 <interface
3029 name="IAppliance" extends="$unknown"
3030 uuid="e3ba9ab9-ac2c-4266-8bd2-91c4bf721ceb"
3031 wsmap="managed"
3032 >
3033 <desc>
3034 Represents a platform-independent appliance in OVF format. An instance of this is returned
3035 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3036 appliances with VirtualBox.
3037
3038 The OVF standard suggests two different physical file formats:
3039
3040 <ol>
3041 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
3042 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
3043 this descriptor file references other files, as OVF appliances distributed as a set of
3044 files most likely do, those files must be in the same directory as the descriptor file.</li>
3045
3046 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
3047 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3048 files and optionally other files.
3049
3050 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3051 be added with a later version.</li>
3052 </ol>
3053
3054 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3055 <link to="IMachine" /> involves the following sequence of API calls:
3056
3057 <ol>
3058 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3059 </li>
3060
3061 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3062 would like to import. So long as this file is syntactically valid, this will succeed
3063 and return an instance of IAppliance that contains the parsed data from the OVF file.
3064 </li>
3065
3066 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3067 contents of the IAppliance attributes accordingly. These can be inspected by a
3068 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3069 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3070 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3071 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3072 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3073 The GUI can then give the user the option to confirm and/or change these suggestions.
3074 </li>
3075
3076 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3077 virtual system to override the suggestions made by the interpret() routine.
3078 </li>
3079
3080 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3081 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3082 virtual system descriptions.
3083 </li>
3084 </ol>
3085
3086 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3087
3088 <ol>
3089 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3090 an empty IAppliance object.
3091 </li>
3092
3093 <li>For each machine you would like to export, call <link to="IMachine::export" />
3094 with the IAppliance object you just created. This creates an instance of
3095 <link to="IVirtualSystemDescription" /> inside the appliance.
3096 </li>
3097
3098 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3099 virtual system to override the suggestions made by the export() routine.
3100 </li>
3101
3102 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3103 file written.</li>
3104 </ol>
3105
3106 </desc>
3107
3108 <attribute name="path" type="wstring" readonly="yes">
3109 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3110 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3111 <link to="#write" /> (for export).
3112 This attribute is empty until one of these methods has been called.
3113 </desc>
3114 </attribute>
3115
3116 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3117 <desc>
3118 Array of virtual disk definitions. One such description exists for each
3119 disk definition in the OVF; each string array item represents one such piece of
3120 disk information, with the information fields separated by tab (\\t) characters.
3121
3122 The caller should be prepared for additional fields being appended to
3123 this string in future versions of VirtualBox and therefore check for
3124 the number of tabs in the strings returned.
3125
3126 In the current version, the following eight fields are returned per string
3127 in the array:
3128
3129 <ol>
3130 <li>Disk ID (unique string identifier given to disk)</li>
3131
3132 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3133
3134 <li>Populated size (optional unsigned integer indicating the current size of the
3135 disk; can be approximate; -1 if unspecified)</li>
3136
3137 <li>Format (string identifying the disk format, typically
3138 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3139
3140 <li>Reference (where to find the disk image, typically a file name; if empty,
3141 then the disk should be created on import)</li>
3142
3143 <li>Image size (optional unsigned integer indicating the size of the image,
3144 which need not necessarily be the same as the values specified above, since
3145 the image may be compressed or sparse; -1 if not specified)</li>
3146
3147 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3148 presently unsupported and always -1)</li>
3149
3150 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3151 </ol>
3152 </desc>
3153 </attribute>
3154
3155 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3156 <desc> Array of virtual system descriptions. One such description is created
3157 for each virtual system found in the OVF.
3158 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3159 (for export) has been called.
3160 </desc>
3161 </attribute>
3162
3163 <method name="read">
3164 <desc>
3165 Reads an OVF file into the appliance object.
3166
3167 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3168 mere fact that this method returns successfully does not mean that VirtualBox supports all
3169 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3170 </desc>
3171 <param name="file" type="wstring" dir="in">
3172 <desc>
3173 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3174 on whether the appliance is distributed as a set of files or as a single file, respectively).
3175 </desc>
3176 </param>
3177 <param name="aProgress" type="IProgress" dir="return">
3178 <desc></desc>
3179 </param>
3180 </method>
3181
3182 <method name="interpret">
3183 <desc>
3184 Interprets the OVF data that was read when the appliance was constructed. After
3185 calling this method, one can inspect the
3186 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3187 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3188 the appliance.
3189
3190 Calling this method is the second step of importing an appliance into VirtualBox;
3191 see <link to="IAppliance" /> for an overview.
3192
3193 After calling this method, one should call <link to="#getWarnings" /> to find out
3194 if problems were encountered during the processing which might later lead to
3195 errors.
3196 </desc>
3197 </method>
3198
3199 <method name="importMachines">
3200 <desc>
3201 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3202 and other interfaces that match the information contained in the appliance as
3203 closely as possible, as represented by the import instructions in the
3204 <link to="#virtualSystemDescriptions" /> array.
3205
3206 Calling this method is the final step of importing an appliance into VirtualBox;
3207 see <link to="IAppliance" /> for an overview.
3208
3209 Since importing the appliance will most probably involve copying and converting
3210 disk images, which can take a long time, this method operates asynchronously and
3211 returns an IProgress object to allow the caller to monitor the progress.
3212 </desc>
3213
3214 <param name="aProgress" type="IProgress" dir="return">
3215 <desc></desc>
3216 </param>
3217 </method>
3218
3219 <method name="createVFSExplorer">
3220 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
3221
3222 <param name="aUri" type="wstring" dir="in">
3223 <desc>The URI describing the file system to use.</desc>
3224 </param>
3225
3226 <param name="aExplorer" type="IVFSExplorer" dir="return">
3227 <desc></desc>
3228 </param>
3229 </method>
3230
3231 <method name="write">
3232 <desc>
3233 Writes the contents of the appliance exports into a new OVF file.
3234
3235 Calling this method is the final step of exporting an appliance from VirtualBox;
3236 see <link to="IAppliance" /> for an overview.
3237
3238 Since exporting the appliance will most probably involve copying and converting
3239 disk images, which can take a long time, this method operates asynchronously and
3240 returns an IProgress object to allow the caller to monitor the progress.
3241 </desc>
3242 <param name="format" type="wstring" dir="in">
3243 <desc>
3244 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
3245 future versions of VirtualBox may support additional formats.
3246 </desc>
3247 </param>
3248 <param name="path" type="wstring" dir="in">
3249 <desc>
3250 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3251 on whether the appliance is distributed as a set of files or as a single file, respectively).
3252 </desc>
3253 </param>
3254 <param name="aProgress" type="IProgress" dir="return">
3255 <desc>Progress object to track the operation completion.</desc>
3256 </param>
3257 </method>
3258
3259 <method name="getWarnings">
3260 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3261
3262 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3263 <desc></desc>
3264 </param>
3265 </method>
3266
3267 </interface>
3268
3269 <enum
3270 name="VirtualSystemDescriptionType"
3271 uuid="aacc58de-5b45-4f82-ae2e-dd9a824fc3b5"
3272 >
3273 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3274 a configuration value.</desc>
3275
3276 <const name="Ignore" value="1" />
3277 <const name="OS" value="2" />
3278 <const name="Name" value="3" />
3279 <const name="Product" value="4" />
3280 <const name="Vendor" value="5" />
3281 <const name="Version" value="6" />
3282 <const name="ProductUrl" value="7" />
3283 <const name="VendorUrl" value="8" />
3284 <const name="Description" value="9" />
3285 <const name="License" value="10" />
3286 <const name="Miscellaneous" value="11" />
3287 <const name="CPU" value="12" />
3288 <const name="Memory" value="13" />
3289 <const name="HardDiskControllerIDE" value="14" />
3290 <const name="HardDiskControllerSATA" value="15" />
3291 <const name="HardDiskControllerSCSI" value="16" />
3292 <const name="HardDiskImage" value="17" />
3293 <const name="Floppy" value="18" />
3294 <const name="CDROM" value="19" />
3295 <const name="NetworkAdapter" value="20" />
3296 <const name="USBController" value="21" />
3297 <const name="SoundCard" value="22" />
3298
3299 </enum>
3300
3301 <enum
3302 name="VirtualSystemDescriptionValueType"
3303 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3304 >
3305 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
3306 type to fetch.</desc>
3307
3308 <const name="Reference" value="1" />
3309 <const name="Original" value="2" />
3310 <const name="Auto" value="3" />
3311 <const name="ExtraConfig" value="4" />
3312
3313 </enum>
3314
3315 <interface
3316 name="IVirtualSystemDescription" extends="$unknown"
3317 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3318 wsmap="managed"
3319 >
3320
3321 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3322 After <link to="IAppliance::interpret" /> has been called, that array contains
3323 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3324 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3325 into VirtualBox.
3326 </desc>
3327
3328 <attribute name="count" type="unsigned long" readonly="yes">
3329 <desc>Return the number of virtual system description entries.</desc>
3330 </attribute>
3331
3332 <method name="getDescription">
3333 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3334 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3335
3336 The list below identifies the value sets that are possible depending on the
3337 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3338 the array item with the same index in aOvfValues[] will contain the original value as contained
3339 in the OVF file (just for informational purposes), and the corresponding item in aVBoxValues[]
3340 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3341 the aExtraConfigValues[] array item may also be used.
3342
3343 <ul>
3344 <li>
3345 "OS": the guest operating system type. There must be exactly one such array item on import. The
3346 corresponding item in aVBoxValues[] contains the suggested guest operating system for VirtualBox.
3347 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3348 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF.
3349 </li>
3350 <li>
3351 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3352 if none is present on import, then an automatic name will be created from the operating system
3353 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3354 from the OVF file, and aVBoxValues[] will contain a suggestion for a unique VirtualBox
3355 <link to="IMachine" /> name that does not exist yet.
3356 </li>
3357 <li>
3358 "Description": an arbitrary description.
3359 </li>
3360 <li>
3361 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3362 code to display such a license for agreement; the Main API does not enforce any such policy.
3363 </li>
3364 <li>
3365 Miscellaneous: reserved for future use.
3366 </li>
3367 <li>
3368 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3369 </li>
3370 <li>
3371 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3372 is present on import, then VirtualBox will set a meaningful default based on the operating system
3373 type.
3374 </li>
3375 <li>
3376 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3377 has no value in aOvfValues[] or aVBoxValues[].
3378 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3379 type can use to specify which hard disk controller a virtual disk should be connected to.
3380 </li>
3381 <li>
3382 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3383 has no value in aOvfValues[] or aVBoxValues[].
3384 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3385 </li>
3386 <li>
3387 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3388 The items in aOvfValues[] and aVBoxValues[] will either be "LsiLogic" or "BusLogic".
3389 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3390 </li>
3391 <li>
3392 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3393 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3394
3395 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3396 a path since the image file should be in the same location as the OVF file itself), whereas the
3397 item in aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
3398 hard disk image. This means that on import the image will be copied and converted from the
3399 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3400 On import, the target image will also be registered with VirtualBox.
3401
3402 The matching item in the aExtraConfigValues[] array must contain a string of the following
3403 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3404 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3405 the image to. That number must be the index of an array item with one of the hard disk controller
3406 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3407 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3408 this can range from 0-3 (which VirtualBox will interpret as primary master, primary slave, secondary master and
3409 secondary slave. For SATA and SCSI controllers, the channel can range from 0-29.
3410 </li>
3411 <li>
3412 "NetworkAdapter": a network adapter. The array item in aVBoxValues[] will specify the hardware
3413 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3414 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3415 </li>
3416 <li>
3417 "USBController": a USB controller. There can be at most one such item. If and only if such an
3418 item ispresent, USB support will be enabled for the new virtual machine.
3419 </li>
3420 <li>
3421 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3422 present, sound support will be enabled for the new virtual machine. Note that the virtual
3423 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3424 may be different from the virtual soundcard expected by the appliance.
3425 </li>
3426 </ul>
3427
3428 </desc>
3429
3430 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3431 <desc></desc>
3432 </param>
3433
3434 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3435 <desc></desc>
3436 </param>
3437
3438 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3439 <desc></desc>
3440 </param>
3441
3442 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3443 <desc></desc>
3444 </param>
3445
3446 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3447 <desc></desc>
3448 </param>
3449
3450 </method>
3451
3452 <method name="getDescriptionByType">
3453 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3454 should be returned.</desc>
3455
3456 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3457 <desc></desc>
3458 </param>
3459
3460 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3461 <desc></desc>
3462 </param>
3463
3464 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3465 <desc></desc>
3466 </param>
3467
3468 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3469 <desc></desc>
3470 </param>
3471
3472 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3473 <desc></desc>
3474 </param>
3475
3476 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3477 <desc></desc>
3478 </param>
3479
3480 </method>
3481
3482 <method name="getValuesByType">
3483 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3484 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3485 values.</desc>
3486
3487 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3488 <desc></desc>
3489 </param>
3490
3491 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3492 <desc></desc>
3493 </param>
3494
3495 <param name="aValues" type="wstring" dir="return" safearray="yes">
3496 <desc></desc>
3497 </param>
3498
3499 </method>
3500
3501 <method name="setFinalValues">
3502 <desc>
3503 This method allows the appliance's user to change the configuration for the virtual
3504 system descriptions. For each array item returned from <link to="#getDescription" />,
3505 you must pass in one boolean value and one configuration value.
3506
3507 Each item in the boolean array determines whether the particular configuration item
3508 should be enabled.
3509 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3510 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3511 and SoundCard.
3512
3513 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3514 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
3515 the configuration remains unchanged. Please see the documentation for getDescription()
3516 for valid configuration values for the individual array item types. If the
3517 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
3518 </desc>
3519
3520 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3521 <desc></desc>
3522 </param>
3523
3524 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
3525 <desc></desc>
3526 </param>
3527
3528 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3529 <desc></desc>
3530 </param>
3531 </method>
3532
3533 <method name="addDescription">
3534 <desc>
3535 This method adds an additional description entry to the stack of already
3536 available descriptions for this virtual system. This is handy for writing
3537 values which aren't directly supported by VirtualBox. One example would
3538 be the License type of <link to="VirtualSystemDescriptionType" />.
3539 </desc>
3540
3541 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3542 <desc></desc>
3543 </param>
3544
3545 <param name="aVBoxValue" type="wstring" dir="in">
3546 <desc></desc>
3547 </param>
3548
3549 <param name="aExtraConfigValue" type="wstring" dir="in">
3550 <desc></desc>
3551 </param>
3552 </method>
3553 </interface>
3554
3555
3556 <!--
3557 // IMachine
3558 /////////////////////////////////////////////////////////////////////////
3559 -->
3560
3561 <interface
3562 name="IInternalMachineControl" extends="$unknown"
3563 uuid="6c08103e-b8e6-44fb-bc6c-36067153d4bd"
3564 internal="yes"
3565 wsmap="suppress"
3566 >
3567 <method name="setRemoveSavedState">
3568 <desc>
3569 Updates the flag whether saved state is removed on a machine state
3570 change from Saved to PoweredOff.
3571 </desc>
3572 <param name="aRemove" type="boolean" dir="in"/>
3573 </method>
3574
3575 <method name="updateState">
3576 <desc>
3577 Updates the VM state.
3578 <note>
3579 This operation will also update the settings file with
3580 the correct information about the saved state file
3581 and delete this file from disk when appropriate.
3582 </note>
3583 </desc>
3584 <param name="state" type="MachineState" dir="in"/>
3585 </method>
3586
3587 <method name="getIPCId">
3588 <param name="id" type="wstring" dir="return"/>
3589 </method>
3590
3591 <method name="runUSBDeviceFilters">
3592 <desc>
3593 Asks the server to run USB devices filters of the associated
3594 machine against the given USB device and tell if there is
3595 a match.
3596 <note>
3597 Intended to be used only for remote USB devices. Local
3598 ones don't require to call this method (this is done
3599 implicitly by the Host and USBProxyService).
3600 </note>
3601 </desc>
3602 <param name="device" type="IUSBDevice" dir="in"/>
3603 <param name="matched" type="boolean" dir="out"/>
3604 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3605 </method>
3606
3607 <method name="captureUSBDevice">
3608 <desc>
3609 Requests a capture of the given host USB device.
3610 When the request is completed, the VM process will
3611 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3612 notification.
3613 </desc>
3614 <param name="id" type="uuid" mod="string" dir="in"/>
3615 </method>
3616
3617 <method name="detachUSBDevice">
3618 <desc>
3619 Notification that a VM is going to detach (@a done = @c false) or has
3620 already detached (@a done = @c true) the given USB device.
3621 When the @a done = @c true request is completed, the VM process will
3622 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3623 notification.
3624 <note>
3625 In the @a done = @c true case, the server must run its own filters
3626 and filters of all VMs but this one on the detached device
3627 as if it were just attached to the host computer.
3628 </note>
3629 </desc>
3630 <param name="id" type="uuid" mod="string" dir="in"/>
3631 <param name="done" type="boolean" dir="in"/>
3632 </method>
3633
3634 <method name="autoCaptureUSBDevices">
3635 <desc>
3636 Requests a capture all matching USB devices attached to the host.
3637 When the request is completed, the VM process will
3638 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3639 notification per every captured device.
3640 </desc>
3641 </method>
3642
3643 <method name="detachAllUSBDevices">
3644 <desc>
3645 Notification that a VM that is being powered down. The done
3646 parameter indicates whether which stage of the power down
3647 we're at. When @a done = @c false the VM is announcing its
3648 intentions, while when @a done = @c true the VM is reporting
3649 what it has done.
3650 <note>
3651 In the @a done = @c true case, the server must run its own filters
3652 and filters of all VMs but this one on all detach devices as
3653 if they were just attached to the host computer.
3654 </note>
3655 </desc>
3656 <param name="done" type="boolean" dir="in"/>
3657 </method>
3658
3659 <method name="onSessionEnd">
3660 <desc>
3661 Triggered by the given session object when the session is about
3662 to close normally.
3663 </desc>
3664 <param name="session" type="ISession" dir="in">
3665 <desc>Session that is being closed</desc>
3666 </param>
3667 <param name="progress" type="IProgress" dir="return">
3668 <desc>
3669 Used to wait until the corresponding machine is actually
3670 dissociated from the given session on the server.
3671 Returned only when this session is a direct one.
3672 </desc>
3673 </param>
3674 </method>
3675
3676 <method name="beginSavingState">
3677 <desc>
3678 Called by the VM process to inform the server it wants to
3679 save the current state and stop the VM execution.
3680 </desc>
3681 <param name="progress" type="IProgress" dir="in">
3682 <desc>
3683 Progress object created by the VM process to wait until
3684 the state is saved.
3685 </desc>
3686 </param>
3687 <param name="stateFilePath" type="wstring" dir="out">
3688 <desc>
3689 File path the VM process must save the execution state to.
3690 </desc>
3691 </param>
3692 </method>
3693
3694 <method name="endSavingState">
3695 <desc>
3696 Called by the VM process to inform the server that saving
3697 the state previously requested by #beginSavingState is either
3698 successfully finished or there was a failure.
3699
3700 <result name="VBOX_E_FILE_ERROR">
3701 Settings file not accessible.
3702 </result>
3703 <result name="VBOX_E_XML_ERROR">
3704 Could not parse the settings file.
3705 </result>
3706
3707 </desc>
3708
3709 <param name="success" type="boolean" dir="in">
3710 <desc>@c true to indicate success and @c false otherwise.
3711 </desc>
3712 </param>
3713 </method>
3714
3715 <method name="adoptSavedState">
3716 <desc>
3717 Gets called by IConsole::adoptSavedState.
3718 <result name="VBOX_E_FILE_ERROR">
3719 Invalid saved state file path.
3720 </result>
3721 </desc>
3722 <param name="savedStateFile" type="wstring" dir="in">
3723 <desc>Path to the saved state file to adopt.</desc>
3724 </param>
3725 </method>
3726
3727 <method name="beginTakingSnapshot">
3728 <desc>
3729 Called from the VM process to request from the server to perform the
3730 server-side actions of creating a snapshot (creating differencing images
3731 and the snapshot object).
3732
3733 <result name="VBOX_E_FILE_ERROR">
3734 Settings file not accessible.
3735 </result>
3736 <result name="VBOX_E_XML_ERROR">
3737 Could not parse the settings file.
3738 </result>
3739 </desc>
3740 <param name="initiator" type="IConsole" dir="in">
3741 <desc>The console object that initiated this call.</desc>
3742 </param>
3743 <param name="name" type="wstring" dir="in">
3744 <desc>Snapshot name.</desc>
3745 </param>
3746 <param name="description" type="wstring" dir="in">
3747 <desc>Snapshot description.</desc>
3748 </param>
3749 <param name="consoleProgress" type="IProgress" dir="in">
3750 <desc>
3751 Progress object created by the VM process tracking the
3752 snapshot's progress. This has the following sub-operations:
3753 <ul>
3754 <li>setting up (weight 1);</li>
3755 <li>one for each hard disk attachment that needs a differencing image (weight 1 each);</li>
3756 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3757 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3758 <li>finishing up (weight 1)</li>
3759 </ul>
3760 </desc>
3761 </param>
3762 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3763 <desc>
3764 Whether this is an online snapshot (i.e. the machine is running).
3765 </desc>
3766 </param>
3767 <param name="stateFilePath" type="wstring" dir="out">
3768 <desc>
3769 File path the VM process must save the execution state to.
3770 </desc>
3771 </param>
3772 </method>
3773
3774 <method name="endTakingSnapshot">
3775 <desc>
3776 Called by the VM process to inform the server that the snapshot
3777 previously requested by #beginTakingSnapshot is either
3778 successfully taken or there was a failure.
3779 </desc>
3780
3781 <param name="success" type="boolean" dir="in">
3782 <desc>@c true to indicate success and @c false otherwise</desc>
3783 </param>
3784 </method>
3785
3786 <method name="discardSnapshot">
3787 <desc>
3788 Gets called by IConsole::discardSnapshot.
3789 <result name="VBOX_E_INVALID_OBJECT_STATE">
3790 Snapshot has more than one child snapshot.
3791 </result>
3792 </desc>
3793 <param name="initiator" type="IConsole" dir="in">
3794 <desc>The console object that initiated this call.</desc>
3795 </param>
3796 <param name="id" type="uuid" mod="string" dir="in">
3797 <desc>UUID of the snapshot to discard.</desc>
3798 </param>
3799 <param name="machineState" type="MachineState" dir="out">
3800 <desc>New machine state after this operation is started.</desc>
3801 </param>
3802 <param name="progress" type="IProgress" dir="return">
3803 <desc>Progress object to track the operation completion.</desc>
3804 </param>
3805 </method>
3806
3807 <method name="discardCurrentState">
3808 <desc>
3809 Gets called by IConsole::discardCurrentState.
3810 <result name="VBOX_E_INVALID_OBJECT_STATE">
3811 Virtual machine does not have any snapshot.
3812 </result>
3813 </desc>
3814 <param name="initiator" type="IConsole" dir="in">
3815 <desc>The console object that initiated this call.</desc>
3816 </param>
3817 <param name="machineState" type="MachineState" dir="out">
3818 <desc>New machine state after this operation is started.</desc>
3819 </param>
3820 <param name="progress" type="IProgress" dir="return">
3821 <desc>Progress object to track the operation completion.</desc>
3822 </param>
3823 </method>
3824
3825 <method name="discardCurrentSnapshotAndState">
3826 <desc>
3827 Gets called by IConsole::discardCurrentSnapshotAndState.
3828 <result name="VBOX_E_INVALID_OBJECT_STATE">
3829 Virtual machine does not have any snapshot.
3830 </result>
3831 </desc>
3832 <param name="initiator" type="IConsole" dir="in">
3833 <desc>The console object that initiated this call.</desc>
3834 </param>
3835 <param name="machineState" type="MachineState" dir="out">
3836 <desc>New machine state after this operation is started.</desc>
3837 </param>
3838 <param name="progress" type="IProgress" dir="return">
3839 <desc>Progress object to track the operation completion.</desc>
3840 </param>
3841 </method>
3842
3843 <method name="pullGuestProperties">
3844 <desc>
3845 Get the list of the guest properties matching a set of patterns along
3846 with their values, time stamps and flags and give responsibility for
3847 managing properties to the console.
3848 </desc>
3849 <param name="name" type="wstring" dir="out" safearray="yes">
3850 <desc>
3851 The names of the properties returned.
3852 </desc>
3853 </param>
3854 <param name="value" type="wstring" dir="out" safearray="yes">
3855 <desc>
3856 The values of the properties returned. The array entries match the
3857 corresponding entries in the @a name array.
3858 </desc>
3859 </param>
3860 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3861 <desc>
3862 The time stamps of the properties returned. The array entries match
3863 the corresponding entries in the @a name array.
3864 </desc>
3865 </param>
3866 <param name="flags" type="wstring" dir="out" safearray="yes">
3867 <desc>
3868 The flags of the properties returned. The array entries match the
3869 corresponding entries in the @a name array.
3870 </desc>
3871 </param>
3872 </method>
3873
3874 <method name="pushGuestProperties">
3875 <desc>
3876 Set the list of the guest properties matching a set of patterns along
3877 with their values, time stamps and flags and return responsibility for
3878 managing properties to IMachine.
3879 </desc>
3880 <param name="name" type="wstring" dir="in" safearray="yes">
3881 <desc>
3882 The names of the properties.
3883 </desc>
3884 </param>
3885 <param name="value" type="wstring" dir="in" safearray="yes">
3886 <desc>
3887 The values of the properties. The array entries match the
3888 corresponding entries in the @a name array.
3889 </desc>
3890 </param>
3891 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3892 <desc>
3893 The time stamps of the properties. The array entries match
3894 the corresponding entries in the @a name array.
3895 </desc>
3896 </param>
3897 <param name="flags" type="wstring" dir="in" safearray="yes">
3898 <desc>
3899 The flags of the properties. The array entries match the
3900 corresponding entries in the @a name array.
3901 </desc>
3902 </param>
3903 </method>
3904 <method name="pushGuestProperty">
3905 <desc>
3906 Update a single guest property in IMachine.
3907 </desc>
3908 <param name="name" type="wstring" dir="in">
3909 <desc>
3910 The name of the property to be updated.
3911 </desc>
3912 </param>
3913 <param name="value" type="wstring" dir="in">
3914 <desc>
3915 The value of the property.
3916 </desc>
3917 </param>
3918 <param name="timestamp" type="unsigned long long" dir="in">
3919 <desc>
3920 The timestamp of the property.
3921 </desc>
3922 </param>
3923 <param name="flags" type="wstring" dir="in">
3924 <desc>
3925 The flags of the property.
3926 </desc>
3927 </param>
3928 </method>
3929
3930 <method name="lockMedia">
3931 <desc>
3932 Locks all media attached to the machine for writing and parents of
3933 attached differencing media (if any) for reading. This operation is
3934 atomic so that if it fails no media is actually locked.
3935
3936 This method is intended to be called when the machine is in Starting or
3937 Restoring state. The locked media will be automatically unlocked when
3938 the machine is powered off or crashed.
3939 </desc>
3940 </method>
3941 </interface>
3942
3943 <interface
3944 name="IBIOSSettings" extends="$unknown"
3945 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3946 wsmap="managed"
3947 >
3948 <desc>
3949 The IBIOSSettings interface represents BIOS settings of the virtual
3950 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3951 </desc>
3952 <attribute name="logoFadeIn" type="boolean">
3953 <desc>Fade in flag for BIOS logo animation.</desc>
3954 </attribute>
3955
3956 <attribute name="logoFadeOut" type="boolean">
3957 <desc>Fade out flag for BIOS logo animation.</desc>
3958 </attribute>
3959
3960 <attribute name="logoDisplayTime" type="unsigned long">
3961 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3962 </attribute>
3963
3964 <attribute name="logoImagePath" type="wstring">
3965 <desc>Local file system path for external BIOS image.</desc>
3966 </attribute>
3967
3968 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3969 <desc>Mode of the BIOS boot device menu.</desc>
3970 </attribute>
3971
3972 <attribute name="ACPIEnabled" type="boolean">
3973 <desc>ACPI support flag.</desc>
3974 </attribute>
3975
3976 <attribute name="IOAPICEnabled" type="boolean">
3977 <desc>
3978 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3979 and support IRQs above 15.
3980 </desc>
3981 </attribute>
3982
3983 <attribute name="timeOffset" type="long long">
3984 <desc>
3985 Offset in milliseconds from the host system time. This allows for
3986 guests running with a different system date/time than the host.
3987 It is equivalent to setting the system date/time in the BIOS except
3988 it is not an absolute value but a relative one. Guest Additions
3989 time synchronization honors this offset.
3990 </desc>
3991 </attribute>
3992
3993 <attribute name="PXEDebugEnabled" type="boolean">
3994 <desc>
3995 PXE debug logging flag. If set, VirtualBox will write extensive
3996 PXE trace information to the release log.
3997 </desc>
3998 </attribute>
3999
4000 </interface>
4001
4002 <interface
4003 name="IMachine" extends="$unknown"
4004 uuid="160b0ccc-c3d6-4c1b-bbe9-39b1a732f833"
4005 wsmap="managed"
4006 >
4007 <desc>
4008 The IMachine interface represents a virtual machine, or guest, created
4009 in VirtualBox.
4010
4011 This interface is used in two contexts. First of all, a collection of
4012 objects implementing this interface is stored in the
4013 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
4014 machines that are currently registered with this VirtualBox
4015 installation. Also, once a session has been opened for the given virtual
4016 machine (e.g. the virtual machine is running), the machine object
4017 associated with the open session can be queried from the session object;
4018 see <link to="ISession"/> for details.
4019
4020 The main role of this interface is to expose the settings of the virtual
4021 machine and provide methods to change various aspects of the virtual
4022 machine's configuration. For machine objects stored in the
4023 <link to="IVirtualBox::machines"/> collection, all attributes are
4024 read-only unless explicitly stated otherwise in individual attribute
4025 and method descriptions. In order to change a machine setting, a session
4026 for this machine must be opened using one of
4027 <link to="IVirtualBox::openSession"/>,
4028 <link to="IVirtualBox::openRemoteSession"/> or
4029 <link to="IVirtualBox::openExistingSession"/> methods. After the
4030 session has been successfully opened, a mutable machine object needs to
4031 be queried from the session object and then the desired settings changes
4032 can be applied to the returned object using IMachine attributes and
4033 methods. See the <link to="ISession"/> interface description for more
4034 information about sessions.
4035
4036 Note that IMachine does not provide methods to control virtual machine
4037 execution (such as start the machine, or power it down) -- these methods
4038 are grouped in a separate interface called <link to="IConsole" />.
4039
4040 <see>ISession, IConsole</see>
4041 </desc>
4042
4043 <attribute name="parent" type="IVirtualBox" readonly="yes">
4044 <desc>Associated parent object.</desc>
4045 </attribute>
4046
4047 <attribute name="accessible" type="boolean" readonly="yes">
4048 <desc>
4049 Whether this virtual machine is currently accessible or not.
4050
4051 A machine is always deemed accessible unless it is registered <i>and</i>
4052 its settings file cannot be read or parsed (either because the file itself
4053 is unavailable or has invalid XML contents).
4054
4055 Every time this property is read, the accessibility state of
4056 this machine is re-evaluated. If the returned value is @c false,
4057 the <link to="#accessError"/> property may be used to get the
4058 detailed error information describing the reason of
4059 inaccessibility, including XML error messages.
4060
4061 When the machine is inaccessible, only the following properties
4062 can be used on it:
4063 <ul>
4064 <li><link to="#parent"/></li>
4065 <li><link to="#id"/></li>
4066 <li><link to="#settingsFilePath"/></li>
4067 <li><link to="#accessible"/></li>
4068 <li><link to="#accessError"/></li>
4069 </ul>
4070
4071 An attempt to access any other property or method will return
4072 an error.
4073
4074 The only possible action you can perform on an inaccessible
4075 machine is to unregister it using the
4076 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4077 for the accessibility state once more by querying this
4078 property).
4079
4080 <note>
4081 In the current implementation, once this property returns
4082 @c true, the machine will never become inaccessible
4083 later, even if its settings file cannot be successfully
4084 read/written any more (at least, until the VirtualBox
4085 server is restarted). This limitation may be removed in
4086 future releases.
4087 </note>
4088 </desc>
4089 </attribute>
4090
4091 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4092 <desc>
4093 Error information describing the reason of machine
4094 inaccessibility.
4095
4096 Reading this property is only valid after the last call to
4097 <link to="#accessible"/> returned @c false (i.e. the
4098 machine is currently unaccessible). Otherwise, a @c null
4099 IVirtualBoxErrorInfo object will be returned.
4100 </desc>
4101 </attribute>
4102
4103 <attribute name="name" type="wstring">
4104 <desc>
4105 Name of the virtual machine.
4106
4107 Besides being used for human-readable identification purposes
4108 everywhere in VirtualBox, the virtual machine name is also used
4109 as a name of the machine's settings file and as a name of the
4110 subdirectory this settings file resides in. Thus, every time you
4111 change the value of this property, the settings file will be
4112 renamed once you call <link to="#saveSettings"/> to confirm the
4113 change. The containing subdirectory will be also renamed, but
4114 only if it has exactly the same name as the settings file
4115 itself prior to changing this property (for backward compatibility
4116 with previous API releases). The above implies the following
4117 limitations:
4118 <ul>
4119 <li>The machine name cannot be empty.</li>
4120 <li>The machine name can contain only characters that are valid
4121 file name characters according to the rules of the file
4122 system used to store VirtualBox configuration.</li>
4123 <li>You cannot have two or more machines with the same name
4124 if they use the same subdirectory for storing the machine
4125 settings files.</li>
4126 <li>You cannot change the name of the machine if it is running,
4127 or if any file in the directory containing the settings file
4128 is being used by another running machine or by any other
4129 process in the host operating system at a time when
4130 <link to="#saveSettings"/> is called.
4131 </li>
4132 </ul>
4133 If any of the above limitations are hit, <link to="#saveSettings"/>
4134 will return an appropriate error message explaining the exact
4135 reason and the changes you made to this machine will not be
4136 saved.
4137 <note>
4138 For "legacy" machines created using the
4139 <link to="IVirtualBox::createLegacyMachine"/> call,
4140 the above naming limitations do not apply because the
4141 machine name does not affect the settings file name.
4142 The settings file name remains the same as it was specified
4143 during machine creation and never changes.
4144 </note>
4145 </desc>
4146 </attribute>
4147
4148 <attribute name="description" type="wstring">
4149 <desc>
4150 Description of the virtual machine.
4151
4152 The description attribute can contain any text and is
4153 typically used to describe the hardware and software
4154 configuration of the virtual machine in detail (i.e. network
4155 settings, versions of the installed software and so on).
4156 </desc>
4157 </attribute>
4158
4159 <attribute name="id" type="uuid" mod="string" readonly="yes">
4160 <desc>UUID of the virtual machine.</desc>
4161 </attribute>
4162
4163 <attribute name="OSTypeId" type="wstring">
4164 <desc>
4165 User-defined identifier of the Guest OS type.
4166 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4167 an IGuestOSType object representing details about the given
4168 Guest OS type.
4169 <note>
4170 This value may differ from the value returned by
4171 <link to="IGuest::OSTypeId"/> if Guest Additions are
4172 installed to the guest OS.
4173 </note>
4174 </desc>
4175 </attribute>
4176
4177 <attribute name="HardwareVersion" type="wstring">
4178 <desc>Hardware version identifier. Internal use only for now.</desc>
4179 </attribute>
4180
4181 <attribute name="CPUCount" type="unsigned long">
4182 <desc>Number of virtual CPUs in the VM.</desc>
4183 </attribute>
4184
4185 <attribute name="memorySize" type="unsigned long">
4186 <desc>System memory size in megabytes.</desc>
4187 </attribute>
4188
4189 <attribute name="memoryBalloonSize" type="unsigned long">
4190 <desc>Initial memory balloon size in megabytes.</desc>
4191 </attribute>
4192
4193 <attribute name="statisticsUpdateInterval" type="unsigned long">
4194 <desc>Initial interval to update guest statistics in seconds.</desc>
4195 </attribute>
4196
4197 <attribute name="VRAMSize" type="unsigned long">
4198 <desc>Video memory size in megabytes.</desc>
4199 </attribute>
4200
4201 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4202 <desc>
4203 This setting determines whether VirtualBox allows this machine to make
4204 use of the 3D graphics support available on the host.</desc>
4205 </attribute>
4206
4207 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
4208 <desc>
4209 This setting determines whether VirtualBox allows this machine to make
4210 use of the 2D video acceleration support available on the host.</desc>
4211 </attribute>
4212
4213 <attribute name="monitorCount" type="unsigned long">
4214 <desc>
4215 Number of virtual monitors.
4216 <note>
4217 Only effective on Windows XP and later guests with
4218 Guest Additions installed.
4219 </note>
4220 </desc>
4221 </attribute>
4222
4223 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4224 <desc>Object containing all BIOS settings.</desc>
4225 </attribute>
4226
4227 <attribute name="firmwareType" type="FirmwareType">
4228 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
4229 bootstrap in this VM.</desc>
4230 </attribute>
4231
4232 <attribute name="HWVirtExEnabled" type="boolean">
4233 <desc>
4234 This setting determines whether VirtualBox will try to make use of
4235 the host CPU's hardware virtualization extensions such as Intel VT-x
4236 and AMD-V. Note that in case such extensions are not available,
4237 they will not be used.
4238 </desc>
4239 </attribute>
4240
4241 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
4242 <desc>
4243 This setting determines whether VirtualBox will try to make use of
4244 the nested paging extension of Intel VT-x and AMD-V. Note that in case
4245 such extensions are not available, they will not be used.
4246 </desc>
4247 </attribute>
4248
4249 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
4250 <desc>
4251 This setting determines whether VirtualBox will try to make use of
4252 the VPID extension of Intel VT-x. Note that in case such extensions are
4253 not available, they will not be used.
4254 </desc>
4255 </attribute>
4256
4257 <attribute name="PAEEnabled" type="boolean" default="false">
4258 <desc>
4259 This setting determines whether VirtualBox will expose the Physical Address
4260 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
4261 is not available, it will not be reported.
4262 </desc>
4263 </attribute>
4264
4265 <attribute name="snapshotFolder" type="wstring">
4266 <desc>
4267 Full path to the directory used to store snapshot data
4268 (differencing media and saved state files) of this machine.
4269
4270 The initial value of this property is
4271 <tt>&lt;</tt><link to="#settingsFilePath">
4272 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4273 <link to="#id">machine_uuid</link>
4274 <tt>&gt;</tt>.
4275
4276 Currently, it is an error to try to change this property on
4277 a machine that has snapshots (because this would require to
4278 move possibly large files to a different location).
4279 A separate method will be available for this purpose later.
4280
4281 <note>
4282 Setting this property to @c null or to an empty string will restore
4283 the initial value.
4284 </note>
4285 <note>
4286 When setting this property, the specified path can be
4287 absolute (full path) or relative to the directory where the
4288 <link to="#settingsFilePath">machine settings file</link>
4289 is located. When reading this property, a full path is
4290 always returned.
4291 </note>
4292 <note>
4293 The specified path may not exist, it will be created
4294 when necessary.
4295 </note>
4296 </desc>
4297 </attribute>
4298
4299 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4300 <desc>VRDP server object.</desc>
4301 </attribute>
4302
4303 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
4304 <desc>Array of media attached to this machine.</desc>
4305 </attribute>
4306
4307 <attribute name="USBController" type="IUSBController" readonly="yes">
4308 <desc>
4309 Associated USB controller object.
4310
4311 <note>
4312 If USB functionality is not available in the given edition of
4313 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4314 </note>
4315 </desc>
4316 </attribute>
4317
4318 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4319 <desc>Associated audio adapter, always present.</desc>
4320 </attribute>
4321
4322 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4323 <desc>Array of storage controllers attached to this machine.</desc>
4324 </attribute>
4325
4326 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4327 <desc>
4328 Full name of the file containing machine settings data.
4329 </desc>
4330 </attribute>
4331
4332 <attribute name="settingsModified" type="boolean" readonly="yes">
4333 <desc>
4334 Whether the settings of this machine have been modified
4335 (but neither yet saved nor discarded).
4336 <note>
4337 Reading this property is only valid on instances returned
4338 by <link to="ISession::machine"/> and on new machines
4339 created by <link to="IVirtualBox::createMachine"/> or opened
4340 by <link to="IVirtualBox::openMachine"/> but not
4341 yet registered, or on unregistered machines after calling
4342 <link to="IVirtualBox::unregisterMachine"/>. For all other
4343 cases, the settings can never be modified.
4344 </note>
4345 <note>
4346 For newly created unregistered machines, the value of this
4347 property is always @c true until <link to="#saveSettings"/>
4348 is called (no matter if any machine settings have been
4349 changed after the creation or not). For opened machines
4350 the value is set to @c false (and then follows to normal rules).
4351 </note>
4352 </desc>
4353 </attribute>
4354
4355 <attribute name="sessionState" type="SessionState" readonly="yes">
4356 <desc>Current session state for this machine.</desc>
4357 </attribute>
4358
4359 <attribute name="sessionType" type="wstring" readonly="yes">
4360 <desc>
4361 Type of the session. If <link to="#sessionState"/> is
4362 SessionSpawning or SessionOpen, this attribute contains the
4363 same value as passed to the
4364 <link to="IVirtualBox::openRemoteSession"/> method in the
4365 @a type parameter. If the session was opened directly using
4366 <link to="IVirtualBox::openSession"/>, or if
4367 <link to="#sessionState"/> is SessionClosed, the value of this
4368 attribute is an empty string.
4369 </desc>
4370 </attribute>
4371
4372 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4373 <desc>
4374 Identifier of the session process. This attribute contains the
4375 platform-dependent identifier of the process that has opened a
4376 direct session for this machine using the
4377 <link to="IVirtualBox::openSession"/> call. The returned value
4378 is only valid if <link to="#sessionState"/> is SessionOpen or
4379 SessionClosing (i.e. a session is currently open or being
4380 closed) by the time this property is read.
4381 </desc>
4382 </attribute>
4383
4384 <attribute name="state" type="MachineState" readonly="yes">
4385 <desc>Current execution state of this machine.</desc>
4386 </attribute>
4387
4388 <attribute name="lastStateChange" type="long long" readonly="yes">
4389 <desc>
4390 Time stamp of the last execution state change,
4391 in milliseconds since 1970-01-01 UTC.
4392 </desc>
4393 </attribute>
4394
4395 <attribute name="stateFilePath" type="wstring" readonly="yes">
4396 <desc>
4397 Full path to the file that stores the execution state of
4398 the machine when it is in the <link to="MachineState_Saved"/> state.
4399 <note>
4400 When the machine is not in the Saved state, this attribute is
4401 an empty string.
4402 </note>
4403 </desc>
4404 </attribute>
4405
4406 <attribute name="logFolder" type="wstring" readonly="yes">
4407 <desc>
4408 Full path to the folder that stores a set of rotated log files
4409 recorded during machine execution. The most recent log file is
4410 named <tt>VBox.log</tt>, the previous log file is
4411 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4412 in the current version).
4413 </desc>
4414 </attribute>
4415
4416 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4417 <desc>
4418 Current snapshot of this machine. This is @c null if the machine
4419 currently has no snapshots. Otherwise, this is always the last snapshot
4420 in the current implementation; see <link to="ISnapshot"/> for details.
4421 </desc>
4422 </attribute>
4423
4424 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4425 <desc>
4426 Number of snapshots taken on this machine. Zero means the
4427 machine doesn't have any snapshots.
4428 </desc>
4429 </attribute>
4430
4431 <attribute name="currentStateModified" type="boolean" readonly="yes">
4432 <desc>
4433 Returns @c true if the current state of the machine is not
4434 identical to the state stored in the current snapshot.
4435
4436 The current state is identical to the current snapshot right
4437 after one of the following calls are made:
4438 <ul>
4439 <li><link to="IConsole::discardCurrentState"/> or
4440 <link to="IConsole::discardCurrentSnapshotAndState"/>
4441 </li>
4442 <li><link to="IConsole::takeSnapshot"/> (issued on a
4443 powered off or saved machine, for which
4444 <link to="#settingsModified"/> returns @c false)
4445 </li>
4446 <li><link to="IMachine::setCurrentSnapshot"/>
4447 </li>
4448 </ul>
4449
4450 The current state remains identical until one of the following
4451 happens:
4452 <ul>
4453 <li>settings of the machine are changed</li>
4454 <li>the saved state is discarded</li>
4455 <li>the current snapshot is discarded</li>
4456 <li>an attempt to execute the machine is made</li>
4457 </ul>
4458
4459 <note>
4460 For machines that don't have snapshots, this property is
4461 always @c false.
4462 </note>
4463 </desc>
4464 </attribute>
4465
4466 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4467 <desc>
4468 Collection of shared folders for this machine (permanent shared
4469 folders). These folders are shared automatically at machine startup
4470 and available only to the guest OS installed within this machine.
4471
4472 New shared folders are added to the collection using
4473 <link to="#createSharedFolder"/>. Existing shared folders can be
4474 removed using <link to="#removeSharedFolder"/>.
4475 </desc>
4476 </attribute>
4477
4478 <attribute name="clipboardMode" type="ClipboardMode">
4479 <desc>
4480 Synchronization mode between the host OS clipboard
4481 and the guest OS clipboard.
4482 </desc>
4483 </attribute>
4484
4485 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4486 <desc>
4487 A comma-separated list of simple glob patterns. Changes to guest
4488 properties whose name matches one of the patterns will generate an
4489 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4490 </desc>
4491 </attribute>
4492
4493 <attribute name="liveMigrationTarget" type="boolean">
4494 <desc>
4495 When set to @a true, the virtual machine becomes a live migration
4496 target. This can only set to @a true when the VM is in the @a
4497 PoweredOff state.
4498
4499 This property is automatically set to @a false when the VM is powered
4500 on.
4501 </desc>
4502 </attribute>
4503
4504 <attribute name="liveMigrationPort" type="unsigned long">
4505 <desc>
4506 The TCP port used for live migration. This can only be set when the
4507 VM is in the @a PoweredOff state.
4508
4509 0 means the port is automatically selected and the source machine will
4510 have to be told where to connected after the destination has been
4511 started.
4512 </desc>
4513 </attribute>
4514
4515 <attribute name="liveMigrationPassword" type="wstring">
4516 <desc>
4517 The password the live migration target will check for.
4518 </desc>
4519 </attribute>
4520
4521 <method name="setBootOrder">
4522 <desc>
4523 Puts the given device to the specified position in
4524 the boot order.
4525
4526 To indicate that no device is associated with the given position,
4527 <link to="DeviceType_Null"/> should be used.
4528
4529 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4530
4531 <result name="E_INVALIDARG">
4532 Boot @a position out of range.
4533 </result>
4534 <result name="E_NOTIMPL">
4535 Booting from USB @a device currently not supported.
4536 </result>
4537
4538 </desc>
4539 <param name="position" type="unsigned long" dir="in">
4540 <desc>
4541 Position in the boot order (@c 1 to the total number of
4542 devices the machine can boot from, as returned by
4543 <link to="ISystemProperties::maxBootPosition"/>).
4544 </desc>
4545 </param>
4546 <param name="device" type="DeviceType" dir="in">
4547 <desc>
4548 The type of the device used to boot at the given position.
4549 </desc>
4550 </param>
4551 </method>
4552
4553 <method name="getBootOrder" const="yes">
4554 <desc>
4555 Returns the device type that occupies the specified
4556 position in the boot order.
4557
4558 @todo [remove?]
4559 If the machine can have more than one device of the returned type
4560 (such as hard disks), then a separate method should be used to
4561 retrieve the individual device that occupies the given position.
4562
4563 If here are no devices at the given position, then
4564 <link to="DeviceType_Null"/> is returned.
4565
4566 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4567
4568 <result name="E_INVALIDARG">
4569 Boot @a position out of range.
4570 </result>
4571
4572 </desc>
4573 <param name="position" type="unsigned long" dir="in">
4574 <desc>
4575 Position in the boot order (@c 1 to the total number of
4576 devices the machine can boot from, as returned by
4577 <link to="ISystemProperties::maxBootPosition"/>).
4578 </desc>
4579 </param>
4580 <param name="device" type="DeviceType" dir="return">
4581 <desc>
4582 Device at the given position.
4583 </desc>
4584 </param>
4585 </method>
4586
4587 <method name="attachDevice">
4588 <desc>
4589 Attaches a device and optionally mounts a medium to the given storage
4590 controller (<link to="IStorageController" />, identified by @a name),
4591 at the indicated port and device.
4592
4593 This method is intended for managing storage devices in general (it works
4594 for both fixed and removable media). For storage devices supporting removable
4595 media (such as DVDs and floppies), you can also use <link to="IMedium::mountMedium"/>
4596 for changing the media while the machine is running.
4597
4598 For the IDE bus, the @a controllerPort parameter can be either
4599 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4600 respectively. For each of these, @a device can then be either @c 0 or @c 1,
4601 to specify the master or the slave device, respectively. (In the
4602 default configuration of virtual machines, the secondary master is
4603 used for a CD/DVD drive.)
4604
4605 For an SATA controller, @a controllerPort must be a number ranging
4606 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4607 be a number ranging from @c 0 to @c 15.
4608
4609 For both SCSI and SATA, the @a device parameter is unused and must
4610 be @c 0.
4611
4612 For fixed media such as hard disks, the given medium cannot be NULL. It may
4613 be NULL for removable media such as DVDs and floppies.
4614
4615 After calling this returns successfully, a new instance of
4616 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4617 attachments (<link to="IMachine::mediumAttachments"/>).
4618
4619 The specified device slot must not have another disk attached to it, or
4620 this method will fail.
4621
4622 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4623 information about attaching media.
4624
4625 <note>
4626 You cannot attach a hard disk to a running machine. Also, you cannot
4627 attach a hard disk to a newly created machine until this machine's
4628 settings are saved to disk using <link to="#saveSettings"/>.
4629 </note>
4630 <note>
4631 If the medium is being attached indirectly, a new differencing medium
4632 will implicitly be created for it and attached instead. If the
4633 changes made to the machine settings (including this indirect
4634 attachment) are later cancelled using <link to="#discardSettings"/>,
4635 this implicitly created differencing medium will implicitly
4636 be deleted.
4637 </note>
4638
4639 <result name="E_INVALIDARG">
4640 SATA device, SATA port, IDE port or IDE slot out of range.
4641 </result>
4642 <result name="VBOX_E_INVALID_OBJECT_STATE">
4643 Attempt to attach medium to an unregistered virtual machine.
4644 </result>
4645 <result name="VBOX_E_INVALID_VM_STATE">
4646 Invalid machine state.
4647 </result>
4648 <result name="VBOX_E_OBJECT_IN_USE">
4649 Hard disk already attached to this or another virtual machine.
4650 </result>
4651
4652 </desc>
4653 <param name="name" type="wstring" dir="in">
4654 <desc>Name of the storage controller to attach the device to.</desc>
4655 </param>
4656 <param name="controllerPort" type="long" dir="in">
4657 <desc>Port to attach the device to.</desc>
4658 </param>
4659 <param name="device" type="long" dir="in">
4660 <desc>Device slot in the given port to attach the device to.</desc>
4661 </param>
4662 <param name="type" type="DeviceType" dir="in">
4663 <desc>Device type of the attached device.</desc>
4664 </param>
4665 <param name="id" type="uuid" mod="string" dir="in">
4666 <desc>UUID of the medium to mount. NULL UUID means do not mount any
4667 medium.</desc>
4668 </param>
4669 </method>
4670
4671 <method name="detachDevice">
4672 <desc>
4673 Detaches the device attached to a device slot of the specified bus.
4674
4675 Detaching the device from the virtual machine is deferred. This means
4676 that the medium remains associated with the machine when this method
4677 returns and gets actually de-associated only after a successful
4678 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4679 for more detailed information about attaching media.
4680
4681 <note>
4682 You cannot detach the hard disk from a running machine.
4683 </note>
4684 <note>
4685 Detaching differencing media implicitly created by <link
4686 to="#attachDevice"/> for the indirect attachment using this
4687 method will <b>not</b> implicitly delete them. The
4688 <link to="IMedium::deleteStorage"/> operation should be
4689 explicitly performed by the caller after the medium is successfully
4690 detached and the settings are saved with
4691 <link to="#saveSettings"/>, if it is the desired action.
4692 </note>
4693
4694 <result name="VBOX_E_INVALID_VM_STATE">
4695 Attempt to detach medium from a running virtual machine.
4696 </result>
4697 <result name="VBOX_E_OBJECT_NOT_FOUND">
4698 No medium attached to given slot/bus.
4699 </result>
4700 <result name="VBOX_E_NOT_SUPPORTED">
4701 Hard disk format does not support storage deletion.
4702 </result>
4703
4704 </desc>
4705 <param name="name" type="wstring" dir="in">
4706 <desc>Name of the storage controller to detach the medium from.</desc>
4707 </param>
4708 <param name="controllerPort" type="long" dir="in">
4709 <desc>Port number to detach the medium from.</desc>
4710 </param>
4711 <param name="device" type="long" dir="in">
4712 <desc>Device slot number to detach the medium from.</desc>
4713 </param>
4714 </method>
4715
4716 <method name="mountMedium">
4717 <desc>
4718 Mounts a medium (<link to="IMedium" />, identified
4719 by the given UUID @a id) to the given storage controller
4720 (<link to="IStorageController" />, identified by @a name),
4721 at the indicated port and device. The device must already exist;
4722 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4723
4724 This method is intended only for managing removable media, where the
4725 device is fixed but media is changeable at runtime (such as DVDs
4726 and floppies). It cannot be used for fixed media such as hard disks.
4727
4728 The @a controllerPort and @a device parameters specify the device slot and
4729 have have the same meaning as with <link to="IMachine::attachDevice" />.
4730
4731 The specified device slot can have a medium mounted, which will be
4732 unmounted first. Specifying a NULL medium does just an unmount.
4733
4734 See <link to="IMedium"/> for more detailed information about
4735 attaching media.
4736
4737 <result name="E_INVALIDARG">
4738 SATA device, SATA port, IDE port or IDE slot out of range.
4739 </result>
4740 <result name="VBOX_E_INVALID_OBJECT_STATE">
4741 Attempt to attach medium to an unregistered virtual machine.
4742 </result>
4743 <result name="VBOX_E_INVALID_VM_STATE">
4744 Invalid machine state.
4745 </result>
4746 <result name="VBOX_E_OBJECT_IN_USE">
4747 Medium already attached to this or another virtual machine.
4748 </result>
4749
4750 </desc>
4751 <param name="name" type="wstring" dir="in">
4752 <desc>Name of the storage controller to attach the medium to.</desc>
4753 </param>
4754 <param name="controllerPort" type="long" dir="in">
4755 <desc>Port to attach the medium to.</desc>
4756 </param>
4757 <param name="device" type="long" dir="in">
4758 <desc>Device slot in the given port to attach the medium to.</desc>
4759 </param>
4760 <param name="id" type="uuid" mod="string" dir="in">
4761 <desc>UUID of the medium to attach.</desc>
4762 </param>
4763 </method>
4764
4765 <method name="getMedium" const="yes">
4766 <desc>
4767 Returns the virtual medium attached to a device slot of the specified
4768 bus.
4769
4770 Note that if the medium was indirectly attached by
4771 <link to="#mountMedium"/> to the given device slot then this
4772 method will return not the same object as passed to the
4773 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4774 more detailed information about mounting a medium.
4775
4776 <result name="VBOX_E_OBJECT_NOT_FOUND">
4777 No medium attached to given slot/bus.
4778 </result>
4779
4780 </desc>
4781 <param name="name" type="wstring" dir="in">
4782 <desc>Name of the storage controller the medium is attached to.</desc>
4783 </param>
4784 <param name="controllerPort" type="long" dir="in">
4785 <desc>Port to query.</desc>
4786 </param>
4787 <param name="device" type="long" dir="in">
4788 <desc>Device slot in the given port to query.</desc>
4789 </param>
4790 <param name="medium" type="IMedium" dir="return">
4791 <desc>Attached medium object.</desc>
4792 </param>
4793 </method>
4794
4795 <method name="getMediumAttachmentsOfController" const="yes">
4796 <desc>
4797 Returns an array of medium attachments which are attached to the
4798 the controller with the given name.
4799
4800 <result name="VBOX_E_OBJECT_NOT_FOUND">
4801 A storage controller with given name doesn't exist.
4802 </result>
4803 </desc>
4804 <param name="name" type="wstring" dir="in"/>
4805 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4806 </method>
4807
4808 <method name="getMediumAttachment" const="yes">
4809 <desc>
4810 Returns a medium attachment which corresponds to the controller with
4811 the given name, on the given port and device slot.
4812
4813 <result name="VBOX_E_OBJECT_NOT_FOUND">
4814 No attachment exists for the given controller/port/device combination.
4815 </result>
4816 </desc>
4817 <param name="name" type="wstring" dir="in"/>
4818 <param name="controllerPort" type="long" dir="in"/>
4819 <param name="device" type="long" dir="in"/>
4820 <param name="attachment" type="IMediumAttachment" dir="return"/>
4821 </method>
4822
4823 <method name="getNetworkAdapter" const="yes">
4824 <desc>
4825 Returns the network adapter associated with the given slot.
4826 Slots are numbered sequentially, starting with zero. The total
4827 number of adapters per machine is defined by the
4828 <link to="ISystemProperties::networkAdapterCount"/> property,
4829 so the maximum slot number is one less than that property's value.
4830
4831 <result name="E_INVALIDARG">
4832 Invalid @a slot number.
4833 </result>
4834
4835 </desc>
4836 <param name="slot" type="unsigned long" dir="in"/>
4837 <param name="adapter" type="INetworkAdapter" dir="return"/>
4838 </method>
4839
4840 <method name="addStorageController">
4841 <desc>
4842 Adds a new storage controller (SCSI or SATA controller) to the
4843 machine and returns it as an instance of
4844 <link to="IStorageController" />.
4845
4846 @a name identifies the controller for subsequent calls such as
4847 <link to="#getStorageControllerByName" />,
4848 <link to="#removeStorageController" />,
4849 <link to="#attachDevice" /> or <link to="#mountMedium" />.
4850
4851 After the controller has been added, you can set its exact
4852 type by setting the <link to="IStorageController::controllerType" />.
4853
4854 <result name="VBOX_E_OBJECT_IN_USE">
4855 A storage controller with given name exists already.
4856 </result>
4857 <result name="E_INVALIDARG">
4858 Invalid @a controllerType.
4859 </result>
4860 </desc>
4861 <param name="name" type="wstring" dir="in"/>
4862 <param name="connectionType" type="StorageBus" dir="in"/>
4863 <param name="controller" type="IStorageController" dir="return"/>
4864 </method>
4865
4866 <method name="getStorageControllerByName" const="yes">
4867 <desc>
4868 Returns a storage controller with the given name.
4869
4870 <result name="VBOX_E_OBJECT_NOT_FOUND">
4871 A storage controller with given name doesn't exist.
4872 </result>
4873 </desc>
4874 <param name="name" type="wstring" dir="in"/>
4875 <param name="storageController" type="IStorageController" dir="return"/>
4876 </method>
4877
4878 <method name="removeStorageController">
4879 <desc>
4880 Removes a storage controller from the machine.
4881
4882 <result name="VBOX_E_OBJECT_NOT_FOUND">
4883 A storage controller with given name doesn't exist.
4884 </result>
4885 </desc>
4886 <param name="name" type="wstring" dir="in"/>
4887 </method>
4888
4889 <method name="getSerialPort" const="yes">
4890 <desc>
4891 Returns the serial port associated with the given slot.
4892 Slots are numbered sequentially, starting with zero. The total
4893 number of serial ports per machine is defined by the
4894 <link to="ISystemProperties::serialPortCount"/> property,
4895 so the maximum slot number is one less than that property's value.
4896
4897 <result name="E_INVALIDARG">
4898 Invalid @a slot number.
4899 </result>
4900
4901 </desc>
4902 <param name="slot" type="unsigned long" dir="in"/>
4903 <param name="port" type="ISerialPort" dir="return"/>
4904 </method>
4905
4906 <method name="getParallelPort" const="yes">
4907 <desc>
4908 Returns the parallel port associated with the given slot.
4909 Slots are numbered sequentially, starting with zero. The total
4910 number of parallel ports per machine is defined by the
4911 <link to="ISystemProperties::parallelPortCount"/> property,
4912 so the maximum slot number is one less than that property's value.
4913
4914 <result name="E_INVALIDARG">
4915 Invalid @a slot number.
4916 </result>
4917
4918 </desc>
4919 <param name="slot" type="unsigned long" dir="in"/>
4920 <param name="port" type="IParallelPort" dir="return"/>
4921 </method>
4922
4923 <method name="getExtraDataKeys">
4924 <desc>
4925 Returns an array representing the machine-specific extra data keys
4926 which currently have values defined.
4927 </desc>
4928 <param name="value" type="wstring" dir="return" safearray="yes">
4929 <desc>Array of extra data keys.</desc>
4930 </param>
4931 </method>
4932
4933 <method name="getExtraData">
4934 <desc>
4935 Returns associated machine-specific extra data.
4936
4937 If the requested data @a key does not exist, this function will
4938 succeed and return an empty string in the @a value argument.
4939
4940 <result name="VBOX_E_FILE_ERROR">
4941 Settings file not accessible.
4942 </result>
4943 <result name="VBOX_E_XML_ERROR">
4944 Could not parse the settings file.
4945 </result>
4946
4947 </desc>
4948 <param name="key" type="wstring" dir="in">
4949 <desc>Name of the data key to get.</desc>
4950 </param>
4951 <param name="value" type="wstring" dir="return">
4952 <desc>Value of the requested data key.</desc>
4953 </param>
4954 </method>
4955
4956 <method name="setExtraData">
4957 <desc>
4958 Sets associated machine-specific extra data.
4959
4960 If you pass @c null or an empty string as a key @a value, the given
4961 @a key will be deleted.
4962
4963 <note>
4964 Before performing the actual data change, this method will ask all
4965 registered callbacks using the
4966 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
4967 notification for a permission. If one of the callbacks refuses the
4968 new value, the change will not be performed.
4969 </note>
4970 <note>
4971 On success, the
4972 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
4973 is called to inform all registered callbacks about a successful data
4974 change.
4975 </note>
4976 <note>
4977 This method can be called outside the machine session and therefore
4978 it's a caller's responsibility to handle possible race conditions
4979 when several clients change the same key at the same time.
4980 </note>
4981
4982 <result name="VBOX_E_FILE_ERROR">
4983 Settings file not accessible.
4984 </result>
4985 <result name="VBOX_E_XML_ERROR">
4986 Could not parse the settings file.
4987 </result>
4988
4989 </desc>
4990 <param name="key" type="wstring" dir="in">
4991 <desc>Name of the data key to set.</desc>
4992 </param>
4993 <param name="value" type="wstring" dir="in">
4994 <desc>Value to assign to the key.</desc>
4995 </param>
4996 </method>
4997
4998 <method name="saveSettings">
4999 <desc>
5000 Saves any changes to machine settings made since the session
5001 has been opened or a new machine has been created, or since the
5002 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
5003 For registered machines, new settings become visible to all
5004 other VirtualBox clients after successful invocation of this
5005 method.
5006 <note>
5007 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
5008 notification event after the configuration has been successfully
5009 saved (only for registered machines).
5010 </note>
5011 <note>
5012 Calling this method is only valid on instances returned
5013 by <link to="ISession::machine"/> and on new machines
5014 created by <link to="IVirtualBox::createMachine"/> but not
5015 yet registered, or on unregistered machines after calling
5016 <link to="IVirtualBox::unregisterMachine"/>.
5017 </note>
5018
5019 <result name="VBOX_E_FILE_ERROR">
5020 Settings file not accessible.
5021 </result>
5022 <result name="VBOX_E_XML_ERROR">
5023 Could not parse the settings file.
5024 </result>
5025 <result name="E_ACCESSDENIED">
5026 Modification request refused.
5027 </result>
5028
5029 </desc>
5030 </method>
5031
5032 <method name="discardSettings">
5033 <desc>
5034 Discards any changes to the machine settings made since the session
5035 has been opened or since the last call to <link to="#saveSettings"/>
5036 or <link to="#discardSettings"/>.
5037 <note>
5038 Calling this method is only valid on instances returned
5039 by <link to="ISession::machine"/> and on new machines
5040 created by <link to="IVirtualBox::createMachine"/> or
5041 opened by <link to="IVirtualBox::openMachine"/> but not
5042 yet registered, or on unregistered machines after calling
5043 <link to="IVirtualBox::unregisterMachine"/>.
5044 </note>
5045
5046 <result name="VBOX_E_INVALID_VM_STATE">
5047 Virtual machine is not mutable.
5048 </result>
5049
5050 </desc>
5051 </method>
5052
5053 <method name="deleteSettings">
5054 <desc>
5055 Deletes the settings file of this machine from disk.
5056 The machine must not be registered in order for this operation
5057 to succeed.
5058 <note>
5059 <link to="#settingsModified"/> will return @c true after this
5060 method successfully returns.
5061 </note>
5062 <note>
5063 Calling this method is only valid on instances returned
5064 by <link to="ISession::machine"/> and on new machines
5065 created by <link to="IVirtualBox::createMachine"/> or
5066 opened by <link to="IVirtualBox::openMachine"/> but not
5067 yet registered, or on unregistered machines after calling
5068 <link to="IVirtualBox::unregisterMachine"/>.
5069 </note>
5070 <note>
5071 The deleted machine settings file can be restored (saved again)
5072 by calling <link to="#saveSettings"/>.
5073 </note>
5074
5075 <result name="VBOX_E_INVALID_VM_STATE">
5076 Cannot delete settings of a registered machine or
5077 machine not mutable.
5078 </result>
5079 <result name="VBOX_E_IPRT_ERROR">
5080 Could not delete the settings file.
5081 </result>
5082
5083 </desc>
5084 </method>
5085
5086 <method name="export">
5087 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5088 steps required to export VirtualBox machines to OVF.
5089 </desc>
5090
5091 <param name="aAppliance" type="IAppliance" dir="in">
5092 <desc>Appliance to export this machine to.</desc>
5093 </param>
5094 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5095 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5096 </param>
5097 </method >
5098
5099 <method name="getSnapshot">
5100 <desc>
5101 Returns a snapshot of this machine with the given UUID.
5102 A @c null UUID can be used to obtain the first snapshot
5103 taken on this machine. This is useful if you want to traverse
5104 the whole tree of snapshots starting from the root.
5105
5106 <result name="VBOX_E_OBJECT_NOT_FOUND">
5107 Virtual machine has no snapshots or snapshot not found.
5108 </result>
5109
5110 </desc>
5111 <param name="id" type="uuid" mod="string" dir="in">
5112 <desc>UUID of the snapshot to get</desc>
5113 </param>
5114 <param name="snapshot" type="ISnapshot" dir="return">
5115 <desc>Snapshot object with the given UUID.</desc>
5116 </param>
5117 </method>
5118
5119 <method name="findSnapshot">
5120 <desc>
5121 Returns a snapshot of this machine with the given name.
5122
5123 <result name="VBOX_E_OBJECT_NOT_FOUND">
5124 Virtual machine has no snapshots or snapshot not found.
5125 </result>
5126
5127 </desc>
5128 <param name="name" type="wstring" dir="in">
5129 <desc>Name of the snapshot to find</desc>
5130 </param>
5131 <param name="snapshot" type="ISnapshot" dir="return">
5132 <desc>Snapshot object with the given name.</desc>
5133 </param>
5134 </method>
5135
5136 <method name="setCurrentSnapshot">
5137 <desc>
5138 Sets the current snapshot of this machine.
5139 <note>
5140 In the current implementation, this operation is not
5141 implemented.
5142 </note>
5143 </desc>
5144 <param name="id" type="uuid" mod="string" dir="in">
5145 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5146 </param>
5147 </method>
5148
5149 <method name="createSharedFolder">
5150 <desc>
5151 Creates a new permanent shared folder by associating the given logical
5152 name with the given host path, adds it to the collection of shared
5153 folders and starts sharing it. Refer to the description of
5154 <link to="ISharedFolder"/> to read more about logical names.
5155
5156 <result name="VBOX_E_OBJECT_IN_USE">
5157 Shared folder already exists.
5158 </result>
5159 <result name="VBOX_E_FILE_ERROR">
5160 Shared folder @a hostPath not accessible.
5161 </result>
5162
5163 </desc>
5164 <param name="name" type="wstring" dir="in">
5165 <desc>Unique logical name of the shared folder.</desc>
5166 </param>
5167 <param name="hostPath" type="wstring" dir="in">
5168 <desc>Full path to the shared folder in the host file system.</desc>
5169 </param>
5170 <param name="writable" type="boolean" dir="in">
5171 <desc>Whether the share is writable or readonly</desc>
5172 </param>
5173 </method>
5174
5175 <method name="removeSharedFolder">
5176 <desc>
5177 Removes the permanent shared folder with the given name previously
5178 created by <link to="#createSharedFolder"/> from the collection of
5179 shared folders and stops sharing it.
5180
5181 <result name="VBOX_E_INVALID_VM_STATE">
5182 Virtual machine is not mutable.
5183 </result>
5184 <result name="VBOX_E_OBJECT_NOT_FOUND">
5185 Shared folder @a name does not exist.
5186 </result>
5187
5188 </desc>
5189 <param name="name" type="wstring" dir="in">
5190 <desc>Logical name of the shared folder to remove.</desc>
5191 </param>
5192 </method>
5193
5194 <method name="canShowConsoleWindow">
5195 <desc>
5196 Returns @c true if the VM console process can activate the
5197 console window and bring it to foreground on the desktop of
5198 the host PC.
5199 <note>
5200 This method will fail if a session for this machine is not
5201 currently open.
5202 </note>
5203
5204 <result name="VBOX_E_INVALID_VM_STATE">
5205 Machine session is not open.
5206 </result>
5207
5208 </desc>
5209 <param name="canShow" type="boolean" dir="return">
5210 <desc>
5211 @c true if the console window can be shown and @c false otherwise.
5212 </desc>
5213 </param>
5214 </method>
5215
5216 <method name="showConsoleWindow">
5217 <desc>
5218 Activates the console window and brings it to foreground on
5219 the desktop of the host PC. Many modern window managers on
5220 many platforms implement some sort of focus stealing
5221 prevention logic, so that it may be impossible to activate
5222 a window without the help of the currently active
5223 application. In this case, this method will return a non-zero
5224 identifier that represents the top-level window of the VM
5225 console process. The caller, if it represents a currently
5226 active process, is responsible to use this identifier (in a
5227 platform-dependent manner) to perform actual window
5228 activation.
5229 <note>
5230 This method will fail if a session for this machine is not
5231 currently open.
5232 </note>
5233
5234 <result name="VBOX_E_INVALID_VM_STATE">
5235 Machine session is not open.
5236 </result>
5237
5238 </desc>
5239 <param name="winId" type="unsigned long long" dir="return">
5240 <desc>
5241 Platform-dependent identifier of the top-level VM console
5242 window, or zero if this method has performed all actions
5243 necessary to implement the <i>show window</i> semantics for
5244 the given platform and/or VirtualBox front-end.
5245 </desc>
5246 </param>
5247 </method>
5248
5249 <method name="getGuestProperty">
5250 <desc>
5251 Reads an entry from the machine's guest property store.
5252
5253 <result name="VBOX_E_INVALID_VM_STATE">
5254 Machine session is not open.
5255 </result>
5256
5257 </desc>
5258 <param name="name" type="wstring" dir="in">
5259 <desc>
5260 The name of the property to read.
5261 </desc>
5262 </param>
5263 <param name="value" type="wstring" dir="out">
5264 <desc>
5265 The value of the property. If the property does not exist then this
5266 will be empty.
5267 </desc>
5268 </param>
5269 <param name="timestamp" type="unsigned long long" dir="out">
5270 <desc>
5271 The time at which the property was last modified, as seen by the
5272 server process.
5273 </desc>
5274 </param>
5275 <param name="flags" type="wstring" dir="out">
5276 <desc>
5277 Additional property parameters, passed as a comma-separated list of
5278 "name=value" type entries.
5279 </desc>
5280 </param>
5281 </method>
5282
5283 <method name="getGuestPropertyValue">
5284 <desc>
5285 Reads a value from the machine's guest property store.
5286
5287 <result name="VBOX_E_INVALID_VM_STATE">
5288 Machine session is not open.
5289 </result>
5290
5291 </desc>
5292 <param name="property" type="wstring" dir="in">
5293 <desc>
5294 The name of the property to read.
5295 </desc>
5296 </param>
5297 <param name="value" type="wstring" dir="return">
5298 <desc>
5299 The value of the property. If the property does not exist then this
5300 will be empty.
5301 </desc>
5302 </param>
5303 </method>
5304
5305 <method name="getGuestPropertyTimestamp">
5306 <desc>
5307 Reads a property timestamp from the machine's guest property store.
5308
5309 <result name="VBOX_E_INVALID_VM_STATE">
5310 Machine session is not open.
5311 </result>
5312
5313 </desc>
5314 <param name="property" type="wstring" dir="in">
5315 <desc>
5316 The name of the property to read.
5317 </desc>
5318 </param>
5319 <param name="value" type="unsigned long long" dir="return">
5320 <desc>
5321 The timestamp. If the property does not exist then this will be
5322 empty.
5323 </desc>
5324 </param>
5325 </method>
5326
5327 <method name="setGuestProperty">
5328 <desc>
5329 Sets, changes or deletes an entry in the machine's guest property
5330 store.
5331
5332 <result name="E_ACCESSDENIED">
5333 Property cannot be changed.
5334 </result>
5335 <result name="E_INVALIDARG">
5336 Invalid @a flags.
5337 </result>
5338 <result name="VBOX_E_INVALID_VM_STATE">
5339 Virtual machine is not mutable or session not open.
5340 </result>
5341 <result name="VBOX_E_INVALID_OBJECT_STATE">
5342 Cannot set transient property when machine not running.
5343 </result>
5344
5345 </desc>
5346 <param name="property" type="wstring" dir="in">
5347 <desc>
5348 The name of the property to set, change or delete.
5349 </desc>
5350 </param>
5351 <param name="value" type="wstring" dir="in">
5352 <desc>
5353 The new value of the property to set, change or delete. If the
5354 property does not yet exist and value is non-empty, it will be
5355 created. If the value is @c null or empty, the property will be
5356 deleted if it exists.
5357 </desc>
5358 </param>
5359 <param name="flags" type="wstring" dir="in">
5360 <desc>
5361 Additional property parameters, passed as a comma-separated list of
5362 "name=value" type entries.
5363 </desc>
5364 </param>
5365 </method>
5366
5367 <method name="setGuestPropertyValue">
5368 <desc>
5369 Sets, changes or deletes a value in the machine's guest property
5370 store. The flags field will be left unchanged or created empty for a
5371 new property.
5372
5373 <result name="E_ACCESSDENIED">
5374 Property cannot be changed.
5375 </result>
5376 <result name="VBOX_E_INVALID_VM_STATE">
5377 Virtual machine is not mutable or session not open.
5378 </result>
5379 <result name="VBOX_E_INVALID_OBJECT_STATE">
5380 Cannot set transient property when machine not running.
5381 </result>
5382 </desc>
5383
5384 <param name="property" type="wstring" dir="in">
5385 <desc>
5386 The name of the property to set, change or delete.
5387 </desc>
5388 </param>
5389 <param name="value" type="wstring" dir="in">
5390 <desc>
5391 The new value of the property to set, change or delete. If the
5392 property does not yet exist and value is non-empty, it will be
5393 created. If the value is @c null or empty, the property will be
5394 deleted if it exists.
5395 </desc>
5396 </param>
5397 </method>
5398
5399 <method name="enumerateGuestProperties">
5400 <desc>
5401 Return a list of the guest properties matching a set of patterns along
5402 with their values, time stamps and flags.
5403 </desc>
5404 <param name="patterns" type="wstring" dir="in">
5405 <desc>
5406 The patterns to match the properties against, separated by '|'
5407 characters. If this is empty or @c null, all properties will match.
5408 </desc>
5409 </param>
5410 <param name="name" type="wstring" dir="out" safearray="yes">
5411 <desc>
5412 The names of the properties returned.
5413 </desc>
5414 </param>
5415 <param name="value" type="wstring" dir="out" safearray="yes">
5416 <desc>
5417 The values of the properties returned. The array entries match the
5418 corresponding entries in the @a name array.
5419 </desc>
5420 </param>
5421 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5422 <desc>
5423 The time stamps of the properties returned. The array entries match
5424 the corresponding entries in the @a name array.
5425 </desc>
5426 </param>
5427 <param name="flags" type="wstring" dir="out" safearray="yes">
5428 <desc>
5429 The flags of the properties returned. The array entries match the
5430 corresponding entries in the @a name array.
5431 </desc>
5432 </param>
5433 </method>
5434</interface>
5435
5436 <!--
5437 // IConsole
5438 /////////////////////////////////////////////////////////////////////////
5439 -->
5440
5441 <interface
5442 name="IConsoleCallback" extends="$unknown"
5443 uuid="db67f6e5-799d-474c-8452-b10d7736a412"
5444 wsmap="suppress"
5445 >
5446
5447 <desc>
5448 This interface is used by a client of the Main API that need to
5449 be notified of events. For example, a graphical user interface
5450 can use this to learn about machine state changes so they can
5451 update the list of virtual machines without having to rely
5452 on polling.
5453
5454 Whenever relevant events occur in VirtualBox, the callbacks in
5455 objects of this interface are called. In order for this to be
5456 useful, a client needs to create its own subclass that implements
5457 this interface in which the methods for the relevant callbacks
5458 are overridden. An instance of this subclass interface can then
5459 be passed to <link to="IConsole::registerCallback" />.
5460 </desc>
5461
5462 <method name="onMousePointerShapeChange">
5463 <desc>
5464 Notification when the guest mouse pointer shape has
5465 changed. The new shape data is given.
5466 </desc>
5467 <param name="visible" type="boolean" dir="in">
5468 <desc>
5469 Flag whether the pointer is visible.
5470 </desc>
5471 </param>
5472 <param name="alpha" type="boolean" dir="in">
5473 <desc>
5474 Flag whether the pointer has an alpha channel.
5475 </desc>
5476 </param>
5477 <param name="xHot" type="unsigned long" dir="in">
5478 <desc>
5479 The pointer hot spot x coordinate.
5480 </desc>
5481 </param>
5482 <param name="yHot" type="unsigned long" dir="in">
5483 <desc>
5484 The pointer hot spot y coordinate.
5485 </desc>
5486 </param>
5487 <param name="width" type="unsigned long" dir="in">
5488 <desc>
5489 Width of the pointer shape in pixels.
5490 </desc>
5491 </param>
5492 <param name="height" type="unsigned long" dir="in">
5493 <desc>
5494 Height of the pointer shape in pixels.
5495 </desc>
5496 </param>
5497 <param name="shape" type="octet" mod="ptr" dir="in">
5498 <desc>
5499 Address of the shape buffer.
5500
5501 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5502 followed by a 32-bpp XOR (color) mask.
5503
5504 For pointers without alpha channel the XOR mask pixels are 32
5505 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5506 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5507
5508 An AND mask is used for pointers with alpha channel, so if the
5509 callback does not support alpha, the pointer could be
5510 displayed as a normal color pointer.
5511
5512 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5513 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5514 height</tt>. The padding bits at the end of each scanline are
5515 undefined.
5516
5517 The XOR mask follows the AND mask on the next 4-byte aligned
5518 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5519 Bytes in the gap between the AND and the XOR mask are undefined.
5520 The XOR mask scanlines have no gap between them and the size of
5521 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5522
5523 <note>
5524 If @a shape is 0, only the pointer visibility is changed.
5525 </note>
5526 </desc>
5527 </param>
5528 </method>
5529
5530 <method name="onMouseCapabilityChange">
5531 <desc>
5532 Notification when the mouse capabilities reported by the
5533 guest have changed. The new capabilities are passed.
5534 </desc>
5535 <param name="supportsAbsolute" type="boolean" dir="in"/>
5536 <param name="needsHostCursor" type="boolean" dir="in"/>
5537 </method>
5538
5539 <method name="onKeyboardLedsChange">
5540 <desc>
5541 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5542 to alter the state of the keyboard LEDs.
5543 </desc>
5544 <param name="numLock" type="boolean" dir="in"/>
5545 <param name="capsLock" type="boolean" dir="in"/>
5546 <param name="scrollLock" type="boolean" dir="in"/>
5547 </method>
5548
5549 <method name="onStateChange">
5550 <desc>
5551 Notification when the execution state of the machine has changed.
5552 The new state will be given.
5553 </desc>
5554 <param name="state" type="MachineState" dir="in"/>
5555 </method>
5556
5557 <method name="onAdditionsStateChange">
5558 <desc>
5559 Notification when a Guest Additions property changes.
5560 Interested callees should query IGuest attributes to
5561 find out what has changed.
5562 </desc>
5563 </method>
5564
5565 <method name="onNetworkAdapterChange">
5566 <desc>
5567 Notification when a property of one of the
5568 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5569 changes. Interested callees should use INetworkAdapter methods and
5570 attributes to find out what has changed.
5571 </desc>
5572 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5573 <desc>Network adapter that is subject to change.</desc>
5574 </param>
5575 </method>
5576
5577 <method name="onSerialPortChange">
5578 <desc>
5579 Notification when a property of one of the
5580 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5581 Interested callees should use ISerialPort methods and attributes
5582 to find out what has changed.
5583 </desc>
5584 <param name="serialPort" type="ISerialPort" dir="in">
5585 <desc>Serial port that is subject to change.</desc>
5586 </param>
5587 </method>
5588
5589 <method name="onParallelPortChange">
5590 <desc>
5591 Notification when a property of one of the
5592 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5593 changes. Interested callees should use ISerialPort methods and
5594 attributes to find out what has changed.
5595 </desc>
5596 <param name="parallelPort" type="IParallelPort" dir="in">
5597 <desc>Parallel port that is subject to change.</desc>
5598 </param>
5599 </method>
5600
5601 <method name="onStorageControllerChange">
5602 <desc>
5603 Notification when a property of one of the
5604 virtual <link to="IMachine::storageControllers">storage controllers</link>
5605 changes. Interested callees should query the corresponding collections
5606 to find out what has changed.
5607 </desc>
5608 </method>
5609
5610 <method name="onMediumChange">
5611 <desc>
5612 Notification when a
5613 <link to="IMachine::mediumAttachments">medium attachment</link>
5614 changes.
5615 </desc>
5616 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
5617 <desc>Medium attachment that is subject to change.</desc>
5618 </param>
5619 </method>
5620
5621 <method name="onVRDPServerChange">
5622 <desc>
5623 Notification when a property of the
5624 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5625 Interested callees should use IVRDPServer methods and attributes to
5626 find out what has changed.
5627 </desc>
5628 </method>
5629
5630 <method name="onUSBControllerChange">
5631 <desc>
5632 Notification when a property of the virtual
5633 <link to="IMachine::USBController">USB controller</link> changes.
5634 Interested callees should use IUSBController methods and attributes to
5635 find out what has changed.
5636 </desc>
5637 </method>
5638
5639 <method name="onUSBDeviceStateChange">
5640 <desc>
5641 Notification when a USB device is attached to or detached from
5642 the virtual USB controller.
5643
5644 This notification is sent as a result of the indirect
5645 request to attach the device because it matches one of the
5646 machine USB filters, or as a result of the direct request
5647 issued by <link to="IConsole::attachUSBDevice"/> or
5648 <link to="IConsole::detachUSBDevice"/>.
5649
5650 This notification is sent in case of both a succeeded and a
5651 failed request completion. When the request succeeds, the
5652 @a error parameter is @c null, and the given device has been
5653 already added to (when @a attached is @c true) or removed from
5654 (when @a attached is @c false) the collection represented by
5655 <link to="IConsole::USBDevices"/>. On failure, the collection
5656 doesn't change and the @a error parameter represents the error
5657 message describing the failure.
5658
5659 </desc>
5660 <param name="device" type="IUSBDevice" dir="in">
5661 <desc>Device that is subject to state change.</desc>
5662 </param>
5663 <param name="attached" type="boolean" dir="in">
5664 <desc>
5665 @c true if the device was attached and @c false otherwise.
5666 </desc>
5667 </param>
5668 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5669 <desc>
5670 @c null on success or an error message object on failure.
5671 </desc>
5672 </param>
5673 </method>
5674
5675 <method name="onSharedFolderChange">
5676 <desc>
5677 Notification when a shared folder is added or removed.
5678 The @a scope argument defines one of three scopes:
5679 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5680 (<link to="Scope_Global">Global</link>),
5681 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5682 the machine (<link to="Scope_Machine">Machine</link>) or <link
5683 to="IConsole::sharedFolders">transient shared folders</link> of the
5684 machine (<link to="Scope_Session">Session</link>). Interested callees
5685 should use query the corresponding collections to find out what has
5686 changed.
5687 </desc>
5688 <param name="scope" type="Scope" dir="in">
5689 <desc>Scope of the notification.</desc>
5690 </param>
5691 </method>
5692
5693 <method name="onRuntimeError">
5694 <desc>
5695 Notification when an error happens during the virtual
5696 machine execution.
5697
5698 There are three kinds of runtime errors:
5699 <ul>
5700 <li><i>fatal</i></li>
5701 <li><i>non-fatal with retry</i></li>
5702 <li><i>non-fatal warnings</i></li>
5703 </ul>
5704
5705 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5706 to @c true. In case of fatal errors, the virtual machine
5707 execution is always paused before calling this notification, and
5708 the notification handler is supposed either to immediately save
5709 the virtual machine state using <link to="IConsole::saveState"/>
5710 or power it off using <link to="IConsole::powerDown"/>.
5711 Resuming the execution can lead to unpredictable results.
5712
5713 <b>Non-fatal</b> errors and warnings are indicated by the
5714 @a fatal parameter set to @c false. If the virtual machine
5715 is in the Paused state by the time the error notification is
5716 received, it means that the user can <i>try to resume</i> the machine
5717 execution after attempting to solve the problem that caused the
5718 error. In this case, the notification handler is supposed
5719 to show an appropriate message to the user (depending on the
5720 value of the @a id parameter) that offers several actions such
5721 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5722 wants to retry, the notification handler should continue
5723 the machine execution using the <link to="IConsole::resume"/>
5724 call. If the machine execution is not Paused during this
5725 notification, then it means this notification is a <i>warning</i>
5726 (for example, about a fatal condition that can happen very soon);
5727 no immediate action is required from the user, the machine
5728 continues its normal execution.
5729
5730 Note that in either case the notification handler
5731 <b>must not</b> perform any action directly on a thread
5732 where this notification is called. Everything it is allowed to
5733 do is to post a message to another thread that will then talk
5734 to the user and take the corresponding action.
5735
5736 Currently, the following error identifiers are known:
5737 <ul>
5738 <li><tt>"HostMemoryLow"</tt></li>
5739 <li><tt>"HostAudioNotResponding"</tt></li>
5740 <li><tt>"VDIStorageFull"</tt></li>
5741 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
5742 </ul>
5743
5744 <note>
5745 This notification is not designed to be implemented by
5746 more than one callback at a time. If you have multiple
5747 IConsoleCallback instances registered on the given
5748 IConsole object, make sure you simply do nothing but
5749 return @c S_OK from all but one of them that does actual
5750 user notification and performs necessary actions.
5751 </note>
5752
5753 </desc>
5754 <param name="fatal" type="boolean" dir="in">
5755 <desc>Whether the error is fatal or not</desc>
5756 </param>
5757 <param name="id" type="wstring" dir="in">
5758 <desc>Error identifier</desc>
5759 </param>
5760 <param name="message" type="wstring" dir="in">
5761 <desc>Optional error message</desc>
5762 </param>
5763 </method>
5764
5765 <method name="onCanShowWindow">
5766 <desc>
5767 Notification when a call to
5768 <link to="IMachine::canShowConsoleWindow"/> is made by a
5769 front-end to check if a subsequent call to
5770 <link to="IMachine::showConsoleWindow"/> can succeed.
5771
5772 The callee should give an answer appropriate to the current
5773 machine state in the @a canShow argument. This answer must
5774 remain valid at least until the next
5775 <link to="IConsole::state">machine state</link> change.
5776
5777 <note>
5778 This notification is not designed to be implemented by
5779 more than one callback at a time. If you have multiple
5780 IConsoleCallback instances registered on the given
5781 IConsole object, make sure you simply do nothing but
5782 return @c true and @c S_OK from all but one of them that
5783 actually manages console window activation.
5784 </note>
5785 </desc>
5786 <param name="canShow" type="boolean" dir="return">
5787 <desc>
5788 @c true if the console window can be shown and @c false otherwise.
5789 </desc>
5790 </param>
5791 </method>
5792
5793 <method name="onShowWindow">
5794 <desc>
5795 Notification when a call to
5796 <link to="IMachine::showConsoleWindow"/>
5797 requests the console window to be activated and brought to
5798 foreground on the desktop of the host PC.
5799
5800 This notification should cause the VM console process to
5801 perform the requested action as described above. If it is
5802 impossible to do it at a time of this notification, this
5803 method should return a failure.
5804
5805 Note that many modern window managers on many platforms
5806 implement some sort of focus stealing prevention logic, so
5807 that it may be impossible to activate a window without the
5808 help of the currently active application (which is supposedly
5809 an initiator of this notification). In this case, this method
5810 must return a non-zero identifier that represents the
5811 top-level window of the VM console process. The caller, if it
5812 represents a currently active process, is responsible to use
5813 this identifier (in a platform-dependent manner) to perform
5814 actual window activation.
5815
5816 This method must set @a winId to zero if it has performed all
5817 actions necessary to complete the request and the console
5818 window is now active and in foreground, to indicate that no
5819 further action is required on the caller's side.
5820
5821 <note>
5822 This notification is not designed to be implemented by
5823 more than one callback at a time. If you have multiple
5824 IConsoleCallback instances registered on the given
5825 IConsole object, make sure you simply do nothing but
5826 return @c S_OK from all but one of them that actually
5827 manages console window activation.
5828 </note>
5829 </desc>
5830 <param name="winId" type="unsigned long long" dir="return">
5831 <desc>
5832 Platform-dependent identifier of the top-level VM console
5833 window, or zero if this method has performed all actions
5834 necessary to implement the <i>show window</i> semantics for
5835 the given platform and/or this VirtualBox front-end.
5836 </desc>
5837 </param>
5838 </method>
5839
5840 </interface>
5841
5842 <interface
5843 name="IRemoteDisplayInfo" extends="$unknown"
5844 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
5845 wsmap="struct"
5846 >
5847 <desc>
5848 Contains information about the remote display (VRDP) capabilities and status.
5849 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5850 </desc>
5851
5852 <attribute name="active" type="boolean" readonly="yes">
5853 <desc>
5854 Whether the remote display connection is active.
5855 </desc>
5856 </attribute>
5857
5858 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5859 <desc>
5860 How many times a client connected.
5861 </desc>
5862 </attribute>
5863
5864 <attribute name="beginTime" type="long long" readonly="yes">
5865 <desc>
5866 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5867 </desc>
5868 </attribute>
5869
5870 <attribute name="endTime" type="long long" readonly="yes">
5871 <desc>
5872 When the last connection was terminated or the current time, if
5873 connection is still active, in milliseconds since 1970-01-01 UTC.
5874 </desc>
5875 </attribute>
5876
5877 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5878 <desc>
5879 How many bytes were sent in last or current, if still active, connection.
5880 </desc>
5881 </attribute>
5882
5883 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5884 <desc>
5885 How many bytes were sent in all connections.
5886 </desc>
5887 </attribute>
5888
5889 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5890 <desc>
5891 How many bytes were received in last or current, if still active, connection.
5892 </desc>
5893 </attribute>
5894
5895 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5896 <desc>
5897 How many bytes were received in all connections.
5898 </desc>
5899 </attribute>
5900
5901 <attribute name="user" type="wstring" readonly="yes">
5902 <desc>
5903 Login user name supplied by the client.
5904 </desc>
5905 </attribute>
5906
5907 <attribute name="domain" type="wstring" readonly="yes">
5908 <desc>
5909 Login domain name supplied by the client.
5910 </desc>
5911 </attribute>
5912
5913 <attribute name="clientName" type="wstring" readonly="yes">
5914 <desc>
5915 The client name supplied by the client.
5916 </desc>
5917 </attribute>
5918
5919 <attribute name="clientIP" type="wstring" readonly="yes">
5920 <desc>
5921 The IP address of the client.
5922 </desc>
5923 </attribute>
5924
5925 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5926 <desc>
5927 The client software version number.
5928 </desc>
5929 </attribute>
5930
5931 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5932 <desc>
5933 Public key exchange method used when connection was established.
5934 Values: 0 - RDP4 public key exchange scheme.
5935 1 - X509 certificates were sent to client.
5936 </desc>
5937 </attribute>
5938
5939 </interface>
5940
5941 <interface
5942 name="IConsole" extends="$unknown"
5943 uuid="c47486e1-3d99-4212-b1c5-86451978999d"
5944 wsmap="managed"
5945 >
5946 <desc>
5947 The IConsole interface represents an interface to control virtual
5948 machine execution.
5949
5950 The console object that implements the IConsole interface is obtained
5951 from a session object after the session for the given machine has been
5952 opened using one of <link to="IVirtualBox::openSession"/>,
5953 <link to="IVirtualBox::openRemoteSession"/> or
5954 <link to="IVirtualBox::openExistingSession"/> methods.
5955
5956 Methods of the IConsole interface allow the caller to query the current
5957 virtual machine execution state, pause the machine or power it down, save
5958 the machine state or take a snapshot, attach and detach removable media
5959 and so on.
5960
5961 <see>ISession</see>
5962 </desc>
5963
5964 <attribute name="machine" type="IMachine" readonly="yes">
5965 <desc>
5966 Machine object this console is sessioned with.
5967 <note>
5968 This is a convenience property, it has the same value as
5969 <link to="ISession::machine"/> of the corresponding session
5970 object.
5971 </note>
5972 </desc>
5973 </attribute>
5974
5975 <attribute name="state" type="MachineState" readonly="yes">
5976 <desc>
5977 Current execution state of the machine.
5978 <note>
5979 This property always returns the same value as the corresponding
5980 property of the IMachine object this console is sessioned with.
5981 For the process that owns (executes) the VM, this is the
5982 preferable way of querying the VM state, because no IPC
5983 calls are made.
5984 </note>
5985 </desc>
5986 </attribute>
5987
5988 <attribute name="guest" type="IGuest" readonly="yes">
5989 <desc>Guest object.</desc>
5990 </attribute>
5991
5992 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5993 <desc>
5994 Virtual keyboard object.
5995 <note>
5996 If the machine is not running, any attempt to use
5997 the returned object will result in an error.
5998 </note>
5999 </desc>
6000 </attribute>
6001
6002 <attribute name="mouse" type="IMouse" readonly="yes">
6003 <desc>
6004 Virtual mouse object.
6005 <note>
6006 If the machine is not running, any attempt to use
6007 the returned object will result in an error.
6008 </note>
6009 </desc>
6010 </attribute>
6011
6012 <attribute name="display" type="IDisplay" readonly="yes">
6013 <desc>Virtual display object.
6014 <note>
6015 If the machine is not running, any attempt to use
6016 the returned object will result in an error.
6017 </note>
6018 </desc>
6019 </attribute>
6020
6021 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6022 <desc>Debugging interface.</desc>
6023 </attribute>
6024
6025 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6026 <desc>
6027 Collection of USB devices currently attached to the virtual
6028 USB controller.
6029 <note>
6030 The collection is empty if the machine is not running.
6031 </note>
6032 </desc>
6033 </attribute>
6034
6035 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6036 <desc>
6037 List of USB devices currently attached to the remote VRDP client.
6038 Once a new device is physically attached to the remote host computer,
6039 it appears in this list and remains there until detached.
6040 </desc>
6041 </attribute>
6042
6043 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6044 <desc>
6045 Collection of shared folders for the current session. These folders
6046 are called transient shared folders because they are available to the
6047 guest OS running inside the associated virtual machine only for the
6048 duration of the session (as opposed to
6049 <link to="IMachine::sharedFolders"/> which represent permanent shared
6050 folders). When the session is closed (e.g. the machine is powered down),
6051 these folders are automatically discarded.
6052
6053 New shared folders are added to the collection using
6054 <link to="#createSharedFolder"/>. Existing shared folders can be
6055 removed using <link to="#removeSharedFolder"/>.
6056 </desc>
6057 </attribute>
6058
6059 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6060 <desc>
6061 Interface that provides information on Remote Display (VRDP) connection.
6062 </desc>
6063 </attribute>
6064
6065 <method name="powerUp">
6066 <desc>
6067 Starts the virtual machine execution using the current machine
6068 state (that is, its current execution state, current settings and
6069 current hard disks).
6070
6071 If the machine is powered off or aborted, the execution will
6072 start from the beginning (as if the real hardware were just
6073 powered on).
6074
6075 If the machine is in the <link to="MachineState_Saved"/> state,
6076 it will continue its execution the point where the state has
6077 been saved.
6078
6079 <note>
6080 Unless you are trying to write a new VirtualBox front-end that
6081 performs direct machine execution (like the VirtualBox or VBoxSDL
6082 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6083 session opened by <link to="IVirtualBox::openSession"/> and use this
6084 session only to change virtual machine settings. If you simply want to
6085 start virtual machine execution using one of the existing front-ends
6086 (for example the VirtualBox GUI or headless server), simply use
6087 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6088 power up the machine automatically for you.
6089 </note>
6090
6091 <see>#saveState</see>
6092 <result name="VBOX_E_INVALID_VM_STATE">
6093 Virtual machine already running.
6094 </result>
6095 <result name="VBOX_E_HOST_ERROR">
6096 Host interface does not exist or name not set.
6097 </result>
6098 <result name="VBOX_E_FILE_ERROR">
6099 Invalid saved state file.
6100 </result>
6101 </desc>
6102 <param name="progress" type="IProgress" dir="return">
6103 <desc>Progress object to track the operation completion.</desc>
6104 </param>
6105 </method>
6106
6107 <method name="powerUpPaused">
6108 <desc>
6109 Identical to powerUp except that the VM will enter the
6110 <link to="MachineState_Paused"/> state, instead of
6111 <link to="MachineState_Running"/>.
6112
6113 <see>#powerUp</see>
6114 <result name="VBOX_E_INVALID_VM_STATE">
6115 Virtual machine already running.
6116 </result>
6117 <result name="VBOX_E_HOST_ERROR">
6118 Host interface does not exist or name not set.
6119 </result>
6120 <result name="VBOX_E_FILE_ERROR">
6121 Invalid saved state file.
6122 </result>
6123 </desc>
6124 <param name="progress" type="IProgress" dir="return">
6125 <desc>Progress object to track the operation completion.</desc>
6126 </param>
6127 </method>
6128
6129 <method name="powerDown">
6130 <desc>
6131 Initiates the power down procedure to stop the virtual machine
6132 execution.
6133
6134 The completion of the power down procedure is tracked using the returned
6135 IProgress object. After the operation is complete, the machine will go
6136 to the PoweredOff state.
6137 <result name="VBOX_E_INVALID_VM_STATE">
6138 Virtual machine must be Running, Paused or Stuck to be powered down.
6139 </result>
6140 </desc>
6141 <param name="progress" type="IProgress" dir="return">
6142 <desc>Progress object to track the operation completion.</desc>
6143 </param>
6144 </method>
6145
6146 <method name="reset">
6147 <desc>Resets the virtual machine.
6148 <result name="VBOX_E_INVALID_VM_STATE">
6149 Virtual machine not in Running state.
6150 </result>
6151 <result name="VBOX_E_VM_ERROR">
6152 Virtual machine error in reset operation.
6153 </result>
6154 </desc>
6155 </method>
6156
6157 <method name="pause">
6158 <desc>Pauses the virtual machine execution.
6159 <result name="VBOX_E_INVALID_VM_STATE">
6160 Virtual machine not in Running state.
6161 </result>
6162 <result name="VBOX_E_VM_ERROR">
6163 Virtual machine error in suspend operation.
6164 </result>
6165 </desc>
6166 </method>
6167
6168 <method name="resume">
6169 <desc>Resumes the virtual machine execution.
6170 <result name="VBOX_E_INVALID_VM_STATE">
6171 Virtual machine not in Paused state.
6172 </result>
6173 <result name="VBOX_E_VM_ERROR">
6174 Virtual machine error in resume operation.
6175 </result>
6176 </desc>
6177 </method>
6178
6179 <method name="powerButton">
6180 <desc>Sends the ACPI power button event to the guest.
6181 <result name="VBOX_E_INVALID_VM_STATE">
6182 Virtual machine not in Running state.
6183 </result>
6184 <result name="VBOX_E_PDM_ERROR">
6185 Controlled power off failed.
6186 </result>
6187 </desc>
6188 </method>
6189
6190 <method name="sleepButton">
6191 <desc>Sends the ACPI sleep button event to the guest.
6192 <result name="VBOX_E_INVALID_VM_STATE">
6193 Virtual machine not in Running state.
6194 </result>
6195 <result name="VBOX_E_PDM_ERROR">
6196 Sending sleep button event failed.
6197 </result>
6198 </desc>
6199 </method>
6200
6201 <method name="getPowerButtonHandled">
6202 <desc>Checks if the last power button event was handled by guest.
6203 <result name="VBOX_E_PDM_ERROR">
6204 Checking if the event was handled by the guest OS failed.
6205 </result>
6206 </desc>
6207 <param name="handled" type="boolean" dir="return"/>
6208 </method>
6209
6210 <method name="getGuestEnteredACPIMode">
6211 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6212 G1 (sleeping). If this method returns @c false, the guest will
6213 most likely not respond to external ACPI events.
6214 <result name="VBOX_E_INVALID_VM_STATE">
6215 Virtual machine not in Running state.
6216 </result>
6217 </desc>
6218 <param name="entered" type="boolean" dir="return"/>
6219 </method>
6220
6221 <method name="saveState">
6222 <desc>
6223 Saves the current execution state of a running virtual machine
6224 and stops its execution.
6225
6226 After this operation completes, the machine will go to the
6227 Saved state. Next time it is powered up, this state will
6228 be restored and the machine will continue its execution from
6229 the place where it was saved.
6230
6231 This operation differs from taking a snapshot to the effect
6232 that it doesn't create new differencing media. Also, once
6233 the machine is powered up from the state saved using this method,
6234 the saved state is deleted, so it will be impossible to return
6235 to this state later.
6236
6237 <note>
6238 On success, this method implicitly calls
6239 <link to="IMachine::saveSettings"/> to save all current machine
6240 settings (including runtime changes to the DVD medium, etc.).
6241 Together with the impossibility to change any VM settings when it is
6242 in the Saved state, this guarantees adequate hardware
6243 configuration of the machine when it is restored from the saved
6244 state file.
6245 </note>
6246
6247 <note>
6248 The machine must be in the Running or Paused state, otherwise
6249 the operation will fail.
6250 </note>
6251 <result name="VBOX_E_INVALID_VM_STATE">
6252 Virtual machine state neither Running nor Paused.
6253 </result>
6254 <result name="VBOX_E_FILE_ERROR">
6255 Failed to create directory for saved state file.
6256 </result>
6257
6258 <see><link to="#takeSnapshot"/></see>
6259 </desc>
6260 <param name="progress" type="IProgress" dir="return">
6261 <desc>Progress object to track the operation completion.</desc>
6262 </param>
6263 </method>
6264
6265 <method name="adoptSavedState">
6266 <desc>
6267 Associates the given saved state file to the virtual machine.
6268
6269 On success, the machine will go to the Saved state. Next time it is
6270 powered up, it will be restored from the adopted saved state and
6271 continue execution from the place where the saved state file was
6272 created.
6273
6274 The specified saved state file path may be absolute or relative to the
6275 folder the VM normally saves the state to (usually,
6276 <link to="IMachine::snapshotFolder"/>).
6277
6278 <note>
6279 It's a caller's responsibility to make sure the given saved state
6280 file is compatible with the settings of this virtual machine that
6281 represent its virtual hardware (memory size, hard disk configuration
6282 etc.). If there is a mismatch, the behavior of the virtual machine
6283 is undefined.
6284 </note>
6285 <result name="VBOX_E_INVALID_VM_STATE">
6286 Virtual machine state neither PoweredOff nor Aborted.
6287 </result>
6288 </desc>
6289 <param name="savedStateFile" type="wstring" dir="in">
6290 <desc>Path to the saved state file to adopt.</desc>
6291 </param>
6292 </method>
6293
6294 <method name="forgetSavedState">
6295 <desc>
6296 Forgets the saved state of the virtual machine previously created
6297 by <link to="#saveState"/>. Next time the machine is powered up, a
6298 clean boot will occur. If @a remove is @c true the saved state file
6299 is deleted.
6300 <note>
6301 This operation is equivalent to resetting or powering off
6302 the machine without doing a proper shutdown in the guest OS.
6303 </note>
6304 <result name="VBOX_E_INVALID_VM_STATE">
6305 Virtual machine not in state Saved.
6306 </result>
6307 </desc>
6308 <param name="remove" type="boolean" dir="in">
6309 <desc>If @c true remove the saved state file.</desc>
6310 </param>
6311 </method>
6312
6313 <method name="getDeviceActivity">
6314 <desc>
6315 Gets the current activity type of a given device or device group.
6316 <result name="E_INVALIDARG">
6317 Invalid device type.
6318 </result>
6319 </desc>
6320 <param name="type" type="DeviceType" dir="in"/>
6321 <param name="activity" type="DeviceActivity" dir="return"/>
6322 </method>
6323
6324 <method name="attachUSBDevice">
6325 <desc>
6326 Attaches a host USB device with the given UUID to the
6327 USB controller of the virtual machine.
6328
6329 The device needs to be in one of the following states:
6330 <link to="USBDeviceState_Busy"/>,
6331 <link to="USBDeviceState_Available"/> or
6332 <link to="USBDeviceState_Held"/>,
6333 otherwise an error is immediately returned.
6334
6335 When the device state is
6336 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6337 be returned if the host computer refuses to release it for some reason.
6338
6339 <see>IUSBController::deviceFilters, USBDeviceState</see>
6340 <result name="VBOX_E_INVALID_VM_STATE">
6341 Virtual machine state neither Running nor Paused.
6342 </result>
6343 <result name="VBOX_E_PDM_ERROR">
6344 Virtual machine does not have a USB controller.
6345 </result>
6346 </desc>
6347 <param name="id" type="uuid" mod="string" dir="in">
6348 <desc>UUID of the host USB device to attach.</desc>
6349 </param>
6350 </method>
6351
6352 <method name="detachUSBDevice">
6353 <desc>
6354 Detaches an USB device with the given UUID from the USB controller
6355 of the virtual machine.
6356
6357 After this method succeeds, the VirtualBox server re-initiates
6358 all USB filters as if the device were just physically attached
6359 to the host, but filters of this machine are ignored to avoid
6360 a possible automatic re-attachment.
6361
6362 <see>IUSBController::deviceFilters, USBDeviceState</see>
6363
6364 <result name="VBOX_E_PDM_ERROR">
6365 Virtual machine does not have a USB controller.
6366 </result>
6367 <result name="E_INVALIDARG">
6368 USB device not attached to this virtual machine.
6369 </result>
6370 </desc>
6371 <param name="id" type="uuid" mod="string" dir="in">
6372 <desc>UUID of the USB device to detach.</desc>
6373 </param>
6374 <param name="device" type="IUSBDevice" dir="return">
6375 <desc>Detached USB device.</desc>
6376 </param>
6377 </method>
6378
6379 <method name="findUSBDeviceByAddress">
6380 <desc>
6381 Searches for a USB device with the given host address.
6382
6383 <result name="VBOX_E_OBJECT_NOT_FOUND">
6384 Given @c name does not correspond to any USB device.
6385 </result>
6386
6387 <see>IUSBDevice::address</see>
6388 </desc>
6389 <param name="name" type="wstring" dir="in">
6390 <desc>
6391 Address of the USB device (as assigned by the host) to
6392 search for.
6393 </desc>
6394 </param>
6395 <param name="device" type="IUSBDevice" dir="return">
6396 <desc>Found USB device object.</desc>
6397 </param>
6398 </method>
6399
6400 <method name="findUSBDeviceById">
6401 <desc>
6402 Searches for a USB device with the given UUID.
6403
6404 <result name="VBOX_E_OBJECT_NOT_FOUND">
6405 Given @c id does not correspond to any USB device.
6406 </result>
6407
6408 <see>IUSBDevice::id</see>
6409 </desc>
6410 <param name="id" type="uuid" mod="string" dir="in">
6411 <desc>UUID of the USB device to search for.</desc>
6412 </param>
6413 <param name="device" type="IUSBDevice" dir="return">
6414 <desc>Found USB device object.</desc>
6415 </param>
6416 </method>
6417
6418 <method name="createSharedFolder">
6419 <desc>
6420 Creates a transient new shared folder by associating the given logical
6421 name with the given host path, adds it to the collection of shared
6422 folders and starts sharing it. Refer to the description of
6423 <link to="ISharedFolder"/> to read more about logical names.
6424
6425 <result name="VBOX_E_INVALID_VM_STATE">
6426 Virtual machine in Saved state or currently changing state.
6427 </result>
6428 <result name="VBOX_E_FILE_ERROR">
6429 Shared folder already exists or not accessible.
6430 </result>
6431 </desc>
6432 <param name="name" type="wstring" dir="in">
6433 <desc>Unique logical name of the shared folder.</desc>
6434 </param>
6435 <param name="hostPath" type="wstring" dir="in">
6436 <desc>Full path to the shared folder in the host file system.</desc>
6437 </param>
6438 <param name="writable" type="boolean" dir="in">
6439 <desc>Whether the share is writable or readonly</desc>
6440 </param>
6441 </method>
6442
6443 <method name="removeSharedFolder">
6444 <desc>
6445 Removes a transient shared folder with the given name previously
6446 created by <link to="#createSharedFolder"/> from the collection of
6447 shared folders and stops sharing it.
6448 <result name="VBOX_E_INVALID_VM_STATE">
6449 Virtual machine in Saved state or currently changing state.
6450 </result>
6451 <result name="VBOX_E_FILE_ERROR">
6452 Shared folder does not exists.
6453 </result>
6454 </desc>
6455 <param name="name" type="wstring" dir="in">
6456 <desc>Logical name of the shared folder to remove.</desc>
6457 </param>
6458 </method>
6459
6460 <method name="takeSnapshot">
6461 <desc>
6462 Saves the current execution state
6463 and all settings of the machine and creates differencing images
6464 for all normal (non-independent) media.
6465 See <link to="ISnapshot" /> for an introduction to snapshots.
6466
6467 This method can be called for a PoweredOff, Saved (see
6468 <link to="#saveState"/>), Running or
6469 Paused virtual machine. When the machine is PoweredOff, an
6470 offline snapshot is created. When the machine is Running a live
6471 snapshot is created, and an online snapshot is is created when Paused.
6472
6473 The taken snapshot is always based on the
6474 <link to="IMachine::currentSnapshot">current snapshot</link>
6475 of the associated virtual machine and becomes a new current snapshot.
6476
6477 <note>
6478 This method implicitly calls <link to="IMachine::saveSettings"/> to
6479 save all current machine settings before taking an offline snapshot.
6480 </note>
6481
6482 <result name="VBOX_E_INVALID_VM_STATE">
6483 Virtual machine currently changing state.
6484 </result>
6485 </desc>
6486 <param name="name" type="wstring" dir="in">
6487 <desc>Short name for the snapshot.</desc>
6488 </param>
6489 <param name="description" type="wstring" dir="in">
6490 <desc>Optional description of the snapshot.</desc>
6491 </param>
6492 <param name="progress" type="IProgress" dir="return">
6493 <desc>Progress object to track the operation completion.</desc>
6494 </param>
6495 </method>
6496
6497 <method name="discardSnapshot">
6498 <desc>
6499 Starts discarding the specified snapshot asynchronously.
6500 See <link to="ISnapshot" /> for an introduction to snapshots.
6501
6502 The execution state
6503 and settings of the associated machine stored in the snapshot
6504 will be deleted. The contents of all differencing media of
6505 this snapshot will be merged with the contents of their
6506 dependent child media to keep the disks valid (in other
6507 words, all changes represented by media being discarded
6508 will be propagated to their child medium). After that, this
6509 snapshot's differencing medium will be deleted. The parent
6510 of this snapshot will become a new parent for all its child
6511 snapshots.
6512
6513 If the discarded snapshot is the current one, its parent
6514 snapshot will become a new current snapshot. The current machine
6515 state is not directly affected in this case, except that
6516 currently attached differencing media based on media
6517 of the discarded snapshot will be also merged as described
6518 above.
6519
6520 If the discarded snapshot is the first one (the root snapshot)
6521 and it has exactly one child snapshot, this child snapshot will
6522 become the first snapshot after discarding. If there are no
6523 children at all (i.e. the first snapshot is the only snapshot of
6524 the machine), both the current and the first snapshot of the
6525 machine will be set to @c null. In all other cases, the first
6526 snapshot cannot be discarded.
6527
6528 You cannot discard the snapshot if it
6529 stores <link to="MediumType_Normal">normal</link> (non-differencing)
6530 media that have differencing media based on them. Snapshots of
6531 such kind can be discarded only when every normal medium has either
6532 no children at all or exactly one child. In the former case, the normal
6533 medium simply becomes unused (i.e. not attached to any VM). In the
6534 latter case, it receives all the changes stored in the child medium,
6535 and then it replaces the child medium in the configuration of the
6536 corresponding snapshot or machine.
6537
6538 Also, you cannot discard the snapshot if it stores media
6539 (of any type) having differencing child media that belong
6540 to other machines. Such snapshots can be only discarded after
6541 you discard all snapshots of other machines containing "foreign"
6542 child disks, or detach these "foreign" child disks from machines
6543 they are attached to.
6544
6545 One particular example of the snapshot storing normal media
6546 is the first snapshot of a virtual machine that had normal media
6547 attached when taking the snapshot. Be careful when
6548 discarding such snapshots because this implicitly commits
6549 changes (made since the snapshot being discarded has been taken)
6550 to normal media (as described above), which may be not what
6551 you want.
6552
6553 The virtual machine is put to
6554 the <link to="MachineState_Discarding">Discarding</link> state until
6555 the discard operation is completed.
6556
6557 <note>
6558 The machine must not be running, otherwise the operation
6559 will fail.
6560 </note>
6561
6562 <note>
6563 Child media of all normal media of the discarded snapshot
6564 must be accessible (see <link to="IMedium::state"/>) for this
6565 operation to succeed. In particular, this means that all virtual
6566 machines, whose media are directly or indirectly based on the
6567 media of discarded snapshot, must be powered off.
6568 </note>
6569 <note>
6570 Merging medium contents can be very time and disk space
6571 consuming, if these disks are big in size and have many
6572 children. However, if the snapshot being discarded is the last
6573 (head) snapshot on the branch, the operation will be rather
6574 quick.
6575 </note>
6576 <note>
6577 Note that discarding the current snapshot
6578 will implicitly call <link to="IMachine::saveSettings"/> to
6579 make all current machine settings permanent.
6580 </note>
6581 <result name="VBOX_E_INVALID_VM_STATE">
6582 Virtual machine is running.
6583 </result>
6584 </desc>
6585 <param name="id" type="uuid" mod="string" dir="in">
6586 <desc>UUID of the snapshot to discard.</desc>
6587 </param>
6588 <param name="progress" type="IProgress" dir="return">
6589 <desc>Progress object to track the operation completion.</desc>
6590 </param>
6591 </method>
6592
6593 <method name="discardCurrentState">
6594 <desc>
6595 Starts resetting the machine's current state to the state contained
6596 in the current snapshot, asynchronously. All current settings of the
6597 machine will be reset and changes stored in differencing media
6598 will be lost.
6599 See <link to="ISnapshot" /> for an introduction to snapshots.
6600
6601 After this operation is successfully completed, new empty differencing
6602 media are created for all normal media of the machine.
6603
6604 If the current snapshot of the machine is an online snapshot, the
6605 machine will go to the <link to="MachineState_Saved"> saved
6606 state</link>, so that the next time it is powered on, the execution
6607 state will be restored from the current snapshot.
6608
6609 <note>
6610 The machine must not be running, otherwise the operation will fail.
6611 </note>
6612
6613 <note>
6614 If the machine state is <link to="MachineState_Saved">Saved</link>
6615 prior to this operation, the saved state file will be implicitly
6616 discarded (as if <link to="IConsole::forgetSavedState"/> were
6617 called).
6618 </note>
6619
6620 <result name="VBOX_E_INVALID_VM_STATE">
6621 Virtual machine is running.
6622 </result>
6623 </desc>
6624 <param name="progress" type="IProgress" dir="return">
6625 <desc>Progress object to track the operation completion.</desc>
6626 </param>
6627 </method>
6628
6629 <method name="discardCurrentSnapshotAndState">
6630 <desc>
6631
6632 This method is equivalent to
6633 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6634 (currentSnapshot.id(), progress) followed by
6635 <link to="IConsole::discardCurrentState"/>.
6636
6637 As a result, the machine will be fully restored from the
6638 snapshot preceding the current snapshot, while both the current
6639 snapshot and the current machine state will be discarded.
6640
6641 If the current snapshot is the first snapshot of the machine (i.e. it
6642 has the only snapshot), the current machine state will be
6643 discarded <b>before</b> discarding the snapshot. In other words, the
6644 machine will be restored from its last snapshot, before discarding
6645 it. This differs from performing a single
6646 <link to="IConsole::discardSnapshot"/> call (note that no
6647 <link to="IConsole::discardCurrentState"/> will be possible after it)
6648 to the effect that the latter will preserve the current state instead of
6649 discarding it.
6650
6651 Unless explicitly mentioned otherwise, all remarks and
6652 limitations of the above two methods also apply to this method.
6653
6654 <note>
6655 The machine must not be running, otherwise the operation
6656 will fail.
6657 </note>
6658
6659 <note>
6660 If the machine state is <link to="MachineState_Saved">Saved</link>
6661 prior to this operation, the saved state file will be implicitly
6662 discarded (as if <link to="#forgetSavedState"/> were
6663 called).
6664 </note>
6665
6666 <note>
6667 This method is more efficient than calling both of the above
6668 methods separately: it requires less IPC calls and provides
6669 a single progress object.
6670 </note>
6671
6672 <result name="VBOX_E_INVALID_VM_STATE">
6673 Virtual machine is running.
6674 </result>
6675 </desc>
6676 <param name="progress" type="IProgress" dir="return">
6677 <desc>Progress object to track the operation completion.</desc>
6678 </param>
6679 </method>
6680
6681 <method name="migrate">
6682 <desc>
6683 Migrate the VM to a different host machine.
6684
6685 TODO explain the details.
6686
6687 <result name="VBOX_E_INVALID_VM_STATE">
6688 Virtual machine not running or paused.
6689 </result>
6690 </desc>
6691 <param name="hostname" type="wstring" dir="in">
6692 <desc>The name or IP of the host to migrate to.</desc>
6693 </param>
6694 <param name="port" type="unsigned long" dir="in">
6695 <desc>The TCP port to connect to (1..65535).</desc>
6696 </param>
6697 <param name="password" type="wstring" dir="in">
6698 <desc>The password.</desc>
6699 </param>
6700 <param name="progress" type="IProgress" dir="return">
6701 <desc>Progress object to track the operation completion.</desc>
6702 </param>
6703 </method>
6704
6705 <method name="registerCallback">
6706 <desc>
6707 Registers a new console callback on this instance. The methods of the
6708 callback interface will be called by this instance when the appropriate
6709 event occurs.
6710 </desc>
6711 <param name="callback" type="IConsoleCallback" dir="in"/>
6712 </method>
6713
6714 <method name="unregisterCallback">
6715 <desc>
6716 Unregisters the console callback previously registered using
6717 <link to="#registerCallback"/>.
6718 <result name="E_INVALIDARG">
6719 Given @a callback handler is not registered.
6720 </result>
6721 </desc>
6722 <param name="callback" type="IConsoleCallback" dir="in"/>
6723 </method>
6724 </interface>
6725
6726 <!--
6727 // IHost
6728 /////////////////////////////////////////////////////////////////////////
6729 -->
6730
6731 <enum
6732 name="HostNetworkInterfaceMediumType"
6733 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6734 >
6735 <desc>
6736 Type of encapsulation. Ethernet encapsulation includes both wired and
6737 wireless Ethernet connections.
6738 <see>IHostNetworkInterface</see>
6739 </desc>
6740
6741 <const name="Unknown" value="0">
6742 <desc>
6743 The type of interface cannot be determined.
6744 </desc>
6745 </const>
6746 <const name="Ethernet" value="1">
6747 <desc>
6748 Ethernet frame encapsulation.
6749 </desc>
6750 </const>
6751 <const name="PPP" value="2">
6752 <desc>
6753 Point-to-point protocol encapsulation.
6754 </desc>
6755 </const>
6756 <const name="SLIP" value="3">
6757 <desc>
6758 Serial line IP encapsulation.
6759 </desc>
6760 </const>
6761 </enum>
6762
6763 <enum
6764 name="HostNetworkInterfaceStatus"
6765 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6766 >
6767 <desc>
6768 Current status of the interface.
6769 <see>IHostNetworkInterface</see>
6770 </desc>
6771
6772 <const name="Unknown" value="0">
6773 <desc>
6774 The state of interface cannot be determined.
6775 </desc>
6776 </const>
6777 <const name="Up" value="1">
6778 <desc>
6779 The interface is fully operational.
6780 </desc>
6781 </const>
6782 <const name="Down" value="2">
6783 <desc>
6784 The interface is not functioning.
6785 </desc>
6786 </const>
6787 </enum>
6788
6789 <enum
6790 name="HostNetworkInterfaceType"
6791 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6792 >
6793 <desc>
6794 Network interface type.
6795 </desc>
6796 <const name="Bridged" value="1"/>
6797 <const name="HostOnly" value="2"/>
6798 </enum>
6799
6800 <interface
6801 name="IHostNetworkInterface" extends="$unknown"
6802 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6803 wsmap="managed"
6804 >
6805 <desc>
6806 Represents one of host's network interfaces. IP V6 address and network
6807 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6808 separated by colons.
6809 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6810 </desc>
6811 <attribute name="name" type="wstring" readonly="yes">
6812 <desc>Returns the host network interface name.</desc>
6813 </attribute>
6814
6815 <attribute name="id" type="uuid" mod="string" readonly="yes">
6816 <desc>Returns the interface UUID.</desc>
6817 </attribute>
6818
6819 <attribute name="networkName" type="wstring" readonly="yes">
6820 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6821 </attribute>
6822
6823 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6824 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6825 </attribute>
6826
6827 <attribute name="IPAddress" type="wstring" readonly="yes">
6828 <desc>Returns the IP V4 address of the interface.</desc>
6829 </attribute>
6830
6831 <attribute name="networkMask" type="wstring" readonly="yes">
6832 <desc>Returns the network mask of the interface.</desc>
6833 </attribute>
6834
6835 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6836 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6837 </attribute>
6838
6839 <attribute name="IPV6Address" type="wstring" readonly="yes">
6840 <desc>Returns the IP V6 address of the interface.</desc>
6841 </attribute>
6842
6843 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6844 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6845 </attribute>
6846
6847 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6848 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6849 </attribute>
6850
6851 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6852 <desc>Type of protocol encapsulation used.</desc>
6853 </attribute>
6854
6855 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6856 <desc>Status of the interface.</desc>
6857 </attribute>
6858
6859 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6860 <desc>specifies the host interface type.</desc>
6861 </attribute>
6862
6863 <method name="enableStaticIpConfig">
6864 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6865 <param name="IPAddress" type="wstring" dir="in">
6866 <desc>
6867 IP address.
6868 </desc>
6869 </param>
6870 <param name="networkMask" type="wstring" dir="in">
6871 <desc>
6872 network mask.
6873 </desc>
6874 </param>
6875 </method>
6876
6877 <method name="enableStaticIpConfigV6">
6878 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6879 <param name="IPV6Address" type="wstring" dir="in">
6880 <desc>
6881 IP address.
6882 </desc>
6883 </param>
6884 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6885 <desc>
6886 network mask.
6887 </desc>
6888 </param>
6889 </method>
6890
6891 <method name="enableDynamicIpConfig">
6892 <desc>enables the dynamic IP configuration.</desc>
6893 </method>
6894
6895 <method name="dhcpRediscover">
6896 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6897 </method>
6898
6899 </interface>
6900
6901 <interface
6902 name="IHost" extends="$unknown"
6903 uuid="95522f11-1ecc-443b-9242-3af6b24d430c"
6904 wsmap="managed"
6905 >
6906 <desc>
6907 The IHost interface represents the physical machine that this VirtualBox
6908 installation runs on.
6909
6910 An object implementing this interface is returned by the
6911 <link to="IVirtualBox::host" /> attribute. This interface contains
6912 read-only information about the host's physical hardware (such as what
6913 processors and disks are available, what the host operating system is,
6914 and so on) and also allows for manipulating some of the host's hardware,
6915 such as global USB device filters and host interface networking.
6916
6917 </desc>
6918 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
6919 <desc>List of DVD drives available on the host.</desc>
6920 </attribute>
6921
6922 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
6923 <desc>List of floppy drives available on the host.</desc>
6924 </attribute>
6925
6926 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6927 <desc>
6928 List of USB devices currently attached to the host.
6929 Once a new device is physically attached to the host computer,
6930 it appears in this list and remains there until detached.
6931
6932 <note>
6933 If USB functionality is not available in the given edition of
6934 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6935 </note>
6936 </desc>
6937 </attribute>
6938
6939 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
6940 <desc>
6941 List of USB device filters in action.
6942 When a new device is physically attached to the host computer,
6943 filters from this list are applied to it (in order they are stored
6944 in the list). The first matched filter will determine the
6945 <link to="IHostUSBDeviceFilter::action">action</link>
6946 performed on the device.
6947
6948 Unless the device is ignored by these filters, filters of all
6949 currently running virtual machines
6950 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6951
6952 <note>
6953 If USB functionality is not available in the given edition of
6954 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6955 </note>
6956
6957 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6958 </desc>
6959 </attribute>
6960
6961 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6962 <desc>List of host network interfaces currently defined on the host.</desc>
6963 </attribute>
6964
6965 <attribute name="processorCount" type="unsigned long" readonly="yes">
6966 <desc>Number of (logical) CPUs installed in the host system.</desc>
6967 </attribute>
6968
6969 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6970 <desc>Number of (logical) CPUs online in the host system.</desc>
6971 </attribute>
6972
6973 <method name="getProcessorSpeed">
6974 <desc>Query the (approximate) maximum speed of a specified host CPU in
6975 Megahertz.
6976 </desc>
6977 <param name="cpuId" type="unsigned long" dir="in">
6978 <desc>
6979 Identifier of the CPU.
6980 </desc>
6981 </param>
6982 <param name="speed" type="unsigned long" dir="return">
6983 <desc>
6984 Speed value. 0 is returned if value is not known or @a cpuId is
6985 invalid.
6986 </desc>
6987 </param>
6988 </method>
6989
6990 <method name="getProcessorFeature">
6991 <desc>Query whether a CPU feature is supported or not.</desc>
6992 <param name="feature" type="ProcessorFeature" dir="in">
6993 <desc>
6994 CPU Feature identifier.
6995 </desc>
6996 </param>
6997 <param name="supported" type="boolean" dir="return">
6998 <desc>
6999 Feature is supported or not.
7000 </desc>
7001 </param>
7002 </method>
7003
7004 <method name="getProcessorDescription">
7005 <desc>Query the model string of a specified host CPU.
7006 </desc>
7007 <param name="cpuId" type="unsigned long" dir="in">
7008 <desc>
7009 Identifier of the CPU.
7010 </desc>
7011 </param>
7012 <param name="description" type="wstring" dir="return">
7013 <desc>
7014 Model string. An empty string is returned if value is not known or
7015 @a cpuId is invalid.
7016 </desc>
7017 </param>
7018 </method>
7019
7020 <attribute name="memorySize" type="unsigned long" readonly="yes">
7021 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7022 </attribute>
7023
7024 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7025 <desc>Available system memory in the host system.</desc>
7026 </attribute>
7027
7028 <attribute name="operatingSystem" type="wstring" readonly="yes">
7029 <desc>Name of the host system's operating system.</desc>
7030 </attribute>
7031
7032 <attribute name="OSVersion" type="wstring" readonly="yes">
7033 <desc>Host operating system's version string.</desc>
7034 </attribute>
7035
7036 <attribute name="UTCTime" type="long long" readonly="yes">
7037 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7038 </attribute>
7039
7040 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
7041 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
7042 </attribute>
7043
7044 <method name="createHostOnlyNetworkInterface">
7045 <desc>
7046 Creates a new adapter for Host Only Networking.
7047 <result name="E_INVALIDARG">
7048 Host network interface @a name already exists.
7049 </result>
7050 </desc>
7051 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7052 <desc>
7053 Created host interface object.
7054 </desc>
7055 </param>
7056 <param name="progress" type="IProgress" dir="return">
7057 <desc>
7058 Progress object to track the operation completion.
7059 </desc>
7060 </param>
7061 </method>
7062
7063 <method name="removeHostOnlyNetworkInterface">
7064 <desc>
7065 Removes the given Host Only Networking interface.
7066 <result name="VBOX_E_OBJECT_NOT_FOUND">
7067 No host network interface matching @a id found.
7068 </result>
7069 </desc>
7070 <param name="id" type="uuid" mod="string" dir="in">
7071 <desc>
7072 Adapter GUID.
7073 </desc>
7074 </param>
7075 <param name="progress" type="IProgress" dir="return">
7076 <desc>
7077 Progress object to track the operation completion.
7078 </desc>
7079 </param>
7080 </method>
7081
7082 <method name="createUSBDeviceFilter">
7083 <desc>
7084 Creates a new USB device filter. All attributes except
7085 the filter name are set to empty (any match),
7086 <i>active</i> is @c false (the filter is not active).
7087
7088 The created filter can be added to the list of filters using
7089 <link to="#insertUSBDeviceFilter"/>.
7090
7091 <see>#USBDeviceFilters</see>
7092 </desc>
7093 <param name="name" type="wstring" dir="in">
7094 <desc>
7095 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7096 for more info.
7097 </desc>
7098 </param>
7099 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7100 <desc>Created filter object.</desc>
7101 </param>
7102 </method>
7103
7104 <method name="insertUSBDeviceFilter">
7105 <desc>
7106 Inserts the given USB device to the specified position
7107 in the list of filters.
7108
7109 Positions are numbered starting from @c 0. If the specified
7110 position is equal to or greater than the number of elements in
7111 the list, the filter is added at the end of the collection.
7112
7113 <note>
7114 Duplicates are not allowed, so an attempt to insert a
7115 filter already in the list is an error.
7116 </note>
7117 <note>
7118 If USB functionality is not available in the given edition of
7119 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7120 </note>
7121
7122 <see>#USBDeviceFilters</see>
7123
7124 <result name="VBOX_E_INVALID_OBJECT_STATE">
7125 USB device filter is not created within this VirtualBox instance.
7126 </result>
7127 <result name="E_INVALIDARG">
7128 USB device filter already in list.
7129 </result>
7130
7131 </desc>
7132 <param name="position" type="unsigned long" dir="in">
7133 <desc>Position to insert the filter to.</desc>
7134 </param>
7135 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7136 <desc>USB device filter to insert.</desc>
7137 </param>
7138 </method>
7139
7140 <method name="removeUSBDeviceFilter">
7141 <desc>
7142 Removes a USB device filter from the specified position in the
7143 list of filters.
7144
7145 Positions are numbered starting from @c 0. Specifying a
7146 position equal to or greater than the number of elements in
7147 the list will produce an error.
7148
7149 <note>
7150 If USB functionality is not available in the given edition of
7151 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7152 </note>
7153
7154 <see>#USBDeviceFilters</see>
7155
7156 <result name="E_INVALIDARG">
7157 USB device filter list empty or invalid @a position.
7158 </result>
7159
7160 </desc>
7161 <param name="position" type="unsigned long" dir="in">
7162 <desc>Position to remove the filter from.</desc>
7163 </param>
7164 </method>
7165
7166 <method name="findHostDVDDrive">
7167 <desc>
7168 Searches for a host DVD drive with the given @c name.
7169
7170 <result name="VBOX_E_OBJECT_NOT_FOUND">
7171 Given @c name does not correspond to any host drive.
7172 </result>
7173
7174 </desc>
7175 <param name="name" type="wstring" dir="in">
7176 <desc>Name of the host drive to search for</desc>
7177 </param>
7178 <param name="drive" type="IMedium" dir="return">
7179 <desc>Found host drive object</desc>
7180 </param>
7181 </method>
7182
7183 <method name="findHostFloppyDrive">
7184 <desc>
7185 Searches for a host floppy drive with the given @c name.
7186
7187 <result name="VBOX_E_OBJECT_NOT_FOUND">
7188 Given @c name does not correspond to any host floppy drive.
7189 </result>
7190
7191 </desc>
7192 <param name="name" type="wstring" dir="in">
7193 <desc>Name of the host floppy drive to search for</desc>
7194 </param>
7195 <param name="drive" type="IMedium" dir="return">
7196 <desc>Found host floppy drive object</desc>
7197 </param>
7198 </method>
7199
7200 <method name="findHostNetworkInterfaceByName">
7201 <desc>
7202 Searches through all host network interfaces for an interface with
7203 the given @c name.
7204 <note>
7205 The method returns an error if the given @c name does not
7206 correspond to any host network interface.
7207 </note>
7208 </desc>
7209 <param name="name" type="wstring" dir="in">
7210 <desc>Name of the host network interface to search for.</desc>
7211 </param>
7212 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7213 <desc>Found host network interface object.</desc>
7214 </param>
7215 </method>
7216 <method name="findHostNetworkInterfaceById">
7217 <desc>
7218 Searches through all host network interfaces for an interface with
7219 the given GUID.
7220 <note>
7221 The method returns an error if the given GUID does not
7222 correspond to any host network interface.
7223 </note>
7224 </desc>
7225 <param name="id" type="uuid" mod="string" dir="in">
7226 <desc>GUID of the host network interface to search for.</desc>
7227 </param>
7228 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7229 <desc>Found host network interface object.</desc>
7230 </param>
7231 </method>
7232 <method name="findHostNetworkInterfacesOfType">
7233 <desc>
7234 Searches through all host network interfaces and returns a list of interfaces of the specified type
7235 </desc>
7236 <param name="type" type="HostNetworkInterfaceType" dir="in">
7237 <desc>type of the host network interfaces to search for.</desc>
7238 </param>
7239 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7240 <desc>Found host network interface objects.</desc>
7241 </param>
7242 </method>
7243
7244 <method name="findUSBDeviceById">
7245 <desc>
7246 Searches for a USB device with the given UUID.
7247
7248 <result name="VBOX_E_OBJECT_NOT_FOUND">
7249 Given @c id does not correspond to any USB device.
7250 </result>
7251
7252 <see>IHostUSBDevice::id</see>
7253 </desc>
7254 <param name="id" type="uuid" mod="string" dir="in">
7255 <desc>UUID of the USB device to search for.</desc>
7256 </param>
7257 <param name="device" type="IHostUSBDevice" dir="return">
7258 <desc>Found USB device object.</desc>
7259 </param>
7260 </method>
7261
7262 <method name="findUSBDeviceByAddress">
7263 <desc>
7264 Searches for a USB device with the given host address.
7265
7266 <result name="VBOX_E_OBJECT_NOT_FOUND">
7267 Given @c name does not correspond to any USB device.
7268 </result>
7269
7270 <see>IHostUSBDevice::address</see>
7271 </desc>
7272 <param name="name" type="wstring" dir="in">
7273 <desc>
7274 Address of the USB device (as assigned by the host) to
7275 search for.
7276 </desc>
7277 </param>
7278 <param name="device" type="IHostUSBDevice" dir="return">
7279 <desc>Found USB device object.</desc>
7280 </param>
7281 </method>
7282
7283 </interface>
7284
7285 <!--
7286 // ISystemProperties
7287 /////////////////////////////////////////////////////////////////////////
7288 -->
7289
7290 <interface
7291 name="ISystemProperties"
7292 extends="$unknown"
7293 uuid="4b78105a-d066-4eab-ae48-ccb2c0ba5057"
7294 wsmap="managed"
7295 >
7296 <desc>
7297 The ISystemProperties interface represents global properties of the given
7298 VirtualBox installation.
7299
7300 These properties define limits and default values for various attributes
7301 and parameters. Most of the properties are read-only, but some can be
7302 changed by a user.
7303 </desc>
7304
7305 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7306 <desc>Minimum guest system memory in Megabytes.</desc>
7307 </attribute>
7308
7309 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7310 <desc>Maximum guest system memory in Megabytes.</desc>
7311 </attribute>
7312
7313 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7314 <desc>Minimum guest video memory in Megabytes.</desc>
7315 </attribute>
7316
7317 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7318 <desc>Maximum guest video memory in Megabytes.</desc>
7319 </attribute>
7320
7321 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7322 <desc>Minimum CPU count.</desc>
7323 </attribute>
7324
7325 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7326 <desc>Maximum CPU count.</desc>
7327 </attribute>
7328
7329 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7330 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7331 </attribute>
7332
7333 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7334 <desc>
7335 Number of network adapters associated with every
7336 <link to="IMachine"/> instance.
7337 </desc>
7338 </attribute>
7339
7340 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7341 <desc>
7342 Number of serial ports associated with every
7343 <link to="IMachine"/> instance.
7344 </desc>
7345 </attribute>
7346
7347 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7348 <desc>
7349 Number of parallel ports associated with every
7350 <link to="IMachine"/> instance.
7351 </desc>
7352 </attribute>
7353
7354 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7355 <desc>
7356 Maximum device position in the boot order. This value corresponds
7357 to the total number of devices a machine can boot from, to make it
7358 possible to include all possible devices to the boot list.
7359 <see><link to="IMachine::setBootOrder"/></see>
7360 </desc>
7361 </attribute>
7362
7363 <attribute name="defaultMachineFolder" type="wstring">
7364 <desc>
7365 Full path to the default directory used to create new or open
7366 existing machines when a settings file name contains no
7367 path.
7368
7369 The initial value of this property is
7370 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7371 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7372
7373 <note>
7374 Setting this property to @c null or an empty string will restore the
7375 initial value.
7376 </note>
7377 <note>
7378 When settings this property, the specified path can be
7379 absolute (full path) or relative
7380 to the <link to="IVirtualBox::homeFolder">
7381 VirtualBox home directory</link>.
7382 When reading this property, a full path is
7383 always returned.
7384 </note>
7385 <note>
7386 The specified path may not exist, it will be created
7387 when necessary.
7388 </note>
7389
7390 <see>
7391 <link to="IVirtualBox::createMachine"/>,
7392 <link to="IVirtualBox::openMachine"/>
7393 </see>
7394 </desc>
7395 </attribute>
7396
7397 <attribute name="defaultHardDiskFolder" type="wstring">
7398 <desc>
7399 Full path to the default directory used to create new or open existing
7400 virtual disks.
7401
7402 This path is used when the storage unit of a hard disk is a regular file
7403 in the host's file system and only a file name that contains no path is
7404 given.
7405
7406 The initial value of this property is
7407 <tt>&lt;</tt>
7408 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7409 <tt>&gt;/HardDisks</tt>.
7410
7411 <note>
7412 Setting this property to @c null or empty string will restore the
7413 initial value.
7414 </note>
7415 <note>
7416 When settings this property, the specified path can be relative
7417 to the
7418 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7419 absolute. When reading this property, a full path is
7420 always returned.
7421 </note>
7422 <note>
7423 The specified path may not exist, it will be created
7424 when necessary.
7425 </note>
7426
7427 <see>
7428 IMedium,
7429 <link to="IVirtualBox::createHardDisk"/>,
7430 <link to="IVirtualBox::openHardDisk"/>,
7431 <link to="IMedium::location"/>
7432 </see>
7433 </desc>
7434 </attribute>
7435
7436 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7437 <desc>
7438 List of all medium storage formats supported by this VirtualBox
7439 installation.
7440
7441 Keep in mind that the medium format identifier
7442 (<link to="IMediumFormat::id"/>) used in other API calls like
7443 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7444 medium format is a case-insensitive string. This means that, for
7445 example, all of the following strings:
7446 <pre>
7447 "VDI"
7448 "vdi"
7449 "VdI"</pre>
7450 refer to the same medium format.
7451
7452 Note that the virtual medium framework is backend-based, therefore
7453 the list of supported formats depends on what backends are currently
7454 installed.
7455
7456 <see>
7457 <link to="IMediumFormat"/>,
7458 </see>
7459 </desc>
7460 </attribute>
7461
7462 <attribute name="defaultHardDiskFormat" type="wstring">
7463 <desc>
7464 Identifier of the default medium format used by VirtualBox.
7465
7466 The medium format set by this attribute is used by VirtualBox
7467 when the medium format was not specified explicitly. One example is
7468 <link to="IVirtualBox::createHardDisk"/> with the empty
7469 format argument. A more complex example is implicit creation of
7470 differencing media when taking a snapshot of a virtual machine:
7471 this operation will try to use a format of the parent medium first
7472 and if this format does not support differencing media the default
7473 format specified by this argument will be used.
7474
7475 The list of supported medium formats may be obtained by the
7476 <link to="#mediaFormats"/> call. Note that the default medium
7477 format must have a capability to create differencing media;
7478 otherwise operations that create media implicitly may fail
7479 unexpectedly.
7480
7481 The initial value of this property is <tt>"VDI"</tt> in the current
7482 version of the VirtualBox product, but may change in the future.
7483
7484 <note>
7485 Setting this property to @c null or empty string will restore the
7486 initial value.
7487 </note>
7488
7489 <see>
7490 <link to="#mediaFormats"/>,
7491 <link to="IMediumFormat::id"/>,
7492 <link to="IVirtualBox::createHardDisk"/>
7493 </see>
7494 </desc>
7495 </attribute>
7496
7497 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7498 <desc>
7499 Library that provides authentication for VRDP clients. The library
7500 is used if a virtual machine's authentication type is set to "external"
7501 in the VM RemoteDisplay configuration.
7502
7503 The system library extension (".DLL" or ".so") must be omitted.
7504 A full path can be specified; if not, then the library must reside on the
7505 system's default library path.
7506
7507 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7508 of that name in one of the default VirtualBox library directories.
7509
7510 For details about VirtualBox authentication libraries and how to implement
7511 them, please refer to the VirtualBox manual.
7512
7513 <note>
7514 Setting this property to @c null or empty string will restore the
7515 initial value.
7516 </note>
7517 </desc>
7518 </attribute>
7519
7520 <attribute name="webServiceAuthLibrary" type="wstring">
7521 <desc>
7522 Library that provides authentication for webservice clients. The library
7523 is used if a virtual machine's authentication type is set to "external"
7524 in the VM RemoteDisplay configuration and will be called from
7525 within the <link to="IWebsessionManager::logon" /> implementation.
7526
7527 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7528 there is no per-VM setting for this, as the webservice is a global
7529 resource (if it is running). Only for this setting (for the webservice),
7530 setting this value to a literal <tt>"null"</tt> string disables authentication,
7531 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7532 no matter what user name and password are supplied.
7533
7534 The initial value of this property is <tt>"VRDPAuth"</tt>,
7535 meaning that the webservice will use the same authentication
7536 library that is used by default for VBoxVRDP (again, see
7537 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7538 The format and calling convention of authentication libraries
7539 is the same for the webservice as it is for VBoxVRDP.
7540
7541 <note>
7542 Setting this property to @c null or empty string will restore the
7543 initial value.
7544 </note>
7545 </desc>
7546 </attribute>
7547
7548 <attribute name="LogHistoryCount" type="unsigned long">
7549 <desc>
7550 This value specifies how many old release log files are kept.
7551 </desc>
7552 </attribute>
7553
7554 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7555 <desc>This value hold the default audio driver for the current
7556 system.</desc>
7557 </attribute>
7558
7559 <method name="getMaxDevicesPerPortForStorageBus">
7560 <desc>Returns the maximum number of devices which can be attached to a port
7561 for the given storage bus.</desc>
7562
7563 <param name="bus" type="StorageBus" dir="in">
7564 <desc>The storage bus type to get the value for.</desc>
7565 </param>
7566
7567 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
7568 <desc>The maximum number of devices which can eb attached to the port for the given
7569 storage bus.</desc>
7570 </param>
7571 </method>
7572
7573 <method name="getMinPortCountForStorageBus">
7574 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
7575
7576 <param name="bus" type="StorageBus" dir="in">
7577 <desc>The storage bus type to get the value for.</desc>
7578 </param>
7579
7580 <param name="minPortCount" type="unsigned long" dir="return">
7581 <desc>The minimum number of ports for the given storage bus.</desc>
7582 </param>
7583 </method>
7584
7585 <method name="getMaxPortCountForStorageBus">
7586 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
7587
7588 <param name="bus" type="StorageBus" dir="in">
7589 <desc>The storage bus type to get the value for.</desc>
7590 </param>
7591
7592 <param name="maxPortCount" type="unsigned long" dir="return">
7593 <desc>The maximum number of ports for the given storage bus.</desc>
7594 </param>
7595 </method>
7596
7597 <method name="getMaxInstancesOfStorageBus">
7598 <desc>Returns the maximum number of storage bus instances which
7599 can be configured for each VM. This corresponds to the number of
7600 storage controllers one can have.</desc>
7601
7602 <param name="bus" type="StorageBus" dir="in">
7603 <desc>The storage bus type to get the value for.</desc>
7604 </param>
7605
7606 <param name="maxInstances" type="unsigned long" dir="return">
7607 <desc>The maximum number of instances for the given storage bus.</desc>
7608 </param>
7609 </method>
7610 </interface>
7611
7612 <!--
7613 // IGuest
7614 /////////////////////////////////////////////////////////////////////////
7615 -->
7616
7617 <interface
7618 name="IGuestOSType" extends="$unknown"
7619 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
7620 wsmap="struct"
7621 >
7622 <desc>
7623 </desc>
7624
7625 <attribute name="familyId" type="wstring" readonly="yes">
7626 <desc>Guest OS family identifier string.</desc>
7627 </attribute>
7628
7629 <attribute name="familyDescription" type="wstring" readonly="yes">
7630 <desc>Human readable description of the guest OS family.</desc>
7631 </attribute>
7632
7633 <attribute name="id" type="wstring" readonly="yes">
7634 <desc>Guest OS identifier string.</desc>
7635 </attribute>
7636
7637 <attribute name="description" type="wstring" readonly="yes">
7638 <desc>Human readable description of the guest OS.</desc>
7639 </attribute>
7640
7641 <attribute name="is64Bit" type="boolean" readonly="yes">
7642 <desc>Returns @c true if the given OS is 64-bit</desc>
7643 </attribute>
7644
7645 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7646 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7647 </attribute>
7648
7649 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7650 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7651 </attribute>
7652
7653 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7654 <desc>Recommended RAM size in Megabytes.</desc>
7655 </attribute>
7656
7657 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7658 <desc>Recommended video RAM size in Megabytes.</desc>
7659 </attribute>
7660
7661 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7662 <desc>Recommended hard disk size in Megabytes.</desc>
7663 </attribute>
7664
7665 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7666 <desc>Returns recommended network adapter for this OS type.</desc>
7667 </attribute>
7668 </interface>
7669
7670 <interface
7671 name="IGuest" extends="$unknown"
7672 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7673 wsmap="managed"
7674 >
7675 <desc>
7676 The IGuest interface represents information about the operating system
7677 running inside the virtual machine. Used in
7678 <link to="IConsole::guest"/>.
7679
7680 IGuest provides information about the guest operating system, whether
7681 Guest Additions are installed and other OS-specific virtual machine
7682 properties.
7683 </desc>
7684
7685 <attribute name="OSTypeId" type="wstring" readonly="yes">
7686 <desc>
7687 Identifier of the Guest OS type as reported by the Guest
7688 Additions.
7689 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7690 an IGuestOSType object representing details about the given
7691 Guest OS type.
7692 <note>
7693 If Guest Additions are not installed, this value will be
7694 the same as <link to="IMachine::OSTypeId"/>.
7695 </note>
7696 </desc>
7697 </attribute>
7698
7699 <attribute name="additionsActive" type="boolean" readonly="yes">
7700 <desc>
7701 Flag whether the Guest Additions are installed and active
7702 in which case their version will be returned by the
7703 <link to="#additionsVersion"/> property.
7704 </desc>
7705 </attribute>
7706
7707 <attribute name="additionsVersion" type="wstring" readonly="yes">
7708 <desc>
7709 Version of the Guest Additions (3 decimal numbers separated
7710 by dots) or empty when the Additions are not installed. The
7711 Additions may also report a version but yet not be active as
7712 the version might be refused by VirtualBox (incompatible) or
7713 other failures occurred.
7714 </desc>
7715 </attribute>
7716
7717 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7718 <desc>
7719 Flag whether seamless guest display rendering (seamless desktop
7720 integration) is supported.
7721 </desc>
7722 </attribute>
7723
7724 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7725 <desc>
7726 Flag whether the guest is in graphics mode. If it is not, then
7727 seamless rendering will not work, resize hints are not immediately
7728 acted on and guest display resizes are probably not initiated by
7729 the guest additions.
7730 </desc>
7731 </attribute>
7732
7733 <attribute name="memoryBalloonSize" type="unsigned long">
7734 <desc>Guest system memory balloon size in megabytes.</desc>
7735 </attribute>
7736
7737 <attribute name="statisticsUpdateInterval" type="unsigned long">
7738 <desc>Interval to update guest statistics in seconds.</desc>
7739 </attribute>
7740
7741 <method name="setCredentials">
7742 <desc>
7743 Store login credentials that can be queried by guest operating
7744 systems with Additions installed. The credentials are transient
7745 to the session and the guest may also choose to erase them. Note
7746 that the caller cannot determine whether the guest operating system
7747 has queried or made use of the credentials.
7748
7749 <result name="VBOX_E_VM_ERROR">
7750 VMM device is not available.
7751 </result>
7752
7753 </desc>
7754 <param name="userName" type="wstring" dir="in">
7755 <desc>User name string, can be empty</desc>
7756 </param>
7757 <param name="password" type="wstring" dir="in">
7758 <desc>Password string, can be empty</desc>
7759 </param>
7760 <param name="domain" type="wstring" dir="in">
7761 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7762 </param>
7763 <param name="allowInteractiveLogon" type="boolean" dir="in">
7764 <desc>
7765 Flag whether the guest should alternatively allow the user to
7766 interactively specify different credentials. This flag might
7767 not be supported by all versions of the Additions.
7768 </desc>
7769 </param>
7770 </method>
7771
7772 <method name="getStatistic">
7773 <desc>
7774 Query specified guest statistics as reported by the VirtualBox Additions.
7775 </desc>
7776 <param name="cpuId" type="unsigned long" dir="in">
7777 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7778 </param>
7779 <param name="statistic" type="GuestStatisticType" dir="in">
7780 <desc>Statistic type.</desc>
7781 </param>
7782 <param name="statVal" type="unsigned long" dir="return">
7783 <desc>Statistics value</desc>
7784 </param>
7785 </method>
7786
7787 </interface>
7788
7789
7790 <!--
7791 // IProgress
7792 /////////////////////////////////////////////////////////////////////////
7793 -->
7794
7795 <interface
7796 name="IProgress" extends="$unknown"
7797 uuid="62827ef1-c098-40eb-be96-36d0508489a6"
7798 wsmap="managed"
7799 >
7800 <desc>
7801 The IProgress interface is used to track and control
7802 asynchronous tasks within VirtualBox.
7803
7804 An instance of this is returned every time VirtualBox starts
7805 an asynchronous task (in other words, a separate thread) which
7806 continues to run after a method call returns. For example,
7807 <link to="IConsole::saveState" />, which saves the state of
7808 a running virtual machine, can take a long time to complete.
7809 To be able to display a progress bar, a user interface such as
7810 the VirtualBox graphical user interface can use the IProgress
7811 object returned by that method.
7812
7813 Note that IProgress is a "read-only" interface in the sense
7814 that only the VirtualBox internals behind the Main API can
7815 create and manipulate progress objects, whereas client code
7816 can only use the IProgress object to monitor a task's
7817 progress and, if <link to="#cancelable" /> is @c true,
7818 cancel the task by calling <link to="#cancel" />.
7819
7820 A task represented by IProgress consists of either one or
7821 several sub-operations that run sequentially, one by one (see
7822 <link to="#operation" /> and <link to="#operationCount" />).
7823 Every operation is identified by a number (starting from 0)
7824 and has a separate description.
7825
7826 You can find the individual percentage of completion of the current
7827 operation in <link to="#operationPercent" /> and the
7828 percentage of completion of the task as a whole
7829 in <link to="#percent" />.
7830
7831 Similarly, you can wait for the completion of a particular
7832 operation via <link to="#waitForOperationCompletion" /> or
7833 for the completion of the whole task via
7834 <link to="#waitForCompletion" />.
7835 </desc>
7836
7837 <attribute name="id" type="uuid" mod="string" readonly="yes">
7838 <desc>ID of the task.</desc>
7839 </attribute>
7840
7841 <attribute name="description" type="wstring" readonly="yes">
7842 <desc>Description of the task.</desc>
7843 </attribute>
7844
7845 <attribute name="initiator" type="$unknown" readonly="yes">
7846 <desc>Initiator of the task.</desc>
7847 </attribute>
7848
7849 <attribute name="cancelable" type="boolean" readonly="yes">
7850 <desc>Whether the task can be interrupted.</desc>
7851 </attribute>
7852
7853 <attribute name="percent" type="unsigned long" readonly="yes">
7854 <desc>
7855 Current progress value of the task as a whole, in percent.
7856 This value depends on how many operations are already complete.
7857 Returns 100 if <link to="#completed" /> is @c true.
7858 </desc>
7859 </attribute>
7860
7861 <attribute name="timeRemaining" type="long" readonly="yes">
7862 <desc>
7863 Estimated remaining time until the task completes, in
7864 seconds. Returns 0 once the task has completed; returns -1
7865 if the remaining time cannot be computed, in particular if
7866 the current progress is 0.
7867
7868 Even if a value is returned, the estimate will be unreliable
7869 for low progress values. It will become more reliable as the
7870 task progresses; it is not recommended to display an ETA
7871 before at least 20% of a task have completed.
7872 </desc>
7873 </attribute>
7874
7875 <attribute name="completed" type="boolean" readonly="yes">
7876 <desc>Whether the task has been completed.</desc>
7877 </attribute>
7878
7879 <attribute name="canceled" type="boolean" readonly="yes">
7880 <desc>Whether the task has been canceled.</desc>
7881 </attribute>
7882
7883 <attribute name="resultCode" type="long" readonly="yes">
7884 <desc>
7885 Result code of the progress task.
7886 Valid only if <link to="#completed"/> is @c true.
7887 </desc>
7888 </attribute>
7889
7890 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7891 <desc>
7892 Extended information about the unsuccessful result of the
7893 progress operation. May be @c null if no extended information
7894 is available.
7895 Valid only if <link to="#completed"/> is @c true and
7896 <link to="#resultCode"/> indicates a failure.
7897 </desc>
7898 </attribute>
7899
7900 <attribute name="operationCount" type="unsigned long" readonly="yes">
7901 <desc>
7902 Number of sub-operations this task is divided into.
7903 Every task consists of at least one suboperation.
7904 </desc>
7905 </attribute>
7906
7907 <attribute name="operation" type="unsigned long" readonly="yes">
7908 <desc>Number of the sub-operation being currently executed.</desc>
7909 </attribute>
7910
7911 <attribute name="operationDescription" type="wstring" readonly="yes">
7912 <desc>
7913 Description of the sub-operation being currently executed.
7914 </desc>
7915 </attribute>
7916
7917 <attribute name="operationPercent" type="unsigned long" readonly="yes">
7918 <desc>Progress value of the current sub-operation only, in percent.</desc>
7919 </attribute>
7920
7921 <method name="setCurrentOperationProgress">
7922 <desc>Internal method, not to be called externally.</desc>
7923 <param name="percent" type="unsigned long" dir="in" />
7924 </method>
7925 <method name="setNextOperation">
7926 <desc>Internal method, not to be called externally.</desc>
7927 <param name="nextOperationDescription" type="wstring" dir="in" />
7928 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
7929 </method>
7930
7931 <method name="waitForCompletion">
7932 <desc>
7933 Waits until the task is done (including all sub-operations)
7934 with a given timeout in milliseconds; specify -1 for an indefinite wait.
7935
7936 <result name="VBOX_E_IPRT_ERROR">
7937 Failed to wait for task completion.
7938 </result>
7939 </desc>
7940
7941 <param name="timeout" type="long" dir="in">
7942 <desc>
7943 Maximum time in milliseconds to wait or -1 to wait indefinitely.
7944 </desc>
7945 </param>
7946 </method>
7947
7948 <method name="waitForOperationCompletion">
7949 <desc>
7950 Waits until the given operation is done with a given timeout in
7951 milliseconds; specify -1 for an indefinite wait.
7952
7953 <result name="VBOX_E_IPRT_ERROR">
7954 Failed to wait for operation completion.
7955 </result>
7956
7957 </desc>
7958 <param name="operation" type="unsigned long" dir="in">
7959 <desc>
7960 Number of the operation to wait for.
7961 Must be less than <link to="#operationCount"/>.
7962 </desc>
7963 </param>
7964 <param name="timeout" type="long" dir="in">
7965 <desc>
7966 Maximum time in milliseconds to wait or -1 to wait indefinitely.
7967 </desc>
7968 </param>
7969 </method>
7970
7971 <method name="cancel">
7972 <desc>
7973 Cancels the task.
7974 <note>
7975 If <link to="#cancelable"/> is @c false, then this method will fail.
7976 </note>
7977
7978 <result name="VBOX_E_INVALID_OBJECT_STATE">
7979 Operation cannot be canceled.
7980 </result>
7981
7982 </desc>
7983 </method>
7984
7985 </interface>
7986
7987
7988 <!--
7989 // ISnapshot
7990 /////////////////////////////////////////////////////////////////////////
7991 -->
7992
7993 <interface
7994 name="ISnapshot" extends="$unknown"
7995 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
7996 wsmap="managed"
7997 >
7998 <desc>
7999 The ISnapshot interface represents a snapshot of the virtual
8000 machine.
8001
8002 Together with the differencing media that are created
8003 when a snapshot is taken, a machine can be brought back to
8004 the exact state it was in when the snapshot was taken.
8005
8006 The ISnapshot interface has no methods, only attributes; snapshots
8007 are controlled through methods of the <link to="IConsole" /> interface
8008 which also manage the media associated with the snapshot.
8009 The following operations exist:
8010
8011 <ul>
8012 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8013 by creating new, empty differencing images for the machine's
8014 media and saving the VM settings and (if the VM is running)
8015 the current VM state in the snapshot.
8016
8017 The differencing images will then receive all data written to
8018 the machine's media, while their parent (base) images
8019 remain unmodified after the snapshot has been taken (see
8020 <link to="IMedium" /> for details about differencing images).
8021 This simplifies restoring a machine to the state of a snapshot:
8022 only the differencing images need to be deleted.
8023
8024 The current machine state is not changed by taking a snapshot.
8025 If the machine is running, it will resume execution after the
8026 snapshot has been taken.
8027 </li>
8028
8029 <li><link to="IConsole::discardCurrentState"/>: this goes back to
8030 a previous snapshot. This resets the machine's state to that of
8031 the previous snapshot by deleting the differencing image of each
8032 of the machine's media and setting the machine's settings
8033 and state to the state that was saved in the snapshot (if any).
8034
8035 This destroys the machine's current state.
8036 </li>
8037
8038 <li><link to="IConsole::discardSnapshot"/>: deletes a snapshot
8039 without affecting the current machine state.
8040
8041 This does not change the machine, but instead frees the resources
8042 allocated when the snapshot was taken: the settings and machine state
8043 is deleted (if any), and the snapshot's differencing image for each
8044 of the machine's media gets merged with its parent image.
8045
8046 Neither the current machine state nor other snapshots are affected
8047 by this operation, except that parent disk images will be modified
8048 to contain the disk data associated with the snapshot being deleted.
8049 </li>
8050
8051 <li><link to="IConsole::discardCurrentSnapshotAndState"/>:
8052 this completely reverts the virtual machine to the state it was in
8053 before the current snapshot has been taken. Effectively, this goes
8054 back to the state before the current snapshot, which might be
8055 an earlier snapshot.
8056
8057 The current state, as well as the current snapshot, are lost.
8058 </li>
8059 </ul>
8060
8061 Each snapshot contains the settings of the virtual machine (hardware
8062 configuration etc.). In addition, if the machine was running when the
8063 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8064 the current VM state is saved in the snapshot (similarly to what happens
8065 when a VM's state is saved). The snapshot is then said to
8066 be <i>online</i> because when restoring it, the VM will be running.
8067
8068 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8069 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8070
8071 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8072 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8073 it then contains a so-called "zero execution state", representing a
8074 machine that is powered off.
8075
8076 <h3>Snapshot branches and the "current" snapshot</h3>
8077
8078 Snapshots can be chained, whereby every next snapshot is based on the
8079 previous one. This chaining is related to medium branching
8080 (see the <link to="IMedium"/> description) in that every time
8081 a new snapshot is created, a new differencing medium is implicitly
8082 created for all normal media attached to the machine.
8083
8084 Each virtual machine has a "current snapshot", identified by
8085 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8086 to the last snapshot in the chain. In a future version of VirtualBox,
8087 it will be possible to reset a machine's current state to that of an
8088 earlier snapshot without discarding the current state so that it will be
8089 possible to create alternative snapshot paths in a snapshot tree.
8090
8091 In the current implementation, multiple snapshot branches within one
8092 virtual machine are not allowed. Every machine has a single branch,
8093 and <link to="IConsole::takeSnapshot"/> operation adds a new
8094 snapshot to the top of that branch.
8095 </desc>
8096
8097 <attribute name="id" type="uuid" mod="string" readonly="yes">
8098 <desc>UUID of the snapshot.</desc>
8099 </attribute>
8100
8101 <attribute name="name" type="wstring">
8102 <desc>Short name of the snapshot.</desc>
8103 </attribute>
8104
8105 <attribute name="description" type="wstring">
8106 <desc>Optional description of the snapshot.</desc>
8107 </attribute>
8108
8109 <attribute name="timeStamp" type="long long" readonly="yes">
8110 <desc>
8111 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8112 </desc>
8113 </attribute>
8114
8115 <attribute name="online" type="boolean" readonly="yes">
8116 <desc>
8117 @c true if this snapshot is an online snapshot and @c false otherwise.
8118
8119 When this attribute is @c true, the
8120 <link to="IMachine::stateFilePath"/> attribute of the
8121 <link to="#machine"/> object associated with this snapshot
8122 will point to the saved state file. Otherwise, it will be
8123 an empty string.
8124 </desc>
8125 </attribute>
8126
8127 <attribute name="machine" type="IMachine" readonly="yes">
8128 <desc>
8129 Virtual machine this snapshot is taken on. This object
8130 stores all settings the machine had when taking this snapshot.
8131 <note>
8132 The returned machine object is immutable, i.e. no
8133 any settings can be changed.
8134 </note>
8135 </desc>
8136 </attribute>
8137
8138 <attribute name="parent" type="ISnapshot" readonly="yes">
8139 <desc>
8140 Parent snapshot (a snapshot this one is based on), or
8141 @c null if the snapshot has no parent.
8142 </desc>
8143 </attribute>
8144
8145 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8146 <desc>
8147 Child snapshots (all snapshots having this one as a parent).
8148 <note>
8149 In the current implementation, there can be only one
8150 child snapshot, or no children at all, meaning this is the
8151 last (head) snapshot.
8152 </note>
8153 </desc>
8154 </attribute>
8155
8156 </interface>
8157
8158
8159 <!--
8160 // IMedium
8161 /////////////////////////////////////////////////////////////////////////
8162 -->
8163
8164 <enum
8165 name="MediumState"
8166 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8167 >
8168 <desc>
8169 Virtual medium state.
8170 <see>IMedium</see>
8171 </desc>
8172
8173 <const name="NotCreated" value="0">
8174 <desc>
8175 Associated medium storage does not exist (either was not created yet or
8176 was deleted).
8177 </desc>
8178 </const>
8179 <const name="Created" value="1">
8180 <desc>
8181 Associated storage exists and accessible.
8182 </desc>
8183 </const>
8184 <const name="LockedRead" value="2">
8185 <desc>
8186 Medium is locked for reading, no data modification is possible.
8187 </desc>
8188 </const>
8189 <const name="LockedWrite" value="3">
8190 <desc>
8191 Medium is locked for writing, no concurrent data reading or modification
8192 is possible.
8193 </desc>
8194 </const>
8195 <const name="Inaccessible" value="4">
8196 <desc>
8197 Associated medium storage is not accessible.
8198 </desc>
8199 </const>
8200 <const name="Creating" value="5">
8201 <desc>
8202 Associated medium storage is being created.
8203 </desc>
8204 </const>
8205 <const name="Deleting" value="6">
8206 <desc>
8207 Associated medium storage is being deleted.
8208 </desc>
8209 </const>
8210 </enum>
8211
8212 <enum
8213 name="MediumType"
8214 uuid="11f6f7a5-0327-409a-9d42-7db6a0cec578"
8215 >
8216 <desc>
8217 Virtual medium type.
8218 <see>IMedium</see>
8219 </desc>
8220
8221 <const name="Normal" value="0">
8222 <desc>
8223 Normal medium (attached directly or indirectly, preserved
8224 when taking snapshots).
8225 </desc>
8226 </const>
8227 <const name="Immutable" value="1">
8228 <desc>
8229 Immutable medium (attached indirectly, changes are wiped out
8230 after powering off the virtual machine).
8231 </desc>
8232 </const>
8233 <const name="Writethrough" value="2">
8234 <desc>
8235 Write through medium (attached directly, ignored when
8236 taking snapshots).
8237 </desc>
8238 </const>
8239 </enum>
8240
8241 <enum
8242 name="MediumVariant"
8243 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8244 >
8245 <desc>
8246 Virtual medium image variant. More than one flag may be set.
8247 <see>IMedium</see>
8248 </desc>
8249
8250 <const name="Standard" value="0">
8251 <desc>
8252 No particular variant requested, results in using the backend default.
8253 </desc>
8254 </const>
8255 <const name="VmdkSplit2G" value="0x01">
8256 <desc>
8257 VMDK image split in chunks of less than 2GByte.
8258 </desc>
8259 </const>
8260 <const name="VmdkStreamOptimized" value="0x04">
8261 <desc>
8262 VMDK streamOptimized image. Special import/export format which is
8263 read-only/append-only.
8264 </desc>
8265 </const>
8266 <const name="VmdkESX" value="0x08">
8267 <desc>
8268 VMDK format variant used on ESX products.
8269 </desc>
8270 </const>
8271 <const name="Fixed" value="0x10000">
8272 <desc>
8273 Fixed image. Only allowed for base images.
8274 </desc>
8275 </const>
8276 <const name="Diff" value="0x20000">
8277 <desc>
8278 Fixed image. Only allowed for base images.
8279 </desc>
8280 </const>
8281 </enum>
8282
8283 <interface
8284 name="IMediumAttachment" extends="$unknown"
8285 uuid="0dcf987b-a024-453f-bace-7eb9f885a413"
8286 wsmap="struct"
8287 >
8288 <desc>
8289 The IMediumAttachment interface represents the attachment
8290 of a storage medium to a virtual machine. Each machine contains
8291 an array of its medium attachments in <link to="IMachine::mediumAttachments"/>.
8292
8293 Each medium attachment specifies a storage controller as well as a port
8294 and device number. Fixed media (hard disks) will always also specify
8295 an instance of IMedium in <link to="#medium" />, referring to the hard disk
8296 image or images that represent the virtual hard disk. For removeable media,
8297 the IMedia instance is optional; it can be NULL if no media is mounted (see
8298 <link to="IMachine::mountMedium" />).
8299 </desc>
8300
8301 <attribute name="medium" type="IMedium" readonly="yes">
8302 <desc>Medium object associated with this attachment; it
8303 can be NULL for removable devices.</desc>
8304 </attribute>
8305
8306 <attribute name="controller" type="wstring" readonly="yes">
8307 <desc>Name of the storage controller of this attachment; this
8308 refers to one of the controllers in <link to="IMachine::storageControllers" />
8309 by name.</desc>
8310 </attribute>
8311
8312 <attribute name="port" type="long" readonly="yes">
8313 <desc>Port number of this attachment.</desc>
8314 </attribute>
8315
8316 <attribute name="device" type="long" readonly="yes">
8317 <desc>Device slot number of this attachment.</desc>
8318 </attribute>
8319
8320 <attribute name="type" type="DeviceType" readonly="yes">
8321 <desc>Device type of this attachment.</desc>
8322 </attribute>
8323
8324 <attribute name="passthrough" type="boolean" readonly="no">
8325 <desc>Pass I/O requests through to a device on the host.</desc>
8326 </attribute>
8327
8328 </interface>
8329
8330 <interface
8331 name="IMedium" extends="$unknown"
8332 uuid="62551115-83b8-4d20-925f-79e9d3c00f96"
8333 wsmap="managed"
8334 >
8335 <desc>
8336 The IMedium interface represents virtual storage for a machine's
8337 hard disks, CD/DVD or floppy drives. It will typically represent
8338 a disk image on the host, for example a VDI or VMDK file representing
8339 a virtual hard disk, or an ISO or RAW file representing virtual
8340 removable media, but can also point to a network location (e.g.
8341 for iSCSI targets).
8342
8343 Instances of IMedium are connected to virtual machines by way of
8344 medium attachments (see <link to="IMediumAttachment" />), which link
8345 the storage medium to a particular device slot of a storage controller
8346 of the virtual machine.
8347 In the VirtualBox API, virtual storage is therefore always represented
8348 by the following chain of object links:
8349
8350 <ul>
8351 <li><link to="IMachine::storageControllers"/> contains an array of
8352 storage controllers (IDE, SATA, SCSI or a floppy controller;
8353 these are instances of <link to="IStorageController"/>).</li>
8354 <li><link to="IMachine::mediumAttachments"/> contains an array of
8355 medium attachments (instances of <link to="IMediumAttachment"/>),
8356 each containing the name of a storage controller from the above
8357 array, a port/device specification, and an instance of
8358 IMedium representing the medium storage (image file). For removable
8359 media, the storage medium is optional; a medium attachment with no
8360 medium represents a CD/DVD or floppy drive with no medium inserted.
8361 By contrast, hard disk attachments will always have an IMedium
8362 object attached.</li>
8363 <li>Each IMedium in turn points to a storage unit (such as a file on the host
8364 computer or a network resource) that holds actual data. The location of
8365 the storage unit is represented by the <link to="#location"/> attribute.
8366 The value of this attribute is medium type dependent.</li>
8367 </ul>
8368
8369 Existing media are opened using the following methods, depending on the
8370 media type:
8371 <ul>
8372 <li><link to="IVirtualBox::openHardDisk"/></li>
8373 <li><link to="IVirtualBox::openDVDImage"/></li>
8374 <li><link to="IVirtualBox::openFloppyImage"/></li>
8375 </ul>
8376
8377 New hard disk media can be created with the VirtualBox API using the
8378 <link to="IVirtualBox::createHardDisk"/> method.
8379
8380 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8381 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8382 type in a regular file.
8383
8384 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8385 drive; in that case the <link to="#id" /> attribute contains the UUID of
8386 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8387
8388 <h3>Known media</h3>
8389
8390 When an existing medium is opened for the first time, it is automatically
8391 remembered by the given VirtualBox installation or, in other words, becomes
8392 a <i>known medium</i>. Known media are stored in the media
8393 registry transparently maintained by VirtualBox and stored in settings
8394 files so that this registry is preserved when VirtualBox is not running.
8395
8396 Newly created virtual media are remembered only when the associated
8397 storage unit is actually created.
8398
8399 All known media can be enumerated using
8400 <link to="IVirtualBox::hardDisks"/>,
8401 <link to="IVirtualBox::DVDImages"/> and
8402 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8403 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8404 and similar methods or by location using
8405 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8406
8407 Only known media can be attached to virtual machines.
8408
8409 Removing known media from the media registry is performed when the given
8410 medium is closed using the <link to="#close"/> method or when its
8411 associated storage unit is deleted.
8412
8413 <h3>Accessibility checks</h3>
8414
8415 The given medium (with the created storage unit) is considered to be
8416 <i>accessible</i> when its storage unit can be read. In that case, the
8417 <link to="#state"/> attribute has a value of "Created".
8418 When the storage unit cannot be read (for example, because it is located on
8419 a disconnected network resource, or was accidentally deleted outside VirtualBox),
8420 the medium is considered to be <i>inaccessible</i>, which is indicated by the
8421 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8422 obtained by reading the <link to="#lastAccessError"/> attribute.
8423
8424 A new accessibility check is performed each time the <link to="#state"/>
8425 attribute is read. This check may take long time (several seconds or even
8426 minutes, depending on the storage unit location and format), and will
8427 block the calling thread until finished. For this reason, it is recommended
8428 to never read this attribute on the main UI thread to avoid making the UI
8429 unresponsive.
8430
8431 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
8432 created for the first time), all known media are in the
8433 <link to="MediumState_Inaccessible"/> state but the value of the <link
8434 to="#lastAccessError"/> attribute is an empty string because no actual
8435 accessibility check is made on startup. This is done to make the
8436 VirtualBox object ready for serving requests as
8437 fast as possible and let the end-user application decide if it needs to
8438 check media accessibility right away or not.
8439
8440 <h3>Hard disk types</h3>
8441
8442 There are three types of hard disk images (see <link to="MediumType" />):
8443 "normal", "immutable" and "writethrough", represented by the
8444 <link to="#type"/> attribute. The type of the hard disk defines how the
8445 hard disk is attached to a virtual machine and what happens when a
8446 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8447 attached hard disk is taken.
8448
8449 All hard disks can be also divided in two groups: <i>base</i> hard
8450 disks and <i>differencing</i> hard disks. A base hard disk contains all
8451 sectors of the hard disk data in its own storage and therefore can be
8452 used independently. On the contrary, a differencing hard disk is a
8453 "delta" to some other disk and contains only those sectors which differ
8454 from that other disk, which is then called a <i>parent</i>. The differencing
8455 hard disk is said to be <i>linked to</i> that parent.
8456 The parent may be itself a differencing image, thus forming a chain of
8457 linked hard disks. The last element in that chain
8458 must always be a base medium. Note that several differencing
8459 hard disks may be linked to the same parent hard disk.
8460
8461 Differencing hard disks can be distinguished from base hard disks by
8462 querying the <link to="#parent"/> attribute: base hard disks do not have
8463 parents they would depend on, so the value of this attribute is always
8464 @c null for them. Using this attribute, it is possible to walk up
8465 the hard disk tree (from the child hard disk to its parent). It is also
8466 possible to walk down the tree using the <link to="#children"/>
8467 attribute.
8468
8469 Note that the type of all differencing hard disks is
8470 <link to="MediumType_Normal" />; all other values are
8471 meaningless for them. Base hard disks may be of any type.
8472
8473 <h3>Creating hard disks</h3>
8474
8475 New base hard disks are created using
8476 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8477 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8478 disks are usually implicitly created by VirtualBox when needed but may
8479 also be created explicitly using <link to="#createDiffStorage"/>.
8480
8481 After the hard disk is successfully created (including the storage unit)
8482 or opened, it becomes a known hard disk (remembered in the internal media
8483 registry). Known hard disks can be attached to a virtual machine, accessed
8484 through <link to="IVirtualBox::getHardDisk"/> and
8485 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8486 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8487
8488 The following methods, besides <link to="IMedium::close"/>,
8489 automatically remove the hard disk from the media registry:
8490 <ul>
8491 <li><link to="#deleteStorage"/></li>
8492 <li><link to="#mergeTo"/></li>
8493 </ul>
8494
8495 If the storage unit of the hard disk is a regular file in the host's
8496 file system then the rules stated in the description of the
8497 <link to="IMedium::location"/> attribute apply when setting its value. In
8498 addition, a plain file name without any path may be given, in which case
8499 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8500 folder</link> will be prepended to it.
8501
8502 <h4>Automatic composition of the file name part</h4>
8503
8504 Another extension to the <link to="IMedium::location"/> attribute is that
8505 there is a possibility to cause VirtualBox to compose a unique value for
8506 the file name part of the location using the UUID of the hard disk. This
8507 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
8508 e.g. before the storage unit is created, and works as follows. You set the
8509 value of the <link to="IMedium::location"/> attribute to a location
8510 specification which only contains the path specification but not the file
8511 name part and ends with either a forward slash or a backslash character.
8512 In response, VirtualBox will generate a new UUID for the hard disk and
8513 compose the file name using the following pattern:
8514 <pre>
8515 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8516 </pre>
8517 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8518 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8519 is the default extension for the storage format of this hard disk. After
8520 that, you may call any of the methods that create a new hard disk storage
8521 unit and they will use the generated UUID and file name.
8522
8523 <h3>Attaching Hard Disks</h3>
8524
8525 Hard disks are attached to virtual machines using the
8526 <link to="IMachine::attachDevice"/> method and detached using the
8527 <link to="IMachine::detachDevice"/> method. Depending on their
8528 <link to="#type"/>, hard disks are attached either
8529 <i>directly</i> or <i>indirectly</i>.
8530
8531 When a hard disk is being attached directly, it is associated with the
8532 virtual machine and used for hard disk operations when the machine is
8533 running. When a hard disk is being attached indirectly, a new differencing
8534 hard disk linked to it is implicitly created and this differencing hard
8535 disk is associated with the machine and used for hard disk operations.
8536 This also means that if <link to="IMachine::attachDevice"/> performs
8537 a direct attachment then the same hard disk will be returned in response
8538 to the subsequent <link to="IMachine::getMedium"/> call; however if
8539 an indirect attachment is performed then
8540 <link to="IMachine::getMedium"/> will return the implicitly created
8541 differencing hard disk, not the original one passed to <link
8542 to="IMachine::attachDevice"/>. In detail:
8543
8544 <ul>
8545 <li><b>Normal base</b> hard disks that do not have children (i.e.
8546 differencing hard disks linked to them) and that are not already
8547 attached to virtual machines in snapshots are attached <b>directly</b>.
8548 Otherwise, they are attached <b>indirectly</b> because having
8549 dependent children or being part of the snapshot makes it impossible
8550 to modify hard disk contents without breaking the integrity of the
8551 dependent party. The <link to="#readOnly"/> attribute allows to
8552 quickly determine the kind of the attachment for the given hard
8553 disk. Note that if a normal base hard disk is to be indirectly
8554 attached to a virtual machine with snapshots then a special
8555 procedure called <i>smart attachment</i> is performed (see below).</li>
8556 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
8557 they are attached <b>directly</b> if they do not have children and are
8558 not attached to virtual machines in snapshots, and <b>indirectly</b>
8559 otherwise. Note that the smart attachment procedure is never performed
8560 for differencing hard disks.</li>
8561 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
8562 they are designed to be non-writable. If an immutable hard disk is
8563 attached to a virtual machine with snapshots then a special
8564 procedure called smart attachment is performed (see below).</li>
8565 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
8566 also as designed. This also means that writethrough hard disks cannot
8567 have other hard disks linked to them at all.</li>
8568 </ul>
8569
8570 Note that the same hard disk, regardless of its type, may be attached to
8571 more than one virtual machine at a time. In this case, the machine that is
8572 started first gains exclusive access to the hard disk and attempts to
8573 start other machines having this hard disk attached will fail until the
8574 first machine is powered down.
8575
8576 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8577 that the given hard disk remains associated with the given machine after a
8578 successful <link to="IMachine::detachDevice"/> call until
8579 <link to="IMachine::saveSettings"/> is called to save all changes to
8580 machine settings to disk. This deferring is necessary to guarantee that
8581 the hard disk configuration may be restored at any time by a call to
8582 <link to="IMachine::discardSettings"/> before the settings
8583 are saved (committed).
8584
8585 Note that if <link to="IMachine::discardSettings"/> is called after
8586 indirectly attaching some hard disks to the machine but before a call to
8587 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8588 all differencing hard disks implicitly created by
8589 <link to="IMachine::attachDevice"/> for these indirect attachments.
8590 Such implicitly created hard disks will also be immediately deleted when
8591 detached explicitly using the <link to="IMachine::detachDevice"/>
8592 call if it is made before <link to="IMachine::saveSettings"/>. This
8593 implicit deletion is safe because newly created differencing hard
8594 disks do not contain any user data.
8595
8596 However, keep in mind that detaching differencing hard disks that were
8597 implicitly created by <link to="IMachine::attachDevice"/>
8598 before the last <link to="IMachine::saveSettings"/> call will
8599 <b>not</b> implicitly delete them as they may already contain some data
8600 (for example, as a result of virtual machine execution). If these hard
8601 disks are no more necessary, the caller can always delete them explicitly
8602 using <link to="#deleteStorage"/> after they are actually de-associated
8603 from this machine by the <link to="IMachine::saveSettings"/> call.
8604
8605 <h3>Smart Attachment</h3>
8606
8607 When normal base or immutable hard disks are indirectly attached to a
8608 virtual machine then some additional steps are performed to make sure the
8609 virtual machine will have the most recent "view" of the hard disk being
8610 attached. These steps include walking through the machine's snapshots
8611 starting from the current one and going through ancestors up to the first
8612 snapshot. Hard disks attached to the virtual machine in all
8613 of the encountered snapshots are checked whether they are descendants of
8614 the given normal base or immutable hard disk. The first found child (which
8615 is the differencing hard disk) will be used instead of the normal base or
8616 immutable hard disk as a parent for creating a new differencing hard disk
8617 that will be actually attached to the machine. And only if no descendants
8618 are found or if the virtual machine does not have any snapshots then the
8619 normal base or immutable hard disk will be used itself as a parent for
8620 this differencing hard disk.
8621
8622 It is easier to explain what smart attachment does using the
8623 following example:
8624 <pre>
8625BEFORE attaching B.vdi: AFTER attaching B.vdi:
8626
8627Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8628 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8629 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8630 Snapshot 4 (none) Snapshot 4 (none)
8631 CurState (none) CurState (D3->D2.vdi)
8632
8633 NOT
8634 ...
8635 CurState (D3->B.vdi)
8636 </pre>
8637 The first column is the virtual machine configuration before the base hard
8638 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8639 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8640 mean that the hard disk that is actually attached to the machine is a
8641 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8642 another hard disk, <tt>B.vdi</tt>.
8643
8644 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8645 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8646 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8647 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8648 it cannot be attached directly and needs an indirect attachment (i.e.
8649 implicit creation of a new differencing hard disk). Due to the smart
8650 attachment procedure, the new differencing hard disk
8651 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8652 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8653 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8654 machine.
8655
8656 Note that if there is more than one descendant hard disk of the given base
8657 hard disk found in a snapshot, and there is an exact device, channel and
8658 bus match, then this exact match will be used. Otherwise, the youngest
8659 descendant will be picked up.
8660
8661 There is one more important aspect of the smart attachment procedure which
8662 is not related to snapshots at all. Before walking through the snapshots
8663 as described above, the backup copy of the current list of hard disk
8664 attachment is searched for descendants. This backup copy is created when
8665 the hard disk configuration is changed for the first time after the last
8666 <link to="IMachine::saveSettings"/> call and used by
8667 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8668 changes. When such a descendant is found in this backup copy, it will be
8669 simply re-attached back, without creating a new differencing hard disk for
8670 it. This optimization is necessary to make it possible to re-attach the
8671 base or immutable hard disk to a different bus, channel or device slot
8672 without losing the contents of the differencing hard disk actually
8673 attached to the machine in place of it.
8674 </desc>
8675
8676 <attribute name="id" type="uuid" mod="string" readonly="yes">
8677 <desc>
8678 UUID of the medium. For a newly created medium, this value is a randomly
8679 generated UUID.
8680
8681 <note>
8682 For media in one of MediumState_NotCreated, MediumState_Creating or
8683 MediumState_Deleting states, the value of this property is undefined
8684 and will most likely be an empty UUID.
8685 </note>
8686 </desc>
8687 </attribute>
8688
8689 <attribute name="description" type="wstring">
8690 <desc>
8691 Optional description of the medium. For a newly created medium the value
8692 of this attribute is an empty string.
8693
8694 Medium types that don't support this attribute will return E_NOTIMPL in
8695 attempt to get or set this attribute's value.
8696
8697 <note>
8698 For some storage types, reading this attribute may return an outdated
8699 (last known) value when <link to="#state"/> is <link
8700 to="MediumState_Inaccessible"/> or <link
8701 to="MediumState_LockedWrite"/> because the value of this attribute is
8702 stored within the storage unit itself. Also note that changing the
8703 attribute value is not possible in such case, as well as when the
8704 medium is the <link to="MediumState_LockedRead"/> state.
8705 </note>
8706 </desc>
8707 </attribute>
8708
8709 <attribute name="state" type="MediumState" readonly="yes">
8710 <desc>
8711 Current medium state. Inspect <link to="MediumState"/> values for details.
8712
8713 Reading this attribute may take a long time because an accessibility
8714 check of the storage unit is performed each time the attribute is read.
8715 This check may cause a significant delay if the storage unit of the
8716 given medium is, for example, a file located on a network share which is
8717 not currently accessible due to connectivity problems -- the call will
8718 not return until a timeout interval defined by the host OS for this
8719 operation expires.
8720
8721 If the last known state of the medium is <link to="MediumState_Created"/>
8722 and the accessibility check fails then the state would be set to
8723 <link to="MediumState_Inaccessible"/> and <link to="#lastAccessError"/>
8724 may be used to get more details about the failure. If the state of the
8725 medium is <link to="MediumState_LockedRead"/> or
8726 <link to="MediumState_LockedWrite"/> then it remains the same, and a
8727 non-empty value of <link to="#lastAccessError"/> will indicate a failed
8728 accessibility check in this case.
8729
8730 Note that not all medium states are applicable to all medium types.
8731 </desc>
8732 </attribute>
8733
8734 <attribute name="location" type="wstring">
8735 <desc>
8736 Location of the storage unit holding medium data.
8737
8738 The format of the location string is medium type specific. For medium
8739 types using regular files in a host's file system, the location
8740 string is the full file name.
8741
8742 Some medium types may support changing the storage unit location by
8743 simply changing the value of this property. If this operation is not
8744 supported, the implementation will return E_NOTIMPL in attempt to set
8745 this attribute's value.
8746
8747 When setting a value of the location attribute which is a regular file
8748 in the host's file system, the given file name may be either relative to
8749 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8750 absolute. Note that if the given location specification does not contain
8751 the file extension part then a proper default extension will be
8752 automatically appended by the implementation depending on the medium type.
8753 </desc>
8754 </attribute>
8755
8756 <attribute name="name" type="wstring" readonly="yes">
8757 <desc>
8758 Name of the storage unit holding medium data.
8759
8760 The returned string is a short version of the <link to="#location"/>
8761 attribute that is suitable for representing the medium in situations
8762 where the full location specification is too long (such as lists
8763 and comboboxes in GUI frontends). This string is also used by frontends
8764 to sort the media list alphabetically when needed.
8765
8766 For example, for locations that are regular files in the host's file
8767 system, the value of this attribute is just the file name (+ extension),
8768 without the path specification.
8769
8770 Note that as opposed to the <link to="#location"/> attribute, the name
8771 attribute will not necessary be unique for a list of media of the
8772 given type and format.
8773 </desc>
8774 </attribute>
8775
8776 <attribute name="hostDrive" type="boolean" readonly="yes">
8777 <desc>True if this corresponds to a drive on the host.</desc>
8778 </attribute>
8779
8780 <attribute name="size" type="unsigned long long" readonly="yes">
8781 <desc>
8782 Physical size of the storage unit used to hold medium data (in bytes).
8783
8784 <note>
8785 For media whose <link to="#state"/> is <link
8786 to="MediumState_Inaccessible"/>, the value of this property is the
8787 last known size. For <link to="MediumState_NotCreated"/> media,
8788 the returned value is zero.
8789 </note>
8790 </desc>
8791 </attribute>
8792
8793 <attribute name="format" type="wstring" readonly="yes">
8794 <desc>
8795 Storage format of this medium.
8796
8797 The value of this attribute is a string that specifies a backend used to
8798 store hard disk data. The storage format is defined when you create a
8799 new hard disk or automatically detected when you open an existing hard
8800 disk medium, and cannot be changed later.
8801
8802 The list of all storage formats supported by this VirtualBox
8803 installation can be obtained using
8804 <link to="ISystemProperties::mediumFormats"/>.
8805 </desc>
8806 </attribute>
8807
8808 <attribute name="type" type="MediumType">
8809 <desc>
8810 Type (role) of this hard disk.
8811
8812 The following constraints apply when changing the value of this
8813 attribute:
8814 <ul>
8815 <li>If a hard disk is attached to a virtual machine (either in the
8816 current state or in one of the snapshots), its type cannot be
8817 changed.
8818 </li>
8819 <li>As long as the hard disk has children, its type cannot be set
8820 to <link to="MediumType_Writethrough"/>.
8821 </li>
8822 <li>The type of all differencing hard disks is
8823 <link to="MediumType_Normal"/> and cannot be changed.
8824 </li>
8825 </ul>
8826
8827 The type of a newly created or opened hard disk is set to
8828 <link to="MediumType_Normal"/>.
8829 </desc>
8830 </attribute>
8831
8832 <attribute name="parent" type="IMedium" readonly="yes">
8833 <desc>
8834 Parent of this hard disk (a hard disk this hard disk is directly based
8835 on).
8836
8837 Only differencing hard disks have parents. For base (non-differencing)
8838 hard disks, @c null is returned.
8839 </desc>
8840 </attribute>
8841
8842 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
8843 <desc>
8844 Children of this hard disk (all differencing hard disks directly based
8845 on this hard disk). A @c null array is returned if this hard disk
8846 does not have any children.
8847 </desc>
8848 </attribute>
8849
8850 <attribute name="base" type="IMedium" readonly="yes">
8851 <desc>
8852 Base medium of this medium.
8853
8854 If this is a differencing medium, its base hard disk is the medium
8855 the given hard disk branch starts from. For all other types of hard
8856 disks, this property returns the hard disk object itself (i.e. the same
8857 object this property is read on).
8858 </desc>
8859 </attribute>
8860
8861 <attribute name="readOnly" type="boolean" readonly="yes">
8862 <desc>
8863 Returns @c true if this hard disk is read-only and @c false otherwise.
8864
8865 A hard disk is considered to be read-only when its contents cannot be
8866 modified without breaking the integrity of other parties that depend on
8867 this hard disk such as its child hard disks or snapshots of virtual
8868 machines where this hard disk is attached to these machines. If there
8869 are no children and no such snapshots then there is no dependency and
8870 the hard disk is not read-only.
8871
8872 The value of this attribute can be used to determine the kind of the
8873 attachment that will take place when attaching this hard disk to a
8874 virtual machine. If the value is @c false then the hard disk will
8875 be attached directly. If the value is @c true then the hard disk
8876 will be attached indirectly by creating a new differencing child hard
8877 disk for that. See the interface description for more information.
8878
8879 Note that all <link to="MediumType_Immutable">Immutable</link> hard
8880 disks are always read-only while all
8881 <link to="MediumType_Writethrough">Writethrough</link> hard disks are
8882 always not.
8883
8884 <note>
8885 The read-only condition represented by this attribute is related to
8886 the hard disk type and usage, not to the current
8887 <link to="IMedium::state">medium state</link> and not to the read-only
8888 state of the storage unit.
8889 </note>
8890 </desc>
8891 </attribute>
8892
8893 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
8894 <desc>
8895 Logical size of this hard disk (in megabytes), as reported to the
8896 guest OS running inside the virtual machine this disk is
8897 attached to. The logical size is defined when the hard disk is created
8898 and cannot be changed later.
8899
8900 <note>
8901 Reading this property on a differencing hard disk will return the size
8902 of its <link to="#base"/> medium.
8903 </note>
8904 <note>
8905 For hard disks whose state is <link to="#state"/> is <link
8906 to="MediumState_Inaccessible"/>, the value of this property is the
8907 last known logical size. For <link to="MediumaState_NotCreated"/> hard
8908 disks, the returned value is zero.
8909 </note>
8910 </desc>
8911 </attribute>
8912
8913 <attribute name="autoReset" type="boolean">
8914 <desc>
8915 Whether this differencing hard disk will be automatically reset each
8916 time a virtual machine it is attached to is powered up.
8917
8918 See <link to="#reset()"/> for more information about resetting
8919 differencing hard disks.
8920
8921 <note>
8922 Reading this property on a base (non-differencing) hard disk will
8923 always @c false. Changing the value of this property in this
8924 case is not supported.
8925 </note>
8926
8927 <result name="VBOX_E_NOT_SUPPORTED">
8928 This is not a differencing hard disk (when changing the attribute
8929 value).
8930 </result>
8931 </desc>
8932 </attribute>
8933
8934 <attribute name="lastAccessError" type="wstring" readonly="yes">
8935 <desc>
8936 Text message that represents the result of the last accessibility
8937 check.
8938
8939 Accessibility checks are performed each time the <link to="#state"/>
8940 attribute is read. An empty string is returned if the last
8941 accessibility check was successful. A non-empty string indicates a
8942 failure and should normally describe a reason of the failure (for
8943 example, a file read error).
8944 </desc>
8945 </attribute>
8946
8947 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
8948 <desc>
8949 Array of UUIDs of all machines this medium is attached to.
8950
8951 A @c null array is returned if this medium is not attached to any
8952 machine or to any machine's snapshot.
8953
8954 <note>
8955 The returned array will include a machine even if this medium is not
8956 attached to that machine in the current state but attached to it in
8957 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
8958 details.
8959 </note>
8960 </desc>
8961 </attribute>
8962
8963 <method name="getSnapshotIds">
8964 <desc>
8965 Returns an array of UUIDs of all snapshots of the given machine where
8966 this medium is attached to.
8967
8968 If the medium is attached to the machine in the current state, then the
8969 first element in the array will always be the ID of the queried machine
8970 (i.e. the value equal to the @c machineId argument), followed by
8971 snapshot IDs (if any).
8972
8973 If the medium is not attached to the machine in the current state, then
8974 the array will contain only snapshot IDs.
8975
8976 The returned array may be @c null if this medium is not attached
8977 to the given machine at all, neither in the current state nor in one of
8978 the snapshots.
8979 </desc>
8980 <param name="machineId" type="uuid" mod="string" dir="in">
8981 <desc>
8982 UUID of the machine to query.
8983 </desc>
8984 </param>
8985 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
8986 <desc>
8987 Array of snapshot UUIDs of the given machine using this medium.
8988 </desc>
8989 </param>
8990 </method>
8991
8992 <method name="lockRead">
8993 <desc>
8994 Locks this medium for reading.
8995
8996 The read lock is shared: many clients can simultaneously lock the
8997 same medium for reading unless it is already locked for writing (see
8998 <link to="#lockWrite"/>) in which case an error is returned.
8999
9000 When the medium is locked for reading, it cannot be modified
9001 from within VirtualBox. This means that any method that changes
9002 the properties of this medium or contents of the storage unit
9003 will return an error (unless explicitly stated otherwise) and
9004 that an attempt to start a virtual machine that wants to modify
9005 the medium will also fail.
9006
9007 When the virtual machine is started up, it locks for reading all
9008 media it uses in read-only mode. If some medium cannot be locked
9009 for reading, the startup procedure will fail.
9010
9011 The medium locked for reading must be unlocked using the <link
9012 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9013 can be nested and must be followed by the same number of paired
9014 <link to="#unlockRead"/> calls.
9015
9016 This method sets the medium state to <link
9017 to="MediumState_LockedRead" /> on success. The state prior to
9018 this call must be <link to="MediumState_Created" />,
9019 <link to="MediumState_Inaccessible" /> or
9020 <link to="MediumState_LockedRead" />.
9021 As you can see, an inaccessible medium can be locked too. This is
9022 not an error; this method performs a logical lock that prevents
9023 modifications of this medium through the VirtualBox API, not a
9024 physical lock of the underlying storage unit.
9025
9026 This method returns the current state of the medium
9027 <b>before</b> the operation.
9028
9029 <result name="VBOX_E_INVALID_OBJECT_STATE">
9030 Invalid medium state (e.g. not created, locked, inaccessible,
9031 creating, deleting).
9032 </result>
9033
9034 </desc>
9035 <param name="state" type="MediumState" dir="return">
9036 <desc>
9037 State of the medium after the operation.
9038 </desc>
9039 </param>
9040 </method>
9041
9042 <method name="unlockRead">
9043 <desc>
9044 Cancels the read lock previously set by <link to="#lockRead"/>.
9045
9046 For both, success and failure, this method returns the current state
9047 of the medium <b>after</b> the operation.
9048
9049 See <link to="#lockRead"/> for more details.
9050
9051 <result name="VBOX_E_INVALID_OBJECT_STATE">
9052 Medium not locked for reading.
9053 </result>
9054
9055 </desc>
9056 <param name="state" type="MediumState" dir="return">
9057 <desc>
9058 State of the medium after the operation.
9059 </desc>
9060 </param>
9061 </method>
9062
9063 <method name="lockWrite">
9064 <desc>
9065 Locks this medium for writing.
9066
9067 The write lock, as opposed to <link to="#lockRead"/>, is
9068 exclusive: there may be only one client holding a write lock
9069 and there may be no read locks while the write lock is held.
9070
9071 When the medium is locked for writing, it cannot be modified
9072 from within VirtualBox and it is not guaranteed that the values
9073 of its properties are up-to-date. Any method that changes the
9074 properties of this medium or contents of the storage unit will
9075 return an error (unless explicitly stated otherwise) and an
9076 attempt to start a virtual machine wanting to modify or to
9077 read the medium will fail.
9078
9079 When the virtual machine is started up, it locks for writing all
9080 media it uses to write data to. If any medium could not be locked
9081 for writing, the startup procedure will fail.
9082
9083 The medium locked for writing must be unlocked using the <link
9084 to="#unlockWrite"/> method. Calls to <link to="#lockWrite"/>
9085 can <b>not</b> be nested and must be followed by a<link
9086 to="#unlockWrite"/> call before the next lockWrite call.
9087
9088 This method sets the medium state to <link to="MediumState_LockedWrite" />
9089 on success. The state prior to this call must be <link to="MediumState_Created"/>
9090 or <link to="MediumState_Inaccessible"/>. As you can see, an inaccessible
9091 medium can be locked too. This is not an error; this method
9092 performs a logical lock preventing modifications of this
9093 medium through the VirtualBox API, not a physical lock of the
9094 underlying storage unit.
9095
9096 For both, success and failure, this method returns the current
9097 state of the medium <b>before</b> the operation.
9098
9099 <result name="VBOX_E_INVALID_OBJECT_STATE">
9100 Invalid medium state (e.g. not created, locked, inaccessible,
9101 creating, deleting).
9102 </result>
9103
9104 </desc>
9105 <param name="state" type="MediumState" dir="return">
9106 <desc>
9107 State of the medium after the operation.
9108 </desc>
9109 </param>
9110 </method>
9111
9112 <method name="unlockWrite">
9113 <desc>
9114 Cancels the write lock previously set by <link to="#lockWrite"/>.
9115
9116 For both, success and failure, this method returns the current
9117 state of the medium <b>after</b> the operation.
9118
9119 See <link to="#lockWrite"/> for more details.
9120
9121 <result name="VBOX_E_INVALID_OBJECT_STATE">
9122 Medium not locked for writing.
9123 </result>
9124
9125 </desc>
9126 <param name="state" type="MediumState" dir="return">
9127 <desc>
9128 State of the medium after the operation.
9129 </desc>
9130 </param>
9131 </method>
9132
9133 <method name="close">
9134 <desc>
9135 Closes this medium.
9136
9137 The medium must not be attached to any known virtual machine
9138 and must not have any known child media, otherwise the
9139 operation will fail.
9140
9141 When the medium is successfully closed, it gets removed from
9142 the list of remembered media, but its storage unit is not
9143 deleted. In particular, this means that this medium can be
9144 later opened again using the <link
9145 to="IVirtualBox::openHardDisk"/> call.
9146
9147 Note that after this method successfully returns, the given medium
9148 object becomes uninitialized. This means that any attempt
9149 to call any of its methods or attributes will fail with the
9150 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9151
9152 <result name="VBOX_E_INVALID_OBJECT_STATE">
9153 Invalid medium state (other than not created, created or
9154 inaccessible).
9155 </result>
9156 <result name="VBOX_E_OBJECT_IN_USE">
9157 Medium attached to virtual machine.
9158 </result>
9159 <result name="VBOX_E_FILE_ERROR">
9160 Settings file not accessible.
9161 </result>
9162 <result name="VBOX_E_XML_ERROR">
9163 Could not parse the settings file.
9164 </result>
9165
9166 </desc>
9167 </method>
9168
9169 <!-- storage methods -->
9170
9171 <method name="getProperty">
9172 <desc>
9173 Returns the value of the custom hard disk property with the given name.
9174
9175 The list of all properties supported by the given hard disk format can
9176 be obtained with <link to="IMediumFormat::describeProperties"/>.
9177
9178 Note that if this method returns an empty string in @a value, the
9179 requested property is supported but currently not assigned any value.
9180
9181 <result name="VBOX_E_OBJECT_NOT_FOUND">
9182 Requested property does not exist (not supported by the format).
9183 </result>
9184 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9185 </desc>
9186 <param name="name" type="wstring" dir="in">
9187 <desc>Name of the property to get.</desc>
9188 </param>
9189 <param name="value" type="wstring" dir="return">
9190 <desc>Current property value.</desc>
9191 </param>
9192 </method>
9193
9194 <method name="setProperty">
9195 <desc>
9196 Sets the value of the custom hard disk property with the given name.
9197
9198 The list of all properties supported by the given hard disk format can
9199 be obtained with <link to="IMediumFormat::describeProperties"/>.
9200
9201 Note that setting the property value to @c null or an empty string is
9202 equivalent to deleting the existing value. A default value (if it is
9203 defined for this property) will be used by the format backend in this
9204 case.
9205
9206 <result name="VBOX_E_OBJECT_NOT_FOUND">
9207 Requested property does not exist (not supported by the format).
9208 </result>
9209 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9210 </desc>
9211 <param name="name" type="wstring" dir="in">
9212 <desc>Name of the property to set.</desc>
9213 </param>
9214 <param name="value" type="wstring" dir="in">
9215 <desc>Property value to set.</desc>
9216 </param>
9217 </method>
9218
9219 <method name="getProperties">
9220 <desc>
9221 Returns values for a group of properties in one call.
9222
9223 The names of the properties to get are specified using the @a names
9224 argument which is a list of comma-separated property names or
9225 an empty string if all properties are to be returned. Note that currently
9226 the value of this argument is ignored and the method always returns all
9227 existing properties.
9228
9229 The list of all properties supported by the given hard disk format can
9230 be obtained with <link to="IMediumFormat::describeProperties"/>.
9231
9232 The method returns two arrays, the array of property names corresponding
9233 to the @a names argument and the current values of these properties.
9234 Both arrays have the same number of elements with each elemend at the
9235 given index in the first array corresponds to an element at the same
9236 index in the second array.
9237
9238 Note that for properties that do not have assigned values,
9239 an empty string is returned at the appropriate index in the
9240 @a returnValues array.
9241
9242 </desc>
9243 <param name="names" type="wstring" dir="in">
9244 <desc>
9245 Names of properties to get.
9246 </desc>
9247 </param>
9248 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9249 <desc>Names of returned properties.</desc>
9250 </param>
9251 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9252 <desc>Values of returned properties.</desc>
9253 </param>
9254 </method>
9255
9256 <method name="setProperties">
9257 <desc>
9258 Sets values for a group of properties in one call.
9259
9260 The names of the properties to set are passed in the @a names
9261 array along with the new values for them in the @a values array. Both
9262 arrays have the same number of elements with each elemend at the given
9263 index in the first array corresponding to an element at the same index
9264 in the second array.
9265
9266 If there is at least one property name in @a names that is not valid,
9267 the method will fail before changing the values of any other properties
9268 from the @a names array.
9269
9270 Using this method over <link to="#setProperty"/> is preferred if you
9271 need to set several properties at once since it will result into less
9272 IPC calls.
9273
9274 The list of all properties supported by the given hard disk format can
9275 be obtained with <link to="IMediumFormat::describeProperties"/>.
9276
9277 Note that setting the property value to @c null or an empty string is
9278 equivalent to deleting the existing value. A default value (if it is
9279 defined for this property) will be used by the format backend in this
9280 case.
9281 </desc>
9282 <param name="names" type="wstring" safearray="yes" dir="in">
9283 <desc>Names of properties to set.</desc>
9284 </param>
9285 <param name="values" type="wstring" safearray="yes" dir="in">
9286 <desc>Values of properties to set.</desc>
9287 </param>
9288 </method>
9289
9290 <!-- storage methods -->
9291
9292 <method name="createBaseStorage">
9293 <desc>
9294 Starts creating a hard disk storage unit (fixed/dynamic, according
9295 to the variant flags) in in the background. The previous storage unit
9296 created for this object, if any, must first be deleted using
9297 <link to="#deleteStorage"/>, otherwise the operation will fail.
9298
9299 Before the operation starts, the hard disk is placed in
9300 <link to="MediumState_Creating"/> state. If the create operation
9301 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
9302 state.
9303
9304 After the returned progress object reports that the operation has
9305 successfully completed, the medium state will be set to <link
9306 to="MediumState_Created"/>, the hard disk will be remembered by this
9307 VirtualBox installation and may be attached to virtual machines.
9308
9309 <result name="VBOX_E_NOT_SUPPORTED">
9310 The variant of storage creation operation is not supported. See <link
9311 to="IMediumFormat::capabilities"/>.
9312 </result>
9313 </desc>
9314 <param name="logicalSize" type="unsigned long long" dir="in">
9315 <desc>Maximum logical size of the hard disk in megabytes.</desc>
9316 </param>
9317 <param name="variant" type="MediumVariant" dir="in">
9318 <desc>Exact image variant which should be created.</desc>
9319 </param>
9320 <param name="progress" type="IProgress" dir="return">
9321 <desc>Progress object to track the operation completion.</desc>
9322 </param>
9323 </method>
9324
9325 <method name="deleteStorage">
9326 <desc>
9327 Starts deleting the storage unit of this hard disk.
9328
9329 The hard disk must not be attached to any known virtual machine and must
9330 not have any known child hard disks, otherwise the operation will fail.
9331 It will also fail if there is no storage unit to delete or if deletion
9332 is already in progress, or if the hard disk is being in use (locked for
9333 read or for write) or inaccessible. Therefore, the only valid state for
9334 this operation to succeed is <link to="MediumState_Created"/>.
9335
9336 Before the operation starts, the hard disk is placed to
9337 <link to="MediumState_Deleting"/> state and gets removed from the list
9338 of remembered hard disks (media registry). If the delete operation
9339 fails, the medium will be remembered again and placed back to
9340 <link to="MediumState_Created"/> state.
9341
9342 After the returned progress object reports that the operation is
9343 complete, the medium state will be set to
9344 <link to="MediumState_NotCreated"/> and you will be able to use one of
9345 the storage creation methods to create it again.
9346
9347 <see>#close()</see>
9348
9349 <result name="VBOX_E_OBJECT_IN_USE">
9350 Hard disk is attached to a virtual machine.
9351 </result>
9352 <result name="VBOX_E_NOT_SUPPORTED">
9353 Storage deletion is not allowed because neither of storage creation
9354 operations are supported. See
9355 <link to="IMediumFormat::capabilities"/>.
9356 </result>
9357
9358 <note>
9359 If the deletion operation fails, it is not guaranteed that the storage
9360 unit still exists. You may check the <link to="IMedium::state"/> value
9361 to answer this question.
9362 </note>
9363 </desc>
9364 <param name="progress" type="IProgress" dir="return">
9365 <desc>Progress object to track the operation completion.</desc>
9366 </param>
9367 </method>
9368
9369 <!-- diff methods -->
9370
9371 <method name="createDiffStorage">
9372 <desc>
9373 Starts creating an empty differencing storage unit based on this hard
9374 disk in the format and at the location defined by the @a target
9375 argument.
9376
9377 The target hard disk must be in <link to="MediumState_NotCreated"/>
9378 state (i.e. must not have an existing storage unit). Upon successful
9379 completion, this operation will set the type of the target hard disk to
9380 <link to="MediumType_Normal"/> and create a storage unit necessary to
9381 represent the differencing hard disk data in the given format (according
9382 to the storage format of the target object).
9383
9384 After the returned progress object reports that the operation is
9385 successfully complete, the target hard disk gets remembered by this
9386 VirtualBox installation and may be attached to virtual machines.
9387
9388 <note>
9389 The hard disk will be set to <link to="MediumState_LockedRead"/>
9390 state for the duration of this operation.
9391 </note>
9392 <result name="VBOX_E_OBJECT_IN_USE">
9393 Hard disk not in @c NotCreated state.
9394 </result>
9395 </desc>
9396 <param name="target" type="IMedium" dir="in">
9397 <desc>Target hard disk.</desc>
9398 </param>
9399 <param name="variant" type="MediumVariant" dir="in">
9400 <desc>Exact image variant which should be created.</desc>
9401 </param>
9402 <param name="progress" type="IProgress" dir="return">
9403 <desc>Progress object to track the operation completion.</desc>
9404 </param>
9405 </method>
9406
9407 <method name="mergeTo">
9408 <desc>
9409 Starts merging the contents of this hard disk and all intermediate
9410 differencing hard disks in the chain to the given target hard disk.
9411
9412 The target hard disk must be either a descendant of this hard disk or
9413 its ancestor (otherwise this method will immediately return a failure).
9414 It follows that there are two logical directions of the merge operation:
9415 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9416 ancestor (<i>backward merge</i>). Let us consider the following hard disk
9417 chain:
9418
9419 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9420
9421 Here, calling this method on the <tt>Base</tt> hard disk object with
9422 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9423 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9424 merge. Note that in both cases the contents of the resulting hard disk
9425 will be the same, the only difference is the hard disk object that takes
9426 the result of the merge operation. In case of the forward merge in the
9427 above example, the result will be written to <tt>Diff_2</tt>; in case of
9428 the backward merge, the result will be written to <tt>Base</tt>. In
9429 other words, the result of the operation is always stored in the target
9430 hard disk.
9431
9432 Upon successful operation completion, the storage units of all hard
9433 disks in the chain between this (source) hard disk and the target hard
9434 disk, including the source hard disk itself, will be automatically
9435 deleted and the relevant hard disk objects (including this hard disk)
9436 will become uninitialized. This means that any attempt to call any of
9437 their methods or attributes will fail with the
9438 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9439 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9440 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
9441 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
9442 disk itself since it will no longer be based on any other hard disk.
9443
9444 Considering the above, all of the following conditions must be met in
9445 order for the merge operation to succeed:
9446 <ul>
9447 <li>
9448 Neither this (source) hard disk nor any intermediate
9449 differencing hard disk in the chain between it and the target
9450 hard disk is attached to any virtual machine.
9451 </li>
9452 <li>
9453 Neither the source hard disk nor the target hard disk is an
9454 <link to="MediumType_Immutable"/> hard disk.
9455 </li>
9456 <li>
9457 The part of the hard disk tree from the source hard disk to the
9458 target hard disk is a linear chain, i.e. all hard disks in this
9459 chain have exactly one child which is the next hard disk in this
9460 chain. The only exception from this rule is the target hard disk in
9461 the forward merge operation; it is allowed to have any number of
9462 child hard disks because the merge operation will hot change its
9463 logical contents (as it is seen by the guest OS or by children).
9464 </li>
9465 <li>
9466 None of the involved hard disks are in
9467 <link to="MediumState_LockedRead"/> or
9468 <link to="MediumState_LockedWrite"/> state.
9469 </li>
9470 </ul>
9471
9472 <note>
9473 This (source) hard disk and all intermediates will be placed to <link
9474 to="MediumState_Deleting"/> state and the target hard disk will be
9475 placed to <link to="MediumState_LockedWrite"/> state and for the
9476 duration of this operation.
9477 </note>
9478 </desc>
9479 <param name="targetId" type="uuid" mod="string" dir="in">
9480 <desc>UUID of the target ancestor or descendant hard disk.</desc>
9481 </param>
9482 <param name="progress" type="IProgress" dir="return">
9483 <desc>Progress object to track the operation completion.</desc>
9484 </param>
9485 </method>
9486
9487 <!-- clone method -->
9488
9489 <method name="cloneTo">
9490 <desc>
9491 Starts creating a clone of this hard disk in the format and at the
9492 location defined by the @a target argument.
9493
9494 The target hard disk must be either in <link to="MediumState_NotCreated"/>
9495 state (i.e. must not have an existing storage unit) or in
9496 <link to="MediumState_Created"/> state (i.e. created and not locked, and
9497 big enough to hold the data or else the copy will be partial). Upon
9498 successful completion, the cloned hard disk will contain exactly the
9499 same sector data as the hard disk being cloned, except that in the
9500 first case a new UUID for the clone will be randomly generated, and in
9501 the second case the UUID will remain unchanged.
9502
9503 The @a parent argument defines which hard disk will be the parent
9504 of the clone. Passing a @c null reference indicates that the clone will
9505 be a base image, i.e. completely independent. It is possible to specify
9506 an arbitrary hard disk for this parameter, including the parent of the
9507 hard disk which is being cloned. Even cloning to a child of the source
9508 hard disk is possible. Note that when cloning to an existing image, the
9509 @a parent irgument is ignored.
9510
9511 After the returned progress object reports that the operation is
9512 successfully complete, the target hard disk gets remembered by this
9513 VirtualBox installation and may be attached to virtual machines.
9514
9515 <note>
9516 This hard disk will be placed to <link to="MediumState_LockedRead"/>
9517 state for the duration of this operation.
9518 </note>
9519 <result name="E_NOTIMPL">
9520 The specified cloning variant is not supported at the moment.
9521 </result>
9522 </desc>
9523 <param name="target" type="IMedium" dir="in">
9524 <desc>Target hard disk.</desc>
9525 </param>
9526 <param name="variant" type="MediumVariant" dir="in">
9527 <desc>Exact image variant which should be created.</desc>
9528 </param>
9529 <param name="parent" type="IMedium" dir="in">
9530 <desc>Parent of the cloned hard disk.</desc>
9531 </param>
9532 <param name="progress" type="IProgress" dir="return">
9533 <desc>Progress object to track the operation completion.</desc>
9534 </param>
9535 </method>
9536
9537 <!-- other methods -->
9538
9539 <method name="compact">
9540 <desc>
9541 Starts compacting of this hard disk. This means that the disk is
9542 transformed into a possibly more compact storage representation.
9543 This potentially creates temporary images, which can require a
9544 substantial amount of additional disk space.
9545
9546 This hard disk will be placed to <link to="MediumState_LockedWrite"/>
9547 state and all its parent hard disks (if any) will be placed to
9548 <link to="MediumState_LockedRead"/> state for the duration of this
9549 operation.
9550
9551 Please note that the results can be either returned straight away,
9552 or later as the result of the background operation via the object
9553 returned via the @a progress parameter.
9554
9555 <result name="VBOX_E_NOT_SUPPORTED">
9556 Hard disk format does not support compacting (but potentially
9557 needs it).
9558 </result>
9559 </desc>
9560 <param name="progress" type="IProgress" dir="return">
9561 <desc>Progress object to track the operation completion.</desc>
9562 </param>
9563 </method>
9564
9565 <method name="reset">
9566 <desc>
9567 Starts erasing the contents of this differencing hard disk.
9568
9569 This operation will reset the differencing hard disk to its initial
9570 state when it does not contain any sector data and any read operation is
9571 redirected to its parent hard disk.
9572
9573 This hard disk will be placed to <link to="MediumState_LockedWrite"/>
9574 for the duration of this operation.
9575
9576 <result name="VBOX_E_NOT_SUPPORTED">
9577 This is not a differencing hard disk.
9578 </result>
9579 <result name="VBOX_E_INVALID_OBJECT_STATE">
9580 Hard disk is not in <link to="MediumState_Created"/> or
9581 <link to="MediumState_Inaccessible"/> state.
9582 </result>
9583 </desc>
9584 <param name="progress" type="IProgress" dir="return">
9585 <desc>Progress object to track the operation completion.</desc>
9586 </param>
9587 </method>
9588
9589 </interface>
9590
9591
9592 <!--
9593 // IMediumFormat
9594 /////////////////////////////////////////////////////////////////////////
9595 -->
9596
9597 <enum
9598 name="DataType"
9599 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9600 >
9601 <const name="Int32" value="0"/>
9602 <const name="Int8" value="1"/>
9603 <const name="String" value="2"/>
9604 </enum>
9605
9606 <enum
9607 name="DataFlags"
9608 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9609 >
9610 <const name="None" value="0x00"/>
9611 <const name="Mandatory" value="0x01"/>
9612 <const name="Expert" value="0x02"/>
9613 <const name="Array" value="0x04"/>
9614 <const name="FlagMask" value="0x07"/>
9615 </enum>
9616
9617 <enum
9618 name="MediumFormatCapabilities"
9619 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
9620 >
9621 <desc>
9622 Hard disk format capability flags.
9623 </desc>
9624
9625 <const name="Uuid" value="0x01">
9626 <desc>
9627 Supports UUIDs as expected by VirtualBox code.
9628 </desc>
9629 </const>
9630
9631 <const name="CreateFixed" value="0x02">
9632 <desc>
9633 Supports creating fixed size images, allocating all space instantly.
9634 </desc>
9635 </const>
9636
9637 <const name="CreateDynamic" value="0x04">
9638 <desc>
9639 Supports creating dynamically growing images, allocating space on
9640 demand.
9641 </desc>
9642 </const>
9643
9644 <const name="CreateSplit2G" value="0x08">
9645 <desc>
9646 Supports creating images split in chunks of a bit less than 2 GBytes.
9647 </desc>
9648 </const>
9649
9650 <const name="Differencing" value="0x10">
9651 <desc>
9652 Supports being used as a format for differencing media (see <link
9653 to="IMedium::createDiffStorage"/>).
9654 </desc>
9655 </const>
9656
9657 <const name="Asynchronous" value="0x20">
9658 <desc>
9659 Supports asynchronous I/O operations for at least some configurations.
9660 </desc>
9661 </const>
9662
9663 <const name="File" value="0x40">
9664 <desc>
9665 The format backend operates on files (the <link to="IMedium::location"/>
9666 attribute of the medium specifies a file used to store medium
9667 data; for a list of supported file extensions see
9668 <link to="IMediumFormat::fileExtensions"/>).
9669 </desc>
9670 </const>
9671
9672 <const name="Properties" value="0x80">
9673 <desc>
9674 The format backend uses the property interface to configure the storage
9675 location and properties (the <link to="IMediumFormat::describeProperties"/>
9676 method is used to get access to properties supported by the given medium format).
9677 </desc>
9678 </const>
9679
9680 <const name="CapabilityMask" value="0xFF"/>
9681 </enum>
9682
9683 <interface
9684 name="IMediumFormat" extends="$unknown"
9685 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
9686 wsmap="managed"
9687 >
9688 <desc>
9689 The IMediumFormat interface represents a medium format.
9690
9691 Each medium format has an associated backend which is used to handle
9692 media stored in this format. This interface provides information
9693 about the properties of the associated backend.
9694
9695 Each medium format is identified by a string represented by the
9696 <link to="#id"/> attribute. This string is used in calls like
9697 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9698 format.
9699
9700 The list of all supported medium formats can be obtained using
9701 <link to="ISystemProperties::mediaFormats"/>.
9702
9703 <see>IMedium</see>
9704 </desc>
9705
9706 <attribute name="id" type="wstring" readonly="yes">
9707 <desc>
9708 Identifier of this format.
9709
9710 The format identifier is a non-@c null non-empty ASCII string. Note that
9711 this string is case-insensitive. This means that, for example, all of
9712 the following strings:
9713 <pre>
9714 "VDI"
9715 "vdi"
9716 "VdI"</pre>
9717 refer to the same medium format.
9718
9719 This string is used in methods of other interfaces where it is necessary
9720 to specify a medium format, such as
9721 <link to="IVirtualBox::createHardDisk"/>.
9722 </desc>
9723 </attribute>
9724
9725 <attribute name="name" type="wstring" readonly="yes">
9726 <desc>
9727 Human readable description of this format.
9728
9729 Mainly for use in file open dialogs.
9730 </desc>
9731 </attribute>
9732
9733 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9734 <desc>
9735 Array of strings containing the supported file extensions.
9736
9737 The first extension in the array is the extension preferred by the
9738 backend. It is recommended to use this extension when specifying a
9739 location of the storage unit for a new medium.
9740
9741 Note that some backends do not work on files, so this array may be
9742 empty.
9743
9744 <see>IMediumFormat::capabilities</see>
9745 </desc>
9746 </attribute>
9747
9748 <attribute name="capabilities" type="unsigned long" readonly="yes">
9749 <desc>
9750 Capabilities of the format as a set of bit flags.
9751
9752 For the meaning of individual capability flags see
9753 <link to="MediumFormatCapabilities"/>.
9754 </desc>
9755 </attribute>
9756
9757 <method name="describeProperties">
9758 <desc>
9759 Returns several arrays describing the properties supported by this
9760 format.
9761
9762 An element with the given index in each array describes one
9763 property. Thus, the number of elements in each returned array is the
9764 same and corresponds to the number of supported properties.
9765
9766 The returned arrays are filled in only if the
9767 <link to="MediumFormatCapabilities_Properties"/> flag is set.
9768 All arguments must be non-@c null.
9769
9770 <see>DataType</see>
9771 <see>DataFlags</see>
9772 </desc>
9773
9774 <param name="names" type="wstring" safearray="yes" dir="out">
9775 <desc>Array of property names.</desc>
9776 </param>
9777 <param name="description" type="wstring" safearray="yes" dir="out">
9778 <desc>Array of property descriptions.</desc>
9779 </param>
9780 <param name="types" type="DataType" safearray="yes" dir="out">
9781 <desc>Array of property types.</desc>
9782 </param>
9783 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9784 <desc>Array of property flags.</desc>
9785 </param>
9786 <param name="defaults" type="wstring" safearray="yes" dir="out">
9787 <desc>Array of default property values.</desc>
9788 </param>
9789 </method>
9790
9791 </interface>
9792
9793
9794 <!--
9795 // IKeyboard
9796 /////////////////////////////////////////////////////////////////////////
9797 -->
9798
9799 <interface
9800 name="IKeyboard" extends="$unknown"
9801 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
9802 wsmap="managed"
9803 >
9804 <desc>
9805 The IKeyboard interface represents the virtual machine's keyboard. Used
9806 in <link to="IConsole::keyboard"/>.
9807
9808 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
9809 to the virtual machine.
9810
9811 </desc>
9812 <method name="putScancode">
9813 <desc>Sends a scancode to the keyboard.
9814
9815 <result name="VBOX_E_IPRT_ERROR">
9816 Could not send scan code to virtual keyboard.
9817 </result>
9818
9819 </desc>
9820 <param name="scancode" type="long" dir="in"/>
9821 </method>
9822
9823 <method name="putScancodes">
9824 <desc>Sends an array of scancodes to the keyboard.
9825
9826 <result name="VBOX_E_IPRT_ERROR">
9827 Could not send all scan codes to virtual keyboard.
9828 </result>
9829
9830 </desc>
9831 <param name="scancodes" type="long" dir="in" safearray="yes"/>
9832 <param name="codesStored" type="unsigned long" dir="return"/>
9833 </method>
9834
9835 <method name="putCAD">
9836 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
9837 function is nothing special, it is just a convenience function
9838 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
9839
9840 <result name="VBOX_E_IPRT_ERROR">
9841 Could not send all scan codes to virtual keyboard.
9842 </result>
9843
9844 </desc>
9845 </method>
9846
9847 </interface>
9848
9849
9850 <!--
9851 // IMouse
9852 /////////////////////////////////////////////////////////////////////////
9853 -->
9854
9855 <enum
9856 name="MouseButtonState"
9857 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
9858 >
9859 <desc>
9860 Mouse button state.
9861 </desc>
9862
9863 <const name="LeftButton" value="0x01"/>
9864 <const name="RightButton" value="0x02"/>
9865 <const name="MiddleButton" value="0x04"/>
9866 <const name="WheelUp" value="0x08"/>
9867 <const name="WheelDown" value="0x10"/>
9868 <const name="XButton1" value="0x20"/>
9869 <const name="XButton2" value="0x40"/>
9870 <const name="MouseStateMask" value="0x7F"/>
9871 </enum>
9872
9873 <interface
9874 name="IMouse" extends="$unknown"
9875 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
9876 wsmap="managed"
9877 >
9878 <desc>
9879 The IMouse interface represents the virtual machine's mouse. Used in
9880 <link to="IConsole::mouse"/>.
9881
9882 Through this interface, the virtual machine's virtual mouse can be
9883 controlled.
9884 </desc>
9885
9886 <attribute name="absoluteSupported" type="boolean" readonly="yes">
9887 <desc>
9888 Whether the guest OS supports absolute mouse pointer positioning
9889 or not.
9890 <note>
9891 VirtualBox Guest Tools need to be installed to the guest OS
9892 in order to enable absolute mouse positioning support.
9893 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
9894 callback to be instantly informed about changes of this attribute
9895 during virtual machine execution.
9896 </note>
9897 <see><link to="#putMouseEventAbsolute"/></see>
9898 </desc>
9899 </attribute>
9900
9901 <method name="putMouseEvent">
9902 <desc>
9903 Initiates a mouse event using relative pointer movements
9904 along x and y axis.
9905
9906 <result name="E_ACCESSDENIED">
9907 Console not powered up.
9908 </result>
9909 <result name="VBOX_E_IPRT_ERROR">
9910 Could not send mouse event to virtual mouse.
9911 </result>
9912
9913 </desc>
9914
9915 <param name="dx" type="long" dir="in">
9916 <desc>
9917 Amount of pixels the mouse should move to the right.
9918 Negative values move the mouse to the left.
9919 </desc>
9920 </param>
9921 <param name="dy" type="long" dir="in">
9922 <desc>
9923 Amount of pixels the mouse should move downwards.
9924 Negative values move the mouse upwards.
9925 </desc>
9926 </param>
9927 <param name="dz" type="long" dir="in">
9928 <desc>
9929 Amount of mouse wheel moves.
9930 Positive values describe clockwise wheel rotations,
9931 negative values describe counterclockwise rotations.
9932 </desc>
9933 </param>
9934 <param name="dw" type="long" dir="in">
9935 <desc>
9936 Amount of horizontal mouse wheel moves.
9937 Positive values describe a movement to the left,
9938 negative values describe a movement to the right.
9939 </desc>
9940 </param>
9941 <param name="buttonState" type="long" dir="in">
9942 <desc>
9943 The current state of mouse buttons. Every bit represents
9944 a mouse button as follows:
9945 <table>
9946 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9947 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9948 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9949 </table>
9950 A value of <tt>1</tt> means the corresponding button is pressed.
9951 otherwise it is released.
9952 </desc>
9953 </param>
9954 </method>
9955
9956 <method name="putMouseEventAbsolute">
9957 <desc>
9958 Positions the mouse pointer using absolute x and y coordinates.
9959 These coordinates are expressed in pixels and
9960 start from <tt>[1,1]</tt> which corresponds to the top left
9961 corner of the virtual display.
9962
9963 <result name="E_ACCESSDENIED">
9964 Console not powered up.
9965 </result>
9966 <result name="VBOX_E_IPRT_ERROR">
9967 Could not send mouse event to virtual mouse.
9968 </result>
9969
9970 <note>
9971 This method will have effect only if absolute mouse
9972 positioning is supported by the guest OS.
9973 </note>
9974
9975 <see><link to="#absoluteSupported"/></see>
9976 </desc>
9977
9978 <param name="x" type="long" dir="in">
9979 <desc>
9980 X coordinate of the pointer in pixels, starting from @c 1.
9981 </desc>
9982 </param>
9983 <param name="y" type="long" dir="in">
9984 <desc>
9985 Y coordinate of the pointer in pixels, starting from @c 1.
9986 </desc>
9987 </param>
9988 <param name="dz" type="long" dir="in">
9989 <desc>
9990 Amount of mouse wheel moves.
9991 Positive values describe clockwise wheel rotations,
9992 negative values describe counterclockwise rotations.
9993 </desc>
9994 </param>
9995 <param name="dw" type="long" dir="in">
9996 <desc>
9997 Amount of horizontal mouse wheel moves.
9998 Positive values describe a movement to the left,
9999 negative values describe a movement to the right.
10000 </desc>
10001 </param>
10002 <param name="buttonState" type="long" dir="in">
10003 <desc>
10004 The current state of mouse buttons. Every bit represents
10005 a mouse button as follows:
10006 <table>
10007 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10008 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10009 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10010 </table>
10011 A value of @c 1 means the corresponding button is pressed.
10012 otherwise it is released.
10013 </desc>
10014 </param>
10015 </method>
10016
10017 </interface>
10018
10019 <!--
10020 // IDisplay
10021 /////////////////////////////////////////////////////////////////////////
10022 -->
10023
10024 <enum
10025 name="FramebufferPixelFormat"
10026 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10027 >
10028 <desc>
10029 Format of the video memory buffer. Constants represented by this enum can
10030 be used to test for particular values of <link
10031 to="IFramebuffer::pixelFormat"/>. See also <link
10032 to="IFramebuffer::requestResize"/>.
10033
10034 See also www.fourcc.org for more information about FOURCC pixel formats.
10035 </desc>
10036
10037 <const name="Opaque" value="0">
10038 <desc>
10039 Unknown buffer format (the user may not assume any particular format of
10040 the buffer).
10041 </desc>
10042 </const>
10043 <const name="FOURCC_RGB" value="0x32424752">
10044 <desc>
10045 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10046 bit layout).
10047 </desc>
10048 </const>
10049 </enum>
10050
10051 <interface
10052 name="IFramebuffer" extends="$unknown"
10053 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10054 wsmap="suppress"
10055 >
10056 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10057 <desc>Address of the start byte of the frame buffer.</desc>
10058 </attribute>
10059
10060 <attribute name="width" type="unsigned long" readonly="yes">
10061 <desc>Frame buffer width, in pixels.</desc>
10062 </attribute>
10063
10064 <attribute name="height" type="unsigned long" readonly="yes">
10065 <desc>Frame buffer height, in pixels.</desc>
10066 </attribute>
10067
10068 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10069 <desc>
10070 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10071 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10072 are: 8, 15, 16, 24 and 32.
10073 </desc>
10074 </attribute>
10075
10076 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10077 <desc>
10078 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10079 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10080 size of the scan line must be aligned to 32 bits.
10081 </desc>
10082 </attribute>
10083
10084 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10085 <desc>
10086 Frame buffer pixel format. It's either one of the values defined by <link
10087 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10088 <note>
10089 This attribute must never return <link
10090 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10091 <link to="#address"/> points to must be always known.
10092 </note>
10093 </desc>
10094 </attribute>
10095
10096 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10097 <desc>
10098 Defines whether this frame buffer uses the virtual video card's memory
10099 buffer (guest VRAM) directly or not. See <link
10100 to="IFramebuffer::requestResize"/> for more information.
10101 </desc>
10102 </attribute>
10103
10104 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10105 <desc>
10106 Hint from the frame buffer about how much of the standard
10107 screen height it wants to use for itself. This information is
10108 exposed to the guest through the VESA BIOS and VMMDev interface
10109 so that it can use it for determining its video mode table. It
10110 is not guaranteed that the guest respects the value.
10111 </desc>
10112 </attribute>
10113
10114 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10115 <desc>
10116 An alpha-blended overlay which is superposed over the frame buffer.
10117 The initial purpose is to allow the display of icons providing
10118 information about the VM state, including disk activity, in front
10119 ends which do not have other means of doing that. The overlay is
10120 designed to controlled exclusively by IDisplay. It has no locking
10121 of its own, and any changes made to it are not guaranteed to be
10122 visible until the affected portion of IFramebuffer is updated. The
10123 overlay can be created lazily the first time it is requested. This
10124 attribute can also return @c null to signal that the overlay is not
10125 implemented.
10126 </desc>
10127 </attribute>
10128
10129 <attribute name="winId" type="unsigned long long" readonly="yes">
10130 <desc>
10131 Platform-dependent identifier of the window where context of this
10132 frame buffer is drawn, or zero if there's no such window.
10133 </desc>
10134 </attribute>
10135
10136 <method name="lock">
10137 <desc>
10138 Locks the frame buffer.
10139 Gets called by the IDisplay object where this frame buffer is
10140 bound to.
10141 </desc>
10142 </method>
10143
10144 <method name="unlock">
10145 <desc>
10146 Unlocks the frame buffer.
10147 Gets called by the IDisplay object where this frame buffer is
10148 bound to.
10149 </desc>
10150 </method>
10151
10152 <method name="notifyUpdate">
10153 <desc>
10154 Informs about an update.
10155 Gets called by the display object where this buffer is
10156 registered.
10157 </desc>
10158 <param name="x" type="unsigned long" dir="in"/>
10159 <param name="y" type="unsigned long" dir="in"/>
10160 <param name="width" type="unsigned long" dir="in"/>
10161 <param name="height" type="unsigned long" dir="in"/>
10162 </method>
10163
10164 <method name="requestResize">
10165 <desc>
10166 Requests a size and pixel format change.
10167
10168 There are two modes of working with the video buffer of the virtual
10169 machine. The <i>indirect</i> mode implies that the IFramebuffer
10170 implementation allocates a memory buffer for the requested display mode
10171 and provides it to the virtual machine. In <i>direct</i> mode, the
10172 IFramebuffer implementation uses the memory buffer allocated and owned
10173 by the virtual machine. This buffer represents the video memory of the
10174 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10175 usually faster because the implementation gets a raw pointer to the
10176 guest VRAM buffer which it can directly use for visualizing the contents
10177 of the virtual display, as opposed to the indirect mode where the
10178 contents of guest VRAM are copied to the memory buffer provided by
10179 the implementation every time a display update occurs.
10180
10181 It is important to note that the direct mode is really fast only when
10182 the implementation uses the given guest VRAM buffer directly, for
10183 example, by blitting it to the window representing the virtual machine's
10184 display, which saves at least one copy operation comparing to the
10185 indirect mode. However, using the guest VRAM buffer directly is not
10186 always possible: the format and the color depth of this buffer may be
10187 not supported by the target window, or it may be unknown (opaque) as in
10188 case of text or non-linear multi-plane VGA video modes. In this case,
10189 the indirect mode (that is always available) should be used as a
10190 fallback: when the guest VRAM contents are copied to the
10191 implementation-provided memory buffer, color and format conversion is
10192 done automatically by the underlying code.
10193
10194 The @a pixelFormat parameter defines whether the direct mode is
10195 available or not. If @a pixelFormat is <link
10196 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10197 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10198 @a bytesPerLine parameters must be ignored and the implementation must use
10199 the indirect mode (where it provides its own buffer in one of the
10200 supported formats). In all other cases, @a pixelFormat together with
10201 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10202 buffer pointed to by the @a VRAM parameter and the implementation is
10203 free to choose which mode to use. To indicate that this frame buffer uses
10204 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10205 attribute must return @c true and <link to="#address"/> must
10206 return exactly the same address that is passed in the @a VRAM parameter
10207 of this method; otherwise it is assumed that the indirect strategy is
10208 chosen.
10209
10210 The @a width and @a height parameters represent the size of the
10211 requested display mode in both modes. In case of indirect mode, the
10212 provided memory buffer should be big enough to store data of the given
10213 display mode. In case of direct mode, it is guaranteed that the given
10214 @a VRAM buffer contains enough space to represent the display mode of the
10215 given size. Note that this frame buffer's <link to="#width"/> and <link
10216 to="#height"/> attributes must return exactly the same values as
10217 passed to this method after the resize is completed (see below).
10218
10219 The @a finished output parameter determines if the implementation has
10220 finished resizing the frame buffer or not. If, for some reason, the
10221 resize cannot be finished immediately during this call, @a finished
10222 must be set to @c false, and the implementation must call
10223 <link to="IDisplay::resizeCompleted"/> after it has returned from
10224 this method as soon as possible. If @a finished is @c false, the
10225 machine will not call any frame buffer methods until
10226 <link to="IDisplay::resizeCompleted"/> is called.
10227
10228 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10229 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10230 this frame buffer must return exactly the same values as specified in the
10231 parameters of this method, after the resize is completed. If the
10232 indirect mode is chosen, these attributes must return values describing
10233 the format of the implementation's own memory buffer <link
10234 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10235 value must always correlate with <link to="#pixelFormat"/>. Note that
10236 the <link to="#pixelFormat"/> attribute must never return <link
10237 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10238
10239 <note>
10240 This method is called by the IDisplay object under the
10241 <link to="#lock"/> provided by this IFramebuffer
10242 implementation. If this method returns @c false in @a finished, then
10243 this lock is not released until
10244 <link to="IDisplay::resizeCompleted"/> is called.
10245 </note>
10246 </desc>
10247 <param name="screenId" type="unsigned long" dir="in">
10248 <desc>
10249 Logical screen number. Must be used in the corresponding call to
10250 <link to="IDisplay::resizeCompleted"/> if this call is made.
10251 </desc>
10252 </param>
10253 <param name="pixelFormat" type="unsigned long" dir="in">
10254 <desc>
10255 Pixel format of the memory buffer pointed to by @a VRAM.
10256 See also <link to="FramebufferPixelFormat"/>.
10257 </desc>
10258 </param>
10259 <param name="VRAM" type="octet" mod="ptr" dir="in">
10260 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10261 </param>
10262 <param name="bitsPerPixel" type="unsigned long" dir="in">
10263 <desc>Color depth, bits per pixel.</desc>
10264 </param>
10265 <param name="bytesPerLine" type="unsigned long" dir="in">
10266 <desc>Size of one scan line, in bytes.</desc>
10267 </param>
10268 <param name="width" type="unsigned long" dir="in">
10269 <desc>Width of the guest display, in pixels.</desc>
10270 </param>
10271 <param name="height" type="unsigned long" dir="in">
10272 <desc>Height of the guest display, in pixels.</desc>
10273 </param>
10274 <param name="finished" type="boolean" dir="return">
10275 <desc>
10276 Can the VM start using the new frame buffer immediately
10277 after this method returns or it should wait for
10278 <link to="IDisplay::resizeCompleted"/>.
10279 </desc>
10280 </param>
10281 </method>
10282
10283 <method name="videoModeSupported">
10284 <desc>
10285 Returns whether the frame buffer implementation is willing to
10286 support a given video mode. In case it is not able to render
10287 the video mode (or for some reason not willing), it should
10288 return @c false. Usually this method is called when the guest
10289 asks the VMM device whether a given video mode is supported
10290 so the information returned is directly exposed to the guest.
10291 It is important that this method returns very quickly.
10292 </desc>
10293 <param name="width" type="unsigned long" dir="in"/>
10294 <param name="height" type="unsigned long" dir="in"/>
10295 <param name="bpp" type="unsigned long" dir="in"/>
10296 <param name="supported" type="boolean" dir="return"/>
10297 </method>
10298
10299 <method name="getVisibleRegion">
10300 <desc>
10301 Returns the visible region of this frame buffer.
10302
10303 If the @a rectangles parameter is @c null then the value of the
10304 @a count parameter is ignored and the number of elements necessary to
10305 describe the current visible region is returned in @a countCopied.
10306
10307 If @a rectangles is not @c null but @a count is less
10308 than the required number of elements to store region data, the method
10309 will report a failure. If @a count is equal or greater than the
10310 required number of elements, then the actual number of elements copied
10311 to the provided array will be returned in @a countCopied.
10312
10313 <note>
10314 The address of the provided array must be in the process space of
10315 this IFramebuffer object.
10316 </note>
10317 <note>
10318 Method not yet implemented.
10319 </note>
10320 </desc>
10321 <param name="rectangles" type="octet" mod="ptr" dir="in">
10322 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10323 </param>
10324 <param name="count" type="unsigned long" dir="in">
10325 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10326 </param>
10327 <param name="countCopied" type="unsigned long" dir="return">
10328 <desc>Number of elements copied to the @a rectangles array.</desc>
10329 </param>
10330 </method>
10331
10332 <method name="setVisibleRegion">
10333 <desc>
10334 Suggests a new visible region to this frame buffer. This region
10335 represents the area of the VM display which is a union of regions of
10336 all top-level windows of the guest operating system running inside the
10337 VM (if the Guest Additions for this system support this
10338 functionality). This information may be used by the frontends to
10339 implement the seamless desktop integration feature.
10340
10341 <note>
10342 The address of the provided array must be in the process space of
10343 this IFramebuffer object.
10344 </note>
10345 <note>
10346 The IFramebuffer implementation must make a copy of the provided
10347 array of rectangles.
10348 </note>
10349 <note>
10350 Method not yet implemented.
10351 </note>
10352 </desc>
10353 <param name="rectangles" type="octet" mod="ptr" dir="in">
10354 <desc>Pointer to the @c RTRECT array.</desc>
10355 </param>
10356 <param name="count" type="unsigned long" dir="in">
10357 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10358 </param>
10359 </method>
10360
10361 <method name="processVHWACommand">
10362 <desc>
10363 Posts a Video HW Acceleration Command to the frame buffer for processing.
10364 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10365 are posted from quest to the host to be processed by the host hardware.
10366
10367 <note>
10368 The address of the provided command must be in the process space of
10369 this IFramebuffer object.
10370 </note>
10371 </desc>
10372
10373 <param name="command" type="octet" mod="ptr" dir="in">
10374 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10375 </param>
10376 </method>
10377
10378 </interface>
10379
10380 <interface
10381 name="IFramebufferOverlay" extends="IFramebuffer"
10382 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10383 wsmap="suppress"
10384 >
10385 <desc>
10386 The IFramebufferOverlay interface represents an alpha blended overlay
10387 for displaying status icons above an IFramebuffer. It is always created
10388 not visible, so that it must be explicitly shown. It only covers a
10389 portion of the IFramebuffer, determined by its width, height and
10390 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10391 that order) format, and may be written to directly. Do re-read the
10392 width though, after setting it, as it may be adjusted (increased) to
10393 make it more suitable for the front end.
10394 </desc>
10395 <attribute name="x" type="unsigned long" readonly="yes">
10396 <desc>X position of the overlay, relative to the frame buffer.</desc>
10397 </attribute>
10398
10399 <attribute name="y" type="unsigned long" readonly="yes">
10400 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10401 </attribute>
10402
10403 <attribute name="visible" type="boolean" readonly="no">
10404 <desc>
10405 Whether the overlay is currently visible.
10406 </desc>
10407 </attribute>
10408
10409 <attribute name="alpha" type="unsigned long" readonly="no">
10410 <desc>
10411 The global alpha value for the overlay. This may or may not be
10412 supported by a given front end.
10413 </desc>
10414 </attribute>
10415
10416 <method name="move">
10417 <desc>
10418 Changes the overlay's position relative to the IFramebuffer.
10419 </desc>
10420 <param name="x" type="unsigned long" dir="in"/>
10421 <param name="y" type="unsigned long" dir="in"/>
10422 </method>
10423
10424 </interface>
10425
10426 <interface
10427 name="IDisplay" extends="$unknown"
10428 uuid="e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000"
10429 wsmap="managed"
10430 >
10431 <desc>
10432 The IDisplay interface represents the virtual machine's display.
10433
10434 The object implementing this interface is contained in each
10435 <link to="IConsole::display"/> attribute and represents the visual
10436 output of the virtual machine.
10437
10438 The virtual display supports pluggable output targets represented by the
10439 IFramebuffer interface. Examples of the output target are a window on
10440 the host computer or an RDP session's display on a remote computer.
10441 </desc>
10442 <attribute name="width" type="unsigned long" readonly="yes">
10443 <desc>Current display width.</desc>
10444 </attribute>
10445
10446 <attribute name="height" type="unsigned long" readonly="yes">
10447 <desc>Current display height.</desc>
10448 </attribute>
10449
10450 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10451 <desc>
10452 Current guest display color depth. Note that this may differ
10453 from <link to="IFramebuffer::bitsPerPixel"/>.
10454 </desc>
10455 </attribute>
10456
10457 <method name="setFramebuffer">
10458 <desc>
10459 Sets the framebuffer for given screen.
10460 </desc>
10461 <param name="screenId" type="unsigned long" dir="in"/>
10462 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10463 </method>
10464
10465 <method name="getFramebuffer">
10466 <desc>
10467 Queries the framebuffer for given screen.
10468 </desc>
10469 <param name="screenId" type="unsigned long" dir="in"/>
10470 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10471 <param name="xOrigin" type="long" dir="out"/>
10472 <param name="yOrigin" type="long" dir="out"/>
10473 </method>
10474
10475 <method name="setVideoModeHint">
10476 <desc>
10477 Asks VirtualBox to request the given video mode from
10478 the guest. This is just a hint and it cannot be guaranteed
10479 that the requested resolution will be used. Guest Additions
10480 are required for the request to be seen by guests. The caller
10481 should issue the request and wait for a resolution change and
10482 after a timeout retry.
10483
10484 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10485 parameters means that the corresponding values should be taken from the
10486 current video mode (i.e. left unchanged).
10487
10488 If the guest OS supports multi-monitor configuration then the @a display
10489 parameter specifies the number of the guest display to send the hint to:
10490 @c 0 is the primary display, @c 1 is the first secondary and
10491 so on. If the multi-monitor configuration is not supported, @a display
10492 must be @c 0.
10493
10494 <result name="E_INVALIDARG">
10495 The @a display is not associated with any monitor.
10496 </result>
10497
10498 </desc>
10499 <param name="width" type="unsigned long" dir="in"/>
10500 <param name="height" type="unsigned long" dir="in"/>
10501 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10502 <param name="display" type="unsigned long" dir="in"/>
10503 </method>
10504
10505 <method name="setSeamlessMode">
10506 <desc>
10507 Enables or disables seamless guest display rendering (seamless desktop
10508 integration) mode.
10509 <note>
10510 Calling this method has no effect if <link
10511 to="IGuest::supportsSeamless"/> returns @c false.
10512 </note>
10513 </desc>
10514 <param name="enabled" type="boolean" dir="in"/>
10515 </method>
10516
10517 <method name="takeScreenShot">
10518 <desc>
10519 Takes a screen shot of the requested size and copies it to the
10520 32-bpp buffer allocated by the caller and pointed to by @a address.
10521
10522 <note>This API can be used only by the COM/XPCOM C++ API as it
10523 requires pointer support. Use <link to="#takeScreenShotSlow" />
10524 with other language bindings.
10525 </note>
10526
10527 <result name="E_NOTIMPL">
10528 Feature not implemented.
10529 </result>
10530 <result name="VBOX_E_IPRT_ERROR">
10531 Could not take a screenshot.
10532 </result>
10533
10534 </desc>
10535 <param name="address" type="octet" mod="ptr" dir="in"/>
10536 <param name="width" type="unsigned long" dir="in"/>
10537 <param name="height" type="unsigned long" dir="in"/>
10538 </method>
10539
10540 <method name="takeScreenShotSlow">
10541 <desc>
10542 Takes a guest screen shot of the requested size and returns it as
10543 an array of bytes in uncompressed 32-bit ARGB format.
10544 This API is slow, but could be the only option to get guest screenshot
10545 for scriptable languages not allowed to manipulate with addresses
10546 directly.
10547
10548 <result name="E_NOTIMPL">
10549 Feature not implemented.
10550 </result>
10551 <result name="VBOX_E_IPRT_ERROR">
10552 Could not take a screenshot.
10553 </result>
10554 </desc>
10555 <param name="width" type="unsigned long" dir="in">
10556 <desc>
10557 Desired image width.
10558 </desc>
10559 </param>
10560 <param name="height" type="unsigned long" dir="in">
10561 <desc>
10562 Desired image height.
10563 </desc>
10564 </param>
10565 <param name="screenData" type="octet" dir="return" safearray="yes">
10566 <desc>
10567 Array with resulting screen data.
10568 </desc>
10569 </param>
10570 </method>
10571
10572 <method name="drawToScreen">
10573 <desc>
10574 Draws a 32-bpp image of the specified size from the given buffer
10575 to the given point on the VM display.
10576
10577 <result name="E_NOTIMPL">
10578 Feature not implemented.
10579 </result>
10580 <result name="VBOX_E_IPRT_ERROR">
10581 Could not draw to screen.
10582 </result>
10583
10584 </desc>
10585 <param name="address" type="octet" mod="ptr" dir="in"/>
10586 <param name="x" type="unsigned long" dir="in"/>
10587 <param name="y" type="unsigned long" dir="in"/>
10588 <param name="width" type="unsigned long" dir="in"/>
10589 <param name="height" type="unsigned long" dir="in"/>
10590 </method>
10591
10592 <method name="invalidateAndUpdate">
10593 <desc>
10594 Does a full invalidation of the VM display and instructs the VM
10595 to update it.
10596
10597 <result name="VBOX_E_IPRT_ERROR">
10598 Could not invalidate and update screen.
10599 </result>
10600
10601 </desc>
10602 </method>
10603
10604 <method name="resizeCompleted">
10605 <desc>
10606 Signals that a framebuffer has completed the resize operation.
10607
10608 <result name="VBOX_E_NOT_SUPPORTED">
10609 Operation only valid for external frame buffers.
10610 </result>
10611
10612 </desc>
10613 <param name="screenId" type="unsigned long" dir="in"/>
10614 </method>
10615
10616 <method name="updateCompleted">
10617 <desc>
10618 Signals that a framebuffer has completed the update operation.
10619
10620 <result name="VBOX_E_NOT_SUPPORTED">
10621 Operation only valid for external frame buffers.
10622 </result>
10623
10624 </desc>
10625 </method>
10626
10627 <method name="completeVHWACommand">
10628 <desc>
10629 Signals that the Video HW Acceleration command has completed.
10630 </desc>
10631
10632 <param name="command" type="octet" mod="ptr" dir="in">
10633 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
10634 </param>
10635 </method>
10636
10637 </interface>
10638
10639 <!--
10640 // INetworkAdapter
10641 /////////////////////////////////////////////////////////////////////////
10642 -->
10643
10644 <enum
10645 name="NetworkAttachmentType"
10646 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10647 >
10648 <desc>
10649 Network attachment type.
10650 </desc>
10651
10652 <const name="Null" value="0">
10653 <desc>Null value, also means "not attached".</desc>
10654 </const>
10655 <const name="NAT" value="1"/>
10656 <const name="Bridged" value="2"/>
10657 <const name="Internal" value="3"/>
10658 <const name="HostOnly" value="4"/>
10659 </enum>
10660
10661 <enum
10662 name="NetworkAdapterType"
10663 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
10664 >
10665 <desc>
10666 Network adapter type.
10667 </desc>
10668
10669 <const name="Null" value="0">
10670 <desc>Null value (never used by the API).</desc>
10671 </const>
10672 <const name="Am79C970A" value="1">
10673 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
10674 </const>
10675 <const name="Am79C973" value="2">
10676 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
10677 </const>
10678 <const name="I82540EM" value="3">
10679 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
10680 </const>
10681 <const name="I82543GC" value="4">
10682 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
10683 </const>
10684 <const name="I82545EM" value="5">
10685 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
10686 </const>
10687 <const name="Virtio" value="6">
10688 <desc>Virtio network device.</desc>
10689 </const>
10690 </enum>
10691
10692 <interface
10693 name="INetworkAdapter" extends="$unknown"
10694 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10695 wsmap="managed"
10696 >
10697 <desc>
10698 Represents a virtual network adapter that is attached to a virtual machine.
10699 Each virtual machine has a fixed number of network adapter slots with one
10700 instance of this attached to each of them. Call
10701 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10702 is attached to a given slot in a given machine.
10703
10704 Each network adapter can be in one of five attachment modes, which are
10705 represented by the <link to="NetworkAttachmentType" /> enumeration;
10706 see the <link to="#attachmentType" /> attribute.
10707 </desc>
10708
10709 <attribute name="adapterType" type="NetworkAdapterType">
10710 <desc>
10711 Type of the virtual network adapter. Depending on this value,
10712 VirtualBox will provide a different virtual network hardware
10713 to the guest.
10714 </desc>
10715 </attribute>
10716
10717 <attribute name="slot" type="unsigned long" readonly="yes">
10718 <desc>
10719 Slot number this adapter is plugged into. Corresponds to
10720 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10721 to obtain this instance.
10722 </desc>
10723 </attribute>
10724
10725 <attribute name="enabled" type="boolean">
10726 <desc>
10727 Flag whether the network adapter is present in the
10728 guest system. If disabled, the virtual guest hardware will
10729 not contain this network adapter. Can only be changed when
10730 the VM is not running.
10731 </desc>
10732 </attribute>
10733
10734 <attribute name="MACAddress" type="wstring">
10735 <desc>
10736 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10737 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
10738 </desc>
10739 </attribute>
10740
10741 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10742
10743 <attribute name="hostInterface" type="wstring">
10744 <desc>
10745 Name of the host network interface the VM is attached to.
10746 </desc>
10747 </attribute>
10748
10749 <attribute name="internalNetwork" type="wstring">
10750 <desc>
10751 Name of the internal network the VM is attached to.
10752 </desc>
10753 </attribute>
10754
10755 <attribute name="NATNetwork" type="wstring">
10756 <desc>
10757 Name of the NAT network the VM is attached to.
10758 </desc>
10759 </attribute>
10760
10761 <attribute name="cableConnected" type="boolean">
10762 <desc>
10763 Flag whether the adapter reports the cable as connected or not.
10764 It can be used to report offline situations to a VM.
10765 </desc>
10766 </attribute>
10767
10768 <attribute name="lineSpeed" type="unsigned long">
10769 <desc>
10770 Line speed reported by custom drivers, in units of 1 kbps.
10771 </desc>
10772 </attribute>
10773
10774 <attribute name="traceEnabled" type="boolean">
10775 <desc>
10776 Flag whether network traffic from/to the network card should be traced.
10777 Can only be toggled when the VM is turned off.
10778 </desc>
10779 </attribute>
10780
10781 <attribute name="traceFile" type="wstring">
10782 <desc>
10783 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10784 will be used.
10785 </desc>
10786 </attribute>
10787
10788 <method name="attachToNAT">
10789 <desc>
10790 Attach the network adapter to the Network Address Translation (NAT) interface.
10791 </desc>
10792 </method>
10793
10794 <method name="attachToBridgedInterface">
10795 <desc>
10796 Attach the network adapter to a bridged host interface.
10797 </desc>
10798 </method>
10799
10800 <method name="attachToInternalNetwork">
10801 <desc>
10802 Attach the network adapter to an internal network.
10803 </desc>
10804 </method>
10805
10806 <method name="attachToHostOnlyInterface">
10807 <desc>
10808 Attach the network adapter to the host-only network.
10809 </desc>
10810 </method>
10811
10812 <method name="detach">
10813 <desc>
10814 Detach the network adapter
10815 </desc>
10816 </method>
10817 </interface>
10818
10819
10820 <!--
10821 // ISerialPort
10822 /////////////////////////////////////////////////////////////////////////
10823 -->
10824
10825 <enum
10826 name="PortMode"
10827 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
10828 >
10829 <desc>
10830 The PortMode enumeration represents possible communication modes for
10831 the virtual serial port device.
10832 </desc>
10833
10834 <const name="Disconnected" value="0">
10835 <desc>Virtual device is not attached to any real host device.</desc>
10836 </const>
10837 <const name="HostPipe" value="1">
10838 <desc>Virtual device is attached to a host pipe.</desc>
10839 </const>
10840 <const name="HostDevice" value="2">
10841 <desc>Virtual device is attached to a host device.</desc>
10842 </const>
10843 <const name="RawFile" value="3">
10844 <desc>Virtual device is attached to a raw file.</desc>
10845 </const>
10846 </enum>
10847
10848 <interface
10849 name="ISerialPort" extends="$unknown"
10850 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
10851 wsmap="managed"
10852 >
10853
10854 <desc>
10855 The ISerialPort interface represents the virtual serial port device.
10856
10857 The virtual serial port device acts like an ordinary serial port
10858 inside the virtual machine. This device communicates to the real
10859 serial port hardware in one of two modes: host pipe or host device.
10860
10861 In host pipe mode, the #path attribute specifies the path to the pipe on
10862 the host computer that represents a serial port. The #server attribute
10863 determines if this pipe is created by the virtual machine process at
10864 machine startup or it must already exist before starting machine
10865 execution.
10866
10867 In host device mode, the #path attribute specifies the name of the
10868 serial port device on the host computer.
10869
10870 There is also a third communication mode: the disconnected mode. In this
10871 mode, the guest OS running inside the virtual machine will be able to
10872 detect the serial port, but all port write operations will be discarded
10873 and all port read operations will return no data.
10874
10875 <see>IMachine::getSerialPort</see>
10876 </desc>
10877
10878 <attribute name="slot" type="unsigned long" readonly="yes">
10879 <desc>
10880 Slot number this serial port is plugged into. Corresponds to
10881 the value you pass to <link to="IMachine::getSerialPort"/>
10882 to obtain this instance.
10883 </desc>
10884 </attribute>
10885
10886 <attribute name="enabled" type="boolean">
10887 <desc>
10888 Flag whether the serial port is enabled. If disabled,
10889 the serial port will not be reported to the guest OS.
10890 </desc>
10891 </attribute>
10892
10893 <attribute name="IOBase" type="unsigned long">
10894 <desc>Base I/O address of the serial port.</desc>
10895 </attribute>
10896
10897 <attribute name="IRQ" type="unsigned long">
10898 <desc>IRQ number of the serial port.</desc>
10899 </attribute>
10900
10901 <attribute name="hostMode" type="PortMode">
10902 <desc>
10903 How is this port connected to the host.
10904 <note>
10905 Changing this attribute may fail if the conditions for
10906 <link to="#path"/> are not met.
10907 </note>
10908 </desc>
10909 </attribute>
10910
10911 <attribute name="server" type="boolean">
10912 <desc>
10913 Flag whether this serial port acts as a server (creates a new pipe on
10914 the host) or as a client (uses the existing pipe). This attribute is
10915 used only when <link to="#hostMode"/> is PortMode_HostPipe.
10916 </desc>
10917 </attribute>
10918
10919 <attribute name="path" type="wstring">
10920 <desc>
10921 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
10922 PortMode_HostPipe, or the host serial device name when
10923 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
10924 cases, setting a @c null or empty string as the attribute's value
10925 is an error. Otherwise, the value of this property is ignored.
10926 </desc>
10927 </attribute>
10928
10929 </interface>
10930
10931 <!--
10932 // IParallelPort
10933 /////////////////////////////////////////////////////////////////////////
10934 -->
10935
10936 <interface
10937 name="IParallelPort" extends="$unknown"
10938 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
10939 wsmap="managed"
10940 >
10941
10942 <desc>
10943 The IParallelPort interface represents the virtual parallel port device.
10944
10945 The virtual parallel port device acts like an ordinary parallel port
10946 inside the virtual machine. This device communicates to the real
10947 parallel port hardware using the name of the parallel device on the host
10948 computer specified in the #path attribute.
10949
10950 Each virtual parallel port device is assigned a base I/O address and an
10951 IRQ number that will be reported to the guest operating system and used
10952 to operate the given parallel port from within the virtual machine.
10953
10954 <see>IMachine::getParallelPort</see>
10955 </desc>
10956
10957 <attribute name="slot" type="unsigned long" readonly="yes">
10958 <desc>
10959 Slot number this parallel port is plugged into. Corresponds to
10960 the value you pass to <link to="IMachine::getParallelPort"/>
10961 to obtain this instance.
10962 </desc>
10963 </attribute>
10964
10965 <attribute name="enabled" type="boolean">
10966 <desc>
10967 Flag whether the parallel port is enabled. If disabled,
10968 the parallel port will not be reported to the guest OS.
10969 </desc>
10970 </attribute>
10971
10972 <attribute name="IOBase" type="unsigned long">
10973 <desc>Base I/O address of the parallel port.</desc>
10974 </attribute>
10975
10976 <attribute name="IRQ" type="unsigned long">
10977 <desc>IRQ number of the parallel port.</desc>
10978 </attribute>
10979
10980 <attribute name="path" type="wstring">
10981 <desc>
10982 Host parallel device name. If this parallel port is enabled, setting a
10983 @c null or an empty string as this attribute's value will result into
10984 an error.
10985 </desc>
10986 </attribute>
10987
10988 </interface>
10989
10990
10991 <!--
10992 // IMachineDebugger
10993 /////////////////////////////////////////////////////////////////////////
10994 -->
10995
10996 <interface
10997 name="IMachineDebugger" extends="$unknown"
10998 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
10999 wsmap="suppress"
11000 >
11001 <method name="resetStats">
11002 <desc>
11003 Reset VM statistics.
11004 </desc>
11005 <param name="pattern" type="wstring" dir="in">
11006 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11007 </param>
11008 </method>
11009
11010 <method name="dumpStats">
11011 <desc>
11012 Dumps VM statistics.
11013 </desc>
11014 <param name="pattern" type="wstring" dir="in">
11015 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11016 </param>
11017 </method>
11018
11019 <method name="getStats">
11020 <desc>
11021 Get the VM statistics in a XMLish format.
11022 </desc>
11023 <param name="pattern" type="wstring" dir="in">
11024 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11025 </param>
11026 <param name="withDescriptions" type="boolean" dir="in">
11027 <desc>Whether to include the descriptions.</desc>
11028 </param>
11029 <param name="stats" type="wstring" dir="out">
11030 <desc>The XML document containing the statistics.</desc>
11031 </param>
11032 </method>
11033
11034 <method name="injectNMI">
11035 <desc>
11036 Inject an NMI into a running VT-x/AMD-V VM.
11037 </desc>
11038 </method>
11039
11040 <attribute name="singlestep" type="boolean">
11041 <desc>Switch for enabling singlestepping.</desc>
11042 </attribute>
11043
11044 <attribute name="recompileUser" type="boolean">
11045 <desc>Switch for forcing code recompilation for user mode code.</desc>
11046 </attribute>
11047
11048 <attribute name="recompileSupervisor" type="boolean">
11049 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11050 </attribute>
11051
11052 <attribute name="PATMEnabled" type="boolean">
11053 <desc>Switch for enabling and disabling the PATM component.</desc>
11054 </attribute>
11055
11056 <attribute name="CSAMEnabled" type="boolean">
11057 <desc>Switch for enabling and disabling the CSAM component.</desc>
11058 </attribute>
11059
11060 <attribute name="logEnabled" type="boolean">
11061 <desc>Switch for enabling and disabling logging.</desc>
11062 </attribute>
11063
11064 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11065 <desc>
11066 Flag indicating whether the VM is currently making use of CPU hardware
11067 virtualization extensions.
11068 </desc>
11069 </attribute>
11070
11071 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11072 <desc>
11073 Flag indicating whether the VM is currently making use of the nested paging
11074 CPU hardware virtualization extension.
11075 </desc>
11076 </attribute>
11077
11078 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11079 <desc>
11080 Flag indicating whether the VM is currently making use of the VPID
11081 VT-x extension.
11082 </desc>
11083 </attribute>
11084
11085 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11086 <desc>
11087 Flag indicating whether the VM is currently making use of the Physical
11088 Address Extension CPU feature.
11089 </desc>
11090 </attribute>
11091
11092 <attribute name="virtualTimeRate" type="unsigned long">
11093 <desc>
11094 The rate at which the virtual time runs expressed as a percentage.
11095 The accepted range is 2% to 20000%.
11096 </desc>
11097 </attribute>
11098
11099 <!-- @todo method for setting log flags, groups and destination! -->
11100
11101 <attribute name="VM" type="unsigned long long" readonly="yes">
11102 <desc>
11103 Gets the VM handle. This is only for internal use while
11104 we carve the details of this interface.
11105 </desc>
11106 </attribute>
11107
11108 </interface>
11109
11110 <!--
11111 // IUSBController
11112 /////////////////////////////////////////////////////////////////////////
11113 -->
11114
11115 <interface
11116 name="IUSBController" extends="$unknown"
11117 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11118 wsmap="managed"
11119 >
11120 <attribute name="enabled" type="boolean">
11121 <desc>
11122 Flag whether the USB controller is present in the
11123 guest system. If disabled, the virtual guest hardware will
11124 not contain any USB controller. Can only be changed when
11125 the VM is powered off.
11126 </desc>
11127 </attribute>
11128
11129 <attribute name="enabledEhci" type="boolean">
11130 <desc>
11131 Flag whether the USB EHCI controller is present in the
11132 guest system. If disabled, the virtual guest hardware will
11133 not contain a USB EHCI controller. Can only be changed when
11134 the VM is powered off.
11135 </desc>
11136 </attribute>
11137
11138 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11139 <desc>
11140 USB standard version which the controller implements.
11141 This is a BCD which means that the major version is in the
11142 high byte and minor version is in the low byte.
11143 </desc>
11144 </attribute>
11145
11146 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11147 <desc>
11148 List of USB device filters associated with the machine.
11149
11150 If the machine is currently running, these filters are activated
11151 every time a new (supported) USB device is attached to the host
11152 computer that was not ignored by global filters
11153 (<link to="IHost::USBDeviceFilters"/>).
11154
11155 These filters are also activated when the machine is powered up.
11156 They are run against a list of all currently available USB
11157 devices (in states
11158 <link to="USBDeviceState_Available"/>,
11159 <link to="USBDeviceState_Busy"/>,
11160 <link to="USBDeviceState_Held"/>) that were not previously
11161 ignored by global filters.
11162
11163 If at least one filter matches the USB device in question, this
11164 device is automatically captured (attached to) the virtual USB
11165 controller of this machine.
11166
11167 <see>IUSBDeviceFilter, ::IUSBController</see>
11168 </desc>
11169 </attribute>
11170
11171 <method name="createDeviceFilter">
11172 <desc>
11173 Creates a new USB device filter. All attributes except
11174 the filter name are set to empty (any match),
11175 <i>active</i> is @c false (the filter is not active).
11176
11177 The created filter can then be added to the list of filters using
11178 <link to="#insertDeviceFilter"/>.
11179
11180 <result name="VBOX_E_INVALID_VM_STATE">
11181 The virtual machine is not mutable.
11182 </result>
11183
11184 <see>#deviceFilters</see>
11185 </desc>
11186 <param name="name" type="wstring" dir="in">
11187 <desc>
11188 Filter name. See <link to="IUSBDeviceFilter::name"/>
11189 for more info.
11190 </desc>
11191 </param>
11192 <param name="filter" type="IUSBDeviceFilter" dir="return">
11193 <desc>Created filter object.</desc>
11194 </param>
11195 </method>
11196
11197 <method name="insertDeviceFilter">
11198 <desc>
11199 Inserts the given USB device to the specified position
11200 in the list of filters.
11201
11202 Positions are numbered starting from <tt>0</tt>. If the specified
11203 position is equal to or greater than the number of elements in
11204 the list, the filter is added to the end of the collection.
11205
11206 <note>
11207 Duplicates are not allowed, so an attempt to insert a
11208 filter that is already in the collection, will return an
11209 error.
11210 </note>
11211
11212 <result name="VBOX_E_INVALID_VM_STATE">
11213 Virtual machine is not mutable.
11214 </result>
11215 <result name="E_INVALIDARG">
11216 USB device filter not created within this VirtualBox instance.
11217 </result>
11218 <result name="VBOX_E_INVALID_OBJECT_STATE">
11219 USB device filter already in list.
11220 </result>
11221
11222 <see>#deviceFilters</see>
11223 </desc>
11224 <param name="position" type="unsigned long" dir="in">
11225 <desc>Position to insert the filter to.</desc>
11226 </param>
11227 <param name="filter" type="IUSBDeviceFilter" dir="in">
11228 <desc>USB device filter to insert.</desc>
11229 </param>
11230 </method>
11231
11232 <method name="removeDeviceFilter">
11233 <desc>
11234 Removes a USB device filter from the specified position in the
11235 list of filters.
11236
11237 Positions are numbered starting from <tt>0</tt>. Specifying a
11238 position equal to or greater than the number of elements in
11239 the list will produce an error.
11240
11241 <see>#deviceFilters</see>
11242
11243 <result name="VBOX_E_INVALID_VM_STATE">
11244 Virtual machine is not mutable.
11245 </result>
11246 <result name="E_INVALIDARG">
11247 USB device filter list empty or invalid @a position.
11248 </result>
11249
11250 </desc>
11251 <param name="position" type="unsigned long" dir="in">
11252 <desc>Position to remove the filter from.</desc>
11253 </param>
11254 <param name="filter" type="IUSBDeviceFilter" dir="return">
11255 <desc>Removed USB device filter.</desc>
11256 </param>
11257 </method>
11258
11259 </interface>
11260
11261
11262 <!--
11263 // IUSBDevice
11264 /////////////////////////////////////////////////////////////////////////
11265 -->
11266
11267 <interface
11268 name="IUSBDevice" extends="$unknown"
11269 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11270 wsmap="managed"
11271 >
11272 <desc>
11273 The IUSBDevice interface represents a virtual USB device attached to the
11274 virtual machine.
11275
11276 A collection of objects implementing this interface is stored in the
11277 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11278 attached to a running virtual machine's USB controller.
11279 </desc>
11280
11281 <attribute name="id" type="uuid" mod="string" readonly="yes">
11282 <desc>
11283 Unique USB device ID. This ID is built from #vendorId,
11284 #productId, #revision and #serialNumber.
11285 </desc>
11286 </attribute>
11287
11288 <attribute name="vendorId" type="unsigned short" readonly="yes">
11289 <desc>Vendor ID.</desc>
11290 </attribute>
11291
11292 <attribute name="productId" type="unsigned short" readonly="yes">
11293 <desc>Product ID.</desc>
11294 </attribute>
11295
11296 <attribute name="revision" type="unsigned short" readonly="yes">
11297 <desc>
11298 Product revision number. This is a packed BCD represented as
11299 unsigned short. The high byte is the integer part and the low
11300 byte is the decimal.
11301 </desc>
11302 </attribute>
11303
11304 <attribute name="manufacturer" type="wstring" readonly="yes">
11305 <desc>Manufacturer string.</desc>
11306 </attribute>
11307
11308 <attribute name="product" type="wstring" readonly="yes">
11309 <desc>Product string.</desc>
11310 </attribute>
11311
11312 <attribute name="serialNumber" type="wstring" readonly="yes">
11313 <desc>Serial number string.</desc>
11314 </attribute>
11315
11316 <attribute name="address" type="wstring" readonly="yes">
11317 <desc>Host specific address of the device.</desc>
11318 </attribute>
11319
11320 <attribute name="port" type="unsigned short" readonly="yes">
11321 <desc>
11322 Host USB port number the device is physically
11323 connected to.
11324 </desc>
11325 </attribute>
11326
11327 <attribute name="version" type="unsigned short" readonly="yes">
11328 <desc>
11329 The major USB version of the device - 1 or 2.
11330 </desc>
11331 </attribute>
11332
11333 <attribute name="portVersion" type="unsigned short" readonly="yes">
11334 <desc>
11335 The major USB version of the host USB port the device is
11336 physically connected to - 1 or 2. For devices not connected to
11337 anything this will have the same value as the version attribute.
11338 </desc>
11339 </attribute>
11340
11341 <attribute name="remote" type="boolean" readonly="yes">
11342 <desc>
11343 Whether the device is physically connected to a remote VRDP
11344 client or to a local host machine.
11345 </desc>
11346 </attribute>
11347
11348 </interface>
11349
11350
11351 <!--
11352 // IUSBDeviceFilter
11353 /////////////////////////////////////////////////////////////////////////
11354 -->
11355
11356 <interface
11357 name="IUSBDeviceFilter" extends="$unknown"
11358 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11359 wsmap="managed"
11360 >
11361 <desc>
11362 The IUSBDeviceFilter interface represents an USB device filter used
11363 to perform actions on a group of USB devices.
11364
11365 This type of filters is used by running virtual machines to
11366 automatically capture selected USB devices once they are physically
11367 attached to the host computer.
11368
11369 A USB device is matched to the given device filter if and only if all
11370 attributes of the device match the corresponding attributes of the
11371 filter (that is, attributes are joined together using the logical AND
11372 operation). On the other hand, all together, filters in the list of
11373 filters carry the semantics of the logical OR operation. So if it is
11374 desirable to create a match like "this vendor id OR this product id",
11375 one needs to create two filters and specify "any match" (see below)
11376 for unused attributes.
11377
11378 All filter attributes used for matching are strings. Each string
11379 is an expression representing a set of values of the corresponding
11380 device attribute, that will match the given filter. Currently, the
11381 following filtering expressions are supported:
11382
11383 <ul>
11384 <li><i>Interval filters</i>. Used to specify valid intervals for
11385 integer device attributes (Vendor ID, Product ID and Revision).
11386 The format of the string is:
11387
11388 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11389
11390 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11391 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11392 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11393 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11394 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11395 possible integer is assumed.
11396 </li>
11397 <li><i>Boolean filters</i>. Used to specify acceptable values for
11398 boolean device attributes. The format of the string is:
11399
11400 <tt>true|false|yes|no|0|1</tt>
11401
11402 </li>
11403 <li><i>Exact match</i>. Used to specify a single value for the given
11404 device attribute. Any string that doesn't start with <tt>int:</tt>
11405 represents the exact match. String device attributes are compared to
11406 this string including case of symbols. Integer attributes are first
11407 converted to a string (see individual filter attributes) and then
11408 compared ignoring case.
11409
11410 </li>
11411 <li><i>Any match</i>. Any value of the corresponding device attribute
11412 will match the given filter. An empty or @c null string is
11413 used to construct this type of filtering expressions.
11414
11415 </li>
11416 </ul>
11417
11418 <note>
11419 On the Windows host platform, interval filters are not currently
11420 available. Also all string filter attributes
11421 (<link to="#manufacturer"/>, <link to="#product"/>,
11422 <link to="#serialNumber"/>) are ignored, so they behave as
11423 <i>any match</i> no matter what string expression is specified.
11424 </note>
11425
11426 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11427 </desc>
11428
11429 <attribute name="name" type="wstring">
11430 <desc>
11431 Visible name for this filter.
11432 This name is used to visually distinguish one filter from another,
11433 so it can neither be @c null nor an empty string.
11434 </desc>
11435 </attribute>
11436
11437 <attribute name="active" type="boolean">
11438 <desc>Whether this filter active or has been temporarily disabled.</desc>
11439 </attribute>
11440
11441 <attribute name="vendorId" type="wstring">
11442 <desc>
11443 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11444 The string representation for the <i>exact matching</i>
11445 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11446 (including leading zeroes).
11447 </desc>
11448 </attribute>
11449
11450 <attribute name="productId" type="wstring">
11451 <desc>
11452 <link to="IUSBDevice::productId">Product ID</link> filter.
11453 The string representation for the <i>exact matching</i>
11454 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11455 (including leading zeroes).
11456 </desc>
11457 </attribute>
11458
11459 <attribute name="revision" type="wstring">
11460 <desc>
11461 <link to="IUSBDevice::productId">Product revision number</link>
11462 filter. The string representation for the <i>exact matching</i>
11463 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11464 of the integer part of the revision, and <tt>F</tt> is the
11465 decimal digit of its fractional part (including leading and
11466 trailing zeros).
11467 Note that for interval filters, it's best to use the hexadecimal
11468 form, because the revision is stored as a 16 bit packed BCD value;
11469 so the expression <tt>int:0x0100-0x0199</tt> will match any
11470 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11471 </desc>
11472 </attribute>
11473
11474 <attribute name="manufacturer" type="wstring">
11475 <desc>
11476 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11477 </desc>
11478 </attribute>
11479
11480 <attribute name="product" type="wstring">
11481 <desc>
11482 <link to="IUSBDevice::product">Product</link> filter.
11483 </desc>
11484 </attribute>
11485
11486 <attribute name="serialNumber" type="wstring">
11487 <desc>
11488 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11489 </desc>
11490 </attribute>
11491
11492 <attribute name="port" type="wstring">
11493 <desc>
11494 <link to="IUSBDevice::port">Host USB port</link> filter.
11495 </desc>
11496 </attribute>
11497
11498 <attribute name="remote" type="wstring">
11499 <desc>
11500 <link to="IUSBDevice::remote">Remote state</link> filter.
11501 <note>
11502 This filter makes sense only for machine USB filters,
11503 i.e. it is ignored by IHostUSBDeviceFilter objects.
11504 </note>
11505 </desc>
11506 </attribute>
11507
11508 <attribute name="maskedInterfaces" type="unsigned long">
11509 <desc>
11510 This is an advanced option for hiding one or more USB interfaces
11511 from the guest. The value is a bit mask where the bits that are set
11512 means the corresponding USB interface should be hidden, masked off
11513 if you like.
11514 This feature only works on Linux hosts.
11515 </desc>
11516 </attribute>
11517
11518 </interface>
11519
11520
11521 <!--
11522 // IHostUSBDevice
11523 /////////////////////////////////////////////////////////////////////////
11524 -->
11525
11526 <enum
11527 name="USBDeviceState"
11528 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11529 >
11530 <desc>
11531 USB device state. This enumeration represents all possible states
11532 of the USB device physically attached to the host computer regarding
11533 its state on the host computer and availability to guest computers
11534 (all currently running virtual machines).
11535
11536 Once a supported USB device is attached to the host, global USB
11537 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11538 either ignore the device, or put it to USBDeviceState_Held state, or do
11539 nothing. Unless the device is ignored by global filters, filters of all
11540 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11541 activated that can put it to USBDeviceState_Captured state.
11542
11543 If the device was ignored by global filters, or didn't match
11544 any filters at all (including guest ones), it is handled by the host
11545 in a normal way. In this case, the device state is determined by
11546 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11547 or USBDeviceState_Available, depending on the current device usage.
11548
11549 Besides auto-capturing based on filters, the device can be manually
11550 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11551 state is USBDeviceState_Busy, USBDeviceState_Available or
11552 USBDeviceState_Held.
11553
11554 <note>
11555 Due to differences in USB stack implementations in Linux and Win32,
11556 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11557 only to the Linux version of the product. This also means that (<link
11558 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11559 device state is USBDeviceState_Held.
11560 </note>
11561
11562 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11563 </desc>
11564
11565 <const name="NotSupported" value="0">
11566 <desc>
11567 Not supported by the VirtualBox server, not available to guests.
11568 </desc>
11569 </const>
11570 <const name="Unavailable" value="1">
11571 <desc>
11572 Being used by the host computer exclusively,
11573 not available to guests.
11574 </desc>
11575 </const>
11576 <const name="Busy" value="2">
11577 <desc>
11578 Being used by the host computer, potentially available to guests.
11579 </desc>
11580 </const>
11581 <const name="Available" value="3">
11582 <desc>
11583 Not used by the host computer, available to guests (the host computer
11584 can also start using the device at any time).
11585 </desc>
11586 </const>
11587 <const name="Held" value="4">
11588 <desc>
11589 Held by the VirtualBox server (ignored by the host computer),
11590 available to guests.
11591 </desc>
11592 </const>
11593 <const name="Captured" value="5">
11594 <desc>
11595 Captured by one of the guest computers, not available
11596 to anybody else.
11597 </desc>
11598 </const>
11599 </enum>
11600
11601 <interface
11602 name="IHostUSBDevice" extends="IUSBDevice"
11603 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11604 wsmap="managed"
11605 >
11606 <desc>
11607 The IHostUSBDevice interface represents a physical USB device attached
11608 to the host computer.
11609
11610 Besides properties inherited from IUSBDevice, this interface adds the
11611 <link to="#state"/> property that holds the current state of the USB
11612 device.
11613
11614 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11615 </desc>
11616
11617 <attribute name="state" type="USBDeviceState" readonly="yes">
11618 <desc>
11619 Current state of the device.
11620 </desc>
11621 </attribute>
11622
11623 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11624
11625 </interface>
11626
11627
11628 <!--
11629 // IHostUSBDeviceFilter
11630 /////////////////////////////////////////////////////////////////////////
11631 -->
11632
11633 <enum
11634 name="USBDeviceFilterAction"
11635 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11636 >
11637 <desc>
11638 Actions for host USB device filters.
11639 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11640 </desc>
11641
11642 <const name="Null" value="0">
11643 <desc>Null value (never used by the API).</desc>
11644 </const>
11645 <const name="Ignore" value="1">
11646 <desc>Ignore the matched USB device.</desc>
11647 </const>
11648 <const name="Hold" value="2">
11649 <desc>Hold the matched USB device.</desc>
11650 </const>
11651 </enum>
11652
11653 <interface
11654 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11655 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11656 wsmap="managed"
11657 >
11658 <desc>
11659 The IHostUSBDeviceFilter interface represents a global filter for a
11660 physical USB device used by the host computer. Used indirectly in
11661 <link to="IHost::USBDeviceFilters"/>.
11662
11663 Using filters of this type, the host computer determines the initial
11664 state of the USB device after it is physically attached to the
11665 host's USB controller.
11666
11667 <note>
11668 The <link to="#remote"/> attribute is ignored by this type of
11669 filters, because it makes sense only for
11670 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11671 </note>
11672
11673 <see>IHost::USBDeviceFilters</see>
11674 </desc>
11675
11676 <attribute name="action" type="USBDeviceFilterAction">
11677 <desc>
11678 Action performed by the host when an attached USB device
11679 matches this filter.
11680 </desc>
11681 </attribute>
11682
11683 </interface>
11684
11685 <!--
11686 // IAudioAdapter
11687 /////////////////////////////////////////////////////////////////////////
11688 -->
11689
11690 <enum
11691 name="AudioDriverType"
11692 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11693 >
11694 <desc>
11695 Host audio driver type.
11696 </desc>
11697
11698 <const name="Null" value="0">
11699 <desc>Null value, also means "dummy audio driver".</desc>
11700 </const>
11701 <const name="WinMM" value="1">
11702 <desc>Windows multimedia (Windows hosts only).</desc>
11703 </const>
11704 <const name="OSS" value="2">
11705 <desc>Open Sound System (Linux hosts only).</desc>
11706 </const>
11707 <const name="ALSA" value="3">
11708 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
11709 </const>
11710 <const name="DirectSound" value="4">
11711 <desc>DirectSound (Windows hosts only).</desc>
11712 </const>
11713 <const name="CoreAudio" value="5">
11714 <desc>CoreAudio (Mac hosts only).</desc>
11715 </const>
11716 <const name="MMPM" value="6">
11717 <desc>Reserved for historical reasons.</desc>
11718 </const>
11719 <const name="Pulse" value="7">
11720 <desc>PulseAudio (Linux hosts only).</desc>
11721 </const>
11722 <const name="SolAudio" value="8">
11723 <desc>Solaris audio (Solaris hosts only).</desc>
11724 </const>
11725 </enum>
11726
11727 <enum
11728 name="AudioControllerType"
11729 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11730 >
11731 <desc>
11732 Virtual audio controller type.
11733 </desc>
11734
11735 <const name="AC97" value="0"/>
11736 <const name="SB16" value="1"/>
11737 </enum>
11738
11739 <interface
11740 name="IAudioAdapter" extends="$unknown"
11741 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11742 wsmap="managed"
11743 >
11744 <desc>
11745 The IAudioAdapter interface represents the virtual audio adapter of
11746 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11747 </desc>
11748 <attribute name="enabled" type="boolean">
11749 <desc>
11750 Flag whether the audio adapter is present in the
11751 guest system. If disabled, the virtual guest hardware will
11752 not contain any audio adapter. Can only be changed when
11753 the VM is not running.
11754 </desc>
11755 </attribute>
11756 <attribute name="audioController" type="AudioControllerType">
11757 <desc>
11758 The audio hardware we emulate.
11759 </desc>
11760 </attribute>
11761 <attribute name="audioDriver" type="AudioDriverType">
11762 <desc>
11763 Audio driver the adapter is connected to. This setting
11764 can only be changed when the VM is not running.
11765 </desc>
11766 </attribute>
11767 </interface>
11768
11769 <!--
11770 // IVRDPServer
11771 /////////////////////////////////////////////////////////////////////////
11772 -->
11773
11774 <enum
11775 name="VRDPAuthType"
11776 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11777 >
11778 <desc>
11779 VRDP authentication type.
11780 </desc>
11781
11782 <const name="Null" value="0">
11783 <desc>Null value, also means "no authentication".</desc>
11784 </const>
11785 <const name="External" value="1"/>
11786 <const name="Guest" value="2"/>
11787 </enum>
11788
11789 <interface
11790 name="IVRDPServer" extends="$unknown"
11791 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
11792 wsmap="managed"
11793 >
11794 <attribute name="enabled" type="boolean">
11795 <desc>VRDP server status.</desc>
11796 </attribute>
11797
11798 <attribute name="port" type="unsigned long">
11799 <desc>
11800 VRDP server port number.
11801 <note>
11802 Setting the value of this property to <tt>0</tt> will reset the port
11803 number to the default value which is
11804 currently <tt>3389</tt>. Reading this property will always return a
11805 real port number, even after it has been set to <tt>0</tt> (in which
11806 case the default port is returned).
11807 </note>
11808 </desc>
11809 </attribute>
11810
11811 <attribute name="netAddress" type="wstring">
11812 <desc>VRDP server address.</desc>
11813 </attribute>
11814
11815 <attribute name="authType" type="VRDPAuthType">
11816 <desc>VRDP authentication method.</desc>
11817 </attribute>
11818
11819 <attribute name="authTimeout" type="unsigned long">
11820 <desc>Timeout for guest authentication. Milliseconds.</desc>
11821 </attribute>
11822
11823 <attribute name="allowMultiConnection" type="boolean">
11824 <desc>
11825 Flag whether multiple simultaneous connections to the VM are permitted.
11826 Note that this will be replaced by a more powerful mechanism in the future.
11827 </desc>
11828 </attribute>
11829
11830 <attribute name="reuseSingleConnection" type="boolean">
11831 <desc>
11832 Flag whether the existing connection must be dropped and a new connection
11833 must be established by the VRDP server, when a new client connects in single
11834 connection mode.
11835 </desc>
11836 </attribute>
11837
11838 </interface>
11839
11840
11841 <!--
11842 // ISharedFolder
11843 /////////////////////////////////////////////////////////////////////////
11844 -->
11845
11846 <interface
11847 name="ISharedFolder" extends="$unknown"
11848 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
11849 wsmap="struct"
11850 >
11851 <desc>
11852 The ISharedFolder interface represents a folder in the host computer's
11853 file system accessible from the guest OS running inside a virtual
11854 machine using an associated logical name.
11855
11856 There are three types of shared folders:
11857 <ul>
11858 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
11859 folders available to all virtual machines.</li>
11860 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
11861 VM-specific shared folders available to the given virtual machine at
11862 startup.</li>
11863 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
11864 VM-specific shared folders created in the session context (for
11865 example, when the virtual machine is running) and automatically
11866 discarded when the session is closed (the VM is powered off).</li>
11867 </ul>
11868
11869 Logical names of shared folders must be unique within the given scope
11870 (global, permanent or transient). However, they do not need to be unique
11871 across scopes. In this case, the definition of the shared folder in a
11872 more specific scope takes precedence over definitions in all other
11873 scopes. The order of precedence is (more specific to more general):
11874 <ol>
11875 <li>Transient definitions</li>
11876 <li>Permanent definitions</li>
11877 <li>Global definitions</li>
11878 </ol>
11879
11880 For example, if MyMachine has a shared folder named
11881 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
11882 transient shared folder named <tt>C_DRIVE</tt> (that points
11883 to <tt>C:\\\\WINDOWS</tt>) will change the definition
11884 of <tt>C_DRIVE</tt> in the guest OS so
11885 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
11886 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
11887 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
11888 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
11889 to <tt>C:\\</tt> if it still exists.
11890
11891 Note that permanent and transient shared folders of different machines
11892 are in different name spaces, so they don't overlap and don't need to
11893 have unique logical names.
11894
11895 <note>
11896 Global shared folders are not implemented in the current version of the
11897 product.
11898 </note>
11899 </desc>
11900
11901 <attribute name="name" type="wstring" readonly="yes">
11902 <desc>Logical name of the shared folder.</desc>
11903 </attribute>
11904
11905 <attribute name="hostPath" type="wstring" readonly="yes">
11906 <desc>Full path to the shared folder in the host file system.</desc>
11907 </attribute>
11908
11909 <attribute name="accessible" type="boolean" readonly="yes">
11910 <desc>
11911 Whether the folder defined by the host path is currently
11912 accessible or not.
11913 For example, the folder can be unaccessible if it is placed
11914 on the network share that is not available by the time
11915 this property is read.
11916 </desc>
11917 </attribute>
11918
11919 <attribute name="writable" type="boolean" readonly="yes">
11920 <desc>
11921 Whether the folder defined by the host path is writable or
11922 not.
11923 </desc>
11924 </attribute>
11925
11926 <attribute name="lastAccessError" type="wstring" readonly="yes">
11927 <desc>
11928 Text message that represents the result of the last accessibility
11929 check.
11930
11931 Accessibility checks are performed each time the <link to="#accessible"/>
11932 attribute is read. An empty string is returned if the last
11933 accessibility check was successful. A non-empty string indicates a
11934 failure and should normally describe a reason of the failure (for
11935 example, a file read error).
11936 </desc>
11937 </attribute>
11938
11939 </interface>
11940
11941 <!--
11942 // ISession
11943 /////////////////////////////////////////////////////////////////////////
11944 -->
11945
11946 <interface
11947 name="IInternalSessionControl" extends="$unknown"
11948 uuid="989e2c33-8dfa-437a-9a15-5ad441d50dbf"
11949 internal="yes"
11950 wsmap="suppress"
11951 >
11952 <method name="getPID">
11953 <desc>PID of the process that has created this Session object.
11954 </desc>
11955 <param name="pid" type="unsigned long" dir="return"/>
11956 </method>
11957
11958 <method name="getRemoteConsole">
11959 <desc>
11960 Returns the console object suitable for remote control.
11961
11962 <result name="VBOX_E_INVALID_VM_STATE">
11963 Session state prevents operation.
11964 </result>
11965 <result name="VBOX_E_INVALID_OBJECT_STATE">
11966 Session type prevents operation.
11967 </result>
11968
11969 </desc>
11970 <param name="console" type="IConsole" dir="return"/>
11971 </method>
11972
11973 <method name="assignMachine">
11974 <desc>
11975 Assigns the machine object associated with this direct-type
11976 session or informs the session that it will be a remote one
11977 (if @a machine == @c null).
11978
11979 <result name="VBOX_E_INVALID_VM_STATE">
11980 Session state prevents operation.
11981 </result>
11982 <result name="VBOX_E_INVALID_OBJECT_STATE">
11983 Session type prevents operation.
11984 </result>
11985
11986 </desc>
11987 <param name="machine" type="IMachine" dir="in"/>
11988 </method>
11989
11990 <method name="assignRemoteMachine">
11991 <desc>
11992 Assigns the machine and the (remote) console object associated with
11993 this remote-type session.
11994
11995 <result name="VBOX_E_INVALID_VM_STATE">
11996 Session state prevents operation.
11997 </result>
11998
11999 </desc>
12000 <param name="machine" type="IMachine" dir="in"/>
12001 <param name="console" type="IConsole" dir="in"/>
12002 </method>
12003
12004 <method name="updateMachineState">
12005 <desc>
12006 Updates the machine state in the VM process.
12007 Must be called only in certain cases
12008 (see the method implementation).
12009
12010 <result name="VBOX_E_INVALID_VM_STATE">
12011 Session state prevents operation.
12012 </result>
12013 <result name="VBOX_E_INVALID_OBJECT_STATE">
12014 Session type prevents operation.
12015 </result>
12016
12017 </desc>
12018 <param name="aMachineState" type="MachineState" dir="in"/>
12019 </method>
12020
12021 <method name="uninitialize">
12022 <desc>
12023 Uninitializes (closes) this session. Used by VirtualBox to close
12024 the corresponding remote session when the direct session dies
12025 or gets closed.
12026
12027 <result name="VBOX_E_INVALID_VM_STATE">
12028 Session state prevents operation.
12029 </result>
12030
12031 </desc>
12032 </method>
12033
12034 <method name="onNetworkAdapterChange">
12035 <desc>
12036 Triggered when settings of a network adapter of the
12037 associated virtual machine have changed.
12038
12039 <result name="VBOX_E_INVALID_VM_STATE">
12040 Session state prevents operation.
12041 </result>
12042 <result name="VBOX_E_INVALID_OBJECT_STATE">
12043 Session type prevents operation.
12044 </result>
12045
12046 </desc>
12047 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12048 <param name="changeAdapter" type="boolean" dir="in"/>
12049 </method>
12050
12051 <method name="onSerialPortChange">
12052 <desc>
12053 Triggered when settings of a serial port of the
12054 associated virtual machine have changed.
12055
12056 <result name="VBOX_E_INVALID_VM_STATE">
12057 Session state prevents operation.
12058 </result>
12059 <result name="VBOX_E_INVALID_OBJECT_STATE">
12060 Session type prevents operation.
12061 </result>
12062
12063 </desc>
12064 <param name="serialPort" type="ISerialPort" dir="in"/>
12065 </method>
12066
12067 <method name="onParallelPortChange">
12068 <desc>
12069 Triggered when settings of a parallel port of the
12070 associated virtual machine have changed.
12071
12072 <result name="VBOX_E_INVALID_VM_STATE">
12073 Session state prevents operation.
12074 </result>
12075 <result name="VBOX_E_INVALID_OBJECT_STATE">
12076 Session type prevents operation.
12077 </result>
12078
12079 </desc>
12080 <param name="parallelPort" type="IParallelPort" dir="in"/>
12081 </method>
12082
12083 <method name="onStorageControllerChange">
12084 <desc>
12085 Triggered when settings of a storage controller of the
12086 associated virtual machine have changed.
12087
12088 <result name="VBOX_E_INVALID_VM_STATE">
12089 Session state prevents operation.
12090 </result>
12091 <result name="VBOX_E_INVALID_OBJECT_STATE">
12092 Session type prevents operation.
12093 </result>
12094
12095 </desc>
12096 </method>
12097
12098 <method name="onMediumChange">
12099 <desc>
12100 Triggered when attached media of the
12101 associated virtual machine have changed.
12102
12103 <result name="VBOX_E_INVALID_VM_STATE">
12104 Session state prevents operation.
12105 </result>
12106 <result name="VBOX_E_INVALID_OBJECT_STATE">
12107 Session type prevents operation.
12108 </result>
12109
12110 </desc>
12111
12112 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12113 </method>
12114
12115 <method name="onVRDPServerChange">
12116 <desc>
12117 Triggered when settings of the VRDP server object of the
12118 associated virtual machine have changed.
12119
12120 <result name="VBOX_E_INVALID_VM_STATE">
12121 Session state prevents operation.
12122 </result>
12123 <result name="VBOX_E_INVALID_OBJECT_STATE">
12124 Session type prevents operation.
12125 </result>
12126
12127 </desc>
12128 </method>
12129
12130 <method name="onUSBControllerChange">
12131 <desc>
12132 Triggered when settings of the USB controller object of the
12133 associated virtual machine have changed.
12134
12135 <result name="VBOX_E_INVALID_VM_STATE">
12136 Session state prevents operation.
12137 </result>
12138 <result name="VBOX_E_INVALID_OBJECT_STATE">
12139 Session type prevents operation.
12140 </result>
12141
12142 </desc>
12143 </method>
12144
12145 <method name="onSharedFolderChange">
12146 <desc>
12147 Triggered when a permanent (global or machine) shared folder has been
12148 created or removed.
12149 <note>
12150 We don't pass shared folder parameters in this notification because
12151 the order in which parallel notifications are delivered is not defined,
12152 therefore it could happen that these parameters were outdated by the
12153 time of processing this notification.
12154 </note>
12155
12156 <result name="VBOX_E_INVALID_VM_STATE">
12157 Session state prevents operation.
12158 </result>
12159 <result name="VBOX_E_INVALID_OBJECT_STATE">
12160 Session type prevents operation.
12161 </result>
12162
12163 </desc>
12164 <param name="global" type="boolean" dir="in"/>
12165 </method>
12166
12167 <method name="onUSBDeviceAttach">
12168 <desc>
12169 Triggered when a request to capture a USB device (as a result
12170 of matched USB filters or direct call to
12171 <link to="IConsole::attachUSBDevice"/>) has completed.
12172 A @c null @a error object means success, otherwise it
12173 describes a failure.
12174
12175 <result name="VBOX_E_INVALID_VM_STATE">
12176 Session state prevents operation.
12177 </result>
12178 <result name="VBOX_E_INVALID_OBJECT_STATE">
12179 Session type prevents operation.
12180 </result>
12181
12182 </desc>
12183 <param name="device" type="IUSBDevice" dir="in"/>
12184 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12185 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12186 </method>
12187
12188 <method name="onUSBDeviceDetach">
12189 <desc>
12190 Triggered when a request to release the USB device (as a result
12191 of machine termination or direct call to
12192 <link to="IConsole::detachUSBDevice"/>) has completed.
12193 A @c null @a error object means success, otherwise it
12194 describes a failure.
12195
12196 <result name="VBOX_E_INVALID_VM_STATE">
12197 Session state prevents operation.
12198 </result>
12199 <result name="VBOX_E_INVALID_OBJECT_STATE">
12200 Session type prevents operation.
12201 </result>
12202
12203 </desc>
12204 <param name="id" type="uuid" mod="string" dir="in"/>
12205 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12206 </method>
12207
12208 <method name="onShowWindow">
12209 <desc>
12210 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12211 <link to="IMachine::showConsoleWindow"/> in order to notify
12212 console callbacks
12213 <link to="IConsoleCallback::onCanShowWindow"/>
12214 and <link to="IConsoleCallback::onShowWindow"/>.
12215
12216 <result name="VBOX_E_INVALID_OBJECT_STATE">
12217 Session type prevents operation.
12218 </result>
12219
12220 </desc>
12221 <param name="check" type="boolean" dir="in"/>
12222 <param name="canShow" type="boolean" dir="out"/>
12223 <param name="winId" type="unsigned long long" dir="out"/>
12224 </method>
12225
12226 <method name="accessGuestProperty">
12227 <desc>
12228 Called by <link to="IMachine::getGuestProperty"/> and by
12229 <link to="IMachine::setGuestProperty"/> in order to read and
12230 modify guest properties.
12231
12232 <result name="VBOX_E_INVALID_VM_STATE">
12233 Machine session is not open.
12234 </result>
12235 <result name="VBOX_E_INVALID_OBJECT_STATE">
12236 Session type is not direct.
12237 </result>
12238
12239 </desc>
12240 <param name="name" type="wstring" dir="in"/>
12241 <param name="value" type="wstring" dir="in"/>
12242 <param name="flags" type="wstring" dir="in"/>
12243 <param name="isSetter" type="boolean" dir="in"/>
12244 <param name="retValue" type="wstring" dir="out"/>
12245 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12246 <param name="retFlags" type="wstring" dir="out"/>
12247 </method>
12248
12249 <method name="enumerateGuestProperties">
12250 <desc>
12251 Return a list of the guest properties matching a set of patterns along
12252 with their values, time stamps and flags.
12253
12254 <result name="VBOX_E_INVALID_VM_STATE">
12255 Machine session is not open.
12256 </result>
12257 <result name="VBOX_E_INVALID_OBJECT_STATE">
12258 Session type is not direct.
12259 </result>
12260
12261 </desc>
12262 <param name="patterns" type="wstring" dir="in">
12263 <desc>
12264 The patterns to match the properties against as a comma-separated
12265 string. If this is empty, all properties currently set will be
12266 returned.
12267 </desc>
12268 </param>
12269 <param name="key" type="wstring" dir="out" safearray="yes">
12270 <desc>
12271 The key names of the properties returned.
12272 </desc>
12273 </param>
12274 <param name="value" type="wstring" dir="out" safearray="yes">
12275 <desc>
12276 The values of the properties returned. The array entries match the
12277 corresponding entries in the @a key array.
12278 </desc>
12279 </param>
12280 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12281 <desc>
12282 The time stamps of the properties returned. The array entries match
12283 the corresponding entries in the @a key array.
12284 </desc>
12285 </param>
12286 <param name="flags" type="wstring" dir="out" safearray="yes">
12287 <desc>
12288 The flags of the properties returned. The array entries match the
12289 corresponding entries in the @a key array.
12290 </desc>
12291 </param>
12292 </method>
12293
12294 </interface>
12295
12296 <interface
12297 name="ISession" extends="$dispatched"
12298 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12299 wsmap="managed"
12300 >
12301 <desc>
12302 The ISession interface represents a serialization primitive for virtual
12303 machines.
12304
12305 With VirtualBox, every time one wishes to manipulate a virtual machine
12306 (e.g. change its settings or start execution), a session object is
12307 required. Such an object must be passed to one of the session methods
12308 that open the given session, which then initiates the machine manipulation.
12309
12310 A session serves several purposes: it identifies to the inter-process VirtualBox
12311 code which process is currently working with the virtual machine, and it ensures
12312 that there are no incompatible requests from several processes for the
12313 same virtual machine. Session objects can therefore be thought of as mutex
12314 semaphores that lock virtual machines to prevent conflicting accesses from
12315 several processes.
12316
12317 How sessions objects are used depends on whether you use the Main API
12318 via COM or via the webservice:
12319
12320 <ul>
12321 <li>When using the COM API directly, an object of the Session class from the
12322 VirtualBox type library needs to be created. In regular COM C++ client code,
12323 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12324 This object will then act as a local session object in further calls to open
12325 a session.
12326 </li>
12327
12328 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12329 one session object automatically when <link to="IWebsessionManager::logon" />
12330 is called. A managed object reference to that session object can be retrieved by
12331 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12332 reference can then be used to open sessions.
12333 </li>
12334 </ul>
12335
12336 Sessions are mainly used in two variations:
12337
12338 <ul>
12339 <li>
12340 To start a virtual machine in a separate process, one would call
12341 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12342 object as its first parameter. This session then identifies the caller
12343 and lets him control the started machine (for example, pause machine
12344 execution or power it down) as well as be notified about machine
12345 execution state changes.
12346 </li>
12347
12348 <li>To alter machine settings, or to start machine execution within the
12349 current process, one needs to open a direct session for the machine first by
12350 calling <link to="IVirtualBox::openSession"/>. While a direct session
12351 is open within one process, no any other process may open another direct
12352 session for the same machine. This prevents the machine from being changed
12353 by other processes while it is running or while the machine is being configured.
12354 </li>
12355 </ul>
12356
12357 One also can attach to an existing direct session already opened by
12358 another process (for example, in order to send a control request to the
12359 virtual machine such as the pause or the reset request). This is done by
12360 calling <link to="IVirtualBox::openExistingSession"/>.
12361
12362 <note>
12363 Unless you are trying to write a new VirtualBox front-end that
12364 performs direct machine execution (like the VirtualBox or VBoxSDL
12365 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12366 session opened by <link to="IVirtualBox::openSession"/> and use this
12367 session only to change virtual machine settings. If you simply want to
12368 start virtual machine execution using one of the existing front-ends
12369 (for example the VirtualBox GUI or headless server), simply use
12370 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12371 will power up the machine automatically for you.
12372 </note>
12373 </desc>
12374
12375 <attribute name="state" type="SessionState" readonly="yes">
12376 <desc>Current state of this session.</desc>
12377 </attribute>
12378
12379 <attribute name="type" type="SessionType" readonly="yes">
12380 <desc>
12381 Type of this session. The value of this attribute is valid only
12382 if the session is currently open (i.e. its #state is
12383 SessionType_SessionOpen), otherwise an error will be returned.
12384 </desc>
12385 </attribute>
12386
12387 <attribute name="machine" type="IMachine" readonly="yes">
12388 <desc>Machine object associated with this session.</desc>
12389 </attribute>
12390
12391 <attribute name="console" type="IConsole" readonly="yes">
12392 <desc>Console object associated with this session.</desc>
12393 </attribute>
12394
12395 <method name="close">
12396 <desc>
12397 Closes a session that was previously opened.
12398
12399 It is recommended that every time an "open session" method (such as
12400 <link to="IVirtualBox::openRemoteSession" /> or
12401 <link to="IVirtualBox::openSession" />) has been called to
12402 manipulate a virtual machine, the caller invoke
12403 ISession::close() when it's done doing so. Since sessions are
12404 serialization primitives much like ordinary mutexes, they are
12405 best used the same way: for each "open" call, there should be
12406 a matching "close" call, even when errors occur.
12407
12408 Otherwise, if a direct session for a machine opened with
12409 <link to="IVirtualBox::openSession"/> is not explicitly closed
12410 when the application terminates, the state of the machine will
12411 be set to <link to="MachineState_Aborted" /> on the server.
12412
12413 Generally, it is recommended to close all open sessions explicitly
12414 before terminating the application (regardless of the reason for
12415 the termination).
12416
12417 <note>
12418 Do not expect the session state (<link to="ISession::state" />
12419 to return to "Closed" immediately after you invoke
12420 ISession::close(), particularly if you have started a remote
12421 session to execute the VM in a new process. The session state will
12422 automatically return to "Closed" once the VM is no longer executing,
12423 which can of course take a very long time.
12424 </note>
12425
12426 <result name="E_UNEXPECTED">
12427 Session is not open.
12428 </result>
12429
12430 </desc>
12431 </method>
12432
12433 </interface>
12434
12435 <!--
12436 // IStorageController
12437 /////////////////////////////////////////////////////////////////////////
12438 -->
12439
12440 <enum
12441 name="StorageBus"
12442 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
12443 >
12444 <desc>
12445 The bus type of the storage controller (IDE, SATA, SCSI or Floppy);
12446 see <link to="IStorageController::bus" />.
12447 </desc>
12448 <const name="Null" value="0">
12449 <desc>@c null value. Never used by the API.</desc>
12450 </const>
12451 <const name="IDE" value="1"/>
12452 <const name="SATA" value="2"/>
12453 <const name="SCSI" value="3"/>
12454 <const name="Floppy" value="4"/>
12455 </enum>
12456
12457 <enum
12458 name="StorageControllerType"
12459 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
12460 >
12461 <desc>
12462 The exact variant of storage controller hardware presented
12463 to the guest; see <link to="IStorageController::controllerType" />.
12464 </desc>
12465
12466 <const name="Null" value="0">
12467 <desc>@c null value. Never used by the API.</desc>
12468 </const>
12469 <const name="LsiLogic" value="1">
12470 <desc>A SCSI controller of the LsiLogic variant.</desc>
12471 </const>
12472 <const name="BusLogic" value="2">
12473 <desc>A SCSI controller of the BusLogic variant.</desc>
12474 </const>
12475 <const name="IntelAhci" value="3">
12476 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
12477 </const>
12478 <const name="PIIX3" value="4">
12479 <desc>An IDE controller of the PIIX3 variant.</desc>
12480 </const>
12481 <const name="PIIX4" value="5">
12482 <desc>An IDE controller of the PIIX4 variant.</desc>
12483 </const>
12484 <const name="ICH6" value="6">
12485 <desc>An IDE controller of the ICH6 variant.</desc>
12486 </const>
12487 <const name="I82078" value="7">
12488 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
12489 </const>
12490 </enum>
12491
12492 <interface
12493 name="IStorageController" extends="$unknown"
12494 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12495 wsmap="managed"
12496 >
12497 <desc>
12498 Represents a storage controller that is attached to a virtual machine
12499 (<link to="IMachine" />). Just as disks (hard disks, DVDs, FDs) are
12500 attached to storage controllers in a real computer, virtual media
12501 (represented by <link to="IMedium" />) are attached to virtual
12502 storage controllers, represented by this interface.
12503
12504 As opposed to physical hardware, VirtualBox has a very generic concept
12505 of a storage controller, and for purposes of the Main API, all virtual
12506 storage is attached to virtual machines via instances of this interface.
12507 There are four types of such virtual storage controllers: IDE, SCSI, SATA
12508 and Floppy (see <link to="#bus" />). Depending on which of these four is
12509 used, certain sub-types may be available and can be selected in
12510 <link to="#controllerType" />.
12511
12512 Depending on these settings, the guest operating system might see
12513 significantly different virtual hardware.
12514 </desc>
12515
12516 <attribute name="name" type="wstring" readonly="yes">
12517 <desc>
12518 Name of the storage controller, as originally specified with
12519 <link to="IMachine::addStorageController" />. This then uniquely
12520 identifies this controller with other method calls such as
12521 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
12522 </desc>
12523 </attribute>
12524
12525 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12526 <desc>
12527 Maximum number of devices which can be attached to one port.
12528 </desc>
12529 </attribute>
12530
12531 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12532 <desc>
12533 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12534 </desc>
12535 </attribute>
12536
12537 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12538 <desc>
12539 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12540 </desc>
12541 </attribute>
12542
12543 <attribute name="instance" type="unsigned long">
12544 <desc>
12545 The instance number of the device in the running VM.
12546 </desc>
12547 </attribute>
12548
12549 <attribute name="portCount" type="unsigned long">
12550 <desc>
12551 The number of currently usable ports on the controller.
12552 The minimum and maximum number of ports for one controller are
12553 stored in <link to="IStorageController::minPortCount"/>
12554 and <link to="IStorageController::maxPortCount"/>.
12555 </desc>
12556 </attribute>
12557
12558 <attribute name="bus" type="StorageBus" readonly="yes">
12559 <desc>
12560 The bus type of the storage controller (IDE, SATA, SCSI or Floppy).
12561 </desc>
12562 </attribute>
12563
12564 <attribute name="controllerType" type="StorageControllerType">
12565 <desc>
12566 The exact variant of storage controller hardware presented
12567 to the guest.
12568 Depending on this value, VirtualBox will provide a different
12569 virtual storage controller hardware to the guest.
12570 For SATA and floppy controllers, only one variant is available,
12571 but for IDE and SCSI, there are several.
12572
12573 For SCSI controllers, the default type is LsiLogic.
12574 </desc>
12575 </attribute>
12576
12577 <method name="GetIDEEmulationPort">
12578 <desc>
12579 Gets the corresponding port number which is emulated as an IDE device.
12580 Works only with SATA controllers.
12581
12582 <result name="E_INVALIDARG">
12583 The @a devicePosition is not in the range 0 to 3.
12584 </result>
12585 <result name="E_NOTIMPL">
12586 The storage controller type is not SATAIntelAhci.
12587 </result>
12588
12589 </desc>
12590 <param name="devicePosition" type="long" dir="in"/>
12591 <param name="portNumber" type="long" dir="return"/>
12592 </method>
12593
12594 <method name="SetIDEEmulationPort">
12595 <desc>
12596 Sets the port number which is emulated as an IDE device.
12597 Works only with SATA controllers.
12598
12599 <result name="E_INVALIDARG">
12600 The @a devicePosition is not in the range 0 to 3 or the
12601 @a portNumber is not in the range 0 to 29.
12602 </result>
12603 <result name="E_NOTIMPL">
12604 The storage controller type is not SATAIntelAhci.
12605 </result>
12606
12607 </desc>
12608 <param name="devicePosition" type="long" dir="in"/>
12609 <param name="portNumber" type="long" dir="in"/>
12610 </method>
12611
12612 </interface>
12613
12614<if target="wsdl">
12615
12616 <!--
12617 // IManagedObjectRef
12618 /////////////////////////////////////////////////////////////////////////
12619 -->
12620
12621 <interface
12622 name="IManagedObjectRef" extends="$unknown"
12623 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12624 internal="yes"
12625 wsmap="managed"
12626 wscpp="hardcoded"
12627 >
12628 <desc>
12629 Managed object reference.
12630
12631 Only within the webservice, a managed object reference (which is really
12632 an opaque number) allows a webservice client to address an object
12633 that lives in the address space of the webservice server.
12634
12635 Behind each managed object reference, there is a COM object that lives
12636 in the webservice server's address space. The COM object is not freed
12637 until the managed object reference is released, either by an explicit
12638 call to <link to="IManagedObjectRef::release" /> or by logging off from
12639 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12640 all objects created during the webservice session.
12641
12642 Whenever a method call of the VirtualBox API returns a COM object, the
12643 webservice representation of that method will instead return a
12644 managed object reference, which can then be used to invoke methods
12645 on that object.
12646 </desc>
12647
12648 <method name="getInterfaceName">
12649 <desc>
12650 Returns the name of the interface that this managed object represents,
12651 for example, "IMachine", as a string.
12652 </desc>
12653 <param name="return" type="wstring" dir="return"/>
12654 </method>
12655
12656 <method name="release">
12657 <desc>
12658 Releases this managed object reference and frees the resources that
12659 were allocated for it in the webservice server process. After calling
12660 this method, the identifier of the reference can no longer be used.
12661 </desc>
12662 </method>
12663
12664 </interface>
12665
12666 <!--
12667 // IWebsessionManager
12668 /////////////////////////////////////////////////////////////////////////
12669 -->
12670
12671 <interface
12672 name="IWebsessionManager" extends="$unknown"
12673 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12674 internal="yes"
12675 wsmap="global"
12676 wscpp="hardcoded"
12677 >
12678 <desc>
12679 Websession manager. This provides essential services
12680 to webservice clients.
12681 </desc>
12682 <method name="logon">
12683 <desc>
12684 Logs a new client onto the webservice and returns a managed object reference to
12685 the IVirtualBox instance, which the client can then use as a basis to further
12686 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12687 interface, in one way or the other.
12688 </desc>
12689 <param name="username" type="wstring" dir="in"/>
12690 <param name="password" type="wstring" dir="in"/>
12691 <param name="return" type="IVirtualBox" dir="return"/>
12692 </method>
12693
12694 <method name="getSessionObject">
12695 <desc>
12696 Returns a managed object reference to the internal ISession object that was created
12697 for this web service session when the client logged on.
12698
12699 <see>ISession</see>
12700 </desc>
12701 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12702 <param name="return" type="ISession" dir="return"/>
12703 </method>
12704
12705 <method name="logoff">
12706 <desc>
12707 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12708 and destroys all resources associated with the session (most importantly, all
12709 managed objects created in the server while the session was active).
12710 </desc>
12711 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12712 </method>
12713
12714 </interface>
12715
12716</if>
12717
12718 <!--
12719 // IPerformanceCollector & friends
12720 /////////////////////////////////////////////////////////////////////////
12721 -->
12722
12723 <interface
12724 name="IPerformanceMetric" extends="$unknown"
12725 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12726 >
12727 <desc>
12728 The IPerformanceMetric interface represents parameters of the given
12729 performance metric.
12730 </desc>
12731
12732 <attribute name="metricName" type="wstring" readonly="yes">
12733 <desc>
12734 Name of the metric.
12735 </desc>
12736 </attribute>
12737
12738 <attribute name="object" type="$unknown" readonly="yes">
12739 <desc>
12740 Object this metric belongs to.
12741 </desc>
12742 </attribute>
12743
12744 <attribute name="description" type="wstring" readonly="yes">
12745 <desc>
12746 Textual description of the metric.
12747 </desc>
12748 </attribute>
12749
12750 <attribute name="period" type="unsigned long" readonly="yes">
12751 <desc>
12752 Time interval between samples, measured in seconds.
12753 </desc>
12754 </attribute>
12755
12756 <attribute name="count" type="unsigned long" readonly="yes">
12757 <desc>
12758 Number of recent samples retained by the performance collector for this
12759 metric.
12760
12761 When the collected sample count exceeds this number, older samples
12762 are discarded.
12763 </desc>
12764 </attribute>
12765
12766 <attribute name="unit" type="wstring" readonly="yes">
12767 <desc>
12768 Unit of measurement.
12769 </desc>
12770 </attribute>
12771
12772 <attribute name="minimumValue" type="long" readonly="yes">
12773 <desc>
12774 Minimum possible value of this metric.
12775 </desc>
12776 </attribute>
12777
12778 <attribute name="maximumValue" type="long" readonly="yes">
12779 <desc>
12780 Maximum possible value of this metric.
12781 </desc>
12782 </attribute>
12783 </interface>
12784
12785 <interface
12786 name="IPerformanceCollector" extends="$unknown"
12787 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12788 wsmap="managed"
12789 >
12790 <desc>
12791 The IPerformanceCollector interface represents a service that collects and
12792 stores performance metrics data.
12793
12794 Performance metrics are associated with objects of interfaces like IHost and
12795 IMachine. Each object has a distinct set of performance metrics.
12796 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12797
12798 Metric data is collected at the specified intervals and is retained
12799 internally. The interval and the number of retained samples can be set
12800 with <link to="IPerformanceCollector::setupMetrics" />.
12801
12802 Metrics are organized hierarchically, with each level separated by a
12803 slash (/) character. Generally, the scheme for metric names is like this:
12804
12805 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
12806
12807 "Category/Metric" together form the base metric name. A base metric is the
12808 smallest unit for which a sampling interval and the number of retained
12809 samples can be set. Only base metrics can be enabled and disabled. All
12810 sub-metrics are collected when their base metric is collected.
12811 Collected values for any set of sub-metrics can be queried with
12812 <link to="IPerformanceCollector::queryMetricsData" />.
12813
12814 For example "CPU/Load/User:avg"
12815 metric name stands for the "CPU" category, "Load" metric, "User" submetric,
12816 "average" aggregate. An aggregate function is computed over all retained
12817 data. Valid aggregate functions are:
12818
12819 <ul>
12820 <li>avg -- average</li>
12821 <li>min -- minimum</li>
12822 <li>max -- maximum</li>
12823 </ul>
12824
12825 When setting up
12826 metric parameters, querying metric data, enabling or disabling metrics
12827 wildcards can be used in metric names to specify a subset of metrics. For
12828 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
12829 averages can be queried using <tt>*:avg</tt> and so on. To query metric
12830 values without aggregates <tt>*:</tt> can be used.
12831
12832 The valid names for base metrics are:
12833
12834 <ul>
12835 <li>CPU/Load</li>
12836 <li>CPU/MHz</li>
12837 <li>RAM/Usage</li>
12838 </ul>
12839
12840 The general sequence for collecting and retrieving the metrics is:
12841 <ul>
12842 <li>
12843 Obtain an instance of IPerformanceCollector with
12844 <link to="IVirtualBox::performanceCollector" />
12845 </li>
12846 <li>
12847 Allocate and populate an array with references to objects the metrics
12848 will be collected for. Use references to IHost and IMachine objects.
12849 </li>
12850 <li>
12851 Allocate and populate an array with base metric names the data will be
12852 collected for.
12853 </li>
12854 <li>
12855 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
12856 metric data will be collected and stored.
12857 </li>
12858 <li>
12859 Wait for the data to get collected.
12860 </li>
12861 <li>
12862 Allocate and populate an array with references to objects the metric
12863 values will be queried for. You can re-use the object array used for
12864 setting base metrics.
12865 </li>
12866 <li>
12867 Allocate and populate an array with metric names the data will be
12868 collected for. Note that metric names differ from base metric names.
12869 </li>
12870 <li>
12871 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
12872 have been collected so far are returned. Note that the values are still
12873 retained internally and data collection continues.
12874 </li>
12875 </ul>
12876
12877 For an example of usage refer to the following files in VirtualBox SDK:
12878 <ul>
12879 <li>
12880 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
12881 </li>
12882 <li>
12883 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
12884 </li>
12885 </ul>
12886 </desc>
12887
12888 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
12889 <desc>
12890 Array of unique names of metrics.
12891
12892 This array represents all metrics supported by the performance
12893 collector. Individual objects do not necessarily support all of them.
12894 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
12895 list of supported metrics for a particular object.
12896 </desc>
12897 </attribute>
12898
12899 <method name="getMetrics">
12900 <desc>
12901 Returns parameters of specified metrics for a set of objects.
12902 <note>
12903 @c Null metrics array means all metrics. @c Null object array means
12904 all existing objects.
12905 </note>
12906 </desc>
12907 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12908 <desc>
12909 Metric name filter. Currently, only a comma-separated list of metrics
12910 is supported.
12911 </desc>
12912 </param>
12913 <param name="objects" type="$unknown" dir="in" safearray="yes">
12914 <desc>
12915 Set of objects to return metric parameters for.
12916 </desc>
12917 </param>
12918 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
12919 <desc>
12920 Array of returned metric parameters.
12921 </desc>
12922 </param>
12923 </method>
12924
12925 <method name="setupMetrics">
12926 <desc>
12927 Sets parameters of specified base metrics for a set of objects. Returns
12928 an array of <link to="IPerformanceMetric" /> describing the metrics have
12929 been affected.
12930 <note>
12931 @c Null or empty metric name array means all metrics. @c Null or empty
12932 object array means all existing objects. If metric name array contains
12933 a single element and object array contains many, the single metric
12934 name array element is applied to each object array element to form
12935 metric/object pairs.
12936 </note>
12937 </desc>
12938 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12939 <desc>
12940 Metric name filter. Comma-separated list of metrics with wildcard
12941 support.
12942 </desc>
12943 </param>
12944 <param name="objects" type="$unknown" dir="in" safearray="yes">
12945 <desc>
12946 Set of objects to setup metric parameters for.
12947 </desc>
12948 </param>
12949 <param name="period" type="unsigned long" dir="in">
12950 <desc>
12951 Time interval in seconds between two consecutive samples of performance
12952 data.
12953 </desc>
12954 </param>
12955 <param name="count" type="unsigned long" dir="in">
12956 <desc>
12957 Number of samples to retain in performance data history. Older samples
12958 get discarded.
12959 </desc>
12960 </param>
12961 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12962 <desc>
12963 Array of metrics that have been modified by the call to this method.
12964 </desc>
12965 </param>
12966 </method>
12967
12968 <method name="enableMetrics">
12969 <desc>
12970 Turns on collecting specified base metrics. Returns an array of
12971 <link to="IPerformanceMetric" /> describing the metrics have been
12972 affected.
12973 <note>
12974 @c Null or empty metric name array means all metrics. @c Null or empty
12975 object array means all existing objects. If metric name array contains
12976 a single element and object array contains many, the single metric
12977 name array element is applied to each object array element to form
12978 metric/object pairs.
12979 </note>
12980 </desc>
12981 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12982 <desc>
12983 Metric name filter. Comma-separated list of metrics with wildcard
12984 support.
12985 </desc>
12986 </param>
12987 <param name="objects" type="$unknown" dir="in" safearray="yes">
12988 <desc>
12989 Set of objects to enable metrics for.
12990 </desc>
12991 </param>
12992 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12993 <desc>
12994 Array of metrics that have been modified by the call to this method.
12995 </desc>
12996 </param>
12997 </method>
12998
12999 <method name="disableMetrics">
13000 <desc>
13001 Turns off collecting specified base metrics. Returns an array of
13002 <link to="IPerformanceMetric" /> describing the metrics have been
13003 affected.
13004 <note>
13005 @c Null or empty metric name array means all metrics. @c Null or empty
13006 object array means all existing objects. If metric name array contains
13007 a single element and object array contains many, the single metric
13008 name array element is applied to each object array element to form
13009 metric/object pairs.
13010 </note>
13011 </desc>
13012 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13013 <desc>
13014 Metric name filter. Comma-separated list of metrics with wildcard
13015 support.
13016 </desc>
13017 </param>
13018 <param name="objects" type="$unknown" dir="in" safearray="yes">
13019 <desc>
13020 Set of objects to disable metrics for.
13021 </desc>
13022 </param>
13023 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13024 <desc>
13025 Array of metrics that have been modified by the call to this method.
13026 </desc>
13027 </param>
13028 </method>
13029
13030 <method name="queryMetricsData">
13031 <desc>
13032 Queries collected metrics data for a set of objects.
13033
13034 The data itself and related metric information are returned in seven
13035 parallel and one flattened array of arrays. Elements of
13036 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13037 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13038 the same index describe one set of values corresponding to a single
13039 metric.
13040
13041 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13042 start and length of a sub-array is indicated by
13043 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13044 value for metric <tt>metricNames[i]</tt> is at
13045 <tt>returnData[returnIndices[i]]</tt>.
13046
13047 <note>
13048 @c Null or empty metric name array means all metrics. @c Null or empty
13049 object array means all existing objects. If metric name array contains
13050 a single element and object array contains many, the single metric
13051 name array element is applied to each object array element to form
13052 metric/object pairs.
13053 </note>
13054 <note>
13055 Data collection continues behind the scenes after call to
13056 @c queryMetricsData. The return data can be seen as the snapshot of
13057 the current state at the time of @c queryMetricsData call. The
13058 internally kept metric values are not cleared by the call. This makes
13059 possible querying different subsets of metrics or aggregates with
13060 subsequent calls. If periodic querying is needed it is highly
13061 suggested to query the values with @c interval*count period to avoid
13062 confusion. This way a completely new set of data values will be
13063 provided by each query.
13064 </note>
13065 </desc>
13066 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13067 <desc>
13068 Metric name filter. Comma-separated list of metrics with wildcard
13069 support.
13070 </desc>
13071 </param>
13072 <param name="objects" type="$unknown" dir="in" safearray="yes">
13073 <desc>
13074 Set of objects to query metrics for.
13075 </desc>
13076 </param>
13077 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13078 <desc>
13079 Names of metrics returned in @c returnData.
13080 </desc>
13081 </param>
13082 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13083 <desc>
13084 Objects associated with metrics returned in @c returnData.
13085 </desc>
13086 </param>
13087 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13088 <desc>
13089 Units of measurement for each returned metric.
13090 </desc>
13091 </param>
13092 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13093 <desc>
13094 Divisor that should be applied to return values in order to get
13095 floating point values. For example:
13096 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13097 will retrieve the floating point value of i-th sample of the first
13098 metric.
13099 </desc>
13100 </param>
13101 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13102 <desc>
13103 Sequence numbers of the first elements of value sequences of particular metrics
13104 returned in @c returnData. For aggregate metrics it is the sequence number of
13105 the sample the aggregate started calculation from.
13106 </desc>
13107 </param>
13108 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13109 <desc>
13110 Indices of the first elements of value sequences of particular metrics
13111 returned in @c returnData.
13112 </desc>
13113 </param>
13114 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13115 <desc>
13116 Lengths of value sequences of particular metrics.
13117 </desc>
13118 </param>
13119 <param name="returnData" type="long" dir="return" safearray="yes">
13120 <desc>
13121 Flattened array of all metric data containing sequences of values for
13122 each metric.
13123 </desc>
13124 </param>
13125 </method>
13126
13127 </interface>
13128
13129 <module name="VBoxSVC" context="LocalServer">
13130 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13131 namespace="virtualbox.org">
13132 <interface name="IVirtualBox" default="yes"/>
13133 </class>
13134 </module>
13135
13136 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13137 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
13138 namespace="virtualbox.org">
13139 <interface name="ISession" default="yes"/>
13140 </class>
13141 <class name="CallbackWrapper" uuid="49EE8561-5563-4715-B18C-A4B1A490DAFE"
13142 namespace="virtualbox.org">
13143 <interface name="ILocalOwner" default="yes"/>
13144 <interface name="IVirtualBoxCallback"/>
13145 <interface name="IConsoleCallback"/>
13146 </class>
13147 </module>
13148
13149</library>
13150
13151</idl>
13152
13153<!-- 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