VirtualBox

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

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

Main,++: Added MachineState_MigratingFrom for use during startup on the migration target.

  • Property svn:eol-style set to native
File size: 486.9 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="f532545d-9ae7-4402-8b5f-1ea7d778cfc7"
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="MigratingFrom" value="11">
676 <desc>
677 Migrating the machine state from another host or process.
678 </desc>
679 </const>
680 <const name="Discarding" value="12">
681 <desc>
682 Snapshot of the machine is being discarded.
683 </desc>
684 </const>
685 <const name="SettingUp" value="13">
686 <desc>
687 Lengthy setup operation is in progress.
688 </desc>
689 </const>
690
691 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
692 <desc>
693 Pseudo-state: first online state (for use in relational expressions).
694 </desc>
695 </const>
696 <const name="LastOnline" value="11" wsmap="suppress"> <!-- Restoring -->
697 <desc>
698 Pseudo-state: last online state (for use in relational expressions).
699 </desc>
700 </const>
701
702 <const name="FirstTransient" value="7" wsmap="suppress"> <!-- Starting -->
703 <desc>
704 Pseudo-state: first transient state (for use in relational expressions).
705 </desc>
706 </const>
707 <const name="LastTransient" value="13" wsmap="suppress"> <!-- SettingUp -->
708 <desc>
709 Pseudo-state: last transient state (for use in relational expressions).
710 </desc>
711 </const>
712
713 </enum>
714
715 <enum
716 name="SessionState"
717 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
718 >
719 <desc>
720 Session state. This enumeration represents possible values of
721 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
722 attributes. See individual enumerator descriptions for the meaning for
723 every value.
724 </desc>
725
726 <const name="Null" value="0">
727 <desc>Null value (never used by the API).</desc>
728 </const>
729 <const name="Closed" value="1">
730 <desc>
731 The machine has no open sessions (<link to="IMachine::sessionState"/>);
732 the session is closed (<link to="ISession::state"/>)
733 </desc>
734 </const>
735 <const name="Open" value="2">
736 <desc>
737 The machine has an open direct session (<link to="IMachine::sessionState"/>);
738 the session is open (<link to="ISession::state"/>)
739 </desc>
740 </const>
741 <const name="Spawning" value="3">
742 <desc>
743 A new (direct) session is being opened for the machine
744 as a result of <link to="IVirtualBox::openRemoteSession"/>
745 call (<link to="IMachine::sessionState"/>);
746 the session is currently being opened
747 as a result of <link to="IVirtualBox::openRemoteSession"/>
748 call (<link to="ISession::state"/>)
749 </desc>
750 </const>
751 <const name="Closing" value="4">
752 <desc>
753 The direct session is being closed (<link to="IMachine::sessionState"/>);
754 the session is being closed (<link to="ISession::state"/>)
755 </desc>
756 </const>
757 </enum>
758
759 <enum
760 name="SessionType"
761 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
762 >
763 <desc>
764 Session type. This enumeration represents possible values of the
765 <link to="ISession::type"/> attribute.
766 </desc>
767
768 <const name="Null" value="0">
769 <desc>Null value (never used by the API).</desc>
770 </const>
771 <const name="Direct" value="1">
772 <desc>
773 Direct session
774 (opened by <link to="IVirtualBox::openSession"/>)
775 </desc>
776 </const>
777 <const name="Remote" value="2">
778 <desc>
779 Remote session
780 (opened by <link to="IVirtualBox::openRemoteSession"/>)
781 </desc>
782 </const>
783 <const name="Existing" value="3">
784 <desc>
785 Existing session
786 (opened by <link to="IVirtualBox::openExistingSession"/>)
787 </desc>
788 </const>
789 </enum>
790
791 <enum
792 name="DeviceType"
793 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
794 >
795 <desc>
796 Device type.
797 </desc>
798 <const name="Null" value="0">
799 <desc>
800 Null value, may also mean "no device" (not allowed for
801 <link to="IConsole::getDeviceActivity"/>).
802 </desc>
803 </const>
804 <const name="Floppy" value="1">
805 <desc>Floppy device.</desc>
806 </const>
807 <const name="DVD" value="2">
808 <desc>CD/DVD-ROM device.</desc>
809 </const>
810 <const name="HardDisk" value="3">
811 <desc>Hard disk device.</desc>
812 </const>
813 <const name="Network" value="4">
814 <desc>Network device.</desc>
815 </const>
816 <const name="USB" value="5">
817 <desc>USB device.</desc>
818 </const>
819 <const name="SharedFolder" value="6">
820 <desc>Shared folder device.</desc>
821 </const>
822 </enum>
823
824 <enum
825 name="DeviceActivity"
826 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
827 >
828 <desc>
829 Device activity for <link to="IConsole::getDeviceActivity"/>.
830 </desc>
831
832 <const name="Null" value="0"/>
833 <const name="Idle" value="1"/>
834 <const name="Reading" value="2"/>
835 <const name="Writing" value="3"/>
836 </enum>
837
838 <enum
839 name="ClipboardMode"
840 uuid="33364716-4008-4701-8f14-be0fa3d62950"
841 >
842 <desc>
843 Host-Guest clipboard interchange mode.
844 </desc>
845
846 <const name="Disabled" value="0"/>
847 <const name="HostToGuest" value="1"/>
848 <const name="GuestToHost" value="2"/>
849 <const name="Bidirectional" value="3"/>
850 </enum>
851
852 <enum
853 name="Scope"
854 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
855 >
856 <desc>
857 Scope of the operation.
858
859 A generic enumeration used in various methods to define the action or
860 argument scope.
861 </desc>
862
863 <const name="Global" value="0"/>
864 <const name="Machine" value="1"/>
865 <const name="Session" value="2"/>
866 </enum>
867
868 <enum
869 name="GuestStatisticType"
870 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
871 >
872 <desc>
873 Statistics type for <link to="IGuest::getStatistic"/>.
874 </desc>
875
876 <const name="CPULoad_Idle" value="0">
877 <desc>
878 Idle CPU load (0-100%) for last interval.
879 </desc>
880 </const>
881 <const name="CPULoad_Kernel" value="1">
882 <desc>
883 Kernel CPU load (0-100%) for last interval.
884 </desc>
885 </const>
886 <const name="CPULoad_User" value="2">
887 <desc>
888 User CPU load (0-100%) for last interval.
889 </desc>
890 </const>
891 <const name="Threads" value="3">
892 <desc>
893 Total number of threads in the system.
894 </desc>
895 </const>
896 <const name="Processes" value="4">
897 <desc>
898 Total number of processes in the system.
899 </desc>
900 </const>
901 <const name="Handles" value="5">
902 <desc>
903 Total number of handles in the system.
904 </desc>
905 </const>
906 <const name="MemoryLoad" value="6">
907 <desc>
908 Memory load (0-100%).
909 </desc>
910 </const>
911 <const name="PhysMemTotal" value="7">
912 <desc>
913 Total physical memory in megabytes.
914 </desc>
915 </const>
916 <const name="PhysMemAvailable" value="8">
917 <desc>
918 Free physical memory in megabytes.
919 </desc>
920 </const>
921 <const name="PhysMemBalloon" value="9">
922 <desc>
923 Ballooned physical memory in megabytes.
924 </desc>
925 </const>
926 <const name="MemCommitTotal" value="10">
927 <desc>
928 Total amount of memory in the committed state in megabytes.
929 </desc>
930 </const>
931 <const name="MemKernelTotal" value="11">
932 <desc>
933 Total amount of memory used by the guest OS's kernel in megabytes.
934 </desc>
935 </const>
936 <const name="MemKernelPaged" value="12">
937 <desc>
938 Total amount of paged memory used by the guest OS's kernel in megabytes.
939 </desc>
940 </const>
941 <const name="MemKernelNonpaged" value="13">
942 <desc>
943 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
944 </desc>
945 </const>
946 <const name="MemSystemCache" value="14">
947 <desc>
948 Total amount of memory used by the guest OS's system cache in megabytes.
949 </desc>
950 </const>
951 <const name="PageFileSize" value="15">
952 <desc>
953 Pagefile size in megabytes.
954 </desc>
955 </const>
956 <const name="SampleNumber" value="16">
957 <desc>
958 Statistics sample number
959 </desc>
960 </const>
961 <const name="MaxVal" value="17"/>
962 </enum>
963
964 <enum
965 name="BIOSBootMenuMode"
966 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
967 >
968 <desc>
969 BIOS boot menu mode.
970 </desc>
971
972 <const name="Disabled" value="0"/>
973 <const name="MenuOnly" value="1"/>
974 <const name="MessageAndMenu" value="2"/>
975 </enum>
976
977 <enum
978 name="ProcessorFeature"
979 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
980 >
981 <desc>
982 CPU features.
983 </desc>
984
985 <const name="HWVirtEx" value="0"/>
986 <const name="PAE" value="1"/>
987 <const name="LongMode" value="2"/>
988 <const name="NestedPaging" value="3"/>
989 </enum>
990
991 <enum
992 name="FirmwareType"
993 uuid="7ceea938-8b49-41e2-bb47-667219c0d586"
994 >
995 <desc>
996 Firmware type.
997 </desc>
998 <const name="BIOS" value="1">
999 <desc>BIOS Firmware.</desc>
1000 </const>
1001 <const name="EFI" value="2">
1002 <desc>Efi firmware.</desc>
1003 </const>
1004 </enum>
1005
1006 <!--
1007 // IVirtualBoxErrorInfo
1008 /////////////////////////////////////////////////////////////////////////
1009 -->
1010
1011 <interface
1012 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1013 uuid="4b86d186-407e-4f9e-8be8-e50061be8725"
1014 supportsErrorInfo="no"
1015 wsmap="managed"
1016 >
1017 <desc>
1018 The IVirtualBoxErrorInfo interface represents extended error information.
1019
1020 Extended error information can be set by VirtualBox components after
1021 unsuccessful or partially successful method invocation. This information
1022 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1023 and then shown to the client in addition to the plain 32-bit result code.
1024
1025 In MS COM, this interface extends the IErrorInfo interface,
1026 in XPCOM, it extends the nsIException interface. In both cases,
1027 it provides a set of common attributes to retrieve error
1028 information.
1029
1030 Sometimes invocation of some component's method may involve methods of
1031 other components that may also fail (independently of this method's
1032 failure), or a series of non-fatal errors may precede a fatal error that
1033 causes method failure. In cases like that, it may be desirable to preserve
1034 information about all errors happened during method invocation and deliver
1035 it to the caller. The <link to="#next"/> attribute is intended
1036 specifically for this purpose and allows to represent a chain of errors
1037 through a single IVirtualBoxErrorInfo object set after method invocation.
1038
1039 Note that errors are stored to a chain in the reverse order, i.e. the
1040 initial error object you query right after method invocation is the last
1041 error set by the callee, the object it points to in the @a next attribute
1042 is the previous error and so on, up to the first error (which is the last
1043 in the chain).
1044 </desc>
1045
1046 <attribute name="resultCode" type="long" readonly="yes">
1047 <desc>
1048 Result code of the error.
1049 Usually, it will be the same as the result code returned
1050 by the method that provided this error information, but not
1051 always. For example, on Win32, CoCreateInstance() will most
1052 likely return E_NOINTERFACE upon unsuccessful component
1053 instantiation attempt, but not the value the component factory
1054 returned. Value is typed 'long', not 'result',
1055 to make interface usable from scripting languages.
1056 <note>
1057 In MS COM, there is no equivalent.
1058 In XPCOM, it is the same as nsIException::result.
1059 </note>
1060 </desc>
1061 </attribute>
1062
1063 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1064 <desc>
1065 UUID of the interface that defined the error.
1066 <note>
1067 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1068 data type.
1069 In XPCOM, there is no equivalent.
1070 </note>
1071 </desc>
1072 </attribute>
1073
1074 <attribute name="component" type="wstring" readonly="yes">
1075 <desc>
1076 Name of the component that generated the error.
1077 <note>
1078 In MS COM, it is the same as IErrorInfo::GetSource.
1079 In XPCOM, there is no equivalent.
1080 </note>
1081 </desc>
1082 </attribute>
1083
1084 <attribute name="text" type="wstring" readonly="yes">
1085 <desc>
1086 Text description of the error.
1087 <note>
1088 In MS COM, it is the same as IErrorInfo::GetDescription.
1089 In XPCOM, it is the same as nsIException::message.
1090 </note>
1091 </desc>
1092 </attribute>
1093
1094 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1095 <desc>
1096 Next error object if there is any, or @c null otherwise.
1097 <note>
1098 In MS COM, there is no equivalent.
1099 In XPCOM, it is the same as nsIException::inner.
1100 </note>
1101 </desc>
1102 </attribute>
1103
1104 </interface>
1105
1106 <interface
1107 name="ILocalOwner" extends="$dispatched"
1108 uuid="308FF42A-DC45-49D4-A950-B1EEE5E00BB5" wsmap="suppress"
1109 >
1110 <desc>
1111 The ILocalOwner interface allows to register local objects
1112 (created without COM calls, but with new()).
1113 Once registered, calls to methods of such objects can be made
1114 from remote COM processes.
1115 The main usecase is the event callback implementation where
1116 API clients provide callback objects.
1117 </desc>
1118 <method name="setLocalObject">
1119 <desc>
1120 Set local object.
1121 </desc>
1122 <param name="object" type="$unknown" dir="in">
1123 <desc>Local object to forward requests to.
1124 If null, clears currently set local object.</desc>
1125 </param>
1126 </method>
1127 </interface>
1128
1129 <!--
1130 // IVirtualBox
1131 /////////////////////////////////////////////////////////////////////////
1132 -->
1133
1134 <interface
1135 name="IVirtualBoxCallback" extends="$unknown"
1136 uuid="9a65adf2-3ee6-406b-bca2-2b1fa05f0d0b"
1137 wsmap="suppress"
1138 >
1139
1140 <method name="onMachineStateChange">
1141 <desc>
1142 The execution state of the given machine has changed.
1143 <see>IMachine::state</see>
1144 </desc>
1145 <param name="machineId" type="uuid" mod="string" dir="in">
1146 <desc>ID of the machine this event relates to.</desc>
1147 </param>
1148 <param name="state" type="MachineState" dir="in">
1149 <desc>New execution state.</desc>
1150 </param>
1151 </method>
1152
1153 <method name="onMachineDataChange">
1154 <desc>
1155 Any of the settings of the given machine has changed.
1156 </desc>
1157 <param name="machineId" type="uuid" mod="string" dir="in">
1158 <desc>ID of the machine this event relates to.</desc>
1159 </param>
1160 </method>
1161
1162 <method name="onExtraDataCanChange">
1163 <desc>
1164 Notification when someone tries to change extra data for
1165 either the given machine or (if @c null) global extra data.
1166 This gives the chance to veto against changes.
1167 </desc>
1168 <param name="machineId" type="uuid" mod="string" dir="in">
1169 <desc>
1170 ID of the machine this event relates to
1171 (@c null ID for global extra data change requests).
1172 </desc>
1173 </param>
1174 <param name="key" type="wstring" dir="in">
1175 <desc>
1176 Extra data key for the attempted write.
1177 </desc>
1178 </param>
1179 <param name="value" type="wstring" dir="in">
1180 <desc>
1181 Extra data value for the given key.
1182 </desc>
1183 </param>
1184 <param name="error" type="wstring" dir="out">
1185 <desc>
1186 Optional error message describing the reason of the
1187 veto (ignored if this notification returns @c true).
1188 </desc>
1189 </param>
1190 <param name="allowChange" type="boolean" dir="return">
1191 <desc>
1192 Flag to indicate whether the callee agrees (@c true)
1193 or vetoes against the change (@c false).
1194 </desc>
1195 </param>
1196 </method>
1197
1198 <method name="onExtraDataChange">
1199 <desc>
1200 Notification when machine specific or global extra data
1201 has changed.
1202 </desc>
1203 <param name="machineId" type="uuid" mod="string" dir="in">
1204 <desc>
1205 ID of the machine this event relates to.
1206 Null for global extra data changes.
1207 </desc>
1208 </param>
1209 <param name="key" type="wstring" dir="in">
1210 <desc>
1211 Extra data key that has changed.
1212 </desc>
1213 </param>
1214 <param name="value" type="wstring" dir="in">
1215 <desc>
1216 Extra data value for the given key.
1217 </desc>
1218 </param>
1219 </method>
1220
1221 <method name="onMediumRegistered">
1222 <desc>
1223 The given medium was registered or unregistered
1224 within this VirtualBox installation.
1225
1226 The @a mediumType parameter describes what type of
1227 medium the specified @a mediumId refers to. Possible
1228 values are:
1229
1230 <ul>
1231 <li><link to="DeviceType_HardDisk"/>: the medium is a hard disk
1232 that, if registered, can be obtained using the
1233 <link to="IVirtualBox::getHardDisk"/> call.</li>
1234 <li><link to="DeviceType_DVD"/>: the medium is a CD/DVD image
1235 that, if registered, can be obtained using the
1236 <link to="IVirtualBox::getDVDImage"/> call.</li>
1237 <li><link to="DeviceType_Floppy"/>: the medium is a Floppy image
1238 that, if registered, can be obtained using the
1239 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1240 </ul>
1241
1242 Note that if this is a deregistration notification,
1243 there is no way to access the object representing the
1244 unregistered medium. It is supposed that the
1245 application will do required cleanup based on the
1246 @a mediumId value.
1247 </desc>
1248 <param name="mediumId" type="uuid" mod="string" dir="in">
1249 <desc>ID of the medium this event relates to.</desc>
1250 </param>
1251 <param name="mediumType" type="DeviceType" dir="in">
1252 <desc>Type of the medium this event relates to.</desc>
1253 </param>
1254 <param name="registered" type="boolean" dir="in">
1255 <desc>
1256 If @c true, the medium was registered, otherwise it was
1257 unregistered.
1258 </desc>
1259 </param>
1260 </method>
1261
1262 <method name="onMachineRegistered">
1263 <desc>
1264 The given machine was registered or unregistered
1265 within this VirtualBox installation.
1266 </desc>
1267 <param name="machineId" type="uuid" mod="string" dir="in">
1268 <desc>ID of the machine this event relates to.</desc>
1269 </param>
1270 <param name="registered" type="boolean" dir="in">
1271 <desc>
1272 If @c true, the machine was registered, otherwise it was
1273 unregistered.
1274 </desc>
1275 </param>
1276 </method>
1277
1278 <method name="onSessionStateChange">
1279 <desc>
1280 The state of the session for the given machine was changed.
1281 <see>IMachine::sessionState</see>
1282 </desc>
1283 <param name="machineId" type="uuid" mod="string" dir="in">
1284 <desc>ID of the machine this event relates to.</desc>
1285 </param>
1286 <param name="state" type="SessionState" dir="in">
1287 <desc>New session state.</desc>
1288 </param>
1289 </method>
1290
1291 <method name="onSnapshotTaken">
1292 <desc>
1293 A new snapshot of the machine has been taken.
1294 <see>ISnapshot</see>
1295 </desc>
1296 <param name="machineId" type="uuid" mod="string" dir="in">
1297 <desc>ID of the machine this event relates to.</desc>
1298 </param>
1299 <param name="snapshotId" type="uuid" mod="string" dir="in">
1300 <desc>ID of the new snapshot.</desc>
1301 </param>
1302 </method>
1303
1304 <method name="onSnapshotDiscarded">
1305 <desc>
1306 Snapshot of the given machine has been discarded.
1307
1308 <note>
1309 This notification is delivered <b>after</b> the snapshot
1310 object has been uninitialized on the server (so that any
1311 attempt to call its methods will return an error).
1312 </note>
1313
1314 <see>ISnapshot</see>
1315 </desc>
1316 <param name="machineId" type="uuid" mod="string" dir="in">
1317 <desc>ID of the machine this event relates to.</desc>
1318 </param>
1319 <param name="snapshotId" type="uuid" mod="string" dir="in">
1320 <desc>
1321 ID of the discarded snapshot. @c null means the current machine
1322 state has been discarded (restored from the current snapshot).
1323 </desc>
1324 </param>
1325 </method>
1326
1327 <method name="onSnapshotChange">
1328 <desc>
1329 Snapshot properties (name and/or description) have been changed.
1330 <see>ISnapshot</see>
1331 </desc>
1332 <param name="machineId" type="uuid" mod="string" dir="in">
1333 <desc>ID of the machine this event relates to.</desc>
1334 </param>
1335 <param name="snapshotId" type="uuid" mod="string" dir="in">
1336 <desc>ID of the changed snapshot.</desc>
1337 </param>
1338 </method>
1339
1340 <method name="onGuestPropertyChange">
1341 <desc>
1342 Notification when a guest property has changed.
1343 </desc>
1344 <param name="machineId" type="uuid" mod="string" dir="in">
1345 <desc>
1346 ID of the machine this event relates to.
1347 </desc>
1348 </param>
1349 <param name="name" type="wstring" dir="in">
1350 <desc>
1351 The name of the property that has changed.
1352 </desc>
1353 </param>
1354 <param name="value" type="wstring" dir="in">
1355 <desc>
1356 The new property value.
1357 </desc>
1358 </param>
1359 <param name="flags" type="wstring" dir="in">
1360 <desc>
1361 The new property flags.
1362 </desc>
1363 </param>
1364 </method>
1365
1366 </interface>
1367
1368 <interface
1369 name="IDHCPServer" extends="$unknown"
1370 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1371 wsmap="managed"
1372 >
1373 <desc>
1374 The IDHCPServer interface represents the vbox dhcp server configuration.
1375
1376 To enumerate all the dhcp servers on the host, use the
1377 <link to="IVirtualBox::DHCPServers"/> attribute.
1378 </desc>
1379
1380 <attribute name="enabled" type="boolean">
1381 <desc>
1382 specifies if the dhcp server is enabled
1383 </desc>
1384 </attribute>
1385
1386 <attribute name="IPAddress" type="wstring" readonly="yes">
1387 <desc>
1388 specifies server IP
1389 </desc>
1390 </attribute>
1391
1392 <attribute name="networkMask" type="wstring" readonly="yes">
1393 <desc>
1394 specifies server network mask
1395 </desc>
1396 </attribute>
1397
1398 <attribute name="networkName" type="wstring" readonly="yes">
1399 <desc>
1400 specifies internal network name the server is used for
1401 </desc>
1402 </attribute>
1403
1404 <attribute name="lowerIP" type="wstring" readonly="yes">
1405 <desc>
1406 specifies from IP adrres in server address range
1407 </desc>
1408 </attribute>
1409
1410 <attribute name="upperIP" type="wstring" readonly="yes">
1411 <desc>
1412 specifies to IP adrres in server address range
1413 </desc>
1414 </attribute>
1415
1416 <method name="setConfiguration">
1417 <desc>
1418 configures the server
1419 <result name="E_INVALIDARG">
1420 invalid configuration supplied
1421 </result>
1422 </desc>
1423 <param name="IPAddress" type="wstring" dir="in">
1424 <desc>
1425 server IP address
1426 </desc>
1427 </param>
1428 <param name="networkMask" type="wstring" dir="in">
1429 <desc>
1430 server network mask
1431 </desc>
1432 </param>
1433 <param name="FromIPAddress" type="wstring" dir="in">
1434 <desc>
1435 server From IP address for address range
1436 </desc>
1437 </param>
1438 <param name="ToIPAddress" type="wstring" dir="in">
1439 <desc>
1440 server To IP address for address range
1441 </desc>
1442 </param>
1443 </method>
1444
1445 <method name="start">
1446 <desc>
1447 Starts DHCP server process.
1448 <result name="E_FAIL">
1449 Failed to start the process.
1450 </result>
1451 </desc>
1452 <param name="networkName" type="wstring" dir="in">
1453 <desc>
1454 Name of internal network DHCP server should attach to.
1455 </desc>
1456 </param>
1457 <param name="trunkName" type="wstring" dir="in">
1458 <desc>
1459 Name of internal network trunk.
1460 </desc>
1461 </param>
1462 <param name="trunkType" type="wstring" dir="in">
1463 <desc>
1464 Type of internal network trunk.
1465 </desc>
1466 </param>
1467 </method>
1468
1469 <method name="stop">
1470 <desc>
1471 Stops DHCP server process.
1472 <result name="E_FAIL">
1473 Failed to stop the process.
1474 </result>
1475 </desc>
1476 </method>
1477 </interface>
1478
1479 <interface
1480 name="IVirtualBox" extends="$dispatched"
1481 uuid="c1b8d85d-8f44-4314-94fc-072332bdf852"
1482 wsmap="managed"
1483 >
1484 <desc>
1485 The IVirtualBox interface represents the main interface exposed by the
1486 product that provides virtual machine management.
1487
1488 An instance of IVirtualBox is required for the product to do anything
1489 useful. Even though the interface does not expose this, internally,
1490 IVirtualBox is implemented as a singleton and actually lives in the
1491 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1492 IVirtualBox can track the state of all virtual machines on a particular
1493 host, regardless of which frontend started them.
1494
1495 To enumerate all the virtual machines on the host, use the
1496 <link to="IVirtualBox::machines"/> attribute.
1497 </desc>
1498
1499 <attribute name="version" type="wstring" readonly="yes">
1500 <desc>
1501 A string representing the version number of the product. The
1502 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1503 last number represents the build number and will frequently change.
1504 </desc>
1505 </attribute>
1506
1507 <attribute name="revision" type="unsigned long" readonly="yes">
1508 <desc>
1509 The internal build revision number of the product.
1510 </desc>
1511 </attribute>
1512
1513 <attribute name="packageType" type="wstring" readonly="yes">
1514 <desc>
1515 A string representing the package type of this product. The
1516 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1517 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1518 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1519 this.
1520 </desc>
1521 </attribute>
1522
1523 <attribute name="homeFolder" type="wstring" readonly="yes">
1524 <desc>
1525 Full path to the directory where the global settings file,
1526 <tt>VirtualBox.xml</tt>, is stored.
1527
1528 In this version of VirtualBox, the value of this property is
1529 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1530 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1531 as determined by the host OS), and cannot be changed.
1532
1533 This path is also used as the base to resolve relative paths in
1534 places where relative paths are allowed (unless otherwise
1535 expressly indicated).
1536 </desc>
1537 </attribute>
1538
1539 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1540 <desc>
1541 Full name of the global settings file.
1542 The value of this property corresponds to the value of
1543 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1544 </desc>
1545 </attribute>
1546
1547 <attribute name="host" type="IHost" readonly="yes">
1548 <desc>Associated host object.</desc>
1549 </attribute>
1550
1551 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1552 <desc>Associated system information object.</desc>
1553 </attribute>
1554
1555 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1556 <desc>
1557 Array of machine objects registered within this VirtualBox instance.
1558 </desc>
1559 </attribute>
1560
1561 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1562 <desc>
1563 Array of medium objects known to this VirtualBox installation.
1564
1565 This array contains only base media. All differencing
1566 media of the given base medium can be enumerated using
1567 <link to="IMedium::children"/>.
1568 </desc>
1569 </attribute>
1570
1571 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1572 <desc>
1573 Array of CD/DVD image objects registered with this VirtualBox instance.
1574 </desc>
1575 </attribute>
1576
1577 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1578 <desc>
1579 Array of floppy image objects registered with this VirtualBox instance.
1580 </desc>
1581 </attribute>
1582
1583 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1584
1585 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1586
1587 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1588 <desc>
1589 Collection of global shared folders. Global shared folders are
1590 available to all virtual machines.
1591
1592 New shared folders are added to the collection using
1593 <link to="#createSharedFolder"/>. Existing shared folders can be
1594 removed using <link to="#removeSharedFolder"/>.
1595
1596 <note>
1597 In the current version of the product, global shared folders are not
1598 implemented and therefore this collection is always empty.
1599 </note>
1600 </desc>
1601 </attribute>
1602
1603 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1604 <desc>
1605 Associated performance collector object.
1606 </desc>
1607 </attribute>
1608
1609 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1610 <desc>
1611 dhcp server settings.
1612 </desc>
1613 </attribute>
1614
1615 <method name="createMachine">
1616 <desc>
1617 Creates a new virtual machine.
1618
1619 The new machine is created unregistered, with the initial configuration
1620 set according to the specified guest OS type. A typical sequence of
1621 actions to create a new virtual machine is as follows:
1622
1623 <ol>
1624 <li>
1625 Call this method to have a new machine created. The returned machine
1626 object will be "mutable" allowing to change any machine property.
1627 </li>
1628
1629 <li>
1630 Configure the machine using the appropriate attributes and methods.
1631 </li>
1632
1633 <li>
1634 Call <link to="IMachine::saveSettings" /> to write the settings
1635 to the machine's XML settings file. The configuration of the newly
1636 created machine will not be saved to disk until this method is
1637 called.
1638 </li>
1639
1640 <li>
1641 Call <link to="#registerMachine" /> to add the machine to the list
1642 of machines known to VirtualBox.
1643 </li>
1644 </ol>
1645
1646 You should specify valid name for the newly created machine when calling
1647 this method. See the <link to="IMachine::name"/> attribute description
1648 for more details about the machine name.
1649
1650 The specified guest OS type identifier must match an ID of one of known
1651 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1652 array.
1653
1654 Every machine has a <i>settings file</i> that is used to store
1655 the machine configuration. This file is stored in a directory called the
1656 <i>machine settings subfolder</i>. Both the settings subfolder and file
1657 will have a name that corresponds to the name of the virtual machine.
1658 You can specify where to create the machine setting subfolder using the
1659 @a baseFolder argument. The base folder can be absolute (full path) or
1660 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1661 directory</link>.
1662
1663 If @a baseFolder is a @c null or empty string (which is recommended), the
1664 <link to="ISystemProperties::defaultMachineFolder">default machine
1665 settings folder</link> will be used as a base folder for the created
1666 machine. Otherwise the given base folder will be used. In either case,
1667 the full path to the resulting settings file has the following
1668 structure:
1669 <pre>
1670 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1671 </pre>
1672
1673 Note that if the resulting settings file already exists, this method
1674 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1675
1676 Optionally, you may specify an UUID of to assign to the created machine.
1677 However, this is not recommended and you should normally pass an empty
1678 (@c null) UUID to this method so that a new UUID will be automatically
1679 generated for every created machine. You can use UUID
1680 00000000-0000-0000-0000-000000000000 as @c null value.
1681
1682 <note>
1683 There is no way to change the name of the settings file or
1684 subfolder of the created machine directly.
1685 </note>
1686
1687 <result name="VBOX_E_OBJECT_NOT_FOUND">
1688 @a osTypeId is invalid.
1689 </result>
1690 <result name="VBOX_E_FILE_ERROR">
1691 Resulting settings file name is invalid or the settings file already
1692 exists or could not be created due to an I/O error.
1693 </result>
1694 <result name="E_INVALIDARG">
1695 @a name is empty or @c null.
1696 </result>
1697 </desc>
1698
1699 <param name="name" type="wstring" dir="in">
1700 <desc>Machine name.</desc>
1701 </param>
1702 <param name="osTypeId" type="wstring" dir="in">
1703 <desc>Guest OS Type ID.</desc>
1704 </param>
1705 <param name="baseFolder" type="wstring" dir="in">
1706 <desc>Base machine folder (optional).</desc>
1707 </param>
1708 <param name="id" type="uuid" mod="string" dir="in">
1709 <desc>Machine UUID (optional).</desc>
1710 </param>
1711 <param name="machine" type="IMachine" dir="return">
1712 <desc>Created machine object.</desc>
1713 </param>
1714 </method>
1715
1716 <method name="createLegacyMachine">
1717 <desc>
1718 Creates a new virtual machine in "legacy" mode, using the specified
1719 settings file to store machine settings.
1720
1721 As opposed to machines created by <link to="#createMachine"/>,
1722 the settings file of the machine created in "legacy" mode is not
1723 automatically renamed when the machine name is changed -- it will always
1724 remain the same as specified in this method call.
1725
1726 The specified settings file name can be absolute (full path) or relative
1727 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1728 directory</link>. If the file name doesn't contain an extension, the
1729 default extension (.xml) will be appended.
1730
1731 Note that the configuration of the newly created machine is not
1732 saved to disk (and therefore no settings file is created)
1733 until <link to="IMachine::saveSettings"/> is called. If the
1734 specified settings file already exists, this method
1735 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1736
1737 See <link to="#createMachine"/> for more information.
1738
1739 @deprecated This method may be removed later. Use <link
1740 to="IVirtualBox::createMachine"/> instead.
1741
1742 <note>
1743 There is no way to change the name of the settings file
1744 of the machine created in "legacy" mode.
1745 </note>
1746
1747 <result name="VBOX_E_OBJECT_NOT_FOUND">
1748 @a osTypeId is invalid.
1749 </result>
1750 <result name="VBOX_E_FILE_ERROR">
1751 @a settingsFile is invalid or the settings file already exists or
1752 could not be created due to an I/O error.
1753 </result>
1754 <result name="E_INVALIDARG">
1755 @a name or @a settingsFile is empty or @c null.
1756 </result>
1757 </desc>
1758
1759 <param name="name" type="wstring" dir="in">
1760 <desc>Machine name.</desc>
1761 </param>
1762 <param name="osTypeId" type="wstring" dir="in">
1763 <desc>Machine OS Type ID.</desc>
1764 </param>
1765 <param name="settingsFile" type="wstring" dir="in">
1766 <desc>Name of the machine settings file.</desc>
1767 </param>
1768 <param name="id" type="uuid" mod="string" dir="in">
1769 <desc>Machine UUID (optional).</desc>
1770 </param>
1771 <param name="machine" type="IMachine" dir="return">
1772 <desc>Created machine object.</desc>
1773 </param>
1774 </method>
1775
1776 <method name="openMachine">
1777 <desc>
1778 Opens a virtual machine from the existing settings file.
1779 The opened machine remains unregistered until you call
1780 <link to="#registerMachine"/>.
1781
1782 The specified settings file name can be absolute
1783 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1784 VirtualBox home directory</link>. This file must exist
1785 and must be a valid machine settings file whose contents
1786 will be used to construct the machine object.
1787
1788 @deprecated Will be removed soon.
1789 <result name="VBOX_E_FILE_ERROR">
1790 Settings file name invalid, not found or sharing violation.
1791 </result>
1792 </desc>
1793 <param name="settingsFile" type="wstring" dir="in">
1794 <desc>
1795 Name of the machine settings file.
1796 </desc>
1797 </param>
1798 <param name="machine" type="IMachine" dir="return">
1799 <desc>Opened machine object.</desc>
1800 </param>
1801 <note>
1802 <link to="IMachine::settingsModified"/> will return
1803 @c false for the created machine, until any of machine settings
1804 are changed.
1805 </note>
1806 </method>
1807
1808 <method name="registerMachine">
1809 <desc>
1810
1811 Registers the machine previously created using
1812 <link to="#createMachine"/> or opened using
1813 <link to="#openMachine"/> within this VirtualBox installation. After
1814 successful method invocation, the
1815 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1816 to all registered callbacks.
1817
1818 <note>
1819 This method implicitly calls <link to="IMachine::saveSettings"/>
1820 to save all current machine settings before registering it.
1821 </note>
1822
1823 <result name="VBOX_E_OBJECT_NOT_FOUND">
1824 No matching virtual machine found.
1825 </result>
1826 <result name="VBOX_E_INVALID_OBJECT_STATE">
1827 Virtual machine was not created within this VirtualBox instance.
1828 </result>
1829
1830 </desc>
1831 <param name="machine" type="IMachine" dir="in"/>
1832 </method>
1833
1834 <method name="getMachine">
1835 <desc>
1836 Attempts to find a virtual machine given its UUID.
1837 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1838 instead.
1839
1840 <result name="VBOX_E_OBJECT_NOT_FOUND">
1841 Could not find registered machine matching @a id.
1842 </result>
1843
1844 </desc>
1845 <param name="id" type="uuid" mod="string" dir="in"/>
1846 <param name="machine" type="IMachine" dir="return"/>
1847 </method>
1848
1849 <method name="findMachine">
1850 <desc>
1851 Attempts to find a virtual machine given its name.
1852 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1853 instead.
1854
1855 <result name="VBOX_E_OBJECT_NOT_FOUND">
1856 Could not find registered machine matching @a name.
1857 </result>
1858
1859 </desc>
1860 <param name="name" type="wstring" dir="in"/>
1861 <param name="machine" type="IMachine" dir="return"/>
1862 </method>
1863
1864 <method name="unregisterMachine">
1865 <desc>
1866
1867 Unregisters the machine previously registered using
1868 <link to="#registerMachine"/>. After successful method invocation, the
1869 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1870 to all registered callbacks.
1871
1872 <note>
1873 The specified machine must not be in the Saved state, have an open
1874 (or a spawning) direct session associated with it, have snapshots or
1875 have hard disks attached.
1876 </note>
1877
1878 <note>
1879 This method implicitly calls <link to="IMachine::saveSettings"/> to
1880 save all current machine settings before unregistering it.
1881 </note>
1882
1883 <note>
1884 If the given machine is inaccessible (see
1885 <link to="IMachine::accessible"/>), it will be unregistered and
1886 fully uninitialized right afterwards. As a result, the returned
1887 machine object will be unusable and an attempt to call
1888 <b>any</b> method will return the "Object not ready" error.
1889 </note>
1890
1891 <result name="VBOX_E_OBJECT_NOT_FOUND">
1892 Could not find registered machine matching @a id.
1893 </result>
1894 <result name="VBOX_E_INVALID_VM_STATE">
1895 Machine is in Saved state.
1896 </result>
1897 <result name="VBOX_E_INVALID_OBJECT_STATE">
1898 Machine has snapshot or open session or hard disk attached.
1899 </result>
1900
1901 </desc>
1902 <param name="id" type="uuid" mod="string" dir="in">
1903 <desc>UUID of the machine to unregister.</desc>
1904 </param>
1905 <param name="machine" type="IMachine" dir="return">
1906 <desc>Unregistered machine object.</desc>
1907 </param>
1908 </method>
1909
1910 <method name="createAppliance">
1911 <desc>
1912 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1913 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1914 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1915 </desc>
1916 <param name="appliance" type="IAppliance" dir="return">
1917 <desc>New appliance.</desc>
1918 </param>
1919 </method>
1920
1921 <method name="createHardDisk">
1922 <desc>
1923 Creates a new base medium object that will use the given storage
1924 format and location for medium data.
1925
1926 Note that the actual storage unit is not created by this method. In
1927 order to do it, and before you are able to attach the created medium
1928 to virtual machines, you must call one of the following methods to
1929 allocate a format-specific storage unit at the specified location:
1930 <ul>
1931 <li><link to="IMedium::createBaseStorage"/></li>
1932 <li><link to="IMedium::createDiffStorage"/></li>
1933 </ul>
1934
1935 Some medium attributes, such as <link to="IMedium::id"/>, may
1936 remain uninitialized until the medium storage unit is successfully
1937 created by one of the above methods.
1938
1939 After the storage unit is successfully created, the medium gets
1940 remembered by this VirtualBox installation and will be accessible
1941 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
1942 methods. Remembered base medium are also returned as part of
1943 the <link to="#hardDisks"/> array. See IMedium for more details.
1944
1945 The list of all storage formats supported by this VirtualBox
1946 installation can be obtained using
1947 <link to="ISystemProperties::mediumFormats"/>. If the @a format
1948 attribute is empty or @c null then the default storage format
1949 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1950 be used for creating a storage unit of the medium.
1951
1952 Note that the format of the location string is storage format specific.
1953 See <link to="IMedium::location"/>, IMedium and
1954 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1955
1956 <result name="VBOX_E_OBJECT_NOT_FOUND">
1957 @a format identifier is invalid. See
1958 <link to="ISystemProperties::mediumFormats"/>.
1959 </result>
1960 <result name="VBOX_E_FILE_ERROR">
1961 @a location is a not valid file name (for file-based formats only).
1962 </result>
1963 </desc>
1964 <param name="format" type="wstring" dir="in">
1965 <desc>
1966 Identifier of the storage format to use for the new medium.
1967 </desc>
1968 </param>
1969 <param name="location" type="wstring" dir="in">
1970 <desc>
1971 Location of the storage unit for the new medium.
1972 </desc>
1973 </param>
1974 <param name="medium" type="IMedium" dir="return">
1975 <desc>Created medium object.</desc>
1976 </param>
1977 </method>
1978
1979 <method name="openHardDisk">
1980 <desc>
1981 Opens a medium from an existing location, optionally replacing
1982 the image UUID and/or parent UUID.
1983
1984 After the medium is successfully opened by this method, it gets
1985 remembered by (known to) this VirtualBox installation and will be
1986 accessible through <link to="#getHardDisk"/> and
1987 <link to="#findHardDisk"/> methods. Remembered base media
1988 are also returned as part of the <link to="#hardDisks"/> array and can
1989 be attached to virtual machines. See IMedium for more details.
1990
1991 If a differencing medium is to be opened by this method, the
1992 operation will succeed only if its parent medium and all ancestors,
1993 if any, are already known to this VirtualBox installation (for example,
1994 were opened by this method before).
1995
1996 This method tries to guess the storage format of the specified medium
1997 by reading medium data at the specified location.
1998
1999 If @a write is ReadWrite (which it should be), the image is opened for
2000 read/write access and must have according permissions, as VirtualBox
2001 may actually write status information into the disk's metadata sections.
2002
2003 Note that write access is required for all typical image usage in VirtualBox,
2004 since VirtualBox may need to write metadata such as a UUID into the image.
2005 The only exception is opening a source image temporarily for copying and
2006 cloning when the image will quickly be closed again.
2007
2008 Note that the format of the location string is storage format specific.
2009 See <link to="IMedium::location"/>, IMedium and
2010 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2011
2012 <result name="VBOX_E_FILE_ERROR">
2013 Invalid medium storage file location or could not find the medium
2014 at the specified location.
2015 </result>
2016 <result name="VBOX_E_IPRT_ERROR">
2017 Could not get medium storage format.
2018 </result>
2019 <result name="E_INVALIDARG">
2020 Invalid medium storage format.
2021 </result>
2022
2023 </desc>
2024 <param name="location" type="wstring" dir="in">
2025 <desc>
2026 Location of the storage unit that contains medium data in one of
2027 the supported storage formats.
2028 </desc>
2029 </param>
2030 <param name="accessMode" type="AccessMode" dir="in">
2031 <desc>
2032 Determines whether to open the image in read/write or read-only mode.
2033 </desc>
2034 </param>
2035 <param name="setImageId" type="boolean" dir="in">
2036 <desc>
2037 Select whether a new image UUID is set or not.
2038 </desc>
2039 </param>
2040 <param name="imageId" type="uuid" mod="string" dir="in">
2041 <desc>
2042 New UUID for the image. If an empty string is passed, then a new
2043 UUID is automatically created. Specifying a zero UUIDs is not valid.
2044 </desc>
2045 </param>
2046 <param name="setParentId" type="boolean" dir="in">
2047 <desc>
2048 Select whether a new parent UUID is set or not.
2049 </desc>
2050 </param>
2051 <param name="parentId" type="uuid" mod="string" dir="in">
2052 <desc>
2053 New parent UUID for the image. If an empty string is passed, then a
2054 new UUID is automatically created, provided @a setParentId is
2055 @c true. A zero UUID is valid.
2056 </desc>
2057 </param>
2058 <param name="medium" type="IMedium" dir="return">
2059 <desc>Opened medium object.</desc>
2060 </param>
2061 </method>
2062
2063 <method name="getHardDisk" const="yes">
2064 <desc>
2065 Returns a medium with the given UUID.
2066
2067 The medium with the given UUID must be known to this VirtualBox
2068 installation, i.e. it must be previously created by
2069 <link to="#createHardDisk"/> or opened by <link
2070 to="#openHardDisk"/>, or attached to some known virtual machine.
2071
2072 <result name="VBOX_E_OBJECT_NOT_FOUND">
2073 No medium object matching @a id found.
2074 </result>
2075
2076 </desc>
2077 <param name="id" type="uuid" mod="string" dir="in">
2078 <desc>UUID of the medium to look for.</desc>
2079 </param>
2080 <param name="medium" type="IMedium" dir="return">
2081 <desc>Found medium object.</desc>
2082 </param>
2083 </method>
2084
2085 <method name="findHardDisk">
2086 <desc>
2087 Returns a medium that uses the given location to store medium data.
2088
2089 The given medium must be known to this VirtualBox installation, i.e.
2090 it must be previously created by
2091 <link to="#createHardDisk"/> or opened by <link
2092 to="#openHardDisk"/>, or attached to some known virtual machine.
2093
2094 The search is done by comparing the value of the @a location argument to
2095 the <link to="IMedium::location"/> attribute of each known medium.
2096
2097 For locations represented by file names in the host's file system, the
2098 requested location can be a path relative to the
2099 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2100 only a file name without any path is given, the
2101 <link to="ISystemProperties::defaultHardDiskFolder"> default medium
2102 folder</link> will be prepended to the file name before searching. Note
2103 that on case sensitive file systems, a case sensitive comparison is
2104 performed, otherwise the case of symbols in the file path is ignored.
2105
2106 <result name="VBOX_E_OBJECT_NOT_FOUND">
2107 No medium object matching @a location found.
2108 </result>
2109
2110 </desc>
2111 <param name="location" type="wstring" dir="in">
2112 <desc>Location string to search for.</desc>
2113 </param>
2114 <param name="medium" type="IMedium" dir="return">
2115 <desc>Found medium object.</desc>
2116 </param>
2117 </method>
2118
2119 <method name="openDVDImage">
2120 <desc>
2121 Opens a CD/DVD image contained in the specified file of the supported
2122 format and assigns it the given UUID.
2123
2124 After the image is successfully opened by this method, it gets
2125 remembered by (known to) this VirtualBox installation and will be
2126 accessible through <link to="#getDVDImage"/> and
2127 <link to="#findDVDImage"/> methods. Remembered images are also
2128 returned as part of the <link to="#DVDImages"/> array and can be mounted
2129 to virtual machines. See IMedium for more details.
2130
2131 See <link to="IMedium::location"/> to get more details about the format
2132 of the location string.
2133
2134 <note>
2135 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2136 </note>
2137
2138 <result name="VBOX_E_FILE_ERROR">
2139 Invalid CD/DVD image file location or could not find the CD/DVD
2140 image at the specified location.
2141 </result>
2142 <result name="VBOX_E_INVALID_OBJECT_STATE">
2143 CD/DVD image already exists in the media registry.
2144 </result>
2145
2146 </desc>
2147 <param name="location" type="wstring" dir="in">
2148 <desc>
2149 Full path to the file that contains a valid CD/DVD image.
2150 </desc>
2151 </param>
2152 <param name="id" type="uuid" mod="string" dir="in">
2153 <desc>
2154 UUID to assign to the given image within this VirtualBox installation.
2155 If an empty (@c null) UUID is specified, the system will randomly
2156 generate a new UUID.
2157 </desc>
2158 </param>
2159 <param name="image" type="IMedium" dir="return">
2160 <desc>Opened CD/DVD image object.</desc>
2161 </param>
2162 </method>
2163
2164 <method name="getDVDImage">
2165 <desc>
2166 Returns a CD/DVD image with the given UUID.
2167
2168 The image with the given UUID must be known to this VirtualBox
2169 installation, i.e. it must be previously opened by <link
2170 to="#openDVDImage"/>, or mounted to some known virtual machine.
2171
2172 <result name="VBOX_E_OBJECT_NOT_FOUND">
2173 No matching DVD image found in the media registry.
2174 </result>
2175
2176 </desc>
2177 <param name="id" type="uuid" mod="string" dir="in">
2178 <desc>UUID of the image to look for.</desc>
2179 </param>
2180 <param name="image" type="IMedium" dir="return">
2181 <desc>Found CD/DVD image object.</desc>
2182 </param>
2183 </method>
2184
2185 <method name="findDVDImage">
2186 <desc>
2187 Returns a CD/DVD image with the given image location.
2188
2189 The image with the given UUID must be known to this VirtualBox
2190 installation, i.e. it must be previously opened by <link
2191 to="#openDVDImage"/>, or mounted to some known virtual machine.
2192
2193 The search is done by comparing the value of the @a location argument to
2194 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2195
2196 The requested location can be a path relative to the
2197 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2198 only a file name without any path is given, the
2199 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2200 folder</link> will be prepended to the file name before searching. Note
2201 that on case sensitive file systems, a case sensitive comparison is
2202 performed, otherwise the case in the file path is ignored.
2203
2204 <result name="VBOX_E_FILE_ERROR">
2205 Invalid image file location.
2206 </result>
2207 <result name="VBOX_E_OBJECT_NOT_FOUND">
2208 No matching DVD image found in the media registry.
2209 </result>
2210
2211 </desc>
2212 <param name="location" type="wstring" dir="in">
2213 <desc>CD/DVD image file path to look for.</desc>
2214 </param>
2215 <param name="image" type="IMedium" dir="return">
2216 <desc>Found CD/DVD image object.</desc>
2217 </param>
2218 </method>
2219
2220 <method name="openFloppyImage">
2221 <desc>
2222 Opens a floppy image contained in the specified file of the supported
2223 format and assigns it the given UUID.
2224
2225 After the image is successfully opened by this method, it gets
2226 remembered by (known to) this VirtualBox installation and will be
2227 accessible through <link to="#getFloppyImage"/> and
2228 <link to="#findFloppyImage"/> methods. Remembered images are also
2229 returned as part of the <link to="#floppyImages"/> array and can be
2230 mounted to virtual machines. See IMedium for more details.
2231
2232 See <link to="IMedium::location"/> to get more details about the format
2233 of the location string.
2234
2235 <result name="VBOX_E_FILE_ERROR">
2236 Invalid floppy image file location or could not find the floppy
2237 image at the specified location.
2238 </result>
2239 <result name="VBOX_E_INVALID_OBJECT_STATE">
2240 Floppy image already exists in the media registry.
2241 </result>
2242
2243 <note>
2244 Currently, only raw floppy images are supported by VirtualBox.
2245 </note>
2246 </desc>
2247 <param name="location" type="wstring" dir="in">
2248 <desc>
2249 Full path to the file that contains a valid floppy image.
2250 </desc>
2251 </param>
2252 <param name="id" type="uuid" mod="string" dir="in">
2253 <desc>
2254 UUID to assign to the given image file within this VirtualBox
2255 installation. If an empty (@c null) UUID is specified, the system will
2256 randomly generate a new UUID.
2257 </desc>
2258 </param>
2259 <param name="image" type="IMedium" dir="return">
2260 <desc>Opened floppy image object.</desc>
2261 </param>
2262 </method>
2263
2264 <method name="getFloppyImage">
2265 <desc>
2266 Returns a floppy image with the given UUID.
2267
2268 The image with the given UUID must be known to this VirtualBox
2269 installation, i.e. it must be previously opened by <link
2270 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2271
2272 <result name="VBOX_E_OBJECT_NOT_FOUND">
2273 No matching floppy image found in the media registry.
2274 </result>
2275
2276 </desc>
2277 <param name="id" type="uuid" mod="string" dir="in">
2278 <desc>UUID of the image to look for.</desc>
2279 </param>
2280 <param name="image" type="IMedium" dir="return">
2281 <desc>Found floppy image object.</desc>
2282 </param>
2283 </method>
2284
2285 <method name="findFloppyImage">
2286 <desc>
2287 Returns a floppy image with the given image location.
2288
2289 The image with the given UUID must be known to this VirtualBox
2290 installation, i.e. it must be previously opened by <link
2291 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2292
2293 The search is done by comparing the value of the @a location argument to
2294 the <link to="IMedium::location"/> attribute of each known floppy image.
2295
2296 The requested location can be a path relative to the
2297 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2298 only a file name without any path is given, the
2299 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2300 folder</link> will be prepended to the file name before searching. Note
2301 that on case sensitive file systems, a case sensitive comparison is
2302 performed, otherwise the case of symbols in the file path is ignored.
2303
2304 <result name="VBOX_E_FILE_ERROR">
2305 Invalid image file location.
2306 </result>
2307 <result name="VBOX_E_OBJECT_NOT_FOUND">
2308 No matching floppy image found in the media registry.
2309 </result>
2310
2311 </desc>
2312 <param name="location" type="wstring" dir="in">
2313 <desc>Floppy image file path to look for.</desc>
2314 </param>
2315 <param name="image" type="IMedium" dir="return">
2316 <desc>Found floppy image object.</desc>
2317 </param>
2318 </method>
2319
2320 <method name="getGuestOSType">
2321 <desc>
2322 Returns an object describing the specified guest OS type.
2323
2324 The requested guest OS type is specified using a string which is a
2325 mnemonic identifier of the guest operating system, such as
2326 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2327 particular virtual machine can be read or set using the
2328 <link to="IMachine::OSTypeId"/> attribute.
2329
2330 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2331 available guest OS type objects. Each object has an
2332 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2333 the guest OS this object describes.
2334
2335 <result name="E_INVALIDARG">
2336 @a id is not a valid Guest OS type.
2337 </result>
2338
2339 </desc>
2340 <param name="id" type="uuid" mod="string" dir="in">
2341 <desc>Guest OS type ID string.</desc>
2342 </param>
2343 <param name="type" type="IGuestOSType" dir="return">
2344 <desc>Guest OS type object.</desc>
2345 </param>
2346 </method>
2347
2348 <method name="createSharedFolder">
2349 <desc>
2350 Creates a new global shared folder by associating the given logical
2351 name with the given host path, adds it to the collection of shared
2352 folders and starts sharing it. Refer to the description of
2353 <link to="ISharedFolder"/> to read more about logical names.
2354 <note>
2355 In the current implementation, this operation is not
2356 implemented.
2357 </note>
2358 </desc>
2359 <param name="name" type="wstring" dir="in">
2360 <desc>Unique logical name of the shared folder.</desc>
2361 </param>
2362 <param name="hostPath" type="wstring" dir="in">
2363 <desc>Full path to the shared folder in the host file system.</desc>
2364 </param>
2365 <param name="writable" type="boolean" dir="in">
2366 <desc>Whether the share is writable or readonly</desc>
2367 </param>
2368 </method>
2369
2370 <method name="removeSharedFolder">
2371 <desc>
2372 Removes the global shared folder with the given name previously
2373 created by <link to="#createSharedFolder"/> from the collection of
2374 shared folders and stops sharing it.
2375 <note>
2376 In the current implementation, this operation is not
2377 implemented.
2378 </note>
2379 </desc>
2380 <param name="name" type="wstring" dir="in">
2381 <desc>Logical name of the shared folder to remove.</desc>
2382 </param>
2383 </method>
2384
2385 <method name="getExtraDataKeys">
2386 <desc>
2387 Returns an array representing the global extra data keys which currently
2388 have values defined.
2389 </desc>
2390 <param name="value" type="wstring" dir="return" safearray="yes">
2391 <desc>Array of extra data keys.</desc>
2392 </param>
2393 </method>
2394
2395 <method name="getExtraData">
2396 <desc>
2397 Returns associated global extra data.
2398
2399 If the requested data @a key does not exist, this function will
2400 succeed and return an empty string in the @a value argument.
2401
2402 <result name="VBOX_E_FILE_ERROR">
2403 Settings file not accessible.
2404 </result>
2405 <result name="VBOX_E_XML_ERROR">
2406 Could not parse the settings file.
2407 </result>
2408
2409 </desc>
2410 <param name="key" type="wstring" dir="in">
2411 <desc>Name of the data key to get.</desc>
2412 </param>
2413 <param name="value" type="wstring" dir="return">
2414 <desc>Value of the requested data key.</desc>
2415 </param>
2416 </method>
2417
2418 <method name="setExtraData">
2419 <desc>
2420 Sets associated global extra data.
2421
2422 If you pass @c null or empty string as a key @a value, the given @a key
2423 will be deleted.
2424
2425 <note>
2426 Before performing the actual data change, this method will ask all
2427 registered callbacks using the
2428 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2429 notification for a permission. If one of the callbacks refuses the
2430 new value, the change will not be performed.
2431 </note>
2432 <note>
2433 On success, the
2434 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2435 is called to inform all registered callbacks about a successful data
2436 change.
2437 </note>
2438
2439 <result name="VBOX_E_FILE_ERROR">
2440 Settings file not accessible.
2441 </result>
2442 <result name="VBOX_E_XML_ERROR">
2443 Could not parse the settings file.
2444 </result>
2445 <result name="E_ACCESSDENIED">
2446 Modification request refused.
2447 </result>
2448
2449 </desc>
2450 <param name="key" type="wstring" dir="in">
2451 <desc>Name of the data key to set.</desc>
2452 </param>
2453 <param name="value" type="wstring" dir="in">
2454 <desc>Value to assign to the key.</desc>
2455 </param>
2456 </method>
2457
2458 <method name="openSession">
2459 <desc>
2460 Opens a new direct session with the given virtual machine.
2461
2462 A direct session acts as a local lock on the given VM.
2463 There can be only one direct session open at a time for every
2464 virtual machine, protecting the VM from being manipulated by
2465 conflicting actions from different processes. Only after a
2466 direct session has been opened, one can change all VM settings
2467 and execute the VM in the process space of the session object.
2468
2469 Sessions therefore can be compared to mutex semaphores that
2470 lock a given VM for modification and execution.
2471 See <link to="ISession">ISession</link> for details.
2472
2473 <note>Unless you are writing a new VM frontend, you will not
2474 want to execute a VM in the current process. To spawn a new
2475 process that executes a VM, use
2476 <link to="IVirtualBox::openRemoteSession" />
2477 instead.</note>
2478
2479 Upon successful return, the session object can be used to
2480 get access to the machine and to the VM console.
2481
2482 In VirtualBox terminology, the machine becomes "mutable" after
2483 a session has been opened. Note that the "mutable" machine
2484 object, on which you may invoke IMachine methods to change its
2485 settings, will be a different object from the immutable IMachine
2486 objects returned by various IVirtualBox methods. To obtain a
2487 mutable IMachine object (upon which you can invoke settings methods),
2488 use the <link to="ISession::machine" /> attribute.
2489
2490 One must always call <link to="ISession::close" /> to release the
2491 lock on the machine, or the machine's state will eventually be
2492 set to "Aborted".
2493
2494 In other words, to change settings on a machine, the following
2495 sequence is typically performed:
2496
2497 <ol>
2498 <li>Call this method (openSession) to have a machine locked for
2499 the current session.</li>
2500
2501 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2502
2503 <li>Change the settings of the machine.</li>
2504
2505 <li>Call <link to="IMachine::saveSettings" />.</li>
2506
2507 <li>Close the session by calling <link to="ISession::close"/>.</li>
2508 </ol>
2509
2510 <result name="E_UNEXPECTED">
2511 Virtual machine not registered.
2512 </result>
2513 <result name="E_ACCESSDENIED">
2514 Process not started by OpenRemoteSession.
2515 </result>
2516 <result name="VBOX_E_OBJECT_NOT_FOUND">
2517 No matching virtual machine found.
2518 </result>
2519 <result name="VBOX_E_INVALID_OBJECT_STATE">
2520 Session already open or being opened.
2521 </result>
2522 <result name="VBOX_E_VM_ERROR">
2523 Failed to assign machine to session.
2524 </result>
2525
2526 </desc>
2527 <param name="session" type="ISession" dir="in">
2528 <desc>
2529 Session object that will represent the opened session after
2530 successful method invocation. This object must not represent
2531 the already open session.
2532 <note>
2533 This session will be automatically closed if the
2534 VirtualBox server is terminated for some reason.
2535 </note>
2536 </desc>
2537 </param>
2538 <param name="machineId" type="uuid" mod="string" dir="in">
2539 <desc>ID of the virtual machine to open a session with.</desc>
2540 </param>
2541 </method>
2542
2543 <method name="openRemoteSession">
2544 <desc>
2545 Spawns a new process that executes a virtual machine (called a
2546 "remote session").
2547
2548 Opening a remote session causes the VirtualBox server to start a new
2549 process that opens a direct session with the given VM. As a result, the
2550 VM is locked by that direct session in the new process, preventing
2551 conflicting changes from other processes. Since sessions act as locks
2552 that prevent conflicting changes, one cannot open a remote session
2553 for a VM that already has another open session (direct or remote), or
2554 is currently in the process of opening one (see <link
2555 to="IMachine::sessionState"/>).
2556
2557 While the remote session still provides some level of control over the
2558 VM execution to the caller (using the <link to="IConsole" /> interface),
2559 not all VM settings are available for modification within the remote
2560 session context.
2561
2562 This operation can take some time (a new VM is started in a new process,
2563 for which memory and other resources need to be set up). Because of this,
2564 an <link to="IProgress" /> is returned to allow the caller to wait for this
2565 asynchronous operation to be completed. Until then, the remote session
2566 object remains in the closed state, and accessing the machine or its
2567 console through it is invalid. It is recommended to use
2568 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2569 completion.
2570
2571 As with all <link to="ISession" /> objects, it is recommended to call
2572 <link to="ISession::close" /> on the local session object once openRemoteSession()
2573 has been called. However, the session's state (see <link to="ISession::state" />)
2574 will not return to "Closed" until the remote session has also closed (i.e.
2575 until the VM is no longer running). In that case, however, the state of
2576 the session will automatically change back to "Closed".
2577
2578 Currently supported session types (values of the @a type
2579 argument) are:
2580 <ul>
2581 <li><tt>"gui"</tt>: VirtualBox Qt GUI session</li>
2582 <li><tt>"vrdp"</tt>: VirtualBox VRDP Server session</li>
2583 <li><tt>"sdl"</tt>: VirtualBox SDL GUI session</li>
2584 </ul>
2585
2586 The @a environment argument is a string containing definitions of
2587 environment variables in the following format:
2588 @code
2589 NAME[=VALUE]\n
2590 NAME[=VALUE]\n
2591 ...
2592 @endcode
2593 where <tt>\\n</tt> is the new line character. These environment
2594 variables will be appended to the environment of the VirtualBox server
2595 process. If an environment variable exists both in the server process
2596 and in this list, the value from this list takes precedence over the
2597 server's variable. If the value of the environment variable is
2598 omitted, this variable will be removed from the resulting environment.
2599 If the environment string is @c null or empty, the server environment
2600 is inherited by the started process as is.
2601
2602 <see>openExistingSession</see>
2603
2604 <result name="E_UNEXPECTED">
2605 Virtual machine not registered.
2606 </result>
2607 <result name="E_INVALIDARG">
2608 Invalid session type @a type.
2609 </result>
2610 <result name="VBOX_E_OBJECT_NOT_FOUND">
2611 No machine matching @a machineId found.
2612 </result>
2613 <result name="VBOX_E_INVALID_OBJECT_STATE">
2614 Session already open or being opened.
2615 </result>
2616 <result name="VBOX_E_IPRT_ERROR">
2617 Launching process for machine failed.
2618 </result>
2619 <result name="VBOX_E_VM_ERROR">
2620 Failed to assign machine to session.
2621 </result>
2622
2623 </desc>
2624 <param name="session" type="ISession" dir="in">
2625 <desc>
2626 Session object that will represent the opened remote session
2627 after successful method invocation (this object must not
2628 represent an already open session).
2629 </desc>
2630 </param>
2631 <param name="machineId" type="uuid" mod="string" dir="in">
2632 <desc>ID of the virtual machine to open a session with.</desc>
2633 </param>
2634 <param name="type" type="wstring" dir="in">
2635 <desc>
2636 Type of the remote session (case sensitive).
2637 </desc>
2638 </param>
2639 <param name="environment" type="wstring" dir="in">
2640 <desc>
2641 Environment to pass to the opened session.
2642 </desc>
2643 </param>
2644 <param name="progress" type="IProgress" dir="return">
2645 <desc>Progress object to track the operation completion.</desc>
2646 </param>
2647 </method>
2648
2649 <method name="openExistingSession">
2650 <desc>
2651 Opens a new remote session with the virtual machine for
2652 which a direct session is already open.
2653
2654 The remote session provides some level of control over the VM
2655 execution (using the IConsole interface) to the caller; however,
2656 within the remote session context, not all VM settings are available
2657 for modification.
2658
2659 As opposed to <link to="#openRemoteSession"/>, the number of
2660 remote sessions opened this way is not limited by the API
2661
2662 <note>
2663 It is an error to open a remote session with the machine that
2664 doesn't have an open direct session.
2665 </note>
2666
2667 <result name="E_UNEXPECTED">
2668 Virtual machine not registered.
2669 </result>
2670 <result name="VBOX_E_OBJECT_NOT_FOUND">
2671 No machine matching @a machineId found.
2672 </result>
2673 <result name="VBOX_E_INVALID_OBJECT_STATE">
2674 Session already open or being opened.
2675 </result>
2676 <result name="VBOX_E_INVALID_SESSION_STATE">
2677 Direct session state not Open.
2678 </result>
2679 <result name="VBOX_E_VM_ERROR">
2680 Failed to get console object from direct session or assign
2681 machine to session.
2682 </result>
2683
2684 <see>openRemoteSession</see>
2685 </desc>
2686 <param name="session" type="ISession" dir="in">
2687 <desc>
2688 Session object that will represent the open remote session
2689 after successful method invocation. This object must not
2690 represent an already open session.
2691 <note>
2692 This session will be automatically closed when the peer
2693 (direct) session dies or gets closed.
2694 </note>
2695 </desc>
2696 </param>
2697 <param name="machineId" type="uuid" mod="string" dir="in">
2698 <desc>ID of the virtual machine to open a session with.</desc>
2699 </param>
2700 </method>
2701
2702 <method name="registerCallback">
2703 <desc>
2704 Registers a new global VirtualBox callback. The methods of the given
2705 callback object will be called by VirtualBox when an appropriate
2706 event occurs.
2707
2708 <result name="E_INVALIDARG">
2709 A @c null callback cannot be registered.
2710 </result>
2711
2712 </desc>
2713 <param name="callback" type="IVirtualBoxCallback" dir="in">
2714 <desc>Callback object to register.</desc>
2715 </param>
2716 </method>
2717
2718 <method name="unregisterCallback">
2719 <desc>
2720 Unregisters the previously registered global VirtualBox callback.
2721
2722 <result name="E_INVALIDARG">
2723 Specified @a callback not registered.
2724 </result>
2725
2726 </desc>
2727 <param name="callback" type="IVirtualBoxCallback" dir="in">
2728 <desc>Callback object to unregister.</desc>
2729 </param>
2730 </method>
2731
2732 <method name="waitForPropertyChange">
2733 <desc>
2734 Blocks the caller until any of the properties represented by the
2735 @a what argument changes the value or until the given timeout interval
2736 expires.
2737
2738 The @a what argument is a comma separated list of property masks that
2739 describe properties the caller is interested in. The property mask is
2740 a string in the following format:
2741
2742 <pre>
2743 [[group.]subgroup.]name
2744 </pre>
2745
2746 where @c name is the property name and @c group, @c subgroup are zero
2747 or more property group specifiers. Each element (group or name) in
2748 the property mask may be either a Latin string or an asterisk symbol
2749 (@c "*") which is used to match any string for the given element. A
2750 property mask that doesn't contain asterisk symbols represents a
2751 single fully qualified property name.
2752
2753 Groups in the fully qualified property name go from more generic (the
2754 left-most part) to more specific (the right-most part). The first
2755 element is usually a name of the object the property belongs to. The
2756 second element may be either a property name, or a child object name,
2757 or an index if the preceding element names an object which is one of
2758 many objects of the same type. This way, property names form a
2759 hierarchy of properties. Here are some examples of property names:
2760
2761 <table>
2762 <tr>
2763 <td><tt>VirtualBox.version</tt></td>
2764 <td><link to="IVirtualBox::version"/> property</td>
2765 </tr>
2766 <tr>
2767 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2768 <td><link to="IMachine::name"/> property of the machine with the
2769 given UUID</td>
2770 </tr>
2771 </table>
2772
2773 Most property names directly correspond to the properties of objects
2774 (components) provided by the VirtualBox library and may be used to
2775 track changes to these properties. However, there may be
2776 pseudo-property names that don't correspond to any existing object's
2777 property directly, as well as there may be object properties that
2778 don't have a corresponding property name that is understood by this
2779 method, and therefore changes to such properties cannot be
2780 tracked. See individual object's property descriptions to get a
2781 fully qualified property name that can be used with this method (if
2782 any).
2783
2784 There is a special property mask @c "*" (i.e. a string consisting of a
2785 single asterisk symbol) that can be used to match all properties.
2786 Below are more examples of property masks:
2787
2788 <table>
2789 <tr>
2790 <td><tt>VirtualBox.*</tt></td>
2791 <td>Track all properties of the VirtualBox object</td>
2792 </tr>
2793 <tr>
2794 <td><tt>Machine.*.name</tt></td>
2795 <td>Track changes to the <link to="IMachine::name"/> property of
2796 all registered virtual machines</td>
2797 </tr>
2798 </table>
2799
2800 <note>
2801 This function is not implemented in the current version of the
2802 product.
2803 </note>
2804 </desc>
2805 <param name="what" type="wstring" dir="in">
2806 <desc>Comma separated list of property masks.</desc>
2807 </param>
2808 <param name="timeout" type="unsigned long" dir="in">
2809 <desc>
2810 Wait timeout in milliseconds.
2811 Specify -1 for an indefinite wait.
2812 </desc>
2813 </param>
2814 <param name="changed" type="wstring" dir="out">
2815 <desc>
2816 Comma separated list of properties that have been changed and caused
2817 this method to return to the caller.
2818 </desc>
2819 </param>
2820 <param name="values" type="wstring" dir="out">
2821 <desc>Reserved, not currently used.</desc>
2822 </param>
2823 </method>
2824
2825 <!--method name="createDHCPServerForInterface">
2826 <desc>
2827 Creates a dhcp server settings to be used for the given interface
2828 <result name="E_INVALIDARG">
2829 Host network interface @a name already exists.
2830 </result>
2831 </desc>
2832 <param name="interface" type="IHostNetworkInterface" dir="in">
2833 <desc>Network Interface</desc>
2834 </param>
2835 <param name="server" type="IDHCPServer" dir="out">
2836 <desc>Dhcp server settings</desc>
2837 </param>
2838 </method-->
2839
2840 <method name="createDHCPServer">
2841 <desc>
2842 Creates a dhcp server settings to be used for the given internal network name
2843 <result name="E_INVALIDARG">
2844 Host network interface @a name already exists.
2845 </result>
2846 </desc>
2847 <param name="name" type="wstring" dir="in">
2848 <desc>server name</desc>
2849 </param>
2850 <param name="server" type="IDHCPServer" dir="return">
2851 <desc>Dhcp server settings</desc>
2852 </param>
2853 </method>
2854
2855 <method name="findDHCPServerByNetworkName">
2856 <desc>
2857 Searches a dhcp server settings to be used for the given internal network name
2858 <result name="E_INVALIDARG">
2859 Host network interface @a name already exists.
2860 </result>
2861
2862 </desc>
2863 <param name="name" type="wstring" dir="in">
2864 <desc>server name</desc>
2865 </param>
2866 <param name="server" type="IDHCPServer" dir="return">
2867 <desc>Dhcp server settings</desc>
2868 </param>
2869 </method>
2870
2871 <!--method name="findDHCPServerForInterface">
2872 <desc>
2873 Searches a dhcp server settings to be used for the given interface
2874 <result name="E_INVALIDARG">
2875 Host network interface @a name already exists.
2876 </result>
2877 </desc>
2878 <param name="interface" type="IHostNetworkInterface" dir="in">
2879 <desc>Network Interface</desc>
2880 </param>
2881 <param name="server" type="IDHCPServer" dir="out">
2882 <desc>Dhcp server settings</desc>
2883 </param>
2884 </method-->
2885
2886 <method name="removeDHCPServer">
2887 <desc>
2888 Removes the dhcp server settings
2889 <result name="E_INVALIDARG">
2890 Host network interface @a name already exists.
2891 </result>
2892 </desc>
2893 <param name="server" type="IDHCPServer" dir="in">
2894 <desc>Dhcp server settings to be removed</desc>
2895 </param>
2896 </method>
2897
2898 </interface>
2899
2900 <!--
2901 // IVFSExplorer
2902 /////////////////////////////////////////////////////////////////////////
2903 -->
2904
2905 <enum
2906 name="VFSType"
2907 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
2908 >
2909 <desc>
2910 Virtual file systems supported by VFSExplorer.
2911 </desc>
2912
2913 <const name="File" value="1" />
2914 <const name="Cloud" value="2" />
2915 <const name="S3" value="3" />
2916 <const name="WebDav" value="4" />
2917 </enum>
2918
2919 <enum
2920 name="VFSFileType"
2921 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
2922 >
2923 <desc>
2924 File types known by VFSExplorer.
2925 </desc>
2926
2927 <const name="Unknown" value="1" />
2928 <const name="Fifo" value="2" />
2929 <const name="DevChar" value="3" />
2930 <const name="Directory" value="4" />
2931 <const name="DevBlock" value="5" />
2932 <const name="File" value="6" />
2933 <const name="SymLink" value="7" />
2934 <const name="Socket" value="8" />
2935 <const name="WhiteOut" value="9" />
2936 </enum>
2937
2938 <interface
2939 name="IVFSExplorer" extends="$unknown"
2940 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
2941 wsmap="managed"
2942 >
2943 <desc>
2944 The VFSExplorer interface unifies access to different file system
2945 types. This includes local file systems as well remote file systems like
2946 S3. For a list of supported types see <link to="VFSType" />.
2947 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
2948 </desc>
2949
2950 <attribute name="path" type="wstring" readonly="yes">
2951 <desc>Returns the current path in the virtual file system.</desc>
2952 </attribute>
2953
2954 <attribute name="type" type="VFSType" readonly="yes">
2955 <desc>Returns the file system type which is currently in use.</desc>
2956 </attribute>
2957
2958 <method name="update">
2959 <desc>Updates the internal list of files/directories from the
2960 current directory level. Use <link to="#entryList" /> to get the full list
2961 after a call to this method.</desc>
2962
2963 <param name="aProgress" type="IProgress" dir="return">
2964 <desc>Progress object to track the operation completion.</desc>
2965 </param>
2966 </method>
2967
2968 <method name="cd">
2969 <desc>Change the current directory level.</desc>
2970
2971 <param name="aDir" type="wstring" dir="in">
2972 <desc>The name of the directory to go in.</desc>
2973 </param>
2974
2975 <param name="aProgress" type="IProgress" dir="return">
2976 <desc>Progress object to track the operation completion.</desc>
2977 </param>
2978 </method>
2979
2980 <method name="cdUp">
2981 <desc>Go one directory upwards from the current directory level.</desc>
2982
2983 <param name="aProgress" type="IProgress" dir="return">
2984 <desc>Progress object to track the operation completion.</desc>
2985 </param>
2986 </method>
2987
2988 <method name="entryList">
2989 <desc>Returns a list of files/directories after a call to <link
2990 to="#update" />. The user is responsible for keeping this internal
2991 list up do date.</desc>
2992
2993 <param name="aNames" type="wstring" safearray="yes" dir="out">
2994 <desc>The list of names for the entries.</desc>
2995 </param>
2996
2997 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
2998 <desc>The list of types for the entries.</desc>
2999 </param>
3000 </method>
3001
3002 <method name="exists">
3003 <desc>Checks if the given file list exists in the current directory
3004 level.</desc>
3005
3006 <param name="aNames" type="wstring" safearray="yes" dir="in">
3007 <desc>The names to check.</desc>
3008 </param>
3009
3010 <param name="aExists" type="wstring" safearray="yes" dir="return">
3011 <desc>The names which exist.</desc>
3012 </param>
3013 </method>
3014
3015 <method name="remove">
3016 <desc>Deletes the given files in the current directory level.</desc>
3017
3018 <param name="aNames" type="wstring" safearray="yes" dir="in">
3019 <desc>The names to remove.</desc>
3020 </param>
3021
3022 <param name="aProgress" type="IProgress" dir="return">
3023 <desc>Progress object to track the operation completion.</desc>
3024 </param>
3025 </method>
3026
3027 </interface>
3028
3029 <!--
3030 // IAppliance
3031 /////////////////////////////////////////////////////////////////////////
3032 -->
3033
3034 <interface
3035 name="IAppliance" extends="$unknown"
3036 uuid="e3ba9ab9-ac2c-4266-8bd2-91c4bf721ceb"
3037 wsmap="managed"
3038 >
3039 <desc>
3040 Represents a platform-independent appliance in OVF format. An instance of this is returned
3041 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3042 appliances with VirtualBox.
3043
3044 The OVF standard suggests two different physical file formats:
3045
3046 <ol>
3047 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
3048 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
3049 this descriptor file references other files, as OVF appliances distributed as a set of
3050 files most likely do, those files must be in the same directory as the descriptor file.</li>
3051
3052 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
3053 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3054 files and optionally other files.
3055
3056 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3057 be added with a later version.</li>
3058 </ol>
3059
3060 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3061 <link to="IMachine" /> involves the following sequence of API calls:
3062
3063 <ol>
3064 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3065 </li>
3066
3067 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3068 would like to import. So long as this file is syntactically valid, this will succeed
3069 and return an instance of IAppliance that contains the parsed data from the OVF file.
3070 </li>
3071
3072 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3073 contents of the IAppliance attributes accordingly. These can be inspected by a
3074 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3075 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3076 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3077 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3078 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3079 The GUI can then give the user the option to confirm and/or change these suggestions.
3080 </li>
3081
3082 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3083 virtual system to override the suggestions made by the interpret() routine.
3084 </li>
3085
3086 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3087 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3088 virtual system descriptions.
3089 </li>
3090 </ol>
3091
3092 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3093
3094 <ol>
3095 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3096 an empty IAppliance object.
3097 </li>
3098
3099 <li>For each machine you would like to export, call <link to="IMachine::export" />
3100 with the IAppliance object you just created. This creates an instance of
3101 <link to="IVirtualSystemDescription" /> inside the appliance.
3102 </li>
3103
3104 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3105 virtual system to override the suggestions made by the export() routine.
3106 </li>
3107
3108 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3109 file written.</li>
3110 </ol>
3111
3112 </desc>
3113
3114 <attribute name="path" type="wstring" readonly="yes">
3115 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3116 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3117 <link to="#write" /> (for export).
3118 This attribute is empty until one of these methods has been called.
3119 </desc>
3120 </attribute>
3121
3122 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3123 <desc>
3124 Array of virtual disk definitions. One such description exists for each
3125 disk definition in the OVF; each string array item represents one such piece of
3126 disk information, with the information fields separated by tab (\\t) characters.
3127
3128 The caller should be prepared for additional fields being appended to
3129 this string in future versions of VirtualBox and therefore check for
3130 the number of tabs in the strings returned.
3131
3132 In the current version, the following eight fields are returned per string
3133 in the array:
3134
3135 <ol>
3136 <li>Disk ID (unique string identifier given to disk)</li>
3137
3138 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3139
3140 <li>Populated size (optional unsigned integer indicating the current size of the
3141 disk; can be approximate; -1 if unspecified)</li>
3142
3143 <li>Format (string identifying the disk format, typically
3144 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3145
3146 <li>Reference (where to find the disk image, typically a file name; if empty,
3147 then the disk should be created on import)</li>
3148
3149 <li>Image size (optional unsigned integer indicating the size of the image,
3150 which need not necessarily be the same as the values specified above, since
3151 the image may be compressed or sparse; -1 if not specified)</li>
3152
3153 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3154 presently unsupported and always -1)</li>
3155
3156 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3157 </ol>
3158 </desc>
3159 </attribute>
3160
3161 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3162 <desc> Array of virtual system descriptions. One such description is created
3163 for each virtual system found in the OVF.
3164 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3165 (for export) has been called.
3166 </desc>
3167 </attribute>
3168
3169 <method name="read">
3170 <desc>
3171 Reads an OVF file into the appliance object.
3172
3173 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3174 mere fact that this method returns successfully does not mean that VirtualBox supports all
3175 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3176 </desc>
3177 <param name="file" type="wstring" dir="in">
3178 <desc>
3179 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3180 on whether the appliance is distributed as a set of files or as a single file, respectively).
3181 </desc>
3182 </param>
3183 <param name="aProgress" type="IProgress" dir="return">
3184 <desc></desc>
3185 </param>
3186 </method>
3187
3188 <method name="interpret">
3189 <desc>
3190 Interprets the OVF data that was read when the appliance was constructed. After
3191 calling this method, one can inspect the
3192 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3193 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3194 the appliance.
3195
3196 Calling this method is the second step of importing an appliance into VirtualBox;
3197 see <link to="IAppliance" /> for an overview.
3198
3199 After calling this method, one should call <link to="#getWarnings" /> to find out
3200 if problems were encountered during the processing which might later lead to
3201 errors.
3202 </desc>
3203 </method>
3204
3205 <method name="importMachines">
3206 <desc>
3207 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3208 and other interfaces that match the information contained in the appliance as
3209 closely as possible, as represented by the import instructions in the
3210 <link to="#virtualSystemDescriptions" /> array.
3211
3212 Calling this method is the final step of importing an appliance into VirtualBox;
3213 see <link to="IAppliance" /> for an overview.
3214
3215 Since importing the appliance will most probably involve copying and converting
3216 disk images, which can take a long time, this method operates asynchronously and
3217 returns an IProgress object to allow the caller to monitor the progress.
3218 </desc>
3219
3220 <param name="aProgress" type="IProgress" dir="return">
3221 <desc></desc>
3222 </param>
3223 </method>
3224
3225 <method name="createVFSExplorer">
3226 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
3227
3228 <param name="aUri" type="wstring" dir="in">
3229 <desc>The URI describing the file system to use.</desc>
3230 </param>
3231
3232 <param name="aExplorer" type="IVFSExplorer" dir="return">
3233 <desc></desc>
3234 </param>
3235 </method>
3236
3237 <method name="write">
3238 <desc>
3239 Writes the contents of the appliance exports into a new OVF file.
3240
3241 Calling this method is the final step of exporting an appliance from VirtualBox;
3242 see <link to="IAppliance" /> for an overview.
3243
3244 Since exporting the appliance will most probably involve copying and converting
3245 disk images, which can take a long time, this method operates asynchronously and
3246 returns an IProgress object to allow the caller to monitor the progress.
3247 </desc>
3248 <param name="format" type="wstring" dir="in">
3249 <desc>
3250 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
3251 future versions of VirtualBox may support additional formats.
3252 </desc>
3253 </param>
3254 <param name="path" type="wstring" dir="in">
3255 <desc>
3256 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3257 on whether the appliance is distributed as a set of files or as a single file, respectively).
3258 </desc>
3259 </param>
3260 <param name="aProgress" type="IProgress" dir="return">
3261 <desc>Progress object to track the operation completion.</desc>
3262 </param>
3263 </method>
3264
3265 <method name="getWarnings">
3266 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3267
3268 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3269 <desc></desc>
3270 </param>
3271 </method>
3272
3273 </interface>
3274
3275 <enum
3276 name="VirtualSystemDescriptionType"
3277 uuid="aacc58de-5b45-4f82-ae2e-dd9a824fc3b5"
3278 >
3279 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3280 a configuration value.</desc>
3281
3282 <const name="Ignore" value="1" />
3283 <const name="OS" value="2" />
3284 <const name="Name" value="3" />
3285 <const name="Product" value="4" />
3286 <const name="Vendor" value="5" />
3287 <const name="Version" value="6" />
3288 <const name="ProductUrl" value="7" />
3289 <const name="VendorUrl" value="8" />
3290 <const name="Description" value="9" />
3291 <const name="License" value="10" />
3292 <const name="Miscellaneous" value="11" />
3293 <const name="CPU" value="12" />
3294 <const name="Memory" value="13" />
3295 <const name="HardDiskControllerIDE" value="14" />
3296 <const name="HardDiskControllerSATA" value="15" />
3297 <const name="HardDiskControllerSCSI" value="16" />
3298 <const name="HardDiskImage" value="17" />
3299 <const name="Floppy" value="18" />
3300 <const name="CDROM" value="19" />
3301 <const name="NetworkAdapter" value="20" />
3302 <const name="USBController" value="21" />
3303 <const name="SoundCard" value="22" />
3304
3305 </enum>
3306
3307 <enum
3308 name="VirtualSystemDescriptionValueType"
3309 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3310 >
3311 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
3312 type to fetch.</desc>
3313
3314 <const name="Reference" value="1" />
3315 <const name="Original" value="2" />
3316 <const name="Auto" value="3" />
3317 <const name="ExtraConfig" value="4" />
3318
3319 </enum>
3320
3321 <interface
3322 name="IVirtualSystemDescription" extends="$unknown"
3323 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3324 wsmap="managed"
3325 >
3326
3327 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3328 After <link to="IAppliance::interpret" /> has been called, that array contains
3329 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3330 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3331 into VirtualBox.
3332 </desc>
3333
3334 <attribute name="count" type="unsigned long" readonly="yes">
3335 <desc>Return the number of virtual system description entries.</desc>
3336 </attribute>
3337
3338 <method name="getDescription">
3339 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3340 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3341
3342 The list below identifies the value sets that are possible depending on the
3343 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3344 the array item with the same index in aOvfValues[] will contain the original value as contained
3345 in the OVF file (just for informational purposes), and the corresponding item in aVBoxValues[]
3346 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3347 the aExtraConfigValues[] array item may also be used.
3348
3349 <ul>
3350 <li>
3351 "OS": the guest operating system type. There must be exactly one such array item on import. The
3352 corresponding item in aVBoxValues[] contains the suggested guest operating system for VirtualBox.
3353 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3354 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF.
3355 </li>
3356 <li>
3357 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3358 if none is present on import, then an automatic name will be created from the operating system
3359 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3360 from the OVF file, and aVBoxValues[] will contain a suggestion for a unique VirtualBox
3361 <link to="IMachine" /> name that does not exist yet.
3362 </li>
3363 <li>
3364 "Description": an arbitrary description.
3365 </li>
3366 <li>
3367 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3368 code to display such a license for agreement; the Main API does not enforce any such policy.
3369 </li>
3370 <li>
3371 Miscellaneous: reserved for future use.
3372 </li>
3373 <li>
3374 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3375 </li>
3376 <li>
3377 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3378 is present on import, then VirtualBox will set a meaningful default based on the operating system
3379 type.
3380 </li>
3381 <li>
3382 "HarddiskControllerIDE": an IDE 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 contain an integer that items of the "Harddisk"
3385 type can use to specify which hard disk controller a virtual disk should be connected to.
3386 </li>
3387 <li>
3388 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3389 has no value in aOvfValues[] or aVBoxValues[].
3390 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3391 </li>
3392 <li>
3393 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3394 The items in aOvfValues[] and aVBoxValues[] will either be "LsiLogic" or "BusLogic".
3395 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3396 </li>
3397 <li>
3398 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3399 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3400
3401 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3402 a path since the image file should be in the same location as the OVF file itself), whereas the
3403 item in aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
3404 hard disk image. This means that on import the image will be copied and converted from the
3405 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3406 On import, the target image will also be registered with VirtualBox.
3407
3408 The matching item in the aExtraConfigValues[] array must contain a string of the following
3409 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3410 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3411 the image to. That number must be the index of an array item with one of the hard disk controller
3412 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3413 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3414 this can range from 0-3 (which VirtualBox will interpret as primary master, primary slave, secondary master and
3415 secondary slave. For SATA and SCSI controllers, the channel can range from 0-29.
3416 </li>
3417 <li>
3418 "NetworkAdapter": a network adapter. The array item in aVBoxValues[] will specify the hardware
3419 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3420 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3421 </li>
3422 <li>
3423 "USBController": a USB controller. There can be at most one such item. If and only if such an
3424 item ispresent, USB support will be enabled for the new virtual machine.
3425 </li>
3426 <li>
3427 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3428 present, sound support will be enabled for the new virtual machine. Note that the virtual
3429 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3430 may be different from the virtual soundcard expected by the appliance.
3431 </li>
3432 </ul>
3433
3434 </desc>
3435
3436 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3437 <desc></desc>
3438 </param>
3439
3440 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3441 <desc></desc>
3442 </param>
3443
3444 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3445 <desc></desc>
3446 </param>
3447
3448 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3449 <desc></desc>
3450 </param>
3451
3452 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3453 <desc></desc>
3454 </param>
3455
3456 </method>
3457
3458 <method name="getDescriptionByType">
3459 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3460 should be returned.</desc>
3461
3462 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3463 <desc></desc>
3464 </param>
3465
3466 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3467 <desc></desc>
3468 </param>
3469
3470 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3471 <desc></desc>
3472 </param>
3473
3474 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3475 <desc></desc>
3476 </param>
3477
3478 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3479 <desc></desc>
3480 </param>
3481
3482 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3483 <desc></desc>
3484 </param>
3485
3486 </method>
3487
3488 <method name="getValuesByType">
3489 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3490 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3491 values.</desc>
3492
3493 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3494 <desc></desc>
3495 </param>
3496
3497 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3498 <desc></desc>
3499 </param>
3500
3501 <param name="aValues" type="wstring" dir="return" safearray="yes">
3502 <desc></desc>
3503 </param>
3504
3505 </method>
3506
3507 <method name="setFinalValues">
3508 <desc>
3509 This method allows the appliance's user to change the configuration for the virtual
3510 system descriptions. For each array item returned from <link to="#getDescription" />,
3511 you must pass in one boolean value and one configuration value.
3512
3513 Each item in the boolean array determines whether the particular configuration item
3514 should be enabled.
3515 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3516 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3517 and SoundCard.
3518
3519 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3520 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
3521 the configuration remains unchanged. Please see the documentation for getDescription()
3522 for valid configuration values for the individual array item types. If the
3523 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
3524 </desc>
3525
3526 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3527 <desc></desc>
3528 </param>
3529
3530 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
3531 <desc></desc>
3532 </param>
3533
3534 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3535 <desc></desc>
3536 </param>
3537 </method>
3538
3539 <method name="addDescription">
3540 <desc>
3541 This method adds an additional description entry to the stack of already
3542 available descriptions for this virtual system. This is handy for writing
3543 values which aren't directly supported by VirtualBox. One example would
3544 be the License type of <link to="VirtualSystemDescriptionType" />.
3545 </desc>
3546
3547 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3548 <desc></desc>
3549 </param>
3550
3551 <param name="aVBoxValue" type="wstring" dir="in">
3552 <desc></desc>
3553 </param>
3554
3555 <param name="aExtraConfigValue" type="wstring" dir="in">
3556 <desc></desc>
3557 </param>
3558 </method>
3559 </interface>
3560
3561
3562 <!--
3563 // IMachine
3564 /////////////////////////////////////////////////////////////////////////
3565 -->
3566
3567 <interface
3568 name="IInternalMachineControl" extends="$unknown"
3569 uuid="6c08103e-b8e6-44fb-bc6c-36067153d4bd"
3570 internal="yes"
3571 wsmap="suppress"
3572 >
3573 <method name="setRemoveSavedState">
3574 <desc>
3575 Updates the flag whether saved state is removed on a machine state
3576 change from Saved to PoweredOff.
3577 </desc>
3578 <param name="aRemove" type="boolean" dir="in"/>
3579 </method>
3580
3581 <method name="updateState">
3582 <desc>
3583 Updates the VM state.
3584 <note>
3585 This operation will also update the settings file with
3586 the correct information about the saved state file
3587 and delete this file from disk when appropriate.
3588 </note>
3589 </desc>
3590 <param name="state" type="MachineState" dir="in"/>
3591 </method>
3592
3593 <method name="getIPCId">
3594 <param name="id" type="wstring" dir="return"/>
3595 </method>
3596
3597 <method name="runUSBDeviceFilters">
3598 <desc>
3599 Asks the server to run USB devices filters of the associated
3600 machine against the given USB device and tell if there is
3601 a match.
3602 <note>
3603 Intended to be used only for remote USB devices. Local
3604 ones don't require to call this method (this is done
3605 implicitly by the Host and USBProxyService).
3606 </note>
3607 </desc>
3608 <param name="device" type="IUSBDevice" dir="in"/>
3609 <param name="matched" type="boolean" dir="out"/>
3610 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3611 </method>
3612
3613 <method name="captureUSBDevice">
3614 <desc>
3615 Requests a capture of the given host USB device.
3616 When the request is completed, the VM process will
3617 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3618 notification.
3619 </desc>
3620 <param name="id" type="uuid" mod="string" dir="in"/>
3621 </method>
3622
3623 <method name="detachUSBDevice">
3624 <desc>
3625 Notification that a VM is going to detach (@a done = @c false) or has
3626 already detached (@a done = @c true) the given USB device.
3627 When the @a done = @c true request is completed, the VM process will
3628 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3629 notification.
3630 <note>
3631 In the @a done = @c true case, the server must run its own filters
3632 and filters of all VMs but this one on the detached device
3633 as if it were just attached to the host computer.
3634 </note>
3635 </desc>
3636 <param name="id" type="uuid" mod="string" dir="in"/>
3637 <param name="done" type="boolean" dir="in"/>
3638 </method>
3639
3640 <method name="autoCaptureUSBDevices">
3641 <desc>
3642 Requests a capture all matching USB devices attached to the host.
3643 When the request is completed, the VM process will
3644 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3645 notification per every captured device.
3646 </desc>
3647 </method>
3648
3649 <method name="detachAllUSBDevices">
3650 <desc>
3651 Notification that a VM that is being powered down. The done
3652 parameter indicates whether which stage of the power down
3653 we're at. When @a done = @c false the VM is announcing its
3654 intentions, while when @a done = @c true the VM is reporting
3655 what it has done.
3656 <note>
3657 In the @a done = @c true case, the server must run its own filters
3658 and filters of all VMs but this one on all detach devices as
3659 if they were just attached to the host computer.
3660 </note>
3661 </desc>
3662 <param name="done" type="boolean" dir="in"/>
3663 </method>
3664
3665 <method name="onSessionEnd">
3666 <desc>
3667 Triggered by the given session object when the session is about
3668 to close normally.
3669 </desc>
3670 <param name="session" type="ISession" dir="in">
3671 <desc>Session that is being closed</desc>
3672 </param>
3673 <param name="progress" type="IProgress" dir="return">
3674 <desc>
3675 Used to wait until the corresponding machine is actually
3676 dissociated from the given session on the server.
3677 Returned only when this session is a direct one.
3678 </desc>
3679 </param>
3680 </method>
3681
3682 <method name="beginSavingState">
3683 <desc>
3684 Called by the VM process to inform the server it wants to
3685 save the current state and stop the VM execution.
3686 </desc>
3687 <param name="progress" type="IProgress" dir="in">
3688 <desc>
3689 Progress object created by the VM process to wait until
3690 the state is saved.
3691 </desc>
3692 </param>
3693 <param name="stateFilePath" type="wstring" dir="out">
3694 <desc>
3695 File path the VM process must save the execution state to.
3696 </desc>
3697 </param>
3698 </method>
3699
3700 <method name="endSavingState">
3701 <desc>
3702 Called by the VM process to inform the server that saving
3703 the state previously requested by #beginSavingState is either
3704 successfully finished or there was a failure.
3705
3706 <result name="VBOX_E_FILE_ERROR">
3707 Settings file not accessible.
3708 </result>
3709 <result name="VBOX_E_XML_ERROR">
3710 Could not parse the settings file.
3711 </result>
3712
3713 </desc>
3714
3715 <param name="success" type="boolean" dir="in">
3716 <desc>@c true to indicate success and @c false otherwise.
3717 </desc>
3718 </param>
3719 </method>
3720
3721 <method name="adoptSavedState">
3722 <desc>
3723 Gets called by IConsole::adoptSavedState.
3724 <result name="VBOX_E_FILE_ERROR">
3725 Invalid saved state file path.
3726 </result>
3727 </desc>
3728 <param name="savedStateFile" type="wstring" dir="in">
3729 <desc>Path to the saved state file to adopt.</desc>
3730 </param>
3731 </method>
3732
3733 <method name="beginTakingSnapshot">
3734 <desc>
3735 Called from the VM process to request from the server to perform the
3736 server-side actions of creating a snapshot (creating differencing images
3737 and the snapshot object).
3738
3739 <result name="VBOX_E_FILE_ERROR">
3740 Settings file not accessible.
3741 </result>
3742 <result name="VBOX_E_XML_ERROR">
3743 Could not parse the settings file.
3744 </result>
3745 </desc>
3746 <param name="initiator" type="IConsole" dir="in">
3747 <desc>The console object that initiated this call.</desc>
3748 </param>
3749 <param name="name" type="wstring" dir="in">
3750 <desc>Snapshot name.</desc>
3751 </param>
3752 <param name="description" type="wstring" dir="in">
3753 <desc>Snapshot description.</desc>
3754 </param>
3755 <param name="consoleProgress" type="IProgress" dir="in">
3756 <desc>
3757 Progress object created by the VM process tracking the
3758 snapshot's progress. This has the following sub-operations:
3759 <ul>
3760 <li>setting up (weight 1);</li>
3761 <li>one for each hard disk attachment that needs a differencing image (weight 1 each);</li>
3762 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3763 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3764 <li>finishing up (weight 1)</li>
3765 </ul>
3766 </desc>
3767 </param>
3768 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3769 <desc>
3770 Whether this is an online snapshot (i.e. the machine is running).
3771 </desc>
3772 </param>
3773 <param name="stateFilePath" type="wstring" dir="out">
3774 <desc>
3775 File path the VM process must save the execution state to.
3776 </desc>
3777 </param>
3778 </method>
3779
3780 <method name="endTakingSnapshot">
3781 <desc>
3782 Called by the VM process to inform the server that the snapshot
3783 previously requested by #beginTakingSnapshot is either
3784 successfully taken or there was a failure.
3785 </desc>
3786
3787 <param name="success" type="boolean" dir="in">
3788 <desc>@c true to indicate success and @c false otherwise</desc>
3789 </param>
3790 </method>
3791
3792 <method name="discardSnapshot">
3793 <desc>
3794 Gets called by IConsole::discardSnapshot.
3795 <result name="VBOX_E_INVALID_OBJECT_STATE">
3796 Snapshot has more than one child snapshot.
3797 </result>
3798 </desc>
3799 <param name="initiator" type="IConsole" dir="in">
3800 <desc>The console object that initiated this call.</desc>
3801 </param>
3802 <param name="id" type="uuid" mod="string" dir="in">
3803 <desc>UUID of the snapshot to discard.</desc>
3804 </param>
3805 <param name="machineState" type="MachineState" dir="out">
3806 <desc>New machine state after this operation is started.</desc>
3807 </param>
3808 <param name="progress" type="IProgress" dir="return">
3809 <desc>Progress object to track the operation completion.</desc>
3810 </param>
3811 </method>
3812
3813 <method name="discardCurrentState">
3814 <desc>
3815 Gets called by IConsole::discardCurrentState.
3816 <result name="VBOX_E_INVALID_OBJECT_STATE">
3817 Virtual machine does not have any snapshot.
3818 </result>
3819 </desc>
3820 <param name="initiator" type="IConsole" dir="in">
3821 <desc>The console object that initiated this call.</desc>
3822 </param>
3823 <param name="machineState" type="MachineState" dir="out">
3824 <desc>New machine state after this operation is started.</desc>
3825 </param>
3826 <param name="progress" type="IProgress" dir="return">
3827 <desc>Progress object to track the operation completion.</desc>
3828 </param>
3829 </method>
3830
3831 <method name="discardCurrentSnapshotAndState">
3832 <desc>
3833 Gets called by IConsole::discardCurrentSnapshotAndState.
3834 <result name="VBOX_E_INVALID_OBJECT_STATE">
3835 Virtual machine does not have any snapshot.
3836 </result>
3837 </desc>
3838 <param name="initiator" type="IConsole" dir="in">
3839 <desc>The console object that initiated this call.</desc>
3840 </param>
3841 <param name="machineState" type="MachineState" dir="out">
3842 <desc>New machine state after this operation is started.</desc>
3843 </param>
3844 <param name="progress" type="IProgress" dir="return">
3845 <desc>Progress object to track the operation completion.</desc>
3846 </param>
3847 </method>
3848
3849 <method name="pullGuestProperties">
3850 <desc>
3851 Get the list of the guest properties matching a set of patterns along
3852 with their values, time stamps and flags and give responsibility for
3853 managing properties to the console.
3854 </desc>
3855 <param name="name" type="wstring" dir="out" safearray="yes">
3856 <desc>
3857 The names of the properties returned.
3858 </desc>
3859 </param>
3860 <param name="value" type="wstring" dir="out" safearray="yes">
3861 <desc>
3862 The values of the properties returned. The array entries match the
3863 corresponding entries in the @a name array.
3864 </desc>
3865 </param>
3866 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3867 <desc>
3868 The time stamps of the properties returned. The array entries match
3869 the corresponding entries in the @a name array.
3870 </desc>
3871 </param>
3872 <param name="flags" type="wstring" dir="out" safearray="yes">
3873 <desc>
3874 The flags of the properties returned. The array entries match the
3875 corresponding entries in the @a name array.
3876 </desc>
3877 </param>
3878 </method>
3879
3880 <method name="pushGuestProperties">
3881 <desc>
3882 Set the list of the guest properties matching a set of patterns along
3883 with their values, time stamps and flags and return responsibility for
3884 managing properties to IMachine.
3885 </desc>
3886 <param name="name" type="wstring" dir="in" safearray="yes">
3887 <desc>
3888 The names of the properties.
3889 </desc>
3890 </param>
3891 <param name="value" type="wstring" dir="in" safearray="yes">
3892 <desc>
3893 The values of the properties. The array entries match the
3894 corresponding entries in the @a name array.
3895 </desc>
3896 </param>
3897 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3898 <desc>
3899 The time stamps of the properties. The array entries match
3900 the corresponding entries in the @a name array.
3901 </desc>
3902 </param>
3903 <param name="flags" type="wstring" dir="in" safearray="yes">
3904 <desc>
3905 The flags of the properties. The array entries match the
3906 corresponding entries in the @a name array.
3907 </desc>
3908 </param>
3909 </method>
3910 <method name="pushGuestProperty">
3911 <desc>
3912 Update a single guest property in IMachine.
3913 </desc>
3914 <param name="name" type="wstring" dir="in">
3915 <desc>
3916 The name of the property to be updated.
3917 </desc>
3918 </param>
3919 <param name="value" type="wstring" dir="in">
3920 <desc>
3921 The value of the property.
3922 </desc>
3923 </param>
3924 <param name="timestamp" type="unsigned long long" dir="in">
3925 <desc>
3926 The timestamp of the property.
3927 </desc>
3928 </param>
3929 <param name="flags" type="wstring" dir="in">
3930 <desc>
3931 The flags of the property.
3932 </desc>
3933 </param>
3934 </method>
3935
3936 <method name="lockMedia">
3937 <desc>
3938 Locks all media attached to the machine for writing and parents of
3939 attached differencing media (if any) for reading. This operation is
3940 atomic so that if it fails no media is actually locked.
3941
3942 This method is intended to be called when the machine is in Starting or
3943 Restoring state. The locked media will be automatically unlocked when
3944 the machine is powered off or crashed.
3945 </desc>
3946 </method>
3947 </interface>
3948
3949 <interface
3950 name="IBIOSSettings" extends="$unknown"
3951 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3952 wsmap="managed"
3953 >
3954 <desc>
3955 The IBIOSSettings interface represents BIOS settings of the virtual
3956 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3957 </desc>
3958 <attribute name="logoFadeIn" type="boolean">
3959 <desc>Fade in flag for BIOS logo animation.</desc>
3960 </attribute>
3961
3962 <attribute name="logoFadeOut" type="boolean">
3963 <desc>Fade out flag for BIOS logo animation.</desc>
3964 </attribute>
3965
3966 <attribute name="logoDisplayTime" type="unsigned long">
3967 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3968 </attribute>
3969
3970 <attribute name="logoImagePath" type="wstring">
3971 <desc>Local file system path for external BIOS image.</desc>
3972 </attribute>
3973
3974 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3975 <desc>Mode of the BIOS boot device menu.</desc>
3976 </attribute>
3977
3978 <attribute name="ACPIEnabled" type="boolean">
3979 <desc>ACPI support flag.</desc>
3980 </attribute>
3981
3982 <attribute name="IOAPICEnabled" type="boolean">
3983 <desc>
3984 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3985 and support IRQs above 15.
3986 </desc>
3987 </attribute>
3988
3989 <attribute name="timeOffset" type="long long">
3990 <desc>
3991 Offset in milliseconds from the host system time. This allows for
3992 guests running with a different system date/time than the host.
3993 It is equivalent to setting the system date/time in the BIOS except
3994 it is not an absolute value but a relative one. Guest Additions
3995 time synchronization honors this offset.
3996 </desc>
3997 </attribute>
3998
3999 <attribute name="PXEDebugEnabled" type="boolean">
4000 <desc>
4001 PXE debug logging flag. If set, VirtualBox will write extensive
4002 PXE trace information to the release log.
4003 </desc>
4004 </attribute>
4005
4006 </interface>
4007
4008 <interface
4009 name="IMachine" extends="$unknown"
4010 uuid="160b0ccc-c3d6-4c1b-bbe9-39b1a732f833"
4011 wsmap="managed"
4012 >
4013 <desc>
4014 The IMachine interface represents a virtual machine, or guest, created
4015 in VirtualBox.
4016
4017 This interface is used in two contexts. First of all, a collection of
4018 objects implementing this interface is stored in the
4019 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
4020 machines that are currently registered with this VirtualBox
4021 installation. Also, once a session has been opened for the given virtual
4022 machine (e.g. the virtual machine is running), the machine object
4023 associated with the open session can be queried from the session object;
4024 see <link to="ISession"/> for details.
4025
4026 The main role of this interface is to expose the settings of the virtual
4027 machine and provide methods to change various aspects of the virtual
4028 machine's configuration. For machine objects stored in the
4029 <link to="IVirtualBox::machines"/> collection, all attributes are
4030 read-only unless explicitly stated otherwise in individual attribute
4031 and method descriptions. In order to change a machine setting, a session
4032 for this machine must be opened using one of
4033 <link to="IVirtualBox::openSession"/>,
4034 <link to="IVirtualBox::openRemoteSession"/> or
4035 <link to="IVirtualBox::openExistingSession"/> methods. After the
4036 session has been successfully opened, a mutable machine object needs to
4037 be queried from the session object and then the desired settings changes
4038 can be applied to the returned object using IMachine attributes and
4039 methods. See the <link to="ISession"/> interface description for more
4040 information about sessions.
4041
4042 Note that IMachine does not provide methods to control virtual machine
4043 execution (such as start the machine, or power it down) -- these methods
4044 are grouped in a separate interface called <link to="IConsole" />.
4045
4046 <see>ISession, IConsole</see>
4047 </desc>
4048
4049 <attribute name="parent" type="IVirtualBox" readonly="yes">
4050 <desc>Associated parent object.</desc>
4051 </attribute>
4052
4053 <attribute name="accessible" type="boolean" readonly="yes">
4054 <desc>
4055 Whether this virtual machine is currently accessible or not.
4056
4057 A machine is always deemed accessible unless it is registered <i>and</i>
4058 its settings file cannot be read or parsed (either because the file itself
4059 is unavailable or has invalid XML contents).
4060
4061 Every time this property is read, the accessibility state of
4062 this machine is re-evaluated. If the returned value is @c false,
4063 the <link to="#accessError"/> property may be used to get the
4064 detailed error information describing the reason of
4065 inaccessibility, including XML error messages.
4066
4067 When the machine is inaccessible, only the following properties
4068 can be used on it:
4069 <ul>
4070 <li><link to="#parent"/></li>
4071 <li><link to="#id"/></li>
4072 <li><link to="#settingsFilePath"/></li>
4073 <li><link to="#accessible"/></li>
4074 <li><link to="#accessError"/></li>
4075 </ul>
4076
4077 An attempt to access any other property or method will return
4078 an error.
4079
4080 The only possible action you can perform on an inaccessible
4081 machine is to unregister it using the
4082 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4083 for the accessibility state once more by querying this
4084 property).
4085
4086 <note>
4087 In the current implementation, once this property returns
4088 @c true, the machine will never become inaccessible
4089 later, even if its settings file cannot be successfully
4090 read/written any more (at least, until the VirtualBox
4091 server is restarted). This limitation may be removed in
4092 future releases.
4093 </note>
4094 </desc>
4095 </attribute>
4096
4097 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4098 <desc>
4099 Error information describing the reason of machine
4100 inaccessibility.
4101
4102 Reading this property is only valid after the last call to
4103 <link to="#accessible"/> returned @c false (i.e. the
4104 machine is currently unaccessible). Otherwise, a @c null
4105 IVirtualBoxErrorInfo object will be returned.
4106 </desc>
4107 </attribute>
4108
4109 <attribute name="name" type="wstring">
4110 <desc>
4111 Name of the virtual machine.
4112
4113 Besides being used for human-readable identification purposes
4114 everywhere in VirtualBox, the virtual machine name is also used
4115 as a name of the machine's settings file and as a name of the
4116 subdirectory this settings file resides in. Thus, every time you
4117 change the value of this property, the settings file will be
4118 renamed once you call <link to="#saveSettings"/> to confirm the
4119 change. The containing subdirectory will be also renamed, but
4120 only if it has exactly the same name as the settings file
4121 itself prior to changing this property (for backward compatibility
4122 with previous API releases). The above implies the following
4123 limitations:
4124 <ul>
4125 <li>The machine name cannot be empty.</li>
4126 <li>The machine name can contain only characters that are valid
4127 file name characters according to the rules of the file
4128 system used to store VirtualBox configuration.</li>
4129 <li>You cannot have two or more machines with the same name
4130 if they use the same subdirectory for storing the machine
4131 settings files.</li>
4132 <li>You cannot change the name of the machine if it is running,
4133 or if any file in the directory containing the settings file
4134 is being used by another running machine or by any other
4135 process in the host operating system at a time when
4136 <link to="#saveSettings"/> is called.
4137 </li>
4138 </ul>
4139 If any of the above limitations are hit, <link to="#saveSettings"/>
4140 will return an appropriate error message explaining the exact
4141 reason and the changes you made to this machine will not be
4142 saved.
4143 <note>
4144 For "legacy" machines created using the
4145 <link to="IVirtualBox::createLegacyMachine"/> call,
4146 the above naming limitations do not apply because the
4147 machine name does not affect the settings file name.
4148 The settings file name remains the same as it was specified
4149 during machine creation and never changes.
4150 </note>
4151 </desc>
4152 </attribute>
4153
4154 <attribute name="description" type="wstring">
4155 <desc>
4156 Description of the virtual machine.
4157
4158 The description attribute can contain any text and is
4159 typically used to describe the hardware and software
4160 configuration of the virtual machine in detail (i.e. network
4161 settings, versions of the installed software and so on).
4162 </desc>
4163 </attribute>
4164
4165 <attribute name="id" type="uuid" mod="string" readonly="yes">
4166 <desc>UUID of the virtual machine.</desc>
4167 </attribute>
4168
4169 <attribute name="OSTypeId" type="wstring">
4170 <desc>
4171 User-defined identifier of the Guest OS type.
4172 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4173 an IGuestOSType object representing details about the given
4174 Guest OS type.
4175 <note>
4176 This value may differ from the value returned by
4177 <link to="IGuest::OSTypeId"/> if Guest Additions are
4178 installed to the guest OS.
4179 </note>
4180 </desc>
4181 </attribute>
4182
4183 <attribute name="HardwareVersion" type="wstring">
4184 <desc>Hardware version identifier. Internal use only for now.</desc>
4185 </attribute>
4186
4187 <attribute name="CPUCount" type="unsigned long">
4188 <desc>Number of virtual CPUs in the VM.</desc>
4189 </attribute>
4190
4191 <attribute name="memorySize" type="unsigned long">
4192 <desc>System memory size in megabytes.</desc>
4193 </attribute>
4194
4195 <attribute name="memoryBalloonSize" type="unsigned long">
4196 <desc>Initial memory balloon size in megabytes.</desc>
4197 </attribute>
4198
4199 <attribute name="statisticsUpdateInterval" type="unsigned long">
4200 <desc>Initial interval to update guest statistics in seconds.</desc>
4201 </attribute>
4202
4203 <attribute name="VRAMSize" type="unsigned long">
4204 <desc>Video memory size in megabytes.</desc>
4205 </attribute>
4206
4207 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4208 <desc>
4209 This setting determines whether VirtualBox allows this machine to make
4210 use of the 3D graphics support available on the host.</desc>
4211 </attribute>
4212
4213 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
4214 <desc>
4215 This setting determines whether VirtualBox allows this machine to make
4216 use of the 2D video acceleration support available on the host.</desc>
4217 </attribute>
4218
4219 <attribute name="monitorCount" type="unsigned long">
4220 <desc>
4221 Number of virtual monitors.
4222 <note>
4223 Only effective on Windows XP and later guests with
4224 Guest Additions installed.
4225 </note>
4226 </desc>
4227 </attribute>
4228
4229 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4230 <desc>Object containing all BIOS settings.</desc>
4231 </attribute>
4232
4233 <attribute name="firmwareType" type="FirmwareType">
4234 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
4235 bootstrap in this VM.</desc>
4236 </attribute>
4237
4238 <attribute name="HWVirtExEnabled" type="boolean">
4239 <desc>
4240 This setting determines whether VirtualBox will try to make use of
4241 the host CPU's hardware virtualization extensions such as Intel VT-x
4242 and AMD-V. Note that in case such extensions are not available,
4243 they will not be used.
4244 </desc>
4245 </attribute>
4246
4247 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
4248 <desc>
4249 This setting determines whether VirtualBox will try to make use of
4250 the nested paging extension of Intel VT-x and AMD-V. Note that in case
4251 such extensions are not available, they will not be used.
4252 </desc>
4253 </attribute>
4254
4255 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
4256 <desc>
4257 This setting determines whether VirtualBox will try to make use of
4258 the VPID extension of Intel VT-x. Note that in case such extensions are
4259 not available, they will not be used.
4260 </desc>
4261 </attribute>
4262
4263 <attribute name="PAEEnabled" type="boolean" default="false">
4264 <desc>
4265 This setting determines whether VirtualBox will expose the Physical Address
4266 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
4267 is not available, it will not be reported.
4268 </desc>
4269 </attribute>
4270
4271 <attribute name="snapshotFolder" type="wstring">
4272 <desc>
4273 Full path to the directory used to store snapshot data
4274 (differencing media and saved state files) of this machine.
4275
4276 The initial value of this property is
4277 <tt>&lt;</tt><link to="#settingsFilePath">
4278 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4279 <link to="#id">machine_uuid</link>
4280 <tt>&gt;</tt>.
4281
4282 Currently, it is an error to try to change this property on
4283 a machine that has snapshots (because this would require to
4284 move possibly large files to a different location).
4285 A separate method will be available for this purpose later.
4286
4287 <note>
4288 Setting this property to @c null or to an empty string will restore
4289 the initial value.
4290 </note>
4291 <note>
4292 When setting this property, the specified path can be
4293 absolute (full path) or relative to the directory where the
4294 <link to="#settingsFilePath">machine settings file</link>
4295 is located. When reading this property, a full path is
4296 always returned.
4297 </note>
4298 <note>
4299 The specified path may not exist, it will be created
4300 when necessary.
4301 </note>
4302 </desc>
4303 </attribute>
4304
4305 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4306 <desc>VRDP server object.</desc>
4307 </attribute>
4308
4309 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
4310 <desc>Array of media attached to this machine.</desc>
4311 </attribute>
4312
4313 <attribute name="USBController" type="IUSBController" readonly="yes">
4314 <desc>
4315 Associated USB controller object.
4316
4317 <note>
4318 If USB functionality is not available in the given edition of
4319 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4320 </note>
4321 </desc>
4322 </attribute>
4323
4324 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4325 <desc>Associated audio adapter, always present.</desc>
4326 </attribute>
4327
4328 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4329 <desc>Array of storage controllers attached to this machine.</desc>
4330 </attribute>
4331
4332 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4333 <desc>
4334 Full name of the file containing machine settings data.
4335 </desc>
4336 </attribute>
4337
4338 <attribute name="settingsModified" type="boolean" readonly="yes">
4339 <desc>
4340 Whether the settings of this machine have been modified
4341 (but neither yet saved nor discarded).
4342 <note>
4343 Reading this property is only valid on instances returned
4344 by <link to="ISession::machine"/> and on new machines
4345 created by <link to="IVirtualBox::createMachine"/> or opened
4346 by <link to="IVirtualBox::openMachine"/> but not
4347 yet registered, or on unregistered machines after calling
4348 <link to="IVirtualBox::unregisterMachine"/>. For all other
4349 cases, the settings can never be modified.
4350 </note>
4351 <note>
4352 For newly created unregistered machines, the value of this
4353 property is always @c true until <link to="#saveSettings"/>
4354 is called (no matter if any machine settings have been
4355 changed after the creation or not). For opened machines
4356 the value is set to @c false (and then follows to normal rules).
4357 </note>
4358 </desc>
4359 </attribute>
4360
4361 <attribute name="sessionState" type="SessionState" readonly="yes">
4362 <desc>Current session state for this machine.</desc>
4363 </attribute>
4364
4365 <attribute name="sessionType" type="wstring" readonly="yes">
4366 <desc>
4367 Type of the session. If <link to="#sessionState"/> is
4368 SessionSpawning or SessionOpen, this attribute contains the
4369 same value as passed to the
4370 <link to="IVirtualBox::openRemoteSession"/> method in the
4371 @a type parameter. If the session was opened directly using
4372 <link to="IVirtualBox::openSession"/>, or if
4373 <link to="#sessionState"/> is SessionClosed, the value of this
4374 attribute is an empty string.
4375 </desc>
4376 </attribute>
4377
4378 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4379 <desc>
4380 Identifier of the session process. This attribute contains the
4381 platform-dependent identifier of the process that has opened a
4382 direct session for this machine using the
4383 <link to="IVirtualBox::openSession"/> call. The returned value
4384 is only valid if <link to="#sessionState"/> is SessionOpen or
4385 SessionClosing (i.e. a session is currently open or being
4386 closed) by the time this property is read.
4387 </desc>
4388 </attribute>
4389
4390 <attribute name="state" type="MachineState" readonly="yes">
4391 <desc>Current execution state of this machine.</desc>
4392 </attribute>
4393
4394 <attribute name="lastStateChange" type="long long" readonly="yes">
4395 <desc>
4396 Time stamp of the last execution state change,
4397 in milliseconds since 1970-01-01 UTC.
4398 </desc>
4399 </attribute>
4400
4401 <attribute name="stateFilePath" type="wstring" readonly="yes">
4402 <desc>
4403 Full path to the file that stores the execution state of
4404 the machine when it is in the <link to="MachineState_Saved"/> state.
4405 <note>
4406 When the machine is not in the Saved state, this attribute is
4407 an empty string.
4408 </note>
4409 </desc>
4410 </attribute>
4411
4412 <attribute name="logFolder" type="wstring" readonly="yes">
4413 <desc>
4414 Full path to the folder that stores a set of rotated log files
4415 recorded during machine execution. The most recent log file is
4416 named <tt>VBox.log</tt>, the previous log file is
4417 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4418 in the current version).
4419 </desc>
4420 </attribute>
4421
4422 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4423 <desc>
4424 Current snapshot of this machine. This is @c null if the machine
4425 currently has no snapshots. Otherwise, this is always the last snapshot
4426 in the current implementation; see <link to="ISnapshot"/> for details.
4427 </desc>
4428 </attribute>
4429
4430 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4431 <desc>
4432 Number of snapshots taken on this machine. Zero means the
4433 machine doesn't have any snapshots.
4434 </desc>
4435 </attribute>
4436
4437 <attribute name="currentStateModified" type="boolean" readonly="yes">
4438 <desc>
4439 Returns @c true if the current state of the machine is not
4440 identical to the state stored in the current snapshot.
4441
4442 The current state is identical to the current snapshot right
4443 after one of the following calls are made:
4444 <ul>
4445 <li><link to="IConsole::discardCurrentState"/> or
4446 <link to="IConsole::discardCurrentSnapshotAndState"/>
4447 </li>
4448 <li><link to="IConsole::takeSnapshot"/> (issued on a
4449 powered off or saved machine, for which
4450 <link to="#settingsModified"/> returns @c false)
4451 </li>
4452 <li><link to="IMachine::setCurrentSnapshot"/>
4453 </li>
4454 </ul>
4455
4456 The current state remains identical until one of the following
4457 happens:
4458 <ul>
4459 <li>settings of the machine are changed</li>
4460 <li>the saved state is discarded</li>
4461 <li>the current snapshot is discarded</li>
4462 <li>an attempt to execute the machine is made</li>
4463 </ul>
4464
4465 <note>
4466 For machines that don't have snapshots, this property is
4467 always @c false.
4468 </note>
4469 </desc>
4470 </attribute>
4471
4472 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4473 <desc>
4474 Collection of shared folders for this machine (permanent shared
4475 folders). These folders are shared automatically at machine startup
4476 and available only to the guest OS installed within this machine.
4477
4478 New shared folders are added to the collection using
4479 <link to="#createSharedFolder"/>. Existing shared folders can be
4480 removed using <link to="#removeSharedFolder"/>.
4481 </desc>
4482 </attribute>
4483
4484 <attribute name="clipboardMode" type="ClipboardMode">
4485 <desc>
4486 Synchronization mode between the host OS clipboard
4487 and the guest OS clipboard.
4488 </desc>
4489 </attribute>
4490
4491 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4492 <desc>
4493 A comma-separated list of simple glob patterns. Changes to guest
4494 properties whose name matches one of the patterns will generate an
4495 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4496 </desc>
4497 </attribute>
4498
4499 <attribute name="liveMigrationTarget" type="boolean">
4500 <desc>
4501 When set to @a true, the virtual machine becomes a live migration
4502 target. This can only set to @a true when the VM is in the @a
4503 PoweredOff state.
4504
4505 This property is automatically set to @a false when the VM is powered
4506 on.
4507 </desc>
4508 </attribute>
4509
4510 <attribute name="liveMigrationPort" type="unsigned long">
4511 <desc>
4512 The TCP port used for live migration. This can only be set when the
4513 VM is in the @a PoweredOff state.
4514
4515 0 means the port is automatically selected and the source machine will
4516 have to be told where to connected after the destination has been
4517 started.
4518 </desc>
4519 </attribute>
4520
4521 <attribute name="liveMigrationPassword" type="wstring">
4522 <desc>
4523 The password the live migration target will check for.
4524 </desc>
4525 </attribute>
4526
4527 <method name="setBootOrder">
4528 <desc>
4529 Puts the given device to the specified position in
4530 the boot order.
4531
4532 To indicate that no device is associated with the given position,
4533 <link to="DeviceType_Null"/> should be used.
4534
4535 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4536
4537 <result name="E_INVALIDARG">
4538 Boot @a position out of range.
4539 </result>
4540 <result name="E_NOTIMPL">
4541 Booting from USB @a device currently not supported.
4542 </result>
4543
4544 </desc>
4545 <param name="position" type="unsigned long" dir="in">
4546 <desc>
4547 Position in the boot order (@c 1 to the total number of
4548 devices the machine can boot from, as returned by
4549 <link to="ISystemProperties::maxBootPosition"/>).
4550 </desc>
4551 </param>
4552 <param name="device" type="DeviceType" dir="in">
4553 <desc>
4554 The type of the device used to boot at the given position.
4555 </desc>
4556 </param>
4557 </method>
4558
4559 <method name="getBootOrder" const="yes">
4560 <desc>
4561 Returns the device type that occupies the specified
4562 position in the boot order.
4563
4564 @todo [remove?]
4565 If the machine can have more than one device of the returned type
4566 (such as hard disks), then a separate method should be used to
4567 retrieve the individual device that occupies the given position.
4568
4569 If here are no devices at the given position, then
4570 <link to="DeviceType_Null"/> is returned.
4571
4572 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4573
4574 <result name="E_INVALIDARG">
4575 Boot @a position out of range.
4576 </result>
4577
4578 </desc>
4579 <param name="position" type="unsigned long" dir="in">
4580 <desc>
4581 Position in the boot order (@c 1 to the total number of
4582 devices the machine can boot from, as returned by
4583 <link to="ISystemProperties::maxBootPosition"/>).
4584 </desc>
4585 </param>
4586 <param name="device" type="DeviceType" dir="return">
4587 <desc>
4588 Device at the given position.
4589 </desc>
4590 </param>
4591 </method>
4592
4593 <method name="attachDevice">
4594 <desc>
4595 Attaches a device and optionally mounts a medium to the given storage
4596 controller (<link to="IStorageController" />, identified by @a name),
4597 at the indicated port and device.
4598
4599 This method is intended for managing storage devices in general (it works
4600 for both fixed and removable media). For storage devices supporting removable
4601 media (such as DVDs and floppies), you can also use <link to="IMedium::mountMedium"/>
4602 for changing the media while the machine is running.
4603
4604 For the IDE bus, the @a controllerPort parameter can be either
4605 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4606 respectively. For each of these, @a device can then be either @c 0 or @c 1,
4607 to specify the master or the slave device, respectively. (In the
4608 default configuration of virtual machines, the secondary master is
4609 used for a CD/DVD drive.)
4610
4611 For an SATA controller, @a controllerPort must be a number ranging
4612 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4613 be a number ranging from @c 0 to @c 15.
4614
4615 For both SCSI and SATA, the @a device parameter is unused and must
4616 be @c 0.
4617
4618 For fixed media such as hard disks, the given medium cannot be NULL. It may
4619 be NULL for removable media such as DVDs and floppies.
4620
4621 After calling this returns successfully, a new instance of
4622 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4623 attachments (<link to="IMachine::mediumAttachments"/>).
4624
4625 The specified device slot must not have another disk attached to it, or
4626 this method will fail.
4627
4628 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4629 information about attaching media.
4630
4631 <note>
4632 You cannot attach a hard disk to a running machine. Also, you cannot
4633 attach a hard disk to a newly created machine until this machine's
4634 settings are saved to disk using <link to="#saveSettings"/>.
4635 </note>
4636 <note>
4637 If the medium is being attached indirectly, a new differencing medium
4638 will implicitly be created for it and attached instead. If the
4639 changes made to the machine settings (including this indirect
4640 attachment) are later cancelled using <link to="#discardSettings"/>,
4641 this implicitly created differencing medium will implicitly
4642 be deleted.
4643 </note>
4644
4645 <result name="E_INVALIDARG">
4646 SATA device, SATA port, IDE port or IDE slot out of range.
4647 </result>
4648 <result name="VBOX_E_INVALID_OBJECT_STATE">
4649 Attempt to attach medium to an unregistered virtual machine.
4650 </result>
4651 <result name="VBOX_E_INVALID_VM_STATE">
4652 Invalid machine state.
4653 </result>
4654 <result name="VBOX_E_OBJECT_IN_USE">
4655 Hard disk already attached to this or another virtual machine.
4656 </result>
4657
4658 </desc>
4659 <param name="name" type="wstring" dir="in">
4660 <desc>Name of the storage controller to attach the device to.</desc>
4661 </param>
4662 <param name="controllerPort" type="long" dir="in">
4663 <desc>Port to attach the device to.</desc>
4664 </param>
4665 <param name="device" type="long" dir="in">
4666 <desc>Device slot in the given port to attach the device to.</desc>
4667 </param>
4668 <param name="type" type="DeviceType" dir="in">
4669 <desc>Device type of the attached device.</desc>
4670 </param>
4671 <param name="id" type="uuid" mod="string" dir="in">
4672 <desc>UUID of the medium to mount. NULL UUID means do not mount any
4673 medium.</desc>
4674 </param>
4675 </method>
4676
4677 <method name="detachDevice">
4678 <desc>
4679 Detaches the device attached to a device slot of the specified bus.
4680
4681 Detaching the device from the virtual machine is deferred. This means
4682 that the medium remains associated with the machine when this method
4683 returns and gets actually de-associated only after a successful
4684 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4685 for more detailed information about attaching media.
4686
4687 <note>
4688 You cannot detach the hard disk from a running machine.
4689 </note>
4690 <note>
4691 Detaching differencing media implicitly created by <link
4692 to="#attachDevice"/> for the indirect attachment using this
4693 method will <b>not</b> implicitly delete them. The
4694 <link to="IMedium::deleteStorage"/> operation should be
4695 explicitly performed by the caller after the medium is successfully
4696 detached and the settings are saved with
4697 <link to="#saveSettings"/>, if it is the desired action.
4698 </note>
4699
4700 <result name="VBOX_E_INVALID_VM_STATE">
4701 Attempt to detach medium from a running virtual machine.
4702 </result>
4703 <result name="VBOX_E_OBJECT_NOT_FOUND">
4704 No medium attached to given slot/bus.
4705 </result>
4706 <result name="VBOX_E_NOT_SUPPORTED">
4707 Hard disk format does not support storage deletion.
4708 </result>
4709
4710 </desc>
4711 <param name="name" type="wstring" dir="in">
4712 <desc>Name of the storage controller to detach the medium from.</desc>
4713 </param>
4714 <param name="controllerPort" type="long" dir="in">
4715 <desc>Port number to detach the medium from.</desc>
4716 </param>
4717 <param name="device" type="long" dir="in">
4718 <desc>Device slot number to detach the medium from.</desc>
4719 </param>
4720 </method>
4721
4722 <method name="mountMedium">
4723 <desc>
4724 Mounts a medium (<link to="IMedium" />, identified
4725 by the given UUID @a id) to the given storage controller
4726 (<link to="IStorageController" />, identified by @a name),
4727 at the indicated port and device. The device must already exist;
4728 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4729
4730 This method is intended only for managing removable media, where the
4731 device is fixed but media is changeable at runtime (such as DVDs
4732 and floppies). It cannot be used for fixed media such as hard disks.
4733
4734 The @a controllerPort and @a device parameters specify the device slot and
4735 have have the same meaning as with <link to="IMachine::attachDevice" />.
4736
4737 The specified device slot can have a medium mounted, which will be
4738 unmounted first. Specifying a NULL medium does just an unmount.
4739
4740 See <link to="IMedium"/> for more detailed information about
4741 attaching media.
4742
4743 <result name="E_INVALIDARG">
4744 SATA device, SATA port, IDE port or IDE slot out of range.
4745 </result>
4746 <result name="VBOX_E_INVALID_OBJECT_STATE">
4747 Attempt to attach medium to an unregistered virtual machine.
4748 </result>
4749 <result name="VBOX_E_INVALID_VM_STATE">
4750 Invalid machine state.
4751 </result>
4752 <result name="VBOX_E_OBJECT_IN_USE">
4753 Medium already attached to this or another virtual machine.
4754 </result>
4755
4756 </desc>
4757 <param name="name" type="wstring" dir="in">
4758 <desc>Name of the storage controller to attach the medium to.</desc>
4759 </param>
4760 <param name="controllerPort" type="long" dir="in">
4761 <desc>Port to attach the medium to.</desc>
4762 </param>
4763 <param name="device" type="long" dir="in">
4764 <desc>Device slot in the given port to attach the medium to.</desc>
4765 </param>
4766 <param name="id" type="uuid" mod="string" dir="in">
4767 <desc>UUID of the medium to attach.</desc>
4768 </param>
4769 </method>
4770
4771 <method name="getMedium" const="yes">
4772 <desc>
4773 Returns the virtual medium attached to a device slot of the specified
4774 bus.
4775
4776 Note that if the medium was indirectly attached by
4777 <link to="#mountMedium"/> to the given device slot then this
4778 method will return not the same object as passed to the
4779 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4780 more detailed information about mounting a medium.
4781
4782 <result name="VBOX_E_OBJECT_NOT_FOUND">
4783 No medium attached to given slot/bus.
4784 </result>
4785
4786 </desc>
4787 <param name="name" type="wstring" dir="in">
4788 <desc>Name of the storage controller the medium is attached to.</desc>
4789 </param>
4790 <param name="controllerPort" type="long" dir="in">
4791 <desc>Port to query.</desc>
4792 </param>
4793 <param name="device" type="long" dir="in">
4794 <desc>Device slot in the given port to query.</desc>
4795 </param>
4796 <param name="medium" type="IMedium" dir="return">
4797 <desc>Attached medium object.</desc>
4798 </param>
4799 </method>
4800
4801 <method name="getMediumAttachmentsOfController" const="yes">
4802 <desc>
4803 Returns an array of medium attachments which are attached to the
4804 the controller with the given name.
4805
4806 <result name="VBOX_E_OBJECT_NOT_FOUND">
4807 A storage controller with given name doesn't exist.
4808 </result>
4809 </desc>
4810 <param name="name" type="wstring" dir="in"/>
4811 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4812 </method>
4813
4814 <method name="getMediumAttachment" const="yes">
4815 <desc>
4816 Returns a medium attachment which corresponds to the controller with
4817 the given name, on the given port and device slot.
4818
4819 <result name="VBOX_E_OBJECT_NOT_FOUND">
4820 No attachment exists for the given controller/port/device combination.
4821 </result>
4822 </desc>
4823 <param name="name" type="wstring" dir="in"/>
4824 <param name="controllerPort" type="long" dir="in"/>
4825 <param name="device" type="long" dir="in"/>
4826 <param name="attachment" type="IMediumAttachment" dir="return"/>
4827 </method>
4828
4829 <method name="getNetworkAdapter" const="yes">
4830 <desc>
4831 Returns the network adapter associated with the given slot.
4832 Slots are numbered sequentially, starting with zero. The total
4833 number of adapters per machine is defined by the
4834 <link to="ISystemProperties::networkAdapterCount"/> property,
4835 so the maximum slot number is one less than that property's value.
4836
4837 <result name="E_INVALIDARG">
4838 Invalid @a slot number.
4839 </result>
4840
4841 </desc>
4842 <param name="slot" type="unsigned long" dir="in"/>
4843 <param name="adapter" type="INetworkAdapter" dir="return"/>
4844 </method>
4845
4846 <method name="addStorageController">
4847 <desc>
4848 Adds a new storage controller (SCSI or SATA controller) to the
4849 machine and returns it as an instance of
4850 <link to="IStorageController" />.
4851
4852 @a name identifies the controller for subsequent calls such as
4853 <link to="#getStorageControllerByName" />,
4854 <link to="#removeStorageController" />,
4855 <link to="#attachDevice" /> or <link to="#mountMedium" />.
4856
4857 After the controller has been added, you can set its exact
4858 type by setting the <link to="IStorageController::controllerType" />.
4859
4860 <result name="VBOX_E_OBJECT_IN_USE">
4861 A storage controller with given name exists already.
4862 </result>
4863 <result name="E_INVALIDARG">
4864 Invalid @a controllerType.
4865 </result>
4866 </desc>
4867 <param name="name" type="wstring" dir="in"/>
4868 <param name="connectionType" type="StorageBus" dir="in"/>
4869 <param name="controller" type="IStorageController" dir="return"/>
4870 </method>
4871
4872 <method name="getStorageControllerByName" const="yes">
4873 <desc>
4874 Returns a storage controller with the given name.
4875
4876 <result name="VBOX_E_OBJECT_NOT_FOUND">
4877 A storage controller with given name doesn't exist.
4878 </result>
4879 </desc>
4880 <param name="name" type="wstring" dir="in"/>
4881 <param name="storageController" type="IStorageController" dir="return"/>
4882 </method>
4883
4884 <method name="removeStorageController">
4885 <desc>
4886 Removes a storage controller from the machine.
4887
4888 <result name="VBOX_E_OBJECT_NOT_FOUND">
4889 A storage controller with given name doesn't exist.
4890 </result>
4891 </desc>
4892 <param name="name" type="wstring" dir="in"/>
4893 </method>
4894
4895 <method name="getSerialPort" const="yes">
4896 <desc>
4897 Returns the serial port associated with the given slot.
4898 Slots are numbered sequentially, starting with zero. The total
4899 number of serial ports per machine is defined by the
4900 <link to="ISystemProperties::serialPortCount"/> property,
4901 so the maximum slot number is one less than that property's value.
4902
4903 <result name="E_INVALIDARG">
4904 Invalid @a slot number.
4905 </result>
4906
4907 </desc>
4908 <param name="slot" type="unsigned long" dir="in"/>
4909 <param name="port" type="ISerialPort" dir="return"/>
4910 </method>
4911
4912 <method name="getParallelPort" const="yes">
4913 <desc>
4914 Returns the parallel port associated with the given slot.
4915 Slots are numbered sequentially, starting with zero. The total
4916 number of parallel ports per machine is defined by the
4917 <link to="ISystemProperties::parallelPortCount"/> property,
4918 so the maximum slot number is one less than that property's value.
4919
4920 <result name="E_INVALIDARG">
4921 Invalid @a slot number.
4922 </result>
4923
4924 </desc>
4925 <param name="slot" type="unsigned long" dir="in"/>
4926 <param name="port" type="IParallelPort" dir="return"/>
4927 </method>
4928
4929 <method name="getExtraDataKeys">
4930 <desc>
4931 Returns an array representing the machine-specific extra data keys
4932 which currently have values defined.
4933 </desc>
4934 <param name="value" type="wstring" dir="return" safearray="yes">
4935 <desc>Array of extra data keys.</desc>
4936 </param>
4937 </method>
4938
4939 <method name="getExtraData">
4940 <desc>
4941 Returns associated machine-specific extra data.
4942
4943 If the requested data @a key does not exist, this function will
4944 succeed and return an empty string in the @a value argument.
4945
4946 <result name="VBOX_E_FILE_ERROR">
4947 Settings file not accessible.
4948 </result>
4949 <result name="VBOX_E_XML_ERROR">
4950 Could not parse the settings file.
4951 </result>
4952
4953 </desc>
4954 <param name="key" type="wstring" dir="in">
4955 <desc>Name of the data key to get.</desc>
4956 </param>
4957 <param name="value" type="wstring" dir="return">
4958 <desc>Value of the requested data key.</desc>
4959 </param>
4960 </method>
4961
4962 <method name="setExtraData">
4963 <desc>
4964 Sets associated machine-specific extra data.
4965
4966 If you pass @c null or an empty string as a key @a value, the given
4967 @a key will be deleted.
4968
4969 <note>
4970 Before performing the actual data change, this method will ask all
4971 registered callbacks using the
4972 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
4973 notification for a permission. If one of the callbacks refuses the
4974 new value, the change will not be performed.
4975 </note>
4976 <note>
4977 On success, the
4978 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
4979 is called to inform all registered callbacks about a successful data
4980 change.
4981 </note>
4982 <note>
4983 This method can be called outside the machine session and therefore
4984 it's a caller's responsibility to handle possible race conditions
4985 when several clients change the same key at the same time.
4986 </note>
4987
4988 <result name="VBOX_E_FILE_ERROR">
4989 Settings file not accessible.
4990 </result>
4991 <result name="VBOX_E_XML_ERROR">
4992 Could not parse the settings file.
4993 </result>
4994
4995 </desc>
4996 <param name="key" type="wstring" dir="in">
4997 <desc>Name of the data key to set.</desc>
4998 </param>
4999 <param name="value" type="wstring" dir="in">
5000 <desc>Value to assign to the key.</desc>
5001 </param>
5002 </method>
5003
5004 <method name="saveSettings">
5005 <desc>
5006 Saves any changes to machine settings made since the session
5007 has been opened or a new machine has been created, or since the
5008 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
5009 For registered machines, new settings become visible to all
5010 other VirtualBox clients after successful invocation of this
5011 method.
5012 <note>
5013 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
5014 notification event after the configuration has been successfully
5015 saved (only for registered machines).
5016 </note>
5017 <note>
5018 Calling this method is only valid on instances returned
5019 by <link to="ISession::machine"/> and on new machines
5020 created by <link to="IVirtualBox::createMachine"/> but not
5021 yet registered, or on unregistered machines after calling
5022 <link to="IVirtualBox::unregisterMachine"/>.
5023 </note>
5024
5025 <result name="VBOX_E_FILE_ERROR">
5026 Settings file not accessible.
5027 </result>
5028 <result name="VBOX_E_XML_ERROR">
5029 Could not parse the settings file.
5030 </result>
5031 <result name="E_ACCESSDENIED">
5032 Modification request refused.
5033 </result>
5034
5035 </desc>
5036 </method>
5037
5038 <method name="discardSettings">
5039 <desc>
5040 Discards any changes to the machine settings made since the session
5041 has been opened or since the last call to <link to="#saveSettings"/>
5042 or <link to="#discardSettings"/>.
5043 <note>
5044 Calling this method is only valid on instances returned
5045 by <link to="ISession::machine"/> and on new machines
5046 created by <link to="IVirtualBox::createMachine"/> or
5047 opened by <link to="IVirtualBox::openMachine"/> but not
5048 yet registered, or on unregistered machines after calling
5049 <link to="IVirtualBox::unregisterMachine"/>.
5050 </note>
5051
5052 <result name="VBOX_E_INVALID_VM_STATE">
5053 Virtual machine is not mutable.
5054 </result>
5055
5056 </desc>
5057 </method>
5058
5059 <method name="deleteSettings">
5060 <desc>
5061 Deletes the settings file of this machine from disk.
5062 The machine must not be registered in order for this operation
5063 to succeed.
5064 <note>
5065 <link to="#settingsModified"/> will return @c true after this
5066 method successfully returns.
5067 </note>
5068 <note>
5069 Calling this method is only valid on instances returned
5070 by <link to="ISession::machine"/> and on new machines
5071 created by <link to="IVirtualBox::createMachine"/> or
5072 opened by <link to="IVirtualBox::openMachine"/> but not
5073 yet registered, or on unregistered machines after calling
5074 <link to="IVirtualBox::unregisterMachine"/>.
5075 </note>
5076 <note>
5077 The deleted machine settings file can be restored (saved again)
5078 by calling <link to="#saveSettings"/>.
5079 </note>
5080
5081 <result name="VBOX_E_INVALID_VM_STATE">
5082 Cannot delete settings of a registered machine or
5083 machine not mutable.
5084 </result>
5085 <result name="VBOX_E_IPRT_ERROR">
5086 Could not delete the settings file.
5087 </result>
5088
5089 </desc>
5090 </method>
5091
5092 <method name="export">
5093 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5094 steps required to export VirtualBox machines to OVF.
5095 </desc>
5096
5097 <param name="aAppliance" type="IAppliance" dir="in">
5098 <desc>Appliance to export this machine to.</desc>
5099 </param>
5100 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5101 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5102 </param>
5103 </method >
5104
5105 <method name="getSnapshot">
5106 <desc>
5107 Returns a snapshot of this machine with the given UUID.
5108 A @c null UUID can be used to obtain the first snapshot
5109 taken on this machine. This is useful if you want to traverse
5110 the whole tree of snapshots starting from the root.
5111
5112 <result name="VBOX_E_OBJECT_NOT_FOUND">
5113 Virtual machine has no snapshots or snapshot not found.
5114 </result>
5115
5116 </desc>
5117 <param name="id" type="uuid" mod="string" dir="in">
5118 <desc>UUID of the snapshot to get</desc>
5119 </param>
5120 <param name="snapshot" type="ISnapshot" dir="return">
5121 <desc>Snapshot object with the given UUID.</desc>
5122 </param>
5123 </method>
5124
5125 <method name="findSnapshot">
5126 <desc>
5127 Returns a snapshot of this machine with the given name.
5128
5129 <result name="VBOX_E_OBJECT_NOT_FOUND">
5130 Virtual machine has no snapshots or snapshot not found.
5131 </result>
5132
5133 </desc>
5134 <param name="name" type="wstring" dir="in">
5135 <desc>Name of the snapshot to find</desc>
5136 </param>
5137 <param name="snapshot" type="ISnapshot" dir="return">
5138 <desc>Snapshot object with the given name.</desc>
5139 </param>
5140 </method>
5141
5142 <method name="setCurrentSnapshot">
5143 <desc>
5144 Sets the current snapshot of this machine.
5145 <note>
5146 In the current implementation, this operation is not
5147 implemented.
5148 </note>
5149 </desc>
5150 <param name="id" type="uuid" mod="string" dir="in">
5151 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5152 </param>
5153 </method>
5154
5155 <method name="createSharedFolder">
5156 <desc>
5157 Creates a new permanent shared folder by associating the given logical
5158 name with the given host path, adds it to the collection of shared
5159 folders and starts sharing it. Refer to the description of
5160 <link to="ISharedFolder"/> to read more about logical names.
5161
5162 <result name="VBOX_E_OBJECT_IN_USE">
5163 Shared folder already exists.
5164 </result>
5165 <result name="VBOX_E_FILE_ERROR">
5166 Shared folder @a hostPath not accessible.
5167 </result>
5168
5169 </desc>
5170 <param name="name" type="wstring" dir="in">
5171 <desc>Unique logical name of the shared folder.</desc>
5172 </param>
5173 <param name="hostPath" type="wstring" dir="in">
5174 <desc>Full path to the shared folder in the host file system.</desc>
5175 </param>
5176 <param name="writable" type="boolean" dir="in">
5177 <desc>Whether the share is writable or readonly</desc>
5178 </param>
5179 </method>
5180
5181 <method name="removeSharedFolder">
5182 <desc>
5183 Removes the permanent shared folder with the given name previously
5184 created by <link to="#createSharedFolder"/> from the collection of
5185 shared folders and stops sharing it.
5186
5187 <result name="VBOX_E_INVALID_VM_STATE">
5188 Virtual machine is not mutable.
5189 </result>
5190 <result name="VBOX_E_OBJECT_NOT_FOUND">
5191 Shared folder @a name does not exist.
5192 </result>
5193
5194 </desc>
5195 <param name="name" type="wstring" dir="in">
5196 <desc>Logical name of the shared folder to remove.</desc>
5197 </param>
5198 </method>
5199
5200 <method name="canShowConsoleWindow">
5201 <desc>
5202 Returns @c true if the VM console process can activate the
5203 console window and bring it to foreground on the desktop of
5204 the host PC.
5205 <note>
5206 This method will fail if a session for this machine is not
5207 currently open.
5208 </note>
5209
5210 <result name="VBOX_E_INVALID_VM_STATE">
5211 Machine session is not open.
5212 </result>
5213
5214 </desc>
5215 <param name="canShow" type="boolean" dir="return">
5216 <desc>
5217 @c true if the console window can be shown and @c false otherwise.
5218 </desc>
5219 </param>
5220 </method>
5221
5222 <method name="showConsoleWindow">
5223 <desc>
5224 Activates the console window and brings it to foreground on
5225 the desktop of the host PC. Many modern window managers on
5226 many platforms implement some sort of focus stealing
5227 prevention logic, so that it may be impossible to activate
5228 a window without the help of the currently active
5229 application. In this case, this method will return a non-zero
5230 identifier that represents the top-level window of the VM
5231 console process. The caller, if it represents a currently
5232 active process, is responsible to use this identifier (in a
5233 platform-dependent manner) to perform actual window
5234 activation.
5235 <note>
5236 This method will fail if a session for this machine is not
5237 currently open.
5238 </note>
5239
5240 <result name="VBOX_E_INVALID_VM_STATE">
5241 Machine session is not open.
5242 </result>
5243
5244 </desc>
5245 <param name="winId" type="unsigned long long" dir="return">
5246 <desc>
5247 Platform-dependent identifier of the top-level VM console
5248 window, or zero if this method has performed all actions
5249 necessary to implement the <i>show window</i> semantics for
5250 the given platform and/or VirtualBox front-end.
5251 </desc>
5252 </param>
5253 </method>
5254
5255 <method name="getGuestProperty">
5256 <desc>
5257 Reads an entry from the machine's guest property store.
5258
5259 <result name="VBOX_E_INVALID_VM_STATE">
5260 Machine session is not open.
5261 </result>
5262
5263 </desc>
5264 <param name="name" type="wstring" dir="in">
5265 <desc>
5266 The name of the property to read.
5267 </desc>
5268 </param>
5269 <param name="value" type="wstring" dir="out">
5270 <desc>
5271 The value of the property. If the property does not exist then this
5272 will be empty.
5273 </desc>
5274 </param>
5275 <param name="timestamp" type="unsigned long long" dir="out">
5276 <desc>
5277 The time at which the property was last modified, as seen by the
5278 server process.
5279 </desc>
5280 </param>
5281 <param name="flags" type="wstring" dir="out">
5282 <desc>
5283 Additional property parameters, passed as a comma-separated list of
5284 "name=value" type entries.
5285 </desc>
5286 </param>
5287 </method>
5288
5289 <method name="getGuestPropertyValue">
5290 <desc>
5291 Reads a value from the machine's guest property store.
5292
5293 <result name="VBOX_E_INVALID_VM_STATE">
5294 Machine session is not open.
5295 </result>
5296
5297 </desc>
5298 <param name="property" type="wstring" dir="in">
5299 <desc>
5300 The name of the property to read.
5301 </desc>
5302 </param>
5303 <param name="value" type="wstring" dir="return">
5304 <desc>
5305 The value of the property. If the property does not exist then this
5306 will be empty.
5307 </desc>
5308 </param>
5309 </method>
5310
5311 <method name="getGuestPropertyTimestamp">
5312 <desc>
5313 Reads a property timestamp from the machine's guest property store.
5314
5315 <result name="VBOX_E_INVALID_VM_STATE">
5316 Machine session is not open.
5317 </result>
5318
5319 </desc>
5320 <param name="property" type="wstring" dir="in">
5321 <desc>
5322 The name of the property to read.
5323 </desc>
5324 </param>
5325 <param name="value" type="unsigned long long" dir="return">
5326 <desc>
5327 The timestamp. If the property does not exist then this will be
5328 empty.
5329 </desc>
5330 </param>
5331 </method>
5332
5333 <method name="setGuestProperty">
5334 <desc>
5335 Sets, changes or deletes an entry in the machine's guest property
5336 store.
5337
5338 <result name="E_ACCESSDENIED">
5339 Property cannot be changed.
5340 </result>
5341 <result name="E_INVALIDARG">
5342 Invalid @a flags.
5343 </result>
5344 <result name="VBOX_E_INVALID_VM_STATE">
5345 Virtual machine is not mutable or session not open.
5346 </result>
5347 <result name="VBOX_E_INVALID_OBJECT_STATE">
5348 Cannot set transient property when machine not running.
5349 </result>
5350
5351 </desc>
5352 <param name="property" type="wstring" dir="in">
5353 <desc>
5354 The name of the property to set, change or delete.
5355 </desc>
5356 </param>
5357 <param name="value" type="wstring" dir="in">
5358 <desc>
5359 The new value of the property to set, change or delete. If the
5360 property does not yet exist and value is non-empty, it will be
5361 created. If the value is @c null or empty, the property will be
5362 deleted if it exists.
5363 </desc>
5364 </param>
5365 <param name="flags" type="wstring" dir="in">
5366 <desc>
5367 Additional property parameters, passed as a comma-separated list of
5368 "name=value" type entries.
5369 </desc>
5370 </param>
5371 </method>
5372
5373 <method name="setGuestPropertyValue">
5374 <desc>
5375 Sets, changes or deletes a value in the machine's guest property
5376 store. The flags field will be left unchanged or created empty for a
5377 new property.
5378
5379 <result name="E_ACCESSDENIED">
5380 Property cannot be changed.
5381 </result>
5382 <result name="VBOX_E_INVALID_VM_STATE">
5383 Virtual machine is not mutable or session not open.
5384 </result>
5385 <result name="VBOX_E_INVALID_OBJECT_STATE">
5386 Cannot set transient property when machine not running.
5387 </result>
5388 </desc>
5389
5390 <param name="property" type="wstring" dir="in">
5391 <desc>
5392 The name of the property to set, change or delete.
5393 </desc>
5394 </param>
5395 <param name="value" type="wstring" dir="in">
5396 <desc>
5397 The new value of the property to set, change or delete. If the
5398 property does not yet exist and value is non-empty, it will be
5399 created. If the value is @c null or empty, the property will be
5400 deleted if it exists.
5401 </desc>
5402 </param>
5403 </method>
5404
5405 <method name="enumerateGuestProperties">
5406 <desc>
5407 Return a list of the guest properties matching a set of patterns along
5408 with their values, time stamps and flags.
5409 </desc>
5410 <param name="patterns" type="wstring" dir="in">
5411 <desc>
5412 The patterns to match the properties against, separated by '|'
5413 characters. If this is empty or @c null, all properties will match.
5414 </desc>
5415 </param>
5416 <param name="name" type="wstring" dir="out" safearray="yes">
5417 <desc>
5418 The names of the properties returned.
5419 </desc>
5420 </param>
5421 <param name="value" type="wstring" dir="out" safearray="yes">
5422 <desc>
5423 The values of the properties returned. The array entries match the
5424 corresponding entries in the @a name array.
5425 </desc>
5426 </param>
5427 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5428 <desc>
5429 The time stamps of the properties returned. The array entries match
5430 the corresponding entries in the @a name array.
5431 </desc>
5432 </param>
5433 <param name="flags" type="wstring" dir="out" safearray="yes">
5434 <desc>
5435 The flags of the properties returned. The array entries match the
5436 corresponding entries in the @a name array.
5437 </desc>
5438 </param>
5439 </method>
5440</interface>
5441
5442 <!--
5443 // IConsole
5444 /////////////////////////////////////////////////////////////////////////
5445 -->
5446
5447 <interface
5448 name="IConsoleCallback" extends="$unknown"
5449 uuid="d6239535-bda2-4ef7-83f4-f4722e4a3b2c"
5450 wsmap="suppress"
5451 >
5452
5453 <desc>
5454 This interface is used by a client of the Main API that need to
5455 be notified of events. For example, a graphical user interface
5456 can use this to learn about machine state changes so they can
5457 update the list of virtual machines without having to rely
5458 on polling.
5459
5460 Whenever relevant events occur in VirtualBox, the callbacks in
5461 objects of this interface are called. In order for this to be
5462 useful, a client needs to create its own subclass that implements
5463 this interface in which the methods for the relevant callbacks
5464 are overridden. An instance of this subclass interface can then
5465 be passed to <link to="IConsole::registerCallback" />.
5466 </desc>
5467
5468 <method name="onMousePointerShapeChange">
5469 <desc>
5470 Notification when the guest mouse pointer shape has
5471 changed. The new shape data is given.
5472 </desc>
5473 <param name="visible" type="boolean" dir="in">
5474 <desc>
5475 Flag whether the pointer is visible.
5476 </desc>
5477 </param>
5478 <param name="alpha" type="boolean" dir="in">
5479 <desc>
5480 Flag whether the pointer has an alpha channel.
5481 </desc>
5482 </param>
5483 <param name="xHot" type="unsigned long" dir="in">
5484 <desc>
5485 The pointer hot spot x coordinate.
5486 </desc>
5487 </param>
5488 <param name="yHot" type="unsigned long" dir="in">
5489 <desc>
5490 The pointer hot spot y coordinate.
5491 </desc>
5492 </param>
5493 <param name="width" type="unsigned long" dir="in">
5494 <desc>
5495 Width of the pointer shape in pixels.
5496 </desc>
5497 </param>
5498 <param name="height" type="unsigned long" dir="in">
5499 <desc>
5500 Height of the pointer shape in pixels.
5501 </desc>
5502 </param>
5503 <param name="shape" type="octet" mod="ptr" dir="in">
5504 <desc>
5505 Address of the shape buffer.
5506
5507 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5508 followed by a 32-bpp XOR (color) mask.
5509
5510 For pointers without alpha channel the XOR mask pixels are 32
5511 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5512 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5513
5514 An AND mask is used for pointers with alpha channel, so if the
5515 callback does not support alpha, the pointer could be
5516 displayed as a normal color pointer.
5517
5518 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5519 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5520 height</tt>. The padding bits at the end of each scanline are
5521 undefined.
5522
5523 The XOR mask follows the AND mask on the next 4-byte aligned
5524 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5525 Bytes in the gap between the AND and the XOR mask are undefined.
5526 The XOR mask scanlines have no gap between them and the size of
5527 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5528
5529 <note>
5530 If @a shape is 0, only the pointer visibility is changed.
5531 </note>
5532 </desc>
5533 </param>
5534 </method>
5535
5536 <method name="onMouseCapabilityChange">
5537 <desc>
5538 Notification when the mouse capabilities reported by the
5539 guest have changed. The new capabilities are passed.
5540 </desc>
5541 <param name="supportsAbsolute" type="boolean" dir="in"/>
5542 <param name="needsHostCursor" type="boolean" dir="in"/>
5543 </method>
5544
5545 <method name="onKeyboardLedsChange">
5546 <desc>
5547 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5548 to alter the state of the keyboard LEDs.
5549 </desc>
5550 <param name="numLock" type="boolean" dir="in"/>
5551 <param name="capsLock" type="boolean" dir="in"/>
5552 <param name="scrollLock" type="boolean" dir="in"/>
5553 </method>
5554
5555 <method name="onStateChange">
5556 <desc>
5557 Notification when the execution state of the machine has changed.
5558 The new state will be given.
5559 </desc>
5560 <param name="state" type="MachineState" dir="in"/>
5561 </method>
5562
5563 <method name="onAdditionsStateChange">
5564 <desc>
5565 Notification when a Guest Additions property changes.
5566 Interested callees should query IGuest attributes to
5567 find out what has changed.
5568 </desc>
5569 </method>
5570
5571 <method name="onNetworkAdapterChange">
5572 <desc>
5573 Notification when a property of one of the
5574 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5575 changes. Interested callees should use INetworkAdapter methods and
5576 attributes to find out what has changed.
5577 </desc>
5578 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5579 <desc>Network adapter that is subject to change.</desc>
5580 </param>
5581 </method>
5582
5583 <method name="onSerialPortChange">
5584 <desc>
5585 Notification when a property of one of the
5586 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5587 Interested callees should use ISerialPort methods and attributes
5588 to find out what has changed.
5589 </desc>
5590 <param name="serialPort" type="ISerialPort" dir="in">
5591 <desc>Serial port that is subject to change.</desc>
5592 </param>
5593 </method>
5594
5595 <method name="onParallelPortChange">
5596 <desc>
5597 Notification when a property of one of the
5598 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5599 changes. Interested callees should use ISerialPort methods and
5600 attributes to find out what has changed.
5601 </desc>
5602 <param name="parallelPort" type="IParallelPort" dir="in">
5603 <desc>Parallel port that is subject to change.</desc>
5604 </param>
5605 </method>
5606
5607 <method name="onStorageControllerChange">
5608 <desc>
5609 Notification when a property of one of the
5610 virtual <link to="IMachine::storageControllers">storage controllers</link>
5611 changes. Interested callees should query the corresponding collections
5612 to find out what has changed.
5613 </desc>
5614 </method>
5615
5616 <method name="onMediumChange">
5617 <desc>
5618 Notification when a
5619 <link to="IMachine::mediumAttachments">medium attachment</link>
5620 changes.
5621 </desc>
5622 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
5623 <desc>Medium attachment that is subject to change.</desc>
5624 </param>
5625 </method>
5626
5627 <method name="onVRDPServerChange">
5628 <desc>
5629 Notification when a property of the
5630 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5631 Interested callees should use IVRDPServer methods and attributes to
5632 find out what has changed.
5633 </desc>
5634 </method>
5635
5636 <method name="onRemoteDisplayInfoChange">
5637 <desc>
5638 Notification when the status of the VRDP server changes. Interested callees
5639 should use <link to="IConsole::RemoteDisplayInfo">IRemoteDisplayInfo</link>
5640 attributes to find out what is the current status.
5641 </desc>
5642 </method>
5643
5644 <method name="onUSBControllerChange">
5645 <desc>
5646 Notification when a property of the virtual
5647 <link to="IMachine::USBController">USB controller</link> changes.
5648 Interested callees should use IUSBController methods and attributes to
5649 find out what has changed.
5650 </desc>
5651 </method>
5652
5653 <method name="onUSBDeviceStateChange">
5654 <desc>
5655 Notification when a USB device is attached to or detached from
5656 the virtual USB controller.
5657
5658 This notification is sent as a result of the indirect
5659 request to attach the device because it matches one of the
5660 machine USB filters, or as a result of the direct request
5661 issued by <link to="IConsole::attachUSBDevice"/> or
5662 <link to="IConsole::detachUSBDevice"/>.
5663
5664 This notification is sent in case of both a succeeded and a
5665 failed request completion. When the request succeeds, the
5666 @a error parameter is @c null, and the given device has been
5667 already added to (when @a attached is @c true) or removed from
5668 (when @a attached is @c false) the collection represented by
5669 <link to="IConsole::USBDevices"/>. On failure, the collection
5670 doesn't change and the @a error parameter represents the error
5671 message describing the failure.
5672
5673 </desc>
5674 <param name="device" type="IUSBDevice" dir="in">
5675 <desc>Device that is subject to state change.</desc>
5676 </param>
5677 <param name="attached" type="boolean" dir="in">
5678 <desc>
5679 @c true if the device was attached and @c false otherwise.
5680 </desc>
5681 </param>
5682 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5683 <desc>
5684 @c null on success or an error message object on failure.
5685 </desc>
5686 </param>
5687 </method>
5688
5689 <method name="onSharedFolderChange">
5690 <desc>
5691 Notification when a shared folder is added or removed.
5692 The @a scope argument defines one of three scopes:
5693 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5694 (<link to="Scope_Global">Global</link>),
5695 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5696 the machine (<link to="Scope_Machine">Machine</link>) or <link
5697 to="IConsole::sharedFolders">transient shared folders</link> of the
5698 machine (<link to="Scope_Session">Session</link>). Interested callees
5699 should use query the corresponding collections to find out what has
5700 changed.
5701 </desc>
5702 <param name="scope" type="Scope" dir="in">
5703 <desc>Scope of the notification.</desc>
5704 </param>
5705 </method>
5706
5707 <method name="onRuntimeError">
5708 <desc>
5709 Notification when an error happens during the virtual
5710 machine execution.
5711
5712 There are three kinds of runtime errors:
5713 <ul>
5714 <li><i>fatal</i></li>
5715 <li><i>non-fatal with retry</i></li>
5716 <li><i>non-fatal warnings</i></li>
5717 </ul>
5718
5719 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5720 to @c true. In case of fatal errors, the virtual machine
5721 execution is always paused before calling this notification, and
5722 the notification handler is supposed either to immediately save
5723 the virtual machine state using <link to="IConsole::saveState"/>
5724 or power it off using <link to="IConsole::powerDown"/>.
5725 Resuming the execution can lead to unpredictable results.
5726
5727 <b>Non-fatal</b> errors and warnings are indicated by the
5728 @a fatal parameter set to @c false. If the virtual machine
5729 is in the Paused state by the time the error notification is
5730 received, it means that the user can <i>try to resume</i> the machine
5731 execution after attempting to solve the problem that caused the
5732 error. In this case, the notification handler is supposed
5733 to show an appropriate message to the user (depending on the
5734 value of the @a id parameter) that offers several actions such
5735 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5736 wants to retry, the notification handler should continue
5737 the machine execution using the <link to="IConsole::resume"/>
5738 call. If the machine execution is not Paused during this
5739 notification, then it means this notification is a <i>warning</i>
5740 (for example, about a fatal condition that can happen very soon);
5741 no immediate action is required from the user, the machine
5742 continues its normal execution.
5743
5744 Note that in either case the notification handler
5745 <b>must not</b> perform any action directly on a thread
5746 where this notification is called. Everything it is allowed to
5747 do is to post a message to another thread that will then talk
5748 to the user and take the corresponding action.
5749
5750 Currently, the following error identifiers are known:
5751 <ul>
5752 <li><tt>"HostMemoryLow"</tt></li>
5753 <li><tt>"HostAudioNotResponding"</tt></li>
5754 <li><tt>"VDIStorageFull"</tt></li>
5755 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
5756 </ul>
5757
5758 <note>
5759 This notification is not designed to be implemented by
5760 more than one callback at a time. If you have multiple
5761 IConsoleCallback instances registered on the given
5762 IConsole object, make sure you simply do nothing but
5763 return @c S_OK from all but one of them that does actual
5764 user notification and performs necessary actions.
5765 </note>
5766
5767 </desc>
5768 <param name="fatal" type="boolean" dir="in">
5769 <desc>Whether the error is fatal or not</desc>
5770 </param>
5771 <param name="id" type="wstring" dir="in">
5772 <desc>Error identifier</desc>
5773 </param>
5774 <param name="message" type="wstring" dir="in">
5775 <desc>Optional error message</desc>
5776 </param>
5777 </method>
5778
5779 <method name="onCanShowWindow">
5780 <desc>
5781 Notification when a call to
5782 <link to="IMachine::canShowConsoleWindow"/> is made by a
5783 front-end to check if a subsequent call to
5784 <link to="IMachine::showConsoleWindow"/> can succeed.
5785
5786 The callee should give an answer appropriate to the current
5787 machine state in the @a canShow argument. This answer must
5788 remain valid at least until the next
5789 <link to="IConsole::state">machine state</link> change.
5790
5791 <note>
5792 This notification is not designed to be implemented by
5793 more than one callback at a time. If you have multiple
5794 IConsoleCallback instances registered on the given
5795 IConsole object, make sure you simply do nothing but
5796 return @c true and @c S_OK from all but one of them that
5797 actually manages console window activation.
5798 </note>
5799 </desc>
5800 <param name="canShow" type="boolean" dir="return">
5801 <desc>
5802 @c true if the console window can be shown and @c false otherwise.
5803 </desc>
5804 </param>
5805 </method>
5806
5807 <method name="onShowWindow">
5808 <desc>
5809 Notification when a call to
5810 <link to="IMachine::showConsoleWindow"/>
5811 requests the console window to be activated and brought to
5812 foreground on the desktop of the host PC.
5813
5814 This notification should cause the VM console process to
5815 perform the requested action as described above. If it is
5816 impossible to do it at a time of this notification, this
5817 method should return a failure.
5818
5819 Note that many modern window managers on many platforms
5820 implement some sort of focus stealing prevention logic, so
5821 that it may be impossible to activate a window without the
5822 help of the currently active application (which is supposedly
5823 an initiator of this notification). In this case, this method
5824 must return a non-zero identifier that represents the
5825 top-level window of the VM console process. The caller, if it
5826 represents a currently active process, is responsible to use
5827 this identifier (in a platform-dependent manner) to perform
5828 actual window activation.
5829
5830 This method must set @a winId to zero if it has performed all
5831 actions necessary to complete the request and the console
5832 window is now active and in foreground, to indicate that no
5833 further action is required on the caller's side.
5834
5835 <note>
5836 This notification is not designed to be implemented by
5837 more than one callback at a time. If you have multiple
5838 IConsoleCallback instances registered on the given
5839 IConsole object, make sure you simply do nothing but
5840 return @c S_OK from all but one of them that actually
5841 manages console window activation.
5842 </note>
5843 </desc>
5844 <param name="winId" type="unsigned long long" dir="return">
5845 <desc>
5846 Platform-dependent identifier of the top-level VM console
5847 window, or zero if this method has performed all actions
5848 necessary to implement the <i>show window</i> semantics for
5849 the given platform and/or this VirtualBox front-end.
5850 </desc>
5851 </param>
5852 </method>
5853
5854 </interface>
5855
5856 <interface
5857 name="IRemoteDisplayInfo" extends="$unknown"
5858 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
5859 wsmap="struct"
5860 >
5861 <desc>
5862 Contains information about the remote display (VRDP) capabilities and status.
5863 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5864 </desc>
5865
5866 <attribute name="active" type="boolean" readonly="yes">
5867 <desc>
5868 Whether the remote display connection is active.
5869 </desc>
5870 </attribute>
5871
5872 <attribute name="port" type="long" readonly="yes">
5873 <desc>
5874 VRDP server port number. If this property is equal to <tt>0</tt>, then
5875 the VRDP server failed to start, usually because there are no free TCP
5876 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
5877 server has not yet been started.
5878 </desc>
5879 </attribute>
5880
5881 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5882 <desc>
5883 How many times a client connected.
5884 </desc>
5885 </attribute>
5886
5887 <attribute name="beginTime" type="long long" readonly="yes">
5888 <desc>
5889 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5890 </desc>
5891 </attribute>
5892
5893 <attribute name="endTime" type="long long" readonly="yes">
5894 <desc>
5895 When the last connection was terminated or the current time, if
5896 connection is still active, in milliseconds since 1970-01-01 UTC.
5897 </desc>
5898 </attribute>
5899
5900 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5901 <desc>
5902 How many bytes were sent in last or current, if still active, connection.
5903 </desc>
5904 </attribute>
5905
5906 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5907 <desc>
5908 How many bytes were sent in all connections.
5909 </desc>
5910 </attribute>
5911
5912 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5913 <desc>
5914 How many bytes were received in last or current, if still active, connection.
5915 </desc>
5916 </attribute>
5917
5918 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5919 <desc>
5920 How many bytes were received in all connections.
5921 </desc>
5922 </attribute>
5923
5924 <attribute name="user" type="wstring" readonly="yes">
5925 <desc>
5926 Login user name supplied by the client.
5927 </desc>
5928 </attribute>
5929
5930 <attribute name="domain" type="wstring" readonly="yes">
5931 <desc>
5932 Login domain name supplied by the client.
5933 </desc>
5934 </attribute>
5935
5936 <attribute name="clientName" type="wstring" readonly="yes">
5937 <desc>
5938 The client name supplied by the client.
5939 </desc>
5940 </attribute>
5941
5942 <attribute name="clientIP" type="wstring" readonly="yes">
5943 <desc>
5944 The IP address of the client.
5945 </desc>
5946 </attribute>
5947
5948 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5949 <desc>
5950 The client software version number.
5951 </desc>
5952 </attribute>
5953
5954 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5955 <desc>
5956 Public key exchange method used when connection was established.
5957 Values: 0 - RDP4 public key exchange scheme.
5958 1 - X509 certificates were sent to client.
5959 </desc>
5960 </attribute>
5961
5962 </interface>
5963
5964 <interface
5965 name="IConsole" extends="$unknown"
5966 uuid="c47486e1-3d99-4212-b1c5-86451978999d"
5967 wsmap="managed"
5968 >
5969 <desc>
5970 The IConsole interface represents an interface to control virtual
5971 machine execution.
5972
5973 The console object that implements the IConsole interface is obtained
5974 from a session object after the session for the given machine has been
5975 opened using one of <link to="IVirtualBox::openSession"/>,
5976 <link to="IVirtualBox::openRemoteSession"/> or
5977 <link to="IVirtualBox::openExistingSession"/> methods.
5978
5979 Methods of the IConsole interface allow the caller to query the current
5980 virtual machine execution state, pause the machine or power it down, save
5981 the machine state or take a snapshot, attach and detach removable media
5982 and so on.
5983
5984 <see>ISession</see>
5985 </desc>
5986
5987 <attribute name="machine" type="IMachine" readonly="yes">
5988 <desc>
5989 Machine object this console is sessioned with.
5990 <note>
5991 This is a convenience property, it has the same value as
5992 <link to="ISession::machine"/> of the corresponding session
5993 object.
5994 </note>
5995 </desc>
5996 </attribute>
5997
5998 <attribute name="state" type="MachineState" readonly="yes">
5999 <desc>
6000 Current execution state of the machine.
6001 <note>
6002 This property always returns the same value as the corresponding
6003 property of the IMachine object this console is sessioned with.
6004 For the process that owns (executes) the VM, this is the
6005 preferable way of querying the VM state, because no IPC
6006 calls are made.
6007 </note>
6008 </desc>
6009 </attribute>
6010
6011 <attribute name="guest" type="IGuest" readonly="yes">
6012 <desc>Guest object.</desc>
6013 </attribute>
6014
6015 <attribute name="keyboard" type="IKeyboard" readonly="yes">
6016 <desc>
6017 Virtual keyboard object.
6018 <note>
6019 If the machine is not running, any attempt to use
6020 the returned object will result in an error.
6021 </note>
6022 </desc>
6023 </attribute>
6024
6025 <attribute name="mouse" type="IMouse" readonly="yes">
6026 <desc>
6027 Virtual mouse object.
6028 <note>
6029 If the machine is not running, any attempt to use
6030 the returned object will result in an error.
6031 </note>
6032 </desc>
6033 </attribute>
6034
6035 <attribute name="display" type="IDisplay" readonly="yes">
6036 <desc>Virtual display object.
6037 <note>
6038 If the machine is not running, any attempt to use
6039 the returned object will result in an error.
6040 </note>
6041 </desc>
6042 </attribute>
6043
6044 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6045 <desc>Debugging interface.</desc>
6046 </attribute>
6047
6048 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6049 <desc>
6050 Collection of USB devices currently attached to the virtual
6051 USB controller.
6052 <note>
6053 The collection is empty if the machine is not running.
6054 </note>
6055 </desc>
6056 </attribute>
6057
6058 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6059 <desc>
6060 List of USB devices currently attached to the remote VRDP client.
6061 Once a new device is physically attached to the remote host computer,
6062 it appears in this list and remains there until detached.
6063 </desc>
6064 </attribute>
6065
6066 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6067 <desc>
6068 Collection of shared folders for the current session. These folders
6069 are called transient shared folders because they are available to the
6070 guest OS running inside the associated virtual machine only for the
6071 duration of the session (as opposed to
6072 <link to="IMachine::sharedFolders"/> which represent permanent shared
6073 folders). When the session is closed (e.g. the machine is powered down),
6074 these folders are automatically discarded.
6075
6076 New shared folders are added to the collection using
6077 <link to="#createSharedFolder"/>. Existing shared folders can be
6078 removed using <link to="#removeSharedFolder"/>.
6079 </desc>
6080 </attribute>
6081
6082 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6083 <desc>
6084 Interface that provides information on Remote Display (VRDP) connection.
6085 </desc>
6086 </attribute>
6087
6088 <method name="powerUp">
6089 <desc>
6090 Starts the virtual machine execution using the current machine
6091 state (that is, its current execution state, current settings and
6092 current hard disks).
6093
6094 If the machine is powered off or aborted, the execution will
6095 start from the beginning (as if the real hardware were just
6096 powered on).
6097
6098 If the machine is in the <link to="MachineState_Saved"/> state,
6099 it will continue its execution the point where the state has
6100 been saved.
6101
6102 <note>
6103 Unless you are trying to write a new VirtualBox front-end that
6104 performs direct machine execution (like the VirtualBox or VBoxSDL
6105 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6106 session opened by <link to="IVirtualBox::openSession"/> and use this
6107 session only to change virtual machine settings. If you simply want to
6108 start virtual machine execution using one of the existing front-ends
6109 (for example the VirtualBox GUI or headless server), simply use
6110 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6111 power up the machine automatically for you.
6112 </note>
6113
6114 <see>#saveState</see>
6115 <result name="VBOX_E_INVALID_VM_STATE">
6116 Virtual machine already running.
6117 </result>
6118 <result name="VBOX_E_HOST_ERROR">
6119 Host interface does not exist or name not set.
6120 </result>
6121 <result name="VBOX_E_FILE_ERROR">
6122 Invalid saved state file.
6123 </result>
6124 </desc>
6125 <param name="progress" type="IProgress" dir="return">
6126 <desc>Progress object to track the operation completion.</desc>
6127 </param>
6128 </method>
6129
6130 <method name="powerUpPaused">
6131 <desc>
6132 Identical to powerUp except that the VM will enter the
6133 <link to="MachineState_Paused"/> state, instead of
6134 <link to="MachineState_Running"/>.
6135
6136 <see>#powerUp</see>
6137 <result name="VBOX_E_INVALID_VM_STATE">
6138 Virtual machine already running.
6139 </result>
6140 <result name="VBOX_E_HOST_ERROR">
6141 Host interface does not exist or name not set.
6142 </result>
6143 <result name="VBOX_E_FILE_ERROR">
6144 Invalid saved state file.
6145 </result>
6146 </desc>
6147 <param name="progress" type="IProgress" dir="return">
6148 <desc>Progress object to track the operation completion.</desc>
6149 </param>
6150 </method>
6151
6152 <method name="powerDown">
6153 <desc>
6154 Initiates the power down procedure to stop the virtual machine
6155 execution.
6156
6157 The completion of the power down procedure is tracked using the returned
6158 IProgress object. After the operation is complete, the machine will go
6159 to the PoweredOff state.
6160 <result name="VBOX_E_INVALID_VM_STATE">
6161 Virtual machine must be Running, Paused or Stuck to be powered down.
6162 </result>
6163 </desc>
6164 <param name="progress" type="IProgress" dir="return">
6165 <desc>Progress object to track the operation completion.</desc>
6166 </param>
6167 </method>
6168
6169 <method name="reset">
6170 <desc>Resets the virtual machine.
6171 <result name="VBOX_E_INVALID_VM_STATE">
6172 Virtual machine not in Running state.
6173 </result>
6174 <result name="VBOX_E_VM_ERROR">
6175 Virtual machine error in reset operation.
6176 </result>
6177 </desc>
6178 </method>
6179
6180 <method name="pause">
6181 <desc>Pauses the virtual machine execution.
6182 <result name="VBOX_E_INVALID_VM_STATE">
6183 Virtual machine not in Running state.
6184 </result>
6185 <result name="VBOX_E_VM_ERROR">
6186 Virtual machine error in suspend operation.
6187 </result>
6188 </desc>
6189 </method>
6190
6191 <method name="resume">
6192 <desc>Resumes the virtual machine execution.
6193 <result name="VBOX_E_INVALID_VM_STATE">
6194 Virtual machine not in Paused state.
6195 </result>
6196 <result name="VBOX_E_VM_ERROR">
6197 Virtual machine error in resume operation.
6198 </result>
6199 </desc>
6200 </method>
6201
6202 <method name="powerButton">
6203 <desc>Sends the ACPI power button event to the guest.
6204 <result name="VBOX_E_INVALID_VM_STATE">
6205 Virtual machine not in Running state.
6206 </result>
6207 <result name="VBOX_E_PDM_ERROR">
6208 Controlled power off failed.
6209 </result>
6210 </desc>
6211 </method>
6212
6213 <method name="sleepButton">
6214 <desc>Sends the ACPI sleep button event to the guest.
6215 <result name="VBOX_E_INVALID_VM_STATE">
6216 Virtual machine not in Running state.
6217 </result>
6218 <result name="VBOX_E_PDM_ERROR">
6219 Sending sleep button event failed.
6220 </result>
6221 </desc>
6222 </method>
6223
6224 <method name="getPowerButtonHandled">
6225 <desc>Checks if the last power button event was handled by guest.
6226 <result name="VBOX_E_PDM_ERROR">
6227 Checking if the event was handled by the guest OS failed.
6228 </result>
6229 </desc>
6230 <param name="handled" type="boolean" dir="return"/>
6231 </method>
6232
6233 <method name="getGuestEnteredACPIMode">
6234 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6235 G1 (sleeping). If this method returns @c false, the guest will
6236 most likely not respond to external ACPI events.
6237 <result name="VBOX_E_INVALID_VM_STATE">
6238 Virtual machine not in Running state.
6239 </result>
6240 </desc>
6241 <param name="entered" type="boolean" dir="return"/>
6242 </method>
6243
6244 <method name="saveState">
6245 <desc>
6246 Saves the current execution state of a running virtual machine
6247 and stops its execution.
6248
6249 After this operation completes, the machine will go to the
6250 Saved state. Next time it is powered up, this state will
6251 be restored and the machine will continue its execution from
6252 the place where it was saved.
6253
6254 This operation differs from taking a snapshot to the effect
6255 that it doesn't create new differencing media. Also, once
6256 the machine is powered up from the state saved using this method,
6257 the saved state is deleted, so it will be impossible to return
6258 to this state later.
6259
6260 <note>
6261 On success, this method implicitly calls
6262 <link to="IMachine::saveSettings"/> to save all current machine
6263 settings (including runtime changes to the DVD medium, etc.).
6264 Together with the impossibility to change any VM settings when it is
6265 in the Saved state, this guarantees adequate hardware
6266 configuration of the machine when it is restored from the saved
6267 state file.
6268 </note>
6269
6270 <note>
6271 The machine must be in the Running or Paused state, otherwise
6272 the operation will fail.
6273 </note>
6274 <result name="VBOX_E_INVALID_VM_STATE">
6275 Virtual machine state neither Running nor Paused.
6276 </result>
6277 <result name="VBOX_E_FILE_ERROR">
6278 Failed to create directory for saved state file.
6279 </result>
6280
6281 <see><link to="#takeSnapshot"/></see>
6282 </desc>
6283 <param name="progress" type="IProgress" dir="return">
6284 <desc>Progress object to track the operation completion.</desc>
6285 </param>
6286 </method>
6287
6288 <method name="adoptSavedState">
6289 <desc>
6290 Associates the given saved state file to the virtual machine.
6291
6292 On success, the machine will go to the Saved state. Next time it is
6293 powered up, it will be restored from the adopted saved state and
6294 continue execution from the place where the saved state file was
6295 created.
6296
6297 The specified saved state file path may be absolute or relative to the
6298 folder the VM normally saves the state to (usually,
6299 <link to="IMachine::snapshotFolder"/>).
6300
6301 <note>
6302 It's a caller's responsibility to make sure the given saved state
6303 file is compatible with the settings of this virtual machine that
6304 represent its virtual hardware (memory size, hard disk configuration
6305 etc.). If there is a mismatch, the behavior of the virtual machine
6306 is undefined.
6307 </note>
6308 <result name="VBOX_E_INVALID_VM_STATE">
6309 Virtual machine state neither PoweredOff nor Aborted.
6310 </result>
6311 </desc>
6312 <param name="savedStateFile" type="wstring" dir="in">
6313 <desc>Path to the saved state file to adopt.</desc>
6314 </param>
6315 </method>
6316
6317 <method name="forgetSavedState">
6318 <desc>
6319 Forgets the saved state of the virtual machine previously created
6320 by <link to="#saveState"/>. Next time the machine is powered up, a
6321 clean boot will occur. If @a remove is @c true the saved state file
6322 is deleted.
6323 <note>
6324 This operation is equivalent to resetting or powering off
6325 the machine without doing a proper shutdown in the guest OS.
6326 </note>
6327 <result name="VBOX_E_INVALID_VM_STATE">
6328 Virtual machine not in state Saved.
6329 </result>
6330 </desc>
6331 <param name="remove" type="boolean" dir="in">
6332 <desc>If @c true remove the saved state file.</desc>
6333 </param>
6334 </method>
6335
6336 <method name="getDeviceActivity">
6337 <desc>
6338 Gets the current activity type of a given device or device group.
6339 <result name="E_INVALIDARG">
6340 Invalid device type.
6341 </result>
6342 </desc>
6343 <param name="type" type="DeviceType" dir="in"/>
6344 <param name="activity" type="DeviceActivity" dir="return"/>
6345 </method>
6346
6347 <method name="attachUSBDevice">
6348 <desc>
6349 Attaches a host USB device with the given UUID to the
6350 USB controller of the virtual machine.
6351
6352 The device needs to be in one of the following states:
6353 <link to="USBDeviceState_Busy"/>,
6354 <link to="USBDeviceState_Available"/> or
6355 <link to="USBDeviceState_Held"/>,
6356 otherwise an error is immediately returned.
6357
6358 When the device state is
6359 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6360 be returned if the host computer refuses to release it for some reason.
6361
6362 <see>IUSBController::deviceFilters, USBDeviceState</see>
6363 <result name="VBOX_E_INVALID_VM_STATE">
6364 Virtual machine state neither Running nor Paused.
6365 </result>
6366 <result name="VBOX_E_PDM_ERROR">
6367 Virtual machine does not have a USB controller.
6368 </result>
6369 </desc>
6370 <param name="id" type="uuid" mod="string" dir="in">
6371 <desc>UUID of the host USB device to attach.</desc>
6372 </param>
6373 </method>
6374
6375 <method name="detachUSBDevice">
6376 <desc>
6377 Detaches an USB device with the given UUID from the USB controller
6378 of the virtual machine.
6379
6380 After this method succeeds, the VirtualBox server re-initiates
6381 all USB filters as if the device were just physically attached
6382 to the host, but filters of this machine are ignored to avoid
6383 a possible automatic re-attachment.
6384
6385 <see>IUSBController::deviceFilters, USBDeviceState</see>
6386
6387 <result name="VBOX_E_PDM_ERROR">
6388 Virtual machine does not have a USB controller.
6389 </result>
6390 <result name="E_INVALIDARG">
6391 USB device not attached to this virtual machine.
6392 </result>
6393 </desc>
6394 <param name="id" type="uuid" mod="string" dir="in">
6395 <desc>UUID of the USB device to detach.</desc>
6396 </param>
6397 <param name="device" type="IUSBDevice" dir="return">
6398 <desc>Detached USB device.</desc>
6399 </param>
6400 </method>
6401
6402 <method name="findUSBDeviceByAddress">
6403 <desc>
6404 Searches for a USB device with the given host address.
6405
6406 <result name="VBOX_E_OBJECT_NOT_FOUND">
6407 Given @c name does not correspond to any USB device.
6408 </result>
6409
6410 <see>IUSBDevice::address</see>
6411 </desc>
6412 <param name="name" type="wstring" dir="in">
6413 <desc>
6414 Address of the USB device (as assigned by the host) to
6415 search for.
6416 </desc>
6417 </param>
6418 <param name="device" type="IUSBDevice" dir="return">
6419 <desc>Found USB device object.</desc>
6420 </param>
6421 </method>
6422
6423 <method name="findUSBDeviceById">
6424 <desc>
6425 Searches for a USB device with the given UUID.
6426
6427 <result name="VBOX_E_OBJECT_NOT_FOUND">
6428 Given @c id does not correspond to any USB device.
6429 </result>
6430
6431 <see>IUSBDevice::id</see>
6432 </desc>
6433 <param name="id" type="uuid" mod="string" dir="in">
6434 <desc>UUID of the USB device to search for.</desc>
6435 </param>
6436 <param name="device" type="IUSBDevice" dir="return">
6437 <desc>Found USB device object.</desc>
6438 </param>
6439 </method>
6440
6441 <method name="createSharedFolder">
6442 <desc>
6443 Creates a transient new shared folder by associating the given logical
6444 name with the given host path, adds it to the collection of shared
6445 folders and starts sharing it. Refer to the description of
6446 <link to="ISharedFolder"/> to read more about logical names.
6447
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 already exists or not accessible.
6453 </result>
6454 </desc>
6455 <param name="name" type="wstring" dir="in">
6456 <desc>Unique logical name of the shared folder.</desc>
6457 </param>
6458 <param name="hostPath" type="wstring" dir="in">
6459 <desc>Full path to the shared folder in the host file system.</desc>
6460 </param>
6461 <param name="writable" type="boolean" dir="in">
6462 <desc>Whether the share is writable or readonly</desc>
6463 </param>
6464 </method>
6465
6466 <method name="removeSharedFolder">
6467 <desc>
6468 Removes a transient shared folder with the given name previously
6469 created by <link to="#createSharedFolder"/> from the collection of
6470 shared folders and stops sharing it.
6471 <result name="VBOX_E_INVALID_VM_STATE">
6472 Virtual machine in Saved state or currently changing state.
6473 </result>
6474 <result name="VBOX_E_FILE_ERROR">
6475 Shared folder does not exists.
6476 </result>
6477 </desc>
6478 <param name="name" type="wstring" dir="in">
6479 <desc>Logical name of the shared folder to remove.</desc>
6480 </param>
6481 </method>
6482
6483 <method name="takeSnapshot">
6484 <desc>
6485 Saves the current execution state
6486 and all settings of the machine and creates differencing images
6487 for all normal (non-independent) media.
6488 See <link to="ISnapshot" /> for an introduction to snapshots.
6489
6490 This method can be called for a PoweredOff, Saved (see
6491 <link to="#saveState"/>), Running or
6492 Paused virtual machine. When the machine is PoweredOff, an
6493 offline snapshot is created. When the machine is Running a live
6494 snapshot is created, and an online snapshot is is created when Paused.
6495
6496 The taken snapshot is always based on the
6497 <link to="IMachine::currentSnapshot">current snapshot</link>
6498 of the associated virtual machine and becomes a new current snapshot.
6499
6500 <note>
6501 This method implicitly calls <link to="IMachine::saveSettings"/> to
6502 save all current machine settings before taking an offline snapshot.
6503 </note>
6504
6505 <result name="VBOX_E_INVALID_VM_STATE">
6506 Virtual machine currently changing state.
6507 </result>
6508 </desc>
6509 <param name="name" type="wstring" dir="in">
6510 <desc>Short name for the snapshot.</desc>
6511 </param>
6512 <param name="description" type="wstring" dir="in">
6513 <desc>Optional description of the snapshot.</desc>
6514 </param>
6515 <param name="progress" type="IProgress" dir="return">
6516 <desc>Progress object to track the operation completion.</desc>
6517 </param>
6518 </method>
6519
6520 <method name="discardSnapshot">
6521 <desc>
6522 Starts discarding the specified snapshot asynchronously.
6523 See <link to="ISnapshot" /> for an introduction to snapshots.
6524
6525 The execution state
6526 and settings of the associated machine stored in the snapshot
6527 will be deleted. The contents of all differencing media of
6528 this snapshot will be merged with the contents of their
6529 dependent child media to keep the disks valid (in other
6530 words, all changes represented by media being discarded
6531 will be propagated to their child medium). After that, this
6532 snapshot's differencing medium will be deleted. The parent
6533 of this snapshot will become a new parent for all its child
6534 snapshots.
6535
6536 If the discarded snapshot is the current one, its parent
6537 snapshot will become a new current snapshot. The current machine
6538 state is not directly affected in this case, except that
6539 currently attached differencing media based on media
6540 of the discarded snapshot will be also merged as described
6541 above.
6542
6543 If the discarded snapshot is the first one (the root snapshot)
6544 and it has exactly one child snapshot, this child snapshot will
6545 become the first snapshot after discarding. If there are no
6546 children at all (i.e. the first snapshot is the only snapshot of
6547 the machine), both the current and the first snapshot of the
6548 machine will be set to @c null. In all other cases, the first
6549 snapshot cannot be discarded.
6550
6551 You cannot discard the snapshot if it
6552 stores <link to="MediumType_Normal">normal</link> (non-differencing)
6553 media that have differencing media based on them. Snapshots of
6554 such kind can be discarded only when every normal medium has either
6555 no children at all or exactly one child. In the former case, the normal
6556 medium simply becomes unused (i.e. not attached to any VM). In the
6557 latter case, it receives all the changes stored in the child medium,
6558 and then it replaces the child medium in the configuration of the
6559 corresponding snapshot or machine.
6560
6561 Also, you cannot discard the snapshot if it stores media
6562 (of any type) having differencing child media that belong
6563 to other machines. Such snapshots can be only discarded after
6564 you discard all snapshots of other machines containing "foreign"
6565 child disks, or detach these "foreign" child disks from machines
6566 they are attached to.
6567
6568 One particular example of the snapshot storing normal media
6569 is the first snapshot of a virtual machine that had normal media
6570 attached when taking the snapshot. Be careful when
6571 discarding such snapshots because this implicitly commits
6572 changes (made since the snapshot being discarded has been taken)
6573 to normal media (as described above), which may be not what
6574 you want.
6575
6576 The virtual machine is put to
6577 the <link to="MachineState_Discarding">Discarding</link> state until
6578 the discard operation is completed.
6579
6580 <note>
6581 The machine must not be running, otherwise the operation
6582 will fail.
6583 </note>
6584
6585 <note>
6586 Child media of all normal media of the discarded snapshot
6587 must be accessible (see <link to="IMedium::state"/>) for this
6588 operation to succeed. In particular, this means that all virtual
6589 machines, whose media are directly or indirectly based on the
6590 media of discarded snapshot, must be powered off.
6591 </note>
6592 <note>
6593 Merging medium contents can be very time and disk space
6594 consuming, if these disks are big in size and have many
6595 children. However, if the snapshot being discarded is the last
6596 (head) snapshot on the branch, the operation will be rather
6597 quick.
6598 </note>
6599 <note>
6600 Note that discarding the current snapshot
6601 will implicitly call <link to="IMachine::saveSettings"/> to
6602 make all current machine settings permanent.
6603 </note>
6604 <result name="VBOX_E_INVALID_VM_STATE">
6605 Virtual machine is running.
6606 </result>
6607 </desc>
6608 <param name="id" type="uuid" mod="string" dir="in">
6609 <desc>UUID of the snapshot to discard.</desc>
6610 </param>
6611 <param name="progress" type="IProgress" dir="return">
6612 <desc>Progress object to track the operation completion.</desc>
6613 </param>
6614 </method>
6615
6616 <method name="discardCurrentState">
6617 <desc>
6618 Starts resetting the machine's current state to the state contained
6619 in the current snapshot, asynchronously. All current settings of the
6620 machine will be reset and changes stored in differencing media
6621 will be lost.
6622 See <link to="ISnapshot" /> for an introduction to snapshots.
6623
6624 After this operation is successfully completed, new empty differencing
6625 media are created for all normal media of the machine.
6626
6627 If the current snapshot of the machine is an online snapshot, the
6628 machine will go to the <link to="MachineState_Saved"> saved
6629 state</link>, so that the next time it is powered on, the execution
6630 state will be restored from the current snapshot.
6631
6632 <note>
6633 The machine must not be running, otherwise the operation will fail.
6634 </note>
6635
6636 <note>
6637 If the machine state is <link to="MachineState_Saved">Saved</link>
6638 prior to this operation, the saved state file will be implicitly
6639 discarded (as if <link to="IConsole::forgetSavedState"/> were
6640 called).
6641 </note>
6642
6643 <result name="VBOX_E_INVALID_VM_STATE">
6644 Virtual machine is running.
6645 </result>
6646 </desc>
6647 <param name="progress" type="IProgress" dir="return">
6648 <desc>Progress object to track the operation completion.</desc>
6649 </param>
6650 </method>
6651
6652 <method name="discardCurrentSnapshotAndState">
6653 <desc>
6654
6655 This method is equivalent to
6656 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6657 (currentSnapshot.id(), progress) followed by
6658 <link to="IConsole::discardCurrentState"/>.
6659
6660 As a result, the machine will be fully restored from the
6661 snapshot preceding the current snapshot, while both the current
6662 snapshot and the current machine state will be discarded.
6663
6664 If the current snapshot is the first snapshot of the machine (i.e. it
6665 has the only snapshot), the current machine state will be
6666 discarded <b>before</b> discarding the snapshot. In other words, the
6667 machine will be restored from its last snapshot, before discarding
6668 it. This differs from performing a single
6669 <link to="IConsole::discardSnapshot"/> call (note that no
6670 <link to="IConsole::discardCurrentState"/> will be possible after it)
6671 to the effect that the latter will preserve the current state instead of
6672 discarding it.
6673
6674 Unless explicitly mentioned otherwise, all remarks and
6675 limitations of the above two methods also apply to this method.
6676
6677 <note>
6678 The machine must not be running, otherwise the operation
6679 will fail.
6680 </note>
6681
6682 <note>
6683 If the machine state is <link to="MachineState_Saved">Saved</link>
6684 prior to this operation, the saved state file will be implicitly
6685 discarded (as if <link to="#forgetSavedState"/> were
6686 called).
6687 </note>
6688
6689 <note>
6690 This method is more efficient than calling both of the above
6691 methods separately: it requires less IPC calls and provides
6692 a single progress object.
6693 </note>
6694
6695 <result name="VBOX_E_INVALID_VM_STATE">
6696 Virtual machine is running.
6697 </result>
6698 </desc>
6699 <param name="progress" type="IProgress" dir="return">
6700 <desc>Progress object to track the operation completion.</desc>
6701 </param>
6702 </method>
6703
6704 <method name="migrate">
6705 <desc>
6706 Migrate the VM to a different host machine.
6707
6708 TODO explain the details.
6709
6710 <result name="VBOX_E_INVALID_VM_STATE">
6711 Virtual machine not running or paused.
6712 </result>
6713 </desc>
6714 <param name="hostname" type="wstring" dir="in">
6715 <desc>The name or IP of the host to migrate to.</desc>
6716 </param>
6717 <param name="tcpport" type="unsigned long" dir="in">
6718 <desc>The TCP port to connect to (1..65535).</desc>
6719 </param>
6720 <param name="password" type="wstring" dir="in">
6721 <desc>The password.</desc>
6722 </param>
6723 <param name="progress" type="IProgress" dir="return">
6724 <desc>Progress object to track the operation completion.</desc>
6725 </param>
6726 </method>
6727
6728 <method name="registerCallback">
6729 <desc>
6730 Registers a new console callback on this instance. The methods of the
6731 callback interface will be called by this instance when the appropriate
6732 event occurs.
6733 </desc>
6734 <param name="callback" type="IConsoleCallback" dir="in"/>
6735 </method>
6736
6737 <method name="unregisterCallback">
6738 <desc>
6739 Unregisters the console callback previously registered using
6740 <link to="#registerCallback"/>.
6741 <result name="E_INVALIDARG">
6742 Given @a callback handler is not registered.
6743 </result>
6744 </desc>
6745 <param name="callback" type="IConsoleCallback" dir="in"/>
6746 </method>
6747 </interface>
6748
6749 <!--
6750 // IHost
6751 /////////////////////////////////////////////////////////////////////////
6752 -->
6753
6754 <enum
6755 name="HostNetworkInterfaceMediumType"
6756 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6757 >
6758 <desc>
6759 Type of encapsulation. Ethernet encapsulation includes both wired and
6760 wireless Ethernet connections.
6761 <see>IHostNetworkInterface</see>
6762 </desc>
6763
6764 <const name="Unknown" value="0">
6765 <desc>
6766 The type of interface cannot be determined.
6767 </desc>
6768 </const>
6769 <const name="Ethernet" value="1">
6770 <desc>
6771 Ethernet frame encapsulation.
6772 </desc>
6773 </const>
6774 <const name="PPP" value="2">
6775 <desc>
6776 Point-to-point protocol encapsulation.
6777 </desc>
6778 </const>
6779 <const name="SLIP" value="3">
6780 <desc>
6781 Serial line IP encapsulation.
6782 </desc>
6783 </const>
6784 </enum>
6785
6786 <enum
6787 name="HostNetworkInterfaceStatus"
6788 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6789 >
6790 <desc>
6791 Current status of the interface.
6792 <see>IHostNetworkInterface</see>
6793 </desc>
6794
6795 <const name="Unknown" value="0">
6796 <desc>
6797 The state of interface cannot be determined.
6798 </desc>
6799 </const>
6800 <const name="Up" value="1">
6801 <desc>
6802 The interface is fully operational.
6803 </desc>
6804 </const>
6805 <const name="Down" value="2">
6806 <desc>
6807 The interface is not functioning.
6808 </desc>
6809 </const>
6810 </enum>
6811
6812 <enum
6813 name="HostNetworkInterfaceType"
6814 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6815 >
6816 <desc>
6817 Network interface type.
6818 </desc>
6819 <const name="Bridged" value="1"/>
6820 <const name="HostOnly" value="2"/>
6821 </enum>
6822
6823 <interface
6824 name="IHostNetworkInterface" extends="$unknown"
6825 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6826 wsmap="managed"
6827 >
6828 <desc>
6829 Represents one of host's network interfaces. IP V6 address and network
6830 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6831 separated by colons.
6832 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6833 </desc>
6834 <attribute name="name" type="wstring" readonly="yes">
6835 <desc>Returns the host network interface name.</desc>
6836 </attribute>
6837
6838 <attribute name="id" type="uuid" mod="string" readonly="yes">
6839 <desc>Returns the interface UUID.</desc>
6840 </attribute>
6841
6842 <attribute name="networkName" type="wstring" readonly="yes">
6843 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6844 </attribute>
6845
6846 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6847 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6848 </attribute>
6849
6850 <attribute name="IPAddress" type="wstring" readonly="yes">
6851 <desc>Returns the IP V4 address of the interface.</desc>
6852 </attribute>
6853
6854 <attribute name="networkMask" type="wstring" readonly="yes">
6855 <desc>Returns the network mask of the interface.</desc>
6856 </attribute>
6857
6858 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6859 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6860 </attribute>
6861
6862 <attribute name="IPV6Address" type="wstring" readonly="yes">
6863 <desc>Returns the IP V6 address of the interface.</desc>
6864 </attribute>
6865
6866 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6867 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6868 </attribute>
6869
6870 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6871 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6872 </attribute>
6873
6874 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6875 <desc>Type of protocol encapsulation used.</desc>
6876 </attribute>
6877
6878 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6879 <desc>Status of the interface.</desc>
6880 </attribute>
6881
6882 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6883 <desc>specifies the host interface type.</desc>
6884 </attribute>
6885
6886 <method name="enableStaticIpConfig">
6887 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6888 <param name="IPAddress" type="wstring" dir="in">
6889 <desc>
6890 IP address.
6891 </desc>
6892 </param>
6893 <param name="networkMask" type="wstring" dir="in">
6894 <desc>
6895 network mask.
6896 </desc>
6897 </param>
6898 </method>
6899
6900 <method name="enableStaticIpConfigV6">
6901 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6902 <param name="IPV6Address" type="wstring" dir="in">
6903 <desc>
6904 IP address.
6905 </desc>
6906 </param>
6907 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6908 <desc>
6909 network mask.
6910 </desc>
6911 </param>
6912 </method>
6913
6914 <method name="enableDynamicIpConfig">
6915 <desc>enables the dynamic IP configuration.</desc>
6916 </method>
6917
6918 <method name="dhcpRediscover">
6919 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6920 </method>
6921
6922 </interface>
6923
6924 <interface
6925 name="IHost" extends="$unknown"
6926 uuid="95522f11-1ecc-443b-9242-3af6b24d430c"
6927 wsmap="managed"
6928 >
6929 <desc>
6930 The IHost interface represents the physical machine that this VirtualBox
6931 installation runs on.
6932
6933 An object implementing this interface is returned by the
6934 <link to="IVirtualBox::host" /> attribute. This interface contains
6935 read-only information about the host's physical hardware (such as what
6936 processors and disks are available, what the host operating system is,
6937 and so on) and also allows for manipulating some of the host's hardware,
6938 such as global USB device filters and host interface networking.
6939
6940 </desc>
6941 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
6942 <desc>List of DVD drives available on the host.</desc>
6943 </attribute>
6944
6945 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
6946 <desc>List of floppy drives available on the host.</desc>
6947 </attribute>
6948
6949 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6950 <desc>
6951 List of USB devices currently attached to the host.
6952 Once a new device is physically attached to the host computer,
6953 it appears in this list and remains there until detached.
6954
6955 <note>
6956 If USB functionality is not available in the given edition of
6957 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6958 </note>
6959 </desc>
6960 </attribute>
6961
6962 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
6963 <desc>
6964 List of USB device filters in action.
6965 When a new device is physically attached to the host computer,
6966 filters from this list are applied to it (in order they are stored
6967 in the list). The first matched filter will determine the
6968 <link to="IHostUSBDeviceFilter::action">action</link>
6969 performed on the device.
6970
6971 Unless the device is ignored by these filters, filters of all
6972 currently running virtual machines
6973 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6974
6975 <note>
6976 If USB functionality is not available in the given edition of
6977 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6978 </note>
6979
6980 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6981 </desc>
6982 </attribute>
6983
6984 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6985 <desc>List of host network interfaces currently defined on the host.</desc>
6986 </attribute>
6987
6988 <attribute name="processorCount" type="unsigned long" readonly="yes">
6989 <desc>Number of (logical) CPUs installed in the host system.</desc>
6990 </attribute>
6991
6992 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6993 <desc>Number of (logical) CPUs online in the host system.</desc>
6994 </attribute>
6995
6996 <method name="getProcessorSpeed">
6997 <desc>Query the (approximate) maximum speed of a specified host CPU in
6998 Megahertz.
6999 </desc>
7000 <param name="cpuId" type="unsigned long" dir="in">
7001 <desc>
7002 Identifier of the CPU.
7003 </desc>
7004 </param>
7005 <param name="speed" type="unsigned long" dir="return">
7006 <desc>
7007 Speed value. 0 is returned if value is not known or @a cpuId is
7008 invalid.
7009 </desc>
7010 </param>
7011 </method>
7012
7013 <method name="getProcessorFeature">
7014 <desc>Query whether a CPU feature is supported or not.</desc>
7015 <param name="feature" type="ProcessorFeature" dir="in">
7016 <desc>
7017 CPU Feature identifier.
7018 </desc>
7019 </param>
7020 <param name="supported" type="boolean" dir="return">
7021 <desc>
7022 Feature is supported or not.
7023 </desc>
7024 </param>
7025 </method>
7026
7027 <method name="getProcessorDescription">
7028 <desc>Query the model string of a specified host CPU.
7029 </desc>
7030 <param name="cpuId" type="unsigned long" dir="in">
7031 <desc>
7032 Identifier of the CPU.
7033 </desc>
7034 </param>
7035 <param name="description" type="wstring" dir="return">
7036 <desc>
7037 Model string. An empty string is returned if value is not known or
7038 @a cpuId is invalid.
7039 </desc>
7040 </param>
7041 </method>
7042
7043 <attribute name="memorySize" type="unsigned long" readonly="yes">
7044 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7045 </attribute>
7046
7047 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7048 <desc>Available system memory in the host system.</desc>
7049 </attribute>
7050
7051 <attribute name="operatingSystem" type="wstring" readonly="yes">
7052 <desc>Name of the host system's operating system.</desc>
7053 </attribute>
7054
7055 <attribute name="OSVersion" type="wstring" readonly="yes">
7056 <desc>Host operating system's version string.</desc>
7057 </attribute>
7058
7059 <attribute name="UTCTime" type="long long" readonly="yes">
7060 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7061 </attribute>
7062
7063 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
7064 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
7065 </attribute>
7066
7067 <method name="createHostOnlyNetworkInterface">
7068 <desc>
7069 Creates a new adapter for Host Only Networking.
7070 <result name="E_INVALIDARG">
7071 Host network interface @a name already exists.
7072 </result>
7073 </desc>
7074 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7075 <desc>
7076 Created host interface object.
7077 </desc>
7078 </param>
7079 <param name="progress" type="IProgress" dir="return">
7080 <desc>
7081 Progress object to track the operation completion.
7082 </desc>
7083 </param>
7084 </method>
7085
7086 <method name="removeHostOnlyNetworkInterface">
7087 <desc>
7088 Removes the given Host Only Networking interface.
7089 <result name="VBOX_E_OBJECT_NOT_FOUND">
7090 No host network interface matching @a id found.
7091 </result>
7092 </desc>
7093 <param name="id" type="uuid" mod="string" dir="in">
7094 <desc>
7095 Adapter GUID.
7096 </desc>
7097 </param>
7098 <param name="progress" type="IProgress" dir="return">
7099 <desc>
7100 Progress object to track the operation completion.
7101 </desc>
7102 </param>
7103 </method>
7104
7105 <method name="createUSBDeviceFilter">
7106 <desc>
7107 Creates a new USB device filter. All attributes except
7108 the filter name are set to empty (any match),
7109 <i>active</i> is @c false (the filter is not active).
7110
7111 The created filter can be added to the list of filters using
7112 <link to="#insertUSBDeviceFilter"/>.
7113
7114 <see>#USBDeviceFilters</see>
7115 </desc>
7116 <param name="name" type="wstring" dir="in">
7117 <desc>
7118 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7119 for more info.
7120 </desc>
7121 </param>
7122 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7123 <desc>Created filter object.</desc>
7124 </param>
7125 </method>
7126
7127 <method name="insertUSBDeviceFilter">
7128 <desc>
7129 Inserts the given USB device to the specified position
7130 in the list of filters.
7131
7132 Positions are numbered starting from @c 0. If the specified
7133 position is equal to or greater than the number of elements in
7134 the list, the filter is added at the end of the collection.
7135
7136 <note>
7137 Duplicates are not allowed, so an attempt to insert a
7138 filter already in the list is an error.
7139 </note>
7140 <note>
7141 If USB functionality is not available in the given edition of
7142 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7143 </note>
7144
7145 <see>#USBDeviceFilters</see>
7146
7147 <result name="VBOX_E_INVALID_OBJECT_STATE">
7148 USB device filter is not created within this VirtualBox instance.
7149 </result>
7150 <result name="E_INVALIDARG">
7151 USB device filter already in list.
7152 </result>
7153
7154 </desc>
7155 <param name="position" type="unsigned long" dir="in">
7156 <desc>Position to insert the filter to.</desc>
7157 </param>
7158 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7159 <desc>USB device filter to insert.</desc>
7160 </param>
7161 </method>
7162
7163 <method name="removeUSBDeviceFilter">
7164 <desc>
7165 Removes a USB device filter from the specified position in the
7166 list of filters.
7167
7168 Positions are numbered starting from @c 0. Specifying a
7169 position equal to or greater than the number of elements in
7170 the list will produce an error.
7171
7172 <note>
7173 If USB functionality is not available in the given edition of
7174 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7175 </note>
7176
7177 <see>#USBDeviceFilters</see>
7178
7179 <result name="E_INVALIDARG">
7180 USB device filter list empty or invalid @a position.
7181 </result>
7182
7183 </desc>
7184 <param name="position" type="unsigned long" dir="in">
7185 <desc>Position to remove the filter from.</desc>
7186 </param>
7187 </method>
7188
7189 <method name="findHostDVDDrive">
7190 <desc>
7191 Searches for a host DVD drive with the given @c name.
7192
7193 <result name="VBOX_E_OBJECT_NOT_FOUND">
7194 Given @c name does not correspond to any host drive.
7195 </result>
7196
7197 </desc>
7198 <param name="name" type="wstring" dir="in">
7199 <desc>Name of the host drive to search for</desc>
7200 </param>
7201 <param name="drive" type="IMedium" dir="return">
7202 <desc>Found host drive object</desc>
7203 </param>
7204 </method>
7205
7206 <method name="findHostFloppyDrive">
7207 <desc>
7208 Searches for a host floppy drive with the given @c name.
7209
7210 <result name="VBOX_E_OBJECT_NOT_FOUND">
7211 Given @c name does not correspond to any host floppy drive.
7212 </result>
7213
7214 </desc>
7215 <param name="name" type="wstring" dir="in">
7216 <desc>Name of the host floppy drive to search for</desc>
7217 </param>
7218 <param name="drive" type="IMedium" dir="return">
7219 <desc>Found host floppy drive object</desc>
7220 </param>
7221 </method>
7222
7223 <method name="findHostNetworkInterfaceByName">
7224 <desc>
7225 Searches through all host network interfaces for an interface with
7226 the given @c name.
7227 <note>
7228 The method returns an error if the given @c name does not
7229 correspond to any host network interface.
7230 </note>
7231 </desc>
7232 <param name="name" type="wstring" dir="in">
7233 <desc>Name of the host network interface to search for.</desc>
7234 </param>
7235 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7236 <desc>Found host network interface object.</desc>
7237 </param>
7238 </method>
7239 <method name="findHostNetworkInterfaceById">
7240 <desc>
7241 Searches through all host network interfaces for an interface with
7242 the given GUID.
7243 <note>
7244 The method returns an error if the given GUID does not
7245 correspond to any host network interface.
7246 </note>
7247 </desc>
7248 <param name="id" type="uuid" mod="string" dir="in">
7249 <desc>GUID of the host network interface to search for.</desc>
7250 </param>
7251 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7252 <desc>Found host network interface object.</desc>
7253 </param>
7254 </method>
7255 <method name="findHostNetworkInterfacesOfType">
7256 <desc>
7257 Searches through all host network interfaces and returns a list of interfaces of the specified type
7258 </desc>
7259 <param name="type" type="HostNetworkInterfaceType" dir="in">
7260 <desc>type of the host network interfaces to search for.</desc>
7261 </param>
7262 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7263 <desc>Found host network interface objects.</desc>
7264 </param>
7265 </method>
7266
7267 <method name="findUSBDeviceById">
7268 <desc>
7269 Searches for a USB device with the given UUID.
7270
7271 <result name="VBOX_E_OBJECT_NOT_FOUND">
7272 Given @c id does not correspond to any USB device.
7273 </result>
7274
7275 <see>IHostUSBDevice::id</see>
7276 </desc>
7277 <param name="id" type="uuid" mod="string" dir="in">
7278 <desc>UUID of the USB device to search for.</desc>
7279 </param>
7280 <param name="device" type="IHostUSBDevice" dir="return">
7281 <desc>Found USB device object.</desc>
7282 </param>
7283 </method>
7284
7285 <method name="findUSBDeviceByAddress">
7286 <desc>
7287 Searches for a USB device with the given host address.
7288
7289 <result name="VBOX_E_OBJECT_NOT_FOUND">
7290 Given @c name does not correspond to any USB device.
7291 </result>
7292
7293 <see>IHostUSBDevice::address</see>
7294 </desc>
7295 <param name="name" type="wstring" dir="in">
7296 <desc>
7297 Address of the USB device (as assigned by the host) to
7298 search for.
7299 </desc>
7300 </param>
7301 <param name="device" type="IHostUSBDevice" dir="return">
7302 <desc>Found USB device object.</desc>
7303 </param>
7304 </method>
7305
7306 </interface>
7307
7308 <!--
7309 // ISystemProperties
7310 /////////////////////////////////////////////////////////////////////////
7311 -->
7312
7313 <interface
7314 name="ISystemProperties"
7315 extends="$unknown"
7316 uuid="4b78105a-d066-4eab-ae48-ccb2c0ba5057"
7317 wsmap="managed"
7318 >
7319 <desc>
7320 The ISystemProperties interface represents global properties of the given
7321 VirtualBox installation.
7322
7323 These properties define limits and default values for various attributes
7324 and parameters. Most of the properties are read-only, but some can be
7325 changed by a user.
7326 </desc>
7327
7328 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7329 <desc>Minimum guest system memory in Megabytes.</desc>
7330 </attribute>
7331
7332 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7333 <desc>Maximum guest system memory in Megabytes.</desc>
7334 </attribute>
7335
7336 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7337 <desc>Minimum guest video memory in Megabytes.</desc>
7338 </attribute>
7339
7340 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7341 <desc>Maximum guest video memory in Megabytes.</desc>
7342 </attribute>
7343
7344 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7345 <desc>Minimum CPU count.</desc>
7346 </attribute>
7347
7348 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7349 <desc>Maximum CPU count.</desc>
7350 </attribute>
7351
7352 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7353 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7354 </attribute>
7355
7356 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7357 <desc>
7358 Number of network adapters associated with every
7359 <link to="IMachine"/> instance.
7360 </desc>
7361 </attribute>
7362
7363 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7364 <desc>
7365 Number of serial ports associated with every
7366 <link to="IMachine"/> instance.
7367 </desc>
7368 </attribute>
7369
7370 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7371 <desc>
7372 Number of parallel ports associated with every
7373 <link to="IMachine"/> instance.
7374 </desc>
7375 </attribute>
7376
7377 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7378 <desc>
7379 Maximum device position in the boot order. This value corresponds
7380 to the total number of devices a machine can boot from, to make it
7381 possible to include all possible devices to the boot list.
7382 <see><link to="IMachine::setBootOrder"/></see>
7383 </desc>
7384 </attribute>
7385
7386 <attribute name="defaultMachineFolder" type="wstring">
7387 <desc>
7388 Full path to the default directory used to create new or open
7389 existing machines when a settings file name contains no
7390 path.
7391
7392 The initial value of this property is
7393 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7394 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7395
7396 <note>
7397 Setting this property to @c null or an empty string will restore the
7398 initial value.
7399 </note>
7400 <note>
7401 When settings this property, the specified path can be
7402 absolute (full path) or relative
7403 to the <link to="IVirtualBox::homeFolder">
7404 VirtualBox home directory</link>.
7405 When reading this property, a full path is
7406 always returned.
7407 </note>
7408 <note>
7409 The specified path may not exist, it will be created
7410 when necessary.
7411 </note>
7412
7413 <see>
7414 <link to="IVirtualBox::createMachine"/>,
7415 <link to="IVirtualBox::openMachine"/>
7416 </see>
7417 </desc>
7418 </attribute>
7419
7420 <attribute name="defaultHardDiskFolder" type="wstring">
7421 <desc>
7422 Full path to the default directory used to create new or open existing
7423 virtual disks.
7424
7425 This path is used when the storage unit of a hard disk is a regular file
7426 in the host's file system and only a file name that contains no path is
7427 given.
7428
7429 The initial value of this property is
7430 <tt>&lt;</tt>
7431 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7432 <tt>&gt;/HardDisks</tt>.
7433
7434 <note>
7435 Setting this property to @c null or empty string will restore the
7436 initial value.
7437 </note>
7438 <note>
7439 When settings this property, the specified path can be relative
7440 to the
7441 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7442 absolute. When reading this property, a full path is
7443 always returned.
7444 </note>
7445 <note>
7446 The specified path may not exist, it will be created
7447 when necessary.
7448 </note>
7449
7450 <see>
7451 IMedium,
7452 <link to="IVirtualBox::createHardDisk"/>,
7453 <link to="IVirtualBox::openHardDisk"/>,
7454 <link to="IMedium::location"/>
7455 </see>
7456 </desc>
7457 </attribute>
7458
7459 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7460 <desc>
7461 List of all medium storage formats supported by this VirtualBox
7462 installation.
7463
7464 Keep in mind that the medium format identifier
7465 (<link to="IMediumFormat::id"/>) used in other API calls like
7466 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7467 medium format is a case-insensitive string. This means that, for
7468 example, all of the following strings:
7469 <pre>
7470 "VDI"
7471 "vdi"
7472 "VdI"</pre>
7473 refer to the same medium format.
7474
7475 Note that the virtual medium framework is backend-based, therefore
7476 the list of supported formats depends on what backends are currently
7477 installed.
7478
7479 <see>
7480 <link to="IMediumFormat"/>,
7481 </see>
7482 </desc>
7483 </attribute>
7484
7485 <attribute name="defaultHardDiskFormat" type="wstring">
7486 <desc>
7487 Identifier of the default medium format used by VirtualBox.
7488
7489 The medium format set by this attribute is used by VirtualBox
7490 when the medium format was not specified explicitly. One example is
7491 <link to="IVirtualBox::createHardDisk"/> with the empty
7492 format argument. A more complex example is implicit creation of
7493 differencing media when taking a snapshot of a virtual machine:
7494 this operation will try to use a format of the parent medium first
7495 and if this format does not support differencing media the default
7496 format specified by this argument will be used.
7497
7498 The list of supported medium formats may be obtained by the
7499 <link to="#mediaFormats"/> call. Note that the default medium
7500 format must have a capability to create differencing media;
7501 otherwise operations that create media implicitly may fail
7502 unexpectedly.
7503
7504 The initial value of this property is <tt>"VDI"</tt> in the current
7505 version of the VirtualBox product, but may change in the future.
7506
7507 <note>
7508 Setting this property to @c null or empty string will restore the
7509 initial value.
7510 </note>
7511
7512 <see>
7513 <link to="#mediaFormats"/>,
7514 <link to="IMediumFormat::id"/>,
7515 <link to="IVirtualBox::createHardDisk"/>
7516 </see>
7517 </desc>
7518 </attribute>
7519
7520 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7521 <desc>
7522 Library that provides authentication for VRDP clients. The library
7523 is used if a virtual machine's authentication type is set to "external"
7524 in the VM RemoteDisplay configuration.
7525
7526 The system library extension (".DLL" or ".so") must be omitted.
7527 A full path can be specified; if not, then the library must reside on the
7528 system's default library path.
7529
7530 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7531 of that name in one of the default VirtualBox library directories.
7532
7533 For details about VirtualBox authentication libraries and how to implement
7534 them, please refer to the VirtualBox manual.
7535
7536 <note>
7537 Setting this property to @c null or empty string will restore the
7538 initial value.
7539 </note>
7540 </desc>
7541 </attribute>
7542
7543 <attribute name="webServiceAuthLibrary" type="wstring">
7544 <desc>
7545 Library that provides authentication for webservice clients. The library
7546 is used if a virtual machine's authentication type is set to "external"
7547 in the VM RemoteDisplay configuration and will be called from
7548 within the <link to="IWebsessionManager::logon" /> implementation.
7549
7550 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7551 there is no per-VM setting for this, as the webservice is a global
7552 resource (if it is running). Only for this setting (for the webservice),
7553 setting this value to a literal <tt>"null"</tt> string disables authentication,
7554 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7555 no matter what user name and password are supplied.
7556
7557 The initial value of this property is <tt>"VRDPAuth"</tt>,
7558 meaning that the webservice will use the same authentication
7559 library that is used by default for VBoxVRDP (again, see
7560 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7561 The format and calling convention of authentication libraries
7562 is the same for the webservice as it is for VBoxVRDP.
7563
7564 <note>
7565 Setting this property to @c null or empty string will restore the
7566 initial value.
7567 </note>
7568 </desc>
7569 </attribute>
7570
7571 <attribute name="LogHistoryCount" type="unsigned long">
7572 <desc>
7573 This value specifies how many old release log files are kept.
7574 </desc>
7575 </attribute>
7576
7577 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7578 <desc>This value hold the default audio driver for the current
7579 system.</desc>
7580 </attribute>
7581
7582 <method name="getMaxDevicesPerPortForStorageBus">
7583 <desc>Returns the maximum number of devices which can be attached to a port
7584 for the given storage bus.</desc>
7585
7586 <param name="bus" type="StorageBus" dir="in">
7587 <desc>The storage bus type to get the value for.</desc>
7588 </param>
7589
7590 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
7591 <desc>The maximum number of devices which can eb attached to the port for the given
7592 storage bus.</desc>
7593 </param>
7594 </method>
7595
7596 <method name="getMinPortCountForStorageBus">
7597 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
7598
7599 <param name="bus" type="StorageBus" dir="in">
7600 <desc>The storage bus type to get the value for.</desc>
7601 </param>
7602
7603 <param name="minPortCount" type="unsigned long" dir="return">
7604 <desc>The minimum number of ports for the given storage bus.</desc>
7605 </param>
7606 </method>
7607
7608 <method name="getMaxPortCountForStorageBus">
7609 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
7610
7611 <param name="bus" type="StorageBus" dir="in">
7612 <desc>The storage bus type to get the value for.</desc>
7613 </param>
7614
7615 <param name="maxPortCount" type="unsigned long" dir="return">
7616 <desc>The maximum number of ports for the given storage bus.</desc>
7617 </param>
7618 </method>
7619
7620 <method name="getMaxInstancesOfStorageBus">
7621 <desc>Returns the maximum number of storage bus instances which
7622 can be configured for each VM. This corresponds to the number of
7623 storage controllers one can have.</desc>
7624
7625 <param name="bus" type="StorageBus" dir="in">
7626 <desc>The storage bus type to get the value for.</desc>
7627 </param>
7628
7629 <param name="maxInstances" type="unsigned long" dir="return">
7630 <desc>The maximum number of instances for the given storage bus.</desc>
7631 </param>
7632 </method>
7633 </interface>
7634
7635 <!--
7636 // IGuest
7637 /////////////////////////////////////////////////////////////////////////
7638 -->
7639
7640 <interface
7641 name="IGuestOSType" extends="$unknown"
7642 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
7643 wsmap="struct"
7644 >
7645 <desc>
7646 </desc>
7647
7648 <attribute name="familyId" type="wstring" readonly="yes">
7649 <desc>Guest OS family identifier string.</desc>
7650 </attribute>
7651
7652 <attribute name="familyDescription" type="wstring" readonly="yes">
7653 <desc>Human readable description of the guest OS family.</desc>
7654 </attribute>
7655
7656 <attribute name="id" type="wstring" readonly="yes">
7657 <desc>Guest OS identifier string.</desc>
7658 </attribute>
7659
7660 <attribute name="description" type="wstring" readonly="yes">
7661 <desc>Human readable description of the guest OS.</desc>
7662 </attribute>
7663
7664 <attribute name="is64Bit" type="boolean" readonly="yes">
7665 <desc>Returns @c true if the given OS is 64-bit</desc>
7666 </attribute>
7667
7668 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7669 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7670 </attribute>
7671
7672 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7673 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7674 </attribute>
7675
7676 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7677 <desc>Recommended RAM size in Megabytes.</desc>
7678 </attribute>
7679
7680 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7681 <desc>Recommended video RAM size in Megabytes.</desc>
7682 </attribute>
7683
7684 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7685 <desc>Recommended hard disk size in Megabytes.</desc>
7686 </attribute>
7687
7688 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7689 <desc>Returns recommended network adapter for this OS type.</desc>
7690 </attribute>
7691 </interface>
7692
7693 <interface
7694 name="IGuest" extends="$unknown"
7695 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7696 wsmap="managed"
7697 >
7698 <desc>
7699 The IGuest interface represents information about the operating system
7700 running inside the virtual machine. Used in
7701 <link to="IConsole::guest"/>.
7702
7703 IGuest provides information about the guest operating system, whether
7704 Guest Additions are installed and other OS-specific virtual machine
7705 properties.
7706 </desc>
7707
7708 <attribute name="OSTypeId" type="wstring" readonly="yes">
7709 <desc>
7710 Identifier of the Guest OS type as reported by the Guest
7711 Additions.
7712 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7713 an IGuestOSType object representing details about the given
7714 Guest OS type.
7715 <note>
7716 If Guest Additions are not installed, this value will be
7717 the same as <link to="IMachine::OSTypeId"/>.
7718 </note>
7719 </desc>
7720 </attribute>
7721
7722 <attribute name="additionsActive" type="boolean" readonly="yes">
7723 <desc>
7724 Flag whether the Guest Additions are installed and active
7725 in which case their version will be returned by the
7726 <link to="#additionsVersion"/> property.
7727 </desc>
7728 </attribute>
7729
7730 <attribute name="additionsVersion" type="wstring" readonly="yes">
7731 <desc>
7732 Version of the Guest Additions (3 decimal numbers separated
7733 by dots) or empty when the Additions are not installed. The
7734 Additions may also report a version but yet not be active as
7735 the version might be refused by VirtualBox (incompatible) or
7736 other failures occurred.
7737 </desc>
7738 </attribute>
7739
7740 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7741 <desc>
7742 Flag whether seamless guest display rendering (seamless desktop
7743 integration) is supported.
7744 </desc>
7745 </attribute>
7746
7747 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7748 <desc>
7749 Flag whether the guest is in graphics mode. If it is not, then
7750 seamless rendering will not work, resize hints are not immediately
7751 acted on and guest display resizes are probably not initiated by
7752 the guest additions.
7753 </desc>
7754 </attribute>
7755
7756 <attribute name="memoryBalloonSize" type="unsigned long">
7757 <desc>Guest system memory balloon size in megabytes.</desc>
7758 </attribute>
7759
7760 <attribute name="statisticsUpdateInterval" type="unsigned long">
7761 <desc>Interval to update guest statistics in seconds.</desc>
7762 </attribute>
7763
7764 <method name="setCredentials">
7765 <desc>
7766 Store login credentials that can be queried by guest operating
7767 systems with Additions installed. The credentials are transient
7768 to the session and the guest may also choose to erase them. Note
7769 that the caller cannot determine whether the guest operating system
7770 has queried or made use of the credentials.
7771
7772 <result name="VBOX_E_VM_ERROR">
7773 VMM device is not available.
7774 </result>
7775
7776 </desc>
7777 <param name="userName" type="wstring" dir="in">
7778 <desc>User name string, can be empty</desc>
7779 </param>
7780 <param name="password" type="wstring" dir="in">
7781 <desc>Password string, can be empty</desc>
7782 </param>
7783 <param name="domain" type="wstring" dir="in">
7784 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7785 </param>
7786 <param name="allowInteractiveLogon" type="boolean" dir="in">
7787 <desc>
7788 Flag whether the guest should alternatively allow the user to
7789 interactively specify different credentials. This flag might
7790 not be supported by all versions of the Additions.
7791 </desc>
7792 </param>
7793 </method>
7794
7795 <method name="getStatistic">
7796 <desc>
7797 Query specified guest statistics as reported by the VirtualBox Additions.
7798 </desc>
7799 <param name="cpuId" type="unsigned long" dir="in">
7800 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7801 </param>
7802 <param name="statistic" type="GuestStatisticType" dir="in">
7803 <desc>Statistic type.</desc>
7804 </param>
7805 <param name="statVal" type="unsigned long" dir="return">
7806 <desc>Statistics value</desc>
7807 </param>
7808 </method>
7809
7810 </interface>
7811
7812
7813 <!--
7814 // IProgress
7815 /////////////////////////////////////////////////////////////////////////
7816 -->
7817
7818 <interface
7819 name="IProgress" extends="$unknown"
7820 uuid="62827ef1-c098-40eb-be96-36d0508489a6"
7821 wsmap="managed"
7822 >
7823 <desc>
7824 The IProgress interface is used to track and control
7825 asynchronous tasks within VirtualBox.
7826
7827 An instance of this is returned every time VirtualBox starts
7828 an asynchronous task (in other words, a separate thread) which
7829 continues to run after a method call returns. For example,
7830 <link to="IConsole::saveState" />, which saves the state of
7831 a running virtual machine, can take a long time to complete.
7832 To be able to display a progress bar, a user interface such as
7833 the VirtualBox graphical user interface can use the IProgress
7834 object returned by that method.
7835
7836 Note that IProgress is a "read-only" interface in the sense
7837 that only the VirtualBox internals behind the Main API can
7838 create and manipulate progress objects, whereas client code
7839 can only use the IProgress object to monitor a task's
7840 progress and, if <link to="#cancelable" /> is @c true,
7841 cancel the task by calling <link to="#cancel" />.
7842
7843 A task represented by IProgress consists of either one or
7844 several sub-operations that run sequentially, one by one (see
7845 <link to="#operation" /> and <link to="#operationCount" />).
7846 Every operation is identified by a number (starting from 0)
7847 and has a separate description.
7848
7849 You can find the individual percentage of completion of the current
7850 operation in <link to="#operationPercent" /> and the
7851 percentage of completion of the task as a whole
7852 in <link to="#percent" />.
7853
7854 Similarly, you can wait for the completion of a particular
7855 operation via <link to="#waitForOperationCompletion" /> or
7856 for the completion of the whole task via
7857 <link to="#waitForCompletion" />.
7858 </desc>
7859
7860 <attribute name="id" type="uuid" mod="string" readonly="yes">
7861 <desc>ID of the task.</desc>
7862 </attribute>
7863
7864 <attribute name="description" type="wstring" readonly="yes">
7865 <desc>Description of the task.</desc>
7866 </attribute>
7867
7868 <attribute name="initiator" type="$unknown" readonly="yes">
7869 <desc>Initiator of the task.</desc>
7870 </attribute>
7871
7872 <attribute name="cancelable" type="boolean" readonly="yes">
7873 <desc>Whether the task can be interrupted.</desc>
7874 </attribute>
7875
7876 <attribute name="percent" type="unsigned long" readonly="yes">
7877 <desc>
7878 Current progress value of the task as a whole, in percent.
7879 This value depends on how many operations are already complete.
7880 Returns 100 if <link to="#completed" /> is @c true.
7881 </desc>
7882 </attribute>
7883
7884 <attribute name="timeRemaining" type="long" readonly="yes">
7885 <desc>
7886 Estimated remaining time until the task completes, in
7887 seconds. Returns 0 once the task has completed; returns -1
7888 if the remaining time cannot be computed, in particular if
7889 the current progress is 0.
7890
7891 Even if a value is returned, the estimate will be unreliable
7892 for low progress values. It will become more reliable as the
7893 task progresses; it is not recommended to display an ETA
7894 before at least 20% of a task have completed.
7895 </desc>
7896 </attribute>
7897
7898 <attribute name="completed" type="boolean" readonly="yes">
7899 <desc>Whether the task has been completed.</desc>
7900 </attribute>
7901
7902 <attribute name="canceled" type="boolean" readonly="yes">
7903 <desc>Whether the task has been canceled.</desc>
7904 </attribute>
7905
7906 <attribute name="resultCode" type="long" readonly="yes">
7907 <desc>
7908 Result code of the progress task.
7909 Valid only if <link to="#completed"/> is @c true.
7910 </desc>
7911 </attribute>
7912
7913 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7914 <desc>
7915 Extended information about the unsuccessful result of the
7916 progress operation. May be @c null if no extended information
7917 is available.
7918 Valid only if <link to="#completed"/> is @c true and
7919 <link to="#resultCode"/> indicates a failure.
7920 </desc>
7921 </attribute>
7922
7923 <attribute name="operationCount" type="unsigned long" readonly="yes">
7924 <desc>
7925 Number of sub-operations this task is divided into.
7926 Every task consists of at least one suboperation.
7927 </desc>
7928 </attribute>
7929
7930 <attribute name="operation" type="unsigned long" readonly="yes">
7931 <desc>Number of the sub-operation being currently executed.</desc>
7932 </attribute>
7933
7934 <attribute name="operationDescription" type="wstring" readonly="yes">
7935 <desc>
7936 Description of the sub-operation being currently executed.
7937 </desc>
7938 </attribute>
7939
7940 <attribute name="operationPercent" type="unsigned long" readonly="yes">
7941 <desc>Progress value of the current sub-operation only, in percent.</desc>
7942 </attribute>
7943
7944 <method name="setCurrentOperationProgress">
7945 <desc>Internal method, not to be called externally.</desc>
7946 <param name="percent" type="unsigned long" dir="in" />
7947 </method>
7948 <method name="setNextOperation">
7949 <desc>Internal method, not to be called externally.</desc>
7950 <param name="nextOperationDescription" type="wstring" dir="in" />
7951 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
7952 </method>
7953
7954 <method name="waitForCompletion">
7955 <desc>
7956 Waits until the task is done (including all sub-operations)
7957 with a given timeout in milliseconds; specify -1 for an indefinite wait.
7958
7959 <result name="VBOX_E_IPRT_ERROR">
7960 Failed to wait for task completion.
7961 </result>
7962 </desc>
7963
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="waitForOperationCompletion">
7972 <desc>
7973 Waits until the given operation is done with a given timeout in
7974 milliseconds; specify -1 for an indefinite wait.
7975
7976 <result name="VBOX_E_IPRT_ERROR">
7977 Failed to wait for operation completion.
7978 </result>
7979
7980 </desc>
7981 <param name="operation" type="unsigned long" dir="in">
7982 <desc>
7983 Number of the operation to wait for.
7984 Must be less than <link to="#operationCount"/>.
7985 </desc>
7986 </param>
7987 <param name="timeout" type="long" dir="in">
7988 <desc>
7989 Maximum time in milliseconds to wait or -1 to wait indefinitely.
7990 </desc>
7991 </param>
7992 </method>
7993
7994 <method name="cancel">
7995 <desc>
7996 Cancels the task.
7997 <note>
7998 If <link to="#cancelable"/> is @c false, then this method will fail.
7999 </note>
8000
8001 <result name="VBOX_E_INVALID_OBJECT_STATE">
8002 Operation cannot be canceled.
8003 </result>
8004
8005 </desc>
8006 </method>
8007
8008 </interface>
8009
8010
8011 <!--
8012 // ISnapshot
8013 /////////////////////////////////////////////////////////////////////////
8014 -->
8015
8016 <interface
8017 name="ISnapshot" extends="$unknown"
8018 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8019 wsmap="managed"
8020 >
8021 <desc>
8022 The ISnapshot interface represents a snapshot of the virtual
8023 machine.
8024
8025 Together with the differencing media that are created
8026 when a snapshot is taken, a machine can be brought back to
8027 the exact state it was in when the snapshot was taken.
8028
8029 The ISnapshot interface has no methods, only attributes; snapshots
8030 are controlled through methods of the <link to="IConsole" /> interface
8031 which also manage the media associated with the snapshot.
8032 The following operations exist:
8033
8034 <ul>
8035 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8036 by creating new, empty differencing images for the machine's
8037 media and saving the VM settings and (if the VM is running)
8038 the current VM state in the snapshot.
8039
8040 The differencing images will then receive all data written to
8041 the machine's media, while their parent (base) images
8042 remain unmodified after the snapshot has been taken (see
8043 <link to="IMedium" /> for details about differencing images).
8044 This simplifies restoring a machine to the state of a snapshot:
8045 only the differencing images need to be deleted.
8046
8047 The current machine state is not changed by taking a snapshot.
8048 If the machine is running, it will resume execution after the
8049 snapshot has been taken.
8050 </li>
8051
8052 <li><link to="IConsole::discardCurrentState"/>: this goes back to
8053 a previous snapshot. This resets the machine's state to that of
8054 the previous snapshot by deleting the differencing image of each
8055 of the machine's media and setting the machine's settings
8056 and state to the state that was saved in the snapshot (if any).
8057
8058 This destroys the machine's current state.
8059 </li>
8060
8061 <li><link to="IConsole::discardSnapshot"/>: deletes a snapshot
8062 without affecting the current machine state.
8063
8064 This does not change the machine, but instead frees the resources
8065 allocated when the snapshot was taken: the settings and machine state
8066 is deleted (if any), and the snapshot's differencing image for each
8067 of the machine's media gets merged with its parent image.
8068
8069 Neither the current machine state nor other snapshots are affected
8070 by this operation, except that parent disk images will be modified
8071 to contain the disk data associated with the snapshot being deleted.
8072 </li>
8073
8074 <li><link to="IConsole::discardCurrentSnapshotAndState"/>:
8075 this completely reverts the virtual machine to the state it was in
8076 before the current snapshot has been taken. Effectively, this goes
8077 back to the state before the current snapshot, which might be
8078 an earlier snapshot.
8079
8080 The current state, as well as the current snapshot, are lost.
8081 </li>
8082 </ul>
8083
8084 Each snapshot contains the settings of the virtual machine (hardware
8085 configuration etc.). In addition, if the machine was running when the
8086 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8087 the current VM state is saved in the snapshot (similarly to what happens
8088 when a VM's state is saved). The snapshot is then said to
8089 be <i>online</i> because when restoring it, the VM will be running.
8090
8091 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8092 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8093
8094 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8095 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8096 it then contains a so-called "zero execution state", representing a
8097 machine that is powered off.
8098
8099 <h3>Snapshot branches and the "current" snapshot</h3>
8100
8101 Snapshots can be chained, whereby every next snapshot is based on the
8102 previous one. This chaining is related to medium branching
8103 (see the <link to="IMedium"/> description) in that every time
8104 a new snapshot is created, a new differencing medium is implicitly
8105 created for all normal media attached to the machine.
8106
8107 Each virtual machine has a "current snapshot", identified by
8108 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8109 to the last snapshot in the chain. In a future version of VirtualBox,
8110 it will be possible to reset a machine's current state to that of an
8111 earlier snapshot without discarding the current state so that it will be
8112 possible to create alternative snapshot paths in a snapshot tree.
8113
8114 In the current implementation, multiple snapshot branches within one
8115 virtual machine are not allowed. Every machine has a single branch,
8116 and <link to="IConsole::takeSnapshot"/> operation adds a new
8117 snapshot to the top of that branch.
8118 </desc>
8119
8120 <attribute name="id" type="uuid" mod="string" readonly="yes">
8121 <desc>UUID of the snapshot.</desc>
8122 </attribute>
8123
8124 <attribute name="name" type="wstring">
8125 <desc>Short name of the snapshot.</desc>
8126 </attribute>
8127
8128 <attribute name="description" type="wstring">
8129 <desc>Optional description of the snapshot.</desc>
8130 </attribute>
8131
8132 <attribute name="timeStamp" type="long long" readonly="yes">
8133 <desc>
8134 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8135 </desc>
8136 </attribute>
8137
8138 <attribute name="online" type="boolean" readonly="yes">
8139 <desc>
8140 @c true if this snapshot is an online snapshot and @c false otherwise.
8141
8142 When this attribute is @c true, the
8143 <link to="IMachine::stateFilePath"/> attribute of the
8144 <link to="#machine"/> object associated with this snapshot
8145 will point to the saved state file. Otherwise, it will be
8146 an empty string.
8147 </desc>
8148 </attribute>
8149
8150 <attribute name="machine" type="IMachine" readonly="yes">
8151 <desc>
8152 Virtual machine this snapshot is taken on. This object
8153 stores all settings the machine had when taking this snapshot.
8154 <note>
8155 The returned machine object is immutable, i.e. no
8156 any settings can be changed.
8157 </note>
8158 </desc>
8159 </attribute>
8160
8161 <attribute name="parent" type="ISnapshot" readonly="yes">
8162 <desc>
8163 Parent snapshot (a snapshot this one is based on), or
8164 @c null if the snapshot has no parent.
8165 </desc>
8166 </attribute>
8167
8168 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8169 <desc>
8170 Child snapshots (all snapshots having this one as a parent).
8171 <note>
8172 In the current implementation, there can be only one
8173 child snapshot, or no children at all, meaning this is the
8174 last (head) snapshot.
8175 </note>
8176 </desc>
8177 </attribute>
8178
8179 </interface>
8180
8181
8182 <!--
8183 // IMedium
8184 /////////////////////////////////////////////////////////////////////////
8185 -->
8186
8187 <enum
8188 name="MediumState"
8189 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8190 >
8191 <desc>
8192 Virtual medium state.
8193 <see>IMedium</see>
8194 </desc>
8195
8196 <const name="NotCreated" value="0">
8197 <desc>
8198 Associated medium storage does not exist (either was not created yet or
8199 was deleted).
8200 </desc>
8201 </const>
8202 <const name="Created" value="1">
8203 <desc>
8204 Associated storage exists and accessible.
8205 </desc>
8206 </const>
8207 <const name="LockedRead" value="2">
8208 <desc>
8209 Medium is locked for reading, no data modification is possible.
8210 </desc>
8211 </const>
8212 <const name="LockedWrite" value="3">
8213 <desc>
8214 Medium is locked for writing, no concurrent data reading or modification
8215 is possible.
8216 </desc>
8217 </const>
8218 <const name="Inaccessible" value="4">
8219 <desc>
8220 Associated medium storage is not accessible.
8221 </desc>
8222 </const>
8223 <const name="Creating" value="5">
8224 <desc>
8225 Associated medium storage is being created.
8226 </desc>
8227 </const>
8228 <const name="Deleting" value="6">
8229 <desc>
8230 Associated medium storage is being deleted.
8231 </desc>
8232 </const>
8233 </enum>
8234
8235 <enum
8236 name="MediumType"
8237 uuid="11f6f7a5-0327-409a-9d42-7db6a0cec578"
8238 >
8239 <desc>
8240 Virtual medium type.
8241 <see>IMedium</see>
8242 </desc>
8243
8244 <const name="Normal" value="0">
8245 <desc>
8246 Normal medium (attached directly or indirectly, preserved
8247 when taking snapshots).
8248 </desc>
8249 </const>
8250 <const name="Immutable" value="1">
8251 <desc>
8252 Immutable medium (attached indirectly, changes are wiped out
8253 after powering off the virtual machine).
8254 </desc>
8255 </const>
8256 <const name="Writethrough" value="2">
8257 <desc>
8258 Write through medium (attached directly, ignored when
8259 taking snapshots).
8260 </desc>
8261 </const>
8262 </enum>
8263
8264 <enum
8265 name="MediumVariant"
8266 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8267 >
8268 <desc>
8269 Virtual medium image variant. More than one flag may be set.
8270 <see>IMedium</see>
8271 </desc>
8272
8273 <const name="Standard" value="0">
8274 <desc>
8275 No particular variant requested, results in using the backend default.
8276 </desc>
8277 </const>
8278 <const name="VmdkSplit2G" value="0x01">
8279 <desc>
8280 VMDK image split in chunks of less than 2GByte.
8281 </desc>
8282 </const>
8283 <const name="VmdkStreamOptimized" value="0x04">
8284 <desc>
8285 VMDK streamOptimized image. Special import/export format which is
8286 read-only/append-only.
8287 </desc>
8288 </const>
8289 <const name="VmdkESX" value="0x08">
8290 <desc>
8291 VMDK format variant used on ESX products.
8292 </desc>
8293 </const>
8294 <const name="Fixed" value="0x10000">
8295 <desc>
8296 Fixed image. Only allowed for base images.
8297 </desc>
8298 </const>
8299 <const name="Diff" value="0x20000">
8300 <desc>
8301 Fixed image. Only allowed for base images.
8302 </desc>
8303 </const>
8304 </enum>
8305
8306 <interface
8307 name="IMediumAttachment" extends="$unknown"
8308 uuid="0dcf987b-a024-453f-bace-7eb9f885a413"
8309 wsmap="struct"
8310 >
8311 <desc>
8312 The IMediumAttachment interface represents the attachment
8313 of a storage medium to a virtual machine. Each machine contains
8314 an array of its medium attachments in <link to="IMachine::mediumAttachments"/>.
8315
8316 Each medium attachment specifies a storage controller as well as a port
8317 and device number. Fixed media (hard disks) will always also specify
8318 an instance of IMedium in <link to="#medium" />, referring to the hard disk
8319 image or images that represent the virtual hard disk. For removeable media,
8320 the IMedia instance is optional; it can be NULL if no media is mounted (see
8321 <link to="IMachine::mountMedium" />).
8322 </desc>
8323
8324 <attribute name="medium" type="IMedium" readonly="yes">
8325 <desc>Medium object associated with this attachment; it
8326 can be NULL for removable devices.</desc>
8327 </attribute>
8328
8329 <attribute name="controller" type="wstring" readonly="yes">
8330 <desc>Name of the storage controller of this attachment; this
8331 refers to one of the controllers in <link to="IMachine::storageControllers" />
8332 by name.</desc>
8333 </attribute>
8334
8335 <attribute name="port" type="long" readonly="yes">
8336 <desc>Port number of this attachment.</desc>
8337 </attribute>
8338
8339 <attribute name="device" type="long" readonly="yes">
8340 <desc>Device slot number of this attachment.</desc>
8341 </attribute>
8342
8343 <attribute name="type" type="DeviceType" readonly="yes">
8344 <desc>Device type of this attachment.</desc>
8345 </attribute>
8346
8347 <attribute name="passthrough" type="boolean" readonly="no">
8348 <desc>Pass I/O requests through to a device on the host.</desc>
8349 </attribute>
8350
8351 </interface>
8352
8353 <interface
8354 name="IMedium" extends="$unknown"
8355 uuid="62551115-83b8-4d20-925f-79e9d3c00f96"
8356 wsmap="managed"
8357 >
8358 <desc>
8359 The IMedium interface represents virtual storage for a machine's
8360 hard disks, CD/DVD or floppy drives. It will typically represent
8361 a disk image on the host, for example a VDI or VMDK file representing
8362 a virtual hard disk, or an ISO or RAW file representing virtual
8363 removable media, but can also point to a network location (e.g.
8364 for iSCSI targets).
8365
8366 Instances of IMedium are connected to virtual machines by way of
8367 medium attachments (see <link to="IMediumAttachment" />), which link
8368 the storage medium to a particular device slot of a storage controller
8369 of the virtual machine.
8370 In the VirtualBox API, virtual storage is therefore always represented
8371 by the following chain of object links:
8372
8373 <ul>
8374 <li><link to="IMachine::storageControllers"/> contains an array of
8375 storage controllers (IDE, SATA, SCSI or a floppy controller;
8376 these are instances of <link to="IStorageController"/>).</li>
8377 <li><link to="IMachine::mediumAttachments"/> contains an array of
8378 medium attachments (instances of <link to="IMediumAttachment"/>),
8379 each containing the name of a storage controller from the above
8380 array, a port/device specification, and an instance of
8381 IMedium representing the medium storage (image file). For removable
8382 media, the storage medium is optional; a medium attachment with no
8383 medium represents a CD/DVD or floppy drive with no medium inserted.
8384 By contrast, hard disk attachments will always have an IMedium
8385 object attached.</li>
8386 <li>Each IMedium in turn points to a storage unit (such as a file on the host
8387 computer or a network resource) that holds actual data. The location of
8388 the storage unit is represented by the <link to="#location"/> attribute.
8389 The value of this attribute is medium type dependent.</li>
8390 </ul>
8391
8392 Existing media are opened using the following methods, depending on the
8393 media type:
8394 <ul>
8395 <li><link to="IVirtualBox::openHardDisk"/></li>
8396 <li><link to="IVirtualBox::openDVDImage"/></li>
8397 <li><link to="IVirtualBox::openFloppyImage"/></li>
8398 </ul>
8399
8400 New hard disk media can be created with the VirtualBox API using the
8401 <link to="IVirtualBox::createHardDisk"/> method.
8402
8403 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8404 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8405 type in a regular file.
8406
8407 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8408 drive; in that case the <link to="#id" /> attribute contains the UUID of
8409 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8410
8411 <h3>Known media</h3>
8412
8413 When an existing medium is opened for the first time, it is automatically
8414 remembered by the given VirtualBox installation or, in other words, becomes
8415 a <i>known medium</i>. Known media are stored in the media
8416 registry transparently maintained by VirtualBox and stored in settings
8417 files so that this registry is preserved when VirtualBox is not running.
8418
8419 Newly created virtual media are remembered only when the associated
8420 storage unit is actually created.
8421
8422 All known media can be enumerated using
8423 <link to="IVirtualBox::hardDisks"/>,
8424 <link to="IVirtualBox::DVDImages"/> and
8425 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8426 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8427 and similar methods or by location using
8428 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8429
8430 Only known media can be attached to virtual machines.
8431
8432 Removing known media from the media registry is performed when the given
8433 medium is closed using the <link to="#close"/> method or when its
8434 associated storage unit is deleted.
8435
8436 <h3>Accessibility checks</h3>
8437
8438 The given medium (with the created storage unit) is considered to be
8439 <i>accessible</i> when its storage unit can be read. In that case, the
8440 <link to="#state"/> attribute has a value of "Created".
8441 When the storage unit cannot be read (for example, because it is located on
8442 a disconnected network resource, or was accidentally deleted outside VirtualBox),
8443 the medium is considered to be <i>inaccessible</i>, which is indicated by the
8444 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8445 obtained by reading the <link to="#lastAccessError"/> attribute.
8446
8447 A new accessibility check is performed each time the <link to="#state"/>
8448 attribute is read. This check may take long time (several seconds or even
8449 minutes, depending on the storage unit location and format), and will
8450 block the calling thread until finished. For this reason, it is recommended
8451 to never read this attribute on the main UI thread to avoid making the UI
8452 unresponsive.
8453
8454 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
8455 created for the first time), all known media are in the
8456 <link to="MediumState_Inaccessible"/> state but the value of the <link
8457 to="#lastAccessError"/> attribute is an empty string because no actual
8458 accessibility check is made on startup. This is done to make the
8459 VirtualBox object ready for serving requests as
8460 fast as possible and let the end-user application decide if it needs to
8461 check media accessibility right away or not.
8462
8463 <h3>Hard disk types</h3>
8464
8465 There are three types of hard disk images (see <link to="MediumType" />):
8466 "normal", "immutable" and "writethrough", represented by the
8467 <link to="#type"/> attribute. The type of the hard disk defines how the
8468 hard disk is attached to a virtual machine and what happens when a
8469 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8470 attached hard disk is taken.
8471
8472 All hard disks can be also divided in two groups: <i>base</i> hard
8473 disks and <i>differencing</i> hard disks. A base hard disk contains all
8474 sectors of the hard disk data in its own storage and therefore can be
8475 used independently. On the contrary, a differencing hard disk is a
8476 "delta" to some other disk and contains only those sectors which differ
8477 from that other disk, which is then called a <i>parent</i>. The differencing
8478 hard disk is said to be <i>linked to</i> that parent.
8479 The parent may be itself a differencing image, thus forming a chain of
8480 linked hard disks. The last element in that chain
8481 must always be a base medium. Note that several differencing
8482 hard disks may be linked to the same parent hard disk.
8483
8484 Differencing hard disks can be distinguished from base hard disks by
8485 querying the <link to="#parent"/> attribute: base hard disks do not have
8486 parents they would depend on, so the value of this attribute is always
8487 @c null for them. Using this attribute, it is possible to walk up
8488 the hard disk tree (from the child hard disk to its parent). It is also
8489 possible to walk down the tree using the <link to="#children"/>
8490 attribute.
8491
8492 Note that the type of all differencing hard disks is
8493 <link to="MediumType_Normal" />; all other values are
8494 meaningless for them. Base hard disks may be of any type.
8495
8496 <h3>Creating hard disks</h3>
8497
8498 New base hard disks are created using
8499 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8500 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8501 disks are usually implicitly created by VirtualBox when needed but may
8502 also be created explicitly using <link to="#createDiffStorage"/>.
8503
8504 After the hard disk is successfully created (including the storage unit)
8505 or opened, it becomes a known hard disk (remembered in the internal media
8506 registry). Known hard disks can be attached to a virtual machine, accessed
8507 through <link to="IVirtualBox::getHardDisk"/> and
8508 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8509 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8510
8511 The following methods, besides <link to="IMedium::close"/>,
8512 automatically remove the hard disk from the media registry:
8513 <ul>
8514 <li><link to="#deleteStorage"/></li>
8515 <li><link to="#mergeTo"/></li>
8516 </ul>
8517
8518 If the storage unit of the hard disk is a regular file in the host's
8519 file system then the rules stated in the description of the
8520 <link to="IMedium::location"/> attribute apply when setting its value. In
8521 addition, a plain file name without any path may be given, in which case
8522 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8523 folder</link> will be prepended to it.
8524
8525 <h4>Automatic composition of the file name part</h4>
8526
8527 Another extension to the <link to="IMedium::location"/> attribute is that
8528 there is a possibility to cause VirtualBox to compose a unique value for
8529 the file name part of the location using the UUID of the hard disk. This
8530 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
8531 e.g. before the storage unit is created, and works as follows. You set the
8532 value of the <link to="IMedium::location"/> attribute to a location
8533 specification which only contains the path specification but not the file
8534 name part and ends with either a forward slash or a backslash character.
8535 In response, VirtualBox will generate a new UUID for the hard disk and
8536 compose the file name using the following pattern:
8537 <pre>
8538 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8539 </pre>
8540 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8541 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8542 is the default extension for the storage format of this hard disk. After
8543 that, you may call any of the methods that create a new hard disk storage
8544 unit and they will use the generated UUID and file name.
8545
8546 <h3>Attaching Hard Disks</h3>
8547
8548 Hard disks are attached to virtual machines using the
8549 <link to="IMachine::attachDevice"/> method and detached using the
8550 <link to="IMachine::detachDevice"/> method. Depending on their
8551 <link to="#type"/>, hard disks are attached either
8552 <i>directly</i> or <i>indirectly</i>.
8553
8554 When a hard disk is being attached directly, it is associated with the
8555 virtual machine and used for hard disk operations when the machine is
8556 running. When a hard disk is being attached indirectly, a new differencing
8557 hard disk linked to it is implicitly created and this differencing hard
8558 disk is associated with the machine and used for hard disk operations.
8559 This also means that if <link to="IMachine::attachDevice"/> performs
8560 a direct attachment then the same hard disk will be returned in response
8561 to the subsequent <link to="IMachine::getMedium"/> call; however if
8562 an indirect attachment is performed then
8563 <link to="IMachine::getMedium"/> will return the implicitly created
8564 differencing hard disk, not the original one passed to <link
8565 to="IMachine::attachDevice"/>. In detail:
8566
8567 <ul>
8568 <li><b>Normal base</b> hard disks that do not have children (i.e.
8569 differencing hard disks linked to them) and that are not already
8570 attached to virtual machines in snapshots are attached <b>directly</b>.
8571 Otherwise, they are attached <b>indirectly</b> because having
8572 dependent children or being part of the snapshot makes it impossible
8573 to modify hard disk contents without breaking the integrity of the
8574 dependent party. The <link to="#readOnly"/> attribute allows to
8575 quickly determine the kind of the attachment for the given hard
8576 disk. Note that if a normal base hard disk is to be indirectly
8577 attached to a virtual machine with snapshots then a special
8578 procedure called <i>smart attachment</i> is performed (see below).</li>
8579 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
8580 they are attached <b>directly</b> if they do not have children and are
8581 not attached to virtual machines in snapshots, and <b>indirectly</b>
8582 otherwise. Note that the smart attachment procedure is never performed
8583 for differencing hard disks.</li>
8584 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
8585 they are designed to be non-writable. If an immutable hard disk is
8586 attached to a virtual machine with snapshots then a special
8587 procedure called smart attachment is performed (see below).</li>
8588 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
8589 also as designed. This also means that writethrough hard disks cannot
8590 have other hard disks linked to them at all.</li>
8591 </ul>
8592
8593 Note that the same hard disk, regardless of its type, may be attached to
8594 more than one virtual machine at a time. In this case, the machine that is
8595 started first gains exclusive access to the hard disk and attempts to
8596 start other machines having this hard disk attached will fail until the
8597 first machine is powered down.
8598
8599 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8600 that the given hard disk remains associated with the given machine after a
8601 successful <link to="IMachine::detachDevice"/> call until
8602 <link to="IMachine::saveSettings"/> is called to save all changes to
8603 machine settings to disk. This deferring is necessary to guarantee that
8604 the hard disk configuration may be restored at any time by a call to
8605 <link to="IMachine::discardSettings"/> before the settings
8606 are saved (committed).
8607
8608 Note that if <link to="IMachine::discardSettings"/> is called after
8609 indirectly attaching some hard disks to the machine but before a call to
8610 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8611 all differencing hard disks implicitly created by
8612 <link to="IMachine::attachDevice"/> for these indirect attachments.
8613 Such implicitly created hard disks will also be immediately deleted when
8614 detached explicitly using the <link to="IMachine::detachDevice"/>
8615 call if it is made before <link to="IMachine::saveSettings"/>. This
8616 implicit deletion is safe because newly created differencing hard
8617 disks do not contain any user data.
8618
8619 However, keep in mind that detaching differencing hard disks that were
8620 implicitly created by <link to="IMachine::attachDevice"/>
8621 before the last <link to="IMachine::saveSettings"/> call will
8622 <b>not</b> implicitly delete them as they may already contain some data
8623 (for example, as a result of virtual machine execution). If these hard
8624 disks are no more necessary, the caller can always delete them explicitly
8625 using <link to="#deleteStorage"/> after they are actually de-associated
8626 from this machine by the <link to="IMachine::saveSettings"/> call.
8627
8628 <h3>Smart Attachment</h3>
8629
8630 When normal base or immutable hard disks are indirectly attached to a
8631 virtual machine then some additional steps are performed to make sure the
8632 virtual machine will have the most recent "view" of the hard disk being
8633 attached. These steps include walking through the machine's snapshots
8634 starting from the current one and going through ancestors up to the first
8635 snapshot. Hard disks attached to the virtual machine in all
8636 of the encountered snapshots are checked whether they are descendants of
8637 the given normal base or immutable hard disk. The first found child (which
8638 is the differencing hard disk) will be used instead of the normal base or
8639 immutable hard disk as a parent for creating a new differencing hard disk
8640 that will be actually attached to the machine. And only if no descendants
8641 are found or if the virtual machine does not have any snapshots then the
8642 normal base or immutable hard disk will be used itself as a parent for
8643 this differencing hard disk.
8644
8645 It is easier to explain what smart attachment does using the
8646 following example:
8647 <pre>
8648BEFORE attaching B.vdi: AFTER attaching B.vdi:
8649
8650Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8651 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8652 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8653 Snapshot 4 (none) Snapshot 4 (none)
8654 CurState (none) CurState (D3->D2.vdi)
8655
8656 NOT
8657 ...
8658 CurState (D3->B.vdi)
8659 </pre>
8660 The first column is the virtual machine configuration before the base hard
8661 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8662 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8663 mean that the hard disk that is actually attached to the machine is a
8664 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8665 another hard disk, <tt>B.vdi</tt>.
8666
8667 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8668 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8669 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8670 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8671 it cannot be attached directly and needs an indirect attachment (i.e.
8672 implicit creation of a new differencing hard disk). Due to the smart
8673 attachment procedure, the new differencing hard disk
8674 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8675 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8676 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8677 machine.
8678
8679 Note that if there is more than one descendant hard disk of the given base
8680 hard disk found in a snapshot, and there is an exact device, channel and
8681 bus match, then this exact match will be used. Otherwise, the youngest
8682 descendant will be picked up.
8683
8684 There is one more important aspect of the smart attachment procedure which
8685 is not related to snapshots at all. Before walking through the snapshots
8686 as described above, the backup copy of the current list of hard disk
8687 attachment is searched for descendants. This backup copy is created when
8688 the hard disk configuration is changed for the first time after the last
8689 <link to="IMachine::saveSettings"/> call and used by
8690 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8691 changes. When such a descendant is found in this backup copy, it will be
8692 simply re-attached back, without creating a new differencing hard disk for
8693 it. This optimization is necessary to make it possible to re-attach the
8694 base or immutable hard disk to a different bus, channel or device slot
8695 without losing the contents of the differencing hard disk actually
8696 attached to the machine in place of it.
8697 </desc>
8698
8699 <attribute name="id" type="uuid" mod="string" readonly="yes">
8700 <desc>
8701 UUID of the medium. For a newly created medium, this value is a randomly
8702 generated UUID.
8703
8704 <note>
8705 For media in one of MediumState_NotCreated, MediumState_Creating or
8706 MediumState_Deleting states, the value of this property is undefined
8707 and will most likely be an empty UUID.
8708 </note>
8709 </desc>
8710 </attribute>
8711
8712 <attribute name="description" type="wstring">
8713 <desc>
8714 Optional description of the medium. For a newly created medium the value
8715 of this attribute is an empty string.
8716
8717 Medium types that don't support this attribute will return E_NOTIMPL in
8718 attempt to get or set this attribute's value.
8719
8720 <note>
8721 For some storage types, reading this attribute may return an outdated
8722 (last known) value when <link to="#state"/> is <link
8723 to="MediumState_Inaccessible"/> or <link
8724 to="MediumState_LockedWrite"/> because the value of this attribute is
8725 stored within the storage unit itself. Also note that changing the
8726 attribute value is not possible in such case, as well as when the
8727 medium is the <link to="MediumState_LockedRead"/> state.
8728 </note>
8729 </desc>
8730 </attribute>
8731
8732 <attribute name="state" type="MediumState" readonly="yes">
8733 <desc>
8734 Current medium state. Inspect <link to="MediumState"/> values for details.
8735
8736 Reading this attribute may take a long time because an accessibility
8737 check of the storage unit is performed each time the attribute is read.
8738 This check may cause a significant delay if the storage unit of the
8739 given medium is, for example, a file located on a network share which is
8740 not currently accessible due to connectivity problems -- the call will
8741 not return until a timeout interval defined by the host OS for this
8742 operation expires.
8743
8744 If the last known state of the medium is <link to="MediumState_Created"/>
8745 and the accessibility check fails then the state would be set to
8746 <link to="MediumState_Inaccessible"/> and <link to="#lastAccessError"/>
8747 may be used to get more details about the failure. If the state of the
8748 medium is <link to="MediumState_LockedRead"/> or
8749 <link to="MediumState_LockedWrite"/> then it remains the same, and a
8750 non-empty value of <link to="#lastAccessError"/> will indicate a failed
8751 accessibility check in this case.
8752
8753 Note that not all medium states are applicable to all medium types.
8754 </desc>
8755 </attribute>
8756
8757 <attribute name="location" type="wstring">
8758 <desc>
8759 Location of the storage unit holding medium data.
8760
8761 The format of the location string is medium type specific. For medium
8762 types using regular files in a host's file system, the location
8763 string is the full file name.
8764
8765 Some medium types may support changing the storage unit location by
8766 simply changing the value of this property. If this operation is not
8767 supported, the implementation will return E_NOTIMPL in attempt to set
8768 this attribute's value.
8769
8770 When setting a value of the location attribute which is a regular file
8771 in the host's file system, the given file name may be either relative to
8772 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8773 absolute. Note that if the given location specification does not contain
8774 the file extension part then a proper default extension will be
8775 automatically appended by the implementation depending on the medium type.
8776 </desc>
8777 </attribute>
8778
8779 <attribute name="name" type="wstring" readonly="yes">
8780 <desc>
8781 Name of the storage unit holding medium data.
8782
8783 The returned string is a short version of the <link to="#location"/>
8784 attribute that is suitable for representing the medium in situations
8785 where the full location specification is too long (such as lists
8786 and comboboxes in GUI frontends). This string is also used by frontends
8787 to sort the media list alphabetically when needed.
8788
8789 For example, for locations that are regular files in the host's file
8790 system, the value of this attribute is just the file name (+ extension),
8791 without the path specification.
8792
8793 Note that as opposed to the <link to="#location"/> attribute, the name
8794 attribute will not necessary be unique for a list of media of the
8795 given type and format.
8796 </desc>
8797 </attribute>
8798
8799 <attribute name="hostDrive" type="boolean" readonly="yes">
8800 <desc>True if this corresponds to a drive on the host.</desc>
8801 </attribute>
8802
8803 <attribute name="size" type="unsigned long long" readonly="yes">
8804 <desc>
8805 Physical size of the storage unit used to hold medium data (in bytes).
8806
8807 <note>
8808 For media whose <link to="#state"/> is <link
8809 to="MediumState_Inaccessible"/>, the value of this property is the
8810 last known size. For <link to="MediumState_NotCreated"/> media,
8811 the returned value is zero.
8812 </note>
8813 </desc>
8814 </attribute>
8815
8816 <attribute name="format" type="wstring" readonly="yes">
8817 <desc>
8818 Storage format of this medium.
8819
8820 The value of this attribute is a string that specifies a backend used to
8821 store hard disk data. The storage format is defined when you create a
8822 new hard disk or automatically detected when you open an existing hard
8823 disk medium, and cannot be changed later.
8824
8825 The list of all storage formats supported by this VirtualBox
8826 installation can be obtained using
8827 <link to="ISystemProperties::mediumFormats"/>.
8828 </desc>
8829 </attribute>
8830
8831 <attribute name="type" type="MediumType">
8832 <desc>
8833 Type (role) of this hard disk.
8834
8835 The following constraints apply when changing the value of this
8836 attribute:
8837 <ul>
8838 <li>If a hard disk is attached to a virtual machine (either in the
8839 current state or in one of the snapshots), its type cannot be
8840 changed.
8841 </li>
8842 <li>As long as the hard disk has children, its type cannot be set
8843 to <link to="MediumType_Writethrough"/>.
8844 </li>
8845 <li>The type of all differencing hard disks is
8846 <link to="MediumType_Normal"/> and cannot be changed.
8847 </li>
8848 </ul>
8849
8850 The type of a newly created or opened hard disk is set to
8851 <link to="MediumType_Normal"/>.
8852 </desc>
8853 </attribute>
8854
8855 <attribute name="parent" type="IMedium" readonly="yes">
8856 <desc>
8857 Parent of this hard disk (a hard disk this hard disk is directly based
8858 on).
8859
8860 Only differencing hard disks have parents. For base (non-differencing)
8861 hard disks, @c null is returned.
8862 </desc>
8863 </attribute>
8864
8865 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
8866 <desc>
8867 Children of this hard disk (all differencing hard disks directly based
8868 on this hard disk). A @c null array is returned if this hard disk
8869 does not have any children.
8870 </desc>
8871 </attribute>
8872
8873 <attribute name="base" type="IMedium" readonly="yes">
8874 <desc>
8875 Base medium of this medium.
8876
8877 If this is a differencing medium, its base hard disk is the medium
8878 the given hard disk branch starts from. For all other types of hard
8879 disks, this property returns the hard disk object itself (i.e. the same
8880 object this property is read on).
8881 </desc>
8882 </attribute>
8883
8884 <attribute name="readOnly" type="boolean" readonly="yes">
8885 <desc>
8886 Returns @c true if this hard disk is read-only and @c false otherwise.
8887
8888 A hard disk is considered to be read-only when its contents cannot be
8889 modified without breaking the integrity of other parties that depend on
8890 this hard disk such as its child hard disks or snapshots of virtual
8891 machines where this hard disk is attached to these machines. If there
8892 are no children and no such snapshots then there is no dependency and
8893 the hard disk is not read-only.
8894
8895 The value of this attribute can be used to determine the kind of the
8896 attachment that will take place when attaching this hard disk to a
8897 virtual machine. If the value is @c false then the hard disk will
8898 be attached directly. If the value is @c true then the hard disk
8899 will be attached indirectly by creating a new differencing child hard
8900 disk for that. See the interface description for more information.
8901
8902 Note that all <link to="MediumType_Immutable">Immutable</link> hard
8903 disks are always read-only while all
8904 <link to="MediumType_Writethrough">Writethrough</link> hard disks are
8905 always not.
8906
8907 <note>
8908 The read-only condition represented by this attribute is related to
8909 the hard disk type and usage, not to the current
8910 <link to="IMedium::state">medium state</link> and not to the read-only
8911 state of the storage unit.
8912 </note>
8913 </desc>
8914 </attribute>
8915
8916 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
8917 <desc>
8918 Logical size of this hard disk (in megabytes), as reported to the
8919 guest OS running inside the virtual machine this disk is
8920 attached to. The logical size is defined when the hard disk is created
8921 and cannot be changed later.
8922
8923 <note>
8924 Reading this property on a differencing hard disk will return the size
8925 of its <link to="#base"/> medium.
8926 </note>
8927 <note>
8928 For hard disks whose state is <link to="#state"/> is <link
8929 to="MediumState_Inaccessible"/>, the value of this property is the
8930 last known logical size. For <link to="MediumaState_NotCreated"/> hard
8931 disks, the returned value is zero.
8932 </note>
8933 </desc>
8934 </attribute>
8935
8936 <attribute name="autoReset" type="boolean">
8937 <desc>
8938 Whether this differencing hard disk will be automatically reset each
8939 time a virtual machine it is attached to is powered up.
8940
8941 See <link to="#reset()"/> for more information about resetting
8942 differencing hard disks.
8943
8944 <note>
8945 Reading this property on a base (non-differencing) hard disk will
8946 always @c false. Changing the value of this property in this
8947 case is not supported.
8948 </note>
8949
8950 <result name="VBOX_E_NOT_SUPPORTED">
8951 This is not a differencing hard disk (when changing the attribute
8952 value).
8953 </result>
8954 </desc>
8955 </attribute>
8956
8957 <attribute name="lastAccessError" type="wstring" readonly="yes">
8958 <desc>
8959 Text message that represents the result of the last accessibility
8960 check.
8961
8962 Accessibility checks are performed each time the <link to="#state"/>
8963 attribute is read. An empty string is returned if the last
8964 accessibility check was successful. A non-empty string indicates a
8965 failure and should normally describe a reason of the failure (for
8966 example, a file read error).
8967 </desc>
8968 </attribute>
8969
8970 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
8971 <desc>
8972 Array of UUIDs of all machines this medium is attached to.
8973
8974 A @c null array is returned if this medium is not attached to any
8975 machine or to any machine's snapshot.
8976
8977 <note>
8978 The returned array will include a machine even if this medium is not
8979 attached to that machine in the current state but attached to it in
8980 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
8981 details.
8982 </note>
8983 </desc>
8984 </attribute>
8985
8986 <method name="getSnapshotIds">
8987 <desc>
8988 Returns an array of UUIDs of all snapshots of the given machine where
8989 this medium is attached to.
8990
8991 If the medium is attached to the machine in the current state, then the
8992 first element in the array will always be the ID of the queried machine
8993 (i.e. the value equal to the @c machineId argument), followed by
8994 snapshot IDs (if any).
8995
8996 If the medium is not attached to the machine in the current state, then
8997 the array will contain only snapshot IDs.
8998
8999 The returned array may be @c null if this medium is not attached
9000 to the given machine at all, neither in the current state nor in one of
9001 the snapshots.
9002 </desc>
9003 <param name="machineId" type="uuid" mod="string" dir="in">
9004 <desc>
9005 UUID of the machine to query.
9006 </desc>
9007 </param>
9008 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9009 <desc>
9010 Array of snapshot UUIDs of the given machine using this medium.
9011 </desc>
9012 </param>
9013 </method>
9014
9015 <method name="lockRead">
9016 <desc>
9017 Locks this medium for reading.
9018
9019 The read lock is shared: many clients can simultaneously lock the
9020 same medium for reading unless it is already locked for writing (see
9021 <link to="#lockWrite"/>) in which case an error is returned.
9022
9023 When the medium is locked for reading, it cannot be modified
9024 from within VirtualBox. This means that any method that changes
9025 the properties of this medium or contents of the storage unit
9026 will return an error (unless explicitly stated otherwise) and
9027 that an attempt to start a virtual machine that wants to modify
9028 the medium will also fail.
9029
9030 When the virtual machine is started up, it locks for reading all
9031 media it uses in read-only mode. If some medium cannot be locked
9032 for reading, the startup procedure will fail.
9033
9034 The medium locked for reading must be unlocked using the <link
9035 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9036 can be nested and must be followed by the same number of paired
9037 <link to="#unlockRead"/> calls.
9038
9039 This method sets the medium state to <link
9040 to="MediumState_LockedRead" /> on success. The state prior to
9041 this call must be <link to="MediumState_Created" />,
9042 <link to="MediumState_Inaccessible" /> or
9043 <link to="MediumState_LockedRead" />.
9044 As you can see, an inaccessible medium can be locked too. This is
9045 not an error; this method performs a logical lock that prevents
9046 modifications of this medium through the VirtualBox API, not a
9047 physical lock of the underlying storage unit.
9048
9049 This method returns the current state of the medium
9050 <b>before</b> the operation.
9051
9052 <result name="VBOX_E_INVALID_OBJECT_STATE">
9053 Invalid medium state (e.g. not created, locked, inaccessible,
9054 creating, deleting).
9055 </result>
9056
9057 </desc>
9058 <param name="state" type="MediumState" dir="return">
9059 <desc>
9060 State of the medium after the operation.
9061 </desc>
9062 </param>
9063 </method>
9064
9065 <method name="unlockRead">
9066 <desc>
9067 Cancels the read lock previously set by <link to="#lockRead"/>.
9068
9069 For both, success and failure, this method returns the current state
9070 of the medium <b>after</b> the operation.
9071
9072 See <link to="#lockRead"/> for more details.
9073
9074 <result name="VBOX_E_INVALID_OBJECT_STATE">
9075 Medium not locked for reading.
9076 </result>
9077
9078 </desc>
9079 <param name="state" type="MediumState" dir="return">
9080 <desc>
9081 State of the medium after the operation.
9082 </desc>
9083 </param>
9084 </method>
9085
9086 <method name="lockWrite">
9087 <desc>
9088 Locks this medium for writing.
9089
9090 The write lock, as opposed to <link to="#lockRead"/>, is
9091 exclusive: there may be only one client holding a write lock
9092 and there may be no read locks while the write lock is held.
9093
9094 When the medium is locked for writing, it cannot be modified
9095 from within VirtualBox and it is not guaranteed that the values
9096 of its properties are up-to-date. Any method that changes the
9097 properties of this medium or contents of the storage unit will
9098 return an error (unless explicitly stated otherwise) and an
9099 attempt to start a virtual machine wanting to modify or to
9100 read the medium will fail.
9101
9102 When the virtual machine is started up, it locks for writing all
9103 media it uses to write data to. If any medium could not be locked
9104 for writing, the startup procedure will fail.
9105
9106 The medium locked for writing must be unlocked using the <link
9107 to="#unlockWrite"/> method. Calls to <link to="#lockWrite"/>
9108 can <b>not</b> be nested and must be followed by a<link
9109 to="#unlockWrite"/> call before the next lockWrite call.
9110
9111 This method sets the medium state to <link to="MediumState_LockedWrite" />
9112 on success. The state prior to this call must be <link to="MediumState_Created"/>
9113 or <link to="MediumState_Inaccessible"/>. As you can see, an inaccessible
9114 medium can be locked too. This is not an error; this method
9115 performs a logical lock preventing modifications of this
9116 medium through the VirtualBox API, not a physical lock of the
9117 underlying storage unit.
9118
9119 For both, success and failure, this method returns the current
9120 state of the medium <b>before</b> the operation.
9121
9122 <result name="VBOX_E_INVALID_OBJECT_STATE">
9123 Invalid medium state (e.g. not created, locked, inaccessible,
9124 creating, deleting).
9125 </result>
9126
9127 </desc>
9128 <param name="state" type="MediumState" dir="return">
9129 <desc>
9130 State of the medium after the operation.
9131 </desc>
9132 </param>
9133 </method>
9134
9135 <method name="unlockWrite">
9136 <desc>
9137 Cancels the write lock previously set by <link to="#lockWrite"/>.
9138
9139 For both, success and failure, this method returns the current
9140 state of the medium <b>after</b> the operation.
9141
9142 See <link to="#lockWrite"/> for more details.
9143
9144 <result name="VBOX_E_INVALID_OBJECT_STATE">
9145 Medium not locked for writing.
9146 </result>
9147
9148 </desc>
9149 <param name="state" type="MediumState" dir="return">
9150 <desc>
9151 State of the medium after the operation.
9152 </desc>
9153 </param>
9154 </method>
9155
9156 <method name="close">
9157 <desc>
9158 Closes this medium.
9159
9160 The medium must not be attached to any known virtual machine
9161 and must not have any known child media, otherwise the
9162 operation will fail.
9163
9164 When the medium is successfully closed, it gets removed from
9165 the list of remembered media, but its storage unit is not
9166 deleted. In particular, this means that this medium can be
9167 later opened again using the <link
9168 to="IVirtualBox::openHardDisk"/> call.
9169
9170 Note that after this method successfully returns, the given medium
9171 object becomes uninitialized. This means that any attempt
9172 to call any of its methods or attributes will fail with the
9173 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9174
9175 <result name="VBOX_E_INVALID_OBJECT_STATE">
9176 Invalid medium state (other than not created, created or
9177 inaccessible).
9178 </result>
9179 <result name="VBOX_E_OBJECT_IN_USE">
9180 Medium attached to virtual machine.
9181 </result>
9182 <result name="VBOX_E_FILE_ERROR">
9183 Settings file not accessible.
9184 </result>
9185 <result name="VBOX_E_XML_ERROR">
9186 Could not parse the settings file.
9187 </result>
9188
9189 </desc>
9190 </method>
9191
9192 <!-- storage methods -->
9193
9194 <method name="getProperty">
9195 <desc>
9196 Returns 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 if this method returns an empty string in @a value, the
9202 requested property is supported but currently not assigned any value.
9203
9204 <result name="VBOX_E_OBJECT_NOT_FOUND">
9205 Requested property does not exist (not supported by the format).
9206 </result>
9207 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9208 </desc>
9209 <param name="name" type="wstring" dir="in">
9210 <desc>Name of the property to get.</desc>
9211 </param>
9212 <param name="value" type="wstring" dir="return">
9213 <desc>Current property value.</desc>
9214 </param>
9215 </method>
9216
9217 <method name="setProperty">
9218 <desc>
9219 Sets the value of the custom hard disk property with the given name.
9220
9221 The list of all properties supported by the given hard disk format can
9222 be obtained with <link to="IMediumFormat::describeProperties"/>.
9223
9224 Note that setting the property value to @c null or an empty string is
9225 equivalent to deleting the existing value. A default value (if it is
9226 defined for this property) will be used by the format backend in this
9227 case.
9228
9229 <result name="VBOX_E_OBJECT_NOT_FOUND">
9230 Requested property does not exist (not supported by the format).
9231 </result>
9232 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9233 </desc>
9234 <param name="name" type="wstring" dir="in">
9235 <desc>Name of the property to set.</desc>
9236 </param>
9237 <param name="value" type="wstring" dir="in">
9238 <desc>Property value to set.</desc>
9239 </param>
9240 </method>
9241
9242 <method name="getProperties">
9243 <desc>
9244 Returns values for a group of properties in one call.
9245
9246 The names of the properties to get are specified using the @a names
9247 argument which is a list of comma-separated property names or
9248 an empty string if all properties are to be returned. Note that currently
9249 the value of this argument is ignored and the method always returns all
9250 existing properties.
9251
9252 The list of all properties supported by the given hard disk format can
9253 be obtained with <link to="IMediumFormat::describeProperties"/>.
9254
9255 The method returns two arrays, the array of property names corresponding
9256 to the @a names argument and the current values of these properties.
9257 Both arrays have the same number of elements with each elemend at the
9258 given index in the first array corresponds to an element at the same
9259 index in the second array.
9260
9261 Note that for properties that do not have assigned values,
9262 an empty string is returned at the appropriate index in the
9263 @a returnValues array.
9264
9265 </desc>
9266 <param name="names" type="wstring" dir="in">
9267 <desc>
9268 Names of properties to get.
9269 </desc>
9270 </param>
9271 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9272 <desc>Names of returned properties.</desc>
9273 </param>
9274 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9275 <desc>Values of returned properties.</desc>
9276 </param>
9277 </method>
9278
9279 <method name="setProperties">
9280 <desc>
9281 Sets values for a group of properties in one call.
9282
9283 The names of the properties to set are passed in the @a names
9284 array along with the new values for them in the @a values array. Both
9285 arrays have the same number of elements with each elemend at the given
9286 index in the first array corresponding to an element at the same index
9287 in the second array.
9288
9289 If there is at least one property name in @a names that is not valid,
9290 the method will fail before changing the values of any other properties
9291 from the @a names array.
9292
9293 Using this method over <link to="#setProperty"/> is preferred if you
9294 need to set several properties at once since it will result into less
9295 IPC calls.
9296
9297 The list of all properties supported by the given hard disk format can
9298 be obtained with <link to="IMediumFormat::describeProperties"/>.
9299
9300 Note that setting the property value to @c null or an empty string is
9301 equivalent to deleting the existing value. A default value (if it is
9302 defined for this property) will be used by the format backend in this
9303 case.
9304 </desc>
9305 <param name="names" type="wstring" safearray="yes" dir="in">
9306 <desc>Names of properties to set.</desc>
9307 </param>
9308 <param name="values" type="wstring" safearray="yes" dir="in">
9309 <desc>Values of properties to set.</desc>
9310 </param>
9311 </method>
9312
9313 <!-- storage methods -->
9314
9315 <method name="createBaseStorage">
9316 <desc>
9317 Starts creating a hard disk storage unit (fixed/dynamic, according
9318 to the variant flags) in in the background. The previous storage unit
9319 created for this object, if any, must first be deleted using
9320 <link to="#deleteStorage"/>, otherwise the operation will fail.
9321
9322 Before the operation starts, the hard disk is placed in
9323 <link to="MediumState_Creating"/> state. If the create operation
9324 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
9325 state.
9326
9327 After the returned progress object reports that the operation has
9328 successfully completed, the medium state will be set to <link
9329 to="MediumState_Created"/>, the hard disk will be remembered by this
9330 VirtualBox installation and may be attached to virtual machines.
9331
9332 <result name="VBOX_E_NOT_SUPPORTED">
9333 The variant of storage creation operation is not supported. See <link
9334 to="IMediumFormat::capabilities"/>.
9335 </result>
9336 </desc>
9337 <param name="logicalSize" type="unsigned long long" dir="in">
9338 <desc>Maximum logical size of the hard disk in megabytes.</desc>
9339 </param>
9340 <param name="variant" type="MediumVariant" dir="in">
9341 <desc>Exact image variant which should be created.</desc>
9342 </param>
9343 <param name="progress" type="IProgress" dir="return">
9344 <desc>Progress object to track the operation completion.</desc>
9345 </param>
9346 </method>
9347
9348 <method name="deleteStorage">
9349 <desc>
9350 Starts deleting the storage unit of this hard disk.
9351
9352 The hard disk must not be attached to any known virtual machine and must
9353 not have any known child hard disks, otherwise the operation will fail.
9354 It will also fail if there is no storage unit to delete or if deletion
9355 is already in progress, or if the hard disk is being in use (locked for
9356 read or for write) or inaccessible. Therefore, the only valid state for
9357 this operation to succeed is <link to="MediumState_Created"/>.
9358
9359 Before the operation starts, the hard disk is placed to
9360 <link to="MediumState_Deleting"/> state and gets removed from the list
9361 of remembered hard disks (media registry). If the delete operation
9362 fails, the medium will be remembered again and placed back to
9363 <link to="MediumState_Created"/> state.
9364
9365 After the returned progress object reports that the operation is
9366 complete, the medium state will be set to
9367 <link to="MediumState_NotCreated"/> and you will be able to use one of
9368 the storage creation methods to create it again.
9369
9370 <see>#close()</see>
9371
9372 <result name="VBOX_E_OBJECT_IN_USE">
9373 Hard disk is attached to a virtual machine.
9374 </result>
9375 <result name="VBOX_E_NOT_SUPPORTED">
9376 Storage deletion is not allowed because neither of storage creation
9377 operations are supported. See
9378 <link to="IMediumFormat::capabilities"/>.
9379 </result>
9380
9381 <note>
9382 If the deletion operation fails, it is not guaranteed that the storage
9383 unit still exists. You may check the <link to="IMedium::state"/> value
9384 to answer this question.
9385 </note>
9386 </desc>
9387 <param name="progress" type="IProgress" dir="return">
9388 <desc>Progress object to track the operation completion.</desc>
9389 </param>
9390 </method>
9391
9392 <!-- diff methods -->
9393
9394 <method name="createDiffStorage">
9395 <desc>
9396 Starts creating an empty differencing storage unit based on this hard
9397 disk in the format and at the location defined by the @a target
9398 argument.
9399
9400 The target hard disk must be in <link to="MediumState_NotCreated"/>
9401 state (i.e. must not have an existing storage unit). Upon successful
9402 completion, this operation will set the type of the target hard disk to
9403 <link to="MediumType_Normal"/> and create a storage unit necessary to
9404 represent the differencing hard disk data in the given format (according
9405 to the storage format of the target object).
9406
9407 After the returned progress object reports that the operation is
9408 successfully complete, the target hard disk gets remembered by this
9409 VirtualBox installation and may be attached to virtual machines.
9410
9411 <note>
9412 The hard disk will be set to <link to="MediumState_LockedRead"/>
9413 state for the duration of this operation.
9414 </note>
9415 <result name="VBOX_E_OBJECT_IN_USE">
9416 Hard disk not in @c NotCreated state.
9417 </result>
9418 </desc>
9419 <param name="target" type="IMedium" dir="in">
9420 <desc>Target hard disk.</desc>
9421 </param>
9422 <param name="variant" type="MediumVariant" dir="in">
9423 <desc>Exact image variant which should be created.</desc>
9424 </param>
9425 <param name="progress" type="IProgress" dir="return">
9426 <desc>Progress object to track the operation completion.</desc>
9427 </param>
9428 </method>
9429
9430 <method name="mergeTo">
9431 <desc>
9432 Starts merging the contents of this hard disk and all intermediate
9433 differencing hard disks in the chain to the given target hard disk.
9434
9435 The target hard disk must be either a descendant of this hard disk or
9436 its ancestor (otherwise this method will immediately return a failure).
9437 It follows that there are two logical directions of the merge operation:
9438 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9439 ancestor (<i>backward merge</i>). Let us consider the following hard disk
9440 chain:
9441
9442 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9443
9444 Here, calling this method on the <tt>Base</tt> hard disk object with
9445 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9446 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9447 merge. Note that in both cases the contents of the resulting hard disk
9448 will be the same, the only difference is the hard disk object that takes
9449 the result of the merge operation. In case of the forward merge in the
9450 above example, the result will be written to <tt>Diff_2</tt>; in case of
9451 the backward merge, the result will be written to <tt>Base</tt>. In
9452 other words, the result of the operation is always stored in the target
9453 hard disk.
9454
9455 Upon successful operation completion, the storage units of all hard
9456 disks in the chain between this (source) hard disk and the target hard
9457 disk, including the source hard disk itself, will be automatically
9458 deleted and the relevant hard disk objects (including this hard disk)
9459 will become uninitialized. This means that any attempt to call any of
9460 their methods or attributes will fail with the
9461 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9462 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9463 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
9464 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
9465 disk itself since it will no longer be based on any other hard disk.
9466
9467 Considering the above, all of the following conditions must be met in
9468 order for the merge operation to succeed:
9469 <ul>
9470 <li>
9471 Neither this (source) hard disk nor any intermediate
9472 differencing hard disk in the chain between it and the target
9473 hard disk is attached to any virtual machine.
9474 </li>
9475 <li>
9476 Neither the source hard disk nor the target hard disk is an
9477 <link to="MediumType_Immutable"/> hard disk.
9478 </li>
9479 <li>
9480 The part of the hard disk tree from the source hard disk to the
9481 target hard disk is a linear chain, i.e. all hard disks in this
9482 chain have exactly one child which is the next hard disk in this
9483 chain. The only exception from this rule is the target hard disk in
9484 the forward merge operation; it is allowed to have any number of
9485 child hard disks because the merge operation will hot change its
9486 logical contents (as it is seen by the guest OS or by children).
9487 </li>
9488 <li>
9489 None of the involved hard disks are in
9490 <link to="MediumState_LockedRead"/> or
9491 <link to="MediumState_LockedWrite"/> state.
9492 </li>
9493 </ul>
9494
9495 <note>
9496 This (source) hard disk and all intermediates will be placed to <link
9497 to="MediumState_Deleting"/> state and the target hard disk will be
9498 placed to <link to="MediumState_LockedWrite"/> state and for the
9499 duration of this operation.
9500 </note>
9501 </desc>
9502 <param name="targetId" type="uuid" mod="string" dir="in">
9503 <desc>UUID of the target ancestor or descendant hard disk.</desc>
9504 </param>
9505 <param name="progress" type="IProgress" dir="return">
9506 <desc>Progress object to track the operation completion.</desc>
9507 </param>
9508 </method>
9509
9510 <!-- clone method -->
9511
9512 <method name="cloneTo">
9513 <desc>
9514 Starts creating a clone of this hard disk in the format and at the
9515 location defined by the @a target argument.
9516
9517 The target hard disk must be either in <link to="MediumState_NotCreated"/>
9518 state (i.e. must not have an existing storage unit) or in
9519 <link to="MediumState_Created"/> state (i.e. created and not locked, and
9520 big enough to hold the data or else the copy will be partial). Upon
9521 successful completion, the cloned hard disk will contain exactly the
9522 same sector data as the hard disk being cloned, except that in the
9523 first case a new UUID for the clone will be randomly generated, and in
9524 the second case the UUID will remain unchanged.
9525
9526 The @a parent argument defines which hard disk will be the parent
9527 of the clone. Passing a @c null reference indicates that the clone will
9528 be a base image, i.e. completely independent. It is possible to specify
9529 an arbitrary hard disk for this parameter, including the parent of the
9530 hard disk which is being cloned. Even cloning to a child of the source
9531 hard disk is possible. Note that when cloning to an existing image, the
9532 @a parent irgument is ignored.
9533
9534 After the returned progress object reports that the operation is
9535 successfully complete, the target hard disk gets remembered by this
9536 VirtualBox installation and may be attached to virtual machines.
9537
9538 <note>
9539 This hard disk will be placed to <link to="MediumState_LockedRead"/>
9540 state for the duration of this operation.
9541 </note>
9542 <result name="E_NOTIMPL">
9543 The specified cloning variant is not supported at the moment.
9544 </result>
9545 </desc>
9546 <param name="target" type="IMedium" dir="in">
9547 <desc>Target hard disk.</desc>
9548 </param>
9549 <param name="variant" type="MediumVariant" dir="in">
9550 <desc>Exact image variant which should be created.</desc>
9551 </param>
9552 <param name="parent" type="IMedium" dir="in">
9553 <desc>Parent of the cloned hard disk.</desc>
9554 </param>
9555 <param name="progress" type="IProgress" dir="return">
9556 <desc>Progress object to track the operation completion.</desc>
9557 </param>
9558 </method>
9559
9560 <!-- other methods -->
9561
9562 <method name="compact">
9563 <desc>
9564 Starts compacting of this hard disk. This means that the disk is
9565 transformed into a possibly more compact storage representation.
9566 This potentially creates temporary images, which can require a
9567 substantial amount of additional disk space.
9568
9569 This hard disk will be placed to <link to="MediumState_LockedWrite"/>
9570 state and all its parent hard disks (if any) will be placed to
9571 <link to="MediumState_LockedRead"/> state for the duration of this
9572 operation.
9573
9574 Please note that the results can be either returned straight away,
9575 or later as the result of the background operation via the object
9576 returned via the @a progress parameter.
9577
9578 <result name="VBOX_E_NOT_SUPPORTED">
9579 Hard disk format does not support compacting (but potentially
9580 needs it).
9581 </result>
9582 </desc>
9583 <param name="progress" type="IProgress" dir="return">
9584 <desc>Progress object to track the operation completion.</desc>
9585 </param>
9586 </method>
9587
9588 <method name="reset">
9589 <desc>
9590 Starts erasing the contents of this differencing hard disk.
9591
9592 This operation will reset the differencing hard disk to its initial
9593 state when it does not contain any sector data and any read operation is
9594 redirected to its parent hard disk.
9595
9596 This hard disk will be placed to <link to="MediumState_LockedWrite"/>
9597 for the duration of this operation.
9598
9599 <result name="VBOX_E_NOT_SUPPORTED">
9600 This is not a differencing hard disk.
9601 </result>
9602 <result name="VBOX_E_INVALID_OBJECT_STATE">
9603 Hard disk is not in <link to="MediumState_Created"/> or
9604 <link to="MediumState_Inaccessible"/> state.
9605 </result>
9606 </desc>
9607 <param name="progress" type="IProgress" dir="return">
9608 <desc>Progress object to track the operation completion.</desc>
9609 </param>
9610 </method>
9611
9612 </interface>
9613
9614
9615 <!--
9616 // IMediumFormat
9617 /////////////////////////////////////////////////////////////////////////
9618 -->
9619
9620 <enum
9621 name="DataType"
9622 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9623 >
9624 <const name="Int32" value="0"/>
9625 <const name="Int8" value="1"/>
9626 <const name="String" value="2"/>
9627 </enum>
9628
9629 <enum
9630 name="DataFlags"
9631 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9632 >
9633 <const name="None" value="0x00"/>
9634 <const name="Mandatory" value="0x01"/>
9635 <const name="Expert" value="0x02"/>
9636 <const name="Array" value="0x04"/>
9637 <const name="FlagMask" value="0x07"/>
9638 </enum>
9639
9640 <enum
9641 name="MediumFormatCapabilities"
9642 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
9643 >
9644 <desc>
9645 Hard disk format capability flags.
9646 </desc>
9647
9648 <const name="Uuid" value="0x01">
9649 <desc>
9650 Supports UUIDs as expected by VirtualBox code.
9651 </desc>
9652 </const>
9653
9654 <const name="CreateFixed" value="0x02">
9655 <desc>
9656 Supports creating fixed size images, allocating all space instantly.
9657 </desc>
9658 </const>
9659
9660 <const name="CreateDynamic" value="0x04">
9661 <desc>
9662 Supports creating dynamically growing images, allocating space on
9663 demand.
9664 </desc>
9665 </const>
9666
9667 <const name="CreateSplit2G" value="0x08">
9668 <desc>
9669 Supports creating images split in chunks of a bit less than 2 GBytes.
9670 </desc>
9671 </const>
9672
9673 <const name="Differencing" value="0x10">
9674 <desc>
9675 Supports being used as a format for differencing media (see <link
9676 to="IMedium::createDiffStorage"/>).
9677 </desc>
9678 </const>
9679
9680 <const name="Asynchronous" value="0x20">
9681 <desc>
9682 Supports asynchronous I/O operations for at least some configurations.
9683 </desc>
9684 </const>
9685
9686 <const name="File" value="0x40">
9687 <desc>
9688 The format backend operates on files (the <link to="IMedium::location"/>
9689 attribute of the medium specifies a file used to store medium
9690 data; for a list of supported file extensions see
9691 <link to="IMediumFormat::fileExtensions"/>).
9692 </desc>
9693 </const>
9694
9695 <const name="Properties" value="0x80">
9696 <desc>
9697 The format backend uses the property interface to configure the storage
9698 location and properties (the <link to="IMediumFormat::describeProperties"/>
9699 method is used to get access to properties supported by the given medium format).
9700 </desc>
9701 </const>
9702
9703 <const name="CapabilityMask" value="0xFF"/>
9704 </enum>
9705
9706 <interface
9707 name="IMediumFormat" extends="$unknown"
9708 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
9709 wsmap="managed"
9710 >
9711 <desc>
9712 The IMediumFormat interface represents a medium format.
9713
9714 Each medium format has an associated backend which is used to handle
9715 media stored in this format. This interface provides information
9716 about the properties of the associated backend.
9717
9718 Each medium format is identified by a string represented by the
9719 <link to="#id"/> attribute. This string is used in calls like
9720 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9721 format.
9722
9723 The list of all supported medium formats can be obtained using
9724 <link to="ISystemProperties::mediaFormats"/>.
9725
9726 <see>IMedium</see>
9727 </desc>
9728
9729 <attribute name="id" type="wstring" readonly="yes">
9730 <desc>
9731 Identifier of this format.
9732
9733 The format identifier is a non-@c null non-empty ASCII string. Note that
9734 this string is case-insensitive. This means that, for example, all of
9735 the following strings:
9736 <pre>
9737 "VDI"
9738 "vdi"
9739 "VdI"</pre>
9740 refer to the same medium format.
9741
9742 This string is used in methods of other interfaces where it is necessary
9743 to specify a medium format, such as
9744 <link to="IVirtualBox::createHardDisk"/>.
9745 </desc>
9746 </attribute>
9747
9748 <attribute name="name" type="wstring" readonly="yes">
9749 <desc>
9750 Human readable description of this format.
9751
9752 Mainly for use in file open dialogs.
9753 </desc>
9754 </attribute>
9755
9756 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9757 <desc>
9758 Array of strings containing the supported file extensions.
9759
9760 The first extension in the array is the extension preferred by the
9761 backend. It is recommended to use this extension when specifying a
9762 location of the storage unit for a new medium.
9763
9764 Note that some backends do not work on files, so this array may be
9765 empty.
9766
9767 <see>IMediumFormat::capabilities</see>
9768 </desc>
9769 </attribute>
9770
9771 <attribute name="capabilities" type="unsigned long" readonly="yes">
9772 <desc>
9773 Capabilities of the format as a set of bit flags.
9774
9775 For the meaning of individual capability flags see
9776 <link to="MediumFormatCapabilities"/>.
9777 </desc>
9778 </attribute>
9779
9780 <method name="describeProperties">
9781 <desc>
9782 Returns several arrays describing the properties supported by this
9783 format.
9784
9785 An element with the given index in each array describes one
9786 property. Thus, the number of elements in each returned array is the
9787 same and corresponds to the number of supported properties.
9788
9789 The returned arrays are filled in only if the
9790 <link to="MediumFormatCapabilities_Properties"/> flag is set.
9791 All arguments must be non-@c null.
9792
9793 <see>DataType</see>
9794 <see>DataFlags</see>
9795 </desc>
9796
9797 <param name="names" type="wstring" safearray="yes" dir="out">
9798 <desc>Array of property names.</desc>
9799 </param>
9800 <param name="description" type="wstring" safearray="yes" dir="out">
9801 <desc>Array of property descriptions.</desc>
9802 </param>
9803 <param name="types" type="DataType" safearray="yes" dir="out">
9804 <desc>Array of property types.</desc>
9805 </param>
9806 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9807 <desc>Array of property flags.</desc>
9808 </param>
9809 <param name="defaults" type="wstring" safearray="yes" dir="out">
9810 <desc>Array of default property values.</desc>
9811 </param>
9812 </method>
9813
9814 </interface>
9815
9816
9817 <!--
9818 // IKeyboard
9819 /////////////////////////////////////////////////////////////////////////
9820 -->
9821
9822 <interface
9823 name="IKeyboard" extends="$unknown"
9824 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
9825 wsmap="managed"
9826 >
9827 <desc>
9828 The IKeyboard interface represents the virtual machine's keyboard. Used
9829 in <link to="IConsole::keyboard"/>.
9830
9831 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
9832 to the virtual machine.
9833
9834 </desc>
9835 <method name="putScancode">
9836 <desc>Sends a scancode to the keyboard.
9837
9838 <result name="VBOX_E_IPRT_ERROR">
9839 Could not send scan code to virtual keyboard.
9840 </result>
9841
9842 </desc>
9843 <param name="scancode" type="long" dir="in"/>
9844 </method>
9845
9846 <method name="putScancodes">
9847 <desc>Sends an array of scancodes to the keyboard.
9848
9849 <result name="VBOX_E_IPRT_ERROR">
9850 Could not send all scan codes to virtual keyboard.
9851 </result>
9852
9853 </desc>
9854 <param name="scancodes" type="long" dir="in" safearray="yes"/>
9855 <param name="codesStored" type="unsigned long" dir="return"/>
9856 </method>
9857
9858 <method name="putCAD">
9859 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
9860 function is nothing special, it is just a convenience function
9861 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
9862
9863 <result name="VBOX_E_IPRT_ERROR">
9864 Could not send all scan codes to virtual keyboard.
9865 </result>
9866
9867 </desc>
9868 </method>
9869
9870 </interface>
9871
9872
9873 <!--
9874 // IMouse
9875 /////////////////////////////////////////////////////////////////////////
9876 -->
9877
9878 <enum
9879 name="MouseButtonState"
9880 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
9881 >
9882 <desc>
9883 Mouse button state.
9884 </desc>
9885
9886 <const name="LeftButton" value="0x01"/>
9887 <const name="RightButton" value="0x02"/>
9888 <const name="MiddleButton" value="0x04"/>
9889 <const name="WheelUp" value="0x08"/>
9890 <const name="WheelDown" value="0x10"/>
9891 <const name="XButton1" value="0x20"/>
9892 <const name="XButton2" value="0x40"/>
9893 <const name="MouseStateMask" value="0x7F"/>
9894 </enum>
9895
9896 <interface
9897 name="IMouse" extends="$unknown"
9898 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
9899 wsmap="managed"
9900 >
9901 <desc>
9902 The IMouse interface represents the virtual machine's mouse. Used in
9903 <link to="IConsole::mouse"/>.
9904
9905 Through this interface, the virtual machine's virtual mouse can be
9906 controlled.
9907 </desc>
9908
9909 <attribute name="absoluteSupported" type="boolean" readonly="yes">
9910 <desc>
9911 Whether the guest OS supports absolute mouse pointer positioning
9912 or not.
9913 <note>
9914 VirtualBox Guest Tools need to be installed to the guest OS
9915 in order to enable absolute mouse positioning support.
9916 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
9917 callback to be instantly informed about changes of this attribute
9918 during virtual machine execution.
9919 </note>
9920 <see><link to="#putMouseEventAbsolute"/></see>
9921 </desc>
9922 </attribute>
9923
9924 <method name="putMouseEvent">
9925 <desc>
9926 Initiates a mouse event using relative pointer movements
9927 along x and y axis.
9928
9929 <result name="E_ACCESSDENIED">
9930 Console not powered up.
9931 </result>
9932 <result name="VBOX_E_IPRT_ERROR">
9933 Could not send mouse event to virtual mouse.
9934 </result>
9935
9936 </desc>
9937
9938 <param name="dx" type="long" dir="in">
9939 <desc>
9940 Amount of pixels the mouse should move to the right.
9941 Negative values move the mouse to the left.
9942 </desc>
9943 </param>
9944 <param name="dy" type="long" dir="in">
9945 <desc>
9946 Amount of pixels the mouse should move downwards.
9947 Negative values move the mouse upwards.
9948 </desc>
9949 </param>
9950 <param name="dz" type="long" dir="in">
9951 <desc>
9952 Amount of mouse wheel moves.
9953 Positive values describe clockwise wheel rotations,
9954 negative values describe counterclockwise rotations.
9955 </desc>
9956 </param>
9957 <param name="dw" type="long" dir="in">
9958 <desc>
9959 Amount of horizontal mouse wheel moves.
9960 Positive values describe a movement to the left,
9961 negative values describe a movement to the right.
9962 </desc>
9963 </param>
9964 <param name="buttonState" type="long" dir="in">
9965 <desc>
9966 The current state of mouse buttons. Every bit represents
9967 a mouse button as follows:
9968 <table>
9969 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9970 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9971 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9972 </table>
9973 A value of <tt>1</tt> means the corresponding button is pressed.
9974 otherwise it is released.
9975 </desc>
9976 </param>
9977 </method>
9978
9979 <method name="putMouseEventAbsolute">
9980 <desc>
9981 Positions the mouse pointer using absolute x and y coordinates.
9982 These coordinates are expressed in pixels and
9983 start from <tt>[1,1]</tt> which corresponds to the top left
9984 corner of the virtual display.
9985
9986 <result name="E_ACCESSDENIED">
9987 Console not powered up.
9988 </result>
9989 <result name="VBOX_E_IPRT_ERROR">
9990 Could not send mouse event to virtual mouse.
9991 </result>
9992
9993 <note>
9994 This method will have effect only if absolute mouse
9995 positioning is supported by the guest OS.
9996 </note>
9997
9998 <see><link to="#absoluteSupported"/></see>
9999 </desc>
10000
10001 <param name="x" type="long" dir="in">
10002 <desc>
10003 X coordinate of the pointer in pixels, starting from @c 1.
10004 </desc>
10005 </param>
10006 <param name="y" type="long" dir="in">
10007 <desc>
10008 Y coordinate of the pointer in pixels, starting from @c 1.
10009 </desc>
10010 </param>
10011 <param name="dz" type="long" dir="in">
10012 <desc>
10013 Amount of mouse wheel moves.
10014 Positive values describe clockwise wheel rotations,
10015 negative values describe counterclockwise rotations.
10016 </desc>
10017 </param>
10018 <param name="dw" type="long" dir="in">
10019 <desc>
10020 Amount of horizontal mouse wheel moves.
10021 Positive values describe a movement to the left,
10022 negative values describe a movement to the right.
10023 </desc>
10024 </param>
10025 <param name="buttonState" type="long" dir="in">
10026 <desc>
10027 The current state of mouse buttons. Every bit represents
10028 a mouse button as follows:
10029 <table>
10030 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10031 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10032 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10033 </table>
10034 A value of @c 1 means the corresponding button is pressed.
10035 otherwise it is released.
10036 </desc>
10037 </param>
10038 </method>
10039
10040 </interface>
10041
10042 <!--
10043 // IDisplay
10044 /////////////////////////////////////////////////////////////////////////
10045 -->
10046
10047 <enum
10048 name="FramebufferPixelFormat"
10049 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10050 >
10051 <desc>
10052 Format of the video memory buffer. Constants represented by this enum can
10053 be used to test for particular values of <link
10054 to="IFramebuffer::pixelFormat"/>. See also <link
10055 to="IFramebuffer::requestResize"/>.
10056
10057 See also www.fourcc.org for more information about FOURCC pixel formats.
10058 </desc>
10059
10060 <const name="Opaque" value="0">
10061 <desc>
10062 Unknown buffer format (the user may not assume any particular format of
10063 the buffer).
10064 </desc>
10065 </const>
10066 <const name="FOURCC_RGB" value="0x32424752">
10067 <desc>
10068 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10069 bit layout).
10070 </desc>
10071 </const>
10072 </enum>
10073
10074 <interface
10075 name="IFramebuffer" extends="$unknown"
10076 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10077 wsmap="suppress"
10078 >
10079 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10080 <desc>Address of the start byte of the frame buffer.</desc>
10081 </attribute>
10082
10083 <attribute name="width" type="unsigned long" readonly="yes">
10084 <desc>Frame buffer width, in pixels.</desc>
10085 </attribute>
10086
10087 <attribute name="height" type="unsigned long" readonly="yes">
10088 <desc>Frame buffer height, in pixels.</desc>
10089 </attribute>
10090
10091 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10092 <desc>
10093 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10094 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10095 are: 8, 15, 16, 24 and 32.
10096 </desc>
10097 </attribute>
10098
10099 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10100 <desc>
10101 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10102 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10103 size of the scan line must be aligned to 32 bits.
10104 </desc>
10105 </attribute>
10106
10107 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10108 <desc>
10109 Frame buffer pixel format. It's either one of the values defined by <link
10110 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10111 <note>
10112 This attribute must never return <link
10113 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10114 <link to="#address"/> points to must be always known.
10115 </note>
10116 </desc>
10117 </attribute>
10118
10119 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10120 <desc>
10121 Defines whether this frame buffer uses the virtual video card's memory
10122 buffer (guest VRAM) directly or not. See <link
10123 to="IFramebuffer::requestResize"/> for more information.
10124 </desc>
10125 </attribute>
10126
10127 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10128 <desc>
10129 Hint from the frame buffer about how much of the standard
10130 screen height it wants to use for itself. This information is
10131 exposed to the guest through the VESA BIOS and VMMDev interface
10132 so that it can use it for determining its video mode table. It
10133 is not guaranteed that the guest respects the value.
10134 </desc>
10135 </attribute>
10136
10137 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10138 <desc>
10139 An alpha-blended overlay which is superposed over the frame buffer.
10140 The initial purpose is to allow the display of icons providing
10141 information about the VM state, including disk activity, in front
10142 ends which do not have other means of doing that. The overlay is
10143 designed to controlled exclusively by IDisplay. It has no locking
10144 of its own, and any changes made to it are not guaranteed to be
10145 visible until the affected portion of IFramebuffer is updated. The
10146 overlay can be created lazily the first time it is requested. This
10147 attribute can also return @c null to signal that the overlay is not
10148 implemented.
10149 </desc>
10150 </attribute>
10151
10152 <attribute name="winId" type="unsigned long long" readonly="yes">
10153 <desc>
10154 Platform-dependent identifier of the window where context of this
10155 frame buffer is drawn, or zero if there's no such window.
10156 </desc>
10157 </attribute>
10158
10159 <method name="lock">
10160 <desc>
10161 Locks the frame buffer.
10162 Gets called by the IDisplay object where this frame buffer is
10163 bound to.
10164 </desc>
10165 </method>
10166
10167 <method name="unlock">
10168 <desc>
10169 Unlocks the frame buffer.
10170 Gets called by the IDisplay object where this frame buffer is
10171 bound to.
10172 </desc>
10173 </method>
10174
10175 <method name="notifyUpdate">
10176 <desc>
10177 Informs about an update.
10178 Gets called by the display object where this buffer is
10179 registered.
10180 </desc>
10181 <param name="x" type="unsigned long" dir="in"/>
10182 <param name="y" type="unsigned long" dir="in"/>
10183 <param name="width" type="unsigned long" dir="in"/>
10184 <param name="height" type="unsigned long" dir="in"/>
10185 </method>
10186
10187 <method name="requestResize">
10188 <desc>
10189 Requests a size and pixel format change.
10190
10191 There are two modes of working with the video buffer of the virtual
10192 machine. The <i>indirect</i> mode implies that the IFramebuffer
10193 implementation allocates a memory buffer for the requested display mode
10194 and provides it to the virtual machine. In <i>direct</i> mode, the
10195 IFramebuffer implementation uses the memory buffer allocated and owned
10196 by the virtual machine. This buffer represents the video memory of the
10197 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10198 usually faster because the implementation gets a raw pointer to the
10199 guest VRAM buffer which it can directly use for visualizing the contents
10200 of the virtual display, as opposed to the indirect mode where the
10201 contents of guest VRAM are copied to the memory buffer provided by
10202 the implementation every time a display update occurs.
10203
10204 It is important to note that the direct mode is really fast only when
10205 the implementation uses the given guest VRAM buffer directly, for
10206 example, by blitting it to the window representing the virtual machine's
10207 display, which saves at least one copy operation comparing to the
10208 indirect mode. However, using the guest VRAM buffer directly is not
10209 always possible: the format and the color depth of this buffer may be
10210 not supported by the target window, or it may be unknown (opaque) as in
10211 case of text or non-linear multi-plane VGA video modes. In this case,
10212 the indirect mode (that is always available) should be used as a
10213 fallback: when the guest VRAM contents are copied to the
10214 implementation-provided memory buffer, color and format conversion is
10215 done automatically by the underlying code.
10216
10217 The @a pixelFormat parameter defines whether the direct mode is
10218 available or not. If @a pixelFormat is <link
10219 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10220 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10221 @a bytesPerLine parameters must be ignored and the implementation must use
10222 the indirect mode (where it provides its own buffer in one of the
10223 supported formats). In all other cases, @a pixelFormat together with
10224 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10225 buffer pointed to by the @a VRAM parameter and the implementation is
10226 free to choose which mode to use. To indicate that this frame buffer uses
10227 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10228 attribute must return @c true and <link to="#address"/> must
10229 return exactly the same address that is passed in the @a VRAM parameter
10230 of this method; otherwise it is assumed that the indirect strategy is
10231 chosen.
10232
10233 The @a width and @a height parameters represent the size of the
10234 requested display mode in both modes. In case of indirect mode, the
10235 provided memory buffer should be big enough to store data of the given
10236 display mode. In case of direct mode, it is guaranteed that the given
10237 @a VRAM buffer contains enough space to represent the display mode of the
10238 given size. Note that this frame buffer's <link to="#width"/> and <link
10239 to="#height"/> attributes must return exactly the same values as
10240 passed to this method after the resize is completed (see below).
10241
10242 The @a finished output parameter determines if the implementation has
10243 finished resizing the frame buffer or not. If, for some reason, the
10244 resize cannot be finished immediately during this call, @a finished
10245 must be set to @c false, and the implementation must call
10246 <link to="IDisplay::resizeCompleted"/> after it has returned from
10247 this method as soon as possible. If @a finished is @c false, the
10248 machine will not call any frame buffer methods until
10249 <link to="IDisplay::resizeCompleted"/> is called.
10250
10251 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10252 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10253 this frame buffer must return exactly the same values as specified in the
10254 parameters of this method, after the resize is completed. If the
10255 indirect mode is chosen, these attributes must return values describing
10256 the format of the implementation's own memory buffer <link
10257 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10258 value must always correlate with <link to="#pixelFormat"/>. Note that
10259 the <link to="#pixelFormat"/> attribute must never return <link
10260 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10261
10262 <note>
10263 This method is called by the IDisplay object under the
10264 <link to="#lock"/> provided by this IFramebuffer
10265 implementation. If this method returns @c false in @a finished, then
10266 this lock is not released until
10267 <link to="IDisplay::resizeCompleted"/> is called.
10268 </note>
10269 </desc>
10270 <param name="screenId" type="unsigned long" dir="in">
10271 <desc>
10272 Logical screen number. Must be used in the corresponding call to
10273 <link to="IDisplay::resizeCompleted"/> if this call is made.
10274 </desc>
10275 </param>
10276 <param name="pixelFormat" type="unsigned long" dir="in">
10277 <desc>
10278 Pixel format of the memory buffer pointed to by @a VRAM.
10279 See also <link to="FramebufferPixelFormat"/>.
10280 </desc>
10281 </param>
10282 <param name="VRAM" type="octet" mod="ptr" dir="in">
10283 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10284 </param>
10285 <param name="bitsPerPixel" type="unsigned long" dir="in">
10286 <desc>Color depth, bits per pixel.</desc>
10287 </param>
10288 <param name="bytesPerLine" type="unsigned long" dir="in">
10289 <desc>Size of one scan line, in bytes.</desc>
10290 </param>
10291 <param name="width" type="unsigned long" dir="in">
10292 <desc>Width of the guest display, in pixels.</desc>
10293 </param>
10294 <param name="height" type="unsigned long" dir="in">
10295 <desc>Height of the guest display, in pixels.</desc>
10296 </param>
10297 <param name="finished" type="boolean" dir="return">
10298 <desc>
10299 Can the VM start using the new frame buffer immediately
10300 after this method returns or it should wait for
10301 <link to="IDisplay::resizeCompleted"/>.
10302 </desc>
10303 </param>
10304 </method>
10305
10306 <method name="videoModeSupported">
10307 <desc>
10308 Returns whether the frame buffer implementation is willing to
10309 support a given video mode. In case it is not able to render
10310 the video mode (or for some reason not willing), it should
10311 return @c false. Usually this method is called when the guest
10312 asks the VMM device whether a given video mode is supported
10313 so the information returned is directly exposed to the guest.
10314 It is important that this method returns very quickly.
10315 </desc>
10316 <param name="width" type="unsigned long" dir="in"/>
10317 <param name="height" type="unsigned long" dir="in"/>
10318 <param name="bpp" type="unsigned long" dir="in"/>
10319 <param name="supported" type="boolean" dir="return"/>
10320 </method>
10321
10322 <method name="getVisibleRegion">
10323 <desc>
10324 Returns the visible region of this frame buffer.
10325
10326 If the @a rectangles parameter is @c null then the value of the
10327 @a count parameter is ignored and the number of elements necessary to
10328 describe the current visible region is returned in @a countCopied.
10329
10330 If @a rectangles is not @c null but @a count is less
10331 than the required number of elements to store region data, the method
10332 will report a failure. If @a count is equal or greater than the
10333 required number of elements, then the actual number of elements copied
10334 to the provided array will be returned in @a countCopied.
10335
10336 <note>
10337 The address of the provided array must be in the process space of
10338 this IFramebuffer object.
10339 </note>
10340 <note>
10341 Method not yet implemented.
10342 </note>
10343 </desc>
10344 <param name="rectangles" type="octet" mod="ptr" dir="in">
10345 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10346 </param>
10347 <param name="count" type="unsigned long" dir="in">
10348 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10349 </param>
10350 <param name="countCopied" type="unsigned long" dir="return">
10351 <desc>Number of elements copied to the @a rectangles array.</desc>
10352 </param>
10353 </method>
10354
10355 <method name="setVisibleRegion">
10356 <desc>
10357 Suggests a new visible region to this frame buffer. This region
10358 represents the area of the VM display which is a union of regions of
10359 all top-level windows of the guest operating system running inside the
10360 VM (if the Guest Additions for this system support this
10361 functionality). This information may be used by the frontends to
10362 implement the seamless desktop integration feature.
10363
10364 <note>
10365 The address of the provided array must be in the process space of
10366 this IFramebuffer object.
10367 </note>
10368 <note>
10369 The IFramebuffer implementation must make a copy of the provided
10370 array of rectangles.
10371 </note>
10372 <note>
10373 Method not yet implemented.
10374 </note>
10375 </desc>
10376 <param name="rectangles" type="octet" mod="ptr" dir="in">
10377 <desc>Pointer to the @c RTRECT array.</desc>
10378 </param>
10379 <param name="count" type="unsigned long" dir="in">
10380 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10381 </param>
10382 </method>
10383
10384 <method name="processVHWACommand">
10385 <desc>
10386 Posts a Video HW Acceleration Command to the frame buffer for processing.
10387 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10388 are posted from quest to the host to be processed by the host hardware.
10389
10390 <note>
10391 The address of the provided command must be in the process space of
10392 this IFramebuffer object.
10393 </note>
10394 </desc>
10395
10396 <param name="command" type="octet" mod="ptr" dir="in">
10397 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10398 </param>
10399 </method>
10400
10401 </interface>
10402
10403 <interface
10404 name="IFramebufferOverlay" extends="IFramebuffer"
10405 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10406 wsmap="suppress"
10407 >
10408 <desc>
10409 The IFramebufferOverlay interface represents an alpha blended overlay
10410 for displaying status icons above an IFramebuffer. It is always created
10411 not visible, so that it must be explicitly shown. It only covers a
10412 portion of the IFramebuffer, determined by its width, height and
10413 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10414 that order) format, and may be written to directly. Do re-read the
10415 width though, after setting it, as it may be adjusted (increased) to
10416 make it more suitable for the front end.
10417 </desc>
10418 <attribute name="x" type="unsigned long" readonly="yes">
10419 <desc>X position of the overlay, relative to the frame buffer.</desc>
10420 </attribute>
10421
10422 <attribute name="y" type="unsigned long" readonly="yes">
10423 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10424 </attribute>
10425
10426 <attribute name="visible" type="boolean" readonly="no">
10427 <desc>
10428 Whether the overlay is currently visible.
10429 </desc>
10430 </attribute>
10431
10432 <attribute name="alpha" type="unsigned long" readonly="no">
10433 <desc>
10434 The global alpha value for the overlay. This may or may not be
10435 supported by a given front end.
10436 </desc>
10437 </attribute>
10438
10439 <method name="move">
10440 <desc>
10441 Changes the overlay's position relative to the IFramebuffer.
10442 </desc>
10443 <param name="x" type="unsigned long" dir="in"/>
10444 <param name="y" type="unsigned long" dir="in"/>
10445 </method>
10446
10447 </interface>
10448
10449 <interface
10450 name="IDisplay" extends="$unknown"
10451 uuid="e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000"
10452 wsmap="managed"
10453 >
10454 <desc>
10455 The IDisplay interface represents the virtual machine's display.
10456
10457 The object implementing this interface is contained in each
10458 <link to="IConsole::display"/> attribute and represents the visual
10459 output of the virtual machine.
10460
10461 The virtual display supports pluggable output targets represented by the
10462 IFramebuffer interface. Examples of the output target are a window on
10463 the host computer or an RDP session's display on a remote computer.
10464 </desc>
10465 <attribute name="width" type="unsigned long" readonly="yes">
10466 <desc>Current display width.</desc>
10467 </attribute>
10468
10469 <attribute name="height" type="unsigned long" readonly="yes">
10470 <desc>Current display height.</desc>
10471 </attribute>
10472
10473 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10474 <desc>
10475 Current guest display color depth. Note that this may differ
10476 from <link to="IFramebuffer::bitsPerPixel"/>.
10477 </desc>
10478 </attribute>
10479
10480 <method name="setFramebuffer">
10481 <desc>
10482 Sets the framebuffer for given screen.
10483 </desc>
10484 <param name="screenId" type="unsigned long" dir="in"/>
10485 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10486 </method>
10487
10488 <method name="getFramebuffer">
10489 <desc>
10490 Queries the framebuffer for given screen.
10491 </desc>
10492 <param name="screenId" type="unsigned long" dir="in"/>
10493 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10494 <param name="xOrigin" type="long" dir="out"/>
10495 <param name="yOrigin" type="long" dir="out"/>
10496 </method>
10497
10498 <method name="setVideoModeHint">
10499 <desc>
10500 Asks VirtualBox to request the given video mode from
10501 the guest. This is just a hint and it cannot be guaranteed
10502 that the requested resolution will be used. Guest Additions
10503 are required for the request to be seen by guests. The caller
10504 should issue the request and wait for a resolution change and
10505 after a timeout retry.
10506
10507 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10508 parameters means that the corresponding values should be taken from the
10509 current video mode (i.e. left unchanged).
10510
10511 If the guest OS supports multi-monitor configuration then the @a display
10512 parameter specifies the number of the guest display to send the hint to:
10513 @c 0 is the primary display, @c 1 is the first secondary and
10514 so on. If the multi-monitor configuration is not supported, @a display
10515 must be @c 0.
10516
10517 <result name="E_INVALIDARG">
10518 The @a display is not associated with any monitor.
10519 </result>
10520
10521 </desc>
10522 <param name="width" type="unsigned long" dir="in"/>
10523 <param name="height" type="unsigned long" dir="in"/>
10524 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10525 <param name="display" type="unsigned long" dir="in"/>
10526 </method>
10527
10528 <method name="setSeamlessMode">
10529 <desc>
10530 Enables or disables seamless guest display rendering (seamless desktop
10531 integration) mode.
10532 <note>
10533 Calling this method has no effect if <link
10534 to="IGuest::supportsSeamless"/> returns @c false.
10535 </note>
10536 </desc>
10537 <param name="enabled" type="boolean" dir="in"/>
10538 </method>
10539
10540 <method name="takeScreenShot">
10541 <desc>
10542 Takes a screen shot of the requested size and copies it to the
10543 32-bpp buffer allocated by the caller and pointed to by @a address.
10544
10545 <note>This API can be used only by the COM/XPCOM C++ API as it
10546 requires pointer support. Use <link to="#takeScreenShotSlow" />
10547 with other language bindings.
10548 </note>
10549
10550 <result name="E_NOTIMPL">
10551 Feature not implemented.
10552 </result>
10553 <result name="VBOX_E_IPRT_ERROR">
10554 Could not take a screenshot.
10555 </result>
10556
10557 </desc>
10558 <param name="address" type="octet" mod="ptr" dir="in"/>
10559 <param name="width" type="unsigned long" dir="in"/>
10560 <param name="height" type="unsigned long" dir="in"/>
10561 </method>
10562
10563 <method name="takeScreenShotSlow">
10564 <desc>
10565 Takes a guest screen shot of the requested size and returns it as
10566 an array of bytes in uncompressed 32-bit ARGB format.
10567 This API is slow, but could be the only option to get guest screenshot
10568 for scriptable languages not allowed to manipulate with addresses
10569 directly.
10570
10571 <result name="E_NOTIMPL">
10572 Feature not implemented.
10573 </result>
10574 <result name="VBOX_E_IPRT_ERROR">
10575 Could not take a screenshot.
10576 </result>
10577 </desc>
10578 <param name="width" type="unsigned long" dir="in">
10579 <desc>
10580 Desired image width.
10581 </desc>
10582 </param>
10583 <param name="height" type="unsigned long" dir="in">
10584 <desc>
10585 Desired image height.
10586 </desc>
10587 </param>
10588 <param name="screenData" type="octet" dir="return" safearray="yes">
10589 <desc>
10590 Array with resulting screen data.
10591 </desc>
10592 </param>
10593 </method>
10594
10595 <method name="drawToScreen">
10596 <desc>
10597 Draws a 32-bpp image of the specified size from the given buffer
10598 to the given point on the VM display.
10599
10600 <result name="E_NOTIMPL">
10601 Feature not implemented.
10602 </result>
10603 <result name="VBOX_E_IPRT_ERROR">
10604 Could not draw to screen.
10605 </result>
10606
10607 </desc>
10608 <param name="address" type="octet" mod="ptr" dir="in"/>
10609 <param name="x" type="unsigned long" dir="in"/>
10610 <param name="y" type="unsigned long" dir="in"/>
10611 <param name="width" type="unsigned long" dir="in"/>
10612 <param name="height" type="unsigned long" dir="in"/>
10613 </method>
10614
10615 <method name="invalidateAndUpdate">
10616 <desc>
10617 Does a full invalidation of the VM display and instructs the VM
10618 to update it.
10619
10620 <result name="VBOX_E_IPRT_ERROR">
10621 Could not invalidate and update screen.
10622 </result>
10623
10624 </desc>
10625 </method>
10626
10627 <method name="resizeCompleted">
10628 <desc>
10629 Signals that a framebuffer has completed the resize operation.
10630
10631 <result name="VBOX_E_NOT_SUPPORTED">
10632 Operation only valid for external frame buffers.
10633 </result>
10634
10635 </desc>
10636 <param name="screenId" type="unsigned long" dir="in"/>
10637 </method>
10638
10639 <method name="updateCompleted">
10640 <desc>
10641 Signals that a framebuffer has completed the update operation.
10642
10643 <result name="VBOX_E_NOT_SUPPORTED">
10644 Operation only valid for external frame buffers.
10645 </result>
10646
10647 </desc>
10648 </method>
10649
10650 <method name="completeVHWACommand">
10651 <desc>
10652 Signals that the Video HW Acceleration command has completed.
10653 </desc>
10654
10655 <param name="command" type="octet" mod="ptr" dir="in">
10656 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
10657 </param>
10658 </method>
10659
10660 </interface>
10661
10662 <!--
10663 // INetworkAdapter
10664 /////////////////////////////////////////////////////////////////////////
10665 -->
10666
10667 <enum
10668 name="NetworkAttachmentType"
10669 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10670 >
10671 <desc>
10672 Network attachment type.
10673 </desc>
10674
10675 <const name="Null" value="0">
10676 <desc>Null value, also means "not attached".</desc>
10677 </const>
10678 <const name="NAT" value="1"/>
10679 <const name="Bridged" value="2"/>
10680 <const name="Internal" value="3"/>
10681 <const name="HostOnly" value="4"/>
10682 </enum>
10683
10684 <enum
10685 name="NetworkAdapterType"
10686 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
10687 >
10688 <desc>
10689 Network adapter type.
10690 </desc>
10691
10692 <const name="Null" value="0">
10693 <desc>Null value (never used by the API).</desc>
10694 </const>
10695 <const name="Am79C970A" value="1">
10696 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
10697 </const>
10698 <const name="Am79C973" value="2">
10699 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
10700 </const>
10701 <const name="I82540EM" value="3">
10702 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
10703 </const>
10704 <const name="I82543GC" value="4">
10705 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
10706 </const>
10707 <const name="I82545EM" value="5">
10708 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
10709 </const>
10710 <const name="Virtio" value="6">
10711 <desc>Virtio network device.</desc>
10712 </const>
10713 </enum>
10714
10715 <interface
10716 name="INetworkAdapter" extends="$unknown"
10717 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10718 wsmap="managed"
10719 >
10720 <desc>
10721 Represents a virtual network adapter that is attached to a virtual machine.
10722 Each virtual machine has a fixed number of network adapter slots with one
10723 instance of this attached to each of them. Call
10724 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10725 is attached to a given slot in a given machine.
10726
10727 Each network adapter can be in one of five attachment modes, which are
10728 represented by the <link to="NetworkAttachmentType" /> enumeration;
10729 see the <link to="#attachmentType" /> attribute.
10730 </desc>
10731
10732 <attribute name="adapterType" type="NetworkAdapterType">
10733 <desc>
10734 Type of the virtual network adapter. Depending on this value,
10735 VirtualBox will provide a different virtual network hardware
10736 to the guest.
10737 </desc>
10738 </attribute>
10739
10740 <attribute name="slot" type="unsigned long" readonly="yes">
10741 <desc>
10742 Slot number this adapter is plugged into. Corresponds to
10743 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10744 to obtain this instance.
10745 </desc>
10746 </attribute>
10747
10748 <attribute name="enabled" type="boolean">
10749 <desc>
10750 Flag whether the network adapter is present in the
10751 guest system. If disabled, the virtual guest hardware will
10752 not contain this network adapter. Can only be changed when
10753 the VM is not running.
10754 </desc>
10755 </attribute>
10756
10757 <attribute name="MACAddress" type="wstring">
10758 <desc>
10759 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10760 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
10761 </desc>
10762 </attribute>
10763
10764 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10765
10766 <attribute name="hostInterface" type="wstring">
10767 <desc>
10768 Name of the host network interface the VM is attached to.
10769 </desc>
10770 </attribute>
10771
10772 <attribute name="internalNetwork" type="wstring">
10773 <desc>
10774 Name of the internal network the VM is attached to.
10775 </desc>
10776 </attribute>
10777
10778 <attribute name="NATNetwork" type="wstring">
10779 <desc>
10780 Name of the NAT network the VM is attached to.
10781 </desc>
10782 </attribute>
10783
10784 <attribute name="cableConnected" type="boolean">
10785 <desc>
10786 Flag whether the adapter reports the cable as connected or not.
10787 It can be used to report offline situations to a VM.
10788 </desc>
10789 </attribute>
10790
10791 <attribute name="lineSpeed" type="unsigned long">
10792 <desc>
10793 Line speed reported by custom drivers, in units of 1 kbps.
10794 </desc>
10795 </attribute>
10796
10797 <attribute name="traceEnabled" type="boolean">
10798 <desc>
10799 Flag whether network traffic from/to the network card should be traced.
10800 Can only be toggled when the VM is turned off.
10801 </desc>
10802 </attribute>
10803
10804 <attribute name="traceFile" type="wstring">
10805 <desc>
10806 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10807 will be used.
10808 </desc>
10809 </attribute>
10810
10811 <method name="attachToNAT">
10812 <desc>
10813 Attach the network adapter to the Network Address Translation (NAT) interface.
10814 </desc>
10815 </method>
10816
10817 <method name="attachToBridgedInterface">
10818 <desc>
10819 Attach the network adapter to a bridged host interface.
10820 </desc>
10821 </method>
10822
10823 <method name="attachToInternalNetwork">
10824 <desc>
10825 Attach the network adapter to an internal network.
10826 </desc>
10827 </method>
10828
10829 <method name="attachToHostOnlyInterface">
10830 <desc>
10831 Attach the network adapter to the host-only network.
10832 </desc>
10833 </method>
10834
10835 <method name="detach">
10836 <desc>
10837 Detach the network adapter
10838 </desc>
10839 </method>
10840 </interface>
10841
10842
10843 <!--
10844 // ISerialPort
10845 /////////////////////////////////////////////////////////////////////////
10846 -->
10847
10848 <enum
10849 name="PortMode"
10850 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
10851 >
10852 <desc>
10853 The PortMode enumeration represents possible communication modes for
10854 the virtual serial port device.
10855 </desc>
10856
10857 <const name="Disconnected" value="0">
10858 <desc>Virtual device is not attached to any real host device.</desc>
10859 </const>
10860 <const name="HostPipe" value="1">
10861 <desc>Virtual device is attached to a host pipe.</desc>
10862 </const>
10863 <const name="HostDevice" value="2">
10864 <desc>Virtual device is attached to a host device.</desc>
10865 </const>
10866 <const name="RawFile" value="3">
10867 <desc>Virtual device is attached to a raw file.</desc>
10868 </const>
10869 </enum>
10870
10871 <interface
10872 name="ISerialPort" extends="$unknown"
10873 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
10874 wsmap="managed"
10875 >
10876
10877 <desc>
10878 The ISerialPort interface represents the virtual serial port device.
10879
10880 The virtual serial port device acts like an ordinary serial port
10881 inside the virtual machine. This device communicates to the real
10882 serial port hardware in one of two modes: host pipe or host device.
10883
10884 In host pipe mode, the #path attribute specifies the path to the pipe on
10885 the host computer that represents a serial port. The #server attribute
10886 determines if this pipe is created by the virtual machine process at
10887 machine startup or it must already exist before starting machine
10888 execution.
10889
10890 In host device mode, the #path attribute specifies the name of the
10891 serial port device on the host computer.
10892
10893 There is also a third communication mode: the disconnected mode. In this
10894 mode, the guest OS running inside the virtual machine will be able to
10895 detect the serial port, but all port write operations will be discarded
10896 and all port read operations will return no data.
10897
10898 <see>IMachine::getSerialPort</see>
10899 </desc>
10900
10901 <attribute name="slot" type="unsigned long" readonly="yes">
10902 <desc>
10903 Slot number this serial port is plugged into. Corresponds to
10904 the value you pass to <link to="IMachine::getSerialPort"/>
10905 to obtain this instance.
10906 </desc>
10907 </attribute>
10908
10909 <attribute name="enabled" type="boolean">
10910 <desc>
10911 Flag whether the serial port is enabled. If disabled,
10912 the serial port will not be reported to the guest OS.
10913 </desc>
10914 </attribute>
10915
10916 <attribute name="IOBase" type="unsigned long">
10917 <desc>Base I/O address of the serial port.</desc>
10918 </attribute>
10919
10920 <attribute name="IRQ" type="unsigned long">
10921 <desc>IRQ number of the serial port.</desc>
10922 </attribute>
10923
10924 <attribute name="hostMode" type="PortMode">
10925 <desc>
10926 How is this port connected to the host.
10927 <note>
10928 Changing this attribute may fail if the conditions for
10929 <link to="#path"/> are not met.
10930 </note>
10931 </desc>
10932 </attribute>
10933
10934 <attribute name="server" type="boolean">
10935 <desc>
10936 Flag whether this serial port acts as a server (creates a new pipe on
10937 the host) or as a client (uses the existing pipe). This attribute is
10938 used only when <link to="#hostMode"/> is PortMode_HostPipe.
10939 </desc>
10940 </attribute>
10941
10942 <attribute name="path" type="wstring">
10943 <desc>
10944 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
10945 PortMode_HostPipe, or the host serial device name when
10946 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
10947 cases, setting a @c null or empty string as the attribute's value
10948 is an error. Otherwise, the value of this property is ignored.
10949 </desc>
10950 </attribute>
10951
10952 </interface>
10953
10954 <!--
10955 // IParallelPort
10956 /////////////////////////////////////////////////////////////////////////
10957 -->
10958
10959 <interface
10960 name="IParallelPort" extends="$unknown"
10961 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
10962 wsmap="managed"
10963 >
10964
10965 <desc>
10966 The IParallelPort interface represents the virtual parallel port device.
10967
10968 The virtual parallel port device acts like an ordinary parallel port
10969 inside the virtual machine. This device communicates to the real
10970 parallel port hardware using the name of the parallel device on the host
10971 computer specified in the #path attribute.
10972
10973 Each virtual parallel port device is assigned a base I/O address and an
10974 IRQ number that will be reported to the guest operating system and used
10975 to operate the given parallel port from within the virtual machine.
10976
10977 <see>IMachine::getParallelPort</see>
10978 </desc>
10979
10980 <attribute name="slot" type="unsigned long" readonly="yes">
10981 <desc>
10982 Slot number this parallel port is plugged into. Corresponds to
10983 the value you pass to <link to="IMachine::getParallelPort"/>
10984 to obtain this instance.
10985 </desc>
10986 </attribute>
10987
10988 <attribute name="enabled" type="boolean">
10989 <desc>
10990 Flag whether the parallel port is enabled. If disabled,
10991 the parallel port will not be reported to the guest OS.
10992 </desc>
10993 </attribute>
10994
10995 <attribute name="IOBase" type="unsigned long">
10996 <desc>Base I/O address of the parallel port.</desc>
10997 </attribute>
10998
10999 <attribute name="IRQ" type="unsigned long">
11000 <desc>IRQ number of the parallel port.</desc>
11001 </attribute>
11002
11003 <attribute name="path" type="wstring">
11004 <desc>
11005 Host parallel device name. If this parallel port is enabled, setting a
11006 @c null or an empty string as this attribute's value will result into
11007 an error.
11008 </desc>
11009 </attribute>
11010
11011 </interface>
11012
11013
11014 <!--
11015 // IMachineDebugger
11016 /////////////////////////////////////////////////////////////////////////
11017 -->
11018
11019 <interface
11020 name="IMachineDebugger" extends="$unknown"
11021 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11022 wsmap="suppress"
11023 >
11024 <method name="resetStats">
11025 <desc>
11026 Reset VM statistics.
11027 </desc>
11028 <param name="pattern" type="wstring" dir="in">
11029 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11030 </param>
11031 </method>
11032
11033 <method name="dumpStats">
11034 <desc>
11035 Dumps VM statistics.
11036 </desc>
11037 <param name="pattern" type="wstring" dir="in">
11038 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11039 </param>
11040 </method>
11041
11042 <method name="getStats">
11043 <desc>
11044 Get the VM statistics in a XMLish format.
11045 </desc>
11046 <param name="pattern" type="wstring" dir="in">
11047 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11048 </param>
11049 <param name="withDescriptions" type="boolean" dir="in">
11050 <desc>Whether to include the descriptions.</desc>
11051 </param>
11052 <param name="stats" type="wstring" dir="out">
11053 <desc>The XML document containing the statistics.</desc>
11054 </param>
11055 </method>
11056
11057 <method name="injectNMI">
11058 <desc>
11059 Inject an NMI into a running VT-x/AMD-V VM.
11060 </desc>
11061 </method>
11062
11063 <attribute name="singlestep" type="boolean">
11064 <desc>Switch for enabling singlestepping.</desc>
11065 </attribute>
11066
11067 <attribute name="recompileUser" type="boolean">
11068 <desc>Switch for forcing code recompilation for user mode code.</desc>
11069 </attribute>
11070
11071 <attribute name="recompileSupervisor" type="boolean">
11072 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11073 </attribute>
11074
11075 <attribute name="PATMEnabled" type="boolean">
11076 <desc>Switch for enabling and disabling the PATM component.</desc>
11077 </attribute>
11078
11079 <attribute name="CSAMEnabled" type="boolean">
11080 <desc>Switch for enabling and disabling the CSAM component.</desc>
11081 </attribute>
11082
11083 <attribute name="logEnabled" type="boolean">
11084 <desc>Switch for enabling and disabling logging.</desc>
11085 </attribute>
11086
11087 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11088 <desc>
11089 Flag indicating whether the VM is currently making use of CPU hardware
11090 virtualization extensions.
11091 </desc>
11092 </attribute>
11093
11094 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11095 <desc>
11096 Flag indicating whether the VM is currently making use of the nested paging
11097 CPU hardware virtualization extension.
11098 </desc>
11099 </attribute>
11100
11101 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11102 <desc>
11103 Flag indicating whether the VM is currently making use of the VPID
11104 VT-x extension.
11105 </desc>
11106 </attribute>
11107
11108 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11109 <desc>
11110 Flag indicating whether the VM is currently making use of the Physical
11111 Address Extension CPU feature.
11112 </desc>
11113 </attribute>
11114
11115 <attribute name="virtualTimeRate" type="unsigned long">
11116 <desc>
11117 The rate at which the virtual time runs expressed as a percentage.
11118 The accepted range is 2% to 20000%.
11119 </desc>
11120 </attribute>
11121
11122 <!-- @todo method for setting log flags, groups and destination! -->
11123
11124 <attribute name="VM" type="unsigned long long" readonly="yes">
11125 <desc>
11126 Gets the VM handle. This is only for internal use while
11127 we carve the details of this interface.
11128 </desc>
11129 </attribute>
11130
11131 </interface>
11132
11133 <!--
11134 // IUSBController
11135 /////////////////////////////////////////////////////////////////////////
11136 -->
11137
11138 <interface
11139 name="IUSBController" extends="$unknown"
11140 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11141 wsmap="managed"
11142 >
11143 <attribute name="enabled" type="boolean">
11144 <desc>
11145 Flag whether the USB controller is present in the
11146 guest system. If disabled, the virtual guest hardware will
11147 not contain any USB controller. Can only be changed when
11148 the VM is powered off.
11149 </desc>
11150 </attribute>
11151
11152 <attribute name="enabledEhci" type="boolean">
11153 <desc>
11154 Flag whether the USB EHCI controller is present in the
11155 guest system. If disabled, the virtual guest hardware will
11156 not contain a USB EHCI controller. Can only be changed when
11157 the VM is powered off.
11158 </desc>
11159 </attribute>
11160
11161 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11162 <desc>
11163 USB standard version which the controller implements.
11164 This is a BCD which means that the major version is in the
11165 high byte and minor version is in the low byte.
11166 </desc>
11167 </attribute>
11168
11169 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11170 <desc>
11171 List of USB device filters associated with the machine.
11172
11173 If the machine is currently running, these filters are activated
11174 every time a new (supported) USB device is attached to the host
11175 computer that was not ignored by global filters
11176 (<link to="IHost::USBDeviceFilters"/>).
11177
11178 These filters are also activated when the machine is powered up.
11179 They are run against a list of all currently available USB
11180 devices (in states
11181 <link to="USBDeviceState_Available"/>,
11182 <link to="USBDeviceState_Busy"/>,
11183 <link to="USBDeviceState_Held"/>) that were not previously
11184 ignored by global filters.
11185
11186 If at least one filter matches the USB device in question, this
11187 device is automatically captured (attached to) the virtual USB
11188 controller of this machine.
11189
11190 <see>IUSBDeviceFilter, ::IUSBController</see>
11191 </desc>
11192 </attribute>
11193
11194 <method name="createDeviceFilter">
11195 <desc>
11196 Creates a new USB device filter. All attributes except
11197 the filter name are set to empty (any match),
11198 <i>active</i> is @c false (the filter is not active).
11199
11200 The created filter can then be added to the list of filters using
11201 <link to="#insertDeviceFilter"/>.
11202
11203 <result name="VBOX_E_INVALID_VM_STATE">
11204 The virtual machine is not mutable.
11205 </result>
11206
11207 <see>#deviceFilters</see>
11208 </desc>
11209 <param name="name" type="wstring" dir="in">
11210 <desc>
11211 Filter name. See <link to="IUSBDeviceFilter::name"/>
11212 for more info.
11213 </desc>
11214 </param>
11215 <param name="filter" type="IUSBDeviceFilter" dir="return">
11216 <desc>Created filter object.</desc>
11217 </param>
11218 </method>
11219
11220 <method name="insertDeviceFilter">
11221 <desc>
11222 Inserts the given USB device to the specified position
11223 in the list of filters.
11224
11225 Positions are numbered starting from <tt>0</tt>. If the specified
11226 position is equal to or greater than the number of elements in
11227 the list, the filter is added to the end of the collection.
11228
11229 <note>
11230 Duplicates are not allowed, so an attempt to insert a
11231 filter that is already in the collection, will return an
11232 error.
11233 </note>
11234
11235 <result name="VBOX_E_INVALID_VM_STATE">
11236 Virtual machine is not mutable.
11237 </result>
11238 <result name="E_INVALIDARG">
11239 USB device filter not created within this VirtualBox instance.
11240 </result>
11241 <result name="VBOX_E_INVALID_OBJECT_STATE">
11242 USB device filter already in list.
11243 </result>
11244
11245 <see>#deviceFilters</see>
11246 </desc>
11247 <param name="position" type="unsigned long" dir="in">
11248 <desc>Position to insert the filter to.</desc>
11249 </param>
11250 <param name="filter" type="IUSBDeviceFilter" dir="in">
11251 <desc>USB device filter to insert.</desc>
11252 </param>
11253 </method>
11254
11255 <method name="removeDeviceFilter">
11256 <desc>
11257 Removes a USB device filter from the specified position in the
11258 list of filters.
11259
11260 Positions are numbered starting from <tt>0</tt>. Specifying a
11261 position equal to or greater than the number of elements in
11262 the list will produce an error.
11263
11264 <see>#deviceFilters</see>
11265
11266 <result name="VBOX_E_INVALID_VM_STATE">
11267 Virtual machine is not mutable.
11268 </result>
11269 <result name="E_INVALIDARG">
11270 USB device filter list empty or invalid @a position.
11271 </result>
11272
11273 </desc>
11274 <param name="position" type="unsigned long" dir="in">
11275 <desc>Position to remove the filter from.</desc>
11276 </param>
11277 <param name="filter" type="IUSBDeviceFilter" dir="return">
11278 <desc>Removed USB device filter.</desc>
11279 </param>
11280 </method>
11281
11282 </interface>
11283
11284
11285 <!--
11286 // IUSBDevice
11287 /////////////////////////////////////////////////////////////////////////
11288 -->
11289
11290 <interface
11291 name="IUSBDevice" extends="$unknown"
11292 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11293 wsmap="managed"
11294 >
11295 <desc>
11296 The IUSBDevice interface represents a virtual USB device attached to the
11297 virtual machine.
11298
11299 A collection of objects implementing this interface is stored in the
11300 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11301 attached to a running virtual machine's USB controller.
11302 </desc>
11303
11304 <attribute name="id" type="uuid" mod="string" readonly="yes">
11305 <desc>
11306 Unique USB device ID. This ID is built from #vendorId,
11307 #productId, #revision and #serialNumber.
11308 </desc>
11309 </attribute>
11310
11311 <attribute name="vendorId" type="unsigned short" readonly="yes">
11312 <desc>Vendor ID.</desc>
11313 </attribute>
11314
11315 <attribute name="productId" type="unsigned short" readonly="yes">
11316 <desc>Product ID.</desc>
11317 </attribute>
11318
11319 <attribute name="revision" type="unsigned short" readonly="yes">
11320 <desc>
11321 Product revision number. This is a packed BCD represented as
11322 unsigned short. The high byte is the integer part and the low
11323 byte is the decimal.
11324 </desc>
11325 </attribute>
11326
11327 <attribute name="manufacturer" type="wstring" readonly="yes">
11328 <desc>Manufacturer string.</desc>
11329 </attribute>
11330
11331 <attribute name="product" type="wstring" readonly="yes">
11332 <desc>Product string.</desc>
11333 </attribute>
11334
11335 <attribute name="serialNumber" type="wstring" readonly="yes">
11336 <desc>Serial number string.</desc>
11337 </attribute>
11338
11339 <attribute name="address" type="wstring" readonly="yes">
11340 <desc>Host specific address of the device.</desc>
11341 </attribute>
11342
11343 <attribute name="port" type="unsigned short" readonly="yes">
11344 <desc>
11345 Host USB port number the device is physically
11346 connected to.
11347 </desc>
11348 </attribute>
11349
11350 <attribute name="version" type="unsigned short" readonly="yes">
11351 <desc>
11352 The major USB version of the device - 1 or 2.
11353 </desc>
11354 </attribute>
11355
11356 <attribute name="portVersion" type="unsigned short" readonly="yes">
11357 <desc>
11358 The major USB version of the host USB port the device is
11359 physically connected to - 1 or 2. For devices not connected to
11360 anything this will have the same value as the version attribute.
11361 </desc>
11362 </attribute>
11363
11364 <attribute name="remote" type="boolean" readonly="yes">
11365 <desc>
11366 Whether the device is physically connected to a remote VRDP
11367 client or to a local host machine.
11368 </desc>
11369 </attribute>
11370
11371 </interface>
11372
11373
11374 <!--
11375 // IUSBDeviceFilter
11376 /////////////////////////////////////////////////////////////////////////
11377 -->
11378
11379 <interface
11380 name="IUSBDeviceFilter" extends="$unknown"
11381 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11382 wsmap="managed"
11383 >
11384 <desc>
11385 The IUSBDeviceFilter interface represents an USB device filter used
11386 to perform actions on a group of USB devices.
11387
11388 This type of filters is used by running virtual machines to
11389 automatically capture selected USB devices once they are physically
11390 attached to the host computer.
11391
11392 A USB device is matched to the given device filter if and only if all
11393 attributes of the device match the corresponding attributes of the
11394 filter (that is, attributes are joined together using the logical AND
11395 operation). On the other hand, all together, filters in the list of
11396 filters carry the semantics of the logical OR operation. So if it is
11397 desirable to create a match like "this vendor id OR this product id",
11398 one needs to create two filters and specify "any match" (see below)
11399 for unused attributes.
11400
11401 All filter attributes used for matching are strings. Each string
11402 is an expression representing a set of values of the corresponding
11403 device attribute, that will match the given filter. Currently, the
11404 following filtering expressions are supported:
11405
11406 <ul>
11407 <li><i>Interval filters</i>. Used to specify valid intervals for
11408 integer device attributes (Vendor ID, Product ID and Revision).
11409 The format of the string is:
11410
11411 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11412
11413 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11414 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11415 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11416 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11417 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11418 possible integer is assumed.
11419 </li>
11420 <li><i>Boolean filters</i>. Used to specify acceptable values for
11421 boolean device attributes. The format of the string is:
11422
11423 <tt>true|false|yes|no|0|1</tt>
11424
11425 </li>
11426 <li><i>Exact match</i>. Used to specify a single value for the given
11427 device attribute. Any string that doesn't start with <tt>int:</tt>
11428 represents the exact match. String device attributes are compared to
11429 this string including case of symbols. Integer attributes are first
11430 converted to a string (see individual filter attributes) and then
11431 compared ignoring case.
11432
11433 </li>
11434 <li><i>Any match</i>. Any value of the corresponding device attribute
11435 will match the given filter. An empty or @c null string is
11436 used to construct this type of filtering expressions.
11437
11438 </li>
11439 </ul>
11440
11441 <note>
11442 On the Windows host platform, interval filters are not currently
11443 available. Also all string filter attributes
11444 (<link to="#manufacturer"/>, <link to="#product"/>,
11445 <link to="#serialNumber"/>) are ignored, so they behave as
11446 <i>any match</i> no matter what string expression is specified.
11447 </note>
11448
11449 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11450 </desc>
11451
11452 <attribute name="name" type="wstring">
11453 <desc>
11454 Visible name for this filter.
11455 This name is used to visually distinguish one filter from another,
11456 so it can neither be @c null nor an empty string.
11457 </desc>
11458 </attribute>
11459
11460 <attribute name="active" type="boolean">
11461 <desc>Whether this filter active or has been temporarily disabled.</desc>
11462 </attribute>
11463
11464 <attribute name="vendorId" type="wstring">
11465 <desc>
11466 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11467 The string representation for the <i>exact matching</i>
11468 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11469 (including leading zeroes).
11470 </desc>
11471 </attribute>
11472
11473 <attribute name="productId" type="wstring">
11474 <desc>
11475 <link to="IUSBDevice::productId">Product ID</link> filter.
11476 The string representation for the <i>exact matching</i>
11477 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11478 (including leading zeroes).
11479 </desc>
11480 </attribute>
11481
11482 <attribute name="revision" type="wstring">
11483 <desc>
11484 <link to="IUSBDevice::productId">Product revision number</link>
11485 filter. The string representation for the <i>exact matching</i>
11486 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11487 of the integer part of the revision, and <tt>F</tt> is the
11488 decimal digit of its fractional part (including leading and
11489 trailing zeros).
11490 Note that for interval filters, it's best to use the hexadecimal
11491 form, because the revision is stored as a 16 bit packed BCD value;
11492 so the expression <tt>int:0x0100-0x0199</tt> will match any
11493 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11494 </desc>
11495 </attribute>
11496
11497 <attribute name="manufacturer" type="wstring">
11498 <desc>
11499 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11500 </desc>
11501 </attribute>
11502
11503 <attribute name="product" type="wstring">
11504 <desc>
11505 <link to="IUSBDevice::product">Product</link> filter.
11506 </desc>
11507 </attribute>
11508
11509 <attribute name="serialNumber" type="wstring">
11510 <desc>
11511 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11512 </desc>
11513 </attribute>
11514
11515 <attribute name="port" type="wstring">
11516 <desc>
11517 <link to="IUSBDevice::port">Host USB port</link> filter.
11518 </desc>
11519 </attribute>
11520
11521 <attribute name="remote" type="wstring">
11522 <desc>
11523 <link to="IUSBDevice::remote">Remote state</link> filter.
11524 <note>
11525 This filter makes sense only for machine USB filters,
11526 i.e. it is ignored by IHostUSBDeviceFilter objects.
11527 </note>
11528 </desc>
11529 </attribute>
11530
11531 <attribute name="maskedInterfaces" type="unsigned long">
11532 <desc>
11533 This is an advanced option for hiding one or more USB interfaces
11534 from the guest. The value is a bit mask where the bits that are set
11535 means the corresponding USB interface should be hidden, masked off
11536 if you like.
11537 This feature only works on Linux hosts.
11538 </desc>
11539 </attribute>
11540
11541 </interface>
11542
11543
11544 <!--
11545 // IHostUSBDevice
11546 /////////////////////////////////////////////////////////////////////////
11547 -->
11548
11549 <enum
11550 name="USBDeviceState"
11551 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11552 >
11553 <desc>
11554 USB device state. This enumeration represents all possible states
11555 of the USB device physically attached to the host computer regarding
11556 its state on the host computer and availability to guest computers
11557 (all currently running virtual machines).
11558
11559 Once a supported USB device is attached to the host, global USB
11560 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11561 either ignore the device, or put it to USBDeviceState_Held state, or do
11562 nothing. Unless the device is ignored by global filters, filters of all
11563 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11564 activated that can put it to USBDeviceState_Captured state.
11565
11566 If the device was ignored by global filters, or didn't match
11567 any filters at all (including guest ones), it is handled by the host
11568 in a normal way. In this case, the device state is determined by
11569 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11570 or USBDeviceState_Available, depending on the current device usage.
11571
11572 Besides auto-capturing based on filters, the device can be manually
11573 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11574 state is USBDeviceState_Busy, USBDeviceState_Available or
11575 USBDeviceState_Held.
11576
11577 <note>
11578 Due to differences in USB stack implementations in Linux and Win32,
11579 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11580 only to the Linux version of the product. This also means that (<link
11581 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11582 device state is USBDeviceState_Held.
11583 </note>
11584
11585 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11586 </desc>
11587
11588 <const name="NotSupported" value="0">
11589 <desc>
11590 Not supported by the VirtualBox server, not available to guests.
11591 </desc>
11592 </const>
11593 <const name="Unavailable" value="1">
11594 <desc>
11595 Being used by the host computer exclusively,
11596 not available to guests.
11597 </desc>
11598 </const>
11599 <const name="Busy" value="2">
11600 <desc>
11601 Being used by the host computer, potentially available to guests.
11602 </desc>
11603 </const>
11604 <const name="Available" value="3">
11605 <desc>
11606 Not used by the host computer, available to guests (the host computer
11607 can also start using the device at any time).
11608 </desc>
11609 </const>
11610 <const name="Held" value="4">
11611 <desc>
11612 Held by the VirtualBox server (ignored by the host computer),
11613 available to guests.
11614 </desc>
11615 </const>
11616 <const name="Captured" value="5">
11617 <desc>
11618 Captured by one of the guest computers, not available
11619 to anybody else.
11620 </desc>
11621 </const>
11622 </enum>
11623
11624 <interface
11625 name="IHostUSBDevice" extends="IUSBDevice"
11626 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11627 wsmap="managed"
11628 >
11629 <desc>
11630 The IHostUSBDevice interface represents a physical USB device attached
11631 to the host computer.
11632
11633 Besides properties inherited from IUSBDevice, this interface adds the
11634 <link to="#state"/> property that holds the current state of the USB
11635 device.
11636
11637 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11638 </desc>
11639
11640 <attribute name="state" type="USBDeviceState" readonly="yes">
11641 <desc>
11642 Current state of the device.
11643 </desc>
11644 </attribute>
11645
11646 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11647
11648 </interface>
11649
11650
11651 <!--
11652 // IHostUSBDeviceFilter
11653 /////////////////////////////////////////////////////////////////////////
11654 -->
11655
11656 <enum
11657 name="USBDeviceFilterAction"
11658 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11659 >
11660 <desc>
11661 Actions for host USB device filters.
11662 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11663 </desc>
11664
11665 <const name="Null" value="0">
11666 <desc>Null value (never used by the API).</desc>
11667 </const>
11668 <const name="Ignore" value="1">
11669 <desc>Ignore the matched USB device.</desc>
11670 </const>
11671 <const name="Hold" value="2">
11672 <desc>Hold the matched USB device.</desc>
11673 </const>
11674 </enum>
11675
11676 <interface
11677 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11678 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11679 wsmap="managed"
11680 >
11681 <desc>
11682 The IHostUSBDeviceFilter interface represents a global filter for a
11683 physical USB device used by the host computer. Used indirectly in
11684 <link to="IHost::USBDeviceFilters"/>.
11685
11686 Using filters of this type, the host computer determines the initial
11687 state of the USB device after it is physically attached to the
11688 host's USB controller.
11689
11690 <note>
11691 The <link to="#remote"/> attribute is ignored by this type of
11692 filters, because it makes sense only for
11693 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11694 </note>
11695
11696 <see>IHost::USBDeviceFilters</see>
11697 </desc>
11698
11699 <attribute name="action" type="USBDeviceFilterAction">
11700 <desc>
11701 Action performed by the host when an attached USB device
11702 matches this filter.
11703 </desc>
11704 </attribute>
11705
11706 </interface>
11707
11708 <!--
11709 // IAudioAdapter
11710 /////////////////////////////////////////////////////////////////////////
11711 -->
11712
11713 <enum
11714 name="AudioDriverType"
11715 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11716 >
11717 <desc>
11718 Host audio driver type.
11719 </desc>
11720
11721 <const name="Null" value="0">
11722 <desc>Null value, also means "dummy audio driver".</desc>
11723 </const>
11724 <const name="WinMM" value="1">
11725 <desc>Windows multimedia (Windows hosts only).</desc>
11726 </const>
11727 <const name="OSS" value="2">
11728 <desc>Open Sound System (Linux hosts only).</desc>
11729 </const>
11730 <const name="ALSA" value="3">
11731 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
11732 </const>
11733 <const name="DirectSound" value="4">
11734 <desc>DirectSound (Windows hosts only).</desc>
11735 </const>
11736 <const name="CoreAudio" value="5">
11737 <desc>CoreAudio (Mac hosts only).</desc>
11738 </const>
11739 <const name="MMPM" value="6">
11740 <desc>Reserved for historical reasons.</desc>
11741 </const>
11742 <const name="Pulse" value="7">
11743 <desc>PulseAudio (Linux hosts only).</desc>
11744 </const>
11745 <const name="SolAudio" value="8">
11746 <desc>Solaris audio (Solaris hosts only).</desc>
11747 </const>
11748 </enum>
11749
11750 <enum
11751 name="AudioControllerType"
11752 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11753 >
11754 <desc>
11755 Virtual audio controller type.
11756 </desc>
11757
11758 <const name="AC97" value="0"/>
11759 <const name="SB16" value="1"/>
11760 </enum>
11761
11762 <interface
11763 name="IAudioAdapter" extends="$unknown"
11764 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11765 wsmap="managed"
11766 >
11767 <desc>
11768 The IAudioAdapter interface represents the virtual audio adapter of
11769 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11770 </desc>
11771 <attribute name="enabled" type="boolean">
11772 <desc>
11773 Flag whether the audio adapter is present in the
11774 guest system. If disabled, the virtual guest hardware will
11775 not contain any audio adapter. Can only be changed when
11776 the VM is not running.
11777 </desc>
11778 </attribute>
11779 <attribute name="audioController" type="AudioControllerType">
11780 <desc>
11781 The audio hardware we emulate.
11782 </desc>
11783 </attribute>
11784 <attribute name="audioDriver" type="AudioDriverType">
11785 <desc>
11786 Audio driver the adapter is connected to. This setting
11787 can only be changed when the VM is not running.
11788 </desc>
11789 </attribute>
11790 </interface>
11791
11792 <!--
11793 // IVRDPServer
11794 /////////////////////////////////////////////////////////////////////////
11795 -->
11796
11797 <enum
11798 name="VRDPAuthType"
11799 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11800 >
11801 <desc>
11802 VRDP authentication type.
11803 </desc>
11804
11805 <const name="Null" value="0">
11806 <desc>Null value, also means "no authentication".</desc>
11807 </const>
11808 <const name="External" value="1"/>
11809 <const name="Guest" value="2"/>
11810 </enum>
11811
11812 <interface
11813 name="IVRDPServer" extends="$unknown"
11814 uuid="72e671bc-1712-4052-ad6b-e45e76d9d3e4"
11815 wsmap="managed"
11816 >
11817 <attribute name="enabled" type="boolean">
11818 <desc>VRDP server status.</desc>
11819 </attribute>
11820
11821 <attribute name="ports" type="wstring">
11822 <desc>
11823 VRDP server port numbers.
11824 <note>
11825 This is a string of comma separated TCP port numbers or port number ranges.
11826 The server will try to bind to one of ports from the list. Example
11827 <tt>3000,3010-3012,3015</tt>
11828 </note>
11829 </desc>
11830 </attribute>
11831
11832 <attribute name="netAddress" type="wstring">
11833 <desc>VRDP server address.</desc>
11834 </attribute>
11835
11836 <attribute name="authType" type="VRDPAuthType">
11837 <desc>VRDP authentication method.</desc>
11838 </attribute>
11839
11840 <attribute name="authTimeout" type="unsigned long">
11841 <desc>Timeout for guest authentication. Milliseconds.</desc>
11842 </attribute>
11843
11844 <attribute name="allowMultiConnection" type="boolean">
11845 <desc>
11846 Flag whether multiple simultaneous connections to the VM are permitted.
11847 Note that this will be replaced by a more powerful mechanism in the future.
11848 </desc>
11849 </attribute>
11850
11851 <attribute name="reuseSingleConnection" type="boolean">
11852 <desc>
11853 Flag whether the existing connection must be dropped and a new connection
11854 must be established by the VRDP server, when a new client connects in single
11855 connection mode.
11856 </desc>
11857 </attribute>
11858
11859 </interface>
11860
11861
11862 <!--
11863 // ISharedFolder
11864 /////////////////////////////////////////////////////////////////////////
11865 -->
11866
11867 <interface
11868 name="ISharedFolder" extends="$unknown"
11869 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
11870 wsmap="struct"
11871 >
11872 <desc>
11873 The ISharedFolder interface represents a folder in the host computer's
11874 file system accessible from the guest OS running inside a virtual
11875 machine using an associated logical name.
11876
11877 There are three types of shared folders:
11878 <ul>
11879 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
11880 folders available to all virtual machines.</li>
11881 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
11882 VM-specific shared folders available to the given virtual machine at
11883 startup.</li>
11884 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
11885 VM-specific shared folders created in the session context (for
11886 example, when the virtual machine is running) and automatically
11887 discarded when the session is closed (the VM is powered off).</li>
11888 </ul>
11889
11890 Logical names of shared folders must be unique within the given scope
11891 (global, permanent or transient). However, they do not need to be unique
11892 across scopes. In this case, the definition of the shared folder in a
11893 more specific scope takes precedence over definitions in all other
11894 scopes. The order of precedence is (more specific to more general):
11895 <ol>
11896 <li>Transient definitions</li>
11897 <li>Permanent definitions</li>
11898 <li>Global definitions</li>
11899 </ol>
11900
11901 For example, if MyMachine has a shared folder named
11902 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
11903 transient shared folder named <tt>C_DRIVE</tt> (that points
11904 to <tt>C:\\\\WINDOWS</tt>) will change the definition
11905 of <tt>C_DRIVE</tt> in the guest OS so
11906 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
11907 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
11908 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
11909 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
11910 to <tt>C:\\</tt> if it still exists.
11911
11912 Note that permanent and transient shared folders of different machines
11913 are in different name spaces, so they don't overlap and don't need to
11914 have unique logical names.
11915
11916 <note>
11917 Global shared folders are not implemented in the current version of the
11918 product.
11919 </note>
11920 </desc>
11921
11922 <attribute name="name" type="wstring" readonly="yes">
11923 <desc>Logical name of the shared folder.</desc>
11924 </attribute>
11925
11926 <attribute name="hostPath" type="wstring" readonly="yes">
11927 <desc>Full path to the shared folder in the host file system.</desc>
11928 </attribute>
11929
11930 <attribute name="accessible" type="boolean" readonly="yes">
11931 <desc>
11932 Whether the folder defined by the host path is currently
11933 accessible or not.
11934 For example, the folder can be unaccessible if it is placed
11935 on the network share that is not available by the time
11936 this property is read.
11937 </desc>
11938 </attribute>
11939
11940 <attribute name="writable" type="boolean" readonly="yes">
11941 <desc>
11942 Whether the folder defined by the host path is writable or
11943 not.
11944 </desc>
11945 </attribute>
11946
11947 <attribute name="lastAccessError" type="wstring" readonly="yes">
11948 <desc>
11949 Text message that represents the result of the last accessibility
11950 check.
11951
11952 Accessibility checks are performed each time the <link to="#accessible"/>
11953 attribute is read. An empty string is returned if the last
11954 accessibility check was successful. A non-empty string indicates a
11955 failure and should normally describe a reason of the failure (for
11956 example, a file read error).
11957 </desc>
11958 </attribute>
11959
11960 </interface>
11961
11962 <!--
11963 // ISession
11964 /////////////////////////////////////////////////////////////////////////
11965 -->
11966
11967 <interface
11968 name="IInternalSessionControl" extends="$unknown"
11969 uuid="989e2c33-8dfa-437a-9a15-5ad441d50dbf"
11970 internal="yes"
11971 wsmap="suppress"
11972 >
11973 <method name="getPID">
11974 <desc>PID of the process that has created this Session object.
11975 </desc>
11976 <param name="pid" type="unsigned long" dir="return"/>
11977 </method>
11978
11979 <method name="getRemoteConsole">
11980 <desc>
11981 Returns the console object suitable for remote control.
11982
11983 <result name="VBOX_E_INVALID_VM_STATE">
11984 Session state prevents operation.
11985 </result>
11986 <result name="VBOX_E_INVALID_OBJECT_STATE">
11987 Session type prevents operation.
11988 </result>
11989
11990 </desc>
11991 <param name="console" type="IConsole" dir="return"/>
11992 </method>
11993
11994 <method name="assignMachine">
11995 <desc>
11996 Assigns the machine object associated with this direct-type
11997 session or informs the session that it will be a remote one
11998 (if @a machine == @c null).
11999
12000 <result name="VBOX_E_INVALID_VM_STATE">
12001 Session state prevents operation.
12002 </result>
12003 <result name="VBOX_E_INVALID_OBJECT_STATE">
12004 Session type prevents operation.
12005 </result>
12006
12007 </desc>
12008 <param name="machine" type="IMachine" dir="in"/>
12009 </method>
12010
12011 <method name="assignRemoteMachine">
12012 <desc>
12013 Assigns the machine and the (remote) console object associated with
12014 this remote-type session.
12015
12016 <result name="VBOX_E_INVALID_VM_STATE">
12017 Session state prevents operation.
12018 </result>
12019
12020 </desc>
12021 <param name="machine" type="IMachine" dir="in"/>
12022 <param name="console" type="IConsole" dir="in"/>
12023 </method>
12024
12025 <method name="updateMachineState">
12026 <desc>
12027 Updates the machine state in the VM process.
12028 Must be called only in certain cases
12029 (see the method implementation).
12030
12031 <result name="VBOX_E_INVALID_VM_STATE">
12032 Session state prevents operation.
12033 </result>
12034 <result name="VBOX_E_INVALID_OBJECT_STATE">
12035 Session type prevents operation.
12036 </result>
12037
12038 </desc>
12039 <param name="aMachineState" type="MachineState" dir="in"/>
12040 </method>
12041
12042 <method name="uninitialize">
12043 <desc>
12044 Uninitializes (closes) this session. Used by VirtualBox to close
12045 the corresponding remote session when the direct session dies
12046 or gets closed.
12047
12048 <result name="VBOX_E_INVALID_VM_STATE">
12049 Session state prevents operation.
12050 </result>
12051
12052 </desc>
12053 </method>
12054
12055 <method name="onNetworkAdapterChange">
12056 <desc>
12057 Triggered when settings of a network adapter of the
12058 associated virtual machine have changed.
12059
12060 <result name="VBOX_E_INVALID_VM_STATE">
12061 Session state prevents operation.
12062 </result>
12063 <result name="VBOX_E_INVALID_OBJECT_STATE">
12064 Session type prevents operation.
12065 </result>
12066
12067 </desc>
12068 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12069 <param name="changeAdapter" type="boolean" dir="in"/>
12070 </method>
12071
12072 <method name="onSerialPortChange">
12073 <desc>
12074 Triggered when settings of a serial port of the
12075 associated virtual machine have changed.
12076
12077 <result name="VBOX_E_INVALID_VM_STATE">
12078 Session state prevents operation.
12079 </result>
12080 <result name="VBOX_E_INVALID_OBJECT_STATE">
12081 Session type prevents operation.
12082 </result>
12083
12084 </desc>
12085 <param name="serialPort" type="ISerialPort" dir="in"/>
12086 </method>
12087
12088 <method name="onParallelPortChange">
12089 <desc>
12090 Triggered when settings of a parallel port of the
12091 associated virtual machine have changed.
12092
12093 <result name="VBOX_E_INVALID_VM_STATE">
12094 Session state prevents operation.
12095 </result>
12096 <result name="VBOX_E_INVALID_OBJECT_STATE">
12097 Session type prevents operation.
12098 </result>
12099
12100 </desc>
12101 <param name="parallelPort" type="IParallelPort" dir="in"/>
12102 </method>
12103
12104 <method name="onStorageControllerChange">
12105 <desc>
12106 Triggered when settings of a storage controller of the
12107 associated virtual machine have changed.
12108
12109 <result name="VBOX_E_INVALID_VM_STATE">
12110 Session state prevents operation.
12111 </result>
12112 <result name="VBOX_E_INVALID_OBJECT_STATE">
12113 Session type prevents operation.
12114 </result>
12115
12116 </desc>
12117 </method>
12118
12119 <method name="onMediumChange">
12120 <desc>
12121 Triggered when attached media of the
12122 associated virtual machine have changed.
12123
12124 <result name="VBOX_E_INVALID_VM_STATE">
12125 Session state prevents operation.
12126 </result>
12127 <result name="VBOX_E_INVALID_OBJECT_STATE">
12128 Session type prevents operation.
12129 </result>
12130
12131 </desc>
12132
12133 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12134 </method>
12135
12136 <method name="onVRDPServerChange">
12137 <desc>
12138 Triggered when settings of the VRDP server object of the
12139 associated virtual machine have changed.
12140
12141 <result name="VBOX_E_INVALID_VM_STATE">
12142 Session state prevents operation.
12143 </result>
12144 <result name="VBOX_E_INVALID_OBJECT_STATE">
12145 Session type prevents operation.
12146 </result>
12147
12148 </desc>
12149 </method>
12150
12151 <method name="onUSBControllerChange">
12152 <desc>
12153 Triggered when settings of the USB controller object of the
12154 associated virtual machine have changed.
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 </method>
12165
12166 <method name="onSharedFolderChange">
12167 <desc>
12168 Triggered when a permanent (global or machine) shared folder has been
12169 created or removed.
12170 <note>
12171 We don't pass shared folder parameters in this notification because
12172 the order in which parallel notifications are delivered is not defined,
12173 therefore it could happen that these parameters were outdated by the
12174 time of processing this notification.
12175 </note>
12176
12177 <result name="VBOX_E_INVALID_VM_STATE">
12178 Session state prevents operation.
12179 </result>
12180 <result name="VBOX_E_INVALID_OBJECT_STATE">
12181 Session type prevents operation.
12182 </result>
12183
12184 </desc>
12185 <param name="global" type="boolean" dir="in"/>
12186 </method>
12187
12188 <method name="onUSBDeviceAttach">
12189 <desc>
12190 Triggered when a request to capture a USB device (as a result
12191 of matched USB filters or direct call to
12192 <link to="IConsole::attachUSBDevice"/>) 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="device" type="IUSBDevice" dir="in"/>
12205 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12206 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12207 </method>
12208
12209 <method name="onUSBDeviceDetach">
12210 <desc>
12211 Triggered when a request to release the USB device (as a result
12212 of machine termination or direct call to
12213 <link to="IConsole::detachUSBDevice"/>) has completed.
12214 A @c null @a error object means success, otherwise it
12215 describes a failure.
12216
12217 <result name="VBOX_E_INVALID_VM_STATE">
12218 Session state prevents operation.
12219 </result>
12220 <result name="VBOX_E_INVALID_OBJECT_STATE">
12221 Session type prevents operation.
12222 </result>
12223
12224 </desc>
12225 <param name="id" type="uuid" mod="string" dir="in"/>
12226 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12227 </method>
12228
12229 <method name="onShowWindow">
12230 <desc>
12231 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12232 <link to="IMachine::showConsoleWindow"/> in order to notify
12233 console callbacks
12234 <link to="IConsoleCallback::onCanShowWindow"/>
12235 and <link to="IConsoleCallback::onShowWindow"/>.
12236
12237 <result name="VBOX_E_INVALID_OBJECT_STATE">
12238 Session type prevents operation.
12239 </result>
12240
12241 </desc>
12242 <param name="check" type="boolean" dir="in"/>
12243 <param name="canShow" type="boolean" dir="out"/>
12244 <param name="winId" type="unsigned long long" dir="out"/>
12245 </method>
12246
12247 <method name="accessGuestProperty">
12248 <desc>
12249 Called by <link to="IMachine::getGuestProperty"/> and by
12250 <link to="IMachine::setGuestProperty"/> in order to read and
12251 modify guest properties.
12252
12253 <result name="VBOX_E_INVALID_VM_STATE">
12254 Machine session is not open.
12255 </result>
12256 <result name="VBOX_E_INVALID_OBJECT_STATE">
12257 Session type is not direct.
12258 </result>
12259
12260 </desc>
12261 <param name="name" type="wstring" dir="in"/>
12262 <param name="value" type="wstring" dir="in"/>
12263 <param name="flags" type="wstring" dir="in"/>
12264 <param name="isSetter" type="boolean" dir="in"/>
12265 <param name="retValue" type="wstring" dir="out"/>
12266 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12267 <param name="retFlags" type="wstring" dir="out"/>
12268 </method>
12269
12270 <method name="enumerateGuestProperties">
12271 <desc>
12272 Return a list of the guest properties matching a set of patterns along
12273 with their values, time stamps and flags.
12274
12275 <result name="VBOX_E_INVALID_VM_STATE">
12276 Machine session is not open.
12277 </result>
12278 <result name="VBOX_E_INVALID_OBJECT_STATE">
12279 Session type is not direct.
12280 </result>
12281
12282 </desc>
12283 <param name="patterns" type="wstring" dir="in">
12284 <desc>
12285 The patterns to match the properties against as a comma-separated
12286 string. If this is empty, all properties currently set will be
12287 returned.
12288 </desc>
12289 </param>
12290 <param name="key" type="wstring" dir="out" safearray="yes">
12291 <desc>
12292 The key names of the properties returned.
12293 </desc>
12294 </param>
12295 <param name="value" type="wstring" dir="out" safearray="yes">
12296 <desc>
12297 The values of the properties returned. The array entries match the
12298 corresponding entries in the @a key array.
12299 </desc>
12300 </param>
12301 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12302 <desc>
12303 The time stamps of the properties returned. The array entries match
12304 the corresponding entries in the @a key array.
12305 </desc>
12306 </param>
12307 <param name="flags" type="wstring" dir="out" safearray="yes">
12308 <desc>
12309 The flags of the properties returned. The array entries match the
12310 corresponding entries in the @a key array.
12311 </desc>
12312 </param>
12313 </method>
12314
12315 </interface>
12316
12317 <interface
12318 name="ISession" extends="$dispatched"
12319 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12320 wsmap="managed"
12321 >
12322 <desc>
12323 The ISession interface represents a serialization primitive for virtual
12324 machines.
12325
12326 With VirtualBox, every time one wishes to manipulate a virtual machine
12327 (e.g. change its settings or start execution), a session object is
12328 required. Such an object must be passed to one of the session methods
12329 that open the given session, which then initiates the machine manipulation.
12330
12331 A session serves several purposes: it identifies to the inter-process VirtualBox
12332 code which process is currently working with the virtual machine, and it ensures
12333 that there are no incompatible requests from several processes for the
12334 same virtual machine. Session objects can therefore be thought of as mutex
12335 semaphores that lock virtual machines to prevent conflicting accesses from
12336 several processes.
12337
12338 How sessions objects are used depends on whether you use the Main API
12339 via COM or via the webservice:
12340
12341 <ul>
12342 <li>When using the COM API directly, an object of the Session class from the
12343 VirtualBox type library needs to be created. In regular COM C++ client code,
12344 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12345 This object will then act as a local session object in further calls to open
12346 a session.
12347 </li>
12348
12349 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12350 one session object automatically when <link to="IWebsessionManager::logon" />
12351 is called. A managed object reference to that session object can be retrieved by
12352 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12353 reference can then be used to open sessions.
12354 </li>
12355 </ul>
12356
12357 Sessions are mainly used in two variations:
12358
12359 <ul>
12360 <li>
12361 To start a virtual machine in a separate process, one would call
12362 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12363 object as its first parameter. This session then identifies the caller
12364 and lets him control the started machine (for example, pause machine
12365 execution or power it down) as well as be notified about machine
12366 execution state changes.
12367 </li>
12368
12369 <li>To alter machine settings, or to start machine execution within the
12370 current process, one needs to open a direct session for the machine first by
12371 calling <link to="IVirtualBox::openSession"/>. While a direct session
12372 is open within one process, no any other process may open another direct
12373 session for the same machine. This prevents the machine from being changed
12374 by other processes while it is running or while the machine is being configured.
12375 </li>
12376 </ul>
12377
12378 One also can attach to an existing direct session already opened by
12379 another process (for example, in order to send a control request to the
12380 virtual machine such as the pause or the reset request). This is done by
12381 calling <link to="IVirtualBox::openExistingSession"/>.
12382
12383 <note>
12384 Unless you are trying to write a new VirtualBox front-end that
12385 performs direct machine execution (like the VirtualBox or VBoxSDL
12386 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12387 session opened by <link to="IVirtualBox::openSession"/> and use this
12388 session only to change virtual machine settings. If you simply want to
12389 start virtual machine execution using one of the existing front-ends
12390 (for example the VirtualBox GUI or headless server), simply use
12391 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12392 will power up the machine automatically for you.
12393 </note>
12394 </desc>
12395
12396 <attribute name="state" type="SessionState" readonly="yes">
12397 <desc>Current state of this session.</desc>
12398 </attribute>
12399
12400 <attribute name="type" type="SessionType" readonly="yes">
12401 <desc>
12402 Type of this session. The value of this attribute is valid only
12403 if the session is currently open (i.e. its #state is
12404 SessionType_SessionOpen), otherwise an error will be returned.
12405 </desc>
12406 </attribute>
12407
12408 <attribute name="machine" type="IMachine" readonly="yes">
12409 <desc>Machine object associated with this session.</desc>
12410 </attribute>
12411
12412 <attribute name="console" type="IConsole" readonly="yes">
12413 <desc>Console object associated with this session.</desc>
12414 </attribute>
12415
12416 <method name="close">
12417 <desc>
12418 Closes a session that was previously opened.
12419
12420 It is recommended that every time an "open session" method (such as
12421 <link to="IVirtualBox::openRemoteSession" /> or
12422 <link to="IVirtualBox::openSession" />) has been called to
12423 manipulate a virtual machine, the caller invoke
12424 ISession::close() when it's done doing so. Since sessions are
12425 serialization primitives much like ordinary mutexes, they are
12426 best used the same way: for each "open" call, there should be
12427 a matching "close" call, even when errors occur.
12428
12429 Otherwise, if a direct session for a machine opened with
12430 <link to="IVirtualBox::openSession"/> is not explicitly closed
12431 when the application terminates, the state of the machine will
12432 be set to <link to="MachineState_Aborted" /> on the server.
12433
12434 Generally, it is recommended to close all open sessions explicitly
12435 before terminating the application (regardless of the reason for
12436 the termination).
12437
12438 <note>
12439 Do not expect the session state (<link to="ISession::state" />
12440 to return to "Closed" immediately after you invoke
12441 ISession::close(), particularly if you have started a remote
12442 session to execute the VM in a new process. The session state will
12443 automatically return to "Closed" once the VM is no longer executing,
12444 which can of course take a very long time.
12445 </note>
12446
12447 <result name="E_UNEXPECTED">
12448 Session is not open.
12449 </result>
12450
12451 </desc>
12452 </method>
12453
12454 </interface>
12455
12456 <!--
12457 // IStorageController
12458 /////////////////////////////////////////////////////////////////////////
12459 -->
12460
12461 <enum
12462 name="StorageBus"
12463 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
12464 >
12465 <desc>
12466 The bus type of the storage controller (IDE, SATA, SCSI or Floppy);
12467 see <link to="IStorageController::bus" />.
12468 </desc>
12469 <const name="Null" value="0">
12470 <desc>@c null value. Never used by the API.</desc>
12471 </const>
12472 <const name="IDE" value="1"/>
12473 <const name="SATA" value="2"/>
12474 <const name="SCSI" value="3"/>
12475 <const name="Floppy" value="4"/>
12476 </enum>
12477
12478 <enum
12479 name="StorageControllerType"
12480 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
12481 >
12482 <desc>
12483 The exact variant of storage controller hardware presented
12484 to the guest; see <link to="IStorageController::controllerType" />.
12485 </desc>
12486
12487 <const name="Null" value="0">
12488 <desc>@c null value. Never used by the API.</desc>
12489 </const>
12490 <const name="LsiLogic" value="1">
12491 <desc>A SCSI controller of the LsiLogic variant.</desc>
12492 </const>
12493 <const name="BusLogic" value="2">
12494 <desc>A SCSI controller of the BusLogic variant.</desc>
12495 </const>
12496 <const name="IntelAhci" value="3">
12497 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
12498 </const>
12499 <const name="PIIX3" value="4">
12500 <desc>An IDE controller of the PIIX3 variant.</desc>
12501 </const>
12502 <const name="PIIX4" value="5">
12503 <desc>An IDE controller of the PIIX4 variant.</desc>
12504 </const>
12505 <const name="ICH6" value="6">
12506 <desc>An IDE controller of the ICH6 variant.</desc>
12507 </const>
12508 <const name="I82078" value="7">
12509 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
12510 </const>
12511 </enum>
12512
12513 <interface
12514 name="IStorageController" extends="$unknown"
12515 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12516 wsmap="managed"
12517 >
12518 <desc>
12519 Represents a storage controller that is attached to a virtual machine
12520 (<link to="IMachine" />). Just as disks (hard disks, DVDs, FDs) are
12521 attached to storage controllers in a real computer, virtual media
12522 (represented by <link to="IMedium" />) are attached to virtual
12523 storage controllers, represented by this interface.
12524
12525 As opposed to physical hardware, VirtualBox has a very generic concept
12526 of a storage controller, and for purposes of the Main API, all virtual
12527 storage is attached to virtual machines via instances of this interface.
12528 There are four types of such virtual storage controllers: IDE, SCSI, SATA
12529 and Floppy (see <link to="#bus" />). Depending on which of these four is
12530 used, certain sub-types may be available and can be selected in
12531 <link to="#controllerType" />.
12532
12533 Depending on these settings, the guest operating system might see
12534 significantly different virtual hardware.
12535 </desc>
12536
12537 <attribute name="name" type="wstring" readonly="yes">
12538 <desc>
12539 Name of the storage controller, as originally specified with
12540 <link to="IMachine::addStorageController" />. This then uniquely
12541 identifies this controller with other method calls such as
12542 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
12543 </desc>
12544 </attribute>
12545
12546 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12547 <desc>
12548 Maximum number of devices which can be attached to one port.
12549 </desc>
12550 </attribute>
12551
12552 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12553 <desc>
12554 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12555 </desc>
12556 </attribute>
12557
12558 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12559 <desc>
12560 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12561 </desc>
12562 </attribute>
12563
12564 <attribute name="instance" type="unsigned long">
12565 <desc>
12566 The instance number of the device in the running VM.
12567 </desc>
12568 </attribute>
12569
12570 <attribute name="portCount" type="unsigned long">
12571 <desc>
12572 The number of currently usable ports on the controller.
12573 The minimum and maximum number of ports for one controller are
12574 stored in <link to="IStorageController::minPortCount"/>
12575 and <link to="IStorageController::maxPortCount"/>.
12576 </desc>
12577 </attribute>
12578
12579 <attribute name="bus" type="StorageBus" readonly="yes">
12580 <desc>
12581 The bus type of the storage controller (IDE, SATA, SCSI or Floppy).
12582 </desc>
12583 </attribute>
12584
12585 <attribute name="controllerType" type="StorageControllerType">
12586 <desc>
12587 The exact variant of storage controller hardware presented
12588 to the guest.
12589 Depending on this value, VirtualBox will provide a different
12590 virtual storage controller hardware to the guest.
12591 For SATA and floppy controllers, only one variant is available,
12592 but for IDE and SCSI, there are several.
12593
12594 For SCSI controllers, the default type is LsiLogic.
12595 </desc>
12596 </attribute>
12597
12598 <method name="GetIDEEmulationPort">
12599 <desc>
12600 Gets the corresponding port number which is emulated as an IDE device.
12601 Works only with SATA controllers.
12602
12603 <result name="E_INVALIDARG">
12604 The @a devicePosition is not in the range 0 to 3.
12605 </result>
12606 <result name="E_NOTIMPL">
12607 The storage controller type is not SATAIntelAhci.
12608 </result>
12609
12610 </desc>
12611 <param name="devicePosition" type="long" dir="in"/>
12612 <param name="portNumber" type="long" dir="return"/>
12613 </method>
12614
12615 <method name="SetIDEEmulationPort">
12616 <desc>
12617 Sets the port number which is emulated as an IDE device.
12618 Works only with SATA controllers.
12619
12620 <result name="E_INVALIDARG">
12621 The @a devicePosition is not in the range 0 to 3 or the
12622 @a portNumber is not in the range 0 to 29.
12623 </result>
12624 <result name="E_NOTIMPL">
12625 The storage controller type is not SATAIntelAhci.
12626 </result>
12627
12628 </desc>
12629 <param name="devicePosition" type="long" dir="in"/>
12630 <param name="portNumber" type="long" dir="in"/>
12631 </method>
12632
12633 </interface>
12634
12635<if target="wsdl">
12636
12637 <!--
12638 // IManagedObjectRef
12639 /////////////////////////////////////////////////////////////////////////
12640 -->
12641
12642 <interface
12643 name="IManagedObjectRef" extends="$unknown"
12644 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12645 internal="yes"
12646 wsmap="managed"
12647 wscpp="hardcoded"
12648 >
12649 <desc>
12650 Managed object reference.
12651
12652 Only within the webservice, a managed object reference (which is really
12653 an opaque number) allows a webservice client to address an object
12654 that lives in the address space of the webservice server.
12655
12656 Behind each managed object reference, there is a COM object that lives
12657 in the webservice server's address space. The COM object is not freed
12658 until the managed object reference is released, either by an explicit
12659 call to <link to="IManagedObjectRef::release" /> or by logging off from
12660 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12661 all objects created during the webservice session.
12662
12663 Whenever a method call of the VirtualBox API returns a COM object, the
12664 webservice representation of that method will instead return a
12665 managed object reference, which can then be used to invoke methods
12666 on that object.
12667 </desc>
12668
12669 <method name="getInterfaceName">
12670 <desc>
12671 Returns the name of the interface that this managed object represents,
12672 for example, "IMachine", as a string.
12673 </desc>
12674 <param name="return" type="wstring" dir="return"/>
12675 </method>
12676
12677 <method name="release">
12678 <desc>
12679 Releases this managed object reference and frees the resources that
12680 were allocated for it in the webservice server process. After calling
12681 this method, the identifier of the reference can no longer be used.
12682 </desc>
12683 </method>
12684
12685 </interface>
12686
12687 <!--
12688 // IWebsessionManager
12689 /////////////////////////////////////////////////////////////////////////
12690 -->
12691
12692 <interface
12693 name="IWebsessionManager" extends="$unknown"
12694 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12695 internal="yes"
12696 wsmap="global"
12697 wscpp="hardcoded"
12698 >
12699 <desc>
12700 Websession manager. This provides essential services
12701 to webservice clients.
12702 </desc>
12703 <method name="logon">
12704 <desc>
12705 Logs a new client onto the webservice and returns a managed object reference to
12706 the IVirtualBox instance, which the client can then use as a basis to further
12707 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12708 interface, in one way or the other.
12709 </desc>
12710 <param name="username" type="wstring" dir="in"/>
12711 <param name="password" type="wstring" dir="in"/>
12712 <param name="return" type="IVirtualBox" dir="return"/>
12713 </method>
12714
12715 <method name="getSessionObject">
12716 <desc>
12717 Returns a managed object reference to the internal ISession object that was created
12718 for this web service session when the client logged on.
12719
12720 <see>ISession</see>
12721 </desc>
12722 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12723 <param name="return" type="ISession" dir="return"/>
12724 </method>
12725
12726 <method name="logoff">
12727 <desc>
12728 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12729 and destroys all resources associated with the session (most importantly, all
12730 managed objects created in the server while the session was active).
12731 </desc>
12732 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12733 </method>
12734
12735 </interface>
12736
12737</if>
12738
12739 <!--
12740 // IPerformanceCollector & friends
12741 /////////////////////////////////////////////////////////////////////////
12742 -->
12743
12744 <interface
12745 name="IPerformanceMetric" extends="$unknown"
12746 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12747 >
12748 <desc>
12749 The IPerformanceMetric interface represents parameters of the given
12750 performance metric.
12751 </desc>
12752
12753 <attribute name="metricName" type="wstring" readonly="yes">
12754 <desc>
12755 Name of the metric.
12756 </desc>
12757 </attribute>
12758
12759 <attribute name="object" type="$unknown" readonly="yes">
12760 <desc>
12761 Object this metric belongs to.
12762 </desc>
12763 </attribute>
12764
12765 <attribute name="description" type="wstring" readonly="yes">
12766 <desc>
12767 Textual description of the metric.
12768 </desc>
12769 </attribute>
12770
12771 <attribute name="period" type="unsigned long" readonly="yes">
12772 <desc>
12773 Time interval between samples, measured in seconds.
12774 </desc>
12775 </attribute>
12776
12777 <attribute name="count" type="unsigned long" readonly="yes">
12778 <desc>
12779 Number of recent samples retained by the performance collector for this
12780 metric.
12781
12782 When the collected sample count exceeds this number, older samples
12783 are discarded.
12784 </desc>
12785 </attribute>
12786
12787 <attribute name="unit" type="wstring" readonly="yes">
12788 <desc>
12789 Unit of measurement.
12790 </desc>
12791 </attribute>
12792
12793 <attribute name="minimumValue" type="long" readonly="yes">
12794 <desc>
12795 Minimum possible value of this metric.
12796 </desc>
12797 </attribute>
12798
12799 <attribute name="maximumValue" type="long" readonly="yes">
12800 <desc>
12801 Maximum possible value of this metric.
12802 </desc>
12803 </attribute>
12804 </interface>
12805
12806 <interface
12807 name="IPerformanceCollector" extends="$unknown"
12808 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12809 wsmap="managed"
12810 >
12811 <desc>
12812 The IPerformanceCollector interface represents a service that collects and
12813 stores performance metrics data.
12814
12815 Performance metrics are associated with objects of interfaces like IHost and
12816 IMachine. Each object has a distinct set of performance metrics.
12817 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12818
12819 Metric data is collected at the specified intervals and is retained
12820 internally. The interval and the number of retained samples can be set
12821 with <link to="IPerformanceCollector::setupMetrics" />.
12822
12823 Metrics are organized hierarchically, with each level separated by a
12824 slash (/) character. Generally, the scheme for metric names is like this:
12825
12826 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
12827
12828 "Category/Metric" together form the base metric name. A base metric is the
12829 smallest unit for which a sampling interval and the number of retained
12830 samples can be set. Only base metrics can be enabled and disabled. All
12831 sub-metrics are collected when their base metric is collected.
12832 Collected values for any set of sub-metrics can be queried with
12833 <link to="IPerformanceCollector::queryMetricsData" />.
12834
12835 For example "CPU/Load/User:avg"
12836 metric name stands for the "CPU" category, "Load" metric, "User" submetric,
12837 "average" aggregate. An aggregate function is computed over all retained
12838 data. Valid aggregate functions are:
12839
12840 <ul>
12841 <li>avg -- average</li>
12842 <li>min -- minimum</li>
12843 <li>max -- maximum</li>
12844 </ul>
12845
12846 When setting up
12847 metric parameters, querying metric data, enabling or disabling metrics
12848 wildcards can be used in metric names to specify a subset of metrics. For
12849 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
12850 averages can be queried using <tt>*:avg</tt> and so on. To query metric
12851 values without aggregates <tt>*:</tt> can be used.
12852
12853 The valid names for base metrics are:
12854
12855 <ul>
12856 <li>CPU/Load</li>
12857 <li>CPU/MHz</li>
12858 <li>RAM/Usage</li>
12859 </ul>
12860
12861 The general sequence for collecting and retrieving the metrics is:
12862 <ul>
12863 <li>
12864 Obtain an instance of IPerformanceCollector with
12865 <link to="IVirtualBox::performanceCollector" />
12866 </li>
12867 <li>
12868 Allocate and populate an array with references to objects the metrics
12869 will be collected for. Use references to IHost and IMachine objects.
12870 </li>
12871 <li>
12872 Allocate and populate an array with base metric names the data will be
12873 collected for.
12874 </li>
12875 <li>
12876 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
12877 metric data will be collected and stored.
12878 </li>
12879 <li>
12880 Wait for the data to get collected.
12881 </li>
12882 <li>
12883 Allocate and populate an array with references to objects the metric
12884 values will be queried for. You can re-use the object array used for
12885 setting base metrics.
12886 </li>
12887 <li>
12888 Allocate and populate an array with metric names the data will be
12889 collected for. Note that metric names differ from base metric names.
12890 </li>
12891 <li>
12892 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
12893 have been collected so far are returned. Note that the values are still
12894 retained internally and data collection continues.
12895 </li>
12896 </ul>
12897
12898 For an example of usage refer to the following files in VirtualBox SDK:
12899 <ul>
12900 <li>
12901 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
12902 </li>
12903 <li>
12904 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
12905 </li>
12906 </ul>
12907 </desc>
12908
12909 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
12910 <desc>
12911 Array of unique names of metrics.
12912
12913 This array represents all metrics supported by the performance
12914 collector. Individual objects do not necessarily support all of them.
12915 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
12916 list of supported metrics for a particular object.
12917 </desc>
12918 </attribute>
12919
12920 <method name="getMetrics">
12921 <desc>
12922 Returns parameters of specified metrics for a set of objects.
12923 <note>
12924 @c Null metrics array means all metrics. @c Null object array means
12925 all existing objects.
12926 </note>
12927 </desc>
12928 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12929 <desc>
12930 Metric name filter. Currently, only a comma-separated list of metrics
12931 is supported.
12932 </desc>
12933 </param>
12934 <param name="objects" type="$unknown" dir="in" safearray="yes">
12935 <desc>
12936 Set of objects to return metric parameters for.
12937 </desc>
12938 </param>
12939 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
12940 <desc>
12941 Array of returned metric parameters.
12942 </desc>
12943 </param>
12944 </method>
12945
12946 <method name="setupMetrics">
12947 <desc>
12948 Sets parameters of specified base metrics for a set of objects. Returns
12949 an array of <link to="IPerformanceMetric" /> describing the metrics have
12950 been affected.
12951 <note>
12952 @c Null or empty metric name array means all metrics. @c Null or empty
12953 object array means all existing objects. If metric name array contains
12954 a single element and object array contains many, the single metric
12955 name array element is applied to each object array element to form
12956 metric/object pairs.
12957 </note>
12958 </desc>
12959 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12960 <desc>
12961 Metric name filter. Comma-separated list of metrics with wildcard
12962 support.
12963 </desc>
12964 </param>
12965 <param name="objects" type="$unknown" dir="in" safearray="yes">
12966 <desc>
12967 Set of objects to setup metric parameters for.
12968 </desc>
12969 </param>
12970 <param name="period" type="unsigned long" dir="in">
12971 <desc>
12972 Time interval in seconds between two consecutive samples of performance
12973 data.
12974 </desc>
12975 </param>
12976 <param name="count" type="unsigned long" dir="in">
12977 <desc>
12978 Number of samples to retain in performance data history. Older samples
12979 get discarded.
12980 </desc>
12981 </param>
12982 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12983 <desc>
12984 Array of metrics that have been modified by the call to this method.
12985 </desc>
12986 </param>
12987 </method>
12988
12989 <method name="enableMetrics">
12990 <desc>
12991 Turns on collecting specified base metrics. Returns an array of
12992 <link to="IPerformanceMetric" /> describing the metrics have been
12993 affected.
12994 <note>
12995 @c Null or empty metric name array means all metrics. @c Null or empty
12996 object array means all existing objects. If metric name array contains
12997 a single element and object array contains many, the single metric
12998 name array element is applied to each object array element to form
12999 metric/object pairs.
13000 </note>
13001 </desc>
13002 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13003 <desc>
13004 Metric name filter. Comma-separated list of metrics with wildcard
13005 support.
13006 </desc>
13007 </param>
13008 <param name="objects" type="$unknown" dir="in" safearray="yes">
13009 <desc>
13010 Set of objects to enable metrics for.
13011 </desc>
13012 </param>
13013 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13014 <desc>
13015 Array of metrics that have been modified by the call to this method.
13016 </desc>
13017 </param>
13018 </method>
13019
13020 <method name="disableMetrics">
13021 <desc>
13022 Turns off collecting specified base metrics. Returns an array of
13023 <link to="IPerformanceMetric" /> describing the metrics have been
13024 affected.
13025 <note>
13026 @c Null or empty metric name array means all metrics. @c Null or empty
13027 object array means all existing objects. If metric name array contains
13028 a single element and object array contains many, the single metric
13029 name array element is applied to each object array element to form
13030 metric/object pairs.
13031 </note>
13032 </desc>
13033 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13034 <desc>
13035 Metric name filter. Comma-separated list of metrics with wildcard
13036 support.
13037 </desc>
13038 </param>
13039 <param name="objects" type="$unknown" dir="in" safearray="yes">
13040 <desc>
13041 Set of objects to disable metrics for.
13042 </desc>
13043 </param>
13044 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13045 <desc>
13046 Array of metrics that have been modified by the call to this method.
13047 </desc>
13048 </param>
13049 </method>
13050
13051 <method name="queryMetricsData">
13052 <desc>
13053 Queries collected metrics data for a set of objects.
13054
13055 The data itself and related metric information are returned in seven
13056 parallel and one flattened array of arrays. Elements of
13057 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13058 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13059 the same index describe one set of values corresponding to a single
13060 metric.
13061
13062 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13063 start and length of a sub-array is indicated by
13064 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13065 value for metric <tt>metricNames[i]</tt> is at
13066 <tt>returnData[returnIndices[i]]</tt>.
13067
13068 <note>
13069 @c Null or empty metric name array means all metrics. @c Null or empty
13070 object array means all existing objects. If metric name array contains
13071 a single element and object array contains many, the single metric
13072 name array element is applied to each object array element to form
13073 metric/object pairs.
13074 </note>
13075 <note>
13076 Data collection continues behind the scenes after call to
13077 @c queryMetricsData. The return data can be seen as the snapshot of
13078 the current state at the time of @c queryMetricsData call. The
13079 internally kept metric values are not cleared by the call. This makes
13080 possible querying different subsets of metrics or aggregates with
13081 subsequent calls. If periodic querying is needed it is highly
13082 suggested to query the values with @c interval*count period to avoid
13083 confusion. This way a completely new set of data values will be
13084 provided by each query.
13085 </note>
13086 </desc>
13087 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13088 <desc>
13089 Metric name filter. Comma-separated list of metrics with wildcard
13090 support.
13091 </desc>
13092 </param>
13093 <param name="objects" type="$unknown" dir="in" safearray="yes">
13094 <desc>
13095 Set of objects to query metrics for.
13096 </desc>
13097 </param>
13098 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13099 <desc>
13100 Names of metrics returned in @c returnData.
13101 </desc>
13102 </param>
13103 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13104 <desc>
13105 Objects associated with metrics returned in @c returnData.
13106 </desc>
13107 </param>
13108 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13109 <desc>
13110 Units of measurement for each returned metric.
13111 </desc>
13112 </param>
13113 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13114 <desc>
13115 Divisor that should be applied to return values in order to get
13116 floating point values. For example:
13117 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13118 will retrieve the floating point value of i-th sample of the first
13119 metric.
13120 </desc>
13121 </param>
13122 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13123 <desc>
13124 Sequence numbers of the first elements of value sequences of particular metrics
13125 returned in @c returnData. For aggregate metrics it is the sequence number of
13126 the sample the aggregate started calculation from.
13127 </desc>
13128 </param>
13129 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13130 <desc>
13131 Indices of the first elements of value sequences of particular metrics
13132 returned in @c returnData.
13133 </desc>
13134 </param>
13135 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13136 <desc>
13137 Lengths of value sequences of particular metrics.
13138 </desc>
13139 </param>
13140 <param name="returnData" type="long" dir="return" safearray="yes">
13141 <desc>
13142 Flattened array of all metric data containing sequences of values for
13143 each metric.
13144 </desc>
13145 </param>
13146 </method>
13147
13148 </interface>
13149
13150 <module name="VBoxSVC" context="LocalServer">
13151 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13152 namespace="virtualbox.org">
13153 <interface name="IVirtualBox" default="yes"/>
13154 </class>
13155 </module>
13156
13157 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13158 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
13159 namespace="virtualbox.org">
13160 <interface name="ISession" default="yes"/>
13161 </class>
13162 <class name="CallbackWrapper" uuid="49EE8561-5563-4715-B18C-A4B1A490DAFE"
13163 namespace="virtualbox.org">
13164 <interface name="ILocalOwner" default="yes"/>
13165 <interface name="IVirtualBoxCallback"/>
13166 <interface name="IConsoleCallback"/>
13167 </class>
13168 </module>
13169
13170</library>
13171
13172</idl>
13173
13174<!-- 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