VirtualBox

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

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

Saved state screenshot API stubs (xTracker 4364).

  • Property svn:eol-style set to native
File size: 504.6 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="7ceea938-8b49-41e2-bb47-667219c0d586"
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.</desc>
1110 </const>
1111 </enum>
1112
1113 <!--
1114 // IVirtualBoxErrorInfo
1115 /////////////////////////////////////////////////////////////////////////
1116 -->
1117
1118 <interface
1119 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1120 uuid="4b86d186-407e-4f9e-8be8-e50061be8725"
1121 supportsErrorInfo="no"
1122 wsmap="managed"
1123 >
1124 <desc>
1125 The IVirtualBoxErrorInfo interface represents extended error information.
1126
1127 Extended error information can be set by VirtualBox components after
1128 unsuccessful or partially successful method invocation. This information
1129 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1130 and then shown to the client in addition to the plain 32-bit result code.
1131
1132 In MS COM, this interface extends the IErrorInfo interface,
1133 in XPCOM, it extends the nsIException interface. In both cases,
1134 it provides a set of common attributes to retrieve error
1135 information.
1136
1137 Sometimes invocation of some component's method may involve methods of
1138 other components that may also fail (independently of this method's
1139 failure), or a series of non-fatal errors may precede a fatal error that
1140 causes method failure. In cases like that, it may be desirable to preserve
1141 information about all errors happened during method invocation and deliver
1142 it to the caller. The <link to="#next"/> attribute is intended
1143 specifically for this purpose and allows to represent a chain of errors
1144 through a single IVirtualBoxErrorInfo object set after method invocation.
1145
1146 Note that errors are stored to a chain in the reverse order, i.e. the
1147 initial error object you query right after method invocation is the last
1148 error set by the callee, the object it points to in the @a next attribute
1149 is the previous error and so on, up to the first error (which is the last
1150 in the chain).
1151 </desc>
1152
1153 <attribute name="resultCode" type="long" readonly="yes">
1154 <desc>
1155 Result code of the error.
1156 Usually, it will be the same as the result code returned
1157 by the method that provided this error information, but not
1158 always. For example, on Win32, CoCreateInstance() will most
1159 likely return E_NOINTERFACE upon unsuccessful component
1160 instantiation attempt, but not the value the component factory
1161 returned. Value is typed 'long', not 'result',
1162 to make interface usable from scripting languages.
1163 <note>
1164 In MS COM, there is no equivalent.
1165 In XPCOM, it is the same as nsIException::result.
1166 </note>
1167 </desc>
1168 </attribute>
1169
1170 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1171 <desc>
1172 UUID of the interface that defined the error.
1173 <note>
1174 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1175 data type.
1176 In XPCOM, there is no equivalent.
1177 </note>
1178 </desc>
1179 </attribute>
1180
1181 <attribute name="component" type="wstring" readonly="yes">
1182 <desc>
1183 Name of the component that generated the error.
1184 <note>
1185 In MS COM, it is the same as IErrorInfo::GetSource.
1186 In XPCOM, there is no equivalent.
1187 </note>
1188 </desc>
1189 </attribute>
1190
1191 <attribute name="text" type="wstring" readonly="yes">
1192 <desc>
1193 Text description of the error.
1194 <note>
1195 In MS COM, it is the same as IErrorInfo::GetDescription.
1196 In XPCOM, it is the same as nsIException::message.
1197 </note>
1198 </desc>
1199 </attribute>
1200
1201 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1202 <desc>
1203 Next error object if there is any, or @c null otherwise.
1204 <note>
1205 In MS COM, there is no equivalent.
1206 In XPCOM, it is the same as nsIException::inner.
1207 </note>
1208 </desc>
1209 </attribute>
1210
1211 </interface>
1212
1213 <interface
1214 name="ILocalOwner" extends="$dispatched"
1215 uuid="308FF42A-DC45-49D4-A950-B1EEE5E00BB5" wsmap="suppress"
1216 >
1217 <desc>
1218 The ILocalOwner interface allows to register local objects
1219 (created without COM calls, but with new()).
1220 Once registered, calls to methods of such objects can be made
1221 from remote COM processes.
1222 The main usecase is the event callback implementation where
1223 API clients provide callback objects.
1224 </desc>
1225 <method name="setLocalObject">
1226 <desc>
1227 Set local object.
1228 </desc>
1229 <param name="object" type="$unknown" dir="in">
1230 <desc>Local object to forward requests to.
1231 If null, clears currently set local object.</desc>
1232 </param>
1233 </method>
1234 </interface>
1235
1236 <!--
1237 // IVirtualBox
1238 /////////////////////////////////////////////////////////////////////////
1239 -->
1240
1241 <interface
1242 name="IVirtualBoxCallback" extends="$unknown"
1243 uuid="9a65adf2-3ee6-406b-bca2-2b1fa05f0d0b"
1244 wsmap="suppress"
1245 >
1246
1247 <method name="onMachineStateChange">
1248 <desc>
1249 The execution state of the given machine has changed.
1250 <see>IMachine::state</see>
1251 </desc>
1252 <param name="machineId" type="uuid" mod="string" dir="in">
1253 <desc>ID of the machine this event relates to.</desc>
1254 </param>
1255 <param name="state" type="MachineState" dir="in">
1256 <desc>New execution state.</desc>
1257 </param>
1258 </method>
1259
1260 <method name="onMachineDataChange">
1261 <desc>
1262 Any of the settings of the given machine has changed.
1263 </desc>
1264 <param name="machineId" type="uuid" mod="string" dir="in">
1265 <desc>ID of the machine this event relates to.</desc>
1266 </param>
1267 </method>
1268
1269 <method name="onExtraDataCanChange">
1270 <desc>
1271 Notification when someone tries to change extra data for
1272 either the given machine or (if @c null) global extra data.
1273 This gives the chance to veto against changes.
1274 </desc>
1275 <param name="machineId" type="uuid" mod="string" dir="in">
1276 <desc>
1277 ID of the machine this event relates to
1278 (@c null ID for global extra data change requests).
1279 </desc>
1280 </param>
1281 <param name="key" type="wstring" dir="in">
1282 <desc>
1283 Extra data key for the attempted write.
1284 </desc>
1285 </param>
1286 <param name="value" type="wstring" dir="in">
1287 <desc>
1288 Extra data value for the given key.
1289 </desc>
1290 </param>
1291 <param name="error" type="wstring" dir="out">
1292 <desc>
1293 Optional error message describing the reason of the
1294 veto (ignored if this notification returns @c true).
1295 </desc>
1296 </param>
1297 <param name="allowChange" type="boolean" dir="return">
1298 <desc>
1299 Flag to indicate whether the callee agrees (@c true)
1300 or vetoes against the change (@c false).
1301 </desc>
1302 </param>
1303 </method>
1304
1305 <method name="onExtraDataChange">
1306 <desc>
1307 Notification when machine specific or global extra data
1308 has changed.
1309 </desc>
1310 <param name="machineId" type="uuid" mod="string" dir="in">
1311 <desc>
1312 ID of the machine this event relates to.
1313 Null for global extra data changes.
1314 </desc>
1315 </param>
1316 <param name="key" type="wstring" dir="in">
1317 <desc>
1318 Extra data key that has changed.
1319 </desc>
1320 </param>
1321 <param name="value" type="wstring" dir="in">
1322 <desc>
1323 Extra data value for the given key.
1324 </desc>
1325 </param>
1326 </method>
1327
1328 <method name="onMediumRegistered">
1329 <desc>
1330 The given medium was registered or unregistered
1331 within this VirtualBox installation.
1332
1333 The @a mediumType parameter describes what type of
1334 medium the specified @a mediumId refers to. Possible
1335 values are:
1336
1337 <ul>
1338 <li><link to="DeviceType_HardDisk"/>: the medium is a hard disk
1339 that, if registered, can be obtained using the
1340 <link to="IVirtualBox::getHardDisk"/> call.</li>
1341 <li><link to="DeviceType_DVD"/>: the medium is a CD/DVD image
1342 that, if registered, can be obtained using the
1343 <link to="IVirtualBox::getDVDImage"/> call.</li>
1344 <li><link to="DeviceType_Floppy"/>: the medium is a Floppy image
1345 that, if registered, can be obtained using the
1346 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1347 </ul>
1348
1349 Note that if this is a deregistration notification,
1350 there is no way to access the object representing the
1351 unregistered medium. It is supposed that the
1352 application will do required cleanup based on the
1353 @a mediumId value.
1354 </desc>
1355 <param name="mediumId" type="uuid" mod="string" dir="in">
1356 <desc>ID of the medium this event relates to.</desc>
1357 </param>
1358 <param name="mediumType" type="DeviceType" dir="in">
1359 <desc>Type of the medium this event relates to.</desc>
1360 </param>
1361 <param name="registered" type="boolean" dir="in">
1362 <desc>
1363 If @c true, the medium was registered, otherwise it was
1364 unregistered.
1365 </desc>
1366 </param>
1367 </method>
1368
1369 <method name="onMachineRegistered">
1370 <desc>
1371 The given machine was registered or unregistered
1372 within this VirtualBox installation.
1373 </desc>
1374 <param name="machineId" type="uuid" mod="string" dir="in">
1375 <desc>ID of the machine this event relates to.</desc>
1376 </param>
1377 <param name="registered" type="boolean" dir="in">
1378 <desc>
1379 If @c true, the machine was registered, otherwise it was
1380 unregistered.
1381 </desc>
1382 </param>
1383 </method>
1384
1385 <method name="onSessionStateChange">
1386 <desc>
1387 The state of the session for the given machine was changed.
1388 <see>IMachine::sessionState</see>
1389 </desc>
1390 <param name="machineId" type="uuid" mod="string" dir="in">
1391 <desc>ID of the machine this event relates to.</desc>
1392 </param>
1393 <param name="state" type="SessionState" dir="in">
1394 <desc>New session state.</desc>
1395 </param>
1396 </method>
1397
1398 <method name="onSnapshotTaken">
1399 <desc>
1400 A new snapshot of the machine has been taken.
1401 <see>ISnapshot</see>
1402 </desc>
1403 <param name="machineId" type="uuid" mod="string" dir="in">
1404 <desc>ID of the machine this event relates to.</desc>
1405 </param>
1406 <param name="snapshotId" type="uuid" mod="string" dir="in">
1407 <desc>ID of the new snapshot.</desc>
1408 </param>
1409 </method>
1410
1411 <method name="onSnapshotDiscarded">
1412 <desc>
1413 Snapshot of the given machine has been discarded.
1414
1415 <note>
1416 This notification is delivered <b>after</b> the snapshot
1417 object has been uninitialized on the server (so that any
1418 attempt to call its methods will return an error).
1419 </note>
1420
1421 <see>ISnapshot</see>
1422 </desc>
1423 <param name="machineId" type="uuid" mod="string" dir="in">
1424 <desc>ID of the machine this event relates to.</desc>
1425 </param>
1426 <param name="snapshotId" type="uuid" mod="string" dir="in">
1427 <desc>
1428 ID of the discarded snapshot. @c null means the current machine
1429 state has been discarded (restored from the current snapshot).
1430 </desc>
1431 </param>
1432 </method>
1433
1434 <method name="onSnapshotChange">
1435 <desc>
1436 Snapshot properties (name and/or description) have been changed.
1437 <see>ISnapshot</see>
1438 </desc>
1439 <param name="machineId" type="uuid" mod="string" dir="in">
1440 <desc>ID of the machine this event relates to.</desc>
1441 </param>
1442 <param name="snapshotId" type="uuid" mod="string" dir="in">
1443 <desc>ID of the changed snapshot.</desc>
1444 </param>
1445 </method>
1446
1447 <method name="onGuestPropertyChange">
1448 <desc>
1449 Notification when a guest property has changed.
1450 </desc>
1451 <param name="machineId" type="uuid" mod="string" dir="in">
1452 <desc>
1453 ID of the machine this event relates to.
1454 </desc>
1455 </param>
1456 <param name="name" type="wstring" dir="in">
1457 <desc>
1458 The name of the property that has changed.
1459 </desc>
1460 </param>
1461 <param name="value" type="wstring" dir="in">
1462 <desc>
1463 The new property value.
1464 </desc>
1465 </param>
1466 <param name="flags" type="wstring" dir="in">
1467 <desc>
1468 The new property flags.
1469 </desc>
1470 </param>
1471 </method>
1472
1473 </interface>
1474
1475 <interface
1476 name="IDHCPServer" extends="$unknown"
1477 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1478 wsmap="managed"
1479 >
1480 <desc>
1481 The IDHCPServer interface represents the vbox dhcp server configuration.
1482
1483 To enumerate all the dhcp servers on the host, use the
1484 <link to="IVirtualBox::DHCPServers"/> attribute.
1485 </desc>
1486
1487 <attribute name="enabled" type="boolean">
1488 <desc>
1489 specifies if the dhcp server is enabled
1490 </desc>
1491 </attribute>
1492
1493 <attribute name="IPAddress" type="wstring" readonly="yes">
1494 <desc>
1495 specifies server IP
1496 </desc>
1497 </attribute>
1498
1499 <attribute name="networkMask" type="wstring" readonly="yes">
1500 <desc>
1501 specifies server network mask
1502 </desc>
1503 </attribute>
1504
1505 <attribute name="networkName" type="wstring" readonly="yes">
1506 <desc>
1507 specifies internal network name the server is used for
1508 </desc>
1509 </attribute>
1510
1511 <attribute name="lowerIP" type="wstring" readonly="yes">
1512 <desc>
1513 specifies from IP adrres in server address range
1514 </desc>
1515 </attribute>
1516
1517 <attribute name="upperIP" type="wstring" readonly="yes">
1518 <desc>
1519 specifies to IP adrres in server address range
1520 </desc>
1521 </attribute>
1522
1523 <method name="setConfiguration">
1524 <desc>
1525 configures the server
1526 <result name="E_INVALIDARG">
1527 invalid configuration supplied
1528 </result>
1529 </desc>
1530 <param name="IPAddress" type="wstring" dir="in">
1531 <desc>
1532 server IP address
1533 </desc>
1534 </param>
1535 <param name="networkMask" type="wstring" dir="in">
1536 <desc>
1537 server network mask
1538 </desc>
1539 </param>
1540 <param name="FromIPAddress" type="wstring" dir="in">
1541 <desc>
1542 server From IP address for address range
1543 </desc>
1544 </param>
1545 <param name="ToIPAddress" type="wstring" dir="in">
1546 <desc>
1547 server To IP address for address range
1548 </desc>
1549 </param>
1550 </method>
1551
1552 <method name="start">
1553 <desc>
1554 Starts DHCP server process.
1555 <result name="E_FAIL">
1556 Failed to start the process.
1557 </result>
1558 </desc>
1559 <param name="networkName" type="wstring" dir="in">
1560 <desc>
1561 Name of internal network DHCP server should attach to.
1562 </desc>
1563 </param>
1564 <param name="trunkName" type="wstring" dir="in">
1565 <desc>
1566 Name of internal network trunk.
1567 </desc>
1568 </param>
1569 <param name="trunkType" type="wstring" dir="in">
1570 <desc>
1571 Type of internal network trunk.
1572 </desc>
1573 </param>
1574 </method>
1575
1576 <method name="stop">
1577 <desc>
1578 Stops DHCP server process.
1579 <result name="E_FAIL">
1580 Failed to stop the process.
1581 </result>
1582 </desc>
1583 </method>
1584 </interface>
1585
1586 <interface
1587 name="IVirtualBox" extends="$dispatched"
1588 uuid="c1b8d85d-8f44-4314-94fc-072332bdf852"
1589 wsmap="managed"
1590 >
1591 <desc>
1592 The IVirtualBox interface represents the main interface exposed by the
1593 product that provides virtual machine management.
1594
1595 An instance of IVirtualBox is required for the product to do anything
1596 useful. Even though the interface does not expose this, internally,
1597 IVirtualBox is implemented as a singleton and actually lives in the
1598 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1599 IVirtualBox can track the state of all virtual machines on a particular
1600 host, regardless of which frontend started them.
1601
1602 To enumerate all the virtual machines on the host, use the
1603 <link to="IVirtualBox::machines"/> attribute.
1604 </desc>
1605
1606 <attribute name="version" type="wstring" readonly="yes">
1607 <desc>
1608 A string representing the version number of the product. The
1609 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1610 last number represents the build number and will frequently change.
1611 </desc>
1612 </attribute>
1613
1614 <attribute name="revision" type="unsigned long" readonly="yes">
1615 <desc>
1616 The internal build revision number of the product.
1617 </desc>
1618 </attribute>
1619
1620 <attribute name="packageType" type="wstring" readonly="yes">
1621 <desc>
1622 A string representing the package type of this product. The
1623 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1624 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1625 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1626 this.
1627 </desc>
1628 </attribute>
1629
1630 <attribute name="homeFolder" type="wstring" readonly="yes">
1631 <desc>
1632 Full path to the directory where the global settings file,
1633 <tt>VirtualBox.xml</tt>, is stored.
1634
1635 In this version of VirtualBox, the value of this property is
1636 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1637 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1638 as determined by the host OS), and cannot be changed.
1639
1640 This path is also used as the base to resolve relative paths in
1641 places where relative paths are allowed (unless otherwise
1642 expressly indicated).
1643 </desc>
1644 </attribute>
1645
1646 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1647 <desc>
1648 Full name of the global settings file.
1649 The value of this property corresponds to the value of
1650 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1651 </desc>
1652 </attribute>
1653
1654 <attribute name="host" type="IHost" readonly="yes">
1655 <desc>Associated host object.</desc>
1656 </attribute>
1657
1658 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1659 <desc>Associated system information object.</desc>
1660 </attribute>
1661
1662 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1663 <desc>
1664 Array of machine objects registered within this VirtualBox instance.
1665 </desc>
1666 </attribute>
1667
1668 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1669 <desc>
1670 Array of medium objects known to this VirtualBox installation.
1671
1672 This array contains only base media. All differencing
1673 media of the given base medium can be enumerated using
1674 <link to="IMedium::children"/>.
1675 </desc>
1676 </attribute>
1677
1678 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1679 <desc>
1680 Array of CD/DVD image objects registered with this VirtualBox instance.
1681 </desc>
1682 </attribute>
1683
1684 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1685 <desc>
1686 Array of floppy image objects registered with this VirtualBox instance.
1687 </desc>
1688 </attribute>
1689
1690 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1691
1692 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1693
1694 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1695 <desc>
1696 Collection of global shared folders. Global shared folders are
1697 available to all virtual machines.
1698
1699 New shared folders are added to the collection using
1700 <link to="#createSharedFolder"/>. Existing shared folders can be
1701 removed using <link to="#removeSharedFolder"/>.
1702
1703 <note>
1704 In the current version of the product, global shared folders are not
1705 implemented and therefore this collection is always empty.
1706 </note>
1707 </desc>
1708 </attribute>
1709
1710 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1711 <desc>
1712 Associated performance collector object.
1713 </desc>
1714 </attribute>
1715
1716 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1717 <desc>
1718 dhcp server settings.
1719 </desc>
1720 </attribute>
1721
1722 <method name="createMachine">
1723 <desc>
1724 Creates a new virtual machine.
1725
1726 The new machine is created unregistered, with the initial configuration
1727 set according to the specified guest OS type. A typical sequence of
1728 actions to create a new virtual machine is as follows:
1729
1730 <ol>
1731 <li>
1732 Call this method to have a new machine created. The returned machine
1733 object will be "mutable" allowing to change any machine property.
1734 </li>
1735
1736 <li>
1737 Configure the machine using the appropriate attributes and methods.
1738 </li>
1739
1740 <li>
1741 Call <link to="IMachine::saveSettings" /> to write the settings
1742 to the machine's XML settings file. The configuration of the newly
1743 created machine will not be saved to disk until this method is
1744 called.
1745 </li>
1746
1747 <li>
1748 Call <link to="#registerMachine" /> to add the machine to the list
1749 of machines known to VirtualBox.
1750 </li>
1751 </ol>
1752
1753 You should specify valid name for the newly created machine when calling
1754 this method. See the <link to="IMachine::name"/> attribute description
1755 for more details about the machine name.
1756
1757 The specified guest OS type identifier must match an ID of one of known
1758 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1759 array.
1760
1761 Every machine has a <i>settings file</i> that is used to store
1762 the machine configuration. This file is stored in a directory called the
1763 <i>machine settings subfolder</i>. Both the settings subfolder and file
1764 will have a name that corresponds to the name of the virtual machine.
1765 You can specify where to create the machine setting subfolder using the
1766 @a baseFolder argument. The base folder can be absolute (full path) or
1767 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1768 directory</link>.
1769
1770 If @a baseFolder is a @c null or empty string (which is recommended), the
1771 <link to="ISystemProperties::defaultMachineFolder">default machine
1772 settings folder</link> will be used as a base folder for the created
1773 machine. Otherwise the given base folder will be used. In either case,
1774 the full path to the resulting settings file has the following
1775 structure:
1776 <pre>
1777 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1778 </pre>
1779
1780 Note that if the resulting settings file already exists, this method
1781 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1782
1783 Optionally, you may specify an UUID of to assign to the created machine.
1784 However, this is not recommended and you should normally pass an empty
1785 (@c null) UUID to this method so that a new UUID will be automatically
1786 generated for every created machine. You can use UUID
1787 00000000-0000-0000-0000-000000000000 as @c null value.
1788
1789 <note>
1790 There is no way to change the name of the settings file or
1791 subfolder of the created machine directly.
1792 </note>
1793
1794 <result name="VBOX_E_OBJECT_NOT_FOUND">
1795 @a osTypeId is invalid.
1796 </result>
1797 <result name="VBOX_E_FILE_ERROR">
1798 Resulting settings file name is invalid or the settings file already
1799 exists or could not be created due to an I/O error.
1800 </result>
1801 <result name="E_INVALIDARG">
1802 @a name is empty or @c null.
1803 </result>
1804 </desc>
1805
1806 <param name="name" type="wstring" dir="in">
1807 <desc>Machine name.</desc>
1808 </param>
1809 <param name="osTypeId" type="wstring" dir="in">
1810 <desc>Guest OS Type ID.</desc>
1811 </param>
1812 <param name="baseFolder" type="wstring" dir="in">
1813 <desc>Base machine folder (optional).</desc>
1814 </param>
1815 <param name="id" type="uuid" mod="string" dir="in">
1816 <desc>Machine UUID (optional).</desc>
1817 </param>
1818 <param name="machine" type="IMachine" dir="return">
1819 <desc>Created machine object.</desc>
1820 </param>
1821 </method>
1822
1823 <method name="createLegacyMachine">
1824 <desc>
1825 Creates a new virtual machine in "legacy" mode, using the specified
1826 settings file to store machine settings.
1827
1828 As opposed to machines created by <link to="#createMachine"/>,
1829 the settings file of the machine created in "legacy" mode is not
1830 automatically renamed when the machine name is changed -- it will always
1831 remain the same as specified in this method call.
1832
1833 The specified settings file name can be absolute (full path) or relative
1834 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1835 directory</link>. If the file name doesn't contain an extension, the
1836 default extension (.xml) will be appended.
1837
1838 Note that the configuration of the newly created machine is not
1839 saved to disk (and therefore no settings file is created)
1840 until <link to="IMachine::saveSettings"/> is called. If the
1841 specified settings file already exists, this method
1842 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1843
1844 See <link to="#createMachine"/> for more information.
1845
1846 @deprecated This method may be removed later. Use <link
1847 to="IVirtualBox::createMachine"/> instead.
1848
1849 <note>
1850 There is no way to change the name of the settings file
1851 of the machine created in "legacy" mode.
1852 </note>
1853
1854 <result name="VBOX_E_OBJECT_NOT_FOUND">
1855 @a osTypeId is invalid.
1856 </result>
1857 <result name="VBOX_E_FILE_ERROR">
1858 @a settingsFile is invalid or the settings file already exists or
1859 could not be created due to an I/O error.
1860 </result>
1861 <result name="E_INVALIDARG">
1862 @a name or @a settingsFile is empty or @c null.
1863 </result>
1864 </desc>
1865
1866 <param name="name" type="wstring" dir="in">
1867 <desc>Machine name.</desc>
1868 </param>
1869 <param name="osTypeId" type="wstring" dir="in">
1870 <desc>Machine OS Type ID.</desc>
1871 </param>
1872 <param name="settingsFile" type="wstring" dir="in">
1873 <desc>Name of the machine settings file.</desc>
1874 </param>
1875 <param name="id" type="uuid" mod="string" dir="in">
1876 <desc>Machine UUID (optional).</desc>
1877 </param>
1878 <param name="machine" type="IMachine" dir="return">
1879 <desc>Created machine object.</desc>
1880 </param>
1881 </method>
1882
1883 <method name="openMachine">
1884 <desc>
1885 Opens a virtual machine from the existing settings file.
1886 The opened machine remains unregistered until you call
1887 <link to="#registerMachine"/>.
1888
1889 The specified settings file name can be absolute
1890 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1891 VirtualBox home directory</link>. This file must exist
1892 and must be a valid machine settings file whose contents
1893 will be used to construct the machine object.
1894
1895 @deprecated Will be removed soon.
1896 <result name="VBOX_E_FILE_ERROR">
1897 Settings file name invalid, not found or sharing violation.
1898 </result>
1899 </desc>
1900 <param name="settingsFile" type="wstring" dir="in">
1901 <desc>
1902 Name of the machine settings file.
1903 </desc>
1904 </param>
1905 <param name="machine" type="IMachine" dir="return">
1906 <desc>Opened machine object.</desc>
1907 </param>
1908 <note>
1909 <link to="IMachine::settingsModified"/> will return
1910 @c false for the created machine, until any of machine settings
1911 are changed.
1912 </note>
1913 </method>
1914
1915 <method name="registerMachine">
1916 <desc>
1917
1918 Registers the machine previously created using
1919 <link to="#createMachine"/> or opened using
1920 <link to="#openMachine"/> within this VirtualBox installation. After
1921 successful method invocation, the
1922 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1923 to all registered callbacks.
1924
1925 <note>
1926 This method implicitly calls <link to="IMachine::saveSettings"/>
1927 to save all current machine settings before registering it.
1928 </note>
1929
1930 <result name="VBOX_E_OBJECT_NOT_FOUND">
1931 No matching virtual machine found.
1932 </result>
1933 <result name="VBOX_E_INVALID_OBJECT_STATE">
1934 Virtual machine was not created within this VirtualBox instance.
1935 </result>
1936
1937 </desc>
1938 <param name="machine" type="IMachine" dir="in"/>
1939 </method>
1940
1941 <method name="getMachine">
1942 <desc>
1943 Attempts to find a virtual machine given its UUID.
1944 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1945 instead.
1946
1947 <result name="VBOX_E_OBJECT_NOT_FOUND">
1948 Could not find registered machine matching @a id.
1949 </result>
1950
1951 </desc>
1952 <param name="id" type="uuid" mod="string" dir="in"/>
1953 <param name="machine" type="IMachine" dir="return"/>
1954 </method>
1955
1956 <method name="findMachine">
1957 <desc>
1958 Attempts to find a virtual machine given its name.
1959 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1960 instead.
1961
1962 <result name="VBOX_E_OBJECT_NOT_FOUND">
1963 Could not find registered machine matching @a name.
1964 </result>
1965
1966 </desc>
1967 <param name="name" type="wstring" dir="in"/>
1968 <param name="machine" type="IMachine" dir="return"/>
1969 </method>
1970
1971 <method name="unregisterMachine">
1972 <desc>
1973
1974 Unregisters the machine previously registered using
1975 <link to="#registerMachine"/>. After successful method invocation, the
1976 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1977 to all registered callbacks.
1978
1979 <note>
1980 The specified machine must not be in the Saved state, have an open
1981 (or a spawning) direct session associated with it, have snapshots or
1982 have any medium attached.
1983 </note>
1984
1985 <note>
1986 This method implicitly calls <link to="IMachine::saveSettings"/> to
1987 save all current machine settings before unregistering it.
1988 </note>
1989
1990 <note>
1991 If the given machine is inaccessible (see
1992 <link to="IMachine::accessible"/>), it will be unregistered and
1993 fully uninitialized right afterwards. As a result, the returned
1994 machine object will be unusable and an attempt to call
1995 <b>any</b> method will return the "Object not ready" error.
1996 </note>
1997
1998 <result name="VBOX_E_OBJECT_NOT_FOUND">
1999 Could not find registered machine matching @a id.
2000 </result>
2001 <result name="VBOX_E_INVALID_VM_STATE">
2002 Machine is in Saved state.
2003 </result>
2004 <result name="VBOX_E_INVALID_OBJECT_STATE">
2005 Machine has snapshot or open session or medium attached.
2006 </result>
2007
2008 </desc>
2009 <param name="id" type="uuid" mod="string" dir="in">
2010 <desc>UUID of the machine to unregister.</desc>
2011 </param>
2012 <param name="machine" type="IMachine" dir="return">
2013 <desc>Unregistered machine object.</desc>
2014 </param>
2015 </method>
2016
2017 <method name="createAppliance">
2018 <desc>
2019 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
2020 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
2021 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
2022 </desc>
2023 <param name="appliance" type="IAppliance" dir="return">
2024 <desc>New appliance.</desc>
2025 </param>
2026 </method>
2027
2028 <method name="createHardDisk">
2029 <desc>
2030 Creates a new base medium object that will use the given storage
2031 format and location for medium data.
2032
2033 Note that the actual storage unit is not created by this method. In
2034 order to do it, and before you are able to attach the created medium
2035 to virtual machines, you must call one of the following methods to
2036 allocate a format-specific storage unit at the specified location:
2037 <ul>
2038 <li><link to="IMedium::createBaseStorage"/></li>
2039 <li><link to="IMedium::createDiffStorage"/></li>
2040 </ul>
2041
2042 Some medium attributes, such as <link to="IMedium::id"/>, may
2043 remain uninitialized until the medium storage unit is successfully
2044 created by one of the above methods.
2045
2046 After the storage unit is successfully created, the medium gets
2047 remembered by this VirtualBox installation and will be accessible
2048 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
2049 methods. Remembered base medium are also returned as part of
2050 the <link to="#hardDisks"/> array. See IMedium for more details.
2051
2052 The list of all storage formats supported by this VirtualBox
2053 installation can be obtained using
2054 <link to="ISystemProperties::mediumFormats"/>. If the @a format
2055 attribute is empty or @c null then the default storage format
2056 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
2057 be used for creating a storage unit of the medium.
2058
2059 Note that the format of the location string is storage format specific.
2060 See <link to="IMedium::location"/>, IMedium and
2061 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2062
2063 <result name="VBOX_E_OBJECT_NOT_FOUND">
2064 @a format identifier is invalid. See
2065 <link to="ISystemProperties::mediumFormats"/>.
2066 </result>
2067 <result name="VBOX_E_FILE_ERROR">
2068 @a location is a not valid file name (for file-based formats only).
2069 </result>
2070 </desc>
2071 <param name="format" type="wstring" dir="in">
2072 <desc>
2073 Identifier of the storage format to use for the new medium.
2074 </desc>
2075 </param>
2076 <param name="location" type="wstring" dir="in">
2077 <desc>
2078 Location of the storage unit for the new medium.
2079 </desc>
2080 </param>
2081 <param name="medium" type="IMedium" dir="return">
2082 <desc>Created medium object.</desc>
2083 </param>
2084 </method>
2085
2086 <method name="openHardDisk">
2087 <desc>
2088 Opens a medium from an existing location, optionally replacing
2089 the image UUID and/or parent UUID.
2090
2091 After the medium is successfully opened by this method, it gets
2092 remembered by (known to) this VirtualBox installation and will be
2093 accessible through <link to="#getHardDisk"/> and
2094 <link to="#findHardDisk"/> methods. Remembered base media
2095 are also returned as part of the <link to="#hardDisks"/> array and can
2096 be attached to virtual machines. See IMedium for more details.
2097
2098 If a differencing medium is to be opened by this method, the
2099 operation will succeed only if its parent medium and all ancestors,
2100 if any, are already known to this VirtualBox installation (for example,
2101 were opened by this method before).
2102
2103 This method tries to guess the storage format of the specified medium
2104 by reading medium data at the specified location.
2105
2106 If @a write is ReadWrite (which it should be), the image is opened for
2107 read/write access and must have according permissions, as VirtualBox
2108 may actually write status information into the disk's metadata sections.
2109
2110 Note that write access is required for all typical image usage in VirtualBox,
2111 since VirtualBox may need to write metadata such as a UUID into the image.
2112 The only exception is opening a source image temporarily for copying and
2113 cloning when the image will quickly be closed again.
2114
2115 Note that the format of the location string is storage format specific.
2116 See <link to="IMedium::location"/>, IMedium and
2117 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2118
2119 <result name="VBOX_E_FILE_ERROR">
2120 Invalid medium storage file location or could not find the medium
2121 at the specified location.
2122 </result>
2123 <result name="VBOX_E_IPRT_ERROR">
2124 Could not get medium storage format.
2125 </result>
2126 <result name="E_INVALIDARG">
2127 Invalid medium storage format.
2128 </result>
2129
2130 </desc>
2131 <param name="location" type="wstring" dir="in">
2132 <desc>
2133 Location of the storage unit that contains medium data in one of
2134 the supported storage formats.
2135 </desc>
2136 </param>
2137 <param name="accessMode" type="AccessMode" dir="in">
2138 <desc>
2139 Determines whether to open the image in read/write or read-only mode.
2140 </desc>
2141 </param>
2142 <param name="setImageId" type="boolean" dir="in">
2143 <desc>
2144 Select whether a new image UUID is set or not.
2145 </desc>
2146 </param>
2147 <param name="imageId" type="uuid" mod="string" dir="in">
2148 <desc>
2149 New UUID for the image. If an empty string is passed, then a new
2150 UUID is automatically created. Specifying a zero UUIDs is not valid.
2151 </desc>
2152 </param>
2153 <param name="setParentId" type="boolean" dir="in">
2154 <desc>
2155 Select whether a new parent UUID is set or not.
2156 </desc>
2157 </param>
2158 <param name="parentId" type="uuid" mod="string" dir="in">
2159 <desc>
2160 New parent UUID for the image. If an empty string is passed, then a
2161 new UUID is automatically created, provided @a setParentId is
2162 @c true. A zero UUID is valid.
2163 </desc>
2164 </param>
2165 <param name="medium" type="IMedium" dir="return">
2166 <desc>Opened medium object.</desc>
2167 </param>
2168 </method>
2169
2170 <method name="getHardDisk" const="yes">
2171 <desc>
2172 Returns a medium with the given UUID.
2173
2174 The medium with the given UUID must be known to this VirtualBox
2175 installation, i.e. it must be previously created by
2176 <link to="#createHardDisk"/> or opened by <link
2177 to="#openHardDisk"/>, or attached to some known virtual machine.
2178
2179 <result name="VBOX_E_OBJECT_NOT_FOUND">
2180 No medium object matching @a id found.
2181 </result>
2182
2183 </desc>
2184 <param name="id" type="uuid" mod="string" dir="in">
2185 <desc>UUID of the medium to look for.</desc>
2186 </param>
2187 <param name="medium" type="IMedium" dir="return">
2188 <desc>Found medium object.</desc>
2189 </param>
2190 </method>
2191
2192 <method name="findHardDisk">
2193 <desc>
2194 Returns a medium that uses the given location to store medium data.
2195
2196 The given medium must be known to this VirtualBox installation, i.e.
2197 it must be previously created by
2198 <link to="#createHardDisk"/> or opened by <link
2199 to="#openHardDisk"/>, or attached to some known virtual machine.
2200
2201 The search is done by comparing the value of the @a location argument to
2202 the <link to="IMedium::location"/> attribute of each known medium.
2203
2204 For locations represented by file names in the host's file system, the
2205 requested location can be a path relative to the
2206 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2207 only a file name without any path is given, the
2208 <link to="ISystemProperties::defaultHardDiskFolder"> default medium
2209 folder</link> will be prepended to the file name before searching. Note
2210 that on case sensitive file systems, a case sensitive comparison is
2211 performed, otherwise the case of symbols in the file path is ignored.
2212
2213 <result name="VBOX_E_OBJECT_NOT_FOUND">
2214 No medium object matching @a location found.
2215 </result>
2216
2217 </desc>
2218 <param name="location" type="wstring" dir="in">
2219 <desc>Location string to search for.</desc>
2220 </param>
2221 <param name="medium" type="IMedium" dir="return">
2222 <desc>Found medium object.</desc>
2223 </param>
2224 </method>
2225
2226 <method name="openDVDImage">
2227 <desc>
2228 Opens a CD/DVD image contained in the specified file of the supported
2229 format and assigns it the given UUID.
2230
2231 After the image is successfully opened by this method, it gets
2232 remembered by (known to) this VirtualBox installation and will be
2233 accessible through <link to="#getDVDImage"/> and
2234 <link to="#findDVDImage"/> methods. Remembered images are also
2235 returned as part of the <link to="#DVDImages"/> array and can be mounted
2236 to virtual machines. See IMedium for more details.
2237
2238 See <link to="IMedium::location"/> to get more details about the format
2239 of the location string.
2240
2241 <note>
2242 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2243 </note>
2244
2245 <result name="VBOX_E_FILE_ERROR">
2246 Invalid CD/DVD image file location or could not find the CD/DVD
2247 image at the specified location.
2248 </result>
2249 <result name="VBOX_E_INVALID_OBJECT_STATE">
2250 CD/DVD image already exists in the media registry.
2251 </result>
2252
2253 </desc>
2254 <param name="location" type="wstring" dir="in">
2255 <desc>
2256 Full path to the file that contains a valid CD/DVD image.
2257 </desc>
2258 </param>
2259 <param name="id" type="uuid" mod="string" dir="in">
2260 <desc>
2261 UUID to assign to the given image within this VirtualBox installation.
2262 If an empty (@c null) UUID is specified, the system will randomly
2263 generate a new UUID.
2264 </desc>
2265 </param>
2266 <param name="image" type="IMedium" dir="return">
2267 <desc>Opened CD/DVD image object.</desc>
2268 </param>
2269 </method>
2270
2271 <method name="getDVDImage">
2272 <desc>
2273 Returns a CD/DVD image with the given UUID.
2274
2275 The image with the given UUID must be known to this VirtualBox
2276 installation, i.e. it must be previously opened by <link
2277 to="#openDVDImage"/>, or mounted to some known virtual machine.
2278
2279 <result name="VBOX_E_OBJECT_NOT_FOUND">
2280 No matching DVD image found in the media registry.
2281 </result>
2282
2283 </desc>
2284 <param name="id" type="uuid" mod="string" dir="in">
2285 <desc>UUID of the image to look for.</desc>
2286 </param>
2287 <param name="image" type="IMedium" dir="return">
2288 <desc>Found CD/DVD image object.</desc>
2289 </param>
2290 </method>
2291
2292 <method name="findDVDImage">
2293 <desc>
2294 Returns a CD/DVD image with the given image location.
2295
2296 The image with the given UUID must be known to this VirtualBox
2297 installation, i.e. it must be previously opened by <link
2298 to="#openDVDImage"/>, or mounted to some known virtual machine.
2299
2300 The search is done by comparing the value of the @a location argument to
2301 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2302
2303 The requested location can be a path relative to the
2304 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2305 only a file name without any path is given, the
2306 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2307 folder</link> will be prepended to the file name before searching. Note
2308 that on case sensitive file systems, a case sensitive comparison is
2309 performed, otherwise the case in the file path is ignored.
2310
2311 <result name="VBOX_E_FILE_ERROR">
2312 Invalid image file location.
2313 </result>
2314 <result name="VBOX_E_OBJECT_NOT_FOUND">
2315 No matching DVD image found in the media registry.
2316 </result>
2317
2318 </desc>
2319 <param name="location" type="wstring" dir="in">
2320 <desc>CD/DVD image file path to look for.</desc>
2321 </param>
2322 <param name="image" type="IMedium" dir="return">
2323 <desc>Found CD/DVD image object.</desc>
2324 </param>
2325 </method>
2326
2327 <method name="openFloppyImage">
2328 <desc>
2329 Opens a floppy image contained in the specified file of the supported
2330 format and assigns it the given UUID.
2331
2332 After the image is successfully opened by this method, it gets
2333 remembered by (known to) this VirtualBox installation and will be
2334 accessible through <link to="#getFloppyImage"/> and
2335 <link to="#findFloppyImage"/> methods. Remembered images are also
2336 returned as part of the <link to="#floppyImages"/> array and can be
2337 mounted to virtual machines. See IMedium for more details.
2338
2339 See <link to="IMedium::location"/> to get more details about the format
2340 of the location string.
2341
2342 <result name="VBOX_E_FILE_ERROR">
2343 Invalid floppy image file location or could not find the floppy
2344 image at the specified location.
2345 </result>
2346 <result name="VBOX_E_INVALID_OBJECT_STATE">
2347 Floppy image already exists in the media registry.
2348 </result>
2349
2350 <note>
2351 Currently, only raw floppy images are supported by VirtualBox.
2352 </note>
2353 </desc>
2354 <param name="location" type="wstring" dir="in">
2355 <desc>
2356 Full path to the file that contains a valid floppy image.
2357 </desc>
2358 </param>
2359 <param name="id" type="uuid" mod="string" dir="in">
2360 <desc>
2361 UUID to assign to the given image file within this VirtualBox
2362 installation. If an empty (@c null) UUID is specified, the system will
2363 randomly generate a new UUID.
2364 </desc>
2365 </param>
2366 <param name="image" type="IMedium" dir="return">
2367 <desc>Opened floppy image object.</desc>
2368 </param>
2369 </method>
2370
2371 <method name="getFloppyImage">
2372 <desc>
2373 Returns a floppy image with the given UUID.
2374
2375 The image with the given UUID must be known to this VirtualBox
2376 installation, i.e. it must be previously opened by <link
2377 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2378
2379 <result name="VBOX_E_OBJECT_NOT_FOUND">
2380 No matching floppy image found in the media registry.
2381 </result>
2382
2383 </desc>
2384 <param name="id" type="uuid" mod="string" dir="in">
2385 <desc>UUID of the image to look for.</desc>
2386 </param>
2387 <param name="image" type="IMedium" dir="return">
2388 <desc>Found floppy image object.</desc>
2389 </param>
2390 </method>
2391
2392 <method name="findFloppyImage">
2393 <desc>
2394 Returns a floppy image with the given image location.
2395
2396 The image with the given UUID must be known to this VirtualBox
2397 installation, i.e. it must be previously opened by <link
2398 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2399
2400 The search is done by comparing the value of the @a location argument to
2401 the <link to="IMedium::location"/> attribute of each known floppy image.
2402
2403 The requested location can be a path relative to the
2404 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2405 only a file name without any path is given, the
2406 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2407 folder</link> will be prepended to the file name before searching. Note
2408 that on case sensitive file systems, a case sensitive comparison is
2409 performed, otherwise the case of symbols in the file path is ignored.
2410
2411 <result name="VBOX_E_FILE_ERROR">
2412 Invalid image file location.
2413 </result>
2414 <result name="VBOX_E_OBJECT_NOT_FOUND">
2415 No matching floppy image found in the media registry.
2416 </result>
2417
2418 </desc>
2419 <param name="location" type="wstring" dir="in">
2420 <desc>Floppy image file path to look for.</desc>
2421 </param>
2422 <param name="image" type="IMedium" dir="return">
2423 <desc>Found floppy image object.</desc>
2424 </param>
2425 </method>
2426
2427 <method name="getGuestOSType">
2428 <desc>
2429 Returns an object describing the specified guest OS type.
2430
2431 The requested guest OS type is specified using a string which is a
2432 mnemonic identifier of the guest operating system, such as
2433 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2434 particular virtual machine can be read or set using the
2435 <link to="IMachine::OSTypeId"/> attribute.
2436
2437 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2438 available guest OS type objects. Each object has an
2439 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2440 the guest OS this object describes.
2441
2442 <result name="E_INVALIDARG">
2443 @a id is not a valid Guest OS type.
2444 </result>
2445
2446 </desc>
2447 <param name="id" type="uuid" mod="string" dir="in">
2448 <desc>Guest OS type ID string.</desc>
2449 </param>
2450 <param name="type" type="IGuestOSType" dir="return">
2451 <desc>Guest OS type object.</desc>
2452 </param>
2453 </method>
2454
2455 <method name="createSharedFolder">
2456 <desc>
2457 Creates a new global shared folder by associating the given logical
2458 name with the given host path, adds it to the collection of shared
2459 folders and starts sharing it. Refer to the description of
2460 <link to="ISharedFolder"/> to read more about logical names.
2461 <note>
2462 In the current implementation, this operation is not
2463 implemented.
2464 </note>
2465 </desc>
2466 <param name="name" type="wstring" dir="in">
2467 <desc>Unique logical name of the shared folder.</desc>
2468 </param>
2469 <param name="hostPath" type="wstring" dir="in">
2470 <desc>Full path to the shared folder in the host file system.</desc>
2471 </param>
2472 <param name="writable" type="boolean" dir="in">
2473 <desc>Whether the share is writable or readonly</desc>
2474 </param>
2475 </method>
2476
2477 <method name="removeSharedFolder">
2478 <desc>
2479 Removes the global shared folder with the given name previously
2480 created by <link to="#createSharedFolder"/> from the collection of
2481 shared folders and stops sharing it.
2482 <note>
2483 In the current implementation, this operation is not
2484 implemented.
2485 </note>
2486 </desc>
2487 <param name="name" type="wstring" dir="in">
2488 <desc>Logical name of the shared folder to remove.</desc>
2489 </param>
2490 </method>
2491
2492 <method name="getExtraDataKeys">
2493 <desc>
2494 Returns an array representing the global extra data keys which currently
2495 have values defined.
2496 </desc>
2497 <param name="value" type="wstring" dir="return" safearray="yes">
2498 <desc>Array of extra data keys.</desc>
2499 </param>
2500 </method>
2501
2502 <method name="getExtraData">
2503 <desc>
2504 Returns associated global extra data.
2505
2506 If the requested data @a key does not exist, this function will
2507 succeed and return an empty string in the @a value argument.
2508
2509 <result name="VBOX_E_FILE_ERROR">
2510 Settings file not accessible.
2511 </result>
2512 <result name="VBOX_E_XML_ERROR">
2513 Could not parse the settings file.
2514 </result>
2515
2516 </desc>
2517 <param name="key" type="wstring" dir="in">
2518 <desc>Name of the data key to get.</desc>
2519 </param>
2520 <param name="value" type="wstring" dir="return">
2521 <desc>Value of the requested data key.</desc>
2522 </param>
2523 </method>
2524
2525 <method name="setExtraData">
2526 <desc>
2527 Sets associated global extra data.
2528
2529 If you pass @c null or empty string as a key @a value, the given @a key
2530 will be deleted.
2531
2532 <note>
2533 Before performing the actual data change, this method will ask all
2534 registered callbacks using the
2535 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2536 notification for a permission. If one of the callbacks refuses the
2537 new value, the change will not be performed.
2538 </note>
2539 <note>
2540 On success, the
2541 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2542 is called to inform all registered callbacks about a successful data
2543 change.
2544 </note>
2545
2546 <result name="VBOX_E_FILE_ERROR">
2547 Settings file not accessible.
2548 </result>
2549 <result name="VBOX_E_XML_ERROR">
2550 Could not parse the settings file.
2551 </result>
2552 <result name="E_ACCESSDENIED">
2553 Modification request refused.
2554 </result>
2555
2556 </desc>
2557 <param name="key" type="wstring" dir="in">
2558 <desc>Name of the data key to set.</desc>
2559 </param>
2560 <param name="value" type="wstring" dir="in">
2561 <desc>Value to assign to the key.</desc>
2562 </param>
2563 </method>
2564
2565 <method name="openSession">
2566 <desc>
2567 Opens a new direct session with the given virtual machine.
2568
2569 A direct session acts as a local lock on the given VM.
2570 There can be only one direct session open at a time for every
2571 virtual machine, protecting the VM from being manipulated by
2572 conflicting actions from different processes. Only after a
2573 direct session has been opened, one can change all VM settings
2574 and execute the VM in the process space of the session object.
2575
2576 Sessions therefore can be compared to mutex semaphores that
2577 lock a given VM for modification and execution.
2578 See <link to="ISession">ISession</link> for details.
2579
2580 <note>Unless you are writing a new VM frontend, you will not
2581 want to execute a VM in the current process. To spawn a new
2582 process that executes a VM, use
2583 <link to="IVirtualBox::openRemoteSession" />
2584 instead.</note>
2585
2586 Upon successful return, the session object can be used to
2587 get access to the machine and to the VM console.
2588
2589 In VirtualBox terminology, the machine becomes "mutable" after
2590 a session has been opened. Note that the "mutable" machine
2591 object, on which you may invoke IMachine methods to change its
2592 settings, will be a different object from the immutable IMachine
2593 objects returned by various IVirtualBox methods. To obtain a
2594 mutable IMachine object (upon which you can invoke settings methods),
2595 use the <link to="ISession::machine" /> attribute.
2596
2597 One must always call <link to="ISession::close" /> to release the
2598 lock on the machine, or the machine's state will eventually be
2599 set to "Aborted".
2600
2601 In other words, to change settings on a machine, the following
2602 sequence is typically performed:
2603
2604 <ol>
2605 <li>Call this method (openSession) to have a machine locked for
2606 the current session.</li>
2607
2608 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2609
2610 <li>Change the settings of the machine.</li>
2611
2612 <li>Call <link to="IMachine::saveSettings" />.</li>
2613
2614 <li>Close the session by calling <link to="ISession::close"/>.</li>
2615 </ol>
2616
2617 <result name="E_UNEXPECTED">
2618 Virtual machine not registered.
2619 </result>
2620 <result name="E_ACCESSDENIED">
2621 Process not started by OpenRemoteSession.
2622 </result>
2623 <result name="VBOX_E_OBJECT_NOT_FOUND">
2624 No matching virtual machine found.
2625 </result>
2626 <result name="VBOX_E_INVALID_OBJECT_STATE">
2627 Session already open or being opened.
2628 </result>
2629 <result name="VBOX_E_VM_ERROR">
2630 Failed to assign machine to session.
2631 </result>
2632
2633 </desc>
2634 <param name="session" type="ISession" dir="in">
2635 <desc>
2636 Session object that will represent the opened session after
2637 successful method invocation. This object must not represent
2638 the already open session.
2639 <note>
2640 This session will be automatically closed if the
2641 VirtualBox server is terminated for some reason.
2642 </note>
2643 </desc>
2644 </param>
2645 <param name="machineId" type="uuid" mod="string" dir="in">
2646 <desc>ID of the virtual machine to open a session with.</desc>
2647 </param>
2648 </method>
2649
2650 <method name="openRemoteSession">
2651 <desc>
2652 Spawns a new process that executes a virtual machine (called a
2653 "remote session").
2654
2655 Opening a remote session causes the VirtualBox server to start a new
2656 process that opens a direct session with the given VM. As a result, the
2657 VM is locked by that direct session in the new process, preventing
2658 conflicting changes from other processes. Since sessions act as locks
2659 that prevent conflicting changes, one cannot open a remote session
2660 for a VM that already has another open session (direct or remote), or
2661 is currently in the process of opening one (see <link
2662 to="IMachine::sessionState"/>).
2663
2664 While the remote session still provides some level of control over the
2665 VM execution to the caller (using the <link to="IConsole" /> interface),
2666 not all VM settings are available for modification within the remote
2667 session context.
2668
2669 This operation can take some time (a new VM is started in a new process,
2670 for which memory and other resources need to be set up). Because of this,
2671 an <link to="IProgress" /> is returned to allow the caller to wait for this
2672 asynchronous operation to be completed. Until then, the remote session
2673 object remains in the closed state, and accessing the machine or its
2674 console through it is invalid. It is recommended to use
2675 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2676 completion.
2677
2678 As with all <link to="ISession" /> objects, it is recommended to call
2679 <link to="ISession::close" /> on the local session object once openRemoteSession()
2680 has been called. However, the session's state (see <link to="ISession::state" />)
2681 will not return to "Closed" until the remote session has also closed (i.e.
2682 until the VM is no longer running). In that case, however, the state of
2683 the session will automatically change back to "Closed".
2684
2685 Currently supported session types (values of the @a type
2686 argument) are:
2687 <ul>
2688 <li><tt>"gui"</tt>: VirtualBox Qt GUI session</li>
2689 <li><tt>"vrdp"</tt>: VirtualBox VRDP Server session</li>
2690 <li><tt>"sdl"</tt>: VirtualBox SDL GUI session</li>
2691 </ul>
2692
2693 The @a environment argument is a string containing definitions of
2694 environment variables in the following format:
2695 @code
2696 NAME[=VALUE]\n
2697 NAME[=VALUE]\n
2698 ...
2699 @endcode
2700 where <tt>\\n</tt> is the new line character. These environment
2701 variables will be appended to the environment of the VirtualBox server
2702 process. If an environment variable exists both in the server process
2703 and in this list, the value from this list takes precedence over the
2704 server's variable. If the value of the environment variable is
2705 omitted, this variable will be removed from the resulting environment.
2706 If the environment string is @c null or empty, the server environment
2707 is inherited by the started process as is.
2708
2709 <see>openExistingSession</see>
2710
2711 <result name="E_UNEXPECTED">
2712 Virtual machine not registered.
2713 </result>
2714 <result name="E_INVALIDARG">
2715 Invalid session type @a type.
2716 </result>
2717 <result name="VBOX_E_OBJECT_NOT_FOUND">
2718 No machine matching @a machineId found.
2719 </result>
2720 <result name="VBOX_E_INVALID_OBJECT_STATE">
2721 Session already open or being opened.
2722 </result>
2723 <result name="VBOX_E_IPRT_ERROR">
2724 Launching process for machine failed.
2725 </result>
2726 <result name="VBOX_E_VM_ERROR">
2727 Failed to assign machine to session.
2728 </result>
2729
2730 </desc>
2731 <param name="session" type="ISession" dir="in">
2732 <desc>
2733 Session object that will represent the opened remote session
2734 after successful method invocation (this object must not
2735 represent an already open session).
2736 </desc>
2737 </param>
2738 <param name="machineId" type="uuid" mod="string" dir="in">
2739 <desc>ID of the virtual machine to open a session with.</desc>
2740 </param>
2741 <param name="type" type="wstring" dir="in">
2742 <desc>
2743 Type of the remote session (case sensitive).
2744 </desc>
2745 </param>
2746 <param name="environment" type="wstring" dir="in">
2747 <desc>
2748 Environment to pass to the opened session.
2749 </desc>
2750 </param>
2751 <param name="progress" type="IProgress" dir="return">
2752 <desc>Progress object to track the operation completion.</desc>
2753 </param>
2754 </method>
2755
2756 <method name="openExistingSession">
2757 <desc>
2758 Opens a new remote session with the virtual machine for
2759 which a direct session is already open.
2760
2761 The remote session provides some level of control over the VM
2762 execution (using the IConsole interface) to the caller; however,
2763 within the remote session context, not all VM settings are available
2764 for modification.
2765
2766 As opposed to <link to="#openRemoteSession"/>, the number of
2767 remote sessions opened this way is not limited by the API
2768
2769 <note>
2770 It is an error to open a remote session with the machine that
2771 doesn't have an open direct session.
2772 </note>
2773
2774 <result name="E_UNEXPECTED">
2775 Virtual machine not registered.
2776 </result>
2777 <result name="VBOX_E_OBJECT_NOT_FOUND">
2778 No machine matching @a machineId found.
2779 </result>
2780 <result name="VBOX_E_INVALID_OBJECT_STATE">
2781 Session already open or being opened.
2782 </result>
2783 <result name="VBOX_E_INVALID_SESSION_STATE">
2784 Direct session state not Open.
2785 </result>
2786 <result name="VBOX_E_VM_ERROR">
2787 Failed to get console object from direct session or assign
2788 machine to session.
2789 </result>
2790
2791 <see>openRemoteSession</see>
2792 </desc>
2793 <param name="session" type="ISession" dir="in">
2794 <desc>
2795 Session object that will represent the open remote session
2796 after successful method invocation. This object must not
2797 represent an already open session.
2798 <note>
2799 This session will be automatically closed when the peer
2800 (direct) session dies or gets closed.
2801 </note>
2802 </desc>
2803 </param>
2804 <param name="machineId" type="uuid" mod="string" dir="in">
2805 <desc>ID of the virtual machine to open a session with.</desc>
2806 </param>
2807 </method>
2808
2809 <method name="registerCallback">
2810 <desc>
2811 Registers a new global VirtualBox callback. The methods of the given
2812 callback object will be called by VirtualBox when an appropriate
2813 event occurs.
2814
2815 <result name="E_INVALIDARG">
2816 A @c null callback cannot be registered.
2817 </result>
2818
2819 </desc>
2820 <param name="callback" type="IVirtualBoxCallback" dir="in">
2821 <desc>Callback object to register.</desc>
2822 </param>
2823 </method>
2824
2825 <method name="unregisterCallback">
2826 <desc>
2827 Unregisters the previously registered global VirtualBox callback.
2828
2829 <result name="E_INVALIDARG">
2830 Specified @a callback not registered.
2831 </result>
2832
2833 </desc>
2834 <param name="callback" type="IVirtualBoxCallback" dir="in">
2835 <desc>Callback object to unregister.</desc>
2836 </param>
2837 </method>
2838
2839 <method name="waitForPropertyChange">
2840 <desc>
2841 Blocks the caller until any of the properties represented by the
2842 @a what argument changes the value or until the given timeout interval
2843 expires.
2844
2845 The @a what argument is a comma separated list of property masks that
2846 describe properties the caller is interested in. The property mask is
2847 a string in the following format:
2848
2849 <pre>
2850 [[group.]subgroup.]name
2851 </pre>
2852
2853 where @c name is the property name and @c group, @c subgroup are zero
2854 or more property group specifiers. Each element (group or name) in
2855 the property mask may be either a Latin string or an asterisk symbol
2856 (@c "*") which is used to match any string for the given element. A
2857 property mask that doesn't contain asterisk symbols represents a
2858 single fully qualified property name.
2859
2860 Groups in the fully qualified property name go from more generic (the
2861 left-most part) to more specific (the right-most part). The first
2862 element is usually a name of the object the property belongs to. The
2863 second element may be either a property name, or a child object name,
2864 or an index if the preceding element names an object which is one of
2865 many objects of the same type. This way, property names form a
2866 hierarchy of properties. Here are some examples of property names:
2867
2868 <table>
2869 <tr>
2870 <td><tt>VirtualBox.version</tt></td>
2871 <td><link to="IVirtualBox::version"/> property</td>
2872 </tr>
2873 <tr>
2874 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2875 <td><link to="IMachine::name"/> property of the machine with the
2876 given UUID</td>
2877 </tr>
2878 </table>
2879
2880 Most property names directly correspond to the properties of objects
2881 (components) provided by the VirtualBox library and may be used to
2882 track changes to these properties. However, there may be
2883 pseudo-property names that don't correspond to any existing object's
2884 property directly, as well as there may be object properties that
2885 don't have a corresponding property name that is understood by this
2886 method, and therefore changes to such properties cannot be
2887 tracked. See individual object's property descriptions to get a
2888 fully qualified property name that can be used with this method (if
2889 any).
2890
2891 There is a special property mask @c "*" (i.e. a string consisting of a
2892 single asterisk symbol) that can be used to match all properties.
2893 Below are more examples of property masks:
2894
2895 <table>
2896 <tr>
2897 <td><tt>VirtualBox.*</tt></td>
2898 <td>Track all properties of the VirtualBox object</td>
2899 </tr>
2900 <tr>
2901 <td><tt>Machine.*.name</tt></td>
2902 <td>Track changes to the <link to="IMachine::name"/> property of
2903 all registered virtual machines</td>
2904 </tr>
2905 </table>
2906
2907 <note>
2908 This function is not implemented in the current version of the
2909 product.
2910 </note>
2911 </desc>
2912 <param name="what" type="wstring" dir="in">
2913 <desc>Comma separated list of property masks.</desc>
2914 </param>
2915 <param name="timeout" type="unsigned long" dir="in">
2916 <desc>
2917 Wait timeout in milliseconds.
2918 Specify -1 for an indefinite wait.
2919 </desc>
2920 </param>
2921 <param name="changed" type="wstring" dir="out">
2922 <desc>
2923 Comma separated list of properties that have been changed and caused
2924 this method to return to the caller.
2925 </desc>
2926 </param>
2927 <param name="values" type="wstring" dir="out">
2928 <desc>Reserved, not currently used.</desc>
2929 </param>
2930 </method>
2931
2932 <!--method name="createDHCPServerForInterface">
2933 <desc>
2934 Creates a dhcp server settings to be used for the given interface
2935 <result name="E_INVALIDARG">
2936 Host network interface @a name already exists.
2937 </result>
2938 </desc>
2939 <param name="interface" type="IHostNetworkInterface" dir="in">
2940 <desc>Network Interface</desc>
2941 </param>
2942 <param name="server" type="IDHCPServer" dir="out">
2943 <desc>Dhcp server settings</desc>
2944 </param>
2945 </method-->
2946
2947 <method name="createDHCPServer">
2948 <desc>
2949 Creates a dhcp server settings to be used for the given internal network name
2950 <result name="E_INVALIDARG">
2951 Host network interface @a name already exists.
2952 </result>
2953 </desc>
2954 <param name="name" type="wstring" dir="in">
2955 <desc>server name</desc>
2956 </param>
2957 <param name="server" type="IDHCPServer" dir="return">
2958 <desc>Dhcp server settings</desc>
2959 </param>
2960 </method>
2961
2962 <method name="findDHCPServerByNetworkName">
2963 <desc>
2964 Searches a dhcp server settings to be used for the given internal network name
2965 <result name="E_INVALIDARG">
2966 Host network interface @a name already exists.
2967 </result>
2968
2969 </desc>
2970 <param name="name" type="wstring" dir="in">
2971 <desc>server name</desc>
2972 </param>
2973 <param name="server" type="IDHCPServer" dir="return">
2974 <desc>Dhcp server settings</desc>
2975 </param>
2976 </method>
2977
2978 <!--method name="findDHCPServerForInterface">
2979 <desc>
2980 Searches a dhcp server settings to be used for the given interface
2981 <result name="E_INVALIDARG">
2982 Host network interface @a name already exists.
2983 </result>
2984 </desc>
2985 <param name="interface" type="IHostNetworkInterface" dir="in">
2986 <desc>Network Interface</desc>
2987 </param>
2988 <param name="server" type="IDHCPServer" dir="out">
2989 <desc>Dhcp server settings</desc>
2990 </param>
2991 </method-->
2992
2993 <method name="removeDHCPServer">
2994 <desc>
2995 Removes the dhcp server settings
2996 <result name="E_INVALIDARG">
2997 Host network interface @a name already exists.
2998 </result>
2999 </desc>
3000 <param name="server" type="IDHCPServer" dir="in">
3001 <desc>Dhcp server settings to be removed</desc>
3002 </param>
3003 </method>
3004
3005 </interface>
3006
3007 <!--
3008 // IVFSExplorer
3009 /////////////////////////////////////////////////////////////////////////
3010 -->
3011
3012 <enum
3013 name="VFSType"
3014 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
3015 >
3016 <desc>
3017 Virtual file systems supported by VFSExplorer.
3018 </desc>
3019
3020 <const name="File" value="1" />
3021 <const name="Cloud" value="2" />
3022 <const name="S3" value="3" />
3023 <const name="WebDav" value="4" />
3024 </enum>
3025
3026 <enum
3027 name="VFSFileType"
3028 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
3029 >
3030 <desc>
3031 File types known by VFSExplorer.
3032 </desc>
3033
3034 <const name="Unknown" value="1" />
3035 <const name="Fifo" value="2" />
3036 <const name="DevChar" value="3" />
3037 <const name="Directory" value="4" />
3038 <const name="DevBlock" value="5" />
3039 <const name="File" value="6" />
3040 <const name="SymLink" value="7" />
3041 <const name="Socket" value="8" />
3042 <const name="WhiteOut" value="9" />
3043 </enum>
3044
3045 <interface
3046 name="IVFSExplorer" extends="$unknown"
3047 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
3048 wsmap="managed"
3049 >
3050 <desc>
3051 The VFSExplorer interface unifies access to different file system
3052 types. This includes local file systems as well remote file systems like
3053 S3. For a list of supported types see <link to="VFSType" />.
3054 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
3055 </desc>
3056
3057 <attribute name="path" type="wstring" readonly="yes">
3058 <desc>Returns the current path in the virtual file system.</desc>
3059 </attribute>
3060
3061 <attribute name="type" type="VFSType" readonly="yes">
3062 <desc>Returns the file system type which is currently in use.</desc>
3063 </attribute>
3064
3065 <method name="update">
3066 <desc>Updates the internal list of files/directories from the
3067 current directory level. Use <link to="#entryList" /> to get the full list
3068 after a call to this method.</desc>
3069
3070 <param name="aProgress" type="IProgress" dir="return">
3071 <desc>Progress object to track the operation completion.</desc>
3072 </param>
3073 </method>
3074
3075 <method name="cd">
3076 <desc>Change the current directory level.</desc>
3077
3078 <param name="aDir" type="wstring" dir="in">
3079 <desc>The name of the directory to go in.</desc>
3080 </param>
3081
3082 <param name="aProgress" type="IProgress" dir="return">
3083 <desc>Progress object to track the operation completion.</desc>
3084 </param>
3085 </method>
3086
3087 <method name="cdUp">
3088 <desc>Go one directory upwards from the current directory level.</desc>
3089
3090 <param name="aProgress" type="IProgress" dir="return">
3091 <desc>Progress object to track the operation completion.</desc>
3092 </param>
3093 </method>
3094
3095 <method name="entryList">
3096 <desc>Returns a list of files/directories after a call to <link
3097 to="#update" />. The user is responsible for keeping this internal
3098 list up do date.</desc>
3099
3100 <param name="aNames" type="wstring" safearray="yes" dir="out">
3101 <desc>The list of names for the entries.</desc>
3102 </param>
3103
3104 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
3105 <desc>The list of types for the entries.</desc>
3106 </param>
3107 </method>
3108
3109 <method name="exists">
3110 <desc>Checks if the given file list exists in the current directory
3111 level.</desc>
3112
3113 <param name="aNames" type="wstring" safearray="yes" dir="in">
3114 <desc>The names to check.</desc>
3115 </param>
3116
3117 <param name="aExists" type="wstring" safearray="yes" dir="return">
3118 <desc>The names which exist.</desc>
3119 </param>
3120 </method>
3121
3122 <method name="remove">
3123 <desc>Deletes the given files in the current directory level.</desc>
3124
3125 <param name="aNames" type="wstring" safearray="yes" dir="in">
3126 <desc>The names to remove.</desc>
3127 </param>
3128
3129 <param name="aProgress" type="IProgress" dir="return">
3130 <desc>Progress object to track the operation completion.</desc>
3131 </param>
3132 </method>
3133
3134 </interface>
3135
3136 <!--
3137 // IAppliance
3138 /////////////////////////////////////////////////////////////////////////
3139 -->
3140
3141 <interface
3142 name="IAppliance" extends="$unknown"
3143 uuid="e3ba9ab9-ac2c-4266-8bd2-91c4bf721ceb"
3144 wsmap="managed"
3145 >
3146 <desc>
3147 Represents a platform-independent appliance in OVF format. An instance of this is returned
3148 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3149 appliances with VirtualBox.
3150
3151 The OVF standard suggests two different physical file formats:
3152
3153 <ol>
3154 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
3155 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
3156 this descriptor file references other files, as OVF appliances distributed as a set of
3157 files most likely do, those files must be in the same directory as the descriptor file.</li>
3158
3159 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
3160 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3161 files and optionally other files.
3162
3163 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3164 be added with a later version.</li>
3165 </ol>
3166
3167 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3168 <link to="IMachine" /> involves the following sequence of API calls:
3169
3170 <ol>
3171 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3172 </li>
3173
3174 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3175 would like to import. So long as this file is syntactically valid, this will succeed
3176 and return an instance of IAppliance that contains the parsed data from the OVF file.
3177 </li>
3178
3179 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3180 contents of the IAppliance attributes accordingly. These can be inspected by a
3181 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3182 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3183 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3184 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3185 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3186 The GUI can then give the user the option to confirm and/or change these suggestions.
3187 </li>
3188
3189 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3190 virtual system to override the suggestions made by the interpret() routine.
3191 </li>
3192
3193 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3194 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3195 virtual system descriptions.
3196 </li>
3197 </ol>
3198
3199 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3200
3201 <ol>
3202 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3203 an empty IAppliance object.
3204 </li>
3205
3206 <li>For each machine you would like to export, call <link to="IMachine::export" />
3207 with the IAppliance object you just created. This creates an instance of
3208 <link to="IVirtualSystemDescription" /> inside the appliance.
3209 </li>
3210
3211 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3212 virtual system to override the suggestions made by the export() routine.
3213 </li>
3214
3215 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3216 file written.</li>
3217 </ol>
3218
3219 </desc>
3220
3221 <attribute name="path" type="wstring" readonly="yes">
3222 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3223 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3224 <link to="#write" /> (for export).
3225 This attribute is empty until one of these methods has been called.
3226 </desc>
3227 </attribute>
3228
3229 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3230 <desc>
3231 Array of virtual disk definitions. One such description exists for each
3232 disk definition in the OVF; each string array item represents one such piece of
3233 disk information, with the information fields separated by tab (\\t) characters.
3234
3235 The caller should be prepared for additional fields being appended to
3236 this string in future versions of VirtualBox and therefore check for
3237 the number of tabs in the strings returned.
3238
3239 In the current version, the following eight fields are returned per string
3240 in the array:
3241
3242 <ol>
3243 <li>Disk ID (unique string identifier given to disk)</li>
3244
3245 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3246
3247 <li>Populated size (optional unsigned integer indicating the current size of the
3248 disk; can be approximate; -1 if unspecified)</li>
3249
3250 <li>Format (string identifying the disk format, typically
3251 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3252
3253 <li>Reference (where to find the disk image, typically a file name; if empty,
3254 then the disk should be created on import)</li>
3255
3256 <li>Image size (optional unsigned integer indicating the size of the image,
3257 which need not necessarily be the same as the values specified above, since
3258 the image may be compressed or sparse; -1 if not specified)</li>
3259
3260 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3261 presently unsupported and always -1)</li>
3262
3263 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3264 </ol>
3265 </desc>
3266 </attribute>
3267
3268 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3269 <desc> Array of virtual system descriptions. One such description is created
3270 for each virtual system found in the OVF.
3271 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3272 (for export) has been called.
3273 </desc>
3274 </attribute>
3275
3276 <method name="read">
3277 <desc>
3278 Reads an OVF file into the appliance object.
3279
3280 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3281 mere fact that this method returns successfully does not mean that VirtualBox supports all
3282 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3283 </desc>
3284 <param name="file" type="wstring" dir="in">
3285 <desc>
3286 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3287 on whether the appliance is distributed as a set of files or as a single file, respectively).
3288 </desc>
3289 </param>
3290 <param name="aProgress" type="IProgress" dir="return">
3291 <desc></desc>
3292 </param>
3293 </method>
3294
3295 <method name="interpret">
3296 <desc>
3297 Interprets the OVF data that was read when the appliance was constructed. After
3298 calling this method, one can inspect the
3299 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3300 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3301 the appliance.
3302
3303 Calling this method is the second step of importing an appliance into VirtualBox;
3304 see <link to="IAppliance" /> for an overview.
3305
3306 After calling this method, one should call <link to="#getWarnings" /> to find out
3307 if problems were encountered during the processing which might later lead to
3308 errors.
3309 </desc>
3310 </method>
3311
3312 <method name="importMachines">
3313 <desc>
3314 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3315 and other interfaces that match the information contained in the appliance as
3316 closely as possible, as represented by the import instructions in the
3317 <link to="#virtualSystemDescriptions" /> array.
3318
3319 Calling this method is the final step of importing an appliance into VirtualBox;
3320 see <link to="IAppliance" /> for an overview.
3321
3322 Since importing the appliance will most probably involve copying and converting
3323 disk images, which can take a long time, this method operates asynchronously and
3324 returns an IProgress object to allow the caller to monitor the progress.
3325 </desc>
3326
3327 <param name="aProgress" type="IProgress" dir="return">
3328 <desc></desc>
3329 </param>
3330 </method>
3331
3332 <method name="createVFSExplorer">
3333 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
3334
3335 <param name="aUri" type="wstring" dir="in">
3336 <desc>The URI describing the file system to use.</desc>
3337 </param>
3338
3339 <param name="aExplorer" type="IVFSExplorer" dir="return">
3340 <desc></desc>
3341 </param>
3342 </method>
3343
3344 <method name="write">
3345 <desc>
3346 Writes the contents of the appliance exports into a new OVF file.
3347
3348 Calling this method is the final step of exporting an appliance from VirtualBox;
3349 see <link to="IAppliance" /> for an overview.
3350
3351 Since exporting the appliance will most probably involve copying and converting
3352 disk images, which can take a long time, this method operates asynchronously and
3353 returns an IProgress object to allow the caller to monitor the progress.
3354 </desc>
3355 <param name="format" type="wstring" dir="in">
3356 <desc>
3357 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
3358 future versions of VirtualBox may support additional formats.
3359 </desc>
3360 </param>
3361 <param name="path" type="wstring" dir="in">
3362 <desc>
3363 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3364 on whether the appliance is distributed as a set of files or as a single file, respectively).
3365 </desc>
3366 </param>
3367 <param name="aProgress" type="IProgress" dir="return">
3368 <desc>Progress object to track the operation completion.</desc>
3369 </param>
3370 </method>
3371
3372 <method name="getWarnings">
3373 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3374
3375 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3376 <desc></desc>
3377 </param>
3378 </method>
3379
3380 </interface>
3381
3382 <enum
3383 name="VirtualSystemDescriptionType"
3384 uuid="aacc58de-5b45-4f82-ae2e-dd9a824fc3b5"
3385 >
3386 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3387 a configuration value.</desc>
3388
3389 <const name="Ignore" value="1" />
3390 <const name="OS" value="2" />
3391 <const name="Name" value="3" />
3392 <const name="Product" value="4" />
3393 <const name="Vendor" value="5" />
3394 <const name="Version" value="6" />
3395 <const name="ProductUrl" value="7" />
3396 <const name="VendorUrl" value="8" />
3397 <const name="Description" value="9" />
3398 <const name="License" value="10" />
3399 <const name="Miscellaneous" value="11" />
3400 <const name="CPU" value="12" />
3401 <const name="Memory" value="13" />
3402 <const name="HardDiskControllerIDE" value="14" />
3403 <const name="HardDiskControllerSATA" value="15" />
3404 <const name="HardDiskControllerSCSI" value="16" />
3405 <const name="HardDiskImage" value="17" />
3406 <const name="Floppy" value="18" />
3407 <const name="CDROM" value="19" />
3408 <const name="NetworkAdapter" value="20" />
3409 <const name="USBController" value="21" />
3410 <const name="SoundCard" value="22" />
3411
3412 </enum>
3413
3414 <enum
3415 name="VirtualSystemDescriptionValueType"
3416 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3417 >
3418 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
3419 type to fetch.</desc>
3420
3421 <const name="Reference" value="1" />
3422 <const name="Original" value="2" />
3423 <const name="Auto" value="3" />
3424 <const name="ExtraConfig" value="4" />
3425
3426 </enum>
3427
3428 <interface
3429 name="IVirtualSystemDescription" extends="$unknown"
3430 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3431 wsmap="managed"
3432 >
3433
3434 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3435 After <link to="IAppliance::interpret" /> has been called, that array contains
3436 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3437 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3438 into VirtualBox.
3439 </desc>
3440
3441 <attribute name="count" type="unsigned long" readonly="yes">
3442 <desc>Return the number of virtual system description entries.</desc>
3443 </attribute>
3444
3445 <method name="getDescription">
3446 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3447 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3448
3449 The list below identifies the value sets that are possible depending on the
3450 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3451 the array item with the same index in aOvfValues[] will contain the original value as contained
3452 in the OVF file (just for informational purposes), and the corresponding item in aVBoxValues[]
3453 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3454 the aExtraConfigValues[] array item may also be used.
3455
3456 <ul>
3457 <li>
3458 "OS": the guest operating system type. There must be exactly one such array item on import. The
3459 corresponding item in aVBoxValues[] contains the suggested guest operating system for VirtualBox.
3460 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3461 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF.
3462 </li>
3463 <li>
3464 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3465 if none is present on import, then an automatic name will be created from the operating system
3466 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3467 from the OVF file, and aVBoxValues[] will contain a suggestion for a unique VirtualBox
3468 <link to="IMachine" /> name that does not exist yet.
3469 </li>
3470 <li>
3471 "Description": an arbitrary description.
3472 </li>
3473 <li>
3474 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3475 code to display such a license for agreement; the Main API does not enforce any such policy.
3476 </li>
3477 <li>
3478 Miscellaneous: reserved for future use.
3479 </li>
3480 <li>
3481 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3482 </li>
3483 <li>
3484 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3485 is present on import, then VirtualBox will set a meaningful default based on the operating system
3486 type.
3487 </li>
3488 <li>
3489 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3490 has no value in aOvfValues[] or aVBoxValues[].
3491 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3492 type can use to specify which hard disk controller a virtual disk should be connected to.
3493 </li>
3494 <li>
3495 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3496 has no value in aOvfValues[] or aVBoxValues[].
3497 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3498 </li>
3499 <li>
3500 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3501 The items in aOvfValues[] and aVBoxValues[] will either be "LsiLogic" or "BusLogic".
3502 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3503 </li>
3504 <li>
3505 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3506 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3507
3508 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3509 a path since the image file should be in the same location as the OVF file itself), whereas the
3510 item in aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
3511 hard disk image. This means that on import the image will be copied and converted from the
3512 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3513 On import, the target image will also be registered with VirtualBox.
3514
3515 The matching item in the aExtraConfigValues[] array must contain a string of the following
3516 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3517 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3518 the image to. That number must be the index of an array item with one of the hard disk controller
3519 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3520 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3521 this can range from 0-3 (which VirtualBox will interpret as primary master, primary slave, secondary master and
3522 secondary slave. For SATA and SCSI controllers, the channel can range from 0-29.
3523 </li>
3524 <li>
3525 "NetworkAdapter": a network adapter. The array item in aVBoxValues[] will specify the hardware
3526 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3527 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3528 </li>
3529 <li>
3530 "USBController": a USB controller. There can be at most one such item. If and only if such an
3531 item ispresent, USB support will be enabled for the new virtual machine.
3532 </li>
3533 <li>
3534 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3535 present, sound support will be enabled for the new virtual machine. Note that the virtual
3536 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3537 may be different from the virtual soundcard expected by the appliance.
3538 </li>
3539 </ul>
3540
3541 </desc>
3542
3543 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3544 <desc></desc>
3545 </param>
3546
3547 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3548 <desc></desc>
3549 </param>
3550
3551 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3552 <desc></desc>
3553 </param>
3554
3555 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3556 <desc></desc>
3557 </param>
3558
3559 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3560 <desc></desc>
3561 </param>
3562
3563 </method>
3564
3565 <method name="getDescriptionByType">
3566 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3567 should be returned.</desc>
3568
3569 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3570 <desc></desc>
3571 </param>
3572
3573 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3574 <desc></desc>
3575 </param>
3576
3577 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3578 <desc></desc>
3579 </param>
3580
3581 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3582 <desc></desc>
3583 </param>
3584
3585 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3586 <desc></desc>
3587 </param>
3588
3589 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3590 <desc></desc>
3591 </param>
3592
3593 </method>
3594
3595 <method name="getValuesByType">
3596 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3597 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3598 values.</desc>
3599
3600 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3601 <desc></desc>
3602 </param>
3603
3604 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3605 <desc></desc>
3606 </param>
3607
3608 <param name="aValues" type="wstring" dir="return" safearray="yes">
3609 <desc></desc>
3610 </param>
3611
3612 </method>
3613
3614 <method name="setFinalValues">
3615 <desc>
3616 This method allows the appliance's user to change the configuration for the virtual
3617 system descriptions. For each array item returned from <link to="#getDescription" />,
3618 you must pass in one boolean value and one configuration value.
3619
3620 Each item in the boolean array determines whether the particular configuration item
3621 should be enabled.
3622 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3623 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3624 and SoundCard.
3625
3626 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3627 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
3628 the configuration remains unchanged. Please see the documentation for getDescription()
3629 for valid configuration values for the individual array item types. If the
3630 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
3631 </desc>
3632
3633 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3634 <desc></desc>
3635 </param>
3636
3637 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
3638 <desc></desc>
3639 </param>
3640
3641 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3642 <desc></desc>
3643 </param>
3644 </method>
3645
3646 <method name="addDescription">
3647 <desc>
3648 This method adds an additional description entry to the stack of already
3649 available descriptions for this virtual system. This is handy for writing
3650 values which aren't directly supported by VirtualBox. One example would
3651 be the License type of <link to="VirtualSystemDescriptionType" />.
3652 </desc>
3653
3654 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3655 <desc></desc>
3656 </param>
3657
3658 <param name="aVBoxValue" type="wstring" dir="in">
3659 <desc></desc>
3660 </param>
3661
3662 <param name="aExtraConfigValue" type="wstring" dir="in">
3663 <desc></desc>
3664 </param>
3665 </method>
3666 </interface>
3667
3668
3669 <!--
3670 // IMachine
3671 /////////////////////////////////////////////////////////////////////////
3672 -->
3673
3674 <interface
3675 name="IInternalMachineControl" extends="$unknown"
3676 uuid="4e2b8f0f-6575-49d2-bb19-5cd15a6ca2f0"
3677 internal="yes"
3678 wsmap="suppress"
3679 >
3680 <method name="setRemoveSavedState">
3681 <desc>
3682 Updates the flag whether saved state is removed on a machine state
3683 change from Saved to PoweredOff.
3684 </desc>
3685 <param name="aRemove" type="boolean" dir="in"/>
3686 </method>
3687
3688 <method name="updateState">
3689 <desc>
3690 Updates the VM state.
3691 <note>
3692 This operation will also update the settings file with
3693 the correct information about the saved state file
3694 and delete this file from disk when appropriate.
3695 </note>
3696 </desc>
3697 <param name="state" type="MachineState" dir="in"/>
3698 </method>
3699
3700 <method name="getIPCId">
3701 <param name="id" type="wstring" dir="return"/>
3702 </method>
3703
3704 <method name="runUSBDeviceFilters">
3705 <desc>
3706 Asks the server to run USB devices filters of the associated
3707 machine against the given USB device and tell if there is
3708 a match.
3709 <note>
3710 Intended to be used only for remote USB devices. Local
3711 ones don't require to call this method (this is done
3712 implicitly by the Host and USBProxyService).
3713 </note>
3714 </desc>
3715 <param name="device" type="IUSBDevice" dir="in"/>
3716 <param name="matched" type="boolean" dir="out"/>
3717 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3718 </method>
3719
3720 <method name="captureUSBDevice">
3721 <desc>
3722 Requests a capture of the given host USB device.
3723 When the request is completed, the VM process will
3724 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3725 notification.
3726 </desc>
3727 <param name="id" type="uuid" mod="string" dir="in"/>
3728 </method>
3729
3730 <method name="detachUSBDevice">
3731 <desc>
3732 Notification that a VM is going to detach (@a done = @c false) or has
3733 already detached (@a done = @c true) the given USB device.
3734 When the @a done = @c true request is completed, the VM process will
3735 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3736 notification.
3737 <note>
3738 In the @a done = @c true case, the server must run its own filters
3739 and filters of all VMs but this one on the detached device
3740 as if it were just attached to the host computer.
3741 </note>
3742 </desc>
3743 <param name="id" type="uuid" mod="string" dir="in"/>
3744 <param name="done" type="boolean" dir="in"/>
3745 </method>
3746
3747 <method name="autoCaptureUSBDevices">
3748 <desc>
3749 Requests a capture all matching USB devices attached to the host.
3750 When the request is completed, the VM process will
3751 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3752 notification per every captured device.
3753 </desc>
3754 </method>
3755
3756 <method name="detachAllUSBDevices">
3757 <desc>
3758 Notification that a VM that is being powered down. The done
3759 parameter indicates whether which stage of the power down
3760 we're at. When @a done = @c false the VM is announcing its
3761 intentions, while when @a done = @c true the VM is reporting
3762 what it has done.
3763 <note>
3764 In the @a done = @c true case, the server must run its own filters
3765 and filters of all VMs but this one on all detach devices as
3766 if they were just attached to the host computer.
3767 </note>
3768 </desc>
3769 <param name="done" type="boolean" dir="in"/>
3770 </method>
3771
3772 <method name="onSessionEnd">
3773 <desc>
3774 Triggered by the given session object when the session is about
3775 to close normally.
3776 </desc>
3777 <param name="session" type="ISession" dir="in">
3778 <desc>Session that is being closed</desc>
3779 </param>
3780 <param name="progress" type="IProgress" dir="return">
3781 <desc>
3782 Used to wait until the corresponding machine is actually
3783 dissociated from the given session on the server.
3784 Returned only when this session is a direct one.
3785 </desc>
3786 </param>
3787 </method>
3788
3789 <method name="beginSavingState">
3790 <desc>
3791 Called by the VM process to inform the server it wants to
3792 save the current state and stop the VM execution.
3793 </desc>
3794 <param name="progress" type="IProgress" dir="in">
3795 <desc>
3796 Progress object created by the VM process to wait until
3797 the state is saved.
3798 </desc>
3799 </param>
3800 <param name="stateFilePath" type="wstring" dir="out">
3801 <desc>
3802 File path the VM process must save the execution state to.
3803 </desc>
3804 </param>
3805 </method>
3806
3807 <method name="endSavingState">
3808 <desc>
3809 Called by the VM process to inform the server that saving
3810 the state previously requested by #beginSavingState is either
3811 successfully finished or there was a failure.
3812
3813 <result name="VBOX_E_FILE_ERROR">
3814 Settings file not accessible.
3815 </result>
3816 <result name="VBOX_E_XML_ERROR">
3817 Could not parse the settings file.
3818 </result>
3819
3820 </desc>
3821
3822 <param name="success" type="boolean" dir="in">
3823 <desc>@c true to indicate success and @c false otherwise.
3824 </desc>
3825 </param>
3826 </method>
3827
3828 <method name="adoptSavedState">
3829 <desc>
3830 Gets called by IConsole::adoptSavedState.
3831 <result name="VBOX_E_FILE_ERROR">
3832 Invalid saved state file path.
3833 </result>
3834 </desc>
3835 <param name="savedStateFile" type="wstring" dir="in">
3836 <desc>Path to the saved state file to adopt.</desc>
3837 </param>
3838 </method>
3839
3840 <method name="beginTakingSnapshot">
3841 <desc>
3842 Called from the VM process to request from the server to perform the
3843 server-side actions of creating a snapshot (creating differencing images
3844 and the snapshot object).
3845
3846 <result name="VBOX_E_FILE_ERROR">
3847 Settings file not accessible.
3848 </result>
3849 <result name="VBOX_E_XML_ERROR">
3850 Could not parse the settings file.
3851 </result>
3852 </desc>
3853 <param name="initiator" type="IConsole" dir="in">
3854 <desc>The console object that initiated this call.</desc>
3855 </param>
3856 <param name="name" type="wstring" dir="in">
3857 <desc>Snapshot name.</desc>
3858 </param>
3859 <param name="description" type="wstring" dir="in">
3860 <desc>Snapshot description.</desc>
3861 </param>
3862 <param name="consoleProgress" type="IProgress" dir="in">
3863 <desc>
3864 Progress object created by the VM process tracking the
3865 snapshot's progress. This has the following sub-operations:
3866 <ul>
3867 <li>setting up (weight 1);</li>
3868 <li>one for each medium attachment that needs a differencing image (weight 1 each);</li>
3869 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3870 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3871 <li>finishing up (weight 1)</li>
3872 </ul>
3873 </desc>
3874 </param>
3875 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3876 <desc>
3877 Whether this is an online snapshot (i.e. the machine is running).
3878 </desc>
3879 </param>
3880 <param name="stateFilePath" type="wstring" dir="out">
3881 <desc>
3882 File path the VM process must save the execution state to.
3883 </desc>
3884 </param>
3885 </method>
3886
3887 <method name="endTakingSnapshot">
3888 <desc>
3889 Called by the VM process to inform the server that the snapshot
3890 previously requested by #beginTakingSnapshot is either
3891 successfully taken or there was a failure.
3892 </desc>
3893
3894 <param name="success" type="boolean" dir="in">
3895 <desc>@c true to indicate success and @c false otherwise</desc>
3896 </param>
3897 </method>
3898
3899 <method name="deleteSnapshot">
3900 <desc>
3901 Gets called by IConsole::deleteSnapshot.
3902 <result name="VBOX_E_INVALID_OBJECT_STATE">
3903 Snapshot has more than one child snapshot.
3904 </result>
3905 </desc>
3906 <param name="initiator" type="IConsole" dir="in">
3907 <desc>The console object that initiated this call.</desc>
3908 </param>
3909 <param name="id" type="uuid" mod="string" dir="in">
3910 <desc>UUID of the snapshot to discard.</desc>
3911 </param>
3912 <param name="machineState" type="MachineState" dir="out">
3913 <desc>New machine state after this operation is started.</desc>
3914 </param>
3915 <param name="progress" type="IProgress" dir="return">
3916 <desc>Progress object to track the operation completion.</desc>
3917 </param>
3918 </method>
3919
3920 <method name="restoreSnapshot">
3921 <desc>
3922 Gets called by IConsole::RestoreSnapshot.
3923 </desc>
3924 <param name="initiator" type="IConsole" dir="in">
3925 <desc>The console object that initiated this call.</desc>
3926 </param>
3927 <param name="snapshot" type="ISnapshot" dir="in">
3928 <desc>The snapshot to restore the VM state from.</desc>
3929 </param>
3930 <param name="machineState" type="MachineState" dir="out">
3931 <desc>New machine state after this operation is started.</desc>
3932 </param>
3933 <param name="progress" type="IProgress" dir="return">
3934 <desc>Progress object to track the operation completion.</desc>
3935 </param>
3936 </method>
3937
3938 <method name="pullGuestProperties">
3939 <desc>
3940 Get the list of the guest properties matching a set of patterns along
3941 with their values, time stamps and flags and give responsibility for
3942 managing properties to the console.
3943 </desc>
3944 <param name="name" type="wstring" dir="out" safearray="yes">
3945 <desc>
3946 The names of the properties returned.
3947 </desc>
3948 </param>
3949 <param name="value" type="wstring" dir="out" safearray="yes">
3950 <desc>
3951 The values of the properties returned. The array entries match the
3952 corresponding entries in the @a name array.
3953 </desc>
3954 </param>
3955 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3956 <desc>
3957 The time stamps of the properties returned. The array entries match
3958 the corresponding entries in the @a name array.
3959 </desc>
3960 </param>
3961 <param name="flags" type="wstring" dir="out" safearray="yes">
3962 <desc>
3963 The flags of the properties returned. The array entries match the
3964 corresponding entries in the @a name array.
3965 </desc>
3966 </param>
3967 </method>
3968
3969 <method name="pushGuestProperties">
3970 <desc>
3971 Set the list of the guest properties matching a set of patterns along
3972 with their values, time stamps and flags and return responsibility for
3973 managing properties to IMachine.
3974 </desc>
3975 <param name="name" type="wstring" dir="in" safearray="yes">
3976 <desc>
3977 The names of the properties.
3978 </desc>
3979 </param>
3980 <param name="value" type="wstring" dir="in" safearray="yes">
3981 <desc>
3982 The values of the properties. The array entries match the
3983 corresponding entries in the @a name array.
3984 </desc>
3985 </param>
3986 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3987 <desc>
3988 The time stamps of the properties. The array entries match
3989 the corresponding entries in the @a name array.
3990 </desc>
3991 </param>
3992 <param name="flags" type="wstring" dir="in" safearray="yes">
3993 <desc>
3994 The flags of the properties. The array entries match the
3995 corresponding entries in the @a name array.
3996 </desc>
3997 </param>
3998 </method>
3999 <method name="pushGuestProperty">
4000 <desc>
4001 Update a single guest property in IMachine.
4002 </desc>
4003 <param name="name" type="wstring" dir="in">
4004 <desc>
4005 The name of the property to be updated.
4006 </desc>
4007 </param>
4008 <param name="value" type="wstring" dir="in">
4009 <desc>
4010 The value of the property.
4011 </desc>
4012 </param>
4013 <param name="timestamp" type="unsigned long long" dir="in">
4014 <desc>
4015 The timestamp of the property.
4016 </desc>
4017 </param>
4018 <param name="flags" type="wstring" dir="in">
4019 <desc>
4020 The flags of the property.
4021 </desc>
4022 </param>
4023 </method>
4024
4025 <method name="lockMedia">
4026 <desc>
4027 Locks all media attached to the machine for writing and parents of
4028 attached differencing media (if any) for reading. This operation is
4029 atomic so that if it fails no media is actually locked.
4030
4031 This method is intended to be called when the machine is in Starting or
4032 Restoring state. The locked media will be automatically unlocked when
4033 the machine is powered off or crashed.
4034 </desc>
4035 </method>
4036 </interface>
4037
4038 <interface
4039 name="IBIOSSettings" extends="$unknown"
4040 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
4041 wsmap="managed"
4042 >
4043 <desc>
4044 The IBIOSSettings interface represents BIOS settings of the virtual
4045 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
4046 </desc>
4047 <attribute name="logoFadeIn" type="boolean">
4048 <desc>Fade in flag for BIOS logo animation.</desc>
4049 </attribute>
4050
4051 <attribute name="logoFadeOut" type="boolean">
4052 <desc>Fade out flag for BIOS logo animation.</desc>
4053 </attribute>
4054
4055 <attribute name="logoDisplayTime" type="unsigned long">
4056 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
4057 </attribute>
4058
4059 <attribute name="logoImagePath" type="wstring">
4060 <desc>Local file system path for external BIOS image.</desc>
4061 </attribute>
4062
4063 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
4064 <desc>Mode of the BIOS boot device menu.</desc>
4065 </attribute>
4066
4067 <attribute name="ACPIEnabled" type="boolean">
4068 <desc>ACPI support flag.</desc>
4069 </attribute>
4070
4071 <attribute name="IOAPICEnabled" type="boolean">
4072 <desc>
4073 IO APIC support flag. If set, VirtualBox will provide an IO APIC
4074 and support IRQs above 15.
4075 </desc>
4076 </attribute>
4077
4078 <attribute name="timeOffset" type="long long">
4079 <desc>
4080 Offset in milliseconds from the host system time. This allows for
4081 guests running with a different system date/time than the host.
4082 It is equivalent to setting the system date/time in the BIOS except
4083 it is not an absolute value but a relative one. Guest Additions
4084 time synchronization honors this offset.
4085 </desc>
4086 </attribute>
4087
4088 <attribute name="PXEDebugEnabled" type="boolean">
4089 <desc>
4090 PXE debug logging flag. If set, VirtualBox will write extensive
4091 PXE trace information to the release log.
4092 </desc>
4093 </attribute>
4094
4095 </interface>
4096
4097 <interface
4098 name="IMachine" extends="$unknown"
4099 uuid="25472915-3da2-42f6-82f2-70a3bc74d73c"
4100 wsmap="managed"
4101 >
4102 <desc>
4103 The IMachine interface represents a virtual machine, or guest, created
4104 in VirtualBox.
4105
4106 This interface is used in two contexts. First of all, a collection of
4107 objects implementing this interface is stored in the
4108 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
4109 machines that are currently registered with this VirtualBox
4110 installation. Also, once a session has been opened for the given virtual
4111 machine (e.g. the virtual machine is running), the machine object
4112 associated with the open session can be queried from the session object;
4113 see <link to="ISession"/> for details.
4114
4115 The main role of this interface is to expose the settings of the virtual
4116 machine and provide methods to change various aspects of the virtual
4117 machine's configuration. For machine objects stored in the
4118 <link to="IVirtualBox::machines"/> collection, all attributes are
4119 read-only unless explicitly stated otherwise in individual attribute
4120 and method descriptions. In order to change a machine setting, a session
4121 for this machine must be opened using one of
4122 <link to="IVirtualBox::openSession"/>,
4123 <link to="IVirtualBox::openRemoteSession"/> or
4124 <link to="IVirtualBox::openExistingSession"/> methods. After the
4125 session has been successfully opened, a mutable machine object needs to
4126 be queried from the session object and then the desired settings changes
4127 can be applied to the returned object using IMachine attributes and
4128 methods. See the <link to="ISession"/> interface description for more
4129 information about sessions.
4130
4131 Note that IMachine does not provide methods to control virtual machine
4132 execution (such as start the machine, or power it down) -- these methods
4133 are grouped in a separate interface called <link to="IConsole" />.
4134
4135 <see>ISession, IConsole</see>
4136 </desc>
4137
4138 <attribute name="parent" type="IVirtualBox" readonly="yes">
4139 <desc>Associated parent object.</desc>
4140 </attribute>
4141
4142 <attribute name="accessible" type="boolean" readonly="yes">
4143 <desc>
4144 Whether this virtual machine is currently accessible or not.
4145
4146 A machine is always deemed accessible unless it is registered <i>and</i>
4147 its settings file cannot be read or parsed (either because the file itself
4148 is unavailable or has invalid XML contents).
4149
4150 Every time this property is read, the accessibility state of
4151 this machine is re-evaluated. If the returned value is @c false,
4152 the <link to="#accessError"/> property may be used to get the
4153 detailed error information describing the reason of
4154 inaccessibility, including XML error messages.
4155
4156 When the machine is inaccessible, only the following properties
4157 can be used on it:
4158 <ul>
4159 <li><link to="#parent"/></li>
4160 <li><link to="#id"/></li>
4161 <li><link to="#settingsFilePath"/></li>
4162 <li><link to="#accessible"/></li>
4163 <li><link to="#accessError"/></li>
4164 </ul>
4165
4166 An attempt to access any other property or method will return
4167 an error.
4168
4169 The only possible action you can perform on an inaccessible
4170 machine is to unregister it using the
4171 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4172 for the accessibility state once more by querying this
4173 property).
4174
4175 <note>
4176 In the current implementation, once this property returns
4177 @c true, the machine will never become inaccessible
4178 later, even if its settings file cannot be successfully
4179 read/written any more (at least, until the VirtualBox
4180 server is restarted). This limitation may be removed in
4181 future releases.
4182 </note>
4183 </desc>
4184 </attribute>
4185
4186 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4187 <desc>
4188 Error information describing the reason of machine
4189 inaccessibility.
4190
4191 Reading this property is only valid after the last call to
4192 <link to="#accessible"/> returned @c false (i.e. the
4193 machine is currently unaccessible). Otherwise, a @c null
4194 IVirtualBoxErrorInfo object will be returned.
4195 </desc>
4196 </attribute>
4197
4198 <attribute name="name" type="wstring">
4199 <desc>
4200 Name of the virtual machine.
4201
4202 Besides being used for human-readable identification purposes
4203 everywhere in VirtualBox, the virtual machine name is also used
4204 as a name of the machine's settings file and as a name of the
4205 subdirectory this settings file resides in. Thus, every time you
4206 change the value of this property, the settings file will be
4207 renamed once you call <link to="#saveSettings"/> to confirm the
4208 change. The containing subdirectory will be also renamed, but
4209 only if it has exactly the same name as the settings file
4210 itself prior to changing this property (for backward compatibility
4211 with previous API releases). The above implies the following
4212 limitations:
4213 <ul>
4214 <li>The machine name cannot be empty.</li>
4215 <li>The machine name can contain only characters that are valid
4216 file name characters according to the rules of the file
4217 system used to store VirtualBox configuration.</li>
4218 <li>You cannot have two or more machines with the same name
4219 if they use the same subdirectory for storing the machine
4220 settings files.</li>
4221 <li>You cannot change the name of the machine if it is running,
4222 or if any file in the directory containing the settings file
4223 is being used by another running machine or by any other
4224 process in the host operating system at a time when
4225 <link to="#saveSettings"/> is called.
4226 </li>
4227 </ul>
4228 If any of the above limitations are hit, <link to="#saveSettings"/>
4229 will return an appropriate error message explaining the exact
4230 reason and the changes you made to this machine will not be
4231 saved.
4232 <note>
4233 For "legacy" machines created using the
4234 <link to="IVirtualBox::createLegacyMachine"/> call,
4235 the above naming limitations do not apply because the
4236 machine name does not affect the settings file name.
4237 The settings file name remains the same as it was specified
4238 during machine creation and never changes.
4239 </note>
4240 </desc>
4241 </attribute>
4242
4243 <attribute name="description" type="wstring">
4244 <desc>
4245 Description of the virtual machine.
4246
4247 The description attribute can contain any text and is
4248 typically used to describe the hardware and software
4249 configuration of the virtual machine in detail (i.e. network
4250 settings, versions of the installed software and so on).
4251 </desc>
4252 </attribute>
4253
4254 <attribute name="id" type="uuid" mod="string" readonly="yes">
4255 <desc>UUID of the virtual machine.</desc>
4256 </attribute>
4257
4258 <attribute name="OSTypeId" type="wstring">
4259 <desc>
4260 User-defined identifier of the Guest OS type.
4261 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4262 an IGuestOSType object representing details about the given
4263 Guest OS type.
4264 <note>
4265 This value may differ from the value returned by
4266 <link to="IGuest::OSTypeId"/> if Guest Additions are
4267 installed to the guest OS.
4268 </note>
4269 </desc>
4270 </attribute>
4271
4272 <attribute name="HardwareVersion" type="wstring">
4273 <desc>Hardware version identifier. Internal use only for now.</desc>
4274 </attribute>
4275
4276 <attribute name="hardwareUUID" type="uuid" mod="string">
4277 <desc>
4278 The UUID presented to the guest via memory tables, hardware and guest
4279 properties. For most VMs this is the same as the @a id, but for VMs
4280 which have been cloned or teleported it may be the same as the source
4281 VM. This latter is because the guest shouldn't notice that it was
4282 cloned or teleported.
4283 </desc>
4284 </attribute>
4285
4286 <attribute name="CPUCount" type="unsigned long">
4287 <desc>Number of virtual CPUs in the VM.</desc>
4288 </attribute>
4289
4290 <attribute name="memorySize" type="unsigned long">
4291 <desc>System memory size in megabytes.</desc>
4292 </attribute>
4293
4294 <attribute name="memoryBalloonSize" type="unsigned long">
4295 <desc>Initial memory balloon size in megabytes.</desc>
4296 </attribute>
4297
4298 <attribute name="statisticsUpdateInterval" type="unsigned long">
4299 <desc>Initial interval to update guest statistics in seconds.</desc>
4300 </attribute>
4301
4302 <attribute name="VRAMSize" type="unsigned long">
4303 <desc>Video memory size in megabytes.</desc>
4304 </attribute>
4305
4306 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4307 <desc>
4308 This setting determines whether VirtualBox allows this machine to make
4309 use of the 3D graphics support available on the host.</desc>
4310 </attribute>
4311
4312 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
4313 <desc>
4314 This setting determines whether VirtualBox allows this machine to make
4315 use of the 2D video acceleration support available on the host.</desc>
4316 </attribute>
4317
4318 <attribute name="monitorCount" type="unsigned long">
4319 <desc>
4320 Number of virtual monitors.
4321 <note>
4322 Only effective on Windows XP and later guests with
4323 Guest Additions installed.
4324 </note>
4325 </desc>
4326 </attribute>
4327
4328 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4329 <desc>Object containing all BIOS settings.</desc>
4330 </attribute>
4331
4332 <attribute name="firmwareType" type="FirmwareType">
4333 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
4334 bootstrap in this VM.</desc>
4335 </attribute>
4336
4337 <attribute name="snapshotFolder" type="wstring">
4338 <desc>
4339 Full path to the directory used to store snapshot data
4340 (differencing media and saved state files) of this machine.
4341
4342 The initial value of this property is
4343 <tt>&lt;</tt><link to="#settingsFilePath">
4344 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4345 <link to="#id">machine_uuid</link>
4346 <tt>&gt;</tt>.
4347
4348 Currently, it is an error to try to change this property on
4349 a machine that has snapshots (because this would require to
4350 move possibly large files to a different location).
4351 A separate method will be available for this purpose later.
4352
4353 <note>
4354 Setting this property to @c null or to an empty string will restore
4355 the initial value.
4356 </note>
4357 <note>
4358 When setting this property, the specified path can be
4359 absolute (full path) or relative to the directory where the
4360 <link to="#settingsFilePath">machine settings file</link>
4361 is located. When reading this property, a full path is
4362 always returned.
4363 </note>
4364 <note>
4365 The specified path may not exist, it will be created
4366 when necessary.
4367 </note>
4368 </desc>
4369 </attribute>
4370
4371 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4372 <desc>VRDP server object.</desc>
4373 </attribute>
4374
4375 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
4376 <desc>Array of media attached to this machine.</desc>
4377 </attribute>
4378
4379 <attribute name="USBController" type="IUSBController" readonly="yes">
4380 <desc>
4381 Associated USB controller object.
4382
4383 <note>
4384 If USB functionality is not available in the given edition of
4385 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4386 </note>
4387 </desc>
4388 </attribute>
4389
4390 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4391 <desc>Associated audio adapter, always present.</desc>
4392 </attribute>
4393
4394 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4395 <desc>Array of storage controllers attached to this machine.</desc>
4396 </attribute>
4397
4398 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4399 <desc>
4400 Full name of the file containing machine settings data.
4401 </desc>
4402 </attribute>
4403
4404 <attribute name="settingsModified" type="boolean" readonly="yes">
4405 <desc>
4406 Whether the settings of this machine have been modified
4407 (but neither yet saved nor discarded).
4408 <note>
4409 Reading this property is only valid on instances returned
4410 by <link to="ISession::machine"/> and on new machines
4411 created by <link to="IVirtualBox::createMachine"/> or opened
4412 by <link to="IVirtualBox::openMachine"/> but not
4413 yet registered, or on unregistered machines after calling
4414 <link to="IVirtualBox::unregisterMachine"/>. For all other
4415 cases, the settings can never be modified.
4416 </note>
4417 <note>
4418 For newly created unregistered machines, the value of this
4419 property is always @c true until <link to="#saveSettings"/>
4420 is called (no matter if any machine settings have been
4421 changed after the creation or not). For opened machines
4422 the value is set to @c false (and then follows to normal rules).
4423 </note>
4424 </desc>
4425 </attribute>
4426
4427 <attribute name="sessionState" type="SessionState" readonly="yes">
4428 <desc>Current session state for this machine.</desc>
4429 </attribute>
4430
4431 <attribute name="sessionType" type="wstring" readonly="yes">
4432 <desc>
4433 Type of the session. If <link to="#sessionState"/> is
4434 SessionSpawning or SessionOpen, this attribute contains the
4435 same value as passed to the
4436 <link to="IVirtualBox::openRemoteSession"/> method in the
4437 @a type parameter. If the session was opened directly using
4438 <link to="IVirtualBox::openSession"/>, or if
4439 <link to="#sessionState"/> is SessionClosed, the value of this
4440 attribute is an empty string.
4441 </desc>
4442 </attribute>
4443
4444 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4445 <desc>
4446 Identifier of the session process. This attribute contains the
4447 platform-dependent identifier of the process that has opened a
4448 direct session for this machine using the
4449 <link to="IVirtualBox::openSession"/> call. The returned value
4450 is only valid if <link to="#sessionState"/> is SessionOpen or
4451 SessionClosing (i.e. a session is currently open or being
4452 closed) by the time this property is read.
4453 </desc>
4454 </attribute>
4455
4456 <attribute name="state" type="MachineState" readonly="yes">
4457 <desc>Current execution state of this machine.</desc>
4458 </attribute>
4459
4460 <attribute name="lastStateChange" type="long long" readonly="yes">
4461 <desc>
4462 Time stamp of the last execution state change,
4463 in milliseconds since 1970-01-01 UTC.
4464 </desc>
4465 </attribute>
4466
4467 <attribute name="stateFilePath" type="wstring" readonly="yes">
4468 <desc>
4469 Full path to the file that stores the execution state of
4470 the machine when it is in the <link to="MachineState_Saved"/> state.
4471 <note>
4472 When the machine is not in the Saved state, this attribute is
4473 an empty string.
4474 </note>
4475 </desc>
4476 </attribute>
4477
4478 <attribute name="logFolder" type="wstring" readonly="yes">
4479 <desc>
4480 Full path to the folder that stores a set of rotated log files
4481 recorded during machine execution. The most recent log file is
4482 named <tt>VBox.log</tt>, the previous log file is
4483 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4484 in the current version).
4485 </desc>
4486 </attribute>
4487
4488 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4489 <desc>
4490 Current snapshot of this machine. This is @c null if the machine
4491 currently has no snapshots. If it is not @c null, then it was
4492 set by one of <link to="Console::takeSnapshot" />,
4493 <link to="Console::deleteSnapshot" />
4494 or <link to="Console::restoreSnapshot" />, depending on which
4495 was called last. See <link to="ISnapshot"/> for details.
4496 </desc>
4497 </attribute>
4498
4499 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4500 <desc>
4501 Number of snapshots taken on this machine. Zero means the
4502 machine doesn't have any snapshots.
4503 </desc>
4504 </attribute>
4505
4506 <attribute name="currentStateModified" type="boolean" readonly="yes">
4507 <desc>
4508 Returns @c true if the current state of the machine is not
4509 identical to the state stored in the current snapshot.
4510
4511 The current state is identical to the current snapshot only
4512 directly after one of the following calls are made:
4513
4514 <ul>
4515 <li><link to="IConsole::restoreSnapshot"/>
4516 </li>
4517 <li><link to="IConsole::takeSnapshot"/> (issued on a
4518 "powered off" or "saved" machine, for which
4519 <link to="#settingsModified"/> returns @c false)
4520 </li>
4521 <li><link to="IMachine::setCurrentSnapshot"/>
4522 </li>
4523 </ul>
4524
4525 The current state remains identical until one of the following
4526 happens:
4527 <ul>
4528 <li>settings of the machine are changed</li>
4529 <li>the saved state is discarded</li>
4530 <li>the current snapshot is discarded</li>
4531 <li>an attempt to execute the machine is made</li>
4532 </ul>
4533
4534 <note>
4535 For machines that don't have snapshots, this property is
4536 always @c false.
4537 </note>
4538 </desc>
4539 </attribute>
4540
4541 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4542 <desc>
4543 Collection of shared folders for this machine (permanent shared
4544 folders). These folders are shared automatically at machine startup
4545 and available only to the guest OS installed within this machine.
4546
4547 New shared folders are added to the collection using
4548 <link to="#createSharedFolder"/>. Existing shared folders can be
4549 removed using <link to="#removeSharedFolder"/>.
4550 </desc>
4551 </attribute>
4552
4553 <attribute name="clipboardMode" type="ClipboardMode">
4554 <desc>
4555 Synchronization mode between the host OS clipboard
4556 and the guest OS clipboard.
4557 </desc>
4558 </attribute>
4559
4560 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4561 <desc>
4562 A comma-separated list of simple glob patterns. Changes to guest
4563 properties whose name matches one of the patterns will generate an
4564 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4565 </desc>
4566 </attribute>
4567
4568 <attribute name="teleporterEnabled" type="boolean">
4569 <desc>
4570 When set to @a true, the virtual machine becomes a target teleporter
4571 the next time it is powered on. This can only set to @a true when the
4572 VM is in the @a PoweredOff or @a Aborted state.
4573
4574 This property is automatically set to @a false when the VM is powered
4575 on.
4576 </desc>
4577 </attribute>
4578
4579 <attribute name="teleporterPort" type="unsigned long">
4580 <desc>
4581 The TCP port the target teleporter will listen for incoming
4582 teleportations on.
4583
4584 0 means the port is automatically selected upon power on. The actual
4585 value can be read from this property while the machine is waiting for
4586 incoming teleportations.
4587 </desc>
4588 </attribute>
4589
4590 <attribute name="teleporterAddress" type="wstring">
4591 <desc>
4592 The address the target teleporter will listen on. If set to an empty
4593 string, it will listen on all addresses.
4594 </desc>
4595 </attribute>
4596
4597 <attribute name="teleporterPassword" type="wstring">
4598 <desc>
4599 The password the to check for on the target teleporter. This is just a
4600 very basic measure to prevent simple hacks and operators accidentally
4601 beaming a virtual machine to the wrong place.
4602 </desc>
4603 </attribute>
4604
4605 <method name="setBootOrder">
4606 <desc>
4607 Puts the given device to the specified position in
4608 the boot order.
4609
4610 To indicate that no device is associated with the given position,
4611 <link to="DeviceType_Null"/> should be used.
4612
4613 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4614
4615 <result name="E_INVALIDARG">
4616 Boot @a position out of range.
4617 </result>
4618 <result name="E_NOTIMPL">
4619 Booting from USB @a device currently not supported.
4620 </result>
4621
4622 </desc>
4623 <param name="position" type="unsigned long" dir="in">
4624 <desc>
4625 Position in the boot order (@c 1 to the total number of
4626 devices the machine can boot from, as returned by
4627 <link to="ISystemProperties::maxBootPosition"/>).
4628 </desc>
4629 </param>
4630 <param name="device" type="DeviceType" dir="in">
4631 <desc>
4632 The type of the device used to boot at the given position.
4633 </desc>
4634 </param>
4635 </method>
4636
4637 <method name="getBootOrder" const="yes">
4638 <desc>
4639 Returns the device type that occupies the specified
4640 position in the boot order.
4641
4642 @todo [remove?]
4643 If the machine can have more than one device of the returned type
4644 (such as hard disks), then a separate method should be used to
4645 retrieve the individual device that occupies the given position.
4646
4647 If here are no devices at the given position, then
4648 <link to="DeviceType_Null"/> is returned.
4649
4650 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4651
4652 <result name="E_INVALIDARG">
4653 Boot @a position out of range.
4654 </result>
4655
4656 </desc>
4657 <param name="position" type="unsigned long" dir="in">
4658 <desc>
4659 Position in the boot order (@c 1 to the total number of
4660 devices the machine can boot from, as returned by
4661 <link to="ISystemProperties::maxBootPosition"/>).
4662 </desc>
4663 </param>
4664 <param name="device" type="DeviceType" dir="return">
4665 <desc>
4666 Device at the given position.
4667 </desc>
4668 </param>
4669 </method>
4670
4671 <method name="attachDevice">
4672 <desc>
4673 Attaches a device and optionally mounts a medium to the given storage
4674 controller (<link to="IStorageController" />, identified by @a name),
4675 at the indicated port and device.
4676
4677 This method is intended for managing storage devices in general (it works
4678 for both fixed and removable media). For storage devices supporting removable
4679 media (such as DVDs and floppies), you can also use <link to="IMedium::mountMedium"/>
4680 for changing the media while the machine is running.
4681
4682 For the IDE bus, the @a controllerPort parameter can be either
4683 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4684 respectively. For each of these, @a device can then be either @c 0 or @c 1,
4685 to specify the master or the slave device, respectively. (In the
4686 default configuration of virtual machines, the secondary master is
4687 used for a CD/DVD drive.)
4688
4689 For an SATA controller, @a controllerPort must be a number ranging
4690 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4691 be a number ranging from @c 0 to @c 15.
4692
4693 For both SCSI and SATA, the @a device parameter is unused and must
4694 be @c 0.
4695
4696 For fixed media such as hard disks, the given medium identifier cannot
4697 be a zero UUID. It may be a zero UUID for removable media such as DVDs
4698 and floppies.
4699
4700 After calling this returns successfully, a new instance of
4701 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4702 attachments (<link to="IMachine::mediumAttachments"/>).
4703
4704 The specified device slot must not have a device attached to it,
4705 or this method will fail.
4706
4707 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4708 information about attaching media.
4709
4710 <note>
4711 You cannot attach a device to a running machine. Also, you cannot
4712 attach a device to a newly created machine until this machine's
4713 settings are saved to disk using <link to="#saveSettings"/>.
4714 </note>
4715 <note>
4716 If the medium is being attached indirectly, a new differencing medium
4717 will implicitly be created for it and attached instead. If the
4718 changes made to the machine settings (including this indirect
4719 attachment) are later cancelled using <link to="#discardSettings"/>,
4720 this implicitly created differencing medium will implicitly
4721 be deleted.
4722 </note>
4723
4724 <result name="E_INVALIDARG">
4725 SATA device, SATA port, IDE port or IDE slot out of range.
4726 </result>
4727 <result name="VBOX_E_INVALID_OBJECT_STATE">
4728 Attempt to attach medium to an unregistered virtual machine.
4729 </result>
4730 <result name="VBOX_E_INVALID_VM_STATE">
4731 Invalid machine state.
4732 </result>
4733 <result name="VBOX_E_OBJECT_IN_USE">
4734 Hard disk already attached to this or another virtual machine.
4735 </result>
4736
4737 </desc>
4738 <param name="name" type="wstring" dir="in">
4739 <desc>Name of the storage controller to attach the device to.</desc>
4740 </param>
4741 <param name="controllerPort" type="long" dir="in">
4742 <desc>Port to attach the device to.</desc>
4743 </param>
4744 <param name="device" type="long" dir="in">
4745 <desc>Device slot in the given port to attach the device to.</desc>
4746 </param>
4747 <param name="type" type="DeviceType" dir="in">
4748 <desc>Device type of the attached device.</desc>
4749 </param>
4750 <param name="id" type="uuid" mod="string" dir="in">
4751 <desc>UUID of the medium to mount. Zero UUID means do not mount any
4752 medium.</desc>
4753 </param>
4754 </method>
4755
4756 <method name="detachDevice">
4757 <desc>
4758 Detaches the device attached to a device slot of the specified bus.
4759
4760 Detaching the device from the virtual machine is deferred. This means
4761 that the medium remains associated with the machine when this method
4762 returns and gets actually de-associated only after a successful
4763 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4764 for more detailed information about attaching media.
4765
4766 <note>
4767 You cannot detach a device from a running machine.
4768 </note>
4769 <note>
4770 Detaching differencing media implicitly created by <link
4771 to="#attachDevice"/> for the indirect attachment using this
4772 method will <b>not</b> implicitly delete them. The
4773 <link to="IMedium::deleteStorage"/> operation should be
4774 explicitly performed by the caller after the medium is successfully
4775 detached and the settings are saved with
4776 <link to="#saveSettings"/>, if it is the desired action.
4777 </note>
4778
4779 <result name="VBOX_E_INVALID_VM_STATE">
4780 Attempt to detach medium from a running virtual machine.
4781 </result>
4782 <result name="VBOX_E_OBJECT_NOT_FOUND">
4783 No medium attached to given slot/bus.
4784 </result>
4785 <result name="VBOX_E_NOT_SUPPORTED">
4786 Medium format does not support storage deletion.
4787 </result>
4788
4789 </desc>
4790 <param name="name" type="wstring" dir="in">
4791 <desc>Name of the storage controller to detach the medium from.</desc>
4792 </param>
4793 <param name="controllerPort" type="long" dir="in">
4794 <desc>Port number to detach the medium from.</desc>
4795 </param>
4796 <param name="device" type="long" dir="in">
4797 <desc>Device slot number to detach the medium from.</desc>
4798 </param>
4799 </method>
4800
4801 <method name="passthroughDevice">
4802 <desc>
4803 Sets the passthrough mode of an existing DVD device. Changing the
4804 setting while the VM is running is forbidden. The setting is only used
4805 if at VM start the device is configured as a host DVD drive, in all
4806 other cases it is ignored. The device must already exist; see
4807 <link to="IMachine::attachDevice"/> for how to attach a new device.
4808
4809 The @a controllerPort and @a device parameters specify the device slot and
4810 have have the same meaning as with <link to="IMachine::attachDevice" />.
4811
4812 <result name="E_INVALIDARG">
4813 SATA device, SATA port, IDE port or IDE slot out of range.
4814 </result>
4815 <result name="VBOX_E_INVALID_OBJECT_STATE">
4816 Attempt to modify an unregistered virtual machine.
4817 </result>
4818 <result name="VBOX_E_INVALID_VM_STATE">
4819 Invalid machine state.
4820 </result>
4821
4822 </desc>
4823 <param name="name" type="wstring" dir="in">
4824 <desc>Name of the storage controller.</desc>
4825 </param>
4826 <param name="controllerPort" type="long" dir="in">
4827 <desc>Storage controller port.</desc>
4828 </param>
4829 <param name="device" type="long" dir="in">
4830 <desc>Device slot in the given port.</desc>
4831 </param>
4832 <param name="passthrough" type="boolean" dir="in">
4833 <desc>New value for the passthrough setting.</desc>
4834 </param>
4835 </method>
4836
4837 <method name="mountMedium">
4838 <desc>
4839 Mounts a medium (<link to="IMedium" />, identified
4840 by the given UUID @a id) to the given storage controller
4841 (<link to="IStorageController" />, identified by @a name),
4842 at the indicated port and device. The device must already exist;
4843 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4844
4845 This method is intended only for managing removable media, where the
4846 device is fixed but media is changeable at runtime (such as DVDs
4847 and floppies). It cannot be used for fixed media such as hard disks.
4848
4849 The @a controllerPort and @a device parameters specify the device slot and
4850 have have the same meaning as with <link to="IMachine::attachDevice" />.
4851
4852 The specified device slot can have a medium mounted, which will be
4853 unmounted first. Specifying a zero UUID (or an empty string) for
4854 @a medium does just an unmount.
4855
4856 See <link to="IMedium"/> for more detailed information about
4857 attaching media.
4858
4859 <result name="E_INVALIDARG">
4860 SATA device, SATA port, IDE port or IDE slot out of range.
4861 </result>
4862 <result name="VBOX_E_INVALID_OBJECT_STATE">
4863 Attempt to attach medium to an unregistered virtual machine.
4864 </result>
4865 <result name="VBOX_E_INVALID_VM_STATE">
4866 Invalid machine state.
4867 </result>
4868 <result name="VBOX_E_OBJECT_IN_USE">
4869 Medium already attached to this or another virtual machine.
4870 </result>
4871
4872 </desc>
4873 <param name="name" type="wstring" dir="in">
4874 <desc>Name of the storage controller to attach the medium to.</desc>
4875 </param>
4876 <param name="controllerPort" type="long" dir="in">
4877 <desc>Port to attach the medium to.</desc>
4878 </param>
4879 <param name="device" type="long" dir="in">
4880 <desc>Device slot in the given port to attach the medium to.</desc>
4881 </param>
4882 <param name="medium" type="uuid" mod="string" dir="in">
4883 <desc>UUID of the medium to attach. A zero UUID means unmount the
4884 currently mounted medium.</desc>
4885 </param>
4886 </method>
4887
4888 <method name="getMedium" const="yes">
4889 <desc>
4890 Returns the virtual medium attached to a device slot of the specified
4891 bus.
4892
4893 Note that if the medium was indirectly attached by
4894 <link to="#mountMedium"/> to the given device slot then this
4895 method will return not the same object as passed to the
4896 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4897 more detailed information about mounting a medium.
4898
4899 <result name="VBOX_E_OBJECT_NOT_FOUND">
4900 No medium attached to given slot/bus.
4901 </result>
4902
4903 </desc>
4904 <param name="name" type="wstring" dir="in">
4905 <desc>Name of the storage controller the medium is attached to.</desc>
4906 </param>
4907 <param name="controllerPort" type="long" dir="in">
4908 <desc>Port to query.</desc>
4909 </param>
4910 <param name="device" type="long" dir="in">
4911 <desc>Device slot in the given port to query.</desc>
4912 </param>
4913 <param name="medium" type="IMedium" dir="return">
4914 <desc>Attached medium object.</desc>
4915 </param>
4916 </method>
4917
4918 <method name="getMediumAttachmentsOfController" const="yes">
4919 <desc>
4920 Returns an array of medium attachments which are attached to the
4921 the controller with the given name.
4922
4923 <result name="VBOX_E_OBJECT_NOT_FOUND">
4924 A storage controller with given name doesn't exist.
4925 </result>
4926 </desc>
4927 <param name="name" type="wstring" dir="in"/>
4928 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4929 </method>
4930
4931 <method name="getMediumAttachment" const="yes">
4932 <desc>
4933 Returns a medium attachment which corresponds to the controller with
4934 the given name, on the given port and device slot.
4935
4936 <result name="VBOX_E_OBJECT_NOT_FOUND">
4937 No attachment exists for the given controller/port/device combination.
4938 </result>
4939 </desc>
4940 <param name="name" type="wstring" dir="in"/>
4941 <param name="controllerPort" type="long" dir="in"/>
4942 <param name="device" type="long" dir="in"/>
4943 <param name="attachment" type="IMediumAttachment" dir="return"/>
4944 </method>
4945
4946 <method name="getNetworkAdapter" const="yes">
4947 <desc>
4948 Returns the network adapter associated with the given slot.
4949 Slots are numbered sequentially, starting with zero. The total
4950 number of adapters per machine is defined by the
4951 <link to="ISystemProperties::networkAdapterCount"/> property,
4952 so the maximum slot number is one less than that property's value.
4953
4954 <result name="E_INVALIDARG">
4955 Invalid @a slot number.
4956 </result>
4957
4958 </desc>
4959 <param name="slot" type="unsigned long" dir="in"/>
4960 <param name="adapter" type="INetworkAdapter" dir="return"/>
4961 </method>
4962
4963 <method name="addStorageController">
4964 <desc>
4965 Adds a new storage controller (SCSI or SATA controller) to the
4966 machine and returns it as an instance of
4967 <link to="IStorageController" />.
4968
4969 @a name identifies the controller for subsequent calls such as
4970 <link to="#getStorageControllerByName" />,
4971 <link to="#getStorageControllerByInstance" />,
4972 <link to="#removeStorageController" />,
4973 <link to="#attachDevice" /> or <link to="#mountMedium" />.
4974
4975 After the controller has been added, you can set its exact
4976 type by setting the <link to="IStorageController::controllerType" />.
4977
4978 <result name="VBOX_E_OBJECT_IN_USE">
4979 A storage controller with given name exists already.
4980 </result>
4981 <result name="E_INVALIDARG">
4982 Invalid @a controllerType.
4983 </result>
4984 </desc>
4985 <param name="name" type="wstring" dir="in"/>
4986 <param name="connectionType" type="StorageBus" dir="in"/>
4987 <param name="controller" type="IStorageController" dir="return"/>
4988 </method>
4989
4990 <method name="getStorageControllerByName" const="yes">
4991 <desc>
4992 Returns a storage controller with the given name.
4993
4994 <result name="VBOX_E_OBJECT_NOT_FOUND">
4995 A storage controller with given name doesn't exist.
4996 </result>
4997 </desc>
4998 <param name="name" type="wstring" dir="in"/>
4999 <param name="storageController" type="IStorageController" dir="return"/>
5000 </method>
5001
5002 <method name="getStorageControllerByInstance" const="yes">
5003 <desc>
5004 Returns a storage controller with the given instance number.
5005
5006 <result name="VBOX_E_OBJECT_NOT_FOUND">
5007 A storage controller with given instance number doesn't exist.
5008 </result>
5009 </desc>
5010 <param name="instance" type="unsigned long" dir="in"/>
5011 <param name="storageController" type="IStorageController" dir="return"/>
5012 </method>
5013
5014 <method name="removeStorageController">
5015 <desc>
5016 Removes a storage controller from the machine.
5017
5018 <result name="VBOX_E_OBJECT_NOT_FOUND">
5019 A storage controller with given name doesn't exist.
5020 </result>
5021 </desc>
5022 <param name="name" type="wstring" dir="in"/>
5023 </method>
5024
5025 <method name="getSerialPort" const="yes">
5026 <desc>
5027 Returns the serial port associated with the given slot.
5028 Slots are numbered sequentially, starting with zero. The total
5029 number of serial ports per machine is defined by the
5030 <link to="ISystemProperties::serialPortCount"/> property,
5031 so the maximum slot number is one less than that property's value.
5032
5033 <result name="E_INVALIDARG">
5034 Invalid @a slot number.
5035 </result>
5036
5037 </desc>
5038 <param name="slot" type="unsigned long" dir="in"/>
5039 <param name="port" type="ISerialPort" dir="return"/>
5040 </method>
5041
5042 <method name="getParallelPort" const="yes">
5043 <desc>
5044 Returns the parallel port associated with the given slot.
5045 Slots are numbered sequentially, starting with zero. The total
5046 number of parallel ports per machine is defined by the
5047 <link to="ISystemProperties::parallelPortCount"/> property,
5048 so the maximum slot number is one less than that property's value.
5049
5050 <result name="E_INVALIDARG">
5051 Invalid @a slot number.
5052 </result>
5053
5054 </desc>
5055 <param name="slot" type="unsigned long" dir="in"/>
5056 <param name="port" type="IParallelPort" dir="return"/>
5057 </method>
5058
5059 <method name="getExtraDataKeys">
5060 <desc>
5061 Returns an array representing the machine-specific extra data keys
5062 which currently have values defined.
5063 </desc>
5064 <param name="value" type="wstring" dir="return" safearray="yes">
5065 <desc>Array of extra data keys.</desc>
5066 </param>
5067 </method>
5068
5069 <method name="getExtraData">
5070 <desc>
5071 Returns associated machine-specific extra data.
5072
5073 If the requested data @a key does not exist, this function will
5074 succeed and return an empty string in the @a value argument.
5075
5076 <result name="VBOX_E_FILE_ERROR">
5077 Settings file not accessible.
5078 </result>
5079 <result name="VBOX_E_XML_ERROR">
5080 Could not parse the settings file.
5081 </result>
5082
5083 </desc>
5084 <param name="key" type="wstring" dir="in">
5085 <desc>Name of the data key to get.</desc>
5086 </param>
5087 <param name="value" type="wstring" dir="return">
5088 <desc>Value of the requested data key.</desc>
5089 </param>
5090 </method>
5091
5092 <method name="setExtraData">
5093 <desc>
5094 Sets associated machine-specific extra data.
5095
5096 If you pass @c null or an empty string as a key @a value, the given
5097 @a key will be deleted.
5098
5099 <note>
5100 Before performing the actual data change, this method will ask all
5101 registered callbacks using the
5102 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
5103 notification for a permission. If one of the callbacks refuses the
5104 new value, the change will not be performed.
5105 </note>
5106 <note>
5107 On success, the
5108 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
5109 is called to inform all registered callbacks about a successful data
5110 change.
5111 </note>
5112 <note>
5113 This method can be called outside the machine session and therefore
5114 it's a caller's responsibility to handle possible race conditions
5115 when several clients change the same key at the same time.
5116 </note>
5117
5118 <result name="VBOX_E_FILE_ERROR">
5119 Settings file not accessible.
5120 </result>
5121 <result name="VBOX_E_XML_ERROR">
5122 Could not parse the settings file.
5123 </result>
5124
5125 </desc>
5126 <param name="key" type="wstring" dir="in">
5127 <desc>Name of the data key to set.</desc>
5128 </param>
5129 <param name="value" type="wstring" dir="in">
5130 <desc>Value to assign to the key.</desc>
5131 </param>
5132 </method>
5133
5134 <method name="getCpuProperty" const="yes">
5135 <desc>
5136 Returns the virtual CPU boolean value of the specified property.
5137
5138 <result name="E_INVALIDARG">
5139 Invalid property.
5140 </result>
5141
5142 </desc>
5143 <param name="property" type="CpuPropertyType" dir="in">
5144 <desc>
5145 Property type to query.
5146 </desc>
5147 </param>
5148 <param name="value" type="boolean" dir="return">
5149 <desc>
5150 Property value.
5151 </desc>
5152 </param>
5153 </method>
5154
5155 <method name="setCpuProperty">
5156 <desc>
5157 Sets the virtual CPU boolean value of the specified property.
5158
5159 <result name="E_INVALIDARG">
5160 Invalid property.
5161 </result>
5162
5163 </desc>
5164 <param name="property" type="CpuPropertyType" dir="in">
5165 <desc>
5166 Property type to query.
5167 </desc>
5168 </param>
5169 <param name="value" type="boolean" dir="in">
5170 <desc>
5171 Property value.
5172 </desc>
5173 </param>
5174 </method>
5175
5176 <method name="getCpuIdLeaf" const="yes">
5177 <desc>
5178 Returns the virtual CPU cpuid information for the specified leaf.
5179
5180 Currently supported index values for cpuid:
5181 Standard CPUID leafs: 0 - 0xA
5182 Extended CPUID leafs: 0x80000000 - 0x8000000A
5183
5184 See the Intel and AMD programmer's manuals for detailed information
5185 about the cpuid instruction and its leafs.
5186 <result name="E_INVALIDARG">
5187 Invalid id.
5188 </result>
5189
5190 </desc>
5191 <param name="id" type="unsigned long" dir="in">
5192 <desc>
5193 Cpuid leaf index.
5194 </desc>
5195 </param>
5196 <param name="valEax" type="unsigned long" dir="out">
5197 <desc>
5198 Cpuid leaf value for register eax.
5199 </desc>
5200 </param>
5201 <param name="valEbx" type="unsigned long" dir="out">
5202 <desc>
5203 Cpuid leaf value for register ebx.
5204 </desc>
5205 </param>
5206 <param name="valEcx" type="unsigned long" dir="out">
5207 <desc>
5208 Cpuid leaf value for register ecx.
5209 </desc>
5210 </param>
5211 <param name="valEdx" type="unsigned long" dir="out">
5212 <desc>
5213 Cpuid leaf value for register edx.
5214 </desc>
5215 </param>
5216 </method>
5217
5218 <method name="setCpuIdLeaf" const="yes">
5219 <desc>
5220 Sets the virtual CPU cpuid information for the specified leaf. Note that these values
5221 are not passed unmodified. VirtualBox clears features that it doesn't support.
5222
5223 Currently supported index values for cpuid:
5224 Standard CPUID leafs: 0 - 0xA
5225 Extended CPUID leafs: 0x80000000 - 0x8000000A
5226
5227 See the Intel and AMD programmer's manuals for detailed information
5228 about the cpuid instruction and its leafs.
5229
5230 Do not use this method unless you know exactly what you're doing. Misuse can lead to
5231 random crashes inside VMs.
5232 <result name="E_INVALIDARG">
5233 Invalid id.
5234 </result>
5235
5236 </desc>
5237 <param name="id" type="unsigned long" dir="in">
5238 <desc>
5239 Cpuid leaf index.
5240 </desc>
5241 </param>
5242 <param name="valEax" type="unsigned long" dir="in">
5243 <desc>
5244 Cpuid leaf value for register eax.
5245 </desc>
5246 </param>
5247 <param name="valEbx" type="unsigned long" dir="in">
5248 <desc>
5249 Cpuid leaf value for register ebx.
5250 </desc>
5251 </param>
5252 <param name="valEcx" type="unsigned long" dir="in">
5253 <desc>
5254 Cpuid leaf value for register ecx.
5255 </desc>
5256 </param>
5257 <param name="valEdx" type="unsigned long" dir="in">
5258 <desc>
5259 Cpuid leaf value for register edx.
5260 </desc>
5261 </param>
5262 </method>
5263
5264 <method name="removeCpuIdLeaf" const="yes">
5265 <desc>
5266 Removes the virtual CPU cpuid leaf for the specified index
5267
5268 <result name="E_INVALIDARG">
5269 Invalid id.
5270 </result>
5271
5272 </desc>
5273 <param name="id" type="unsigned long" dir="in">
5274 <desc>
5275 Cpuid leaf index.
5276 </desc>
5277 </param>
5278 </method>
5279
5280 <method name="removeAllCpuIdLeafs" const="yes">
5281 <desc>
5282 Removes all the virtual CPU cpuid leafs
5283 </desc>
5284 </method>
5285
5286 <method name="getHWVirtExProperty" const="yes">
5287 <desc>
5288 Returns the value of the specified hardware virtualization boolean property.
5289
5290 <result name="E_INVALIDARG">
5291 Invalid property.
5292 </result>
5293
5294 </desc>
5295 <param name="property" type="HWVirtExPropertyType" dir="in">
5296 <desc>
5297 Property type to query.
5298 </desc>
5299 </param>
5300 <param name="value" type="boolean" dir="return">
5301 <desc>
5302 Property value.
5303 </desc>
5304 </param>
5305 </method>
5306
5307 <method name="setHWVirtExProperty">
5308 <desc>
5309 Sets a new value for the specified hardware virtualization boolean property.
5310
5311 <result name="E_INVALIDARG">
5312 Invalid property.
5313 </result>
5314
5315 </desc>
5316 <param name="property" type="HWVirtExPropertyType" dir="in">
5317 <desc>
5318 Property type to set.
5319 </desc>
5320 </param>
5321 <param name="value" type="boolean" dir="in">
5322 <desc>
5323 New property value.
5324 </desc>
5325 </param>
5326 </method>
5327
5328 <method name="saveSettings">
5329 <desc>
5330 Saves any changes to machine settings made since the session
5331 has been opened or a new machine has been created, or since the
5332 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
5333 For registered machines, new settings become visible to all
5334 other VirtualBox clients after successful invocation of this
5335 method.
5336 <note>
5337 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
5338 notification event after the configuration has been successfully
5339 saved (only for registered machines).
5340 </note>
5341 <note>
5342 Calling this method is only valid on instances returned
5343 by <link to="ISession::machine"/> and on new machines
5344 created by <link to="IVirtualBox::createMachine"/> but not
5345 yet registered, or on unregistered machines after calling
5346 <link to="IVirtualBox::unregisterMachine"/>.
5347 </note>
5348
5349 <result name="VBOX_E_FILE_ERROR">
5350 Settings file not accessible.
5351 </result>
5352 <result name="VBOX_E_XML_ERROR">
5353 Could not parse the settings file.
5354 </result>
5355 <result name="E_ACCESSDENIED">
5356 Modification request refused.
5357 </result>
5358
5359 </desc>
5360 </method>
5361
5362 <method name="discardSettings">
5363 <desc>
5364 Discards any changes to the machine settings made since the session
5365 has been opened or since the last call to <link to="#saveSettings"/>
5366 or <link to="#discardSettings"/>.
5367 <note>
5368 Calling this method is only valid on instances returned
5369 by <link to="ISession::machine"/> and on new machines
5370 created by <link to="IVirtualBox::createMachine"/> or
5371 opened by <link to="IVirtualBox::openMachine"/> but not
5372 yet registered, or on unregistered machines after calling
5373 <link to="IVirtualBox::unregisterMachine"/>.
5374 </note>
5375
5376 <result name="VBOX_E_INVALID_VM_STATE">
5377 Virtual machine is not mutable.
5378 </result>
5379
5380 </desc>
5381 </method>
5382
5383 <method name="deleteSettings">
5384 <desc>
5385 Deletes the settings file of this machine from disk.
5386 The machine must not be registered in order for this operation
5387 to succeed.
5388 <note>
5389 <link to="#settingsModified"/> will return @c true after this
5390 method successfully returns.
5391 </note>
5392 <note>
5393 Calling this method is only valid on instances returned
5394 by <link to="ISession::machine"/> and on new machines
5395 created by <link to="IVirtualBox::createMachine"/> or
5396 opened by <link to="IVirtualBox::openMachine"/> but not
5397 yet registered, or on unregistered machines after calling
5398 <link to="IVirtualBox::unregisterMachine"/>.
5399 </note>
5400 <note>
5401 The deleted machine settings file can be restored (saved again)
5402 by calling <link to="#saveSettings"/>.
5403 </note>
5404
5405 <result name="VBOX_E_INVALID_VM_STATE">
5406 Cannot delete settings of a registered machine or
5407 machine not mutable.
5408 </result>
5409 <result name="VBOX_E_IPRT_ERROR">
5410 Could not delete the settings file.
5411 </result>
5412
5413 </desc>
5414 </method>
5415
5416 <method name="export">
5417 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5418 steps required to export VirtualBox machines to OVF.
5419 </desc>
5420
5421 <param name="aAppliance" type="IAppliance" dir="in">
5422 <desc>Appliance to export this machine to.</desc>
5423 </param>
5424 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5425 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5426 </param>
5427 </method >
5428
5429 <method name="getSnapshot">
5430 <desc>
5431 Returns a snapshot of this machine with the given UUID.
5432 A @c null UUID can be used to obtain the first snapshot
5433 taken on this machine. This is useful if you want to traverse
5434 the whole tree of snapshots starting from the root.
5435
5436 <result name="VBOX_E_OBJECT_NOT_FOUND">
5437 Virtual machine has no snapshots or snapshot not found.
5438 </result>
5439
5440 </desc>
5441 <param name="id" type="uuid" mod="string" dir="in">
5442 <desc>UUID of the snapshot to get</desc>
5443 </param>
5444 <param name="snapshot" type="ISnapshot" dir="return">
5445 <desc>Snapshot object with the given UUID.</desc>
5446 </param>
5447 </method>
5448
5449 <method name="findSnapshot">
5450 <desc>
5451 Returns a snapshot of this machine with the given name.
5452
5453 <result name="VBOX_E_OBJECT_NOT_FOUND">
5454 Virtual machine has no snapshots or snapshot not found.
5455 </result>
5456
5457 </desc>
5458 <param name="name" type="wstring" dir="in">
5459 <desc>Name of the snapshot to find</desc>
5460 </param>
5461 <param name="snapshot" type="ISnapshot" dir="return">
5462 <desc>Snapshot object with the given name.</desc>
5463 </param>
5464 </method>
5465
5466 <method name="setCurrentSnapshot">
5467 <desc>
5468 Sets the current snapshot of this machine.
5469 <note>
5470 In the current implementation, this operation is not
5471 implemented.
5472 </note>
5473 </desc>
5474 <param name="id" type="uuid" mod="string" dir="in">
5475 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5476 </param>
5477 </method>
5478
5479 <method name="createSharedFolder">
5480 <desc>
5481 Creates a new permanent shared folder by associating the given logical
5482 name with the given host path, adds it to the collection of shared
5483 folders and starts sharing it. Refer to the description of
5484 <link to="ISharedFolder"/> to read more about logical names.
5485
5486 <result name="VBOX_E_OBJECT_IN_USE">
5487 Shared folder already exists.
5488 </result>
5489 <result name="VBOX_E_FILE_ERROR">
5490 Shared folder @a hostPath not accessible.
5491 </result>
5492
5493 </desc>
5494 <param name="name" type="wstring" dir="in">
5495 <desc>Unique logical name of the shared folder.</desc>
5496 </param>
5497 <param name="hostPath" type="wstring" dir="in">
5498 <desc>Full path to the shared folder in the host file system.</desc>
5499 </param>
5500 <param name="writable" type="boolean" dir="in">
5501 <desc>Whether the share is writable or readonly</desc>
5502 </param>
5503 </method>
5504
5505 <method name="removeSharedFolder">
5506 <desc>
5507 Removes the permanent shared folder with the given name previously
5508 created by <link to="#createSharedFolder"/> from the collection of
5509 shared folders and stops sharing it.
5510
5511 <result name="VBOX_E_INVALID_VM_STATE">
5512 Virtual machine is not mutable.
5513 </result>
5514 <result name="VBOX_E_OBJECT_NOT_FOUND">
5515 Shared folder @a name does not exist.
5516 </result>
5517
5518 </desc>
5519 <param name="name" type="wstring" dir="in">
5520 <desc>Logical name of the shared folder to remove.</desc>
5521 </param>
5522 </method>
5523
5524 <method name="canShowConsoleWindow">
5525 <desc>
5526 Returns @c true if the VM console process can activate the
5527 console window and bring it to foreground on the desktop of
5528 the host PC.
5529 <note>
5530 This method will fail if a session for this machine is not
5531 currently open.
5532 </note>
5533
5534 <result name="VBOX_E_INVALID_VM_STATE">
5535 Machine session is not open.
5536 </result>
5537
5538 </desc>
5539 <param name="canShow" type="boolean" dir="return">
5540 <desc>
5541 @c true if the console window can be shown and @c false otherwise.
5542 </desc>
5543 </param>
5544 </method>
5545
5546 <method name="showConsoleWindow">
5547 <desc>
5548 Activates the console window and brings it to foreground on
5549 the desktop of the host PC. Many modern window managers on
5550 many platforms implement some sort of focus stealing
5551 prevention logic, so that it may be impossible to activate
5552 a window without the help of the currently active
5553 application. In this case, this method will return a non-zero
5554 identifier that represents the top-level window of the VM
5555 console process. The caller, if it represents a currently
5556 active process, is responsible to use this identifier (in a
5557 platform-dependent manner) to perform actual window
5558 activation.
5559 <note>
5560 This method will fail if a session for this machine is not
5561 currently open.
5562 </note>
5563
5564 <result name="VBOX_E_INVALID_VM_STATE">
5565 Machine session is not open.
5566 </result>
5567
5568 </desc>
5569 <param name="winId" type="unsigned long long" dir="return">
5570 <desc>
5571 Platform-dependent identifier of the top-level VM console
5572 window, or zero if this method has performed all actions
5573 necessary to implement the <i>show window</i> semantics for
5574 the given platform and/or VirtualBox front-end.
5575 </desc>
5576 </param>
5577 </method>
5578
5579 <method name="getGuestProperty">
5580 <desc>
5581 Reads an entry from the machine's guest property store.
5582
5583 <result name="VBOX_E_INVALID_VM_STATE">
5584 Machine session is not open.
5585 </result>
5586
5587 </desc>
5588 <param name="name" type="wstring" dir="in">
5589 <desc>
5590 The name of the property to read.
5591 </desc>
5592 </param>
5593 <param name="value" type="wstring" dir="out">
5594 <desc>
5595 The value of the property. If the property does not exist then this
5596 will be empty.
5597 </desc>
5598 </param>
5599 <param name="timestamp" type="unsigned long long" dir="out">
5600 <desc>
5601 The time at which the property was last modified, as seen by the
5602 server process.
5603 </desc>
5604 </param>
5605 <param name="flags" type="wstring" dir="out">
5606 <desc>
5607 Additional property parameters, passed as a comma-separated list of
5608 "name=value" type entries.
5609 </desc>
5610 </param>
5611 </method>
5612
5613 <method name="getGuestPropertyValue">
5614 <desc>
5615 Reads a value from the machine's guest property store.
5616
5617 <result name="VBOX_E_INVALID_VM_STATE">
5618 Machine session is not open.
5619 </result>
5620
5621 </desc>
5622 <param name="property" type="wstring" dir="in">
5623 <desc>
5624 The name of the property to read.
5625 </desc>
5626 </param>
5627 <param name="value" type="wstring" dir="return">
5628 <desc>
5629 The value of the property. If the property does not exist then this
5630 will be empty.
5631 </desc>
5632 </param>
5633 </method>
5634
5635 <method name="getGuestPropertyTimestamp">
5636 <desc>
5637 Reads a property timestamp from the machine's guest property store.
5638
5639 <result name="VBOX_E_INVALID_VM_STATE">
5640 Machine session is not open.
5641 </result>
5642
5643 </desc>
5644 <param name="property" type="wstring" dir="in">
5645 <desc>
5646 The name of the property to read.
5647 </desc>
5648 </param>
5649 <param name="value" type="unsigned long long" dir="return">
5650 <desc>
5651 The timestamp. If the property does not exist then this will be
5652 empty.
5653 </desc>
5654 </param>
5655 </method>
5656
5657 <method name="setGuestProperty">
5658 <desc>
5659 Sets, changes or deletes an entry in the machine's guest property
5660 store.
5661
5662 <result name="E_ACCESSDENIED">
5663 Property cannot be changed.
5664 </result>
5665 <result name="E_INVALIDARG">
5666 Invalid @a flags.
5667 </result>
5668 <result name="VBOX_E_INVALID_VM_STATE">
5669 Virtual machine is not mutable or session not open.
5670 </result>
5671 <result name="VBOX_E_INVALID_OBJECT_STATE">
5672 Cannot set transient property when machine not running.
5673 </result>
5674
5675 </desc>
5676 <param name="property" type="wstring" dir="in">
5677 <desc>
5678 The name of the property to set, change or delete.
5679 </desc>
5680 </param>
5681 <param name="value" type="wstring" dir="in">
5682 <desc>
5683 The new value of the property to set, change or delete. If the
5684 property does not yet exist and value is non-empty, it will be
5685 created. If the value is @c null or empty, the property will be
5686 deleted if it exists.
5687 </desc>
5688 </param>
5689 <param name="flags" type="wstring" dir="in">
5690 <desc>
5691 Additional property parameters, passed as a comma-separated list of
5692 "name=value" type entries.
5693 </desc>
5694 </param>
5695 </method>
5696
5697 <method name="setGuestPropertyValue">
5698 <desc>
5699 Sets, changes or deletes a value in the machine's guest property
5700 store. The flags field will be left unchanged or created empty for a
5701 new property.
5702
5703 <result name="E_ACCESSDENIED">
5704 Property cannot be changed.
5705 </result>
5706 <result name="VBOX_E_INVALID_VM_STATE">
5707 Virtual machine is not mutable or session not open.
5708 </result>
5709 <result name="VBOX_E_INVALID_OBJECT_STATE">
5710 Cannot set transient property when machine not running.
5711 </result>
5712 </desc>
5713
5714 <param name="property" type="wstring" dir="in">
5715 <desc>
5716 The name of the property to set, change or delete.
5717 </desc>
5718 </param>
5719 <param name="value" type="wstring" dir="in">
5720 <desc>
5721 The new value of the property to set, change or delete. If the
5722 property does not yet exist and value is non-empty, it will be
5723 created. If the value is @c null or empty, the property will be
5724 deleted if it exists.
5725 </desc>
5726 </param>
5727 </method>
5728
5729 <method name="enumerateGuestProperties">
5730 <desc>
5731 Return a list of the guest properties matching a set of patterns along
5732 with their values, time stamps and flags.
5733 </desc>
5734 <param name="patterns" type="wstring" dir="in">
5735 <desc>
5736 The patterns to match the properties against, separated by '|'
5737 characters. If this is empty or @c null, all properties will match.
5738 </desc>
5739 </param>
5740 <param name="name" type="wstring" dir="out" safearray="yes">
5741 <desc>
5742 The names of the properties returned.
5743 </desc>
5744 </param>
5745 <param name="value" type="wstring" dir="out" safearray="yes">
5746 <desc>
5747 The values of the properties returned. The array entries match the
5748 corresponding entries in the @a name array.
5749 </desc>
5750 </param>
5751 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5752 <desc>
5753 The time stamps of the properties returned. The array entries match
5754 the corresponding entries in the @a name array.
5755 </desc>
5756 </param>
5757 <param name="flags" type="wstring" dir="out" safearray="yes">
5758 <desc>
5759 The flags of the properties returned. The array entries match the
5760 corresponding entries in the @a name array.
5761 </desc>
5762 </param>
5763 </method>
5764
5765 <method name="querySavedThumbnailSize">
5766 <desc>
5767 Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.
5768 </desc>
5769 <param name="size" type="unsigned long" dir="out">
5770 <desc>
5771 Size of buffer required to store the bitmap.
5772 </desc>
5773 </param>
5774 <param name="width" type="unsigned long" dir="out">
5775 <desc>
5776 Bitmap width.
5777 </desc>
5778 </param>
5779 <param name="height" type="unsigned long" dir="out">
5780 <desc>
5781 Bitmap height.
5782 </desc>
5783 </param>
5784 </method>
5785
5786 <method name="readSavedThumbnail">
5787 <desc>
5788 Reads a saved thumbnail bitmap from saved state.
5789 A pixel consists of 4 bytes in order: B, G, R, 0.
5790
5791 <note>This API can be used only by the COM/XPCOM C++ API as it
5792 requires pointer support. Use <link to="#readSavedThumbnailToArray" />
5793 with other language bindings.
5794 </note>
5795 </desc>
5796 <param name="address" type="octet" mod="ptr" dir="in">
5797 <desc>
5798 Buffer allocated by caller. Size must be at least equal
5799 to value returned by querySavedThumbnailSize.
5800 </desc>
5801 </param>
5802 <param name="size" type="unsigned long" dir="in">
5803 <desc>
5804 Size of buffer allocated by caller. If the buffer is too small,
5805 the method fails.
5806 </desc>
5807 </param>
5808 </method>
5809
5810 <method name="readSavedThumbnailToArray">
5811 <desc>
5812 Thumbnail is retrieved to an array of bytes in uncompressed 32-bit RGBA format.
5813 A pixel consists of 4 bytes in order: R, G, B, 0xFF.
5814
5815 This API is slow, but could be the only option to get image
5816 for scriptable languages not allowed to manipulate with addresses
5817 directly.
5818 </desc>
5819 <param name="width" type="unsigned long" dir="out">
5820 <desc>
5821 Bitmap width.
5822 </desc>
5823 </param>
5824 <param name="height" type="unsigned long" dir="out">
5825 <desc>
5826 Bitmap height.
5827 </desc>
5828 </param>
5829 <param name="data" type="octet" dir="return" safearray="yes">
5830 <desc>
5831 Array with resulting bitmap data.
5832 </desc>
5833 </param>
5834 </method>
5835
5836 <method name="querySavedScreenshotPNGSize">
5837 <desc>
5838 Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.
5839 </desc>
5840 <param name="size" type="unsigned long" dir="out">
5841 <desc>
5842 Size of buffer required to store the PNG binary data.
5843 </desc>
5844 </param>
5845 <param name="width" type="unsigned long" dir="out">
5846 <desc>
5847 Image width.
5848 </desc>
5849 </param>
5850 <param name="height" type="unsigned long" dir="out">
5851 <desc>
5852 Image height.
5853 </desc>
5854 </param>
5855 </method>
5856
5857 <method name="readSavedScreenshotPNG">
5858 <desc>
5859 Reads a saved screenshot in PNG format from saved state.
5860
5861 <note>This API can be used only by the COM/XPCOM C++ API as it
5862 requires pointer support. Use <link to="#readSavedScreenshotPNGToArray" />
5863 with other language bindings.
5864 </note>
5865 </desc>
5866 <param name="address" type="octet" mod="ptr" dir="in">
5867 <desc>
5868 Buffer allocated by caller. Size must be at least equal
5869 to value returned by querySavedScreenshotPNGSize.
5870 </desc>
5871 </param>
5872 <param name="size" type="unsigned long" dir="in">
5873 <desc>
5874 Size of buffer allocated by caller. If the buffer is too small,
5875 the method fails.
5876 </desc>
5877 </param>
5878 </method>
5879
5880 <method name="readSavedScreenshotPNGToArray">
5881 <desc>
5882 Screenshot in PNG format is retrieved to an array of bytes.
5883
5884 This API is slow, but could be the only option to get image
5885 for scriptable languages not allowed to manipulate with addresses
5886 directly.
5887 </desc>
5888 <param name="width" type="unsigned long" dir="out">
5889 <desc>
5890 Image width.
5891 </desc>
5892 </param>
5893 <param name="height" type="unsigned long" dir="out">
5894 <desc>
5895 Image height.
5896 </desc>
5897 </param>
5898 <param name="data" type="octet" dir="return" safearray="yes">
5899 <desc>
5900 Array with resulting PNG data.
5901 </desc>
5902 </param>
5903 </method>
5904</interface>
5905
5906 <!--
5907 // IConsole
5908 /////////////////////////////////////////////////////////////////////////
5909 -->
5910
5911 <interface
5912 name="IConsoleCallback" extends="$unknown"
5913 uuid="d6239535-bda2-4ef7-83f4-f4722e4a3b2c"
5914 wsmap="suppress"
5915 >
5916
5917 <desc>
5918 This interface is used by a client of the Main API that need to
5919 be notified of events. For example, a graphical user interface
5920 can use this to learn about machine state changes so they can
5921 update the list of virtual machines without having to rely
5922 on polling.
5923
5924 Whenever relevant events occur in VirtualBox, the callbacks in
5925 objects of this interface are called. In order for this to be
5926 useful, a client needs to create its own subclass that implements
5927 this interface in which the methods for the relevant callbacks
5928 are overridden. An instance of this subclass interface can then
5929 be passed to <link to="IConsole::registerCallback" />.
5930 </desc>
5931
5932 <method name="onMousePointerShapeChange">
5933 <desc>
5934 Notification when the guest mouse pointer shape has
5935 changed. The new shape data is given.
5936 </desc>
5937 <param name="visible" type="boolean" dir="in">
5938 <desc>
5939 Flag whether the pointer is visible.
5940 </desc>
5941 </param>
5942 <param name="alpha" type="boolean" dir="in">
5943 <desc>
5944 Flag whether the pointer has an alpha channel.
5945 </desc>
5946 </param>
5947 <param name="xHot" type="unsigned long" dir="in">
5948 <desc>
5949 The pointer hot spot x coordinate.
5950 </desc>
5951 </param>
5952 <param name="yHot" type="unsigned long" dir="in">
5953 <desc>
5954 The pointer hot spot y coordinate.
5955 </desc>
5956 </param>
5957 <param name="width" type="unsigned long" dir="in">
5958 <desc>
5959 Width of the pointer shape in pixels.
5960 </desc>
5961 </param>
5962 <param name="height" type="unsigned long" dir="in">
5963 <desc>
5964 Height of the pointer shape in pixels.
5965 </desc>
5966 </param>
5967 <param name="shape" type="octet" mod="ptr" dir="in">
5968 <desc>
5969 Address of the shape buffer.
5970
5971 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5972 followed by a 32-bpp XOR (color) mask.
5973
5974 For pointers without alpha channel the XOR mask pixels are 32
5975 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5976 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5977
5978 An AND mask is used for pointers with alpha channel, so if the
5979 callback does not support alpha, the pointer could be
5980 displayed as a normal color pointer.
5981
5982 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5983 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5984 height</tt>. The padding bits at the end of each scanline are
5985 undefined.
5986
5987 The XOR mask follows the AND mask on the next 4-byte aligned
5988 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5989 Bytes in the gap between the AND and the XOR mask are undefined.
5990 The XOR mask scanlines have no gap between them and the size of
5991 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5992
5993 <note>
5994 If @a shape is 0, only the pointer visibility is changed.
5995 </note>
5996 </desc>
5997 </param>
5998 </method>
5999
6000 <method name="onMouseCapabilityChange">
6001 <desc>
6002 Notification when the mouse capabilities reported by the
6003 guest have changed. The new capabilities are passed.
6004 </desc>
6005 <param name="supportsAbsolute" type="boolean" dir="in"/>
6006 <param name="needsHostCursor" type="boolean" dir="in"/>
6007 </method>
6008
6009 <method name="onKeyboardLedsChange">
6010 <desc>
6011 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
6012 to alter the state of the keyboard LEDs.
6013 </desc>
6014 <param name="numLock" type="boolean" dir="in"/>
6015 <param name="capsLock" type="boolean" dir="in"/>
6016 <param name="scrollLock" type="boolean" dir="in"/>
6017 </method>
6018
6019 <method name="onStateChange">
6020 <desc>
6021 Notification when the execution state of the machine has changed.
6022 The new state will be given.
6023 </desc>
6024 <param name="state" type="MachineState" dir="in"/>
6025 </method>
6026
6027 <method name="onAdditionsStateChange">
6028 <desc>
6029 Notification when a Guest Additions property changes.
6030 Interested callees should query IGuest attributes to
6031 find out what has changed.
6032 </desc>
6033 </method>
6034
6035 <method name="onNetworkAdapterChange">
6036 <desc>
6037 Notification when a property of one of the
6038 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
6039 changes. Interested callees should use INetworkAdapter methods and
6040 attributes to find out what has changed.
6041 </desc>
6042 <param name="networkAdapter" type="INetworkAdapter" dir="in">
6043 <desc>Network adapter that is subject to change.</desc>
6044 </param>
6045 </method>
6046
6047 <method name="onSerialPortChange">
6048 <desc>
6049 Notification when a property of one of the
6050 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
6051 Interested callees should use ISerialPort methods and attributes
6052 to find out what has changed.
6053 </desc>
6054 <param name="serialPort" type="ISerialPort" dir="in">
6055 <desc>Serial port that is subject to change.</desc>
6056 </param>
6057 </method>
6058
6059 <method name="onParallelPortChange">
6060 <desc>
6061 Notification when a property of one of the
6062 virtual <link to="IMachine::getParallelPort">parallel ports</link>
6063 changes. Interested callees should use ISerialPort methods and
6064 attributes to find out what has changed.
6065 </desc>
6066 <param name="parallelPort" type="IParallelPort" dir="in">
6067 <desc>Parallel port that is subject to change.</desc>
6068 </param>
6069 </method>
6070
6071 <method name="onStorageControllerChange">
6072 <desc>
6073 Notification when a property of one of the
6074 virtual <link to="IMachine::storageControllers">storage controllers</link>
6075 changes. Interested callees should query the corresponding collections
6076 to find out what has changed.
6077 </desc>
6078 </method>
6079
6080 <method name="onMediumChange">
6081 <desc>
6082 Notification when a
6083 <link to="IMachine::mediumAttachments">medium attachment</link>
6084 changes.
6085 </desc>
6086 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
6087 <desc>Medium attachment that is subject to change.</desc>
6088 </param>
6089 </method>
6090
6091 <method name="onVRDPServerChange">
6092 <desc>
6093 Notification when a property of the
6094 <link to="IMachine::VRDPServer">VRDP server</link> changes.
6095 Interested callees should use IVRDPServer methods and attributes to
6096 find out what has changed.
6097 </desc>
6098 </method>
6099
6100 <method name="onRemoteDisplayInfoChange">
6101 <desc>
6102 Notification when the status of the VRDP server changes. Interested callees
6103 should use <link to="IConsole::RemoteDisplayInfo">IRemoteDisplayInfo</link>
6104 attributes to find out what is the current status.
6105 </desc>
6106 </method>
6107
6108 <method name="onUSBControllerChange">
6109 <desc>
6110 Notification when a property of the virtual
6111 <link to="IMachine::USBController">USB controller</link> changes.
6112 Interested callees should use IUSBController methods and attributes to
6113 find out what has changed.
6114 </desc>
6115 </method>
6116
6117 <method name="onUSBDeviceStateChange">
6118 <desc>
6119 Notification when a USB device is attached to or detached from
6120 the virtual USB controller.
6121
6122 This notification is sent as a result of the indirect
6123 request to attach the device because it matches one of the
6124 machine USB filters, or as a result of the direct request
6125 issued by <link to="IConsole::attachUSBDevice"/> or
6126 <link to="IConsole::detachUSBDevice"/>.
6127
6128 This notification is sent in case of both a succeeded and a
6129 failed request completion. When the request succeeds, the
6130 @a error parameter is @c null, and the given device has been
6131 already added to (when @a attached is @c true) or removed from
6132 (when @a attached is @c false) the collection represented by
6133 <link to="IConsole::USBDevices"/>. On failure, the collection
6134 doesn't change and the @a error parameter represents the error
6135 message describing the failure.
6136
6137 </desc>
6138 <param name="device" type="IUSBDevice" dir="in">
6139 <desc>Device that is subject to state change.</desc>
6140 </param>
6141 <param name="attached" type="boolean" dir="in">
6142 <desc>
6143 @c true if the device was attached and @c false otherwise.
6144 </desc>
6145 </param>
6146 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
6147 <desc>
6148 @c null on success or an error message object on failure.
6149 </desc>
6150 </param>
6151 </method>
6152
6153 <method name="onSharedFolderChange">
6154 <desc>
6155 Notification when a shared folder is added or removed.
6156 The @a scope argument defines one of three scopes:
6157 <link to="IVirtualBox::sharedFolders">global shared folders</link>
6158 (<link to="Scope_Global">Global</link>),
6159 <link to="IMachine::sharedFolders">permanent shared folders</link> of
6160 the machine (<link to="Scope_Machine">Machine</link>) or <link
6161 to="IConsole::sharedFolders">transient shared folders</link> of the
6162 machine (<link to="Scope_Session">Session</link>). Interested callees
6163 should use query the corresponding collections to find out what has
6164 changed.
6165 </desc>
6166 <param name="scope" type="Scope" dir="in">
6167 <desc>Scope of the notification.</desc>
6168 </param>
6169 </method>
6170
6171 <method name="onRuntimeError">
6172 <desc>
6173 Notification when an error happens during the virtual
6174 machine execution.
6175
6176 There are three kinds of runtime errors:
6177 <ul>
6178 <li><i>fatal</i></li>
6179 <li><i>non-fatal with retry</i></li>
6180 <li><i>non-fatal warnings</i></li>
6181 </ul>
6182
6183 <b>Fatal</b> errors are indicated by the @a fatal parameter set
6184 to @c true. In case of fatal errors, the virtual machine
6185 execution is always paused before calling this notification, and
6186 the notification handler is supposed either to immediately save
6187 the virtual machine state using <link to="IConsole::saveState"/>
6188 or power it off using <link to="IConsole::powerDown"/>.
6189 Resuming the execution can lead to unpredictable results.
6190
6191 <b>Non-fatal</b> errors and warnings are indicated by the
6192 @a fatal parameter set to @c false. If the virtual machine
6193 is in the Paused state by the time the error notification is
6194 received, it means that the user can <i>try to resume</i> the machine
6195 execution after attempting to solve the problem that caused the
6196 error. In this case, the notification handler is supposed
6197 to show an appropriate message to the user (depending on the
6198 value of the @a id parameter) that offers several actions such
6199 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
6200 wants to retry, the notification handler should continue
6201 the machine execution using the <link to="IConsole::resume"/>
6202 call. If the machine execution is not Paused during this
6203 notification, then it means this notification is a <i>warning</i>
6204 (for example, about a fatal condition that can happen very soon);
6205 no immediate action is required from the user, the machine
6206 continues its normal execution.
6207
6208 Note that in either case the notification handler
6209 <b>must not</b> perform any action directly on a thread
6210 where this notification is called. Everything it is allowed to
6211 do is to post a message to another thread that will then talk
6212 to the user and take the corresponding action.
6213
6214 Currently, the following error identifiers are known:
6215 <ul>
6216 <li><tt>"HostMemoryLow"</tt></li>
6217 <li><tt>"HostAudioNotResponding"</tt></li>
6218 <li><tt>"VDIStorageFull"</tt></li>
6219 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
6220 </ul>
6221
6222 <note>
6223 This notification is not designed to be implemented by
6224 more than one callback at a time. If you have multiple
6225 IConsoleCallback instances registered on the given
6226 IConsole object, make sure you simply do nothing but
6227 return @c S_OK from all but one of them that does actual
6228 user notification and performs necessary actions.
6229 </note>
6230
6231 </desc>
6232 <param name="fatal" type="boolean" dir="in">
6233 <desc>Whether the error is fatal or not</desc>
6234 </param>
6235 <param name="id" type="wstring" dir="in">
6236 <desc>Error identifier</desc>
6237 </param>
6238 <param name="message" type="wstring" dir="in">
6239 <desc>Optional error message</desc>
6240 </param>
6241 </method>
6242
6243 <method name="onCanShowWindow">
6244 <desc>
6245 Notification when a call to
6246 <link to="IMachine::canShowConsoleWindow"/> is made by a
6247 front-end to check if a subsequent call to
6248 <link to="IMachine::showConsoleWindow"/> can succeed.
6249
6250 The callee should give an answer appropriate to the current
6251 machine state in the @a canShow argument. This answer must
6252 remain valid at least until the next
6253 <link to="IConsole::state">machine state</link> change.
6254
6255 <note>
6256 This notification is not designed to be implemented by
6257 more than one callback at a time. If you have multiple
6258 IConsoleCallback instances registered on the given
6259 IConsole object, make sure you simply do nothing but
6260 return @c true and @c S_OK from all but one of them that
6261 actually manages console window activation.
6262 </note>
6263 </desc>
6264 <param name="canShow" type="boolean" dir="return">
6265 <desc>
6266 @c true if the console window can be shown and @c false otherwise.
6267 </desc>
6268 </param>
6269 </method>
6270
6271 <method name="onShowWindow">
6272 <desc>
6273 Notification when a call to
6274 <link to="IMachine::showConsoleWindow"/>
6275 requests the console window to be activated and brought to
6276 foreground on the desktop of the host PC.
6277
6278 This notification should cause the VM console process to
6279 perform the requested action as described above. If it is
6280 impossible to do it at a time of this notification, this
6281 method should return a failure.
6282
6283 Note that many modern window managers on many platforms
6284 implement some sort of focus stealing prevention logic, so
6285 that it may be impossible to activate a window without the
6286 help of the currently active application (which is supposedly
6287 an initiator of this notification). In this case, this method
6288 must return a non-zero identifier that represents the
6289 top-level window of the VM console process. The caller, if it
6290 represents a currently active process, is responsible to use
6291 this identifier (in a platform-dependent manner) to perform
6292 actual window activation.
6293
6294 This method must set @a winId to zero if it has performed all
6295 actions necessary to complete the request and the console
6296 window is now active and in foreground, to indicate that no
6297 further action is required on the caller's side.
6298
6299 <note>
6300 This notification is not designed to be implemented by
6301 more than one callback at a time. If you have multiple
6302 IConsoleCallback instances registered on the given
6303 IConsole object, make sure you simply do nothing but
6304 return @c S_OK from all but one of them that actually
6305 manages console window activation.
6306 </note>
6307 </desc>
6308 <param name="winId" type="unsigned long long" dir="return">
6309 <desc>
6310 Platform-dependent identifier of the top-level VM console
6311 window, or zero if this method has performed all actions
6312 necessary to implement the <i>show window</i> semantics for
6313 the given platform and/or this VirtualBox front-end.
6314 </desc>
6315 </param>
6316 </method>
6317
6318 </interface>
6319
6320 <interface
6321 name="IRemoteDisplayInfo" extends="$unknown"
6322 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
6323 wsmap="struct"
6324 >
6325 <desc>
6326 Contains information about the remote display (VRDP) capabilities and status.
6327 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
6328 </desc>
6329
6330 <attribute name="active" type="boolean" readonly="yes">
6331 <desc>
6332 Whether the remote display connection is active.
6333 </desc>
6334 </attribute>
6335
6336 <attribute name="port" type="long" readonly="yes">
6337 <desc>
6338 VRDP server port number. If this property is equal to <tt>0</tt>, then
6339 the VRDP server failed to start, usually because there are no free TCP
6340 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
6341 server has not yet been started.
6342 </desc>
6343 </attribute>
6344
6345 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
6346 <desc>
6347 How many times a client connected.
6348 </desc>
6349 </attribute>
6350
6351 <attribute name="beginTime" type="long long" readonly="yes">
6352 <desc>
6353 When the last connection was established, in milliseconds since 1970-01-01 UTC.
6354 </desc>
6355 </attribute>
6356
6357 <attribute name="endTime" type="long long" readonly="yes">
6358 <desc>
6359 When the last connection was terminated or the current time, if
6360 connection is still active, in milliseconds since 1970-01-01 UTC.
6361 </desc>
6362 </attribute>
6363
6364 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
6365 <desc>
6366 How many bytes were sent in last or current, if still active, connection.
6367 </desc>
6368 </attribute>
6369
6370 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
6371 <desc>
6372 How many bytes were sent in all connections.
6373 </desc>
6374 </attribute>
6375
6376 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
6377 <desc>
6378 How many bytes were received in last or current, if still active, connection.
6379 </desc>
6380 </attribute>
6381
6382 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
6383 <desc>
6384 How many bytes were received in all connections.
6385 </desc>
6386 </attribute>
6387
6388 <attribute name="user" type="wstring" readonly="yes">
6389 <desc>
6390 Login user name supplied by the client.
6391 </desc>
6392 </attribute>
6393
6394 <attribute name="domain" type="wstring" readonly="yes">
6395 <desc>
6396 Login domain name supplied by the client.
6397 </desc>
6398 </attribute>
6399
6400 <attribute name="clientName" type="wstring" readonly="yes">
6401 <desc>
6402 The client name supplied by the client.
6403 </desc>
6404 </attribute>
6405
6406 <attribute name="clientIP" type="wstring" readonly="yes">
6407 <desc>
6408 The IP address of the client.
6409 </desc>
6410 </attribute>
6411
6412 <attribute name="clientVersion" type="unsigned long" readonly="yes">
6413 <desc>
6414 The client software version number.
6415 </desc>
6416 </attribute>
6417
6418 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
6419 <desc>
6420 Public key exchange method used when connection was established.
6421 Values: 0 - RDP4 public key exchange scheme.
6422 1 - X509 certificates were sent to client.
6423 </desc>
6424 </attribute>
6425
6426 </interface>
6427
6428 <interface
6429 name="IConsole" extends="$unknown"
6430 uuid="55dd56a5-1d1d-4d81-b742-b082b9571be6"
6431 wsmap="managed"
6432 >
6433 <desc>
6434 The IConsole interface represents an interface to control virtual
6435 machine execution.
6436
6437 The console object that implements the IConsole interface is obtained
6438 from a session object after the session for the given machine has been
6439 opened using one of <link to="IVirtualBox::openSession"/>,
6440 <link to="IVirtualBox::openRemoteSession"/> or
6441 <link to="IVirtualBox::openExistingSession"/> methods.
6442
6443 Methods of the IConsole interface allow the caller to query the current
6444 virtual machine execution state, pause the machine or power it down, save
6445 the machine state or take a snapshot, attach and detach removable media
6446 and so on.
6447
6448 <see>ISession</see>
6449 </desc>
6450
6451 <attribute name="machine" type="IMachine" readonly="yes">
6452 <desc>
6453 Machine object this console is sessioned with.
6454 <note>
6455 This is a convenience property, it has the same value as
6456 <link to="ISession::machine"/> of the corresponding session
6457 object.
6458 </note>
6459 </desc>
6460 </attribute>
6461
6462 <attribute name="state" type="MachineState" readonly="yes">
6463 <desc>
6464 Current execution state of the machine.
6465 <note>
6466 This property always returns the same value as the corresponding
6467 property of the IMachine object this console is sessioned with.
6468 For the process that owns (executes) the VM, this is the
6469 preferable way of querying the VM state, because no IPC
6470 calls are made.
6471 </note>
6472 </desc>
6473 </attribute>
6474
6475 <attribute name="guest" type="IGuest" readonly="yes">
6476 <desc>Guest object.</desc>
6477 </attribute>
6478
6479 <attribute name="keyboard" type="IKeyboard" readonly="yes">
6480 <desc>
6481 Virtual keyboard object.
6482 <note>
6483 If the machine is not running, any attempt to use
6484 the returned object will result in an error.
6485 </note>
6486 </desc>
6487 </attribute>
6488
6489 <attribute name="mouse" type="IMouse" readonly="yes">
6490 <desc>
6491 Virtual mouse object.
6492 <note>
6493 If the machine is not running, any attempt to use
6494 the returned object will result in an error.
6495 </note>
6496 </desc>
6497 </attribute>
6498
6499 <attribute name="display" type="IDisplay" readonly="yes">
6500 <desc>Virtual display object.
6501 <note>
6502 If the machine is not running, any attempt to use
6503 the returned object will result in an error.
6504 </note>
6505 </desc>
6506 </attribute>
6507
6508 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6509 <desc>Debugging interface.</desc>
6510 </attribute>
6511
6512 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6513 <desc>
6514 Collection of USB devices currently attached to the virtual
6515 USB controller.
6516 <note>
6517 The collection is empty if the machine is not running.
6518 </note>
6519 </desc>
6520 </attribute>
6521
6522 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6523 <desc>
6524 List of USB devices currently attached to the remote VRDP client.
6525 Once a new device is physically attached to the remote host computer,
6526 it appears in this list and remains there until detached.
6527 </desc>
6528 </attribute>
6529
6530 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6531 <desc>
6532 Collection of shared folders for the current session. These folders
6533 are called transient shared folders because they are available to the
6534 guest OS running inside the associated virtual machine only for the
6535 duration of the session (as opposed to
6536 <link to="IMachine::sharedFolders"/> which represent permanent shared
6537 folders). When the session is closed (e.g. the machine is powered down),
6538 these folders are automatically discarded.
6539
6540 New shared folders are added to the collection using
6541 <link to="#createSharedFolder"/>. Existing shared folders can be
6542 removed using <link to="#removeSharedFolder"/>.
6543 </desc>
6544 </attribute>
6545
6546 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6547 <desc>
6548 Interface that provides information on Remote Display (VRDP) connection.
6549 </desc>
6550 </attribute>
6551
6552 <method name="powerUp">
6553 <desc>
6554 Starts the virtual machine execution using the current machine
6555 state (that is, its current execution state, current settings and
6556 current storage devices).
6557
6558 If the machine is powered off or aborted, the execution will
6559 start from the beginning (as if the real hardware were just
6560 powered on).
6561
6562 If the machine is in the <link to="MachineState_Saved"/> state,
6563 it will continue its execution the point where the state has
6564 been saved.
6565
6566 <note>
6567 Unless you are trying to write a new VirtualBox front-end that
6568 performs direct machine execution (like the VirtualBox or VBoxSDL
6569 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6570 session opened by <link to="IVirtualBox::openSession"/> and use this
6571 session only to change virtual machine settings. If you simply want to
6572 start virtual machine execution using one of the existing front-ends
6573 (for example the VirtualBox GUI or headless server), simply use
6574 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6575 power up the machine automatically for you.
6576 </note>
6577
6578 <see>#saveState</see>
6579 <result name="VBOX_E_INVALID_VM_STATE">
6580 Virtual machine already running.
6581 </result>
6582 <result name="VBOX_E_HOST_ERROR">
6583 Host interface does not exist or name not set.
6584 </result>
6585 <result name="VBOX_E_FILE_ERROR">
6586 Invalid saved state file.
6587 </result>
6588 </desc>
6589 <param name="progress" type="IProgress" dir="return">
6590 <desc>Progress object to track the operation completion.</desc>
6591 </param>
6592 </method>
6593
6594 <method name="powerUpPaused">
6595 <desc>
6596 Identical to powerUp except that the VM will enter the
6597 <link to="MachineState_Paused"/> state, instead of
6598 <link to="MachineState_Running"/>.
6599
6600 <see>#powerUp</see>
6601 <result name="VBOX_E_INVALID_VM_STATE">
6602 Virtual machine already running.
6603 </result>
6604 <result name="VBOX_E_HOST_ERROR">
6605 Host interface does not exist or name not set.
6606 </result>
6607 <result name="VBOX_E_FILE_ERROR">
6608 Invalid saved state file.
6609 </result>
6610 </desc>
6611 <param name="progress" type="IProgress" dir="return">
6612 <desc>Progress object to track the operation completion.</desc>
6613 </param>
6614 </method>
6615
6616 <method name="powerDown">
6617 <desc>
6618 Initiates the power down procedure to stop the virtual machine
6619 execution.
6620
6621 The completion of the power down procedure is tracked using the returned
6622 IProgress object. After the operation is complete, the machine will go
6623 to the PoweredOff state.
6624 <result name="VBOX_E_INVALID_VM_STATE">
6625 Virtual machine must be Running, Paused or Stuck to be powered down.
6626 </result>
6627 </desc>
6628 <param name="progress" type="IProgress" dir="return">
6629 <desc>Progress object to track the operation completion.</desc>
6630 </param>
6631 </method>
6632
6633 <method name="reset">
6634 <desc>Resets the virtual machine.
6635 <result name="VBOX_E_INVALID_VM_STATE">
6636 Virtual machine not in Running state.
6637 </result>
6638 <result name="VBOX_E_VM_ERROR">
6639 Virtual machine error in reset operation.
6640 </result>
6641 </desc>
6642 </method>
6643
6644 <method name="pause">
6645 <desc>Pauses the virtual machine execution.
6646 <result name="VBOX_E_INVALID_VM_STATE">
6647 Virtual machine not in Running state.
6648 </result>
6649 <result name="VBOX_E_VM_ERROR">
6650 Virtual machine error in suspend operation.
6651 </result>
6652 </desc>
6653 </method>
6654
6655 <method name="resume">
6656 <desc>Resumes the virtual machine execution.
6657 <result name="VBOX_E_INVALID_VM_STATE">
6658 Virtual machine not in Paused state.
6659 </result>
6660 <result name="VBOX_E_VM_ERROR">
6661 Virtual machine error in resume operation.
6662 </result>
6663 </desc>
6664 </method>
6665
6666 <method name="powerButton">
6667 <desc>Sends the ACPI power button event to the guest.
6668 <result name="VBOX_E_INVALID_VM_STATE">
6669 Virtual machine not in Running state.
6670 </result>
6671 <result name="VBOX_E_PDM_ERROR">
6672 Controlled power off failed.
6673 </result>
6674 </desc>
6675 </method>
6676
6677 <method name="sleepButton">
6678 <desc>Sends the ACPI sleep button event to the guest.
6679 <result name="VBOX_E_INVALID_VM_STATE">
6680 Virtual machine not in Running state.
6681 </result>
6682 <result name="VBOX_E_PDM_ERROR">
6683 Sending sleep button event failed.
6684 </result>
6685 </desc>
6686 </method>
6687
6688 <method name="getPowerButtonHandled">
6689 <desc>Checks if the last power button event was handled by guest.
6690 <result name="VBOX_E_PDM_ERROR">
6691 Checking if the event was handled by the guest OS failed.
6692 </result>
6693 </desc>
6694 <param name="handled" type="boolean" dir="return"/>
6695 </method>
6696
6697 <method name="getGuestEnteredACPIMode">
6698 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6699 G1 (sleeping). If this method returns @c false, the guest will
6700 most likely not respond to external ACPI events.
6701 <result name="VBOX_E_INVALID_VM_STATE">
6702 Virtual machine not in Running state.
6703 </result>
6704 </desc>
6705 <param name="entered" type="boolean" dir="return"/>
6706 </method>
6707
6708 <method name="saveState">
6709 <desc>
6710 Saves the current execution state of a running virtual machine
6711 and stops its execution.
6712
6713 After this operation completes, the machine will go to the
6714 Saved state. Next time it is powered up, this state will
6715 be restored and the machine will continue its execution from
6716 the place where it was saved.
6717
6718 This operation differs from taking a snapshot to the effect
6719 that it doesn't create new differencing media. Also, once
6720 the machine is powered up from the state saved using this method,
6721 the saved state is deleted, so it will be impossible to return
6722 to this state later.
6723
6724 <note>
6725 On success, this method implicitly calls
6726 <link to="IMachine::saveSettings"/> to save all current machine
6727 settings (including runtime changes to the DVD medium, etc.).
6728 Together with the impossibility to change any VM settings when it is
6729 in the Saved state, this guarantees adequate hardware
6730 configuration of the machine when it is restored from the saved
6731 state file.
6732 </note>
6733
6734 <note>
6735 The machine must be in the Running or Paused state, otherwise
6736 the operation will fail.
6737 </note>
6738 <result name="VBOX_E_INVALID_VM_STATE">
6739 Virtual machine state neither Running nor Paused.
6740 </result>
6741 <result name="VBOX_E_FILE_ERROR">
6742 Failed to create directory for saved state file.
6743 </result>
6744
6745 <see><link to="#takeSnapshot"/></see>
6746 </desc>
6747 <param name="progress" type="IProgress" dir="return">
6748 <desc>Progress object to track the operation completion.</desc>
6749 </param>
6750 </method>
6751
6752 <method name="adoptSavedState">
6753 <desc>
6754 Associates the given saved state file to the virtual machine.
6755
6756 On success, the machine will go to the Saved state. Next time it is
6757 powered up, it will be restored from the adopted saved state and
6758 continue execution from the place where the saved state file was
6759 created.
6760
6761 The specified saved state file path may be absolute or relative to the
6762 folder the VM normally saves the state to (usually,
6763 <link to="IMachine::snapshotFolder"/>).
6764
6765 <note>
6766 It's a caller's responsibility to make sure the given saved state
6767 file is compatible with the settings of this virtual machine that
6768 represent its virtual hardware (memory size, storage disk configuration
6769 etc.). If there is a mismatch, the behavior of the virtual machine
6770 is undefined.
6771 </note>
6772 <result name="VBOX_E_INVALID_VM_STATE">
6773 Virtual machine state neither PoweredOff nor Aborted.
6774 </result>
6775 </desc>
6776 <param name="savedStateFile" type="wstring" dir="in">
6777 <desc>Path to the saved state file to adopt.</desc>
6778 </param>
6779 </method>
6780
6781 <method name="forgetSavedState">
6782 <desc>
6783 Forgets the saved state of the virtual machine previously created
6784 by <link to="#saveState"/>. Next time the machine is powered up, a
6785 clean boot will occur. If @a remove is @c true the saved state file
6786 is deleted.
6787 <note>
6788 This operation is equivalent to resetting or powering off
6789 the machine without doing a proper shutdown in the guest OS.
6790 </note>
6791 <result name="VBOX_E_INVALID_VM_STATE">
6792 Virtual machine not in state Saved.
6793 </result>
6794 </desc>
6795 <param name="remove" type="boolean" dir="in">
6796 <desc>If @c true remove the saved state file.</desc>
6797 </param>
6798 </method>
6799
6800 <method name="getDeviceActivity">
6801 <desc>
6802 Gets the current activity type of a given device or device group.
6803 <result name="E_INVALIDARG">
6804 Invalid device type.
6805 </result>
6806 </desc>
6807 <param name="type" type="DeviceType" dir="in"/>
6808 <param name="activity" type="DeviceActivity" dir="return"/>
6809 </method>
6810
6811 <method name="attachUSBDevice">
6812 <desc>
6813 Attaches a host USB device with the given UUID to the
6814 USB controller of the virtual machine.
6815
6816 The device needs to be in one of the following states:
6817 <link to="USBDeviceState_Busy"/>,
6818 <link to="USBDeviceState_Available"/> or
6819 <link to="USBDeviceState_Held"/>,
6820 otherwise an error is immediately returned.
6821
6822 When the device state is
6823 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6824 be returned if the host computer refuses to release it for some reason.
6825
6826 <see>IUSBController::deviceFilters, USBDeviceState</see>
6827 <result name="VBOX_E_INVALID_VM_STATE">
6828 Virtual machine state neither Running nor Paused.
6829 </result>
6830 <result name="VBOX_E_PDM_ERROR">
6831 Virtual machine does not have a USB controller.
6832 </result>
6833 </desc>
6834 <param name="id" type="uuid" mod="string" dir="in">
6835 <desc>UUID of the host USB device to attach.</desc>
6836 </param>
6837 </method>
6838
6839 <method name="detachUSBDevice">
6840 <desc>
6841 Detaches an USB device with the given UUID from the USB controller
6842 of the virtual machine.
6843
6844 After this method succeeds, the VirtualBox server re-initiates
6845 all USB filters as if the device were just physically attached
6846 to the host, but filters of this machine are ignored to avoid
6847 a possible automatic re-attachment.
6848
6849 <see>IUSBController::deviceFilters, USBDeviceState</see>
6850
6851 <result name="VBOX_E_PDM_ERROR">
6852 Virtual machine does not have a USB controller.
6853 </result>
6854 <result name="E_INVALIDARG">
6855 USB device not attached to this virtual machine.
6856 </result>
6857 </desc>
6858 <param name="id" type="uuid" mod="string" dir="in">
6859 <desc>UUID of the USB device to detach.</desc>
6860 </param>
6861 <param name="device" type="IUSBDevice" dir="return">
6862 <desc>Detached USB device.</desc>
6863 </param>
6864 </method>
6865
6866 <method name="findUSBDeviceByAddress">
6867 <desc>
6868 Searches for a USB device with the given host address.
6869
6870 <result name="VBOX_E_OBJECT_NOT_FOUND">
6871 Given @c name does not correspond to any USB device.
6872 </result>
6873
6874 <see>IUSBDevice::address</see>
6875 </desc>
6876 <param name="name" type="wstring" dir="in">
6877 <desc>
6878 Address of the USB device (as assigned by the host) to
6879 search for.
6880 </desc>
6881 </param>
6882 <param name="device" type="IUSBDevice" dir="return">
6883 <desc>Found USB device object.</desc>
6884 </param>
6885 </method>
6886
6887 <method name="findUSBDeviceById">
6888 <desc>
6889 Searches for a USB device with the given UUID.
6890
6891 <result name="VBOX_E_OBJECT_NOT_FOUND">
6892 Given @c id does not correspond to any USB device.
6893 </result>
6894
6895 <see>IUSBDevice::id</see>
6896 </desc>
6897 <param name="id" type="uuid" mod="string" dir="in">
6898 <desc>UUID of the USB device to search for.</desc>
6899 </param>
6900 <param name="device" type="IUSBDevice" dir="return">
6901 <desc>Found USB device object.</desc>
6902 </param>
6903 </method>
6904
6905 <method name="createSharedFolder">
6906 <desc>
6907 Creates a transient new shared folder by associating the given logical
6908 name with the given host path, adds it to the collection of shared
6909 folders and starts sharing it. Refer to the description of
6910 <link to="ISharedFolder"/> to read more about logical names.
6911
6912 <result name="VBOX_E_INVALID_VM_STATE">
6913 Virtual machine in Saved state or currently changing state.
6914 </result>
6915 <result name="VBOX_E_FILE_ERROR">
6916 Shared folder already exists or not accessible.
6917 </result>
6918 </desc>
6919 <param name="name" type="wstring" dir="in">
6920 <desc>Unique logical name of the shared folder.</desc>
6921 </param>
6922 <param name="hostPath" type="wstring" dir="in">
6923 <desc>Full path to the shared folder in the host file system.</desc>
6924 </param>
6925 <param name="writable" type="boolean" dir="in">
6926 <desc>Whether the share is writable or readonly</desc>
6927 </param>
6928 </method>
6929
6930 <method name="removeSharedFolder">
6931 <desc>
6932 Removes a transient shared folder with the given name previously
6933 created by <link to="#createSharedFolder"/> from the collection of
6934 shared folders and stops sharing it.
6935 <result name="VBOX_E_INVALID_VM_STATE">
6936 Virtual machine in Saved state or currently changing state.
6937 </result>
6938 <result name="VBOX_E_FILE_ERROR">
6939 Shared folder does not exists.
6940 </result>
6941 </desc>
6942 <param name="name" type="wstring" dir="in">
6943 <desc>Logical name of the shared folder to remove.</desc>
6944 </param>
6945 </method>
6946
6947 <method name="takeSnapshot">
6948 <desc>
6949 Saves the current execution state
6950 and all settings of the machine and creates differencing images
6951 for all normal (non-independent) media.
6952 See <link to="ISnapshot" /> for an introduction to snapshots.
6953
6954 This method can be called for a PoweredOff, Saved (see
6955 <link to="#saveState"/>), Running or
6956 Paused virtual machine. When the machine is PoweredOff, an
6957 offline snapshot is created. When the machine is Running a live
6958 snapshot is created, and an online snapshot is is created when Paused.
6959
6960 The taken snapshot is always based on the
6961 <link to="IMachine::currentSnapshot">current snapshot</link>
6962 of the associated virtual machine and becomes a new current snapshot.
6963
6964 <note>
6965 This method implicitly calls <link to="IMachine::saveSettings"/> to
6966 save all current machine settings before taking an offline snapshot.
6967 </note>
6968
6969 <result name="VBOX_E_INVALID_VM_STATE">
6970 Virtual machine currently changing state.
6971 </result>
6972 </desc>
6973 <param name="name" type="wstring" dir="in">
6974 <desc>Short name for the snapshot.</desc>
6975 </param>
6976 <param name="description" type="wstring" dir="in">
6977 <desc>Optional description of the snapshot.</desc>
6978 </param>
6979 <param name="progress" type="IProgress" dir="return">
6980 <desc>Progress object to track the operation completion.</desc>
6981 </param>
6982 </method>
6983
6984 <method name="deleteSnapshot">
6985 <desc>
6986 Starts discarding the specified snapshot asynchronously.
6987 See <link to="ISnapshot" /> for an introduction to snapshots.
6988
6989 The execution state and settings of the associated machine stored in
6990 the snapshot will be deleted. The contents of all differencing media of
6991 this snapshot will be merged with the contents of their dependent child
6992 media to keep the medium chain valid (in other words, all changes
6993 represented by media being discarded will be propagated to their child
6994 medium). After that, this snapshot's differencing medium will be
6995 deleted. The parent of this snapshot will become a new parent for all
6996 its child snapshots.
6997
6998 If the discarded snapshot is the current one, its parent
6999 snapshot will become a new current snapshot. The current machine
7000 state is not directly affected in this case, except that
7001 currently attached differencing media based on media
7002 of the discarded snapshot will be also merged as described
7003 above.
7004
7005 If the discarded snapshot is the first one (the root snapshot)
7006 and it has exactly one child snapshot, this child snapshot will
7007 become the first snapshot after discarding. If there are no
7008 children at all (i.e. the first snapshot is the only snapshot of
7009 the machine), both the current and the first snapshot of the
7010 machine will be set to @c null. In all other cases, the first
7011 snapshot cannot be discarded.
7012
7013 You cannot discard the snapshot if it
7014 stores <link to="MediumType_Normal">normal</link> (non-differencing)
7015 media that have differencing media based on them. Snapshots of
7016 such kind can be discarded only when every normal medium has either
7017 no children at all or exactly one child. In the former case, the normal
7018 medium simply becomes unused (i.e. not attached to any VM). In the
7019 latter case, it receives all the changes stored in the child medium,
7020 and then it replaces the child medium in the configuration of the
7021 corresponding snapshot or machine.
7022
7023 Also, you cannot discard the snapshot if it stores media
7024 (of any type) having differencing child media that belong
7025 to other machines. Such snapshots can be only discarded after
7026 you discard all snapshots of other machines containing "foreign"
7027 child media, or detach these "foreign" child media from machines
7028 they are attached to.
7029
7030 One particular example of the snapshot storing normal media
7031 is the first snapshot of a virtual machine that had normal media
7032 attached when taking the snapshot. Be careful when
7033 discarding such snapshots because this implicitly commits
7034 changes (made since the snapshot being discarded has been taken)
7035 to normal media (as described above), which may be not what
7036 you want.
7037
7038 The virtual machine is put to
7039 the <link to="MachineState_Discarding">Discarding</link> state until
7040 the discard operation is completed.
7041
7042 <note>
7043 The machine must not be running, otherwise the operation
7044 will fail.
7045 </note>
7046
7047 <note>
7048 Child media of all normal media of the discarded snapshot
7049 must be accessible (see <link to="IMedium::state"/>) for this
7050 operation to succeed. In particular, this means that all virtual
7051 machines, whose media are directly or indirectly based on the
7052 media of discarded snapshot, must be powered off.
7053 </note>
7054 <note>
7055 Merging medium contents can be very time and disk space
7056 consuming, if these media are big in size and have many
7057 children. However, if the snapshot being discarded is the last
7058 (head) snapshot on the branch, the operation will be rather
7059 quick.
7060 </note>
7061 <note>
7062 Note that discarding the current snapshot
7063 will implicitly call <link to="IMachine::saveSettings"/> to
7064 make all current machine settings permanent.
7065 </note>
7066 <result name="VBOX_E_INVALID_VM_STATE">
7067 Virtual machine is running.
7068 </result>
7069 </desc>
7070 <param name="id" type="uuid" mod="string" dir="in">
7071 <desc>UUID of the snapshot to discard.</desc>
7072 </param>
7073 <param name="progress" type="IProgress" dir="return">
7074 <desc>Progress object to track the operation completion.</desc>
7075 </param>
7076 </method>
7077
7078 <method name="restoreSnapshot">
7079 <desc>
7080 Starts resetting the machine's current state to the state contained
7081 in the given snapshot, asynchronously. All current settings of the
7082 machine will be reset and changes stored in differencing media
7083 will be lost.
7084 See <link to="ISnapshot" /> for an introduction to snapshots.
7085
7086 After this operation is successfully completed, new empty differencing
7087 media are created for all normal media of the machine.
7088
7089 If the given snapshot is an online snapshot, the machine will go to
7090 the <link to="MachineState_Saved"> saved state</link>, so that the
7091 next time it is powered on, the execution state will be restored
7092 from the state of the snapshot.
7093
7094 <note>
7095 The machine must not be running, otherwise the operation will fail.
7096 </note>
7097
7098 <note>
7099 If the machine state is <link to="MachineState_Saved">Saved</link>
7100 prior to this operation, the saved state file will be implicitly
7101 discarded (as if <link to="IConsole::forgetSavedState"/> were
7102 called).
7103 </note>
7104
7105 <result name="VBOX_E_INVALID_VM_STATE">
7106 Virtual machine is running.
7107 </result>
7108 </desc>
7109 <param name="snapshot" type="ISnapshot" dir="in">
7110 <desc>The snapshot to restore the VM state from.</desc>
7111 </param>
7112 <param name="progress" type="IProgress" dir="return">
7113 <desc>Progress object to track the operation completion.</desc>
7114 </param>
7115 </method>
7116
7117 <method name="teleport">
7118 <desc>
7119 Teleport the VM to a different host machine or process.
7120
7121 TODO explain the details.
7122
7123 <result name="VBOX_E_INVALID_VM_STATE">
7124 Virtual machine not running or paused.
7125 </result>
7126 </desc>
7127 <param name="hostname" type="wstring" dir="in">
7128 <desc>The name or IP of the host to teleport to.</desc>
7129 </param>
7130 <param name="tcpport" type="unsigned long" dir="in">
7131 <desc>The TCP port to connect to (1..65535).</desc>
7132 </param>
7133 <param name="password" type="wstring" dir="in">
7134 <desc>The password.</desc>
7135 </param>
7136 <param name="progress" type="IProgress" dir="return">
7137 <desc>Progress object to track the operation completion.</desc>
7138 </param>
7139 </method>
7140
7141 <method name="registerCallback">
7142 <desc>
7143 Registers a new console callback on this instance. The methods of the
7144 callback interface will be called by this instance when the appropriate
7145 event occurs.
7146 </desc>
7147 <param name="callback" type="IConsoleCallback" dir="in"/>
7148 </method>
7149
7150 <method name="unregisterCallback">
7151 <desc>
7152 Unregisters the console callback previously registered using
7153 <link to="#registerCallback"/>.
7154 <result name="E_INVALIDARG">
7155 Given @a callback handler is not registered.
7156 </result>
7157 </desc>
7158 <param name="callback" type="IConsoleCallback" dir="in"/>
7159 </method>
7160 </interface>
7161
7162 <!--
7163 // IHost
7164 /////////////////////////////////////////////////////////////////////////
7165 -->
7166
7167 <enum
7168 name="HostNetworkInterfaceMediumType"
7169 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
7170 >
7171 <desc>
7172 Type of encapsulation. Ethernet encapsulation includes both wired and
7173 wireless Ethernet connections.
7174 <see>IHostNetworkInterface</see>
7175 </desc>
7176
7177 <const name="Unknown" value="0">
7178 <desc>
7179 The type of interface cannot be determined.
7180 </desc>
7181 </const>
7182 <const name="Ethernet" value="1">
7183 <desc>
7184 Ethernet frame encapsulation.
7185 </desc>
7186 </const>
7187 <const name="PPP" value="2">
7188 <desc>
7189 Point-to-point protocol encapsulation.
7190 </desc>
7191 </const>
7192 <const name="SLIP" value="3">
7193 <desc>
7194 Serial line IP encapsulation.
7195 </desc>
7196 </const>
7197 </enum>
7198
7199 <enum
7200 name="HostNetworkInterfaceStatus"
7201 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
7202 >
7203 <desc>
7204 Current status of the interface.
7205 <see>IHostNetworkInterface</see>
7206 </desc>
7207
7208 <const name="Unknown" value="0">
7209 <desc>
7210 The state of interface cannot be determined.
7211 </desc>
7212 </const>
7213 <const name="Up" value="1">
7214 <desc>
7215 The interface is fully operational.
7216 </desc>
7217 </const>
7218 <const name="Down" value="2">
7219 <desc>
7220 The interface is not functioning.
7221 </desc>
7222 </const>
7223 </enum>
7224
7225 <enum
7226 name="HostNetworkInterfaceType"
7227 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
7228 >
7229 <desc>
7230 Network interface type.
7231 </desc>
7232 <const name="Bridged" value="1"/>
7233 <const name="HostOnly" value="2"/>
7234 </enum>
7235
7236 <interface
7237 name="IHostNetworkInterface" extends="$unknown"
7238 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
7239 wsmap="managed"
7240 >
7241 <desc>
7242 Represents one of host's network interfaces. IP V6 address and network
7243 mask are strings of 32 hexdecimal digits grouped by four. Groups are
7244 separated by colons.
7245 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
7246 </desc>
7247 <attribute name="name" type="wstring" readonly="yes">
7248 <desc>Returns the host network interface name.</desc>
7249 </attribute>
7250
7251 <attribute name="id" type="uuid" mod="string" readonly="yes">
7252 <desc>Returns the interface UUID.</desc>
7253 </attribute>
7254
7255 <attribute name="networkName" type="wstring" readonly="yes">
7256 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
7257 </attribute>
7258
7259 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
7260 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
7261 </attribute>
7262
7263 <attribute name="IPAddress" type="wstring" readonly="yes">
7264 <desc>Returns the IP V4 address of the interface.</desc>
7265 </attribute>
7266
7267 <attribute name="networkMask" type="wstring" readonly="yes">
7268 <desc>Returns the network mask of the interface.</desc>
7269 </attribute>
7270
7271 <attribute name="IPV6Supported" type="boolean" readonly="yes">
7272 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
7273 </attribute>
7274
7275 <attribute name="IPV6Address" type="wstring" readonly="yes">
7276 <desc>Returns the IP V6 address of the interface.</desc>
7277 </attribute>
7278
7279 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
7280 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
7281 </attribute>
7282
7283 <attribute name="hardwareAddress" type="wstring" readonly="yes">
7284 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
7285 </attribute>
7286
7287 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
7288 <desc>Type of protocol encapsulation used.</desc>
7289 </attribute>
7290
7291 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
7292 <desc>Status of the interface.</desc>
7293 </attribute>
7294
7295 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
7296 <desc>specifies the host interface type.</desc>
7297 </attribute>
7298
7299 <method name="enableStaticIpConfig">
7300 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
7301 <param name="IPAddress" type="wstring" dir="in">
7302 <desc>
7303 IP address.
7304 </desc>
7305 </param>
7306 <param name="networkMask" type="wstring" dir="in">
7307 <desc>
7308 network mask.
7309 </desc>
7310 </param>
7311 </method>
7312
7313 <method name="enableStaticIpConfigV6">
7314 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
7315 <param name="IPV6Address" type="wstring" dir="in">
7316 <desc>
7317 IP address.
7318 </desc>
7319 </param>
7320 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
7321 <desc>
7322 network mask.
7323 </desc>
7324 </param>
7325 </method>
7326
7327 <method name="enableDynamicIpConfig">
7328 <desc>enables the dynamic IP configuration.</desc>
7329 </method>
7330
7331 <method name="dhcpRediscover">
7332 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
7333 </method>
7334
7335 </interface>
7336
7337 <interface
7338 name="IHost" extends="$unknown"
7339 uuid="e380cbfc-ae65-4fa6-899e-45ded6b3132a"
7340 wsmap="managed"
7341 >
7342 <desc>
7343 The IHost interface represents the physical machine that this VirtualBox
7344 installation runs on.
7345
7346 An object implementing this interface is returned by the
7347 <link to="IVirtualBox::host" /> attribute. This interface contains
7348 read-only information about the host's physical hardware (such as what
7349 processors and disks are available, what the host operating system is,
7350 and so on) and also allows for manipulating some of the host's hardware,
7351 such as global USB device filters and host interface networking.
7352
7353 </desc>
7354 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
7355 <desc>List of DVD drives available on the host.</desc>
7356 </attribute>
7357
7358 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
7359 <desc>List of floppy drives available on the host.</desc>
7360 </attribute>
7361
7362 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
7363 <desc>
7364 List of USB devices currently attached to the host.
7365 Once a new device is physically attached to the host computer,
7366 it appears in this list and remains there until detached.
7367
7368 <note>
7369 If USB functionality is not available in the given edition of
7370 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7371 </note>
7372 </desc>
7373 </attribute>
7374
7375 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
7376 <desc>
7377 List of USB device filters in action.
7378 When a new device is physically attached to the host computer,
7379 filters from this list are applied to it (in order they are stored
7380 in the list). The first matched filter will determine the
7381 <link to="IHostUSBDeviceFilter::action">action</link>
7382 performed on the device.
7383
7384 Unless the device is ignored by these filters, filters of all
7385 currently running virtual machines
7386 (<link to="IUSBController::deviceFilters"/>) are applied to it.
7387
7388 <note>
7389 If USB functionality is not available in the given edition of
7390 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7391 </note>
7392
7393 <see>IHostUSBDeviceFilter, USBDeviceState</see>
7394 </desc>
7395 </attribute>
7396
7397 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
7398 <desc>List of host network interfaces currently defined on the host.</desc>
7399 </attribute>
7400
7401 <attribute name="processorCount" type="unsigned long" readonly="yes">
7402 <desc>Number of (logical) CPUs installed in the host system.</desc>
7403 </attribute>
7404
7405 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
7406 <desc>Number of (logical) CPUs online in the host system.</desc>
7407 </attribute>
7408
7409 <method name="getProcessorSpeed">
7410 <desc>Query the (approximate) maximum speed of a specified host CPU in
7411 Megahertz.
7412 </desc>
7413 <param name="cpuId" type="unsigned long" dir="in">
7414 <desc>
7415 Identifier of the CPU.
7416 </desc>
7417 </param>
7418 <param name="speed" type="unsigned long" dir="return">
7419 <desc>
7420 Speed value. 0 is returned if value is not known or @a cpuId is
7421 invalid.
7422 </desc>
7423 </param>
7424 </method>
7425
7426 <method name="getProcessorFeature">
7427 <desc>Query whether a CPU feature is supported or not.</desc>
7428 <param name="feature" type="ProcessorFeature" dir="in">
7429 <desc>
7430 CPU Feature identifier.
7431 </desc>
7432 </param>
7433 <param name="supported" type="boolean" dir="return">
7434 <desc>
7435 Feature is supported or not.
7436 </desc>
7437 </param>
7438 </method>
7439
7440 <method name="getProcessorDescription">
7441 <desc>Query the model string of a specified host CPU.
7442 </desc>
7443 <param name="cpuId" type="unsigned long" dir="in">
7444 <desc>
7445 Identifier of the CPU.
7446 <note>
7447 The current implementation might not necessarily return the
7448 description for this exact CPU.
7449 </note>
7450 </desc>
7451 </param>
7452 <param name="description" type="wstring" dir="return">
7453 <desc>
7454 Model string. An empty string is returned if value is not known or
7455 @a cpuId is invalid.
7456 </desc>
7457 </param>
7458 </method>
7459
7460 <method name="getProcessorCpuIdLeaf">
7461 <desc>
7462 Returns the CPU cpuid information for the specified leaf.
7463 </desc>
7464 <param name="cpuId" type="unsigned long" dir="in">
7465 <desc>
7466 Identifier of the CPU. The CPU most be online.
7467 <note>
7468 The current implementation might not necessarily return the
7469 description for this exact CPU.
7470 </note>
7471 </desc>
7472 </param>
7473 <param name="leaf" type="unsigned long" dir="in">
7474 <desc>
7475 Cpuid leaf index (eax).
7476 </desc>
7477 </param>
7478 <param name="subLeaf" type="unsigned long" dir="in">
7479 <desc>
7480 Cpuid leaf sub index (ecx). This currently only applies to cache
7481 information on Intel CPUs. Use 0 if retriving values for
7482 <link to="IMachine::setCpuIdLeaf"/>.
7483 </desc>
7484 </param>
7485 <param name="valEax" type="unsigned long" dir="out">
7486 <desc>
7487 Cpuid leaf value for register eax.
7488 </desc>
7489 </param>
7490 <param name="valEbx" type="unsigned long" dir="out">
7491 <desc>
7492 Cpuid leaf value for register ebx.
7493 </desc>
7494 </param>
7495 <param name="valEcx" type="unsigned long" dir="out">
7496 <desc>
7497 Cpuid leaf value for register ecx.
7498 </desc>
7499 </param>
7500 <param name="valEdx" type="unsigned long" dir="out">
7501 <desc>
7502 Cpuid leaf value for register edx.
7503 </desc>
7504 </param>
7505 </method>
7506
7507 <attribute name="memorySize" type="unsigned long" readonly="yes">
7508 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7509 </attribute>
7510
7511 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7512 <desc>Available system memory in the host system.</desc>
7513 </attribute>
7514
7515 <attribute name="operatingSystem" type="wstring" readonly="yes">
7516 <desc>Name of the host system's operating system.</desc>
7517 </attribute>
7518
7519 <attribute name="OSVersion" type="wstring" readonly="yes">
7520 <desc>Host operating system's version string.</desc>
7521 </attribute>
7522
7523 <attribute name="UTCTime" type="long long" readonly="yes">
7524 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7525 </attribute>
7526
7527 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
7528 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
7529 </attribute>
7530
7531 <method name="createHostOnlyNetworkInterface">
7532 <desc>
7533 Creates a new adapter for Host Only Networking.
7534 <result name="E_INVALIDARG">
7535 Host network interface @a name already exists.
7536 </result>
7537 </desc>
7538 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7539 <desc>
7540 Created host interface object.
7541 </desc>
7542 </param>
7543 <param name="progress" type="IProgress" dir="return">
7544 <desc>
7545 Progress object to track the operation completion.
7546 </desc>
7547 </param>
7548 </method>
7549
7550 <method name="removeHostOnlyNetworkInterface">
7551 <desc>
7552 Removes the given Host Only Networking interface.
7553 <result name="VBOX_E_OBJECT_NOT_FOUND">
7554 No host network interface matching @a id found.
7555 </result>
7556 </desc>
7557 <param name="id" type="uuid" mod="string" dir="in">
7558 <desc>
7559 Adapter GUID.
7560 </desc>
7561 </param>
7562 <param name="progress" type="IProgress" dir="return">
7563 <desc>
7564 Progress object to track the operation completion.
7565 </desc>
7566 </param>
7567 </method>
7568
7569 <method name="createUSBDeviceFilter">
7570 <desc>
7571 Creates a new USB device filter. All attributes except
7572 the filter name are set to empty (any match),
7573 <i>active</i> is @c false (the filter is not active).
7574
7575 The created filter can be added to the list of filters using
7576 <link to="#insertUSBDeviceFilter"/>.
7577
7578 <see>#USBDeviceFilters</see>
7579 </desc>
7580 <param name="name" type="wstring" dir="in">
7581 <desc>
7582 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7583 for more info.
7584 </desc>
7585 </param>
7586 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7587 <desc>Created filter object.</desc>
7588 </param>
7589 </method>
7590
7591 <method name="insertUSBDeviceFilter">
7592 <desc>
7593 Inserts the given USB device to the specified position
7594 in the list of filters.
7595
7596 Positions are numbered starting from @c 0. If the specified
7597 position is equal to or greater than the number of elements in
7598 the list, the filter is added at the end of the collection.
7599
7600 <note>
7601 Duplicates are not allowed, so an attempt to insert a
7602 filter already in the list is an error.
7603 </note>
7604 <note>
7605 If USB functionality is not available in the given edition of
7606 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7607 </note>
7608
7609 <see>#USBDeviceFilters</see>
7610
7611 <result name="VBOX_E_INVALID_OBJECT_STATE">
7612 USB device filter is not created within this VirtualBox instance.
7613 </result>
7614 <result name="E_INVALIDARG">
7615 USB device filter already in list.
7616 </result>
7617
7618 </desc>
7619 <param name="position" type="unsigned long" dir="in">
7620 <desc>Position to insert the filter to.</desc>
7621 </param>
7622 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7623 <desc>USB device filter to insert.</desc>
7624 </param>
7625 </method>
7626
7627 <method name="removeUSBDeviceFilter">
7628 <desc>
7629 Removes a USB device filter from the specified position in the
7630 list of filters.
7631
7632 Positions are numbered starting from @c 0. Specifying a
7633 position equal to or greater than the number of elements in
7634 the list will produce an error.
7635
7636 <note>
7637 If USB functionality is not available in the given edition of
7638 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7639 </note>
7640
7641 <see>#USBDeviceFilters</see>
7642
7643 <result name="E_INVALIDARG">
7644 USB device filter list empty or invalid @a position.
7645 </result>
7646
7647 </desc>
7648 <param name="position" type="unsigned long" dir="in">
7649 <desc>Position to remove the filter from.</desc>
7650 </param>
7651 </method>
7652
7653 <method name="findHostDVDDrive">
7654 <desc>
7655 Searches for a host DVD drive with the given @c name.
7656
7657 <result name="VBOX_E_OBJECT_NOT_FOUND">
7658 Given @c name does not correspond to any host drive.
7659 </result>
7660
7661 </desc>
7662 <param name="name" type="wstring" dir="in">
7663 <desc>Name of the host drive to search for</desc>
7664 </param>
7665 <param name="drive" type="IMedium" dir="return">
7666 <desc>Found host drive object</desc>
7667 </param>
7668 </method>
7669
7670 <method name="findHostFloppyDrive">
7671 <desc>
7672 Searches for a host floppy drive with the given @c name.
7673
7674 <result name="VBOX_E_OBJECT_NOT_FOUND">
7675 Given @c name does not correspond to any host floppy drive.
7676 </result>
7677
7678 </desc>
7679 <param name="name" type="wstring" dir="in">
7680 <desc>Name of the host floppy drive to search for</desc>
7681 </param>
7682 <param name="drive" type="IMedium" dir="return">
7683 <desc>Found host floppy drive object</desc>
7684 </param>
7685 </method>
7686
7687 <method name="findHostNetworkInterfaceByName">
7688 <desc>
7689 Searches through all host network interfaces for an interface with
7690 the given @c name.
7691 <note>
7692 The method returns an error if the given @c name does not
7693 correspond to any host network interface.
7694 </note>
7695 </desc>
7696 <param name="name" type="wstring" dir="in">
7697 <desc>Name of the host network interface to search for.</desc>
7698 </param>
7699 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7700 <desc>Found host network interface object.</desc>
7701 </param>
7702 </method>
7703 <method name="findHostNetworkInterfaceById">
7704 <desc>
7705 Searches through all host network interfaces for an interface with
7706 the given GUID.
7707 <note>
7708 The method returns an error if the given GUID does not
7709 correspond to any host network interface.
7710 </note>
7711 </desc>
7712 <param name="id" type="uuid" mod="string" dir="in">
7713 <desc>GUID of the host network interface to search for.</desc>
7714 </param>
7715 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7716 <desc>Found host network interface object.</desc>
7717 </param>
7718 </method>
7719 <method name="findHostNetworkInterfacesOfType">
7720 <desc>
7721 Searches through all host network interfaces and returns a list of interfaces of the specified type
7722 </desc>
7723 <param name="type" type="HostNetworkInterfaceType" dir="in">
7724 <desc>type of the host network interfaces to search for.</desc>
7725 </param>
7726 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7727 <desc>Found host network interface objects.</desc>
7728 </param>
7729 </method>
7730
7731 <method name="findUSBDeviceById">
7732 <desc>
7733 Searches for a USB device with the given UUID.
7734
7735 <result name="VBOX_E_OBJECT_NOT_FOUND">
7736 Given @c id does not correspond to any USB device.
7737 </result>
7738
7739 <see>IHostUSBDevice::id</see>
7740 </desc>
7741 <param name="id" type="uuid" mod="string" dir="in">
7742 <desc>UUID of the USB device to search for.</desc>
7743 </param>
7744 <param name="device" type="IHostUSBDevice" dir="return">
7745 <desc>Found USB device object.</desc>
7746 </param>
7747 </method>
7748
7749 <method name="findUSBDeviceByAddress">
7750 <desc>
7751 Searches for a USB device with the given host address.
7752
7753 <result name="VBOX_E_OBJECT_NOT_FOUND">
7754 Given @c name does not correspond to any USB device.
7755 </result>
7756
7757 <see>IHostUSBDevice::address</see>
7758 </desc>
7759 <param name="name" type="wstring" dir="in">
7760 <desc>
7761 Address of the USB device (as assigned by the host) to
7762 search for.
7763 </desc>
7764 </param>
7765 <param name="device" type="IHostUSBDevice" dir="return">
7766 <desc>Found USB device object.</desc>
7767 </param>
7768 </method>
7769
7770 </interface>
7771
7772 <!--
7773 // ISystemProperties
7774 /////////////////////////////////////////////////////////////////////////
7775 -->
7776
7777 <interface
7778 name="ISystemProperties"
7779 extends="$unknown"
7780 uuid="8030645c-8fef-4320-bb7b-c829f00069dc"
7781 wsmap="managed"
7782 >
7783 <desc>
7784 The ISystemProperties interface represents global properties of the given
7785 VirtualBox installation.
7786
7787 These properties define limits and default values for various attributes
7788 and parameters. Most of the properties are read-only, but some can be
7789 changed by a user.
7790 </desc>
7791
7792 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7793 <desc>Minimum guest system memory in Megabytes.</desc>
7794 </attribute>
7795
7796 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7797 <desc>Maximum guest system memory in Megabytes.</desc>
7798 </attribute>
7799
7800 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7801 <desc>Minimum guest video memory in Megabytes.</desc>
7802 </attribute>
7803
7804 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7805 <desc>Maximum guest video memory in Megabytes.</desc>
7806 </attribute>
7807
7808 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7809 <desc>Minimum CPU count.</desc>
7810 </attribute>
7811
7812 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7813 <desc>Maximum CPU count.</desc>
7814 </attribute>
7815
7816 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7817 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7818 </attribute>
7819
7820 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7821 <desc>
7822 Number of network adapters associated with every
7823 <link to="IMachine"/> instance.
7824 </desc>
7825 </attribute>
7826
7827 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7828 <desc>
7829 Number of serial ports associated with every
7830 <link to="IMachine"/> instance.
7831 </desc>
7832 </attribute>
7833
7834 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7835 <desc>
7836 Number of parallel ports associated with every
7837 <link to="IMachine"/> instance.
7838 </desc>
7839 </attribute>
7840
7841 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7842 <desc>
7843 Maximum device position in the boot order. This value corresponds
7844 to the total number of devices a machine can boot from, to make it
7845 possible to include all possible devices to the boot list.
7846 <see><link to="IMachine::setBootOrder"/></see>
7847 </desc>
7848 </attribute>
7849
7850 <attribute name="defaultMachineFolder" type="wstring">
7851 <desc>
7852 Full path to the default directory used to create new or open
7853 existing machines when a settings file name contains no
7854 path.
7855
7856 The initial value of this property is
7857 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7858 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7859
7860 <note>
7861 Setting this property to @c null or an empty string will restore the
7862 initial value.
7863 </note>
7864 <note>
7865 When settings this property, the specified path can be
7866 absolute (full path) or relative
7867 to the <link to="IVirtualBox::homeFolder">
7868 VirtualBox home directory</link>.
7869 When reading this property, a full path is
7870 always returned.
7871 </note>
7872 <note>
7873 The specified path may not exist, it will be created
7874 when necessary.
7875 </note>
7876
7877 <see>
7878 <link to="IVirtualBox::createMachine"/>,
7879 <link to="IVirtualBox::openMachine"/>
7880 </see>
7881 </desc>
7882 </attribute>
7883
7884 <attribute name="defaultHardDiskFolder" type="wstring">
7885 <desc>
7886 Full path to the default directory used to create new or open existing
7887 virtual disks.
7888
7889 This path is used when the storage unit of a hard disk is a regular file
7890 in the host's file system and only a file name that contains no path is
7891 given.
7892
7893 The initial value of this property is
7894 <tt>&lt;</tt>
7895 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7896 <tt>&gt;/HardDisks</tt>.
7897
7898 <note>
7899 Setting this property to @c null or empty string will restore the
7900 initial value.
7901 </note>
7902 <note>
7903 When settings this property, the specified path can be relative
7904 to the
7905 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7906 absolute. When reading this property, a full path is
7907 always returned.
7908 </note>
7909 <note>
7910 The specified path may not exist, it will be created
7911 when necessary.
7912 </note>
7913
7914 <see>
7915 IMedium,
7916 <link to="IVirtualBox::createHardDisk"/>,
7917 <link to="IVirtualBox::openHardDisk"/>,
7918 <link to="IMedium::location"/>
7919 </see>
7920 </desc>
7921 </attribute>
7922
7923 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7924 <desc>
7925 List of all medium storage formats supported by this VirtualBox
7926 installation.
7927
7928 Keep in mind that the medium format identifier
7929 (<link to="IMediumFormat::id"/>) used in other API calls like
7930 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7931 medium format is a case-insensitive string. This means that, for
7932 example, all of the following strings:
7933 <pre>
7934 "VDI"
7935 "vdi"
7936 "VdI"</pre>
7937 refer to the same medium format.
7938
7939 Note that the virtual medium framework is backend-based, therefore
7940 the list of supported formats depends on what backends are currently
7941 installed.
7942
7943 <see>
7944 <link to="IMediumFormat"/>,
7945 </see>
7946 </desc>
7947 </attribute>
7948
7949 <attribute name="defaultHardDiskFormat" type="wstring">
7950 <desc>
7951 Identifier of the default medium format used by VirtualBox.
7952
7953 The medium format set by this attribute is used by VirtualBox
7954 when the medium format was not specified explicitly. One example is
7955 <link to="IVirtualBox::createHardDisk"/> with the empty
7956 format argument. A more complex example is implicit creation of
7957 differencing media when taking a snapshot of a virtual machine:
7958 this operation will try to use a format of the parent medium first
7959 and if this format does not support differencing media the default
7960 format specified by this argument will be used.
7961
7962 The list of supported medium formats may be obtained by the
7963 <link to="#mediaFormats"/> call. Note that the default medium
7964 format must have a capability to create differencing media;
7965 otherwise operations that create media implicitly may fail
7966 unexpectedly.
7967
7968 The initial value of this property is <tt>"VDI"</tt> in the current
7969 version of the VirtualBox product, but may change in the future.
7970
7971 <note>
7972 Setting this property to @c null or empty string will restore the
7973 initial value.
7974 </note>
7975
7976 <see>
7977 <link to="#mediaFormats"/>,
7978 <link to="IMediumFormat::id"/>,
7979 <link to="IVirtualBox::createHardDisk"/>
7980 </see>
7981 </desc>
7982 </attribute>
7983
7984 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7985 <desc>
7986 Library that provides authentication for VRDP clients. The library
7987 is used if a virtual machine's authentication type is set to "external"
7988 in the VM RemoteDisplay configuration.
7989
7990 The system library extension (".DLL" or ".so") must be omitted.
7991 A full path can be specified; if not, then the library must reside on the
7992 system's default library path.
7993
7994 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7995 of that name in one of the default VirtualBox library directories.
7996
7997 For details about VirtualBox authentication libraries and how to implement
7998 them, please refer to the VirtualBox manual.
7999
8000 <note>
8001 Setting this property to @c null or empty string will restore the
8002 initial value.
8003 </note>
8004 </desc>
8005 </attribute>
8006
8007 <attribute name="webServiceAuthLibrary" type="wstring">
8008 <desc>
8009 Library that provides authentication for webservice clients. The library
8010 is used if a virtual machine's authentication type is set to "external"
8011 in the VM RemoteDisplay configuration and will be called from
8012 within the <link to="IWebsessionManager::logon" /> implementation.
8013
8014 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
8015 there is no per-VM setting for this, as the webservice is a global
8016 resource (if it is running). Only for this setting (for the webservice),
8017 setting this value to a literal <tt>"null"</tt> string disables authentication,
8018 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
8019 no matter what user name and password are supplied.
8020
8021 The initial value of this property is <tt>"VRDPAuth"</tt>,
8022 meaning that the webservice will use the same authentication
8023 library that is used by default for VBoxVRDP (again, see
8024 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
8025 The format and calling convention of authentication libraries
8026 is the same for the webservice as it is for VBoxVRDP.
8027
8028 <note>
8029 Setting this property to @c null or empty string will restore the
8030 initial value.
8031 </note>
8032 </desc>
8033 </attribute>
8034
8035 <attribute name="LogHistoryCount" type="unsigned long">
8036 <desc>
8037 This value specifies how many old release log files are kept.
8038 </desc>
8039 </attribute>
8040
8041 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
8042 <desc>This value hold the default audio driver for the current
8043 system.</desc>
8044 </attribute>
8045
8046 <method name="getMaxDevicesPerPortForStorageBus">
8047 <desc>Returns the maximum number of devices which can be attached to a port
8048 for the given storage bus.</desc>
8049
8050 <param name="bus" type="StorageBus" dir="in">
8051 <desc>The storage bus type to get the value for.</desc>
8052 </param>
8053
8054 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
8055 <desc>The maximum number of devices which can eb attached to the port for the given
8056 storage bus.</desc>
8057 </param>
8058 </method>
8059
8060 <method name="getMinPortCountForStorageBus">
8061 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
8062
8063 <param name="bus" type="StorageBus" dir="in">
8064 <desc>The storage bus type to get the value for.</desc>
8065 </param>
8066
8067 <param name="minPortCount" type="unsigned long" dir="return">
8068 <desc>The minimum number of ports for the given storage bus.</desc>
8069 </param>
8070 </method>
8071
8072 <method name="getMaxPortCountForStorageBus">
8073 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
8074
8075 <param name="bus" type="StorageBus" dir="in">
8076 <desc>The storage bus type to get the value for.</desc>
8077 </param>
8078
8079 <param name="maxPortCount" type="unsigned long" dir="return">
8080 <desc>The maximum number of ports for the given storage bus.</desc>
8081 </param>
8082 </method>
8083
8084 <method name="getMaxInstancesOfStorageBus">
8085 <desc>Returns the maximum number of storage bus instances which
8086 can be configured for each VM. This corresponds to the number of
8087 storage controllers one can have.</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="maxInstances" type="unsigned long" dir="return">
8094 <desc>The maximum number of instances for the given storage bus.</desc>
8095 </param>
8096 </method>
8097
8098 <method name="getDeviceTypesForStorageBus">
8099 <desc>Returns list of all the supported device types
8100 (<link to="DeviceType"/>) for the given type of storage
8101 bus.</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="deviceTypes" type="DeviceType" safearray="yes" dir="return">
8108 <desc>The list of all supported device types for the given storage bus.</desc>
8109 </param>
8110 </method>
8111 </interface>
8112
8113 <!--
8114 // IGuest
8115 /////////////////////////////////////////////////////////////////////////
8116 -->
8117
8118 <interface
8119 name="IGuestOSType" extends="$unknown"
8120 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
8121 wsmap="struct"
8122 >
8123 <desc>
8124 </desc>
8125
8126 <attribute name="familyId" type="wstring" readonly="yes">
8127 <desc>Guest OS family identifier string.</desc>
8128 </attribute>
8129
8130 <attribute name="familyDescription" type="wstring" readonly="yes">
8131 <desc>Human readable description of the guest OS family.</desc>
8132 </attribute>
8133
8134 <attribute name="id" type="wstring" readonly="yes">
8135 <desc>Guest OS identifier string.</desc>
8136 </attribute>
8137
8138 <attribute name="description" type="wstring" readonly="yes">
8139 <desc>Human readable description of the guest OS.</desc>
8140 </attribute>
8141
8142 <attribute name="is64Bit" type="boolean" readonly="yes">
8143 <desc>Returns @c true if the given OS is 64-bit</desc>
8144 </attribute>
8145
8146 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
8147 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
8148 </attribute>
8149
8150 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
8151 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
8152 </attribute>
8153
8154 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
8155 <desc>Recommended RAM size in Megabytes.</desc>
8156 </attribute>
8157
8158 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
8159 <desc>Recommended video RAM size in Megabytes.</desc>
8160 </attribute>
8161
8162 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
8163 <desc>Recommended hard disk size in Megabytes.</desc>
8164 </attribute>
8165
8166 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
8167 <desc>Returns recommended network adapter for this OS type.</desc>
8168 </attribute>
8169 </interface>
8170
8171 <interface
8172 name="IGuest" extends="$unknown"
8173 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
8174 wsmap="managed"
8175 >
8176 <desc>
8177 The IGuest interface represents information about the operating system
8178 running inside the virtual machine. Used in
8179 <link to="IConsole::guest"/>.
8180
8181 IGuest provides information about the guest operating system, whether
8182 Guest Additions are installed and other OS-specific virtual machine
8183 properties.
8184 </desc>
8185
8186 <attribute name="OSTypeId" type="wstring" readonly="yes">
8187 <desc>
8188 Identifier of the Guest OS type as reported by the Guest
8189 Additions.
8190 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
8191 an IGuestOSType object representing details about the given
8192 Guest OS type.
8193 <note>
8194 If Guest Additions are not installed, this value will be
8195 the same as <link to="IMachine::OSTypeId"/>.
8196 </note>
8197 </desc>
8198 </attribute>
8199
8200 <attribute name="additionsActive" type="boolean" readonly="yes">
8201 <desc>
8202 Flag whether the Guest Additions are installed and active
8203 in which case their version will be returned by the
8204 <link to="#additionsVersion"/> property.
8205 </desc>
8206 </attribute>
8207
8208 <attribute name="additionsVersion" type="wstring" readonly="yes">
8209 <desc>
8210 Version of the Guest Additions (3 decimal numbers separated
8211 by dots) or empty when the Additions are not installed. The
8212 Additions may also report a version but yet not be active as
8213 the version might be refused by VirtualBox (incompatible) or
8214 other failures occurred.
8215 </desc>
8216 </attribute>
8217
8218 <attribute name="supportsSeamless" type="boolean" readonly="yes">
8219 <desc>
8220 Flag whether seamless guest display rendering (seamless desktop
8221 integration) is supported.
8222 </desc>
8223 </attribute>
8224
8225 <attribute name="supportsGraphics" type="boolean" readonly="yes">
8226 <desc>
8227 Flag whether the guest is in graphics mode. If it is not, then
8228 seamless rendering will not work, resize hints are not immediately
8229 acted on and guest display resizes are probably not initiated by
8230 the guest additions.
8231 </desc>
8232 </attribute>
8233
8234 <attribute name="memoryBalloonSize" type="unsigned long">
8235 <desc>Guest system memory balloon size in megabytes.</desc>
8236 </attribute>
8237
8238 <attribute name="statisticsUpdateInterval" type="unsigned long">
8239 <desc>Interval to update guest statistics in seconds.</desc>
8240 </attribute>
8241
8242 <method name="setCredentials">
8243 <desc>
8244 Store login credentials that can be queried by guest operating
8245 systems with Additions installed. The credentials are transient
8246 to the session and the guest may also choose to erase them. Note
8247 that the caller cannot determine whether the guest operating system
8248 has queried or made use of the credentials.
8249
8250 <result name="VBOX_E_VM_ERROR">
8251 VMM device is not available.
8252 </result>
8253
8254 </desc>
8255 <param name="userName" type="wstring" dir="in">
8256 <desc>User name string, can be empty</desc>
8257 </param>
8258 <param name="password" type="wstring" dir="in">
8259 <desc>Password string, can be empty</desc>
8260 </param>
8261 <param name="domain" type="wstring" dir="in">
8262 <desc>Domain name (guest logon scheme specific), can be empty</desc>
8263 </param>
8264 <param name="allowInteractiveLogon" type="boolean" dir="in">
8265 <desc>
8266 Flag whether the guest should alternatively allow the user to
8267 interactively specify different credentials. This flag might
8268 not be supported by all versions of the Additions.
8269 </desc>
8270 </param>
8271 </method>
8272
8273 <method name="getStatistic">
8274 <desc>
8275 Query specified guest statistics as reported by the VirtualBox Additions.
8276 </desc>
8277 <param name="cpuId" type="unsigned long" dir="in">
8278 <desc>Virtual CPU id; not relevant for all statistic types</desc>
8279 </param>
8280 <param name="statistic" type="GuestStatisticType" dir="in">
8281 <desc>Statistic type.</desc>
8282 </param>
8283 <param name="statVal" type="unsigned long" dir="return">
8284 <desc>Statistics value</desc>
8285 </param>
8286 </method>
8287
8288 </interface>
8289
8290
8291 <!--
8292 // IProgress
8293 /////////////////////////////////////////////////////////////////////////
8294 -->
8295
8296 <interface
8297 name="IProgress" extends="$unknown"
8298 uuid="62827ef1-c098-40eb-be96-36d0508489a6"
8299 wsmap="managed"
8300 >
8301 <desc>
8302 The IProgress interface is used to track and control
8303 asynchronous tasks within VirtualBox.
8304
8305 An instance of this is returned every time VirtualBox starts
8306 an asynchronous task (in other words, a separate thread) which
8307 continues to run after a method call returns. For example,
8308 <link to="IConsole::saveState" />, which saves the state of
8309 a running virtual machine, can take a long time to complete.
8310 To be able to display a progress bar, a user interface such as
8311 the VirtualBox graphical user interface can use the IProgress
8312 object returned by that method.
8313
8314 Note that IProgress is a "read-only" interface in the sense
8315 that only the VirtualBox internals behind the Main API can
8316 create and manipulate progress objects, whereas client code
8317 can only use the IProgress object to monitor a task's
8318 progress and, if <link to="#cancelable" /> is @c true,
8319 cancel the task by calling <link to="#cancel" />.
8320
8321 A task represented by IProgress consists of either one or
8322 several sub-operations that run sequentially, one by one (see
8323 <link to="#operation" /> and <link to="#operationCount" />).
8324 Every operation is identified by a number (starting from 0)
8325 and has a separate description.
8326
8327 You can find the individual percentage of completion of the current
8328 operation in <link to="#operationPercent" /> and the
8329 percentage of completion of the task as a whole
8330 in <link to="#percent" />.
8331
8332 Similarly, you can wait for the completion of a particular
8333 operation via <link to="#waitForOperationCompletion" /> or
8334 for the completion of the whole task via
8335 <link to="#waitForCompletion" />.
8336 </desc>
8337
8338 <attribute name="id" type="uuid" mod="string" readonly="yes">
8339 <desc>ID of the task.</desc>
8340 </attribute>
8341
8342 <attribute name="description" type="wstring" readonly="yes">
8343 <desc>Description of the task.</desc>
8344 </attribute>
8345
8346 <attribute name="initiator" type="$unknown" readonly="yes">
8347 <desc>Initiator of the task.</desc>
8348 </attribute>
8349
8350 <attribute name="cancelable" type="boolean" readonly="yes">
8351 <desc>Whether the task can be interrupted.</desc>
8352 </attribute>
8353
8354 <attribute name="percent" type="unsigned long" readonly="yes">
8355 <desc>
8356 Current progress value of the task as a whole, in percent.
8357 This value depends on how many operations are already complete.
8358 Returns 100 if <link to="#completed" /> is @c true.
8359 </desc>
8360 </attribute>
8361
8362 <attribute name="timeRemaining" type="long" readonly="yes">
8363 <desc>
8364 Estimated remaining time until the task completes, in
8365 seconds. Returns 0 once the task has completed; returns -1
8366 if the remaining time cannot be computed, in particular if
8367 the current progress is 0.
8368
8369 Even if a value is returned, the estimate will be unreliable
8370 for low progress values. It will become more reliable as the
8371 task progresses; it is not recommended to display an ETA
8372 before at least 20% of a task have completed.
8373 </desc>
8374 </attribute>
8375
8376 <attribute name="completed" type="boolean" readonly="yes">
8377 <desc>Whether the task has been completed.</desc>
8378 </attribute>
8379
8380 <attribute name="canceled" type="boolean" readonly="yes">
8381 <desc>Whether the task has been canceled.</desc>
8382 </attribute>
8383
8384 <attribute name="resultCode" type="long" readonly="yes">
8385 <desc>
8386 Result code of the progress task.
8387 Valid only if <link to="#completed"/> is @c true.
8388 </desc>
8389 </attribute>
8390
8391 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
8392 <desc>
8393 Extended information about the unsuccessful result of the
8394 progress operation. May be @c null if no extended information
8395 is available.
8396 Valid only if <link to="#completed"/> is @c true and
8397 <link to="#resultCode"/> indicates a failure.
8398 </desc>
8399 </attribute>
8400
8401 <attribute name="operationCount" type="unsigned long" readonly="yes">
8402 <desc>
8403 Number of sub-operations this task is divided into.
8404 Every task consists of at least one suboperation.
8405 </desc>
8406 </attribute>
8407
8408 <attribute name="operation" type="unsigned long" readonly="yes">
8409 <desc>Number of the sub-operation being currently executed.</desc>
8410 </attribute>
8411
8412 <attribute name="operationDescription" type="wstring" readonly="yes">
8413 <desc>
8414 Description of the sub-operation being currently executed.
8415 </desc>
8416 </attribute>
8417
8418 <attribute name="operationPercent" type="unsigned long" readonly="yes">
8419 <desc>Progress value of the current sub-operation only, in percent.</desc>
8420 </attribute>
8421
8422 <method name="setCurrentOperationProgress">
8423 <desc>Internal method, not to be called externally.</desc>
8424 <param name="percent" type="unsigned long" dir="in" />
8425 </method>
8426 <method name="setNextOperation">
8427 <desc>Internal method, not to be called externally.</desc>
8428 <param name="nextOperationDescription" type="wstring" dir="in" />
8429 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8430 </method>
8431
8432 <method name="waitForCompletion">
8433 <desc>
8434 Waits until the task is done (including all sub-operations)
8435 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8436
8437 <result name="VBOX_E_IPRT_ERROR">
8438 Failed to wait for task completion.
8439 </result>
8440 </desc>
8441
8442 <param name="timeout" type="long" dir="in">
8443 <desc>
8444 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8445 </desc>
8446 </param>
8447 </method>
8448
8449 <method name="waitForOperationCompletion">
8450 <desc>
8451 Waits until the given operation is done with a given timeout in
8452 milliseconds; specify -1 for an indefinite wait.
8453
8454 <result name="VBOX_E_IPRT_ERROR">
8455 Failed to wait for operation completion.
8456 </result>
8457
8458 </desc>
8459 <param name="operation" type="unsigned long" dir="in">
8460 <desc>
8461 Number of the operation to wait for.
8462 Must be less than <link to="#operationCount"/>.
8463 </desc>
8464 </param>
8465 <param name="timeout" type="long" dir="in">
8466 <desc>
8467 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8468 </desc>
8469 </param>
8470 </method>
8471
8472 <method name="cancel">
8473 <desc>
8474 Cancels the task.
8475 <note>
8476 If <link to="#cancelable"/> is @c false, then this method will fail.
8477 </note>
8478
8479 <result name="VBOX_E_INVALID_OBJECT_STATE">
8480 Operation cannot be canceled.
8481 </result>
8482
8483 </desc>
8484 </method>
8485
8486 </interface>
8487
8488
8489 <!--
8490 // ISnapshot
8491 /////////////////////////////////////////////////////////////////////////
8492 -->
8493
8494 <interface
8495 name="ISnapshot" extends="$unknown"
8496 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8497 wsmap="managed"
8498 >
8499 <desc>
8500 The ISnapshot interface represents a snapshot of the virtual
8501 machine.
8502
8503 Together with the differencing media that are created
8504 when a snapshot is taken, a machine can be brought back to
8505 the exact state it was in when the snapshot was taken.
8506
8507 The ISnapshot interface has no methods, only attributes; snapshots
8508 are controlled through methods of the <link to="IConsole" /> interface
8509 which also manage the media associated with the snapshot.
8510 The following operations exist:
8511
8512 <ul>
8513 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8514 by creating new, empty differencing images for the machine's
8515 media and saving the VM settings and (if the VM is running)
8516 the current VM state in the snapshot.
8517
8518 The differencing images will then receive all data written to
8519 the machine's media, while their parent (base) images
8520 remain unmodified after the snapshot has been taken (see
8521 <link to="IMedium" /> for details about differencing images).
8522 This simplifies restoring a machine to the state of a snapshot:
8523 only the differencing images need to be deleted.
8524
8525 The current machine state is not changed by taking a snapshot.
8526 If the machine is running, it will resume execution after the
8527 snapshot has been taken.
8528 </li>
8529
8530 <li><link to="IConsole::restoreSnapshot"/>: this goes back to
8531 a previous snapshot. This resets the machine's state to that of
8532 the previous snapshot by deleting the differencing image of each
8533 of the machine's media and setting the machine's settings
8534 and state to the state that was saved in the snapshot (if any).
8535
8536 This destroys the machine's current state.
8537 </li>
8538
8539 <li><link to="IConsole::deleteSnapshot"/>: deletes a snapshot
8540 without affecting the current machine state.
8541
8542 This does not change the machine, but instead frees the resources
8543 allocated when the snapshot was taken: the settings and machine state
8544 is deleted (if any), and the snapshot's differencing image for each
8545 of the machine's media gets merged with its parent image.
8546
8547 Neither the current machine state nor other snapshots are affected
8548 by this operation, except that parent media will be modified
8549 to contain the disk data associated with the snapshot being deleted.
8550 </li>
8551 </ul>
8552
8553 Each snapshot contains the settings of the virtual machine (hardware
8554 configuration etc.). In addition, if the machine was running when the
8555 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8556 the current VM state is saved in the snapshot (similarly to what happens
8557 when a VM's state is saved). The snapshot is then said to
8558 be <i>online</i> because when restoring it, the VM will be running.
8559
8560 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8561 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8562
8563 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8564 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8565 it then contains a so-called "zero execution state", representing a
8566 machine that is powered off.
8567
8568 <h3>Snapshot branches and the "current" snapshot</h3>
8569
8570 Snapshots can be chained, whereby every next snapshot is based on the
8571 previous one. This chaining is related to medium branching
8572 (see the <link to="IMedium"/> description) in that every time
8573 a new snapshot is created, a new differencing medium is implicitly
8574 created for all normal media attached to the machine.
8575
8576 Each virtual machine has a "current snapshot", identified by
8577 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8578 to the last snapshot in the chain. In a future version of VirtualBox,
8579 it will be possible to reset a machine's current state to that of an
8580 earlier snapshot without discarding the current state so that it will be
8581 possible to create alternative snapshot paths in a snapshot tree.
8582
8583 In the current implementation, multiple snapshot branches within one
8584 virtual machine are not allowed. Every machine has a single branch,
8585 and <link to="IConsole::takeSnapshot"/> operation adds a new
8586 snapshot to the top of that branch.
8587 </desc>
8588
8589 <attribute name="id" type="uuid" mod="string" readonly="yes">
8590 <desc>UUID of the snapshot.</desc>
8591 </attribute>
8592
8593 <attribute name="name" type="wstring">
8594 <desc>Short name of the snapshot.</desc>
8595 </attribute>
8596
8597 <attribute name="description" type="wstring">
8598 <desc>Optional description of the snapshot.</desc>
8599 </attribute>
8600
8601 <attribute name="timeStamp" type="long long" readonly="yes">
8602 <desc>
8603 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8604 </desc>
8605 </attribute>
8606
8607 <attribute name="online" type="boolean" readonly="yes">
8608 <desc>
8609 @c true if this snapshot is an online snapshot and @c false otherwise.
8610
8611 When this attribute is @c true, the
8612 <link to="IMachine::stateFilePath"/> attribute of the
8613 <link to="#machine"/> object associated with this snapshot
8614 will point to the saved state file. Otherwise, it will be
8615 an empty string.
8616 </desc>
8617 </attribute>
8618
8619 <attribute name="machine" type="IMachine" readonly="yes">
8620 <desc>
8621 Virtual machine this snapshot is taken on. This object
8622 stores all settings the machine had when taking this snapshot.
8623 <note>
8624 The returned machine object is immutable, i.e. no
8625 any settings can be changed.
8626 </note>
8627 </desc>
8628 </attribute>
8629
8630 <attribute name="parent" type="ISnapshot" readonly="yes">
8631 <desc>
8632 Parent snapshot (a snapshot this one is based on), or
8633 @c null if the snapshot has no parent (i.e. is the first snapshot).
8634 </desc>
8635 </attribute>
8636
8637 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8638 <desc>
8639 Child snapshots (all snapshots having this one as a parent).
8640 </desc>
8641 </attribute>
8642
8643 </interface>
8644
8645
8646 <!--
8647 // IMedium
8648 /////////////////////////////////////////////////////////////////////////
8649 -->
8650
8651 <enum
8652 name="MediumState"
8653 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8654 >
8655 <desc>
8656 Virtual medium state.
8657 <see>IMedium</see>
8658 </desc>
8659
8660 <const name="NotCreated" value="0">
8661 <desc>
8662 Associated medium storage does not exist (either was not created yet or
8663 was deleted).
8664 </desc>
8665 </const>
8666 <const name="Created" value="1">
8667 <desc>
8668 Associated storage exists and accessible; this gets set if the
8669 accessibility check performed by <link to="IMedium::refreshState" />
8670 was successful.
8671 </desc>
8672 </const>
8673 <const name="LockedRead" value="2">
8674 <desc>
8675 Medium is locked for reading (see <link to="IMedium::lockRead"/>),
8676 no data modification is possible.
8677 </desc>
8678 </const>
8679 <const name="LockedWrite" value="3">
8680 <desc>
8681 Medium is locked for writing (see <link to="IMedium::lockWrite"/>),
8682 no concurrent data reading or modification is possible.
8683 </desc>
8684 </const>
8685 <const name="Inaccessible" value="4">
8686 <desc>
8687 Medium accessiblity check (see <link to="IMedium::refreshState" />) has
8688 not yet been performed, or else, associated medium storage is not
8689 accessible. In the first case, <link to="IMedium::lastAccessError"/>
8690 is empty, in the second case, it describes the error that occured.
8691 </desc>
8692 </const>
8693 <const name="Creating" value="5">
8694 <desc>
8695 Associated medium storage is being created.
8696 </desc>
8697 </const>
8698 <const name="Deleting" value="6">
8699 <desc>
8700 Associated medium storage is being deleted.
8701 </desc>
8702 </const>
8703 </enum>
8704
8705 <enum
8706 name="MediumType"
8707 uuid="11f6f7a5-0327-409a-9d42-7db6a0cec578"
8708 >
8709 <desc>
8710 Virtual medium type.
8711 <see>IMedium</see>
8712 </desc>
8713
8714 <const name="Normal" value="0">
8715 <desc>
8716 Normal medium (attached directly or indirectly, preserved
8717 when taking snapshots).
8718 </desc>
8719 </const>
8720 <const name="Immutable" value="1">
8721 <desc>
8722 Immutable medium (attached indirectly, changes are wiped out
8723 the next time the virtual machine is started).
8724 </desc>
8725 </const>
8726 <const name="Writethrough" value="2">
8727 <desc>
8728 Write through medium (attached directly, ignored when
8729 taking snapshots).
8730 </desc>
8731 </const>
8732 </enum>
8733
8734 <enum
8735 name="MediumVariant"
8736 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8737 >
8738 <desc>
8739 Virtual medium image variant. More than one flag may be set.
8740 <see>IMedium</see>
8741 </desc>
8742
8743 <const name="Standard" value="0">
8744 <desc>
8745 No particular variant requested, results in using the backend default.
8746 </desc>
8747 </const>
8748 <const name="VmdkSplit2G" value="0x01">
8749 <desc>
8750 VMDK image split in chunks of less than 2GByte.
8751 </desc>
8752 </const>
8753 <const name="VmdkStreamOptimized" value="0x04">
8754 <desc>
8755 VMDK streamOptimized image. Special import/export format which is
8756 read-only/append-only.
8757 </desc>
8758 </const>
8759 <const name="VmdkESX" value="0x08">
8760 <desc>
8761 VMDK format variant used on ESX products.
8762 </desc>
8763 </const>
8764 <const name="Fixed" value="0x10000">
8765 <desc>
8766 Fixed image. Only allowed for base images.
8767 </desc>
8768 </const>
8769 <const name="Diff" value="0x20000">
8770 <desc>
8771 Fixed image. Only allowed for base images.
8772 </desc>
8773 </const>
8774 </enum>
8775
8776 <interface
8777 name="IMediumAttachment" extends="$unknown"
8778 uuid="7bb6ac41-8c03-4863-9eea-d9c76561b8d1"
8779 wsmap="struct"
8780 >
8781 <desc>
8782 The IMediumAttachment interface represents the attachment
8783 of a storage medium to a virtual machine. Each machine contains
8784 an array of its medium attachments in <link to="IMachine::mediumAttachments"/>.
8785
8786 Each medium attachment specifies a storage controller as well as a port
8787 and device number. Fixed media (hard disks) will always also specify
8788 an instance of IMedium in <link to="#medium" />, referring to the hard disk
8789 medium. For removeable media, the IMedia instance is optional; it can be
8790 @c null if no media is mounted (see <link to="IMachine::mountMedium" />).
8791 </desc>
8792
8793 <attribute name="medium" type="IMedium" readonly="yes">
8794 <desc>Medium object associated with this attachment; it
8795 can be @c null for removable devices.</desc>
8796 </attribute>
8797
8798 <attribute name="controller" type="IStorageController" readonly="yes">
8799 <desc>Storage controller object to which this attachment belongs.</desc>
8800 </attribute>
8801
8802 <attribute name="port" type="long" readonly="yes">
8803 <desc>Port number of this attachment.</desc>
8804 </attribute>
8805
8806 <attribute name="device" type="long" readonly="yes">
8807 <desc>Device slot number of this attachment.</desc>
8808 </attribute>
8809
8810 <attribute name="type" type="DeviceType" readonly="yes">
8811 <desc>Device type of this attachment.</desc>
8812 </attribute>
8813
8814 <attribute name="passthrough" type="boolean" readonly="yes">
8815 <desc>Pass I/O requests through to a device on the host.</desc>
8816 </attribute>
8817
8818 </interface>
8819
8820 <interface
8821 name="IMedium" extends="$unknown"
8822 uuid="aa8167ba-df72-4738-b740-9b84377ba9f1"
8823 wsmap="managed"
8824 >
8825 <desc>
8826 The IMedium interface represents virtual storage for a machine's
8827 hard disks, CD/DVD or floppy drives. It will typically represent
8828 a disk image on the host, for example a VDI or VMDK file representing
8829 a virtual hard disk, or an ISO or RAW file representing virtual
8830 removable media, but can also point to a network location (e.g.
8831 for iSCSI targets).
8832
8833 Instances of IMedium are connected to virtual machines by way of
8834 medium attachments (see <link to="IMediumAttachment" />), which link
8835 the storage medium to a particular device slot of a storage controller
8836 of the virtual machine.
8837 In the VirtualBox API, virtual storage is therefore always represented
8838 by the following chain of object links:
8839
8840 <ul>
8841 <li><link to="IMachine::storageControllers"/> contains an array of
8842 storage controllers (IDE, SATA, SCSI or a floppy controller;
8843 these are instances of <link to="IStorageController"/>).</li>
8844 <li><link to="IMachine::mediumAttachments"/> contains an array of
8845 medium attachments (instances of <link to="IMediumAttachment"/>),
8846 each containing a storage controller from the above array, a
8847 port/device specification, and an instance of IMedium representing
8848 the medium storage (image file).
8849
8850 For removable media, the storage medium is optional; a medium
8851 attachment with no medium represents a CD/DVD or floppy drive
8852 with no medium inserted. By contrast, hard disk attachments
8853 will always have an IMedium object attached.</li>
8854 <li>Each IMedium in turn points to a storage unit (such as a file
8855 on the host computer or a network resource) that holds actual
8856 data. This location is represented by the <link to="#location"/>
8857 attribute.</li>
8858 </ul>
8859
8860 Existing media are opened using the following methods, depending on the
8861 media type:
8862 <ul>
8863 <li><link to="IVirtualBox::openHardDisk"/></li>
8864 <li><link to="IVirtualBox::openDVDImage"/></li>
8865 <li><link to="IVirtualBox::openFloppyImage"/></li>
8866 </ul>
8867
8868 New hard disk media can be created with the VirtualBox API using the
8869 <link to="IVirtualBox::createHardDisk"/> method.
8870
8871 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8872 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8873 type in a regular file.
8874
8875 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8876 drive; in that case the <link to="#id" /> attribute contains the UUID of
8877 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8878
8879 <h3>Known media</h3>
8880
8881 When an existing medium is opened for the first time, it is automatically
8882 remembered by the given VirtualBox installation or, in other words, becomes
8883 a <i>known medium</i>. Known media are stored in the media
8884 registry transparently maintained by VirtualBox and stored in settings
8885 files so that this registry is preserved when VirtualBox is not running.
8886
8887 Newly created virtual media are remembered only when the associated
8888 storage unit is actually created.
8889
8890 All known media can be enumerated using
8891 <link to="IVirtualBox::hardDisks"/>,
8892 <link to="IVirtualBox::DVDImages"/> and
8893 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8894 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8895 and similar methods or by location using
8896 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8897
8898 Only known media can be attached to virtual machines.
8899
8900 Removing known media from the media registry is performed when the given
8901 medium is closed using the <link to="#close"/> method or when its
8902 associated storage unit is deleted.
8903
8904 <h3>Accessibility checks</h3>
8905
8906 VirtualBox defers media accessibility checks until the <link to="#refreshState" />
8907 method is called explicitly on a medium. This is done to make the VirtualBox object
8908 ready for serving requests as fast as possible and let the end-user
8909 application decide if it needs to check media accessibility right away or not.
8910
8911 As a result, when VirtualBox starts up (e.g. the VirtualBox
8912 object gets created for the first time), all known media are in the
8913 "Inaccessible" state, but the value of the <link to="#lastAccessError"/>
8914 attribute is an empty string because no actual accessibility check has
8915 been made yet.
8916
8917 After calling <link to="#refreshState" />, a medium is considered
8918 <i>accessible</i> if its storage unit can be read. In that case, the
8919 <link to="#state"/> attribute has a value of "Created". If the storage
8920 unit cannot be read (for example, because it is located on a disconnected
8921 network resource, or was accidentally deleted outside VirtualBox),
8922 the medium is considered <i>inaccessible</i>, which is indicated by the
8923 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8924 obtained by reading the <link to="#lastAccessError"/> attribute.
8925
8926 <h3>Medium types</h3>
8927
8928 There are three types of medium behavior (see <link to="MediumType" />):
8929 "normal", "immutable" and "writethrough", represented by the
8930 <link to="#type"/> attribute. The type of the medium defines how the
8931 medium is attached to a virtual machine and what happens when a
8932 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8933 attached medium is taken. At the moment DVD and floppy media are always
8934 of type "writethrough".
8935
8936 All media can be also divided in two groups: <i>base</i> media and
8937 <i>differencing</i> media. A base medium contains all sectors of the
8938 medium data in its own storage and therefore can be used independently.
8939 In contrast, a differencing mediun is a "delta" to some other medium and
8940 contains only those sectors which differ from that other medium, which is
8941 then called a <i>parent</i>. The differencing medium is said to be
8942 <i>linked to</i> that parent. The parent may be itself a differencing
8943 medium, thus forming a chain of linked media. The last element in that
8944 chain must always be a base medium. Note that several differencing
8945 media may be linked to the same parent medium.
8946
8947 Differencing media can be distinguished from base media by querying the
8948 <link to="#parent"/> attribute: base media do not have parents they would
8949 depend on, so the value of this attribute is always @c null for them.
8950 Using this attribute, it is possible to walk up the medium tree (from the
8951 child medium to its parent). It is also possible to walk down the tree
8952 using the <link to="#children"/> attribute.
8953
8954 Note that the type of all differencing media is
8955 <link to="MediumType_Normal" />; all other values are meaningless for
8956 them. Base media may be of any type.
8957
8958 <h3>Creating hard disks</h3>
8959
8960 New base hard disks are created using
8961 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8962 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8963 disks are usually implicitly created by VirtualBox when needed but may
8964 also be created explicitly using <link to="#createDiffStorage"/>.
8965
8966 After the hard disk is successfully created (including the storage unit)
8967 or opened, it becomes a known hard disk (remembered in the internal media
8968 registry). Known hard disks can be attached to a virtual machine, accessed
8969 through <link to="IVirtualBox::getHardDisk"/> and
8970 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8971 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8972
8973 The following methods, besides <link to="IMedium::close"/>,
8974 automatically remove the hard disk from the media registry:
8975 <ul>
8976 <li><link to="#deleteStorage"/></li>
8977 <li><link to="#mergeTo"/></li>
8978 </ul>
8979
8980 If the storage unit of the hard disk is a regular file in the host's
8981 file system then the rules stated in the description of the
8982 <link to="IMedium::location"/> attribute apply when setting its value. In
8983 addition, a plain file name without any path may be given, in which case
8984 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8985 folder</link> will be prepended to it.
8986
8987 <h4>Automatic composition of the file name part</h4>
8988
8989 Another extension to the <link to="IMedium::location"/> attribute is that
8990 there is a possibility to cause VirtualBox to compose a unique value for
8991 the file name part of the location using the UUID of the hard disk. This
8992 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
8993 e.g. before the storage unit is created, and works as follows. You set the
8994 value of the <link to="IMedium::location"/> attribute to a location
8995 specification which only contains the path specification but not the file
8996 name part and ends with either a forward slash or a backslash character.
8997 In response, VirtualBox will generate a new UUID for the hard disk and
8998 compose the file name using the following pattern:
8999 <pre>
9000 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
9001 </pre>
9002 where <tt>&lt;path&gt;</tt> is the supplied path specification,
9003 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
9004 is the default extension for the storage format of this hard disk. After
9005 that, you may call any of the methods that create a new hard disk storage
9006 unit and they will use the generated UUID and file name.
9007
9008 <h3>Attaching Hard Disks</h3>
9009
9010 Hard disks are attached to virtual machines using the
9011 <link to="IMachine::attachDevice"/> method and detached using the
9012 <link to="IMachine::detachDevice"/> method. Depending on their
9013 <link to="#type"/>, hard disks are attached either
9014 <i>directly</i> or <i>indirectly</i>.
9015
9016 When a hard disk is being attached directly, it is associated with the
9017 virtual machine and used for hard disk operations when the machine is
9018 running. When a hard disk is being attached indirectly, a new differencing
9019 hard disk linked to it is implicitly created and this differencing hard
9020 disk is associated with the machine and used for hard disk operations.
9021 This also means that if <link to="IMachine::attachDevice"/> performs
9022 a direct attachment then the same hard disk will be returned in response
9023 to the subsequent <link to="IMachine::getMedium"/> call; however if
9024 an indirect attachment is performed then
9025 <link to="IMachine::getMedium"/> will return the implicitly created
9026 differencing hard disk, not the original one passed to <link
9027 to="IMachine::attachDevice"/>. In detail:
9028
9029 <ul>
9030 <li><b>Normal base</b> hard disks that do not have children (i.e.
9031 differencing hard disks linked to them) and that are not already
9032 attached to virtual machines in snapshots are attached <b>directly</b>.
9033 Otherwise, they are attached <b>indirectly</b> because having
9034 dependent children or being part of the snapshot makes it impossible
9035 to modify hard disk contents without breaking the integrity of the
9036 dependent party. The <link to="#readOnly"/> attribute allows to
9037 quickly determine the kind of the attachment for the given hard
9038 disk. Note that if a normal base hard disk is to be indirectly
9039 attached to a virtual machine with snapshots then a special
9040 procedure called <i>smart attachment</i> is performed (see below).</li>
9041 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
9042 they are attached <b>directly</b> if they do not have children and are
9043 not attached to virtual machines in snapshots, and <b>indirectly</b>
9044 otherwise. Note that the smart attachment procedure is never performed
9045 for differencing hard disks.</li>
9046 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
9047 they are designed to be non-writable. If an immutable hard disk is
9048 attached to a virtual machine with snapshots then a special
9049 procedure called smart attachment is performed (see below).</li>
9050 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
9051 also as designed. This also means that writethrough hard disks cannot
9052 have other hard disks linked to them at all.</li>
9053 </ul>
9054
9055 Note that the same hard disk, regardless of its type, may be attached to
9056 more than one virtual machine at a time. In this case, the machine that is
9057 started first gains exclusive access to the hard disk and attempts to
9058 start other machines having this hard disk attached will fail until the
9059 first machine is powered down.
9060
9061 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
9062 that the given hard disk remains associated with the given machine after a
9063 successful <link to="IMachine::detachDevice"/> call until
9064 <link to="IMachine::saveSettings"/> is called to save all changes to
9065 machine settings to disk. This deferring is necessary to guarantee that
9066 the hard disk configuration may be restored at any time by a call to
9067 <link to="IMachine::discardSettings"/> before the settings
9068 are saved (committed).
9069
9070 Note that if <link to="IMachine::discardSettings"/> is called after
9071 indirectly attaching some hard disks to the machine but before a call to
9072 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
9073 all differencing hard disks implicitly created by
9074 <link to="IMachine::attachDevice"/> for these indirect attachments.
9075 Such implicitly created hard disks will also be immediately deleted when
9076 detached explicitly using the <link to="IMachine::detachDevice"/>
9077 call if it is made before <link to="IMachine::saveSettings"/>. This
9078 implicit deletion is safe because newly created differencing hard
9079 disks do not contain any user data.
9080
9081 However, keep in mind that detaching differencing hard disks that were
9082 implicitly created by <link to="IMachine::attachDevice"/>
9083 before the last <link to="IMachine::saveSettings"/> call will
9084 <b>not</b> implicitly delete them as they may already contain some data
9085 (for example, as a result of virtual machine execution). If these hard
9086 disks are no more necessary, the caller can always delete them explicitly
9087 using <link to="#deleteStorage"/> after they are actually de-associated
9088 from this machine by the <link to="IMachine::saveSettings"/> call.
9089
9090 <h3>Smart Attachment</h3>
9091
9092 When normal base or immutable hard disks are indirectly attached to a
9093 virtual machine then some additional steps are performed to make sure the
9094 virtual machine will have the most recent "view" of the hard disk being
9095 attached. These steps include walking through the machine's snapshots
9096 starting from the current one and going through ancestors up to the first
9097 snapshot. Hard disks attached to the virtual machine in all
9098 of the encountered snapshots are checked whether they are descendants of
9099 the given normal base or immutable hard disk. The first found child (which
9100 is the differencing hard disk) will be used instead of the normal base or
9101 immutable hard disk as a parent for creating a new differencing hard disk
9102 that will be actually attached to the machine. And only if no descendants
9103 are found or if the virtual machine does not have any snapshots then the
9104 normal base or immutable hard disk will be used itself as a parent for
9105 this differencing hard disk.
9106
9107 It is easier to explain what smart attachment does using the
9108 following example:
9109 <pre>
9110BEFORE attaching B.vdi: AFTER attaching B.vdi:
9111
9112Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
9113 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
9114 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
9115 Snapshot 4 (none) Snapshot 4 (none)
9116 CurState (none) CurState (D3->D2.vdi)
9117
9118 NOT
9119 ...
9120 CurState (D3->B.vdi)
9121 </pre>
9122 The first column is the virtual machine configuration before the base hard
9123 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
9124 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
9125 mean that the hard disk that is actually attached to the machine is a
9126 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
9127 another hard disk, <tt>B.vdi</tt>.
9128
9129 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
9130 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
9131 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
9132 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
9133 it cannot be attached directly and needs an indirect attachment (i.e.
9134 implicit creation of a new differencing hard disk). Due to the smart
9135 attachment procedure, the new differencing hard disk
9136 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
9137 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
9138 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
9139 machine.
9140
9141 Note that if there is more than one descendant hard disk of the given base
9142 hard disk found in a snapshot, and there is an exact device, channel and
9143 bus match, then this exact match will be used. Otherwise, the youngest
9144 descendant will be picked up.
9145
9146 There is one more important aspect of the smart attachment procedure which
9147 is not related to snapshots at all. Before walking through the snapshots
9148 as described above, the backup copy of the current list of hard disk
9149 attachment is searched for descendants. This backup copy is created when
9150 the hard disk configuration is changed for the first time after the last
9151 <link to="IMachine::saveSettings"/> call and used by
9152 <link to="IMachine::discardSettings"/> to undo the recent hard disk
9153 changes. When such a descendant is found in this backup copy, it will be
9154 simply re-attached back, without creating a new differencing hard disk for
9155 it. This optimization is necessary to make it possible to re-attach the
9156 base or immutable hard disk to a different bus, channel or device slot
9157 without losing the contents of the differencing hard disk actually
9158 attached to the machine in place of it.
9159 </desc>
9160
9161 <attribute name="id" type="uuid" mod="string" readonly="yes">
9162 <desc>
9163 UUID of the medium. For a newly created medium, this value is a randomly
9164 generated UUID.
9165
9166 <note>
9167 For media in one of MediumState_NotCreated, MediumState_Creating or
9168 MediumState_Deleting states, the value of this property is undefined
9169 and will most likely be an empty UUID.
9170 </note>
9171 </desc>
9172 </attribute>
9173
9174 <attribute name="description" type="wstring">
9175 <desc>
9176 Optional description of the medium. For a newly created medium the value
9177 of this attribute is an empty string.
9178
9179 Medium types that don't support this attribute will return E_NOTIMPL in
9180 attempt to get or set this attribute's value.
9181
9182 <note>
9183 For some storage types, reading this attribute may return an outdated
9184 (last known) value when <link to="#state"/> is <link
9185 to="MediumState_Inaccessible"/> or <link
9186 to="MediumState_LockedWrite"/> because the value of this attribute is
9187 stored within the storage unit itself. Also note that changing the
9188 attribute value is not possible in such case, as well as when the
9189 medium is the <link to="MediumState_LockedRead"/> state.
9190 </note>
9191 </desc>
9192 </attribute>
9193
9194 <attribute name="state" type="MediumState" readonly="yes">
9195 <desc>
9196 Returns the current medium state, which is the last state set by
9197 the accessibility check performed by <link to="#refreshState"/>.
9198 If that method has not yet been called on the medium, the state
9199 is "Inaccessible"; as opposed to truly inaccessible media, the
9200 value of <link to="#lastAccessError"/> will be an empty string in
9201 that case.
9202
9203 <note>As of version 3.1, this no longer performs an accessibility check
9204 automatically; call <link to="#refreshState"/> for that.
9205 </note>
9206 </desc>
9207 </attribute>
9208
9209 <attribute name="location" type="wstring">
9210 <desc>
9211 Location of the storage unit holding medium data.
9212
9213 The format of the location string is medium type specific. For medium
9214 types using regular files in a host's file system, the location
9215 string is the full file name.
9216
9217 Some medium types may support changing the storage unit location by
9218 simply changing the value of this property. If this operation is not
9219 supported, the implementation will return E_NOTIMPL in attempt to set
9220 this attribute's value.
9221
9222 When setting a value of the location attribute which is a regular file
9223 in the host's file system, the given file name may be either relative to
9224 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
9225 absolute. Note that if the given location specification does not contain
9226 the file extension part then a proper default extension will be
9227 automatically appended by the implementation depending on the medium type.
9228 </desc>
9229 </attribute>
9230
9231 <attribute name="name" type="wstring" readonly="yes">
9232 <desc>
9233 Name of the storage unit holding medium data.
9234
9235 The returned string is a short version of the <link to="#location"/>
9236 attribute that is suitable for representing the medium in situations
9237 where the full location specification is too long (such as lists
9238 and comboboxes in GUI frontends). This string is also used by frontends
9239 to sort the media list alphabetically when needed.
9240
9241 For example, for locations that are regular files in the host's file
9242 system, the value of this attribute is just the file name (+ extension),
9243 without the path specification.
9244
9245 Note that as opposed to the <link to="#location"/> attribute, the name
9246 attribute will not necessary be unique for a list of media of the
9247 given type and format.
9248 </desc>
9249 </attribute>
9250
9251 <attribute name="deviceType" type="DeviceType" readonly="yes">
9252 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
9253 medium.</desc>
9254 </attribute>
9255
9256 <attribute name="hostDrive" type="boolean" readonly="yes">
9257 <desc>True if this corresponds to a drive on the host.</desc>
9258 </attribute>
9259
9260 <attribute name="size" type="unsigned long long" readonly="yes">
9261 <desc>
9262 Physical size of the storage unit used to hold medium data (in bytes).
9263
9264 <note>
9265 For media whose <link to="#state"/> is <link
9266 to="MediumState_Inaccessible"/>, the value of this property is the
9267 last known size. For <link to="MediumState_NotCreated"/> media,
9268 the returned value is zero.
9269 </note>
9270 </desc>
9271 </attribute>
9272
9273 <attribute name="format" type="wstring" readonly="yes">
9274 <desc>
9275 Storage format of this medium.
9276
9277 The value of this attribute is a string that specifies a backend used
9278 to store medium data. The storage format is defined when you create a
9279 new medium or automatically detected when you open an existing medium,
9280 and cannot be changed later.
9281
9282 The list of all storage formats supported by this VirtualBox
9283 installation can be obtained using
9284 <link to="ISystemProperties::mediumFormats"/>.
9285 </desc>
9286 </attribute>
9287
9288 <attribute name="type" type="MediumType">
9289 <desc>
9290 Type (role) of this medium.
9291
9292 The following constraints apply when changing the value of this
9293 attribute:
9294 <ul>
9295 <li>If a medium is attached to a virtual machine (either in the
9296 current state or in one of the snapshots), its type cannot be
9297 changed.
9298 </li>
9299 <li>As long as the medium has children, its type cannot be set
9300 to <link to="MediumType_Writethrough"/>.
9301 </li>
9302 <li>The type of all differencing media is
9303 <link to="MediumType_Normal"/> and cannot be changed.
9304 </li>
9305 </ul>
9306
9307 The type of a newly created or opened medium is set to
9308 <link to="MediumType_Normal"/>, except for DVD and floppy media,
9309 which have a type of <link to="MediumType_Writethrough"/>.
9310 </desc>
9311 </attribute>
9312
9313 <attribute name="parent" type="IMedium" readonly="yes">
9314 <desc>
9315 Parent of this medium (the medium this medium is directly based
9316 on).
9317
9318 Only differencing media have parents. For base (non-differencing)
9319 media, @c null is returned.
9320 </desc>
9321 </attribute>
9322
9323 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
9324 <desc>
9325 Children of this medium (all differencing media directly based
9326 on this medium). A @c null array is returned if this medium
9327 does not have any children.
9328 </desc>
9329 </attribute>
9330
9331 <attribute name="base" type="IMedium" readonly="yes">
9332 <desc>
9333 Base medium of this medium.
9334
9335 If this is a differencing medium, its base medium is the medium
9336 the given medium branch starts from. For all other types of media, this
9337 property returns the medium object itself (i.e. the same object this
9338 property is read on).
9339 </desc>
9340 </attribute>
9341
9342 <attribute name="readOnly" type="boolean" readonly="yes">
9343 <desc>
9344 Returns @c true if this medium is read-only and @c false otherwise.
9345
9346 A medium is considered to be read-only when its contents cannot be
9347 modified without breaking the integrity of other parties that depend on
9348 this medium such as its child media or snapshots of virtual machines
9349 where this medium is attached to these machines. If there are no
9350 children and no such snapshots then there is no dependency and the
9351 medium is not read-only.
9352
9353 The value of this attribute can be used to determine the kind of the
9354 attachment that will take place when attaching this medium to a
9355 virtual machine. If the value is @c false then the medium will
9356 be attached directly. If the value is @c true then the medium
9357 will be attached indirectly by creating a new differencing child
9358 medium for that. See the interface description for more information.
9359
9360 Note that all <link to="MediumType_Immutable">Immutable</link> media
9361 are always read-only while all
9362 <link to="MediumType_Writethrough">Writethrough</link> media are
9363 always not.
9364
9365 <note>
9366 The read-only condition represented by this attribute is related to
9367 the medium type and usage, not to the current
9368 <link to="IMedium::state">medium state</link> and not to the read-only
9369 state of the storage unit.
9370 </note>
9371 </desc>
9372 </attribute>
9373
9374 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9375 <desc>
9376 Logical size of this medium (in megabytes), as reported to the
9377 guest OS running inside the virtual machine this medium is
9378 attached to. The logical size is defined when the medium is created
9379 and cannot be changed later.
9380
9381 <note>
9382 Reading this property on a differencing medium will return the size
9383 of its <link to="#base"/> medium.
9384 </note>
9385 <note>
9386 For media whose state is <link to="#state"/> is <link
9387 to="MediumState_Inaccessible"/>, the value of this property is the
9388 last known logical size. For <link to="MediumaState_NotCreated"/>
9389 media, the returned value is zero.
9390 </note>
9391 </desc>
9392 </attribute>
9393
9394 <attribute name="autoReset" type="boolean">
9395 <desc>
9396 Whether this differencing medium will be automatically reset each
9397 time a virtual machine it is attached to is powered up.
9398
9399 See <link to="#reset()"/> for more information about resetting
9400 differencing media.
9401
9402 <note>
9403 Reading this property on a base (non-differencing) medium will
9404 always @c false. Changing the value of this property in this
9405 case is not supported.
9406 </note>
9407
9408 <result name="VBOX_E_NOT_SUPPORTED">
9409 This is not a differencing medium (when changing the attribute
9410 value).
9411 </result>
9412 </desc>
9413 </attribute>
9414
9415 <attribute name="lastAccessError" type="wstring" readonly="yes">
9416 <desc>
9417 Text message that represents the result of the last accessibility
9418 check performed by <link to="#refreshState"/>.
9419
9420 An empty string is returned if the last accessibility check
9421 was successful or has not yet been called. As a result, if
9422 <link to="#state" /> is "Inaccessible" and this attribute is empty,
9423 then <link to="#refreshState"/> has yet to be called; this is the
9424 default value of media after VirtualBox initialization.
9425 A non-empty string indicates a failure and should normally describe
9426 a reason of the failure (for example, a file read error).
9427 </desc>
9428 </attribute>
9429
9430 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9431 <desc>
9432 Array of UUIDs of all machines this medium is attached to.
9433
9434 A @c null array is returned if this medium is not attached to any
9435 machine or to any machine's snapshot.
9436
9437 <note>
9438 The returned array will include a machine even if this medium is not
9439 attached to that machine in the current state but attached to it in
9440 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9441 details.
9442 </note>
9443 </desc>
9444 </attribute>
9445
9446 <method name="refreshState">
9447 <desc>
9448 If the current medium state (see <link to="MediumState"/>) is one of
9449 "Created", "Inaccessible" or "LockedRead", then this performs an
9450 accessibility check on the medium and sets the value of the <link to="#state"/>
9451 attribute accordingly; that value is also returned for convenience.
9452
9453 For all other state values, this does not perform a refresh but returns
9454 the state only.
9455
9456 The refresh, if performed, may take a long time (several seconds or even
9457 minutes, depending on the storage unit location and format) because it performs an
9458 accessibility check of the storage unit. This check may cause a significant
9459 delay if the storage unit of the given medium is, for example, a file located
9460 on a network share which is not currently accessible due to connectivity
9461 problems. In that case, the call will not return until a timeout
9462 interval defined by the host OS for this operation expires. For this reason,
9463 it is recommended to never read this attribute on the main UI thread to avoid
9464 making the UI unresponsive.
9465
9466 If the last known state of the medium is "Created" and the accessibility
9467 check fails, then the state would be set to "Inaccessible", and
9468 <link to="#lastAccessError"/> may be used to get more details about the
9469 failure. If the state of the medium is "LockedRead", then it remains the
9470 same, and a non-empty value of <link to="#lastAccessError"/> will
9471 indicate a failed accessibility check in this case.
9472
9473 Note that not all medium states are applicable to all medium types.
9474 </desc>
9475 <param name="state" type="MediumState" dir="return">
9476 <desc>
9477 New medium state.
9478 </desc>
9479 </param>
9480 </method>
9481
9482 <method name="getSnapshotIds">
9483 <desc>
9484 Returns an array of UUIDs of all snapshots of the given machine where
9485 this medium is attached to.
9486
9487 If the medium is attached to the machine in the current state, then the
9488 first element in the array will always be the ID of the queried machine
9489 (i.e. the value equal to the @c machineId argument), followed by
9490 snapshot IDs (if any).
9491
9492 If the medium is not attached to the machine in the current state, then
9493 the array will contain only snapshot IDs.
9494
9495 The returned array may be @c null if this medium is not attached
9496 to the given machine at all, neither in the current state nor in one of
9497 the snapshots.
9498 </desc>
9499 <param name="machineId" type="uuid" mod="string" dir="in">
9500 <desc>
9501 UUID of the machine to query.
9502 </desc>
9503 </param>
9504 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9505 <desc>
9506 Array of snapshot UUIDs of the given machine using this medium.
9507 </desc>
9508 </param>
9509 </method>
9510
9511 <method name="lockRead">
9512 <desc>
9513 Locks this medium for reading.
9514
9515 A read lock is shared: many clients can simultaneously lock the
9516 same medium for reading unless it is already locked for writing (see
9517 <link to="#lockWrite"/>) in which case an error is returned.
9518
9519 When the medium is locked for reading, it cannot be modified
9520 from within VirtualBox. This means that any method that changes
9521 the properties of this medium or contents of the storage unit
9522 will return an error (unless explicitly stated otherwise). That
9523 includes an attempt to start a virtual machine that wants to
9524 write to the the medium.
9525
9526 When the virtual machine is started up, it locks for reading all
9527 media it uses in read-only mode. If some medium cannot be locked
9528 for reading, the startup procedure will fail.
9529 A medium is typically locked for reading while it is used by a running
9530 virtual machine but has a depending differencing image that receives
9531 the actual write operations. This way one base medium can have
9532 multiple child differencing images which can be written to
9533 simultaneously. Read-only media such as DVD and floppy images are
9534 also locked for reading only (so they can be in use by multiple
9535 machines simultaneously).
9536
9537 A medium is also locked for reading when it is the source of a
9538 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9539
9540 The medium locked for reading must be unlocked using the <link
9541 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9542 can be nested and must be followed by the same number of paired
9543 <link to="#unlockRead"/> calls.
9544
9545 This method sets the medium state (see <link to="#state"/>) to
9546 "LockedRead" on success. The medium's previous state must be
9547 one of "Created", "Inaccessible" or "LockedRead".
9548
9549 Locking an inaccessible medium is not an error; this method performs
9550 a logical lock that prevents modifications of this medium through
9551 the VirtualBox API, not a physical file-system lock of the underlying
9552 storage unit.
9553
9554 This method returns the current state of the medium
9555 <i>before</i> the operation.
9556
9557 <result name="VBOX_E_INVALID_OBJECT_STATE">
9558 Invalid medium state (e.g. not created, locked, inaccessible,
9559 creating, deleting).
9560 </result>
9561
9562 </desc>
9563 <param name="state" type="MediumState" dir="return">
9564 <desc>
9565 State of the medium after the operation.
9566 </desc>
9567 </param>
9568 </method>
9569
9570 <method name="unlockRead">
9571 <desc>
9572 Cancels the read lock previously set by <link to="#lockRead"/>.
9573
9574 For both success and failure, this method returns the current state
9575 of the medium <i>after</i> the operation.
9576
9577 See <link to="#lockRead"/> for more details.
9578
9579 <result name="VBOX_E_INVALID_OBJECT_STATE">
9580 Medium not locked for reading.
9581 </result>
9582
9583 </desc>
9584 <param name="state" type="MediumState" dir="return">
9585 <desc>
9586 State of the medium after the operation.
9587 </desc>
9588 </param>
9589 </method>
9590
9591 <method name="lockWrite">
9592 <desc>
9593 Locks this medium for writing.
9594
9595 A write lock, as opposed to <link to="#lockRead"/>, is
9596 exclusive: there may be only one client holding a write lock,
9597 and there may be no read locks while the write lock is held.
9598 As a result, read-locking fails if a write lock is held, and
9599 write-locking fails if either a read or another write lock is held.
9600
9601 When a medium is locked for writing, it cannot be modified
9602 from within VirtualBox, and it is not guaranteed that the values
9603 of its properties are up-to-date. Any method that changes the
9604 properties of this medium or contents of the storage unit will
9605 return an error (unless explicitly stated otherwise).
9606
9607 When a virtual machine is started up, it locks for writing all
9608 media it uses to write data to. If any medium could not be locked
9609 for writing, the startup procedure will fail. If a medium has
9610 differencing images, then while the machine is running, only
9611 the last ("leaf") differencing image is locked for writing,
9612 whereas its parents are locked for reading only.
9613
9614 A medium is also locked for writing when it is the target of a
9615 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9616
9617 The medium locked for writing must be unlocked using the <link
9618 to="#unlockWrite"/> method. Write locks <i>cannot</i> be nested.
9619
9620 This method sets the medium state (see <link to="#state"/>) to
9621 "LockedWrite" on success. The medium's previous state must be
9622 either "Created" or "Inaccessible".
9623
9624 Locking an inaccessible medium is not an error; this method performs
9625 a logical lock that prevents modifications of this medium through
9626 the VirtualBox API, not a physical file-system lock of the underlying
9627 storage unit.
9628
9629 For both, success and failure, this method returns the current
9630 state of the medium <i>before</i> the operation.
9631
9632 <result name="VBOX_E_INVALID_OBJECT_STATE">
9633 Invalid medium state (e.g. not created, locked, inaccessible,
9634 creating, deleting).
9635 </result>
9636
9637 </desc>
9638 <param name="state" type="MediumState" dir="return">
9639 <desc>
9640 State of the medium after the operation.
9641 </desc>
9642 </param>
9643 </method>
9644
9645 <method name="unlockWrite">
9646 <desc>
9647 Cancels the write lock previously set by <link to="#lockWrite"/>.
9648
9649 For both success and failure, this method returns the current
9650 state of the medium <i>after</i> the operation.
9651
9652 See <link to="#lockWrite"/> for more details.
9653
9654 <result name="VBOX_E_INVALID_OBJECT_STATE">
9655 Medium not locked for writing.
9656 </result>
9657
9658 </desc>
9659 <param name="state" type="MediumState" dir="return">
9660 <desc>
9661 State of the medium after the operation.
9662 </desc>
9663 </param>
9664 </method>
9665
9666 <method name="close">
9667 <desc>
9668 Closes this medium.
9669
9670 The medium must not be attached to any known virtual machine
9671 and must not have any known child media, otherwise the
9672 operation will fail.
9673
9674 When the medium is successfully closed, it gets removed from
9675 the list of remembered media, but its storage unit is not
9676 deleted. In particular, this means that this medium can be
9677 later opened again using the <link
9678 to="IVirtualBox::openHardDisk"/> call.
9679
9680 Note that after this method successfully returns, the given medium
9681 object becomes uninitialized. This means that any attempt
9682 to call any of its methods or attributes will fail with the
9683 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9684
9685 <result name="VBOX_E_INVALID_OBJECT_STATE">
9686 Invalid medium state (other than not created, created or
9687 inaccessible).
9688 </result>
9689 <result name="VBOX_E_OBJECT_IN_USE">
9690 Medium attached to virtual machine.
9691 </result>
9692 <result name="VBOX_E_FILE_ERROR">
9693 Settings file not accessible.
9694 </result>
9695 <result name="VBOX_E_XML_ERROR">
9696 Could not parse the settings file.
9697 </result>
9698
9699 </desc>
9700 </method>
9701
9702 <!-- storage methods -->
9703
9704 <method name="getProperty">
9705 <desc>
9706 Returns the value of the custom medium property with the given name.
9707
9708 The list of all properties supported by the given medium format can
9709 be obtained with <link to="IMediumFormat::describeProperties"/>.
9710
9711 Note that if this method returns an empty string in @a value, the
9712 requested property is supported but currently not assigned any value.
9713
9714 <result name="VBOX_E_OBJECT_NOT_FOUND">
9715 Requested property does not exist (not supported by the format).
9716 </result>
9717 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9718 </desc>
9719 <param name="name" type="wstring" dir="in">
9720 <desc>Name of the property to get.</desc>
9721 </param>
9722 <param name="value" type="wstring" dir="return">
9723 <desc>Current property value.</desc>
9724 </param>
9725 </method>
9726
9727 <method name="setProperty">
9728 <desc>
9729 Sets the value of the custom medium property with the given name.
9730
9731 The list of all properties supported by the given medium format can
9732 be obtained with <link to="IMediumFormat::describeProperties"/>.
9733
9734 Note that setting the property value to @c null or an empty string is
9735 equivalent to deleting the existing value. A default value (if it is
9736 defined for this property) will be used by the format backend in this
9737 case.
9738
9739 <result name="VBOX_E_OBJECT_NOT_FOUND">
9740 Requested property does not exist (not supported by the format).
9741 </result>
9742 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9743 </desc>
9744 <param name="name" type="wstring" dir="in">
9745 <desc>Name of the property to set.</desc>
9746 </param>
9747 <param name="value" type="wstring" dir="in">
9748 <desc>Property value to set.</desc>
9749 </param>
9750 </method>
9751
9752 <method name="getProperties">
9753 <desc>
9754 Returns values for a group of properties in one call.
9755
9756 The names of the properties to get are specified using the @a names
9757 argument which is a list of comma-separated property names or
9758 an empty string if all properties are to be returned. Note that currently
9759 the value of this argument is ignored and the method always returns all
9760 existing properties.
9761
9762 The list of all properties supported by the given medium format can
9763 be obtained with <link to="IMediumFormat::describeProperties"/>.
9764
9765 The method returns two arrays, the array of property names corresponding
9766 to the @a names argument and the current values of these properties.
9767 Both arrays have the same number of elements with each elemend at the
9768 given index in the first array corresponds to an element at the same
9769 index in the second array.
9770
9771 Note that for properties that do not have assigned values,
9772 an empty string is returned at the appropriate index in the
9773 @a returnValues array.
9774
9775 </desc>
9776 <param name="names" type="wstring" dir="in">
9777 <desc>
9778 Names of properties to get.
9779 </desc>
9780 </param>
9781 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9782 <desc>Names of returned properties.</desc>
9783 </param>
9784 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9785 <desc>Values of returned properties.</desc>
9786 </param>
9787 </method>
9788
9789 <method name="setProperties">
9790 <desc>
9791 Sets values for a group of properties in one call.
9792
9793 The names of the properties to set are passed in the @a names
9794 array along with the new values for them in the @a values array. Both
9795 arrays have the same number of elements with each elemend at the given
9796 index in the first array corresponding to an element at the same index
9797 in the second array.
9798
9799 If there is at least one property name in @a names that is not valid,
9800 the method will fail before changing the values of any other properties
9801 from the @a names array.
9802
9803 Using this method over <link to="#setProperty"/> is preferred if you
9804 need to set several properties at once since it will result into less
9805 IPC calls.
9806
9807 The list of all properties supported by the given medium format can
9808 be obtained with <link to="IMediumFormat::describeProperties"/>.
9809
9810 Note that setting the property value to @c null or an empty string is
9811 equivalent to deleting the existing value. A default value (if it is
9812 defined for this property) will be used by the format backend in this
9813 case.
9814 </desc>
9815 <param name="names" type="wstring" safearray="yes" dir="in">
9816 <desc>Names of properties to set.</desc>
9817 </param>
9818 <param name="values" type="wstring" safearray="yes" dir="in">
9819 <desc>Values of properties to set.</desc>
9820 </param>
9821 </method>
9822
9823 <!-- storage methods -->
9824
9825 <method name="createBaseStorage">
9826 <desc>
9827 Starts creating a hard disk storage unit (fixed/dynamic, according
9828 to the variant flags) in in the background. The previous storage unit
9829 created for this object, if any, must first be deleted using
9830 <link to="#deleteStorage"/>, otherwise the operation will fail.
9831
9832 Before the operation starts, the medium is placed in
9833 <link to="MediumState_Creating"/> state. If the create operation
9834 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
9835 state.
9836
9837 After the returned progress object reports that the operation has
9838 successfully completed, the medium state will be set to <link
9839 to="MediumState_Created"/>, the medium will be remembered by this
9840 VirtualBox installation and may be attached to virtual machines.
9841
9842 <result name="VBOX_E_NOT_SUPPORTED">
9843 The variant of storage creation operation is not supported. See <link
9844 to="IMediumFormat::capabilities"/>.
9845 </result>
9846 </desc>
9847 <param name="logicalSize" type="unsigned long long" dir="in">
9848 <desc>Maximum logical size of the medium in megabytes.</desc>
9849 </param>
9850 <param name="variant" type="MediumVariant" dir="in">
9851 <desc>Exact image variant which should be created.</desc>
9852 </param>
9853 <param name="progress" type="IProgress" dir="return">
9854 <desc>Progress object to track the operation completion.</desc>
9855 </param>
9856 </method>
9857
9858 <method name="deleteStorage">
9859 <desc>
9860 Starts deleting the storage unit of this medium.
9861
9862 The medium must not be attached to any known virtual machine and must
9863 not have any known child media, otherwise the operation will fail.
9864 It will also fail if there is no storage unit to delete or if deletion
9865 is already in progress, or if the medium is being in use (locked for
9866 read or for write) or inaccessible. Therefore, the only valid state for
9867 this operation to succeed is <link to="MediumState_Created"/>.
9868
9869 Before the operation starts, the medium is placed in
9870 <link to="MediumState_Deleting"/> state and gets removed from the list
9871 of remembered hard disks (media registry). If the delete operation
9872 fails, the medium will be remembered again and placed back to
9873 <link to="MediumState_Created"/> state.
9874
9875 After the returned progress object reports that the operation is
9876 complete, the medium state will be set to
9877 <link to="MediumState_NotCreated"/> and you will be able to use one of
9878 the storage creation methods to create it again.
9879
9880 <see>#close()</see>
9881
9882 <result name="VBOX_E_OBJECT_IN_USE">
9883 Medium is attached to a virtual machine.
9884 </result>
9885 <result name="VBOX_E_NOT_SUPPORTED">
9886 Storage deletion is not allowed because neither of storage creation
9887 operations are supported. See
9888 <link to="IMediumFormat::capabilities"/>.
9889 </result>
9890
9891 <note>
9892 If the deletion operation fails, it is not guaranteed that the storage
9893 unit still exists. You may check the <link to="IMedium::state"/> value
9894 to answer this question.
9895 </note>
9896 </desc>
9897 <param name="progress" type="IProgress" dir="return">
9898 <desc>Progress object to track the operation completion.</desc>
9899 </param>
9900 </method>
9901
9902 <!-- diff methods -->
9903
9904 <method name="createDiffStorage">
9905 <desc>
9906 Starts creating an empty differencing storage unit based on this
9907 medium in the format and at the location defined by the @a target
9908 argument.
9909
9910 The target medium must be in <link to="MediumState_NotCreated"/>
9911 state (i.e. must not have an existing storage unit). Upon successful
9912 completion, this operation will set the type of the target medium to
9913 <link to="MediumType_Normal"/> and create a storage unit necessary to
9914 represent the differencing medium data in the given format (according
9915 to the storage format of the target object).
9916
9917 After the returned progress object reports that the operation is
9918 successfully complete, the target medium gets remembered by this
9919 VirtualBox installation and may be attached to virtual machines.
9920
9921 <note>
9922 The medium will be set to <link to="MediumState_LockedRead"/>
9923 state for the duration of this operation.
9924 </note>
9925 <result name="VBOX_E_OBJECT_IN_USE">
9926 Medium not in @c NotCreated state.
9927 </result>
9928 </desc>
9929 <param name="target" type="IMedium" dir="in">
9930 <desc>Target medium.</desc>
9931 </param>
9932 <param name="variant" type="MediumVariant" dir="in">
9933 <desc>Exact image variant which should be created.</desc>
9934 </param>
9935 <param name="progress" type="IProgress" dir="return">
9936 <desc>Progress object to track the operation completion.</desc>
9937 </param>
9938 </method>
9939
9940 <method name="mergeTo">
9941 <desc>
9942 Starts merging the contents of this medium and all intermediate
9943 differencing media in the chain to the given target medium.
9944
9945 The target medium must be either a descendant of this medium or
9946 its ancestor (otherwise this method will immediately return a failure).
9947 It follows that there are two logical directions of the merge operation:
9948 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9949 ancestor (<i>backward merge</i>). Let us consider the following medium
9950 chain:
9951
9952 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9953
9954 Here, calling this method on the <tt>Base</tt> medium object with
9955 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9956 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9957 merge. Note that in both cases the contents of the resulting medium
9958 will be the same, the only difference is the medium object that takes
9959 the result of the merge operation. In case of the forward merge in the
9960 above example, the result will be written to <tt>Diff_2</tt>; in case of
9961 the backward merge, the result will be written to <tt>Base</tt>. In
9962 other words, the result of the operation is always stored in the target
9963 medium.
9964
9965 Upon successful operation completion, the storage units of all media in
9966 the chain between this (source) medium and the target medium, including
9967 the source medium itself, will be automatically deleted and the
9968 relevant medium objects (including this medium) will become
9969 uninitialized. This means that any attempt to call any of
9970 their methods or attributes will fail with the
9971 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9972 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9973 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> media.
9974 Note that <tt>Diff_2</tt> in this case will become a base medium
9975 itself since it will no longer be based on any other medium.
9976
9977 Considering the above, all of the following conditions must be met in
9978 order for the merge operation to succeed:
9979 <ul>
9980 <li>
9981 Neither this (source) medium nor any intermediate
9982 differencing medium in the chain between it and the target
9983 medium is attached to any virtual machine.
9984 </li>
9985 <li>
9986 Neither the source medium nor the target medium is an
9987 <link to="MediumType_Immutable"/> medium.
9988 </li>
9989 <li>
9990 The part of the medium tree from the source medium to the
9991 target medium is a linear chain, i.e. all medium in this
9992 chain have exactly one child which is the next medium in this
9993 chain. The only exception from this rule is the target medium in
9994 the forward merge operation; it is allowed to have any number of
9995 child media because the merge operation will not change its
9996 logical contents (as it is seen by the guest OS or by children).
9997 </li>
9998 <li>
9999 None of the involved media are in
10000 <link to="MediumState_LockedRead"/> or
10001 <link to="MediumState_LockedWrite"/> state.
10002 </li>
10003 </ul>
10004
10005 <note>
10006 This (source) medium and all intermediates will be placed to <link
10007 to="MediumState_Deleting"/> state and the target medium will be
10008 placed to <link to="MediumState_LockedWrite"/> state and for the
10009 duration of this operation.
10010 </note>
10011 </desc>
10012 <param name="targetId" type="uuid" mod="string" dir="in">
10013 <desc>UUID of the target ancestor or descendant medium.</desc>
10014 </param>
10015 <param name="progress" type="IProgress" dir="return">
10016 <desc>Progress object to track the operation completion.</desc>
10017 </param>
10018 </method>
10019
10020 <!-- clone method -->
10021
10022 <method name="cloneTo">
10023 <desc>
10024 Starts creating a clone of this medium in the format and at the
10025 location defined by the @a target argument.
10026
10027 The target medium must be either in <link to="MediumState_NotCreated"/>
10028 state (i.e. must not have an existing storage unit) or in
10029 <link to="MediumState_Created"/> state (i.e. created and not locked, and
10030 big enough to hold the data or else the copy will be partial). Upon
10031 successful completion, the cloned medium will contain exactly the
10032 same sector data as the medium being cloned, except that in the
10033 first case a new UUID for the clone will be randomly generated, and in
10034 the second case the UUID will remain unchanged.
10035
10036 The @a parent argument defines which medium will be the parent
10037 of the clone. Passing a @c null reference indicates that the clone will
10038 be a base image, i.e. completely independent. It is possible to specify
10039 an arbitrary medium for this parameter, including the parent of the
10040 medium which is being cloned. Even cloning to a child of the source
10041 medium is possible. Note that when cloning to an existing image, the
10042 @a parent irgument is ignored.
10043
10044 After the returned progress object reports that the operation is
10045 successfully complete, the target medium gets remembered by this
10046 VirtualBox installation and may be attached to virtual machines.
10047
10048 <note>
10049 This medium will be placed to <link to="MediumState_LockedRead"/>
10050 state for the duration of this operation.
10051 </note>
10052 <result name="E_NOTIMPL">
10053 The specified cloning variant is not supported at the moment.
10054 </result>
10055 </desc>
10056 <param name="target" type="IMedium" dir="in">
10057 <desc>Target medium.</desc>
10058 </param>
10059 <param name="variant" type="MediumVariant" dir="in">
10060 <desc>Exact image variant which should be created.</desc>
10061 </param>
10062 <param name="parent" type="IMedium" dir="in">
10063 <desc>Parent of the cloned medium.</desc>
10064 </param>
10065 <param name="progress" type="IProgress" dir="return">
10066 <desc>Progress object to track the operation completion.</desc>
10067 </param>
10068 </method>
10069
10070 <!-- other methods -->
10071
10072 <method name="compact">
10073 <desc>
10074 Starts compacting of this medium. This means that the medium is
10075 transformed into a possibly more compact storage representation.
10076 This potentially creates temporary images, which can require a
10077 substantial amount of additional disk space.
10078
10079 This medium will be placed to <link to="MediumState_LockedWrite"/>
10080 state and all its parent media (if any) will be placed to
10081 <link to="MediumState_LockedRead"/> state for the duration of this
10082 operation.
10083
10084 Please note that the results can be either returned straight away,
10085 or later as the result of the background operation via the object
10086 returned via the @a progress parameter.
10087
10088 <result name="VBOX_E_NOT_SUPPORTED">
10089 Medium format does not support compacting (but potentially
10090 needs it).
10091 </result>
10092 </desc>
10093 <param name="progress" type="IProgress" dir="return">
10094 <desc>Progress object to track the operation completion.</desc>
10095 </param>
10096 </method>
10097
10098 <method name="resize">
10099 <desc>
10100 Starts resizing this medium. This means that the nominal size of the
10101 medium is set to the new value. Both increasing and decreasing the
10102 size is possible, and there are no safety checks, since VirtualBox
10103 does not make any assumptions about the medium contents.
10104
10105 Resizing usually needs additional disk space, and possibly also
10106 some temporary disk space. Note that resize does not create a full
10107 temporary copy of the medium, so the additional disk space requirement
10108 is usually much lower than using the clone operation.
10109
10110 This medium will be placed to <link to="MediumState_LockedWrite"/>
10111 state for the duration of this operation.
10112
10113 Please note that the results can be either returned straight away,
10114 or later as the result of the background operation via the object
10115 returned via the @a progress parameter.
10116
10117 <result name="VBOX_E_NOT_SUPPORTED">
10118 Medium format does not support resizing.
10119 </result>
10120 </desc>
10121 <param name="logicalSize" type="unsigned long long" dir="in">
10122 <desc>New nominal capacity of the medium in megabytes.</desc>
10123 </param>
10124 <param name="progress" type="IProgress" dir="return">
10125 <desc>Progress object to track the operation completion.</desc>
10126 </param>
10127 </method>
10128
10129 <method name="reset">
10130 <desc>
10131 Starts erasing the contents of this differencing medium.
10132
10133 This operation will reset the differencing medium to its initial
10134 state when it does not contain any sector data and any read operation is
10135 redirected to its parent medium.
10136
10137 This medium will be placed to <link to="MediumState_LockedWrite"/>
10138 for the duration of this operation.
10139
10140 <result name="VBOX_E_NOT_SUPPORTED">
10141 This is not a differencing medium.
10142 </result>
10143 <result name="VBOX_E_INVALID_OBJECT_STATE">
10144 Medium is not in <link to="MediumState_Created"/> or
10145 <link to="MediumState_Inaccessible"/> state.
10146 </result>
10147 </desc>
10148 <param name="progress" type="IProgress" dir="return">
10149 <desc>Progress object to track the operation completion.</desc>
10150 </param>
10151 </method>
10152
10153 </interface>
10154
10155
10156 <!--
10157 // IMediumFormat
10158 /////////////////////////////////////////////////////////////////////////
10159 -->
10160
10161 <enum
10162 name="DataType"
10163 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
10164 >
10165 <const name="Int32" value="0"/>
10166 <const name="Int8" value="1"/>
10167 <const name="String" value="2"/>
10168 </enum>
10169
10170 <enum
10171 name="DataFlags"
10172 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
10173 >
10174 <const name="None" value="0x00"/>
10175 <const name="Mandatory" value="0x01"/>
10176 <const name="Expert" value="0x02"/>
10177 <const name="Array" value="0x04"/>
10178 <const name="FlagMask" value="0x07"/>
10179 </enum>
10180
10181 <enum
10182 name="MediumFormatCapabilities"
10183 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
10184 >
10185 <desc>
10186 Medium format capability flags.
10187 </desc>
10188
10189 <const name="Uuid" value="0x01">
10190 <desc>
10191 Supports UUIDs as expected by VirtualBox code.
10192 </desc>
10193 </const>
10194
10195 <const name="CreateFixed" value="0x02">
10196 <desc>
10197 Supports creating fixed size images, allocating all space instantly.
10198 </desc>
10199 </const>
10200
10201 <const name="CreateDynamic" value="0x04">
10202 <desc>
10203 Supports creating dynamically growing images, allocating space on
10204 demand.
10205 </desc>
10206 </const>
10207
10208 <const name="CreateSplit2G" value="0x08">
10209 <desc>
10210 Supports creating images split in chunks of a bit less than 2 GBytes.
10211 </desc>
10212 </const>
10213
10214 <const name="Differencing" value="0x10">
10215 <desc>
10216 Supports being used as a format for differencing media (see <link
10217 to="IMedium::createDiffStorage"/>).
10218 </desc>
10219 </const>
10220
10221 <const name="Asynchronous" value="0x20">
10222 <desc>
10223 Supports asynchronous I/O operations for at least some configurations.
10224 </desc>
10225 </const>
10226
10227 <const name="File" value="0x40">
10228 <desc>
10229 The format backend operates on files (the <link to="IMedium::location"/>
10230 attribute of the medium specifies a file used to store medium
10231 data; for a list of supported file extensions see
10232 <link to="IMediumFormat::fileExtensions"/>).
10233 </desc>
10234 </const>
10235
10236 <const name="Properties" value="0x80">
10237 <desc>
10238 The format backend uses the property interface to configure the storage
10239 location and properties (the <link to="IMediumFormat::describeProperties"/>
10240 method is used to get access to properties supported by the given medium format).
10241 </desc>
10242 </const>
10243
10244 <const name="CapabilityMask" value="0xFF"/>
10245 </enum>
10246
10247 <interface
10248 name="IMediumFormat" extends="$unknown"
10249 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
10250 wsmap="managed"
10251 >
10252 <desc>
10253 The IMediumFormat interface represents a medium format.
10254
10255 Each medium format has an associated backend which is used to handle
10256 media stored in this format. This interface provides information
10257 about the properties of the associated backend.
10258
10259 Each medium format is identified by a string represented by the
10260 <link to="#id"/> attribute. This string is used in calls like
10261 <link to="IVirtualBox::createHardDisk"/> to specify the desired
10262 format.
10263
10264 The list of all supported medium formats can be obtained using
10265 <link to="ISystemProperties::mediaFormats"/>.
10266
10267 <see>IMedium</see>
10268 </desc>
10269
10270 <attribute name="id" type="wstring" readonly="yes">
10271 <desc>
10272 Identifier of this format.
10273
10274 The format identifier is a non-@c null non-empty ASCII string. Note that
10275 this string is case-insensitive. This means that, for example, all of
10276 the following strings:
10277 <pre>
10278 "VDI"
10279 "vdi"
10280 "VdI"</pre>
10281 refer to the same medium format.
10282
10283 This string is used in methods of other interfaces where it is necessary
10284 to specify a medium format, such as
10285 <link to="IVirtualBox::createHardDisk"/>.
10286 </desc>
10287 </attribute>
10288
10289 <attribute name="name" type="wstring" readonly="yes">
10290 <desc>
10291 Human readable description of this format.
10292
10293 Mainly for use in file open dialogs.
10294 </desc>
10295 </attribute>
10296
10297 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
10298 <desc>
10299 Array of strings containing the supported file extensions.
10300
10301 The first extension in the array is the extension preferred by the
10302 backend. It is recommended to use this extension when specifying a
10303 location of the storage unit for a new medium.
10304
10305 Note that some backends do not work on files, so this array may be
10306 empty.
10307
10308 <see>IMediumFormat::capabilities</see>
10309 </desc>
10310 </attribute>
10311
10312 <attribute name="capabilities" type="unsigned long" readonly="yes">
10313 <desc>
10314 Capabilities of the format as a set of bit flags.
10315
10316 For the meaning of individual capability flags see
10317 <link to="MediumFormatCapabilities"/>.
10318 </desc>
10319 </attribute>
10320
10321 <method name="describeProperties">
10322 <desc>
10323 Returns several arrays describing the properties supported by this
10324 format.
10325
10326 An element with the given index in each array describes one
10327 property. Thus, the number of elements in each returned array is the
10328 same and corresponds to the number of supported properties.
10329
10330 The returned arrays are filled in only if the
10331 <link to="MediumFormatCapabilities_Properties"/> flag is set.
10332 All arguments must be non-@c null.
10333
10334 <see>DataType</see>
10335 <see>DataFlags</see>
10336 </desc>
10337
10338 <param name="names" type="wstring" safearray="yes" dir="out">
10339 <desc>Array of property names.</desc>
10340 </param>
10341 <param name="description" type="wstring" safearray="yes" dir="out">
10342 <desc>Array of property descriptions.</desc>
10343 </param>
10344 <param name="types" type="DataType" safearray="yes" dir="out">
10345 <desc>Array of property types.</desc>
10346 </param>
10347 <param name="flags" type="unsigned long" safearray="yes" dir="out">
10348 <desc>Array of property flags.</desc>
10349 </param>
10350 <param name="defaults" type="wstring" safearray="yes" dir="out">
10351 <desc>Array of default property values.</desc>
10352 </param>
10353 </method>
10354
10355 </interface>
10356
10357
10358 <!--
10359 // IKeyboard
10360 /////////////////////////////////////////////////////////////////////////
10361 -->
10362
10363 <interface
10364 name="IKeyboard" extends="$unknown"
10365 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10366 wsmap="managed"
10367 >
10368 <desc>
10369 The IKeyboard interface represents the virtual machine's keyboard. Used
10370 in <link to="IConsole::keyboard"/>.
10371
10372 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10373 to the virtual machine.
10374
10375 </desc>
10376 <method name="putScancode">
10377 <desc>Sends a scancode to the keyboard.
10378
10379 <result name="VBOX_E_IPRT_ERROR">
10380 Could not send scan code to virtual keyboard.
10381 </result>
10382
10383 </desc>
10384 <param name="scancode" type="long" dir="in"/>
10385 </method>
10386
10387 <method name="putScancodes">
10388 <desc>Sends an array of scancodes to the keyboard.
10389
10390 <result name="VBOX_E_IPRT_ERROR">
10391 Could not send all scan codes to virtual keyboard.
10392 </result>
10393
10394 </desc>
10395 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10396 <param name="codesStored" type="unsigned long" dir="return"/>
10397 </method>
10398
10399 <method name="putCAD">
10400 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10401 function is nothing special, it is just a convenience function
10402 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10403
10404 <result name="VBOX_E_IPRT_ERROR">
10405 Could not send all scan codes to virtual keyboard.
10406 </result>
10407
10408 </desc>
10409 </method>
10410
10411 </interface>
10412
10413
10414 <!--
10415 // IMouse
10416 /////////////////////////////////////////////////////////////////////////
10417 -->
10418
10419 <enum
10420 name="MouseButtonState"
10421 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10422 >
10423 <desc>
10424 Mouse button state.
10425 </desc>
10426
10427 <const name="LeftButton" value="0x01"/>
10428 <const name="RightButton" value="0x02"/>
10429 <const name="MiddleButton" value="0x04"/>
10430 <const name="WheelUp" value="0x08"/>
10431 <const name="WheelDown" value="0x10"/>
10432 <const name="XButton1" value="0x20"/>
10433 <const name="XButton2" value="0x40"/>
10434 <const name="MouseStateMask" value="0x7F"/>
10435 </enum>
10436
10437 <interface
10438 name="IMouse" extends="$unknown"
10439 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
10440 wsmap="managed"
10441 >
10442 <desc>
10443 The IMouse interface represents the virtual machine's mouse. Used in
10444 <link to="IConsole::mouse"/>.
10445
10446 Through this interface, the virtual machine's virtual mouse can be
10447 controlled.
10448 </desc>
10449
10450 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10451 <desc>
10452 Whether the guest OS supports absolute mouse pointer positioning
10453 or not.
10454 <note>
10455 VirtualBox Guest Tools need to be installed to the guest OS
10456 in order to enable absolute mouse positioning support.
10457 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10458 callback to be instantly informed about changes of this attribute
10459 during virtual machine execution.
10460 </note>
10461 <see><link to="#putMouseEventAbsolute"/></see>
10462 </desc>
10463 </attribute>
10464
10465 <method name="putMouseEvent">
10466 <desc>
10467 Initiates a mouse event using relative pointer movements
10468 along x and y axis.
10469
10470 <result name="E_ACCESSDENIED">
10471 Console not powered up.
10472 </result>
10473 <result name="VBOX_E_IPRT_ERROR">
10474 Could not send mouse event to virtual mouse.
10475 </result>
10476
10477 </desc>
10478
10479 <param name="dx" type="long" dir="in">
10480 <desc>
10481 Amount of pixels the mouse should move to the right.
10482 Negative values move the mouse to the left.
10483 </desc>
10484 </param>
10485 <param name="dy" type="long" dir="in">
10486 <desc>
10487 Amount of pixels the mouse should move downwards.
10488 Negative values move the mouse upwards.
10489 </desc>
10490 </param>
10491 <param name="dz" type="long" dir="in">
10492 <desc>
10493 Amount of mouse wheel moves.
10494 Positive values describe clockwise wheel rotations,
10495 negative values describe counterclockwise rotations.
10496 </desc>
10497 </param>
10498 <param name="dw" type="long" dir="in">
10499 <desc>
10500 Amount of horizontal mouse wheel moves.
10501 Positive values describe a movement to the left,
10502 negative values describe a movement to the right.
10503 </desc>
10504 </param>
10505 <param name="buttonState" type="long" dir="in">
10506 <desc>
10507 The current state of mouse buttons. Every bit represents
10508 a mouse button as follows:
10509 <table>
10510 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10511 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10512 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10513 </table>
10514 A value of <tt>1</tt> means the corresponding button is pressed.
10515 otherwise it is released.
10516 </desc>
10517 </param>
10518 </method>
10519
10520 <method name="putMouseEventAbsolute">
10521 <desc>
10522 Positions the mouse pointer using absolute x and y coordinates.
10523 These coordinates are expressed in pixels and
10524 start from <tt>[1,1]</tt> which corresponds to the top left
10525 corner of the virtual display.
10526
10527 <result name="E_ACCESSDENIED">
10528 Console not powered up.
10529 </result>
10530 <result name="VBOX_E_IPRT_ERROR">
10531 Could not send mouse event to virtual mouse.
10532 </result>
10533
10534 <note>
10535 This method will have effect only if absolute mouse
10536 positioning is supported by the guest OS.
10537 </note>
10538
10539 <see><link to="#absoluteSupported"/></see>
10540 </desc>
10541
10542 <param name="x" type="long" dir="in">
10543 <desc>
10544 X coordinate of the pointer in pixels, starting from @c 1.
10545 </desc>
10546 </param>
10547 <param name="y" type="long" dir="in">
10548 <desc>
10549 Y coordinate of the pointer in pixels, starting from @c 1.
10550 </desc>
10551 </param>
10552 <param name="dz" type="long" dir="in">
10553 <desc>
10554 Amount of mouse wheel moves.
10555 Positive values describe clockwise wheel rotations,
10556 negative values describe counterclockwise rotations.
10557 </desc>
10558 </param>
10559 <param name="dw" type="long" dir="in">
10560 <desc>
10561 Amount of horizontal mouse wheel moves.
10562 Positive values describe a movement to the left,
10563 negative values describe a movement to the right.
10564 </desc>
10565 </param>
10566 <param name="buttonState" type="long" dir="in">
10567 <desc>
10568 The current state of mouse buttons. Every bit represents
10569 a mouse button as follows:
10570 <table>
10571 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10572 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10573 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10574 </table>
10575 A value of @c 1 means the corresponding button is pressed.
10576 otherwise it is released.
10577 </desc>
10578 </param>
10579 </method>
10580
10581 </interface>
10582
10583 <!--
10584 // IDisplay
10585 /////////////////////////////////////////////////////////////////////////
10586 -->
10587
10588 <enum
10589 name="FramebufferPixelFormat"
10590 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10591 >
10592 <desc>
10593 Format of the video memory buffer. Constants represented by this enum can
10594 be used to test for particular values of <link
10595 to="IFramebuffer::pixelFormat"/>. See also <link
10596 to="IFramebuffer::requestResize"/>.
10597
10598 See also www.fourcc.org for more information about FOURCC pixel formats.
10599 </desc>
10600
10601 <const name="Opaque" value="0">
10602 <desc>
10603 Unknown buffer format (the user may not assume any particular format of
10604 the buffer).
10605 </desc>
10606 </const>
10607 <const name="FOURCC_RGB" value="0x32424752">
10608 <desc>
10609 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10610 bit layout).
10611 </desc>
10612 </const>
10613 </enum>
10614
10615 <interface
10616 name="IFramebuffer" extends="$unknown"
10617 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10618 wsmap="suppress"
10619 >
10620 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10621 <desc>Address of the start byte of the frame buffer.</desc>
10622 </attribute>
10623
10624 <attribute name="width" type="unsigned long" readonly="yes">
10625 <desc>Frame buffer width, in pixels.</desc>
10626 </attribute>
10627
10628 <attribute name="height" type="unsigned long" readonly="yes">
10629 <desc>Frame buffer height, in pixels.</desc>
10630 </attribute>
10631
10632 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10633 <desc>
10634 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10635 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10636 are: 8, 15, 16, 24 and 32.
10637 </desc>
10638 </attribute>
10639
10640 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10641 <desc>
10642 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10643 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10644 size of the scan line must be aligned to 32 bits.
10645 </desc>
10646 </attribute>
10647
10648 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10649 <desc>
10650 Frame buffer pixel format. It's either one of the values defined by <link
10651 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10652 <note>
10653 This attribute must never return <link
10654 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10655 <link to="#address"/> points to must be always known.
10656 </note>
10657 </desc>
10658 </attribute>
10659
10660 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10661 <desc>
10662 Defines whether this frame buffer uses the virtual video card's memory
10663 buffer (guest VRAM) directly or not. See <link
10664 to="IFramebuffer::requestResize"/> for more information.
10665 </desc>
10666 </attribute>
10667
10668 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10669 <desc>
10670 Hint from the frame buffer about how much of the standard
10671 screen height it wants to use for itself. This information is
10672 exposed to the guest through the VESA BIOS and VMMDev interface
10673 so that it can use it for determining its video mode table. It
10674 is not guaranteed that the guest respects the value.
10675 </desc>
10676 </attribute>
10677
10678 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10679 <desc>
10680 An alpha-blended overlay which is superposed over the frame buffer.
10681 The initial purpose is to allow the display of icons providing
10682 information about the VM state, including disk activity, in front
10683 ends which do not have other means of doing that. The overlay is
10684 designed to controlled exclusively by IDisplay. It has no locking
10685 of its own, and any changes made to it are not guaranteed to be
10686 visible until the affected portion of IFramebuffer is updated. The
10687 overlay can be created lazily the first time it is requested. This
10688 attribute can also return @c null to signal that the overlay is not
10689 implemented.
10690 </desc>
10691 </attribute>
10692
10693 <attribute name="winId" type="unsigned long long" readonly="yes">
10694 <desc>
10695 Platform-dependent identifier of the window where context of this
10696 frame buffer is drawn, or zero if there's no such window.
10697 </desc>
10698 </attribute>
10699
10700 <method name="lock">
10701 <desc>
10702 Locks the frame buffer.
10703 Gets called by the IDisplay object where this frame buffer is
10704 bound to.
10705 </desc>
10706 </method>
10707
10708 <method name="unlock">
10709 <desc>
10710 Unlocks the frame buffer.
10711 Gets called by the IDisplay object where this frame buffer is
10712 bound to.
10713 </desc>
10714 </method>
10715
10716 <method name="notifyUpdate">
10717 <desc>
10718 Informs about an update.
10719 Gets called by the display object where this buffer is
10720 registered.
10721 </desc>
10722 <param name="x" type="unsigned long" dir="in"/>
10723 <param name="y" type="unsigned long" dir="in"/>
10724 <param name="width" type="unsigned long" dir="in"/>
10725 <param name="height" type="unsigned long" dir="in"/>
10726 </method>
10727
10728 <method name="requestResize">
10729 <desc>
10730 Requests a size and pixel format change.
10731
10732 There are two modes of working with the video buffer of the virtual
10733 machine. The <i>indirect</i> mode implies that the IFramebuffer
10734 implementation allocates a memory buffer for the requested display mode
10735 and provides it to the virtual machine. In <i>direct</i> mode, the
10736 IFramebuffer implementation uses the memory buffer allocated and owned
10737 by the virtual machine. This buffer represents the video memory of the
10738 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10739 usually faster because the implementation gets a raw pointer to the
10740 guest VRAM buffer which it can directly use for visualizing the contents
10741 of the virtual display, as opposed to the indirect mode where the
10742 contents of guest VRAM are copied to the memory buffer provided by
10743 the implementation every time a display update occurs.
10744
10745 It is important to note that the direct mode is really fast only when
10746 the implementation uses the given guest VRAM buffer directly, for
10747 example, by blitting it to the window representing the virtual machine's
10748 display, which saves at least one copy operation comparing to the
10749 indirect mode. However, using the guest VRAM buffer directly is not
10750 always possible: the format and the color depth of this buffer may be
10751 not supported by the target window, or it may be unknown (opaque) as in
10752 case of text or non-linear multi-plane VGA video modes. In this case,
10753 the indirect mode (that is always available) should be used as a
10754 fallback: when the guest VRAM contents are copied to the
10755 implementation-provided memory buffer, color and format conversion is
10756 done automatically by the underlying code.
10757
10758 The @a pixelFormat parameter defines whether the direct mode is
10759 available or not. If @a pixelFormat is <link
10760 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10761 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10762 @a bytesPerLine parameters must be ignored and the implementation must use
10763 the indirect mode (where it provides its own buffer in one of the
10764 supported formats). In all other cases, @a pixelFormat together with
10765 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10766 buffer pointed to by the @a VRAM parameter and the implementation is
10767 free to choose which mode to use. To indicate that this frame buffer uses
10768 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10769 attribute must return @c true and <link to="#address"/> must
10770 return exactly the same address that is passed in the @a VRAM parameter
10771 of this method; otherwise it is assumed that the indirect strategy is
10772 chosen.
10773
10774 The @a width and @a height parameters represent the size of the
10775 requested display mode in both modes. In case of indirect mode, the
10776 provided memory buffer should be big enough to store data of the given
10777 display mode. In case of direct mode, it is guaranteed that the given
10778 @a VRAM buffer contains enough space to represent the display mode of the
10779 given size. Note that this frame buffer's <link to="#width"/> and <link
10780 to="#height"/> attributes must return exactly the same values as
10781 passed to this method after the resize is completed (see below).
10782
10783 The @a finished output parameter determines if the implementation has
10784 finished resizing the frame buffer or not. If, for some reason, the
10785 resize cannot be finished immediately during this call, @a finished
10786 must be set to @c false, and the implementation must call
10787 <link to="IDisplay::resizeCompleted"/> after it has returned from
10788 this method as soon as possible. If @a finished is @c false, the
10789 machine will not call any frame buffer methods until
10790 <link to="IDisplay::resizeCompleted"/> is called.
10791
10792 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10793 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10794 this frame buffer must return exactly the same values as specified in the
10795 parameters of this method, after the resize is completed. If the
10796 indirect mode is chosen, these attributes must return values describing
10797 the format of the implementation's own memory buffer <link
10798 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10799 value must always correlate with <link to="#pixelFormat"/>. Note that
10800 the <link to="#pixelFormat"/> attribute must never return <link
10801 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10802
10803 <note>
10804 This method is called by the IDisplay object under the
10805 <link to="#lock"/> provided by this IFramebuffer
10806 implementation. If this method returns @c false in @a finished, then
10807 this lock is not released until
10808 <link to="IDisplay::resizeCompleted"/> is called.
10809 </note>
10810 </desc>
10811 <param name="screenId" type="unsigned long" dir="in">
10812 <desc>
10813 Logical screen number. Must be used in the corresponding call to
10814 <link to="IDisplay::resizeCompleted"/> if this call is made.
10815 </desc>
10816 </param>
10817 <param name="pixelFormat" type="unsigned long" dir="in">
10818 <desc>
10819 Pixel format of the memory buffer pointed to by @a VRAM.
10820 See also <link to="FramebufferPixelFormat"/>.
10821 </desc>
10822 </param>
10823 <param name="VRAM" type="octet" mod="ptr" dir="in">
10824 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10825 </param>
10826 <param name="bitsPerPixel" type="unsigned long" dir="in">
10827 <desc>Color depth, bits per pixel.</desc>
10828 </param>
10829 <param name="bytesPerLine" type="unsigned long" dir="in">
10830 <desc>Size of one scan line, in bytes.</desc>
10831 </param>
10832 <param name="width" type="unsigned long" dir="in">
10833 <desc>Width of the guest display, in pixels.</desc>
10834 </param>
10835 <param name="height" type="unsigned long" dir="in">
10836 <desc>Height of the guest display, in pixels.</desc>
10837 </param>
10838 <param name="finished" type="boolean" dir="return">
10839 <desc>
10840 Can the VM start using the new frame buffer immediately
10841 after this method returns or it should wait for
10842 <link to="IDisplay::resizeCompleted"/>.
10843 </desc>
10844 </param>
10845 </method>
10846
10847 <method name="videoModeSupported">
10848 <desc>
10849 Returns whether the frame buffer implementation is willing to
10850 support a given video mode. In case it is not able to render
10851 the video mode (or for some reason not willing), it should
10852 return @c false. Usually this method is called when the guest
10853 asks the VMM device whether a given video mode is supported
10854 so the information returned is directly exposed to the guest.
10855 It is important that this method returns very quickly.
10856 </desc>
10857 <param name="width" type="unsigned long" dir="in"/>
10858 <param name="height" type="unsigned long" dir="in"/>
10859 <param name="bpp" type="unsigned long" dir="in"/>
10860 <param name="supported" type="boolean" dir="return"/>
10861 </method>
10862
10863 <method name="getVisibleRegion">
10864 <desc>
10865 Returns the visible region of this frame buffer.
10866
10867 If the @a rectangles parameter is @c null then the value of the
10868 @a count parameter is ignored and the number of elements necessary to
10869 describe the current visible region is returned in @a countCopied.
10870
10871 If @a rectangles is not @c null but @a count is less
10872 than the required number of elements to store region data, the method
10873 will report a failure. If @a count is equal or greater than the
10874 required number of elements, then the actual number of elements copied
10875 to the provided array will be returned in @a countCopied.
10876
10877 <note>
10878 The address of the provided array must be in the process space of
10879 this IFramebuffer object.
10880 </note>
10881 <note>
10882 Method not yet implemented.
10883 </note>
10884 </desc>
10885 <param name="rectangles" type="octet" mod="ptr" dir="in">
10886 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10887 </param>
10888 <param name="count" type="unsigned long" dir="in">
10889 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10890 </param>
10891 <param name="countCopied" type="unsigned long" dir="return">
10892 <desc>Number of elements copied to the @a rectangles array.</desc>
10893 </param>
10894 </method>
10895
10896 <method name="setVisibleRegion">
10897 <desc>
10898 Suggests a new visible region to this frame buffer. This region
10899 represents the area of the VM display which is a union of regions of
10900 all top-level windows of the guest operating system running inside the
10901 VM (if the Guest Additions for this system support this
10902 functionality). This information may be used by the frontends to
10903 implement the seamless desktop integration feature.
10904
10905 <note>
10906 The address of the provided array must be in the process space of
10907 this IFramebuffer object.
10908 </note>
10909 <note>
10910 The IFramebuffer implementation must make a copy of the provided
10911 array of rectangles.
10912 </note>
10913 <note>
10914 Method not yet implemented.
10915 </note>
10916 </desc>
10917 <param name="rectangles" type="octet" mod="ptr" dir="in">
10918 <desc>Pointer to the @c RTRECT array.</desc>
10919 </param>
10920 <param name="count" type="unsigned long" dir="in">
10921 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10922 </param>
10923 </method>
10924
10925 <method name="processVHWACommand">
10926 <desc>
10927 Posts a Video HW Acceleration Command to the frame buffer for processing.
10928 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10929 are posted from quest to the host to be processed by the host hardware.
10930
10931 <note>
10932 The address of the provided command must be in the process space of
10933 this IFramebuffer object.
10934 </note>
10935 </desc>
10936
10937 <param name="command" type="octet" mod="ptr" dir="in">
10938 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10939 </param>
10940 </method>
10941
10942 </interface>
10943
10944 <interface
10945 name="IFramebufferOverlay" extends="IFramebuffer"
10946 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10947 wsmap="suppress"
10948 >
10949 <desc>
10950 The IFramebufferOverlay interface represents an alpha blended overlay
10951 for displaying status icons above an IFramebuffer. It is always created
10952 not visible, so that it must be explicitly shown. It only covers a
10953 portion of the IFramebuffer, determined by its width, height and
10954 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10955 that order) format, and may be written to directly. Do re-read the
10956 width though, after setting it, as it may be adjusted (increased) to
10957 make it more suitable for the front end.
10958 </desc>
10959 <attribute name="x" type="unsigned long" readonly="yes">
10960 <desc>X position of the overlay, relative to the frame buffer.</desc>
10961 </attribute>
10962
10963 <attribute name="y" type="unsigned long" readonly="yes">
10964 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10965 </attribute>
10966
10967 <attribute name="visible" type="boolean" readonly="no">
10968 <desc>
10969 Whether the overlay is currently visible.
10970 </desc>
10971 </attribute>
10972
10973 <attribute name="alpha" type="unsigned long" readonly="no">
10974 <desc>
10975 The global alpha value for the overlay. This may or may not be
10976 supported by a given front end.
10977 </desc>
10978 </attribute>
10979
10980 <method name="move">
10981 <desc>
10982 Changes the overlay's position relative to the IFramebuffer.
10983 </desc>
10984 <param name="x" type="unsigned long" dir="in"/>
10985 <param name="y" type="unsigned long" dir="in"/>
10986 </method>
10987
10988 </interface>
10989
10990 <interface
10991 name="IDisplay" extends="$unknown"
10992 uuid="e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000"
10993 wsmap="managed"
10994 >
10995 <desc>
10996 The IDisplay interface represents the virtual machine's display.
10997
10998 The object implementing this interface is contained in each
10999 <link to="IConsole::display"/> attribute and represents the visual
11000 output of the virtual machine.
11001
11002 The virtual display supports pluggable output targets represented by the
11003 IFramebuffer interface. Examples of the output target are a window on
11004 the host computer or an RDP session's display on a remote computer.
11005 </desc>
11006 <attribute name="width" type="unsigned long" readonly="yes">
11007 <desc>Current display width.</desc>
11008 </attribute>
11009
11010 <attribute name="height" type="unsigned long" readonly="yes">
11011 <desc>Current display height.</desc>
11012 </attribute>
11013
11014 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
11015 <desc>
11016 Current guest display color depth. Note that this may differ
11017 from <link to="IFramebuffer::bitsPerPixel"/>.
11018 </desc>
11019 </attribute>
11020
11021 <method name="setFramebuffer">
11022 <desc>
11023 Sets the framebuffer for given screen.
11024 </desc>
11025 <param name="screenId" type="unsigned long" dir="in"/>
11026 <param name="framebuffer" type="IFramebuffer" dir="in"/>
11027 </method>
11028
11029 <method name="getFramebuffer">
11030 <desc>
11031 Queries the framebuffer for given screen.
11032 </desc>
11033 <param name="screenId" type="unsigned long" dir="in"/>
11034 <param name="framebuffer" type="IFramebuffer" dir="out"/>
11035 <param name="xOrigin" type="long" dir="out"/>
11036 <param name="yOrigin" type="long" dir="out"/>
11037 </method>
11038
11039 <method name="setVideoModeHint">
11040 <desc>
11041 Asks VirtualBox to request the given video mode from
11042 the guest. This is just a hint and it cannot be guaranteed
11043 that the requested resolution will be used. Guest Additions
11044 are required for the request to be seen by guests. The caller
11045 should issue the request and wait for a resolution change and
11046 after a timeout retry.
11047
11048 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
11049 parameters means that the corresponding values should be taken from the
11050 current video mode (i.e. left unchanged).
11051
11052 If the guest OS supports multi-monitor configuration then the @a display
11053 parameter specifies the number of the guest display to send the hint to:
11054 @c 0 is the primary display, @c 1 is the first secondary and
11055 so on. If the multi-monitor configuration is not supported, @a display
11056 must be @c 0.
11057
11058 <result name="E_INVALIDARG">
11059 The @a display is not associated with any monitor.
11060 </result>
11061
11062 </desc>
11063 <param name="width" type="unsigned long" dir="in"/>
11064 <param name="height" type="unsigned long" dir="in"/>
11065 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
11066 <param name="display" type="unsigned long" dir="in"/>
11067 </method>
11068
11069 <method name="setSeamlessMode">
11070 <desc>
11071 Enables or disables seamless guest display rendering (seamless desktop
11072 integration) mode.
11073 <note>
11074 Calling this method has no effect if <link
11075 to="IGuest::supportsSeamless"/> returns @c false.
11076 </note>
11077 </desc>
11078 <param name="enabled" type="boolean" dir="in"/>
11079 </method>
11080
11081 <method name="takeScreenShot">
11082 <desc>
11083 Takes a screen shot of the requested size and copies it to the
11084 32-bpp buffer allocated by the caller and pointed to by @a address.
11085 A pixel consists of 4 bytes in order: B, G, R, 0.
11086
11087 <note>This API can be used only by the COM/XPCOM C++ API as it
11088 requires pointer support. Use <link to="#takeScreenShotSlow" />
11089 with other language bindings.
11090 </note>
11091
11092 <result name="E_NOTIMPL">
11093 Feature not implemented.
11094 </result>
11095 <result name="VBOX_E_IPRT_ERROR">
11096 Could not take a screenshot.
11097 </result>
11098
11099 </desc>
11100 <param name="address" type="octet" mod="ptr" dir="in"/>
11101 <param name="width" type="unsigned long" dir="in"/>
11102 <param name="height" type="unsigned long" dir="in"/>
11103 </method>
11104
11105 <method name="takeScreenShotSlow">
11106 <desc>
11107 Takes a guest screen shot of the requested size and returns it as
11108 an array of bytes in uncompressed 32-bit RGBA format.
11109 A pixel consists of 4 bytes in order: R, G, B, 0xFF.
11110
11111 This API is slow, but could be the only option to get guest screenshot
11112 for scriptable languages not allowed to manipulate with addresses
11113 directly.
11114
11115 <result name="E_NOTIMPL">
11116 Feature not implemented.
11117 </result>
11118 <result name="VBOX_E_IPRT_ERROR">
11119 Could not take a screenshot.
11120 </result>
11121 </desc>
11122 <param name="width" type="unsigned long" dir="in">
11123 <desc>
11124 Desired image width.
11125 </desc>
11126 </param>
11127 <param name="height" type="unsigned long" dir="in">
11128 <desc>
11129 Desired image height.
11130 </desc>
11131 </param>
11132 <param name="screenData" type="octet" dir="return" safearray="yes">
11133 <desc>
11134 Array with resulting screen data.
11135 </desc>
11136 </param>
11137 </method>
11138
11139 <method name="drawToScreen">
11140 <desc>
11141 Draws a 32-bpp image of the specified size from the given buffer
11142 to the given point on the VM display.
11143
11144 <result name="E_NOTIMPL">
11145 Feature not implemented.
11146 </result>
11147 <result name="VBOX_E_IPRT_ERROR">
11148 Could not draw to screen.
11149 </result>
11150
11151 </desc>
11152 <param name="address" type="octet" mod="ptr" dir="in"/>
11153 <param name="x" type="unsigned long" dir="in"/>
11154 <param name="y" type="unsigned long" dir="in"/>
11155 <param name="width" type="unsigned long" dir="in"/>
11156 <param name="height" type="unsigned long" dir="in"/>
11157 </method>
11158
11159 <method name="invalidateAndUpdate">
11160 <desc>
11161 Does a full invalidation of the VM display and instructs the VM
11162 to update it.
11163
11164 <result name="VBOX_E_IPRT_ERROR">
11165 Could not invalidate and update screen.
11166 </result>
11167
11168 </desc>
11169 </method>
11170
11171 <method name="resizeCompleted">
11172 <desc>
11173 Signals that a framebuffer has completed the resize operation.
11174
11175 <result name="VBOX_E_NOT_SUPPORTED">
11176 Operation only valid for external frame buffers.
11177 </result>
11178
11179 </desc>
11180 <param name="screenId" type="unsigned long" dir="in"/>
11181 </method>
11182
11183 <method name="updateCompleted">
11184 <desc>
11185 Signals that a framebuffer has completed the update operation.
11186
11187 <result name="VBOX_E_NOT_SUPPORTED">
11188 Operation only valid for external frame buffers.
11189 </result>
11190
11191 </desc>
11192 </method>
11193
11194 <method name="completeVHWACommand">
11195 <desc>
11196 Signals that the Video HW Acceleration command has completed.
11197 </desc>
11198
11199 <param name="command" type="octet" mod="ptr" dir="in">
11200 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
11201 </param>
11202 </method>
11203
11204 </interface>
11205
11206 <!--
11207 // INetworkAdapter
11208 /////////////////////////////////////////////////////////////////////////
11209 -->
11210
11211 <enum
11212 name="NetworkAttachmentType"
11213 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
11214 >
11215 <desc>
11216 Network attachment type.
11217 </desc>
11218
11219 <const name="Null" value="0">
11220 <desc>Null value, also means "not attached".</desc>
11221 </const>
11222 <const name="NAT" value="1"/>
11223 <const name="Bridged" value="2"/>
11224 <const name="Internal" value="3"/>
11225 <const name="HostOnly" value="4"/>
11226 </enum>
11227
11228 <enum
11229 name="NetworkAdapterType"
11230 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
11231 >
11232 <desc>
11233 Network adapter type.
11234 </desc>
11235
11236 <const name="Null" value="0">
11237 <desc>Null value (never used by the API).</desc>
11238 </const>
11239 <const name="Am79C970A" value="1">
11240 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
11241 </const>
11242 <const name="Am79C973" value="2">
11243 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
11244 </const>
11245 <const name="I82540EM" value="3">
11246 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
11247 </const>
11248 <const name="I82543GC" value="4">
11249 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
11250 </const>
11251 <const name="I82545EM" value="5">
11252 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
11253 </const>
11254 <const name="Virtio" value="6">
11255 <desc>Virtio network device.</desc>
11256 </const>
11257 </enum>
11258
11259 <interface
11260 name="INetworkAdapter" extends="$unknown"
11261 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
11262 wsmap="managed"
11263 >
11264 <desc>
11265 Represents a virtual network adapter that is attached to a virtual machine.
11266 Each virtual machine has a fixed number of network adapter slots with one
11267 instance of this attached to each of them. Call
11268 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
11269 is attached to a given slot in a given machine.
11270
11271 Each network adapter can be in one of five attachment modes, which are
11272 represented by the <link to="NetworkAttachmentType" /> enumeration;
11273 see the <link to="#attachmentType" /> attribute.
11274 </desc>
11275
11276 <attribute name="adapterType" type="NetworkAdapterType">
11277 <desc>
11278 Type of the virtual network adapter. Depending on this value,
11279 VirtualBox will provide a different virtual network hardware
11280 to the guest.
11281 </desc>
11282 </attribute>
11283
11284 <attribute name="slot" type="unsigned long" readonly="yes">
11285 <desc>
11286 Slot number this adapter is plugged into. Corresponds to
11287 the value you pass to <link to="IMachine::getNetworkAdapter"/>
11288 to obtain this instance.
11289 </desc>
11290 </attribute>
11291
11292 <attribute name="enabled" type="boolean">
11293 <desc>
11294 Flag whether the network adapter is present in the
11295 guest system. If disabled, the virtual guest hardware will
11296 not contain this network adapter. Can only be changed when
11297 the VM is not running.
11298 </desc>
11299 </attribute>
11300
11301 <attribute name="MACAddress" type="wstring">
11302 <desc>
11303 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
11304 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
11305 </desc>
11306 </attribute>
11307
11308 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
11309
11310 <attribute name="hostInterface" type="wstring">
11311 <desc>
11312 Name of the host network interface the VM is attached to.
11313 </desc>
11314 </attribute>
11315
11316 <attribute name="internalNetwork" type="wstring">
11317 <desc>
11318 Name of the internal network the VM is attached to.
11319 </desc>
11320 </attribute>
11321
11322 <attribute name="NATNetwork" type="wstring">
11323 <desc>
11324 Name of the NAT network the VM is attached to.
11325 </desc>
11326 </attribute>
11327
11328 <attribute name="cableConnected" type="boolean">
11329 <desc>
11330 Flag whether the adapter reports the cable as connected or not.
11331 It can be used to report offline situations to a VM.
11332 </desc>
11333 </attribute>
11334
11335 <attribute name="lineSpeed" type="unsigned long">
11336 <desc>
11337 Line speed reported by custom drivers, in units of 1 kbps.
11338 </desc>
11339 </attribute>
11340
11341 <attribute name="traceEnabled" type="boolean">
11342 <desc>
11343 Flag whether network traffic from/to the network card should be traced.
11344 Can only be toggled when the VM is turned off.
11345 </desc>
11346 </attribute>
11347
11348 <attribute name="traceFile" type="wstring">
11349 <desc>
11350 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11351 will be used.
11352 </desc>
11353 </attribute>
11354
11355 <method name="attachToNAT">
11356 <desc>
11357 Attach the network adapter to the Network Address Translation (NAT) interface.
11358 </desc>
11359 </method>
11360
11361 <method name="attachToBridgedInterface">
11362 <desc>
11363 Attach the network adapter to a bridged host interface.
11364 </desc>
11365 </method>
11366
11367 <method name="attachToInternalNetwork">
11368 <desc>
11369 Attach the network adapter to an internal network.
11370 </desc>
11371 </method>
11372
11373 <method name="attachToHostOnlyInterface">
11374 <desc>
11375 Attach the network adapter to the host-only network.
11376 </desc>
11377 </method>
11378
11379 <method name="detach">
11380 <desc>
11381 Detach the network adapter
11382 </desc>
11383 </method>
11384 </interface>
11385
11386
11387 <!--
11388 // ISerialPort
11389 /////////////////////////////////////////////////////////////////////////
11390 -->
11391
11392 <enum
11393 name="PortMode"
11394 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11395 >
11396 <desc>
11397 The PortMode enumeration represents possible communication modes for
11398 the virtual serial port device.
11399 </desc>
11400
11401 <const name="Disconnected" value="0">
11402 <desc>Virtual device is not attached to any real host device.</desc>
11403 </const>
11404 <const name="HostPipe" value="1">
11405 <desc>Virtual device is attached to a host pipe.</desc>
11406 </const>
11407 <const name="HostDevice" value="2">
11408 <desc>Virtual device is attached to a host device.</desc>
11409 </const>
11410 <const name="RawFile" value="3">
11411 <desc>Virtual device is attached to a raw file.</desc>
11412 </const>
11413 </enum>
11414
11415 <interface
11416 name="ISerialPort" extends="$unknown"
11417 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11418 wsmap="managed"
11419 >
11420
11421 <desc>
11422 The ISerialPort interface represents the virtual serial port device.
11423
11424 The virtual serial port device acts like an ordinary serial port
11425 inside the virtual machine. This device communicates to the real
11426 serial port hardware in one of two modes: host pipe or host device.
11427
11428 In host pipe mode, the #path attribute specifies the path to the pipe on
11429 the host computer that represents a serial port. The #server attribute
11430 determines if this pipe is created by the virtual machine process at
11431 machine startup or it must already exist before starting machine
11432 execution.
11433
11434 In host device mode, the #path attribute specifies the name of the
11435 serial port device on the host computer.
11436
11437 There is also a third communication mode: the disconnected mode. In this
11438 mode, the guest OS running inside the virtual machine will be able to
11439 detect the serial port, but all port write operations will be discarded
11440 and all port read operations will return no data.
11441
11442 <see>IMachine::getSerialPort</see>
11443 </desc>
11444
11445 <attribute name="slot" type="unsigned long" readonly="yes">
11446 <desc>
11447 Slot number this serial port is plugged into. Corresponds to
11448 the value you pass to <link to="IMachine::getSerialPort"/>
11449 to obtain this instance.
11450 </desc>
11451 </attribute>
11452
11453 <attribute name="enabled" type="boolean">
11454 <desc>
11455 Flag whether the serial port is enabled. If disabled,
11456 the serial port will not be reported to the guest OS.
11457 </desc>
11458 </attribute>
11459
11460 <attribute name="IOBase" type="unsigned long">
11461 <desc>Base I/O address of the serial port.</desc>
11462 </attribute>
11463
11464 <attribute name="IRQ" type="unsigned long">
11465 <desc>IRQ number of the serial port.</desc>
11466 </attribute>
11467
11468 <attribute name="hostMode" type="PortMode">
11469 <desc>
11470 How is this port connected to the host.
11471 <note>
11472 Changing this attribute may fail if the conditions for
11473 <link to="#path"/> are not met.
11474 </note>
11475 </desc>
11476 </attribute>
11477
11478 <attribute name="server" type="boolean">
11479 <desc>
11480 Flag whether this serial port acts as a server (creates a new pipe on
11481 the host) or as a client (uses the existing pipe). This attribute is
11482 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11483 </desc>
11484 </attribute>
11485
11486 <attribute name="path" type="wstring">
11487 <desc>
11488 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11489 PortMode_HostPipe, or the host serial device name when
11490 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11491 cases, setting a @c null or empty string as the attribute's value
11492 is an error. Otherwise, the value of this property is ignored.
11493 </desc>
11494 </attribute>
11495
11496 </interface>
11497
11498 <!--
11499 // IParallelPort
11500 /////////////////////////////////////////////////////////////////////////
11501 -->
11502
11503 <interface
11504 name="IParallelPort" extends="$unknown"
11505 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11506 wsmap="managed"
11507 >
11508
11509 <desc>
11510 The IParallelPort interface represents the virtual parallel port device.
11511
11512 The virtual parallel port device acts like an ordinary parallel port
11513 inside the virtual machine. This device communicates to the real
11514 parallel port hardware using the name of the parallel device on the host
11515 computer specified in the #path attribute.
11516
11517 Each virtual parallel port device is assigned a base I/O address and an
11518 IRQ number that will be reported to the guest operating system and used
11519 to operate the given parallel port from within the virtual machine.
11520
11521 <see>IMachine::getParallelPort</see>
11522 </desc>
11523
11524 <attribute name="slot" type="unsigned long" readonly="yes">
11525 <desc>
11526 Slot number this parallel port is plugged into. Corresponds to
11527 the value you pass to <link to="IMachine::getParallelPort"/>
11528 to obtain this instance.
11529 </desc>
11530 </attribute>
11531
11532 <attribute name="enabled" type="boolean">
11533 <desc>
11534 Flag whether the parallel port is enabled. If disabled,
11535 the parallel port will not be reported to the guest OS.
11536 </desc>
11537 </attribute>
11538
11539 <attribute name="IOBase" type="unsigned long">
11540 <desc>Base I/O address of the parallel port.</desc>
11541 </attribute>
11542
11543 <attribute name="IRQ" type="unsigned long">
11544 <desc>IRQ number of the parallel port.</desc>
11545 </attribute>
11546
11547 <attribute name="path" type="wstring">
11548 <desc>
11549 Host parallel device name. If this parallel port is enabled, setting a
11550 @c null or an empty string as this attribute's value will result into
11551 an error.
11552 </desc>
11553 </attribute>
11554
11555 </interface>
11556
11557
11558 <!--
11559 // IMachineDebugger
11560 /////////////////////////////////////////////////////////////////////////
11561 -->
11562
11563 <interface
11564 name="IMachineDebugger" extends="$unknown"
11565 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11566 wsmap="suppress"
11567 >
11568 <method name="resetStats">
11569 <desc>
11570 Reset VM statistics.
11571 </desc>
11572 <param name="pattern" type="wstring" dir="in">
11573 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11574 </param>
11575 </method>
11576
11577 <method name="dumpStats">
11578 <desc>
11579 Dumps VM statistics.
11580 </desc>
11581 <param name="pattern" type="wstring" dir="in">
11582 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11583 </param>
11584 </method>
11585
11586 <method name="getStats">
11587 <desc>
11588 Get the VM statistics in a XMLish format.
11589 </desc>
11590 <param name="pattern" type="wstring" dir="in">
11591 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11592 </param>
11593 <param name="withDescriptions" type="boolean" dir="in">
11594 <desc>Whether to include the descriptions.</desc>
11595 </param>
11596 <param name="stats" type="wstring" dir="out">
11597 <desc>The XML document containing the statistics.</desc>
11598 </param>
11599 </method>
11600
11601 <method name="injectNMI">
11602 <desc>
11603 Inject an NMI into a running VT-x/AMD-V VM.
11604 </desc>
11605 </method>
11606
11607 <attribute name="singlestep" type="boolean">
11608 <desc>Switch for enabling singlestepping.</desc>
11609 </attribute>
11610
11611 <attribute name="recompileUser" type="boolean">
11612 <desc>Switch for forcing code recompilation for user mode code.</desc>
11613 </attribute>
11614
11615 <attribute name="recompileSupervisor" type="boolean">
11616 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11617 </attribute>
11618
11619 <attribute name="PATMEnabled" type="boolean">
11620 <desc>Switch for enabling and disabling the PATM component.</desc>
11621 </attribute>
11622
11623 <attribute name="CSAMEnabled" type="boolean">
11624 <desc>Switch for enabling and disabling the CSAM component.</desc>
11625 </attribute>
11626
11627 <attribute name="logEnabled" type="boolean">
11628 <desc>Switch for enabling and disabling logging.</desc>
11629 </attribute>
11630
11631 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11632 <desc>
11633 Flag indicating whether the VM is currently making use of CPU hardware
11634 virtualization extensions.
11635 </desc>
11636 </attribute>
11637
11638 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11639 <desc>
11640 Flag indicating whether the VM is currently making use of the nested paging
11641 CPU hardware virtualization extension.
11642 </desc>
11643 </attribute>
11644
11645 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11646 <desc>
11647 Flag indicating whether the VM is currently making use of the VPID
11648 VT-x extension.
11649 </desc>
11650 </attribute>
11651
11652 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11653 <desc>
11654 Flag indicating whether the VM is currently making use of the Physical
11655 Address Extension CPU feature.
11656 </desc>
11657 </attribute>
11658
11659 <attribute name="virtualTimeRate" type="unsigned long">
11660 <desc>
11661 The rate at which the virtual time runs expressed as a percentage.
11662 The accepted range is 2% to 20000%.
11663 </desc>
11664 </attribute>
11665
11666 <!-- @todo method for setting log flags, groups and destination! -->
11667
11668 <attribute name="VM" type="unsigned long long" readonly="yes">
11669 <desc>
11670 Gets the VM handle. This is only for internal use while
11671 we carve the details of this interface.
11672 </desc>
11673 </attribute>
11674
11675 </interface>
11676
11677 <!--
11678 // IUSBController
11679 /////////////////////////////////////////////////////////////////////////
11680 -->
11681
11682 <interface
11683 name="IUSBController" extends="$unknown"
11684 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11685 wsmap="managed"
11686 >
11687 <attribute name="enabled" type="boolean">
11688 <desc>
11689 Flag whether the USB controller is present in the
11690 guest system. If disabled, the virtual guest hardware will
11691 not contain any USB controller. Can only be changed when
11692 the VM is powered off.
11693 </desc>
11694 </attribute>
11695
11696 <attribute name="enabledEhci" type="boolean">
11697 <desc>
11698 Flag whether the USB EHCI controller is present in the
11699 guest system. If disabled, the virtual guest hardware will
11700 not contain a USB EHCI controller. Can only be changed when
11701 the VM is powered off.
11702 </desc>
11703 </attribute>
11704
11705 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11706 <desc>
11707 USB standard version which the controller implements.
11708 This is a BCD which means that the major version is in the
11709 high byte and minor version is in the low byte.
11710 </desc>
11711 </attribute>
11712
11713 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11714 <desc>
11715 List of USB device filters associated with the machine.
11716
11717 If the machine is currently running, these filters are activated
11718 every time a new (supported) USB device is attached to the host
11719 computer that was not ignored by global filters
11720 (<link to="IHost::USBDeviceFilters"/>).
11721
11722 These filters are also activated when the machine is powered up.
11723 They are run against a list of all currently available USB
11724 devices (in states
11725 <link to="USBDeviceState_Available"/>,
11726 <link to="USBDeviceState_Busy"/>,
11727 <link to="USBDeviceState_Held"/>) that were not previously
11728 ignored by global filters.
11729
11730 If at least one filter matches the USB device in question, this
11731 device is automatically captured (attached to) the virtual USB
11732 controller of this machine.
11733
11734 <see>IUSBDeviceFilter, ::IUSBController</see>
11735 </desc>
11736 </attribute>
11737
11738 <method name="createDeviceFilter">
11739 <desc>
11740 Creates a new USB device filter. All attributes except
11741 the filter name are set to empty (any match),
11742 <i>active</i> is @c false (the filter is not active).
11743
11744 The created filter can then be added to the list of filters using
11745 <link to="#insertDeviceFilter"/>.
11746
11747 <result name="VBOX_E_INVALID_VM_STATE">
11748 The virtual machine is not mutable.
11749 </result>
11750
11751 <see>#deviceFilters</see>
11752 </desc>
11753 <param name="name" type="wstring" dir="in">
11754 <desc>
11755 Filter name. See <link to="IUSBDeviceFilter::name"/>
11756 for more info.
11757 </desc>
11758 </param>
11759 <param name="filter" type="IUSBDeviceFilter" dir="return">
11760 <desc>Created filter object.</desc>
11761 </param>
11762 </method>
11763
11764 <method name="insertDeviceFilter">
11765 <desc>
11766 Inserts the given USB device to the specified position
11767 in the list of filters.
11768
11769 Positions are numbered starting from <tt>0</tt>. If the specified
11770 position is equal to or greater than the number of elements in
11771 the list, the filter is added to the end of the collection.
11772
11773 <note>
11774 Duplicates are not allowed, so an attempt to insert a
11775 filter that is already in the collection, will return an
11776 error.
11777 </note>
11778
11779 <result name="VBOX_E_INVALID_VM_STATE">
11780 Virtual machine is not mutable.
11781 </result>
11782 <result name="E_INVALIDARG">
11783 USB device filter not created within this VirtualBox instance.
11784 </result>
11785 <result name="VBOX_E_INVALID_OBJECT_STATE">
11786 USB device filter already in list.
11787 </result>
11788
11789 <see>#deviceFilters</see>
11790 </desc>
11791 <param name="position" type="unsigned long" dir="in">
11792 <desc>Position to insert the filter to.</desc>
11793 </param>
11794 <param name="filter" type="IUSBDeviceFilter" dir="in">
11795 <desc>USB device filter to insert.</desc>
11796 </param>
11797 </method>
11798
11799 <method name="removeDeviceFilter">
11800 <desc>
11801 Removes a USB device filter from the specified position in the
11802 list of filters.
11803
11804 Positions are numbered starting from <tt>0</tt>. Specifying a
11805 position equal to or greater than the number of elements in
11806 the list will produce an error.
11807
11808 <see>#deviceFilters</see>
11809
11810 <result name="VBOX_E_INVALID_VM_STATE">
11811 Virtual machine is not mutable.
11812 </result>
11813 <result name="E_INVALIDARG">
11814 USB device filter list empty or invalid @a position.
11815 </result>
11816
11817 </desc>
11818 <param name="position" type="unsigned long" dir="in">
11819 <desc>Position to remove the filter from.</desc>
11820 </param>
11821 <param name="filter" type="IUSBDeviceFilter" dir="return">
11822 <desc>Removed USB device filter.</desc>
11823 </param>
11824 </method>
11825
11826 </interface>
11827
11828
11829 <!--
11830 // IUSBDevice
11831 /////////////////////////////////////////////////////////////////////////
11832 -->
11833
11834 <interface
11835 name="IUSBDevice" extends="$unknown"
11836 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11837 wsmap="managed"
11838 >
11839 <desc>
11840 The IUSBDevice interface represents a virtual USB device attached to the
11841 virtual machine.
11842
11843 A collection of objects implementing this interface is stored in the
11844 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11845 attached to a running virtual machine's USB controller.
11846 </desc>
11847
11848 <attribute name="id" type="uuid" mod="string" readonly="yes">
11849 <desc>
11850 Unique USB device ID. This ID is built from #vendorId,
11851 #productId, #revision and #serialNumber.
11852 </desc>
11853 </attribute>
11854
11855 <attribute name="vendorId" type="unsigned short" readonly="yes">
11856 <desc>Vendor ID.</desc>
11857 </attribute>
11858
11859 <attribute name="productId" type="unsigned short" readonly="yes">
11860 <desc>Product ID.</desc>
11861 </attribute>
11862
11863 <attribute name="revision" type="unsigned short" readonly="yes">
11864 <desc>
11865 Product revision number. This is a packed BCD represented as
11866 unsigned short. The high byte is the integer part and the low
11867 byte is the decimal.
11868 </desc>
11869 </attribute>
11870
11871 <attribute name="manufacturer" type="wstring" readonly="yes">
11872 <desc>Manufacturer string.</desc>
11873 </attribute>
11874
11875 <attribute name="product" type="wstring" readonly="yes">
11876 <desc>Product string.</desc>
11877 </attribute>
11878
11879 <attribute name="serialNumber" type="wstring" readonly="yes">
11880 <desc>Serial number string.</desc>
11881 </attribute>
11882
11883 <attribute name="address" type="wstring" readonly="yes">
11884 <desc>Host specific address of the device.</desc>
11885 </attribute>
11886
11887 <attribute name="port" type="unsigned short" readonly="yes">
11888 <desc>
11889 Host USB port number the device is physically
11890 connected to.
11891 </desc>
11892 </attribute>
11893
11894 <attribute name="version" type="unsigned short" readonly="yes">
11895 <desc>
11896 The major USB version of the device - 1 or 2.
11897 </desc>
11898 </attribute>
11899
11900 <attribute name="portVersion" type="unsigned short" readonly="yes">
11901 <desc>
11902 The major USB version of the host USB port the device is
11903 physically connected to - 1 or 2. For devices not connected to
11904 anything this will have the same value as the version attribute.
11905 </desc>
11906 </attribute>
11907
11908 <attribute name="remote" type="boolean" readonly="yes">
11909 <desc>
11910 Whether the device is physically connected to a remote VRDP
11911 client or to a local host machine.
11912 </desc>
11913 </attribute>
11914
11915 </interface>
11916
11917
11918 <!--
11919 // IUSBDeviceFilter
11920 /////////////////////////////////////////////////////////////////////////
11921 -->
11922
11923 <interface
11924 name="IUSBDeviceFilter" extends="$unknown"
11925 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11926 wsmap="managed"
11927 >
11928 <desc>
11929 The IUSBDeviceFilter interface represents an USB device filter used
11930 to perform actions on a group of USB devices.
11931
11932 This type of filters is used by running virtual machines to
11933 automatically capture selected USB devices once they are physically
11934 attached to the host computer.
11935
11936 A USB device is matched to the given device filter if and only if all
11937 attributes of the device match the corresponding attributes of the
11938 filter (that is, attributes are joined together using the logical AND
11939 operation). On the other hand, all together, filters in the list of
11940 filters carry the semantics of the logical OR operation. So if it is
11941 desirable to create a match like "this vendor id OR this product id",
11942 one needs to create two filters and specify "any match" (see below)
11943 for unused attributes.
11944
11945 All filter attributes used for matching are strings. Each string
11946 is an expression representing a set of values of the corresponding
11947 device attribute, that will match the given filter. Currently, the
11948 following filtering expressions are supported:
11949
11950 <ul>
11951 <li><i>Interval filters</i>. Used to specify valid intervals for
11952 integer device attributes (Vendor ID, Product ID and Revision).
11953 The format of the string is:
11954
11955 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11956
11957 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11958 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11959 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11960 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11961 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11962 possible integer is assumed.
11963 </li>
11964 <li><i>Boolean filters</i>. Used to specify acceptable values for
11965 boolean device attributes. The format of the string is:
11966
11967 <tt>true|false|yes|no|0|1</tt>
11968
11969 </li>
11970 <li><i>Exact match</i>. Used to specify a single value for the given
11971 device attribute. Any string that doesn't start with <tt>int:</tt>
11972 represents the exact match. String device attributes are compared to
11973 this string including case of symbols. Integer attributes are first
11974 converted to a string (see individual filter attributes) and then
11975 compared ignoring case.
11976
11977 </li>
11978 <li><i>Any match</i>. Any value of the corresponding device attribute
11979 will match the given filter. An empty or @c null string is
11980 used to construct this type of filtering expressions.
11981
11982 </li>
11983 </ul>
11984
11985 <note>
11986 On the Windows host platform, interval filters are not currently
11987 available. Also all string filter attributes
11988 (<link to="#manufacturer"/>, <link to="#product"/>,
11989 <link to="#serialNumber"/>) are ignored, so they behave as
11990 <i>any match</i> no matter what string expression is specified.
11991 </note>
11992
11993 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11994 </desc>
11995
11996 <attribute name="name" type="wstring">
11997 <desc>
11998 Visible name for this filter.
11999 This name is used to visually distinguish one filter from another,
12000 so it can neither be @c null nor an empty string.
12001 </desc>
12002 </attribute>
12003
12004 <attribute name="active" type="boolean">
12005 <desc>Whether this filter active or has been temporarily disabled.</desc>
12006 </attribute>
12007
12008 <attribute name="vendorId" type="wstring">
12009 <desc>
12010 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
12011 The string representation for the <i>exact matching</i>
12012 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
12013 (including leading zeroes).
12014 </desc>
12015 </attribute>
12016
12017 <attribute name="productId" type="wstring">
12018 <desc>
12019 <link to="IUSBDevice::productId">Product ID</link> filter.
12020 The string representation for the <i>exact matching</i>
12021 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
12022 (including leading zeroes).
12023 </desc>
12024 </attribute>
12025
12026 <attribute name="revision" type="wstring">
12027 <desc>
12028 <link to="IUSBDevice::productId">Product revision number</link>
12029 filter. The string representation for the <i>exact matching</i>
12030 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
12031 of the integer part of the revision, and <tt>F</tt> is the
12032 decimal digit of its fractional part (including leading and
12033 trailing zeros).
12034 Note that for interval filters, it's best to use the hexadecimal
12035 form, because the revision is stored as a 16 bit packed BCD value;
12036 so the expression <tt>int:0x0100-0x0199</tt> will match any
12037 revision from <tt>1.0</tt> to <tt>1.99</tt>.
12038 </desc>
12039 </attribute>
12040
12041 <attribute name="manufacturer" type="wstring">
12042 <desc>
12043 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
12044 </desc>
12045 </attribute>
12046
12047 <attribute name="product" type="wstring">
12048 <desc>
12049 <link to="IUSBDevice::product">Product</link> filter.
12050 </desc>
12051 </attribute>
12052
12053 <attribute name="serialNumber" type="wstring">
12054 <desc>
12055 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
12056 </desc>
12057 </attribute>
12058
12059 <attribute name="port" type="wstring">
12060 <desc>
12061 <link to="IUSBDevice::port">Host USB port</link> filter.
12062 </desc>
12063 </attribute>
12064
12065 <attribute name="remote" type="wstring">
12066 <desc>
12067 <link to="IUSBDevice::remote">Remote state</link> filter.
12068 <note>
12069 This filter makes sense only for machine USB filters,
12070 i.e. it is ignored by IHostUSBDeviceFilter objects.
12071 </note>
12072 </desc>
12073 </attribute>
12074
12075 <attribute name="maskedInterfaces" type="unsigned long">
12076 <desc>
12077 This is an advanced option for hiding one or more USB interfaces
12078 from the guest. The value is a bit mask where the bits that are set
12079 means the corresponding USB interface should be hidden, masked off
12080 if you like.
12081 This feature only works on Linux hosts.
12082 </desc>
12083 </attribute>
12084
12085 </interface>
12086
12087
12088 <!--
12089 // IHostUSBDevice
12090 /////////////////////////////////////////////////////////////////////////
12091 -->
12092
12093 <enum
12094 name="USBDeviceState"
12095 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
12096 >
12097 <desc>
12098 USB device state. This enumeration represents all possible states
12099 of the USB device physically attached to the host computer regarding
12100 its state on the host computer and availability to guest computers
12101 (all currently running virtual machines).
12102
12103 Once a supported USB device is attached to the host, global USB
12104 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
12105 either ignore the device, or put it to USBDeviceState_Held state, or do
12106 nothing. Unless the device is ignored by global filters, filters of all
12107 currently running guests (<link to="IUSBController::deviceFilters"/>) are
12108 activated that can put it to USBDeviceState_Captured state.
12109
12110 If the device was ignored by global filters, or didn't match
12111 any filters at all (including guest ones), it is handled by the host
12112 in a normal way. In this case, the device state is determined by
12113 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
12114 or USBDeviceState_Available, depending on the current device usage.
12115
12116 Besides auto-capturing based on filters, the device can be manually
12117 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
12118 state is USBDeviceState_Busy, USBDeviceState_Available or
12119 USBDeviceState_Held.
12120
12121 <note>
12122 Due to differences in USB stack implementations in Linux and Win32,
12123 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
12124 only to the Linux version of the product. This also means that (<link
12125 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
12126 device state is USBDeviceState_Held.
12127 </note>
12128
12129 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
12130 </desc>
12131
12132 <const name="NotSupported" value="0">
12133 <desc>
12134 Not supported by the VirtualBox server, not available to guests.
12135 </desc>
12136 </const>
12137 <const name="Unavailable" value="1">
12138 <desc>
12139 Being used by the host computer exclusively,
12140 not available to guests.
12141 </desc>
12142 </const>
12143 <const name="Busy" value="2">
12144 <desc>
12145 Being used by the host computer, potentially available to guests.
12146 </desc>
12147 </const>
12148 <const name="Available" value="3">
12149 <desc>
12150 Not used by the host computer, available to guests (the host computer
12151 can also start using the device at any time).
12152 </desc>
12153 </const>
12154 <const name="Held" value="4">
12155 <desc>
12156 Held by the VirtualBox server (ignored by the host computer),
12157 available to guests.
12158 </desc>
12159 </const>
12160 <const name="Captured" value="5">
12161 <desc>
12162 Captured by one of the guest computers, not available
12163 to anybody else.
12164 </desc>
12165 </const>
12166 </enum>
12167
12168 <interface
12169 name="IHostUSBDevice" extends="IUSBDevice"
12170 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
12171 wsmap="managed"
12172 >
12173 <desc>
12174 The IHostUSBDevice interface represents a physical USB device attached
12175 to the host computer.
12176
12177 Besides properties inherited from IUSBDevice, this interface adds the
12178 <link to="#state"/> property that holds the current state of the USB
12179 device.
12180
12181 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
12182 </desc>
12183
12184 <attribute name="state" type="USBDeviceState" readonly="yes">
12185 <desc>
12186 Current state of the device.
12187 </desc>
12188 </attribute>
12189
12190 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
12191
12192 </interface>
12193
12194
12195 <!--
12196 // IHostUSBDeviceFilter
12197 /////////////////////////////////////////////////////////////////////////
12198 -->
12199
12200 <enum
12201 name="USBDeviceFilterAction"
12202 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
12203 >
12204 <desc>
12205 Actions for host USB device filters.
12206 <see>IHostUSBDeviceFilter, USBDeviceState</see>
12207 </desc>
12208
12209 <const name="Null" value="0">
12210 <desc>Null value (never used by the API).</desc>
12211 </const>
12212 <const name="Ignore" value="1">
12213 <desc>Ignore the matched USB device.</desc>
12214 </const>
12215 <const name="Hold" value="2">
12216 <desc>Hold the matched USB device.</desc>
12217 </const>
12218 </enum>
12219
12220 <interface
12221 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
12222 uuid="4cc70246-d74a-400f-8222-3900489c0374"
12223 wsmap="managed"
12224 >
12225 <desc>
12226 The IHostUSBDeviceFilter interface represents a global filter for a
12227 physical USB device used by the host computer. Used indirectly in
12228 <link to="IHost::USBDeviceFilters"/>.
12229
12230 Using filters of this type, the host computer determines the initial
12231 state of the USB device after it is physically attached to the
12232 host's USB controller.
12233
12234 <note>
12235 The <link to="#remote"/> attribute is ignored by this type of
12236 filters, because it makes sense only for
12237 <link to="IUSBController::deviceFilters">machine USB filters</link>.
12238 </note>
12239
12240 <see>IHost::USBDeviceFilters</see>
12241 </desc>
12242
12243 <attribute name="action" type="USBDeviceFilterAction">
12244 <desc>
12245 Action performed by the host when an attached USB device
12246 matches this filter.
12247 </desc>
12248 </attribute>
12249
12250 </interface>
12251
12252 <!--
12253 // IAudioAdapter
12254 /////////////////////////////////////////////////////////////////////////
12255 -->
12256
12257 <enum
12258 name="AudioDriverType"
12259 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
12260 >
12261 <desc>
12262 Host audio driver type.
12263 </desc>
12264
12265 <const name="Null" value="0">
12266 <desc>Null value, also means "dummy audio driver".</desc>
12267 </const>
12268 <const name="WinMM" value="1">
12269 <desc>Windows multimedia (Windows hosts only).</desc>
12270 </const>
12271 <const name="OSS" value="2">
12272 <desc>Open Sound System (Linux hosts only).</desc>
12273 </const>
12274 <const name="ALSA" value="3">
12275 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
12276 </const>
12277 <const name="DirectSound" value="4">
12278 <desc>DirectSound (Windows hosts only).</desc>
12279 </const>
12280 <const name="CoreAudio" value="5">
12281 <desc>CoreAudio (Mac hosts only).</desc>
12282 </const>
12283 <const name="MMPM" value="6">
12284 <desc>Reserved for historical reasons.</desc>
12285 </const>
12286 <const name="Pulse" value="7">
12287 <desc>PulseAudio (Linux hosts only).</desc>
12288 </const>
12289 <const name="SolAudio" value="8">
12290 <desc>Solaris audio (Solaris hosts only).</desc>
12291 </const>
12292 </enum>
12293
12294 <enum
12295 name="AudioControllerType"
12296 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
12297 >
12298 <desc>
12299 Virtual audio controller type.
12300 </desc>
12301
12302 <const name="AC97" value="0"/>
12303 <const name="SB16" value="1"/>
12304 </enum>
12305
12306 <interface
12307 name="IAudioAdapter" extends="$unknown"
12308 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
12309 wsmap="managed"
12310 >
12311 <desc>
12312 The IAudioAdapter interface represents the virtual audio adapter of
12313 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
12314 </desc>
12315 <attribute name="enabled" type="boolean">
12316 <desc>
12317 Flag whether the audio adapter is present in the
12318 guest system. If disabled, the virtual guest hardware will
12319 not contain any audio adapter. Can only be changed when
12320 the VM is not running.
12321 </desc>
12322 </attribute>
12323 <attribute name="audioController" type="AudioControllerType">
12324 <desc>
12325 The audio hardware we emulate.
12326 </desc>
12327 </attribute>
12328 <attribute name="audioDriver" type="AudioDriverType">
12329 <desc>
12330 Audio driver the adapter is connected to. This setting
12331 can only be changed when the VM is not running.
12332 </desc>
12333 </attribute>
12334 </interface>
12335
12336 <!--
12337 // IVRDPServer
12338 /////////////////////////////////////////////////////////////////////////
12339 -->
12340
12341 <enum
12342 name="VRDPAuthType"
12343 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
12344 >
12345 <desc>
12346 VRDP authentication type.
12347 </desc>
12348
12349 <const name="Null" value="0">
12350 <desc>Null value, also means "no authentication".</desc>
12351 </const>
12352 <const name="External" value="1"/>
12353 <const name="Guest" value="2"/>
12354 </enum>
12355
12356 <interface
12357 name="IVRDPServer" extends="$unknown"
12358 uuid="72e671bc-1712-4052-ad6b-e45e76d9d3e4"
12359 wsmap="managed"
12360 >
12361 <attribute name="enabled" type="boolean">
12362 <desc>VRDP server status.</desc>
12363 </attribute>
12364
12365 <attribute name="ports" type="wstring">
12366 <desc>
12367 VRDP server port numbers. The server will try to bind to one of free ports from the list.
12368 <note>
12369 This is a string of comma separated TCP port numbers or port number ranges.
12370 Example <tt>5000,5010-5012,5015</tt>
12371 </note>
12372 </desc>
12373 </attribute>
12374
12375 <attribute name="netAddress" type="wstring">
12376 <desc>VRDP server address.</desc>
12377 </attribute>
12378
12379 <attribute name="authType" type="VRDPAuthType">
12380 <desc>VRDP authentication method.</desc>
12381 </attribute>
12382
12383 <attribute name="authTimeout" type="unsigned long">
12384 <desc>Timeout for guest authentication. Milliseconds.</desc>
12385 </attribute>
12386
12387 <attribute name="allowMultiConnection" type="boolean">
12388 <desc>
12389 Flag whether multiple simultaneous connections to the VM are permitted.
12390 Note that this will be replaced by a more powerful mechanism in the future.
12391 </desc>
12392 </attribute>
12393
12394 <attribute name="reuseSingleConnection" type="boolean">
12395 <desc>
12396 Flag whether the existing connection must be dropped and a new connection
12397 must be established by the VRDP server, when a new client connects in single
12398 connection mode.
12399 </desc>
12400 </attribute>
12401
12402 </interface>
12403
12404
12405 <!--
12406 // ISharedFolder
12407 /////////////////////////////////////////////////////////////////////////
12408 -->
12409
12410 <interface
12411 name="ISharedFolder" extends="$unknown"
12412 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
12413 wsmap="struct"
12414 >
12415 <desc>
12416 The ISharedFolder interface represents a folder in the host computer's
12417 file system accessible from the guest OS running inside a virtual
12418 machine using an associated logical name.
12419
12420 There are three types of shared folders:
12421 <ul>
12422 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12423 folders available to all virtual machines.</li>
12424 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12425 VM-specific shared folders available to the given virtual machine at
12426 startup.</li>
12427 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12428 VM-specific shared folders created in the session context (for
12429 example, when the virtual machine is running) and automatically
12430 discarded when the session is closed (the VM is powered off).</li>
12431 </ul>
12432
12433 Logical names of shared folders must be unique within the given scope
12434 (global, permanent or transient). However, they do not need to be unique
12435 across scopes. In this case, the definition of the shared folder in a
12436 more specific scope takes precedence over definitions in all other
12437 scopes. The order of precedence is (more specific to more general):
12438 <ol>
12439 <li>Transient definitions</li>
12440 <li>Permanent definitions</li>
12441 <li>Global definitions</li>
12442 </ol>
12443
12444 For example, if MyMachine has a shared folder named
12445 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12446 transient shared folder named <tt>C_DRIVE</tt> (that points
12447 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12448 of <tt>C_DRIVE</tt> in the guest OS so
12449 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12450 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12451 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12452 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12453 to <tt>C:\\</tt> if it still exists.
12454
12455 Note that permanent and transient shared folders of different machines
12456 are in different name spaces, so they don't overlap and don't need to
12457 have unique logical names.
12458
12459 <note>
12460 Global shared folders are not implemented in the current version of the
12461 product.
12462 </note>
12463 </desc>
12464
12465 <attribute name="name" type="wstring" readonly="yes">
12466 <desc>Logical name of the shared folder.</desc>
12467 </attribute>
12468
12469 <attribute name="hostPath" type="wstring" readonly="yes">
12470 <desc>Full path to the shared folder in the host file system.</desc>
12471 </attribute>
12472
12473 <attribute name="accessible" type="boolean" readonly="yes">
12474 <desc>
12475 Whether the folder defined by the host path is currently
12476 accessible or not.
12477 For example, the folder can be unaccessible if it is placed
12478 on the network share that is not available by the time
12479 this property is read.
12480 </desc>
12481 </attribute>
12482
12483 <attribute name="writable" type="boolean" readonly="yes">
12484 <desc>
12485 Whether the folder defined by the host path is writable or
12486 not.
12487 </desc>
12488 </attribute>
12489
12490 <attribute name="lastAccessError" type="wstring" readonly="yes">
12491 <desc>
12492 Text message that represents the result of the last accessibility
12493 check.
12494
12495 Accessibility checks are performed each time the <link to="#accessible"/>
12496 attribute is read. An empty string is returned if the last
12497 accessibility check was successful. A non-empty string indicates a
12498 failure and should normally describe a reason of the failure (for
12499 example, a file read error).
12500 </desc>
12501 </attribute>
12502
12503 </interface>
12504
12505 <!--
12506 // ISession
12507 /////////////////////////////////////////////////////////////////////////
12508 -->
12509
12510 <interface
12511 name="IInternalSessionControl" extends="$unknown"
12512 uuid="989e2c33-8dfa-437a-9a15-5ad441d50dbf"
12513 internal="yes"
12514 wsmap="suppress"
12515 >
12516 <method name="getPID">
12517 <desc>PID of the process that has created this Session object.
12518 </desc>
12519 <param name="pid" type="unsigned long" dir="return"/>
12520 </method>
12521
12522 <method name="getRemoteConsole">
12523 <desc>
12524 Returns the console object suitable for remote control.
12525
12526 <result name="VBOX_E_INVALID_VM_STATE">
12527 Session state prevents operation.
12528 </result>
12529 <result name="VBOX_E_INVALID_OBJECT_STATE">
12530 Session type prevents operation.
12531 </result>
12532
12533 </desc>
12534 <param name="console" type="IConsole" dir="return"/>
12535 </method>
12536
12537 <method name="assignMachine">
12538 <desc>
12539 Assigns the machine object associated with this direct-type
12540 session or informs the session that it will be a remote one
12541 (if @a machine == @c null).
12542
12543 <result name="VBOX_E_INVALID_VM_STATE">
12544 Session state prevents operation.
12545 </result>
12546 <result name="VBOX_E_INVALID_OBJECT_STATE">
12547 Session type prevents operation.
12548 </result>
12549
12550 </desc>
12551 <param name="machine" type="IMachine" dir="in"/>
12552 </method>
12553
12554 <method name="assignRemoteMachine">
12555 <desc>
12556 Assigns the machine and the (remote) console object associated with
12557 this remote-type session.
12558
12559 <result name="VBOX_E_INVALID_VM_STATE">
12560 Session state prevents operation.
12561 </result>
12562
12563 </desc>
12564 <param name="machine" type="IMachine" dir="in"/>
12565 <param name="console" type="IConsole" dir="in"/>
12566 </method>
12567
12568 <method name="updateMachineState">
12569 <desc>
12570 Updates the machine state in the VM process.
12571 Must be called only in certain cases
12572 (see the method implementation).
12573
12574 <result name="VBOX_E_INVALID_VM_STATE">
12575 Session state prevents operation.
12576 </result>
12577 <result name="VBOX_E_INVALID_OBJECT_STATE">
12578 Session type prevents operation.
12579 </result>
12580
12581 </desc>
12582 <param name="aMachineState" type="MachineState" dir="in"/>
12583 </method>
12584
12585 <method name="uninitialize">
12586 <desc>
12587 Uninitializes (closes) this session. Used by VirtualBox to close
12588 the corresponding remote session when the direct session dies
12589 or gets closed.
12590
12591 <result name="VBOX_E_INVALID_VM_STATE">
12592 Session state prevents operation.
12593 </result>
12594
12595 </desc>
12596 </method>
12597
12598 <method name="onNetworkAdapterChange">
12599 <desc>
12600 Triggered when settings of a network adapter of the
12601 associated virtual machine have changed.
12602
12603 <result name="VBOX_E_INVALID_VM_STATE">
12604 Session state prevents operation.
12605 </result>
12606 <result name="VBOX_E_INVALID_OBJECT_STATE">
12607 Session type prevents operation.
12608 </result>
12609
12610 </desc>
12611 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12612 <param name="changeAdapter" type="boolean" dir="in"/>
12613 </method>
12614
12615 <method name="onSerialPortChange">
12616 <desc>
12617 Triggered when settings of a serial port of the
12618 associated virtual machine have changed.
12619
12620 <result name="VBOX_E_INVALID_VM_STATE">
12621 Session state prevents operation.
12622 </result>
12623 <result name="VBOX_E_INVALID_OBJECT_STATE">
12624 Session type prevents operation.
12625 </result>
12626
12627 </desc>
12628 <param name="serialPort" type="ISerialPort" dir="in"/>
12629 </method>
12630
12631 <method name="onParallelPortChange">
12632 <desc>
12633 Triggered when settings of a parallel 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="parallelPort" type="IParallelPort" dir="in"/>
12645 </method>
12646
12647 <method name="onStorageControllerChange">
12648 <desc>
12649 Triggered when settings of a storage controller 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 </method>
12661
12662 <method name="onMediumChange">
12663 <desc>
12664 Triggered when attached media of the
12665 associated virtual machine have changed.
12666
12667 <result name="VBOX_E_INVALID_VM_STATE">
12668 Session state prevents operation.
12669 </result>
12670 <result name="VBOX_E_INVALID_OBJECT_STATE">
12671 Session type prevents operation.
12672 </result>
12673
12674 </desc>
12675
12676 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12677 </method>
12678
12679 <method name="onVRDPServerChange">
12680 <desc>
12681 Triggered when settings of the VRDP server object of the
12682 associated virtual machine have changed.
12683
12684 <result name="VBOX_E_INVALID_VM_STATE">
12685 Session state prevents operation.
12686 </result>
12687 <result name="VBOX_E_INVALID_OBJECT_STATE">
12688 Session type prevents operation.
12689 </result>
12690
12691 </desc>
12692 </method>
12693
12694 <method name="onUSBControllerChange">
12695 <desc>
12696 Triggered when settings of the USB controller object of the
12697 associated virtual machine have changed.
12698
12699 <result name="VBOX_E_INVALID_VM_STATE">
12700 Session state prevents operation.
12701 </result>
12702 <result name="VBOX_E_INVALID_OBJECT_STATE">
12703 Session type prevents operation.
12704 </result>
12705
12706 </desc>
12707 </method>
12708
12709 <method name="onSharedFolderChange">
12710 <desc>
12711 Triggered when a permanent (global or machine) shared folder has been
12712 created or removed.
12713 <note>
12714 We don't pass shared folder parameters in this notification because
12715 the order in which parallel notifications are delivered is not defined,
12716 therefore it could happen that these parameters were outdated by the
12717 time of processing this notification.
12718 </note>
12719
12720 <result name="VBOX_E_INVALID_VM_STATE">
12721 Session state prevents operation.
12722 </result>
12723 <result name="VBOX_E_INVALID_OBJECT_STATE">
12724 Session type prevents operation.
12725 </result>
12726
12727 </desc>
12728 <param name="global" type="boolean" dir="in"/>
12729 </method>
12730
12731 <method name="onUSBDeviceAttach">
12732 <desc>
12733 Triggered when a request to capture a USB device (as a result
12734 of matched USB filters or direct call to
12735 <link to="IConsole::attachUSBDevice"/>) has completed.
12736 A @c null @a error object means success, otherwise it
12737 describes a failure.
12738
12739 <result name="VBOX_E_INVALID_VM_STATE">
12740 Session state prevents operation.
12741 </result>
12742 <result name="VBOX_E_INVALID_OBJECT_STATE">
12743 Session type prevents operation.
12744 </result>
12745
12746 </desc>
12747 <param name="device" type="IUSBDevice" dir="in"/>
12748 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12749 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12750 </method>
12751
12752 <method name="onUSBDeviceDetach">
12753 <desc>
12754 Triggered when a request to release the USB device (as a result
12755 of machine termination or direct call to
12756 <link to="IConsole::detachUSBDevice"/>) has completed.
12757 A @c null @a error object means success, otherwise it
12758 describes a failure.
12759
12760 <result name="VBOX_E_INVALID_VM_STATE">
12761 Session state prevents operation.
12762 </result>
12763 <result name="VBOX_E_INVALID_OBJECT_STATE">
12764 Session type prevents operation.
12765 </result>
12766
12767 </desc>
12768 <param name="id" type="uuid" mod="string" dir="in"/>
12769 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12770 </method>
12771
12772 <method name="onShowWindow">
12773 <desc>
12774 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12775 <link to="IMachine::showConsoleWindow"/> in order to notify
12776 console callbacks
12777 <link to="IConsoleCallback::onCanShowWindow"/>
12778 and <link to="IConsoleCallback::onShowWindow"/>.
12779
12780 <result name="VBOX_E_INVALID_OBJECT_STATE">
12781 Session type prevents operation.
12782 </result>
12783
12784 </desc>
12785 <param name="check" type="boolean" dir="in"/>
12786 <param name="canShow" type="boolean" dir="out"/>
12787 <param name="winId" type="unsigned long long" dir="out"/>
12788 </method>
12789
12790 <method name="accessGuestProperty">
12791 <desc>
12792 Called by <link to="IMachine::getGuestProperty"/> and by
12793 <link to="IMachine::setGuestProperty"/> in order to read and
12794 modify guest properties.
12795
12796 <result name="VBOX_E_INVALID_VM_STATE">
12797 Machine session is not open.
12798 </result>
12799 <result name="VBOX_E_INVALID_OBJECT_STATE">
12800 Session type is not direct.
12801 </result>
12802
12803 </desc>
12804 <param name="name" type="wstring" dir="in"/>
12805 <param name="value" type="wstring" dir="in"/>
12806 <param name="flags" type="wstring" dir="in"/>
12807 <param name="isSetter" type="boolean" dir="in"/>
12808 <param name="retValue" type="wstring" dir="out"/>
12809 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12810 <param name="retFlags" type="wstring" dir="out"/>
12811 </method>
12812
12813 <method name="enumerateGuestProperties">
12814 <desc>
12815 Return a list of the guest properties matching a set of patterns along
12816 with their values, time stamps and flags.
12817
12818 <result name="VBOX_E_INVALID_VM_STATE">
12819 Machine session is not open.
12820 </result>
12821 <result name="VBOX_E_INVALID_OBJECT_STATE">
12822 Session type is not direct.
12823 </result>
12824
12825 </desc>
12826 <param name="patterns" type="wstring" dir="in">
12827 <desc>
12828 The patterns to match the properties against as a comma-separated
12829 string. If this is empty, all properties currently set will be
12830 returned.
12831 </desc>
12832 </param>
12833 <param name="key" type="wstring" dir="out" safearray="yes">
12834 <desc>
12835 The key names of the properties returned.
12836 </desc>
12837 </param>
12838 <param name="value" type="wstring" dir="out" safearray="yes">
12839 <desc>
12840 The values of the properties returned. The array entries match the
12841 corresponding entries in the @a key array.
12842 </desc>
12843 </param>
12844 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12845 <desc>
12846 The time stamps of the properties returned. The array entries match
12847 the corresponding entries in the @a key array.
12848 </desc>
12849 </param>
12850 <param name="flags" type="wstring" dir="out" safearray="yes">
12851 <desc>
12852 The flags of the properties returned. The array entries match the
12853 corresponding entries in the @a key array.
12854 </desc>
12855 </param>
12856 </method>
12857
12858 </interface>
12859
12860 <interface
12861 name="ISession" extends="$dispatched"
12862 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12863 wsmap="managed"
12864 >
12865 <desc>
12866 The ISession interface represents a serialization primitive for virtual
12867 machines.
12868
12869 With VirtualBox, every time one wishes to manipulate a virtual machine
12870 (e.g. change its settings or start execution), a session object is
12871 required. Such an object must be passed to one of the session methods
12872 that open the given session, which then initiates the machine manipulation.
12873
12874 A session serves several purposes: it identifies to the inter-process VirtualBox
12875 code which process is currently working with the virtual machine, and it ensures
12876 that there are no incompatible requests from several processes for the
12877 same virtual machine. Session objects can therefore be thought of as mutex
12878 semaphores that lock virtual machines to prevent conflicting accesses from
12879 several processes.
12880
12881 How sessions objects are used depends on whether you use the Main API
12882 via COM or via the webservice:
12883
12884 <ul>
12885 <li>When using the COM API directly, an object of the Session class from the
12886 VirtualBox type library needs to be created. In regular COM C++ client code,
12887 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12888 This object will then act as a local session object in further calls to open
12889 a session.
12890 </li>
12891
12892 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12893 one session object automatically when <link to="IWebsessionManager::logon" />
12894 is called. A managed object reference to that session object can be retrieved by
12895 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12896 reference can then be used to open sessions.
12897 </li>
12898 </ul>
12899
12900 Sessions are mainly used in two variations:
12901
12902 <ul>
12903 <li>
12904 To start a virtual machine in a separate process, one would call
12905 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12906 object as its first parameter. This session then identifies the caller
12907 and lets him control the started machine (for example, pause machine
12908 execution or power it down) as well as be notified about machine
12909 execution state changes.
12910 </li>
12911
12912 <li>To alter machine settings, or to start machine execution within the
12913 current process, one needs to open a direct session for the machine first by
12914 calling <link to="IVirtualBox::openSession"/>. While a direct session
12915 is open within one process, no any other process may open another direct
12916 session for the same machine. This prevents the machine from being changed
12917 by other processes while it is running or while the machine is being configured.
12918 </li>
12919 </ul>
12920
12921 One also can attach to an existing direct session already opened by
12922 another process (for example, in order to send a control request to the
12923 virtual machine such as the pause or the reset request). This is done by
12924 calling <link to="IVirtualBox::openExistingSession"/>.
12925
12926 <note>
12927 Unless you are trying to write a new VirtualBox front-end that
12928 performs direct machine execution (like the VirtualBox or VBoxSDL
12929 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12930 session opened by <link to="IVirtualBox::openSession"/> and use this
12931 session only to change virtual machine settings. If you simply want to
12932 start virtual machine execution using one of the existing front-ends
12933 (for example the VirtualBox GUI or headless server), simply use
12934 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12935 will power up the machine automatically for you.
12936 </note>
12937 </desc>
12938
12939 <attribute name="state" type="SessionState" readonly="yes">
12940 <desc>Current state of this session.</desc>
12941 </attribute>
12942
12943 <attribute name="type" type="SessionType" readonly="yes">
12944 <desc>
12945 Type of this session. The value of this attribute is valid only
12946 if the session is currently open (i.e. its #state is
12947 SessionType_SessionOpen), otherwise an error will be returned.
12948 </desc>
12949 </attribute>
12950
12951 <attribute name="machine" type="IMachine" readonly="yes">
12952 <desc>Machine object associated with this session.</desc>
12953 </attribute>
12954
12955 <attribute name="console" type="IConsole" readonly="yes">
12956 <desc>Console object associated with this session.</desc>
12957 </attribute>
12958
12959 <method name="close">
12960 <desc>
12961 Closes a session that was previously opened.
12962
12963 It is recommended that every time an "open session" method (such as
12964 <link to="IVirtualBox::openRemoteSession" /> or
12965 <link to="IVirtualBox::openSession" />) has been called to
12966 manipulate a virtual machine, the caller invoke
12967 ISession::close() when it's done doing so. Since sessions are
12968 serialization primitives much like ordinary mutexes, they are
12969 best used the same way: for each "open" call, there should be
12970 a matching "close" call, even when errors occur.
12971
12972 Otherwise, if a direct session for a machine opened with
12973 <link to="IVirtualBox::openSession"/> is not explicitly closed
12974 when the application terminates, the state of the machine will
12975 be set to <link to="MachineState_Aborted" /> on the server.
12976
12977 Generally, it is recommended to close all open sessions explicitly
12978 before terminating the application (regardless of the reason for
12979 the termination).
12980
12981 <note>
12982 Do not expect the session state (<link to="ISession::state" />
12983 to return to "Closed" immediately after you invoke
12984 ISession::close(), particularly if you have started a remote
12985 session to execute the VM in a new process. The session state will
12986 automatically return to "Closed" once the VM is no longer executing,
12987 which can of course take a very long time.
12988 </note>
12989
12990 <result name="E_UNEXPECTED">
12991 Session is not open.
12992 </result>
12993
12994 </desc>
12995 </method>
12996
12997 </interface>
12998
12999 <!--
13000 // IStorageController
13001 /////////////////////////////////////////////////////////////////////////
13002 -->
13003
13004 <enum
13005 name="StorageBus"
13006 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
13007 >
13008 <desc>
13009 The bus type of the storage controller (IDE, SATA, SCSI or Floppy);
13010 see <link to="IStorageController::bus" />.
13011 </desc>
13012 <const name="Null" value="0">
13013 <desc>@c null value. Never used by the API.</desc>
13014 </const>
13015 <const name="IDE" value="1"/>
13016 <const name="SATA" value="2"/>
13017 <const name="SCSI" value="3"/>
13018 <const name="Floppy" value="4"/>
13019 </enum>
13020
13021 <enum
13022 name="StorageControllerType"
13023 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
13024 >
13025 <desc>
13026 The exact variant of storage controller hardware presented
13027 to the guest; see <link to="IStorageController::controllerType" />.
13028 </desc>
13029
13030 <const name="Null" value="0">
13031 <desc>@c null value. Never used by the API.</desc>
13032 </const>
13033 <const name="LsiLogic" value="1">
13034 <desc>A SCSI controller of the LsiLogic variant.</desc>
13035 </const>
13036 <const name="BusLogic" value="2">
13037 <desc>A SCSI controller of the BusLogic variant.</desc>
13038 </const>
13039 <const name="IntelAhci" value="3">
13040 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
13041 </const>
13042 <const name="PIIX3" value="4">
13043 <desc>An IDE controller of the PIIX3 variant.</desc>
13044 </const>
13045 <const name="PIIX4" value="5">
13046 <desc>An IDE controller of the PIIX4 variant.</desc>
13047 </const>
13048 <const name="ICH6" value="6">
13049 <desc>An IDE controller of the ICH6 variant.</desc>
13050 </const>
13051 <const name="I82078" value="7">
13052 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
13053 </const>
13054 </enum>
13055
13056 <interface
13057 name="IStorageController" extends="$unknown"
13058 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
13059 wsmap="managed"
13060 >
13061 <desc>
13062 Represents a storage controller that is attached to a virtual machine
13063 (<link to="IMachine" />). Just as drives (hard disks, DVDs, FDs) are
13064 attached to storage controllers in a real computer, virtual drives
13065 (represented by <link to="IMediumAttachment" />) are attached to virtual
13066 storage controllers, represented by this interface.
13067
13068 As opposed to physical hardware, VirtualBox has a very generic concept
13069 of a storage controller, and for purposes of the Main API, all virtual
13070 storage is attached to virtual machines via instances of this interface.
13071 There are four types of such virtual storage controllers: IDE, SCSI, SATA
13072 and Floppy (see <link to="#bus" />). Depending on which of these four is
13073 used, certain sub-types may be available and can be selected in
13074 <link to="#controllerType" />.
13075
13076 Depending on these settings, the guest operating system might see
13077 significantly different virtual hardware.
13078 </desc>
13079
13080 <attribute name="name" type="wstring" readonly="yes">
13081 <desc>
13082 Name of the storage controller, as originally specified with
13083 <link to="IMachine::addStorageController" />. This then uniquely
13084 identifies this controller with other method calls such as
13085 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
13086 </desc>
13087 </attribute>
13088
13089 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
13090 <desc>
13091 Maximum number of devices which can be attached to one port.
13092 </desc>
13093 </attribute>
13094
13095 <attribute name="minPortCount" type="unsigned long" readonly="yes">
13096 <desc>
13097 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
13098 </desc>
13099 </attribute>
13100
13101 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
13102 <desc>
13103 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
13104 </desc>
13105 </attribute>
13106
13107 <attribute name="instance" type="unsigned long">
13108 <desc>
13109 The instance number of the device in the running VM.
13110 </desc>
13111 </attribute>
13112
13113 <attribute name="portCount" type="unsigned long">
13114 <desc>
13115 The number of currently usable ports on the controller.
13116 The minimum and maximum number of ports for one controller are
13117 stored in <link to="IStorageController::minPortCount"/>
13118 and <link to="IStorageController::maxPortCount"/>.
13119 </desc>
13120 </attribute>
13121
13122 <attribute name="bus" type="StorageBus" readonly="yes">
13123 <desc>
13124 The bus type of the storage controller (IDE, SATA, SCSI or Floppy).
13125 </desc>
13126 </attribute>
13127
13128 <attribute name="controllerType" type="StorageControllerType">
13129 <desc>
13130 The exact variant of storage controller hardware presented
13131 to the guest.
13132 Depending on this value, VirtualBox will provide a different
13133 virtual storage controller hardware to the guest.
13134 For SATA and floppy controllers, only one variant is available,
13135 but for IDE and SCSI, there are several.
13136
13137 For SCSI controllers, the default type is LsiLogic.
13138 </desc>
13139 </attribute>
13140
13141 <method name="GetIDEEmulationPort">
13142 <desc>
13143 Gets the corresponding port number which is emulated as an IDE device.
13144 Works only with SATA controllers.
13145
13146 <result name="E_INVALIDARG">
13147 The @a devicePosition is not in the range 0 to 3.
13148 </result>
13149 <result name="E_NOTIMPL">
13150 The storage controller type is not SATAIntelAhci.
13151 </result>
13152
13153 </desc>
13154 <param name="devicePosition" type="long" dir="in"/>
13155 <param name="portNumber" type="long" dir="return"/>
13156 </method>
13157
13158 <method name="SetIDEEmulationPort">
13159 <desc>
13160 Sets the 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 or the
13165 @a portNumber is not in the range 0 to 29.
13166 </result>
13167 <result name="E_NOTIMPL">
13168 The storage controller type is not SATAIntelAhci.
13169 </result>
13170
13171 </desc>
13172 <param name="devicePosition" type="long" dir="in"/>
13173 <param name="portNumber" type="long" dir="in"/>
13174 </method>
13175
13176 </interface>
13177
13178<if target="wsdl">
13179
13180 <!--
13181 // IManagedObjectRef
13182 /////////////////////////////////////////////////////////////////////////
13183 -->
13184
13185 <interface
13186 name="IManagedObjectRef" extends="$unknown"
13187 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
13188 internal="yes"
13189 wsmap="managed"
13190 wscpp="hardcoded"
13191 >
13192 <desc>
13193 Managed object reference.
13194
13195 Only within the webservice, a managed object reference (which is really
13196 an opaque number) allows a webservice client to address an object
13197 that lives in the address space of the webservice server.
13198
13199 Behind each managed object reference, there is a COM object that lives
13200 in the webservice server's address space. The COM object is not freed
13201 until the managed object reference is released, either by an explicit
13202 call to <link to="IManagedObjectRef::release" /> or by logging off from
13203 the webservice (<link to="IWebsessionManager::logoff" />), which releases
13204 all objects created during the webservice session.
13205
13206 Whenever a method call of the VirtualBox API returns a COM object, the
13207 webservice representation of that method will instead return a
13208 managed object reference, which can then be used to invoke methods
13209 on that object.
13210 </desc>
13211
13212 <method name="getInterfaceName">
13213 <desc>
13214 Returns the name of the interface that this managed object represents,
13215 for example, "IMachine", as a string.
13216 </desc>
13217 <param name="return" type="wstring" dir="return"/>
13218 </method>
13219
13220 <method name="release">
13221 <desc>
13222 Releases this managed object reference and frees the resources that
13223 were allocated for it in the webservice server process. After calling
13224 this method, the identifier of the reference can no longer be used.
13225 </desc>
13226 </method>
13227
13228 </interface>
13229
13230 <!--
13231 // IWebsessionManager
13232 /////////////////////////////////////////////////////////////////////////
13233 -->
13234
13235 <interface
13236 name="IWebsessionManager" extends="$unknown"
13237 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
13238 internal="yes"
13239 wsmap="global"
13240 wscpp="hardcoded"
13241 >
13242 <desc>
13243 Websession manager. This provides essential services
13244 to webservice clients.
13245 </desc>
13246 <method name="logon">
13247 <desc>
13248 Logs a new client onto the webservice and returns a managed object reference to
13249 the IVirtualBox instance, which the client can then use as a basis to further
13250 queries, since all calls to the VirtualBox API are based on the IVirtualBox
13251 interface, in one way or the other.
13252 </desc>
13253 <param name="username" type="wstring" dir="in"/>
13254 <param name="password" type="wstring" dir="in"/>
13255 <param name="return" type="IVirtualBox" dir="return"/>
13256 </method>
13257
13258 <method name="getSessionObject">
13259 <desc>
13260 Returns a managed object reference to the internal ISession object that was created
13261 for this web service session when the client logged on.
13262
13263 <see>ISession</see>
13264 </desc>
13265 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13266 <param name="return" type="ISession" dir="return"/>
13267 </method>
13268
13269 <method name="logoff">
13270 <desc>
13271 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
13272 and destroys all resources associated with the session (most importantly, all
13273 managed objects created in the server while the session was active).
13274 </desc>
13275 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13276 </method>
13277
13278 </interface>
13279
13280</if>
13281
13282 <!--
13283 // IPerformanceCollector & friends
13284 /////////////////////////////////////////////////////////////////////////
13285 -->
13286
13287 <interface
13288 name="IPerformanceMetric" extends="$unknown"
13289 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
13290 >
13291 <desc>
13292 The IPerformanceMetric interface represents parameters of the given
13293 performance metric.
13294 </desc>
13295
13296 <attribute name="metricName" type="wstring" readonly="yes">
13297 <desc>
13298 Name of the metric.
13299 </desc>
13300 </attribute>
13301
13302 <attribute name="object" type="$unknown" readonly="yes">
13303 <desc>
13304 Object this metric belongs to.
13305 </desc>
13306 </attribute>
13307
13308 <attribute name="description" type="wstring" readonly="yes">
13309 <desc>
13310 Textual description of the metric.
13311 </desc>
13312 </attribute>
13313
13314 <attribute name="period" type="unsigned long" readonly="yes">
13315 <desc>
13316 Time interval between samples, measured in seconds.
13317 </desc>
13318 </attribute>
13319
13320 <attribute name="count" type="unsigned long" readonly="yes">
13321 <desc>
13322 Number of recent samples retained by the performance collector for this
13323 metric.
13324
13325 When the collected sample count exceeds this number, older samples
13326 are discarded.
13327 </desc>
13328 </attribute>
13329
13330 <attribute name="unit" type="wstring" readonly="yes">
13331 <desc>
13332 Unit of measurement.
13333 </desc>
13334 </attribute>
13335
13336 <attribute name="minimumValue" type="long" readonly="yes">
13337 <desc>
13338 Minimum possible value of this metric.
13339 </desc>
13340 </attribute>
13341
13342 <attribute name="maximumValue" type="long" readonly="yes">
13343 <desc>
13344 Maximum possible value of this metric.
13345 </desc>
13346 </attribute>
13347 </interface>
13348
13349 <interface
13350 name="IPerformanceCollector" extends="$unknown"
13351 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
13352 wsmap="managed"
13353 >
13354 <desc>
13355 The IPerformanceCollector interface represents a service that collects and
13356 stores performance metrics data.
13357
13358 Performance metrics are associated with objects of interfaces like IHost and
13359 IMachine. Each object has a distinct set of performance metrics.
13360 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
13361
13362 Metric data is collected at the specified intervals and is retained
13363 internally. The interval and the number of retained samples can be set
13364 with <link to="IPerformanceCollector::setupMetrics" />.
13365
13366 Metrics are organized hierarchically, with each level separated by a
13367 slash (/) character. Generally, the scheme for metric names is like this:
13368
13369 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
13370
13371 "Category/Metric" together form the base metric name. A base metric is the
13372 smallest unit for which a sampling interval and the number of retained
13373 samples can be set. Only base metrics can be enabled and disabled. All
13374 sub-metrics are collected when their base metric is collected.
13375 Collected values for any set of sub-metrics can be queried with
13376 <link to="IPerformanceCollector::queryMetricsData" />.
13377
13378 For example "CPU/Load/User:avg"
13379 metric name stands for the "CPU" category, "Load" metric, "User" submetric,
13380 "average" aggregate. An aggregate function is computed over all retained
13381 data. Valid aggregate functions are:
13382
13383 <ul>
13384 <li>avg -- average</li>
13385 <li>min -- minimum</li>
13386 <li>max -- maximum</li>
13387 </ul>
13388
13389 When setting up
13390 metric parameters, querying metric data, enabling or disabling metrics
13391 wildcards can be used in metric names to specify a subset of metrics. For
13392 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
13393 averages can be queried using <tt>*:avg</tt> and so on. To query metric
13394 values without aggregates <tt>*:</tt> can be used.
13395
13396 The valid names for base metrics are:
13397
13398 <ul>
13399 <li>CPU/Load</li>
13400 <li>CPU/MHz</li>
13401 <li>RAM/Usage</li>
13402 </ul>
13403
13404 The general sequence for collecting and retrieving the metrics is:
13405 <ul>
13406 <li>
13407 Obtain an instance of IPerformanceCollector with
13408 <link to="IVirtualBox::performanceCollector" />
13409 </li>
13410 <li>
13411 Allocate and populate an array with references to objects the metrics
13412 will be collected for. Use references to IHost and IMachine objects.
13413 </li>
13414 <li>
13415 Allocate and populate an array with base metric names the data will be
13416 collected for.
13417 </li>
13418 <li>
13419 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
13420 metric data will be collected and stored.
13421 </li>
13422 <li>
13423 Wait for the data to get collected.
13424 </li>
13425 <li>
13426 Allocate and populate an array with references to objects the metric
13427 values will be queried for. You can re-use the object array used for
13428 setting base metrics.
13429 </li>
13430 <li>
13431 Allocate and populate an array with metric names the data will be
13432 collected for. Note that metric names differ from base metric names.
13433 </li>
13434 <li>
13435 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
13436 have been collected so far are returned. Note that the values are still
13437 retained internally and data collection continues.
13438 </li>
13439 </ul>
13440
13441 For an example of usage refer to the following files in VirtualBox SDK:
13442 <ul>
13443 <li>
13444 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13445 </li>
13446 <li>
13447 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13448 </li>
13449 </ul>
13450 </desc>
13451
13452 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13453 <desc>
13454 Array of unique names of metrics.
13455
13456 This array represents all metrics supported by the performance
13457 collector. Individual objects do not necessarily support all of them.
13458 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13459 list of supported metrics for a particular object.
13460 </desc>
13461 </attribute>
13462
13463 <method name="getMetrics">
13464 <desc>
13465 Returns parameters of specified metrics for a set of objects.
13466 <note>
13467 @c Null metrics array means all metrics. @c Null object array means
13468 all existing objects.
13469 </note>
13470 </desc>
13471 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13472 <desc>
13473 Metric name filter. Currently, only a comma-separated list of metrics
13474 is supported.
13475 </desc>
13476 </param>
13477 <param name="objects" type="$unknown" dir="in" safearray="yes">
13478 <desc>
13479 Set of objects to return metric parameters for.
13480 </desc>
13481 </param>
13482 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13483 <desc>
13484 Array of returned metric parameters.
13485 </desc>
13486 </param>
13487 </method>
13488
13489 <method name="setupMetrics">
13490 <desc>
13491 Sets parameters of specified base metrics for a set of objects. Returns
13492 an array of <link to="IPerformanceMetric" /> describing the metrics have
13493 been affected.
13494 <note>
13495 @c Null or empty metric name array means all metrics. @c Null or empty
13496 object array means all existing objects. If metric name array contains
13497 a single element and object array contains many, the single metric
13498 name array element is applied to each object array element to form
13499 metric/object pairs.
13500 </note>
13501 </desc>
13502 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13503 <desc>
13504 Metric name filter. Comma-separated list of metrics with wildcard
13505 support.
13506 </desc>
13507 </param>
13508 <param name="objects" type="$unknown" dir="in" safearray="yes">
13509 <desc>
13510 Set of objects to setup metric parameters for.
13511 </desc>
13512 </param>
13513 <param name="period" type="unsigned long" dir="in">
13514 <desc>
13515 Time interval in seconds between two consecutive samples of performance
13516 data.
13517 </desc>
13518 </param>
13519 <param name="count" type="unsigned long" dir="in">
13520 <desc>
13521 Number of samples to retain in performance data history. Older samples
13522 get discarded.
13523 </desc>
13524 </param>
13525 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13526 <desc>
13527 Array of metrics that have been modified by the call to this method.
13528 </desc>
13529 </param>
13530 </method>
13531
13532 <method name="enableMetrics">
13533 <desc>
13534 Turns on collecting specified base metrics. Returns an array of
13535 <link to="IPerformanceMetric" /> describing the metrics have been
13536 affected.
13537 <note>
13538 @c Null or empty metric name array means all metrics. @c Null or empty
13539 object array means all existing objects. If metric name array contains
13540 a single element and object array contains many, the single metric
13541 name array element is applied to each object array element to form
13542 metric/object pairs.
13543 </note>
13544 </desc>
13545 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13546 <desc>
13547 Metric name filter. Comma-separated list of metrics with wildcard
13548 support.
13549 </desc>
13550 </param>
13551 <param name="objects" type="$unknown" dir="in" safearray="yes">
13552 <desc>
13553 Set of objects to enable metrics for.
13554 </desc>
13555 </param>
13556 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13557 <desc>
13558 Array of metrics that have been modified by the call to this method.
13559 </desc>
13560 </param>
13561 </method>
13562
13563 <method name="disableMetrics">
13564 <desc>
13565 Turns off collecting specified base metrics. Returns an array of
13566 <link to="IPerformanceMetric" /> describing the metrics have been
13567 affected.
13568 <note>
13569 @c Null or empty metric name array means all metrics. @c Null or empty
13570 object array means all existing objects. If metric name array contains
13571 a single element and object array contains many, the single metric
13572 name array element is applied to each object array element to form
13573 metric/object pairs.
13574 </note>
13575 </desc>
13576 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13577 <desc>
13578 Metric name filter. Comma-separated list of metrics with wildcard
13579 support.
13580 </desc>
13581 </param>
13582 <param name="objects" type="$unknown" dir="in" safearray="yes">
13583 <desc>
13584 Set of objects to disable metrics for.
13585 </desc>
13586 </param>
13587 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13588 <desc>
13589 Array of metrics that have been modified by the call to this method.
13590 </desc>
13591 </param>
13592 </method>
13593
13594 <method name="queryMetricsData">
13595 <desc>
13596 Queries collected metrics data for a set of objects.
13597
13598 The data itself and related metric information are returned in seven
13599 parallel and one flattened array of arrays. Elements of
13600 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13601 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13602 the same index describe one set of values corresponding to a single
13603 metric.
13604
13605 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13606 start and length of a sub-array is indicated by
13607 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13608 value for metric <tt>metricNames[i]</tt> is at
13609 <tt>returnData[returnIndices[i]]</tt>.
13610
13611 <note>
13612 @c Null or empty metric name array means all metrics. @c Null or empty
13613 object array means all existing objects. If metric name array contains
13614 a single element and object array contains many, the single metric
13615 name array element is applied to each object array element to form
13616 metric/object pairs.
13617 </note>
13618 <note>
13619 Data collection continues behind the scenes after call to
13620 @c queryMetricsData. The return data can be seen as the snapshot of
13621 the current state at the time of @c queryMetricsData call. The
13622 internally kept metric values are not cleared by the call. This makes
13623 possible querying different subsets of metrics or aggregates with
13624 subsequent calls. If periodic querying is needed it is highly
13625 suggested to query the values with @c interval*count period to avoid
13626 confusion. This way a completely new set of data values will be
13627 provided by each query.
13628 </note>
13629 </desc>
13630 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13631 <desc>
13632 Metric name filter. Comma-separated list of metrics with wildcard
13633 support.
13634 </desc>
13635 </param>
13636 <param name="objects" type="$unknown" dir="in" safearray="yes">
13637 <desc>
13638 Set of objects to query metrics for.
13639 </desc>
13640 </param>
13641 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13642 <desc>
13643 Names of metrics returned in @c returnData.
13644 </desc>
13645 </param>
13646 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13647 <desc>
13648 Objects associated with metrics returned in @c returnData.
13649 </desc>
13650 </param>
13651 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13652 <desc>
13653 Units of measurement for each returned metric.
13654 </desc>
13655 </param>
13656 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13657 <desc>
13658 Divisor that should be applied to return values in order to get
13659 floating point values. For example:
13660 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13661 will retrieve the floating point value of i-th sample of the first
13662 metric.
13663 </desc>
13664 </param>
13665 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13666 <desc>
13667 Sequence numbers of the first elements of value sequences of particular metrics
13668 returned in @c returnData. For aggregate metrics it is the sequence number of
13669 the sample the aggregate started calculation from.
13670 </desc>
13671 </param>
13672 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13673 <desc>
13674 Indices of the first elements of value sequences of particular metrics
13675 returned in @c returnData.
13676 </desc>
13677 </param>
13678 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13679 <desc>
13680 Lengths of value sequences of particular metrics.
13681 </desc>
13682 </param>
13683 <param name="returnData" type="long" dir="return" safearray="yes">
13684 <desc>
13685 Flattened array of all metric data containing sequences of values for
13686 each metric.
13687 </desc>
13688 </param>
13689 </method>
13690
13691 </interface>
13692
13693 <module name="VBoxSVC" context="LocalServer">
13694 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13695 namespace="virtualbox.org">
13696 <interface name="IVirtualBox" default="yes"/>
13697 </class>
13698 </module>
13699
13700 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13701 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
13702 namespace="virtualbox.org">
13703 <interface name="ISession" default="yes"/>
13704 </class>
13705 <class name="CallbackWrapper" uuid="49EE8561-5563-4715-B18C-A4B1A490DAFE"
13706 namespace="virtualbox.org">
13707 <interface name="ILocalOwner" default="yes"/>
13708 <interface name="IVirtualBoxCallback"/>
13709 <interface name="IConsoleCallback"/>
13710 </class>
13711 </module>
13712
13713</library>
13714
13715</idl>
13716
13717<!-- 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