VirtualBox

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

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

UUID: for r55104

  • Property svn:eol-style set to native
File size: 505.3 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="36518cf6-cdf0-4d0d-ad2a-5ee9c60c7494"
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;[restoreSnapshot() ]-------&gt; RestoringSnapshot -+
577 | | [deleteSnapshot() ]-------&gt; DeletingSnapshot --+
578 +-&gt; Saved -------+ |
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="Teleported" value="3">
619 <desc>
620 The machine was teleported to a different host (or process) and then
621 powered off. Take care when powering it on again may corrupt resources
622 it shares with the teleportation target (e.g. disk and network).
623 </desc>
624 </const>
625 <const name="Aborted" value="4">
626 <desc>
627 The process running the machine has terminated abnormally. This may
628 indicate a crash of the VM process in host execution context, or
629 the VM process has been terminated externally.
630 </desc>
631 </const>
632 <const name="Running" value="5">
633 <desc>
634 The machine is currently being executed.
635 <note internal="yes">
636 For whoever decides to touch this enum: In order to keep the
637 comparisons in the old source code valid, this state must immediately
638 precede the Paused state.
639 TODO: Lift this spectacularly wonderful restriction.
640 </note>
641 </desc>
642 </const>
643 <const name="Paused" value="6">
644 <desc>
645 Execution of the machine has been paused.
646 <note internal="yes">
647 For whoever decides to touch this enum: In order to keep the
648 comparisons in the old source code valid, this state must immediately
649 follow the Running state.
650 TODO: Lift this spectacularly wonderful restriction.
651 </note>
652 </desc>
653 </const>
654 <const name="Stuck" value="7">
655 <desc>
656 Execution of the machine has reached the "Guru Meditation"
657 condition. This indicates a severe error in the hypervisor itself.
658 <note internal="yes">
659 bird: Why this uncool name? Could we rename it to "GuruMeditation" or
660 "Guru", perhaps? Or are there some other VMM states that are
661 intended to be lumped in here as well?
662 </note>
663 </desc>
664 </const>
665 <const name="Teleporting" value="8">
666 <desc>
667 The machine is about to be teleported to a different host or process.
668 It is possible to pause a machine in this state, but it will go to the
669 <link to="MachineState::PausedTeleporting"/> state and it will not be
670 possible to resume it again unless the teleportation fails.
671 </desc>
672 </const>
673 <const name="LiveSnapshotting" value="9">
674 <desc>
675 A live snapshot is being taken. The machine is running normally, but
676 some of the runtime configuration options are inaccessible. Also, if
677 paused while in this state it will transition to
678 <link to="MachineState::Saving"/> and it will not be resume the
679 execution until the snapshot operation has completed.
680 </desc>
681 </const>
682 <const name="Starting" value="10">
683 <desc>
684 Machine is being started after powering it on from a
685 zero execution state.
686 </desc>
687 </const>
688 <const name="Stopping" value="11">
689 <desc>
690 Machine is being normally stopped powering it off, or after the guest OS
691 has initiated a shutdown sequence.
692 </desc>
693 </const>
694 <const name="Saving" value="12">
695 <desc>
696 Machine is saving its execution state to a file, or an online
697 snapshot of the machine is being taken.
698 </desc>
699 </const>
700 <const name="Restoring" value="13">
701 <desc>
702 Execution state of the machine is being restored from a file
703 after powering it on from the saved execution state.
704 </desc>
705 </const>
706 <const name="TeleportingPausedVM" value="14">
707 <desc>
708 The machine is being teleported to another host or process, but it is
709 not running. This is the paused variant of the
710 <link to="MachineState::Teleporting"/> state.
711 </desc>
712 </const>
713 <const name="TeleportingIn" value="15">
714 <desc>
715 Teleporting the machine state in from another host or process.
716 </desc>
717 </const>
718 <const name="RestoringSnapshot" value="16">
719 <desc>
720 A machine snapshot is being restored; this typically does not take long.
721 </desc>
722 </const>
723 <const name="DeletingSnapshot" value="17">
724 <desc>
725 A machine snapshot is being deleted; this can take a long time since this
726 may require merging differencing media.
727 </desc>
728 </const>
729 <const name="SettingUp" value="18">
730 <desc>
731 Lengthy setup operation is in progress.
732 </desc>
733 </const>
734
735 <const name="FirstOnline" value="5" wsmap="suppress"> <!-- Running -->
736 <desc>
737 Pseudo-state: first online state (for use in relational expressions).
738 </desc>
739 </const>
740 <const name="LastOnline" value="13" wsmap="suppress"> <!-- TeleportingIn -->
741 <desc>
742 Pseudo-state: last online state (for use in relational expressions).
743 </desc>
744 </const>
745
746 <const name="FirstTransient" value="8" wsmap="suppress"> <!-- Teleporting -->
747 <desc>
748 Pseudo-state: first transient state (for use in relational expressions).
749 </desc>
750 </const>
751 <const name="LastTransient" value="18" wsmap="suppress"> <!-- SettingUp -->
752 <desc>
753 Pseudo-state: last transient state (for use in relational expressions).
754 </desc>
755 </const>
756
757 </enum>
758
759 <enum
760 name="SessionState"
761 uuid="cf2700c0-ea4b-47ae-9725-7810114b94d8"
762 >
763 <desc>
764 Session state. This enumeration represents possible values of
765 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
766 attributes. See individual enumerator descriptions for the meaning for
767 every value.
768 </desc>
769
770 <const name="Null" value="0">
771 <desc>Null value (never used by the API).</desc>
772 </const>
773 <const name="Closed" value="1">
774 <desc>
775 The machine has no open sessions (<link to="IMachine::sessionState"/>);
776 the session is closed (<link to="ISession::state"/>)
777 </desc>
778 </const>
779 <const name="Open" value="2">
780 <desc>
781 The machine has an open direct session (<link to="IMachine::sessionState"/>);
782 the session is open (<link to="ISession::state"/>)
783 </desc>
784 </const>
785 <const name="Spawning" value="3">
786 <desc>
787 A new (direct) session is being opened for the machine as a result of
788 <link to="IVirtualBox::openRemoteSession"/> call
789 (<link to="IMachine::sessionState"/> or <link to="ISession::state"/>).
790 This state also occurs as a short transient state when a new direct
791 session is opened by calling <link to="IVirtualBox::openSession"/>.
792 </desc>
793 </const>
794 <const name="Closing" value="4">
795 <desc>
796 The direct session is being closed (<link to="IMachine::sessionState"/>);
797 the session is being closed (<link to="ISession::state"/>)
798 </desc>
799 </const>
800 </enum>
801
802 <enum
803 name="CpuPropertyType"
804 uuid="af7bb668-eeb1-4404-b77f-a114b30c92d6"
805 >
806 <desc>
807 Virtual CPU property type. This enumeration represents possible values of the
808 IMachine get- and setCpuProperty methods.
809 </desc>
810 <const name="Null" value="0">
811 <desc>Null value (never used by the API).</desc>
812 </const>
813 <const name="PAE" value="1">
814 <desc>
815 This setting determines whether VirtualBox will expose the Physical Address
816 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
817 is not available, it will not be reported.
818 </desc>
819 </const>
820 <const name="Synthetic" value="2">
821 <desc>
822 This setting determines whether VirtualBox will expose a synthetic CPU to the guest to allow
823 teleporting between host systems that differ significantly.
824 </desc>
825 </const>
826 </enum>
827
828
829 <enum
830 name="HWVirtExPropertyType"
831 uuid="ce81dfdd-d2b8-4a90-bbea-40ee8b7ffcee"
832 >
833 <desc>
834 Hardware virtualization property type. This enumeration represents possible values
835 for the <link to="IMachine::getHWVirtExProperty"/> and
836 <link to="IMachine::setHWVirtExProperty"/> methods.
837 </desc>
838 <const name="Null" value="0">
839 <desc>Null value (never used by the API).</desc>
840 </const>
841 <const name="Enabled" value="1">
842 <desc>
843 Whether hardware virtualization (VT-x/AMD-V) is enabled at all. If
844 such extensions are not available, they will not be used.
845 </desc>
846 </const>
847 <const name="Exclusive" value="2">
848 <desc>
849 Whether hardware virtualization is used exclusively by VirtualBox. When enabled,
850 VirtualBox assumes it can acquire full and exclusive access to the VT-x or AMD-V
851 feature of the host. To share these with other hypervisors, you must disable this property.
852 </desc>
853 </const>
854 <const name="VPID" value="3">
855 <desc>
856 Whether VT-x VPID is enabled. If this extension is not available, it will not be used.
857 </desc>
858 </const>
859 <const name="NestedPaging" value="4">
860 <desc>
861 Whether Nested Paging is enabled. If this extension is not available, it will not be used.
862 </desc>
863 </const>
864 </enum>
865
866 <enum
867 name="SessionType"
868 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
869 >
870 <desc>
871 Session type. This enumeration represents possible values of the
872 <link to="ISession::type"/> attribute.
873 </desc>
874
875 <const name="Null" value="0">
876 <desc>Null value (never used by the API).</desc>
877 </const>
878 <const name="Direct" value="1">
879 <desc>
880 Direct session
881 (opened by <link to="IVirtualBox::openSession"/>)
882 </desc>
883 </const>
884 <const name="Remote" value="2">
885 <desc>
886 Remote session
887 (opened by <link to="IVirtualBox::openRemoteSession"/>)
888 </desc>
889 </const>
890 <const name="Existing" value="3">
891 <desc>
892 Existing session
893 (opened by <link to="IVirtualBox::openExistingSession"/>)
894 </desc>
895 </const>
896 </enum>
897
898 <enum
899 name="DeviceType"
900 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
901 >
902 <desc>
903 Device type.
904 </desc>
905 <const name="Null" value="0">
906 <desc>
907 Null value, may also mean "no device" (not allowed for
908 <link to="IConsole::getDeviceActivity"/>).
909 </desc>
910 </const>
911 <const name="Floppy" value="1">
912 <desc>Floppy device.</desc>
913 </const>
914 <const name="DVD" value="2">
915 <desc>CD/DVD-ROM device.</desc>
916 </const>
917 <const name="HardDisk" value="3">
918 <desc>Hard disk device.</desc>
919 </const>
920 <const name="Network" value="4">
921 <desc>Network device.</desc>
922 </const>
923 <const name="USB" value="5">
924 <desc>USB device.</desc>
925 </const>
926 <const name="SharedFolder" value="6">
927 <desc>Shared folder device.</desc>
928 </const>
929 </enum>
930
931 <enum
932 name="DeviceActivity"
933 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
934 >
935 <desc>
936 Device activity for <link to="IConsole::getDeviceActivity"/>.
937 </desc>
938
939 <const name="Null" value="0"/>
940 <const name="Idle" value="1"/>
941 <const name="Reading" value="2"/>
942 <const name="Writing" value="3"/>
943 </enum>
944
945 <enum
946 name="ClipboardMode"
947 uuid="33364716-4008-4701-8f14-be0fa3d62950"
948 >
949 <desc>
950 Host-Guest clipboard interchange mode.
951 </desc>
952
953 <const name="Disabled" value="0"/>
954 <const name="HostToGuest" value="1"/>
955 <const name="GuestToHost" value="2"/>
956 <const name="Bidirectional" value="3"/>
957 </enum>
958
959 <enum
960 name="Scope"
961 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
962 >
963 <desc>
964 Scope of the operation.
965
966 A generic enumeration used in various methods to define the action or
967 argument scope.
968 </desc>
969
970 <const name="Global" value="0"/>
971 <const name="Machine" value="1"/>
972 <const name="Session" value="2"/>
973 </enum>
974
975 <enum
976 name="GuestStatisticType"
977 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
978 >
979 <desc>
980 Statistics type for <link to="IGuest::getStatistic"/>.
981 </desc>
982
983 <const name="CPULoad_Idle" value="0">
984 <desc>
985 Idle CPU load (0-100%) for last interval.
986 </desc>
987 </const>
988 <const name="CPULoad_Kernel" value="1">
989 <desc>
990 Kernel CPU load (0-100%) for last interval.
991 </desc>
992 </const>
993 <const name="CPULoad_User" value="2">
994 <desc>
995 User CPU load (0-100%) for last interval.
996 </desc>
997 </const>
998 <const name="Threads" value="3">
999 <desc>
1000 Total number of threads in the system.
1001 </desc>
1002 </const>
1003 <const name="Processes" value="4">
1004 <desc>
1005 Total number of processes in the system.
1006 </desc>
1007 </const>
1008 <const name="Handles" value="5">
1009 <desc>
1010 Total number of handles in the system.
1011 </desc>
1012 </const>
1013 <const name="MemoryLoad" value="6">
1014 <desc>
1015 Memory load (0-100%).
1016 </desc>
1017 </const>
1018 <const name="PhysMemTotal" value="7">
1019 <desc>
1020 Total physical memory in megabytes.
1021 </desc>
1022 </const>
1023 <const name="PhysMemAvailable" value="8">
1024 <desc>
1025 Free physical memory in megabytes.
1026 </desc>
1027 </const>
1028 <const name="PhysMemBalloon" value="9">
1029 <desc>
1030 Ballooned physical memory in megabytes.
1031 </desc>
1032 </const>
1033 <const name="MemCommitTotal" value="10">
1034 <desc>
1035 Total amount of memory in the committed state in megabytes.
1036 </desc>
1037 </const>
1038 <const name="MemKernelTotal" value="11">
1039 <desc>
1040 Total amount of memory used by the guest OS's kernel in megabytes.
1041 </desc>
1042 </const>
1043 <const name="MemKernelPaged" value="12">
1044 <desc>
1045 Total amount of paged memory used by the guest OS's kernel in megabytes.
1046 </desc>
1047 </const>
1048 <const name="MemKernelNonpaged" value="13">
1049 <desc>
1050 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
1051 </desc>
1052 </const>
1053 <const name="MemSystemCache" value="14">
1054 <desc>
1055 Total amount of memory used by the guest OS's system cache in megabytes.
1056 </desc>
1057 </const>
1058 <const name="PageFileSize" value="15">
1059 <desc>
1060 Pagefile size in megabytes.
1061 </desc>
1062 </const>
1063 <const name="SampleNumber" value="16">
1064 <desc>
1065 Statistics sample number
1066 </desc>
1067 </const>
1068 <const name="MaxVal" value="17"/>
1069 </enum>
1070
1071 <enum
1072 name="BIOSBootMenuMode"
1073 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
1074 >
1075 <desc>
1076 BIOS boot menu mode.
1077 </desc>
1078
1079 <const name="Disabled" value="0"/>
1080 <const name="MenuOnly" value="1"/>
1081 <const name="MessageAndMenu" value="2"/>
1082 </enum>
1083
1084 <enum
1085 name="ProcessorFeature"
1086 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
1087 >
1088 <desc>
1089 CPU features.
1090 </desc>
1091
1092 <const name="HWVirtEx" value="0"/>
1093 <const name="PAE" value="1"/>
1094 <const name="LongMode" value="2"/>
1095 <const name="NestedPaging" value="3"/>
1096 </enum>
1097
1098 <enum
1099 name="FirmwareType"
1100 uuid="b903f264-c230-483e-ac74-2b37ce60d371"
1101 >
1102 <desc>
1103 Firmware type.
1104 </desc>
1105 <const name="BIOS" value="1">
1106 <desc>BIOS Firmware.</desc>
1107 </const>
1108 <const name="EFI" value="2">
1109 <desc>EFI Firmware, bitness detetced basing on OS type.</desc>
1110 </const>
1111 <const name="EFI32" value="3">
1112 <desc>Efi firmware, 32-bit.</desc>
1113 </const>
1114 <const name="EFI64" value="4">
1115 <desc>Efi firmware, 64-bit.</desc>
1116 </const>
1117 <const name="EFIDUAL" value="5">
1118 <desc>Efi firmware, combined 32 and 64-bit.</desc>
1119 </const>
1120 </enum>
1121
1122 <!--
1123 // IVirtualBoxErrorInfo
1124 /////////////////////////////////////////////////////////////////////////
1125 -->
1126
1127 <interface
1128 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1129 uuid="4b86d186-407e-4f9e-8be8-e50061be8725"
1130 supportsErrorInfo="no"
1131 wsmap="managed"
1132 >
1133 <desc>
1134 The IVirtualBoxErrorInfo interface represents extended error information.
1135
1136 Extended error information can be set by VirtualBox components after
1137 unsuccessful or partially successful method invocation. This information
1138 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1139 and then shown to the client in addition to the plain 32-bit result code.
1140
1141 In MS COM, this interface extends the IErrorInfo interface,
1142 in XPCOM, it extends the nsIException interface. In both cases,
1143 it provides a set of common attributes to retrieve error
1144 information.
1145
1146 Sometimes invocation of some component's method may involve methods of
1147 other components that may also fail (independently of this method's
1148 failure), or a series of non-fatal errors may precede a fatal error that
1149 causes method failure. In cases like that, it may be desirable to preserve
1150 information about all errors happened during method invocation and deliver
1151 it to the caller. The <link to="#next"/> attribute is intended
1152 specifically for this purpose and allows to represent a chain of errors
1153 through a single IVirtualBoxErrorInfo object set after method invocation.
1154
1155 Note that errors are stored to a chain in the reverse order, i.e. the
1156 initial error object you query right after method invocation is the last
1157 error set by the callee, the object it points to in the @a next attribute
1158 is the previous error and so on, up to the first error (which is the last
1159 in the chain).
1160 </desc>
1161
1162 <attribute name="resultCode" type="long" readonly="yes">
1163 <desc>
1164 Result code of the error.
1165 Usually, it will be the same as the result code returned
1166 by the method that provided this error information, but not
1167 always. For example, on Win32, CoCreateInstance() will most
1168 likely return E_NOINTERFACE upon unsuccessful component
1169 instantiation attempt, but not the value the component factory
1170 returned. Value is typed 'long', not 'result',
1171 to make interface usable from scripting languages.
1172 <note>
1173 In MS COM, there is no equivalent.
1174 In XPCOM, it is the same as nsIException::result.
1175 </note>
1176 </desc>
1177 </attribute>
1178
1179 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1180 <desc>
1181 UUID of the interface that defined the error.
1182 <note>
1183 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1184 data type.
1185 In XPCOM, there is no equivalent.
1186 </note>
1187 </desc>
1188 </attribute>
1189
1190 <attribute name="component" type="wstring" readonly="yes">
1191 <desc>
1192 Name of the component that generated the error.
1193 <note>
1194 In MS COM, it is the same as IErrorInfo::GetSource.
1195 In XPCOM, there is no equivalent.
1196 </note>
1197 </desc>
1198 </attribute>
1199
1200 <attribute name="text" type="wstring" readonly="yes">
1201 <desc>
1202 Text description of the error.
1203 <note>
1204 In MS COM, it is the same as IErrorInfo::GetDescription.
1205 In XPCOM, it is the same as nsIException::message.
1206 </note>
1207 </desc>
1208 </attribute>
1209
1210 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1211 <desc>
1212 Next error object if there is any, or @c null otherwise.
1213 <note>
1214 In MS COM, there is no equivalent.
1215 In XPCOM, it is the same as nsIException::inner.
1216 </note>
1217 </desc>
1218 </attribute>
1219
1220 </interface>
1221
1222 <interface
1223 name="ILocalOwner" extends="$dispatched"
1224 uuid="308FF42A-DC45-49D4-A950-B1EEE5E00BB5" wsmap="suppress"
1225 >
1226 <desc>
1227 The ILocalOwner interface allows to register local objects
1228 (created without COM calls, but with new()).
1229 Once registered, calls to methods of such objects can be made
1230 from remote COM processes.
1231 The main usecase is the event callback implementation where
1232 API clients provide callback objects.
1233 </desc>
1234 <method name="setLocalObject">
1235 <desc>
1236 Set local object.
1237 </desc>
1238 <param name="object" type="$unknown" dir="in">
1239 <desc>Local object to forward requests to.
1240 If null, clears currently set local object.</desc>
1241 </param>
1242 </method>
1243 </interface>
1244
1245 <!--
1246 // IVirtualBox
1247 /////////////////////////////////////////////////////////////////////////
1248 -->
1249
1250 <interface
1251 name="IVirtualBoxCallback" extends="$unknown"
1252 uuid="9a65adf2-3ee6-406b-bca2-2b1fa05f0d0b"
1253 wsmap="suppress"
1254 >
1255
1256 <method name="onMachineStateChange">
1257 <desc>
1258 The execution state of the given machine has changed.
1259 <see>IMachine::state</see>
1260 </desc>
1261 <param name="machineId" type="uuid" mod="string" dir="in">
1262 <desc>ID of the machine this event relates to.</desc>
1263 </param>
1264 <param name="state" type="MachineState" dir="in">
1265 <desc>New execution state.</desc>
1266 </param>
1267 </method>
1268
1269 <method name="onMachineDataChange">
1270 <desc>
1271 Any of the settings of the given machine has changed.
1272 </desc>
1273 <param name="machineId" type="uuid" mod="string" dir="in">
1274 <desc>ID of the machine this event relates to.</desc>
1275 </param>
1276 </method>
1277
1278 <method name="onExtraDataCanChange">
1279 <desc>
1280 Notification when someone tries to change extra data for
1281 either the given machine or (if @c null) global extra data.
1282 This gives the chance to veto against changes.
1283 </desc>
1284 <param name="machineId" type="uuid" mod="string" dir="in">
1285 <desc>
1286 ID of the machine this event relates to
1287 (@c null ID for global extra data change requests).
1288 </desc>
1289 </param>
1290 <param name="key" type="wstring" dir="in">
1291 <desc>
1292 Extra data key for the attempted write.
1293 </desc>
1294 </param>
1295 <param name="value" type="wstring" dir="in">
1296 <desc>
1297 Extra data value for the given key.
1298 </desc>
1299 </param>
1300 <param name="error" type="wstring" dir="out">
1301 <desc>
1302 Optional error message describing the reason of the
1303 veto (ignored if this notification returns @c true).
1304 </desc>
1305 </param>
1306 <param name="allowChange" type="boolean" dir="return">
1307 <desc>
1308 Flag to indicate whether the callee agrees (@c true)
1309 or vetoes against the change (@c false).
1310 </desc>
1311 </param>
1312 </method>
1313
1314 <method name="onExtraDataChange">
1315 <desc>
1316 Notification when machine specific or global extra data
1317 has changed.
1318 </desc>
1319 <param name="machineId" type="uuid" mod="string" dir="in">
1320 <desc>
1321 ID of the machine this event relates to.
1322 Null for global extra data changes.
1323 </desc>
1324 </param>
1325 <param name="key" type="wstring" dir="in">
1326 <desc>
1327 Extra data key that has changed.
1328 </desc>
1329 </param>
1330 <param name="value" type="wstring" dir="in">
1331 <desc>
1332 Extra data value for the given key.
1333 </desc>
1334 </param>
1335 </method>
1336
1337 <method name="onMediumRegistered">
1338 <desc>
1339 The given medium was registered or unregistered
1340 within this VirtualBox installation.
1341
1342 The @a mediumType parameter describes what type of
1343 medium the specified @a mediumId refers to. Possible
1344 values are:
1345
1346 <ul>
1347 <li><link to="DeviceType_HardDisk"/>: the medium is a hard disk
1348 that, if registered, can be obtained using the
1349 <link to="IVirtualBox::getHardDisk"/> call.</li>
1350 <li><link to="DeviceType_DVD"/>: the medium is a CD/DVD image
1351 that, if registered, can be obtained using the
1352 <link to="IVirtualBox::getDVDImage"/> call.</li>
1353 <li><link to="DeviceType_Floppy"/>: the medium is a Floppy image
1354 that, if registered, can be obtained using the
1355 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1356 </ul>
1357
1358 Note that if this is a deregistration notification,
1359 there is no way to access the object representing the
1360 unregistered medium. It is supposed that the
1361 application will do required cleanup based on the
1362 @a mediumId value.
1363 </desc>
1364 <param name="mediumId" type="uuid" mod="string" dir="in">
1365 <desc>ID of the medium this event relates to.</desc>
1366 </param>
1367 <param name="mediumType" type="DeviceType" dir="in">
1368 <desc>Type of the medium this event relates to.</desc>
1369 </param>
1370 <param name="registered" type="boolean" dir="in">
1371 <desc>
1372 If @c true, the medium was registered, otherwise it was
1373 unregistered.
1374 </desc>
1375 </param>
1376 </method>
1377
1378 <method name="onMachineRegistered">
1379 <desc>
1380 The given machine was registered or unregistered
1381 within this VirtualBox installation.
1382 </desc>
1383 <param name="machineId" type="uuid" mod="string" dir="in">
1384 <desc>ID of the machine this event relates to.</desc>
1385 </param>
1386 <param name="registered" type="boolean" dir="in">
1387 <desc>
1388 If @c true, the machine was registered, otherwise it was
1389 unregistered.
1390 </desc>
1391 </param>
1392 </method>
1393
1394 <method name="onSessionStateChange">
1395 <desc>
1396 The state of the session for the given machine was changed.
1397 <see>IMachine::sessionState</see>
1398 </desc>
1399 <param name="machineId" type="uuid" mod="string" dir="in">
1400 <desc>ID of the machine this event relates to.</desc>
1401 </param>
1402 <param name="state" type="SessionState" dir="in">
1403 <desc>New session state.</desc>
1404 </param>
1405 </method>
1406
1407 <method name="onSnapshotTaken">
1408 <desc>
1409 A new snapshot of the machine has been taken.
1410 <see>ISnapshot</see>
1411 </desc>
1412 <param name="machineId" type="uuid" mod="string" dir="in">
1413 <desc>ID of the machine this event relates to.</desc>
1414 </param>
1415 <param name="snapshotId" type="uuid" mod="string" dir="in">
1416 <desc>ID of the new snapshot.</desc>
1417 </param>
1418 </method>
1419
1420 <method name="onSnapshotDiscarded">
1421 <desc>
1422 Snapshot of the given machine has been discarded.
1423
1424 <note>
1425 This notification is delivered <b>after</b> the snapshot
1426 object has been uninitialized on the server (so that any
1427 attempt to call its methods will return an error).
1428 </note>
1429
1430 <see>ISnapshot</see>
1431 </desc>
1432 <param name="machineId" type="uuid" mod="string" dir="in">
1433 <desc>ID of the machine this event relates to.</desc>
1434 </param>
1435 <param name="snapshotId" type="uuid" mod="string" dir="in">
1436 <desc>
1437 ID of the discarded snapshot. @c null means the current machine
1438 state has been discarded (restored from the current snapshot).
1439 </desc>
1440 </param>
1441 </method>
1442
1443 <method name="onSnapshotChange">
1444 <desc>
1445 Snapshot properties (name and/or description) have been changed.
1446 <see>ISnapshot</see>
1447 </desc>
1448 <param name="machineId" type="uuid" mod="string" dir="in">
1449 <desc>ID of the machine this event relates to.</desc>
1450 </param>
1451 <param name="snapshotId" type="uuid" mod="string" dir="in">
1452 <desc>ID of the changed snapshot.</desc>
1453 </param>
1454 </method>
1455
1456 <method name="onGuestPropertyChange">
1457 <desc>
1458 Notification when a guest property has changed.
1459 </desc>
1460 <param name="machineId" type="uuid" mod="string" dir="in">
1461 <desc>
1462 ID of the machine this event relates to.
1463 </desc>
1464 </param>
1465 <param name="name" type="wstring" dir="in">
1466 <desc>
1467 The name of the property that has changed.
1468 </desc>
1469 </param>
1470 <param name="value" type="wstring" dir="in">
1471 <desc>
1472 The new property value.
1473 </desc>
1474 </param>
1475 <param name="flags" type="wstring" dir="in">
1476 <desc>
1477 The new property flags.
1478 </desc>
1479 </param>
1480 </method>
1481
1482 </interface>
1483
1484 <interface
1485 name="IDHCPServer" extends="$unknown"
1486 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1487 wsmap="managed"
1488 >
1489 <desc>
1490 The IDHCPServer interface represents the vbox dhcp server configuration.
1491
1492 To enumerate all the dhcp servers on the host, use the
1493 <link to="IVirtualBox::DHCPServers"/> attribute.
1494 </desc>
1495
1496 <attribute name="enabled" type="boolean">
1497 <desc>
1498 specifies if the dhcp server is enabled
1499 </desc>
1500 </attribute>
1501
1502 <attribute name="IPAddress" type="wstring" readonly="yes">
1503 <desc>
1504 specifies server IP
1505 </desc>
1506 </attribute>
1507
1508 <attribute name="networkMask" type="wstring" readonly="yes">
1509 <desc>
1510 specifies server network mask
1511 </desc>
1512 </attribute>
1513
1514 <attribute name="networkName" type="wstring" readonly="yes">
1515 <desc>
1516 specifies internal network name the server is used for
1517 </desc>
1518 </attribute>
1519
1520 <attribute name="lowerIP" type="wstring" readonly="yes">
1521 <desc>
1522 specifies from IP adrres in server address range
1523 </desc>
1524 </attribute>
1525
1526 <attribute name="upperIP" type="wstring" readonly="yes">
1527 <desc>
1528 specifies to IP adrres in server address range
1529 </desc>
1530 </attribute>
1531
1532 <method name="setConfiguration">
1533 <desc>
1534 configures the server
1535 <result name="E_INVALIDARG">
1536 invalid configuration supplied
1537 </result>
1538 </desc>
1539 <param name="IPAddress" type="wstring" dir="in">
1540 <desc>
1541 server IP address
1542 </desc>
1543 </param>
1544 <param name="networkMask" type="wstring" dir="in">
1545 <desc>
1546 server network mask
1547 </desc>
1548 </param>
1549 <param name="FromIPAddress" type="wstring" dir="in">
1550 <desc>
1551 server From IP address for address range
1552 </desc>
1553 </param>
1554 <param name="ToIPAddress" type="wstring" dir="in">
1555 <desc>
1556 server To IP address for address range
1557 </desc>
1558 </param>
1559 </method>
1560
1561 <method name="start">
1562 <desc>
1563 Starts DHCP server process.
1564 <result name="E_FAIL">
1565 Failed to start the process.
1566 </result>
1567 </desc>
1568 <param name="networkName" type="wstring" dir="in">
1569 <desc>
1570 Name of internal network DHCP server should attach to.
1571 </desc>
1572 </param>
1573 <param name="trunkName" type="wstring" dir="in">
1574 <desc>
1575 Name of internal network trunk.
1576 </desc>
1577 </param>
1578 <param name="trunkType" type="wstring" dir="in">
1579 <desc>
1580 Type of internal network trunk.
1581 </desc>
1582 </param>
1583 </method>
1584
1585 <method name="stop">
1586 <desc>
1587 Stops DHCP server process.
1588 <result name="E_FAIL">
1589 Failed to stop the process.
1590 </result>
1591 </desc>
1592 </method>
1593 </interface>
1594
1595 <interface
1596 name="IVirtualBox" extends="$dispatched"
1597 uuid="2158464a-f706-414b-a8c4-fb589dfc6b62"
1598 wsmap="managed"
1599 >
1600 <desc>
1601 The IVirtualBox interface represents the main interface exposed by the
1602 product that provides virtual machine management.
1603
1604 An instance of IVirtualBox is required for the product to do anything
1605 useful. Even though the interface does not expose this, internally,
1606 IVirtualBox is implemented as a singleton and actually lives in the
1607 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1608 IVirtualBox can track the state of all virtual machines on a particular
1609 host, regardless of which frontend started them.
1610
1611 To enumerate all the virtual machines on the host, use the
1612 <link to="IVirtualBox::machines"/> attribute.
1613 </desc>
1614
1615 <attribute name="version" type="wstring" readonly="yes">
1616 <desc>
1617 A string representing the version number of the product. The
1618 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1619 last number represents the build number and will frequently change.
1620 </desc>
1621 </attribute>
1622
1623 <attribute name="revision" type="unsigned long" readonly="yes">
1624 <desc>
1625 The internal build revision number of the product.
1626 </desc>
1627 </attribute>
1628
1629 <attribute name="packageType" type="wstring" readonly="yes">
1630 <desc>
1631 A string representing the package type of this product. The
1632 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1633 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1634 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1635 this.
1636 </desc>
1637 </attribute>
1638
1639 <attribute name="homeFolder" type="wstring" readonly="yes">
1640 <desc>
1641 Full path to the directory where the global settings file,
1642 <tt>VirtualBox.xml</tt>, is stored.
1643
1644 In this version of VirtualBox, the value of this property is
1645 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1646 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1647 as determined by the host OS), and cannot be changed.
1648
1649 This path is also used as the base to resolve relative paths in
1650 places where relative paths are allowed (unless otherwise
1651 expressly indicated).
1652 </desc>
1653 </attribute>
1654
1655 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1656 <desc>
1657 Full name of the global settings file.
1658 The value of this property corresponds to the value of
1659 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1660 </desc>
1661 </attribute>
1662
1663 <attribute name="host" type="IHost" readonly="yes">
1664 <desc>Associated host object.</desc>
1665 </attribute>
1666
1667 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1668 <desc>Associated system information object.</desc>
1669 </attribute>
1670
1671 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1672 <desc>
1673 Array of machine objects registered within this VirtualBox instance.
1674 </desc>
1675 </attribute>
1676
1677 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1678 <desc>
1679 Array of medium objects known to this VirtualBox installation.
1680
1681 This array contains only base media. All differencing
1682 media of the given base medium can be enumerated using
1683 <link to="IMedium::children"/>.
1684 </desc>
1685 </attribute>
1686
1687 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1688 <desc>
1689 Array of CD/DVD image objects registered with this VirtualBox instance.
1690 </desc>
1691 </attribute>
1692
1693 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1694 <desc>
1695 Array of floppy image objects registered with this VirtualBox instance.
1696 </desc>
1697 </attribute>
1698
1699 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1700
1701 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1702
1703 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1704 <desc>
1705 Collection of global shared folders. Global shared folders are
1706 available to all virtual machines.
1707
1708 New shared folders are added to the collection using
1709 <link to="#createSharedFolder"/>. Existing shared folders can be
1710 removed using <link to="#removeSharedFolder"/>.
1711
1712 <note>
1713 In the current version of the product, global shared folders are not
1714 implemented and therefore this collection is always empty.
1715 </note>
1716 </desc>
1717 </attribute>
1718
1719 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1720 <desc>
1721 Associated performance collector object.
1722 </desc>
1723 </attribute>
1724
1725 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1726 <desc>
1727 dhcp server settings.
1728 </desc>
1729 </attribute>
1730
1731 <method name="createMachine">
1732 <desc>
1733 Creates a new virtual machine.
1734
1735 The new machine is created unregistered, with the initial configuration
1736 set according to the specified guest OS type. A typical sequence of
1737 actions to create a new virtual machine is as follows:
1738
1739 <ol>
1740 <li>
1741 Call this method to have a new machine created. The returned machine
1742 object will be "mutable" allowing to change any machine property.
1743 </li>
1744
1745 <li>
1746 Configure the machine using the appropriate attributes and methods.
1747 </li>
1748
1749 <li>
1750 Call <link to="IMachine::saveSettings" /> to write the settings
1751 to the machine's XML settings file. The configuration of the newly
1752 created machine will not be saved to disk until this method is
1753 called.
1754 </li>
1755
1756 <li>
1757 Call <link to="#registerMachine" /> to add the machine to the list
1758 of machines known to VirtualBox.
1759 </li>
1760 </ol>
1761
1762 You should specify valid name for the newly created machine when calling
1763 this method. See the <link to="IMachine::name"/> attribute description
1764 for more details about the machine name.
1765
1766 The specified guest OS type identifier must match an ID of one of known
1767 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1768 array.
1769
1770 Every machine has a <i>settings file</i> that is used to store
1771 the machine configuration. This file is stored in a directory called the
1772 <i>machine settings subfolder</i>. Both the settings subfolder and file
1773 will have a name that corresponds to the name of the virtual machine.
1774 You can specify where to create the machine setting subfolder using the
1775 @a baseFolder argument. The base folder can be absolute (full path) or
1776 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1777 directory</link>.
1778
1779 If @a baseFolder is a @c null or empty string (which is recommended), the
1780 <link to="ISystemProperties::defaultMachineFolder">default machine
1781 settings folder</link> will be used as a base folder for the created
1782 machine. Otherwise the given base folder will be used. In either case,
1783 the full path to the resulting settings file has the following
1784 structure:
1785 <pre>
1786 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1787 </pre>
1788
1789 Note that if the resulting settings file already exists, this method
1790 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1791
1792 Optionally, you may specify an UUID of to assign to the created machine.
1793 However, this is not recommended and you should normally pass an empty
1794 (@c null) UUID to this method so that a new UUID will be automatically
1795 generated for every created machine. You can use UUID
1796 00000000-0000-0000-0000-000000000000 as @c null value.
1797
1798 <note>
1799 There is no way to change the name of the settings file or
1800 subfolder of the created machine directly.
1801 </note>
1802
1803 <result name="VBOX_E_OBJECT_NOT_FOUND">
1804 @a osTypeId is invalid.
1805 </result>
1806 <result name="VBOX_E_FILE_ERROR">
1807 Resulting settings file name is invalid or the settings file already
1808 exists or could not be created due to an I/O error.
1809 </result>
1810 <result name="E_INVALIDARG">
1811 @a name is empty or @c null.
1812 </result>
1813 </desc>
1814
1815 <param name="name" type="wstring" dir="in">
1816 <desc>Machine name.</desc>
1817 </param>
1818 <param name="osTypeId" type="wstring" dir="in">
1819 <desc>Guest OS Type ID.</desc>
1820 </param>
1821 <param name="baseFolder" type="wstring" dir="in">
1822 <desc>Base machine folder (optional).</desc>
1823 </param>
1824 <param name="id" type="uuid" mod="string" dir="in">
1825 <desc>Machine UUID (optional).</desc>
1826 </param>
1827 <param name="machine" type="IMachine" dir="return">
1828 <desc>Created machine object.</desc>
1829 </param>
1830 </method>
1831
1832 <method name="createLegacyMachine">
1833 <desc>
1834 Creates a new virtual machine in "legacy" mode, using the specified
1835 settings file to store machine settings.
1836
1837 As opposed to machines created by <link to="#createMachine"/>,
1838 the settings file of the machine created in "legacy" mode is not
1839 automatically renamed when the machine name is changed -- it will always
1840 remain the same as specified in this method call.
1841
1842 The specified settings file name can be absolute (full path) or relative
1843 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1844 directory</link>. If the file name doesn't contain an extension, the
1845 default extension (.xml) will be appended.
1846
1847 Note that the configuration of the newly created machine is not
1848 saved to disk (and therefore no settings file is created)
1849 until <link to="IMachine::saveSettings"/> is called. If the
1850 specified settings file already exists, this method
1851 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1852
1853 See <link to="#createMachine"/> for more information.
1854
1855 @deprecated This method may be removed later. Use <link
1856 to="IVirtualBox::createMachine"/> instead.
1857
1858 <note>
1859 There is no way to change the name of the settings file
1860 of the machine created in "legacy" mode.
1861 </note>
1862
1863 <result name="VBOX_E_OBJECT_NOT_FOUND">
1864 @a osTypeId is invalid.
1865 </result>
1866 <result name="VBOX_E_FILE_ERROR">
1867 @a settingsFile is invalid or the settings file already exists or
1868 could not be created due to an I/O error.
1869 </result>
1870 <result name="E_INVALIDARG">
1871 @a name or @a settingsFile is empty or @c null.
1872 </result>
1873 </desc>
1874
1875 <param name="name" type="wstring" dir="in">
1876 <desc>Machine name.</desc>
1877 </param>
1878 <param name="osTypeId" type="wstring" dir="in">
1879 <desc>Machine OS Type ID.</desc>
1880 </param>
1881 <param name="settingsFile" type="wstring" dir="in">
1882 <desc>Name of the machine settings file.</desc>
1883 </param>
1884 <param name="id" type="uuid" mod="string" dir="in">
1885 <desc>Machine UUID (optional).</desc>
1886 </param>
1887 <param name="machine" type="IMachine" dir="return">
1888 <desc>Created machine object.</desc>
1889 </param>
1890 </method>
1891
1892 <method name="openMachine">
1893 <desc>
1894 Opens a virtual machine from the existing settings file.
1895 The opened machine remains unregistered until you call
1896 <link to="#registerMachine"/>.
1897
1898 The specified settings file name can be absolute
1899 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1900 VirtualBox home directory</link>. This file must exist
1901 and must be a valid machine settings file whose contents
1902 will be used to construct the machine object.
1903
1904 @deprecated Will be removed soon.
1905 <result name="VBOX_E_FILE_ERROR">
1906 Settings file name invalid, not found or sharing violation.
1907 </result>
1908 </desc>
1909 <param name="settingsFile" type="wstring" dir="in">
1910 <desc>
1911 Name of the machine settings file.
1912 </desc>
1913 </param>
1914 <param name="machine" type="IMachine" dir="return">
1915 <desc>Opened machine object.</desc>
1916 </param>
1917 <note>
1918 <link to="IMachine::settingsModified"/> will return
1919 @c false for the created machine, until any of machine settings
1920 are changed.
1921 </note>
1922 </method>
1923
1924 <method name="registerMachine">
1925 <desc>
1926
1927 Registers the machine previously created using
1928 <link to="#createMachine"/> or opened using
1929 <link to="#openMachine"/> within this VirtualBox installation. After
1930 successful method invocation, the
1931 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1932 to all registered callbacks.
1933
1934 <note>
1935 This method implicitly calls <link to="IMachine::saveSettings"/>
1936 to save all current machine settings before registering it.
1937 </note>
1938
1939 <result name="VBOX_E_OBJECT_NOT_FOUND">
1940 No matching virtual machine found.
1941 </result>
1942 <result name="VBOX_E_INVALID_OBJECT_STATE">
1943 Virtual machine was not created within this VirtualBox instance.
1944 </result>
1945
1946 </desc>
1947 <param name="machine" type="IMachine" dir="in"/>
1948 </method>
1949
1950 <method name="getMachine">
1951 <desc>
1952 Attempts to find a virtual machine given its UUID.
1953 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1954 instead.
1955
1956 <result name="VBOX_E_OBJECT_NOT_FOUND">
1957 Could not find registered machine matching @a id.
1958 </result>
1959
1960 </desc>
1961 <param name="id" type="uuid" mod="string" dir="in"/>
1962 <param name="machine" type="IMachine" dir="return"/>
1963 </method>
1964
1965 <method name="findMachine">
1966 <desc>
1967 Attempts to find a virtual machine given its name.
1968 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1969 instead.
1970
1971 <result name="VBOX_E_OBJECT_NOT_FOUND">
1972 Could not find registered machine matching @a name.
1973 </result>
1974
1975 </desc>
1976 <param name="name" type="wstring" dir="in"/>
1977 <param name="machine" type="IMachine" dir="return"/>
1978 </method>
1979
1980 <method name="unregisterMachine">
1981 <desc>
1982
1983 Unregisters the machine previously registered using
1984 <link to="#registerMachine"/>. After successful method invocation, the
1985 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1986 to all registered callbacks.
1987
1988 <note>
1989 The specified machine must not be in the Saved state, have an open
1990 (or a spawning) direct session associated with it, have snapshots or
1991 have any medium attached.
1992 </note>
1993
1994 <note>
1995 This method implicitly calls <link to="IMachine::saveSettings"/> to
1996 save all current machine settings before unregistering it.
1997 </note>
1998
1999 <note>
2000 If the given machine is inaccessible (see
2001 <link to="IMachine::accessible"/>), it will be unregistered and
2002 fully uninitialized right afterwards. As a result, the returned
2003 machine object will be unusable and an attempt to call
2004 <b>any</b> method will return the "Object not ready" error.
2005 </note>
2006
2007 <result name="VBOX_E_OBJECT_NOT_FOUND">
2008 Could not find registered machine matching @a id.
2009 </result>
2010 <result name="VBOX_E_INVALID_VM_STATE">
2011 Machine is in Saved state.
2012 </result>
2013 <result name="VBOX_E_INVALID_OBJECT_STATE">
2014 Machine has snapshot or open session or medium attached.
2015 </result>
2016
2017 </desc>
2018 <param name="id" type="uuid" mod="string" dir="in">
2019 <desc>UUID of the machine to unregister.</desc>
2020 </param>
2021 <param name="machine" type="IMachine" dir="return">
2022 <desc>Unregistered machine object.</desc>
2023 </param>
2024 </method>
2025
2026 <method name="createAppliance">
2027 <desc>
2028 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
2029 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
2030 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
2031 </desc>
2032 <param name="appliance" type="IAppliance" dir="return">
2033 <desc>New appliance.</desc>
2034 </param>
2035 </method>
2036
2037 <method name="createHardDisk">
2038 <desc>
2039 Creates a new base medium object that will use the given storage
2040 format and location for medium data.
2041
2042 Note that the actual storage unit is not created by this method. In
2043 order to do it, and before you are able to attach the created medium
2044 to virtual machines, you must call one of the following methods to
2045 allocate a format-specific storage unit at the specified location:
2046 <ul>
2047 <li><link to="IMedium::createBaseStorage"/></li>
2048 <li><link to="IMedium::createDiffStorage"/></li>
2049 </ul>
2050
2051 Some medium attributes, such as <link to="IMedium::id"/>, may
2052 remain uninitialized until the medium storage unit is successfully
2053 created by one of the above methods.
2054
2055 After the storage unit is successfully created, the medium gets
2056 remembered by this VirtualBox installation and will be accessible
2057 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
2058 methods. Remembered base medium are also returned as part of
2059 the <link to="#hardDisks"/> array. See IMedium for more details.
2060
2061 The list of all storage formats supported by this VirtualBox
2062 installation can be obtained using
2063 <link to="ISystemProperties::mediumFormats"/>. If the @a format
2064 attribute is empty or @c null then the default storage format
2065 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
2066 be used for creating a storage unit of the medium.
2067
2068 Note that the format of the location string is storage format specific.
2069 See <link to="IMedium::location"/>, IMedium and
2070 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2071
2072 <result name="VBOX_E_OBJECT_NOT_FOUND">
2073 @a format identifier is invalid. See
2074 <link to="ISystemProperties::mediumFormats"/>.
2075 </result>
2076 <result name="VBOX_E_FILE_ERROR">
2077 @a location is a not valid file name (for file-based formats only).
2078 </result>
2079 </desc>
2080 <param name="format" type="wstring" dir="in">
2081 <desc>
2082 Identifier of the storage format to use for the new medium.
2083 </desc>
2084 </param>
2085 <param name="location" type="wstring" dir="in">
2086 <desc>
2087 Location of the storage unit for the new medium.
2088 </desc>
2089 </param>
2090 <param name="medium" type="IMedium" dir="return">
2091 <desc>Created medium object.</desc>
2092 </param>
2093 </method>
2094
2095 <method name="openHardDisk">
2096 <desc>
2097 Opens a medium from an existing location, optionally replacing
2098 the image UUID and/or parent UUID.
2099
2100 After the medium is successfully opened by this method, it gets
2101 remembered by (known to) this VirtualBox installation and will be
2102 accessible through <link to="#getHardDisk"/> and
2103 <link to="#findHardDisk"/> methods. Remembered base media
2104 are also returned as part of the <link to="#hardDisks"/> array and can
2105 be attached to virtual machines. See IMedium for more details.
2106
2107 If a differencing medium is to be opened by this method, the
2108 operation will succeed only if its parent medium and all ancestors,
2109 if any, are already known to this VirtualBox installation (for example,
2110 were opened by this method before).
2111
2112 This method tries to guess the storage format of the specified medium
2113 by reading medium data at the specified location.
2114
2115 If @a write is ReadWrite (which it should be), the image is opened for
2116 read/write access and must have according permissions, as VirtualBox
2117 may actually write status information into the disk's metadata sections.
2118
2119 Note that write access is required for all typical image usage in VirtualBox,
2120 since VirtualBox may need to write metadata such as a UUID into the image.
2121 The only exception is opening a source image temporarily for copying and
2122 cloning when the image will quickly be closed again.
2123
2124 Note that the format of the location string is storage format specific.
2125 See <link to="IMedium::location"/>, IMedium and
2126 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2127
2128 <result name="VBOX_E_FILE_ERROR">
2129 Invalid medium storage file location or could not find the medium
2130 at the specified location.
2131 </result>
2132 <result name="VBOX_E_IPRT_ERROR">
2133 Could not get medium storage format.
2134 </result>
2135 <result name="E_INVALIDARG">
2136 Invalid medium storage format.
2137 </result>
2138
2139 </desc>
2140 <param name="location" type="wstring" dir="in">
2141 <desc>
2142 Location of the storage unit that contains medium data in one of
2143 the supported storage formats.
2144 </desc>
2145 </param>
2146 <param name="accessMode" type="AccessMode" dir="in">
2147 <desc>
2148 Determines whether to open the image in read/write or read-only mode.
2149 </desc>
2150 </param>
2151 <param name="setImageId" type="boolean" dir="in">
2152 <desc>
2153 Select whether a new image UUID is set or not.
2154 </desc>
2155 </param>
2156 <param name="imageId" type="uuid" mod="string" dir="in">
2157 <desc>
2158 New UUID for the image. If an empty string is passed, then a new
2159 UUID is automatically created. Specifying a zero UUIDs is not valid.
2160 </desc>
2161 </param>
2162 <param name="setParentId" type="boolean" dir="in">
2163 <desc>
2164 Select whether a new parent UUID is set or not.
2165 </desc>
2166 </param>
2167 <param name="parentId" type="uuid" mod="string" dir="in">
2168 <desc>
2169 New parent UUID for the image. If an empty string is passed, then a
2170 new UUID is automatically created, provided @a setParentId is
2171 @c true. A zero UUID is valid.
2172 </desc>
2173 </param>
2174 <param name="medium" type="IMedium" dir="return">
2175 <desc>Opened medium object.</desc>
2176 </param>
2177 </method>
2178
2179 <method name="getHardDisk" const="yes">
2180 <desc>
2181 Returns a medium with the given UUID.
2182
2183 The medium with the given UUID must be known to this VirtualBox
2184 installation, i.e. it must be previously created by
2185 <link to="#createHardDisk"/> or opened by <link
2186 to="#openHardDisk"/>, or attached to some known virtual machine.
2187
2188 <result name="VBOX_E_OBJECT_NOT_FOUND">
2189 No medium object matching @a id found.
2190 </result>
2191
2192 </desc>
2193 <param name="id" type="uuid" mod="string" dir="in">
2194 <desc>UUID of the medium to look for.</desc>
2195 </param>
2196 <param name="medium" type="IMedium" dir="return">
2197 <desc>Found medium object.</desc>
2198 </param>
2199 </method>
2200
2201 <method name="findHardDisk">
2202 <desc>
2203 Returns a medium that uses the given location to store medium data.
2204
2205 The given medium must be known to this VirtualBox installation, i.e.
2206 it must be previously created by
2207 <link to="#createHardDisk"/> or opened by <link
2208 to="#openHardDisk"/>, or attached to some known virtual machine.
2209
2210 The search is done by comparing the value of the @a location argument to
2211 the <link to="IMedium::location"/> attribute of each known medium.
2212
2213 For locations represented by file names in the host's file system, the
2214 requested location can be a path relative to the
2215 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2216 only a file name without any path is given, the
2217 <link to="ISystemProperties::defaultHardDiskFolder"> default medium
2218 folder</link> will be prepended to the file name before searching. Note
2219 that on case sensitive file systems, a case sensitive comparison is
2220 performed, otherwise the case of symbols in the file path is ignored.
2221
2222 <result name="VBOX_E_OBJECT_NOT_FOUND">
2223 No medium object matching @a location found.
2224 </result>
2225
2226 </desc>
2227 <param name="location" type="wstring" dir="in">
2228 <desc>Location string to search for.</desc>
2229 </param>
2230 <param name="medium" type="IMedium" dir="return">
2231 <desc>Found medium object.</desc>
2232 </param>
2233 </method>
2234
2235 <method name="openDVDImage">
2236 <desc>
2237 Opens a CD/DVD image contained in the specified file of the supported
2238 format and assigns it the given UUID.
2239
2240 After the image is successfully opened by this method, it gets
2241 remembered by (known to) this VirtualBox installation and will be
2242 accessible through <link to="#getDVDImage"/> and
2243 <link to="#findDVDImage"/> methods. Remembered images are also
2244 returned as part of the <link to="#DVDImages"/> array and can be mounted
2245 to virtual machines. See IMedium for more details.
2246
2247 See <link to="IMedium::location"/> to get more details about the format
2248 of the location string.
2249
2250 <note>
2251 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2252 </note>
2253
2254 <result name="VBOX_E_FILE_ERROR">
2255 Invalid CD/DVD image file location or could not find the CD/DVD
2256 image at the specified location.
2257 </result>
2258 <result name="VBOX_E_INVALID_OBJECT_STATE">
2259 CD/DVD image already exists in the media registry.
2260 </result>
2261
2262 </desc>
2263 <param name="location" type="wstring" dir="in">
2264 <desc>
2265 Full path to the file that contains a valid CD/DVD image.
2266 </desc>
2267 </param>
2268 <param name="id" type="uuid" mod="string" dir="in">
2269 <desc>
2270 UUID to assign to the given image within this VirtualBox installation.
2271 If an empty (@c null) UUID is specified, the system will randomly
2272 generate a new UUID.
2273 </desc>
2274 </param>
2275 <param name="image" type="IMedium" dir="return">
2276 <desc>Opened CD/DVD image object.</desc>
2277 </param>
2278 </method>
2279
2280 <method name="getDVDImage">
2281 <desc>
2282 Returns a CD/DVD image with the given UUID.
2283
2284 The image with the given UUID must be known to this VirtualBox
2285 installation, i.e. it must be previously opened by <link
2286 to="#openDVDImage"/>, or mounted to some known virtual machine.
2287
2288 <result name="VBOX_E_OBJECT_NOT_FOUND">
2289 No matching DVD image found in the media registry.
2290 </result>
2291
2292 </desc>
2293 <param name="id" type="uuid" mod="string" dir="in">
2294 <desc>UUID of the image to look for.</desc>
2295 </param>
2296 <param name="image" type="IMedium" dir="return">
2297 <desc>Found CD/DVD image object.</desc>
2298 </param>
2299 </method>
2300
2301 <method name="findDVDImage">
2302 <desc>
2303 Returns a CD/DVD image with the given image location.
2304
2305 The image with the given UUID must be known to this VirtualBox
2306 installation, i.e. it must be previously opened by <link
2307 to="#openDVDImage"/>, or mounted to some known virtual machine.
2308
2309 The search is done by comparing the value of the @a location argument to
2310 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2311
2312 The requested location can be a path relative to the
2313 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2314 only a file name without any path is given, the
2315 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2316 folder</link> will be prepended to the file name before searching. Note
2317 that on case sensitive file systems, a case sensitive comparison is
2318 performed, otherwise the case in the file path is ignored.
2319
2320 <result name="VBOX_E_FILE_ERROR">
2321 Invalid image file location.
2322 </result>
2323 <result name="VBOX_E_OBJECT_NOT_FOUND">
2324 No matching DVD image found in the media registry.
2325 </result>
2326
2327 </desc>
2328 <param name="location" type="wstring" dir="in">
2329 <desc>CD/DVD image file path to look for.</desc>
2330 </param>
2331 <param name="image" type="IMedium" dir="return">
2332 <desc>Found CD/DVD image object.</desc>
2333 </param>
2334 </method>
2335
2336 <method name="openFloppyImage">
2337 <desc>
2338 Opens a floppy image contained in the specified file of the supported
2339 format and assigns it the given UUID.
2340
2341 After the image is successfully opened by this method, it gets
2342 remembered by (known to) this VirtualBox installation and will be
2343 accessible through <link to="#getFloppyImage"/> and
2344 <link to="#findFloppyImage"/> methods. Remembered images are also
2345 returned as part of the <link to="#floppyImages"/> array and can be
2346 mounted to virtual machines. See IMedium for more details.
2347
2348 See <link to="IMedium::location"/> to get more details about the format
2349 of the location string.
2350
2351 <result name="VBOX_E_FILE_ERROR">
2352 Invalid floppy image file location or could not find the floppy
2353 image at the specified location.
2354 </result>
2355 <result name="VBOX_E_INVALID_OBJECT_STATE">
2356 Floppy image already exists in the media registry.
2357 </result>
2358
2359 <note>
2360 Currently, only raw floppy images are supported by VirtualBox.
2361 </note>
2362 </desc>
2363 <param name="location" type="wstring" dir="in">
2364 <desc>
2365 Full path to the file that contains a valid floppy image.
2366 </desc>
2367 </param>
2368 <param name="id" type="uuid" mod="string" dir="in">
2369 <desc>
2370 UUID to assign to the given image file within this VirtualBox
2371 installation. If an empty (@c null) UUID is specified, the system will
2372 randomly generate a new UUID.
2373 </desc>
2374 </param>
2375 <param name="image" type="IMedium" dir="return">
2376 <desc>Opened floppy image object.</desc>
2377 </param>
2378 </method>
2379
2380 <method name="getFloppyImage">
2381 <desc>
2382 Returns a floppy image with the given UUID.
2383
2384 The image with the given UUID must be known to this VirtualBox
2385 installation, i.e. it must be previously opened by <link
2386 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2387
2388 <result name="VBOX_E_OBJECT_NOT_FOUND">
2389 No matching floppy image found in the media registry.
2390 </result>
2391
2392 </desc>
2393 <param name="id" type="uuid" mod="string" dir="in">
2394 <desc>UUID of the image to look for.</desc>
2395 </param>
2396 <param name="image" type="IMedium" dir="return">
2397 <desc>Found floppy image object.</desc>
2398 </param>
2399 </method>
2400
2401 <method name="findFloppyImage">
2402 <desc>
2403 Returns a floppy image with the given image location.
2404
2405 The image with the given UUID must be known to this VirtualBox
2406 installation, i.e. it must be previously opened by <link
2407 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2408
2409 The search is done by comparing the value of the @a location argument to
2410 the <link to="IMedium::location"/> attribute of each known floppy image.
2411
2412 The requested location can be a path relative to the
2413 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2414 only a file name without any path is given, the
2415 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2416 folder</link> will be prepended to the file name before searching. Note
2417 that on case sensitive file systems, a case sensitive comparison is
2418 performed, otherwise the case of symbols in the file path is ignored.
2419
2420 <result name="VBOX_E_FILE_ERROR">
2421 Invalid image file location.
2422 </result>
2423 <result name="VBOX_E_OBJECT_NOT_FOUND">
2424 No matching floppy image found in the media registry.
2425 </result>
2426
2427 </desc>
2428 <param name="location" type="wstring" dir="in">
2429 <desc>Floppy image file path to look for.</desc>
2430 </param>
2431 <param name="image" type="IMedium" dir="return">
2432 <desc>Found floppy image object.</desc>
2433 </param>
2434 </method>
2435
2436 <method name="getGuestOSType">
2437 <desc>
2438 Returns an object describing the specified guest OS type.
2439
2440 The requested guest OS type is specified using a string which is a
2441 mnemonic identifier of the guest operating system, such as
2442 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2443 particular virtual machine can be read or set using the
2444 <link to="IMachine::OSTypeId"/> attribute.
2445
2446 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2447 available guest OS type objects. Each object has an
2448 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2449 the guest OS this object describes.
2450
2451 <result name="E_INVALIDARG">
2452 @a id is not a valid Guest OS type.
2453 </result>
2454
2455 </desc>
2456 <param name="id" type="uuid" mod="string" dir="in">
2457 <desc>Guest OS type ID string.</desc>
2458 </param>
2459 <param name="type" type="IGuestOSType" dir="return">
2460 <desc>Guest OS type object.</desc>
2461 </param>
2462 </method>
2463
2464 <method name="createSharedFolder">
2465 <desc>
2466 Creates a new global shared folder by associating the given logical
2467 name with the given host path, adds it to the collection of shared
2468 folders and starts sharing it. Refer to the description of
2469 <link to="ISharedFolder"/> to read more about logical names.
2470 <note>
2471 In the current implementation, this operation is not
2472 implemented.
2473 </note>
2474 </desc>
2475 <param name="name" type="wstring" dir="in">
2476 <desc>Unique logical name of the shared folder.</desc>
2477 </param>
2478 <param name="hostPath" type="wstring" dir="in">
2479 <desc>Full path to the shared folder in the host file system.</desc>
2480 </param>
2481 <param name="writable" type="boolean" dir="in">
2482 <desc>Whether the share is writable or readonly</desc>
2483 </param>
2484 </method>
2485
2486 <method name="removeSharedFolder">
2487 <desc>
2488 Removes the global shared folder with the given name previously
2489 created by <link to="#createSharedFolder"/> from the collection of
2490 shared folders and stops sharing it.
2491 <note>
2492 In the current implementation, this operation is not
2493 implemented.
2494 </note>
2495 </desc>
2496 <param name="name" type="wstring" dir="in">
2497 <desc>Logical name of the shared folder to remove.</desc>
2498 </param>
2499 </method>
2500
2501 <method name="getExtraDataKeys">
2502 <desc>
2503 Returns an array representing the global extra data keys which currently
2504 have values defined.
2505 </desc>
2506 <param name="value" type="wstring" dir="return" safearray="yes">
2507 <desc>Array of extra data keys.</desc>
2508 </param>
2509 </method>
2510
2511 <method name="getExtraData">
2512 <desc>
2513 Returns associated global extra data.
2514
2515 If the requested data @a key does not exist, this function will
2516 succeed and return an empty string in the @a value argument.
2517
2518 <result name="VBOX_E_FILE_ERROR">
2519 Settings file not accessible.
2520 </result>
2521 <result name="VBOX_E_XML_ERROR">
2522 Could not parse the settings file.
2523 </result>
2524
2525 </desc>
2526 <param name="key" type="wstring" dir="in">
2527 <desc>Name of the data key to get.</desc>
2528 </param>
2529 <param name="value" type="wstring" dir="return">
2530 <desc>Value of the requested data key.</desc>
2531 </param>
2532 </method>
2533
2534 <method name="setExtraData">
2535 <desc>
2536 Sets associated global extra data.
2537
2538 If you pass @c null or empty string as a key @a value, the given @a key
2539 will be deleted.
2540
2541 <note>
2542 Before performing the actual data change, this method will ask all
2543 registered callbacks using the
2544 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2545 notification for a permission. If one of the callbacks refuses the
2546 new value, the change will not be performed.
2547 </note>
2548 <note>
2549 On success, the
2550 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2551 is called to inform all registered callbacks about a successful data
2552 change.
2553 </note>
2554
2555 <result name="VBOX_E_FILE_ERROR">
2556 Settings file not accessible.
2557 </result>
2558 <result name="VBOX_E_XML_ERROR">
2559 Could not parse the settings file.
2560 </result>
2561 <result name="E_ACCESSDENIED">
2562 Modification request refused.
2563 </result>
2564
2565 </desc>
2566 <param name="key" type="wstring" dir="in">
2567 <desc>Name of the data key to set.</desc>
2568 </param>
2569 <param name="value" type="wstring" dir="in">
2570 <desc>Value to assign to the key.</desc>
2571 </param>
2572 </method>
2573
2574 <method name="openSession">
2575 <desc>
2576 Opens a new direct session with the given virtual machine.
2577
2578 A direct session acts as a local lock on the given VM.
2579 There can be only one direct session open at a time for every
2580 virtual machine, protecting the VM from being manipulated by
2581 conflicting actions from different processes. Only after a
2582 direct session has been opened, one can change all VM settings
2583 and execute the VM in the process space of the session object.
2584
2585 Sessions therefore can be compared to mutex semaphores that
2586 lock a given VM for modification and execution.
2587 See <link to="ISession">ISession</link> for details.
2588
2589 <note>Unless you are writing a new VM frontend, you will not
2590 want to execute a VM in the current process. To spawn a new
2591 process that executes a VM, use
2592 <link to="IVirtualBox::openRemoteSession" />
2593 instead.</note>
2594
2595 Upon successful return, the session object can be used to
2596 get access to the machine and to the VM console.
2597
2598 In VirtualBox terminology, the machine becomes "mutable" after
2599 a session has been opened. Note that the "mutable" machine
2600 object, on which you may invoke IMachine methods to change its
2601 settings, will be a different object from the immutable IMachine
2602 objects returned by various IVirtualBox methods. To obtain a
2603 mutable IMachine object (upon which you can invoke settings methods),
2604 use the <link to="ISession::machine" /> attribute.
2605
2606 One must always call <link to="ISession::close" /> to release the
2607 lock on the machine, or the machine's state will eventually be
2608 set to "Aborted".
2609
2610 In other words, to change settings on a machine, the following
2611 sequence is typically performed:
2612
2613 <ol>
2614 <li>Call this method (openSession) to have a machine locked for
2615 the current session.</li>
2616
2617 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2618
2619 <li>Change the settings of the machine.</li>
2620
2621 <li>Call <link to="IMachine::saveSettings" />.</li>
2622
2623 <li>Close the session by calling <link to="ISession::close"/>.</li>
2624 </ol>
2625
2626 <result name="E_UNEXPECTED">
2627 Virtual machine not registered.
2628 </result>
2629 <result name="E_ACCESSDENIED">
2630 Process not started by OpenRemoteSession.
2631 </result>
2632 <result name="VBOX_E_OBJECT_NOT_FOUND">
2633 No matching virtual machine found.
2634 </result>
2635 <result name="VBOX_E_INVALID_OBJECT_STATE">
2636 Session already open or being opened.
2637 </result>
2638 <result name="VBOX_E_VM_ERROR">
2639 Failed to assign machine to session.
2640 </result>
2641
2642 </desc>
2643 <param name="session" type="ISession" dir="in">
2644 <desc>
2645 Session object that will represent the opened session after
2646 successful method invocation. This object must not represent
2647 the already open session.
2648 <note>
2649 This session will be automatically closed if the
2650 VirtualBox server is terminated for some reason.
2651 </note>
2652 </desc>
2653 </param>
2654 <param name="machineId" type="uuid" mod="string" dir="in">
2655 <desc>ID of the virtual machine to open a session with.</desc>
2656 </param>
2657 </method>
2658
2659 <method name="openRemoteSession">
2660 <desc>
2661 Spawns a new process that executes a virtual machine (called a
2662 "remote session").
2663
2664 Opening a remote session causes the VirtualBox server to start a new
2665 process that opens a direct session with the given VM. As a result, the
2666 VM is locked by that direct session in the new process, preventing
2667 conflicting changes from other processes. Since sessions act as locks
2668 that prevent conflicting changes, one cannot open a remote session
2669 for a VM that already has another open session (direct or remote), or
2670 is currently in the process of opening one (see <link
2671 to="IMachine::sessionState"/>).
2672
2673 While the remote session still provides some level of control over the
2674 VM execution to the caller (using the <link to="IConsole" /> interface),
2675 not all VM settings are available for modification within the remote
2676 session context.
2677
2678 This operation can take some time (a new VM is started in a new process,
2679 for which memory and other resources need to be set up). Because of this,
2680 an <link to="IProgress" /> is returned to allow the caller to wait for this
2681 asynchronous operation to be completed. Until then, the remote session
2682 object remains in the closed state, and accessing the machine or its
2683 console through it is invalid. It is recommended to use
2684 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2685 completion.
2686
2687 As with all <link to="ISession" /> objects, it is recommended to call
2688 <link to="ISession::close" /> on the local session object once openRemoteSession()
2689 has been called. However, the session's state (see <link to="ISession::state" />)
2690 will not return to "Closed" until the remote session has also closed (i.e.
2691 until the VM is no longer running). In that case, however, the state of
2692 the session will automatically change back to "Closed".
2693
2694 Currently supported session types (values of the @a type
2695 argument) are:
2696 <ul>
2697 <li><tt>"gui"</tt>: VirtualBox Qt GUI session</li>
2698 <li><tt>"vrdp"</tt>: VirtualBox VRDP Server session</li>
2699 <li><tt>"sdl"</tt>: VirtualBox SDL GUI session</li>
2700 </ul>
2701
2702 The @a environment argument is a string containing definitions of
2703 environment variables in the following format:
2704 @code
2705 NAME[=VALUE]\n
2706 NAME[=VALUE]\n
2707 ...
2708 @endcode
2709 where <tt>\\n</tt> is the new line character. These environment
2710 variables will be appended to the environment of the VirtualBox server
2711 process. If an environment variable exists both in the server process
2712 and in this list, the value from this list takes precedence over the
2713 server's variable. If the value of the environment variable is
2714 omitted, this variable will be removed from the resulting environment.
2715 If the environment string is @c null or empty, the server environment
2716 is inherited by the started process as is.
2717
2718 <see>openExistingSession</see>
2719
2720 <result name="E_UNEXPECTED">
2721 Virtual machine not registered.
2722 </result>
2723 <result name="E_INVALIDARG">
2724 Invalid session type @a type.
2725 </result>
2726 <result name="VBOX_E_OBJECT_NOT_FOUND">
2727 No machine matching @a machineId found.
2728 </result>
2729 <result name="VBOX_E_INVALID_OBJECT_STATE">
2730 Session already open or being opened.
2731 </result>
2732 <result name="VBOX_E_IPRT_ERROR">
2733 Launching process for machine failed.
2734 </result>
2735 <result name="VBOX_E_VM_ERROR">
2736 Failed to assign machine to session.
2737 </result>
2738
2739 </desc>
2740 <param name="session" type="ISession" dir="in">
2741 <desc>
2742 Session object that will represent the opened remote session
2743 after successful method invocation (this object must not
2744 represent an already open session).
2745 </desc>
2746 </param>
2747 <param name="machineId" type="uuid" mod="string" dir="in">
2748 <desc>ID of the virtual machine to open a session with.</desc>
2749 </param>
2750 <param name="type" type="wstring" dir="in">
2751 <desc>
2752 Type of the remote session (case sensitive).
2753 </desc>
2754 </param>
2755 <param name="environment" type="wstring" dir="in">
2756 <desc>
2757 Environment to pass to the opened session.
2758 </desc>
2759 </param>
2760 <param name="progress" type="IProgress" dir="return">
2761 <desc>Progress object to track the operation completion.</desc>
2762 </param>
2763 </method>
2764
2765 <method name="openExistingSession">
2766 <desc>
2767 Opens a new remote session with the virtual machine for
2768 which a direct session is already open.
2769
2770 The remote session provides some level of control over the VM
2771 execution (using the IConsole interface) to the caller; however,
2772 within the remote session context, not all VM settings are available
2773 for modification.
2774
2775 As opposed to <link to="#openRemoteSession"/>, the number of
2776 remote sessions opened this way is not limited by the API
2777
2778 <note>
2779 It is an error to open a remote session with the machine that
2780 doesn't have an open direct session.
2781 </note>
2782
2783 <result name="E_UNEXPECTED">
2784 Virtual machine not registered.
2785 </result>
2786 <result name="VBOX_E_OBJECT_NOT_FOUND">
2787 No machine matching @a machineId found.
2788 </result>
2789 <result name="VBOX_E_INVALID_OBJECT_STATE">
2790 Session already open or being opened.
2791 </result>
2792 <result name="VBOX_E_INVALID_SESSION_STATE">
2793 Direct session state not Open.
2794 </result>
2795 <result name="VBOX_E_VM_ERROR">
2796 Failed to get console object from direct session or assign
2797 machine to session.
2798 </result>
2799
2800 <see>openRemoteSession</see>
2801 </desc>
2802 <param name="session" type="ISession" dir="in">
2803 <desc>
2804 Session object that will represent the open remote session
2805 after successful method invocation. This object must not
2806 represent an already open session.
2807 <note>
2808 This session will be automatically closed when the peer
2809 (direct) session dies or gets closed.
2810 </note>
2811 </desc>
2812 </param>
2813 <param name="machineId" type="uuid" mod="string" dir="in">
2814 <desc>ID of the virtual machine to open a session with.</desc>
2815 </param>
2816 </method>
2817
2818 <method name="registerCallback">
2819 <desc>
2820 Registers a new global VirtualBox callback. The methods of the given
2821 callback object will be called by VirtualBox when an appropriate
2822 event occurs.
2823
2824 <result name="E_INVALIDARG">
2825 A @c null callback cannot be registered.
2826 </result>
2827
2828 </desc>
2829 <param name="callback" type="IVirtualBoxCallback" dir="in">
2830 <desc>Callback object to register.</desc>
2831 </param>
2832 </method>
2833
2834 <method name="unregisterCallback">
2835 <desc>
2836 Unregisters the previously registered global VirtualBox callback.
2837
2838 <result name="E_INVALIDARG">
2839 Specified @a callback not registered.
2840 </result>
2841
2842 </desc>
2843 <param name="callback" type="IVirtualBoxCallback" dir="in">
2844 <desc>Callback object to unregister.</desc>
2845 </param>
2846 </method>
2847
2848 <method name="waitForPropertyChange">
2849 <desc>
2850 Blocks the caller until any of the properties represented by the
2851 @a what argument changes the value or until the given timeout interval
2852 expires.
2853
2854 The @a what argument is a comma separated list of property masks that
2855 describe properties the caller is interested in. The property mask is
2856 a string in the following format:
2857
2858 <pre>
2859 [[group.]subgroup.]name
2860 </pre>
2861
2862 where @c name is the property name and @c group, @c subgroup are zero
2863 or more property group specifiers. Each element (group or name) in
2864 the property mask may be either a Latin string or an asterisk symbol
2865 (@c "*") which is used to match any string for the given element. A
2866 property mask that doesn't contain asterisk symbols represents a
2867 single fully qualified property name.
2868
2869 Groups in the fully qualified property name go from more generic (the
2870 left-most part) to more specific (the right-most part). The first
2871 element is usually a name of the object the property belongs to. The
2872 second element may be either a property name, or a child object name,
2873 or an index if the preceding element names an object which is one of
2874 many objects of the same type. This way, property names form a
2875 hierarchy of properties. Here are some examples of property names:
2876
2877 <table>
2878 <tr>
2879 <td><tt>VirtualBox.version</tt></td>
2880 <td><link to="IVirtualBox::version"/> property</td>
2881 </tr>
2882 <tr>
2883 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2884 <td><link to="IMachine::name"/> property of the machine with the
2885 given UUID</td>
2886 </tr>
2887 </table>
2888
2889 Most property names directly correspond to the properties of objects
2890 (components) provided by the VirtualBox library and may be used to
2891 track changes to these properties. However, there may be
2892 pseudo-property names that don't correspond to any existing object's
2893 property directly, as well as there may be object properties that
2894 don't have a corresponding property name that is understood by this
2895 method, and therefore changes to such properties cannot be
2896 tracked. See individual object's property descriptions to get a
2897 fully qualified property name that can be used with this method (if
2898 any).
2899
2900 There is a special property mask @c "*" (i.e. a string consisting of a
2901 single asterisk symbol) that can be used to match all properties.
2902 Below are more examples of property masks:
2903
2904 <table>
2905 <tr>
2906 <td><tt>VirtualBox.*</tt></td>
2907 <td>Track all properties of the VirtualBox object</td>
2908 </tr>
2909 <tr>
2910 <td><tt>Machine.*.name</tt></td>
2911 <td>Track changes to the <link to="IMachine::name"/> property of
2912 all registered virtual machines</td>
2913 </tr>
2914 </table>
2915
2916 <note>
2917 This function is not implemented in the current version of the
2918 product.
2919 </note>
2920 </desc>
2921 <param name="what" type="wstring" dir="in">
2922 <desc>Comma separated list of property masks.</desc>
2923 </param>
2924 <param name="timeout" type="unsigned long" dir="in">
2925 <desc>
2926 Wait timeout in milliseconds.
2927 Specify -1 for an indefinite wait.
2928 </desc>
2929 </param>
2930 <param name="changed" type="wstring" dir="out">
2931 <desc>
2932 Comma separated list of properties that have been changed and caused
2933 this method to return to the caller.
2934 </desc>
2935 </param>
2936 <param name="values" type="wstring" dir="out">
2937 <desc>Reserved, not currently used.</desc>
2938 </param>
2939 </method>
2940
2941 <!--method name="createDHCPServerForInterface">
2942 <desc>
2943 Creates a dhcp server settings to be used for the given interface
2944 <result name="E_INVALIDARG">
2945 Host network interface @a name already exists.
2946 </result>
2947 </desc>
2948 <param name="interface" type="IHostNetworkInterface" dir="in">
2949 <desc>Network Interface</desc>
2950 </param>
2951 <param name="server" type="IDHCPServer" dir="out">
2952 <desc>Dhcp server settings</desc>
2953 </param>
2954 </method-->
2955
2956 <method name="createDHCPServer">
2957 <desc>
2958 Creates a dhcp server settings to be used for the given internal network name
2959 <result name="E_INVALIDARG">
2960 Host network interface @a name already exists.
2961 </result>
2962 </desc>
2963 <param name="name" type="wstring" dir="in">
2964 <desc>server name</desc>
2965 </param>
2966 <param name="server" type="IDHCPServer" dir="return">
2967 <desc>Dhcp server settings</desc>
2968 </param>
2969 </method>
2970
2971 <method name="findDHCPServerByNetworkName">
2972 <desc>
2973 Searches a dhcp server settings to be used for the given internal network name
2974 <result name="E_INVALIDARG">
2975 Host network interface @a name already exists.
2976 </result>
2977
2978 </desc>
2979 <param name="name" type="wstring" dir="in">
2980 <desc>server name</desc>
2981 </param>
2982 <param name="server" type="IDHCPServer" dir="return">
2983 <desc>Dhcp server settings</desc>
2984 </param>
2985 </method>
2986
2987 <!--method name="findDHCPServerForInterface">
2988 <desc>
2989 Searches a dhcp server settings to be used for the given interface
2990 <result name="E_INVALIDARG">
2991 Host network interface @a name already exists.
2992 </result>
2993 </desc>
2994 <param name="interface" type="IHostNetworkInterface" dir="in">
2995 <desc>Network Interface</desc>
2996 </param>
2997 <param name="server" type="IDHCPServer" dir="out">
2998 <desc>Dhcp server settings</desc>
2999 </param>
3000 </method-->
3001
3002 <method name="removeDHCPServer">
3003 <desc>
3004 Removes the dhcp server settings
3005 <result name="E_INVALIDARG">
3006 Host network interface @a name already exists.
3007 </result>
3008 </desc>
3009 <param name="server" type="IDHCPServer" dir="in">
3010 <desc>Dhcp server settings to be removed</desc>
3011 </param>
3012 </method>
3013
3014
3015 <method name="checkFirmwarePresent">
3016 <desc>
3017 Check if this VirtualBox installation have firmware
3018 of given type available, either system-wide, or per-user.
3019 Optionally, may return a hint where this firmware can be
3020 downloaded from.
3021 </desc>
3022 <param name="firmwareType" type="FirmwareType" dir="in">
3023 <desc>
3024 Type of firmware to check.
3025 </desc>
3026 </param>
3027 <param name="version" type="wstring" dir="in">
3028 <desc>Expected version number, usually empty string.</desc>
3029 </param>
3030
3031 <param name="url" type="wstring" dir="out">
3032 <desc>
3033 Suggested url to download this firmware from.
3034 </desc>
3035 </param>
3036
3037 <param name="file" type="wstring" dir="out">
3038 <desc>
3039 Filename of firmware, only valid if result == TRUE.
3040 </desc>
3041 </param>
3042
3043 <param name="result" type="boolean" dir="return">
3044 <desc>If firmware of this type and version is available.</desc>
3045 </param>
3046 </method>
3047
3048 </interface>
3049
3050 <!--
3051 // IVFSExplorer
3052 /////////////////////////////////////////////////////////////////////////
3053 -->
3054
3055 <enum
3056 name="VFSType"
3057 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
3058 >
3059 <desc>
3060 Virtual file systems supported by VFSExplorer.
3061 </desc>
3062
3063 <const name="File" value="1" />
3064 <const name="Cloud" value="2" />
3065 <const name="S3" value="3" />
3066 <const name="WebDav" value="4" />
3067 </enum>
3068
3069 <enum
3070 name="VFSFileType"
3071 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
3072 >
3073 <desc>
3074 File types known by VFSExplorer.
3075 </desc>
3076
3077 <const name="Unknown" value="1" />
3078 <const name="Fifo" value="2" />
3079 <const name="DevChar" value="3" />
3080 <const name="Directory" value="4" />
3081 <const name="DevBlock" value="5" />
3082 <const name="File" value="6" />
3083 <const name="SymLink" value="7" />
3084 <const name="Socket" value="8" />
3085 <const name="WhiteOut" value="9" />
3086 </enum>
3087
3088 <interface
3089 name="IVFSExplorer" extends="$unknown"
3090 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
3091 wsmap="managed"
3092 >
3093 <desc>
3094 The VFSExplorer interface unifies access to different file system
3095 types. This includes local file systems as well remote file systems like
3096 S3. For a list of supported types see <link to="VFSType" />.
3097 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
3098 </desc>
3099
3100 <attribute name="path" type="wstring" readonly="yes">
3101 <desc>Returns the current path in the virtual file system.</desc>
3102 </attribute>
3103
3104 <attribute name="type" type="VFSType" readonly="yes">
3105 <desc>Returns the file system type which is currently in use.</desc>
3106 </attribute>
3107
3108 <method name="update">
3109 <desc>Updates the internal list of files/directories from the
3110 current directory level. Use <link to="#entryList" /> to get the full list
3111 after a call to this method.</desc>
3112
3113 <param name="aProgress" type="IProgress" dir="return">
3114 <desc>Progress object to track the operation completion.</desc>
3115 </param>
3116 </method>
3117
3118 <method name="cd">
3119 <desc>Change the current directory level.</desc>
3120
3121 <param name="aDir" type="wstring" dir="in">
3122 <desc>The name of the directory to go in.</desc>
3123 </param>
3124
3125 <param name="aProgress" type="IProgress" dir="return">
3126 <desc>Progress object to track the operation completion.</desc>
3127 </param>
3128 </method>
3129
3130 <method name="cdUp">
3131 <desc>Go one directory upwards from the current directory level.</desc>
3132
3133 <param name="aProgress" type="IProgress" dir="return">
3134 <desc>Progress object to track the operation completion.</desc>
3135 </param>
3136 </method>
3137
3138 <method name="entryList">
3139 <desc>Returns a list of files/directories after a call to <link
3140 to="#update" />. The user is responsible for keeping this internal
3141 list up do date.</desc>
3142
3143 <param name="aNames" type="wstring" safearray="yes" dir="out">
3144 <desc>The list of names for the entries.</desc>
3145 </param>
3146
3147 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
3148 <desc>The list of types for the entries.</desc>
3149 </param>
3150 </method>
3151
3152 <method name="exists">
3153 <desc>Checks if the given file list exists in the current directory
3154 level.</desc>
3155
3156 <param name="aNames" type="wstring" safearray="yes" dir="in">
3157 <desc>The names to check.</desc>
3158 </param>
3159
3160 <param name="aExists" type="wstring" safearray="yes" dir="return">
3161 <desc>The names which exist.</desc>
3162 </param>
3163 </method>
3164
3165 <method name="remove">
3166 <desc>Deletes the given files in the current directory level.</desc>
3167
3168 <param name="aNames" type="wstring" safearray="yes" dir="in">
3169 <desc>The names to remove.</desc>
3170 </param>
3171
3172 <param name="aProgress" type="IProgress" dir="return">
3173 <desc>Progress object to track the operation completion.</desc>
3174 </param>
3175 </method>
3176
3177 </interface>
3178
3179 <!--
3180 // IAppliance
3181 /////////////////////////////////////////////////////////////////////////
3182 -->
3183
3184 <interface
3185 name="IAppliance" extends="$unknown"
3186 uuid="e3ba9ab9-ac2c-4266-8bd2-91c4bf721ceb"
3187 wsmap="managed"
3188 >
3189 <desc>
3190 Represents a platform-independent appliance in OVF format. An instance of this is returned
3191 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3192 appliances with VirtualBox.
3193
3194 The OVF standard suggests two different physical file formats:
3195
3196 <ol>
3197 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
3198 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
3199 this descriptor file references other files, as OVF appliances distributed as a set of
3200 files most likely do, those files must be in the same directory as the descriptor file.</li>
3201
3202 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
3203 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3204 files and optionally other files.
3205
3206 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3207 be added with a later version.</li>
3208 </ol>
3209
3210 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3211 <link to="IMachine" /> involves the following sequence of API calls:
3212
3213 <ol>
3214 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3215 </li>
3216
3217 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3218 would like to import. So long as this file is syntactically valid, this will succeed
3219 and return an instance of IAppliance that contains the parsed data from the OVF file.
3220 </li>
3221
3222 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3223 contents of the IAppliance attributes accordingly. These can be inspected by a
3224 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3225 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3226 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3227 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3228 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3229 The GUI can then give the user the option to confirm and/or change these suggestions.
3230 </li>
3231
3232 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3233 virtual system to override the suggestions made by the interpret() routine.
3234 </li>
3235
3236 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3237 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3238 virtual system descriptions.
3239 </li>
3240 </ol>
3241
3242 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3243
3244 <ol>
3245 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3246 an empty IAppliance object.
3247 </li>
3248
3249 <li>For each machine you would like to export, call <link to="IMachine::export" />
3250 with the IAppliance object you just created. This creates an instance of
3251 <link to="IVirtualSystemDescription" /> inside the appliance.
3252 </li>
3253
3254 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3255 virtual system to override the suggestions made by the export() routine.
3256 </li>
3257
3258 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3259 file written.</li>
3260 </ol>
3261
3262 </desc>
3263
3264 <attribute name="path" type="wstring" readonly="yes">
3265 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3266 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3267 <link to="#write" /> (for export).
3268 This attribute is empty until one of these methods has been called.
3269 </desc>
3270 </attribute>
3271
3272 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3273 <desc>
3274 Array of virtual disk definitions. One such description exists for each
3275 disk definition in the OVF; each string array item represents one such piece of
3276 disk information, with the information fields separated by tab (\\t) characters.
3277
3278 The caller should be prepared for additional fields being appended to
3279 this string in future versions of VirtualBox and therefore check for
3280 the number of tabs in the strings returned.
3281
3282 In the current version, the following eight fields are returned per string
3283 in the array:
3284
3285 <ol>
3286 <li>Disk ID (unique string identifier given to disk)</li>
3287
3288 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3289
3290 <li>Populated size (optional unsigned integer indicating the current size of the
3291 disk; can be approximate; -1 if unspecified)</li>
3292
3293 <li>Format (string identifying the disk format, typically
3294 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3295
3296 <li>Reference (where to find the disk image, typically a file name; if empty,
3297 then the disk should be created on import)</li>
3298
3299 <li>Image size (optional unsigned integer indicating the size of the image,
3300 which need not necessarily be the same as the values specified above, since
3301 the image may be compressed or sparse; -1 if not specified)</li>
3302
3303 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3304 presently unsupported and always -1)</li>
3305
3306 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3307 </ol>
3308 </desc>
3309 </attribute>
3310
3311 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3312 <desc> Array of virtual system descriptions. One such description is created
3313 for each virtual system found in the OVF.
3314 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3315 (for export) has been called.
3316 </desc>
3317 </attribute>
3318
3319 <method name="read">
3320 <desc>
3321 Reads an OVF file into the appliance object.
3322
3323 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3324 mere fact that this method returns successfully does not mean that VirtualBox supports all
3325 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3326 </desc>
3327 <param name="file" type="wstring" dir="in">
3328 <desc>
3329 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3330 on whether the appliance is distributed as a set of files or as a single file, respectively).
3331 </desc>
3332 </param>
3333 <param name="aProgress" type="IProgress" dir="return">
3334 <desc></desc>
3335 </param>
3336 </method>
3337
3338 <method name="interpret">
3339 <desc>
3340 Interprets the OVF data that was read when the appliance was constructed. After
3341 calling this method, one can inspect the
3342 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3343 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3344 the appliance.
3345
3346 Calling this method is the second step of importing an appliance into VirtualBox;
3347 see <link to="IAppliance" /> for an overview.
3348
3349 After calling this method, one should call <link to="#getWarnings" /> to find out
3350 if problems were encountered during the processing which might later lead to
3351 errors.
3352 </desc>
3353 </method>
3354
3355 <method name="importMachines">
3356 <desc>
3357 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3358 and other interfaces that match the information contained in the appliance as
3359 closely as possible, as represented by the import instructions in the
3360 <link to="#virtualSystemDescriptions" /> array.
3361
3362 Calling this method is the final step of importing an appliance into VirtualBox;
3363 see <link to="IAppliance" /> for an overview.
3364
3365 Since importing the appliance will most probably involve copying and converting
3366 disk images, which can take a long time, this method operates asynchronously and
3367 returns an IProgress object to allow the caller to monitor the progress.
3368 </desc>
3369
3370 <param name="aProgress" type="IProgress" dir="return">
3371 <desc></desc>
3372 </param>
3373 </method>
3374
3375 <method name="createVFSExplorer">
3376 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
3377
3378 <param name="aUri" type="wstring" dir="in">
3379 <desc>The URI describing the file system to use.</desc>
3380 </param>
3381
3382 <param name="aExplorer" type="IVFSExplorer" dir="return">
3383 <desc></desc>
3384 </param>
3385 </method>
3386
3387 <method name="write">
3388 <desc>
3389 Writes the contents of the appliance exports into a new OVF file.
3390
3391 Calling this method is the final step of exporting an appliance from VirtualBox;
3392 see <link to="IAppliance" /> for an overview.
3393
3394 Since exporting the appliance will most probably involve copying and converting
3395 disk images, which can take a long time, this method operates asynchronously and
3396 returns an IProgress object to allow the caller to monitor the progress.
3397 </desc>
3398 <param name="format" type="wstring" dir="in">
3399 <desc>
3400 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
3401 future versions of VirtualBox may support additional formats.
3402 </desc>
3403 </param>
3404 <param name="path" type="wstring" dir="in">
3405 <desc>
3406 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3407 on whether the appliance is distributed as a set of files or as a single file, respectively).
3408 </desc>
3409 </param>
3410 <param name="aProgress" type="IProgress" dir="return">
3411 <desc>Progress object to track the operation completion.</desc>
3412 </param>
3413 </method>
3414
3415 <method name="getWarnings">
3416 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3417
3418 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3419 <desc></desc>
3420 </param>
3421 </method>
3422
3423 </interface>
3424
3425 <enum
3426 name="VirtualSystemDescriptionType"
3427 uuid="aacc58de-5b45-4f82-ae2e-dd9a824fc3b5"
3428 >
3429 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3430 a configuration value.</desc>
3431
3432 <const name="Ignore" value="1" />
3433 <const name="OS" value="2" />
3434 <const name="Name" value="3" />
3435 <const name="Product" value="4" />
3436 <const name="Vendor" value="5" />
3437 <const name="Version" value="6" />
3438 <const name="ProductUrl" value="7" />
3439 <const name="VendorUrl" value="8" />
3440 <const name="Description" value="9" />
3441 <const name="License" value="10" />
3442 <const name="Miscellaneous" value="11" />
3443 <const name="CPU" value="12" />
3444 <const name="Memory" value="13" />
3445 <const name="HardDiskControllerIDE" value="14" />
3446 <const name="HardDiskControllerSATA" value="15" />
3447 <const name="HardDiskControllerSCSI" value="16" />
3448 <const name="HardDiskImage" value="17" />
3449 <const name="Floppy" value="18" />
3450 <const name="CDROM" value="19" />
3451 <const name="NetworkAdapter" value="20" />
3452 <const name="USBController" value="21" />
3453 <const name="SoundCard" value="22" />
3454
3455 </enum>
3456
3457 <enum
3458 name="VirtualSystemDescriptionValueType"
3459 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3460 >
3461 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
3462 type to fetch.</desc>
3463
3464 <const name="Reference" value="1" />
3465 <const name="Original" value="2" />
3466 <const name="Auto" value="3" />
3467 <const name="ExtraConfig" value="4" />
3468
3469 </enum>
3470
3471 <interface
3472 name="IVirtualSystemDescription" extends="$unknown"
3473 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3474 wsmap="managed"
3475 >
3476
3477 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3478 After <link to="IAppliance::interpret" /> has been called, that array contains
3479 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3480 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3481 into VirtualBox.
3482 </desc>
3483
3484 <attribute name="count" type="unsigned long" readonly="yes">
3485 <desc>Return the number of virtual system description entries.</desc>
3486 </attribute>
3487
3488 <method name="getDescription">
3489 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3490 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3491
3492 The list below identifies the value sets that are possible depending on the
3493 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3494 the array item with the same index in aOvfValues[] will contain the original value as contained
3495 in the OVF file (just for informational purposes), and the corresponding item in aVBoxValues[]
3496 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3497 the aExtraConfigValues[] array item may also be used.
3498
3499 <ul>
3500 <li>
3501 "OS": the guest operating system type. There must be exactly one such array item on import. The
3502 corresponding item in aVBoxValues[] contains the suggested guest operating system for VirtualBox.
3503 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3504 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF.
3505 </li>
3506 <li>
3507 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3508 if none is present on import, then an automatic name will be created from the operating system
3509 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3510 from the OVF file, and aVBoxValues[] will contain a suggestion for a unique VirtualBox
3511 <link to="IMachine" /> name that does not exist yet.
3512 </li>
3513 <li>
3514 "Description": an arbitrary description.
3515 </li>
3516 <li>
3517 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3518 code to display such a license for agreement; the Main API does not enforce any such policy.
3519 </li>
3520 <li>
3521 Miscellaneous: reserved for future use.
3522 </li>
3523 <li>
3524 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3525 </li>
3526 <li>
3527 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3528 is present on import, then VirtualBox will set a meaningful default based on the operating system
3529 type.
3530 </li>
3531 <li>
3532 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3533 has no value in aOvfValues[] or aVBoxValues[].
3534 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3535 type can use to specify which hard disk controller a virtual disk should be connected to.
3536 </li>
3537 <li>
3538 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3539 has no value in aOvfValues[] or aVBoxValues[].
3540 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3541 </li>
3542 <li>
3543 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3544 The items in aOvfValues[] and aVBoxValues[] will either be "LsiLogic" or "BusLogic".
3545 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3546 </li>
3547 <li>
3548 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3549 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3550
3551 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3552 a path since the image file should be in the same location as the OVF file itself), whereas the
3553 item in aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
3554 hard disk image. This means that on import the image will be copied and converted from the
3555 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3556 On import, the target image will also be registered with VirtualBox.
3557
3558 The matching item in the aExtraConfigValues[] array must contain a string of the following
3559 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3560 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3561 the image to. That number must be the index of an array item with one of the hard disk controller
3562 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3563 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3564 this can range from 0-3 (which VirtualBox will interpret as primary master, primary slave, secondary master and
3565 secondary slave. For SATA and SCSI controllers, the channel can range from 0-29.
3566 </li>
3567 <li>
3568 "CDROM": a virtual CD-ROM drive. The matching item in aExtraConfigValue[] contains the same
3569 attachment information as with "HardDiskImage" items.
3570 </li>
3571 <li>
3572 "CDROM": a virtual floppy drive. The matching item in aExtraConfigValue[] contains the same
3573 attachment information as with "HardDiskImage" items.
3574 </li>
3575 <li>
3576 "NetworkAdapter": a network adapter. The array item in aVBoxValues[] will specify the hardware
3577 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3578 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3579 </li>
3580 <li>
3581 "USBController": a USB controller. There can be at most one such item. If and only if such an
3582 item ispresent, USB support will be enabled for the new virtual machine.
3583 </li>
3584 <li>
3585 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3586 present, sound support will be enabled for the new virtual machine. Note that the virtual
3587 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3588 may be different from the virtual soundcard expected by the appliance.
3589 </li>
3590 </ul>
3591
3592 </desc>
3593
3594 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3595 <desc></desc>
3596 </param>
3597
3598 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3599 <desc></desc>
3600 </param>
3601
3602 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3603 <desc></desc>
3604 </param>
3605
3606 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3607 <desc></desc>
3608 </param>
3609
3610 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3611 <desc></desc>
3612 </param>
3613
3614 </method>
3615
3616 <method name="getDescriptionByType">
3617 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3618 should be returned.</desc>
3619
3620 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3621 <desc></desc>
3622 </param>
3623
3624 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3625 <desc></desc>
3626 </param>
3627
3628 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3629 <desc></desc>
3630 </param>
3631
3632 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3633 <desc></desc>
3634 </param>
3635
3636 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3637 <desc></desc>
3638 </param>
3639
3640 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3641 <desc></desc>
3642 </param>
3643
3644 </method>
3645
3646 <method name="getValuesByType">
3647 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3648 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3649 values.</desc>
3650
3651 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3652 <desc></desc>
3653 </param>
3654
3655 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3656 <desc></desc>
3657 </param>
3658
3659 <param name="aValues" type="wstring" dir="return" safearray="yes">
3660 <desc></desc>
3661 </param>
3662
3663 </method>
3664
3665 <method name="setFinalValues">
3666 <desc>
3667 This method allows the appliance's user to change the configuration for the virtual
3668 system descriptions. For each array item returned from <link to="#getDescription" />,
3669 you must pass in one boolean value and one configuration value.
3670
3671 Each item in the boolean array determines whether the particular configuration item
3672 should be enabled.
3673 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3674 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3675 and SoundCard.
3676
3677 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3678 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
3679 the configuration remains unchanged. Please see the documentation for getDescription()
3680 for valid configuration values for the individual array item types. If the
3681 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
3682 </desc>
3683
3684 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3685 <desc></desc>
3686 </param>
3687
3688 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
3689 <desc></desc>
3690 </param>
3691
3692 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3693 <desc></desc>
3694 </param>
3695 </method>
3696
3697 <method name="addDescription">
3698 <desc>
3699 This method adds an additional description entry to the stack of already
3700 available descriptions for this virtual system. This is handy for writing
3701 values which aren't directly supported by VirtualBox. One example would
3702 be the License type of <link to="VirtualSystemDescriptionType" />.
3703 </desc>
3704
3705 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3706 <desc></desc>
3707 </param>
3708
3709 <param name="aVBoxValue" type="wstring" dir="in">
3710 <desc></desc>
3711 </param>
3712
3713 <param name="aExtraConfigValue" type="wstring" dir="in">
3714 <desc></desc>
3715 </param>
3716 </method>
3717 </interface>
3718
3719
3720 <!--
3721 // IMachine
3722 /////////////////////////////////////////////////////////////////////////
3723 -->
3724
3725 <interface
3726 name="IInternalMachineControl" extends="$unknown"
3727 uuid="35d8d838-d066-447d-927a-fd93afdbec90"
3728 internal="yes"
3729 wsmap="suppress"
3730 >
3731 <method name="setRemoveSavedState">
3732 <desc>
3733 Updates the flag whether saved state is removed on a machine state
3734 change from Saved to PoweredOff.
3735 </desc>
3736 <param name="aRemove" type="boolean" dir="in"/>
3737 </method>
3738
3739 <method name="updateState">
3740 <desc>
3741 Updates the VM state.
3742 <note>
3743 This operation will also update the settings file with
3744 the correct information about the saved state file
3745 and delete this file from disk when appropriate.
3746 </note>
3747 </desc>
3748 <param name="state" type="MachineState" dir="in"/>
3749 </method>
3750
3751 <method name="getIPCId">
3752 <param name="id" type="wstring" dir="return"/>
3753 </method>
3754
3755 <method name="runUSBDeviceFilters">
3756 <desc>
3757 Asks the server to run USB devices filters of the associated
3758 machine against the given USB device and tell if there is
3759 a match.
3760 <note>
3761 Intended to be used only for remote USB devices. Local
3762 ones don't require to call this method (this is done
3763 implicitly by the Host and USBProxyService).
3764 </note>
3765 </desc>
3766 <param name="device" type="IUSBDevice" dir="in"/>
3767 <param name="matched" type="boolean" dir="out"/>
3768 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3769 </method>
3770
3771 <method name="captureUSBDevice">
3772 <desc>
3773 Requests a capture of the given host USB device.
3774 When the request is completed, the VM process will
3775 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3776 notification.
3777 </desc>
3778 <param name="id" type="uuid" mod="string" dir="in"/>
3779 </method>
3780
3781 <method name="detachUSBDevice">
3782 <desc>
3783 Notification that a VM is going to detach (@a done = @c false) or has
3784 already detached (@a done = @c true) the given USB device.
3785 When the @a done = @c true request is completed, the VM process will
3786 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3787 notification.
3788 <note>
3789 In the @a done = @c true case, the server must run its own filters
3790 and filters of all VMs but this one on the detached device
3791 as if it were just attached to the host computer.
3792 </note>
3793 </desc>
3794 <param name="id" type="uuid" mod="string" dir="in"/>
3795 <param name="done" type="boolean" dir="in"/>
3796 </method>
3797
3798 <method name="autoCaptureUSBDevices">
3799 <desc>
3800 Requests a capture all matching USB devices attached to the host.
3801 When the request is completed, the VM process will
3802 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3803 notification per every captured device.
3804 </desc>
3805 </method>
3806
3807 <method name="detachAllUSBDevices">
3808 <desc>
3809 Notification that a VM that is being powered down. The done
3810 parameter indicates whether which stage of the power down
3811 we're at. When @a done = @c false the VM is announcing its
3812 intentions, while when @a done = @c true the VM is reporting
3813 what it has done.
3814 <note>
3815 In the @a done = @c true case, the server must run its own filters
3816 and filters of all VMs but this one on all detach devices as
3817 if they were just attached to the host computer.
3818 </note>
3819 </desc>
3820 <param name="done" type="boolean" dir="in"/>
3821 </method>
3822
3823 <method name="onSessionEnd">
3824 <desc>
3825 Triggered by the given session object when the session is about
3826 to close normally.
3827 </desc>
3828 <param name="session" type="ISession" dir="in">
3829 <desc>Session that is being closed</desc>
3830 </param>
3831 <param name="progress" type="IProgress" dir="return">
3832 <desc>
3833 Used to wait until the corresponding machine is actually
3834 dissociated from the given session on the server.
3835 Returned only when this session is a direct one.
3836 </desc>
3837 </param>
3838 </method>
3839
3840 <method name="beginSavingState">
3841 <desc>
3842 Called by the VM process to inform the server it wants to
3843 save the current state and stop the VM execution.
3844 </desc>
3845 <param name="progress" type="IProgress" dir="in">
3846 <desc>
3847 Progress object created by the VM process to wait until
3848 the state is saved.
3849 </desc>
3850 </param>
3851 <param name="stateFilePath" type="wstring" dir="out">
3852 <desc>
3853 File path the VM process must save the execution state to.
3854 </desc>
3855 </param>
3856 </method>
3857
3858 <method name="endSavingState">
3859 <desc>
3860 Called by the VM process to inform the server that saving
3861 the state previously requested by #beginSavingState is either
3862 successfully finished or there was a failure.
3863
3864 <result name="VBOX_E_FILE_ERROR">
3865 Settings file not accessible.
3866 </result>
3867 <result name="VBOX_E_XML_ERROR">
3868 Could not parse the settings file.
3869 </result>
3870
3871 </desc>
3872
3873 <param name="success" type="boolean" dir="in">
3874 <desc>@c true to indicate success and @c false otherwise.
3875 </desc>
3876 </param>
3877 </method>
3878
3879 <method name="adoptSavedState">
3880 <desc>
3881 Gets called by IConsole::adoptSavedState.
3882 <result name="VBOX_E_FILE_ERROR">
3883 Invalid saved state file path.
3884 </result>
3885 </desc>
3886 <param name="savedStateFile" type="wstring" dir="in">
3887 <desc>Path to the saved state file to adopt.</desc>
3888 </param>
3889 </method>
3890
3891 <method name="beginTakingSnapshot">
3892 <desc>
3893 Called from the VM process to request from the server to perform the
3894 server-side actions of creating a snapshot (creating differencing images
3895 and the snapshot object).
3896
3897 <result name="VBOX_E_FILE_ERROR">
3898 Settings file not accessible.
3899 </result>
3900 <result name="VBOX_E_XML_ERROR">
3901 Could not parse the settings file.
3902 </result>
3903 </desc>
3904 <param name="initiator" type="IConsole" dir="in">
3905 <desc>The console object that initiated this call.</desc>
3906 </param>
3907 <param name="name" type="wstring" dir="in">
3908 <desc>Snapshot name.</desc>
3909 </param>
3910 <param name="description" type="wstring" dir="in">
3911 <desc>Snapshot description.</desc>
3912 </param>
3913 <param name="consoleProgress" type="IProgress" dir="in">
3914 <desc>
3915 Progress object created by the VM process tracking the
3916 snapshot's progress. This has the following sub-operations:
3917 <ul>
3918 <li>setting up (weight 1);</li>
3919 <li>one for each medium attachment that needs a differencing image (weight 1 each);</li>
3920 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3921 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3922 <li>finishing up (weight 1)</li>
3923 </ul>
3924 </desc>
3925 </param>
3926 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3927 <desc>
3928 Whether this is an online snapshot (i.e. the machine is running).
3929 </desc>
3930 </param>
3931 <param name="stateFilePath" type="wstring" dir="out">
3932 <desc>
3933 File path the VM process must save the execution state to.
3934 </desc>
3935 </param>
3936 </method>
3937
3938 <method name="endTakingSnapshot">
3939 <desc>
3940 Called by the VM process to inform the server that the snapshot
3941 previously requested by #beginTakingSnapshot is either
3942 successfully taken or there was a failure.
3943 </desc>
3944
3945 <param name="success" type="boolean" dir="in">
3946 <desc>@c true to indicate success and @c false otherwise</desc>
3947 </param>
3948 </method>
3949
3950 <method name="deleteSnapshot">
3951 <desc>
3952 Gets called by IConsole::deleteSnapshot.
3953 <result name="VBOX_E_INVALID_OBJECT_STATE">
3954 Snapshot has more than one child snapshot.
3955 </result>
3956 </desc>
3957 <param name="initiator" type="IConsole" dir="in">
3958 <desc>The console object that initiated this call.</desc>
3959 </param>
3960 <param name="id" type="uuid" mod="string" dir="in">
3961 <desc>UUID of the snapshot to discard.</desc>
3962 </param>
3963 <param name="machineState" type="MachineState" dir="out">
3964 <desc>New machine state after this operation is started.</desc>
3965 </param>
3966 <param name="progress" type="IProgress" dir="return">
3967 <desc>Progress object to track the operation completion.</desc>
3968 </param>
3969 </method>
3970
3971 <method name="restoreSnapshot">
3972 <desc>
3973 Gets called by IConsole::RestoreSnapshot.
3974 </desc>
3975 <param name="initiator" type="IConsole" dir="in">
3976 <desc>The console object that initiated this call.</desc>
3977 </param>
3978 <param name="snapshot" type="ISnapshot" dir="in">
3979 <desc>The snapshot to restore the VM state from.</desc>
3980 </param>
3981 <param name="machineState" type="MachineState" dir="out">
3982 <desc>New machine state after this operation is started.</desc>
3983 </param>
3984 <param name="progress" type="IProgress" dir="return">
3985 <desc>Progress object to track the operation completion.</desc>
3986 </param>
3987 </method>
3988
3989 <method name="pullGuestProperties">
3990 <desc>
3991 Get the list of the guest properties matching a set of patterns along
3992 with their values, time stamps and flags and give responsibility for
3993 managing properties to the console.
3994 </desc>
3995 <param name="name" type="wstring" dir="out" safearray="yes">
3996 <desc>
3997 The names of the properties returned.
3998 </desc>
3999 </param>
4000 <param name="value" type="wstring" dir="out" safearray="yes">
4001 <desc>
4002 The values of the properties returned. The array entries match the
4003 corresponding entries in the @a name array.
4004 </desc>
4005 </param>
4006 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
4007 <desc>
4008 The time stamps of the properties returned. The array entries match
4009 the corresponding entries in the @a name array.
4010 </desc>
4011 </param>
4012 <param name="flags" type="wstring" dir="out" safearray="yes">
4013 <desc>
4014 The flags of the properties returned. The array entries match the
4015 corresponding entries in the @a name array.
4016 </desc>
4017 </param>
4018 </method>
4019
4020 <method name="pushGuestProperties">
4021 <desc>
4022 Set the list of the guest properties matching a set of patterns along
4023 with their values, time stamps and flags and return responsibility for
4024 managing properties to IMachine.
4025 </desc>
4026 <param name="name" type="wstring" dir="in" safearray="yes">
4027 <desc>
4028 The names of the properties.
4029 </desc>
4030 </param>
4031 <param name="value" type="wstring" dir="in" safearray="yes">
4032 <desc>
4033 The values of the properties. The array entries match the
4034 corresponding entries in the @a name array.
4035 </desc>
4036 </param>
4037 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
4038 <desc>
4039 The time stamps of the properties. The array entries match
4040 the corresponding entries in the @a name array.
4041 </desc>
4042 </param>
4043 <param name="flags" type="wstring" dir="in" safearray="yes">
4044 <desc>
4045 The flags of the properties. The array entries match the
4046 corresponding entries in the @a name array.
4047 </desc>
4048 </param>
4049 </method>
4050 <method name="pushGuestProperty">
4051 <desc>
4052 Update a single guest property in IMachine.
4053 </desc>
4054 <param name="name" type="wstring" dir="in">
4055 <desc>
4056 The name of the property to be updated.
4057 </desc>
4058 </param>
4059 <param name="value" type="wstring" dir="in">
4060 <desc>
4061 The value of the property.
4062 </desc>
4063 </param>
4064 <param name="timestamp" type="unsigned long long" dir="in">
4065 <desc>
4066 The timestamp of the property.
4067 </desc>
4068 </param>
4069 <param name="flags" type="wstring" dir="in">
4070 <desc>
4071 The flags of the property.
4072 </desc>
4073 </param>
4074 </method>
4075
4076 <method name="lockMedia">
4077 <desc>
4078 Locks all media attached to the machine for writing and parents of
4079 attached differencing media (if any) for reading. This operation is
4080 atomic so that if it fails no media is actually locked.
4081
4082 This method is intended to be called when the machine is in Starting or
4083 Restoring state. The locked media will be automatically unlocked when
4084 the machine is powered off or crashed.
4085 </desc>
4086 </method>
4087 <method name="unlockMedia">
4088 <desc>
4089 Unlocks all media previously locked using
4090 <link to="IInternalMachineControl::lockMedia"/>.
4091
4092 This method is intended to be used with teleportation so that it is
4093 possible to teleport between processes on the same machine.
4094 </desc>
4095 </method>
4096 </interface>
4097
4098 <interface
4099 name="IBIOSSettings" extends="$unknown"
4100 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
4101 wsmap="managed"
4102 >
4103 <desc>
4104 The IBIOSSettings interface represents BIOS settings of the virtual
4105 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
4106 </desc>
4107 <attribute name="logoFadeIn" type="boolean">
4108 <desc>Fade in flag for BIOS logo animation.</desc>
4109 </attribute>
4110
4111 <attribute name="logoFadeOut" type="boolean">
4112 <desc>Fade out flag for BIOS logo animation.</desc>
4113 </attribute>
4114
4115 <attribute name="logoDisplayTime" type="unsigned long">
4116 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
4117 </attribute>
4118
4119 <attribute name="logoImagePath" type="wstring">
4120 <desc>Local file system path for external BIOS image.</desc>
4121 </attribute>
4122
4123 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
4124 <desc>Mode of the BIOS boot device menu.</desc>
4125 </attribute>
4126
4127 <attribute name="ACPIEnabled" type="boolean">
4128 <desc>ACPI support flag.</desc>
4129 </attribute>
4130
4131 <attribute name="IOAPICEnabled" type="boolean">
4132 <desc>
4133 IO APIC support flag. If set, VirtualBox will provide an IO APIC
4134 and support IRQs above 15.
4135 </desc>
4136 </attribute>
4137
4138 <attribute name="timeOffset" type="long long">
4139 <desc>
4140 Offset in milliseconds from the host system time. This allows for
4141 guests running with a different system date/time than the host.
4142 It is equivalent to setting the system date/time in the BIOS except
4143 it is not an absolute value but a relative one. Guest Additions
4144 time synchronization honors this offset.
4145 </desc>
4146 </attribute>
4147
4148 <attribute name="PXEDebugEnabled" type="boolean">
4149 <desc>
4150 PXE debug logging flag. If set, VirtualBox will write extensive
4151 PXE trace information to the release log.
4152 </desc>
4153 </attribute>
4154
4155 </interface>
4156
4157 <interface
4158 name="IMachine" extends="$unknown"
4159 uuid="99404f50-dd10-40d3-889b-dd2f79f1e95e"
4160 wsmap="managed"
4161 >
4162 <desc>
4163 The IMachine interface represents a virtual machine, or guest, created
4164 in VirtualBox.
4165
4166 This interface is used in two contexts. First of all, a collection of
4167 objects implementing this interface is stored in the
4168 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
4169 machines that are currently registered with this VirtualBox
4170 installation. Also, once a session has been opened for the given virtual
4171 machine (e.g. the virtual machine is running), the machine object
4172 associated with the open session can be queried from the session object;
4173 see <link to="ISession"/> for details.
4174
4175 The main role of this interface is to expose the settings of the virtual
4176 machine and provide methods to change various aspects of the virtual
4177 machine's configuration. For machine objects stored in the
4178 <link to="IVirtualBox::machines"/> collection, all attributes are
4179 read-only unless explicitly stated otherwise in individual attribute
4180 and method descriptions. In order to change a machine setting, a session
4181 for this machine must be opened using one of
4182 <link to="IVirtualBox::openSession"/>,
4183 <link to="IVirtualBox::openRemoteSession"/> or
4184 <link to="IVirtualBox::openExistingSession"/> methods. After the
4185 session has been successfully opened, a mutable machine object needs to
4186 be queried from the session object and then the desired settings changes
4187 can be applied to the returned object using IMachine attributes and
4188 methods. See the <link to="ISession"/> interface description for more
4189 information about sessions.
4190
4191 Note that IMachine does not provide methods to control virtual machine
4192 execution (such as start the machine, or power it down) -- these methods
4193 are grouped in a separate interface called <link to="IConsole" />.
4194
4195 <see>ISession, IConsole</see>
4196 </desc>
4197
4198 <attribute name="parent" type="IVirtualBox" readonly="yes">
4199 <desc>Associated parent object.</desc>
4200 </attribute>
4201
4202 <attribute name="accessible" type="boolean" readonly="yes">
4203 <desc>
4204 Whether this virtual machine is currently accessible or not.
4205
4206 A machine is always deemed accessible unless it is registered <i>and</i>
4207 its settings file cannot be read or parsed (either because the file itself
4208 is unavailable or has invalid XML contents).
4209
4210 Every time this property is read, the accessibility state of
4211 this machine is re-evaluated. If the returned value is @c false,
4212 the <link to="#accessError"/> property may be used to get the
4213 detailed error information describing the reason of
4214 inaccessibility, including XML error messages.
4215
4216 When the machine is inaccessible, only the following properties
4217 can be used on it:
4218 <ul>
4219 <li><link to="#parent"/></li>
4220 <li><link to="#id"/></li>
4221 <li><link to="#settingsFilePath"/></li>
4222 <li><link to="#accessible"/></li>
4223 <li><link to="#accessError"/></li>
4224 </ul>
4225
4226 An attempt to access any other property or method will return
4227 an error.
4228
4229 The only possible action you can perform on an inaccessible
4230 machine is to unregister it using the
4231 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4232 for the accessibility state once more by querying this
4233 property).
4234
4235 <note>
4236 In the current implementation, once this property returns
4237 @c true, the machine will never become inaccessible
4238 later, even if its settings file cannot be successfully
4239 read/written any more (at least, until the VirtualBox
4240 server is restarted). This limitation may be removed in
4241 future releases.
4242 </note>
4243 </desc>
4244 </attribute>
4245
4246 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4247 <desc>
4248 Error information describing the reason of machine
4249 inaccessibility.
4250
4251 Reading this property is only valid after the last call to
4252 <link to="#accessible"/> returned @c false (i.e. the
4253 machine is currently unaccessible). Otherwise, a @c null
4254 IVirtualBoxErrorInfo object will be returned.
4255 </desc>
4256 </attribute>
4257
4258 <attribute name="name" type="wstring">
4259 <desc>
4260 Name of the virtual machine.
4261
4262 Besides being used for human-readable identification purposes
4263 everywhere in VirtualBox, the virtual machine name is also used
4264 as a name of the machine's settings file and as a name of the
4265 subdirectory this settings file resides in. Thus, every time you
4266 change the value of this property, the settings file will be
4267 renamed once you call <link to="#saveSettings"/> to confirm the
4268 change. The containing subdirectory will be also renamed, but
4269 only if it has exactly the same name as the settings file
4270 itself prior to changing this property (for backward compatibility
4271 with previous API releases). The above implies the following
4272 limitations:
4273 <ul>
4274 <li>The machine name cannot be empty.</li>
4275 <li>The machine name can contain only characters that are valid
4276 file name characters according to the rules of the file
4277 system used to store VirtualBox configuration.</li>
4278 <li>You cannot have two or more machines with the same name
4279 if they use the same subdirectory for storing the machine
4280 settings files.</li>
4281 <li>You cannot change the name of the machine if it is running,
4282 or if any file in the directory containing the settings file
4283 is being used by another running machine or by any other
4284 process in the host operating system at a time when
4285 <link to="#saveSettings"/> is called.
4286 </li>
4287 </ul>
4288 If any of the above limitations are hit, <link to="#saveSettings"/>
4289 will return an appropriate error message explaining the exact
4290 reason and the changes you made to this machine will not be
4291 saved.
4292 <note>
4293 For "legacy" machines created using the
4294 <link to="IVirtualBox::createLegacyMachine"/> call,
4295 the above naming limitations do not apply because the
4296 machine name does not affect the settings file name.
4297 The settings file name remains the same as it was specified
4298 during machine creation and never changes.
4299 </note>
4300 </desc>
4301 </attribute>
4302
4303 <attribute name="description" type="wstring">
4304 <desc>
4305 Description of the virtual machine.
4306
4307 The description attribute can contain any text and is
4308 typically used to describe the hardware and software
4309 configuration of the virtual machine in detail (i.e. network
4310 settings, versions of the installed software and so on).
4311 </desc>
4312 </attribute>
4313
4314 <attribute name="id" type="uuid" mod="string" readonly="yes">
4315 <desc>UUID of the virtual machine.</desc>
4316 </attribute>
4317
4318 <attribute name="OSTypeId" type="wstring">
4319 <desc>
4320 User-defined identifier of the Guest OS type.
4321 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4322 an IGuestOSType object representing details about the given
4323 Guest OS type.
4324 <note>
4325 This value may differ from the value returned by
4326 <link to="IGuest::OSTypeId"/> if Guest Additions are
4327 installed to the guest OS.
4328 </note>
4329 </desc>
4330 </attribute>
4331
4332 <attribute name="HardwareVersion" type="wstring">
4333 <desc>Hardware version identifier. Internal use only for now.</desc>
4334 </attribute>
4335
4336 <attribute name="hardwareUUID" type="uuid" mod="string">
4337 <desc>
4338 The UUID presented to the guest via memory tables, hardware and guest
4339 properties. For most VMs this is the same as the @a id, but for VMs
4340 which have been cloned or teleported it may be the same as the source
4341 VM. This latter is because the guest shouldn't notice that it was
4342 cloned or teleported.
4343 </desc>
4344 </attribute>
4345
4346 <attribute name="CPUCount" type="unsigned long">
4347 <desc>Number of virtual CPUs in the VM.</desc>
4348 </attribute>
4349
4350 <attribute name="memorySize" type="unsigned long">
4351 <desc>System memory size in megabytes.</desc>
4352 </attribute>
4353
4354 <attribute name="memoryBalloonSize" type="unsigned long">
4355 <desc>Initial memory balloon size in megabytes.</desc>
4356 </attribute>
4357
4358 <attribute name="statisticsUpdateInterval" type="unsigned long">
4359 <desc>Initial interval to update guest statistics in seconds.</desc>
4360 </attribute>
4361
4362 <attribute name="VRAMSize" type="unsigned long">
4363 <desc>Video memory size in megabytes.</desc>
4364 </attribute>
4365
4366 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4367 <desc>
4368 This setting determines whether VirtualBox allows this machine to make
4369 use of the 3D graphics support available on the host.</desc>
4370 </attribute>
4371
4372 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
4373 <desc>
4374 This setting determines whether VirtualBox allows this machine to make
4375 use of the 2D video acceleration support available on the host.</desc>
4376 </attribute>
4377
4378 <attribute name="monitorCount" type="unsigned long">
4379 <desc>
4380 Number of virtual monitors.
4381 <note>
4382 Only effective on Windows XP and later guests with
4383 Guest Additions installed.
4384 </note>
4385 </desc>
4386 </attribute>
4387
4388 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4389 <desc>Object containing all BIOS settings.</desc>
4390 </attribute>
4391
4392 <attribute name="firmwareType" type="FirmwareType">
4393 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
4394 bootstrap in this VM.</desc>
4395 </attribute>
4396
4397 <attribute name="snapshotFolder" type="wstring">
4398 <desc>
4399 Full path to the directory used to store snapshot data
4400 (differencing media and saved state files) of this machine.
4401
4402 The initial value of this property is
4403 <tt>&lt;</tt><link to="#settingsFilePath">
4404 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4405 <link to="#id">machine_uuid</link>
4406 <tt>&gt;</tt>.
4407
4408 Currently, it is an error to try to change this property on
4409 a machine that has snapshots (because this would require to
4410 move possibly large files to a different location).
4411 A separate method will be available for this purpose later.
4412
4413 <note>
4414 Setting this property to @c null or to an empty string will restore
4415 the initial value.
4416 </note>
4417 <note>
4418 When setting this property, the specified path can be
4419 absolute (full path) or relative to the directory where the
4420 <link to="#settingsFilePath">machine settings file</link>
4421 is located. When reading this property, a full path is
4422 always returned.
4423 </note>
4424 <note>
4425 The specified path may not exist, it will be created
4426 when necessary.
4427 </note>
4428 </desc>
4429 </attribute>
4430
4431 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4432 <desc>VRDP server object.</desc>
4433 </attribute>
4434
4435 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
4436 <desc>Array of media attached to this machine.</desc>
4437 </attribute>
4438
4439 <attribute name="USBController" type="IUSBController" readonly="yes">
4440 <desc>
4441 Associated USB controller object.
4442
4443 <note>
4444 If USB functionality is not available in the given edition of
4445 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4446 </note>
4447 </desc>
4448 </attribute>
4449
4450 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4451 <desc>Associated audio adapter, always present.</desc>
4452 </attribute>
4453
4454 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4455 <desc>Array of storage controllers attached to this machine.</desc>
4456 </attribute>
4457
4458 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4459 <desc>
4460 Full name of the file containing machine settings data.
4461 </desc>
4462 </attribute>
4463
4464 <attribute name="settingsModified" type="boolean" readonly="yes">
4465 <desc>
4466 Whether the settings of this machine have been modified
4467 (but neither yet saved nor discarded).
4468 <note>
4469 Reading this property is only valid on instances returned
4470 by <link to="ISession::machine"/> and on new machines
4471 created by <link to="IVirtualBox::createMachine"/> or opened
4472 by <link to="IVirtualBox::openMachine"/> but not
4473 yet registered, or on unregistered machines after calling
4474 <link to="IVirtualBox::unregisterMachine"/>. For all other
4475 cases, the settings can never be modified.
4476 </note>
4477 <note>
4478 For newly created unregistered machines, the value of this
4479 property is always @c true until <link to="#saveSettings"/>
4480 is called (no matter if any machine settings have been
4481 changed after the creation or not). For opened machines
4482 the value is set to @c false (and then follows to normal rules).
4483 </note>
4484 </desc>
4485 </attribute>
4486
4487 <attribute name="sessionState" type="SessionState" readonly="yes">
4488 <desc>Current session state for this machine.</desc>
4489 </attribute>
4490
4491 <attribute name="sessionType" type="wstring" readonly="yes">
4492 <desc>
4493 Type of the session. If <link to="#sessionState"/> is
4494 SessionSpawning or SessionOpen, this attribute contains the
4495 same value as passed to the
4496 <link to="IVirtualBox::openRemoteSession"/> method in the
4497 @a type parameter. If the session was opened directly using
4498 <link to="IVirtualBox::openSession"/>, or if
4499 <link to="#sessionState"/> is SessionClosed, the value of this
4500 attribute is an empty string.
4501 </desc>
4502 </attribute>
4503
4504 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4505 <desc>
4506 Identifier of the session process. This attribute contains the
4507 platform-dependent identifier of the process that has opened a
4508 direct session for this machine using the
4509 <link to="IVirtualBox::openSession"/> call. The returned value
4510 is only valid if <link to="#sessionState"/> is SessionOpen or
4511 SessionClosing (i.e. a session is currently open or being
4512 closed) by the time this property is read.
4513 </desc>
4514 </attribute>
4515
4516 <attribute name="state" type="MachineState" readonly="yes">
4517 <desc>Current execution state of this machine.</desc>
4518 </attribute>
4519
4520 <attribute name="lastStateChange" type="long long" readonly="yes">
4521 <desc>
4522 Time stamp of the last execution state change,
4523 in milliseconds since 1970-01-01 UTC.
4524 </desc>
4525 </attribute>
4526
4527 <attribute name="stateFilePath" type="wstring" readonly="yes">
4528 <desc>
4529 Full path to the file that stores the execution state of
4530 the machine when it is in the <link to="MachineState_Saved"/> state.
4531 <note>
4532 When the machine is not in the Saved state, this attribute is
4533 an empty string.
4534 </note>
4535 </desc>
4536 </attribute>
4537
4538 <attribute name="logFolder" type="wstring" readonly="yes">
4539 <desc>
4540 Full path to the folder that stores a set of rotated log files
4541 recorded during machine execution. The most recent log file is
4542 named <tt>VBox.log</tt>, the previous log file is
4543 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4544 in the current version).
4545 </desc>
4546 </attribute>
4547
4548 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4549 <desc>
4550 Current snapshot of this machine. This is @c null if the machine
4551 currently has no snapshots. If it is not @c null, then it was
4552 set by one of <link to="Console::takeSnapshot" />,
4553 <link to="Console::deleteSnapshot" />
4554 or <link to="Console::restoreSnapshot" />, depending on which
4555 was called last. See <link to="ISnapshot"/> for details.
4556 </desc>
4557 </attribute>
4558
4559 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4560 <desc>
4561 Number of snapshots taken on this machine. Zero means the
4562 machine doesn't have any snapshots.
4563 </desc>
4564 </attribute>
4565
4566 <attribute name="currentStateModified" type="boolean" readonly="yes">
4567 <desc>
4568 Returns @c true if the current state of the machine is not
4569 identical to the state stored in the current snapshot.
4570
4571 The current state is identical to the current snapshot only
4572 directly after one of the following calls are made:
4573
4574 <ul>
4575 <li><link to="IConsole::restoreSnapshot"/>
4576 </li>
4577 <li><link to="IConsole::takeSnapshot"/> (issued on a
4578 "powered off" or "saved" machine, for which
4579 <link to="#settingsModified"/> returns @c false)
4580 </li>
4581 <li><link to="IMachine::setCurrentSnapshot"/>
4582 </li>
4583 </ul>
4584
4585 The current state remains identical until one of the following
4586 happens:
4587 <ul>
4588 <li>settings of the machine are changed</li>
4589 <li>the saved state is discarded</li>
4590 <li>the current snapshot is discarded</li>
4591 <li>an attempt to execute the machine is made</li>
4592 </ul>
4593
4594 <note>
4595 For machines that don't have snapshots, this property is
4596 always @c false.
4597 </note>
4598 </desc>
4599 </attribute>
4600
4601 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4602 <desc>
4603 Collection of shared folders for this machine (permanent shared
4604 folders). These folders are shared automatically at machine startup
4605 and available only to the guest OS installed within this machine.
4606
4607 New shared folders are added to the collection using
4608 <link to="#createSharedFolder"/>. Existing shared folders can be
4609 removed using <link to="#removeSharedFolder"/>.
4610 </desc>
4611 </attribute>
4612
4613 <attribute name="clipboardMode" type="ClipboardMode">
4614 <desc>
4615 Synchronization mode between the host OS clipboard
4616 and the guest OS clipboard.
4617 </desc>
4618 </attribute>
4619
4620 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4621 <desc>
4622 A comma-separated list of simple glob patterns. Changes to guest
4623 properties whose name matches one of the patterns will generate an
4624 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4625 </desc>
4626 </attribute>
4627
4628 <attribute name="teleporterEnabled" type="boolean">
4629 <desc>
4630 When set to @a true, the virtual machine becomes a target teleporter
4631 the next time it is powered on. This can only set to @a true when the
4632 VM is in the @a PoweredOff or @a Aborted state.
4633
4634 <!-- This property is automatically set to @a false when the VM is powered
4635 on. (bird: This doesn't work yet ) -->
4636 </desc>
4637 </attribute>
4638
4639 <attribute name="teleporterPort" type="unsigned long">
4640 <desc>
4641 The TCP port the target teleporter will listen for incoming
4642 teleportations on.
4643
4644 0 means the port is automatically selected upon power on. The actual
4645 value can be read from this property while the machine is waiting for
4646 incoming teleportations.
4647 </desc>
4648 </attribute>
4649
4650 <attribute name="teleporterAddress" type="wstring">
4651 <desc>
4652 The address the target teleporter will listen on. If set to an empty
4653 string, it will listen on all addresses.
4654 </desc>
4655 </attribute>
4656
4657 <attribute name="teleporterPassword" type="wstring">
4658 <desc>
4659 The password the to check for on the target teleporter. This is just a
4660 very basic measure to prevent simple hacks and operators accidentally
4661 beaming a virtual machine to the wrong place.
4662 </desc>
4663 </attribute>
4664
4665 <method name="setBootOrder">
4666 <desc>
4667 Puts the given device to the specified position in
4668 the boot order.
4669
4670 To indicate that no device is associated with the given position,
4671 <link to="DeviceType_Null"/> should be used.
4672
4673 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4674
4675 <result name="E_INVALIDARG">
4676 Boot @a position out of range.
4677 </result>
4678 <result name="E_NOTIMPL">
4679 Booting from USB @a device currently not supported.
4680 </result>
4681
4682 </desc>
4683 <param name="position" type="unsigned long" dir="in">
4684 <desc>
4685 Position in the boot order (@c 1 to the total number of
4686 devices the machine can boot from, as returned by
4687 <link to="ISystemProperties::maxBootPosition"/>).
4688 </desc>
4689 </param>
4690 <param name="device" type="DeviceType" dir="in">
4691 <desc>
4692 The type of the device used to boot at the given position.
4693 </desc>
4694 </param>
4695 </method>
4696
4697 <method name="getBootOrder" const="yes">
4698 <desc>
4699 Returns the device type that occupies the specified
4700 position in the boot order.
4701
4702 @todo [remove?]
4703 If the machine can have more than one device of the returned type
4704 (such as hard disks), then a separate method should be used to
4705 retrieve the individual device that occupies the given position.
4706
4707 If here are no devices at the given position, then
4708 <link to="DeviceType_Null"/> is returned.
4709
4710 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4711
4712 <result name="E_INVALIDARG">
4713 Boot @a position out of range.
4714 </result>
4715
4716 </desc>
4717 <param name="position" type="unsigned long" dir="in">
4718 <desc>
4719 Position in the boot order (@c 1 to the total number of
4720 devices the machine can boot from, as returned by
4721 <link to="ISystemProperties::maxBootPosition"/>).
4722 </desc>
4723 </param>
4724 <param name="device" type="DeviceType" dir="return">
4725 <desc>
4726 Device at the given position.
4727 </desc>
4728 </param>
4729 </method>
4730
4731 <method name="attachDevice">
4732 <desc>
4733 Attaches a device and optionally mounts a medium to the given storage
4734 controller (<link to="IStorageController" />, identified by @a name),
4735 at the indicated port and device.
4736
4737 This method is intended for managing storage devices in general (it works
4738 for both fixed and removable media). For storage devices supporting removable
4739 media (such as DVDs and floppies), you can also use <link to="IMedium::mountMedium"/>
4740 for changing the media while the machine is running.
4741
4742 For the IDE bus, the @a controllerPort parameter can be either
4743 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4744 respectively. For each of these, @a device can then be either @c 0 or @c 1,
4745 to specify the master or the slave device, respectively. (In the
4746 default configuration of virtual machines, the secondary master is
4747 used for a CD/DVD drive.)
4748
4749 For an SATA controller, @a controllerPort must be a number ranging
4750 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4751 be a number ranging from @c 0 to @c 15.
4752
4753 For both SCSI and SATA, the @a device parameter is unused and must
4754 be @c 0.
4755
4756 For fixed media such as hard disks, the given medium identifier cannot
4757 be a zero UUID. It may be a zero UUID for removable media such as DVDs
4758 and floppies.
4759
4760 After calling this returns successfully, a new instance of
4761 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4762 attachments (<link to="IMachine::mediumAttachments"/>).
4763
4764 The specified device slot must not have a device attached to it,
4765 or this method will fail.
4766
4767 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4768 information about attaching media.
4769
4770 <note>
4771 You cannot attach a device to a running machine. Also, you cannot
4772 attach a device to a newly created machine until this machine's
4773 settings are saved to disk using <link to="#saveSettings"/>.
4774 </note>
4775 <note>
4776 If the medium is being attached indirectly, a new differencing medium
4777 will implicitly be created for it and attached instead. If the
4778 changes made to the machine settings (including this indirect
4779 attachment) are later cancelled using <link to="#discardSettings"/>,
4780 this implicitly created differencing medium will implicitly
4781 be deleted.
4782 </note>
4783
4784 <result name="E_INVALIDARG">
4785 SATA device, SATA port, IDE port or IDE slot out of range.
4786 </result>
4787 <result name="VBOX_E_INVALID_OBJECT_STATE">
4788 Attempt to attach medium to an unregistered virtual machine.
4789 </result>
4790 <result name="VBOX_E_INVALID_VM_STATE">
4791 Invalid machine state.
4792 </result>
4793 <result name="VBOX_E_OBJECT_IN_USE">
4794 Hard disk already attached to this or another virtual machine.
4795 </result>
4796
4797 </desc>
4798 <param name="name" type="wstring" dir="in">
4799 <desc>Name of the storage controller to attach the device to.</desc>
4800 </param>
4801 <param name="controllerPort" type="long" dir="in">
4802 <desc>Port to attach the device to.</desc>
4803 </param>
4804 <param name="device" type="long" dir="in">
4805 <desc>Device slot in the given port to attach the device to.</desc>
4806 </param>
4807 <param name="type" type="DeviceType" dir="in">
4808 <desc>Device type of the attached device.</desc>
4809 </param>
4810 <param name="id" type="uuid" mod="string" dir="in">
4811 <desc>UUID of the medium to mount. Zero UUID means do not mount any
4812 medium.</desc>
4813 </param>
4814 </method>
4815
4816 <method name="detachDevice">
4817 <desc>
4818 Detaches the device attached to a device slot of the specified bus.
4819
4820 Detaching the device from the virtual machine is deferred. This means
4821 that the medium remains associated with the machine when this method
4822 returns and gets actually de-associated only after a successful
4823 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4824 for more detailed information about attaching media.
4825
4826 <note>
4827 You cannot detach a device from a running machine.
4828 </note>
4829 <note>
4830 Detaching differencing media implicitly created by <link
4831 to="#attachDevice"/> for the indirect attachment using this
4832 method will <b>not</b> implicitly delete them. The
4833 <link to="IMedium::deleteStorage"/> operation should be
4834 explicitly performed by the caller after the medium is successfully
4835 detached and the settings are saved with
4836 <link to="#saveSettings"/>, if it is the desired action.
4837 </note>
4838
4839 <result name="VBOX_E_INVALID_VM_STATE">
4840 Attempt to detach medium from a running virtual machine.
4841 </result>
4842 <result name="VBOX_E_OBJECT_NOT_FOUND">
4843 No medium attached to given slot/bus.
4844 </result>
4845 <result name="VBOX_E_NOT_SUPPORTED">
4846 Medium format does not support storage deletion.
4847 </result>
4848
4849 </desc>
4850 <param name="name" type="wstring" dir="in">
4851 <desc>Name of the storage controller to detach the medium from.</desc>
4852 </param>
4853 <param name="controllerPort" type="long" dir="in">
4854 <desc>Port number to detach the medium from.</desc>
4855 </param>
4856 <param name="device" type="long" dir="in">
4857 <desc>Device slot number to detach the medium from.</desc>
4858 </param>
4859 </method>
4860
4861 <method name="passthroughDevice">
4862 <desc>
4863 Sets the passthrough mode of an existing DVD device. Changing the
4864 setting while the VM is running is forbidden. The setting is only used
4865 if at VM start the device is configured as a host DVD drive, in all
4866 other cases it is ignored. The device must already exist; see
4867 <link to="IMachine::attachDevice"/> for how to attach a new device.
4868
4869 The @a controllerPort and @a device parameters specify the device slot and
4870 have have the same meaning as with <link to="IMachine::attachDevice" />.
4871
4872 <result name="E_INVALIDARG">
4873 SATA device, SATA port, IDE port or IDE slot out of range.
4874 </result>
4875 <result name="VBOX_E_INVALID_OBJECT_STATE">
4876 Attempt to modify an unregistered virtual machine.
4877 </result>
4878 <result name="VBOX_E_INVALID_VM_STATE">
4879 Invalid machine state.
4880 </result>
4881
4882 </desc>
4883 <param name="name" type="wstring" dir="in">
4884 <desc>Name of the storage controller.</desc>
4885 </param>
4886 <param name="controllerPort" type="long" dir="in">
4887 <desc>Storage controller port.</desc>
4888 </param>
4889 <param name="device" type="long" dir="in">
4890 <desc>Device slot in the given port.</desc>
4891 </param>
4892 <param name="passthrough" type="boolean" dir="in">
4893 <desc>New value for the passthrough setting.</desc>
4894 </param>
4895 </method>
4896
4897 <method name="mountMedium">
4898 <desc>
4899 Mounts a medium (<link to="IMedium" />, identified
4900 by the given UUID @a id) to the given storage controller
4901 (<link to="IStorageController" />, identified by @a name),
4902 at the indicated port and device. The device must already exist;
4903 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4904
4905 This method is intended only for managing removable media, where the
4906 device is fixed but media is changeable at runtime (such as DVDs
4907 and floppies). It cannot be used for fixed media such as hard disks.
4908
4909 The @a controllerPort and @a device parameters specify the device slot and
4910 have have the same meaning as with <link to="IMachine::attachDevice" />.
4911
4912 The specified device slot can have a medium mounted, which will be
4913 unmounted first. Specifying a zero UUID (or an empty string) for
4914 @a medium does just an unmount.
4915
4916 See <link to="IMedium"/> for more detailed information about
4917 attaching media.
4918
4919 <result name="E_INVALIDARG">
4920 SATA device, SATA port, IDE port or IDE slot out of range.
4921 </result>
4922 <result name="VBOX_E_INVALID_OBJECT_STATE">
4923 Attempt to attach medium to an unregistered virtual machine.
4924 </result>
4925 <result name="VBOX_E_INVALID_VM_STATE">
4926 Invalid machine state.
4927 </result>
4928 <result name="VBOX_E_OBJECT_IN_USE">
4929 Medium already attached to this or another virtual machine.
4930 </result>
4931
4932 </desc>
4933 <param name="name" type="wstring" dir="in">
4934 <desc>Name of the storage controller to attach the medium to.</desc>
4935 </param>
4936 <param name="controllerPort" type="long" dir="in">
4937 <desc>Port to attach the medium to.</desc>
4938 </param>
4939 <param name="device" type="long" dir="in">
4940 <desc>Device slot in the given port to attach the medium to.</desc>
4941 </param>
4942 <param name="medium" type="uuid" mod="string" dir="in">
4943 <desc>UUID of the medium to attach. A zero UUID means unmount the
4944 currently mounted medium.</desc>
4945 </param>
4946 <param name="force" type="boolean" dir="in">
4947 <desc>Allows to force unmount/mount of a medium which is locked by
4948 theDevice slot in the given port to attach the medium to.</desc>
4949 </param>
4950 </method>
4951
4952 <method name="getMedium" const="yes">
4953 <desc>
4954 Returns the virtual medium attached to a device slot of the specified
4955 bus.
4956
4957 Note that if the medium was indirectly attached by
4958 <link to="#mountMedium"/> to the given device slot then this
4959 method will return not the same object as passed to the
4960 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4961 more detailed information about mounting a medium.
4962
4963 <result name="VBOX_E_OBJECT_NOT_FOUND">
4964 No medium attached to given slot/bus.
4965 </result>
4966
4967 </desc>
4968 <param name="name" type="wstring" dir="in">
4969 <desc>Name of the storage controller the medium is attached to.</desc>
4970 </param>
4971 <param name="controllerPort" type="long" dir="in">
4972 <desc>Port to query.</desc>
4973 </param>
4974 <param name="device" type="long" dir="in">
4975 <desc>Device slot in the given port to query.</desc>
4976 </param>
4977 <param name="medium" type="IMedium" dir="return">
4978 <desc>Attached medium object.</desc>
4979 </param>
4980 </method>
4981
4982 <method name="getMediumAttachmentsOfController" const="yes">
4983 <desc>
4984 Returns an array of medium attachments which are attached to the
4985 the controller with the given name.
4986
4987 <result name="VBOX_E_OBJECT_NOT_FOUND">
4988 A storage controller with given name doesn't exist.
4989 </result>
4990 </desc>
4991 <param name="name" type="wstring" dir="in"/>
4992 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4993 </method>
4994
4995 <method name="getMediumAttachment" const="yes">
4996 <desc>
4997 Returns a medium attachment which corresponds to the controller with
4998 the given name, on the given port and device slot.
4999
5000 <result name="VBOX_E_OBJECT_NOT_FOUND">
5001 No attachment exists for the given controller/port/device combination.
5002 </result>
5003 </desc>
5004 <param name="name" type="wstring" dir="in"/>
5005 <param name="controllerPort" type="long" dir="in"/>
5006 <param name="device" type="long" dir="in"/>
5007 <param name="attachment" type="IMediumAttachment" dir="return"/>
5008 </method>
5009
5010 <method name="getNetworkAdapter" const="yes">
5011 <desc>
5012 Returns the network adapter associated with the given slot.
5013 Slots are numbered sequentially, starting with zero. The total
5014 number of adapters per machine is defined by the
5015 <link to="ISystemProperties::networkAdapterCount"/> property,
5016 so the maximum slot number is one less than that property's value.
5017
5018 <result name="E_INVALIDARG">
5019 Invalid @a slot number.
5020 </result>
5021
5022 </desc>
5023 <param name="slot" type="unsigned long" dir="in"/>
5024 <param name="adapter" type="INetworkAdapter" dir="return"/>
5025 </method>
5026
5027 <method name="addStorageController">
5028 <desc>
5029 Adds a new storage controller (SCSI or SATA controller) to the
5030 machine and returns it as an instance of
5031 <link to="IStorageController" />.
5032
5033 @a name identifies the controller for subsequent calls such as
5034 <link to="#getStorageControllerByName" />,
5035 <link to="#getStorageControllerByInstance" />,
5036 <link to="#removeStorageController" />,
5037 <link to="#attachDevice" /> or <link to="#mountMedium" />.
5038
5039 After the controller has been added, you can set its exact
5040 type by setting the <link to="IStorageController::controllerType" />.
5041
5042 <result name="VBOX_E_OBJECT_IN_USE">
5043 A storage controller with given name exists already.
5044 </result>
5045 <result name="E_INVALIDARG">
5046 Invalid @a controllerType.
5047 </result>
5048 </desc>
5049 <param name="name" type="wstring" dir="in"/>
5050 <param name="connectionType" type="StorageBus" dir="in"/>
5051 <param name="controller" type="IStorageController" dir="return"/>
5052 </method>
5053
5054 <method name="getStorageControllerByName" const="yes">
5055 <desc>
5056 Returns a storage controller with the given name.
5057
5058 <result name="VBOX_E_OBJECT_NOT_FOUND">
5059 A storage controller with given name doesn't exist.
5060 </result>
5061 </desc>
5062 <param name="name" type="wstring" dir="in"/>
5063 <param name="storageController" type="IStorageController" dir="return"/>
5064 </method>
5065
5066 <method name="getStorageControllerByInstance" const="yes">
5067 <desc>
5068 Returns a storage controller with the given instance number.
5069
5070 <result name="VBOX_E_OBJECT_NOT_FOUND">
5071 A storage controller with given instance number doesn't exist.
5072 </result>
5073 </desc>
5074 <param name="instance" type="unsigned long" dir="in"/>
5075 <param name="storageController" type="IStorageController" dir="return"/>
5076 </method>
5077
5078 <method name="removeStorageController">
5079 <desc>
5080 Removes a storage controller from the machine.
5081
5082 <result name="VBOX_E_OBJECT_NOT_FOUND">
5083 A storage controller with given name doesn't exist.
5084 </result>
5085 </desc>
5086 <param name="name" type="wstring" dir="in"/>
5087 </method>
5088
5089 <method name="getSerialPort" const="yes">
5090 <desc>
5091 Returns the serial port associated with the given slot.
5092 Slots are numbered sequentially, starting with zero. The total
5093 number of serial ports per machine is defined by the
5094 <link to="ISystemProperties::serialPortCount"/> property,
5095 so the maximum slot number is one less than that property's value.
5096
5097 <result name="E_INVALIDARG">
5098 Invalid @a slot number.
5099 </result>
5100
5101 </desc>
5102 <param name="slot" type="unsigned long" dir="in"/>
5103 <param name="port" type="ISerialPort" dir="return"/>
5104 </method>
5105
5106 <method name="getParallelPort" const="yes">
5107 <desc>
5108 Returns the parallel port associated with the given slot.
5109 Slots are numbered sequentially, starting with zero. The total
5110 number of parallel ports per machine is defined by the
5111 <link to="ISystemProperties::parallelPortCount"/> property,
5112 so the maximum slot number is one less than that property's value.
5113
5114 <result name="E_INVALIDARG">
5115 Invalid @a slot number.
5116 </result>
5117
5118 </desc>
5119 <param name="slot" type="unsigned long" dir="in"/>
5120 <param name="port" type="IParallelPort" dir="return"/>
5121 </method>
5122
5123 <method name="getExtraDataKeys">
5124 <desc>
5125 Returns an array representing the machine-specific extra data keys
5126 which currently have values defined.
5127 </desc>
5128 <param name="value" type="wstring" dir="return" safearray="yes">
5129 <desc>Array of extra data keys.</desc>
5130 </param>
5131 </method>
5132
5133 <method name="getExtraData">
5134 <desc>
5135 Returns associated machine-specific extra data.
5136
5137 If the requested data @a key does not exist, this function will
5138 succeed and return an empty string in the @a value argument.
5139
5140 <result name="VBOX_E_FILE_ERROR">
5141 Settings file not accessible.
5142 </result>
5143 <result name="VBOX_E_XML_ERROR">
5144 Could not parse the settings file.
5145 </result>
5146
5147 </desc>
5148 <param name="key" type="wstring" dir="in">
5149 <desc>Name of the data key to get.</desc>
5150 </param>
5151 <param name="value" type="wstring" dir="return">
5152 <desc>Value of the requested data key.</desc>
5153 </param>
5154 </method>
5155
5156 <method name="setExtraData">
5157 <desc>
5158 Sets associated machine-specific extra data.
5159
5160 If you pass @c null or an empty string as a key @a value, the given
5161 @a key will be deleted.
5162
5163 <note>
5164 Before performing the actual data change, this method will ask all
5165 registered callbacks using the
5166 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
5167 notification for a permission. If one of the callbacks refuses the
5168 new value, the change will not be performed.
5169 </note>
5170 <note>
5171 On success, the
5172 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
5173 is called to inform all registered callbacks about a successful data
5174 change.
5175 </note>
5176 <note>
5177 This method can be called outside the machine session and therefore
5178 it's a caller's responsibility to handle possible race conditions
5179 when several clients change the same key at the same time.
5180 </note>
5181
5182 <result name="VBOX_E_FILE_ERROR">
5183 Settings file not accessible.
5184 </result>
5185 <result name="VBOX_E_XML_ERROR">
5186 Could not parse the settings file.
5187 </result>
5188
5189 </desc>
5190 <param name="key" type="wstring" dir="in">
5191 <desc>Name of the data key to set.</desc>
5192 </param>
5193 <param name="value" type="wstring" dir="in">
5194 <desc>Value to assign to the key.</desc>
5195 </param>
5196 </method>
5197
5198 <method name="getCpuProperty" const="yes">
5199 <desc>
5200 Returns the virtual CPU boolean value of the specified property.
5201
5202 <result name="E_INVALIDARG">
5203 Invalid property.
5204 </result>
5205
5206 </desc>
5207 <param name="property" type="CpuPropertyType" dir="in">
5208 <desc>
5209 Property type to query.
5210 </desc>
5211 </param>
5212 <param name="value" type="boolean" dir="return">
5213 <desc>
5214 Property value.
5215 </desc>
5216 </param>
5217 </method>
5218
5219 <method name="setCpuProperty">
5220 <desc>
5221 Sets the virtual CPU boolean value of the specified property.
5222
5223 <result name="E_INVALIDARG">
5224 Invalid property.
5225 </result>
5226
5227 </desc>
5228 <param name="property" type="CpuPropertyType" dir="in">
5229 <desc>
5230 Property type to query.
5231 </desc>
5232 </param>
5233 <param name="value" type="boolean" dir="in">
5234 <desc>
5235 Property value.
5236 </desc>
5237 </param>
5238 </method>
5239
5240 <method name="getCpuIdLeaf" const="yes">
5241 <desc>
5242 Returns the virtual CPU cpuid information for the specified leaf.
5243
5244 Currently supported index values for cpuid:
5245 Standard CPUID leafs: 0 - 0xA
5246 Extended CPUID leafs: 0x80000000 - 0x8000000A
5247
5248 See the Intel and AMD programmer's manuals for detailed information
5249 about the cpuid instruction and its leafs.
5250 <result name="E_INVALIDARG">
5251 Invalid id.
5252 </result>
5253
5254 </desc>
5255 <param name="id" type="unsigned long" dir="in">
5256 <desc>
5257 Cpuid leaf index.
5258 </desc>
5259 </param>
5260 <param name="valEax" type="unsigned long" dir="out">
5261 <desc>
5262 Cpuid leaf value for register eax.
5263 </desc>
5264 </param>
5265 <param name="valEbx" type="unsigned long" dir="out">
5266 <desc>
5267 Cpuid leaf value for register ebx.
5268 </desc>
5269 </param>
5270 <param name="valEcx" type="unsigned long" dir="out">
5271 <desc>
5272 Cpuid leaf value for register ecx.
5273 </desc>
5274 </param>
5275 <param name="valEdx" type="unsigned long" dir="out">
5276 <desc>
5277 Cpuid leaf value for register edx.
5278 </desc>
5279 </param>
5280 </method>
5281
5282 <method name="setCpuIdLeaf" const="yes">
5283 <desc>
5284 Sets the virtual CPU cpuid information for the specified leaf. Note that these values
5285 are not passed unmodified. VirtualBox clears features that it doesn't support.
5286
5287 Currently supported index values for cpuid:
5288 Standard CPUID leafs: 0 - 0xA
5289 Extended CPUID leafs: 0x80000000 - 0x8000000A
5290
5291 See the Intel and AMD programmer's manuals for detailed information
5292 about the cpuid instruction and its leafs.
5293
5294 Do not use this method unless you know exactly what you're doing. Misuse can lead to
5295 random crashes inside VMs.
5296 <result name="E_INVALIDARG">
5297 Invalid id.
5298 </result>
5299
5300 </desc>
5301 <param name="id" type="unsigned long" dir="in">
5302 <desc>
5303 Cpuid leaf index.
5304 </desc>
5305 </param>
5306 <param name="valEax" type="unsigned long" dir="in">
5307 <desc>
5308 Cpuid leaf value for register eax.
5309 </desc>
5310 </param>
5311 <param name="valEbx" type="unsigned long" dir="in">
5312 <desc>
5313 Cpuid leaf value for register ebx.
5314 </desc>
5315 </param>
5316 <param name="valEcx" type="unsigned long" dir="in">
5317 <desc>
5318 Cpuid leaf value for register ecx.
5319 </desc>
5320 </param>
5321 <param name="valEdx" type="unsigned long" dir="in">
5322 <desc>
5323 Cpuid leaf value for register edx.
5324 </desc>
5325 </param>
5326 </method>
5327
5328 <method name="removeCpuIdLeaf" const="yes">
5329 <desc>
5330 Removes the virtual CPU cpuid leaf for the specified index
5331
5332 <result name="E_INVALIDARG">
5333 Invalid id.
5334 </result>
5335
5336 </desc>
5337 <param name="id" type="unsigned long" dir="in">
5338 <desc>
5339 Cpuid leaf index.
5340 </desc>
5341 </param>
5342 </method>
5343
5344 <method name="removeAllCpuIdLeafs" const="yes">
5345 <desc>
5346 Removes all the virtual CPU cpuid leafs
5347 </desc>
5348 </method>
5349
5350 <method name="getHWVirtExProperty" const="yes">
5351 <desc>
5352 Returns the value of the specified hardware virtualization boolean property.
5353
5354 <result name="E_INVALIDARG">
5355 Invalid property.
5356 </result>
5357
5358 </desc>
5359 <param name="property" type="HWVirtExPropertyType" dir="in">
5360 <desc>
5361 Property type to query.
5362 </desc>
5363 </param>
5364 <param name="value" type="boolean" dir="return">
5365 <desc>
5366 Property value.
5367 </desc>
5368 </param>
5369 </method>
5370
5371 <method name="setHWVirtExProperty">
5372 <desc>
5373 Sets a new value for the specified hardware virtualization boolean property.
5374
5375 <result name="E_INVALIDARG">
5376 Invalid property.
5377 </result>
5378
5379 </desc>
5380 <param name="property" type="HWVirtExPropertyType" dir="in">
5381 <desc>
5382 Property type to set.
5383 </desc>
5384 </param>
5385 <param name="value" type="boolean" dir="in">
5386 <desc>
5387 New property value.
5388 </desc>
5389 </param>
5390 </method>
5391
5392 <method name="saveSettings">
5393 <desc>
5394 Saves any changes to machine settings made since the session
5395 has been opened or a new machine has been created, or since the
5396 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
5397 For registered machines, new settings become visible to all
5398 other VirtualBox clients after successful invocation of this
5399 method.
5400 <note>
5401 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
5402 notification event after the configuration has been successfully
5403 saved (only for registered machines).
5404 </note>
5405 <note>
5406 Calling this method is only valid on instances returned
5407 by <link to="ISession::machine"/> and on new machines
5408 created by <link to="IVirtualBox::createMachine"/> but not
5409 yet registered, or on unregistered machines after calling
5410 <link to="IVirtualBox::unregisterMachine"/>.
5411 </note>
5412
5413 <result name="VBOX_E_FILE_ERROR">
5414 Settings file not accessible.
5415 </result>
5416 <result name="VBOX_E_XML_ERROR">
5417 Could not parse the settings file.
5418 </result>
5419 <result name="E_ACCESSDENIED">
5420 Modification request refused.
5421 </result>
5422
5423 </desc>
5424 </method>
5425
5426 <method name="discardSettings">
5427 <desc>
5428 Discards any changes to the machine settings made since the session
5429 has been opened or since the last call to <link to="#saveSettings"/>
5430 or <link to="#discardSettings"/>.
5431 <note>
5432 Calling this method is only valid on instances returned
5433 by <link to="ISession::machine"/> and on new machines
5434 created by <link to="IVirtualBox::createMachine"/> or
5435 opened by <link to="IVirtualBox::openMachine"/> but not
5436 yet registered, or on unregistered machines after calling
5437 <link to="IVirtualBox::unregisterMachine"/>.
5438 </note>
5439
5440 <result name="VBOX_E_INVALID_VM_STATE">
5441 Virtual machine is not mutable.
5442 </result>
5443
5444 </desc>
5445 </method>
5446
5447 <method name="deleteSettings">
5448 <desc>
5449 Deletes the settings file of this machine from disk.
5450 The machine must not be registered in order for this operation
5451 to succeed.
5452 <note>
5453 <link to="#settingsModified"/> will return @c true after this
5454 method successfully returns.
5455 </note>
5456 <note>
5457 Calling this method is only valid on instances returned
5458 by <link to="ISession::machine"/> and on new machines
5459 created by <link to="IVirtualBox::createMachine"/> or
5460 opened by <link to="IVirtualBox::openMachine"/> but not
5461 yet registered, or on unregistered machines after calling
5462 <link to="IVirtualBox::unregisterMachine"/>.
5463 </note>
5464 <note>
5465 The deleted machine settings file can be restored (saved again)
5466 by calling <link to="#saveSettings"/>.
5467 </note>
5468
5469 <result name="VBOX_E_INVALID_VM_STATE">
5470 Cannot delete settings of a registered machine or
5471 machine not mutable.
5472 </result>
5473 <result name="VBOX_E_IPRT_ERROR">
5474 Could not delete the settings file.
5475 </result>
5476
5477 </desc>
5478 </method>
5479
5480 <method name="export">
5481 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5482 steps required to export VirtualBox machines to OVF.
5483 </desc>
5484
5485 <param name="aAppliance" type="IAppliance" dir="in">
5486 <desc>Appliance to export this machine to.</desc>
5487 </param>
5488 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5489 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5490 </param>
5491 </method >
5492
5493 <method name="getSnapshot">
5494 <desc>
5495 Returns a snapshot of this machine with the given UUID.
5496 A @c null UUID can be used to obtain the first snapshot
5497 taken on this machine. This is useful if you want to traverse
5498 the whole tree of snapshots starting from the root.
5499
5500 <result name="VBOX_E_OBJECT_NOT_FOUND">
5501 Virtual machine has no snapshots or snapshot not found.
5502 </result>
5503
5504 </desc>
5505 <param name="id" type="uuid" mod="string" dir="in">
5506 <desc>UUID of the snapshot to get</desc>
5507 </param>
5508 <param name="snapshot" type="ISnapshot" dir="return">
5509 <desc>Snapshot object with the given UUID.</desc>
5510 </param>
5511 </method>
5512
5513 <method name="findSnapshot">
5514 <desc>
5515 Returns a snapshot of this machine with the given name.
5516
5517 <result name="VBOX_E_OBJECT_NOT_FOUND">
5518 Virtual machine has no snapshots or snapshot not found.
5519 </result>
5520
5521 </desc>
5522 <param name="name" type="wstring" dir="in">
5523 <desc>Name of the snapshot to find</desc>
5524 </param>
5525 <param name="snapshot" type="ISnapshot" dir="return">
5526 <desc>Snapshot object with the given name.</desc>
5527 </param>
5528 </method>
5529
5530 <method name="setCurrentSnapshot">
5531 <desc>
5532 Sets the current snapshot of this machine.
5533 <note>
5534 In the current implementation, this operation is not
5535 implemented.
5536 </note>
5537 </desc>
5538 <param name="id" type="uuid" mod="string" dir="in">
5539 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5540 </param>
5541 </method>
5542
5543 <method name="createSharedFolder">
5544 <desc>
5545 Creates a new permanent shared folder by associating the given logical
5546 name with the given host path, adds it to the collection of shared
5547 folders and starts sharing it. Refer to the description of
5548 <link to="ISharedFolder"/> to read more about logical names.
5549
5550 <result name="VBOX_E_OBJECT_IN_USE">
5551 Shared folder already exists.
5552 </result>
5553 <result name="VBOX_E_FILE_ERROR">
5554 Shared folder @a hostPath not accessible.
5555 </result>
5556
5557 </desc>
5558 <param name="name" type="wstring" dir="in">
5559 <desc>Unique logical name of the shared folder.</desc>
5560 </param>
5561 <param name="hostPath" type="wstring" dir="in">
5562 <desc>Full path to the shared folder in the host file system.</desc>
5563 </param>
5564 <param name="writable" type="boolean" dir="in">
5565 <desc>Whether the share is writable or readonly</desc>
5566 </param>
5567 </method>
5568
5569 <method name="removeSharedFolder">
5570 <desc>
5571 Removes the permanent shared folder with the given name previously
5572 created by <link to="#createSharedFolder"/> from the collection of
5573 shared folders and stops sharing it.
5574
5575 <result name="VBOX_E_INVALID_VM_STATE">
5576 Virtual machine is not mutable.
5577 </result>
5578 <result name="VBOX_E_OBJECT_NOT_FOUND">
5579 Shared folder @a name does not exist.
5580 </result>
5581
5582 </desc>
5583 <param name="name" type="wstring" dir="in">
5584 <desc>Logical name of the shared folder to remove.</desc>
5585 </param>
5586 </method>
5587
5588 <method name="canShowConsoleWindow">
5589 <desc>
5590 Returns @c true if the VM console process can activate the
5591 console window and bring it to foreground on the desktop of
5592 the host PC.
5593 <note>
5594 This method will fail if a session for this machine is not
5595 currently open.
5596 </note>
5597
5598 <result name="VBOX_E_INVALID_VM_STATE">
5599 Machine session is not open.
5600 </result>
5601
5602 </desc>
5603 <param name="canShow" type="boolean" dir="return">
5604 <desc>
5605 @c true if the console window can be shown and @c false otherwise.
5606 </desc>
5607 </param>
5608 </method>
5609
5610 <method name="showConsoleWindow">
5611 <desc>
5612 Activates the console window and brings it to foreground on
5613 the desktop of the host PC. Many modern window managers on
5614 many platforms implement some sort of focus stealing
5615 prevention logic, so that it may be impossible to activate
5616 a window without the help of the currently active
5617 application. In this case, this method will return a non-zero
5618 identifier that represents the top-level window of the VM
5619 console process. The caller, if it represents a currently
5620 active process, is responsible to use this identifier (in a
5621 platform-dependent manner) to perform actual window
5622 activation.
5623 <note>
5624 This method will fail if a session for this machine is not
5625 currently open.
5626 </note>
5627
5628 <result name="VBOX_E_INVALID_VM_STATE">
5629 Machine session is not open.
5630 </result>
5631
5632 </desc>
5633 <param name="winId" type="unsigned long long" dir="return">
5634 <desc>
5635 Platform-dependent identifier of the top-level VM console
5636 window, or zero if this method has performed all actions
5637 necessary to implement the <i>show window</i> semantics for
5638 the given platform and/or VirtualBox front-end.
5639 </desc>
5640 </param>
5641 </method>
5642
5643 <method name="getGuestProperty">
5644 <desc>
5645 Reads an entry from the machine's guest property store.
5646
5647 <result name="VBOX_E_INVALID_VM_STATE">
5648 Machine session is not open.
5649 </result>
5650
5651 </desc>
5652 <param name="name" type="wstring" dir="in">
5653 <desc>
5654 The name of the property to read.
5655 </desc>
5656 </param>
5657 <param name="value" type="wstring" dir="out">
5658 <desc>
5659 The value of the property. If the property does not exist then this
5660 will be empty.
5661 </desc>
5662 </param>
5663 <param name="timestamp" type="unsigned long long" dir="out">
5664 <desc>
5665 The time at which the property was last modified, as seen by the
5666 server process.
5667 </desc>
5668 </param>
5669 <param name="flags" type="wstring" dir="out">
5670 <desc>
5671 Additional property parameters, passed as a comma-separated list of
5672 "name=value" type entries.
5673 </desc>
5674 </param>
5675 </method>
5676
5677 <method name="getGuestPropertyValue">
5678 <desc>
5679 Reads a value from the machine's guest property store.
5680
5681 <result name="VBOX_E_INVALID_VM_STATE">
5682 Machine session is not open.
5683 </result>
5684
5685 </desc>
5686 <param name="property" type="wstring" dir="in">
5687 <desc>
5688 The name of the property to read.
5689 </desc>
5690 </param>
5691 <param name="value" type="wstring" dir="return">
5692 <desc>
5693 The value of the property. If the property does not exist then this
5694 will be empty.
5695 </desc>
5696 </param>
5697 </method>
5698
5699 <method name="getGuestPropertyTimestamp">
5700 <desc>
5701 Reads a property timestamp from the machine's guest property store.
5702
5703 <result name="VBOX_E_INVALID_VM_STATE">
5704 Machine session is not open.
5705 </result>
5706
5707 </desc>
5708 <param name="property" type="wstring" dir="in">
5709 <desc>
5710 The name of the property to read.
5711 </desc>
5712 </param>
5713 <param name="value" type="unsigned long long" dir="return">
5714 <desc>
5715 The timestamp. If the property does not exist then this will be
5716 empty.
5717 </desc>
5718 </param>
5719 </method>
5720
5721 <method name="setGuestProperty">
5722 <desc>
5723 Sets, changes or deletes an entry in the machine's guest property
5724 store.
5725
5726 <result name="E_ACCESSDENIED">
5727 Property cannot be changed.
5728 </result>
5729 <result name="E_INVALIDARG">
5730 Invalid @a flags.
5731 </result>
5732 <result name="VBOX_E_INVALID_VM_STATE">
5733 Virtual machine is not mutable or session not open.
5734 </result>
5735 <result name="VBOX_E_INVALID_OBJECT_STATE">
5736 Cannot set transient property when machine not running.
5737 </result>
5738
5739 </desc>
5740 <param name="property" type="wstring" dir="in">
5741 <desc>
5742 The name of the property to set, change or delete.
5743 </desc>
5744 </param>
5745 <param name="value" type="wstring" dir="in">
5746 <desc>
5747 The new value of the property to set, change or delete. If the
5748 property does not yet exist and value is non-empty, it will be
5749 created. If the value is @c null or empty, the property will be
5750 deleted if it exists.
5751 </desc>
5752 </param>
5753 <param name="flags" type="wstring" dir="in">
5754 <desc>
5755 Additional property parameters, passed as a comma-separated list of
5756 "name=value" type entries.
5757 </desc>
5758 </param>
5759 </method>
5760
5761 <method name="setGuestPropertyValue">
5762 <desc>
5763 Sets, changes or deletes a value in the machine's guest property
5764 store. The flags field will be left unchanged or created empty for a
5765 new property.
5766
5767 <result name="E_ACCESSDENIED">
5768 Property cannot be changed.
5769 </result>
5770 <result name="VBOX_E_INVALID_VM_STATE">
5771 Virtual machine is not mutable or session not open.
5772 </result>
5773 <result name="VBOX_E_INVALID_OBJECT_STATE">
5774 Cannot set transient property when machine not running.
5775 </result>
5776 </desc>
5777
5778 <param name="property" type="wstring" dir="in">
5779 <desc>
5780 The name of the property to set, change or delete.
5781 </desc>
5782 </param>
5783 <param name="value" type="wstring" dir="in">
5784 <desc>
5785 The new value of the property to set, change or delete. If the
5786 property does not yet exist and value is non-empty, it will be
5787 created. If the value is @c null or empty, the property will be
5788 deleted if it exists.
5789 </desc>
5790 </param>
5791 </method>
5792
5793 <method name="enumerateGuestProperties">
5794 <desc>
5795 Return a list of the guest properties matching a set of patterns along
5796 with their values, time stamps and flags.
5797 </desc>
5798 <param name="patterns" type="wstring" dir="in">
5799 <desc>
5800 The patterns to match the properties against, separated by '|'
5801 characters. If this is empty or @c null, all properties will match.
5802 </desc>
5803 </param>
5804 <param name="name" type="wstring" dir="out" safearray="yes">
5805 <desc>
5806 The names of the properties returned.
5807 </desc>
5808 </param>
5809 <param name="value" type="wstring" dir="out" safearray="yes">
5810 <desc>
5811 The values of the properties returned. The array entries match the
5812 corresponding entries in the @a name array.
5813 </desc>
5814 </param>
5815 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5816 <desc>
5817 The time stamps of the properties returned. The array entries match
5818 the corresponding entries in the @a name array.
5819 </desc>
5820 </param>
5821 <param name="flags" type="wstring" dir="out" safearray="yes">
5822 <desc>
5823 The flags of the properties returned. The array entries match the
5824 corresponding entries in the @a name array.
5825 </desc>
5826 </param>
5827 </method>
5828
5829 <method name="querySavedThumbnailSize">
5830 <desc>
5831 Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.
5832 </desc>
5833 <param name="size" type="unsigned long" dir="out">
5834 <desc>
5835 Size of buffer required to store the bitmap.
5836 </desc>
5837 </param>
5838 <param name="width" type="unsigned long" dir="out">
5839 <desc>
5840 Bitmap width.
5841 </desc>
5842 </param>
5843 <param name="height" type="unsigned long" dir="out">
5844 <desc>
5845 Bitmap height.
5846 </desc>
5847 </param>
5848 </method>
5849
5850 <method name="readSavedThumbnailToArray">
5851 <desc>
5852 Thumbnail is retrieved to an array of bytes in uncompressed 32-bit BGRA or RGBA format.
5853 </desc>
5854 <param name="BGR" type="boolean" dir="in">
5855 <desc>
5856 How to order bytes in the pixel. A pixel consists of 4 bytes. If this parameter is true, then
5857 bytes order is: B, G, R, 0xFF. If this parameter is false, then bytes order is: R, G, B, 0xFF.
5858 </desc>
5859 </param>
5860 <param name="width" type="unsigned long" dir="out">
5861 <desc>
5862 Bitmap width.
5863 </desc>
5864 </param>
5865 <param name="height" type="unsigned long" dir="out">
5866 <desc>
5867 Bitmap height.
5868 </desc>
5869 </param>
5870 <param name="data" type="octet" dir="return" safearray="yes">
5871 <desc>
5872 Array with resulting bitmap data.
5873 </desc>
5874 </param>
5875 </method>
5876
5877 <method name="querySavedScreenshotPNGSize">
5878 <desc>
5879 Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.
5880 </desc>
5881 <param name="size" type="unsigned long" dir="out">
5882 <desc>
5883 Size of buffer required to store the PNG binary data.
5884 </desc>
5885 </param>
5886 <param name="width" type="unsigned long" dir="out">
5887 <desc>
5888 Image width.
5889 </desc>
5890 </param>
5891 <param name="height" type="unsigned long" dir="out">
5892 <desc>
5893 Image height.
5894 </desc>
5895 </param>
5896 </method>
5897
5898 <method name="readSavedScreenshotPNGToArray">
5899 <desc>
5900 Screenshot in PNG format is retrieved to an array of bytes.
5901 </desc>
5902 <param name="width" type="unsigned long" dir="out">
5903 <desc>
5904 Image width.
5905 </desc>
5906 </param>
5907 <param name="height" type="unsigned long" dir="out">
5908 <desc>
5909 Image height.
5910 </desc>
5911 </param>
5912 <param name="data" type="octet" dir="return" safearray="yes">
5913 <desc>
5914 Array with resulting PNG data.
5915 </desc>
5916 </param>
5917 </method>
5918</interface>
5919
5920 <!--
5921 // IConsole
5922 /////////////////////////////////////////////////////////////////////////
5923 -->
5924
5925 <interface
5926 name="IConsoleCallback" extends="$unknown"
5927 uuid="d6239535-bda2-4ef7-83f4-f4722e4a3b2c"
5928 wsmap="suppress"
5929 >
5930
5931 <desc>
5932 This interface is used by a client of the Main API that need to
5933 be notified of events. For example, a graphical user interface
5934 can use this to learn about machine state changes so they can
5935 update the list of virtual machines without having to rely
5936 on polling.
5937
5938 Whenever relevant events occur in VirtualBox, the callbacks in
5939 objects of this interface are called. In order for this to be
5940 useful, a client needs to create its own subclass that implements
5941 this interface in which the methods for the relevant callbacks
5942 are overridden. An instance of this subclass interface can then
5943 be passed to <link to="IConsole::registerCallback" />.
5944 </desc>
5945
5946 <method name="onMousePointerShapeChange">
5947 <desc>
5948 Notification when the guest mouse pointer shape has
5949 changed. The new shape data is given.
5950 </desc>
5951 <param name="visible" type="boolean" dir="in">
5952 <desc>
5953 Flag whether the pointer is visible.
5954 </desc>
5955 </param>
5956 <param name="alpha" type="boolean" dir="in">
5957 <desc>
5958 Flag whether the pointer has an alpha channel.
5959 </desc>
5960 </param>
5961 <param name="xHot" type="unsigned long" dir="in">
5962 <desc>
5963 The pointer hot spot x coordinate.
5964 </desc>
5965 </param>
5966 <param name="yHot" type="unsigned long" dir="in">
5967 <desc>
5968 The pointer hot spot y coordinate.
5969 </desc>
5970 </param>
5971 <param name="width" type="unsigned long" dir="in">
5972 <desc>
5973 Width of the pointer shape in pixels.
5974 </desc>
5975 </param>
5976 <param name="height" type="unsigned long" dir="in">
5977 <desc>
5978 Height of the pointer shape in pixels.
5979 </desc>
5980 </param>
5981 <param name="shape" type="octet" mod="ptr" dir="in">
5982 <desc>
5983 Address of the shape buffer.
5984
5985 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5986 followed by a 32-bpp XOR (color) mask.
5987
5988 For pointers without alpha channel the XOR mask pixels are 32
5989 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5990 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5991
5992 An AND mask is used for pointers with alpha channel, so if the
5993 callback does not support alpha, the pointer could be
5994 displayed as a normal color pointer.
5995
5996 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5997 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5998 height</tt>. The padding bits at the end of each scanline are
5999 undefined.
6000
6001 The XOR mask follows the AND mask on the next 4-byte aligned
6002 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
6003 Bytes in the gap between the AND and the XOR mask are undefined.
6004 The XOR mask scanlines have no gap between them and the size of
6005 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
6006
6007 <note>
6008 If @a shape is 0, only the pointer visibility is changed.
6009 </note>
6010 </desc>
6011 </param>
6012 </method>
6013
6014 <method name="onMouseCapabilityChange">
6015 <desc>
6016 Notification when the mouse capabilities reported by the
6017 guest have changed. The new capabilities are passed.
6018 </desc>
6019 <param name="supportsAbsolute" type="boolean" dir="in"/>
6020 <param name="needsHostCursor" type="boolean" dir="in"/>
6021 </method>
6022
6023 <method name="onKeyboardLedsChange">
6024 <desc>
6025 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
6026 to alter the state of the keyboard LEDs.
6027 </desc>
6028 <param name="numLock" type="boolean" dir="in"/>
6029 <param name="capsLock" type="boolean" dir="in"/>
6030 <param name="scrollLock" type="boolean" dir="in"/>
6031 </method>
6032
6033 <method name="onStateChange">
6034 <desc>
6035 Notification when the execution state of the machine has changed.
6036 The new state will be given.
6037 </desc>
6038 <param name="state" type="MachineState" dir="in"/>
6039 </method>
6040
6041 <method name="onAdditionsStateChange">
6042 <desc>
6043 Notification when a Guest Additions property changes.
6044 Interested callees should query IGuest attributes to
6045 find out what has changed.
6046 </desc>
6047 </method>
6048
6049 <method name="onNetworkAdapterChange">
6050 <desc>
6051 Notification when a property of one of the
6052 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
6053 changes. Interested callees should use INetworkAdapter methods and
6054 attributes to find out what has changed.
6055 </desc>
6056 <param name="networkAdapter" type="INetworkAdapter" dir="in">
6057 <desc>Network adapter that is subject to change.</desc>
6058 </param>
6059 </method>
6060
6061 <method name="onSerialPortChange">
6062 <desc>
6063 Notification when a property of one of the
6064 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
6065 Interested callees should use ISerialPort methods and attributes
6066 to find out what has changed.
6067 </desc>
6068 <param name="serialPort" type="ISerialPort" dir="in">
6069 <desc>Serial port that is subject to change.</desc>
6070 </param>
6071 </method>
6072
6073 <method name="onParallelPortChange">
6074 <desc>
6075 Notification when a property of one of the
6076 virtual <link to="IMachine::getParallelPort">parallel ports</link>
6077 changes. Interested callees should use ISerialPort methods and
6078 attributes to find out what has changed.
6079 </desc>
6080 <param name="parallelPort" type="IParallelPort" dir="in">
6081 <desc>Parallel port that is subject to change.</desc>
6082 </param>
6083 </method>
6084
6085 <method name="onStorageControllerChange">
6086 <desc>
6087 Notification when a property of one of the
6088 virtual <link to="IMachine::storageControllers">storage controllers</link>
6089 changes. Interested callees should query the corresponding collections
6090 to find out what has changed.
6091 </desc>
6092 </method>
6093
6094 <method name="onMediumChange">
6095 <desc>
6096 Notification when a
6097 <link to="IMachine::mediumAttachments">medium attachment</link>
6098 changes.
6099 </desc>
6100 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
6101 <desc>Medium attachment that is subject to change.</desc>
6102 </param>
6103 </method>
6104
6105 <method name="onVRDPServerChange">
6106 <desc>
6107 Notification when a property of the
6108 <link to="IMachine::VRDPServer">VRDP server</link> changes.
6109 Interested callees should use IVRDPServer methods and attributes to
6110 find out what has changed.
6111 </desc>
6112 </method>
6113
6114 <method name="onRemoteDisplayInfoChange">
6115 <desc>
6116 Notification when the status of the VRDP server changes. Interested callees
6117 should use <link to="IConsole::RemoteDisplayInfo">IRemoteDisplayInfo</link>
6118 attributes to find out what is the current status.
6119 </desc>
6120 </method>
6121
6122 <method name="onUSBControllerChange">
6123 <desc>
6124 Notification when a property of the virtual
6125 <link to="IMachine::USBController">USB controller</link> changes.
6126 Interested callees should use IUSBController methods and attributes to
6127 find out what has changed.
6128 </desc>
6129 </method>
6130
6131 <method name="onUSBDeviceStateChange">
6132 <desc>
6133 Notification when a USB device is attached to or detached from
6134 the virtual USB controller.
6135
6136 This notification is sent as a result of the indirect
6137 request to attach the device because it matches one of the
6138 machine USB filters, or as a result of the direct request
6139 issued by <link to="IConsole::attachUSBDevice"/> or
6140 <link to="IConsole::detachUSBDevice"/>.
6141
6142 This notification is sent in case of both a succeeded and a
6143 failed request completion. When the request succeeds, the
6144 @a error parameter is @c null, and the given device has been
6145 already added to (when @a attached is @c true) or removed from
6146 (when @a attached is @c false) the collection represented by
6147 <link to="IConsole::USBDevices"/>. On failure, the collection
6148 doesn't change and the @a error parameter represents the error
6149 message describing the failure.
6150
6151 </desc>
6152 <param name="device" type="IUSBDevice" dir="in">
6153 <desc>Device that is subject to state change.</desc>
6154 </param>
6155 <param name="attached" type="boolean" dir="in">
6156 <desc>
6157 @c true if the device was attached and @c false otherwise.
6158 </desc>
6159 </param>
6160 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
6161 <desc>
6162 @c null on success or an error message object on failure.
6163 </desc>
6164 </param>
6165 </method>
6166
6167 <method name="onSharedFolderChange">
6168 <desc>
6169 Notification when a shared folder is added or removed.
6170 The @a scope argument defines one of three scopes:
6171 <link to="IVirtualBox::sharedFolders">global shared folders</link>
6172 (<link to="Scope_Global">Global</link>),
6173 <link to="IMachine::sharedFolders">permanent shared folders</link> of
6174 the machine (<link to="Scope_Machine">Machine</link>) or <link
6175 to="IConsole::sharedFolders">transient shared folders</link> of the
6176 machine (<link to="Scope_Session">Session</link>). Interested callees
6177 should use query the corresponding collections to find out what has
6178 changed.
6179 </desc>
6180 <param name="scope" type="Scope" dir="in">
6181 <desc>Scope of the notification.</desc>
6182 </param>
6183 </method>
6184
6185 <method name="onRuntimeError">
6186 <desc>
6187 Notification when an error happens during the virtual
6188 machine execution.
6189
6190 There are three kinds of runtime errors:
6191 <ul>
6192 <li><i>fatal</i></li>
6193 <li><i>non-fatal with retry</i></li>
6194 <li><i>non-fatal warnings</i></li>
6195 </ul>
6196
6197 <b>Fatal</b> errors are indicated by the @a fatal parameter set
6198 to @c true. In case of fatal errors, the virtual machine
6199 execution is always paused before calling this notification, and
6200 the notification handler is supposed either to immediately save
6201 the virtual machine state using <link to="IConsole::saveState"/>
6202 or power it off using <link to="IConsole::powerDown"/>.
6203 Resuming the execution can lead to unpredictable results.
6204
6205 <b>Non-fatal</b> errors and warnings are indicated by the
6206 @a fatal parameter set to @c false. If the virtual machine
6207 is in the Paused state by the time the error notification is
6208 received, it means that the user can <i>try to resume</i> the machine
6209 execution after attempting to solve the problem that caused the
6210 error. In this case, the notification handler is supposed
6211 to show an appropriate message to the user (depending on the
6212 value of the @a id parameter) that offers several actions such
6213 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
6214 wants to retry, the notification handler should continue
6215 the machine execution using the <link to="IConsole::resume"/>
6216 call. If the machine execution is not Paused during this
6217 notification, then it means this notification is a <i>warning</i>
6218 (for example, about a fatal condition that can happen very soon);
6219 no immediate action is required from the user, the machine
6220 continues its normal execution.
6221
6222 Note that in either case the notification handler
6223 <b>must not</b> perform any action directly on a thread
6224 where this notification is called. Everything it is allowed to
6225 do is to post a message to another thread that will then talk
6226 to the user and take the corresponding action.
6227
6228 Currently, the following error identifiers are known:
6229 <ul>
6230 <li><tt>"HostMemoryLow"</tt></li>
6231 <li><tt>"HostAudioNotResponding"</tt></li>
6232 <li><tt>"VDIStorageFull"</tt></li>
6233 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
6234 </ul>
6235
6236 <note>
6237 This notification is not designed to be implemented by
6238 more than one callback at a time. If you have multiple
6239 IConsoleCallback instances registered on the given
6240 IConsole object, make sure you simply do nothing but
6241 return @c S_OK from all but one of them that does actual
6242 user notification and performs necessary actions.
6243 </note>
6244
6245 </desc>
6246 <param name="fatal" type="boolean" dir="in">
6247 <desc>Whether the error is fatal or not</desc>
6248 </param>
6249 <param name="id" type="wstring" dir="in">
6250 <desc>Error identifier</desc>
6251 </param>
6252 <param name="message" type="wstring" dir="in">
6253 <desc>Optional error message</desc>
6254 </param>
6255 </method>
6256
6257 <method name="onCanShowWindow">
6258 <desc>
6259 Notification when a call to
6260 <link to="IMachine::canShowConsoleWindow"/> is made by a
6261 front-end to check if a subsequent call to
6262 <link to="IMachine::showConsoleWindow"/> can succeed.
6263
6264 The callee should give an answer appropriate to the current
6265 machine state in the @a canShow argument. This answer must
6266 remain valid at least until the next
6267 <link to="IConsole::state">machine state</link> change.
6268
6269 <note>
6270 This notification is not designed to be implemented by
6271 more than one callback at a time. If you have multiple
6272 IConsoleCallback instances registered on the given
6273 IConsole object, make sure you simply do nothing but
6274 return @c true and @c S_OK from all but one of them that
6275 actually manages console window activation.
6276 </note>
6277 </desc>
6278 <param name="canShow" type="boolean" dir="return">
6279 <desc>
6280 @c true if the console window can be shown and @c false otherwise.
6281 </desc>
6282 </param>
6283 </method>
6284
6285 <method name="onShowWindow">
6286 <desc>
6287 Notification when a call to
6288 <link to="IMachine::showConsoleWindow"/>
6289 requests the console window to be activated and brought to
6290 foreground on the desktop of the host PC.
6291
6292 This notification should cause the VM console process to
6293 perform the requested action as described above. If it is
6294 impossible to do it at a time of this notification, this
6295 method should return a failure.
6296
6297 Note that many modern window managers on many platforms
6298 implement some sort of focus stealing prevention logic, so
6299 that it may be impossible to activate a window without the
6300 help of the currently active application (which is supposedly
6301 an initiator of this notification). In this case, this method
6302 must return a non-zero identifier that represents the
6303 top-level window of the VM console process. The caller, if it
6304 represents a currently active process, is responsible to use
6305 this identifier (in a platform-dependent manner) to perform
6306 actual window activation.
6307
6308 This method must set @a winId to zero if it has performed all
6309 actions necessary to complete the request and the console
6310 window is now active and in foreground, to indicate that no
6311 further action is required on the caller's side.
6312
6313 <note>
6314 This notification is not designed to be implemented by
6315 more than one callback at a time. If you have multiple
6316 IConsoleCallback instances registered on the given
6317 IConsole object, make sure you simply do nothing but
6318 return @c S_OK from all but one of them that actually
6319 manages console window activation.
6320 </note>
6321 </desc>
6322 <param name="winId" type="unsigned long long" dir="return">
6323 <desc>
6324 Platform-dependent identifier of the top-level VM console
6325 window, or zero if this method has performed all actions
6326 necessary to implement the <i>show window</i> semantics for
6327 the given platform and/or this VirtualBox front-end.
6328 </desc>
6329 </param>
6330 </method>
6331
6332 </interface>
6333
6334 <interface
6335 name="IRemoteDisplayInfo" extends="$unknown"
6336 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
6337 wsmap="struct"
6338 >
6339 <desc>
6340 Contains information about the remote display (VRDP) capabilities and status.
6341 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
6342 </desc>
6343
6344 <attribute name="active" type="boolean" readonly="yes">
6345 <desc>
6346 Whether the remote display connection is active.
6347 </desc>
6348 </attribute>
6349
6350 <attribute name="port" type="long" readonly="yes">
6351 <desc>
6352 VRDP server port number. If this property is equal to <tt>0</tt>, then
6353 the VRDP server failed to start, usually because there are no free TCP
6354 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
6355 server has not yet been started.
6356 </desc>
6357 </attribute>
6358
6359 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
6360 <desc>
6361 How many times a client connected.
6362 </desc>
6363 </attribute>
6364
6365 <attribute name="beginTime" type="long long" readonly="yes">
6366 <desc>
6367 When the last connection was established, in milliseconds since 1970-01-01 UTC.
6368 </desc>
6369 </attribute>
6370
6371 <attribute name="endTime" type="long long" readonly="yes">
6372 <desc>
6373 When the last connection was terminated or the current time, if
6374 connection is still active, in milliseconds since 1970-01-01 UTC.
6375 </desc>
6376 </attribute>
6377
6378 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
6379 <desc>
6380 How many bytes were sent in last or current, if still active, connection.
6381 </desc>
6382 </attribute>
6383
6384 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
6385 <desc>
6386 How many bytes were sent in all connections.
6387 </desc>
6388 </attribute>
6389
6390 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
6391 <desc>
6392 How many bytes were received in last or current, if still active, connection.
6393 </desc>
6394 </attribute>
6395
6396 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
6397 <desc>
6398 How many bytes were received in all connections.
6399 </desc>
6400 </attribute>
6401
6402 <attribute name="user" type="wstring" readonly="yes">
6403 <desc>
6404 Login user name supplied by the client.
6405 </desc>
6406 </attribute>
6407
6408 <attribute name="domain" type="wstring" readonly="yes">
6409 <desc>
6410 Login domain name supplied by the client.
6411 </desc>
6412 </attribute>
6413
6414 <attribute name="clientName" type="wstring" readonly="yes">
6415 <desc>
6416 The client name supplied by the client.
6417 </desc>
6418 </attribute>
6419
6420 <attribute name="clientIP" type="wstring" readonly="yes">
6421 <desc>
6422 The IP address of the client.
6423 </desc>
6424 </attribute>
6425
6426 <attribute name="clientVersion" type="unsigned long" readonly="yes">
6427 <desc>
6428 The client software version number.
6429 </desc>
6430 </attribute>
6431
6432 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
6433 <desc>
6434 Public key exchange method used when connection was established.
6435 Values: 0 - RDP4 public key exchange scheme.
6436 1 - X509 certificates were sent to client.
6437 </desc>
6438 </attribute>
6439
6440 </interface>
6441
6442 <interface
6443 name="IConsole" extends="$unknown"
6444 uuid="55dd56a5-1d1d-4d81-b742-b082b9571be6"
6445 wsmap="managed"
6446 >
6447 <desc>
6448 The IConsole interface represents an interface to control virtual
6449 machine execution.
6450
6451 The console object that implements the IConsole interface is obtained
6452 from a session object after the session for the given machine has been
6453 opened using one of <link to="IVirtualBox::openSession"/>,
6454 <link to="IVirtualBox::openRemoteSession"/> or
6455 <link to="IVirtualBox::openExistingSession"/> methods.
6456
6457 Methods of the IConsole interface allow the caller to query the current
6458 virtual machine execution state, pause the machine or power it down, save
6459 the machine state or take a snapshot, attach and detach removable media
6460 and so on.
6461
6462 <see>ISession</see>
6463 </desc>
6464
6465 <attribute name="machine" type="IMachine" readonly="yes">
6466 <desc>
6467 Machine object this console is sessioned with.
6468 <note>
6469 This is a convenience property, it has the same value as
6470 <link to="ISession::machine"/> of the corresponding session
6471 object.
6472 </note>
6473 </desc>
6474 </attribute>
6475
6476 <attribute name="state" type="MachineState" readonly="yes">
6477 <desc>
6478 Current execution state of the machine.
6479 <note>
6480 This property always returns the same value as the corresponding
6481 property of the IMachine object this console is sessioned with.
6482 For the process that owns (executes) the VM, this is the
6483 preferable way of querying the VM state, because no IPC
6484 calls are made.
6485 </note>
6486 </desc>
6487 </attribute>
6488
6489 <attribute name="guest" type="IGuest" readonly="yes">
6490 <desc>Guest object.</desc>
6491 </attribute>
6492
6493 <attribute name="keyboard" type="IKeyboard" readonly="yes">
6494 <desc>
6495 Virtual keyboard object.
6496 <note>
6497 If the machine is not running, any attempt to use
6498 the returned object will result in an error.
6499 </note>
6500 </desc>
6501 </attribute>
6502
6503 <attribute name="mouse" type="IMouse" readonly="yes">
6504 <desc>
6505 Virtual mouse object.
6506 <note>
6507 If the machine is not running, any attempt to use
6508 the returned object will result in an error.
6509 </note>
6510 </desc>
6511 </attribute>
6512
6513 <attribute name="display" type="IDisplay" readonly="yes">
6514 <desc>Virtual display object.
6515 <note>
6516 If the machine is not running, any attempt to use
6517 the returned object will result in an error.
6518 </note>
6519 </desc>
6520 </attribute>
6521
6522 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6523 <desc>Debugging interface.</desc>
6524 </attribute>
6525
6526 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6527 <desc>
6528 Collection of USB devices currently attached to the virtual
6529 USB controller.
6530 <note>
6531 The collection is empty if the machine is not running.
6532 </note>
6533 </desc>
6534 </attribute>
6535
6536 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6537 <desc>
6538 List of USB devices currently attached to the remote VRDP client.
6539 Once a new device is physically attached to the remote host computer,
6540 it appears in this list and remains there until detached.
6541 </desc>
6542 </attribute>
6543
6544 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6545 <desc>
6546 Collection of shared folders for the current session. These folders
6547 are called transient shared folders because they are available to the
6548 guest OS running inside the associated virtual machine only for the
6549 duration of the session (as opposed to
6550 <link to="IMachine::sharedFolders"/> which represent permanent shared
6551 folders). When the session is closed (e.g. the machine is powered down),
6552 these folders are automatically discarded.
6553
6554 New shared folders are added to the collection using
6555 <link to="#createSharedFolder"/>. Existing shared folders can be
6556 removed using <link to="#removeSharedFolder"/>.
6557 </desc>
6558 </attribute>
6559
6560 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6561 <desc>
6562 Interface that provides information on Remote Display (VRDP) connection.
6563 </desc>
6564 </attribute>
6565
6566 <method name="powerUp">
6567 <desc>
6568 Starts the virtual machine execution using the current machine
6569 state (that is, its current execution state, current settings and
6570 current storage devices).
6571
6572 If the machine is powered off or aborted, the execution will
6573 start from the beginning (as if the real hardware were just
6574 powered on).
6575
6576 If the machine is in the <link to="MachineState_Saved"/> state,
6577 it will continue its execution the point where the state has
6578 been saved.
6579
6580 <note>
6581 Unless you are trying to write a new VirtualBox front-end that
6582 performs direct machine execution (like the VirtualBox or VBoxSDL
6583 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6584 session opened by <link to="IVirtualBox::openSession"/> and use this
6585 session only to change virtual machine settings. If you simply want to
6586 start virtual machine execution using one of the existing front-ends
6587 (for example the VirtualBox GUI or headless server), simply use
6588 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6589 power up the machine automatically for you.
6590 </note>
6591
6592 <see>#saveState</see>
6593 <result name="VBOX_E_INVALID_VM_STATE">
6594 Virtual machine already running.
6595 </result>
6596 <result name="VBOX_E_HOST_ERROR">
6597 Host interface does not exist or name not set.
6598 </result>
6599 <result name="VBOX_E_FILE_ERROR">
6600 Invalid saved state file.
6601 </result>
6602 </desc>
6603 <param name="progress" type="IProgress" dir="return">
6604 <desc>Progress object to track the operation completion.</desc>
6605 </param>
6606 </method>
6607
6608 <method name="powerUpPaused">
6609 <desc>
6610 Identical to powerUp except that the VM will enter the
6611 <link to="MachineState_Paused"/> state, instead of
6612 <link to="MachineState_Running"/>.
6613
6614 <see>#powerUp</see>
6615 <result name="VBOX_E_INVALID_VM_STATE">
6616 Virtual machine already running.
6617 </result>
6618 <result name="VBOX_E_HOST_ERROR">
6619 Host interface does not exist or name not set.
6620 </result>
6621 <result name="VBOX_E_FILE_ERROR">
6622 Invalid saved state file.
6623 </result>
6624 </desc>
6625 <param name="progress" type="IProgress" dir="return">
6626 <desc>Progress object to track the operation completion.</desc>
6627 </param>
6628 </method>
6629
6630 <method name="powerDown">
6631 <desc>
6632 Initiates the power down procedure to stop the virtual machine
6633 execution.
6634
6635 The completion of the power down procedure is tracked using the returned
6636 IProgress object. After the operation is complete, the machine will go
6637 to the PoweredOff state.
6638 <result name="VBOX_E_INVALID_VM_STATE">
6639 Virtual machine must be Running, Paused or Stuck to be powered down.
6640 </result>
6641 </desc>
6642 <param name="progress" type="IProgress" dir="return">
6643 <desc>Progress object to track the operation completion.</desc>
6644 </param>
6645 </method>
6646
6647 <method name="reset">
6648 <desc>Resets the virtual machine.
6649 <result name="VBOX_E_INVALID_VM_STATE">
6650 Virtual machine not in Running state.
6651 </result>
6652 <result name="VBOX_E_VM_ERROR">
6653 Virtual machine error in reset operation.
6654 </result>
6655 </desc>
6656 </method>
6657
6658 <method name="pause">
6659 <desc>Pauses the virtual machine execution.
6660 <result name="VBOX_E_INVALID_VM_STATE">
6661 Virtual machine not in Running state.
6662 </result>
6663 <result name="VBOX_E_VM_ERROR">
6664 Virtual machine error in suspend operation.
6665 </result>
6666 </desc>
6667 </method>
6668
6669 <method name="resume">
6670 <desc>Resumes the virtual machine execution.
6671 <result name="VBOX_E_INVALID_VM_STATE">
6672 Virtual machine not in Paused state.
6673 </result>
6674 <result name="VBOX_E_VM_ERROR">
6675 Virtual machine error in resume operation.
6676 </result>
6677 </desc>
6678 </method>
6679
6680 <method name="powerButton">
6681 <desc>Sends the ACPI power button event to the guest.
6682 <result name="VBOX_E_INVALID_VM_STATE">
6683 Virtual machine not in Running state.
6684 </result>
6685 <result name="VBOX_E_PDM_ERROR">
6686 Controlled power off failed.
6687 </result>
6688 </desc>
6689 </method>
6690
6691 <method name="sleepButton">
6692 <desc>Sends the ACPI sleep button event to the guest.
6693 <result name="VBOX_E_INVALID_VM_STATE">
6694 Virtual machine not in Running state.
6695 </result>
6696 <result name="VBOX_E_PDM_ERROR">
6697 Sending sleep button event failed.
6698 </result>
6699 </desc>
6700 </method>
6701
6702 <method name="getPowerButtonHandled">
6703 <desc>Checks if the last power button event was handled by guest.
6704 <result name="VBOX_E_PDM_ERROR">
6705 Checking if the event was handled by the guest OS failed.
6706 </result>
6707 </desc>
6708 <param name="handled" type="boolean" dir="return"/>
6709 </method>
6710
6711 <method name="getGuestEnteredACPIMode">
6712 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6713 G1 (sleeping). If this method returns @c false, the guest will
6714 most likely not respond to external ACPI events.
6715 <result name="VBOX_E_INVALID_VM_STATE">
6716 Virtual machine not in Running state.
6717 </result>
6718 </desc>
6719 <param name="entered" type="boolean" dir="return"/>
6720 </method>
6721
6722 <method name="saveState">
6723 <desc>
6724 Saves the current execution state of a running virtual machine
6725 and stops its execution.
6726
6727 After this operation completes, the machine will go to the
6728 Saved state. Next time it is powered up, this state will
6729 be restored and the machine will continue its execution from
6730 the place where it was saved.
6731
6732 This operation differs from taking a snapshot to the effect
6733 that it doesn't create new differencing media. Also, once
6734 the machine is powered up from the state saved using this method,
6735 the saved state is deleted, so it will be impossible to return
6736 to this state later.
6737
6738 <note>
6739 On success, this method implicitly calls
6740 <link to="IMachine::saveSettings"/> to save all current machine
6741 settings (including runtime changes to the DVD medium, etc.).
6742 Together with the impossibility to change any VM settings when it is
6743 in the Saved state, this guarantees adequate hardware
6744 configuration of the machine when it is restored from the saved
6745 state file.
6746 </note>
6747
6748 <note>
6749 The machine must be in the Running or Paused state, otherwise
6750 the operation will fail.
6751 </note>
6752 <result name="VBOX_E_INVALID_VM_STATE">
6753 Virtual machine state neither Running nor Paused.
6754 </result>
6755 <result name="VBOX_E_FILE_ERROR">
6756 Failed to create directory for saved state file.
6757 </result>
6758
6759 <see><link to="#takeSnapshot"/></see>
6760 </desc>
6761 <param name="progress" type="IProgress" dir="return">
6762 <desc>Progress object to track the operation completion.</desc>
6763 </param>
6764 </method>
6765
6766 <method name="adoptSavedState">
6767 <desc>
6768 Associates the given saved state file to the virtual machine.
6769
6770 On success, the machine will go to the Saved state. Next time it is
6771 powered up, it will be restored from the adopted saved state and
6772 continue execution from the place where the saved state file was
6773 created.
6774
6775 The specified saved state file path may be absolute or relative to the
6776 folder the VM normally saves the state to (usually,
6777 <link to="IMachine::snapshotFolder"/>).
6778
6779 <note>
6780 It's a caller's responsibility to make sure the given saved state
6781 file is compatible with the settings of this virtual machine that
6782 represent its virtual hardware (memory size, storage disk configuration
6783 etc.). If there is a mismatch, the behavior of the virtual machine
6784 is undefined.
6785 </note>
6786 <result name="VBOX_E_INVALID_VM_STATE">
6787 Virtual machine state neither PoweredOff nor Aborted.
6788 </result>
6789 </desc>
6790 <param name="savedStateFile" type="wstring" dir="in">
6791 <desc>Path to the saved state file to adopt.</desc>
6792 </param>
6793 </method>
6794
6795 <method name="forgetSavedState">
6796 <desc>
6797 Forgets the saved state of the virtual machine previously created
6798 by <link to="#saveState"/>. Next time the machine is powered up, a
6799 clean boot will occur. If @a remove is @c true the saved state file
6800 is deleted.
6801 <note>
6802 This operation is equivalent to resetting or powering off
6803 the machine without doing a proper shutdown in the guest OS.
6804 </note>
6805 <result name="VBOX_E_INVALID_VM_STATE">
6806 Virtual machine not in state Saved.
6807 </result>
6808 </desc>
6809 <param name="remove" type="boolean" dir="in">
6810 <desc>If @c true remove the saved state file.</desc>
6811 </param>
6812 </method>
6813
6814 <method name="getDeviceActivity">
6815 <desc>
6816 Gets the current activity type of a given device or device group.
6817 <result name="E_INVALIDARG">
6818 Invalid device type.
6819 </result>
6820 </desc>
6821 <param name="type" type="DeviceType" dir="in"/>
6822 <param name="activity" type="DeviceActivity" dir="return"/>
6823 </method>
6824
6825 <method name="attachUSBDevice">
6826 <desc>
6827 Attaches a host USB device with the given UUID to the
6828 USB controller of the virtual machine.
6829
6830 The device needs to be in one of the following states:
6831 <link to="USBDeviceState_Busy"/>,
6832 <link to="USBDeviceState_Available"/> or
6833 <link to="USBDeviceState_Held"/>,
6834 otherwise an error is immediately returned.
6835
6836 When the device state is
6837 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6838 be returned if the host computer refuses to release it for some reason.
6839
6840 <see>IUSBController::deviceFilters, USBDeviceState</see>
6841 <result name="VBOX_E_INVALID_VM_STATE">
6842 Virtual machine state neither Running nor Paused.
6843 </result>
6844 <result name="VBOX_E_PDM_ERROR">
6845 Virtual machine does not have a USB controller.
6846 </result>
6847 </desc>
6848 <param name="id" type="uuid" mod="string" dir="in">
6849 <desc>UUID of the host USB device to attach.</desc>
6850 </param>
6851 </method>
6852
6853 <method name="detachUSBDevice">
6854 <desc>
6855 Detaches an USB device with the given UUID from the USB controller
6856 of the virtual machine.
6857
6858 After this method succeeds, the VirtualBox server re-initiates
6859 all USB filters as if the device were just physically attached
6860 to the host, but filters of this machine are ignored to avoid
6861 a possible automatic re-attachment.
6862
6863 <see>IUSBController::deviceFilters, USBDeviceState</see>
6864
6865 <result name="VBOX_E_PDM_ERROR">
6866 Virtual machine does not have a USB controller.
6867 </result>
6868 <result name="E_INVALIDARG">
6869 USB device not attached to this virtual machine.
6870 </result>
6871 </desc>
6872 <param name="id" type="uuid" mod="string" dir="in">
6873 <desc>UUID of the USB device to detach.</desc>
6874 </param>
6875 <param name="device" type="IUSBDevice" dir="return">
6876 <desc>Detached USB device.</desc>
6877 </param>
6878 </method>
6879
6880 <method name="findUSBDeviceByAddress">
6881 <desc>
6882 Searches for a USB device with the given host address.
6883
6884 <result name="VBOX_E_OBJECT_NOT_FOUND">
6885 Given @c name does not correspond to any USB device.
6886 </result>
6887
6888 <see>IUSBDevice::address</see>
6889 </desc>
6890 <param name="name" type="wstring" dir="in">
6891 <desc>
6892 Address of the USB device (as assigned by the host) to
6893 search for.
6894 </desc>
6895 </param>
6896 <param name="device" type="IUSBDevice" dir="return">
6897 <desc>Found USB device object.</desc>
6898 </param>
6899 </method>
6900
6901 <method name="findUSBDeviceById">
6902 <desc>
6903 Searches for a USB device with the given UUID.
6904
6905 <result name="VBOX_E_OBJECT_NOT_FOUND">
6906 Given @c id does not correspond to any USB device.
6907 </result>
6908
6909 <see>IUSBDevice::id</see>
6910 </desc>
6911 <param name="id" type="uuid" mod="string" dir="in">
6912 <desc>UUID of the USB device to search for.</desc>
6913 </param>
6914 <param name="device" type="IUSBDevice" dir="return">
6915 <desc>Found USB device object.</desc>
6916 </param>
6917 </method>
6918
6919 <method name="createSharedFolder">
6920 <desc>
6921 Creates a transient new shared folder by associating the given logical
6922 name with the given host path, adds it to the collection of shared
6923 folders and starts sharing it. Refer to the description of
6924 <link to="ISharedFolder"/> to read more about logical names.
6925
6926 <result name="VBOX_E_INVALID_VM_STATE">
6927 Virtual machine in Saved state or currently changing state.
6928 </result>
6929 <result name="VBOX_E_FILE_ERROR">
6930 Shared folder already exists or not accessible.
6931 </result>
6932 </desc>
6933 <param name="name" type="wstring" dir="in">
6934 <desc>Unique logical name of the shared folder.</desc>
6935 </param>
6936 <param name="hostPath" type="wstring" dir="in">
6937 <desc>Full path to the shared folder in the host file system.</desc>
6938 </param>
6939 <param name="writable" type="boolean" dir="in">
6940 <desc>Whether the share is writable or readonly</desc>
6941 </param>
6942 </method>
6943
6944 <method name="removeSharedFolder">
6945 <desc>
6946 Removes a transient shared folder with the given name previously
6947 created by <link to="#createSharedFolder"/> from the collection of
6948 shared folders and stops sharing it.
6949 <result name="VBOX_E_INVALID_VM_STATE">
6950 Virtual machine in Saved state or currently changing state.
6951 </result>
6952 <result name="VBOX_E_FILE_ERROR">
6953 Shared folder does not exists.
6954 </result>
6955 </desc>
6956 <param name="name" type="wstring" dir="in">
6957 <desc>Logical name of the shared folder to remove.</desc>
6958 </param>
6959 </method>
6960
6961 <method name="takeSnapshot">
6962 <desc>
6963 Saves the current execution state
6964 and all settings of the machine and creates differencing images
6965 for all normal (non-independent) media.
6966 See <link to="ISnapshot" /> for an introduction to snapshots.
6967
6968 This method can be called for a PoweredOff, Saved (see
6969 <link to="#saveState"/>), Running or
6970 Paused virtual machine. When the machine is PoweredOff, an
6971 offline snapshot is created. When the machine is Running a live
6972 snapshot is created, and an online snapshot is is created when Paused.
6973
6974 The taken snapshot is always based on the
6975 <link to="IMachine::currentSnapshot">current snapshot</link>
6976 of the associated virtual machine and becomes a new current snapshot.
6977
6978 <note>
6979 This method implicitly calls <link to="IMachine::saveSettings"/> to
6980 save all current machine settings before taking an offline snapshot.
6981 </note>
6982
6983 <result name="VBOX_E_INVALID_VM_STATE">
6984 Virtual machine currently changing state.
6985 </result>
6986 </desc>
6987 <param name="name" type="wstring" dir="in">
6988 <desc>Short name for the snapshot.</desc>
6989 </param>
6990 <param name="description" type="wstring" dir="in">
6991 <desc>Optional description of the snapshot.</desc>
6992 </param>
6993 <param name="progress" type="IProgress" dir="return">
6994 <desc>Progress object to track the operation completion.</desc>
6995 </param>
6996 </method>
6997
6998 <method name="deleteSnapshot">
6999 <desc>
7000 Starts discarding the specified snapshot asynchronously.
7001 See <link to="ISnapshot" /> for an introduction to snapshots.
7002
7003 The execution state and settings of the associated machine stored in
7004 the snapshot will be deleted. The contents of all differencing media of
7005 this snapshot will be merged with the contents of their dependent child
7006 media to keep the medium chain valid (in other words, all changes
7007 represented by media being discarded will be propagated to their child
7008 medium). After that, this snapshot's differencing medium will be
7009 deleted. The parent of this snapshot will become a new parent for all
7010 its child snapshots.
7011
7012 If the discarded snapshot is the current one, its parent
7013 snapshot will become a new current snapshot. The current machine
7014 state is not directly affected in this case, except that
7015 currently attached differencing media based on media
7016 of the discarded snapshot will be also merged as described
7017 above.
7018
7019 If the discarded snapshot is the first one (the root snapshot)
7020 and it has exactly one child snapshot, this child snapshot will
7021 become the first snapshot after discarding. If there are no
7022 children at all (i.e. the first snapshot is the only snapshot of
7023 the machine), both the current and the first snapshot of the
7024 machine will be set to @c null. In all other cases, the first
7025 snapshot cannot be discarded.
7026
7027 You cannot discard the snapshot if it
7028 stores <link to="MediumType_Normal">normal</link> (non-differencing)
7029 media that have differencing media based on them. Snapshots of
7030 such kind can be discarded only when every normal medium has either
7031 no children at all or exactly one child. In the former case, the normal
7032 medium simply becomes unused (i.e. not attached to any VM). In the
7033 latter case, it receives all the changes stored in the child medium,
7034 and then it replaces the child medium in the configuration of the
7035 corresponding snapshot or machine.
7036
7037 Also, you cannot discard the snapshot if it stores media
7038 (of any type) having differencing child media that belong
7039 to other machines. Such snapshots can be only discarded after
7040 you discard all snapshots of other machines containing "foreign"
7041 child media, or detach these "foreign" child media from machines
7042 they are attached to.
7043
7044 One particular example of the snapshot storing normal media
7045 is the first snapshot of a virtual machine that had normal media
7046 attached when taking the snapshot. Be careful when
7047 discarding such snapshots because this implicitly commits
7048 changes (made since the snapshot being discarded has been taken)
7049 to normal media (as described above), which may be not what
7050 you want.
7051
7052 The virtual machine is put to
7053 the <link to="MachineState_Discarding">Discarding</link> state until
7054 the discard operation is completed.
7055
7056 <note>
7057 The machine must not be running, otherwise the operation
7058 will fail.
7059 </note>
7060
7061 <note>
7062 Child media of all normal media of the discarded snapshot
7063 must be accessible (see <link to="IMedium::state"/>) for this
7064 operation to succeed. In particular, this means that all virtual
7065 machines, whose media are directly or indirectly based on the
7066 media of discarded snapshot, must be powered off.
7067 </note>
7068 <note>
7069 Merging medium contents can be very time and disk space
7070 consuming, if these media are big in size and have many
7071 children. However, if the snapshot being discarded is the last
7072 (head) snapshot on the branch, the operation will be rather
7073 quick.
7074 </note>
7075 <note>
7076 Note that discarding the current snapshot
7077 will implicitly call <link to="IMachine::saveSettings"/> to
7078 make all current machine settings permanent.
7079 </note>
7080 <result name="VBOX_E_INVALID_VM_STATE">
7081 Virtual machine is running.
7082 </result>
7083 </desc>
7084 <param name="id" type="uuid" mod="string" dir="in">
7085 <desc>UUID of the snapshot to discard.</desc>
7086 </param>
7087 <param name="progress" type="IProgress" dir="return">
7088 <desc>Progress object to track the operation completion.</desc>
7089 </param>
7090 </method>
7091
7092 <method name="restoreSnapshot">
7093 <desc>
7094 Starts resetting the machine's current state to the state contained
7095 in the given snapshot, asynchronously. All current settings of the
7096 machine will be reset and changes stored in differencing media
7097 will be lost.
7098 See <link to="ISnapshot" /> for an introduction to snapshots.
7099
7100 After this operation is successfully completed, new empty differencing
7101 media are created for all normal media of the machine.
7102
7103 If the given snapshot is an online snapshot, the machine will go to
7104 the <link to="MachineState_Saved"> saved state</link>, so that the
7105 next time it is powered on, the execution state will be restored
7106 from the state of the snapshot.
7107
7108 <note>
7109 The machine must not be running, otherwise the operation will fail.
7110 </note>
7111
7112 <note>
7113 If the machine state is <link to="MachineState_Saved">Saved</link>
7114 prior to this operation, the saved state file will be implicitly
7115 discarded (as if <link to="IConsole::forgetSavedState"/> were
7116 called).
7117 </note>
7118
7119 <result name="VBOX_E_INVALID_VM_STATE">
7120 Virtual machine is running.
7121 </result>
7122 </desc>
7123 <param name="snapshot" type="ISnapshot" dir="in">
7124 <desc>The snapshot to restore the VM state from.</desc>
7125 </param>
7126 <param name="progress" type="IProgress" dir="return">
7127 <desc>Progress object to track the operation completion.</desc>
7128 </param>
7129 </method>
7130
7131 <method name="teleport">
7132 <desc>
7133 Teleport the VM to a different host machine or process.
7134
7135 TODO explain the details.
7136
7137 <result name="VBOX_E_INVALID_VM_STATE">
7138 Virtual machine not running or paused.
7139 </result>
7140 </desc>
7141 <param name="hostname" type="wstring" dir="in">
7142 <desc>The name or IP of the host to teleport to.</desc>
7143 </param>
7144 <param name="tcpport" type="unsigned long" dir="in">
7145 <desc>The TCP port to connect to (1..65535).</desc>
7146 </param>
7147 <param name="password" type="wstring" dir="in">
7148 <desc>The password.</desc>
7149 </param>
7150 <param name="progress" type="IProgress" dir="return">
7151 <desc>Progress object to track the operation completion.</desc>
7152 </param>
7153 </method>
7154
7155 <method name="registerCallback">
7156 <desc>
7157 Registers a new console callback on this instance. The methods of the
7158 callback interface will be called by this instance when the appropriate
7159 event occurs.
7160 </desc>
7161 <param name="callback" type="IConsoleCallback" dir="in"/>
7162 </method>
7163
7164 <method name="unregisterCallback">
7165 <desc>
7166 Unregisters the console callback previously registered using
7167 <link to="#registerCallback"/>.
7168 <result name="E_INVALIDARG">
7169 Given @a callback handler is not registered.
7170 </result>
7171 </desc>
7172 <param name="callback" type="IConsoleCallback" dir="in"/>
7173 </method>
7174 </interface>
7175
7176 <!--
7177 // IHost
7178 /////////////////////////////////////////////////////////////////////////
7179 -->
7180
7181 <enum
7182 name="HostNetworkInterfaceMediumType"
7183 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
7184 >
7185 <desc>
7186 Type of encapsulation. Ethernet encapsulation includes both wired and
7187 wireless Ethernet connections.
7188 <see>IHostNetworkInterface</see>
7189 </desc>
7190
7191 <const name="Unknown" value="0">
7192 <desc>
7193 The type of interface cannot be determined.
7194 </desc>
7195 </const>
7196 <const name="Ethernet" value="1">
7197 <desc>
7198 Ethernet frame encapsulation.
7199 </desc>
7200 </const>
7201 <const name="PPP" value="2">
7202 <desc>
7203 Point-to-point protocol encapsulation.
7204 </desc>
7205 </const>
7206 <const name="SLIP" value="3">
7207 <desc>
7208 Serial line IP encapsulation.
7209 </desc>
7210 </const>
7211 </enum>
7212
7213 <enum
7214 name="HostNetworkInterfaceStatus"
7215 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
7216 >
7217 <desc>
7218 Current status of the interface.
7219 <see>IHostNetworkInterface</see>
7220 </desc>
7221
7222 <const name="Unknown" value="0">
7223 <desc>
7224 The state of interface cannot be determined.
7225 </desc>
7226 </const>
7227 <const name="Up" value="1">
7228 <desc>
7229 The interface is fully operational.
7230 </desc>
7231 </const>
7232 <const name="Down" value="2">
7233 <desc>
7234 The interface is not functioning.
7235 </desc>
7236 </const>
7237 </enum>
7238
7239 <enum
7240 name="HostNetworkInterfaceType"
7241 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
7242 >
7243 <desc>
7244 Network interface type.
7245 </desc>
7246 <const name="Bridged" value="1"/>
7247 <const name="HostOnly" value="2"/>
7248 </enum>
7249
7250 <interface
7251 name="IHostNetworkInterface" extends="$unknown"
7252 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
7253 wsmap="managed"
7254 >
7255 <desc>
7256 Represents one of host's network interfaces. IP V6 address and network
7257 mask are strings of 32 hexdecimal digits grouped by four. Groups are
7258 separated by colons.
7259 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
7260 </desc>
7261 <attribute name="name" type="wstring" readonly="yes">
7262 <desc>Returns the host network interface name.</desc>
7263 </attribute>
7264
7265 <attribute name="id" type="uuid" mod="string" readonly="yes">
7266 <desc>Returns the interface UUID.</desc>
7267 </attribute>
7268
7269 <attribute name="networkName" type="wstring" readonly="yes">
7270 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
7271 </attribute>
7272
7273 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
7274 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
7275 </attribute>
7276
7277 <attribute name="IPAddress" type="wstring" readonly="yes">
7278 <desc>Returns the IP V4 address of the interface.</desc>
7279 </attribute>
7280
7281 <attribute name="networkMask" type="wstring" readonly="yes">
7282 <desc>Returns the network mask of the interface.</desc>
7283 </attribute>
7284
7285 <attribute name="IPV6Supported" type="boolean" readonly="yes">
7286 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
7287 </attribute>
7288
7289 <attribute name="IPV6Address" type="wstring" readonly="yes">
7290 <desc>Returns the IP V6 address of the interface.</desc>
7291 </attribute>
7292
7293 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
7294 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
7295 </attribute>
7296
7297 <attribute name="hardwareAddress" type="wstring" readonly="yes">
7298 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
7299 </attribute>
7300
7301 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
7302 <desc>Type of protocol encapsulation used.</desc>
7303 </attribute>
7304
7305 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
7306 <desc>Status of the interface.</desc>
7307 </attribute>
7308
7309 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
7310 <desc>specifies the host interface type.</desc>
7311 </attribute>
7312
7313 <method name="enableStaticIpConfig">
7314 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
7315 <param name="IPAddress" type="wstring" dir="in">
7316 <desc>
7317 IP address.
7318 </desc>
7319 </param>
7320 <param name="networkMask" type="wstring" dir="in">
7321 <desc>
7322 network mask.
7323 </desc>
7324 </param>
7325 </method>
7326
7327 <method name="enableStaticIpConfigV6">
7328 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
7329 <param name="IPV6Address" type="wstring" dir="in">
7330 <desc>
7331 IP address.
7332 </desc>
7333 </param>
7334 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
7335 <desc>
7336 network mask.
7337 </desc>
7338 </param>
7339 </method>
7340
7341 <method name="enableDynamicIpConfig">
7342 <desc>enables the dynamic IP configuration.</desc>
7343 </method>
7344
7345 <method name="dhcpRediscover">
7346 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
7347 </method>
7348
7349 </interface>
7350
7351 <interface
7352 name="IHost" extends="$unknown"
7353 uuid="e380cbfc-ae65-4fa6-899e-45ded6b3132a"
7354 wsmap="managed"
7355 >
7356 <desc>
7357 The IHost interface represents the physical machine that this VirtualBox
7358 installation runs on.
7359
7360 An object implementing this interface is returned by the
7361 <link to="IVirtualBox::host" /> attribute. This interface contains
7362 read-only information about the host's physical hardware (such as what
7363 processors and disks are available, what the host operating system is,
7364 and so on) and also allows for manipulating some of the host's hardware,
7365 such as global USB device filters and host interface networking.
7366
7367 </desc>
7368 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
7369 <desc>List of DVD drives available on the host.</desc>
7370 </attribute>
7371
7372 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
7373 <desc>List of floppy drives available on the host.</desc>
7374 </attribute>
7375
7376 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
7377 <desc>
7378 List of USB devices currently attached to the host.
7379 Once a new device is physically attached to the host computer,
7380 it appears in this list and remains there until detached.
7381
7382 <note>
7383 If USB functionality is not available in the given edition of
7384 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7385 </note>
7386 </desc>
7387 </attribute>
7388
7389 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
7390 <desc>
7391 List of USB device filters in action.
7392 When a new device is physically attached to the host computer,
7393 filters from this list are applied to it (in order they are stored
7394 in the list). The first matched filter will determine the
7395 <link to="IHostUSBDeviceFilter::action">action</link>
7396 performed on the device.
7397
7398 Unless the device is ignored by these filters, filters of all
7399 currently running virtual machines
7400 (<link to="IUSBController::deviceFilters"/>) are applied to it.
7401
7402 <note>
7403 If USB functionality is not available in the given edition of
7404 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7405 </note>
7406
7407 <see>IHostUSBDeviceFilter, USBDeviceState</see>
7408 </desc>
7409 </attribute>
7410
7411 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
7412 <desc>List of host network interfaces currently defined on the host.</desc>
7413 </attribute>
7414
7415 <attribute name="processorCount" type="unsigned long" readonly="yes">
7416 <desc>Number of (logical) CPUs installed in the host system.</desc>
7417 </attribute>
7418
7419 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
7420 <desc>Number of (logical) CPUs online in the host system.</desc>
7421 </attribute>
7422
7423 <method name="getProcessorSpeed">
7424 <desc>Query the (approximate) maximum speed of a specified host CPU in
7425 Megahertz.
7426 </desc>
7427 <param name="cpuId" type="unsigned long" dir="in">
7428 <desc>
7429 Identifier of the CPU.
7430 </desc>
7431 </param>
7432 <param name="speed" type="unsigned long" dir="return">
7433 <desc>
7434 Speed value. 0 is returned if value is not known or @a cpuId is
7435 invalid.
7436 </desc>
7437 </param>
7438 </method>
7439
7440 <method name="getProcessorFeature">
7441 <desc>Query whether a CPU feature is supported or not.</desc>
7442 <param name="feature" type="ProcessorFeature" dir="in">
7443 <desc>
7444 CPU Feature identifier.
7445 </desc>
7446 </param>
7447 <param name="supported" type="boolean" dir="return">
7448 <desc>
7449 Feature is supported or not.
7450 </desc>
7451 </param>
7452 </method>
7453
7454 <method name="getProcessorDescription">
7455 <desc>Query the model string of a specified host CPU.
7456 </desc>
7457 <param name="cpuId" type="unsigned long" dir="in">
7458 <desc>
7459 Identifier of the CPU.
7460 <note>
7461 The current implementation might not necessarily return the
7462 description for this exact CPU.
7463 </note>
7464 </desc>
7465 </param>
7466 <param name="description" type="wstring" dir="return">
7467 <desc>
7468 Model string. An empty string is returned if value is not known or
7469 @a cpuId is invalid.
7470 </desc>
7471 </param>
7472 </method>
7473
7474 <method name="getProcessorCpuIdLeaf">
7475 <desc>
7476 Returns the CPU cpuid information for the specified leaf.
7477 </desc>
7478 <param name="cpuId" type="unsigned long" dir="in">
7479 <desc>
7480 Identifier of the CPU. The CPU most be online.
7481 <note>
7482 The current implementation might not necessarily return the
7483 description for this exact CPU.
7484 </note>
7485 </desc>
7486 </param>
7487 <param name="leaf" type="unsigned long" dir="in">
7488 <desc>
7489 Cpuid leaf index (eax).
7490 </desc>
7491 </param>
7492 <param name="subLeaf" type="unsigned long" dir="in">
7493 <desc>
7494 Cpuid leaf sub index (ecx). This currently only applies to cache
7495 information on Intel CPUs. Use 0 if retriving values for
7496 <link to="IMachine::setCpuIdLeaf"/>.
7497 </desc>
7498 </param>
7499 <param name="valEax" type="unsigned long" dir="out">
7500 <desc>
7501 Cpuid leaf value for register eax.
7502 </desc>
7503 </param>
7504 <param name="valEbx" type="unsigned long" dir="out">
7505 <desc>
7506 Cpuid leaf value for register ebx.
7507 </desc>
7508 </param>
7509 <param name="valEcx" type="unsigned long" dir="out">
7510 <desc>
7511 Cpuid leaf value for register ecx.
7512 </desc>
7513 </param>
7514 <param name="valEdx" type="unsigned long" dir="out">
7515 <desc>
7516 Cpuid leaf value for register edx.
7517 </desc>
7518 </param>
7519 </method>
7520
7521 <attribute name="memorySize" type="unsigned long" readonly="yes">
7522 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7523 </attribute>
7524
7525 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7526 <desc>Available system memory in the host system.</desc>
7527 </attribute>
7528
7529 <attribute name="operatingSystem" type="wstring" readonly="yes">
7530 <desc>Name of the host system's operating system.</desc>
7531 </attribute>
7532
7533 <attribute name="OSVersion" type="wstring" readonly="yes">
7534 <desc>Host operating system's version string.</desc>
7535 </attribute>
7536
7537 <attribute name="UTCTime" type="long long" readonly="yes">
7538 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7539 </attribute>
7540
7541 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
7542 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
7543 </attribute>
7544
7545 <method name="createHostOnlyNetworkInterface">
7546 <desc>
7547 Creates a new adapter for Host Only Networking.
7548 <result name="E_INVALIDARG">
7549 Host network interface @a name already exists.
7550 </result>
7551 </desc>
7552 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7553 <desc>
7554 Created host interface object.
7555 </desc>
7556 </param>
7557 <param name="progress" type="IProgress" dir="return">
7558 <desc>
7559 Progress object to track the operation completion.
7560 </desc>
7561 </param>
7562 </method>
7563
7564 <method name="removeHostOnlyNetworkInterface">
7565 <desc>
7566 Removes the given Host Only Networking interface.
7567 <result name="VBOX_E_OBJECT_NOT_FOUND">
7568 No host network interface matching @a id found.
7569 </result>
7570 </desc>
7571 <param name="id" type="uuid" mod="string" dir="in">
7572 <desc>
7573 Adapter GUID.
7574 </desc>
7575 </param>
7576 <param name="progress" type="IProgress" dir="return">
7577 <desc>
7578 Progress object to track the operation completion.
7579 </desc>
7580 </param>
7581 </method>
7582
7583 <method name="createUSBDeviceFilter">
7584 <desc>
7585 Creates a new USB device filter. All attributes except
7586 the filter name are set to empty (any match),
7587 <i>active</i> is @c false (the filter is not active).
7588
7589 The created filter can be added to the list of filters using
7590 <link to="#insertUSBDeviceFilter"/>.
7591
7592 <see>#USBDeviceFilters</see>
7593 </desc>
7594 <param name="name" type="wstring" dir="in">
7595 <desc>
7596 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7597 for more info.
7598 </desc>
7599 </param>
7600 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7601 <desc>Created filter object.</desc>
7602 </param>
7603 </method>
7604
7605 <method name="insertUSBDeviceFilter">
7606 <desc>
7607 Inserts the given USB device to the specified position
7608 in the list of filters.
7609
7610 Positions are numbered starting from @c 0. If the specified
7611 position is equal to or greater than the number of elements in
7612 the list, the filter is added at the end of the collection.
7613
7614 <note>
7615 Duplicates are not allowed, so an attempt to insert a
7616 filter already in the list is an error.
7617 </note>
7618 <note>
7619 If USB functionality is not available in the given edition of
7620 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7621 </note>
7622
7623 <see>#USBDeviceFilters</see>
7624
7625 <result name="VBOX_E_INVALID_OBJECT_STATE">
7626 USB device filter is not created within this VirtualBox instance.
7627 </result>
7628 <result name="E_INVALIDARG">
7629 USB device filter already in list.
7630 </result>
7631
7632 </desc>
7633 <param name="position" type="unsigned long" dir="in">
7634 <desc>Position to insert the filter to.</desc>
7635 </param>
7636 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7637 <desc>USB device filter to insert.</desc>
7638 </param>
7639 </method>
7640
7641 <method name="removeUSBDeviceFilter">
7642 <desc>
7643 Removes a USB device filter from the specified position in the
7644 list of filters.
7645
7646 Positions are numbered starting from @c 0. Specifying a
7647 position equal to or greater than the number of elements in
7648 the list will produce an error.
7649
7650 <note>
7651 If USB functionality is not available in the given edition of
7652 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7653 </note>
7654
7655 <see>#USBDeviceFilters</see>
7656
7657 <result name="E_INVALIDARG">
7658 USB device filter list empty or invalid @a position.
7659 </result>
7660
7661 </desc>
7662 <param name="position" type="unsigned long" dir="in">
7663 <desc>Position to remove the filter from.</desc>
7664 </param>
7665 </method>
7666
7667 <method name="findHostDVDDrive">
7668 <desc>
7669 Searches for a host DVD drive with the given @c name.
7670
7671 <result name="VBOX_E_OBJECT_NOT_FOUND">
7672 Given @c name does not correspond to any host drive.
7673 </result>
7674
7675 </desc>
7676 <param name="name" type="wstring" dir="in">
7677 <desc>Name of the host drive to search for</desc>
7678 </param>
7679 <param name="drive" type="IMedium" dir="return">
7680 <desc>Found host drive object</desc>
7681 </param>
7682 </method>
7683
7684 <method name="findHostFloppyDrive">
7685 <desc>
7686 Searches for a host floppy drive with the given @c name.
7687
7688 <result name="VBOX_E_OBJECT_NOT_FOUND">
7689 Given @c name does not correspond to any host floppy drive.
7690 </result>
7691
7692 </desc>
7693 <param name="name" type="wstring" dir="in">
7694 <desc>Name of the host floppy drive to search for</desc>
7695 </param>
7696 <param name="drive" type="IMedium" dir="return">
7697 <desc>Found host floppy drive object</desc>
7698 </param>
7699 </method>
7700
7701 <method name="findHostNetworkInterfaceByName">
7702 <desc>
7703 Searches through all host network interfaces for an interface with
7704 the given @c name.
7705 <note>
7706 The method returns an error if the given @c name does not
7707 correspond to any host network interface.
7708 </note>
7709 </desc>
7710 <param name="name" type="wstring" dir="in">
7711 <desc>Name of the host network interface to search for.</desc>
7712 </param>
7713 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7714 <desc>Found host network interface object.</desc>
7715 </param>
7716 </method>
7717 <method name="findHostNetworkInterfaceById">
7718 <desc>
7719 Searches through all host network interfaces for an interface with
7720 the given GUID.
7721 <note>
7722 The method returns an error if the given GUID does not
7723 correspond to any host network interface.
7724 </note>
7725 </desc>
7726 <param name="id" type="uuid" mod="string" dir="in">
7727 <desc>GUID of the host network interface to search for.</desc>
7728 </param>
7729 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7730 <desc>Found host network interface object.</desc>
7731 </param>
7732 </method>
7733 <method name="findHostNetworkInterfacesOfType">
7734 <desc>
7735 Searches through all host network interfaces and returns a list of interfaces of the specified type
7736 </desc>
7737 <param name="type" type="HostNetworkInterfaceType" dir="in">
7738 <desc>type of the host network interfaces to search for.</desc>
7739 </param>
7740 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7741 <desc>Found host network interface objects.</desc>
7742 </param>
7743 </method>
7744
7745 <method name="findUSBDeviceById">
7746 <desc>
7747 Searches for a USB device with the given UUID.
7748
7749 <result name="VBOX_E_OBJECT_NOT_FOUND">
7750 Given @c id does not correspond to any USB device.
7751 </result>
7752
7753 <see>IHostUSBDevice::id</see>
7754 </desc>
7755 <param name="id" type="uuid" mod="string" dir="in">
7756 <desc>UUID of the USB device to search for.</desc>
7757 </param>
7758 <param name="device" type="IHostUSBDevice" dir="return">
7759 <desc>Found USB device object.</desc>
7760 </param>
7761 </method>
7762
7763 <method name="findUSBDeviceByAddress">
7764 <desc>
7765 Searches for a USB device with the given host address.
7766
7767 <result name="VBOX_E_OBJECT_NOT_FOUND">
7768 Given @c name does not correspond to any USB device.
7769 </result>
7770
7771 <see>IHostUSBDevice::address</see>
7772 </desc>
7773 <param name="name" type="wstring" dir="in">
7774 <desc>
7775 Address of the USB device (as assigned by the host) to
7776 search for.
7777 </desc>
7778 </param>
7779 <param name="device" type="IHostUSBDevice" dir="return">
7780 <desc>Found USB device object.</desc>
7781 </param>
7782 </method>
7783
7784 </interface>
7785
7786 <!--
7787 // ISystemProperties
7788 /////////////////////////////////////////////////////////////////////////
7789 -->
7790
7791 <interface
7792 name="ISystemProperties"
7793 extends="$unknown"
7794 uuid="8030645c-8fef-4320-bb7b-c829f00069dc"
7795 wsmap="managed"
7796 >
7797 <desc>
7798 The ISystemProperties interface represents global properties of the given
7799 VirtualBox installation.
7800
7801 These properties define limits and default values for various attributes
7802 and parameters. Most of the properties are read-only, but some can be
7803 changed by a user.
7804 </desc>
7805
7806 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7807 <desc>Minimum guest system memory in Megabytes.</desc>
7808 </attribute>
7809
7810 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7811 <desc>Maximum guest system memory in Megabytes.</desc>
7812 </attribute>
7813
7814 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7815 <desc>Minimum guest video memory in Megabytes.</desc>
7816 </attribute>
7817
7818 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7819 <desc>Maximum guest video memory in Megabytes.</desc>
7820 </attribute>
7821
7822 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7823 <desc>Minimum CPU count.</desc>
7824 </attribute>
7825
7826 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7827 <desc>Maximum CPU count.</desc>
7828 </attribute>
7829
7830 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7831 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7832 </attribute>
7833
7834 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7835 <desc>
7836 Number of network adapters associated with every
7837 <link to="IMachine"/> instance.
7838 </desc>
7839 </attribute>
7840
7841 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7842 <desc>
7843 Number of serial ports associated with every
7844 <link to="IMachine"/> instance.
7845 </desc>
7846 </attribute>
7847
7848 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7849 <desc>
7850 Number of parallel ports associated with every
7851 <link to="IMachine"/> instance.
7852 </desc>
7853 </attribute>
7854
7855 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7856 <desc>
7857 Maximum device position in the boot order. This value corresponds
7858 to the total number of devices a machine can boot from, to make it
7859 possible to include all possible devices to the boot list.
7860 <see><link to="IMachine::setBootOrder"/></see>
7861 </desc>
7862 </attribute>
7863
7864 <attribute name="defaultMachineFolder" type="wstring">
7865 <desc>
7866 Full path to the default directory used to create new or open
7867 existing machines when a settings file name contains no
7868 path.
7869
7870 The initial value of this property is
7871 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7872 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7873
7874 <note>
7875 Setting this property to @c null or an empty string will restore the
7876 initial value.
7877 </note>
7878 <note>
7879 When settings this property, the specified path can be
7880 absolute (full path) or relative
7881 to the <link to="IVirtualBox::homeFolder">
7882 VirtualBox home directory</link>.
7883 When reading this property, a full path is
7884 always returned.
7885 </note>
7886 <note>
7887 The specified path may not exist, it will be created
7888 when necessary.
7889 </note>
7890
7891 <see>
7892 <link to="IVirtualBox::createMachine"/>,
7893 <link to="IVirtualBox::openMachine"/>
7894 </see>
7895 </desc>
7896 </attribute>
7897
7898 <attribute name="defaultHardDiskFolder" type="wstring">
7899 <desc>
7900 Full path to the default directory used to create new or open existing
7901 virtual disks.
7902
7903 This path is used when the storage unit of a hard disk is a regular file
7904 in the host's file system and only a file name that contains no path is
7905 given.
7906
7907 The initial value of this property is
7908 <tt>&lt;</tt>
7909 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7910 <tt>&gt;/HardDisks</tt>.
7911
7912 <note>
7913 Setting this property to @c null or empty string will restore the
7914 initial value.
7915 </note>
7916 <note>
7917 When settings this property, the specified path can be relative
7918 to the
7919 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7920 absolute. When reading this property, a full path is
7921 always returned.
7922 </note>
7923 <note>
7924 The specified path may not exist, it will be created
7925 when necessary.
7926 </note>
7927
7928 <see>
7929 IMedium,
7930 <link to="IVirtualBox::createHardDisk"/>,
7931 <link to="IVirtualBox::openHardDisk"/>,
7932 <link to="IMedium::location"/>
7933 </see>
7934 </desc>
7935 </attribute>
7936
7937 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7938 <desc>
7939 List of all medium storage formats supported by this VirtualBox
7940 installation.
7941
7942 Keep in mind that the medium format identifier
7943 (<link to="IMediumFormat::id"/>) used in other API calls like
7944 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7945 medium format is a case-insensitive string. This means that, for
7946 example, all of the following strings:
7947 <pre>
7948 "VDI"
7949 "vdi"
7950 "VdI"</pre>
7951 refer to the same medium format.
7952
7953 Note that the virtual medium framework is backend-based, therefore
7954 the list of supported formats depends on what backends are currently
7955 installed.
7956
7957 <see>
7958 <link to="IMediumFormat"/>,
7959 </see>
7960 </desc>
7961 </attribute>
7962
7963 <attribute name="defaultHardDiskFormat" type="wstring">
7964 <desc>
7965 Identifier of the default medium format used by VirtualBox.
7966
7967 The medium format set by this attribute is used by VirtualBox
7968 when the medium format was not specified explicitly. One example is
7969 <link to="IVirtualBox::createHardDisk"/> with the empty
7970 format argument. A more complex example is implicit creation of
7971 differencing media when taking a snapshot of a virtual machine:
7972 this operation will try to use a format of the parent medium first
7973 and if this format does not support differencing media the default
7974 format specified by this argument will be used.
7975
7976 The list of supported medium formats may be obtained by the
7977 <link to="#mediaFormats"/> call. Note that the default medium
7978 format must have a capability to create differencing media;
7979 otherwise operations that create media implicitly may fail
7980 unexpectedly.
7981
7982 The initial value of this property is <tt>"VDI"</tt> in the current
7983 version of the VirtualBox product, but may change in the future.
7984
7985 <note>
7986 Setting this property to @c null or empty string will restore the
7987 initial value.
7988 </note>
7989
7990 <see>
7991 <link to="#mediaFormats"/>,
7992 <link to="IMediumFormat::id"/>,
7993 <link to="IVirtualBox::createHardDisk"/>
7994 </see>
7995 </desc>
7996 </attribute>
7997
7998 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7999 <desc>
8000 Library that provides authentication for VRDP clients. The library
8001 is used if a virtual machine's authentication type is set to "external"
8002 in the VM RemoteDisplay configuration.
8003
8004 The system library extension (".DLL" or ".so") must be omitted.
8005 A full path can be specified; if not, then the library must reside on the
8006 system's default library path.
8007
8008 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
8009 of that name in one of the default VirtualBox library directories.
8010
8011 For details about VirtualBox authentication libraries and how to implement
8012 them, please refer to the VirtualBox manual.
8013
8014 <note>
8015 Setting this property to @c null or empty string will restore the
8016 initial value.
8017 </note>
8018 </desc>
8019 </attribute>
8020
8021 <attribute name="webServiceAuthLibrary" type="wstring">
8022 <desc>
8023 Library that provides authentication for webservice clients. The library
8024 is used if a virtual machine's authentication type is set to "external"
8025 in the VM RemoteDisplay configuration and will be called from
8026 within the <link to="IWebsessionManager::logon" /> implementation.
8027
8028 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
8029 there is no per-VM setting for this, as the webservice is a global
8030 resource (if it is running). Only for this setting (for the webservice),
8031 setting this value to a literal <tt>"null"</tt> string disables authentication,
8032 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
8033 no matter what user name and password are supplied.
8034
8035 The initial value of this property is <tt>"VRDPAuth"</tt>,
8036 meaning that the webservice will use the same authentication
8037 library that is used by default for VBoxVRDP (again, see
8038 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
8039 The format and calling convention of authentication libraries
8040 is the same for the webservice as it is for VBoxVRDP.
8041
8042 <note>
8043 Setting this property to @c null or empty string will restore the
8044 initial value.
8045 </note>
8046 </desc>
8047 </attribute>
8048
8049 <attribute name="LogHistoryCount" type="unsigned long">
8050 <desc>
8051 This value specifies how many old release log files are kept.
8052 </desc>
8053 </attribute>
8054
8055 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
8056 <desc>This value hold the default audio driver for the current
8057 system.</desc>
8058 </attribute>
8059
8060 <method name="getMaxDevicesPerPortForStorageBus">
8061 <desc>Returns the maximum number of devices which can be attached to a port
8062 for the given storage bus.</desc>
8063
8064 <param name="bus" type="StorageBus" dir="in">
8065 <desc>The storage bus type to get the value for.</desc>
8066 </param>
8067
8068 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
8069 <desc>The maximum number of devices which can eb attached to the port for the given
8070 storage bus.</desc>
8071 </param>
8072 </method>
8073
8074 <method name="getMinPortCountForStorageBus">
8075 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
8076
8077 <param name="bus" type="StorageBus" dir="in">
8078 <desc>The storage bus type to get the value for.</desc>
8079 </param>
8080
8081 <param name="minPortCount" type="unsigned long" dir="return">
8082 <desc>The minimum number of ports for the given storage bus.</desc>
8083 </param>
8084 </method>
8085
8086 <method name="getMaxPortCountForStorageBus">
8087 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
8088
8089 <param name="bus" type="StorageBus" dir="in">
8090 <desc>The storage bus type to get the value for.</desc>
8091 </param>
8092
8093 <param name="maxPortCount" type="unsigned long" dir="return">
8094 <desc>The maximum number of ports for the given storage bus.</desc>
8095 </param>
8096 </method>
8097
8098 <method name="getMaxInstancesOfStorageBus">
8099 <desc>Returns the maximum number of storage bus instances which
8100 can be configured for each VM. This corresponds to the number of
8101 storage controllers one can have.</desc>
8102
8103 <param name="bus" type="StorageBus" dir="in">
8104 <desc>The storage bus type to get the value for.</desc>
8105 </param>
8106
8107 <param name="maxInstances" type="unsigned long" dir="return">
8108 <desc>The maximum number of instances for the given storage bus.</desc>
8109 </param>
8110 </method>
8111
8112 <method name="getDeviceTypesForStorageBus">
8113 <desc>Returns list of all the supported device types
8114 (<link to="DeviceType"/>) for the given type of storage
8115 bus.</desc>
8116
8117 <param name="bus" type="StorageBus" dir="in">
8118 <desc>The storage bus type to get the value for.</desc>
8119 </param>
8120
8121 <param name="deviceTypes" type="DeviceType" safearray="yes" dir="return">
8122 <desc>The list of all supported device types for the given storage bus.</desc>
8123 </param>
8124 </method>
8125 </interface>
8126
8127 <!--
8128 // IGuest
8129 /////////////////////////////////////////////////////////////////////////
8130 -->
8131
8132 <interface
8133 name="IGuestOSType" extends="$unknown"
8134 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
8135 wsmap="struct"
8136 >
8137 <desc>
8138 </desc>
8139
8140 <attribute name="familyId" type="wstring" readonly="yes">
8141 <desc>Guest OS family identifier string.</desc>
8142 </attribute>
8143
8144 <attribute name="familyDescription" type="wstring" readonly="yes">
8145 <desc>Human readable description of the guest OS family.</desc>
8146 </attribute>
8147
8148 <attribute name="id" type="wstring" readonly="yes">
8149 <desc>Guest OS identifier string.</desc>
8150 </attribute>
8151
8152 <attribute name="description" type="wstring" readonly="yes">
8153 <desc>Human readable description of the guest OS.</desc>
8154 </attribute>
8155
8156 <attribute name="is64Bit" type="boolean" readonly="yes">
8157 <desc>Returns @c true if the given OS is 64-bit</desc>
8158 </attribute>
8159
8160 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
8161 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
8162 </attribute>
8163
8164 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
8165 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
8166 </attribute>
8167
8168 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
8169 <desc>Recommended RAM size in Megabytes.</desc>
8170 </attribute>
8171
8172 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
8173 <desc>Recommended video RAM size in Megabytes.</desc>
8174 </attribute>
8175
8176 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
8177 <desc>Recommended hard disk size in Megabytes.</desc>
8178 </attribute>
8179
8180 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
8181 <desc>Returns recommended network adapter for this OS type.</desc>
8182 </attribute>
8183 </interface>
8184
8185 <interface
8186 name="IGuest" extends="$unknown"
8187 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
8188 wsmap="managed"
8189 >
8190 <desc>
8191 The IGuest interface represents information about the operating system
8192 running inside the virtual machine. Used in
8193 <link to="IConsole::guest"/>.
8194
8195 IGuest provides information about the guest operating system, whether
8196 Guest Additions are installed and other OS-specific virtual machine
8197 properties.
8198 </desc>
8199
8200 <attribute name="OSTypeId" type="wstring" readonly="yes">
8201 <desc>
8202 Identifier of the Guest OS type as reported by the Guest
8203 Additions.
8204 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
8205 an IGuestOSType object representing details about the given
8206 Guest OS type.
8207 <note>
8208 If Guest Additions are not installed, this value will be
8209 the same as <link to="IMachine::OSTypeId"/>.
8210 </note>
8211 </desc>
8212 </attribute>
8213
8214 <attribute name="additionsActive" type="boolean" readonly="yes">
8215 <desc>
8216 Flag whether the Guest Additions are installed and active
8217 in which case their version will be returned by the
8218 <link to="#additionsVersion"/> property.
8219 </desc>
8220 </attribute>
8221
8222 <attribute name="additionsVersion" type="wstring" readonly="yes">
8223 <desc>
8224 Version of the Guest Additions (3 decimal numbers separated
8225 by dots) or empty when the Additions are not installed. The
8226 Additions may also report a version but yet not be active as
8227 the version might be refused by VirtualBox (incompatible) or
8228 other failures occurred.
8229 </desc>
8230 </attribute>
8231
8232 <attribute name="supportsSeamless" type="boolean" readonly="yes">
8233 <desc>
8234 Flag whether seamless guest display rendering (seamless desktop
8235 integration) is supported.
8236 </desc>
8237 </attribute>
8238
8239 <attribute name="supportsGraphics" type="boolean" readonly="yes">
8240 <desc>
8241 Flag whether the guest is in graphics mode. If it is not, then
8242 seamless rendering will not work, resize hints are not immediately
8243 acted on and guest display resizes are probably not initiated by
8244 the guest additions.
8245 </desc>
8246 </attribute>
8247
8248 <attribute name="memoryBalloonSize" type="unsigned long">
8249 <desc>Guest system memory balloon size in megabytes.</desc>
8250 </attribute>
8251
8252 <attribute name="statisticsUpdateInterval" type="unsigned long">
8253 <desc>Interval to update guest statistics in seconds.</desc>
8254 </attribute>
8255
8256 <method name="setCredentials">
8257 <desc>
8258 Store login credentials that can be queried by guest operating
8259 systems with Additions installed. The credentials are transient
8260 to the session and the guest may also choose to erase them. Note
8261 that the caller cannot determine whether the guest operating system
8262 has queried or made use of the credentials.
8263
8264 <result name="VBOX_E_VM_ERROR">
8265 VMM device is not available.
8266 </result>
8267
8268 </desc>
8269 <param name="userName" type="wstring" dir="in">
8270 <desc>User name string, can be empty</desc>
8271 </param>
8272 <param name="password" type="wstring" dir="in">
8273 <desc>Password string, can be empty</desc>
8274 </param>
8275 <param name="domain" type="wstring" dir="in">
8276 <desc>Domain name (guest logon scheme specific), can be empty</desc>
8277 </param>
8278 <param name="allowInteractiveLogon" type="boolean" dir="in">
8279 <desc>
8280 Flag whether the guest should alternatively allow the user to
8281 interactively specify different credentials. This flag might
8282 not be supported by all versions of the Additions.
8283 </desc>
8284 </param>
8285 </method>
8286
8287 <method name="getStatistic">
8288 <desc>
8289 Query specified guest statistics as reported by the VirtualBox Additions.
8290 </desc>
8291 <param name="cpuId" type="unsigned long" dir="in">
8292 <desc>Virtual CPU id; not relevant for all statistic types</desc>
8293 </param>
8294 <param name="statistic" type="GuestStatisticType" dir="in">
8295 <desc>Statistic type.</desc>
8296 </param>
8297 <param name="statVal" type="unsigned long" dir="return">
8298 <desc>Statistics value</desc>
8299 </param>
8300 </method>
8301
8302 </interface>
8303
8304
8305 <!--
8306 // IProgress
8307 /////////////////////////////////////////////////////////////////////////
8308 -->
8309
8310 <interface
8311 name="IProgress" extends="$unknown"
8312 uuid="62827ef1-c098-40eb-be96-36d0508489a6"
8313 wsmap="managed"
8314 >
8315 <desc>
8316 The IProgress interface is used to track and control
8317 asynchronous tasks within VirtualBox.
8318
8319 An instance of this is returned every time VirtualBox starts
8320 an asynchronous task (in other words, a separate thread) which
8321 continues to run after a method call returns. For example,
8322 <link to="IConsole::saveState" />, which saves the state of
8323 a running virtual machine, can take a long time to complete.
8324 To be able to display a progress bar, a user interface such as
8325 the VirtualBox graphical user interface can use the IProgress
8326 object returned by that method.
8327
8328 Note that IProgress is a "read-only" interface in the sense
8329 that only the VirtualBox internals behind the Main API can
8330 create and manipulate progress objects, whereas client code
8331 can only use the IProgress object to monitor a task's
8332 progress and, if <link to="#cancelable" /> is @c true,
8333 cancel the task by calling <link to="#cancel" />.
8334
8335 A task represented by IProgress consists of either one or
8336 several sub-operations that run sequentially, one by one (see
8337 <link to="#operation" /> and <link to="#operationCount" />).
8338 Every operation is identified by a number (starting from 0)
8339 and has a separate description.
8340
8341 You can find the individual percentage of completion of the current
8342 operation in <link to="#operationPercent" /> and the
8343 percentage of completion of the task as a whole
8344 in <link to="#percent" />.
8345
8346 Similarly, you can wait for the completion of a particular
8347 operation via <link to="#waitForOperationCompletion" /> or
8348 for the completion of the whole task via
8349 <link to="#waitForCompletion" />.
8350 </desc>
8351
8352 <attribute name="id" type="uuid" mod="string" readonly="yes">
8353 <desc>ID of the task.</desc>
8354 </attribute>
8355
8356 <attribute name="description" type="wstring" readonly="yes">
8357 <desc>Description of the task.</desc>
8358 </attribute>
8359
8360 <attribute name="initiator" type="$unknown" readonly="yes">
8361 <desc>Initiator of the task.</desc>
8362 </attribute>
8363
8364 <attribute name="cancelable" type="boolean" readonly="yes">
8365 <desc>Whether the task can be interrupted.</desc>
8366 </attribute>
8367
8368 <attribute name="percent" type="unsigned long" readonly="yes">
8369 <desc>
8370 Current progress value of the task as a whole, in percent.
8371 This value depends on how many operations are already complete.
8372 Returns 100 if <link to="#completed" /> is @c true.
8373 </desc>
8374 </attribute>
8375
8376 <attribute name="timeRemaining" type="long" readonly="yes">
8377 <desc>
8378 Estimated remaining time until the task completes, in
8379 seconds. Returns 0 once the task has completed; returns -1
8380 if the remaining time cannot be computed, in particular if
8381 the current progress is 0.
8382
8383 Even if a value is returned, the estimate will be unreliable
8384 for low progress values. It will become more reliable as the
8385 task progresses; it is not recommended to display an ETA
8386 before at least 20% of a task have completed.
8387 </desc>
8388 </attribute>
8389
8390 <attribute name="completed" type="boolean" readonly="yes">
8391 <desc>Whether the task has been completed.</desc>
8392 </attribute>
8393
8394 <attribute name="canceled" type="boolean" readonly="yes">
8395 <desc>Whether the task has been canceled.</desc>
8396 </attribute>
8397
8398 <attribute name="resultCode" type="long" readonly="yes">
8399 <desc>
8400 Result code of the progress task.
8401 Valid only if <link to="#completed"/> is @c true.
8402 </desc>
8403 </attribute>
8404
8405 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
8406 <desc>
8407 Extended information about the unsuccessful result of the
8408 progress operation. May be @c null if no extended information
8409 is available.
8410 Valid only if <link to="#completed"/> is @c true and
8411 <link to="#resultCode"/> indicates a failure.
8412 </desc>
8413 </attribute>
8414
8415 <attribute name="operationCount" type="unsigned long" readonly="yes">
8416 <desc>
8417 Number of sub-operations this task is divided into.
8418 Every task consists of at least one suboperation.
8419 </desc>
8420 </attribute>
8421
8422 <attribute name="operation" type="unsigned long" readonly="yes">
8423 <desc>Number of the sub-operation being currently executed.</desc>
8424 </attribute>
8425
8426 <attribute name="operationDescription" type="wstring" readonly="yes">
8427 <desc>
8428 Description of the sub-operation being currently executed.
8429 </desc>
8430 </attribute>
8431
8432 <attribute name="operationPercent" type="unsigned long" readonly="yes">
8433 <desc>Progress value of the current sub-operation only, in percent.</desc>
8434 </attribute>
8435
8436 <method name="setCurrentOperationProgress">
8437 <desc>Internal method, not to be called externally.</desc>
8438 <param name="percent" type="unsigned long" dir="in" />
8439 </method>
8440 <method name="setNextOperation">
8441 <desc>Internal method, not to be called externally.</desc>
8442 <param name="nextOperationDescription" type="wstring" dir="in" />
8443 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8444 </method>
8445
8446 <method name="waitForCompletion">
8447 <desc>
8448 Waits until the task is done (including all sub-operations)
8449 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8450
8451 <result name="VBOX_E_IPRT_ERROR">
8452 Failed to wait for task completion.
8453 </result>
8454 </desc>
8455
8456 <param name="timeout" type="long" dir="in">
8457 <desc>
8458 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8459 </desc>
8460 </param>
8461 </method>
8462
8463 <method name="waitForOperationCompletion">
8464 <desc>
8465 Waits until the given operation is done with a given timeout in
8466 milliseconds; specify -1 for an indefinite wait.
8467
8468 <result name="VBOX_E_IPRT_ERROR">
8469 Failed to wait for operation completion.
8470 </result>
8471
8472 </desc>
8473 <param name="operation" type="unsigned long" dir="in">
8474 <desc>
8475 Number of the operation to wait for.
8476 Must be less than <link to="#operationCount"/>.
8477 </desc>
8478 </param>
8479 <param name="timeout" type="long" dir="in">
8480 <desc>
8481 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8482 </desc>
8483 </param>
8484 </method>
8485
8486 <method name="cancel">
8487 <desc>
8488 Cancels the task.
8489 <note>
8490 If <link to="#cancelable"/> is @c false, then this method will fail.
8491 </note>
8492
8493 <result name="VBOX_E_INVALID_OBJECT_STATE">
8494 Operation cannot be canceled.
8495 </result>
8496
8497 </desc>
8498 </method>
8499
8500 </interface>
8501
8502
8503 <!--
8504 // ISnapshot
8505 /////////////////////////////////////////////////////////////////////////
8506 -->
8507
8508 <interface
8509 name="ISnapshot" extends="$unknown"
8510 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8511 wsmap="managed"
8512 >
8513 <desc>
8514 The ISnapshot interface represents a snapshot of the virtual
8515 machine.
8516
8517 Together with the differencing media that are created
8518 when a snapshot is taken, a machine can be brought back to
8519 the exact state it was in when the snapshot was taken.
8520
8521 The ISnapshot interface has no methods, only attributes; snapshots
8522 are controlled through methods of the <link to="IConsole" /> interface
8523 which also manage the media associated with the snapshot.
8524 The following operations exist:
8525
8526 <ul>
8527 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8528 by creating new, empty differencing images for the machine's
8529 media and saving the VM settings and (if the VM is running)
8530 the current VM state in the snapshot.
8531
8532 The differencing images will then receive all data written to
8533 the machine's media, while their parent (base) images
8534 remain unmodified after the snapshot has been taken (see
8535 <link to="IMedium" /> for details about differencing images).
8536 This simplifies restoring a machine to the state of a snapshot:
8537 only the differencing images need to be deleted.
8538
8539 The current machine state is not changed by taking a snapshot.
8540 If the machine is running, it will resume execution after the
8541 snapshot has been taken.
8542 </li>
8543
8544 <li><link to="IConsole::restoreSnapshot"/>: this goes back to
8545 a previous snapshot. This resets the machine's state to that of
8546 the previous snapshot by deleting the differencing image of each
8547 of the machine's media and setting the machine's settings
8548 and state to the state that was saved in the snapshot (if any).
8549
8550 This destroys the machine's current state.
8551 </li>
8552
8553 <li><link to="IConsole::deleteSnapshot"/>: deletes a snapshot
8554 without affecting the current machine state.
8555
8556 This does not change the machine, but instead frees the resources
8557 allocated when the snapshot was taken: the settings and machine state
8558 is deleted (if any), and the snapshot's differencing image for each
8559 of the machine's media gets merged with its parent image.
8560
8561 Neither the current machine state nor other snapshots are affected
8562 by this operation, except that parent media will be modified
8563 to contain the disk data associated with the snapshot being deleted.
8564 </li>
8565 </ul>
8566
8567 Each snapshot contains the settings of the virtual machine (hardware
8568 configuration etc.). In addition, if the machine was running when the
8569 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8570 the current VM state is saved in the snapshot (similarly to what happens
8571 when a VM's state is saved). The snapshot is then said to
8572 be <i>online</i> because when restoring it, the VM will be running.
8573
8574 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8575 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8576
8577 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8578 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8579 it then contains a so-called "zero execution state", representing a
8580 machine that is powered off.
8581
8582 <h3>Snapshot branches and the "current" snapshot</h3>
8583
8584 Snapshots can be chained, whereby every next snapshot is based on the
8585 previous one. This chaining is related to medium branching
8586 (see the <link to="IMedium"/> description) in that every time
8587 a new snapshot is created, a new differencing medium is implicitly
8588 created for all normal media attached to the machine.
8589
8590 Each virtual machine has a "current snapshot", identified by
8591 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8592 to the last snapshot in the chain. In a future version of VirtualBox,
8593 it will be possible to reset a machine's current state to that of an
8594 earlier snapshot without discarding the current state so that it will be
8595 possible to create alternative snapshot paths in a snapshot tree.
8596
8597 In the current implementation, multiple snapshot branches within one
8598 virtual machine are not allowed. Every machine has a single branch,
8599 and <link to="IConsole::takeSnapshot"/> operation adds a new
8600 snapshot to the top of that branch.
8601 </desc>
8602
8603 <attribute name="id" type="uuid" mod="string" readonly="yes">
8604 <desc>UUID of the snapshot.</desc>
8605 </attribute>
8606
8607 <attribute name="name" type="wstring">
8608 <desc>Short name of the snapshot.</desc>
8609 </attribute>
8610
8611 <attribute name="description" type="wstring">
8612 <desc>Optional description of the snapshot.</desc>
8613 </attribute>
8614
8615 <attribute name="timeStamp" type="long long" readonly="yes">
8616 <desc>
8617 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8618 </desc>
8619 </attribute>
8620
8621 <attribute name="online" type="boolean" readonly="yes">
8622 <desc>
8623 @c true if this snapshot is an online snapshot and @c false otherwise.
8624
8625 When this attribute is @c true, the
8626 <link to="IMachine::stateFilePath"/> attribute of the
8627 <link to="#machine"/> object associated with this snapshot
8628 will point to the saved state file. Otherwise, it will be
8629 an empty string.
8630 </desc>
8631 </attribute>
8632
8633 <attribute name="machine" type="IMachine" readonly="yes">
8634 <desc>
8635 Virtual machine this snapshot is taken on. This object
8636 stores all settings the machine had when taking this snapshot.
8637 <note>
8638 The returned machine object is immutable, i.e. no
8639 any settings can be changed.
8640 </note>
8641 </desc>
8642 </attribute>
8643
8644 <attribute name="parent" type="ISnapshot" readonly="yes">
8645 <desc>
8646 Parent snapshot (a snapshot this one is based on), or
8647 @c null if the snapshot has no parent (i.e. is the first snapshot).
8648 </desc>
8649 </attribute>
8650
8651 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8652 <desc>
8653 Child snapshots (all snapshots having this one as a parent).
8654 </desc>
8655 </attribute>
8656
8657 </interface>
8658
8659
8660 <!--
8661 // IMedium
8662 /////////////////////////////////////////////////////////////////////////
8663 -->
8664
8665 <enum
8666 name="MediumState"
8667 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8668 >
8669 <desc>
8670 Virtual medium state.
8671 <see>IMedium</see>
8672 </desc>
8673
8674 <const name="NotCreated" value="0">
8675 <desc>
8676 Associated medium storage does not exist (either was not created yet or
8677 was deleted).
8678 </desc>
8679 </const>
8680 <const name="Created" value="1">
8681 <desc>
8682 Associated storage exists and accessible; this gets set if the
8683 accessibility check performed by <link to="IMedium::refreshState" />
8684 was successful.
8685 </desc>
8686 </const>
8687 <const name="LockedRead" value="2">
8688 <desc>
8689 Medium is locked for reading (see <link to="IMedium::lockRead"/>),
8690 no data modification is possible.
8691 </desc>
8692 </const>
8693 <const name="LockedWrite" value="3">
8694 <desc>
8695 Medium is locked for writing (see <link to="IMedium::lockWrite"/>),
8696 no concurrent data reading or modification is possible.
8697 </desc>
8698 </const>
8699 <const name="Inaccessible" value="4">
8700 <desc>
8701 Medium accessiblity check (see <link to="IMedium::refreshState" />) has
8702 not yet been performed, or else, associated medium storage is not
8703 accessible. In the first case, <link to="IMedium::lastAccessError"/>
8704 is empty, in the second case, it describes the error that occured.
8705 </desc>
8706 </const>
8707 <const name="Creating" value="5">
8708 <desc>
8709 Associated medium storage is being created.
8710 </desc>
8711 </const>
8712 <const name="Deleting" value="6">
8713 <desc>
8714 Associated medium storage is being deleted.
8715 </desc>
8716 </const>
8717 </enum>
8718
8719 <enum
8720 name="MediumType"
8721 uuid="11f6f7a5-0327-409a-9d42-7db6a0cec578"
8722 >
8723 <desc>
8724 Virtual medium type.
8725 <see>IMedium</see>
8726 </desc>
8727
8728 <const name="Normal" value="0">
8729 <desc>
8730 Normal medium (attached directly or indirectly, preserved
8731 when taking snapshots).
8732 </desc>
8733 </const>
8734 <const name="Immutable" value="1">
8735 <desc>
8736 Immutable medium (attached indirectly, changes are wiped out
8737 the next time the virtual machine is started).
8738 </desc>
8739 </const>
8740 <const name="Writethrough" value="2">
8741 <desc>
8742 Write through medium (attached directly, ignored when
8743 taking snapshots).
8744 </desc>
8745 </const>
8746 </enum>
8747
8748 <enum
8749 name="MediumVariant"
8750 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8751 >
8752 <desc>
8753 Virtual medium image variant. More than one flag may be set.
8754 <see>IMedium</see>
8755 </desc>
8756
8757 <const name="Standard" value="0">
8758 <desc>
8759 No particular variant requested, results in using the backend default.
8760 </desc>
8761 </const>
8762 <const name="VmdkSplit2G" value="0x01">
8763 <desc>
8764 VMDK image split in chunks of less than 2GByte.
8765 </desc>
8766 </const>
8767 <const name="VmdkStreamOptimized" value="0x04">
8768 <desc>
8769 VMDK streamOptimized image. Special import/export format which is
8770 read-only/append-only.
8771 </desc>
8772 </const>
8773 <const name="VmdkESX" value="0x08">
8774 <desc>
8775 VMDK format variant used on ESX products.
8776 </desc>
8777 </const>
8778 <const name="Fixed" value="0x10000">
8779 <desc>
8780 Fixed image. Only allowed for base images.
8781 </desc>
8782 </const>
8783 <const name="Diff" value="0x20000">
8784 <desc>
8785 Fixed image. Only allowed for base images.
8786 </desc>
8787 </const>
8788 </enum>
8789
8790 <interface
8791 name="IMediumAttachment" extends="$unknown"
8792 uuid="e58eb3eb-8627-428b-bdf8-34487c848de5"
8793 wsmap="struct"
8794 >
8795 <desc>
8796 The IMediumAttachment interface represents the attachment
8797 of a storage medium to a virtual machine. Each machine contains
8798 an array of its medium attachments in <link to="IMachine::mediumAttachments"/>.
8799
8800 Each medium attachment specifies a storage controller as well as a port
8801 and device number. Fixed media (hard disks) will always also specify
8802 an instance of IMedium in <link to="#medium" />, referring to the hard disk
8803 medium. For removeable media, the IMedia instance is optional; it can be
8804 @c null if no media is mounted (see <link to="IMachine::mountMedium" />).
8805 </desc>
8806
8807 <attribute name="medium" type="IMedium" readonly="yes">
8808 <desc>Medium object associated with this attachment; it
8809 can be @c null for removable devices.</desc>
8810 </attribute>
8811
8812 <attribute name="controller" type="wstring" readonly="yes">
8813 <desc>Name of the storage controller of this attachment; this
8814 refers to one of the controllers in <link to="IMachine::storageControllers" />
8815 by name.</desc>
8816 </attribute>
8817
8818 <attribute name="port" type="long" readonly="yes">
8819 <desc>Port number of this attachment.</desc>
8820 </attribute>
8821
8822 <attribute name="device" type="long" readonly="yes">
8823 <desc>Device slot number of this attachment.</desc>
8824 </attribute>
8825
8826 <attribute name="type" type="DeviceType" readonly="yes">
8827 <desc>Device type of this attachment.</desc>
8828 </attribute>
8829
8830 <attribute name="passthrough" type="boolean" readonly="yes">
8831 <desc>Pass I/O requests through to a device on the host.</desc>
8832 </attribute>
8833
8834 </interface>
8835
8836 <interface
8837 name="IMedium" extends="$unknown"
8838 uuid="aa8167ba-df72-4738-b740-9b84377ba9f1"
8839 wsmap="managed"
8840 >
8841 <desc>
8842 The IMedium interface represents virtual storage for a machine's
8843 hard disks, CD/DVD or floppy drives. It will typically represent
8844 a disk image on the host, for example a VDI or VMDK file representing
8845 a virtual hard disk, or an ISO or RAW file representing virtual
8846 removable media, but can also point to a network location (e.g.
8847 for iSCSI targets).
8848
8849 Instances of IMedium are connected to virtual machines by way of
8850 medium attachments (see <link to="IMediumAttachment" />), which link
8851 the storage medium to a particular device slot of a storage controller
8852 of the virtual machine.
8853 In the VirtualBox API, virtual storage is therefore always represented
8854 by the following chain of object links:
8855
8856 <ul>
8857 <li><link to="IMachine::storageControllers"/> contains an array of
8858 storage controllers (IDE, SATA, SCSI or a floppy controller;
8859 these are instances of <link to="IStorageController"/>).</li>
8860 <li><link to="IMachine::mediumAttachments"/> contains an array of
8861 medium attachments (instances of <link to="IMediumAttachment"/>),
8862 each containing a storage controller from the above array, a
8863 port/device specification, and an instance of IMedium representing
8864 the medium storage (image file).
8865
8866 For removable media, the storage medium is optional; a medium
8867 attachment with no medium represents a CD/DVD or floppy drive
8868 with no medium inserted. By contrast, hard disk attachments
8869 will always have an IMedium object attached.</li>
8870 <li>Each IMedium in turn points to a storage unit (such as a file
8871 on the host computer or a network resource) that holds actual
8872 data. This location is represented by the <link to="#location"/>
8873 attribute.</li>
8874 </ul>
8875
8876 Existing media are opened using the following methods, depending on the
8877 media type:
8878 <ul>
8879 <li><link to="IVirtualBox::openHardDisk"/></li>
8880 <li><link to="IVirtualBox::openDVDImage"/></li>
8881 <li><link to="IVirtualBox::openFloppyImage"/></li>
8882 </ul>
8883
8884 New hard disk media can be created with the VirtualBox API using the
8885 <link to="IVirtualBox::createHardDisk"/> method.
8886
8887 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8888 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8889 type in a regular file.
8890
8891 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8892 drive; in that case the <link to="#id" /> attribute contains the UUID of
8893 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8894
8895 <h3>Known media</h3>
8896
8897 When an existing medium is opened for the first time, it is automatically
8898 remembered by the given VirtualBox installation or, in other words, becomes
8899 a <i>known medium</i>. Known media are stored in the media
8900 registry transparently maintained by VirtualBox and stored in settings
8901 files so that this registry is preserved when VirtualBox is not running.
8902
8903 Newly created virtual media are remembered only when the associated
8904 storage unit is actually created.
8905
8906 All known media can be enumerated using
8907 <link to="IVirtualBox::hardDisks"/>,
8908 <link to="IVirtualBox::DVDImages"/> and
8909 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8910 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8911 and similar methods or by location using
8912 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8913
8914 Only known media can be attached to virtual machines.
8915
8916 Removing known media from the media registry is performed when the given
8917 medium is closed using the <link to="#close"/> method or when its
8918 associated storage unit is deleted.
8919
8920 <h3>Accessibility checks</h3>
8921
8922 VirtualBox defers media accessibility checks until the <link to="#refreshState" />
8923 method is called explicitly on a medium. This is done to make the VirtualBox object
8924 ready for serving requests as fast as possible and let the end-user
8925 application decide if it needs to check media accessibility right away or not.
8926
8927 As a result, when VirtualBox starts up (e.g. the VirtualBox
8928 object gets created for the first time), all known media are in the
8929 "Inaccessible" state, but the value of the <link to="#lastAccessError"/>
8930 attribute is an empty string because no actual accessibility check has
8931 been made yet.
8932
8933 After calling <link to="#refreshState" />, a medium is considered
8934 <i>accessible</i> if its storage unit can be read. In that case, the
8935 <link to="#state"/> attribute has a value of "Created". If the storage
8936 unit cannot be read (for example, because it is located on a disconnected
8937 network resource, or was accidentally deleted outside VirtualBox),
8938 the medium is considered <i>inaccessible</i>, which is indicated by the
8939 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8940 obtained by reading the <link to="#lastAccessError"/> attribute.
8941
8942 <h3>Medium types</h3>
8943
8944 There are three types of medium behavior (see <link to="MediumType" />):
8945 "normal", "immutable" and "writethrough", represented by the
8946 <link to="#type"/> attribute. The type of the medium defines how the
8947 medium is attached to a virtual machine and what happens when a
8948 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8949 attached medium is taken. At the moment DVD and floppy media are always
8950 of type "writethrough".
8951
8952 All media can be also divided in two groups: <i>base</i> media and
8953 <i>differencing</i> media. A base medium contains all sectors of the
8954 medium data in its own storage and therefore can be used independently.
8955 In contrast, a differencing mediun is a "delta" to some other medium and
8956 contains only those sectors which differ from that other medium, which is
8957 then called a <i>parent</i>. The differencing medium is said to be
8958 <i>linked to</i> that parent. The parent may be itself a differencing
8959 medium, thus forming a chain of linked media. The last element in that
8960 chain must always be a base medium. Note that several differencing
8961 media may be linked to the same parent medium.
8962
8963 Differencing media can be distinguished from base media by querying the
8964 <link to="#parent"/> attribute: base media do not have parents they would
8965 depend on, so the value of this attribute is always @c null for them.
8966 Using this attribute, it is possible to walk up the medium tree (from the
8967 child medium to its parent). It is also possible to walk down the tree
8968 using the <link to="#children"/> attribute.
8969
8970 Note that the type of all differencing media is
8971 <link to="MediumType_Normal" />; all other values are meaningless for
8972 them. Base media may be of any type.
8973
8974 <h3>Creating hard disks</h3>
8975
8976 New base hard disks are created using
8977 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8978 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8979 disks are usually implicitly created by VirtualBox when needed but may
8980 also be created explicitly using <link to="#createDiffStorage"/>.
8981
8982 After the hard disk is successfully created (including the storage unit)
8983 or opened, it becomes a known hard disk (remembered in the internal media
8984 registry). Known hard disks can be attached to a virtual machine, accessed
8985 through <link to="IVirtualBox::getHardDisk"/> and
8986 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8987 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8988
8989 The following methods, besides <link to="IMedium::close"/>,
8990 automatically remove the hard disk from the media registry:
8991 <ul>
8992 <li><link to="#deleteStorage"/></li>
8993 <li><link to="#mergeTo"/></li>
8994 </ul>
8995
8996 If the storage unit of the hard disk is a regular file in the host's
8997 file system then the rules stated in the description of the
8998 <link to="IMedium::location"/> attribute apply when setting its value. In
8999 addition, a plain file name without any path may be given, in which case
9000 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
9001 folder</link> will be prepended to it.
9002
9003 <h4>Automatic composition of the file name part</h4>
9004
9005 Another extension to the <link to="IMedium::location"/> attribute is that
9006 there is a possibility to cause VirtualBox to compose a unique value for
9007 the file name part of the location using the UUID of the hard disk. This
9008 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
9009 e.g. before the storage unit is created, and works as follows. You set the
9010 value of the <link to="IMedium::location"/> attribute to a location
9011 specification which only contains the path specification but not the file
9012 name part and ends with either a forward slash or a backslash character.
9013 In response, VirtualBox will generate a new UUID for the hard disk and
9014 compose the file name using the following pattern:
9015 <pre>
9016 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
9017 </pre>
9018 where <tt>&lt;path&gt;</tt> is the supplied path specification,
9019 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
9020 is the default extension for the storage format of this hard disk. After
9021 that, you may call any of the methods that create a new hard disk storage
9022 unit and they will use the generated UUID and file name.
9023
9024 <h3>Attaching Hard Disks</h3>
9025
9026 Hard disks are attached to virtual machines using the
9027 <link to="IMachine::attachDevice"/> method and detached using the
9028 <link to="IMachine::detachDevice"/> method. Depending on their
9029 <link to="#type"/>, hard disks are attached either
9030 <i>directly</i> or <i>indirectly</i>.
9031
9032 When a hard disk is being attached directly, it is associated with the
9033 virtual machine and used for hard disk operations when the machine is
9034 running. When a hard disk is being attached indirectly, a new differencing
9035 hard disk linked to it is implicitly created and this differencing hard
9036 disk is associated with the machine and used for hard disk operations.
9037 This also means that if <link to="IMachine::attachDevice"/> performs
9038 a direct attachment then the same hard disk will be returned in response
9039 to the subsequent <link to="IMachine::getMedium"/> call; however if
9040 an indirect attachment is performed then
9041 <link to="IMachine::getMedium"/> will return the implicitly created
9042 differencing hard disk, not the original one passed to <link
9043 to="IMachine::attachDevice"/>. In detail:
9044
9045 <ul>
9046 <li><b>Normal base</b> hard disks that do not have children (i.e.
9047 differencing hard disks linked to them) and that are not already
9048 attached to virtual machines in snapshots are attached <b>directly</b>.
9049 Otherwise, they are attached <b>indirectly</b> because having
9050 dependent children or being part of the snapshot makes it impossible
9051 to modify hard disk contents without breaking the integrity of the
9052 dependent party. The <link to="#readOnly"/> attribute allows to
9053 quickly determine the kind of the attachment for the given hard
9054 disk. Note that if a normal base hard disk is to be indirectly
9055 attached to a virtual machine with snapshots then a special
9056 procedure called <i>smart attachment</i> is performed (see below).</li>
9057 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
9058 they are attached <b>directly</b> if they do not have children and are
9059 not attached to virtual machines in snapshots, and <b>indirectly</b>
9060 otherwise. Note that the smart attachment procedure is never performed
9061 for differencing hard disks.</li>
9062 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
9063 they are designed to be non-writable. If an immutable hard disk is
9064 attached to a virtual machine with snapshots then a special
9065 procedure called smart attachment is performed (see below).</li>
9066 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
9067 also as designed. This also means that writethrough hard disks cannot
9068 have other hard disks linked to them at all.</li>
9069 </ul>
9070
9071 Note that the same hard disk, regardless of its type, may be attached to
9072 more than one virtual machine at a time. In this case, the machine that is
9073 started first gains exclusive access to the hard disk and attempts to
9074 start other machines having this hard disk attached will fail until the
9075 first machine is powered down.
9076
9077 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
9078 that the given hard disk remains associated with the given machine after a
9079 successful <link to="IMachine::detachDevice"/> call until
9080 <link to="IMachine::saveSettings"/> is called to save all changes to
9081 machine settings to disk. This deferring is necessary to guarantee that
9082 the hard disk configuration may be restored at any time by a call to
9083 <link to="IMachine::discardSettings"/> before the settings
9084 are saved (committed).
9085
9086 Note that if <link to="IMachine::discardSettings"/> is called after
9087 indirectly attaching some hard disks to the machine but before a call to
9088 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
9089 all differencing hard disks implicitly created by
9090 <link to="IMachine::attachDevice"/> for these indirect attachments.
9091 Such implicitly created hard disks will also be immediately deleted when
9092 detached explicitly using the <link to="IMachine::detachDevice"/>
9093 call if it is made before <link to="IMachine::saveSettings"/>. This
9094 implicit deletion is safe because newly created differencing hard
9095 disks do not contain any user data.
9096
9097 However, keep in mind that detaching differencing hard disks that were
9098 implicitly created by <link to="IMachine::attachDevice"/>
9099 before the last <link to="IMachine::saveSettings"/> call will
9100 <b>not</b> implicitly delete them as they may already contain some data
9101 (for example, as a result of virtual machine execution). If these hard
9102 disks are no more necessary, the caller can always delete them explicitly
9103 using <link to="#deleteStorage"/> after they are actually de-associated
9104 from this machine by the <link to="IMachine::saveSettings"/> call.
9105
9106 <h3>Smart Attachment</h3>
9107
9108 When normal base or immutable hard disks are indirectly attached to a
9109 virtual machine then some additional steps are performed to make sure the
9110 virtual machine will have the most recent "view" of the hard disk being
9111 attached. These steps include walking through the machine's snapshots
9112 starting from the current one and going through ancestors up to the first
9113 snapshot. Hard disks attached to the virtual machine in all
9114 of the encountered snapshots are checked whether they are descendants of
9115 the given normal base or immutable hard disk. The first found child (which
9116 is the differencing hard disk) will be used instead of the normal base or
9117 immutable hard disk as a parent for creating a new differencing hard disk
9118 that will be actually attached to the machine. And only if no descendants
9119 are found or if the virtual machine does not have any snapshots then the
9120 normal base or immutable hard disk will be used itself as a parent for
9121 this differencing hard disk.
9122
9123 It is easier to explain what smart attachment does using the
9124 following example:
9125 <pre>
9126BEFORE attaching B.vdi: AFTER attaching B.vdi:
9127
9128Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
9129 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
9130 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
9131 Snapshot 4 (none) Snapshot 4 (none)
9132 CurState (none) CurState (D3->D2.vdi)
9133
9134 NOT
9135 ...
9136 CurState (D3->B.vdi)
9137 </pre>
9138 The first column is the virtual machine configuration before the base hard
9139 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
9140 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
9141 mean that the hard disk that is actually attached to the machine is a
9142 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
9143 another hard disk, <tt>B.vdi</tt>.
9144
9145 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
9146 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
9147 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
9148 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
9149 it cannot be attached directly and needs an indirect attachment (i.e.
9150 implicit creation of a new differencing hard disk). Due to the smart
9151 attachment procedure, the new differencing hard disk
9152 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
9153 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
9154 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
9155 machine.
9156
9157 Note that if there is more than one descendant hard disk of the given base
9158 hard disk found in a snapshot, and there is an exact device, channel and
9159 bus match, then this exact match will be used. Otherwise, the youngest
9160 descendant will be picked up.
9161
9162 There is one more important aspect of the smart attachment procedure which
9163 is not related to snapshots at all. Before walking through the snapshots
9164 as described above, the backup copy of the current list of hard disk
9165 attachment is searched for descendants. This backup copy is created when
9166 the hard disk configuration is changed for the first time after the last
9167 <link to="IMachine::saveSettings"/> call and used by
9168 <link to="IMachine::discardSettings"/> to undo the recent hard disk
9169 changes. When such a descendant is found in this backup copy, it will be
9170 simply re-attached back, without creating a new differencing hard disk for
9171 it. This optimization is necessary to make it possible to re-attach the
9172 base or immutable hard disk to a different bus, channel or device slot
9173 without losing the contents of the differencing hard disk actually
9174 attached to the machine in place of it.
9175 </desc>
9176
9177 <attribute name="id" type="uuid" mod="string" readonly="yes">
9178 <desc>
9179 UUID of the medium. For a newly created medium, this value is a randomly
9180 generated UUID.
9181
9182 <note>
9183 For media in one of MediumState_NotCreated, MediumState_Creating or
9184 MediumState_Deleting states, the value of this property is undefined
9185 and will most likely be an empty UUID.
9186 </note>
9187 </desc>
9188 </attribute>
9189
9190 <attribute name="description" type="wstring">
9191 <desc>
9192 Optional description of the medium. For a newly created medium the value
9193 of this attribute is an empty string.
9194
9195 Medium types that don't support this attribute will return E_NOTIMPL in
9196 attempt to get or set this attribute's value.
9197
9198 <note>
9199 For some storage types, reading this attribute may return an outdated
9200 (last known) value when <link to="#state"/> is <link
9201 to="MediumState_Inaccessible"/> or <link
9202 to="MediumState_LockedWrite"/> because the value of this attribute is
9203 stored within the storage unit itself. Also note that changing the
9204 attribute value is not possible in such case, as well as when the
9205 medium is the <link to="MediumState_LockedRead"/> state.
9206 </note>
9207 </desc>
9208 </attribute>
9209
9210 <attribute name="state" type="MediumState" readonly="yes">
9211 <desc>
9212 Returns the current medium state, which is the last state set by
9213 the accessibility check performed by <link to="#refreshState"/>.
9214 If that method has not yet been called on the medium, the state
9215 is "Inaccessible"; as opposed to truly inaccessible media, the
9216 value of <link to="#lastAccessError"/> will be an empty string in
9217 that case.
9218
9219 <note>As of version 3.1, this no longer performs an accessibility check
9220 automatically; call <link to="#refreshState"/> for that.
9221 </note>
9222 </desc>
9223 </attribute>
9224
9225 <attribute name="location" type="wstring">
9226 <desc>
9227 Location of the storage unit holding medium data.
9228
9229 The format of the location string is medium type specific. For medium
9230 types using regular files in a host's file system, the location
9231 string is the full file name.
9232
9233 Some medium types may support changing the storage unit location by
9234 simply changing the value of this property. If this operation is not
9235 supported, the implementation will return E_NOTIMPL in attempt to set
9236 this attribute's value.
9237
9238 When setting a value of the location attribute which is a regular file
9239 in the host's file system, the given file name may be either relative to
9240 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
9241 absolute. Note that if the given location specification does not contain
9242 the file extension part then a proper default extension will be
9243 automatically appended by the implementation depending on the medium type.
9244 </desc>
9245 </attribute>
9246
9247 <attribute name="name" type="wstring" readonly="yes">
9248 <desc>
9249 Name of the storage unit holding medium data.
9250
9251 The returned string is a short version of the <link to="#location"/>
9252 attribute that is suitable for representing the medium in situations
9253 where the full location specification is too long (such as lists
9254 and comboboxes in GUI frontends). This string is also used by frontends
9255 to sort the media list alphabetically when needed.
9256
9257 For example, for locations that are regular files in the host's file
9258 system, the value of this attribute is just the file name (+ extension),
9259 without the path specification.
9260
9261 Note that as opposed to the <link to="#location"/> attribute, the name
9262 attribute will not necessary be unique for a list of media of the
9263 given type and format.
9264 </desc>
9265 </attribute>
9266
9267 <attribute name="deviceType" type="DeviceType" readonly="yes">
9268 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
9269 medium.</desc>
9270 </attribute>
9271
9272 <attribute name="hostDrive" type="boolean" readonly="yes">
9273 <desc>True if this corresponds to a drive on the host.</desc>
9274 </attribute>
9275
9276 <attribute name="size" type="unsigned long long" readonly="yes">
9277 <desc>
9278 Physical size of the storage unit used to hold medium data (in bytes).
9279
9280 <note>
9281 For media whose <link to="#state"/> is <link
9282 to="MediumState_Inaccessible"/>, the value of this property is the
9283 last known size. For <link to="MediumState_NotCreated"/> media,
9284 the returned value is zero.
9285 </note>
9286 </desc>
9287 </attribute>
9288
9289 <attribute name="format" type="wstring" readonly="yes">
9290 <desc>
9291 Storage format of this medium.
9292
9293 The value of this attribute is a string that specifies a backend used
9294 to store medium data. The storage format is defined when you create a
9295 new medium or automatically detected when you open an existing medium,
9296 and cannot be changed later.
9297
9298 The list of all storage formats supported by this VirtualBox
9299 installation can be obtained using
9300 <link to="ISystemProperties::mediumFormats"/>.
9301 </desc>
9302 </attribute>
9303
9304 <attribute name="type" type="MediumType">
9305 <desc>
9306 Type (role) of this medium.
9307
9308 The following constraints apply when changing the value of this
9309 attribute:
9310 <ul>
9311 <li>If a medium is attached to a virtual machine (either in the
9312 current state or in one of the snapshots), its type cannot be
9313 changed.
9314 </li>
9315 <li>As long as the medium has children, its type cannot be set
9316 to <link to="MediumType_Writethrough"/>.
9317 </li>
9318 <li>The type of all differencing media is
9319 <link to="MediumType_Normal"/> and cannot be changed.
9320 </li>
9321 </ul>
9322
9323 The type of a newly created or opened medium is set to
9324 <link to="MediumType_Normal"/>, except for DVD and floppy media,
9325 which have a type of <link to="MediumType_Writethrough"/>.
9326 </desc>
9327 </attribute>
9328
9329 <attribute name="parent" type="IMedium" readonly="yes">
9330 <desc>
9331 Parent of this medium (the medium this medium is directly based
9332 on).
9333
9334 Only differencing media have parents. For base (non-differencing)
9335 media, @c null is returned.
9336 </desc>
9337 </attribute>
9338
9339 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
9340 <desc>
9341 Children of this medium (all differencing media directly based
9342 on this medium). A @c null array is returned if this medium
9343 does not have any children.
9344 </desc>
9345 </attribute>
9346
9347 <attribute name="base" type="IMedium" readonly="yes">
9348 <desc>
9349 Base medium of this medium.
9350
9351 If this is a differencing medium, its base medium is the medium
9352 the given medium branch starts from. For all other types of media, this
9353 property returns the medium object itself (i.e. the same object this
9354 property is read on).
9355 </desc>
9356 </attribute>
9357
9358 <attribute name="readOnly" type="boolean" readonly="yes">
9359 <desc>
9360 Returns @c true if this medium is read-only and @c false otherwise.
9361
9362 A medium is considered to be read-only when its contents cannot be
9363 modified without breaking the integrity of other parties that depend on
9364 this medium such as its child media or snapshots of virtual machines
9365 where this medium is attached to these machines. If there are no
9366 children and no such snapshots then there is no dependency and the
9367 medium is not read-only.
9368
9369 The value of this attribute can be used to determine the kind of the
9370 attachment that will take place when attaching this medium to a
9371 virtual machine. If the value is @c false then the medium will
9372 be attached directly. If the value is @c true then the medium
9373 will be attached indirectly by creating a new differencing child
9374 medium for that. See the interface description for more information.
9375
9376 Note that all <link to="MediumType_Immutable">Immutable</link> media
9377 are always read-only while all
9378 <link to="MediumType_Writethrough">Writethrough</link> media are
9379 always not.
9380
9381 <note>
9382 The read-only condition represented by this attribute is related to
9383 the medium type and usage, not to the current
9384 <link to="IMedium::state">medium state</link> and not to the read-only
9385 state of the storage unit.
9386 </note>
9387 </desc>
9388 </attribute>
9389
9390 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9391 <desc>
9392 Logical size of this medium (in megabytes), as reported to the
9393 guest OS running inside the virtual machine this medium is
9394 attached to. The logical size is defined when the medium is created
9395 and cannot be changed later.
9396
9397 <note>
9398 Reading this property on a differencing medium will return the size
9399 of its <link to="#base"/> medium.
9400 </note>
9401 <note>
9402 For media whose state is <link to="#state"/> is <link
9403 to="MediumState_Inaccessible"/>, the value of this property is the
9404 last known logical size. For <link to="MediumaState_NotCreated"/>
9405 media, the returned value is zero.
9406 </note>
9407 </desc>
9408 </attribute>
9409
9410 <attribute name="autoReset" type="boolean">
9411 <desc>
9412 Whether this differencing medium will be automatically reset each
9413 time a virtual machine it is attached to is powered up.
9414
9415 See <link to="#reset()"/> for more information about resetting
9416 differencing media.
9417
9418 <note>
9419 Reading this property on a base (non-differencing) medium will
9420 always @c false. Changing the value of this property in this
9421 case is not supported.
9422 </note>
9423
9424 <result name="VBOX_E_NOT_SUPPORTED">
9425 This is not a differencing medium (when changing the attribute
9426 value).
9427 </result>
9428 </desc>
9429 </attribute>
9430
9431 <attribute name="lastAccessError" type="wstring" readonly="yes">
9432 <desc>
9433 Text message that represents the result of the last accessibility
9434 check performed by <link to="#refreshState"/>.
9435
9436 An empty string is returned if the last accessibility check
9437 was successful or has not yet been called. As a result, if
9438 <link to="#state" /> is "Inaccessible" and this attribute is empty,
9439 then <link to="#refreshState"/> has yet to be called; this is the
9440 default value of media after VirtualBox initialization.
9441 A non-empty string indicates a failure and should normally describe
9442 a reason of the failure (for example, a file read error).
9443 </desc>
9444 </attribute>
9445
9446 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9447 <desc>
9448 Array of UUIDs of all machines this medium is attached to.
9449
9450 A @c null array is returned if this medium is not attached to any
9451 machine or to any machine's snapshot.
9452
9453 <note>
9454 The returned array will include a machine even if this medium is not
9455 attached to that machine in the current state but attached to it in
9456 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9457 details.
9458 </note>
9459 </desc>
9460 </attribute>
9461
9462 <method name="refreshState">
9463 <desc>
9464 If the current medium state (see <link to="MediumState"/>) is one of
9465 "Created", "Inaccessible" or "LockedRead", then this performs an
9466 accessibility check on the medium and sets the value of the <link to="#state"/>
9467 attribute accordingly; that value is also returned for convenience.
9468
9469 For all other state values, this does not perform a refresh but returns
9470 the state only.
9471
9472 The refresh, if performed, may take a long time (several seconds or even
9473 minutes, depending on the storage unit location and format) because it performs an
9474 accessibility check of the storage unit. This check may cause a significant
9475 delay if the storage unit of the given medium is, for example, a file located
9476 on a network share which is not currently accessible due to connectivity
9477 problems. In that case, the call will not return until a timeout
9478 interval defined by the host OS for this operation expires. For this reason,
9479 it is recommended to never read this attribute on the main UI thread to avoid
9480 making the UI unresponsive.
9481
9482 If the last known state of the medium is "Created" and the accessibility
9483 check fails, then the state would be set to "Inaccessible", and
9484 <link to="#lastAccessError"/> may be used to get more details about the
9485 failure. If the state of the medium is "LockedRead", then it remains the
9486 same, and a non-empty value of <link to="#lastAccessError"/> will
9487 indicate a failed accessibility check in this case.
9488
9489 Note that not all medium states are applicable to all medium types.
9490 </desc>
9491 <param name="state" type="MediumState" dir="return">
9492 <desc>
9493 New medium state.
9494 </desc>
9495 </param>
9496 </method>
9497
9498 <method name="getSnapshotIds">
9499 <desc>
9500 Returns an array of UUIDs of all snapshots of the given machine where
9501 this medium is attached to.
9502
9503 If the medium is attached to the machine in the current state, then the
9504 first element in the array will always be the ID of the queried machine
9505 (i.e. the value equal to the @c machineId argument), followed by
9506 snapshot IDs (if any).
9507
9508 If the medium is not attached to the machine in the current state, then
9509 the array will contain only snapshot IDs.
9510
9511 The returned array may be @c null if this medium is not attached
9512 to the given machine at all, neither in the current state nor in one of
9513 the snapshots.
9514 </desc>
9515 <param name="machineId" type="uuid" mod="string" dir="in">
9516 <desc>
9517 UUID of the machine to query.
9518 </desc>
9519 </param>
9520 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9521 <desc>
9522 Array of snapshot UUIDs of the given machine using this medium.
9523 </desc>
9524 </param>
9525 </method>
9526
9527 <method name="lockRead">
9528 <desc>
9529 Locks this medium for reading.
9530
9531 A read lock is shared: many clients can simultaneously lock the
9532 same medium for reading unless it is already locked for writing (see
9533 <link to="#lockWrite"/>) in which case an error is returned.
9534
9535 When the medium is locked for reading, it cannot be modified
9536 from within VirtualBox. This means that any method that changes
9537 the properties of this medium or contents of the storage unit
9538 will return an error (unless explicitly stated otherwise). That
9539 includes an attempt to start a virtual machine that wants to
9540 write to the the medium.
9541
9542 When the virtual machine is started up, it locks for reading all
9543 media it uses in read-only mode. If some medium cannot be locked
9544 for reading, the startup procedure will fail.
9545 A medium is typically locked for reading while it is used by a running
9546 virtual machine but has a depending differencing image that receives
9547 the actual write operations. This way one base medium can have
9548 multiple child differencing images which can be written to
9549 simultaneously. Read-only media such as DVD and floppy images are
9550 also locked for reading only (so they can be in use by multiple
9551 machines simultaneously).
9552
9553 A medium is also locked for reading when it is the source of a
9554 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9555
9556 The medium locked for reading must be unlocked using the <link
9557 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9558 can be nested and must be followed by the same number of paired
9559 <link to="#unlockRead"/> calls.
9560
9561 This method sets the medium state (see <link to="#state"/>) to
9562 "LockedRead" on success. The medium's previous state must be
9563 one of "Created", "Inaccessible" or "LockedRead".
9564
9565 Locking an inaccessible medium is not an error; this method performs
9566 a logical lock that prevents modifications of this medium through
9567 the VirtualBox API, not a physical file-system lock of the underlying
9568 storage unit.
9569
9570 This method returns the current state of the medium
9571 <i>before</i> the operation.
9572
9573 <result name="VBOX_E_INVALID_OBJECT_STATE">
9574 Invalid medium state (e.g. not created, locked, inaccessible,
9575 creating, deleting).
9576 </result>
9577
9578 </desc>
9579 <param name="state" type="MediumState" dir="return">
9580 <desc>
9581 State of the medium after the operation.
9582 </desc>
9583 </param>
9584 </method>
9585
9586 <method name="unlockRead">
9587 <desc>
9588 Cancels the read lock previously set by <link to="#lockRead"/>.
9589
9590 For both success and failure, this method returns the current state
9591 of the medium <i>after</i> the operation.
9592
9593 See <link to="#lockRead"/> for more details.
9594
9595 <result name="VBOX_E_INVALID_OBJECT_STATE">
9596 Medium not locked for reading.
9597 </result>
9598
9599 </desc>
9600 <param name="state" type="MediumState" dir="return">
9601 <desc>
9602 State of the medium after the operation.
9603 </desc>
9604 </param>
9605 </method>
9606
9607 <method name="lockWrite">
9608 <desc>
9609 Locks this medium for writing.
9610
9611 A write lock, as opposed to <link to="#lockRead"/>, is
9612 exclusive: there may be only one client holding a write lock,
9613 and there may be no read locks while the write lock is held.
9614 As a result, read-locking fails if a write lock is held, and
9615 write-locking fails if either a read or another write lock is held.
9616
9617 When a medium is locked for writing, it cannot be modified
9618 from within VirtualBox, and it is not guaranteed that the values
9619 of its properties are up-to-date. Any method that changes the
9620 properties of this medium or contents of the storage unit will
9621 return an error (unless explicitly stated otherwise).
9622
9623 When a virtual machine is started up, it locks for writing all
9624 media it uses to write data to. If any medium could not be locked
9625 for writing, the startup procedure will fail. If a medium has
9626 differencing images, then while the machine is running, only
9627 the last ("leaf") differencing image is locked for writing,
9628 whereas its parents are locked for reading only.
9629
9630 A medium is also locked for writing when it is the target of a
9631 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9632
9633 The medium locked for writing must be unlocked using the <link
9634 to="#unlockWrite"/> method. Write locks <i>cannot</i> be nested.
9635
9636 This method sets the medium state (see <link to="#state"/>) to
9637 "LockedWrite" on success. The medium's previous state must be
9638 either "Created" or "Inaccessible".
9639
9640 Locking an inaccessible medium is not an error; this method performs
9641 a logical lock that prevents modifications of this medium through
9642 the VirtualBox API, not a physical file-system lock of the underlying
9643 storage unit.
9644
9645 For both, success and failure, this method returns the current
9646 state of the medium <i>before</i> the operation.
9647
9648 <result name="VBOX_E_INVALID_OBJECT_STATE">
9649 Invalid medium state (e.g. not created, locked, inaccessible,
9650 creating, deleting).
9651 </result>
9652
9653 </desc>
9654 <param name="state" type="MediumState" dir="return">
9655 <desc>
9656 State of the medium after the operation.
9657 </desc>
9658 </param>
9659 </method>
9660
9661 <method name="unlockWrite">
9662 <desc>
9663 Cancels the write lock previously set by <link to="#lockWrite"/>.
9664
9665 For both success and failure, this method returns the current
9666 state of the medium <i>after</i> the operation.
9667
9668 See <link to="#lockWrite"/> for more details.
9669
9670 <result name="VBOX_E_INVALID_OBJECT_STATE">
9671 Medium not locked for writing.
9672 </result>
9673
9674 </desc>
9675 <param name="state" type="MediumState" dir="return">
9676 <desc>
9677 State of the medium after the operation.
9678 </desc>
9679 </param>
9680 </method>
9681
9682 <method name="close">
9683 <desc>
9684 Closes this medium.
9685
9686 The medium must not be attached to any known virtual machine
9687 and must not have any known child media, otherwise the
9688 operation will fail.
9689
9690 When the medium is successfully closed, it gets removed from
9691 the list of remembered media, but its storage unit is not
9692 deleted. In particular, this means that this medium can be
9693 later opened again using the <link
9694 to="IVirtualBox::openHardDisk"/> call.
9695
9696 Note that after this method successfully returns, the given medium
9697 object becomes uninitialized. This means that any attempt
9698 to call any of its methods or attributes will fail with the
9699 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9700
9701 <result name="VBOX_E_INVALID_OBJECT_STATE">
9702 Invalid medium state (other than not created, created or
9703 inaccessible).
9704 </result>
9705 <result name="VBOX_E_OBJECT_IN_USE">
9706 Medium attached to virtual machine.
9707 </result>
9708 <result name="VBOX_E_FILE_ERROR">
9709 Settings file not accessible.
9710 </result>
9711 <result name="VBOX_E_XML_ERROR">
9712 Could not parse the settings file.
9713 </result>
9714
9715 </desc>
9716 </method>
9717
9718 <!-- storage methods -->
9719
9720 <method name="getProperty">
9721 <desc>
9722 Returns the value of the custom medium property with the given name.
9723
9724 The list of all properties supported by the given medium format can
9725 be obtained with <link to="IMediumFormat::describeProperties"/>.
9726
9727 Note that if this method returns an empty string in @a value, the
9728 requested property is supported but currently not assigned any value.
9729
9730 <result name="VBOX_E_OBJECT_NOT_FOUND">
9731 Requested property does not exist (not supported by the format).
9732 </result>
9733 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9734 </desc>
9735 <param name="name" type="wstring" dir="in">
9736 <desc>Name of the property to get.</desc>
9737 </param>
9738 <param name="value" type="wstring" dir="return">
9739 <desc>Current property value.</desc>
9740 </param>
9741 </method>
9742
9743 <method name="setProperty">
9744 <desc>
9745 Sets the value of the custom medium property with the given name.
9746
9747 The list of all properties supported by the given medium format can
9748 be obtained with <link to="IMediumFormat::describeProperties"/>.
9749
9750 Note that setting the property value to @c null or an empty string is
9751 equivalent to deleting the existing value. A default value (if it is
9752 defined for this property) will be used by the format backend in this
9753 case.
9754
9755 <result name="VBOX_E_OBJECT_NOT_FOUND">
9756 Requested property does not exist (not supported by the format).
9757 </result>
9758 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9759 </desc>
9760 <param name="name" type="wstring" dir="in">
9761 <desc>Name of the property to set.</desc>
9762 </param>
9763 <param name="value" type="wstring" dir="in">
9764 <desc>Property value to set.</desc>
9765 </param>
9766 </method>
9767
9768 <method name="getProperties">
9769 <desc>
9770 Returns values for a group of properties in one call.
9771
9772 The names of the properties to get are specified using the @a names
9773 argument which is a list of comma-separated property names or
9774 an empty string if all properties are to be returned. Note that currently
9775 the value of this argument is ignored and the method always returns all
9776 existing properties.
9777
9778 The list of all properties supported by the given medium format can
9779 be obtained with <link to="IMediumFormat::describeProperties"/>.
9780
9781 The method returns two arrays, the array of property names corresponding
9782 to the @a names argument and the current values of these properties.
9783 Both arrays have the same number of elements with each elemend at the
9784 given index in the first array corresponds to an element at the same
9785 index in the second array.
9786
9787 Note that for properties that do not have assigned values,
9788 an empty string is returned at the appropriate index in the
9789 @a returnValues array.
9790
9791 </desc>
9792 <param name="names" type="wstring" dir="in">
9793 <desc>
9794 Names of properties to get.
9795 </desc>
9796 </param>
9797 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9798 <desc>Names of returned properties.</desc>
9799 </param>
9800 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9801 <desc>Values of returned properties.</desc>
9802 </param>
9803 </method>
9804
9805 <method name="setProperties">
9806 <desc>
9807 Sets values for a group of properties in one call.
9808
9809 The names of the properties to set are passed in the @a names
9810 array along with the new values for them in the @a values array. Both
9811 arrays have the same number of elements with each elemend at the given
9812 index in the first array corresponding to an element at the same index
9813 in the second array.
9814
9815 If there is at least one property name in @a names that is not valid,
9816 the method will fail before changing the values of any other properties
9817 from the @a names array.
9818
9819 Using this method over <link to="#setProperty"/> is preferred if you
9820 need to set several properties at once since it will result into less
9821 IPC calls.
9822
9823 The list of all properties supported by the given medium format can
9824 be obtained with <link to="IMediumFormat::describeProperties"/>.
9825
9826 Note that setting the property value to @c null or an empty string is
9827 equivalent to deleting the existing value. A default value (if it is
9828 defined for this property) will be used by the format backend in this
9829 case.
9830 </desc>
9831 <param name="names" type="wstring" safearray="yes" dir="in">
9832 <desc>Names of properties to set.</desc>
9833 </param>
9834 <param name="values" type="wstring" safearray="yes" dir="in">
9835 <desc>Values of properties to set.</desc>
9836 </param>
9837 </method>
9838
9839 <!-- storage methods -->
9840
9841 <method name="createBaseStorage">
9842 <desc>
9843 Starts creating a hard disk storage unit (fixed/dynamic, according
9844 to the variant flags) in in the background. The previous storage unit
9845 created for this object, if any, must first be deleted using
9846 <link to="#deleteStorage"/>, otherwise the operation will fail.
9847
9848 Before the operation starts, the medium is placed in
9849 <link to="MediumState_Creating"/> state. If the create operation
9850 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
9851 state.
9852
9853 After the returned progress object reports that the operation has
9854 successfully completed, the medium state will be set to <link
9855 to="MediumState_Created"/>, the medium will be remembered by this
9856 VirtualBox installation and may be attached to virtual machines.
9857
9858 <result name="VBOX_E_NOT_SUPPORTED">
9859 The variant of storage creation operation is not supported. See <link
9860 to="IMediumFormat::capabilities"/>.
9861 </result>
9862 </desc>
9863 <param name="logicalSize" type="unsigned long long" dir="in">
9864 <desc>Maximum logical size of the medium in megabytes.</desc>
9865 </param>
9866 <param name="variant" type="MediumVariant" dir="in">
9867 <desc>Exact image variant which should be created.</desc>
9868 </param>
9869 <param name="progress" type="IProgress" dir="return">
9870 <desc>Progress object to track the operation completion.</desc>
9871 </param>
9872 </method>
9873
9874 <method name="deleteStorage">
9875 <desc>
9876 Starts deleting the storage unit of this medium.
9877
9878 The medium must not be attached to any known virtual machine and must
9879 not have any known child media, otherwise the operation will fail.
9880 It will also fail if there is no storage unit to delete or if deletion
9881 is already in progress, or if the medium is being in use (locked for
9882 read or for write) or inaccessible. Therefore, the only valid state for
9883 this operation to succeed is <link to="MediumState_Created"/>.
9884
9885 Before the operation starts, the medium is placed in
9886 <link to="MediumState_Deleting"/> state and gets removed from the list
9887 of remembered hard disks (media registry). If the delete operation
9888 fails, the medium will be remembered again and placed back to
9889 <link to="MediumState_Created"/> state.
9890
9891 After the returned progress object reports that the operation is
9892 complete, the medium state will be set to
9893 <link to="MediumState_NotCreated"/> and you will be able to use one of
9894 the storage creation methods to create it again.
9895
9896 <see>#close()</see>
9897
9898 <result name="VBOX_E_OBJECT_IN_USE">
9899 Medium is attached to a virtual machine.
9900 </result>
9901 <result name="VBOX_E_NOT_SUPPORTED">
9902 Storage deletion is not allowed because neither of storage creation
9903 operations are supported. See
9904 <link to="IMediumFormat::capabilities"/>.
9905 </result>
9906
9907 <note>
9908 If the deletion operation fails, it is not guaranteed that the storage
9909 unit still exists. You may check the <link to="IMedium::state"/> value
9910 to answer this question.
9911 </note>
9912 </desc>
9913 <param name="progress" type="IProgress" dir="return">
9914 <desc>Progress object to track the operation completion.</desc>
9915 </param>
9916 </method>
9917
9918 <!-- diff methods -->
9919
9920 <method name="createDiffStorage">
9921 <desc>
9922 Starts creating an empty differencing storage unit based on this
9923 medium in the format and at the location defined by the @a target
9924 argument.
9925
9926 The target medium must be in <link to="MediumState_NotCreated"/>
9927 state (i.e. must not have an existing storage unit). Upon successful
9928 completion, this operation will set the type of the target medium to
9929 <link to="MediumType_Normal"/> and create a storage unit necessary to
9930 represent the differencing medium data in the given format (according
9931 to the storage format of the target object).
9932
9933 After the returned progress object reports that the operation is
9934 successfully complete, the target medium gets remembered by this
9935 VirtualBox installation and may be attached to virtual machines.
9936
9937 <note>
9938 The medium will be set to <link to="MediumState_LockedRead"/>
9939 state for the duration of this operation.
9940 </note>
9941 <result name="VBOX_E_OBJECT_IN_USE">
9942 Medium not in @c NotCreated state.
9943 </result>
9944 </desc>
9945 <param name="target" type="IMedium" dir="in">
9946 <desc>Target medium.</desc>
9947 </param>
9948 <param name="variant" type="MediumVariant" dir="in">
9949 <desc>Exact image variant which should be created.</desc>
9950 </param>
9951 <param name="progress" type="IProgress" dir="return">
9952 <desc>Progress object to track the operation completion.</desc>
9953 </param>
9954 </method>
9955
9956 <method name="mergeTo">
9957 <desc>
9958 Starts merging the contents of this medium and all intermediate
9959 differencing media in the chain to the given target medium.
9960
9961 The target medium must be either a descendant of this medium or
9962 its ancestor (otherwise this method will immediately return a failure).
9963 It follows that there are two logical directions of the merge operation:
9964 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9965 ancestor (<i>backward merge</i>). Let us consider the following medium
9966 chain:
9967
9968 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9969
9970 Here, calling this method on the <tt>Base</tt> medium object with
9971 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9972 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9973 merge. Note that in both cases the contents of the resulting medium
9974 will be the same, the only difference is the medium object that takes
9975 the result of the merge operation. In case of the forward merge in the
9976 above example, the result will be written to <tt>Diff_2</tt>; in case of
9977 the backward merge, the result will be written to <tt>Base</tt>. In
9978 other words, the result of the operation is always stored in the target
9979 medium.
9980
9981 Upon successful operation completion, the storage units of all media in
9982 the chain between this (source) medium and the target medium, including
9983 the source medium itself, will be automatically deleted and the
9984 relevant medium objects (including this medium) will become
9985 uninitialized. This means that any attempt to call any of
9986 their methods or attributes will fail with the
9987 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9988 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9989 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> media.
9990 Note that <tt>Diff_2</tt> in this case will become a base medium
9991 itself since it will no longer be based on any other medium.
9992
9993 Considering the above, all of the following conditions must be met in
9994 order for the merge operation to succeed:
9995 <ul>
9996 <li>
9997 Neither this (source) medium nor any intermediate
9998 differencing medium in the chain between it and the target
9999 medium is attached to any virtual machine.
10000 </li>
10001 <li>
10002 Neither the source medium nor the target medium is an
10003 <link to="MediumType_Immutable"/> medium.
10004 </li>
10005 <li>
10006 The part of the medium tree from the source medium to the
10007 target medium is a linear chain, i.e. all medium in this
10008 chain have exactly one child which is the next medium in this
10009 chain. The only exception from this rule is the target medium in
10010 the forward merge operation; it is allowed to have any number of
10011 child media because the merge operation will not change its
10012 logical contents (as it is seen by the guest OS or by children).
10013 </li>
10014 <li>
10015 None of the involved media are in
10016 <link to="MediumState_LockedRead"/> or
10017 <link to="MediumState_LockedWrite"/> state.
10018 </li>
10019 </ul>
10020
10021 <note>
10022 This (source) medium and all intermediates will be placed to <link
10023 to="MediumState_Deleting"/> state and the target medium will be
10024 placed to <link to="MediumState_LockedWrite"/> state and for the
10025 duration of this operation.
10026 </note>
10027 </desc>
10028 <param name="targetId" type="uuid" mod="string" dir="in">
10029 <desc>UUID of the target ancestor or descendant medium.</desc>
10030 </param>
10031 <param name="progress" type="IProgress" dir="return">
10032 <desc>Progress object to track the operation completion.</desc>
10033 </param>
10034 </method>
10035
10036 <!-- clone method -->
10037
10038 <method name="cloneTo">
10039 <desc>
10040 Starts creating a clone of this medium in the format and at the
10041 location defined by the @a target argument.
10042
10043 The target medium must be either in <link to="MediumState_NotCreated"/>
10044 state (i.e. must not have an existing storage unit) or in
10045 <link to="MediumState_Created"/> state (i.e. created and not locked, and
10046 big enough to hold the data or else the copy will be partial). Upon
10047 successful completion, the cloned medium will contain exactly the
10048 same sector data as the medium being cloned, except that in the
10049 first case a new UUID for the clone will be randomly generated, and in
10050 the second case the UUID will remain unchanged.
10051
10052 The @a parent argument defines which medium will be the parent
10053 of the clone. Passing a @c null reference indicates that the clone will
10054 be a base image, i.e. completely independent. It is possible to specify
10055 an arbitrary medium for this parameter, including the parent of the
10056 medium which is being cloned. Even cloning to a child of the source
10057 medium is possible. Note that when cloning to an existing image, the
10058 @a parent irgument is ignored.
10059
10060 After the returned progress object reports that the operation is
10061 successfully complete, the target medium gets remembered by this
10062 VirtualBox installation and may be attached to virtual machines.
10063
10064 <note>
10065 This medium will be placed to <link to="MediumState_LockedRead"/>
10066 state for the duration of this operation.
10067 </note>
10068 <result name="E_NOTIMPL">
10069 The specified cloning variant is not supported at the moment.
10070 </result>
10071 </desc>
10072 <param name="target" type="IMedium" dir="in">
10073 <desc>Target medium.</desc>
10074 </param>
10075 <param name="variant" type="MediumVariant" dir="in">
10076 <desc>Exact image variant which should be created.</desc>
10077 </param>
10078 <param name="parent" type="IMedium" dir="in">
10079 <desc>Parent of the cloned medium.</desc>
10080 </param>
10081 <param name="progress" type="IProgress" dir="return">
10082 <desc>Progress object to track the operation completion.</desc>
10083 </param>
10084 </method>
10085
10086 <!-- other methods -->
10087
10088 <method name="compact">
10089 <desc>
10090 Starts compacting of this medium. This means that the medium is
10091 transformed into a possibly more compact storage representation.
10092 This potentially creates temporary images, which can require a
10093 substantial amount of additional disk space.
10094
10095 This medium will be placed to <link to="MediumState_LockedWrite"/>
10096 state and all its parent media (if any) will be placed to
10097 <link to="MediumState_LockedRead"/> state for the duration of this
10098 operation.
10099
10100 Please note that the results can be either returned straight away,
10101 or later as the result of the background operation via the object
10102 returned via the @a progress parameter.
10103
10104 <result name="VBOX_E_NOT_SUPPORTED">
10105 Medium format does not support compacting (but potentially
10106 needs it).
10107 </result>
10108 </desc>
10109 <param name="progress" type="IProgress" dir="return">
10110 <desc>Progress object to track the operation completion.</desc>
10111 </param>
10112 </method>
10113
10114 <method name="resize">
10115 <desc>
10116 Starts resizing this medium. This means that the nominal size of the
10117 medium is set to the new value. Both increasing and decreasing the
10118 size is possible, and there are no safety checks, since VirtualBox
10119 does not make any assumptions about the medium contents.
10120
10121 Resizing usually needs additional disk space, and possibly also
10122 some temporary disk space. Note that resize does not create a full
10123 temporary copy of the medium, so the additional disk space requirement
10124 is usually much lower than using the clone operation.
10125
10126 This medium will be placed to <link to="MediumState_LockedWrite"/>
10127 state for the duration of this operation.
10128
10129 Please note that the results can be either returned straight away,
10130 or later as the result of the background operation via the object
10131 returned via the @a progress parameter.
10132
10133 <result name="VBOX_E_NOT_SUPPORTED">
10134 Medium format does not support resizing.
10135 </result>
10136 </desc>
10137 <param name="logicalSize" type="unsigned long long" dir="in">
10138 <desc>New nominal capacity of the medium in megabytes.</desc>
10139 </param>
10140 <param name="progress" type="IProgress" dir="return">
10141 <desc>Progress object to track the operation completion.</desc>
10142 </param>
10143 </method>
10144
10145 <method name="reset">
10146 <desc>
10147 Starts erasing the contents of this differencing medium.
10148
10149 This operation will reset the differencing medium to its initial
10150 state when it does not contain any sector data and any read operation is
10151 redirected to its parent medium.
10152
10153 This medium will be placed to <link to="MediumState_LockedWrite"/>
10154 for the duration of this operation.
10155
10156 <result name="VBOX_E_NOT_SUPPORTED">
10157 This is not a differencing medium.
10158 </result>
10159 <result name="VBOX_E_INVALID_OBJECT_STATE">
10160 Medium is not in <link to="MediumState_Created"/> or
10161 <link to="MediumState_Inaccessible"/> state.
10162 </result>
10163 </desc>
10164 <param name="progress" type="IProgress" dir="return">
10165 <desc>Progress object to track the operation completion.</desc>
10166 </param>
10167 </method>
10168
10169 </interface>
10170
10171
10172 <!--
10173 // IMediumFormat
10174 /////////////////////////////////////////////////////////////////////////
10175 -->
10176
10177 <enum
10178 name="DataType"
10179 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
10180 >
10181 <const name="Int32" value="0"/>
10182 <const name="Int8" value="1"/>
10183 <const name="String" value="2"/>
10184 </enum>
10185
10186 <enum
10187 name="DataFlags"
10188 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
10189 >
10190 <const name="None" value="0x00"/>
10191 <const name="Mandatory" value="0x01"/>
10192 <const name="Expert" value="0x02"/>
10193 <const name="Array" value="0x04"/>
10194 <const name="FlagMask" value="0x07"/>
10195 </enum>
10196
10197 <enum
10198 name="MediumFormatCapabilities"
10199 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
10200 >
10201 <desc>
10202 Medium format capability flags.
10203 </desc>
10204
10205 <const name="Uuid" value="0x01">
10206 <desc>
10207 Supports UUIDs as expected by VirtualBox code.
10208 </desc>
10209 </const>
10210
10211 <const name="CreateFixed" value="0x02">
10212 <desc>
10213 Supports creating fixed size images, allocating all space instantly.
10214 </desc>
10215 </const>
10216
10217 <const name="CreateDynamic" value="0x04">
10218 <desc>
10219 Supports creating dynamically growing images, allocating space on
10220 demand.
10221 </desc>
10222 </const>
10223
10224 <const name="CreateSplit2G" value="0x08">
10225 <desc>
10226 Supports creating images split in chunks of a bit less than 2 GBytes.
10227 </desc>
10228 </const>
10229
10230 <const name="Differencing" value="0x10">
10231 <desc>
10232 Supports being used as a format for differencing media (see <link
10233 to="IMedium::createDiffStorage"/>).
10234 </desc>
10235 </const>
10236
10237 <const name="Asynchronous" value="0x20">
10238 <desc>
10239 Supports asynchronous I/O operations for at least some configurations.
10240 </desc>
10241 </const>
10242
10243 <const name="File" value="0x40">
10244 <desc>
10245 The format backend operates on files (the <link to="IMedium::location"/>
10246 attribute of the medium specifies a file used to store medium
10247 data; for a list of supported file extensions see
10248 <link to="IMediumFormat::fileExtensions"/>).
10249 </desc>
10250 </const>
10251
10252 <const name="Properties" value="0x80">
10253 <desc>
10254 The format backend uses the property interface to configure the storage
10255 location and properties (the <link to="IMediumFormat::describeProperties"/>
10256 method is used to get access to properties supported by the given medium format).
10257 </desc>
10258 </const>
10259
10260 <const name="CapabilityMask" value="0xFF"/>
10261 </enum>
10262
10263 <interface
10264 name="IMediumFormat" extends="$unknown"
10265 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
10266 wsmap="managed"
10267 >
10268 <desc>
10269 The IMediumFormat interface represents a medium format.
10270
10271 Each medium format has an associated backend which is used to handle
10272 media stored in this format. This interface provides information
10273 about the properties of the associated backend.
10274
10275 Each medium format is identified by a string represented by the
10276 <link to="#id"/> attribute. This string is used in calls like
10277 <link to="IVirtualBox::createHardDisk"/> to specify the desired
10278 format.
10279
10280 The list of all supported medium formats can be obtained using
10281 <link to="ISystemProperties::mediaFormats"/>.
10282
10283 <see>IMedium</see>
10284 </desc>
10285
10286 <attribute name="id" type="wstring" readonly="yes">
10287 <desc>
10288 Identifier of this format.
10289
10290 The format identifier is a non-@c null non-empty ASCII string. Note that
10291 this string is case-insensitive. This means that, for example, all of
10292 the following strings:
10293 <pre>
10294 "VDI"
10295 "vdi"
10296 "VdI"</pre>
10297 refer to the same medium format.
10298
10299 This string is used in methods of other interfaces where it is necessary
10300 to specify a medium format, such as
10301 <link to="IVirtualBox::createHardDisk"/>.
10302 </desc>
10303 </attribute>
10304
10305 <attribute name="name" type="wstring" readonly="yes">
10306 <desc>
10307 Human readable description of this format.
10308
10309 Mainly for use in file open dialogs.
10310 </desc>
10311 </attribute>
10312
10313 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
10314 <desc>
10315 Array of strings containing the supported file extensions.
10316
10317 The first extension in the array is the extension preferred by the
10318 backend. It is recommended to use this extension when specifying a
10319 location of the storage unit for a new medium.
10320
10321 Note that some backends do not work on files, so this array may be
10322 empty.
10323
10324 <see>IMediumFormat::capabilities</see>
10325 </desc>
10326 </attribute>
10327
10328 <attribute name="capabilities" type="unsigned long" readonly="yes">
10329 <desc>
10330 Capabilities of the format as a set of bit flags.
10331
10332 For the meaning of individual capability flags see
10333 <link to="MediumFormatCapabilities"/>.
10334 </desc>
10335 </attribute>
10336
10337 <method name="describeProperties">
10338 <desc>
10339 Returns several arrays describing the properties supported by this
10340 format.
10341
10342 An element with the given index in each array describes one
10343 property. Thus, the number of elements in each returned array is the
10344 same and corresponds to the number of supported properties.
10345
10346 The returned arrays are filled in only if the
10347 <link to="MediumFormatCapabilities_Properties"/> flag is set.
10348 All arguments must be non-@c null.
10349
10350 <see>DataType</see>
10351 <see>DataFlags</see>
10352 </desc>
10353
10354 <param name="names" type="wstring" safearray="yes" dir="out">
10355 <desc>Array of property names.</desc>
10356 </param>
10357 <param name="description" type="wstring" safearray="yes" dir="out">
10358 <desc>Array of property descriptions.</desc>
10359 </param>
10360 <param name="types" type="DataType" safearray="yes" dir="out">
10361 <desc>Array of property types.</desc>
10362 </param>
10363 <param name="flags" type="unsigned long" safearray="yes" dir="out">
10364 <desc>Array of property flags.</desc>
10365 </param>
10366 <param name="defaults" type="wstring" safearray="yes" dir="out">
10367 <desc>Array of default property values.</desc>
10368 </param>
10369 </method>
10370
10371 </interface>
10372
10373
10374 <!--
10375 // IKeyboard
10376 /////////////////////////////////////////////////////////////////////////
10377 -->
10378
10379 <interface
10380 name="IKeyboard" extends="$unknown"
10381 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10382 wsmap="managed"
10383 >
10384 <desc>
10385 The IKeyboard interface represents the virtual machine's keyboard. Used
10386 in <link to="IConsole::keyboard"/>.
10387
10388 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10389 to the virtual machine.
10390
10391 </desc>
10392 <method name="putScancode">
10393 <desc>Sends a scancode to the keyboard.
10394
10395 <result name="VBOX_E_IPRT_ERROR">
10396 Could not send scan code to virtual keyboard.
10397 </result>
10398
10399 </desc>
10400 <param name="scancode" type="long" dir="in"/>
10401 </method>
10402
10403 <method name="putScancodes">
10404 <desc>Sends an array of scancodes to the keyboard.
10405
10406 <result name="VBOX_E_IPRT_ERROR">
10407 Could not send all scan codes to virtual keyboard.
10408 </result>
10409
10410 </desc>
10411 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10412 <param name="codesStored" type="unsigned long" dir="return"/>
10413 </method>
10414
10415 <method name="putCAD">
10416 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10417 function is nothing special, it is just a convenience function
10418 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10419
10420 <result name="VBOX_E_IPRT_ERROR">
10421 Could not send all scan codes to virtual keyboard.
10422 </result>
10423
10424 </desc>
10425 </method>
10426
10427 </interface>
10428
10429
10430 <!--
10431 // IMouse
10432 /////////////////////////////////////////////////////////////////////////
10433 -->
10434
10435 <enum
10436 name="MouseButtonState"
10437 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10438 >
10439 <desc>
10440 Mouse button state.
10441 </desc>
10442
10443 <const name="LeftButton" value="0x01"/>
10444 <const name="RightButton" value="0x02"/>
10445 <const name="MiddleButton" value="0x04"/>
10446 <const name="WheelUp" value="0x08"/>
10447 <const name="WheelDown" value="0x10"/>
10448 <const name="XButton1" value="0x20"/>
10449 <const name="XButton2" value="0x40"/>
10450 <const name="MouseStateMask" value="0x7F"/>
10451 </enum>
10452
10453 <interface
10454 name="IMouse" extends="$unknown"
10455 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
10456 wsmap="managed"
10457 >
10458 <desc>
10459 The IMouse interface represents the virtual machine's mouse. Used in
10460 <link to="IConsole::mouse"/>.
10461
10462 Through this interface, the virtual machine's virtual mouse can be
10463 controlled.
10464 </desc>
10465
10466 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10467 <desc>
10468 Whether the guest OS supports absolute mouse pointer positioning
10469 or not.
10470 <note>
10471 VirtualBox Guest Tools need to be installed to the guest OS
10472 in order to enable absolute mouse positioning support.
10473 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10474 callback to be instantly informed about changes of this attribute
10475 during virtual machine execution.
10476 </note>
10477 <see><link to="#putMouseEventAbsolute"/></see>
10478 </desc>
10479 </attribute>
10480
10481 <method name="putMouseEvent">
10482 <desc>
10483 Initiates a mouse event using relative pointer movements
10484 along x and y axis.
10485
10486 <result name="E_ACCESSDENIED">
10487 Console not powered up.
10488 </result>
10489 <result name="VBOX_E_IPRT_ERROR">
10490 Could not send mouse event to virtual mouse.
10491 </result>
10492
10493 </desc>
10494
10495 <param name="dx" type="long" dir="in">
10496 <desc>
10497 Amount of pixels the mouse should move to the right.
10498 Negative values move the mouse to the left.
10499 </desc>
10500 </param>
10501 <param name="dy" type="long" dir="in">
10502 <desc>
10503 Amount of pixels the mouse should move downwards.
10504 Negative values move the mouse upwards.
10505 </desc>
10506 </param>
10507 <param name="dz" type="long" dir="in">
10508 <desc>
10509 Amount of mouse wheel moves.
10510 Positive values describe clockwise wheel rotations,
10511 negative values describe counterclockwise rotations.
10512 </desc>
10513 </param>
10514 <param name="dw" type="long" dir="in">
10515 <desc>
10516 Amount of horizontal mouse wheel moves.
10517 Positive values describe a movement to the left,
10518 negative values describe a movement to the right.
10519 </desc>
10520 </param>
10521 <param name="buttonState" type="long" dir="in">
10522 <desc>
10523 The current state of mouse buttons. Every bit represents
10524 a mouse button as follows:
10525 <table>
10526 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10527 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10528 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10529 </table>
10530 A value of <tt>1</tt> means the corresponding button is pressed.
10531 otherwise it is released.
10532 </desc>
10533 </param>
10534 </method>
10535
10536 <method name="putMouseEventAbsolute">
10537 <desc>
10538 Positions the mouse pointer using absolute x and y coordinates.
10539 These coordinates are expressed in pixels and
10540 start from <tt>[1,1]</tt> which corresponds to the top left
10541 corner of the virtual display.
10542
10543 <result name="E_ACCESSDENIED">
10544 Console not powered up.
10545 </result>
10546 <result name="VBOX_E_IPRT_ERROR">
10547 Could not send mouse event to virtual mouse.
10548 </result>
10549
10550 <note>
10551 This method will have effect only if absolute mouse
10552 positioning is supported by the guest OS.
10553 </note>
10554
10555 <see><link to="#absoluteSupported"/></see>
10556 </desc>
10557
10558 <param name="x" type="long" dir="in">
10559 <desc>
10560 X coordinate of the pointer in pixels, starting from @c 1.
10561 </desc>
10562 </param>
10563 <param name="y" type="long" dir="in">
10564 <desc>
10565 Y coordinate of the pointer in pixels, starting from @c 1.
10566 </desc>
10567 </param>
10568 <param name="dz" type="long" dir="in">
10569 <desc>
10570 Amount of mouse wheel moves.
10571 Positive values describe clockwise wheel rotations,
10572 negative values describe counterclockwise rotations.
10573 </desc>
10574 </param>
10575 <param name="dw" type="long" dir="in">
10576 <desc>
10577 Amount of horizontal mouse wheel moves.
10578 Positive values describe a movement to the left,
10579 negative values describe a movement to the right.
10580 </desc>
10581 </param>
10582 <param name="buttonState" type="long" dir="in">
10583 <desc>
10584 The current state of mouse buttons. Every bit represents
10585 a mouse button as follows:
10586 <table>
10587 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10588 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10589 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10590 </table>
10591 A value of @c 1 means the corresponding button is pressed.
10592 otherwise it is released.
10593 </desc>
10594 </param>
10595 </method>
10596
10597 </interface>
10598
10599 <!--
10600 // IDisplay
10601 /////////////////////////////////////////////////////////////////////////
10602 -->
10603
10604 <enum
10605 name="FramebufferPixelFormat"
10606 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10607 >
10608 <desc>
10609 Format of the video memory buffer. Constants represented by this enum can
10610 be used to test for particular values of <link
10611 to="IFramebuffer::pixelFormat"/>. See also <link
10612 to="IFramebuffer::requestResize"/>.
10613
10614 See also www.fourcc.org for more information about FOURCC pixel formats.
10615 </desc>
10616
10617 <const name="Opaque" value="0">
10618 <desc>
10619 Unknown buffer format (the user may not assume any particular format of
10620 the buffer).
10621 </desc>
10622 </const>
10623 <const name="FOURCC_RGB" value="0x32424752">
10624 <desc>
10625 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10626 bit layout).
10627 </desc>
10628 </const>
10629 </enum>
10630
10631 <interface
10632 name="IFramebuffer" extends="$unknown"
10633 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10634 wsmap="suppress"
10635 >
10636 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10637 <desc>Address of the start byte of the frame buffer.</desc>
10638 </attribute>
10639
10640 <attribute name="width" type="unsigned long" readonly="yes">
10641 <desc>Frame buffer width, in pixels.</desc>
10642 </attribute>
10643
10644 <attribute name="height" type="unsigned long" readonly="yes">
10645 <desc>Frame buffer height, in pixels.</desc>
10646 </attribute>
10647
10648 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10649 <desc>
10650 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10651 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10652 are: 8, 15, 16, 24 and 32.
10653 </desc>
10654 </attribute>
10655
10656 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10657 <desc>
10658 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10659 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10660 size of the scan line must be aligned to 32 bits.
10661 </desc>
10662 </attribute>
10663
10664 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10665 <desc>
10666 Frame buffer pixel format. It's either one of the values defined by <link
10667 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10668 <note>
10669 This attribute must never return <link
10670 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10671 <link to="#address"/> points to must be always known.
10672 </note>
10673 </desc>
10674 </attribute>
10675
10676 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10677 <desc>
10678 Defines whether this frame buffer uses the virtual video card's memory
10679 buffer (guest VRAM) directly or not. See <link
10680 to="IFramebuffer::requestResize"/> for more information.
10681 </desc>
10682 </attribute>
10683
10684 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10685 <desc>
10686 Hint from the frame buffer about how much of the standard
10687 screen height it wants to use for itself. This information is
10688 exposed to the guest through the VESA BIOS and VMMDev interface
10689 so that it can use it for determining its video mode table. It
10690 is not guaranteed that the guest respects the value.
10691 </desc>
10692 </attribute>
10693
10694 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10695 <desc>
10696 An alpha-blended overlay which is superposed over the frame buffer.
10697 The initial purpose is to allow the display of icons providing
10698 information about the VM state, including disk activity, in front
10699 ends which do not have other means of doing that. The overlay is
10700 designed to controlled exclusively by IDisplay. It has no locking
10701 of its own, and any changes made to it are not guaranteed to be
10702 visible until the affected portion of IFramebuffer is updated. The
10703 overlay can be created lazily the first time it is requested. This
10704 attribute can also return @c null to signal that the overlay is not
10705 implemented.
10706 </desc>
10707 </attribute>
10708
10709 <attribute name="winId" type="unsigned long long" readonly="yes">
10710 <desc>
10711 Platform-dependent identifier of the window where context of this
10712 frame buffer is drawn, or zero if there's no such window.
10713 </desc>
10714 </attribute>
10715
10716 <method name="lock">
10717 <desc>
10718 Locks the frame buffer.
10719 Gets called by the IDisplay object where this frame buffer is
10720 bound to.
10721 </desc>
10722 </method>
10723
10724 <method name="unlock">
10725 <desc>
10726 Unlocks the frame buffer.
10727 Gets called by the IDisplay object where this frame buffer is
10728 bound to.
10729 </desc>
10730 </method>
10731
10732 <method name="notifyUpdate">
10733 <desc>
10734 Informs about an update.
10735 Gets called by the display object where this buffer is
10736 registered.
10737 </desc>
10738 <param name="x" type="unsigned long" dir="in"/>
10739 <param name="y" type="unsigned long" dir="in"/>
10740 <param name="width" type="unsigned long" dir="in"/>
10741 <param name="height" type="unsigned long" dir="in"/>
10742 </method>
10743
10744 <method name="requestResize">
10745 <desc>
10746 Requests a size and pixel format change.
10747
10748 There are two modes of working with the video buffer of the virtual
10749 machine. The <i>indirect</i> mode implies that the IFramebuffer
10750 implementation allocates a memory buffer for the requested display mode
10751 and provides it to the virtual machine. In <i>direct</i> mode, the
10752 IFramebuffer implementation uses the memory buffer allocated and owned
10753 by the virtual machine. This buffer represents the video memory of the
10754 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10755 usually faster because the implementation gets a raw pointer to the
10756 guest VRAM buffer which it can directly use for visualizing the contents
10757 of the virtual display, as opposed to the indirect mode where the
10758 contents of guest VRAM are copied to the memory buffer provided by
10759 the implementation every time a display update occurs.
10760
10761 It is important to note that the direct mode is really fast only when
10762 the implementation uses the given guest VRAM buffer directly, for
10763 example, by blitting it to the window representing the virtual machine's
10764 display, which saves at least one copy operation comparing to the
10765 indirect mode. However, using the guest VRAM buffer directly is not
10766 always possible: the format and the color depth of this buffer may be
10767 not supported by the target window, or it may be unknown (opaque) as in
10768 case of text or non-linear multi-plane VGA video modes. In this case,
10769 the indirect mode (that is always available) should be used as a
10770 fallback: when the guest VRAM contents are copied to the
10771 implementation-provided memory buffer, color and format conversion is
10772 done automatically by the underlying code.
10773
10774 The @a pixelFormat parameter defines whether the direct mode is
10775 available or not. If @a pixelFormat is <link
10776 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10777 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10778 @a bytesPerLine parameters must be ignored and the implementation must use
10779 the indirect mode (where it provides its own buffer in one of the
10780 supported formats). In all other cases, @a pixelFormat together with
10781 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10782 buffer pointed to by the @a VRAM parameter and the implementation is
10783 free to choose which mode to use. To indicate that this frame buffer uses
10784 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10785 attribute must return @c true and <link to="#address"/> must
10786 return exactly the same address that is passed in the @a VRAM parameter
10787 of this method; otherwise it is assumed that the indirect strategy is
10788 chosen.
10789
10790 The @a width and @a height parameters represent the size of the
10791 requested display mode in both modes. In case of indirect mode, the
10792 provided memory buffer should be big enough to store data of the given
10793 display mode. In case of direct mode, it is guaranteed that the given
10794 @a VRAM buffer contains enough space to represent the display mode of the
10795 given size. Note that this frame buffer's <link to="#width"/> and <link
10796 to="#height"/> attributes must return exactly the same values as
10797 passed to this method after the resize is completed (see below).
10798
10799 The @a finished output parameter determines if the implementation has
10800 finished resizing the frame buffer or not. If, for some reason, the
10801 resize cannot be finished immediately during this call, @a finished
10802 must be set to @c false, and the implementation must call
10803 <link to="IDisplay::resizeCompleted"/> after it has returned from
10804 this method as soon as possible. If @a finished is @c false, the
10805 machine will not call any frame buffer methods until
10806 <link to="IDisplay::resizeCompleted"/> is called.
10807
10808 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10809 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10810 this frame buffer must return exactly the same values as specified in the
10811 parameters of this method, after the resize is completed. If the
10812 indirect mode is chosen, these attributes must return values describing
10813 the format of the implementation's own memory buffer <link
10814 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10815 value must always correlate with <link to="#pixelFormat"/>. Note that
10816 the <link to="#pixelFormat"/> attribute must never return <link
10817 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10818
10819 <note>
10820 This method is called by the IDisplay object under the
10821 <link to="#lock"/> provided by this IFramebuffer
10822 implementation. If this method returns @c false in @a finished, then
10823 this lock is not released until
10824 <link to="IDisplay::resizeCompleted"/> is called.
10825 </note>
10826 </desc>
10827 <param name="screenId" type="unsigned long" dir="in">
10828 <desc>
10829 Logical screen number. Must be used in the corresponding call to
10830 <link to="IDisplay::resizeCompleted"/> if this call is made.
10831 </desc>
10832 </param>
10833 <param name="pixelFormat" type="unsigned long" dir="in">
10834 <desc>
10835 Pixel format of the memory buffer pointed to by @a VRAM.
10836 See also <link to="FramebufferPixelFormat"/>.
10837 </desc>
10838 </param>
10839 <param name="VRAM" type="octet" mod="ptr" dir="in">
10840 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10841 </param>
10842 <param name="bitsPerPixel" type="unsigned long" dir="in">
10843 <desc>Color depth, bits per pixel.</desc>
10844 </param>
10845 <param name="bytesPerLine" type="unsigned long" dir="in">
10846 <desc>Size of one scan line, in bytes.</desc>
10847 </param>
10848 <param name="width" type="unsigned long" dir="in">
10849 <desc>Width of the guest display, in pixels.</desc>
10850 </param>
10851 <param name="height" type="unsigned long" dir="in">
10852 <desc>Height of the guest display, in pixels.</desc>
10853 </param>
10854 <param name="finished" type="boolean" dir="return">
10855 <desc>
10856 Can the VM start using the new frame buffer immediately
10857 after this method returns or it should wait for
10858 <link to="IDisplay::resizeCompleted"/>.
10859 </desc>
10860 </param>
10861 </method>
10862
10863 <method name="videoModeSupported">
10864 <desc>
10865 Returns whether the frame buffer implementation is willing to
10866 support a given video mode. In case it is not able to render
10867 the video mode (or for some reason not willing), it should
10868 return @c false. Usually this method is called when the guest
10869 asks the VMM device whether a given video mode is supported
10870 so the information returned is directly exposed to the guest.
10871 It is important that this method returns very quickly.
10872 </desc>
10873 <param name="width" type="unsigned long" dir="in"/>
10874 <param name="height" type="unsigned long" dir="in"/>
10875 <param name="bpp" type="unsigned long" dir="in"/>
10876 <param name="supported" type="boolean" dir="return"/>
10877 </method>
10878
10879 <method name="getVisibleRegion">
10880 <desc>
10881 Returns the visible region of this frame buffer.
10882
10883 If the @a rectangles parameter is @c null then the value of the
10884 @a count parameter is ignored and the number of elements necessary to
10885 describe the current visible region is returned in @a countCopied.
10886
10887 If @a rectangles is not @c null but @a count is less
10888 than the required number of elements to store region data, the method
10889 will report a failure. If @a count is equal or greater than the
10890 required number of elements, then the actual number of elements copied
10891 to the provided array will be returned in @a countCopied.
10892
10893 <note>
10894 The address of the provided array must be in the process space of
10895 this IFramebuffer object.
10896 </note>
10897 <note>
10898 Method not yet implemented.
10899 </note>
10900 </desc>
10901 <param name="rectangles" type="octet" mod="ptr" dir="in">
10902 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10903 </param>
10904 <param name="count" type="unsigned long" dir="in">
10905 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10906 </param>
10907 <param name="countCopied" type="unsigned long" dir="return">
10908 <desc>Number of elements copied to the @a rectangles array.</desc>
10909 </param>
10910 </method>
10911
10912 <method name="setVisibleRegion">
10913 <desc>
10914 Suggests a new visible region to this frame buffer. This region
10915 represents the area of the VM display which is a union of regions of
10916 all top-level windows of the guest operating system running inside the
10917 VM (if the Guest Additions for this system support this
10918 functionality). This information may be used by the frontends to
10919 implement the seamless desktop integration feature.
10920
10921 <note>
10922 The address of the provided array must be in the process space of
10923 this IFramebuffer object.
10924 </note>
10925 <note>
10926 The IFramebuffer implementation must make a copy of the provided
10927 array of rectangles.
10928 </note>
10929 <note>
10930 Method not yet implemented.
10931 </note>
10932 </desc>
10933 <param name="rectangles" type="octet" mod="ptr" dir="in">
10934 <desc>Pointer to the @c RTRECT array.</desc>
10935 </param>
10936 <param name="count" type="unsigned long" dir="in">
10937 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10938 </param>
10939 </method>
10940
10941 <method name="processVHWACommand">
10942 <desc>
10943 Posts a Video HW Acceleration Command to the frame buffer for processing.
10944 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10945 are posted from quest to the host to be processed by the host hardware.
10946
10947 <note>
10948 The address of the provided command must be in the process space of
10949 this IFramebuffer object.
10950 </note>
10951 </desc>
10952
10953 <param name="command" type="octet" mod="ptr" dir="in">
10954 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10955 </param>
10956 </method>
10957
10958 </interface>
10959
10960 <interface
10961 name="IFramebufferOverlay" extends="IFramebuffer"
10962 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10963 wsmap="suppress"
10964 >
10965 <desc>
10966 The IFramebufferOverlay interface represents an alpha blended overlay
10967 for displaying status icons above an IFramebuffer. It is always created
10968 not visible, so that it must be explicitly shown. It only covers a
10969 portion of the IFramebuffer, determined by its width, height and
10970 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10971 that order) format, and may be written to directly. Do re-read the
10972 width though, after setting it, as it may be adjusted (increased) to
10973 make it more suitable for the front end.
10974 </desc>
10975 <attribute name="x" type="unsigned long" readonly="yes">
10976 <desc>X position of the overlay, relative to the frame buffer.</desc>
10977 </attribute>
10978
10979 <attribute name="y" type="unsigned long" readonly="yes">
10980 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10981 </attribute>
10982
10983 <attribute name="visible" type="boolean" readonly="no">
10984 <desc>
10985 Whether the overlay is currently visible.
10986 </desc>
10987 </attribute>
10988
10989 <attribute name="alpha" type="unsigned long" readonly="no">
10990 <desc>
10991 The global alpha value for the overlay. This may or may not be
10992 supported by a given front end.
10993 </desc>
10994 </attribute>
10995
10996 <method name="move">
10997 <desc>
10998 Changes the overlay's position relative to the IFramebuffer.
10999 </desc>
11000 <param name="x" type="unsigned long" dir="in"/>
11001 <param name="y" type="unsigned long" dir="in"/>
11002 </method>
11003
11004 </interface>
11005
11006 <interface
11007 name="IDisplay" extends="$unknown"
11008 uuid="e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000"
11009 wsmap="managed"
11010 >
11011 <desc>
11012 The IDisplay interface represents the virtual machine's display.
11013
11014 The object implementing this interface is contained in each
11015 <link to="IConsole::display"/> attribute and represents the visual
11016 output of the virtual machine.
11017
11018 The virtual display supports pluggable output targets represented by the
11019 IFramebuffer interface. Examples of the output target are a window on
11020 the host computer or an RDP session's display on a remote computer.
11021 </desc>
11022 <attribute name="width" type="unsigned long" readonly="yes">
11023 <desc>Current display width.</desc>
11024 </attribute>
11025
11026 <attribute name="height" type="unsigned long" readonly="yes">
11027 <desc>Current display height.</desc>
11028 </attribute>
11029
11030 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
11031 <desc>
11032 Current guest display color depth. Note that this may differ
11033 from <link to="IFramebuffer::bitsPerPixel"/>.
11034 </desc>
11035 </attribute>
11036
11037 <method name="setFramebuffer">
11038 <desc>
11039 Sets the framebuffer for given screen.
11040 </desc>
11041 <param name="screenId" type="unsigned long" dir="in"/>
11042 <param name="framebuffer" type="IFramebuffer" dir="in"/>
11043 </method>
11044
11045 <method name="getFramebuffer">
11046 <desc>
11047 Queries the framebuffer for given screen.
11048 </desc>
11049 <param name="screenId" type="unsigned long" dir="in"/>
11050 <param name="framebuffer" type="IFramebuffer" dir="out"/>
11051 <param name="xOrigin" type="long" dir="out"/>
11052 <param name="yOrigin" type="long" dir="out"/>
11053 </method>
11054
11055 <method name="setVideoModeHint">
11056 <desc>
11057 Asks VirtualBox to request the given video mode from
11058 the guest. This is just a hint and it cannot be guaranteed
11059 that the requested resolution will be used. Guest Additions
11060 are required for the request to be seen by guests. The caller
11061 should issue the request and wait for a resolution change and
11062 after a timeout retry.
11063
11064 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
11065 parameters means that the corresponding values should be taken from the
11066 current video mode (i.e. left unchanged).
11067
11068 If the guest OS supports multi-monitor configuration then the @a display
11069 parameter specifies the number of the guest display to send the hint to:
11070 @c 0 is the primary display, @c 1 is the first secondary and
11071 so on. If the multi-monitor configuration is not supported, @a display
11072 must be @c 0.
11073
11074 <result name="E_INVALIDARG">
11075 The @a display is not associated with any monitor.
11076 </result>
11077
11078 </desc>
11079 <param name="width" type="unsigned long" dir="in"/>
11080 <param name="height" type="unsigned long" dir="in"/>
11081 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
11082 <param name="display" type="unsigned long" dir="in"/>
11083 </method>
11084
11085 <method name="setSeamlessMode">
11086 <desc>
11087 Enables or disables seamless guest display rendering (seamless desktop
11088 integration) mode.
11089 <note>
11090 Calling this method has no effect if <link
11091 to="IGuest::supportsSeamless"/> returns @c false.
11092 </note>
11093 </desc>
11094 <param name="enabled" type="boolean" dir="in"/>
11095 </method>
11096
11097 <method name="takeScreenShot">
11098 <desc>
11099 Takes a screen shot of the requested size and copies it to the
11100 32-bpp buffer allocated by the caller and pointed to by @a address.
11101 A pixel consists of 4 bytes in order: B, G, R, 0.
11102
11103 <note>This API can be used only by the COM/XPCOM C++ API as it
11104 requires pointer support. Use <link to="#takeScreenShotSlow" />
11105 with other language bindings.
11106 </note>
11107
11108 <result name="E_NOTIMPL">
11109 Feature not implemented.
11110 </result>
11111 <result name="VBOX_E_IPRT_ERROR">
11112 Could not take a screenshot.
11113 </result>
11114
11115 </desc>
11116 <param name="address" type="octet" mod="ptr" dir="in"/>
11117 <param name="width" type="unsigned long" dir="in"/>
11118 <param name="height" type="unsigned long" dir="in"/>
11119 </method>
11120
11121 <method name="takeScreenShotSlow">
11122 <desc>
11123 Takes a guest screen shot of the requested size and returns it as
11124 an array of bytes in uncompressed 32-bit RGBA format.
11125 A pixel consists of 4 bytes in order: R, G, B, 0xFF.
11126
11127 This API is slow, but could be the only option to get guest screenshot
11128 for scriptable languages not allowed to manipulate with addresses
11129 directly.
11130
11131 <result name="E_NOTIMPL">
11132 Feature not implemented.
11133 </result>
11134 <result name="VBOX_E_IPRT_ERROR">
11135 Could not take a screenshot.
11136 </result>
11137 </desc>
11138 <param name="width" type="unsigned long" dir="in">
11139 <desc>
11140 Desired image width.
11141 </desc>
11142 </param>
11143 <param name="height" type="unsigned long" dir="in">
11144 <desc>
11145 Desired image height.
11146 </desc>
11147 </param>
11148 <param name="screenData" type="octet" dir="return" safearray="yes">
11149 <desc>
11150 Array with resulting screen data.
11151 </desc>
11152 </param>
11153 </method>
11154
11155 <method name="drawToScreen">
11156 <desc>
11157 Draws a 32-bpp image of the specified size from the given buffer
11158 to the given point on the VM display.
11159
11160 <result name="E_NOTIMPL">
11161 Feature not implemented.
11162 </result>
11163 <result name="VBOX_E_IPRT_ERROR">
11164 Could not draw to screen.
11165 </result>
11166
11167 </desc>
11168 <param name="address" type="octet" mod="ptr" dir="in"/>
11169 <param name="x" type="unsigned long" dir="in"/>
11170 <param name="y" type="unsigned long" dir="in"/>
11171 <param name="width" type="unsigned long" dir="in"/>
11172 <param name="height" type="unsigned long" dir="in"/>
11173 </method>
11174
11175 <method name="invalidateAndUpdate">
11176 <desc>
11177 Does a full invalidation of the VM display and instructs the VM
11178 to update it.
11179
11180 <result name="VBOX_E_IPRT_ERROR">
11181 Could not invalidate and update screen.
11182 </result>
11183
11184 </desc>
11185 </method>
11186
11187 <method name="resizeCompleted">
11188 <desc>
11189 Signals that a framebuffer has completed the resize operation.
11190
11191 <result name="VBOX_E_NOT_SUPPORTED">
11192 Operation only valid for external frame buffers.
11193 </result>
11194
11195 </desc>
11196 <param name="screenId" type="unsigned long" dir="in"/>
11197 </method>
11198
11199 <method name="updateCompleted">
11200 <desc>
11201 Signals that a framebuffer has completed the update operation.
11202
11203 <result name="VBOX_E_NOT_SUPPORTED">
11204 Operation only valid for external frame buffers.
11205 </result>
11206
11207 </desc>
11208 </method>
11209
11210 <method name="completeVHWACommand">
11211 <desc>
11212 Signals that the Video HW Acceleration command has completed.
11213 </desc>
11214
11215 <param name="command" type="octet" mod="ptr" dir="in">
11216 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
11217 </param>
11218 </method>
11219
11220 </interface>
11221
11222 <!--
11223 // INetworkAdapter
11224 /////////////////////////////////////////////////////////////////////////
11225 -->
11226
11227 <enum
11228 name="NetworkAttachmentType"
11229 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
11230 >
11231 <desc>
11232 Network attachment type.
11233 </desc>
11234
11235 <const name="Null" value="0">
11236 <desc>Null value, also means "not attached".</desc>
11237 </const>
11238 <const name="NAT" value="1"/>
11239 <const name="Bridged" value="2"/>
11240 <const name="Internal" value="3"/>
11241 <const name="HostOnly" value="4"/>
11242 </enum>
11243
11244 <enum
11245 name="NetworkAdapterType"
11246 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
11247 >
11248 <desc>
11249 Network adapter type.
11250 </desc>
11251
11252 <const name="Null" value="0">
11253 <desc>Null value (never used by the API).</desc>
11254 </const>
11255 <const name="Am79C970A" value="1">
11256 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
11257 </const>
11258 <const name="Am79C973" value="2">
11259 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
11260 </const>
11261 <const name="I82540EM" value="3">
11262 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
11263 </const>
11264 <const name="I82543GC" value="4">
11265 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
11266 </const>
11267 <const name="I82545EM" value="5">
11268 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
11269 </const>
11270 <const name="Virtio" value="6">
11271 <desc>Virtio network device.</desc>
11272 </const>
11273 </enum>
11274
11275 <interface
11276 name="INetworkAdapter" extends="$unknown"
11277 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
11278 wsmap="managed"
11279 >
11280 <desc>
11281 Represents a virtual network adapter that is attached to a virtual machine.
11282 Each virtual machine has a fixed number of network adapter slots with one
11283 instance of this attached to each of them. Call
11284 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
11285 is attached to a given slot in a given machine.
11286
11287 Each network adapter can be in one of five attachment modes, which are
11288 represented by the <link to="NetworkAttachmentType" /> enumeration;
11289 see the <link to="#attachmentType" /> attribute.
11290 </desc>
11291
11292 <attribute name="adapterType" type="NetworkAdapterType">
11293 <desc>
11294 Type of the virtual network adapter. Depending on this value,
11295 VirtualBox will provide a different virtual network hardware
11296 to the guest.
11297 </desc>
11298 </attribute>
11299
11300 <attribute name="slot" type="unsigned long" readonly="yes">
11301 <desc>
11302 Slot number this adapter is plugged into. Corresponds to
11303 the value you pass to <link to="IMachine::getNetworkAdapter"/>
11304 to obtain this instance.
11305 </desc>
11306 </attribute>
11307
11308 <attribute name="enabled" type="boolean">
11309 <desc>
11310 Flag whether the network adapter is present in the
11311 guest system. If disabled, the virtual guest hardware will
11312 not contain this network adapter. Can only be changed when
11313 the VM is not running.
11314 </desc>
11315 </attribute>
11316
11317 <attribute name="MACAddress" type="wstring">
11318 <desc>
11319 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
11320 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
11321 </desc>
11322 </attribute>
11323
11324 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
11325
11326 <attribute name="hostInterface" type="wstring">
11327 <desc>
11328 Name of the host network interface the VM is attached to.
11329 </desc>
11330 </attribute>
11331
11332 <attribute name="internalNetwork" type="wstring">
11333 <desc>
11334 Name of the internal network the VM is attached to.
11335 </desc>
11336 </attribute>
11337
11338 <attribute name="NATNetwork" type="wstring">
11339 <desc>
11340 Name of the NAT network the VM is attached to.
11341 </desc>
11342 </attribute>
11343
11344 <attribute name="cableConnected" type="boolean">
11345 <desc>
11346 Flag whether the adapter reports the cable as connected or not.
11347 It can be used to report offline situations to a VM.
11348 </desc>
11349 </attribute>
11350
11351 <attribute name="lineSpeed" type="unsigned long">
11352 <desc>
11353 Line speed reported by custom drivers, in units of 1 kbps.
11354 </desc>
11355 </attribute>
11356
11357 <attribute name="traceEnabled" type="boolean">
11358 <desc>
11359 Flag whether network traffic from/to the network card should be traced.
11360 Can only be toggled when the VM is turned off.
11361 </desc>
11362 </attribute>
11363
11364 <attribute name="traceFile" type="wstring">
11365 <desc>
11366 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11367 will be used.
11368 </desc>
11369 </attribute>
11370
11371 <method name="attachToNAT">
11372 <desc>
11373 Attach the network adapter to the Network Address Translation (NAT) interface.
11374 </desc>
11375 </method>
11376
11377 <method name="attachToBridgedInterface">
11378 <desc>
11379 Attach the network adapter to a bridged host interface.
11380 </desc>
11381 </method>
11382
11383 <method name="attachToInternalNetwork">
11384 <desc>
11385 Attach the network adapter to an internal network.
11386 </desc>
11387 </method>
11388
11389 <method name="attachToHostOnlyInterface">
11390 <desc>
11391 Attach the network adapter to the host-only network.
11392 </desc>
11393 </method>
11394
11395 <method name="detach">
11396 <desc>
11397 Detach the network adapter
11398 </desc>
11399 </method>
11400 </interface>
11401
11402
11403 <!--
11404 // ISerialPort
11405 /////////////////////////////////////////////////////////////////////////
11406 -->
11407
11408 <enum
11409 name="PortMode"
11410 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11411 >
11412 <desc>
11413 The PortMode enumeration represents possible communication modes for
11414 the virtual serial port device.
11415 </desc>
11416
11417 <const name="Disconnected" value="0">
11418 <desc>Virtual device is not attached to any real host device.</desc>
11419 </const>
11420 <const name="HostPipe" value="1">
11421 <desc>Virtual device is attached to a host pipe.</desc>
11422 </const>
11423 <const name="HostDevice" value="2">
11424 <desc>Virtual device is attached to a host device.</desc>
11425 </const>
11426 <const name="RawFile" value="3">
11427 <desc>Virtual device is attached to a raw file.</desc>
11428 </const>
11429 </enum>
11430
11431 <interface
11432 name="ISerialPort" extends="$unknown"
11433 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11434 wsmap="managed"
11435 >
11436
11437 <desc>
11438 The ISerialPort interface represents the virtual serial port device.
11439
11440 The virtual serial port device acts like an ordinary serial port
11441 inside the virtual machine. This device communicates to the real
11442 serial port hardware in one of two modes: host pipe or host device.
11443
11444 In host pipe mode, the #path attribute specifies the path to the pipe on
11445 the host computer that represents a serial port. The #server attribute
11446 determines if this pipe is created by the virtual machine process at
11447 machine startup or it must already exist before starting machine
11448 execution.
11449
11450 In host device mode, the #path attribute specifies the name of the
11451 serial port device on the host computer.
11452
11453 There is also a third communication mode: the disconnected mode. In this
11454 mode, the guest OS running inside the virtual machine will be able to
11455 detect the serial port, but all port write operations will be discarded
11456 and all port read operations will return no data.
11457
11458 <see>IMachine::getSerialPort</see>
11459 </desc>
11460
11461 <attribute name="slot" type="unsigned long" readonly="yes">
11462 <desc>
11463 Slot number this serial port is plugged into. Corresponds to
11464 the value you pass to <link to="IMachine::getSerialPort"/>
11465 to obtain this instance.
11466 </desc>
11467 </attribute>
11468
11469 <attribute name="enabled" type="boolean">
11470 <desc>
11471 Flag whether the serial port is enabled. If disabled,
11472 the serial port will not be reported to the guest OS.
11473 </desc>
11474 </attribute>
11475
11476 <attribute name="IOBase" type="unsigned long">
11477 <desc>Base I/O address of the serial port.</desc>
11478 </attribute>
11479
11480 <attribute name="IRQ" type="unsigned long">
11481 <desc>IRQ number of the serial port.</desc>
11482 </attribute>
11483
11484 <attribute name="hostMode" type="PortMode">
11485 <desc>
11486 How is this port connected to the host.
11487 <note>
11488 Changing this attribute may fail if the conditions for
11489 <link to="#path"/> are not met.
11490 </note>
11491 </desc>
11492 </attribute>
11493
11494 <attribute name="server" type="boolean">
11495 <desc>
11496 Flag whether this serial port acts as a server (creates a new pipe on
11497 the host) or as a client (uses the existing pipe). This attribute is
11498 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11499 </desc>
11500 </attribute>
11501
11502 <attribute name="path" type="wstring">
11503 <desc>
11504 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11505 PortMode_HostPipe, or the host serial device name when
11506 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11507 cases, setting a @c null or empty string as the attribute's value
11508 is an error. Otherwise, the value of this property is ignored.
11509 </desc>
11510 </attribute>
11511
11512 </interface>
11513
11514 <!--
11515 // IParallelPort
11516 /////////////////////////////////////////////////////////////////////////
11517 -->
11518
11519 <interface
11520 name="IParallelPort" extends="$unknown"
11521 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11522 wsmap="managed"
11523 >
11524
11525 <desc>
11526 The IParallelPort interface represents the virtual parallel port device.
11527
11528 The virtual parallel port device acts like an ordinary parallel port
11529 inside the virtual machine. This device communicates to the real
11530 parallel port hardware using the name of the parallel device on the host
11531 computer specified in the #path attribute.
11532
11533 Each virtual parallel port device is assigned a base I/O address and an
11534 IRQ number that will be reported to the guest operating system and used
11535 to operate the given parallel port from within the virtual machine.
11536
11537 <see>IMachine::getParallelPort</see>
11538 </desc>
11539
11540 <attribute name="slot" type="unsigned long" readonly="yes">
11541 <desc>
11542 Slot number this parallel port is plugged into. Corresponds to
11543 the value you pass to <link to="IMachine::getParallelPort"/>
11544 to obtain this instance.
11545 </desc>
11546 </attribute>
11547
11548 <attribute name="enabled" type="boolean">
11549 <desc>
11550 Flag whether the parallel port is enabled. If disabled,
11551 the parallel port will not be reported to the guest OS.
11552 </desc>
11553 </attribute>
11554
11555 <attribute name="IOBase" type="unsigned long">
11556 <desc>Base I/O address of the parallel port.</desc>
11557 </attribute>
11558
11559 <attribute name="IRQ" type="unsigned long">
11560 <desc>IRQ number of the parallel port.</desc>
11561 </attribute>
11562
11563 <attribute name="path" type="wstring">
11564 <desc>
11565 Host parallel device name. If this parallel port is enabled, setting a
11566 @c null or an empty string as this attribute's value will result into
11567 an error.
11568 </desc>
11569 </attribute>
11570
11571 </interface>
11572
11573
11574 <!--
11575 // IMachineDebugger
11576 /////////////////////////////////////////////////////////////////////////
11577 -->
11578
11579 <interface
11580 name="IMachineDebugger" extends="$unknown"
11581 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11582 wsmap="suppress"
11583 >
11584 <method name="resetStats">
11585 <desc>
11586 Reset VM statistics.
11587 </desc>
11588 <param name="pattern" type="wstring" dir="in">
11589 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11590 </param>
11591 </method>
11592
11593 <method name="dumpStats">
11594 <desc>
11595 Dumps VM statistics.
11596 </desc>
11597 <param name="pattern" type="wstring" dir="in">
11598 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11599 </param>
11600 </method>
11601
11602 <method name="getStats">
11603 <desc>
11604 Get the VM statistics in a XMLish format.
11605 </desc>
11606 <param name="pattern" type="wstring" dir="in">
11607 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11608 </param>
11609 <param name="withDescriptions" type="boolean" dir="in">
11610 <desc>Whether to include the descriptions.</desc>
11611 </param>
11612 <param name="stats" type="wstring" dir="out">
11613 <desc>The XML document containing the statistics.</desc>
11614 </param>
11615 </method>
11616
11617 <method name="injectNMI">
11618 <desc>
11619 Inject an NMI into a running VT-x/AMD-V VM.
11620 </desc>
11621 </method>
11622
11623 <attribute name="singlestep" type="boolean">
11624 <desc>Switch for enabling singlestepping.</desc>
11625 </attribute>
11626
11627 <attribute name="recompileUser" type="boolean">
11628 <desc>Switch for forcing code recompilation for user mode code.</desc>
11629 </attribute>
11630
11631 <attribute name="recompileSupervisor" type="boolean">
11632 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11633 </attribute>
11634
11635 <attribute name="PATMEnabled" type="boolean">
11636 <desc>Switch for enabling and disabling the PATM component.</desc>
11637 </attribute>
11638
11639 <attribute name="CSAMEnabled" type="boolean">
11640 <desc>Switch for enabling and disabling the CSAM component.</desc>
11641 </attribute>
11642
11643 <attribute name="logEnabled" type="boolean">
11644 <desc>Switch for enabling and disabling logging.</desc>
11645 </attribute>
11646
11647 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11648 <desc>
11649 Flag indicating whether the VM is currently making use of CPU hardware
11650 virtualization extensions.
11651 </desc>
11652 </attribute>
11653
11654 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11655 <desc>
11656 Flag indicating whether the VM is currently making use of the nested paging
11657 CPU hardware virtualization extension.
11658 </desc>
11659 </attribute>
11660
11661 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11662 <desc>
11663 Flag indicating whether the VM is currently making use of the VPID
11664 VT-x extension.
11665 </desc>
11666 </attribute>
11667
11668 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11669 <desc>
11670 Flag indicating whether the VM is currently making use of the Physical
11671 Address Extension CPU feature.
11672 </desc>
11673 </attribute>
11674
11675 <attribute name="virtualTimeRate" type="unsigned long">
11676 <desc>
11677 The rate at which the virtual time runs expressed as a percentage.
11678 The accepted range is 2% to 20000%.
11679 </desc>
11680 </attribute>
11681
11682 <!-- @todo method for setting log flags, groups and destination! -->
11683
11684 <attribute name="VM" type="unsigned long long" readonly="yes">
11685 <desc>
11686 Gets the VM handle. This is only for internal use while
11687 we carve the details of this interface.
11688 </desc>
11689 </attribute>
11690
11691 </interface>
11692
11693 <!--
11694 // IUSBController
11695 /////////////////////////////////////////////////////////////////////////
11696 -->
11697
11698 <interface
11699 name="IUSBController" extends="$unknown"
11700 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11701 wsmap="managed"
11702 >
11703 <attribute name="enabled" type="boolean">
11704 <desc>
11705 Flag whether the USB controller is present in the
11706 guest system. If disabled, the virtual guest hardware will
11707 not contain any USB controller. Can only be changed when
11708 the VM is powered off.
11709 </desc>
11710 </attribute>
11711
11712 <attribute name="enabledEhci" type="boolean">
11713 <desc>
11714 Flag whether the USB EHCI controller is present in the
11715 guest system. If disabled, the virtual guest hardware will
11716 not contain a USB EHCI controller. Can only be changed when
11717 the VM is powered off.
11718 </desc>
11719 </attribute>
11720
11721 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11722 <desc>
11723 USB standard version which the controller implements.
11724 This is a BCD which means that the major version is in the
11725 high byte and minor version is in the low byte.
11726 </desc>
11727 </attribute>
11728
11729 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11730 <desc>
11731 List of USB device filters associated with the machine.
11732
11733 If the machine is currently running, these filters are activated
11734 every time a new (supported) USB device is attached to the host
11735 computer that was not ignored by global filters
11736 (<link to="IHost::USBDeviceFilters"/>).
11737
11738 These filters are also activated when the machine is powered up.
11739 They are run against a list of all currently available USB
11740 devices (in states
11741 <link to="USBDeviceState_Available"/>,
11742 <link to="USBDeviceState_Busy"/>,
11743 <link to="USBDeviceState_Held"/>) that were not previously
11744 ignored by global filters.
11745
11746 If at least one filter matches the USB device in question, this
11747 device is automatically captured (attached to) the virtual USB
11748 controller of this machine.
11749
11750 <see>IUSBDeviceFilter, ::IUSBController</see>
11751 </desc>
11752 </attribute>
11753
11754 <method name="createDeviceFilter">
11755 <desc>
11756 Creates a new USB device filter. All attributes except
11757 the filter name are set to empty (any match),
11758 <i>active</i> is @c false (the filter is not active).
11759
11760 The created filter can then be added to the list of filters using
11761 <link to="#insertDeviceFilter"/>.
11762
11763 <result name="VBOX_E_INVALID_VM_STATE">
11764 The virtual machine is not mutable.
11765 </result>
11766
11767 <see>#deviceFilters</see>
11768 </desc>
11769 <param name="name" type="wstring" dir="in">
11770 <desc>
11771 Filter name. See <link to="IUSBDeviceFilter::name"/>
11772 for more info.
11773 </desc>
11774 </param>
11775 <param name="filter" type="IUSBDeviceFilter" dir="return">
11776 <desc>Created filter object.</desc>
11777 </param>
11778 </method>
11779
11780 <method name="insertDeviceFilter">
11781 <desc>
11782 Inserts the given USB device to the specified position
11783 in the list of filters.
11784
11785 Positions are numbered starting from <tt>0</tt>. If the specified
11786 position is equal to or greater than the number of elements in
11787 the list, the filter is added to the end of the collection.
11788
11789 <note>
11790 Duplicates are not allowed, so an attempt to insert a
11791 filter that is already in the collection, will return an
11792 error.
11793 </note>
11794
11795 <result name="VBOX_E_INVALID_VM_STATE">
11796 Virtual machine is not mutable.
11797 </result>
11798 <result name="E_INVALIDARG">
11799 USB device filter not created within this VirtualBox instance.
11800 </result>
11801 <result name="VBOX_E_INVALID_OBJECT_STATE">
11802 USB device filter already in list.
11803 </result>
11804
11805 <see>#deviceFilters</see>
11806 </desc>
11807 <param name="position" type="unsigned long" dir="in">
11808 <desc>Position to insert the filter to.</desc>
11809 </param>
11810 <param name="filter" type="IUSBDeviceFilter" dir="in">
11811 <desc>USB device filter to insert.</desc>
11812 </param>
11813 </method>
11814
11815 <method name="removeDeviceFilter">
11816 <desc>
11817 Removes a USB device filter from the specified position in the
11818 list of filters.
11819
11820 Positions are numbered starting from <tt>0</tt>. Specifying a
11821 position equal to or greater than the number of elements in
11822 the list will produce an error.
11823
11824 <see>#deviceFilters</see>
11825
11826 <result name="VBOX_E_INVALID_VM_STATE">
11827 Virtual machine is not mutable.
11828 </result>
11829 <result name="E_INVALIDARG">
11830 USB device filter list empty or invalid @a position.
11831 </result>
11832
11833 </desc>
11834 <param name="position" type="unsigned long" dir="in">
11835 <desc>Position to remove the filter from.</desc>
11836 </param>
11837 <param name="filter" type="IUSBDeviceFilter" dir="return">
11838 <desc>Removed USB device filter.</desc>
11839 </param>
11840 </method>
11841
11842 </interface>
11843
11844
11845 <!--
11846 // IUSBDevice
11847 /////////////////////////////////////////////////////////////////////////
11848 -->
11849
11850 <interface
11851 name="IUSBDevice" extends="$unknown"
11852 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11853 wsmap="managed"
11854 >
11855 <desc>
11856 The IUSBDevice interface represents a virtual USB device attached to the
11857 virtual machine.
11858
11859 A collection of objects implementing this interface is stored in the
11860 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11861 attached to a running virtual machine's USB controller.
11862 </desc>
11863
11864 <attribute name="id" type="uuid" mod="string" readonly="yes">
11865 <desc>
11866 Unique USB device ID. This ID is built from #vendorId,
11867 #productId, #revision and #serialNumber.
11868 </desc>
11869 </attribute>
11870
11871 <attribute name="vendorId" type="unsigned short" readonly="yes">
11872 <desc>Vendor ID.</desc>
11873 </attribute>
11874
11875 <attribute name="productId" type="unsigned short" readonly="yes">
11876 <desc>Product ID.</desc>
11877 </attribute>
11878
11879 <attribute name="revision" type="unsigned short" readonly="yes">
11880 <desc>
11881 Product revision number. This is a packed BCD represented as
11882 unsigned short. The high byte is the integer part and the low
11883 byte is the decimal.
11884 </desc>
11885 </attribute>
11886
11887 <attribute name="manufacturer" type="wstring" readonly="yes">
11888 <desc>Manufacturer string.</desc>
11889 </attribute>
11890
11891 <attribute name="product" type="wstring" readonly="yes">
11892 <desc>Product string.</desc>
11893 </attribute>
11894
11895 <attribute name="serialNumber" type="wstring" readonly="yes">
11896 <desc>Serial number string.</desc>
11897 </attribute>
11898
11899 <attribute name="address" type="wstring" readonly="yes">
11900 <desc>Host specific address of the device.</desc>
11901 </attribute>
11902
11903 <attribute name="port" type="unsigned short" readonly="yes">
11904 <desc>
11905 Host USB port number the device is physically
11906 connected to.
11907 </desc>
11908 </attribute>
11909
11910 <attribute name="version" type="unsigned short" readonly="yes">
11911 <desc>
11912 The major USB version of the device - 1 or 2.
11913 </desc>
11914 </attribute>
11915
11916 <attribute name="portVersion" type="unsigned short" readonly="yes">
11917 <desc>
11918 The major USB version of the host USB port the device is
11919 physically connected to - 1 or 2. For devices not connected to
11920 anything this will have the same value as the version attribute.
11921 </desc>
11922 </attribute>
11923
11924 <attribute name="remote" type="boolean" readonly="yes">
11925 <desc>
11926 Whether the device is physically connected to a remote VRDP
11927 client or to a local host machine.
11928 </desc>
11929 </attribute>
11930
11931 </interface>
11932
11933
11934 <!--
11935 // IUSBDeviceFilter
11936 /////////////////////////////////////////////////////////////////////////
11937 -->
11938
11939 <interface
11940 name="IUSBDeviceFilter" extends="$unknown"
11941 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11942 wsmap="managed"
11943 >
11944 <desc>
11945 The IUSBDeviceFilter interface represents an USB device filter used
11946 to perform actions on a group of USB devices.
11947
11948 This type of filters is used by running virtual machines to
11949 automatically capture selected USB devices once they are physically
11950 attached to the host computer.
11951
11952 A USB device is matched to the given device filter if and only if all
11953 attributes of the device match the corresponding attributes of the
11954 filter (that is, attributes are joined together using the logical AND
11955 operation). On the other hand, all together, filters in the list of
11956 filters carry the semantics of the logical OR operation. So if it is
11957 desirable to create a match like "this vendor id OR this product id",
11958 one needs to create two filters and specify "any match" (see below)
11959 for unused attributes.
11960
11961 All filter attributes used for matching are strings. Each string
11962 is an expression representing a set of values of the corresponding
11963 device attribute, that will match the given filter. Currently, the
11964 following filtering expressions are supported:
11965
11966 <ul>
11967 <li><i>Interval filters</i>. Used to specify valid intervals for
11968 integer device attributes (Vendor ID, Product ID and Revision).
11969 The format of the string is:
11970
11971 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11972
11973 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11974 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11975 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11976 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11977 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11978 possible integer is assumed.
11979 </li>
11980 <li><i>Boolean filters</i>. Used to specify acceptable values for
11981 boolean device attributes. The format of the string is:
11982
11983 <tt>true|false|yes|no|0|1</tt>
11984
11985 </li>
11986 <li><i>Exact match</i>. Used to specify a single value for the given
11987 device attribute. Any string that doesn't start with <tt>int:</tt>
11988 represents the exact match. String device attributes are compared to
11989 this string including case of symbols. Integer attributes are first
11990 converted to a string (see individual filter attributes) and then
11991 compared ignoring case.
11992
11993 </li>
11994 <li><i>Any match</i>. Any value of the corresponding device attribute
11995 will match the given filter. An empty or @c null string is
11996 used to construct this type of filtering expressions.
11997
11998 </li>
11999 </ul>
12000
12001 <note>
12002 On the Windows host platform, interval filters are not currently
12003 available. Also all string filter attributes
12004 (<link to="#manufacturer"/>, <link to="#product"/>,
12005 <link to="#serialNumber"/>) are ignored, so they behave as
12006 <i>any match</i> no matter what string expression is specified.
12007 </note>
12008
12009 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
12010 </desc>
12011
12012 <attribute name="name" type="wstring">
12013 <desc>
12014 Visible name for this filter.
12015 This name is used to visually distinguish one filter from another,
12016 so it can neither be @c null nor an empty string.
12017 </desc>
12018 </attribute>
12019
12020 <attribute name="active" type="boolean">
12021 <desc>Whether this filter active or has been temporarily disabled.</desc>
12022 </attribute>
12023
12024 <attribute name="vendorId" type="wstring">
12025 <desc>
12026 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
12027 The string representation for the <i>exact matching</i>
12028 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
12029 (including leading zeroes).
12030 </desc>
12031 </attribute>
12032
12033 <attribute name="productId" type="wstring">
12034 <desc>
12035 <link to="IUSBDevice::productId">Product ID</link> filter.
12036 The string representation for the <i>exact matching</i>
12037 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
12038 (including leading zeroes).
12039 </desc>
12040 </attribute>
12041
12042 <attribute name="revision" type="wstring">
12043 <desc>
12044 <link to="IUSBDevice::productId">Product revision number</link>
12045 filter. The string representation for the <i>exact matching</i>
12046 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
12047 of the integer part of the revision, and <tt>F</tt> is the
12048 decimal digit of its fractional part (including leading and
12049 trailing zeros).
12050 Note that for interval filters, it's best to use the hexadecimal
12051 form, because the revision is stored as a 16 bit packed BCD value;
12052 so the expression <tt>int:0x0100-0x0199</tt> will match any
12053 revision from <tt>1.0</tt> to <tt>1.99</tt>.
12054 </desc>
12055 </attribute>
12056
12057 <attribute name="manufacturer" type="wstring">
12058 <desc>
12059 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
12060 </desc>
12061 </attribute>
12062
12063 <attribute name="product" type="wstring">
12064 <desc>
12065 <link to="IUSBDevice::product">Product</link> filter.
12066 </desc>
12067 </attribute>
12068
12069 <attribute name="serialNumber" type="wstring">
12070 <desc>
12071 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
12072 </desc>
12073 </attribute>
12074
12075 <attribute name="port" type="wstring">
12076 <desc>
12077 <link to="IUSBDevice::port">Host USB port</link> filter.
12078 </desc>
12079 </attribute>
12080
12081 <attribute name="remote" type="wstring">
12082 <desc>
12083 <link to="IUSBDevice::remote">Remote state</link> filter.
12084 <note>
12085 This filter makes sense only for machine USB filters,
12086 i.e. it is ignored by IHostUSBDeviceFilter objects.
12087 </note>
12088 </desc>
12089 </attribute>
12090
12091 <attribute name="maskedInterfaces" type="unsigned long">
12092 <desc>
12093 This is an advanced option for hiding one or more USB interfaces
12094 from the guest. The value is a bit mask where the bits that are set
12095 means the corresponding USB interface should be hidden, masked off
12096 if you like.
12097 This feature only works on Linux hosts.
12098 </desc>
12099 </attribute>
12100
12101 </interface>
12102
12103
12104 <!--
12105 // IHostUSBDevice
12106 /////////////////////////////////////////////////////////////////////////
12107 -->
12108
12109 <enum
12110 name="USBDeviceState"
12111 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
12112 >
12113 <desc>
12114 USB device state. This enumeration represents all possible states
12115 of the USB device physically attached to the host computer regarding
12116 its state on the host computer and availability to guest computers
12117 (all currently running virtual machines).
12118
12119 Once a supported USB device is attached to the host, global USB
12120 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
12121 either ignore the device, or put it to USBDeviceState_Held state, or do
12122 nothing. Unless the device is ignored by global filters, filters of all
12123 currently running guests (<link to="IUSBController::deviceFilters"/>) are
12124 activated that can put it to USBDeviceState_Captured state.
12125
12126 If the device was ignored by global filters, or didn't match
12127 any filters at all (including guest ones), it is handled by the host
12128 in a normal way. In this case, the device state is determined by
12129 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
12130 or USBDeviceState_Available, depending on the current device usage.
12131
12132 Besides auto-capturing based on filters, the device can be manually
12133 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
12134 state is USBDeviceState_Busy, USBDeviceState_Available or
12135 USBDeviceState_Held.
12136
12137 <note>
12138 Due to differences in USB stack implementations in Linux and Win32,
12139 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
12140 only to the Linux version of the product. This also means that (<link
12141 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
12142 device state is USBDeviceState_Held.
12143 </note>
12144
12145 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
12146 </desc>
12147
12148 <const name="NotSupported" value="0">
12149 <desc>
12150 Not supported by the VirtualBox server, not available to guests.
12151 </desc>
12152 </const>
12153 <const name="Unavailable" value="1">
12154 <desc>
12155 Being used by the host computer exclusively,
12156 not available to guests.
12157 </desc>
12158 </const>
12159 <const name="Busy" value="2">
12160 <desc>
12161 Being used by the host computer, potentially available to guests.
12162 </desc>
12163 </const>
12164 <const name="Available" value="3">
12165 <desc>
12166 Not used by the host computer, available to guests (the host computer
12167 can also start using the device at any time).
12168 </desc>
12169 </const>
12170 <const name="Held" value="4">
12171 <desc>
12172 Held by the VirtualBox server (ignored by the host computer),
12173 available to guests.
12174 </desc>
12175 </const>
12176 <const name="Captured" value="5">
12177 <desc>
12178 Captured by one of the guest computers, not available
12179 to anybody else.
12180 </desc>
12181 </const>
12182 </enum>
12183
12184 <interface
12185 name="IHostUSBDevice" extends="IUSBDevice"
12186 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
12187 wsmap="managed"
12188 >
12189 <desc>
12190 The IHostUSBDevice interface represents a physical USB device attached
12191 to the host computer.
12192
12193 Besides properties inherited from IUSBDevice, this interface adds the
12194 <link to="#state"/> property that holds the current state of the USB
12195 device.
12196
12197 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
12198 </desc>
12199
12200 <attribute name="state" type="USBDeviceState" readonly="yes">
12201 <desc>
12202 Current state of the device.
12203 </desc>
12204 </attribute>
12205
12206 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
12207
12208 </interface>
12209
12210
12211 <!--
12212 // IHostUSBDeviceFilter
12213 /////////////////////////////////////////////////////////////////////////
12214 -->
12215
12216 <enum
12217 name="USBDeviceFilterAction"
12218 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
12219 >
12220 <desc>
12221 Actions for host USB device filters.
12222 <see>IHostUSBDeviceFilter, USBDeviceState</see>
12223 </desc>
12224
12225 <const name="Null" value="0">
12226 <desc>Null value (never used by the API).</desc>
12227 </const>
12228 <const name="Ignore" value="1">
12229 <desc>Ignore the matched USB device.</desc>
12230 </const>
12231 <const name="Hold" value="2">
12232 <desc>Hold the matched USB device.</desc>
12233 </const>
12234 </enum>
12235
12236 <interface
12237 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
12238 uuid="4cc70246-d74a-400f-8222-3900489c0374"
12239 wsmap="managed"
12240 >
12241 <desc>
12242 The IHostUSBDeviceFilter interface represents a global filter for a
12243 physical USB device used by the host computer. Used indirectly in
12244 <link to="IHost::USBDeviceFilters"/>.
12245
12246 Using filters of this type, the host computer determines the initial
12247 state of the USB device after it is physically attached to the
12248 host's USB controller.
12249
12250 <note>
12251 The <link to="#remote"/> attribute is ignored by this type of
12252 filters, because it makes sense only for
12253 <link to="IUSBController::deviceFilters">machine USB filters</link>.
12254 </note>
12255
12256 <see>IHost::USBDeviceFilters</see>
12257 </desc>
12258
12259 <attribute name="action" type="USBDeviceFilterAction">
12260 <desc>
12261 Action performed by the host when an attached USB device
12262 matches this filter.
12263 </desc>
12264 </attribute>
12265
12266 </interface>
12267
12268 <!--
12269 // IAudioAdapter
12270 /////////////////////////////////////////////////////////////////////////
12271 -->
12272
12273 <enum
12274 name="AudioDriverType"
12275 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
12276 >
12277 <desc>
12278 Host audio driver type.
12279 </desc>
12280
12281 <const name="Null" value="0">
12282 <desc>Null value, also means "dummy audio driver".</desc>
12283 </const>
12284 <const name="WinMM" value="1">
12285 <desc>Windows multimedia (Windows hosts only).</desc>
12286 </const>
12287 <const name="OSS" value="2">
12288 <desc>Open Sound System (Linux hosts only).</desc>
12289 </const>
12290 <const name="ALSA" value="3">
12291 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
12292 </const>
12293 <const name="DirectSound" value="4">
12294 <desc>DirectSound (Windows hosts only).</desc>
12295 </const>
12296 <const name="CoreAudio" value="5">
12297 <desc>CoreAudio (Mac hosts only).</desc>
12298 </const>
12299 <const name="MMPM" value="6">
12300 <desc>Reserved for historical reasons.</desc>
12301 </const>
12302 <const name="Pulse" value="7">
12303 <desc>PulseAudio (Linux hosts only).</desc>
12304 </const>
12305 <const name="SolAudio" value="8">
12306 <desc>Solaris audio (Solaris hosts only).</desc>
12307 </const>
12308 </enum>
12309
12310 <enum
12311 name="AudioControllerType"
12312 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
12313 >
12314 <desc>
12315 Virtual audio controller type.
12316 </desc>
12317
12318 <const name="AC97" value="0"/>
12319 <const name="SB16" value="1"/>
12320 </enum>
12321
12322 <interface
12323 name="IAudioAdapter" extends="$unknown"
12324 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
12325 wsmap="managed"
12326 >
12327 <desc>
12328 The IAudioAdapter interface represents the virtual audio adapter of
12329 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
12330 </desc>
12331 <attribute name="enabled" type="boolean">
12332 <desc>
12333 Flag whether the audio adapter is present in the
12334 guest system. If disabled, the virtual guest hardware will
12335 not contain any audio adapter. Can only be changed when
12336 the VM is not running.
12337 </desc>
12338 </attribute>
12339 <attribute name="audioController" type="AudioControllerType">
12340 <desc>
12341 The audio hardware we emulate.
12342 </desc>
12343 </attribute>
12344 <attribute name="audioDriver" type="AudioDriverType">
12345 <desc>
12346 Audio driver the adapter is connected to. This setting
12347 can only be changed when the VM is not running.
12348 </desc>
12349 </attribute>
12350 </interface>
12351
12352 <!--
12353 // IVRDPServer
12354 /////////////////////////////////////////////////////////////////////////
12355 -->
12356
12357 <enum
12358 name="VRDPAuthType"
12359 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
12360 >
12361 <desc>
12362 VRDP authentication type.
12363 </desc>
12364
12365 <const name="Null" value="0">
12366 <desc>Null value, also means "no authentication".</desc>
12367 </const>
12368 <const name="External" value="1"/>
12369 <const name="Guest" value="2"/>
12370 </enum>
12371
12372 <interface
12373 name="IVRDPServer" extends="$unknown"
12374 uuid="72e671bc-1712-4052-ad6b-e45e76d9d3e4"
12375 wsmap="managed"
12376 >
12377 <attribute name="enabled" type="boolean">
12378 <desc>VRDP server status.</desc>
12379 </attribute>
12380
12381 <attribute name="ports" type="wstring">
12382 <desc>
12383 VRDP server port numbers. The server will try to bind to one of free ports from the list.
12384 <note>
12385 This is a string of comma separated TCP port numbers or port number ranges.
12386 Example <tt>5000,5010-5012,5015</tt>
12387 </note>
12388 </desc>
12389 </attribute>
12390
12391 <attribute name="netAddress" type="wstring">
12392 <desc>VRDP server address.</desc>
12393 </attribute>
12394
12395 <attribute name="authType" type="VRDPAuthType">
12396 <desc>VRDP authentication method.</desc>
12397 </attribute>
12398
12399 <attribute name="authTimeout" type="unsigned long">
12400 <desc>Timeout for guest authentication. Milliseconds.</desc>
12401 </attribute>
12402
12403 <attribute name="allowMultiConnection" type="boolean">
12404 <desc>
12405 Flag whether multiple simultaneous connections to the VM are permitted.
12406 Note that this will be replaced by a more powerful mechanism in the future.
12407 </desc>
12408 </attribute>
12409
12410 <attribute name="reuseSingleConnection" type="boolean">
12411 <desc>
12412 Flag whether the existing connection must be dropped and a new connection
12413 must be established by the VRDP server, when a new client connects in single
12414 connection mode.
12415 </desc>
12416 </attribute>
12417
12418 </interface>
12419
12420
12421 <!--
12422 // ISharedFolder
12423 /////////////////////////////////////////////////////////////////////////
12424 -->
12425
12426 <interface
12427 name="ISharedFolder" extends="$unknown"
12428 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
12429 wsmap="struct"
12430 >
12431 <desc>
12432 The ISharedFolder interface represents a folder in the host computer's
12433 file system accessible from the guest OS running inside a virtual
12434 machine using an associated logical name.
12435
12436 There are three types of shared folders:
12437 <ul>
12438 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12439 folders available to all virtual machines.</li>
12440 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12441 VM-specific shared folders available to the given virtual machine at
12442 startup.</li>
12443 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12444 VM-specific shared folders created in the session context (for
12445 example, when the virtual machine is running) and automatically
12446 discarded when the session is closed (the VM is powered off).</li>
12447 </ul>
12448
12449 Logical names of shared folders must be unique within the given scope
12450 (global, permanent or transient). However, they do not need to be unique
12451 across scopes. In this case, the definition of the shared folder in a
12452 more specific scope takes precedence over definitions in all other
12453 scopes. The order of precedence is (more specific to more general):
12454 <ol>
12455 <li>Transient definitions</li>
12456 <li>Permanent definitions</li>
12457 <li>Global definitions</li>
12458 </ol>
12459
12460 For example, if MyMachine has a shared folder named
12461 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12462 transient shared folder named <tt>C_DRIVE</tt> (that points
12463 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12464 of <tt>C_DRIVE</tt> in the guest OS so
12465 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12466 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12467 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12468 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12469 to <tt>C:\\</tt> if it still exists.
12470
12471 Note that permanent and transient shared folders of different machines
12472 are in different name spaces, so they don't overlap and don't need to
12473 have unique logical names.
12474
12475 <note>
12476 Global shared folders are not implemented in the current version of the
12477 product.
12478 </note>
12479 </desc>
12480
12481 <attribute name="name" type="wstring" readonly="yes">
12482 <desc>Logical name of the shared folder.</desc>
12483 </attribute>
12484
12485 <attribute name="hostPath" type="wstring" readonly="yes">
12486 <desc>Full path to the shared folder in the host file system.</desc>
12487 </attribute>
12488
12489 <attribute name="accessible" type="boolean" readonly="yes">
12490 <desc>
12491 Whether the folder defined by the host path is currently
12492 accessible or not.
12493 For example, the folder can be unaccessible if it is placed
12494 on the network share that is not available by the time
12495 this property is read.
12496 </desc>
12497 </attribute>
12498
12499 <attribute name="writable" type="boolean" readonly="yes">
12500 <desc>
12501 Whether the folder defined by the host path is writable or
12502 not.
12503 </desc>
12504 </attribute>
12505
12506 <attribute name="lastAccessError" type="wstring" readonly="yes">
12507 <desc>
12508 Text message that represents the result of the last accessibility
12509 check.
12510
12511 Accessibility checks are performed each time the <link to="#accessible"/>
12512 attribute is read. An empty string is returned if the last
12513 accessibility check was successful. A non-empty string indicates a
12514 failure and should normally describe a reason of the failure (for
12515 example, a file read error).
12516 </desc>
12517 </attribute>
12518
12519 </interface>
12520
12521 <!--
12522 // ISession
12523 /////////////////////////////////////////////////////////////////////////
12524 -->
12525
12526 <interface
12527 name="IInternalSessionControl" extends="$unknown"
12528 uuid="f9aac6d0-41b3-46b7-bea4-6370b4036de6"
12529 internal="yes"
12530 wsmap="suppress"
12531 >
12532 <method name="getPID">
12533 <desc>PID of the process that has created this Session object.
12534 </desc>
12535 <param name="pid" type="unsigned long" dir="return"/>
12536 </method>
12537
12538 <method name="getRemoteConsole">
12539 <desc>
12540 Returns the console object suitable for remote control.
12541
12542 <result name="VBOX_E_INVALID_VM_STATE">
12543 Session state prevents operation.
12544 </result>
12545 <result name="VBOX_E_INVALID_OBJECT_STATE">
12546 Session type prevents operation.
12547 </result>
12548
12549 </desc>
12550 <param name="console" type="IConsole" dir="return"/>
12551 </method>
12552
12553 <method name="assignMachine">
12554 <desc>
12555 Assigns the machine object associated with this direct-type
12556 session or informs the session that it will be a remote one
12557 (if @a machine == @c null).
12558
12559 <result name="VBOX_E_INVALID_VM_STATE">
12560 Session state prevents operation.
12561 </result>
12562 <result name="VBOX_E_INVALID_OBJECT_STATE">
12563 Session type prevents operation.
12564 </result>
12565
12566 </desc>
12567 <param name="machine" type="IMachine" dir="in"/>
12568 </method>
12569
12570 <method name="assignRemoteMachine">
12571 <desc>
12572 Assigns the machine and the (remote) console object associated with
12573 this remote-type session.
12574
12575 <result name="VBOX_E_INVALID_VM_STATE">
12576 Session state prevents operation.
12577 </result>
12578
12579 </desc>
12580 <param name="machine" type="IMachine" dir="in"/>
12581 <param name="console" type="IConsole" dir="in"/>
12582 </method>
12583
12584 <method name="updateMachineState">
12585 <desc>
12586 Updates the machine state in the VM process.
12587 Must be called only in certain cases
12588 (see the method implementation).
12589
12590 <result name="VBOX_E_INVALID_VM_STATE">
12591 Session state prevents operation.
12592 </result>
12593 <result name="VBOX_E_INVALID_OBJECT_STATE">
12594 Session type prevents operation.
12595 </result>
12596
12597 </desc>
12598 <param name="aMachineState" type="MachineState" dir="in"/>
12599 </method>
12600
12601 <method name="uninitialize">
12602 <desc>
12603 Uninitializes (closes) this session. Used by VirtualBox to close
12604 the corresponding remote session when the direct session dies
12605 or gets closed.
12606
12607 <result name="VBOX_E_INVALID_VM_STATE">
12608 Session state prevents operation.
12609 </result>
12610
12611 </desc>
12612 </method>
12613
12614 <method name="onNetworkAdapterChange">
12615 <desc>
12616 Triggered when settings of a network adapter of the
12617 associated virtual machine have changed.
12618
12619 <result name="VBOX_E_INVALID_VM_STATE">
12620 Session state prevents operation.
12621 </result>
12622 <result name="VBOX_E_INVALID_OBJECT_STATE">
12623 Session type prevents operation.
12624 </result>
12625
12626 </desc>
12627 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12628 <param name="changeAdapter" type="boolean" dir="in"/>
12629 </method>
12630
12631 <method name="onSerialPortChange">
12632 <desc>
12633 Triggered when settings of a serial port of the
12634 associated virtual machine have changed.
12635
12636 <result name="VBOX_E_INVALID_VM_STATE">
12637 Session state prevents operation.
12638 </result>
12639 <result name="VBOX_E_INVALID_OBJECT_STATE">
12640 Session type prevents operation.
12641 </result>
12642
12643 </desc>
12644 <param name="serialPort" type="ISerialPort" dir="in"/>
12645 </method>
12646
12647 <method name="onParallelPortChange">
12648 <desc>
12649 Triggered when settings of a parallel port of the
12650 associated virtual machine have changed.
12651
12652 <result name="VBOX_E_INVALID_VM_STATE">
12653 Session state prevents operation.
12654 </result>
12655 <result name="VBOX_E_INVALID_OBJECT_STATE">
12656 Session type prevents operation.
12657 </result>
12658
12659 </desc>
12660 <param name="parallelPort" type="IParallelPort" dir="in"/>
12661 </method>
12662
12663 <method name="onStorageControllerChange">
12664 <desc>
12665 Triggered when settings of a storage controller of the
12666 associated virtual machine have changed.
12667
12668 <result name="VBOX_E_INVALID_VM_STATE">
12669 Session state prevents operation.
12670 </result>
12671 <result name="VBOX_E_INVALID_OBJECT_STATE">
12672 Session type prevents operation.
12673 </result>
12674
12675 </desc>
12676 </method>
12677
12678 <method name="onMediumChange">
12679 <desc>
12680 Triggered when attached media of the
12681 associated virtual machine have changed.
12682
12683 <result name="VBOX_E_INVALID_VM_STATE">
12684 Session state prevents operation.
12685 </result>
12686 <result name="VBOX_E_INVALID_OBJECT_STATE">
12687 Session type prevents operation.
12688 </result>
12689
12690 </desc>
12691
12692 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12693 <param name="force" type="boolean" dir="in"/>
12694 </method>
12695
12696 <method name="onVRDPServerChange">
12697 <desc>
12698 Triggered when settings of the VRDP server object of the
12699 associated virtual machine have changed.
12700
12701 <result name="VBOX_E_INVALID_VM_STATE">
12702 Session state prevents operation.
12703 </result>
12704 <result name="VBOX_E_INVALID_OBJECT_STATE">
12705 Session type prevents operation.
12706 </result>
12707
12708 </desc>
12709 </method>
12710
12711 <method name="onUSBControllerChange">
12712 <desc>
12713 Triggered when settings of the USB controller object of the
12714 associated virtual machine have changed.
12715
12716 <result name="VBOX_E_INVALID_VM_STATE">
12717 Session state prevents operation.
12718 </result>
12719 <result name="VBOX_E_INVALID_OBJECT_STATE">
12720 Session type prevents operation.
12721 </result>
12722
12723 </desc>
12724 </method>
12725
12726 <method name="onSharedFolderChange">
12727 <desc>
12728 Triggered when a permanent (global or machine) shared folder has been
12729 created or removed.
12730 <note>
12731 We don't pass shared folder parameters in this notification because
12732 the order in which parallel notifications are delivered is not defined,
12733 therefore it could happen that these parameters were outdated by the
12734 time of processing this notification.
12735 </note>
12736
12737 <result name="VBOX_E_INVALID_VM_STATE">
12738 Session state prevents operation.
12739 </result>
12740 <result name="VBOX_E_INVALID_OBJECT_STATE">
12741 Session type prevents operation.
12742 </result>
12743
12744 </desc>
12745 <param name="global" type="boolean" dir="in"/>
12746 </method>
12747
12748 <method name="onUSBDeviceAttach">
12749 <desc>
12750 Triggered when a request to capture a USB device (as a result
12751 of matched USB filters or direct call to
12752 <link to="IConsole::attachUSBDevice"/>) has completed.
12753 A @c null @a error object means success, otherwise it
12754 describes a failure.
12755
12756 <result name="VBOX_E_INVALID_VM_STATE">
12757 Session state prevents operation.
12758 </result>
12759 <result name="VBOX_E_INVALID_OBJECT_STATE">
12760 Session type prevents operation.
12761 </result>
12762
12763 </desc>
12764 <param name="device" type="IUSBDevice" dir="in"/>
12765 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12766 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12767 </method>
12768
12769 <method name="onUSBDeviceDetach">
12770 <desc>
12771 Triggered when a request to release the USB device (as a result
12772 of machine termination or direct call to
12773 <link to="IConsole::detachUSBDevice"/>) has completed.
12774 A @c null @a error object means success, otherwise it
12775 describes a failure.
12776
12777 <result name="VBOX_E_INVALID_VM_STATE">
12778 Session state prevents operation.
12779 </result>
12780 <result name="VBOX_E_INVALID_OBJECT_STATE">
12781 Session type prevents operation.
12782 </result>
12783
12784 </desc>
12785 <param name="id" type="uuid" mod="string" dir="in"/>
12786 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12787 </method>
12788
12789 <method name="onShowWindow">
12790 <desc>
12791 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12792 <link to="IMachine::showConsoleWindow"/> in order to notify
12793 console callbacks
12794 <link to="IConsoleCallback::onCanShowWindow"/>
12795 and <link to="IConsoleCallback::onShowWindow"/>.
12796
12797 <result name="VBOX_E_INVALID_OBJECT_STATE">
12798 Session type prevents operation.
12799 </result>
12800
12801 </desc>
12802 <param name="check" type="boolean" dir="in"/>
12803 <param name="canShow" type="boolean" dir="out"/>
12804 <param name="winId" type="unsigned long long" dir="out"/>
12805 </method>
12806
12807 <method name="accessGuestProperty">
12808 <desc>
12809 Called by <link to="IMachine::getGuestProperty"/> and by
12810 <link to="IMachine::setGuestProperty"/> in order to read and
12811 modify guest properties.
12812
12813 <result name="VBOX_E_INVALID_VM_STATE">
12814 Machine session is not open.
12815 </result>
12816 <result name="VBOX_E_INVALID_OBJECT_STATE">
12817 Session type is not direct.
12818 </result>
12819
12820 </desc>
12821 <param name="name" type="wstring" dir="in"/>
12822 <param name="value" type="wstring" dir="in"/>
12823 <param name="flags" type="wstring" dir="in"/>
12824 <param name="isSetter" type="boolean" dir="in"/>
12825 <param name="retValue" type="wstring" dir="out"/>
12826 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12827 <param name="retFlags" type="wstring" dir="out"/>
12828 </method>
12829
12830 <method name="enumerateGuestProperties">
12831 <desc>
12832 Return a list of the guest properties matching a set of patterns along
12833 with their values, time stamps and flags.
12834
12835 <result name="VBOX_E_INVALID_VM_STATE">
12836 Machine session is not open.
12837 </result>
12838 <result name="VBOX_E_INVALID_OBJECT_STATE">
12839 Session type is not direct.
12840 </result>
12841
12842 </desc>
12843 <param name="patterns" type="wstring" dir="in">
12844 <desc>
12845 The patterns to match the properties against as a comma-separated
12846 string. If this is empty, all properties currently set will be
12847 returned.
12848 </desc>
12849 </param>
12850 <param name="key" type="wstring" dir="out" safearray="yes">
12851 <desc>
12852 The key names of the properties returned.
12853 </desc>
12854 </param>
12855 <param name="value" type="wstring" dir="out" safearray="yes">
12856 <desc>
12857 The values of the properties returned. The array entries match the
12858 corresponding entries in the @a key array.
12859 </desc>
12860 </param>
12861 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12862 <desc>
12863 The time stamps of the properties returned. The array entries match
12864 the corresponding entries in the @a key array.
12865 </desc>
12866 </param>
12867 <param name="flags" type="wstring" dir="out" safearray="yes">
12868 <desc>
12869 The flags of the properties returned. The array entries match the
12870 corresponding entries in the @a key array.
12871 </desc>
12872 </param>
12873 </method>
12874
12875 </interface>
12876
12877 <interface
12878 name="ISession" extends="$dispatched"
12879 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12880 wsmap="managed"
12881 >
12882 <desc>
12883 The ISession interface represents a serialization primitive for virtual
12884 machines.
12885
12886 With VirtualBox, every time one wishes to manipulate a virtual machine
12887 (e.g. change its settings or start execution), a session object is
12888 required. Such an object must be passed to one of the session methods
12889 that open the given session, which then initiates the machine manipulation.
12890
12891 A session serves several purposes: it identifies to the inter-process VirtualBox
12892 code which process is currently working with the virtual machine, and it ensures
12893 that there are no incompatible requests from several processes for the
12894 same virtual machine. Session objects can therefore be thought of as mutex
12895 semaphores that lock virtual machines to prevent conflicting accesses from
12896 several processes.
12897
12898 How sessions objects are used depends on whether you use the Main API
12899 via COM or via the webservice:
12900
12901 <ul>
12902 <li>When using the COM API directly, an object of the Session class from the
12903 VirtualBox type library needs to be created. In regular COM C++ client code,
12904 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12905 This object will then act as a local session object in further calls to open
12906 a session.
12907 </li>
12908
12909 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12910 one session object automatically when <link to="IWebsessionManager::logon" />
12911 is called. A managed object reference to that session object can be retrieved by
12912 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12913 reference can then be used to open sessions.
12914 </li>
12915 </ul>
12916
12917 Sessions are mainly used in two variations:
12918
12919 <ul>
12920 <li>
12921 To start a virtual machine in a separate process, one would call
12922 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12923 object as its first parameter. This session then identifies the caller
12924 and lets him control the started machine (for example, pause machine
12925 execution or power it down) as well as be notified about machine
12926 execution state changes.
12927 </li>
12928
12929 <li>To alter machine settings, or to start machine execution within the
12930 current process, one needs to open a direct session for the machine first by
12931 calling <link to="IVirtualBox::openSession"/>. While a direct session
12932 is open within one process, no any other process may open another direct
12933 session for the same machine. This prevents the machine from being changed
12934 by other processes while it is running or while the machine is being configured.
12935 </li>
12936 </ul>
12937
12938 One also can attach to an existing direct session already opened by
12939 another process (for example, in order to send a control request to the
12940 virtual machine such as the pause or the reset request). This is done by
12941 calling <link to="IVirtualBox::openExistingSession"/>.
12942
12943 <note>
12944 Unless you are trying to write a new VirtualBox front-end that
12945 performs direct machine execution (like the VirtualBox or VBoxSDL
12946 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12947 session opened by <link to="IVirtualBox::openSession"/> and use this
12948 session only to change virtual machine settings. If you simply want to
12949 start virtual machine execution using one of the existing front-ends
12950 (for example the VirtualBox GUI or headless server), simply use
12951 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12952 will power up the machine automatically for you.
12953 </note>
12954 </desc>
12955
12956 <attribute name="state" type="SessionState" readonly="yes">
12957 <desc>Current state of this session.</desc>
12958 </attribute>
12959
12960 <attribute name="type" type="SessionType" readonly="yes">
12961 <desc>
12962 Type of this session. The value of this attribute is valid only
12963 if the session is currently open (i.e. its #state is
12964 SessionType_SessionOpen), otherwise an error will be returned.
12965 </desc>
12966 </attribute>
12967
12968 <attribute name="machine" type="IMachine" readonly="yes">
12969 <desc>Machine object associated with this session.</desc>
12970 </attribute>
12971
12972 <attribute name="console" type="IConsole" readonly="yes">
12973 <desc>Console object associated with this session.</desc>
12974 </attribute>
12975
12976 <method name="close">
12977 <desc>
12978 Closes a session that was previously opened.
12979
12980 It is recommended that every time an "open session" method (such as
12981 <link to="IVirtualBox::openRemoteSession" /> or
12982 <link to="IVirtualBox::openSession" />) has been called to
12983 manipulate a virtual machine, the caller invoke
12984 ISession::close() when it's done doing so. Since sessions are
12985 serialization primitives much like ordinary mutexes, they are
12986 best used the same way: for each "open" call, there should be
12987 a matching "close" call, even when errors occur.
12988
12989 Otherwise, if a direct session for a machine opened with
12990 <link to="IVirtualBox::openSession"/> is not explicitly closed
12991 when the application terminates, the state of the machine will
12992 be set to <link to="MachineState_Aborted" /> on the server.
12993
12994 Generally, it is recommended to close all open sessions explicitly
12995 before terminating the application (regardless of the reason for
12996 the termination).
12997
12998 <note>
12999 Do not expect the session state (<link to="ISession::state" />
13000 to return to "Closed" immediately after you invoke
13001 ISession::close(), particularly if you have started a remote
13002 session to execute the VM in a new process. The session state will
13003 automatically return to "Closed" once the VM is no longer executing,
13004 which can of course take a very long time.
13005 </note>
13006
13007 <result name="E_UNEXPECTED">
13008 Session is not open.
13009 </result>
13010
13011 </desc>
13012 </method>
13013
13014 </interface>
13015
13016 <!--
13017 // IStorageController
13018 /////////////////////////////////////////////////////////////////////////
13019 -->
13020
13021 <enum
13022 name="StorageBus"
13023 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
13024 >
13025 <desc>
13026 The bus type of the storage controller (IDE, SATA, SCSI or Floppy);
13027 see <link to="IStorageController::bus" />.
13028 </desc>
13029 <const name="Null" value="0">
13030 <desc>@c null value. Never used by the API.</desc>
13031 </const>
13032 <const name="IDE" value="1"/>
13033 <const name="SATA" value="2"/>
13034 <const name="SCSI" value="3"/>
13035 <const name="Floppy" value="4"/>
13036 </enum>
13037
13038 <enum
13039 name="StorageControllerType"
13040 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
13041 >
13042 <desc>
13043 The exact variant of storage controller hardware presented
13044 to the guest; see <link to="IStorageController::controllerType" />.
13045 </desc>
13046
13047 <const name="Null" value="0">
13048 <desc>@c null value. Never used by the API.</desc>
13049 </const>
13050 <const name="LsiLogic" value="1">
13051 <desc>A SCSI controller of the LsiLogic variant.</desc>
13052 </const>
13053 <const name="BusLogic" value="2">
13054 <desc>A SCSI controller of the BusLogic variant.</desc>
13055 </const>
13056 <const name="IntelAhci" value="3">
13057 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
13058 </const>
13059 <const name="PIIX3" value="4">
13060 <desc>An IDE controller of the PIIX3 variant.</desc>
13061 </const>
13062 <const name="PIIX4" value="5">
13063 <desc>An IDE controller of the PIIX4 variant.</desc>
13064 </const>
13065 <const name="ICH6" value="6">
13066 <desc>An IDE controller of the ICH6 variant.</desc>
13067 </const>
13068 <const name="I82078" value="7">
13069 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
13070 </const>
13071 </enum>
13072
13073 <interface
13074 name="IStorageController" extends="$unknown"
13075 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
13076 wsmap="managed"
13077 >
13078 <desc>
13079 Represents a storage controller that is attached to a virtual machine
13080 (<link to="IMachine" />). Just as drives (hard disks, DVDs, FDs) are
13081 attached to storage controllers in a real computer, virtual drives
13082 (represented by <link to="IMediumAttachment" />) are attached to virtual
13083 storage controllers, represented by this interface.
13084
13085 As opposed to physical hardware, VirtualBox has a very generic concept
13086 of a storage controller, and for purposes of the Main API, all virtual
13087 storage is attached to virtual machines via instances of this interface.
13088 There are four types of such virtual storage controllers: IDE, SCSI, SATA
13089 and Floppy (see <link to="#bus" />). Depending on which of these four is
13090 used, certain sub-types may be available and can be selected in
13091 <link to="#controllerType" />.
13092
13093 Depending on these settings, the guest operating system might see
13094 significantly different virtual hardware.
13095 </desc>
13096
13097 <attribute name="name" type="wstring" readonly="yes">
13098 <desc>
13099 Name of the storage controller, as originally specified with
13100 <link to="IMachine::addStorageController" />. This then uniquely
13101 identifies this controller with other method calls such as
13102 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
13103 </desc>
13104 </attribute>
13105
13106 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
13107 <desc>
13108 Maximum number of devices which can be attached to one port.
13109 </desc>
13110 </attribute>
13111
13112 <attribute name="minPortCount" type="unsigned long" readonly="yes">
13113 <desc>
13114 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
13115 </desc>
13116 </attribute>
13117
13118 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
13119 <desc>
13120 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
13121 </desc>
13122 </attribute>
13123
13124 <attribute name="instance" type="unsigned long">
13125 <desc>
13126 The instance number of the device in the running VM.
13127 </desc>
13128 </attribute>
13129
13130 <attribute name="portCount" type="unsigned long">
13131 <desc>
13132 The number of currently usable ports on the controller.
13133 The minimum and maximum number of ports for one controller are
13134 stored in <link to="IStorageController::minPortCount"/>
13135 and <link to="IStorageController::maxPortCount"/>.
13136 </desc>
13137 </attribute>
13138
13139 <attribute name="bus" type="StorageBus" readonly="yes">
13140 <desc>
13141 The bus type of the storage controller (IDE, SATA, SCSI or Floppy).
13142 </desc>
13143 </attribute>
13144
13145 <attribute name="controllerType" type="StorageControllerType">
13146 <desc>
13147 The exact variant of storage controller hardware presented
13148 to the guest.
13149 Depending on this value, VirtualBox will provide a different
13150 virtual storage controller hardware to the guest.
13151 For SATA and floppy controllers, only one variant is available,
13152 but for IDE and SCSI, there are several.
13153
13154 For SCSI controllers, the default type is LsiLogic.
13155 </desc>
13156 </attribute>
13157
13158 <method name="GetIDEEmulationPort">
13159 <desc>
13160 Gets the corresponding port number which is emulated as an IDE device.
13161 Works only with SATA controllers.
13162
13163 <result name="E_INVALIDARG">
13164 The @a devicePosition is not in the range 0 to 3.
13165 </result>
13166 <result name="E_NOTIMPL">
13167 The storage controller type is not SATAIntelAhci.
13168 </result>
13169
13170 </desc>
13171 <param name="devicePosition" type="long" dir="in"/>
13172 <param name="portNumber" type="long" dir="return"/>
13173 </method>
13174
13175 <method name="SetIDEEmulationPort">
13176 <desc>
13177 Sets the port number which is emulated as an IDE device.
13178 Works only with SATA controllers.
13179
13180 <result name="E_INVALIDARG">
13181 The @a devicePosition is not in the range 0 to 3 or the
13182 @a portNumber is not in the range 0 to 29.
13183 </result>
13184 <result name="E_NOTIMPL">
13185 The storage controller type is not SATAIntelAhci.
13186 </result>
13187
13188 </desc>
13189 <param name="devicePosition" type="long" dir="in"/>
13190 <param name="portNumber" type="long" dir="in"/>
13191 </method>
13192
13193 </interface>
13194
13195<if target="wsdl">
13196
13197 <!--
13198 // IManagedObjectRef
13199 /////////////////////////////////////////////////////////////////////////
13200 -->
13201
13202 <interface
13203 name="IManagedObjectRef" extends="$unknown"
13204 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
13205 internal="yes"
13206 wsmap="managed"
13207 wscpp="hardcoded"
13208 >
13209 <desc>
13210 Managed object reference.
13211
13212 Only within the webservice, a managed object reference (which is really
13213 an opaque number) allows a webservice client to address an object
13214 that lives in the address space of the webservice server.
13215
13216 Behind each managed object reference, there is a COM object that lives
13217 in the webservice server's address space. The COM object is not freed
13218 until the managed object reference is released, either by an explicit
13219 call to <link to="IManagedObjectRef::release" /> or by logging off from
13220 the webservice (<link to="IWebsessionManager::logoff" />), which releases
13221 all objects created during the webservice session.
13222
13223 Whenever a method call of the VirtualBox API returns a COM object, the
13224 webservice representation of that method will instead return a
13225 managed object reference, which can then be used to invoke methods
13226 on that object.
13227 </desc>
13228
13229 <method name="getInterfaceName">
13230 <desc>
13231 Returns the name of the interface that this managed object represents,
13232 for example, "IMachine", as a string.
13233 </desc>
13234 <param name="return" type="wstring" dir="return"/>
13235 </method>
13236
13237 <method name="release">
13238 <desc>
13239 Releases this managed object reference and frees the resources that
13240 were allocated for it in the webservice server process. After calling
13241 this method, the identifier of the reference can no longer be used.
13242 </desc>
13243 </method>
13244
13245 </interface>
13246
13247 <!--
13248 // IWebsessionManager
13249 /////////////////////////////////////////////////////////////////////////
13250 -->
13251
13252 <interface
13253 name="IWebsessionManager" extends="$unknown"
13254 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
13255 internal="yes"
13256 wsmap="global"
13257 wscpp="hardcoded"
13258 >
13259 <desc>
13260 Websession manager. This provides essential services
13261 to webservice clients.
13262 </desc>
13263 <method name="logon">
13264 <desc>
13265 Logs a new client onto the webservice and returns a managed object reference to
13266 the IVirtualBox instance, which the client can then use as a basis to further
13267 queries, since all calls to the VirtualBox API are based on the IVirtualBox
13268 interface, in one way or the other.
13269 </desc>
13270 <param name="username" type="wstring" dir="in"/>
13271 <param name="password" type="wstring" dir="in"/>
13272 <param name="return" type="IVirtualBox" dir="return"/>
13273 </method>
13274
13275 <method name="getSessionObject">
13276 <desc>
13277 Returns a managed object reference to the internal ISession object that was created
13278 for this web service session when the client logged on.
13279
13280 <see>ISession</see>
13281 </desc>
13282 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13283 <param name="return" type="ISession" dir="return"/>
13284 </method>
13285
13286 <method name="logoff">
13287 <desc>
13288 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
13289 and destroys all resources associated with the session (most importantly, all
13290 managed objects created in the server while the session was active).
13291 </desc>
13292 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13293 </method>
13294
13295 </interface>
13296
13297</if>
13298
13299 <!--
13300 // IPerformanceCollector & friends
13301 /////////////////////////////////////////////////////////////////////////
13302 -->
13303
13304 <interface
13305 name="IPerformanceMetric" extends="$unknown"
13306 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
13307 >
13308 <desc>
13309 The IPerformanceMetric interface represents parameters of the given
13310 performance metric.
13311 </desc>
13312
13313 <attribute name="metricName" type="wstring" readonly="yes">
13314 <desc>
13315 Name of the metric.
13316 </desc>
13317 </attribute>
13318
13319 <attribute name="object" type="$unknown" readonly="yes">
13320 <desc>
13321 Object this metric belongs to.
13322 </desc>
13323 </attribute>
13324
13325 <attribute name="description" type="wstring" readonly="yes">
13326 <desc>
13327 Textual description of the metric.
13328 </desc>
13329 </attribute>
13330
13331 <attribute name="period" type="unsigned long" readonly="yes">
13332 <desc>
13333 Time interval between samples, measured in seconds.
13334 </desc>
13335 </attribute>
13336
13337 <attribute name="count" type="unsigned long" readonly="yes">
13338 <desc>
13339 Number of recent samples retained by the performance collector for this
13340 metric.
13341
13342 When the collected sample count exceeds this number, older samples
13343 are discarded.
13344 </desc>
13345 </attribute>
13346
13347 <attribute name="unit" type="wstring" readonly="yes">
13348 <desc>
13349 Unit of measurement.
13350 </desc>
13351 </attribute>
13352
13353 <attribute name="minimumValue" type="long" readonly="yes">
13354 <desc>
13355 Minimum possible value of this metric.
13356 </desc>
13357 </attribute>
13358
13359 <attribute name="maximumValue" type="long" readonly="yes">
13360 <desc>
13361 Maximum possible value of this metric.
13362 </desc>
13363 </attribute>
13364 </interface>
13365
13366 <interface
13367 name="IPerformanceCollector" extends="$unknown"
13368 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
13369 wsmap="managed"
13370 >
13371 <desc>
13372 The IPerformanceCollector interface represents a service that collects and
13373 stores performance metrics data.
13374
13375 Performance metrics are associated with objects of interfaces like IHost and
13376 IMachine. Each object has a distinct set of performance metrics.
13377 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
13378
13379 Metric data is collected at the specified intervals and is retained
13380 internally. The interval and the number of retained samples can be set
13381 with <link to="IPerformanceCollector::setupMetrics" />.
13382
13383 Metrics are organized hierarchically, with each level separated by a
13384 slash (/) character. Generally, the scheme for metric names is like this:
13385
13386 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
13387
13388 "Category/Metric" together form the base metric name. A base metric is the
13389 smallest unit for which a sampling interval and the number of retained
13390 samples can be set. Only base metrics can be enabled and disabled. All
13391 sub-metrics are collected when their base metric is collected.
13392 Collected values for any set of sub-metrics can be queried with
13393 <link to="IPerformanceCollector::queryMetricsData" />.
13394
13395 For example "CPU/Load/User:avg"
13396 metric name stands for the "CPU" category, "Load" metric, "User" submetric,
13397 "average" aggregate. An aggregate function is computed over all retained
13398 data. Valid aggregate functions are:
13399
13400 <ul>
13401 <li>avg -- average</li>
13402 <li>min -- minimum</li>
13403 <li>max -- maximum</li>
13404 </ul>
13405
13406 When setting up
13407 metric parameters, querying metric data, enabling or disabling metrics
13408 wildcards can be used in metric names to specify a subset of metrics. For
13409 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
13410 averages can be queried using <tt>*:avg</tt> and so on. To query metric
13411 values without aggregates <tt>*:</tt> can be used.
13412
13413 The valid names for base metrics are:
13414
13415 <ul>
13416 <li>CPU/Load</li>
13417 <li>CPU/MHz</li>
13418 <li>RAM/Usage</li>
13419 </ul>
13420
13421 The general sequence for collecting and retrieving the metrics is:
13422 <ul>
13423 <li>
13424 Obtain an instance of IPerformanceCollector with
13425 <link to="IVirtualBox::performanceCollector" />
13426 </li>
13427 <li>
13428 Allocate and populate an array with references to objects the metrics
13429 will be collected for. Use references to IHost and IMachine objects.
13430 </li>
13431 <li>
13432 Allocate and populate an array with base metric names the data will be
13433 collected for.
13434 </li>
13435 <li>
13436 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
13437 metric data will be collected and stored.
13438 </li>
13439 <li>
13440 Wait for the data to get collected.
13441 </li>
13442 <li>
13443 Allocate and populate an array with references to objects the metric
13444 values will be queried for. You can re-use the object array used for
13445 setting base metrics.
13446 </li>
13447 <li>
13448 Allocate and populate an array with metric names the data will be
13449 collected for. Note that metric names differ from base metric names.
13450 </li>
13451 <li>
13452 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
13453 have been collected so far are returned. Note that the values are still
13454 retained internally and data collection continues.
13455 </li>
13456 </ul>
13457
13458 For an example of usage refer to the following files in VirtualBox SDK:
13459 <ul>
13460 <li>
13461 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13462 </li>
13463 <li>
13464 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13465 </li>
13466 </ul>
13467 </desc>
13468
13469 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13470 <desc>
13471 Array of unique names of metrics.
13472
13473 This array represents all metrics supported by the performance
13474 collector. Individual objects do not necessarily support all of them.
13475 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13476 list of supported metrics for a particular object.
13477 </desc>
13478 </attribute>
13479
13480 <method name="getMetrics">
13481 <desc>
13482 Returns parameters of specified metrics for a set of objects.
13483 <note>
13484 @c Null metrics array means all metrics. @c Null object array means
13485 all existing objects.
13486 </note>
13487 </desc>
13488 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13489 <desc>
13490 Metric name filter. Currently, only a comma-separated list of metrics
13491 is supported.
13492 </desc>
13493 </param>
13494 <param name="objects" type="$unknown" dir="in" safearray="yes">
13495 <desc>
13496 Set of objects to return metric parameters for.
13497 </desc>
13498 </param>
13499 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13500 <desc>
13501 Array of returned metric parameters.
13502 </desc>
13503 </param>
13504 </method>
13505
13506 <method name="setupMetrics">
13507 <desc>
13508 Sets parameters of specified base metrics for a set of objects. Returns
13509 an array of <link to="IPerformanceMetric" /> describing the metrics have
13510 been affected.
13511 <note>
13512 @c Null or empty metric name array means all metrics. @c Null or empty
13513 object array means all existing objects. If metric name array contains
13514 a single element and object array contains many, the single metric
13515 name array element is applied to each object array element to form
13516 metric/object pairs.
13517 </note>
13518 </desc>
13519 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13520 <desc>
13521 Metric name filter. Comma-separated list of metrics with wildcard
13522 support.
13523 </desc>
13524 </param>
13525 <param name="objects" type="$unknown" dir="in" safearray="yes">
13526 <desc>
13527 Set of objects to setup metric parameters for.
13528 </desc>
13529 </param>
13530 <param name="period" type="unsigned long" dir="in">
13531 <desc>
13532 Time interval in seconds between two consecutive samples of performance
13533 data.
13534 </desc>
13535 </param>
13536 <param name="count" type="unsigned long" dir="in">
13537 <desc>
13538 Number of samples to retain in performance data history. Older samples
13539 get discarded.
13540 </desc>
13541 </param>
13542 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13543 <desc>
13544 Array of metrics that have been modified by the call to this method.
13545 </desc>
13546 </param>
13547 </method>
13548
13549 <method name="enableMetrics">
13550 <desc>
13551 Turns on collecting specified base metrics. Returns an array of
13552 <link to="IPerformanceMetric" /> describing the metrics have been
13553 affected.
13554 <note>
13555 @c Null or empty metric name array means all metrics. @c Null or empty
13556 object array means all existing objects. If metric name array contains
13557 a single element and object array contains many, the single metric
13558 name array element is applied to each object array element to form
13559 metric/object pairs.
13560 </note>
13561 </desc>
13562 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13563 <desc>
13564 Metric name filter. Comma-separated list of metrics with wildcard
13565 support.
13566 </desc>
13567 </param>
13568 <param name="objects" type="$unknown" dir="in" safearray="yes">
13569 <desc>
13570 Set of objects to enable metrics for.
13571 </desc>
13572 </param>
13573 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13574 <desc>
13575 Array of metrics that have been modified by the call to this method.
13576 </desc>
13577 </param>
13578 </method>
13579
13580 <method name="disableMetrics">
13581 <desc>
13582 Turns off collecting specified base metrics. Returns an array of
13583 <link to="IPerformanceMetric" /> describing the metrics have been
13584 affected.
13585 <note>
13586 @c Null or empty metric name array means all metrics. @c Null or empty
13587 object array means all existing objects. If metric name array contains
13588 a single element and object array contains many, the single metric
13589 name array element is applied to each object array element to form
13590 metric/object pairs.
13591 </note>
13592 </desc>
13593 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13594 <desc>
13595 Metric name filter. Comma-separated list of metrics with wildcard
13596 support.
13597 </desc>
13598 </param>
13599 <param name="objects" type="$unknown" dir="in" safearray="yes">
13600 <desc>
13601 Set of objects to disable metrics for.
13602 </desc>
13603 </param>
13604 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13605 <desc>
13606 Array of metrics that have been modified by the call to this method.
13607 </desc>
13608 </param>
13609 </method>
13610
13611 <method name="queryMetricsData">
13612 <desc>
13613 Queries collected metrics data for a set of objects.
13614
13615 The data itself and related metric information are returned in seven
13616 parallel and one flattened array of arrays. Elements of
13617 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13618 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13619 the same index describe one set of values corresponding to a single
13620 metric.
13621
13622 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13623 start and length of a sub-array is indicated by
13624 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13625 value for metric <tt>metricNames[i]</tt> is at
13626 <tt>returnData[returnIndices[i]]</tt>.
13627
13628 <note>
13629 @c Null or empty metric name array means all metrics. @c Null or empty
13630 object array means all existing objects. If metric name array contains
13631 a single element and object array contains many, the single metric
13632 name array element is applied to each object array element to form
13633 metric/object pairs.
13634 </note>
13635 <note>
13636 Data collection continues behind the scenes after call to
13637 @c queryMetricsData. The return data can be seen as the snapshot of
13638 the current state at the time of @c queryMetricsData call. The
13639 internally kept metric values are not cleared by the call. This makes
13640 possible querying different subsets of metrics or aggregates with
13641 subsequent calls. If periodic querying is needed it is highly
13642 suggested to query the values with @c interval*count period to avoid
13643 confusion. This way a completely new set of data values will be
13644 provided by each query.
13645 </note>
13646 </desc>
13647 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13648 <desc>
13649 Metric name filter. Comma-separated list of metrics with wildcard
13650 support.
13651 </desc>
13652 </param>
13653 <param name="objects" type="$unknown" dir="in" safearray="yes">
13654 <desc>
13655 Set of objects to query metrics for.
13656 </desc>
13657 </param>
13658 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13659 <desc>
13660 Names of metrics returned in @c returnData.
13661 </desc>
13662 </param>
13663 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13664 <desc>
13665 Objects associated with metrics returned in @c returnData.
13666 </desc>
13667 </param>
13668 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13669 <desc>
13670 Units of measurement for each returned metric.
13671 </desc>
13672 </param>
13673 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13674 <desc>
13675 Divisor that should be applied to return values in order to get
13676 floating point values. For example:
13677 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13678 will retrieve the floating point value of i-th sample of the first
13679 metric.
13680 </desc>
13681 </param>
13682 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13683 <desc>
13684 Sequence numbers of the first elements of value sequences of particular metrics
13685 returned in @c returnData. For aggregate metrics it is the sequence number of
13686 the sample the aggregate started calculation from.
13687 </desc>
13688 </param>
13689 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13690 <desc>
13691 Indices of the first elements of value sequences of particular metrics
13692 returned in @c returnData.
13693 </desc>
13694 </param>
13695 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13696 <desc>
13697 Lengths of value sequences of particular metrics.
13698 </desc>
13699 </param>
13700 <param name="returnData" type="long" dir="return" safearray="yes">
13701 <desc>
13702 Flattened array of all metric data containing sequences of values for
13703 each metric.
13704 </desc>
13705 </param>
13706 </method>
13707
13708 </interface>
13709
13710 <module name="VBoxSVC" context="LocalServer">
13711 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13712 namespace="virtualbox.org">
13713 <interface name="IVirtualBox" default="yes"/>
13714 </class>
13715 </module>
13716
13717 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13718 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
13719 namespace="virtualbox.org">
13720 <interface name="ISession" default="yes"/>
13721 </class>
13722 <class name="CallbackWrapper" uuid="49EE8561-5563-4715-B18C-A4B1A490DAFE"
13723 namespace="virtualbox.org">
13724 <interface name="ILocalOwner" default="yes"/>
13725 <interface name="IVirtualBoxCallback"/>
13726 <interface name="IConsoleCallback"/>
13727 </class>
13728 </module>
13729
13730</library>
13731
13732</idl>
13733
13734<!-- 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