VirtualBox

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

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

LsiLogic: Add SAS support for Main and Frontends

  • Property svn:eol-style set to native
File size: 505.3 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * :tabSize=2:indentSize=2:noTabs=true:
5 * :folding=explicit:collapseFolds=1:
6 *
7 * Master declaration for VirtualBox's Main API, represented
8 * by COM/XPCOM and web service interfaces.
9 *
10 * From this document, the build system generates several files
11 * via XSLT that are then used during the build process.
12 *
13 * Below is the list of XSL templates that operate on this file and
14 * output files they generate. These XSL templates must be updated
15 * whenever the schema of this file changes:
16 *
17 * 1. src/VBox/Main/idl/midl.xsl =>
18 * out/<platform>/bin/sdk/idl/VirtualBox.idl
19 * (MS COM interface definition file for Main API)
20 *
21 * 2. src/VBox/Main/idl/xpidl.xsl =>
22 * out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
23 * (XPCOM interface definition file for Main API)
24 *
25 * 3. src/VBox/Main/idl/doxygen.xsl =>
26 * out/<platform>/obj/src/VBox/Main/VirtualBox.idl
27 * (pseudo-IDL for Doxygen to generate the official Main API
28 * documentation)
29 *
30 * 4. src/VBox/Main/webservice/*.xsl =>
31 * a bunch of WSDL and C++ files
32 * (VirtualBox web service sources and SOAP mappers;
33 * see src/VBox/Main/webservice/Makefile.kmk for details)
34 *
35 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
36 * out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
37 * (smart Qt-based C++ wrapper classes for COM interfaces
38 * of the Main API)
39 *
40 * 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
41 * out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
42 * (Main API TypeLib block for the WiX installer)
43 *
44 * 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
45 * out/<platform>/obj/Runtime/errmsgvboxcomdata.h
46 * (<result> extraction for the %Rhrc format specifier)
47 *
48 Copyright (C) 2006-2009 Sun Microsystems, Inc.
49
50 This file is part of VirtualBox Open Source Edition (OSE), as
51 available from http://www.virtualbox.org. This file is free software;
52 you can redistribute it and/or modify it under the terms of the GNU
53 General Public License (GPL) as published by the Free Software
54 Foundation, in version 2 as it comes in the "COPYING" file of the
55 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
56 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
57
58 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
59 Clara, CA 95054 USA or visit http://www.sun.com if you need
60 additional information or have any questions.
61-->
62
63<idl>
64
65<desc>
66 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
67 describes the so-called <i>VirtualBox Main API</i> which comprises all public
68 COM interfaces and components provided by the VirtualBox server and by the
69 VirtualBox client library.
70
71 VirtualBox employs a client-server design, meaning that whenever any part of
72 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
73 interface or any virtual machine --, a dedicated server process named
74 VBoxSVC runs in the background. This allows multiple processes working with
75 VirtualBox to cooperate without conflicts. These processes communicate to each
76 other using inter-process communication facilities provided by the COM
77 implementation of the host computer.
78
79 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
80 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
81 implementation, is used.
82
83 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
84 the VBoxManage command-line interface and the VBoxVRDP server) are technically
85 front-ends to the Main API and only use the interfaces that are documented
86 in this Main API documentation. This ensures that, with any given release
87 version of VirtualBox, all capabilities of the product that could be useful
88 to an external client program are always exposed by way of this API.
89
90 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
91 contains two public component classes:
92 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
93 implement IVirtualBox and ISession interfaces respectively. These two classes
94 are of supreme importance and will be needed in order for any front-end
95 program to do anything useful. It is recommended to read the documentation of
96 the mentioned interfaces first.
97
98 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
99 there can be only one object of this class on the local machine at any given
100 time. This object is a parent of many other objects in the VirtualBox COM
101 library and lives in the VBoxSVC process. In fact, when you create an instance
102 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
103 process is already running, starts it if not, and returns you a reference to
104 the <tt>VirtualBox</tt> object created in this process. When the last reference
105 to this object is released, the VBoxSVC process ends (with a 5 second delay to
106 protect from too frequent restarts).
107
108 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
109 as many <tt>Session</tt> objects as you need but all of them will live in a
110 process which issues the object instantiation call. <tt>Session</tt> objects
111 represent virtual machine sessions which are used to configure virtual
112 machines and control their execution.
113</desc>
114
115<if target="midl">
116 <cpp line="enum {"/>
117 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
118 <cpp line=" kTypeLibraryMinorVersion = 0"/>
119 <cpp line="};"/>
120</if>
121
122<if target="xpidl">
123 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
124 <cpp>
125/* currently, nsISupportsImpl.h lacks the below-like macros */
126
127#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
128#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
129#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI NS_IMPL_QUERY_INTERFACE3_CI
130
131#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
132# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
133 NS_IMPL_THREADSAFE_ADDREF(_class) \
134 NS_IMPL_THREADSAFE_RELEASE(_class) \
135 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
136 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
137#endif
138
139#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
140# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
141 NS_IMPL_THREADSAFE_ADDREF(_class) \
142 NS_IMPL_THREADSAFE_RELEASE(_class) \
143 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
144 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
145#endif
146
147#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_CI
148# define NS_IMPL_THREADSAFE_ISUPPORTS3_CI(_class, _i1, _i2, _i3) \
149 NS_IMPL_THREADSAFE_ADDREF(_class) \
150 NS_IMPL_THREADSAFE_RELEASE(_class) \
151 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI(_class, _i1, _i2, _i3) \
152 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
153#endif
154
155#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
156# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
157 NS_INTERFACE_MAP_BEGIN(_class) \
158 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
159 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
160 NS_IMPL_QUERY_CLASSINFO(_class) \
161 NS_INTERFACE_MAP_END
162#endif
163
164#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
165# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
166 _i2, _ic2) \
167 NS_INTERFACE_MAP_BEGIN(_class) \
168 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
169 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
170 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
171 NS_IMPL_QUERY_CLASSINFO(_class) \
172 NS_INTERFACE_MAP_END
173#endif
174
175#ifndef NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
176# define NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
177 _i2, _ic2, _i3, _ic3) \
178 NS_INTERFACE_MAP_BEGIN(_class) \
179 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
180 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
181 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i3, _ic3) \
182 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
183 NS_IMPL_QUERY_CLASSINFO(_class) \
184 NS_INTERFACE_MAP_END
185#endif
186
187#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
188#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
189#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
190
191#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
192# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
193 NS_IMPL_THREADSAFE_ADDREF(_class) \
194 NS_IMPL_THREADSAFE_RELEASE(_class) \
195 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
196 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
197#endif
198
199#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
200# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
201 _i2, _ic2) \
202 NS_IMPL_THREADSAFE_ADDREF(_class) \
203 NS_IMPL_THREADSAFE_RELEASE(_class) \
204 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
205 _i2, _ic2) \
206 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
207#endif
208
209#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI
210# define NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI(_class, _i1, _ic1, \
211 _i2, _ic2, _i3, _ic3) \
212 NS_IMPL_THREADSAFE_ADDREF(_class) \
213 NS_IMPL_THREADSAFE_RELEASE(_class) \
214 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
215 _i2, _ic2, _i3, _ic3) \
216 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
217#endif
218
219 </cpp>
220</if>
221
222<library
223 name="VirtualBox"
224 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
225 version="1.3"
226 desc="VirtualBox Type Library"
227 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
228 supportsErrorInfo="yes"
229>
230
231
232 <!--
233 // COM result codes for VirtualBox
234 /////////////////////////////////////////////////////////////////////////
235 -->
236
237 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
238 <desc>
239 This section describes all VirtualBox-specific COM result codes that may
240 be returned by methods of VirtualBox COM interfaces in addition to
241 standard COM result codes.
242
243 Note that along with the result code, every VirtualBox method returns
244 extended error information through the IVirtualBoxErrorInfo interface on
245 failure. This interface is a preferred way to present the error to the end
246 user because it contains a human readable description of the error. Raw
247 result codes, both standard and described in this section, are intended to
248 be used by programs to analyze the reason of a failure and select an
249 appropriate course of action without involving the end user (for example,
250 retry the operation later or make a different call).
251
252 The standard COM result codes that may originate from our methods include:
253
254 <table>
255 <tr><td>E_INVALIDARG</td>
256 <td>
257 Returned when the value of the method's argument is not within the range
258 of valid values. This should not be confused with situations when the
259 value is within the range but simply doesn't suit the current object
260 state and there is a possibility that it will be accepted later (in such
261 cases VirtualBox-specific codes are returned, for example,
262 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
263 </td>
264 </tr>
265 <tr><td>E_POINTER</td>
266 <td>
267 Returned if a memory pointer for the output argument is invalid (for
268 example, @c null). Note that when pointers representing input
269 arguments (such as strings) are invalid, E_INVALIDARG is returned.
270 </td>
271 </tr>
272 <tr><td>E_ACCESSDENIED</td>
273 <td>
274 Returned when the called object is not ready. Since the lifetime of a
275 public COM object cannot be fully controlled by the implementation,
276 VirtualBox maintains the readiness state for all objects it creates and
277 returns this code in response to any method call on the object that was
278 deactivated by VirtualBox and is not functioning any more.
279 </td>
280 </tr>
281 <tr><td>E_OUTOFMEMORY</td>
282 <td>
283 Returned when a memory allocation operation fails.
284 </td>
285 </tr>
286 </table>
287 </desc>
288 </descGroup>
289
290 <!--
291 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
292 everything in <result>/<desc> after (and including) the first dot, so express
293 the matter of the error code in the first sentence and keep it short.
294 -->
295
296 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
297 <desc>
298 Object corresponding to the supplied arguments does not exist.
299 </desc>
300 </result>
301
302 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
303 <desc>
304 Current virtual machine state prevents the operation.
305 </desc>
306 </result>
307
308 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
309 <desc>
310 Virtual machine error occurred attempting the operation.
311 </desc>
312 </result>
313
314 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
315 <desc>
316 File not accessible or erroneous file contents.
317 </desc>
318 </result>
319
320 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
321 <desc>
322 Runtime subsystem error.
323 </desc>
324 </result>
325
326 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
327 <desc>
328 Pluggable Device Manager error.
329 </desc>
330 </result>
331
332 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
333 <desc>
334 Current object state prohibits operation.
335 </desc>
336 </result>
337
338 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
339 <desc>
340 Host operating system related error.
341 </desc>
342 </result>
343
344 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
345 <desc>
346 Requested operation is not supported.
347 </desc>
348 </result>
349
350 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
351 <desc>
352 Invalid XML found.
353 </desc>
354 </result>
355
356 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
357 <desc>
358 Current session state prohibits operation.
359 </desc>
360 </result>
361
362 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
363 <desc>
364 Object being in use prohibits operation.
365 </desc>
366 </result>
367
368 <!--
369 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
370 everything in <result>/<desc> after (and including) the first dot, so express
371 the matter of the error code in the first sentence and keep it short.
372 -->
373
374 <descGroup/>
375
376 <!--
377 // all common enums
378 /////////////////////////////////////////////////////////////////////////
379 -->
380
381 <enum name="SettingsVersion"
382 uuid="52bd6f5f-1adb-4493-975d-581a9c4b803f"
383 >
384 <desc>Settings version of VirtualBox settings files. This is written to
385 the "version" attribute of the root "VirtualBox" element in the settings
386 file XML and indicates which VirtualBox version wrote the file.
387 </desc>
388
389 <const name="Null" value="0">
390 <desc>Null value, indicates invalid version.</desc>
391 </const>
392 <const name="v1_0" value="1">
393 <desc>Legacy settings version, not currently supported.</desc>
394 </const>
395 <const name="v1_1" value="2">
396 <desc>Legacy settings version, not currently supported.</desc>
397 </const>
398 <const name="v1_2" value="3">
399 <desc>Legacy settings version, not currently supported.</desc>
400 </const>
401 <const name="v1_3pre" value="4">
402 <desc>Legacy settings version, not currently supported.</desc>
403 </const>
404 <const name="v1_3" value="5">
405 <desc>Settings version "1.3", written by VirtualBox 2.0.12.</desc>
406 <!--
407 Machine XML: Capitalization of Uart, Lpt elements and many attributes changed.
408 -->
409 </const>
410 <const name="v1_4" value="6">
411 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
412 <!--
413 VirtualBox.xml: big DiskRegistry -> MediaRegistry revamp, various HardDisk types merged
414 (was VirtualDiskImage, VMDKImage, VHDImage, ISCSIHardDisk, CustomHardDisk, DiffHardDisk)
415 -->
416 </const>
417 <const name="v1_5" value="7">
418 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
419 <!-- 2008-09-04: 2.0.0 released
420 2008-11-20: settings version 1.5 introduced
421 2008-12-17: 2.1.0 released
422 Machine changes:
423 guest OS identifiers changed;
424 Machine/Hardware/Display/MonitorCount renamed to monitorCount;
425 Machine/Hardware/Display/Accelerate3D renamed to accelerate3D;
426 Machine/Hardware/CPU/CPUCount/@count changed to CPU/@count
427 -->
428 </const>
429 <const name="v1_6" value="8">
430 <desc>Settings version "1.6", written by VirtualBox 2.1.4 (at least).</desc>
431 <!-- 2008-12-17: 2.1.0 released
432 2008-12-19: settings version 1.6 introduced (is in 2.1 branch)
433 2009-04-08: 2.2.0 released
434 Machine changes: remove all Machine/Hardware/Network/Adapter/HostInterface[@TAPSetup or @TAPTerminate]/ attributes (done)
435 -->
436 </const>
437 <const name="v1_7" value="9">
438 <desc>Settings version "1.7", written by VirtualBox 2.2.x and 3.0.x.</desc>
439 <!-- 2008-12-17: 2.1.0 released
440 2009-03-11: settings version 1.7 introduced (is in 2.2 branch)
441 2009-04-08: 2.2.0 released
442 VirtualBox.xml additions: NetserviceRegistry with DHCPServers (done)
443 Machine changes: HardDiskAttachments is now StorageControllers (done)
444 -->
445 </const>
446 <const name="v1_8" value="10">
447 <desc>Intermediate settings version "1.8", understood by VirtualBox 3.1.x.</desc>
448 <!-- Machine additions: Display/@accelerate2DVideo (done)
449 -->
450 </const>
451 <const name="v1_9" value="11">
452 <desc>Settings version "1.9", written by VirtualBox 3.1.x.</desc>
453 <!-- The big storage controller / DVD / Floppy rework (done)
454 -->
455 </const>
456 <const name="Future" value="12">
457 <desc>Settings version greater than "1.9", written by a future VirtualBox version.</desc>
458 </const>
459 </enum>
460
461 <enum
462 name="AccessMode"
463 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
464 >
465 <desc>
466 Access mode for opening files.
467 </desc>
468
469 <const name="ReadOnly" value="1"/>
470 <const name="ReadWrite" value="2"/>
471 </enum>
472
473 <enum
474 name="MachineState"
475 uuid="36518cf6-cdf0-4d0d-ad2a-5ee9c60c7494"
476 >
477 <desc>
478 Virtual machine execution state.
479
480 This enumeration represents possible values of the <link
481 to="IMachine::state"/> attribute.
482
483 Below is the basic virtual machine state diagram. It shows how the state
484 changes during virtual machine execution. The text in square braces shows
485 a method of the IConsole interface that performs the given state
486 transition.
487
488 <pre>
489 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
490 V |
491 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
492 | | | | V |
493 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
494 | | ^ | ^ |
495 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
496 | ^ | | | |
497 | | +-----------------------------------------+-|-------------------+ +
498 | | | | |
499 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
500 | | | |
501 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
502 | | |
503 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
504 </pre>
505
506 Note that states to the right from PoweredOff, Aborted and Saved in the
507 above diagram are called <i>online VM states</i>. These states
508 represent the virtual machine which is being executed in a dedicated
509 process (usually with a GUI window attached to it where you can see the
510 activity of the virtual machine and interact with it). There are two
511 special pseudo-states, FirstOnline and LastOnline, that can be used in
512 relational expressions to detect if the given machine state is online or
513 not:
514
515 <pre>
516 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
517 machine.GetState() &lt;= MachineState_LastOnline)
518 {
519 ...the machine is being executed...
520 }
521 </pre>
522
523 When the virtual machine is in one of the online VM states (that is, being
524 executed), only a few machine settings can be modified. Methods working
525 with such settings contain an explicit note about that. An attempt to
526 change any oter setting or perform a modifying operation during this time
527 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
528
529 All online states except Running, Paused and Stuck are transitional: they
530 represent temporary conditions of the virtual machine that will last as
531 long as the operation that initiated such a condition.
532
533 The Stuck state is a special case. It means that execution of the machine
534 has reached the "Guru Meditation" condition. This condition indicates an
535 internal VMM (virtual machine manager) failure which may happen as a
536 result of either an unhandled low-level virtual hardware exception or one
537 of the recompiler exceptions (such as the <i>too-many-traps</i>
538 condition).
539
540 Note also that any online VM state may transit to the Aborted state. This
541 happens if the process that is executing the virtual machine terminates
542 unexpectedly (for example, crashes). Other than that, the Aborted state is
543 equivalent to PoweredOff.
544
545 There are also a few additional state diagrams that do not deal with
546 virtual machine execution and therefore are shown separately. The states
547 shown on these diagrams are called <i>offline VM states</i> (this includes
548 PoweredOff, Aborted and Saved too).
549
550 The first diagram shows what happens when a lengthy setup operation is
551 being executed (such as <link to="IMachine::attachDevice"/>).
552
553 <pre>
554 +----------------------------------(same state as before the call)------+
555 | |
556 +-&gt; PoweredOff --+ |
557 | | |
558 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
559 | |
560 +-&gt; Saved -------+
561 </pre>
562
563 The next two diagrams demonstrate the process of taking a snapshot of a
564 powered off virtual machine and performing one of the "discard..."
565 operations, respectively.
566
567 <pre>
568 +----------------------------------(same state as before the call)------+
569 | |
570 +-&gt; PoweredOff --+ |
571 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
572 +-&gt; Aborted -----+
573
574 +-&gt; PoweredOff --+
575 | |
576 | Aborted -----+--&gt;[restoreSnapshot() ]-------&gt; RestoringSnapshot -+
577 | | [deleteSnapshot() ]-------&gt; DeletingSnapshot --+
578 +-&gt; Saved -------+ |
579 | |
580 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
581 </pre>
582
583 Note that the Saving state is present in both the offline state group and
584 online state group. Currently, the only way to determine what group is
585 assumed in a particular case is to remember the previous machine state: if
586 it was Running or Paused, then Saving is an online state, otherwise it is
587 an offline state. This inconsistency may be removed in one of the future
588 versions of VirtualBox by adding a new state.
589
590 <note internal="yes">
591 For whoever decides to touch this enum: In order to keep the
592 comparisons involving FirstOnline and LastOnline pseudo-states valid,
593 the numeric values of these states must be correspondingly updated if
594 needed: for any online VM state, the condition
595 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
596 @c true. The same relates to transient states for which
597 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
598 @c true.
599 </note>
600 </desc>
601
602 <const name="Null" value="0">
603 <desc>Null value (never used by the API).</desc>
604 </const>
605 <const name="PoweredOff" value="1">
606 <desc>
607 The machine is not running and has no saved execution state; it has
608 either never been started or been shut down successfully.
609 </desc>
610 </const>
611 <const name="Saved" value="2">
612 <desc>
613 The machine is not currently running, but the execution state of the machine
614 has been saved to an external file when it was running, from where
615 it can be resumed.
616 </desc>
617 </const>
618 <const name="Teleported" value="3">
619 <desc>
620 The machine was teleported to a different host (or process) and then
621 powered off. Take care when powering it on again may corrupt resources
622 it shares with the teleportation target (e.g. disk and network).
623 </desc>
624 </const>
625 <const name="Aborted" value="4">
626 <desc>
627 The process running the machine has terminated abnormally. This may
628 indicate a crash of the VM process in host execution context, or
629 the VM process has been terminated externally.
630 </desc>
631 </const>
632 <const name="Running" value="5">
633 <desc>
634 The machine is currently being executed.
635 <note internal="yes">
636 For whoever decides to touch this enum: In order to keep the
637 comparisons in the old source code valid, this state must immediately
638 precede the Paused state.
639 TODO: Lift this spectacularly wonderful restriction.
640 </note>
641 </desc>
642 </const>
643 <const name="Paused" value="6">
644 <desc>
645 Execution of the machine has been paused.
646 <note internal="yes">
647 For whoever decides to touch this enum: In order to keep the
648 comparisons in the old source code valid, this state must immediately
649 follow the Running state.
650 TODO: Lift this spectacularly wonderful restriction.
651 </note>
652 </desc>
653 </const>
654 <const name="Stuck" value="7">
655 <desc>
656 Execution of the machine has reached the "Guru Meditation"
657 condition. This indicates a severe error in the hypervisor itself.
658 <note internal="yes">
659 bird: Why this uncool name? Could we rename it to "GuruMeditation" or
660 "Guru", perhaps? Or are there some other VMM states that are
661 intended to be lumped in here as well?
662 </note>
663 </desc>
664 </const>
665 <const name="Teleporting" value="8">
666 <desc>
667 The machine is about to be teleported to a different host or process.
668 It is possible to pause a machine in this state, but it will go to the
669 <link to="MachineState::PausedTeleporting"/> state and it will not be
670 possible to resume it again unless the teleportation fails.
671 </desc>
672 </const>
673 <const name="LiveSnapshotting" value="9">
674 <desc>
675 A live snapshot is being taken. The machine is running normally, but
676 some of the runtime configuration options are inaccessible. Also, if
677 paused while in this state it will transition to
678 <link to="MachineState::Saving"/> and it will not be resume the
679 execution until the snapshot operation has completed.
680 </desc>
681 </const>
682 <const name="Starting" value="10">
683 <desc>
684 Machine is being started after powering it on from a
685 zero execution state.
686 </desc>
687 </const>
688 <const name="Stopping" value="11">
689 <desc>
690 Machine is being normally stopped powering it off, or after the guest OS
691 has initiated a shutdown sequence.
692 </desc>
693 </const>
694 <const name="Saving" value="12">
695 <desc>
696 Machine is saving its execution state to a file, or an online
697 snapshot of the machine is being taken.
698 </desc>
699 </const>
700 <const name="Restoring" value="13">
701 <desc>
702 Execution state of the machine is being restored from a file
703 after powering it on from the saved execution state.
704 </desc>
705 </const>
706 <const name="TeleportingPausedVM" value="14">
707 <desc>
708 The machine is being teleported to another host or process, but it is
709 not running. This is the paused variant of the
710 <link to="MachineState::Teleporting"/> state.
711 </desc>
712 </const>
713 <const name="TeleportingIn" value="15">
714 <desc>
715 Teleporting the machine state in from another host or process.
716 </desc>
717 </const>
718 <const name="RestoringSnapshot" value="16">
719 <desc>
720 A machine snapshot is being restored; this typically does not take long.
721 </desc>
722 </const>
723 <const name="DeletingSnapshot" value="17">
724 <desc>
725 A machine snapshot is being deleted; this can take a long time since this
726 may require merging differencing media.
727 </desc>
728 </const>
729 <const name="SettingUp" value="18">
730 <desc>
731 Lengthy setup operation is in progress.
732 </desc>
733 </const>
734
735 <const name="FirstOnline" value="5" wsmap="suppress"> <!-- Running -->
736 <desc>
737 Pseudo-state: first online state (for use in relational expressions).
738 </desc>
739 </const>
740 <const name="LastOnline" value="13" wsmap="suppress"> <!-- TeleportingIn -->
741 <desc>
742 Pseudo-state: last online state (for use in relational expressions).
743 </desc>
744 </const>
745
746 <const name="FirstTransient" value="8" wsmap="suppress"> <!-- Teleporting -->
747 <desc>
748 Pseudo-state: first transient state (for use in relational expressions).
749 </desc>
750 </const>
751 <const name="LastTransient" value="18" wsmap="suppress"> <!-- SettingUp -->
752 <desc>
753 Pseudo-state: last transient state (for use in relational expressions).
754 </desc>
755 </const>
756
757 </enum>
758
759 <enum
760 name="SessionState"
761 uuid="cf2700c0-ea4b-47ae-9725-7810114b94d8"
762 >
763 <desc>
764 Session state. This enumeration represents possible values of
765 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
766 attributes. See individual enumerator descriptions for the meaning for
767 every value.
768 </desc>
769
770 <const name="Null" value="0">
771 <desc>Null value (never used by the API).</desc>
772 </const>
773 <const name="Closed" value="1">
774 <desc>
775 The machine has no open sessions (<link to="IMachine::sessionState"/>);
776 the session is closed (<link to="ISession::state"/>)
777 </desc>
778 </const>
779 <const name="Open" value="2">
780 <desc>
781 The machine has an open direct session (<link to="IMachine::sessionState"/>);
782 the session is open (<link to="ISession::state"/>)
783 </desc>
784 </const>
785 <const name="Spawning" value="3">
786 <desc>
787 A new (direct) session is being opened for the machine as a result of
788 <link to="IVirtualBox::openRemoteSession"/> call
789 (<link to="IMachine::sessionState"/> or <link to="ISession::state"/>).
790 This state also occurs as a short transient state when a new direct
791 session is opened by calling <link to="IVirtualBox::openSession"/>.
792 </desc>
793 </const>
794 <const name="Closing" value="4">
795 <desc>
796 The direct session is being closed (<link to="IMachine::sessionState"/>);
797 the session is being closed (<link to="ISession::state"/>)
798 </desc>
799 </const>
800 </enum>
801
802 <enum
803 name="CpuPropertyType"
804 uuid="af7bb668-eeb1-4404-b77f-a114b30c92d6"
805 >
806 <desc>
807 Virtual CPU property type. This enumeration represents possible values of the
808 IMachine get- and setCpuProperty methods.
809 </desc>
810 <const name="Null" value="0">
811 <desc>Null value (never used by the API).</desc>
812 </const>
813 <const name="PAE" value="1">
814 <desc>
815 This setting determines whether VirtualBox will expose the Physical Address
816 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
817 is not available, it will not be reported.
818 </desc>
819 </const>
820 <const name="Synthetic" value="2">
821 <desc>
822 This setting determines whether VirtualBox will expose a synthetic CPU to the guest to allow
823 teleporting between host systems that differ significantly.
824 </desc>
825 </const>
826 </enum>
827
828
829 <enum
830 name="HWVirtExPropertyType"
831 uuid="ce81dfdd-d2b8-4a90-bbea-40ee8b7ffcee"
832 >
833 <desc>
834 Hardware virtualization property type. This enumeration represents possible values
835 for the <link to="IMachine::getHWVirtExProperty"/> and
836 <link to="IMachine::setHWVirtExProperty"/> methods.
837 </desc>
838 <const name="Null" value="0">
839 <desc>Null value (never used by the API).</desc>
840 </const>
841 <const name="Enabled" value="1">
842 <desc>
843 Whether hardware virtualization (VT-x/AMD-V) is enabled at all. If
844 such extensions are not available, they will not be used.
845 </desc>
846 </const>
847 <const name="Exclusive" value="2">
848 <desc>
849 Whether hardware virtualization is used exclusively by VirtualBox. When enabled,
850 VirtualBox assumes it can acquire full and exclusive access to the VT-x or AMD-V
851 feature of the host. To share these with other hypervisors, you must disable this property.
852 </desc>
853 </const>
854 <const name="VPID" value="3">
855 <desc>
856 Whether VT-x VPID is enabled. If this extension is not available, it will not be used.
857 </desc>
858 </const>
859 <const name="NestedPaging" value="4">
860 <desc>
861 Whether Nested Paging is enabled. If this extension is not available, it will not be used.
862 </desc>
863 </const>
864 </enum>
865
866 <enum
867 name="SessionType"
868 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
869 >
870 <desc>
871 Session type. This enumeration represents possible values of the
872 <link to="ISession::type"/> attribute.
873 </desc>
874
875 <const name="Null" value="0">
876 <desc>Null value (never used by the API).</desc>
877 </const>
878 <const name="Direct" value="1">
879 <desc>
880 Direct session
881 (opened by <link to="IVirtualBox::openSession"/>)
882 </desc>
883 </const>
884 <const name="Remote" value="2">
885 <desc>
886 Remote session
887 (opened by <link to="IVirtualBox::openRemoteSession"/>)
888 </desc>
889 </const>
890 <const name="Existing" value="3">
891 <desc>
892 Existing session
893 (opened by <link to="IVirtualBox::openExistingSession"/>)
894 </desc>
895 </const>
896 </enum>
897
898 <enum
899 name="DeviceType"
900 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
901 >
902 <desc>
903 Device type.
904 </desc>
905 <const name="Null" value="0">
906 <desc>
907 Null value, may also mean "no device" (not allowed for
908 <link to="IConsole::getDeviceActivity"/>).
909 </desc>
910 </const>
911 <const name="Floppy" value="1">
912 <desc>Floppy device.</desc>
913 </const>
914 <const name="DVD" value="2">
915 <desc>CD/DVD-ROM device.</desc>
916 </const>
917 <const name="HardDisk" value="3">
918 <desc>Hard disk device.</desc>
919 </const>
920 <const name="Network" value="4">
921 <desc>Network device.</desc>
922 </const>
923 <const name="USB" value="5">
924 <desc>USB device.</desc>
925 </const>
926 <const name="SharedFolder" value="6">
927 <desc>Shared folder device.</desc>
928 </const>
929 </enum>
930
931 <enum
932 name="DeviceActivity"
933 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
934 >
935 <desc>
936 Device activity for <link to="IConsole::getDeviceActivity"/>.
937 </desc>
938
939 <const name="Null" value="0"/>
940 <const name="Idle" value="1"/>
941 <const name="Reading" value="2"/>
942 <const name="Writing" value="3"/>
943 </enum>
944
945 <enum
946 name="ClipboardMode"
947 uuid="33364716-4008-4701-8f14-be0fa3d62950"
948 >
949 <desc>
950 Host-Guest clipboard interchange mode.
951 </desc>
952
953 <const name="Disabled" value="0"/>
954 <const name="HostToGuest" value="1"/>
955 <const name="GuestToHost" value="2"/>
956 <const name="Bidirectional" value="3"/>
957 </enum>
958
959 <enum
960 name="Scope"
961 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
962 >
963 <desc>
964 Scope of the operation.
965
966 A generic enumeration used in various methods to define the action or
967 argument scope.
968 </desc>
969
970 <const name="Global" value="0"/>
971 <const name="Machine" value="1"/>
972 <const name="Session" value="2"/>
973 </enum>
974
975 <enum
976 name="GuestStatisticType"
977 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
978 >
979 <desc>
980 Statistics type for <link to="IGuest::getStatistic"/>.
981 </desc>
982
983 <const name="CPULoad_Idle" value="0">
984 <desc>
985 Idle CPU load (0-100%) for last interval.
986 </desc>
987 </const>
988 <const name="CPULoad_Kernel" value="1">
989 <desc>
990 Kernel CPU load (0-100%) for last interval.
991 </desc>
992 </const>
993 <const name="CPULoad_User" value="2">
994 <desc>
995 User CPU load (0-100%) for last interval.
996 </desc>
997 </const>
998 <const name="Threads" value="3">
999 <desc>
1000 Total number of threads in the system.
1001 </desc>
1002 </const>
1003 <const name="Processes" value="4">
1004 <desc>
1005 Total number of processes in the system.
1006 </desc>
1007 </const>
1008 <const name="Handles" value="5">
1009 <desc>
1010 Total number of handles in the system.
1011 </desc>
1012 </const>
1013 <const name="MemoryLoad" value="6">
1014 <desc>
1015 Memory load (0-100%).
1016 </desc>
1017 </const>
1018 <const name="PhysMemTotal" value="7">
1019 <desc>
1020 Total physical memory in megabytes.
1021 </desc>
1022 </const>
1023 <const name="PhysMemAvailable" value="8">
1024 <desc>
1025 Free physical memory in megabytes.
1026 </desc>
1027 </const>
1028 <const name="PhysMemBalloon" value="9">
1029 <desc>
1030 Ballooned physical memory in megabytes.
1031 </desc>
1032 </const>
1033 <const name="MemCommitTotal" value="10">
1034 <desc>
1035 Total amount of memory in the committed state in megabytes.
1036 </desc>
1037 </const>
1038 <const name="MemKernelTotal" value="11">
1039 <desc>
1040 Total amount of memory used by the guest OS's kernel in megabytes.
1041 </desc>
1042 </const>
1043 <const name="MemKernelPaged" value="12">
1044 <desc>
1045 Total amount of paged memory used by the guest OS's kernel in megabytes.
1046 </desc>
1047 </const>
1048 <const name="MemKernelNonpaged" value="13">
1049 <desc>
1050 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
1051 </desc>
1052 </const>
1053 <const name="MemSystemCache" value="14">
1054 <desc>
1055 Total amount of memory used by the guest OS's system cache in megabytes.
1056 </desc>
1057 </const>
1058 <const name="PageFileSize" value="15">
1059 <desc>
1060 Pagefile size in megabytes.
1061 </desc>
1062 </const>
1063 <const name="SampleNumber" value="16">
1064 <desc>
1065 Statistics sample number
1066 </desc>
1067 </const>
1068 <const name="MaxVal" value="17"/>
1069 </enum>
1070
1071 <enum
1072 name="BIOSBootMenuMode"
1073 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
1074 >
1075 <desc>
1076 BIOS boot menu mode.
1077 </desc>
1078
1079 <const name="Disabled" value="0"/>
1080 <const name="MenuOnly" value="1"/>
1081 <const name="MessageAndMenu" value="2"/>
1082 </enum>
1083
1084 <enum
1085 name="ProcessorFeature"
1086 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
1087 >
1088 <desc>
1089 CPU features.
1090 </desc>
1091
1092 <const name="HWVirtEx" value="0"/>
1093 <const name="PAE" value="1"/>
1094 <const name="LongMode" value="2"/>
1095 <const name="NestedPaging" value="3"/>
1096 </enum>
1097
1098 <enum
1099 name="FirmwareType"
1100 uuid="b903f264-c230-483e-ac74-2b37ce60d371"
1101 >
1102 <desc>
1103 Firmware type.
1104 </desc>
1105 <const name="BIOS" value="1">
1106 <desc>BIOS Firmware.</desc>
1107 </const>
1108 <const name="EFI" value="2">
1109 <desc>EFI Firmware, bitness detetced basing on OS type.</desc>
1110 </const>
1111 <const name="EFI32" value="3">
1112 <desc>Efi firmware, 32-bit.</desc>
1113 </const>
1114 <const name="EFI64" value="4">
1115 <desc>Efi firmware, 64-bit.</desc>
1116 </const>
1117 <const name="EFIDUAL" value="5">
1118 <desc>Efi firmware, combined 32 and 64-bit.</desc>
1119 </const>
1120 </enum>
1121
1122 <!--
1123 // IVirtualBoxErrorInfo
1124 /////////////////////////////////////////////////////////////////////////
1125 -->
1126
1127 <interface
1128 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1129 uuid="4b86d186-407e-4f9e-8be8-e50061be8725"
1130 supportsErrorInfo="no"
1131 wsmap="managed"
1132 >
1133 <desc>
1134 The IVirtualBoxErrorInfo interface represents extended error information.
1135
1136 Extended error information can be set by VirtualBox components after
1137 unsuccessful or partially successful method invocation. This information
1138 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1139 and then shown to the client in addition to the plain 32-bit result code.
1140
1141 In MS COM, this interface extends the IErrorInfo interface,
1142 in XPCOM, it extends the nsIException interface. In both cases,
1143 it provides a set of common attributes to retrieve error
1144 information.
1145
1146 Sometimes invocation of some component's method may involve methods of
1147 other components that may also fail (independently of this method's
1148 failure), or a series of non-fatal errors may precede a fatal error that
1149 causes method failure. In cases like that, it may be desirable to preserve
1150 information about all errors happened during method invocation and deliver
1151 it to the caller. The <link to="#next"/> attribute is intended
1152 specifically for this purpose and allows to represent a chain of errors
1153 through a single IVirtualBoxErrorInfo object set after method invocation.
1154
1155 Note that errors are stored to a chain in the reverse order, i.e. the
1156 initial error object you query right after method invocation is the last
1157 error set by the callee, the object it points to in the @a next attribute
1158 is the previous error and so on, up to the first error (which is the last
1159 in the chain).
1160 </desc>
1161
1162 <attribute name="resultCode" type="long" readonly="yes">
1163 <desc>
1164 Result code of the error.
1165 Usually, it will be the same as the result code returned
1166 by the method that provided this error information, but not
1167 always. For example, on Win32, CoCreateInstance() will most
1168 likely return E_NOINTERFACE upon unsuccessful component
1169 instantiation attempt, but not the value the component factory
1170 returned. Value is typed 'long', not 'result',
1171 to make interface usable from scripting languages.
1172 <note>
1173 In MS COM, there is no equivalent.
1174 In XPCOM, it is the same as nsIException::result.
1175 </note>
1176 </desc>
1177 </attribute>
1178
1179 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1180 <desc>
1181 UUID of the interface that defined the error.
1182 <note>
1183 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1184 data type.
1185 In XPCOM, there is no equivalent.
1186 </note>
1187 </desc>
1188 </attribute>
1189
1190 <attribute name="component" type="wstring" readonly="yes">
1191 <desc>
1192 Name of the component that generated the error.
1193 <note>
1194 In MS COM, it is the same as IErrorInfo::GetSource.
1195 In XPCOM, there is no equivalent.
1196 </note>
1197 </desc>
1198 </attribute>
1199
1200 <attribute name="text" type="wstring" readonly="yes">
1201 <desc>
1202 Text description of the error.
1203 <note>
1204 In MS COM, it is the same as IErrorInfo::GetDescription.
1205 In XPCOM, it is the same as nsIException::message.
1206 </note>
1207 </desc>
1208 </attribute>
1209
1210 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1211 <desc>
1212 Next error object if there is any, or @c null otherwise.
1213 <note>
1214 In MS COM, there is no equivalent.
1215 In XPCOM, it is the same as nsIException::inner.
1216 </note>
1217 </desc>
1218 </attribute>
1219
1220 </interface>
1221
1222 <interface
1223 name="ILocalOwner" extends="$dispatched"
1224 uuid="308FF42A-DC45-49D4-A950-B1EEE5E00BB5" wsmap="suppress"
1225 >
1226 <desc>
1227 The ILocalOwner interface allows to register local objects
1228 (created without COM calls, but with new()).
1229 Once registered, calls to methods of such objects can be made
1230 from remote COM processes.
1231 The main usecase is the event callback implementation where
1232 API clients provide callback objects.
1233 </desc>
1234 <method name="setLocalObject">
1235 <desc>
1236 Set local object.
1237 </desc>
1238 <param name="object" type="$unknown" dir="in">
1239 <desc>Local object to forward requests to.
1240 If null, clears currently set local object.</desc>
1241 </param>
1242 </method>
1243 </interface>
1244
1245 <!--
1246 // IVirtualBox
1247 /////////////////////////////////////////////////////////////////////////
1248 -->
1249
1250 <interface
1251 name="IVirtualBoxCallback" extends="$unknown"
1252 uuid="9a65adf2-3ee6-406b-bca2-2b1fa05f0d0b"
1253 wsmap="suppress"
1254 >
1255
1256 <method name="onMachineStateChange">
1257 <desc>
1258 The execution state of the given machine has changed.
1259 <see>IMachine::state</see>
1260 </desc>
1261 <param name="machineId" type="uuid" mod="string" dir="in">
1262 <desc>ID of the machine this event relates to.</desc>
1263 </param>
1264 <param name="state" type="MachineState" dir="in">
1265 <desc>New execution state.</desc>
1266 </param>
1267 </method>
1268
1269 <method name="onMachineDataChange">
1270 <desc>
1271 Any of the settings of the given machine has changed.
1272 </desc>
1273 <param name="machineId" type="uuid" mod="string" dir="in">
1274 <desc>ID of the machine this event relates to.</desc>
1275 </param>
1276 </method>
1277
1278 <method name="onExtraDataCanChange">
1279 <desc>
1280 Notification when someone tries to change extra data for
1281 either the given machine or (if @c null) global extra data.
1282 This gives the chance to veto against changes.
1283 </desc>
1284 <param name="machineId" type="uuid" mod="string" dir="in">
1285 <desc>
1286 ID of the machine this event relates to
1287 (@c null ID for global extra data change requests).
1288 </desc>
1289 </param>
1290 <param name="key" type="wstring" dir="in">
1291 <desc>
1292 Extra data key for the attempted write.
1293 </desc>
1294 </param>
1295 <param name="value" type="wstring" dir="in">
1296 <desc>
1297 Extra data value for the given key.
1298 </desc>
1299 </param>
1300 <param name="error" type="wstring" dir="out">
1301 <desc>
1302 Optional error message describing the reason of the
1303 veto (ignored if this notification returns @c true).
1304 </desc>
1305 </param>
1306 <param name="allowChange" type="boolean" dir="return">
1307 <desc>
1308 Flag to indicate whether the callee agrees (@c true)
1309 or vetoes against the change (@c false).
1310 </desc>
1311 </param>
1312 </method>
1313
1314 <method name="onExtraDataChange">
1315 <desc>
1316 Notification when machine specific or global extra data
1317 has changed.
1318 </desc>
1319 <param name="machineId" type="uuid" mod="string" dir="in">
1320 <desc>
1321 ID of the machine this event relates to.
1322 Null for global extra data changes.
1323 </desc>
1324 </param>
1325 <param name="key" type="wstring" dir="in">
1326 <desc>
1327 Extra data key that has changed.
1328 </desc>
1329 </param>
1330 <param name="value" type="wstring" dir="in">
1331 <desc>
1332 Extra data value for the given key.
1333 </desc>
1334 </param>
1335 </method>
1336
1337 <method name="onMediumRegistered">
1338 <desc>
1339 The given medium was registered or unregistered
1340 within this VirtualBox installation.
1341
1342 The @a mediumType parameter describes what type of
1343 medium the specified @a mediumId refers to. Possible
1344 values are:
1345
1346 <ul>
1347 <li><link to="DeviceType_HardDisk"/>: the medium is a hard disk
1348 that, if registered, can be obtained using the
1349 <link to="IVirtualBox::getHardDisk"/> call.</li>
1350 <li><link to="DeviceType_DVD"/>: the medium is a CD/DVD image
1351 that, if registered, can be obtained using the
1352 <link to="IVirtualBox::getDVDImage"/> call.</li>
1353 <li><link to="DeviceType_Floppy"/>: the medium is a Floppy image
1354 that, if registered, can be obtained using the
1355 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1356 </ul>
1357
1358 Note that if this is a deregistration notification,
1359 there is no way to access the object representing the
1360 unregistered medium. It is supposed that the
1361 application will do required cleanup based on the
1362 @a mediumId value.
1363 </desc>
1364 <param name="mediumId" type="uuid" mod="string" dir="in">
1365 <desc>ID of the medium this event relates to.</desc>
1366 </param>
1367 <param name="mediumType" type="DeviceType" dir="in">
1368 <desc>Type of the medium this event relates to.</desc>
1369 </param>
1370 <param name="registered" type="boolean" dir="in">
1371 <desc>
1372 If @c true, the medium was registered, otherwise it was
1373 unregistered.
1374 </desc>
1375 </param>
1376 </method>
1377
1378 <method name="onMachineRegistered">
1379 <desc>
1380 The given machine was registered or unregistered
1381 within this VirtualBox installation.
1382 </desc>
1383 <param name="machineId" type="uuid" mod="string" dir="in">
1384 <desc>ID of the machine this event relates to.</desc>
1385 </param>
1386 <param name="registered" type="boolean" dir="in">
1387 <desc>
1388 If @c true, the machine was registered, otherwise it was
1389 unregistered.
1390 </desc>
1391 </param>
1392 </method>
1393
1394 <method name="onSessionStateChange">
1395 <desc>
1396 The state of the session for the given machine was changed.
1397 <see>IMachine::sessionState</see>
1398 </desc>
1399 <param name="machineId" type="uuid" mod="string" dir="in">
1400 <desc>ID of the machine this event relates to.</desc>
1401 </param>
1402 <param name="state" type="SessionState" dir="in">
1403 <desc>New session state.</desc>
1404 </param>
1405 </method>
1406
1407 <method name="onSnapshotTaken">
1408 <desc>
1409 A new snapshot of the machine has been taken.
1410 <see>ISnapshot</see>
1411 </desc>
1412 <param name="machineId" type="uuid" mod="string" dir="in">
1413 <desc>ID of the machine this event relates to.</desc>
1414 </param>
1415 <param name="snapshotId" type="uuid" mod="string" dir="in">
1416 <desc>ID of the new snapshot.</desc>
1417 </param>
1418 </method>
1419
1420 <method name="onSnapshotDiscarded">
1421 <desc>
1422 Snapshot of the given machine has been discarded.
1423
1424 <note>
1425 This notification is delivered <b>after</b> the snapshot
1426 object has been uninitialized on the server (so that any
1427 attempt to call its methods will return an error).
1428 </note>
1429
1430 <see>ISnapshot</see>
1431 </desc>
1432 <param name="machineId" type="uuid" mod="string" dir="in">
1433 <desc>ID of the machine this event relates to.</desc>
1434 </param>
1435 <param name="snapshotId" type="uuid" mod="string" dir="in">
1436 <desc>
1437 ID of the discarded snapshot. @c null means the current machine
1438 state has been discarded (restored from the current snapshot).
1439 </desc>
1440 </param>
1441 </method>
1442
1443 <method name="onSnapshotChange">
1444 <desc>
1445 Snapshot properties (name and/or description) have been changed.
1446 <see>ISnapshot</see>
1447 </desc>
1448 <param name="machineId" type="uuid" mod="string" dir="in">
1449 <desc>ID of the machine this event relates to.</desc>
1450 </param>
1451 <param name="snapshotId" type="uuid" mod="string" dir="in">
1452 <desc>ID of the changed snapshot.</desc>
1453 </param>
1454 </method>
1455
1456 <method name="onGuestPropertyChange">
1457 <desc>
1458 Notification when a guest property has changed.
1459 </desc>
1460 <param name="machineId" type="uuid" mod="string" dir="in">
1461 <desc>
1462 ID of the machine this event relates to.
1463 </desc>
1464 </param>
1465 <param name="name" type="wstring" dir="in">
1466 <desc>
1467 The name of the property that has changed.
1468 </desc>
1469 </param>
1470 <param name="value" type="wstring" dir="in">
1471 <desc>
1472 The new property value.
1473 </desc>
1474 </param>
1475 <param name="flags" type="wstring" dir="in">
1476 <desc>
1477 The new property flags.
1478 </desc>
1479 </param>
1480 </method>
1481
1482 </interface>
1483
1484 <interface
1485 name="IDHCPServer" extends="$unknown"
1486 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1487 wsmap="managed"
1488 >
1489 <desc>
1490 The IDHCPServer interface represents the vbox dhcp server configuration.
1491
1492 To enumerate all the dhcp servers on the host, use the
1493 <link to="IVirtualBox::DHCPServers"/> attribute.
1494 </desc>
1495
1496 <attribute name="enabled" type="boolean">
1497 <desc>
1498 specifies if the dhcp server is enabled
1499 </desc>
1500 </attribute>
1501
1502 <attribute name="IPAddress" type="wstring" readonly="yes">
1503 <desc>
1504 specifies server IP
1505 </desc>
1506 </attribute>
1507
1508 <attribute name="networkMask" type="wstring" readonly="yes">
1509 <desc>
1510 specifies server network mask
1511 </desc>
1512 </attribute>
1513
1514 <attribute name="networkName" type="wstring" readonly="yes">
1515 <desc>
1516 specifies internal network name the server is used for
1517 </desc>
1518 </attribute>
1519
1520 <attribute name="lowerIP" type="wstring" readonly="yes">
1521 <desc>
1522 specifies from IP adrres in server address range
1523 </desc>
1524 </attribute>
1525
1526 <attribute name="upperIP" type="wstring" readonly="yes">
1527 <desc>
1528 specifies to IP adrres in server address range
1529 </desc>
1530 </attribute>
1531
1532 <method name="setConfiguration">
1533 <desc>
1534 configures the server
1535 <result name="E_INVALIDARG">
1536 invalid configuration supplied
1537 </result>
1538 </desc>
1539 <param name="IPAddress" type="wstring" dir="in">
1540 <desc>
1541 server IP address
1542 </desc>
1543 </param>
1544 <param name="networkMask" type="wstring" dir="in">
1545 <desc>
1546 server network mask
1547 </desc>
1548 </param>
1549 <param name="FromIPAddress" type="wstring" dir="in">
1550 <desc>
1551 server From IP address for address range
1552 </desc>
1553 </param>
1554 <param name="ToIPAddress" type="wstring" dir="in">
1555 <desc>
1556 server To IP address for address range
1557 </desc>
1558 </param>
1559 </method>
1560
1561 <method name="start">
1562 <desc>
1563 Starts DHCP server process.
1564 <result name="E_FAIL">
1565 Failed to start the process.
1566 </result>
1567 </desc>
1568 <param name="networkName" type="wstring" dir="in">
1569 <desc>
1570 Name of internal network DHCP server should attach to.
1571 </desc>
1572 </param>
1573 <param name="trunkName" type="wstring" dir="in">
1574 <desc>
1575 Name of internal network trunk.
1576 </desc>
1577 </param>
1578 <param name="trunkType" type="wstring" dir="in">
1579 <desc>
1580 Type of internal network trunk.
1581 </desc>
1582 </param>
1583 </method>
1584
1585 <method name="stop">
1586 <desc>
1587 Stops DHCP server process.
1588 <result name="E_FAIL">
1589 Failed to stop the process.
1590 </result>
1591 </desc>
1592 </method>
1593 </interface>
1594
1595 <interface
1596 name="IVirtualBox" extends="$dispatched"
1597 uuid="2158464a-f706-414b-a8c4-fb589dfc6b62"
1598 wsmap="managed"
1599 >
1600 <desc>
1601 The IVirtualBox interface represents the main interface exposed by the
1602 product that provides virtual machine management.
1603
1604 An instance of IVirtualBox is required for the product to do anything
1605 useful. Even though the interface does not expose this, internally,
1606 IVirtualBox is implemented as a singleton and actually lives in the
1607 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1608 IVirtualBox can track the state of all virtual machines on a particular
1609 host, regardless of which frontend started them.
1610
1611 To enumerate all the virtual machines on the host, use the
1612 <link to="IVirtualBox::machines"/> attribute.
1613 </desc>
1614
1615 <attribute name="version" type="wstring" readonly="yes">
1616 <desc>
1617 A string representing the version number of the product. The
1618 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1619 last number represents the build number and will frequently change.
1620 </desc>
1621 </attribute>
1622
1623 <attribute name="revision" type="unsigned long" readonly="yes">
1624 <desc>
1625 The internal build revision number of the product.
1626 </desc>
1627 </attribute>
1628
1629 <attribute name="packageType" type="wstring" readonly="yes">
1630 <desc>
1631 A string representing the package type of this product. The
1632 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1633 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1634 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1635 this.
1636 </desc>
1637 </attribute>
1638
1639 <attribute name="homeFolder" type="wstring" readonly="yes">
1640 <desc>
1641 Full path to the directory where the global settings file,
1642 <tt>VirtualBox.xml</tt>, is stored.
1643
1644 In this version of VirtualBox, the value of this property is
1645 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1646 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1647 as determined by the host OS), and cannot be changed.
1648
1649 This path is also used as the base to resolve relative paths in
1650 places where relative paths are allowed (unless otherwise
1651 expressly indicated).
1652 </desc>
1653 </attribute>
1654
1655 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1656 <desc>
1657 Full name of the global settings file.
1658 The value of this property corresponds to the value of
1659 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1660 </desc>
1661 </attribute>
1662
1663 <attribute name="host" type="IHost" readonly="yes">
1664 <desc>Associated host object.</desc>
1665 </attribute>
1666
1667 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1668 <desc>Associated system information object.</desc>
1669 </attribute>
1670
1671 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1672 <desc>
1673 Array of machine objects registered within this VirtualBox instance.
1674 </desc>
1675 </attribute>
1676
1677 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1678 <desc>
1679 Array of medium objects known to this VirtualBox installation.
1680
1681 This array contains only base media. All differencing
1682 media of the given base medium can be enumerated using
1683 <link to="IMedium::children"/>.
1684 </desc>
1685 </attribute>
1686
1687 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1688 <desc>
1689 Array of CD/DVD image objects registered with this VirtualBox instance.
1690 </desc>
1691 </attribute>
1692
1693 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1694 <desc>
1695 Array of floppy image objects registered with this VirtualBox instance.
1696 </desc>
1697 </attribute>
1698
1699 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1700
1701 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1702
1703 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1704 <desc>
1705 Collection of global shared folders. Global shared folders are
1706 available to all virtual machines.
1707
1708 New shared folders are added to the collection using
1709 <link to="#createSharedFolder"/>. Existing shared folders can be
1710 removed using <link to="#removeSharedFolder"/>.
1711
1712 <note>
1713 In the current version of the product, global shared folders are not
1714 implemented and therefore this collection is always empty.
1715 </note>
1716 </desc>
1717 </attribute>
1718
1719 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1720 <desc>
1721 Associated performance collector object.
1722 </desc>
1723 </attribute>
1724
1725 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1726 <desc>
1727 dhcp server settings.
1728 </desc>
1729 </attribute>
1730
1731 <method name="createMachine">
1732 <desc>
1733 Creates a new virtual machine.
1734
1735 The new machine is created unregistered, with the initial configuration
1736 set according to the specified guest OS type. A typical sequence of
1737 actions to create a new virtual machine is as follows:
1738
1739 <ol>
1740 <li>
1741 Call this method to have a new machine created. The returned machine
1742 object will be "mutable" allowing to change any machine property.
1743 </li>
1744
1745 <li>
1746 Configure the machine using the appropriate attributes and methods.
1747 </li>
1748
1749 <li>
1750 Call <link to="IMachine::saveSettings" /> to write the settings
1751 to the machine's XML settings file. The configuration of the newly
1752 created machine will not be saved to disk until this method is
1753 called.
1754 </li>
1755
1756 <li>
1757 Call <link to="#registerMachine" /> to add the machine to the list
1758 of machines known to VirtualBox.
1759 </li>
1760 </ol>
1761
1762 You should specify valid name for the newly created machine when calling
1763 this method. See the <link to="IMachine::name"/> attribute description
1764 for more details about the machine name.
1765
1766 The specified guest OS type identifier must match an ID of one of known
1767 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1768 array.
1769
1770 Every machine has a <i>settings file</i> that is used to store
1771 the machine configuration. This file is stored in a directory called the
1772 <i>machine settings subfolder</i>. Both the settings subfolder and file
1773 will have a name that corresponds to the name of the virtual machine.
1774 You can specify where to create the machine setting subfolder using the
1775 @a baseFolder argument. The base folder can be absolute (full path) or
1776 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1777 directory</link>.
1778
1779 If @a baseFolder is a @c null or empty string (which is recommended), the
1780 <link to="ISystemProperties::defaultMachineFolder">default machine
1781 settings folder</link> will be used as a base folder for the created
1782 machine. Otherwise the given base folder will be used. In either case,
1783 the full path to the resulting settings file has the following
1784 structure:
1785 <pre>
1786 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1787 </pre>
1788
1789 Note that if the resulting settings file already exists, this method
1790 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1791
1792 Optionally, you may specify an UUID of to assign to the created machine.
1793 However, this is not recommended and you should normally pass an empty
1794 (@c null) UUID to this method so that a new UUID will be automatically
1795 generated for every created machine. You can use UUID
1796 00000000-0000-0000-0000-000000000000 as @c null value.
1797
1798 <note>
1799 There is no way to change the name of the settings file or
1800 subfolder of the created machine directly.
1801 </note>
1802
1803 <result name="VBOX_E_OBJECT_NOT_FOUND">
1804 @a osTypeId is invalid.
1805 </result>
1806 <result name="VBOX_E_FILE_ERROR">
1807 Resulting settings file name is invalid or the settings file already
1808 exists or could not be created due to an I/O error.
1809 </result>
1810 <result name="E_INVALIDARG">
1811 @a name is empty or @c null.
1812 </result>
1813 </desc>
1814
1815 <param name="name" type="wstring" dir="in">
1816 <desc>Machine name.</desc>
1817 </param>
1818 <param name="osTypeId" type="wstring" dir="in">
1819 <desc>Guest OS Type ID.</desc>
1820 </param>
1821 <param name="baseFolder" type="wstring" dir="in">
1822 <desc>Base machine folder (optional).</desc>
1823 </param>
1824 <param name="id" type="uuid" mod="string" dir="in">
1825 <desc>Machine UUID (optional).</desc>
1826 </param>
1827 <param name="machine" type="IMachine" dir="return">
1828 <desc>Created machine object.</desc>
1829 </param>
1830 </method>
1831
1832 <method name="createLegacyMachine">
1833 <desc>
1834 Creates a new virtual machine in "legacy" mode, using the specified
1835 settings file to store machine settings.
1836
1837 As opposed to machines created by <link to="#createMachine"/>,
1838 the settings file of the machine created in "legacy" mode is not
1839 automatically renamed when the machine name is changed -- it will always
1840 remain the same as specified in this method call.
1841
1842 The specified settings file name can be absolute (full path) or relative
1843 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1844 directory</link>. If the file name doesn't contain an extension, the
1845 default extension (.xml) will be appended.
1846
1847 Note that the configuration of the newly created machine is not
1848 saved to disk (and therefore no settings file is created)
1849 until <link to="IMachine::saveSettings"/> is called. If the
1850 specified settings file already exists, this method
1851 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1852
1853 See <link to="#createMachine"/> for more information.
1854
1855 @deprecated This method may be removed later. Use <link
1856 to="IVirtualBox::createMachine"/> instead.
1857
1858 <note>
1859 There is no way to change the name of the settings file
1860 of the machine created in "legacy" mode.
1861 </note>
1862
1863 <result name="VBOX_E_OBJECT_NOT_FOUND">
1864 @a osTypeId is invalid.
1865 </result>
1866 <result name="VBOX_E_FILE_ERROR">
1867 @a settingsFile is invalid or the settings file already exists or
1868 could not be created due to an I/O error.
1869 </result>
1870 <result name="E_INVALIDARG">
1871 @a name or @a settingsFile is empty or @c null.
1872 </result>
1873 </desc>
1874
1875 <param name="name" type="wstring" dir="in">
1876 <desc>Machine name.</desc>
1877 </param>
1878 <param name="osTypeId" type="wstring" dir="in">
1879 <desc>Machine OS Type ID.</desc>
1880 </param>
1881 <param name="settingsFile" type="wstring" dir="in">
1882 <desc>Name of the machine settings file.</desc>
1883 </param>
1884 <param name="id" type="uuid" mod="string" dir="in">
1885 <desc>Machine UUID (optional).</desc>
1886 </param>
1887 <param name="machine" type="IMachine" dir="return">
1888 <desc>Created machine object.</desc>
1889 </param>
1890 </method>
1891
1892 <method name="openMachine">
1893 <desc>
1894 Opens a virtual machine from the existing settings file.
1895 The opened machine remains unregistered until you call
1896 <link to="#registerMachine"/>.
1897
1898 The specified settings file name can be absolute
1899 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1900 VirtualBox home directory</link>. This file must exist
1901 and must be a valid machine settings file whose contents
1902 will be used to construct the machine object.
1903
1904 @deprecated Will be removed soon.
1905 <result name="VBOX_E_FILE_ERROR">
1906 Settings file name invalid, not found or sharing violation.
1907 </result>
1908 </desc>
1909 <param name="settingsFile" type="wstring" dir="in">
1910 <desc>
1911 Name of the machine settings file.
1912 </desc>
1913 </param>
1914 <param name="machine" type="IMachine" dir="return">
1915 <desc>Opened machine object.</desc>
1916 </param>
1917 <note>
1918 <link to="IMachine::settingsModified"/> will return
1919 @c false for the created machine, until any of machine settings
1920 are changed.
1921 </note>
1922 </method>
1923
1924 <method name="registerMachine">
1925 <desc>
1926
1927 Registers the machine previously created using
1928 <link to="#createMachine"/> or opened using
1929 <link to="#openMachine"/> within this VirtualBox installation. After
1930 successful method invocation, the
1931 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1932 to all registered callbacks.
1933
1934 <note>
1935 This method implicitly calls <link to="IMachine::saveSettings"/>
1936 to save all current machine settings before registering it.
1937 </note>
1938
1939 <result name="VBOX_E_OBJECT_NOT_FOUND">
1940 No matching virtual machine found.
1941 </result>
1942 <result name="VBOX_E_INVALID_OBJECT_STATE">
1943 Virtual machine was not created within this VirtualBox instance.
1944 </result>
1945
1946 </desc>
1947 <param name="machine" type="IMachine" dir="in"/>
1948 </method>
1949
1950 <method name="getMachine">
1951 <desc>
1952 Attempts to find a virtual machine given its UUID.
1953 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1954 instead.
1955
1956 <result name="VBOX_E_OBJECT_NOT_FOUND">
1957 Could not find registered machine matching @a id.
1958 </result>
1959
1960 </desc>
1961 <param name="id" type="uuid" mod="string" dir="in"/>
1962 <param name="machine" type="IMachine" dir="return"/>
1963 </method>
1964
1965 <method name="findMachine">
1966 <desc>
1967 Attempts to find a virtual machine given its name.
1968 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1969 instead.
1970
1971 <result name="VBOX_E_OBJECT_NOT_FOUND">
1972 Could not find registered machine matching @a name.
1973 </result>
1974
1975 </desc>
1976 <param name="name" type="wstring" dir="in"/>
1977 <param name="machine" type="IMachine" dir="return"/>
1978 </method>
1979
1980 <method name="unregisterMachine">
1981 <desc>
1982
1983 Unregisters the machine previously registered using
1984 <link to="#registerMachine"/>. After successful method invocation, the
1985 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1986 to all registered callbacks.
1987
1988 <note>
1989 The specified machine must not be in the Saved state, have an open
1990 (or a spawning) direct session associated with it, have snapshots or
1991 have any medium attached.
1992 </note>
1993
1994 <note>
1995 This method implicitly calls <link to="IMachine::saveSettings"/> to
1996 save all current machine settings before unregistering it.
1997 </note>
1998
1999 <note>
2000 If the given machine is inaccessible (see
2001 <link to="IMachine::accessible"/>), it will be unregistered and
2002 fully uninitialized right afterwards. As a result, the returned
2003 machine object will be unusable and an attempt to call
2004 <b>any</b> method will return the "Object not ready" error.
2005 </note>
2006
2007 <result name="VBOX_E_OBJECT_NOT_FOUND">
2008 Could not find registered machine matching @a id.
2009 </result>
2010 <result name="VBOX_E_INVALID_VM_STATE">
2011 Machine is in Saved state.
2012 </result>
2013 <result name="VBOX_E_INVALID_OBJECT_STATE">
2014 Machine has snapshot or open session or medium attached.
2015 </result>
2016
2017 </desc>
2018 <param name="id" type="uuid" mod="string" dir="in">
2019 <desc>UUID of the machine to unregister.</desc>
2020 </param>
2021 <param name="machine" type="IMachine" dir="return">
2022 <desc>Unregistered machine object.</desc>
2023 </param>
2024 </method>
2025
2026 <method name="createAppliance">
2027 <desc>
2028 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
2029 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
2030 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
2031 </desc>
2032 <param name="appliance" type="IAppliance" dir="return">
2033 <desc>New appliance.</desc>
2034 </param>
2035 </method>
2036
2037 <method name="createHardDisk">
2038 <desc>
2039 Creates a new base medium object that will use the given storage
2040 format and location for medium data.
2041
2042 Note that the actual storage unit is not created by this method. In
2043 order to do it, and before you are able to attach the created medium
2044 to virtual machines, you must call one of the following methods to
2045 allocate a format-specific storage unit at the specified location:
2046 <ul>
2047 <li><link to="IMedium::createBaseStorage"/></li>
2048 <li><link to="IMedium::createDiffStorage"/></li>
2049 </ul>
2050
2051 Some medium attributes, such as <link to="IMedium::id"/>, may
2052 remain uninitialized until the medium storage unit is successfully
2053 created by one of the above methods.
2054
2055 After the storage unit is successfully created, the medium gets
2056 remembered by this VirtualBox installation and will be accessible
2057 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
2058 methods. Remembered base medium are also returned as part of
2059 the <link to="#hardDisks"/> array. See IMedium for more details.
2060
2061 The list of all storage formats supported by this VirtualBox
2062 installation can be obtained using
2063 <link to="ISystemProperties::mediumFormats"/>. If the @a format
2064 attribute is empty or @c null then the default storage format
2065 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
2066 be used for creating a storage unit of the medium.
2067
2068 Note that the format of the location string is storage format specific.
2069 See <link to="IMedium::location"/>, IMedium and
2070 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2071
2072 <result name="VBOX_E_OBJECT_NOT_FOUND">
2073 @a format identifier is invalid. See
2074 <link to="ISystemProperties::mediumFormats"/>.
2075 </result>
2076 <result name="VBOX_E_FILE_ERROR">
2077 @a location is a not valid file name (for file-based formats only).
2078 </result>
2079 </desc>
2080 <param name="format" type="wstring" dir="in">
2081 <desc>
2082 Identifier of the storage format to use for the new medium.
2083 </desc>
2084 </param>
2085 <param name="location" type="wstring" dir="in">
2086 <desc>
2087 Location of the storage unit for the new medium.
2088 </desc>
2089 </param>
2090 <param name="medium" type="IMedium" dir="return">
2091 <desc>Created medium object.</desc>
2092 </param>
2093 </method>
2094
2095 <method name="openHardDisk">
2096 <desc>
2097 Opens a medium from an existing location, optionally replacing
2098 the image UUID and/or parent UUID.
2099
2100 After the medium is successfully opened by this method, it gets
2101 remembered by (known to) this VirtualBox installation and will be
2102 accessible through <link to="#getHardDisk"/> and
2103 <link to="#findHardDisk"/> methods. Remembered base media
2104 are also returned as part of the <link to="#hardDisks"/> array and can
2105 be attached to virtual machines. See IMedium for more details.
2106
2107 If a differencing medium is to be opened by this method, the
2108 operation will succeed only if its parent medium and all ancestors,
2109 if any, are already known to this VirtualBox installation (for example,
2110 were opened by this method before).
2111
2112 This method tries to guess the storage format of the specified medium
2113 by reading medium data at the specified location.
2114
2115 If @a write is ReadWrite (which it should be), the image is opened for
2116 read/write access and must have according permissions, as VirtualBox
2117 may actually write status information into the disk's metadata sections.
2118
2119 Note that write access is required for all typical image usage in VirtualBox,
2120 since VirtualBox may need to write metadata such as a UUID into the image.
2121 The only exception is opening a source image temporarily for copying and
2122 cloning when the image will quickly be closed again.
2123
2124 Note that the format of the location string is storage format specific.
2125 See <link to="IMedium::location"/>, IMedium and
2126 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2127
2128 <result name="VBOX_E_FILE_ERROR">
2129 Invalid medium storage file location or could not find the medium
2130 at the specified location.
2131 </result>
2132 <result name="VBOX_E_IPRT_ERROR">
2133 Could not get medium storage format.
2134 </result>
2135 <result name="E_INVALIDARG">
2136 Invalid medium storage format.
2137 </result>
2138
2139 </desc>
2140 <param name="location" type="wstring" dir="in">
2141 <desc>
2142 Location of the storage unit that contains medium data in one of
2143 the supported storage formats.
2144 </desc>
2145 </param>
2146 <param name="accessMode" type="AccessMode" dir="in">
2147 <desc>
2148 Determines whether to open the image in read/write or read-only mode.
2149 </desc>
2150 </param>
2151 <param name="setImageId" type="boolean" dir="in">
2152 <desc>
2153 Select whether a new image UUID is set or not.
2154 </desc>
2155 </param>
2156 <param name="imageId" type="uuid" mod="string" dir="in">
2157 <desc>
2158 New UUID for the image. If an empty string is passed, then a new
2159 UUID is automatically created. Specifying a zero UUIDs is not valid.
2160 </desc>
2161 </param>
2162 <param name="setParentId" type="boolean" dir="in">
2163 <desc>
2164 Select whether a new parent UUID is set or not.
2165 </desc>
2166 </param>
2167 <param name="parentId" type="uuid" mod="string" dir="in">
2168 <desc>
2169 New parent UUID for the image. If an empty string is passed, then a
2170 new UUID is automatically created, provided @a setParentId is
2171 @c true. A zero UUID is valid.
2172 </desc>
2173 </param>
2174 <param name="medium" type="IMedium" dir="return">
2175 <desc>Opened medium object.</desc>
2176 </param>
2177 </method>
2178
2179 <method name="getHardDisk" const="yes">
2180 <desc>
2181 Returns a medium with the given UUID.
2182
2183 The medium with the given UUID must be known to this VirtualBox
2184 installation, i.e. it must be previously created by
2185 <link to="#createHardDisk"/> or opened by <link
2186 to="#openHardDisk"/>, or attached to some known virtual machine.
2187
2188 <result name="VBOX_E_OBJECT_NOT_FOUND">
2189 No medium object matching @a id found.
2190 </result>
2191
2192 </desc>
2193 <param name="id" type="uuid" mod="string" dir="in">
2194 <desc>UUID of the medium to look for.</desc>
2195 </param>
2196 <param name="medium" type="IMedium" dir="return">
2197 <desc>Found medium object.</desc>
2198 </param>
2199 </method>
2200
2201 <method name="findHardDisk">
2202 <desc>
2203 Returns a medium that uses the given location to store medium data.
2204
2205 The given medium must be known to this VirtualBox installation, i.e.
2206 it must be previously created by
2207 <link to="#createHardDisk"/> or opened by <link
2208 to="#openHardDisk"/>, or attached to some known virtual machine.
2209
2210 The search is done by comparing the value of the @a location argument to
2211 the <link to="IMedium::location"/> attribute of each known medium.
2212
2213 For locations represented by file names in the host's file system, the
2214 requested location can be a path relative to the
2215 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2216 only a file name without any path is given, the
2217 <link to="ISystemProperties::defaultHardDiskFolder"> default medium
2218 folder</link> will be prepended to the file name before searching. Note
2219 that on case sensitive file systems, a case sensitive comparison is
2220 performed, otherwise the case of symbols in the file path is ignored.
2221
2222 <result name="VBOX_E_OBJECT_NOT_FOUND">
2223 No medium object matching @a location found.
2224 </result>
2225
2226 </desc>
2227 <param name="location" type="wstring" dir="in">
2228 <desc>Location string to search for.</desc>
2229 </param>
2230 <param name="medium" type="IMedium" dir="return">
2231 <desc>Found medium object.</desc>
2232 </param>
2233 </method>
2234
2235 <method name="openDVDImage">
2236 <desc>
2237 Opens a CD/DVD image contained in the specified file of the supported
2238 format and assigns it the given UUID.
2239
2240 After the image is successfully opened by this method, it gets
2241 remembered by (known to) this VirtualBox installation and will be
2242 accessible through <link to="#getDVDImage"/> and
2243 <link to="#findDVDImage"/> methods. Remembered images are also
2244 returned as part of the <link to="#DVDImages"/> array and can be mounted
2245 to virtual machines. See IMedium for more details.
2246
2247 See <link to="IMedium::location"/> to get more details about the format
2248 of the location string.
2249
2250 <note>
2251 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2252 </note>
2253
2254 <result name="VBOX_E_FILE_ERROR">
2255 Invalid CD/DVD image file location or could not find the CD/DVD
2256 image at the specified location.
2257 </result>
2258 <result name="VBOX_E_INVALID_OBJECT_STATE">
2259 CD/DVD image already exists in the media registry.
2260 </result>
2261
2262 </desc>
2263 <param name="location" type="wstring" dir="in">
2264 <desc>
2265 Full path to the file that contains a valid CD/DVD image.
2266 </desc>
2267 </param>
2268 <param name="id" type="uuid" mod="string" dir="in">
2269 <desc>
2270 UUID to assign to the given image within this VirtualBox installation.
2271 If an empty (@c null) UUID is specified, the system will randomly
2272 generate a new UUID.
2273 </desc>
2274 </param>
2275 <param name="image" type="IMedium" dir="return">
2276 <desc>Opened CD/DVD image object.</desc>
2277 </param>
2278 </method>
2279
2280 <method name="getDVDImage">
2281 <desc>
2282 Returns a CD/DVD image with the given UUID.
2283
2284 The image with the given UUID must be known to this VirtualBox
2285 installation, i.e. it must be previously opened by <link
2286 to="#openDVDImage"/>, or mounted to some known virtual machine.
2287
2288 <result name="VBOX_E_OBJECT_NOT_FOUND">
2289 No matching DVD image found in the media registry.
2290 </result>
2291
2292 </desc>
2293 <param name="id" type="uuid" mod="string" dir="in">
2294 <desc>UUID of the image to look for.</desc>
2295 </param>
2296 <param name="image" type="IMedium" dir="return">
2297 <desc>Found CD/DVD image object.</desc>
2298 </param>
2299 </method>
2300
2301 <method name="findDVDImage">
2302 <desc>
2303 Returns a CD/DVD image with the given image location.
2304
2305 The image with the given UUID must be known to this VirtualBox
2306 installation, i.e. it must be previously opened by <link
2307 to="#openDVDImage"/>, or mounted to some known virtual machine.
2308
2309 The search is done by comparing the value of the @a location argument to
2310 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2311
2312 The requested location can be a path relative to the
2313 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2314 only a file name without any path is given, the
2315 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2316 folder</link> will be prepended to the file name before searching. Note
2317 that on case sensitive file systems, a case sensitive comparison is
2318 performed, otherwise the case in the file path is ignored.
2319
2320 <result name="VBOX_E_FILE_ERROR">
2321 Invalid image file location.
2322 </result>
2323 <result name="VBOX_E_OBJECT_NOT_FOUND">
2324 No matching DVD image found in the media registry.
2325 </result>
2326
2327 </desc>
2328 <param name="location" type="wstring" dir="in">
2329 <desc>CD/DVD image file path to look for.</desc>
2330 </param>
2331 <param name="image" type="IMedium" dir="return">
2332 <desc>Found CD/DVD image object.</desc>
2333 </param>
2334 </method>
2335
2336 <method name="openFloppyImage">
2337 <desc>
2338 Opens a floppy image contained in the specified file of the supported
2339 format and assigns it the given UUID.
2340
2341 After the image is successfully opened by this method, it gets
2342 remembered by (known to) this VirtualBox installation and will be
2343 accessible through <link to="#getFloppyImage"/> and
2344 <link to="#findFloppyImage"/> methods. Remembered images are also
2345 returned as part of the <link to="#floppyImages"/> array and can be
2346 mounted to virtual machines. See IMedium for more details.
2347
2348 See <link to="IMedium::location"/> to get more details about the format
2349 of the location string.
2350
2351 <result name="VBOX_E_FILE_ERROR">
2352 Invalid floppy image file location or could not find the floppy
2353 image at the specified location.
2354 </result>
2355 <result name="VBOX_E_INVALID_OBJECT_STATE">
2356 Floppy image already exists in the media registry.
2357 </result>
2358
2359 <note>
2360 Currently, only raw floppy images are supported by VirtualBox.
2361 </note>
2362 </desc>
2363 <param name="location" type="wstring" dir="in">
2364 <desc>
2365 Full path to the file that contains a valid floppy image.
2366 </desc>
2367 </param>
2368 <param name="id" type="uuid" mod="string" dir="in">
2369 <desc>
2370 UUID to assign to the given image file within this VirtualBox
2371 installation. If an empty (@c null) UUID is specified, the system will
2372 randomly generate a new UUID.
2373 </desc>
2374 </param>
2375 <param name="image" type="IMedium" dir="return">
2376 <desc>Opened floppy image object.</desc>
2377 </param>
2378 </method>
2379
2380 <method name="getFloppyImage">
2381 <desc>
2382 Returns a floppy image with the given UUID.
2383
2384 The image with the given UUID must be known to this VirtualBox
2385 installation, i.e. it must be previously opened by <link
2386 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2387
2388 <result name="VBOX_E_OBJECT_NOT_FOUND">
2389 No matching floppy image found in the media registry.
2390 </result>
2391
2392 </desc>
2393 <param name="id" type="uuid" mod="string" dir="in">
2394 <desc>UUID of the image to look for.</desc>
2395 </param>
2396 <param name="image" type="IMedium" dir="return">
2397 <desc>Found floppy image object.</desc>
2398 </param>
2399 </method>
2400
2401 <method name="findFloppyImage">
2402 <desc>
2403 Returns a floppy image with the given image location.
2404
2405 The image with the given UUID must be known to this VirtualBox
2406 installation, i.e. it must be previously opened by <link
2407 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2408
2409 The search is done by comparing the value of the @a location argument to
2410 the <link to="IMedium::location"/> attribute of each known floppy image.
2411
2412 The requested location can be a path relative to the
2413 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2414 only a file name without any path is given, the
2415 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2416 folder</link> will be prepended to the file name before searching. Note
2417 that on case sensitive file systems, a case sensitive comparison is
2418 performed, otherwise the case of symbols in the file path is ignored.
2419
2420 <result name="VBOX_E_FILE_ERROR">
2421 Invalid image file location.
2422 </result>
2423 <result name="VBOX_E_OBJECT_NOT_FOUND">
2424 No matching floppy image found in the media registry.
2425 </result>
2426
2427 </desc>
2428 <param name="location" type="wstring" dir="in">
2429 <desc>Floppy image file path to look for.</desc>
2430 </param>
2431 <param name="image" type="IMedium" dir="return">
2432 <desc>Found floppy image object.</desc>
2433 </param>
2434 </method>
2435
2436 <method name="getGuestOSType">
2437 <desc>
2438 Returns an object describing the specified guest OS type.
2439
2440 The requested guest OS type is specified using a string which is a
2441 mnemonic identifier of the guest operating system, such as
2442 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2443 particular virtual machine can be read or set using the
2444 <link to="IMachine::OSTypeId"/> attribute.
2445
2446 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2447 available guest OS type objects. Each object has an
2448 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2449 the guest OS this object describes.
2450
2451 <result name="E_INVALIDARG">
2452 @a id is not a valid Guest OS type.
2453 </result>
2454
2455 </desc>
2456 <param name="id" type="uuid" mod="string" dir="in">
2457 <desc>Guest OS type ID string.</desc>
2458 </param>
2459 <param name="type" type="IGuestOSType" dir="return">
2460 <desc>Guest OS type object.</desc>
2461 </param>
2462 </method>
2463
2464 <method name="createSharedFolder">
2465 <desc>
2466 Creates a new global shared folder by associating the given logical
2467 name with the given host path, adds it to the collection of shared
2468 folders and starts sharing it. Refer to the description of
2469 <link to="ISharedFolder"/> to read more about logical names.
2470 <note>
2471 In the current implementation, this operation is not
2472 implemented.
2473 </note>
2474 </desc>
2475 <param name="name" type="wstring" dir="in">
2476 <desc>Unique logical name of the shared folder.</desc>
2477 </param>
2478 <param name="hostPath" type="wstring" dir="in">
2479 <desc>Full path to the shared folder in the host file system.</desc>
2480 </param>
2481 <param name="writable" type="boolean" dir="in">
2482 <desc>Whether the share is writable or readonly</desc>
2483 </param>
2484 </method>
2485
2486 <method name="removeSharedFolder">
2487 <desc>
2488 Removes the global shared folder with the given name previously
2489 created by <link to="#createSharedFolder"/> from the collection of
2490 shared folders and stops sharing it.
2491 <note>
2492 In the current implementation, this operation is not
2493 implemented.
2494 </note>
2495 </desc>
2496 <param name="name" type="wstring" dir="in">
2497 <desc>Logical name of the shared folder to remove.</desc>
2498 </param>
2499 </method>
2500
2501 <method name="getExtraDataKeys">
2502 <desc>
2503 Returns an array representing the global extra data keys which currently
2504 have values defined.
2505 </desc>
2506 <param name="value" type="wstring" dir="return" safearray="yes">
2507 <desc>Array of extra data keys.</desc>
2508 </param>
2509 </method>
2510
2511 <method name="getExtraData">
2512 <desc>
2513 Returns associated global extra data.
2514
2515 If the requested data @a key does not exist, this function will
2516 succeed and return an empty string in the @a value argument.
2517
2518 <result name="VBOX_E_FILE_ERROR">
2519 Settings file not accessible.
2520 </result>
2521 <result name="VBOX_E_XML_ERROR">
2522 Could not parse the settings file.
2523 </result>
2524
2525 </desc>
2526 <param name="key" type="wstring" dir="in">
2527 <desc>Name of the data key to get.</desc>
2528 </param>
2529 <param name="value" type="wstring" dir="return">
2530 <desc>Value of the requested data key.</desc>
2531 </param>
2532 </method>
2533
2534 <method name="setExtraData">
2535 <desc>
2536 Sets associated global extra data.
2537
2538 If you pass @c null or empty string as a key @a value, the given @a key
2539 will be deleted.
2540
2541 <note>
2542 Before performing the actual data change, this method will ask all
2543 registered callbacks using the
2544 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2545 notification for a permission. If one of the callbacks refuses the
2546 new value, the change will not be performed.
2547 </note>
2548 <note>
2549 On success, the
2550 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2551 is called to inform all registered callbacks about a successful data
2552 change.
2553 </note>
2554
2555 <result name="VBOX_E_FILE_ERROR">
2556 Settings file not accessible.
2557 </result>
2558 <result name="VBOX_E_XML_ERROR">
2559 Could not parse the settings file.
2560 </result>
2561 <result name="E_ACCESSDENIED">
2562 Modification request refused.
2563 </result>
2564
2565 </desc>
2566 <param name="key" type="wstring" dir="in">
2567 <desc>Name of the data key to set.</desc>
2568 </param>
2569 <param name="value" type="wstring" dir="in">
2570 <desc>Value to assign to the key.</desc>
2571 </param>
2572 </method>
2573
2574 <method name="openSession">
2575 <desc>
2576 Opens a new direct session with the given virtual machine.
2577
2578 A direct session acts as a local lock on the given VM.
2579 There can be only one direct session open at a time for every
2580 virtual machine, protecting the VM from being manipulated by
2581 conflicting actions from different processes. Only after a
2582 direct session has been opened, one can change all VM settings
2583 and execute the VM in the process space of the session object.
2584
2585 Sessions therefore can be compared to mutex semaphores that
2586 lock a given VM for modification and execution.
2587 See <link to="ISession">ISession</link> for details.
2588
2589 <note>Unless you are writing a new VM frontend, you will not
2590 want to execute a VM in the current process. To spawn a new
2591 process that executes a VM, use
2592 <link to="IVirtualBox::openRemoteSession" />
2593 instead.</note>
2594
2595 Upon successful return, the session object can be used to
2596 get access to the machine and to the VM console.
2597
2598 In VirtualBox terminology, the machine becomes "mutable" after
2599 a session has been opened. Note that the "mutable" machine
2600 object, on which you may invoke IMachine methods to change its
2601 settings, will be a different object from the immutable IMachine
2602 objects returned by various IVirtualBox methods. To obtain a
2603 mutable IMachine object (upon which you can invoke settings methods),
2604 use the <link to="ISession::machine" /> attribute.
2605
2606 One must always call <link to="ISession::close" /> to release the
2607 lock on the machine, or the machine's state will eventually be
2608 set to "Aborted".
2609
2610 In other words, to change settings on a machine, the following
2611 sequence is typically performed:
2612
2613 <ol>
2614 <li>Call this method (openSession) to have a machine locked for
2615 the current session.</li>
2616
2617 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2618
2619 <li>Change the settings of the machine.</li>
2620
2621 <li>Call <link to="IMachine::saveSettings" />.</li>
2622
2623 <li>Close the session by calling <link to="ISession::close"/>.</li>
2624 </ol>
2625
2626 <result name="E_UNEXPECTED">
2627 Virtual machine not registered.
2628 </result>
2629 <result name="E_ACCESSDENIED">
2630 Process not started by OpenRemoteSession.
2631 </result>
2632 <result name="VBOX_E_OBJECT_NOT_FOUND">
2633 No matching virtual machine found.
2634 </result>
2635 <result name="VBOX_E_INVALID_OBJECT_STATE">
2636 Session already open or being opened.
2637 </result>
2638 <result name="VBOX_E_VM_ERROR">
2639 Failed to assign machine to session.
2640 </result>
2641
2642 </desc>
2643 <param name="session" type="ISession" dir="in">
2644 <desc>
2645 Session object that will represent the opened session after
2646 successful method invocation. This object must not represent
2647 the already open session.
2648 <note>
2649 This session will be automatically closed if the
2650 VirtualBox server is terminated for some reason.
2651 </note>
2652 </desc>
2653 </param>
2654 <param name="machineId" type="uuid" mod="string" dir="in">
2655 <desc>ID of the virtual machine to open a session with.</desc>
2656 </param>
2657 </method>
2658
2659 <method name="openRemoteSession">
2660 <desc>
2661 Spawns a new process that executes a virtual machine (called a
2662 "remote session").
2663
2664 Opening a remote session causes the VirtualBox server to start a new
2665 process that opens a direct session with the given VM. As a result, the
2666 VM is locked by that direct session in the new process, preventing
2667 conflicting changes from other processes. Since sessions act as locks
2668 that prevent conflicting changes, one cannot open a remote session
2669 for a VM that already has another open session (direct or remote), or
2670 is currently in the process of opening one (see <link
2671 to="IMachine::sessionState"/>).
2672
2673 While the remote session still provides some level of control over the
2674 VM execution to the caller (using the <link to="IConsole" /> interface),
2675 not all VM settings are available for modification within the remote
2676 session context.
2677
2678 This operation can take some time (a new VM is started in a new process,
2679 for which memory and other resources need to be set up). Because of this,
2680 an <link to="IProgress" /> is returned to allow the caller to wait for this
2681 asynchronous operation to be completed. Until then, the remote session
2682 object remains in the closed state, and accessing the machine or its
2683 console through it is invalid. It is recommended to use
2684 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2685 completion.
2686
2687 As with all <link to="ISession" /> objects, it is recommended to call
2688 <link to="ISession::close" /> on the local session object once openRemoteSession()
2689 has been called. However, the session's state (see <link to="ISession::state" />)
2690 will not return to "Closed" until the remote session has also closed (i.e.
2691 until the VM is no longer running). In that case, however, the state of
2692 the session will automatically change back to "Closed".
2693
2694 Currently supported session types (values of the @a type
2695 argument) are:
2696 <ul>
2697 <li><tt>"gui"</tt>: VirtualBox Qt GUI session</li>
2698 <li><tt>"vrdp"</tt>: VirtualBox VRDP Server session</li>
2699 <li><tt>"sdl"</tt>: VirtualBox SDL GUI session</li>
2700 </ul>
2701
2702 The @a environment argument is a string containing definitions of
2703 environment variables in the following format:
2704 @code
2705 NAME[=VALUE]\n
2706 NAME[=VALUE]\n
2707 ...
2708 @endcode
2709 where <tt>\\n</tt> is the new line character. These environment
2710 variables will be appended to the environment of the VirtualBox server
2711 process. If an environment variable exists both in the server process
2712 and in this list, the value from this list takes precedence over the
2713 server's variable. If the value of the environment variable is
2714 omitted, this variable will be removed from the resulting environment.
2715 If the environment string is @c null or empty, the server environment
2716 is inherited by the started process as is.
2717
2718 <see>openExistingSession</see>
2719
2720 <result name="E_UNEXPECTED">
2721 Virtual machine not registered.
2722 </result>
2723 <result name="E_INVALIDARG">
2724 Invalid session type @a type.
2725 </result>
2726 <result name="VBOX_E_OBJECT_NOT_FOUND">
2727 No machine matching @a machineId found.
2728 </result>
2729 <result name="VBOX_E_INVALID_OBJECT_STATE">
2730 Session already open or being opened.
2731 </result>
2732 <result name="VBOX_E_IPRT_ERROR">
2733 Launching process for machine failed.
2734 </result>
2735 <result name="VBOX_E_VM_ERROR">
2736 Failed to assign machine to session.
2737 </result>
2738
2739 </desc>
2740 <param name="session" type="ISession" dir="in">
2741 <desc>
2742 Session object that will represent the opened remote session
2743 after successful method invocation (this object must not
2744 represent an already open session).
2745 </desc>
2746 </param>
2747 <param name="machineId" type="uuid" mod="string" dir="in">
2748 <desc>ID of the virtual machine to open a session with.</desc>
2749 </param>
2750 <param name="type" type="wstring" dir="in">
2751 <desc>
2752 Type of the remote session (case sensitive).
2753 </desc>
2754 </param>
2755 <param name="environment" type="wstring" dir="in">
2756 <desc>
2757 Environment to pass to the opened session.
2758 </desc>
2759 </param>
2760 <param name="progress" type="IProgress" dir="return">
2761 <desc>Progress object to track the operation completion.</desc>
2762 </param>
2763 </method>
2764
2765 <method name="openExistingSession">
2766 <desc>
2767 Opens a new remote session with the virtual machine for
2768 which a direct session is already open.
2769
2770 The remote session provides some level of control over the VM
2771 execution (using the IConsole interface) to the caller; however,
2772 within the remote session context, not all VM settings are available
2773 for modification.
2774
2775 As opposed to <link to="#openRemoteSession"/>, the number of
2776 remote sessions opened this way is not limited by the API
2777
2778 <note>
2779 It is an error to open a remote session with the machine that
2780 doesn't have an open direct session.
2781 </note>
2782
2783 <result name="E_UNEXPECTED">
2784 Virtual machine not registered.
2785 </result>
2786 <result name="VBOX_E_OBJECT_NOT_FOUND">
2787 No machine matching @a machineId found.
2788 </result>
2789 <result name="VBOX_E_INVALID_OBJECT_STATE">
2790 Session already open or being opened.
2791 </result>
2792 <result name="VBOX_E_INVALID_SESSION_STATE">
2793 Direct session state not Open.
2794 </result>
2795 <result name="VBOX_E_VM_ERROR">
2796 Failed to get console object from direct session or assign
2797 machine to session.
2798 </result>
2799
2800 <see>openRemoteSession</see>
2801 </desc>
2802 <param name="session" type="ISession" dir="in">
2803 <desc>
2804 Session object that will represent the open remote session
2805 after successful method invocation. This object must not
2806 represent an already open session.
2807 <note>
2808 This session will be automatically closed when the peer
2809 (direct) session dies or gets closed.
2810 </note>
2811 </desc>
2812 </param>
2813 <param name="machineId" type="uuid" mod="string" dir="in">
2814 <desc>ID of the virtual machine to open a session with.</desc>
2815 </param>
2816 </method>
2817
2818 <method name="registerCallback">
2819 <desc>
2820 Registers a new global VirtualBox callback. The methods of the given
2821 callback object will be called by VirtualBox when an appropriate
2822 event occurs.
2823
2824 <result name="E_INVALIDARG">
2825 A @c null callback cannot be registered.
2826 </result>
2827
2828 </desc>
2829 <param name="callback" type="IVirtualBoxCallback" dir="in">
2830 <desc>Callback object to register.</desc>
2831 </param>
2832 </method>
2833
2834 <method name="unregisterCallback">
2835 <desc>
2836 Unregisters the previously registered global VirtualBox callback.
2837
2838 <result name="E_INVALIDARG">
2839 Specified @a callback not registered.
2840 </result>
2841
2842 </desc>
2843 <param name="callback" type="IVirtualBoxCallback" dir="in">
2844 <desc>Callback object to unregister.</desc>
2845 </param>
2846 </method>
2847
2848 <method name="waitForPropertyChange">
2849 <desc>
2850 Blocks the caller until any of the properties represented by the
2851 @a what argument changes the value or until the given timeout interval
2852 expires.
2853
2854 The @a what argument is a comma separated list of property masks that
2855 describe properties the caller is interested in. The property mask is
2856 a string in the following format:
2857
2858 <pre>
2859 [[group.]subgroup.]name
2860 </pre>
2861
2862 where @c name is the property name and @c group, @c subgroup are zero
2863 or more property group specifiers. Each element (group or name) in
2864 the property mask may be either a Latin string or an asterisk symbol
2865 (@c "*") which is used to match any string for the given element. A
2866 property mask that doesn't contain asterisk symbols represents a
2867 single fully qualified property name.
2868
2869 Groups in the fully qualified property name go from more generic (the
2870 left-most part) to more specific (the right-most part). The first
2871 element is usually a name of the object the property belongs to. The
2872 second element may be either a property name, or a child object name,
2873 or an index if the preceding element names an object which is one of
2874 many objects of the same type. This way, property names form a
2875 hierarchy of properties. Here are some examples of property names:
2876
2877 <table>
2878 <tr>
2879 <td><tt>VirtualBox.version</tt></td>
2880 <td><link to="IVirtualBox::version"/> property</td>
2881 </tr>
2882 <tr>
2883 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2884 <td><link to="IMachine::name"/> property of the machine with the
2885 given UUID</td>
2886 </tr>
2887 </table>
2888
2889 Most property names directly correspond to the properties of objects
2890 (components) provided by the VirtualBox library and may be used to
2891 track changes to these properties. However, there may be
2892 pseudo-property names that don't correspond to any existing object's
2893 property directly, as well as there may be object properties that
2894 don't have a corresponding property name that is understood by this
2895 method, and therefore changes to such properties cannot be
2896 tracked. See individual object's property descriptions to get a
2897 fully qualified property name that can be used with this method (if
2898 any).
2899
2900 There is a special property mask @c "*" (i.e. a string consisting of a
2901 single asterisk symbol) that can be used to match all properties.
2902 Below are more examples of property masks:
2903
2904 <table>
2905 <tr>
2906 <td><tt>VirtualBox.*</tt></td>
2907 <td>Track all properties of the VirtualBox object</td>
2908 </tr>
2909 <tr>
2910 <td><tt>Machine.*.name</tt></td>
2911 <td>Track changes to the <link to="IMachine::name"/> property of
2912 all registered virtual machines</td>
2913 </tr>
2914 </table>
2915
2916 <note>
2917 This function is not implemented in the current version of the
2918 product.
2919 </note>
2920 </desc>
2921 <param name="what" type="wstring" dir="in">
2922 <desc>Comma separated list of property masks.</desc>
2923 </param>
2924 <param name="timeout" type="unsigned long" dir="in">
2925 <desc>
2926 Wait timeout in milliseconds.
2927 Specify -1 for an indefinite wait.
2928 </desc>
2929 </param>
2930 <param name="changed" type="wstring" dir="out">
2931 <desc>
2932 Comma separated list of properties that have been changed and caused
2933 this method to return to the caller.
2934 </desc>
2935 </param>
2936 <param name="values" type="wstring" dir="out">
2937 <desc>Reserved, not currently used.</desc>
2938 </param>
2939 </method>
2940
2941 <!--method name="createDHCPServerForInterface">
2942 <desc>
2943 Creates a dhcp server settings to be used for the given interface
2944 <result name="E_INVALIDARG">
2945 Host network interface @a name already exists.
2946 </result>
2947 </desc>
2948 <param name="interface" type="IHostNetworkInterface" dir="in">
2949 <desc>Network Interface</desc>
2950 </param>
2951 <param name="server" type="IDHCPServer" dir="out">
2952 <desc>Dhcp server settings</desc>
2953 </param>
2954 </method-->
2955
2956 <method name="createDHCPServer">
2957 <desc>
2958 Creates a dhcp server settings to be used for the given internal network name
2959 <result name="E_INVALIDARG">
2960 Host network interface @a name already exists.
2961 </result>
2962 </desc>
2963 <param name="name" type="wstring" dir="in">
2964 <desc>server name</desc>
2965 </param>
2966 <param name="server" type="IDHCPServer" dir="return">
2967 <desc>Dhcp server settings</desc>
2968 </param>
2969 </method>
2970
2971 <method name="findDHCPServerByNetworkName">
2972 <desc>
2973 Searches a dhcp server settings to be used for the given internal network name
2974 <result name="E_INVALIDARG">
2975 Host network interface @a name already exists.
2976 </result>
2977
2978 </desc>
2979 <param name="name" type="wstring" dir="in">
2980 <desc>server name</desc>
2981 </param>
2982 <param name="server" type="IDHCPServer" dir="return">
2983 <desc>Dhcp server settings</desc>
2984 </param>
2985 </method>
2986
2987 <!--method name="findDHCPServerForInterface">
2988 <desc>
2989 Searches a dhcp server settings to be used for the given interface
2990 <result name="E_INVALIDARG">
2991 Host network interface @a name already exists.
2992 </result>
2993 </desc>
2994 <param name="interface" type="IHostNetworkInterface" dir="in">
2995 <desc>Network Interface</desc>
2996 </param>
2997 <param name="server" type="IDHCPServer" dir="out">
2998 <desc>Dhcp server settings</desc>
2999 </param>
3000 </method-->
3001
3002 <method name="removeDHCPServer">
3003 <desc>
3004 Removes the dhcp server settings
3005 <result name="E_INVALIDARG">
3006 Host network interface @a name already exists.
3007 </result>
3008 </desc>
3009 <param name="server" type="IDHCPServer" dir="in">
3010 <desc>Dhcp server settings to be removed</desc>
3011 </param>
3012 </method>
3013
3014
3015 <method name="checkFirmwarePresent">
3016 <desc>
3017 Check if this VirtualBox installation has a firmware
3018 of the given type available, either system-wide or per-user.
3019 Optionally, this may return a hint where this firmware can be
3020 downloaded from.
3021 </desc>
3022 <param name="firmwareType" type="FirmwareType" dir="in">
3023 <desc>
3024 Type of firmware to check.
3025 </desc>
3026 </param>
3027 <param name="version" type="wstring" dir="in">
3028 <desc>Expected version number, usually empty string (presently ignored).</desc>
3029 </param>
3030
3031 <param name="url" type="wstring" dir="out">
3032 <desc>
3033 Suggested URL to download this firmware from.
3034 </desc>
3035 </param>
3036
3037 <param name="file" type="wstring" dir="out">
3038 <desc>
3039 Filename of firmware, only valid if result == TRUE.
3040 </desc>
3041 </param>
3042
3043 <param name="result" type="boolean" dir="return">
3044 <desc>If firmware of this type and version is available.</desc>
3045 </param>
3046 </method>
3047
3048 </interface>
3049
3050 <!--
3051 // IVFSExplorer
3052 /////////////////////////////////////////////////////////////////////////
3053 -->
3054
3055 <enum
3056 name="VFSType"
3057 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
3058 >
3059 <desc>
3060 Virtual file systems supported by VFSExplorer.
3061 </desc>
3062
3063 <const name="File" value="1" />
3064 <const name="Cloud" value="2" />
3065 <const name="S3" value="3" />
3066 <const name="WebDav" value="4" />
3067 </enum>
3068
3069 <enum
3070 name="VFSFileType"
3071 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
3072 >
3073 <desc>
3074 File types known by VFSExplorer.
3075 </desc>
3076
3077 <const name="Unknown" value="1" />
3078 <const name="Fifo" value="2" />
3079 <const name="DevChar" value="3" />
3080 <const name="Directory" value="4" />
3081 <const name="DevBlock" value="5" />
3082 <const name="File" value="6" />
3083 <const name="SymLink" value="7" />
3084 <const name="Socket" value="8" />
3085 <const name="WhiteOut" value="9" />
3086 </enum>
3087
3088 <interface
3089 name="IVFSExplorer" extends="$unknown"
3090 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
3091 wsmap="managed"
3092 >
3093 <desc>
3094 The VFSExplorer interface unifies access to different file system
3095 types. This includes local file systems as well remote file systems like
3096 S3. For a list of supported types see <link to="VFSType" />.
3097 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
3098 </desc>
3099
3100 <attribute name="path" type="wstring" readonly="yes">
3101 <desc>Returns the current path in the virtual file system.</desc>
3102 </attribute>
3103
3104 <attribute name="type" type="VFSType" readonly="yes">
3105 <desc>Returns the file system type which is currently in use.</desc>
3106 </attribute>
3107
3108 <method name="update">
3109 <desc>Updates the internal list of files/directories from the
3110 current directory level. Use <link to="#entryList" /> to get the full list
3111 after a call to this method.</desc>
3112
3113 <param name="aProgress" type="IProgress" dir="return">
3114 <desc>Progress object to track the operation completion.</desc>
3115 </param>
3116 </method>
3117
3118 <method name="cd">
3119 <desc>Change the current directory level.</desc>
3120
3121 <param name="aDir" type="wstring" dir="in">
3122 <desc>The name of the directory to go in.</desc>
3123 </param>
3124
3125 <param name="aProgress" type="IProgress" dir="return">
3126 <desc>Progress object to track the operation completion.</desc>
3127 </param>
3128 </method>
3129
3130 <method name="cdUp">
3131 <desc>Go one directory upwards from the current directory level.</desc>
3132
3133 <param name="aProgress" type="IProgress" dir="return">
3134 <desc>Progress object to track the operation completion.</desc>
3135 </param>
3136 </method>
3137
3138 <method name="entryList">
3139 <desc>Returns a list of files/directories after a call to <link
3140 to="#update" />. The user is responsible for keeping this internal
3141 list up do date.</desc>
3142
3143 <param name="aNames" type="wstring" safearray="yes" dir="out">
3144 <desc>The list of names for the entries.</desc>
3145 </param>
3146
3147 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
3148 <desc>The list of types for the entries.</desc>
3149 </param>
3150 </method>
3151
3152 <method name="exists">
3153 <desc>Checks if the given file list exists in the current directory
3154 level.</desc>
3155
3156 <param name="aNames" type="wstring" safearray="yes" dir="in">
3157 <desc>The names to check.</desc>
3158 </param>
3159
3160 <param name="aExists" type="wstring" safearray="yes" dir="return">
3161 <desc>The names which exist.</desc>
3162 </param>
3163 </method>
3164
3165 <method name="remove">
3166 <desc>Deletes the given files in the current directory level.</desc>
3167
3168 <param name="aNames" type="wstring" safearray="yes" dir="in">
3169 <desc>The names to remove.</desc>
3170 </param>
3171
3172 <param name="aProgress" type="IProgress" dir="return">
3173 <desc>Progress object to track the operation completion.</desc>
3174 </param>
3175 </method>
3176
3177 </interface>
3178
3179 <!--
3180 // IAppliance
3181 /////////////////////////////////////////////////////////////////////////
3182 -->
3183
3184 <interface
3185 name="IAppliance" extends="$unknown"
3186 uuid="e3ba9ab9-ac2c-4266-8bd2-91c4bf721ceb"
3187 wsmap="managed"
3188 >
3189 <desc>
3190 Represents a platform-independent appliance in OVF format. An instance of this is returned
3191 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3192 appliances with VirtualBox.
3193
3194 The OVF standard suggests two different physical file formats:
3195
3196 <ol>
3197 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
3198 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
3199 this descriptor file references other files, as OVF appliances distributed as a set of
3200 files most likely do, those files must be in the same directory as the descriptor file.</li>
3201
3202 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
3203 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3204 files and optionally other files.
3205
3206 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3207 be added with a later version.</li>
3208 </ol>
3209
3210 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3211 <link to="IMachine" /> involves the following sequence of API calls:
3212
3213 <ol>
3214 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3215 </li>
3216
3217 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3218 would like to import. So long as this file is syntactically valid, this will succeed
3219 and return an instance of IAppliance that contains the parsed data from the OVF file.
3220 </li>
3221
3222 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3223 contents of the IAppliance attributes accordingly. These can be inspected by a
3224 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3225 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3226 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3227 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3228 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3229 The GUI can then give the user the option to confirm and/or change these suggestions.
3230 </li>
3231
3232 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3233 virtual system to override the suggestions made by the interpret() routine.
3234 </li>
3235
3236 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3237 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3238 virtual system descriptions.
3239 </li>
3240 </ol>
3241
3242 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3243
3244 <ol>
3245 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3246 an empty IAppliance object.
3247 </li>
3248
3249 <li>For each machine you would like to export, call <link to="IMachine::export" />
3250 with the IAppliance object you just created. This creates an instance of
3251 <link to="IVirtualSystemDescription" /> inside the appliance.
3252 </li>
3253
3254 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3255 virtual system to override the suggestions made by the export() routine.
3256 </li>
3257
3258 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3259 file written.</li>
3260 </ol>
3261
3262 </desc>
3263
3264 <attribute name="path" type="wstring" readonly="yes">
3265 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3266 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3267 <link to="#write" /> (for export).
3268 This attribute is empty until one of these methods has been called.
3269 </desc>
3270 </attribute>
3271
3272 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3273 <desc>
3274 Array of virtual disk definitions. One such description exists for each
3275 disk definition in the OVF; each string array item represents one such piece of
3276 disk information, with the information fields separated by tab (\\t) characters.
3277
3278 The caller should be prepared for additional fields being appended to
3279 this string in future versions of VirtualBox and therefore check for
3280 the number of tabs in the strings returned.
3281
3282 In the current version, the following eight fields are returned per string
3283 in the array:
3284
3285 <ol>
3286 <li>Disk ID (unique string identifier given to disk)</li>
3287
3288 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3289
3290 <li>Populated size (optional unsigned integer indicating the current size of the
3291 disk; can be approximate; -1 if unspecified)</li>
3292
3293 <li>Format (string identifying the disk format, typically
3294 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3295
3296 <li>Reference (where to find the disk image, typically a file name; if empty,
3297 then the disk should be created on import)</li>
3298
3299 <li>Image size (optional unsigned integer indicating the size of the image,
3300 which need not necessarily be the same as the values specified above, since
3301 the image may be compressed or sparse; -1 if not specified)</li>
3302
3303 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3304 presently unsupported and always -1)</li>
3305
3306 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3307 </ol>
3308 </desc>
3309 </attribute>
3310
3311 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3312 <desc> Array of virtual system descriptions. One such description is created
3313 for each virtual system found in the OVF.
3314 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3315 (for export) has been called.
3316 </desc>
3317 </attribute>
3318
3319 <method name="read">
3320 <desc>
3321 Reads an OVF file into the appliance object.
3322
3323 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3324 mere fact that this method returns successfully does not mean that VirtualBox supports all
3325 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3326 </desc>
3327 <param name="file" type="wstring" dir="in">
3328 <desc>
3329 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3330 on whether the appliance is distributed as a set of files or as a single file, respectively).
3331 </desc>
3332 </param>
3333 <param name="aProgress" type="IProgress" dir="return">
3334 <desc></desc>
3335 </param>
3336 </method>
3337
3338 <method name="interpret">
3339 <desc>
3340 Interprets the OVF data that was read when the appliance was constructed. After
3341 calling this method, one can inspect the
3342 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3343 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3344 the appliance.
3345
3346 Calling this method is the second step of importing an appliance into VirtualBox;
3347 see <link to="IAppliance" /> for an overview.
3348
3349 After calling this method, one should call <link to="#getWarnings" /> to find out
3350 if problems were encountered during the processing which might later lead to
3351 errors.
3352 </desc>
3353 </method>
3354
3355 <method name="importMachines">
3356 <desc>
3357 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3358 and other interfaces that match the information contained in the appliance as
3359 closely as possible, as represented by the import instructions in the
3360 <link to="#virtualSystemDescriptions" /> array.
3361
3362 Calling this method is the final step of importing an appliance into VirtualBox;
3363 see <link to="IAppliance" /> for an overview.
3364
3365 Since importing the appliance will most probably involve copying and converting
3366 disk images, which can take a long time, this method operates asynchronously and
3367 returns an IProgress object to allow the caller to monitor the progress.
3368 </desc>
3369
3370 <param name="aProgress" type="IProgress" dir="return">
3371 <desc></desc>
3372 </param>
3373 </method>
3374
3375 <method name="createVFSExplorer">
3376 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
3377
3378 <param name="aUri" type="wstring" dir="in">
3379 <desc>The URI describing the file system to use.</desc>
3380 </param>
3381
3382 <param name="aExplorer" type="IVFSExplorer" dir="return">
3383 <desc></desc>
3384 </param>
3385 </method>
3386
3387 <method name="write">
3388 <desc>
3389 Writes the contents of the appliance exports into a new OVF file.
3390
3391 Calling this method is the final step of exporting an appliance from VirtualBox;
3392 see <link to="IAppliance" /> for an overview.
3393
3394 Since exporting the appliance will most probably involve copying and converting
3395 disk images, which can take a long time, this method operates asynchronously and
3396 returns an IProgress object to allow the caller to monitor the progress.
3397 </desc>
3398 <param name="format" type="wstring" dir="in">
3399 <desc>
3400 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
3401 future versions of VirtualBox may support additional formats.
3402 </desc>
3403 </param>
3404 <param name="path" type="wstring" dir="in">
3405 <desc>
3406 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3407 on whether the appliance is distributed as a set of files or as a single file, respectively).
3408 </desc>
3409 </param>
3410 <param name="aProgress" type="IProgress" dir="return">
3411 <desc>Progress object to track the operation completion.</desc>
3412 </param>
3413 </method>
3414
3415 <method name="getWarnings">
3416 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3417
3418 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3419 <desc></desc>
3420 </param>
3421 </method>
3422
3423 </interface>
3424
3425 <enum
3426 name="VirtualSystemDescriptionType"
3427 uuid="aacc58de-5b45-4f82-ae2e-dd9a824fc3b5"
3428 >
3429 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3430 a configuration value.</desc>
3431
3432 <const name="Ignore" value="1" />
3433 <const name="OS" value="2" />
3434 <const name="Name" value="3" />
3435 <const name="Product" value="4" />
3436 <const name="Vendor" value="5" />
3437 <const name="Version" value="6" />
3438 <const name="ProductUrl" value="7" />
3439 <const name="VendorUrl" value="8" />
3440 <const name="Description" value="9" />
3441 <const name="License" value="10" />
3442 <const name="Miscellaneous" value="11" />
3443 <const name="CPU" value="12" />
3444 <const name="Memory" value="13" />
3445 <const name="HardDiskControllerIDE" value="14" />
3446 <const name="HardDiskControllerSATA" value="15" />
3447 <const name="HardDiskControllerSCSI" value="16" />
3448 <const name="HardDiskImage" value="17" />
3449 <const name="Floppy" value="18" />
3450 <const name="CDROM" value="19" />
3451 <const name="NetworkAdapter" value="20" />
3452 <const name="USBController" value="21" />
3453 <const name="SoundCard" value="22" />
3454
3455 </enum>
3456
3457 <enum
3458 name="VirtualSystemDescriptionValueType"
3459 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3460 >
3461 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
3462 type to fetch.</desc>
3463
3464 <const name="Reference" value="1" />
3465 <const name="Original" value="2" />
3466 <const name="Auto" value="3" />
3467 <const name="ExtraConfig" value="4" />
3468
3469 </enum>
3470
3471 <interface
3472 name="IVirtualSystemDescription" extends="$unknown"
3473 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3474 wsmap="managed"
3475 >
3476
3477 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3478 After <link to="IAppliance::interpret" /> has been called, that array contains
3479 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3480 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3481 into VirtualBox.
3482 </desc>
3483
3484 <attribute name="count" type="unsigned long" readonly="yes">
3485 <desc>Return the number of virtual system description entries.</desc>
3486 </attribute>
3487
3488 <method name="getDescription">
3489 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3490 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3491
3492 The list below identifies the value sets that are possible depending on the
3493 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3494 the array item with the same index in aOvfValues[] will contain the original value as contained
3495 in the OVF file (just for informational purposes), and the corresponding item in aVBoxValues[]
3496 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3497 the aExtraConfigValues[] array item may also be used.
3498
3499 <ul>
3500 <li>
3501 "OS": the guest operating system type. There must be exactly one such array item on import. The
3502 corresponding item in aVBoxValues[] contains the suggested guest operating system for VirtualBox.
3503 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3504 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF.
3505 </li>
3506 <li>
3507 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3508 if none is present on import, then an automatic name will be created from the operating system
3509 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3510 from the OVF file, and aVBoxValues[] will contain a suggestion for a unique VirtualBox
3511 <link to="IMachine" /> name that does not exist yet.
3512 </li>
3513 <li>
3514 "Description": an arbitrary description.
3515 </li>
3516 <li>
3517 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3518 code to display such a license for agreement; the Main API does not enforce any such policy.
3519 </li>
3520 <li>
3521 Miscellaneous: reserved for future use.
3522 </li>
3523 <li>
3524 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3525 </li>
3526 <li>
3527 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3528 is present on import, then VirtualBox will set a meaningful default based on the operating system
3529 type.
3530 </li>
3531 <li>
3532 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3533 has no value in aOvfValues[] or aVBoxValues[].
3534 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3535 type can use to specify which hard disk controller a virtual disk should be connected to.
3536 </li>
3537 <li>
3538 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3539 has no value in aOvfValues[] or aVBoxValues[].
3540 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3541 </li>
3542 <li>
3543 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3544 The items in aOvfValues[] and aVBoxValues[] will either be "LsiLogic" or "BusLogic".
3545 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3546 </li>
3547 <li>
3548 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3549 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3550
3551 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3552 a path since the image file should be in the same location as the OVF file itself), whereas the
3553 item in aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
3554 hard disk image. This means that on import the image will be copied and converted from the
3555 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3556 On import, the target image will also be registered with VirtualBox.
3557
3558 The matching item in the aExtraConfigValues[] array must contain a string of the following
3559 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3560 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3561 the image to. That number must be the index of an array item with one of the hard disk controller
3562 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3563 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3564 this can range from 0-3 (which VirtualBox will interpret as primary master, primary slave, secondary master and
3565 secondary slave. For SATA and SCSI controllers, the channel can range from 0-29.
3566 </li>
3567 <li>
3568 "CDROM": a virtual CD-ROM drive. The matching item in aExtraConfigValue[] contains the same
3569 attachment information as with "HardDiskImage" items.
3570 </li>
3571 <li>
3572 "CDROM": a virtual floppy drive. The matching item in aExtraConfigValue[] contains the same
3573 attachment information as with "HardDiskImage" items.
3574 </li>
3575 <li>
3576 "NetworkAdapter": a network adapter. The array item in aVBoxValues[] will specify the hardware
3577 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3578 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3579 </li>
3580 <li>
3581 "USBController": a USB controller. There can be at most one such item. If and only if such an
3582 item ispresent, USB support will be enabled for the new virtual machine.
3583 </li>
3584 <li>
3585 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3586 present, sound support will be enabled for the new virtual machine. Note that the virtual
3587 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3588 may be different from the virtual soundcard expected by the appliance.
3589 </li>
3590 </ul>
3591
3592 </desc>
3593
3594 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3595 <desc></desc>
3596 </param>
3597
3598 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3599 <desc></desc>
3600 </param>
3601
3602 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3603 <desc></desc>
3604 </param>
3605
3606 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3607 <desc></desc>
3608 </param>
3609
3610 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3611 <desc></desc>
3612 </param>
3613
3614 </method>
3615
3616 <method name="getDescriptionByType">
3617 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3618 should be returned.</desc>
3619
3620 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3621 <desc></desc>
3622 </param>
3623
3624 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3625 <desc></desc>
3626 </param>
3627
3628 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3629 <desc></desc>
3630 </param>
3631
3632 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3633 <desc></desc>
3634 </param>
3635
3636 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3637 <desc></desc>
3638 </param>
3639
3640 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3641 <desc></desc>
3642 </param>
3643
3644 </method>
3645
3646 <method name="getValuesByType">
3647 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3648 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3649 values.</desc>
3650
3651 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3652 <desc></desc>
3653 </param>
3654
3655 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3656 <desc></desc>
3657 </param>
3658
3659 <param name="aValues" type="wstring" dir="return" safearray="yes">
3660 <desc></desc>
3661 </param>
3662
3663 </method>
3664
3665 <method name="setFinalValues">
3666 <desc>
3667 This method allows the appliance's user to change the configuration for the virtual
3668 system descriptions. For each array item returned from <link to="#getDescription" />,
3669 you must pass in one boolean value and one configuration value.
3670
3671 Each item in the boolean array determines whether the particular configuration item
3672 should be enabled.
3673 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3674 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3675 and SoundCard.
3676
3677 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3678 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
3679 the configuration remains unchanged. Please see the documentation for getDescription()
3680 for valid configuration values for the individual array item types. If the
3681 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
3682 </desc>
3683
3684 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3685 <desc></desc>
3686 </param>
3687
3688 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
3689 <desc></desc>
3690 </param>
3691
3692 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3693 <desc></desc>
3694 </param>
3695 </method>
3696
3697 <method name="addDescription">
3698 <desc>
3699 This method adds an additional description entry to the stack of already
3700 available descriptions for this virtual system. This is handy for writing
3701 values which aren't directly supported by VirtualBox. One example would
3702 be the License type of <link to="VirtualSystemDescriptionType" />.
3703 </desc>
3704
3705 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3706 <desc></desc>
3707 </param>
3708
3709 <param name="aVBoxValue" type="wstring" dir="in">
3710 <desc></desc>
3711 </param>
3712
3713 <param name="aExtraConfigValue" type="wstring" dir="in">
3714 <desc></desc>
3715 </param>
3716 </method>
3717 </interface>
3718
3719
3720 <!--
3721 // IMachine
3722 /////////////////////////////////////////////////////////////////////////
3723 -->
3724
3725 <interface
3726 name="IInternalMachineControl" extends="$unknown"
3727 uuid="35d8d838-d066-447d-927a-fd93afdbec90"
3728 internal="yes"
3729 wsmap="suppress"
3730 >
3731 <method name="setRemoveSavedState">
3732 <desc>
3733 Updates the flag whether saved state is removed on a machine state
3734 change from Saved to PoweredOff.
3735 </desc>
3736 <param name="aRemove" type="boolean" dir="in"/>
3737 </method>
3738
3739 <method name="updateState">
3740 <desc>
3741 Updates the VM state.
3742 <note>
3743 This operation will also update the settings file with
3744 the correct information about the saved state file
3745 and delete this file from disk when appropriate.
3746 </note>
3747 </desc>
3748 <param name="state" type="MachineState" dir="in"/>
3749 </method>
3750
3751 <method name="getIPCId">
3752 <param name="id" type="wstring" dir="return"/>
3753 </method>
3754
3755 <method name="runUSBDeviceFilters">
3756 <desc>
3757 Asks the server to run USB devices filters of the associated
3758 machine against the given USB device and tell if there is
3759 a match.
3760 <note>
3761 Intended to be used only for remote USB devices. Local
3762 ones don't require to call this method (this is done
3763 implicitly by the Host and USBProxyService).
3764 </note>
3765 </desc>
3766 <param name="device" type="IUSBDevice" dir="in"/>
3767 <param name="matched" type="boolean" dir="out"/>
3768 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3769 </method>
3770
3771 <method name="captureUSBDevice">
3772 <desc>
3773 Requests a capture of the given host USB device.
3774 When the request is completed, the VM process will
3775 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3776 notification.
3777 </desc>
3778 <param name="id" type="uuid" mod="string" dir="in"/>
3779 </method>
3780
3781 <method name="detachUSBDevice">
3782 <desc>
3783 Notification that a VM is going to detach (@a done = @c false) or has
3784 already detached (@a done = @c true) the given USB device.
3785 When the @a done = @c true request is completed, the VM process will
3786 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3787 notification.
3788 <note>
3789 In the @a done = @c true case, the server must run its own filters
3790 and filters of all VMs but this one on the detached device
3791 as if it were just attached to the host computer.
3792 </note>
3793 </desc>
3794 <param name="id" type="uuid" mod="string" dir="in"/>
3795 <param name="done" type="boolean" dir="in"/>
3796 </method>
3797
3798 <method name="autoCaptureUSBDevices">
3799 <desc>
3800 Requests a capture all matching USB devices attached to the host.
3801 When the request is completed, the VM process will
3802 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3803 notification per every captured device.
3804 </desc>
3805 </method>
3806
3807 <method name="detachAllUSBDevices">
3808 <desc>
3809 Notification that a VM that is being powered down. The done
3810 parameter indicates whether which stage of the power down
3811 we're at. When @a done = @c false the VM is announcing its
3812 intentions, while when @a done = @c true the VM is reporting
3813 what it has done.
3814 <note>
3815 In the @a done = @c true case, the server must run its own filters
3816 and filters of all VMs but this one on all detach devices as
3817 if they were just attached to the host computer.
3818 </note>
3819 </desc>
3820 <param name="done" type="boolean" dir="in"/>
3821 </method>
3822
3823 <method name="onSessionEnd">
3824 <desc>
3825 Triggered by the given session object when the session is about
3826 to close normally.
3827 </desc>
3828 <param name="session" type="ISession" dir="in">
3829 <desc>Session that is being closed</desc>
3830 </param>
3831 <param name="progress" type="IProgress" dir="return">
3832 <desc>
3833 Used to wait until the corresponding machine is actually
3834 dissociated from the given session on the server.
3835 Returned only when this session is a direct one.
3836 </desc>
3837 </param>
3838 </method>
3839
3840 <method name="beginSavingState">
3841 <desc>
3842 Called by the VM process to inform the server it wants to
3843 save the current state and stop the VM execution.
3844 </desc>
3845 <param name="progress" type="IProgress" dir="in">
3846 <desc>
3847 Progress object created by the VM process to wait until
3848 the state is saved.
3849 </desc>
3850 </param>
3851 <param name="stateFilePath" type="wstring" dir="out">
3852 <desc>
3853 File path the VM process must save the execution state to.
3854 </desc>
3855 </param>
3856 </method>
3857
3858 <method name="endSavingState">
3859 <desc>
3860 Called by the VM process to inform the server that saving
3861 the state previously requested by #beginSavingState is either
3862 successfully finished or there was a failure.
3863
3864 <result name="VBOX_E_FILE_ERROR">
3865 Settings file not accessible.
3866 </result>
3867 <result name="VBOX_E_XML_ERROR">
3868 Could not parse the settings file.
3869 </result>
3870
3871 </desc>
3872
3873 <param name="success" type="boolean" dir="in">
3874 <desc>@c true to indicate success and @c false otherwise.
3875 </desc>
3876 </param>
3877 </method>
3878
3879 <method name="adoptSavedState">
3880 <desc>
3881 Gets called by IConsole::adoptSavedState.
3882 <result name="VBOX_E_FILE_ERROR">
3883 Invalid saved state file path.
3884 </result>
3885 </desc>
3886 <param name="savedStateFile" type="wstring" dir="in">
3887 <desc>Path to the saved state file to adopt.</desc>
3888 </param>
3889 </method>
3890
3891 <method name="beginTakingSnapshot">
3892 <desc>
3893 Called from the VM process to request from the server to perform the
3894 server-side actions of creating a snapshot (creating differencing images
3895 and the snapshot object).
3896
3897 <result name="VBOX_E_FILE_ERROR">
3898 Settings file not accessible.
3899 </result>
3900 <result name="VBOX_E_XML_ERROR">
3901 Could not parse the settings file.
3902 </result>
3903 </desc>
3904 <param name="initiator" type="IConsole" dir="in">
3905 <desc>The console object that initiated this call.</desc>
3906 </param>
3907 <param name="name" type="wstring" dir="in">
3908 <desc>Snapshot name.</desc>
3909 </param>
3910 <param name="description" type="wstring" dir="in">
3911 <desc>Snapshot description.</desc>
3912 </param>
3913 <param name="consoleProgress" type="IProgress" dir="in">
3914 <desc>
3915 Progress object created by the VM process tracking the
3916 snapshot's progress. This has the following sub-operations:
3917 <ul>
3918 <li>setting up (weight 1);</li>
3919 <li>one for each medium attachment that needs a differencing image (weight 1 each);</li>
3920 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3921 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3922 <li>finishing up (weight 1)</li>
3923 </ul>
3924 </desc>
3925 </param>
3926 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3927 <desc>
3928 Whether this is an online snapshot (i.e. the machine is running).
3929 </desc>
3930 </param>
3931 <param name="stateFilePath" type="wstring" dir="out">
3932 <desc>
3933 File path the VM process must save the execution state to.
3934 </desc>
3935 </param>
3936 </method>
3937
3938 <method name="endTakingSnapshot">
3939 <desc>
3940 Called by the VM process to inform the server that the snapshot
3941 previously requested by #beginTakingSnapshot is either
3942 successfully taken or there was a failure.
3943 </desc>
3944
3945 <param name="success" type="boolean" dir="in">
3946 <desc>@c true to indicate success and @c false otherwise</desc>
3947 </param>
3948 </method>
3949
3950 <method name="deleteSnapshot">
3951 <desc>
3952 Gets called by IConsole::deleteSnapshot.
3953 <result name="VBOX_E_INVALID_OBJECT_STATE">
3954 Snapshot has more than one child snapshot.
3955 </result>
3956 </desc>
3957 <param name="initiator" type="IConsole" dir="in">
3958 <desc>The console object that initiated this call.</desc>
3959 </param>
3960 <param name="id" type="uuid" mod="string" dir="in">
3961 <desc>UUID of the snapshot to discard.</desc>
3962 </param>
3963 <param name="machineState" type="MachineState" dir="out">
3964 <desc>New machine state after this operation is started.</desc>
3965 </param>
3966 <param name="progress" type="IProgress" dir="return">
3967 <desc>Progress object to track the operation completion.</desc>
3968 </param>
3969 </method>
3970
3971 <method name="restoreSnapshot">
3972 <desc>
3973 Gets called by IConsole::RestoreSnapshot.
3974 </desc>
3975 <param name="initiator" type="IConsole" dir="in">
3976 <desc>The console object that initiated this call.</desc>
3977 </param>
3978 <param name="snapshot" type="ISnapshot" dir="in">
3979 <desc>The snapshot to restore the VM state from.</desc>
3980 </param>
3981 <param name="machineState" type="MachineState" dir="out">
3982 <desc>New machine state after this operation is started.</desc>
3983 </param>
3984 <param name="progress" type="IProgress" dir="return">
3985 <desc>Progress object to track the operation completion.</desc>
3986 </param>
3987 </method>
3988
3989 <method name="pullGuestProperties">
3990 <desc>
3991 Get the list of the guest properties matching a set of patterns along
3992 with their values, time stamps and flags and give responsibility for
3993 managing properties to the console.
3994 </desc>
3995 <param name="name" type="wstring" dir="out" safearray="yes">
3996 <desc>
3997 The names of the properties returned.
3998 </desc>
3999 </param>
4000 <param name="value" type="wstring" dir="out" safearray="yes">
4001 <desc>
4002 The values of the properties returned. The array entries match the
4003 corresponding entries in the @a name array.
4004 </desc>
4005 </param>
4006 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
4007 <desc>
4008 The time stamps of the properties returned. The array entries match
4009 the corresponding entries in the @a name array.
4010 </desc>
4011 </param>
4012 <param name="flags" type="wstring" dir="out" safearray="yes">
4013 <desc>
4014 The flags of the properties returned. The array entries match the
4015 corresponding entries in the @a name array.
4016 </desc>
4017 </param>
4018 </method>
4019
4020 <method name="pushGuestProperties">
4021 <desc>
4022 Set the list of the guest properties matching a set of patterns along
4023 with their values, time stamps and flags and return responsibility for
4024 managing properties to IMachine.
4025 </desc>
4026 <param name="name" type="wstring" dir="in" safearray="yes">
4027 <desc>
4028 The names of the properties.
4029 </desc>
4030 </param>
4031 <param name="value" type="wstring" dir="in" safearray="yes">
4032 <desc>
4033 The values of the properties. The array entries match the
4034 corresponding entries in the @a name array.
4035 </desc>
4036 </param>
4037 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
4038 <desc>
4039 The time stamps of the properties. The array entries match
4040 the corresponding entries in the @a name array.
4041 </desc>
4042 </param>
4043 <param name="flags" type="wstring" dir="in" safearray="yes">
4044 <desc>
4045 The flags of the properties. The array entries match the
4046 corresponding entries in the @a name array.
4047 </desc>
4048 </param>
4049 </method>
4050 <method name="pushGuestProperty">
4051 <desc>
4052 Update a single guest property in IMachine.
4053 </desc>
4054 <param name="name" type="wstring" dir="in">
4055 <desc>
4056 The name of the property to be updated.
4057 </desc>
4058 </param>
4059 <param name="value" type="wstring" dir="in">
4060 <desc>
4061 The value of the property.
4062 </desc>
4063 </param>
4064 <param name="timestamp" type="unsigned long long" dir="in">
4065 <desc>
4066 The timestamp of the property.
4067 </desc>
4068 </param>
4069 <param name="flags" type="wstring" dir="in">
4070 <desc>
4071 The flags of the property.
4072 </desc>
4073 </param>
4074 </method>
4075
4076 <method name="lockMedia">
4077 <desc>
4078 Locks all media attached to the machine for writing and parents of
4079 attached differencing media (if any) for reading. This operation is
4080 atomic so that if it fails no media is actually locked.
4081
4082 This method is intended to be called when the machine is in Starting or
4083 Restoring state. The locked media will be automatically unlocked when
4084 the machine is powered off or crashed.
4085 </desc>
4086 </method>
4087 <method name="unlockMedia">
4088 <desc>
4089 Unlocks all media previously locked using
4090 <link to="IInternalMachineControl::lockMedia"/>.
4091
4092 This method is intended to be used with teleportation so that it is
4093 possible to teleport between processes on the same machine.
4094 </desc>
4095 </method>
4096 </interface>
4097
4098 <interface
4099 name="IBIOSSettings" extends="$unknown"
4100 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
4101 wsmap="managed"
4102 >
4103 <desc>
4104 The IBIOSSettings interface represents BIOS settings of the virtual
4105 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
4106 </desc>
4107 <attribute name="logoFadeIn" type="boolean">
4108 <desc>Fade in flag for BIOS logo animation.</desc>
4109 </attribute>
4110
4111 <attribute name="logoFadeOut" type="boolean">
4112 <desc>Fade out flag for BIOS logo animation.</desc>
4113 </attribute>
4114
4115 <attribute name="logoDisplayTime" type="unsigned long">
4116 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
4117 </attribute>
4118
4119 <attribute name="logoImagePath" type="wstring">
4120 <desc>
4121 Local file system path for external BIOS splash image. Empty string
4122 means the default image is shown on boot.
4123 </desc>
4124 </attribute>
4125
4126 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
4127 <desc>Mode of the BIOS boot device menu.</desc>
4128 </attribute>
4129
4130 <attribute name="ACPIEnabled" type="boolean">
4131 <desc>ACPI support flag.</desc>
4132 </attribute>
4133
4134 <attribute name="IOAPICEnabled" type="boolean">
4135 <desc>
4136 IO APIC support flag. If set, VirtualBox will provide an IO APIC
4137 and support IRQs above 15.
4138 </desc>
4139 </attribute>
4140
4141 <attribute name="timeOffset" type="long long">
4142 <desc>
4143 Offset in milliseconds from the host system time. This allows for
4144 guests running with a different system date/time than the host.
4145 It is equivalent to setting the system date/time in the BIOS except
4146 it is not an absolute value but a relative one. Guest Additions
4147 time synchronization honors this offset.
4148 </desc>
4149 </attribute>
4150
4151 <attribute name="PXEDebugEnabled" type="boolean">
4152 <desc>
4153 PXE debug logging flag. If set, VirtualBox will write extensive
4154 PXE trace information to the release log.
4155 </desc>
4156 </attribute>
4157
4158 </interface>
4159
4160 <interface
4161 name="IMachine" extends="$unknown"
4162 uuid="99404f50-dd10-40d3-889b-dd2f79f1e95e"
4163 wsmap="managed"
4164 >
4165 <desc>
4166 The IMachine interface represents a virtual machine, or guest, created
4167 in VirtualBox.
4168
4169 This interface is used in two contexts. First of all, a collection of
4170 objects implementing this interface is stored in the
4171 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
4172 machines that are currently registered with this VirtualBox
4173 installation. Also, once a session has been opened for the given virtual
4174 machine (e.g. the virtual machine is running), the machine object
4175 associated with the open session can be queried from the session object;
4176 see <link to="ISession"/> for details.
4177
4178 The main role of this interface is to expose the settings of the virtual
4179 machine and provide methods to change various aspects of the virtual
4180 machine's configuration. For machine objects stored in the
4181 <link to="IVirtualBox::machines"/> collection, all attributes are
4182 read-only unless explicitly stated otherwise in individual attribute
4183 and method descriptions. In order to change a machine setting, a session
4184 for this machine must be opened using one of
4185 <link to="IVirtualBox::openSession"/>,
4186 <link to="IVirtualBox::openRemoteSession"/> or
4187 <link to="IVirtualBox::openExistingSession"/> methods. After the
4188 session has been successfully opened, a mutable machine object needs to
4189 be queried from the session object and then the desired settings changes
4190 can be applied to the returned object using IMachine attributes and
4191 methods. See the <link to="ISession"/> interface description for more
4192 information about sessions.
4193
4194 Note that IMachine does not provide methods to control virtual machine
4195 execution (such as start the machine, or power it down) -- these methods
4196 are grouped in a separate interface called <link to="IConsole" />.
4197
4198 <see>ISession, IConsole</see>
4199 </desc>
4200
4201 <attribute name="parent" type="IVirtualBox" readonly="yes">
4202 <desc>Associated parent object.</desc>
4203 </attribute>
4204
4205 <attribute name="accessible" type="boolean" readonly="yes">
4206 <desc>
4207 Whether this virtual machine is currently accessible or not.
4208
4209 A machine is always deemed accessible unless it is registered <i>and</i>
4210 its settings file cannot be read or parsed (either because the file itself
4211 is unavailable or has invalid XML contents).
4212
4213 Every time this property is read, the accessibility state of
4214 this machine is re-evaluated. If the returned value is @c false,
4215 the <link to="#accessError"/> property may be used to get the
4216 detailed error information describing the reason of
4217 inaccessibility, including XML error messages.
4218
4219 When the machine is inaccessible, only the following properties
4220 can be used on it:
4221 <ul>
4222 <li><link to="#parent"/></li>
4223 <li><link to="#id"/></li>
4224 <li><link to="#settingsFilePath"/></li>
4225 <li><link to="#accessible"/></li>
4226 <li><link to="#accessError"/></li>
4227 </ul>
4228
4229 An attempt to access any other property or method will return
4230 an error.
4231
4232 The only possible action you can perform on an inaccessible
4233 machine is to unregister it using the
4234 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4235 for the accessibility state once more by querying this
4236 property).
4237
4238 <note>
4239 In the current implementation, once this property returns
4240 @c true, the machine will never become inaccessible
4241 later, even if its settings file cannot be successfully
4242 read/written any more (at least, until the VirtualBox
4243 server is restarted). This limitation may be removed in
4244 future releases.
4245 </note>
4246 </desc>
4247 </attribute>
4248
4249 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4250 <desc>
4251 Error information describing the reason of machine
4252 inaccessibility.
4253
4254 Reading this property is only valid after the last call to
4255 <link to="#accessible"/> returned @c false (i.e. the
4256 machine is currently unaccessible). Otherwise, a @c null
4257 IVirtualBoxErrorInfo object will be returned.
4258 </desc>
4259 </attribute>
4260
4261 <attribute name="name" type="wstring">
4262 <desc>
4263 Name of the virtual machine.
4264
4265 Besides being used for human-readable identification purposes
4266 everywhere in VirtualBox, the virtual machine name is also used
4267 as a name of the machine's settings file and as a name of the
4268 subdirectory this settings file resides in. Thus, every time you
4269 change the value of this property, the settings file will be
4270 renamed once you call <link to="#saveSettings"/> to confirm the
4271 change. The containing subdirectory will be also renamed, but
4272 only if it has exactly the same name as the settings file
4273 itself prior to changing this property (for backward compatibility
4274 with previous API releases). The above implies the following
4275 limitations:
4276 <ul>
4277 <li>The machine name cannot be empty.</li>
4278 <li>The machine name can contain only characters that are valid
4279 file name characters according to the rules of the file
4280 system used to store VirtualBox configuration.</li>
4281 <li>You cannot have two or more machines with the same name
4282 if they use the same subdirectory for storing the machine
4283 settings files.</li>
4284 <li>You cannot change the name of the machine if it is running,
4285 or if any file in the directory containing the settings file
4286 is being used by another running machine or by any other
4287 process in the host operating system at a time when
4288 <link to="#saveSettings"/> is called.
4289 </li>
4290 </ul>
4291 If any of the above limitations are hit, <link to="#saveSettings"/>
4292 will return an appropriate error message explaining the exact
4293 reason and the changes you made to this machine will not be
4294 saved.
4295 <note>
4296 For "legacy" machines created using the
4297 <link to="IVirtualBox::createLegacyMachine"/> call,
4298 the above naming limitations do not apply because the
4299 machine name does not affect the settings file name.
4300 The settings file name remains the same as it was specified
4301 during machine creation and never changes.
4302 </note>
4303 </desc>
4304 </attribute>
4305
4306 <attribute name="description" type="wstring">
4307 <desc>
4308 Description of the virtual machine.
4309
4310 The description attribute can contain any text and is
4311 typically used to describe the hardware and software
4312 configuration of the virtual machine in detail (i.e. network
4313 settings, versions of the installed software and so on).
4314 </desc>
4315 </attribute>
4316
4317 <attribute name="id" type="uuid" mod="string" readonly="yes">
4318 <desc>UUID of the virtual machine.</desc>
4319 </attribute>
4320
4321 <attribute name="OSTypeId" type="wstring">
4322 <desc>
4323 User-defined identifier of the Guest OS type.
4324 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4325 an IGuestOSType object representing details about the given
4326 Guest OS type.
4327 <note>
4328 This value may differ from the value returned by
4329 <link to="IGuest::OSTypeId"/> if Guest Additions are
4330 installed to the guest OS.
4331 </note>
4332 </desc>
4333 </attribute>
4334
4335 <attribute name="HardwareVersion" type="wstring">
4336 <desc>Hardware version identifier. Internal use only for now.</desc>
4337 </attribute>
4338
4339 <attribute name="hardwareUUID" type="uuid" mod="string">
4340 <desc>
4341 The UUID presented to the guest via memory tables, hardware and guest
4342 properties. For most VMs this is the same as the @a id, but for VMs
4343 which have been cloned or teleported it may be the same as the source
4344 VM. This latter is because the guest shouldn't notice that it was
4345 cloned or teleported.
4346 </desc>
4347 </attribute>
4348
4349 <attribute name="CPUCount" type="unsigned long">
4350 <desc>Number of virtual CPUs in the VM.</desc>
4351 </attribute>
4352
4353 <attribute name="memorySize" type="unsigned long">
4354 <desc>System memory size in megabytes.</desc>
4355 </attribute>
4356
4357 <attribute name="memoryBalloonSize" type="unsigned long">
4358 <desc>Initial memory balloon size in megabytes.</desc>
4359 </attribute>
4360
4361 <attribute name="statisticsUpdateInterval" type="unsigned long">
4362 <desc>Initial interval to update guest statistics in seconds.</desc>
4363 </attribute>
4364
4365 <attribute name="VRAMSize" type="unsigned long">
4366 <desc>Video memory size in megabytes.</desc>
4367 </attribute>
4368
4369 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4370 <desc>
4371 This setting determines whether VirtualBox allows this machine to make
4372 use of the 3D graphics support available on the host.</desc>
4373 </attribute>
4374
4375 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
4376 <desc>
4377 This setting determines whether VirtualBox allows this machine to make
4378 use of the 2D video acceleration support available on the host.</desc>
4379 </attribute>
4380
4381 <attribute name="monitorCount" type="unsigned long">
4382 <desc>
4383 Number of virtual monitors.
4384 <note>
4385 Only effective on Windows XP and later guests with
4386 Guest Additions installed.
4387 </note>
4388 </desc>
4389 </attribute>
4390
4391 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4392 <desc>Object containing all BIOS settings.</desc>
4393 </attribute>
4394
4395 <attribute name="firmwareType" type="FirmwareType">
4396 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
4397 bootstrap in this VM.</desc>
4398 </attribute>
4399
4400 <attribute name="snapshotFolder" type="wstring">
4401 <desc>
4402 Full path to the directory used to store snapshot data
4403 (differencing media and saved state files) of this machine.
4404
4405 The initial value of this property is
4406 <tt>&lt;</tt><link to="#settingsFilePath">
4407 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4408 <link to="#id">machine_uuid</link>
4409 <tt>&gt;</tt>.
4410
4411 Currently, it is an error to try to change this property on
4412 a machine that has snapshots (because this would require to
4413 move possibly large files to a different location).
4414 A separate method will be available for this purpose later.
4415
4416 <note>
4417 Setting this property to @c null or to an empty string will restore
4418 the initial value.
4419 </note>
4420 <note>
4421 When setting this property, the specified path can be
4422 absolute (full path) or relative to the directory where the
4423 <link to="#settingsFilePath">machine settings file</link>
4424 is located. When reading this property, a full path is
4425 always returned.
4426 </note>
4427 <note>
4428 The specified path may not exist, it will be created
4429 when necessary.
4430 </note>
4431 </desc>
4432 </attribute>
4433
4434 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4435 <desc>VRDP server object.</desc>
4436 </attribute>
4437
4438 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
4439 <desc>Array of media attached to this machine.</desc>
4440 </attribute>
4441
4442 <attribute name="USBController" type="IUSBController" readonly="yes">
4443 <desc>
4444 Associated USB controller object.
4445
4446 <note>
4447 If USB functionality is not available in the given edition of
4448 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4449 </note>
4450 </desc>
4451 </attribute>
4452
4453 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4454 <desc>Associated audio adapter, always present.</desc>
4455 </attribute>
4456
4457 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4458 <desc>Array of storage controllers attached to this machine.</desc>
4459 </attribute>
4460
4461 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4462 <desc>
4463 Full name of the file containing machine settings data.
4464 </desc>
4465 </attribute>
4466
4467 <attribute name="settingsModified" type="boolean" readonly="yes">
4468 <desc>
4469 Whether the settings of this machine have been modified
4470 (but neither yet saved nor discarded).
4471 <note>
4472 Reading this property is only valid on instances returned
4473 by <link to="ISession::machine"/> and on new machines
4474 created by <link to="IVirtualBox::createMachine"/> or opened
4475 by <link to="IVirtualBox::openMachine"/> but not
4476 yet registered, or on unregistered machines after calling
4477 <link to="IVirtualBox::unregisterMachine"/>. For all other
4478 cases, the settings can never be modified.
4479 </note>
4480 <note>
4481 For newly created unregistered machines, the value of this
4482 property is always @c true until <link to="#saveSettings"/>
4483 is called (no matter if any machine settings have been
4484 changed after the creation or not). For opened machines
4485 the value is set to @c false (and then follows to normal rules).
4486 </note>
4487 </desc>
4488 </attribute>
4489
4490 <attribute name="sessionState" type="SessionState" readonly="yes">
4491 <desc>Current session state for this machine.</desc>
4492 </attribute>
4493
4494 <attribute name="sessionType" type="wstring" readonly="yes">
4495 <desc>
4496 Type of the session. If <link to="#sessionState"/> is
4497 SessionSpawning or SessionOpen, this attribute contains the
4498 same value as passed to the
4499 <link to="IVirtualBox::openRemoteSession"/> method in the
4500 @a type parameter. If the session was opened directly using
4501 <link to="IVirtualBox::openSession"/>, or if
4502 <link to="#sessionState"/> is SessionClosed, the value of this
4503 attribute is an empty string.
4504 </desc>
4505 </attribute>
4506
4507 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4508 <desc>
4509 Identifier of the session process. This attribute contains the
4510 platform-dependent identifier of the process that has opened a
4511 direct session for this machine using the
4512 <link to="IVirtualBox::openSession"/> call. The returned value
4513 is only valid if <link to="#sessionState"/> is SessionOpen or
4514 SessionClosing (i.e. a session is currently open or being
4515 closed) by the time this property is read.
4516 </desc>
4517 </attribute>
4518
4519 <attribute name="state" type="MachineState" readonly="yes">
4520 <desc>Current execution state of this machine.</desc>
4521 </attribute>
4522
4523 <attribute name="lastStateChange" type="long long" readonly="yes">
4524 <desc>
4525 Time stamp of the last execution state change,
4526 in milliseconds since 1970-01-01 UTC.
4527 </desc>
4528 </attribute>
4529
4530 <attribute name="stateFilePath" type="wstring" readonly="yes">
4531 <desc>
4532 Full path to the file that stores the execution state of
4533 the machine when it is in the <link to="MachineState_Saved"/> state.
4534 <note>
4535 When the machine is not in the Saved state, this attribute is
4536 an empty string.
4537 </note>
4538 </desc>
4539 </attribute>
4540
4541 <attribute name="logFolder" type="wstring" readonly="yes">
4542 <desc>
4543 Full path to the folder that stores a set of rotated log files
4544 recorded during machine execution. The most recent log file is
4545 named <tt>VBox.log</tt>, the previous log file is
4546 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4547 in the current version).
4548 </desc>
4549 </attribute>
4550
4551 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4552 <desc>
4553 Current snapshot of this machine. This is @c null if the machine
4554 currently has no snapshots. If it is not @c null, then it was
4555 set by one of <link to="Console::takeSnapshot" />,
4556 <link to="Console::deleteSnapshot" />
4557 or <link to="Console::restoreSnapshot" />, depending on which
4558 was called last. See <link to="ISnapshot"/> for details.
4559 </desc>
4560 </attribute>
4561
4562 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4563 <desc>
4564 Number of snapshots taken on this machine. Zero means the
4565 machine doesn't have any snapshots.
4566 </desc>
4567 </attribute>
4568
4569 <attribute name="currentStateModified" type="boolean" readonly="yes">
4570 <desc>
4571 Returns @c true if the current state of the machine is not
4572 identical to the state stored in the current snapshot.
4573
4574 The current state is identical to the current snapshot only
4575 directly after one of the following calls are made:
4576
4577 <ul>
4578 <li><link to="IConsole::restoreSnapshot"/>
4579 </li>
4580 <li><link to="IConsole::takeSnapshot"/> (issued on a
4581 "powered off" or "saved" machine, for which
4582 <link to="#settingsModified"/> returns @c false)
4583 </li>
4584 <li><link to="IMachine::setCurrentSnapshot"/>
4585 </li>
4586 </ul>
4587
4588 The current state remains identical until one of the following
4589 happens:
4590 <ul>
4591 <li>settings of the machine are changed</li>
4592 <li>the saved state is discarded</li>
4593 <li>the current snapshot is discarded</li>
4594 <li>an attempt to execute the machine is made</li>
4595 </ul>
4596
4597 <note>
4598 For machines that don't have snapshots, this property is
4599 always @c false.
4600 </note>
4601 </desc>
4602 </attribute>
4603
4604 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4605 <desc>
4606 Collection of shared folders for this machine (permanent shared
4607 folders). These folders are shared automatically at machine startup
4608 and available only to the guest OS installed within this machine.
4609
4610 New shared folders are added to the collection using
4611 <link to="#createSharedFolder"/>. Existing shared folders can be
4612 removed using <link to="#removeSharedFolder"/>.
4613 </desc>
4614 </attribute>
4615
4616 <attribute name="clipboardMode" type="ClipboardMode">
4617 <desc>
4618 Synchronization mode between the host OS clipboard
4619 and the guest OS clipboard.
4620 </desc>
4621 </attribute>
4622
4623 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4624 <desc>
4625 A comma-separated list of simple glob patterns. Changes to guest
4626 properties whose name matches one of the patterns will generate an
4627 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4628 </desc>
4629 </attribute>
4630
4631 <attribute name="teleporterEnabled" type="boolean">
4632 <desc>
4633 When set to @a true, the virtual machine becomes a target teleporter
4634 the next time it is powered on. This can only set to @a true when the
4635 VM is in the @a PoweredOff or @a Aborted state.
4636
4637 <!-- This property is automatically set to @a false when the VM is powered
4638 on. (bird: This doesn't work yet ) -->
4639 </desc>
4640 </attribute>
4641
4642 <attribute name="teleporterPort" type="unsigned long">
4643 <desc>
4644 The TCP port the target teleporter will listen for incoming
4645 teleportations on.
4646
4647 0 means the port is automatically selected upon power on. The actual
4648 value can be read from this property while the machine is waiting for
4649 incoming teleportations.
4650 </desc>
4651 </attribute>
4652
4653 <attribute name="teleporterAddress" type="wstring">
4654 <desc>
4655 The address the target teleporter will listen on. If set to an empty
4656 string, it will listen on all addresses.
4657 </desc>
4658 </attribute>
4659
4660 <attribute name="teleporterPassword" type="wstring">
4661 <desc>
4662 The password the to check for on the target teleporter. This is just a
4663 very basic measure to prevent simple hacks and operators accidentally
4664 beaming a virtual machine to the wrong place.
4665 </desc>
4666 </attribute>
4667
4668 <method name="setBootOrder">
4669 <desc>
4670 Puts the given device to the specified position in
4671 the boot order.
4672
4673 To indicate that no device is associated with the given position,
4674 <link to="DeviceType_Null"/> should be used.
4675
4676 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4677
4678 <result name="E_INVALIDARG">
4679 Boot @a position out of range.
4680 </result>
4681 <result name="E_NOTIMPL">
4682 Booting from USB @a device currently not supported.
4683 </result>
4684
4685 </desc>
4686 <param name="position" type="unsigned long" dir="in">
4687 <desc>
4688 Position in the boot order (@c 1 to the total number of
4689 devices the machine can boot from, as returned by
4690 <link to="ISystemProperties::maxBootPosition"/>).
4691 </desc>
4692 </param>
4693 <param name="device" type="DeviceType" dir="in">
4694 <desc>
4695 The type of the device used to boot at the given position.
4696 </desc>
4697 </param>
4698 </method>
4699
4700 <method name="getBootOrder" const="yes">
4701 <desc>
4702 Returns the device type that occupies the specified
4703 position in the boot order.
4704
4705 @todo [remove?]
4706 If the machine can have more than one device of the returned type
4707 (such as hard disks), then a separate method should be used to
4708 retrieve the individual device that occupies the given position.
4709
4710 If here are no devices at the given position, then
4711 <link to="DeviceType_Null"/> is returned.
4712
4713 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4714
4715 <result name="E_INVALIDARG">
4716 Boot @a position out of range.
4717 </result>
4718
4719 </desc>
4720 <param name="position" type="unsigned long" dir="in">
4721 <desc>
4722 Position in the boot order (@c 1 to the total number of
4723 devices the machine can boot from, as returned by
4724 <link to="ISystemProperties::maxBootPosition"/>).
4725 </desc>
4726 </param>
4727 <param name="device" type="DeviceType" dir="return">
4728 <desc>
4729 Device at the given position.
4730 </desc>
4731 </param>
4732 </method>
4733
4734 <method name="attachDevice">
4735 <desc>
4736 Attaches a device and optionally mounts a medium to the given storage
4737 controller (<link to="IStorageController" />, identified by @a name),
4738 at the indicated port and device.
4739
4740 This method is intended for managing storage devices in general (it works
4741 for both fixed and removable media). For storage devices supporting removable
4742 media (such as DVDs and floppies), you can also use <link to="IMedium::mountMedium"/>
4743 for changing the media while the machine is running.
4744
4745 For the IDE bus, the @a controllerPort parameter can be either
4746 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4747 respectively. For each of these, @a device can then be either @c 0 or @c 1,
4748 to specify the master or the slave device, respectively. (In the
4749 default configuration of virtual machines, the secondary master is
4750 used for a CD/DVD drive.)
4751
4752 For an SATA controller, @a controllerPort must be a number ranging
4753 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4754 be a number ranging from @c 0 to @c 15.
4755
4756 For both SCSI and SATA, the @a device parameter is unused and must
4757 be @c 0.
4758
4759 For fixed media such as hard disks, the given medium identifier cannot
4760 be a zero UUID. It may be a zero UUID for removable media such as DVDs
4761 and floppies.
4762
4763 After calling this returns successfully, a new instance of
4764 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4765 attachments (<link to="IMachine::mediumAttachments"/>).
4766
4767 The specified device slot must not have a device attached to it,
4768 or this method will fail.
4769
4770 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4771 information about attaching media.
4772
4773 <note>
4774 You cannot attach a device to a running machine. Also, you cannot
4775 attach a device to a newly created machine until this machine's
4776 settings are saved to disk using <link to="#saveSettings"/>.
4777 </note>
4778 <note>
4779 If the medium is being attached indirectly, a new differencing medium
4780 will implicitly be created for it and attached instead. If the
4781 changes made to the machine settings (including this indirect
4782 attachment) are later cancelled using <link to="#discardSettings"/>,
4783 this implicitly created differencing medium will implicitly
4784 be deleted.
4785 </note>
4786
4787 <result name="E_INVALIDARG">
4788 SATA device, SATA port, IDE port or IDE slot out of range.
4789 </result>
4790 <result name="VBOX_E_INVALID_OBJECT_STATE">
4791 Attempt to attach medium to an unregistered virtual machine.
4792 </result>
4793 <result name="VBOX_E_INVALID_VM_STATE">
4794 Invalid machine state.
4795 </result>
4796 <result name="VBOX_E_OBJECT_IN_USE">
4797 Hard disk already attached to this or another virtual machine.
4798 </result>
4799
4800 </desc>
4801 <param name="name" type="wstring" dir="in">
4802 <desc>Name of the storage controller to attach the device to.</desc>
4803 </param>
4804 <param name="controllerPort" type="long" dir="in">
4805 <desc>Port to attach the device to.</desc>
4806 </param>
4807 <param name="device" type="long" dir="in">
4808 <desc>Device slot in the given port to attach the device to.</desc>
4809 </param>
4810 <param name="type" type="DeviceType" dir="in">
4811 <desc>Device type of the attached device.</desc>
4812 </param>
4813 <param name="id" type="uuid" mod="string" dir="in">
4814 <desc>UUID of the medium to mount. Zero UUID means do not mount any
4815 medium.</desc>
4816 </param>
4817 </method>
4818
4819 <method name="detachDevice">
4820 <desc>
4821 Detaches the device attached to a device slot of the specified bus.
4822
4823 Detaching the device from the virtual machine is deferred. This means
4824 that the medium remains associated with the machine when this method
4825 returns and gets actually de-associated only after a successful
4826 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4827 for more detailed information about attaching media.
4828
4829 <note>
4830 You cannot detach a device from a running machine.
4831 </note>
4832 <note>
4833 Detaching differencing media implicitly created by <link
4834 to="#attachDevice"/> for the indirect attachment using this
4835 method will <b>not</b> implicitly delete them. The
4836 <link to="IMedium::deleteStorage"/> operation should be
4837 explicitly performed by the caller after the medium is successfully
4838 detached and the settings are saved with
4839 <link to="#saveSettings"/>, if it is the desired action.
4840 </note>
4841
4842 <result name="VBOX_E_INVALID_VM_STATE">
4843 Attempt to detach medium from a running virtual machine.
4844 </result>
4845 <result name="VBOX_E_OBJECT_NOT_FOUND">
4846 No medium attached to given slot/bus.
4847 </result>
4848 <result name="VBOX_E_NOT_SUPPORTED">
4849 Medium format does not support storage deletion.
4850 </result>
4851
4852 </desc>
4853 <param name="name" type="wstring" dir="in">
4854 <desc>Name of the storage controller to detach the medium from.</desc>
4855 </param>
4856 <param name="controllerPort" type="long" dir="in">
4857 <desc>Port number to detach the medium from.</desc>
4858 </param>
4859 <param name="device" type="long" dir="in">
4860 <desc>Device slot number to detach the medium from.</desc>
4861 </param>
4862 </method>
4863
4864 <method name="passthroughDevice">
4865 <desc>
4866 Sets the passthrough mode of an existing DVD device. Changing the
4867 setting while the VM is running is forbidden. The setting is only used
4868 if at VM start the device is configured as a host DVD drive, in all
4869 other cases it is ignored. The device must already exist; see
4870 <link to="IMachine::attachDevice"/> for how to attach a new device.
4871
4872 The @a controllerPort and @a device parameters specify the device slot and
4873 have have the same meaning as with <link to="IMachine::attachDevice" />.
4874
4875 <result name="E_INVALIDARG">
4876 SATA device, SATA port, IDE port or IDE slot out of range.
4877 </result>
4878 <result name="VBOX_E_INVALID_OBJECT_STATE">
4879 Attempt to modify an unregistered virtual machine.
4880 </result>
4881 <result name="VBOX_E_INVALID_VM_STATE">
4882 Invalid machine state.
4883 </result>
4884
4885 </desc>
4886 <param name="name" type="wstring" dir="in">
4887 <desc>Name of the storage controller.</desc>
4888 </param>
4889 <param name="controllerPort" type="long" dir="in">
4890 <desc>Storage controller port.</desc>
4891 </param>
4892 <param name="device" type="long" dir="in">
4893 <desc>Device slot in the given port.</desc>
4894 </param>
4895 <param name="passthrough" type="boolean" dir="in">
4896 <desc>New value for the passthrough setting.</desc>
4897 </param>
4898 </method>
4899
4900 <method name="mountMedium">
4901 <desc>
4902 Mounts a medium (<link to="IMedium" />, identified
4903 by the given UUID @a id) to the given storage controller
4904 (<link to="IStorageController" />, identified by @a name),
4905 at the indicated port and device. The device must already exist;
4906 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4907
4908 This method is intended only for managing removable media, where the
4909 device is fixed but media is changeable at runtime (such as DVDs
4910 and floppies). It cannot be used for fixed media such as hard disks.
4911
4912 The @a controllerPort and @a device parameters specify the device slot and
4913 have have the same meaning as with <link to="IMachine::attachDevice" />.
4914
4915 The specified device slot can have a medium mounted, which will be
4916 unmounted first. Specifying a zero UUID (or an empty string) for
4917 @a medium does just an unmount.
4918
4919 See <link to="IMedium"/> for more detailed information about
4920 attaching media.
4921
4922 <result name="E_INVALIDARG">
4923 SATA device, SATA port, IDE port or IDE slot out of range.
4924 </result>
4925 <result name="VBOX_E_INVALID_OBJECT_STATE">
4926 Attempt to attach medium to an unregistered virtual machine.
4927 </result>
4928 <result name="VBOX_E_INVALID_VM_STATE">
4929 Invalid machine state.
4930 </result>
4931 <result name="VBOX_E_OBJECT_IN_USE">
4932 Medium already attached to this or another virtual machine.
4933 </result>
4934
4935 </desc>
4936 <param name="name" type="wstring" dir="in">
4937 <desc>Name of the storage controller to attach the medium to.</desc>
4938 </param>
4939 <param name="controllerPort" type="long" dir="in">
4940 <desc>Port to attach the medium to.</desc>
4941 </param>
4942 <param name="device" type="long" dir="in">
4943 <desc>Device slot in the given port to attach the medium to.</desc>
4944 </param>
4945 <param name="medium" type="uuid" mod="string" dir="in">
4946 <desc>UUID of the medium to attach. A zero UUID means unmount the
4947 currently mounted medium.</desc>
4948 </param>
4949 <param name="force" type="boolean" dir="in">
4950 <desc>Allows to force unmount/mount of a medium which is locked by
4951 theDevice slot in the given port to attach the medium to.</desc>
4952 </param>
4953 </method>
4954
4955 <method name="getMedium" const="yes">
4956 <desc>
4957 Returns the virtual medium attached to a device slot of the specified
4958 bus.
4959
4960 Note that if the medium was indirectly attached by
4961 <link to="#mountMedium"/> to the given device slot then this
4962 method will return not the same object as passed to the
4963 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4964 more detailed information about mounting a medium.
4965
4966 <result name="VBOX_E_OBJECT_NOT_FOUND">
4967 No medium attached to given slot/bus.
4968 </result>
4969
4970 </desc>
4971 <param name="name" type="wstring" dir="in">
4972 <desc>Name of the storage controller the medium is attached to.</desc>
4973 </param>
4974 <param name="controllerPort" type="long" dir="in">
4975 <desc>Port to query.</desc>
4976 </param>
4977 <param name="device" type="long" dir="in">
4978 <desc>Device slot in the given port to query.</desc>
4979 </param>
4980 <param name="medium" type="IMedium" dir="return">
4981 <desc>Attached medium object.</desc>
4982 </param>
4983 </method>
4984
4985 <method name="getMediumAttachmentsOfController" const="yes">
4986 <desc>
4987 Returns an array of medium attachments which are attached to the
4988 the controller with the given name.
4989
4990 <result name="VBOX_E_OBJECT_NOT_FOUND">
4991 A storage controller with given name doesn't exist.
4992 </result>
4993 </desc>
4994 <param name="name" type="wstring" dir="in"/>
4995 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4996 </method>
4997
4998 <method name="getMediumAttachment" const="yes">
4999 <desc>
5000 Returns a medium attachment which corresponds to the controller with
5001 the given name, on the given port and device slot.
5002
5003 <result name="VBOX_E_OBJECT_NOT_FOUND">
5004 No attachment exists for the given controller/port/device combination.
5005 </result>
5006 </desc>
5007 <param name="name" type="wstring" dir="in"/>
5008 <param name="controllerPort" type="long" dir="in"/>
5009 <param name="device" type="long" dir="in"/>
5010 <param name="attachment" type="IMediumAttachment" dir="return"/>
5011 </method>
5012
5013 <method name="getNetworkAdapter" const="yes">
5014 <desc>
5015 Returns the network adapter associated with the given slot.
5016 Slots are numbered sequentially, starting with zero. The total
5017 number of adapters per machine is defined by the
5018 <link to="ISystemProperties::networkAdapterCount"/> property,
5019 so the maximum slot number is one less than that property's value.
5020
5021 <result name="E_INVALIDARG">
5022 Invalid @a slot number.
5023 </result>
5024
5025 </desc>
5026 <param name="slot" type="unsigned long" dir="in"/>
5027 <param name="adapter" type="INetworkAdapter" dir="return"/>
5028 </method>
5029
5030 <method name="addStorageController">
5031 <desc>
5032 Adds a new storage controller (SCSI or SATA controller) to the
5033 machine and returns it as an instance of
5034 <link to="IStorageController" />.
5035
5036 @a name identifies the controller for subsequent calls such as
5037 <link to="#getStorageControllerByName" />,
5038 <link to="#getStorageControllerByInstance" />,
5039 <link to="#removeStorageController" />,
5040 <link to="#attachDevice" /> or <link to="#mountMedium" />.
5041
5042 After the controller has been added, you can set its exact
5043 type by setting the <link to="IStorageController::controllerType" />.
5044
5045 <result name="VBOX_E_OBJECT_IN_USE">
5046 A storage controller with given name exists already.
5047 </result>
5048 <result name="E_INVALIDARG">
5049 Invalid @a controllerType.
5050 </result>
5051 </desc>
5052 <param name="name" type="wstring" dir="in"/>
5053 <param name="connectionType" type="StorageBus" dir="in"/>
5054 <param name="controller" type="IStorageController" dir="return"/>
5055 </method>
5056
5057 <method name="getStorageControllerByName" const="yes">
5058 <desc>
5059 Returns a storage controller with the given name.
5060
5061 <result name="VBOX_E_OBJECT_NOT_FOUND">
5062 A storage controller with given name doesn't exist.
5063 </result>
5064 </desc>
5065 <param name="name" type="wstring" dir="in"/>
5066 <param name="storageController" type="IStorageController" dir="return"/>
5067 </method>
5068
5069 <method name="getStorageControllerByInstance" const="yes">
5070 <desc>
5071 Returns a storage controller with the given instance number.
5072
5073 <result name="VBOX_E_OBJECT_NOT_FOUND">
5074 A storage controller with given instance number doesn't exist.
5075 </result>
5076 </desc>
5077 <param name="instance" type="unsigned long" dir="in"/>
5078 <param name="storageController" type="IStorageController" dir="return"/>
5079 </method>
5080
5081 <method name="removeStorageController">
5082 <desc>
5083 Removes a storage controller from the machine.
5084
5085 <result name="VBOX_E_OBJECT_NOT_FOUND">
5086 A storage controller with given name doesn't exist.
5087 </result>
5088 </desc>
5089 <param name="name" type="wstring" dir="in"/>
5090 </method>
5091
5092 <method name="getSerialPort" const="yes">
5093 <desc>
5094 Returns the serial port associated with the given slot.
5095 Slots are numbered sequentially, starting with zero. The total
5096 number of serial ports per machine is defined by the
5097 <link to="ISystemProperties::serialPortCount"/> property,
5098 so the maximum slot number is one less than that property's value.
5099
5100 <result name="E_INVALIDARG">
5101 Invalid @a slot number.
5102 </result>
5103
5104 </desc>
5105 <param name="slot" type="unsigned long" dir="in"/>
5106 <param name="port" type="ISerialPort" dir="return"/>
5107 </method>
5108
5109 <method name="getParallelPort" const="yes">
5110 <desc>
5111 Returns the parallel port associated with the given slot.
5112 Slots are numbered sequentially, starting with zero. The total
5113 number of parallel ports per machine is defined by the
5114 <link to="ISystemProperties::parallelPortCount"/> property,
5115 so the maximum slot number is one less than that property's value.
5116
5117 <result name="E_INVALIDARG">
5118 Invalid @a slot number.
5119 </result>
5120
5121 </desc>
5122 <param name="slot" type="unsigned long" dir="in"/>
5123 <param name="port" type="IParallelPort" dir="return"/>
5124 </method>
5125
5126 <method name="getExtraDataKeys">
5127 <desc>
5128 Returns an array representing the machine-specific extra data keys
5129 which currently have values defined.
5130 </desc>
5131 <param name="value" type="wstring" dir="return" safearray="yes">
5132 <desc>Array of extra data keys.</desc>
5133 </param>
5134 </method>
5135
5136 <method name="getExtraData">
5137 <desc>
5138 Returns associated machine-specific extra data.
5139
5140 If the requested data @a key does not exist, this function will
5141 succeed and return an empty string in the @a value argument.
5142
5143 <result name="VBOX_E_FILE_ERROR">
5144 Settings file not accessible.
5145 </result>
5146 <result name="VBOX_E_XML_ERROR">
5147 Could not parse the settings file.
5148 </result>
5149
5150 </desc>
5151 <param name="key" type="wstring" dir="in">
5152 <desc>Name of the data key to get.</desc>
5153 </param>
5154 <param name="value" type="wstring" dir="return">
5155 <desc>Value of the requested data key.</desc>
5156 </param>
5157 </method>
5158
5159 <method name="setExtraData">
5160 <desc>
5161 Sets associated machine-specific extra data.
5162
5163 If you pass @c null or an empty string as a key @a value, the given
5164 @a key will be deleted.
5165
5166 <note>
5167 Before performing the actual data change, this method will ask all
5168 registered callbacks using the
5169 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
5170 notification for a permission. If one of the callbacks refuses the
5171 new value, the change will not be performed.
5172 </note>
5173 <note>
5174 On success, the
5175 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
5176 is called to inform all registered callbacks about a successful data
5177 change.
5178 </note>
5179 <note>
5180 This method can be called outside the machine session and therefore
5181 it's a caller's responsibility to handle possible race conditions
5182 when several clients change the same key at the same time.
5183 </note>
5184
5185 <result name="VBOX_E_FILE_ERROR">
5186 Settings file not accessible.
5187 </result>
5188 <result name="VBOX_E_XML_ERROR">
5189 Could not parse the settings file.
5190 </result>
5191
5192 </desc>
5193 <param name="key" type="wstring" dir="in">
5194 <desc>Name of the data key to set.</desc>
5195 </param>
5196 <param name="value" type="wstring" dir="in">
5197 <desc>Value to assign to the key.</desc>
5198 </param>
5199 </method>
5200
5201 <method name="getCpuProperty" const="yes">
5202 <desc>
5203 Returns the virtual CPU boolean value of the specified property.
5204
5205 <result name="E_INVALIDARG">
5206 Invalid property.
5207 </result>
5208
5209 </desc>
5210 <param name="property" type="CpuPropertyType" dir="in">
5211 <desc>
5212 Property type to query.
5213 </desc>
5214 </param>
5215 <param name="value" type="boolean" dir="return">
5216 <desc>
5217 Property value.
5218 </desc>
5219 </param>
5220 </method>
5221
5222 <method name="setCpuProperty">
5223 <desc>
5224 Sets the virtual CPU boolean value of the specified property.
5225
5226 <result name="E_INVALIDARG">
5227 Invalid property.
5228 </result>
5229
5230 </desc>
5231 <param name="property" type="CpuPropertyType" dir="in">
5232 <desc>
5233 Property type to query.
5234 </desc>
5235 </param>
5236 <param name="value" type="boolean" dir="in">
5237 <desc>
5238 Property value.
5239 </desc>
5240 </param>
5241 </method>
5242
5243 <method name="getCpuIdLeaf" const="yes">
5244 <desc>
5245 Returns the virtual CPU cpuid information for the specified leaf.
5246
5247 Currently supported index values for cpuid:
5248 Standard CPUID leafs: 0 - 0xA
5249 Extended CPUID leafs: 0x80000000 - 0x8000000A
5250
5251 See the Intel and AMD programmer's manuals for detailed information
5252 about the cpuid instruction and its leafs.
5253 <result name="E_INVALIDARG">
5254 Invalid id.
5255 </result>
5256
5257 </desc>
5258 <param name="id" type="unsigned long" dir="in">
5259 <desc>
5260 Cpuid leaf index.
5261 </desc>
5262 </param>
5263 <param name="valEax" type="unsigned long" dir="out">
5264 <desc>
5265 Cpuid leaf value for register eax.
5266 </desc>
5267 </param>
5268 <param name="valEbx" type="unsigned long" dir="out">
5269 <desc>
5270 Cpuid leaf value for register ebx.
5271 </desc>
5272 </param>
5273 <param name="valEcx" type="unsigned long" dir="out">
5274 <desc>
5275 Cpuid leaf value for register ecx.
5276 </desc>
5277 </param>
5278 <param name="valEdx" type="unsigned long" dir="out">
5279 <desc>
5280 Cpuid leaf value for register edx.
5281 </desc>
5282 </param>
5283 </method>
5284
5285 <method name="setCpuIdLeaf" const="yes">
5286 <desc>
5287 Sets the virtual CPU cpuid information for the specified leaf. Note that these values
5288 are not passed unmodified. VirtualBox clears features that it doesn't support.
5289
5290 Currently supported index values for cpuid:
5291 Standard CPUID leafs: 0 - 0xA
5292 Extended CPUID leafs: 0x80000000 - 0x8000000A
5293
5294 See the Intel and AMD programmer's manuals for detailed information
5295 about the cpuid instruction and its leafs.
5296
5297 Do not use this method unless you know exactly what you're doing. Misuse can lead to
5298 random crashes inside VMs.
5299 <result name="E_INVALIDARG">
5300 Invalid id.
5301 </result>
5302
5303 </desc>
5304 <param name="id" type="unsigned long" dir="in">
5305 <desc>
5306 Cpuid leaf index.
5307 </desc>
5308 </param>
5309 <param name="valEax" type="unsigned long" dir="in">
5310 <desc>
5311 Cpuid leaf value for register eax.
5312 </desc>
5313 </param>
5314 <param name="valEbx" type="unsigned long" dir="in">
5315 <desc>
5316 Cpuid leaf value for register ebx.
5317 </desc>
5318 </param>
5319 <param name="valEcx" type="unsigned long" dir="in">
5320 <desc>
5321 Cpuid leaf value for register ecx.
5322 </desc>
5323 </param>
5324 <param name="valEdx" type="unsigned long" dir="in">
5325 <desc>
5326 Cpuid leaf value for register edx.
5327 </desc>
5328 </param>
5329 </method>
5330
5331 <method name="removeCpuIdLeaf" const="yes">
5332 <desc>
5333 Removes the virtual CPU cpuid leaf for the specified index
5334
5335 <result name="E_INVALIDARG">
5336 Invalid id.
5337 </result>
5338
5339 </desc>
5340 <param name="id" type="unsigned long" dir="in">
5341 <desc>
5342 Cpuid leaf index.
5343 </desc>
5344 </param>
5345 </method>
5346
5347 <method name="removeAllCpuIdLeafs" const="yes">
5348 <desc>
5349 Removes all the virtual CPU cpuid leafs
5350 </desc>
5351 </method>
5352
5353 <method name="getHWVirtExProperty" const="yes">
5354 <desc>
5355 Returns the value of the specified hardware virtualization boolean property.
5356
5357 <result name="E_INVALIDARG">
5358 Invalid property.
5359 </result>
5360
5361 </desc>
5362 <param name="property" type="HWVirtExPropertyType" dir="in">
5363 <desc>
5364 Property type to query.
5365 </desc>
5366 </param>
5367 <param name="value" type="boolean" dir="return">
5368 <desc>
5369 Property value.
5370 </desc>
5371 </param>
5372 </method>
5373
5374 <method name="setHWVirtExProperty">
5375 <desc>
5376 Sets a new value for the specified hardware virtualization boolean property.
5377
5378 <result name="E_INVALIDARG">
5379 Invalid property.
5380 </result>
5381
5382 </desc>
5383 <param name="property" type="HWVirtExPropertyType" dir="in">
5384 <desc>
5385 Property type to set.
5386 </desc>
5387 </param>
5388 <param name="value" type="boolean" dir="in">
5389 <desc>
5390 New property value.
5391 </desc>
5392 </param>
5393 </method>
5394
5395 <method name="saveSettings">
5396 <desc>
5397 Saves any changes to machine settings made since the session
5398 has been opened or a new machine has been created, or since the
5399 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
5400 For registered machines, new settings become visible to all
5401 other VirtualBox clients after successful invocation of this
5402 method.
5403 <note>
5404 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
5405 notification event after the configuration has been successfully
5406 saved (only for registered machines).
5407 </note>
5408 <note>
5409 Calling this method is only valid on instances returned
5410 by <link to="ISession::machine"/> and on new machines
5411 created by <link to="IVirtualBox::createMachine"/> but not
5412 yet registered, or on unregistered machines after calling
5413 <link to="IVirtualBox::unregisterMachine"/>.
5414 </note>
5415
5416 <result name="VBOX_E_FILE_ERROR">
5417 Settings file not accessible.
5418 </result>
5419 <result name="VBOX_E_XML_ERROR">
5420 Could not parse the settings file.
5421 </result>
5422 <result name="E_ACCESSDENIED">
5423 Modification request refused.
5424 </result>
5425
5426 </desc>
5427 </method>
5428
5429 <method name="discardSettings">
5430 <desc>
5431 Discards any changes to the machine settings made since the session
5432 has been opened or since the last call to <link to="#saveSettings"/>
5433 or <link to="#discardSettings"/>.
5434 <note>
5435 Calling this method is only valid on instances returned
5436 by <link to="ISession::machine"/> and on new machines
5437 created by <link to="IVirtualBox::createMachine"/> or
5438 opened by <link to="IVirtualBox::openMachine"/> but not
5439 yet registered, or on unregistered machines after calling
5440 <link to="IVirtualBox::unregisterMachine"/>.
5441 </note>
5442
5443 <result name="VBOX_E_INVALID_VM_STATE">
5444 Virtual machine is not mutable.
5445 </result>
5446
5447 </desc>
5448 </method>
5449
5450 <method name="deleteSettings">
5451 <desc>
5452 Deletes the settings file of this machine from disk.
5453 The machine must not be registered in order for this operation
5454 to succeed.
5455 <note>
5456 <link to="#settingsModified"/> will return @c true after this
5457 method successfully returns.
5458 </note>
5459 <note>
5460 Calling this method is only valid on instances returned
5461 by <link to="ISession::machine"/> and on new machines
5462 created by <link to="IVirtualBox::createMachine"/> or
5463 opened by <link to="IVirtualBox::openMachine"/> but not
5464 yet registered, or on unregistered machines after calling
5465 <link to="IVirtualBox::unregisterMachine"/>.
5466 </note>
5467 <note>
5468 The deleted machine settings file can be restored (saved again)
5469 by calling <link to="#saveSettings"/>.
5470 </note>
5471
5472 <result name="VBOX_E_INVALID_VM_STATE">
5473 Cannot delete settings of a registered machine or
5474 machine not mutable.
5475 </result>
5476 <result name="VBOX_E_IPRT_ERROR">
5477 Could not delete the settings file.
5478 </result>
5479
5480 </desc>
5481 </method>
5482
5483 <method name="export">
5484 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5485 steps required to export VirtualBox machines to OVF.
5486 </desc>
5487
5488 <param name="aAppliance" type="IAppliance" dir="in">
5489 <desc>Appliance to export this machine to.</desc>
5490 </param>
5491 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5492 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5493 </param>
5494 </method >
5495
5496 <method name="getSnapshot">
5497 <desc>
5498 Returns a snapshot of this machine with the given UUID.
5499 A @c null UUID can be used to obtain the first snapshot
5500 taken on this machine. This is useful if you want to traverse
5501 the whole tree of snapshots starting from the root.
5502
5503 <result name="VBOX_E_OBJECT_NOT_FOUND">
5504 Virtual machine has no snapshots or snapshot not found.
5505 </result>
5506
5507 </desc>
5508 <param name="id" type="uuid" mod="string" dir="in">
5509 <desc>UUID of the snapshot to get</desc>
5510 </param>
5511 <param name="snapshot" type="ISnapshot" dir="return">
5512 <desc>Snapshot object with the given UUID.</desc>
5513 </param>
5514 </method>
5515
5516 <method name="findSnapshot">
5517 <desc>
5518 Returns a snapshot of this machine with the given name.
5519
5520 <result name="VBOX_E_OBJECT_NOT_FOUND">
5521 Virtual machine has no snapshots or snapshot not found.
5522 </result>
5523
5524 </desc>
5525 <param name="name" type="wstring" dir="in">
5526 <desc>Name of the snapshot to find</desc>
5527 </param>
5528 <param name="snapshot" type="ISnapshot" dir="return">
5529 <desc>Snapshot object with the given name.</desc>
5530 </param>
5531 </method>
5532
5533 <method name="setCurrentSnapshot">
5534 <desc>
5535 Sets the current snapshot of this machine.
5536 <note>
5537 In the current implementation, this operation is not
5538 implemented.
5539 </note>
5540 </desc>
5541 <param name="id" type="uuid" mod="string" dir="in">
5542 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5543 </param>
5544 </method>
5545
5546 <method name="createSharedFolder">
5547 <desc>
5548 Creates a new permanent shared folder by associating the given logical
5549 name with the given host path, adds it to the collection of shared
5550 folders and starts sharing it. Refer to the description of
5551 <link to="ISharedFolder"/> to read more about logical names.
5552
5553 <result name="VBOX_E_OBJECT_IN_USE">
5554 Shared folder already exists.
5555 </result>
5556 <result name="VBOX_E_FILE_ERROR">
5557 Shared folder @a hostPath not accessible.
5558 </result>
5559
5560 </desc>
5561 <param name="name" type="wstring" dir="in">
5562 <desc>Unique logical name of the shared folder.</desc>
5563 </param>
5564 <param name="hostPath" type="wstring" dir="in">
5565 <desc>Full path to the shared folder in the host file system.</desc>
5566 </param>
5567 <param name="writable" type="boolean" dir="in">
5568 <desc>Whether the share is writable or readonly</desc>
5569 </param>
5570 </method>
5571
5572 <method name="removeSharedFolder">
5573 <desc>
5574 Removes the permanent shared folder with the given name previously
5575 created by <link to="#createSharedFolder"/> from the collection of
5576 shared folders and stops sharing it.
5577
5578 <result name="VBOX_E_INVALID_VM_STATE">
5579 Virtual machine is not mutable.
5580 </result>
5581 <result name="VBOX_E_OBJECT_NOT_FOUND">
5582 Shared folder @a name does not exist.
5583 </result>
5584
5585 </desc>
5586 <param name="name" type="wstring" dir="in">
5587 <desc>Logical name of the shared folder to remove.</desc>
5588 </param>
5589 </method>
5590
5591 <method name="canShowConsoleWindow">
5592 <desc>
5593 Returns @c true if the VM console process can activate the
5594 console window and bring it to foreground on the desktop of
5595 the host PC.
5596 <note>
5597 This method will fail if a session for this machine is not
5598 currently open.
5599 </note>
5600
5601 <result name="VBOX_E_INVALID_VM_STATE">
5602 Machine session is not open.
5603 </result>
5604
5605 </desc>
5606 <param name="canShow" type="boolean" dir="return">
5607 <desc>
5608 @c true if the console window can be shown and @c false otherwise.
5609 </desc>
5610 </param>
5611 </method>
5612
5613 <method name="showConsoleWindow">
5614 <desc>
5615 Activates the console window and brings it to foreground on
5616 the desktop of the host PC. Many modern window managers on
5617 many platforms implement some sort of focus stealing
5618 prevention logic, so that it may be impossible to activate
5619 a window without the help of the currently active
5620 application. In this case, this method will return a non-zero
5621 identifier that represents the top-level window of the VM
5622 console process. The caller, if it represents a currently
5623 active process, is responsible to use this identifier (in a
5624 platform-dependent manner) to perform actual window
5625 activation.
5626 <note>
5627 This method will fail if a session for this machine is not
5628 currently open.
5629 </note>
5630
5631 <result name="VBOX_E_INVALID_VM_STATE">
5632 Machine session is not open.
5633 </result>
5634
5635 </desc>
5636 <param name="winId" type="unsigned long long" dir="return">
5637 <desc>
5638 Platform-dependent identifier of the top-level VM console
5639 window, or zero if this method has performed all actions
5640 necessary to implement the <i>show window</i> semantics for
5641 the given platform and/or VirtualBox front-end.
5642 </desc>
5643 </param>
5644 </method>
5645
5646 <method name="getGuestProperty">
5647 <desc>
5648 Reads an entry from the machine's guest property store.
5649
5650 <result name="VBOX_E_INVALID_VM_STATE">
5651 Machine session is not open.
5652 </result>
5653
5654 </desc>
5655 <param name="name" type="wstring" dir="in">
5656 <desc>
5657 The name of the property to read.
5658 </desc>
5659 </param>
5660 <param name="value" type="wstring" dir="out">
5661 <desc>
5662 The value of the property. If the property does not exist then this
5663 will be empty.
5664 </desc>
5665 </param>
5666 <param name="timestamp" type="unsigned long long" dir="out">
5667 <desc>
5668 The time at which the property was last modified, as seen by the
5669 server process.
5670 </desc>
5671 </param>
5672 <param name="flags" type="wstring" dir="out">
5673 <desc>
5674 Additional property parameters, passed as a comma-separated list of
5675 "name=value" type entries.
5676 </desc>
5677 </param>
5678 </method>
5679
5680 <method name="getGuestPropertyValue">
5681 <desc>
5682 Reads a value from the machine's guest property store.
5683
5684 <result name="VBOX_E_INVALID_VM_STATE">
5685 Machine session is not open.
5686 </result>
5687
5688 </desc>
5689 <param name="property" type="wstring" dir="in">
5690 <desc>
5691 The name of the property to read.
5692 </desc>
5693 </param>
5694 <param name="value" type="wstring" dir="return">
5695 <desc>
5696 The value of the property. If the property does not exist then this
5697 will be empty.
5698 </desc>
5699 </param>
5700 </method>
5701
5702 <method name="getGuestPropertyTimestamp">
5703 <desc>
5704 Reads a property timestamp from the machine's guest property store.
5705
5706 <result name="VBOX_E_INVALID_VM_STATE">
5707 Machine session is not open.
5708 </result>
5709
5710 </desc>
5711 <param name="property" type="wstring" dir="in">
5712 <desc>
5713 The name of the property to read.
5714 </desc>
5715 </param>
5716 <param name="value" type="unsigned long long" dir="return">
5717 <desc>
5718 The timestamp. If the property does not exist then this will be
5719 empty.
5720 </desc>
5721 </param>
5722 </method>
5723
5724 <method name="setGuestProperty">
5725 <desc>
5726 Sets, changes or deletes an entry in the machine's guest property
5727 store.
5728
5729 <result name="E_ACCESSDENIED">
5730 Property cannot be changed.
5731 </result>
5732 <result name="E_INVALIDARG">
5733 Invalid @a flags.
5734 </result>
5735 <result name="VBOX_E_INVALID_VM_STATE">
5736 Virtual machine is not mutable or session not open.
5737 </result>
5738 <result name="VBOX_E_INVALID_OBJECT_STATE">
5739 Cannot set transient property when machine not running.
5740 </result>
5741
5742 </desc>
5743 <param name="property" type="wstring" dir="in">
5744 <desc>
5745 The name of the property to set, change or delete.
5746 </desc>
5747 </param>
5748 <param name="value" type="wstring" dir="in">
5749 <desc>
5750 The new value of the property to set, change or delete. If the
5751 property does not yet exist and value is non-empty, it will be
5752 created. If the value is @c null or empty, the property will be
5753 deleted if it exists.
5754 </desc>
5755 </param>
5756 <param name="flags" type="wstring" dir="in">
5757 <desc>
5758 Additional property parameters, passed as a comma-separated list of
5759 "name=value" type entries.
5760 </desc>
5761 </param>
5762 </method>
5763
5764 <method name="setGuestPropertyValue">
5765 <desc>
5766 Sets, changes or deletes a value in the machine's guest property
5767 store. The flags field will be left unchanged or created empty for a
5768 new property.
5769
5770 <result name="E_ACCESSDENIED">
5771 Property cannot be changed.
5772 </result>
5773 <result name="VBOX_E_INVALID_VM_STATE">
5774 Virtual machine is not mutable or session not open.
5775 </result>
5776 <result name="VBOX_E_INVALID_OBJECT_STATE">
5777 Cannot set transient property when machine not running.
5778 </result>
5779 </desc>
5780
5781 <param name="property" type="wstring" dir="in">
5782 <desc>
5783 The name of the property to set, change or delete.
5784 </desc>
5785 </param>
5786 <param name="value" type="wstring" dir="in">
5787 <desc>
5788 The new value of the property to set, change or delete. If the
5789 property does not yet exist and value is non-empty, it will be
5790 created. If the value is @c null or empty, the property will be
5791 deleted if it exists.
5792 </desc>
5793 </param>
5794 </method>
5795
5796 <method name="enumerateGuestProperties">
5797 <desc>
5798 Return a list of the guest properties matching a set of patterns along
5799 with their values, time stamps and flags.
5800 </desc>
5801 <param name="patterns" type="wstring" dir="in">
5802 <desc>
5803 The patterns to match the properties against, separated by '|'
5804 characters. If this is empty or @c null, all properties will match.
5805 </desc>
5806 </param>
5807 <param name="name" type="wstring" dir="out" safearray="yes">
5808 <desc>
5809 The names of the properties returned.
5810 </desc>
5811 </param>
5812 <param name="value" type="wstring" dir="out" safearray="yes">
5813 <desc>
5814 The values of the properties returned. The array entries match the
5815 corresponding entries in the @a name array.
5816 </desc>
5817 </param>
5818 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5819 <desc>
5820 The time stamps of the properties returned. The array entries match
5821 the corresponding entries in the @a name array.
5822 </desc>
5823 </param>
5824 <param name="flags" type="wstring" dir="out" safearray="yes">
5825 <desc>
5826 The flags of the properties returned. The array entries match the
5827 corresponding entries in the @a name array.
5828 </desc>
5829 </param>
5830 </method>
5831
5832 <method name="querySavedThumbnailSize">
5833 <desc>
5834 Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.
5835 </desc>
5836 <param name="size" type="unsigned long" dir="out">
5837 <desc>
5838 Size of buffer required to store the bitmap.
5839 </desc>
5840 </param>
5841 <param name="width" type="unsigned long" dir="out">
5842 <desc>
5843 Bitmap width.
5844 </desc>
5845 </param>
5846 <param name="height" type="unsigned long" dir="out">
5847 <desc>
5848 Bitmap height.
5849 </desc>
5850 </param>
5851 </method>
5852
5853 <method name="readSavedThumbnailToArray">
5854 <desc>
5855 Thumbnail is retrieved to an array of bytes in uncompressed 32-bit BGRA or RGBA format.
5856 </desc>
5857 <param name="BGR" type="boolean" dir="in">
5858 <desc>
5859 How to order bytes in the pixel. A pixel consists of 4 bytes. If this parameter is true, then
5860 bytes order is: B, G, R, 0xFF. If this parameter is false, then bytes order is: R, G, B, 0xFF.
5861 </desc>
5862 </param>
5863 <param name="width" type="unsigned long" dir="out">
5864 <desc>
5865 Bitmap width.
5866 </desc>
5867 </param>
5868 <param name="height" type="unsigned long" dir="out">
5869 <desc>
5870 Bitmap height.
5871 </desc>
5872 </param>
5873 <param name="data" type="octet" dir="return" safearray="yes">
5874 <desc>
5875 Array with resulting bitmap data.
5876 </desc>
5877 </param>
5878 </method>
5879
5880 <method name="querySavedScreenshotPNGSize">
5881 <desc>
5882 Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.
5883 </desc>
5884 <param name="size" type="unsigned long" dir="out">
5885 <desc>
5886 Size of buffer required to store the PNG binary data.
5887 </desc>
5888 </param>
5889 <param name="width" type="unsigned long" dir="out">
5890 <desc>
5891 Image width.
5892 </desc>
5893 </param>
5894 <param name="height" type="unsigned long" dir="out">
5895 <desc>
5896 Image height.
5897 </desc>
5898 </param>
5899 </method>
5900
5901 <method name="readSavedScreenshotPNGToArray">
5902 <desc>
5903 Screenshot in PNG format is retrieved to an array of bytes.
5904 </desc>
5905 <param name="width" type="unsigned long" dir="out">
5906 <desc>
5907 Image width.
5908 </desc>
5909 </param>
5910 <param name="height" type="unsigned long" dir="out">
5911 <desc>
5912 Image height.
5913 </desc>
5914 </param>
5915 <param name="data" type="octet" dir="return" safearray="yes">
5916 <desc>
5917 Array with resulting PNG data.
5918 </desc>
5919 </param>
5920 </method>
5921</interface>
5922
5923 <!--
5924 // IConsole
5925 /////////////////////////////////////////////////////////////////////////
5926 -->
5927
5928 <interface
5929 name="IConsoleCallback" extends="$unknown"
5930 uuid="d6239535-bda2-4ef7-83f4-f4722e4a3b2c"
5931 wsmap="suppress"
5932 >
5933
5934 <desc>
5935 This interface is used by a client of the Main API that need to
5936 be notified of events. For example, a graphical user interface
5937 can use this to learn about machine state changes so they can
5938 update the list of virtual machines without having to rely
5939 on polling.
5940
5941 Whenever relevant events occur in VirtualBox, the callbacks in
5942 objects of this interface are called. In order for this to be
5943 useful, a client needs to create its own subclass that implements
5944 this interface in which the methods for the relevant callbacks
5945 are overridden. An instance of this subclass interface can then
5946 be passed to <link to="IConsole::registerCallback" />.
5947 </desc>
5948
5949 <method name="onMousePointerShapeChange">
5950 <desc>
5951 Notification when the guest mouse pointer shape has
5952 changed. The new shape data is given.
5953 </desc>
5954 <param name="visible" type="boolean" dir="in">
5955 <desc>
5956 Flag whether the pointer is visible.
5957 </desc>
5958 </param>
5959 <param name="alpha" type="boolean" dir="in">
5960 <desc>
5961 Flag whether the pointer has an alpha channel.
5962 </desc>
5963 </param>
5964 <param name="xHot" type="unsigned long" dir="in">
5965 <desc>
5966 The pointer hot spot x coordinate.
5967 </desc>
5968 </param>
5969 <param name="yHot" type="unsigned long" dir="in">
5970 <desc>
5971 The pointer hot spot y coordinate.
5972 </desc>
5973 </param>
5974 <param name="width" type="unsigned long" dir="in">
5975 <desc>
5976 Width of the pointer shape in pixels.
5977 </desc>
5978 </param>
5979 <param name="height" type="unsigned long" dir="in">
5980 <desc>
5981 Height of the pointer shape in pixels.
5982 </desc>
5983 </param>
5984 <param name="shape" type="octet" mod="ptr" dir="in">
5985 <desc>
5986 Address of the shape buffer.
5987
5988 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5989 followed by a 32-bpp XOR (color) mask.
5990
5991 For pointers without alpha channel the XOR mask pixels are 32
5992 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5993 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5994
5995 An AND mask is used for pointers with alpha channel, so if the
5996 callback does not support alpha, the pointer could be
5997 displayed as a normal color pointer.
5998
5999 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
6000 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
6001 height</tt>. The padding bits at the end of each scanline are
6002 undefined.
6003
6004 The XOR mask follows the AND mask on the next 4-byte aligned
6005 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
6006 Bytes in the gap between the AND and the XOR mask are undefined.
6007 The XOR mask scanlines have no gap between them and the size of
6008 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
6009
6010 <note>
6011 If @a shape is 0, only the pointer visibility is changed.
6012 </note>
6013 </desc>
6014 </param>
6015 </method>
6016
6017 <method name="onMouseCapabilityChange">
6018 <desc>
6019 Notification when the mouse capabilities reported by the
6020 guest have changed. The new capabilities are passed.
6021 </desc>
6022 <param name="supportsAbsolute" type="boolean" dir="in"/>
6023 <param name="needsHostCursor" type="boolean" dir="in"/>
6024 </method>
6025
6026 <method name="onKeyboardLedsChange">
6027 <desc>
6028 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
6029 to alter the state of the keyboard LEDs.
6030 </desc>
6031 <param name="numLock" type="boolean" dir="in"/>
6032 <param name="capsLock" type="boolean" dir="in"/>
6033 <param name="scrollLock" type="boolean" dir="in"/>
6034 </method>
6035
6036 <method name="onStateChange">
6037 <desc>
6038 Notification when the execution state of the machine has changed.
6039 The new state will be given.
6040 </desc>
6041 <param name="state" type="MachineState" dir="in"/>
6042 </method>
6043
6044 <method name="onAdditionsStateChange">
6045 <desc>
6046 Notification when a Guest Additions property changes.
6047 Interested callees should query IGuest attributes to
6048 find out what has changed.
6049 </desc>
6050 </method>
6051
6052 <method name="onNetworkAdapterChange">
6053 <desc>
6054 Notification when a property of one of the
6055 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
6056 changes. Interested callees should use INetworkAdapter methods and
6057 attributes to find out what has changed.
6058 </desc>
6059 <param name="networkAdapter" type="INetworkAdapter" dir="in">
6060 <desc>Network adapter that is subject to change.</desc>
6061 </param>
6062 </method>
6063
6064 <method name="onSerialPortChange">
6065 <desc>
6066 Notification when a property of one of the
6067 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
6068 Interested callees should use ISerialPort methods and attributes
6069 to find out what has changed.
6070 </desc>
6071 <param name="serialPort" type="ISerialPort" dir="in">
6072 <desc>Serial port that is subject to change.</desc>
6073 </param>
6074 </method>
6075
6076 <method name="onParallelPortChange">
6077 <desc>
6078 Notification when a property of one of the
6079 virtual <link to="IMachine::getParallelPort">parallel ports</link>
6080 changes. Interested callees should use ISerialPort methods and
6081 attributes to find out what has changed.
6082 </desc>
6083 <param name="parallelPort" type="IParallelPort" dir="in">
6084 <desc>Parallel port that is subject to change.</desc>
6085 </param>
6086 </method>
6087
6088 <method name="onStorageControllerChange">
6089 <desc>
6090 Notification when a property of one of the
6091 virtual <link to="IMachine::storageControllers">storage controllers</link>
6092 changes. Interested callees should query the corresponding collections
6093 to find out what has changed.
6094 </desc>
6095 </method>
6096
6097 <method name="onMediumChange">
6098 <desc>
6099 Notification when a
6100 <link to="IMachine::mediumAttachments">medium attachment</link>
6101 changes.
6102 </desc>
6103 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
6104 <desc>Medium attachment that is subject to change.</desc>
6105 </param>
6106 </method>
6107
6108 <method name="onVRDPServerChange">
6109 <desc>
6110 Notification when a property of the
6111 <link to="IMachine::VRDPServer">VRDP server</link> changes.
6112 Interested callees should use IVRDPServer methods and attributes to
6113 find out what has changed.
6114 </desc>
6115 </method>
6116
6117 <method name="onRemoteDisplayInfoChange">
6118 <desc>
6119 Notification when the status of the VRDP server changes. Interested callees
6120 should use <link to="IConsole::RemoteDisplayInfo">IRemoteDisplayInfo</link>
6121 attributes to find out what is the current status.
6122 </desc>
6123 </method>
6124
6125 <method name="onUSBControllerChange">
6126 <desc>
6127 Notification when a property of the virtual
6128 <link to="IMachine::USBController">USB controller</link> changes.
6129 Interested callees should use IUSBController methods and attributes to
6130 find out what has changed.
6131 </desc>
6132 </method>
6133
6134 <method name="onUSBDeviceStateChange">
6135 <desc>
6136 Notification when a USB device is attached to or detached from
6137 the virtual USB controller.
6138
6139 This notification is sent as a result of the indirect
6140 request to attach the device because it matches one of the
6141 machine USB filters, or as a result of the direct request
6142 issued by <link to="IConsole::attachUSBDevice"/> or
6143 <link to="IConsole::detachUSBDevice"/>.
6144
6145 This notification is sent in case of both a succeeded and a
6146 failed request completion. When the request succeeds, the
6147 @a error parameter is @c null, and the given device has been
6148 already added to (when @a attached is @c true) or removed from
6149 (when @a attached is @c false) the collection represented by
6150 <link to="IConsole::USBDevices"/>. On failure, the collection
6151 doesn't change and the @a error parameter represents the error
6152 message describing the failure.
6153
6154 </desc>
6155 <param name="device" type="IUSBDevice" dir="in">
6156 <desc>Device that is subject to state change.</desc>
6157 </param>
6158 <param name="attached" type="boolean" dir="in">
6159 <desc>
6160 @c true if the device was attached and @c false otherwise.
6161 </desc>
6162 </param>
6163 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
6164 <desc>
6165 @c null on success or an error message object on failure.
6166 </desc>
6167 </param>
6168 </method>
6169
6170 <method name="onSharedFolderChange">
6171 <desc>
6172 Notification when a shared folder is added or removed.
6173 The @a scope argument defines one of three scopes:
6174 <link to="IVirtualBox::sharedFolders">global shared folders</link>
6175 (<link to="Scope_Global">Global</link>),
6176 <link to="IMachine::sharedFolders">permanent shared folders</link> of
6177 the machine (<link to="Scope_Machine">Machine</link>) or <link
6178 to="IConsole::sharedFolders">transient shared folders</link> of the
6179 machine (<link to="Scope_Session">Session</link>). Interested callees
6180 should use query the corresponding collections to find out what has
6181 changed.
6182 </desc>
6183 <param name="scope" type="Scope" dir="in">
6184 <desc>Scope of the notification.</desc>
6185 </param>
6186 </method>
6187
6188 <method name="onRuntimeError">
6189 <desc>
6190 Notification when an error happens during the virtual
6191 machine execution.
6192
6193 There are three kinds of runtime errors:
6194 <ul>
6195 <li><i>fatal</i></li>
6196 <li><i>non-fatal with retry</i></li>
6197 <li><i>non-fatal warnings</i></li>
6198 </ul>
6199
6200 <b>Fatal</b> errors are indicated by the @a fatal parameter set
6201 to @c true. In case of fatal errors, the virtual machine
6202 execution is always paused before calling this notification, and
6203 the notification handler is supposed either to immediately save
6204 the virtual machine state using <link to="IConsole::saveState"/>
6205 or power it off using <link to="IConsole::powerDown"/>.
6206 Resuming the execution can lead to unpredictable results.
6207
6208 <b>Non-fatal</b> errors and warnings are indicated by the
6209 @a fatal parameter set to @c false. If the virtual machine
6210 is in the Paused state by the time the error notification is
6211 received, it means that the user can <i>try to resume</i> the machine
6212 execution after attempting to solve the problem that caused the
6213 error. In this case, the notification handler is supposed
6214 to show an appropriate message to the user (depending on the
6215 value of the @a id parameter) that offers several actions such
6216 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
6217 wants to retry, the notification handler should continue
6218 the machine execution using the <link to="IConsole::resume"/>
6219 call. If the machine execution is not Paused during this
6220 notification, then it means this notification is a <i>warning</i>
6221 (for example, about a fatal condition that can happen very soon);
6222 no immediate action is required from the user, the machine
6223 continues its normal execution.
6224
6225 Note that in either case the notification handler
6226 <b>must not</b> perform any action directly on a thread
6227 where this notification is called. Everything it is allowed to
6228 do is to post a message to another thread that will then talk
6229 to the user and take the corresponding action.
6230
6231 Currently, the following error identifiers are known:
6232 <ul>
6233 <li><tt>"HostMemoryLow"</tt></li>
6234 <li><tt>"HostAudioNotResponding"</tt></li>
6235 <li><tt>"VDIStorageFull"</tt></li>
6236 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
6237 </ul>
6238
6239 <note>
6240 This notification is not designed to be implemented by
6241 more than one callback at a time. If you have multiple
6242 IConsoleCallback instances registered on the given
6243 IConsole object, make sure you simply do nothing but
6244 return @c S_OK from all but one of them that does actual
6245 user notification and performs necessary actions.
6246 </note>
6247
6248 </desc>
6249 <param name="fatal" type="boolean" dir="in">
6250 <desc>Whether the error is fatal or not</desc>
6251 </param>
6252 <param name="id" type="wstring" dir="in">
6253 <desc>Error identifier</desc>
6254 </param>
6255 <param name="message" type="wstring" dir="in">
6256 <desc>Optional error message</desc>
6257 </param>
6258 </method>
6259
6260 <method name="onCanShowWindow">
6261 <desc>
6262 Notification when a call to
6263 <link to="IMachine::canShowConsoleWindow"/> is made by a
6264 front-end to check if a subsequent call to
6265 <link to="IMachine::showConsoleWindow"/> can succeed.
6266
6267 The callee should give an answer appropriate to the current
6268 machine state in the @a canShow argument. This answer must
6269 remain valid at least until the next
6270 <link to="IConsole::state">machine state</link> change.
6271
6272 <note>
6273 This notification is not designed to be implemented by
6274 more than one callback at a time. If you have multiple
6275 IConsoleCallback instances registered on the given
6276 IConsole object, make sure you simply do nothing but
6277 return @c true and @c S_OK from all but one of them that
6278 actually manages console window activation.
6279 </note>
6280 </desc>
6281 <param name="canShow" type="boolean" dir="return">
6282 <desc>
6283 @c true if the console window can be shown and @c false otherwise.
6284 </desc>
6285 </param>
6286 </method>
6287
6288 <method name="onShowWindow">
6289 <desc>
6290 Notification when a call to
6291 <link to="IMachine::showConsoleWindow"/>
6292 requests the console window to be activated and brought to
6293 foreground on the desktop of the host PC.
6294
6295 This notification should cause the VM console process to
6296 perform the requested action as described above. If it is
6297 impossible to do it at a time of this notification, this
6298 method should return a failure.
6299
6300 Note that many modern window managers on many platforms
6301 implement some sort of focus stealing prevention logic, so
6302 that it may be impossible to activate a window without the
6303 help of the currently active application (which is supposedly
6304 an initiator of this notification). In this case, this method
6305 must return a non-zero identifier that represents the
6306 top-level window of the VM console process. The caller, if it
6307 represents a currently active process, is responsible to use
6308 this identifier (in a platform-dependent manner) to perform
6309 actual window activation.
6310
6311 This method must set @a winId to zero if it has performed all
6312 actions necessary to complete the request and the console
6313 window is now active and in foreground, to indicate that no
6314 further action is required on the caller's side.
6315
6316 <note>
6317 This notification is not designed to be implemented by
6318 more than one callback at a time. If you have multiple
6319 IConsoleCallback instances registered on the given
6320 IConsole object, make sure you simply do nothing but
6321 return @c S_OK from all but one of them that actually
6322 manages console window activation.
6323 </note>
6324 </desc>
6325 <param name="winId" type="unsigned long long" dir="return">
6326 <desc>
6327 Platform-dependent identifier of the top-level VM console
6328 window, or zero if this method has performed all actions
6329 necessary to implement the <i>show window</i> semantics for
6330 the given platform and/or this VirtualBox front-end.
6331 </desc>
6332 </param>
6333 </method>
6334
6335 </interface>
6336
6337 <interface
6338 name="IRemoteDisplayInfo" extends="$unknown"
6339 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
6340 wsmap="struct"
6341 >
6342 <desc>
6343 Contains information about the remote display (VRDP) capabilities and status.
6344 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
6345 </desc>
6346
6347 <attribute name="active" type="boolean" readonly="yes">
6348 <desc>
6349 Whether the remote display connection is active.
6350 </desc>
6351 </attribute>
6352
6353 <attribute name="port" type="long" readonly="yes">
6354 <desc>
6355 VRDP server port number. If this property is equal to <tt>0</tt>, then
6356 the VRDP server failed to start, usually because there are no free TCP
6357 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
6358 server has not yet been started.
6359 </desc>
6360 </attribute>
6361
6362 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
6363 <desc>
6364 How many times a client connected.
6365 </desc>
6366 </attribute>
6367
6368 <attribute name="beginTime" type="long long" readonly="yes">
6369 <desc>
6370 When the last connection was established, in milliseconds since 1970-01-01 UTC.
6371 </desc>
6372 </attribute>
6373
6374 <attribute name="endTime" type="long long" readonly="yes">
6375 <desc>
6376 When the last connection was terminated or the current time, if
6377 connection is still active, in milliseconds since 1970-01-01 UTC.
6378 </desc>
6379 </attribute>
6380
6381 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
6382 <desc>
6383 How many bytes were sent in last or current, if still active, connection.
6384 </desc>
6385 </attribute>
6386
6387 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
6388 <desc>
6389 How many bytes were sent in all connections.
6390 </desc>
6391 </attribute>
6392
6393 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
6394 <desc>
6395 How many bytes were received in last or current, if still active, connection.
6396 </desc>
6397 </attribute>
6398
6399 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
6400 <desc>
6401 How many bytes were received in all connections.
6402 </desc>
6403 </attribute>
6404
6405 <attribute name="user" type="wstring" readonly="yes">
6406 <desc>
6407 Login user name supplied by the client.
6408 </desc>
6409 </attribute>
6410
6411 <attribute name="domain" type="wstring" readonly="yes">
6412 <desc>
6413 Login domain name supplied by the client.
6414 </desc>
6415 </attribute>
6416
6417 <attribute name="clientName" type="wstring" readonly="yes">
6418 <desc>
6419 The client name supplied by the client.
6420 </desc>
6421 </attribute>
6422
6423 <attribute name="clientIP" type="wstring" readonly="yes">
6424 <desc>
6425 The IP address of the client.
6426 </desc>
6427 </attribute>
6428
6429 <attribute name="clientVersion" type="unsigned long" readonly="yes">
6430 <desc>
6431 The client software version number.
6432 </desc>
6433 </attribute>
6434
6435 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
6436 <desc>
6437 Public key exchange method used when connection was established.
6438 Values: 0 - RDP4 public key exchange scheme.
6439 1 - X509 certificates were sent to client.
6440 </desc>
6441 </attribute>
6442
6443 </interface>
6444
6445 <interface
6446 name="IConsole" extends="$unknown"
6447 uuid="6375231a-c17c-464b-92cb-ae9e128d71c3"
6448 wsmap="managed"
6449 >
6450 <desc>
6451 The IConsole interface represents an interface to control virtual
6452 machine execution.
6453
6454 The console object that implements the IConsole interface is obtained
6455 from a session object after the session for the given machine has been
6456 opened using one of <link to="IVirtualBox::openSession"/>,
6457 <link to="IVirtualBox::openRemoteSession"/> or
6458 <link to="IVirtualBox::openExistingSession"/> methods.
6459
6460 Methods of the IConsole interface allow the caller to query the current
6461 virtual machine execution state, pause the machine or power it down, save
6462 the machine state or take a snapshot, attach and detach removable media
6463 and so on.
6464
6465 <see>ISession</see>
6466 </desc>
6467
6468 <attribute name="machine" type="IMachine" readonly="yes">
6469 <desc>
6470 Machine object this console is sessioned with.
6471 <note>
6472 This is a convenience property, it has the same value as
6473 <link to="ISession::machine"/> of the corresponding session
6474 object.
6475 </note>
6476 </desc>
6477 </attribute>
6478
6479 <attribute name="state" type="MachineState" readonly="yes">
6480 <desc>
6481 Current execution state of the machine.
6482 <note>
6483 This property always returns the same value as the corresponding
6484 property of the IMachine object this console is sessioned with.
6485 For the process that owns (executes) the VM, this is the
6486 preferable way of querying the VM state, because no IPC
6487 calls are made.
6488 </note>
6489 </desc>
6490 </attribute>
6491
6492 <attribute name="guest" type="IGuest" readonly="yes">
6493 <desc>Guest object.</desc>
6494 </attribute>
6495
6496 <attribute name="keyboard" type="IKeyboard" readonly="yes">
6497 <desc>
6498 Virtual keyboard object.
6499 <note>
6500 If the machine is not running, any attempt to use
6501 the returned object will result in an error.
6502 </note>
6503 </desc>
6504 </attribute>
6505
6506 <attribute name="mouse" type="IMouse" readonly="yes">
6507 <desc>
6508 Virtual mouse object.
6509 <note>
6510 If the machine is not running, any attempt to use
6511 the returned object will result in an error.
6512 </note>
6513 </desc>
6514 </attribute>
6515
6516 <attribute name="display" type="IDisplay" readonly="yes">
6517 <desc>Virtual display object.
6518 <note>
6519 If the machine is not running, any attempt to use
6520 the returned object will result in an error.
6521 </note>
6522 </desc>
6523 </attribute>
6524
6525 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6526 <desc>Debugging interface.</desc>
6527 </attribute>
6528
6529 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6530 <desc>
6531 Collection of USB devices currently attached to the virtual
6532 USB controller.
6533 <note>
6534 The collection is empty if the machine is not running.
6535 </note>
6536 </desc>
6537 </attribute>
6538
6539 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6540 <desc>
6541 List of USB devices currently attached to the remote VRDP client.
6542 Once a new device is physically attached to the remote host computer,
6543 it appears in this list and remains there until detached.
6544 </desc>
6545 </attribute>
6546
6547 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6548 <desc>
6549 Collection of shared folders for the current session. These folders
6550 are called transient shared folders because they are available to the
6551 guest OS running inside the associated virtual machine only for the
6552 duration of the session (as opposed to
6553 <link to="IMachine::sharedFolders"/> which represent permanent shared
6554 folders). When the session is closed (e.g. the machine is powered down),
6555 these folders are automatically discarded.
6556
6557 New shared folders are added to the collection using
6558 <link to="#createSharedFolder"/>. Existing shared folders can be
6559 removed using <link to="#removeSharedFolder"/>.
6560 </desc>
6561 </attribute>
6562
6563 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6564 <desc>
6565 Interface that provides information on Remote Display (VRDP) connection.
6566 </desc>
6567 </attribute>
6568
6569 <method name="powerUp">
6570 <desc>
6571 Starts the virtual machine execution using the current machine
6572 state (that is, its current execution state, current settings and
6573 current storage devices).
6574
6575 If the machine is powered off or aborted, the execution will
6576 start from the beginning (as if the real hardware were just
6577 powered on).
6578
6579 If the machine is in the <link to="MachineState_Saved"/> state,
6580 it will continue its execution the point where the state has
6581 been saved.
6582
6583 <note>
6584 Unless you are trying to write a new VirtualBox front-end that
6585 performs direct machine execution (like the VirtualBox or VBoxSDL
6586 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6587 session opened by <link to="IVirtualBox::openSession"/> and use this
6588 session only to change virtual machine settings. If you simply want to
6589 start virtual machine execution using one of the existing front-ends
6590 (for example the VirtualBox GUI or headless server), simply use
6591 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6592 power up the machine automatically for you.
6593 </note>
6594
6595 <see>#saveState</see>
6596 <result name="VBOX_E_INVALID_VM_STATE">
6597 Virtual machine already running.
6598 </result>
6599 <result name="VBOX_E_HOST_ERROR">
6600 Host interface does not exist or name not set.
6601 </result>
6602 <result name="VBOX_E_FILE_ERROR">
6603 Invalid saved state file.
6604 </result>
6605 </desc>
6606 <param name="progress" type="IProgress" dir="return">
6607 <desc>Progress object to track the operation completion.</desc>
6608 </param>
6609 </method>
6610
6611 <method name="powerUpPaused">
6612 <desc>
6613 Identical to powerUp except that the VM will enter the
6614 <link to="MachineState_Paused"/> state, instead of
6615 <link to="MachineState_Running"/>.
6616
6617 <see>#powerUp</see>
6618 <result name="VBOX_E_INVALID_VM_STATE">
6619 Virtual machine already running.
6620 </result>
6621 <result name="VBOX_E_HOST_ERROR">
6622 Host interface does not exist or name not set.
6623 </result>
6624 <result name="VBOX_E_FILE_ERROR">
6625 Invalid saved state file.
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="powerDown">
6634 <desc>
6635 Initiates the power down procedure to stop the virtual machine
6636 execution.
6637
6638 The completion of the power down procedure is tracked using the returned
6639 IProgress object. After the operation is complete, the machine will go
6640 to the PoweredOff state.
6641 <result name="VBOX_E_INVALID_VM_STATE">
6642 Virtual machine must be Running, Paused or Stuck to be powered down.
6643 </result>
6644 </desc>
6645 <param name="progress" type="IProgress" dir="return">
6646 <desc>Progress object to track the operation completion.</desc>
6647 </param>
6648 </method>
6649
6650 <method name="reset">
6651 <desc>Resets the virtual machine.
6652 <result name="VBOX_E_INVALID_VM_STATE">
6653 Virtual machine not in Running state.
6654 </result>
6655 <result name="VBOX_E_VM_ERROR">
6656 Virtual machine error in reset operation.
6657 </result>
6658 </desc>
6659 </method>
6660
6661 <method name="pause">
6662 <desc>Pauses the virtual machine execution.
6663 <result name="VBOX_E_INVALID_VM_STATE">
6664 Virtual machine not in Running state.
6665 </result>
6666 <result name="VBOX_E_VM_ERROR">
6667 Virtual machine error in suspend operation.
6668 </result>
6669 </desc>
6670 </method>
6671
6672 <method name="resume">
6673 <desc>Resumes the virtual machine execution.
6674 <result name="VBOX_E_INVALID_VM_STATE">
6675 Virtual machine not in Paused state.
6676 </result>
6677 <result name="VBOX_E_VM_ERROR">
6678 Virtual machine error in resume operation.
6679 </result>
6680 </desc>
6681 </method>
6682
6683 <method name="powerButton">
6684 <desc>Sends the ACPI power button event to the guest.
6685 <result name="VBOX_E_INVALID_VM_STATE">
6686 Virtual machine not in Running state.
6687 </result>
6688 <result name="VBOX_E_PDM_ERROR">
6689 Controlled power off failed.
6690 </result>
6691 </desc>
6692 </method>
6693
6694 <method name="sleepButton">
6695 <desc>Sends the ACPI sleep button event to the guest.
6696 <result name="VBOX_E_INVALID_VM_STATE">
6697 Virtual machine not in Running state.
6698 </result>
6699 <result name="VBOX_E_PDM_ERROR">
6700 Sending sleep button event failed.
6701 </result>
6702 </desc>
6703 </method>
6704
6705 <method name="getPowerButtonHandled">
6706 <desc>Checks if the last power button event was handled by guest.
6707 <result name="VBOX_E_PDM_ERROR">
6708 Checking if the event was handled by the guest OS failed.
6709 </result>
6710 </desc>
6711 <param name="handled" type="boolean" dir="return"/>
6712 </method>
6713
6714 <method name="getGuestEnteredACPIMode">
6715 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6716 G1 (sleeping). If this method returns @c false, the guest will
6717 most likely not respond to external ACPI events.
6718 <result name="VBOX_E_INVALID_VM_STATE">
6719 Virtual machine not in Running state.
6720 </result>
6721 </desc>
6722 <param name="entered" type="boolean" dir="return"/>
6723 </method>
6724
6725 <method name="saveState">
6726 <desc>
6727 Saves the current execution state of a running virtual machine
6728 and stops its execution.
6729
6730 After this operation completes, the machine will go to the
6731 Saved state. Next time it is powered up, this state will
6732 be restored and the machine will continue its execution from
6733 the place where it was saved.
6734
6735 This operation differs from taking a snapshot to the effect
6736 that it doesn't create new differencing media. Also, once
6737 the machine is powered up from the state saved using this method,
6738 the saved state is deleted, so it will be impossible to return
6739 to this state later.
6740
6741 <note>
6742 On success, this method implicitly calls
6743 <link to="IMachine::saveSettings"/> to save all current machine
6744 settings (including runtime changes to the DVD medium, etc.).
6745 Together with the impossibility to change any VM settings when it is
6746 in the Saved state, this guarantees adequate hardware
6747 configuration of the machine when it is restored from the saved
6748 state file.
6749 </note>
6750
6751 <note>
6752 The machine must be in the Running or Paused state, otherwise
6753 the operation will fail.
6754 </note>
6755 <result name="VBOX_E_INVALID_VM_STATE">
6756 Virtual machine state neither Running nor Paused.
6757 </result>
6758 <result name="VBOX_E_FILE_ERROR">
6759 Failed to create directory for saved state file.
6760 </result>
6761
6762 <see><link to="#takeSnapshot"/></see>
6763 </desc>
6764 <param name="progress" type="IProgress" dir="return">
6765 <desc>Progress object to track the operation completion.</desc>
6766 </param>
6767 </method>
6768
6769 <method name="adoptSavedState">
6770 <desc>
6771 Associates the given saved state file to the virtual machine.
6772
6773 On success, the machine will go to the Saved state. Next time it is
6774 powered up, it will be restored from the adopted saved state and
6775 continue execution from the place where the saved state file was
6776 created.
6777
6778 The specified saved state file path may be absolute or relative to the
6779 folder the VM normally saves the state to (usually,
6780 <link to="IMachine::snapshotFolder"/>).
6781
6782 <note>
6783 It's a caller's responsibility to make sure the given saved state
6784 file is compatible with the settings of this virtual machine that
6785 represent its virtual hardware (memory size, storage disk configuration
6786 etc.). If there is a mismatch, the behavior of the virtual machine
6787 is undefined.
6788 </note>
6789 <result name="VBOX_E_INVALID_VM_STATE">
6790 Virtual machine state neither PoweredOff nor Aborted.
6791 </result>
6792 </desc>
6793 <param name="savedStateFile" type="wstring" dir="in">
6794 <desc>Path to the saved state file to adopt.</desc>
6795 </param>
6796 </method>
6797
6798 <method name="forgetSavedState">
6799 <desc>
6800 Forgets the saved state of the virtual machine previously created
6801 by <link to="#saveState"/>. Next time the machine is powered up, a
6802 clean boot will occur. If @a remove is @c true the saved state file
6803 is deleted.
6804 <note>
6805 This operation is equivalent to resetting or powering off
6806 the machine without doing a proper shutdown in the guest OS.
6807 </note>
6808 <result name="VBOX_E_INVALID_VM_STATE">
6809 Virtual machine not in state Saved.
6810 </result>
6811 </desc>
6812 <param name="remove" type="boolean" dir="in">
6813 <desc>If @c true remove the saved state file.</desc>
6814 </param>
6815 </method>
6816
6817 <method name="getDeviceActivity">
6818 <desc>
6819 Gets the current activity type of a given device or device group.
6820 <result name="E_INVALIDARG">
6821 Invalid device type.
6822 </result>
6823 </desc>
6824 <param name="type" type="DeviceType" dir="in"/>
6825 <param name="activity" type="DeviceActivity" dir="return"/>
6826 </method>
6827
6828 <method name="attachUSBDevice">
6829 <desc>
6830 Attaches a host USB device with the given UUID to the
6831 USB controller of the virtual machine.
6832
6833 The device needs to be in one of the following states:
6834 <link to="USBDeviceState_Busy"/>,
6835 <link to="USBDeviceState_Available"/> or
6836 <link to="USBDeviceState_Held"/>,
6837 otherwise an error is immediately returned.
6838
6839 When the device state is
6840 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6841 be returned if the host computer refuses to release it for some reason.
6842
6843 <see>IUSBController::deviceFilters, USBDeviceState</see>
6844 <result name="VBOX_E_INVALID_VM_STATE">
6845 Virtual machine state neither Running nor Paused.
6846 </result>
6847 <result name="VBOX_E_PDM_ERROR">
6848 Virtual machine does not have a USB controller.
6849 </result>
6850 </desc>
6851 <param name="id" type="uuid" mod="string" dir="in">
6852 <desc>UUID of the host USB device to attach.</desc>
6853 </param>
6854 </method>
6855
6856 <method name="detachUSBDevice">
6857 <desc>
6858 Detaches an USB device with the given UUID from the USB controller
6859 of the virtual machine.
6860
6861 After this method succeeds, the VirtualBox server re-initiates
6862 all USB filters as if the device were just physically attached
6863 to the host, but filters of this machine are ignored to avoid
6864 a possible automatic re-attachment.
6865
6866 <see>IUSBController::deviceFilters, USBDeviceState</see>
6867
6868 <result name="VBOX_E_PDM_ERROR">
6869 Virtual machine does not have a USB controller.
6870 </result>
6871 <result name="E_INVALIDARG">
6872 USB device not attached to this virtual machine.
6873 </result>
6874 </desc>
6875 <param name="id" type="uuid" mod="string" dir="in">
6876 <desc>UUID of the USB device to detach.</desc>
6877 </param>
6878 <param name="device" type="IUSBDevice" dir="return">
6879 <desc>Detached USB device.</desc>
6880 </param>
6881 </method>
6882
6883 <method name="findUSBDeviceByAddress">
6884 <desc>
6885 Searches for a USB device with the given host address.
6886
6887 <result name="VBOX_E_OBJECT_NOT_FOUND">
6888 Given @c name does not correspond to any USB device.
6889 </result>
6890
6891 <see>IUSBDevice::address</see>
6892 </desc>
6893 <param name="name" type="wstring" dir="in">
6894 <desc>
6895 Address of the USB device (as assigned by the host) to
6896 search for.
6897 </desc>
6898 </param>
6899 <param name="device" type="IUSBDevice" dir="return">
6900 <desc>Found USB device object.</desc>
6901 </param>
6902 </method>
6903
6904 <method name="findUSBDeviceById">
6905 <desc>
6906 Searches for a USB device with the given UUID.
6907
6908 <result name="VBOX_E_OBJECT_NOT_FOUND">
6909 Given @c id does not correspond to any USB device.
6910 </result>
6911
6912 <see>IUSBDevice::id</see>
6913 </desc>
6914 <param name="id" type="uuid" mod="string" dir="in">
6915 <desc>UUID of the USB device to search for.</desc>
6916 </param>
6917 <param name="device" type="IUSBDevice" dir="return">
6918 <desc>Found USB device object.</desc>
6919 </param>
6920 </method>
6921
6922 <method name="createSharedFolder">
6923 <desc>
6924 Creates a transient new shared folder by associating the given logical
6925 name with the given host path, adds it to the collection of shared
6926 folders and starts sharing it. Refer to the description of
6927 <link to="ISharedFolder"/> to read more about logical names.
6928
6929 <result name="VBOX_E_INVALID_VM_STATE">
6930 Virtual machine in Saved state or currently changing state.
6931 </result>
6932 <result name="VBOX_E_FILE_ERROR">
6933 Shared folder already exists or not accessible.
6934 </result>
6935 </desc>
6936 <param name="name" type="wstring" dir="in">
6937 <desc>Unique logical name of the shared folder.</desc>
6938 </param>
6939 <param name="hostPath" type="wstring" dir="in">
6940 <desc>Full path to the shared folder in the host file system.</desc>
6941 </param>
6942 <param name="writable" type="boolean" dir="in">
6943 <desc>Whether the share is writable or readonly</desc>
6944 </param>
6945 </method>
6946
6947 <method name="removeSharedFolder">
6948 <desc>
6949 Removes a transient shared folder with the given name previously
6950 created by <link to="#createSharedFolder"/> from the collection of
6951 shared folders and stops sharing it.
6952 <result name="VBOX_E_INVALID_VM_STATE">
6953 Virtual machine in Saved state or currently changing state.
6954 </result>
6955 <result name="VBOX_E_FILE_ERROR">
6956 Shared folder does not exists.
6957 </result>
6958 </desc>
6959 <param name="name" type="wstring" dir="in">
6960 <desc>Logical name of the shared folder to remove.</desc>
6961 </param>
6962 </method>
6963
6964 <method name="takeSnapshot">
6965 <desc>
6966 Saves the current execution state
6967 and all settings of the machine and creates differencing images
6968 for all normal (non-independent) media.
6969 See <link to="ISnapshot" /> for an introduction to snapshots.
6970
6971 This method can be called for a PoweredOff, Saved (see
6972 <link to="#saveState"/>), Running or
6973 Paused virtual machine. When the machine is PoweredOff, an
6974 offline snapshot is created. When the machine is Running a live
6975 snapshot is created, and an online snapshot is is created when Paused.
6976
6977 The taken snapshot is always based on the
6978 <link to="IMachine::currentSnapshot">current snapshot</link>
6979 of the associated virtual machine and becomes a new current snapshot.
6980
6981 <note>
6982 This method implicitly calls <link to="IMachine::saveSettings"/> to
6983 save all current machine settings before taking an offline snapshot.
6984 </note>
6985
6986 <result name="VBOX_E_INVALID_VM_STATE">
6987 Virtual machine currently changing state.
6988 </result>
6989 </desc>
6990 <param name="name" type="wstring" dir="in">
6991 <desc>Short name for the snapshot.</desc>
6992 </param>
6993 <param name="description" type="wstring" dir="in">
6994 <desc>Optional description of the snapshot.</desc>
6995 </param>
6996 <param name="progress" type="IProgress" dir="return">
6997 <desc>Progress object to track the operation completion.</desc>
6998 </param>
6999 </method>
7000
7001 <method name="deleteSnapshot">
7002 <desc>
7003 Starts deleting the specified snapshot asynchronously.
7004 See <link to="ISnapshot" /> for an introduction to snapshots.
7005
7006 The execution state and settings of the associated machine stored in
7007 the snapshot will be deleted. The contents of all differencing media of
7008 this snapshot will be merged with the contents of their dependent child
7009 media to keep the medium chain valid (in other words, all changes
7010 represented by media being discarded will be propagated to their child
7011 medium). After that, this snapshot's differencing medium will be
7012 deleted. The parent of this snapshot will become a new parent for all
7013 its child snapshots.
7014
7015 If the deleted snapshot is the current one, its parent snapshot will
7016 become a new current snapshot. The current machine state is not directly
7017 affected in this case, except that currently attached differencing
7018 media based on media of the discarded snapshot will be also merged as
7019 described above.
7020
7021 If the deleted snapshot is the first or current snapshot, then the
7022 respective IMachine attributes will be adjusted. Deleting the current
7023 snapshot will also implicitly call <link to="IMachine::saveSettings"/>
7024 to make all current machine settings permanent.
7025
7026 Deleting a snapshot has the following preconditions:
7027
7028 <ul>
7029 <li>Child media of all normal media of the discarded snapshot
7030 must be accessible (see <link to="IMedium::state"/>) for this
7031 operation to succeed. In particular, this means that all virtual
7032 machines, whose media are directly or indirectly based on the
7033 media of discarded snapshot, must be powered off.</li>
7034
7035 <li>You cannot delete the snapshot if a medium attached to it has
7036 more than once child medium (differencing images) because otherwise
7037 merging would be impossible. This might be the case if there is
7038 more than one child snapshot or differencing images were created
7039 for other reason (e.g. implicitly because of multiple machine
7040 attachments).</li>
7041 </ul>
7042
7043
7044 The virtual machine's <link to="IMachine::state">state</link> is changed to "DeletingSnapshot"
7045 while this operation is in progress.
7046
7047 <note>
7048 Merging medium contents can be very time and disk space
7049 consuming, if these media are big in size and have many
7050 children. However, if the snapshot being discarded is the last
7051 (head) snapshot on the branch, the operation will be rather
7052 quick.
7053 </note>
7054 <result name="VBOX_E_INVALID_VM_STATE">
7055 Virtual machine is running.
7056 </result>
7057 </desc>
7058 <param name="id" type="uuid" mod="string" dir="in">
7059 <desc>UUID of the snapshot to discard.</desc>
7060 </param>
7061 <param name="progress" type="IProgress" dir="return">
7062 <desc>Progress object to track the operation completion.</desc>
7063 </param>
7064 </method>
7065
7066 <method name="restoreSnapshot">
7067 <desc>
7068 Starts resetting the machine's current state to the state contained
7069 in the given snapshot, asynchronously. All current settings of the
7070 machine will be reset and changes stored in differencing media
7071 will be lost.
7072 See <link to="ISnapshot" /> for an introduction to snapshots.
7073
7074 After this operation is successfully completed, new empty differencing
7075 media are created for all normal media of the machine.
7076
7077 If the given snapshot is an online snapshot, the machine will go to
7078 the <link to="MachineState_Saved"> saved state</link>, so that the
7079 next time it is powered on, the execution state will be restored
7080 from the state of the snapshot.
7081
7082 <note>
7083 The machine must not be running, otherwise the operation will fail.
7084 </note>
7085
7086 <note>
7087 If the machine state is <link to="MachineState_Saved">Saved</link>
7088 prior to this operation, the saved state file will be implicitly
7089 discarded (as if <link to="IConsole::forgetSavedState"/> were
7090 called).
7091 </note>
7092
7093 <result name="VBOX_E_INVALID_VM_STATE">
7094 Virtual machine is running.
7095 </result>
7096 </desc>
7097 <param name="snapshot" type="ISnapshot" dir="in">
7098 <desc>The snapshot to restore the VM state from.</desc>
7099 </param>
7100 <param name="progress" type="IProgress" dir="return">
7101 <desc>Progress object to track the operation completion.</desc>
7102 </param>
7103 </method>
7104
7105 <method name="teleport">
7106 <desc>
7107 Teleport the VM to a different host machine or process.
7108
7109 TODO explain the details.
7110
7111 <result name="VBOX_E_INVALID_VM_STATE">
7112 Virtual machine not running or paused.
7113 </result>
7114 </desc>
7115 <param name="hostname" type="wstring" dir="in">
7116 <desc>The name or IP of the host to teleport to.</desc>
7117 </param>
7118 <param name="tcpport" type="unsigned long" dir="in">
7119 <desc>The TCP port to connect to (1..65535).</desc>
7120 </param>
7121 <param name="password" type="wstring" dir="in">
7122 <desc>The password.</desc>
7123 </param>
7124 <param name="maxDowntime" type="unsigned long" dir="in">
7125 <desc>
7126 The maximum allowed downtime given as milliseconds. 0 is not a valid
7127 value. Recommended value: 250 ms.
7128
7129 The higher the value is, the greater the chance for a successful
7130 teleportation. A small value may easily result in the teleportation
7131 process taking hours and eventually fail.
7132
7133 <note>
7134 The current implementation treats this a guideline, not as an
7135 absolute rule.
7136 </note>
7137 </desc>
7138 </param>
7139 <param name="progress" type="IProgress" dir="return">
7140 <desc>Progress object to track the operation completion.</desc>
7141 </param>
7142 </method>
7143
7144 <method name="registerCallback">
7145 <desc>
7146 Registers a new console callback on this instance. The methods of the
7147 callback interface will be called by this instance when the appropriate
7148 event occurs.
7149 </desc>
7150 <param name="callback" type="IConsoleCallback" dir="in"/>
7151 </method>
7152
7153 <method name="unregisterCallback">
7154 <desc>
7155 Unregisters the console callback previously registered using
7156 <link to="#registerCallback"/>.
7157 <result name="E_INVALIDARG">
7158 Given @a callback handler is not registered.
7159 </result>
7160 </desc>
7161 <param name="callback" type="IConsoleCallback" dir="in"/>
7162 </method>
7163 </interface>
7164
7165 <!--
7166 // IHost
7167 /////////////////////////////////////////////////////////////////////////
7168 -->
7169
7170 <enum
7171 name="HostNetworkInterfaceMediumType"
7172 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
7173 >
7174 <desc>
7175 Type of encapsulation. Ethernet encapsulation includes both wired and
7176 wireless Ethernet connections.
7177 <see>IHostNetworkInterface</see>
7178 </desc>
7179
7180 <const name="Unknown" value="0">
7181 <desc>
7182 The type of interface cannot be determined.
7183 </desc>
7184 </const>
7185 <const name="Ethernet" value="1">
7186 <desc>
7187 Ethernet frame encapsulation.
7188 </desc>
7189 </const>
7190 <const name="PPP" value="2">
7191 <desc>
7192 Point-to-point protocol encapsulation.
7193 </desc>
7194 </const>
7195 <const name="SLIP" value="3">
7196 <desc>
7197 Serial line IP encapsulation.
7198 </desc>
7199 </const>
7200 </enum>
7201
7202 <enum
7203 name="HostNetworkInterfaceStatus"
7204 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
7205 >
7206 <desc>
7207 Current status of the interface.
7208 <see>IHostNetworkInterface</see>
7209 </desc>
7210
7211 <const name="Unknown" value="0">
7212 <desc>
7213 The state of interface cannot be determined.
7214 </desc>
7215 </const>
7216 <const name="Up" value="1">
7217 <desc>
7218 The interface is fully operational.
7219 </desc>
7220 </const>
7221 <const name="Down" value="2">
7222 <desc>
7223 The interface is not functioning.
7224 </desc>
7225 </const>
7226 </enum>
7227
7228 <enum
7229 name="HostNetworkInterfaceType"
7230 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
7231 >
7232 <desc>
7233 Network interface type.
7234 </desc>
7235 <const name="Bridged" value="1"/>
7236 <const name="HostOnly" value="2"/>
7237 </enum>
7238
7239 <interface
7240 name="IHostNetworkInterface" extends="$unknown"
7241 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
7242 wsmap="managed"
7243 >
7244 <desc>
7245 Represents one of host's network interfaces. IP V6 address and network
7246 mask are strings of 32 hexdecimal digits grouped by four. Groups are
7247 separated by colons.
7248 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
7249 </desc>
7250 <attribute name="name" type="wstring" readonly="yes">
7251 <desc>Returns the host network interface name.</desc>
7252 </attribute>
7253
7254 <attribute name="id" type="uuid" mod="string" readonly="yes">
7255 <desc>Returns the interface UUID.</desc>
7256 </attribute>
7257
7258 <attribute name="networkName" type="wstring" readonly="yes">
7259 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
7260 </attribute>
7261
7262 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
7263 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
7264 </attribute>
7265
7266 <attribute name="IPAddress" type="wstring" readonly="yes">
7267 <desc>Returns the IP V4 address of the interface.</desc>
7268 </attribute>
7269
7270 <attribute name="networkMask" type="wstring" readonly="yes">
7271 <desc>Returns the network mask of the interface.</desc>
7272 </attribute>
7273
7274 <attribute name="IPV6Supported" type="boolean" readonly="yes">
7275 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
7276 </attribute>
7277
7278 <attribute name="IPV6Address" type="wstring" readonly="yes">
7279 <desc>Returns the IP V6 address of the interface.</desc>
7280 </attribute>
7281
7282 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
7283 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
7284 </attribute>
7285
7286 <attribute name="hardwareAddress" type="wstring" readonly="yes">
7287 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
7288 </attribute>
7289
7290 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
7291 <desc>Type of protocol encapsulation used.</desc>
7292 </attribute>
7293
7294 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
7295 <desc>Status of the interface.</desc>
7296 </attribute>
7297
7298 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
7299 <desc>specifies the host interface type.</desc>
7300 </attribute>
7301
7302 <method name="enableStaticIpConfig">
7303 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
7304 <param name="IPAddress" type="wstring" dir="in">
7305 <desc>
7306 IP address.
7307 </desc>
7308 </param>
7309 <param name="networkMask" type="wstring" dir="in">
7310 <desc>
7311 network mask.
7312 </desc>
7313 </param>
7314 </method>
7315
7316 <method name="enableStaticIpConfigV6">
7317 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
7318 <param name="IPV6Address" type="wstring" dir="in">
7319 <desc>
7320 IP address.
7321 </desc>
7322 </param>
7323 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
7324 <desc>
7325 network mask.
7326 </desc>
7327 </param>
7328 </method>
7329
7330 <method name="enableDynamicIpConfig">
7331 <desc>enables the dynamic IP configuration.</desc>
7332 </method>
7333
7334 <method name="dhcpRediscover">
7335 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
7336 </method>
7337
7338 </interface>
7339
7340 <interface
7341 name="IHost" extends="$unknown"
7342 uuid="e380cbfc-ae65-4fa6-899e-45ded6b3132a"
7343 wsmap="managed"
7344 >
7345 <desc>
7346 The IHost interface represents the physical machine that this VirtualBox
7347 installation runs on.
7348
7349 An object implementing this interface is returned by the
7350 <link to="IVirtualBox::host" /> attribute. This interface contains
7351 read-only information about the host's physical hardware (such as what
7352 processors and disks are available, what the host operating system is,
7353 and so on) and also allows for manipulating some of the host's hardware,
7354 such as global USB device filters and host interface networking.
7355
7356 </desc>
7357 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
7358 <desc>List of DVD drives available on the host.</desc>
7359 </attribute>
7360
7361 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
7362 <desc>List of floppy drives available on the host.</desc>
7363 </attribute>
7364
7365 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
7366 <desc>
7367 List of USB devices currently attached to the host.
7368 Once a new device is physically attached to the host computer,
7369 it appears in this list and remains there until detached.
7370
7371 <note>
7372 If USB functionality is not available in the given edition of
7373 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7374 </note>
7375 </desc>
7376 </attribute>
7377
7378 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
7379 <desc>
7380 List of USB device filters in action.
7381 When a new device is physically attached to the host computer,
7382 filters from this list are applied to it (in order they are stored
7383 in the list). The first matched filter will determine the
7384 <link to="IHostUSBDeviceFilter::action">action</link>
7385 performed on the device.
7386
7387 Unless the device is ignored by these filters, filters of all
7388 currently running virtual machines
7389 (<link to="IUSBController::deviceFilters"/>) are applied to it.
7390
7391 <note>
7392 If USB functionality is not available in the given edition of
7393 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7394 </note>
7395
7396 <see>IHostUSBDeviceFilter, USBDeviceState</see>
7397 </desc>
7398 </attribute>
7399
7400 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
7401 <desc>List of host network interfaces currently defined on the host.</desc>
7402 </attribute>
7403
7404 <attribute name="processorCount" type="unsigned long" readonly="yes">
7405 <desc>Number of (logical) CPUs installed in the host system.</desc>
7406 </attribute>
7407
7408 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
7409 <desc>Number of (logical) CPUs online in the host system.</desc>
7410 </attribute>
7411
7412 <method name="getProcessorSpeed">
7413 <desc>Query the (approximate) maximum speed of a specified host CPU in
7414 Megahertz.
7415 </desc>
7416 <param name="cpuId" type="unsigned long" dir="in">
7417 <desc>
7418 Identifier of the CPU.
7419 </desc>
7420 </param>
7421 <param name="speed" type="unsigned long" dir="return">
7422 <desc>
7423 Speed value. 0 is returned if value is not known or @a cpuId is
7424 invalid.
7425 </desc>
7426 </param>
7427 </method>
7428
7429 <method name="getProcessorFeature">
7430 <desc>Query whether a CPU feature is supported or not.</desc>
7431 <param name="feature" type="ProcessorFeature" dir="in">
7432 <desc>
7433 CPU Feature identifier.
7434 </desc>
7435 </param>
7436 <param name="supported" type="boolean" dir="return">
7437 <desc>
7438 Feature is supported or not.
7439 </desc>
7440 </param>
7441 </method>
7442
7443 <method name="getProcessorDescription">
7444 <desc>Query the model string of a specified host CPU.
7445 </desc>
7446 <param name="cpuId" type="unsigned long" dir="in">
7447 <desc>
7448 Identifier of the CPU.
7449 <note>
7450 The current implementation might not necessarily return the
7451 description for this exact CPU.
7452 </note>
7453 </desc>
7454 </param>
7455 <param name="description" type="wstring" dir="return">
7456 <desc>
7457 Model string. An empty string is returned if value is not known or
7458 @a cpuId is invalid.
7459 </desc>
7460 </param>
7461 </method>
7462
7463 <method name="getProcessorCpuIdLeaf">
7464 <desc>
7465 Returns the CPU cpuid information for the specified leaf.
7466 </desc>
7467 <param name="cpuId" type="unsigned long" dir="in">
7468 <desc>
7469 Identifier of the CPU. The CPU most be online.
7470 <note>
7471 The current implementation might not necessarily return the
7472 description for this exact CPU.
7473 </note>
7474 </desc>
7475 </param>
7476 <param name="leaf" type="unsigned long" dir="in">
7477 <desc>
7478 Cpuid leaf index (eax).
7479 </desc>
7480 </param>
7481 <param name="subLeaf" type="unsigned long" dir="in">
7482 <desc>
7483 Cpuid leaf sub index (ecx). This currently only applies to cache
7484 information on Intel CPUs. Use 0 if retriving values for
7485 <link to="IMachine::setCpuIdLeaf"/>.
7486 </desc>
7487 </param>
7488 <param name="valEax" type="unsigned long" dir="out">
7489 <desc>
7490 Cpuid leaf value for register eax.
7491 </desc>
7492 </param>
7493 <param name="valEbx" type="unsigned long" dir="out">
7494 <desc>
7495 Cpuid leaf value for register ebx.
7496 </desc>
7497 </param>
7498 <param name="valEcx" type="unsigned long" dir="out">
7499 <desc>
7500 Cpuid leaf value for register ecx.
7501 </desc>
7502 </param>
7503 <param name="valEdx" type="unsigned long" dir="out">
7504 <desc>
7505 Cpuid leaf value for register edx.
7506 </desc>
7507 </param>
7508 </method>
7509
7510 <attribute name="memorySize" type="unsigned long" readonly="yes">
7511 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7512 </attribute>
7513
7514 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7515 <desc>Available system memory in the host system.</desc>
7516 </attribute>
7517
7518 <attribute name="operatingSystem" type="wstring" readonly="yes">
7519 <desc>Name of the host system's operating system.</desc>
7520 </attribute>
7521
7522 <attribute name="OSVersion" type="wstring" readonly="yes">
7523 <desc>Host operating system's version string.</desc>
7524 </attribute>
7525
7526 <attribute name="UTCTime" type="long long" readonly="yes">
7527 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7528 </attribute>
7529
7530 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
7531 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
7532 </attribute>
7533
7534 <method name="createHostOnlyNetworkInterface">
7535 <desc>
7536 Creates a new adapter for Host Only Networking.
7537 <result name="E_INVALIDARG">
7538 Host network interface @a name already exists.
7539 </result>
7540 </desc>
7541 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7542 <desc>
7543 Created host interface object.
7544 </desc>
7545 </param>
7546 <param name="progress" type="IProgress" dir="return">
7547 <desc>
7548 Progress object to track the operation completion.
7549 </desc>
7550 </param>
7551 </method>
7552
7553 <method name="removeHostOnlyNetworkInterface">
7554 <desc>
7555 Removes the given Host Only Networking interface.
7556 <result name="VBOX_E_OBJECT_NOT_FOUND">
7557 No host network interface matching @a id found.
7558 </result>
7559 </desc>
7560 <param name="id" type="uuid" mod="string" dir="in">
7561 <desc>
7562 Adapter GUID.
7563 </desc>
7564 </param>
7565 <param name="progress" type="IProgress" dir="return">
7566 <desc>
7567 Progress object to track the operation completion.
7568 </desc>
7569 </param>
7570 </method>
7571
7572 <method name="createUSBDeviceFilter">
7573 <desc>
7574 Creates a new USB device filter. All attributes except
7575 the filter name are set to empty (any match),
7576 <i>active</i> is @c false (the filter is not active).
7577
7578 The created filter can be added to the list of filters using
7579 <link to="#insertUSBDeviceFilter"/>.
7580
7581 <see>#USBDeviceFilters</see>
7582 </desc>
7583 <param name="name" type="wstring" dir="in">
7584 <desc>
7585 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7586 for more info.
7587 </desc>
7588 </param>
7589 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7590 <desc>Created filter object.</desc>
7591 </param>
7592 </method>
7593
7594 <method name="insertUSBDeviceFilter">
7595 <desc>
7596 Inserts the given USB device to the specified position
7597 in the list of filters.
7598
7599 Positions are numbered starting from @c 0. If the specified
7600 position is equal to or greater than the number of elements in
7601 the list, the filter is added at the end of the collection.
7602
7603 <note>
7604 Duplicates are not allowed, so an attempt to insert a
7605 filter already in the list is an error.
7606 </note>
7607 <note>
7608 If USB functionality is not available in the given edition of
7609 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7610 </note>
7611
7612 <see>#USBDeviceFilters</see>
7613
7614 <result name="VBOX_E_INVALID_OBJECT_STATE">
7615 USB device filter is not created within this VirtualBox instance.
7616 </result>
7617 <result name="E_INVALIDARG">
7618 USB device filter already in list.
7619 </result>
7620
7621 </desc>
7622 <param name="position" type="unsigned long" dir="in">
7623 <desc>Position to insert the filter to.</desc>
7624 </param>
7625 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7626 <desc>USB device filter to insert.</desc>
7627 </param>
7628 </method>
7629
7630 <method name="removeUSBDeviceFilter">
7631 <desc>
7632 Removes a USB device filter from the specified position in the
7633 list of filters.
7634
7635 Positions are numbered starting from @c 0. Specifying a
7636 position equal to or greater than the number of elements in
7637 the list will produce an error.
7638
7639 <note>
7640 If USB functionality is not available in the given edition of
7641 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7642 </note>
7643
7644 <see>#USBDeviceFilters</see>
7645
7646 <result name="E_INVALIDARG">
7647 USB device filter list empty or invalid @a position.
7648 </result>
7649
7650 </desc>
7651 <param name="position" type="unsigned long" dir="in">
7652 <desc>Position to remove the filter from.</desc>
7653 </param>
7654 </method>
7655
7656 <method name="findHostDVDDrive">
7657 <desc>
7658 Searches for a host DVD drive with the given @c name.
7659
7660 <result name="VBOX_E_OBJECT_NOT_FOUND">
7661 Given @c name does not correspond to any host drive.
7662 </result>
7663
7664 </desc>
7665 <param name="name" type="wstring" dir="in">
7666 <desc>Name of the host drive to search for</desc>
7667 </param>
7668 <param name="drive" type="IMedium" dir="return">
7669 <desc>Found host drive object</desc>
7670 </param>
7671 </method>
7672
7673 <method name="findHostFloppyDrive">
7674 <desc>
7675 Searches for a host floppy drive with the given @c name.
7676
7677 <result name="VBOX_E_OBJECT_NOT_FOUND">
7678 Given @c name does not correspond to any host floppy drive.
7679 </result>
7680
7681 </desc>
7682 <param name="name" type="wstring" dir="in">
7683 <desc>Name of the host floppy drive to search for</desc>
7684 </param>
7685 <param name="drive" type="IMedium" dir="return">
7686 <desc>Found host floppy drive object</desc>
7687 </param>
7688 </method>
7689
7690 <method name="findHostNetworkInterfaceByName">
7691 <desc>
7692 Searches through all host network interfaces for an interface with
7693 the given @c name.
7694 <note>
7695 The method returns an error if the given @c name does not
7696 correspond to any host network interface.
7697 </note>
7698 </desc>
7699 <param name="name" type="wstring" dir="in">
7700 <desc>Name of the host network interface to search for.</desc>
7701 </param>
7702 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7703 <desc>Found host network interface object.</desc>
7704 </param>
7705 </method>
7706 <method name="findHostNetworkInterfaceById">
7707 <desc>
7708 Searches through all host network interfaces for an interface with
7709 the given GUID.
7710 <note>
7711 The method returns an error if the given GUID does not
7712 correspond to any host network interface.
7713 </note>
7714 </desc>
7715 <param name="id" type="uuid" mod="string" dir="in">
7716 <desc>GUID of the host network interface to search for.</desc>
7717 </param>
7718 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7719 <desc>Found host network interface object.</desc>
7720 </param>
7721 </method>
7722 <method name="findHostNetworkInterfacesOfType">
7723 <desc>
7724 Searches through all host network interfaces and returns a list of interfaces of the specified type
7725 </desc>
7726 <param name="type" type="HostNetworkInterfaceType" dir="in">
7727 <desc>type of the host network interfaces to search for.</desc>
7728 </param>
7729 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7730 <desc>Found host network interface objects.</desc>
7731 </param>
7732 </method>
7733
7734 <method name="findUSBDeviceById">
7735 <desc>
7736 Searches for a USB device with the given UUID.
7737
7738 <result name="VBOX_E_OBJECT_NOT_FOUND">
7739 Given @c id does not correspond to any USB device.
7740 </result>
7741
7742 <see>IHostUSBDevice::id</see>
7743 </desc>
7744 <param name="id" type="uuid" mod="string" dir="in">
7745 <desc>UUID of the USB device to search for.</desc>
7746 </param>
7747 <param name="device" type="IHostUSBDevice" dir="return">
7748 <desc>Found USB device object.</desc>
7749 </param>
7750 </method>
7751
7752 <method name="findUSBDeviceByAddress">
7753 <desc>
7754 Searches for a USB device with the given host address.
7755
7756 <result name="VBOX_E_OBJECT_NOT_FOUND">
7757 Given @c name does not correspond to any USB device.
7758 </result>
7759
7760 <see>IHostUSBDevice::address</see>
7761 </desc>
7762 <param name="name" type="wstring" dir="in">
7763 <desc>
7764 Address of the USB device (as assigned by the host) to
7765 search for.
7766 </desc>
7767 </param>
7768 <param name="device" type="IHostUSBDevice" dir="return">
7769 <desc>Found USB device object.</desc>
7770 </param>
7771 </method>
7772
7773 </interface>
7774
7775 <!--
7776 // ISystemProperties
7777 /////////////////////////////////////////////////////////////////////////
7778 -->
7779
7780 <interface
7781 name="ISystemProperties"
7782 extends="$unknown"
7783 uuid="8030645c-8fef-4320-bb7b-c829f00069dc"
7784 wsmap="managed"
7785 >
7786 <desc>
7787 The ISystemProperties interface represents global properties of the given
7788 VirtualBox installation.
7789
7790 These properties define limits and default values for various attributes
7791 and parameters. Most of the properties are read-only, but some can be
7792 changed by a user.
7793 </desc>
7794
7795 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7796 <desc>Minimum guest system memory in Megabytes.</desc>
7797 </attribute>
7798
7799 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7800 <desc>Maximum guest system memory in Megabytes.</desc>
7801 </attribute>
7802
7803 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7804 <desc>Minimum guest video memory in Megabytes.</desc>
7805 </attribute>
7806
7807 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7808 <desc>Maximum guest video memory in Megabytes.</desc>
7809 </attribute>
7810
7811 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7812 <desc>Minimum CPU count.</desc>
7813 </attribute>
7814
7815 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7816 <desc>Maximum CPU count.</desc>
7817 </attribute>
7818
7819 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7820 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7821 </attribute>
7822
7823 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7824 <desc>
7825 Number of network adapters associated with every
7826 <link to="IMachine"/> instance.
7827 </desc>
7828 </attribute>
7829
7830 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7831 <desc>
7832 Number of serial ports associated with every
7833 <link to="IMachine"/> instance.
7834 </desc>
7835 </attribute>
7836
7837 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7838 <desc>
7839 Number of parallel ports associated with every
7840 <link to="IMachine"/> instance.
7841 </desc>
7842 </attribute>
7843
7844 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7845 <desc>
7846 Maximum device position in the boot order. This value corresponds
7847 to the total number of devices a machine can boot from, to make it
7848 possible to include all possible devices to the boot list.
7849 <see><link to="IMachine::setBootOrder"/></see>
7850 </desc>
7851 </attribute>
7852
7853 <attribute name="defaultMachineFolder" type="wstring">
7854 <desc>
7855 Full path to the default directory used to create new or open
7856 existing machines when a settings file name contains no
7857 path.
7858
7859 The initial value of this property is
7860 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7861 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7862
7863 <note>
7864 Setting this property to @c null or an empty string will restore the
7865 initial value.
7866 </note>
7867 <note>
7868 When settings this property, the specified path can be
7869 absolute (full path) or relative
7870 to the <link to="IVirtualBox::homeFolder">
7871 VirtualBox home directory</link>.
7872 When reading this property, a full path is
7873 always returned.
7874 </note>
7875 <note>
7876 The specified path may not exist, it will be created
7877 when necessary.
7878 </note>
7879
7880 <see>
7881 <link to="IVirtualBox::createMachine"/>,
7882 <link to="IVirtualBox::openMachine"/>
7883 </see>
7884 </desc>
7885 </attribute>
7886
7887 <attribute name="defaultHardDiskFolder" type="wstring">
7888 <desc>
7889 Full path to the default directory used to create new or open existing
7890 virtual disks.
7891
7892 This path is used when the storage unit of a hard disk is a regular file
7893 in the host's file system and only a file name that contains no path is
7894 given.
7895
7896 The initial value of this property is
7897 <tt>&lt;</tt>
7898 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7899 <tt>&gt;/HardDisks</tt>.
7900
7901 <note>
7902 Setting this property to @c null or empty string will restore the
7903 initial value.
7904 </note>
7905 <note>
7906 When settings this property, the specified path can be relative
7907 to the
7908 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7909 absolute. When reading this property, a full path is
7910 always returned.
7911 </note>
7912 <note>
7913 The specified path may not exist, it will be created
7914 when necessary.
7915 </note>
7916
7917 <see>
7918 IMedium,
7919 <link to="IVirtualBox::createHardDisk"/>,
7920 <link to="IVirtualBox::openHardDisk"/>,
7921 <link to="IMedium::location"/>
7922 </see>
7923 </desc>
7924 </attribute>
7925
7926 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7927 <desc>
7928 List of all medium storage formats supported by this VirtualBox
7929 installation.
7930
7931 Keep in mind that the medium format identifier
7932 (<link to="IMediumFormat::id"/>) used in other API calls like
7933 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7934 medium format is a case-insensitive string. This means that, for
7935 example, all of the following strings:
7936 <pre>
7937 "VDI"
7938 "vdi"
7939 "VdI"</pre>
7940 refer to the same medium format.
7941
7942 Note that the virtual medium framework is backend-based, therefore
7943 the list of supported formats depends on what backends are currently
7944 installed.
7945
7946 <see>
7947 <link to="IMediumFormat"/>,
7948 </see>
7949 </desc>
7950 </attribute>
7951
7952 <attribute name="defaultHardDiskFormat" type="wstring">
7953 <desc>
7954 Identifier of the default medium format used by VirtualBox.
7955
7956 The medium format set by this attribute is used by VirtualBox
7957 when the medium format was not specified explicitly. One example is
7958 <link to="IVirtualBox::createHardDisk"/> with the empty
7959 format argument. A more complex example is implicit creation of
7960 differencing media when taking a snapshot of a virtual machine:
7961 this operation will try to use a format of the parent medium first
7962 and if this format does not support differencing media the default
7963 format specified by this argument will be used.
7964
7965 The list of supported medium formats may be obtained by the
7966 <link to="#mediaFormats"/> call. Note that the default medium
7967 format must have a capability to create differencing media;
7968 otherwise operations that create media implicitly may fail
7969 unexpectedly.
7970
7971 The initial value of this property is <tt>"VDI"</tt> in the current
7972 version of the VirtualBox product, but may change in the future.
7973
7974 <note>
7975 Setting this property to @c null or empty string will restore the
7976 initial value.
7977 </note>
7978
7979 <see>
7980 <link to="#mediaFormats"/>,
7981 <link to="IMediumFormat::id"/>,
7982 <link to="IVirtualBox::createHardDisk"/>
7983 </see>
7984 </desc>
7985 </attribute>
7986
7987 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7988 <desc>
7989 Library that provides authentication for VRDP clients. The library
7990 is used if a virtual machine's authentication type is set to "external"
7991 in the VM RemoteDisplay configuration.
7992
7993 The system library extension (".DLL" or ".so") must be omitted.
7994 A full path can be specified; if not, then the library must reside on the
7995 system's default library path.
7996
7997 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7998 of that name in one of the default VirtualBox library directories.
7999
8000 For details about VirtualBox authentication libraries and how to implement
8001 them, please refer to the VirtualBox manual.
8002
8003 <note>
8004 Setting this property to @c null or empty string will restore the
8005 initial value.
8006 </note>
8007 </desc>
8008 </attribute>
8009
8010 <attribute name="webServiceAuthLibrary" type="wstring">
8011 <desc>
8012 Library that provides authentication for webservice clients. The library
8013 is used if a virtual machine's authentication type is set to "external"
8014 in the VM RemoteDisplay configuration and will be called from
8015 within the <link to="IWebsessionManager::logon" /> implementation.
8016
8017 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
8018 there is no per-VM setting for this, as the webservice is a global
8019 resource (if it is running). Only for this setting (for the webservice),
8020 setting this value to a literal <tt>"null"</tt> string disables authentication,
8021 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
8022 no matter what user name and password are supplied.
8023
8024 The initial value of this property is <tt>"VRDPAuth"</tt>,
8025 meaning that the webservice will use the same authentication
8026 library that is used by default for VBoxVRDP (again, see
8027 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
8028 The format and calling convention of authentication libraries
8029 is the same for the webservice as it is for VBoxVRDP.
8030
8031 <note>
8032 Setting this property to @c null or empty string will restore the
8033 initial value.
8034 </note>
8035 </desc>
8036 </attribute>
8037
8038 <attribute name="LogHistoryCount" type="unsigned long">
8039 <desc>
8040 This value specifies how many old release log files are kept.
8041 </desc>
8042 </attribute>
8043
8044 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
8045 <desc>This value hold the default audio driver for the current
8046 system.</desc>
8047 </attribute>
8048
8049 <method name="getMaxDevicesPerPortForStorageBus">
8050 <desc>Returns the maximum number of devices which can be attached to a port
8051 for the given storage bus.</desc>
8052
8053 <param name="bus" type="StorageBus" dir="in">
8054 <desc>The storage bus type to get the value for.</desc>
8055 </param>
8056
8057 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
8058 <desc>The maximum number of devices which can eb attached to the port for the given
8059 storage bus.</desc>
8060 </param>
8061 </method>
8062
8063 <method name="getMinPortCountForStorageBus">
8064 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
8065
8066 <param name="bus" type="StorageBus" dir="in">
8067 <desc>The storage bus type to get the value for.</desc>
8068 </param>
8069
8070 <param name="minPortCount" type="unsigned long" dir="return">
8071 <desc>The minimum number of ports for the given storage bus.</desc>
8072 </param>
8073 </method>
8074
8075 <method name="getMaxPortCountForStorageBus">
8076 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
8077
8078 <param name="bus" type="StorageBus" dir="in">
8079 <desc>The storage bus type to get the value for.</desc>
8080 </param>
8081
8082 <param name="maxPortCount" type="unsigned long" dir="return">
8083 <desc>The maximum number of ports for the given storage bus.</desc>
8084 </param>
8085 </method>
8086
8087 <method name="getMaxInstancesOfStorageBus">
8088 <desc>Returns the maximum number of storage bus instances which
8089 can be configured for each VM. This corresponds to the number of
8090 storage controllers one can have.</desc>
8091
8092 <param name="bus" type="StorageBus" dir="in">
8093 <desc>The storage bus type to get the value for.</desc>
8094 </param>
8095
8096 <param name="maxInstances" type="unsigned long" dir="return">
8097 <desc>The maximum number of instances for the given storage bus.</desc>
8098 </param>
8099 </method>
8100
8101 <method name="getDeviceTypesForStorageBus">
8102 <desc>Returns list of all the supported device types
8103 (<link to="DeviceType"/>) for the given type of storage
8104 bus.</desc>
8105
8106 <param name="bus" type="StorageBus" dir="in">
8107 <desc>The storage bus type to get the value for.</desc>
8108 </param>
8109
8110 <param name="deviceTypes" type="DeviceType" safearray="yes" dir="return">
8111 <desc>The list of all supported device types for the given storage bus.</desc>
8112 </param>
8113 </method>
8114 </interface>
8115
8116 <!--
8117 // IGuest
8118 /////////////////////////////////////////////////////////////////////////
8119 -->
8120
8121 <interface
8122 name="IGuestOSType" extends="$unknown"
8123 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
8124 wsmap="struct"
8125 >
8126 <desc>
8127 </desc>
8128
8129 <attribute name="familyId" type="wstring" readonly="yes">
8130 <desc>Guest OS family identifier string.</desc>
8131 </attribute>
8132
8133 <attribute name="familyDescription" type="wstring" readonly="yes">
8134 <desc>Human readable description of the guest OS family.</desc>
8135 </attribute>
8136
8137 <attribute name="id" type="wstring" readonly="yes">
8138 <desc>Guest OS identifier string.</desc>
8139 </attribute>
8140
8141 <attribute name="description" type="wstring" readonly="yes">
8142 <desc>Human readable description of the guest OS.</desc>
8143 </attribute>
8144
8145 <attribute name="is64Bit" type="boolean" readonly="yes">
8146 <desc>Returns @c true if the given OS is 64-bit</desc>
8147 </attribute>
8148
8149 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
8150 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
8151 </attribute>
8152
8153 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
8154 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
8155 </attribute>
8156
8157 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
8158 <desc>Recommended RAM size in Megabytes.</desc>
8159 </attribute>
8160
8161 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
8162 <desc>Recommended video RAM size in Megabytes.</desc>
8163 </attribute>
8164
8165 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
8166 <desc>Recommended hard disk size in Megabytes.</desc>
8167 </attribute>
8168
8169 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
8170 <desc>Returns recommended network adapter for this OS type.</desc>
8171 </attribute>
8172 </interface>
8173
8174 <interface
8175 name="IGuest" extends="$unknown"
8176 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
8177 wsmap="managed"
8178 >
8179 <desc>
8180 The IGuest interface represents information about the operating system
8181 running inside the virtual machine. Used in
8182 <link to="IConsole::guest"/>.
8183
8184 IGuest provides information about the guest operating system, whether
8185 Guest Additions are installed and other OS-specific virtual machine
8186 properties.
8187 </desc>
8188
8189 <attribute name="OSTypeId" type="wstring" readonly="yes">
8190 <desc>
8191 Identifier of the Guest OS type as reported by the Guest
8192 Additions.
8193 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
8194 an IGuestOSType object representing details about the given
8195 Guest OS type.
8196 <note>
8197 If Guest Additions are not installed, this value will be
8198 the same as <link to="IMachine::OSTypeId"/>.
8199 </note>
8200 </desc>
8201 </attribute>
8202
8203 <attribute name="additionsActive" type="boolean" readonly="yes">
8204 <desc>
8205 Flag whether the Guest Additions are installed and active
8206 in which case their version will be returned by the
8207 <link to="#additionsVersion"/> property.
8208 </desc>
8209 </attribute>
8210
8211 <attribute name="additionsVersion" type="wstring" readonly="yes">
8212 <desc>
8213 Version of the Guest Additions (3 decimal numbers separated
8214 by dots) or empty when the Additions are not installed. The
8215 Additions may also report a version but yet not be active as
8216 the version might be refused by VirtualBox (incompatible) or
8217 other failures occurred.
8218 </desc>
8219 </attribute>
8220
8221 <attribute name="supportsSeamless" type="boolean" readonly="yes">
8222 <desc>
8223 Flag whether seamless guest display rendering (seamless desktop
8224 integration) is supported.
8225 </desc>
8226 </attribute>
8227
8228 <attribute name="supportsGraphics" type="boolean" readonly="yes">
8229 <desc>
8230 Flag whether the guest is in graphics mode. If it is not, then
8231 seamless rendering will not work, resize hints are not immediately
8232 acted on and guest display resizes are probably not initiated by
8233 the guest additions.
8234 </desc>
8235 </attribute>
8236
8237 <attribute name="memoryBalloonSize" type="unsigned long">
8238 <desc>Guest system memory balloon size in megabytes.</desc>
8239 </attribute>
8240
8241 <attribute name="statisticsUpdateInterval" type="unsigned long">
8242 <desc>Interval to update guest statistics in seconds.</desc>
8243 </attribute>
8244
8245 <method name="setCredentials">
8246 <desc>
8247 Store login credentials that can be queried by guest operating
8248 systems with Additions installed. The credentials are transient
8249 to the session and the guest may also choose to erase them. Note
8250 that the caller cannot determine whether the guest operating system
8251 has queried or made use of the credentials.
8252
8253 <result name="VBOX_E_VM_ERROR">
8254 VMM device is not available.
8255 </result>
8256
8257 </desc>
8258 <param name="userName" type="wstring" dir="in">
8259 <desc>User name string, can be empty</desc>
8260 </param>
8261 <param name="password" type="wstring" dir="in">
8262 <desc>Password string, can be empty</desc>
8263 </param>
8264 <param name="domain" type="wstring" dir="in">
8265 <desc>Domain name (guest logon scheme specific), can be empty</desc>
8266 </param>
8267 <param name="allowInteractiveLogon" type="boolean" dir="in">
8268 <desc>
8269 Flag whether the guest should alternatively allow the user to
8270 interactively specify different credentials. This flag might
8271 not be supported by all versions of the Additions.
8272 </desc>
8273 </param>
8274 </method>
8275
8276 <method name="getStatistic">
8277 <desc>
8278 Query specified guest statistics as reported by the VirtualBox Additions.
8279 </desc>
8280 <param name="cpuId" type="unsigned long" dir="in">
8281 <desc>Virtual CPU id; not relevant for all statistic types</desc>
8282 </param>
8283 <param name="statistic" type="GuestStatisticType" dir="in">
8284 <desc>Statistic type.</desc>
8285 </param>
8286 <param name="statVal" type="unsigned long" dir="return">
8287 <desc>Statistics value</desc>
8288 </param>
8289 </method>
8290
8291 </interface>
8292
8293
8294 <!--
8295 // IProgress
8296 /////////////////////////////////////////////////////////////////////////
8297 -->
8298
8299 <interface
8300 name="IProgress" extends="$unknown"
8301 uuid="856aa038-853f-42e2-acf7-6e7b02dbe294"
8302 wsmap="managed"
8303 >
8304 <desc>
8305 The IProgress interface is used to track and control
8306 asynchronous tasks within VirtualBox.
8307
8308 An instance of this is returned every time VirtualBox starts
8309 an asynchronous task (in other words, a separate thread) which
8310 continues to run after a method call returns. For example,
8311 <link to="IConsole::saveState" />, which saves the state of
8312 a running virtual machine, can take a long time to complete.
8313 To be able to display a progress bar, a user interface such as
8314 the VirtualBox graphical user interface can use the IProgress
8315 object returned by that method.
8316
8317 Note that IProgress is a "read-only" interface in the sense
8318 that only the VirtualBox internals behind the Main API can
8319 create and manipulate progress objects, whereas client code
8320 can only use the IProgress object to monitor a task's
8321 progress and, if <link to="#cancelable" /> is @c true,
8322 cancel the task by calling <link to="#cancel" />.
8323
8324 A task represented by IProgress consists of either one or
8325 several sub-operations that run sequentially, one by one (see
8326 <link to="#operation" /> and <link to="#operationCount" />).
8327 Every operation is identified by a number (starting from 0)
8328 and has a separate description.
8329
8330 You can find the individual percentage of completion of the current
8331 operation in <link to="#operationPercent" /> and the
8332 percentage of completion of the task as a whole
8333 in <link to="#percent" />.
8334
8335 Similarly, you can wait for the completion of a particular
8336 operation via <link to="#waitForOperationCompletion" /> or
8337 for the completion of the whole task via
8338 <link to="#waitForCompletion" />.
8339 </desc>
8340
8341 <attribute name="id" type="uuid" mod="string" readonly="yes">
8342 <desc>ID of the task.</desc>
8343 </attribute>
8344
8345 <attribute name="description" type="wstring" readonly="yes">
8346 <desc>Description of the task.</desc>
8347 </attribute>
8348
8349 <attribute name="initiator" type="$unknown" readonly="yes">
8350 <desc>Initiator of the task.</desc>
8351 </attribute>
8352
8353 <attribute name="cancelable" type="boolean" readonly="yes">
8354 <desc>Whether the task can be interrupted.</desc>
8355 </attribute>
8356
8357 <attribute name="percent" type="unsigned long" readonly="yes">
8358 <desc>
8359 Current progress value of the task as a whole, in percent.
8360 This value depends on how many operations are already complete.
8361 Returns 100 if <link to="#completed" /> is @c true.
8362 </desc>
8363 </attribute>
8364
8365 <attribute name="timeRemaining" type="long" readonly="yes">
8366 <desc>
8367 Estimated remaining time until the task completes, in
8368 seconds. Returns 0 once the task has completed; returns -1
8369 if the remaining time cannot be computed, in particular if
8370 the current progress is 0.
8371
8372 Even if a value is returned, the estimate will be unreliable
8373 for low progress values. It will become more reliable as the
8374 task progresses; it is not recommended to display an ETA
8375 before at least 20% of a task have completed.
8376 </desc>
8377 </attribute>
8378
8379 <attribute name="completed" type="boolean" readonly="yes">
8380 <desc>Whether the task has been completed.</desc>
8381 </attribute>
8382
8383 <attribute name="canceled" type="boolean" readonly="yes">
8384 <desc>Whether the task has been canceled.</desc>
8385 </attribute>
8386
8387 <attribute name="resultCode" type="long" readonly="yes">
8388 <desc>
8389 Result code of the progress task.
8390 Valid only if <link to="#completed"/> is @c true.
8391 </desc>
8392 </attribute>
8393
8394 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
8395 <desc>
8396 Extended information about the unsuccessful result of the
8397 progress operation. May be @c null if no extended information
8398 is available.
8399 Valid only if <link to="#completed"/> is @c true and
8400 <link to="#resultCode"/> indicates a failure.
8401 </desc>
8402 </attribute>
8403
8404 <attribute name="operationCount" type="unsigned long" readonly="yes">
8405 <desc>
8406 Number of sub-operations this task is divided into.
8407 Every task consists of at least one suboperation.
8408 </desc>
8409 </attribute>
8410
8411 <attribute name="operation" type="unsigned long" readonly="yes">
8412 <desc>Number of the sub-operation being currently executed.</desc>
8413 </attribute>
8414
8415 <attribute name="operationDescription" type="wstring" readonly="yes">
8416 <desc>
8417 Description of the sub-operation being currently executed.
8418 </desc>
8419 </attribute>
8420
8421 <attribute name="operationPercent" type="unsigned long" readonly="yes">
8422 <desc>Progress value of the current sub-operation only, in percent.</desc>
8423 </attribute>
8424
8425 <attribute name="timeout" type="unsigned long">
8426 <desc>
8427 When non-zero, this specifies the number of milliseconds after which
8428 the operation will automatically be canceled. This can only be set on
8429 cancelable objects.
8430 </desc>
8431 </attribute>
8432
8433 <method name="setCurrentOperationProgress">
8434 <desc>Internal method, not to be called externally.</desc>
8435 <param name="percent" type="unsigned long" dir="in" />
8436 </method>
8437 <method name="setNextOperation">
8438 <desc>Internal method, not to be called externally.</desc>
8439 <param name="nextOperationDescription" type="wstring" dir="in" />
8440 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8441 </method>
8442
8443 <method name="waitForCompletion">
8444 <desc>
8445 Waits until the task is done (including all sub-operations)
8446 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8447
8448 <result name="VBOX_E_IPRT_ERROR">
8449 Failed to wait for task completion.
8450 </result>
8451 </desc>
8452
8453 <param name="timeout" type="long" dir="in">
8454 <desc>
8455 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8456 </desc>
8457 </param>
8458 </method>
8459
8460 <method name="waitForOperationCompletion">
8461 <desc>
8462 Waits until the given operation is done with a given timeout in
8463 milliseconds; specify -1 for an indefinite wait.
8464
8465 <result name="VBOX_E_IPRT_ERROR">
8466 Failed to wait for operation completion.
8467 </result>
8468
8469 </desc>
8470 <param name="operation" type="unsigned long" dir="in">
8471 <desc>
8472 Number of the operation to wait for.
8473 Must be less than <link to="#operationCount"/>.
8474 </desc>
8475 </param>
8476 <param name="timeout" type="long" dir="in">
8477 <desc>
8478 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8479 </desc>
8480 </param>
8481 </method>
8482
8483 <method name="cancel">
8484 <desc>
8485 Cancels the task.
8486 <note>
8487 If <link to="#cancelable"/> is @c false, then this method will fail.
8488 </note>
8489
8490 <result name="VBOX_E_INVALID_OBJECT_STATE">
8491 Operation cannot be canceled.
8492 </result>
8493
8494 </desc>
8495 </method>
8496
8497 </interface>
8498
8499
8500 <!--
8501 // ISnapshot
8502 /////////////////////////////////////////////////////////////////////////
8503 -->
8504
8505 <interface
8506 name="ISnapshot" extends="$unknown"
8507 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8508 wsmap="managed"
8509 >
8510 <desc>
8511 The ISnapshot interface represents a snapshot of the virtual
8512 machine.
8513
8514 Together with the differencing media that are created
8515 when a snapshot is taken, a machine can be brought back to
8516 the exact state it was in when the snapshot was taken.
8517
8518 The ISnapshot interface has no methods, only attributes; snapshots
8519 are controlled through methods of the <link to="IConsole" /> interface
8520 which also manage the media associated with the snapshot.
8521 The following operations exist:
8522
8523 <ul>
8524 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8525 by creating new, empty differencing images for the machine's
8526 media and saving the VM settings and (if the VM is running)
8527 the current VM state in the snapshot.
8528
8529 The differencing images will then receive all data written to
8530 the machine's media, while their parent (base) images
8531 remain unmodified after the snapshot has been taken (see
8532 <link to="IMedium" /> for details about differencing images).
8533 This simplifies restoring a machine to the state of a snapshot:
8534 only the differencing images need to be deleted.
8535
8536 The current machine state is not changed by taking a snapshot.
8537 If the machine is running, it will resume execution after the
8538 snapshot has been taken.
8539 </li>
8540
8541 <li><link to="IConsole::restoreSnapshot"/>: this goes back to
8542 a previous snapshot. This resets the machine's state to that of
8543 the previous snapshot by deleting the differencing image of each
8544 of the machine's media and setting the machine's settings
8545 and state to the state that was saved in the snapshot (if any).
8546
8547 This destroys the machine's current state.
8548 </li>
8549
8550 <li><link to="IConsole::deleteSnapshot"/>: deletes a snapshot
8551 without affecting the current machine state.
8552
8553 This does not change the machine, but instead frees the resources
8554 allocated when the snapshot was taken: the settings and machine state
8555 is deleted (if any), and the snapshot's differencing image for each
8556 of the machine's media gets merged with its parent image.
8557
8558 Neither the current machine state nor other snapshots are affected
8559 by this operation, except that parent media will be modified
8560 to contain the disk data associated with the snapshot being deleted.
8561 </li>
8562 </ul>
8563
8564 Each snapshot contains the settings of the virtual machine (hardware
8565 configuration etc.). In addition, if the machine was running when the
8566 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8567 the current VM state is saved in the snapshot (similarly to what happens
8568 when a VM's state is saved). The snapshot is then said to
8569 be <i>online</i> because when restoring it, the VM will be running.
8570
8571 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8572 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8573
8574 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8575 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8576 it then contains a so-called "zero execution state", representing a
8577 machine that is powered off.
8578
8579 <h3>Snapshot branches and the "current" snapshot</h3>
8580
8581 Snapshots can be chained, whereby every next snapshot is based on the
8582 previous one. This chaining is related to medium branching
8583 (see the <link to="IMedium"/> description) in that every time
8584 a new snapshot is created, a new differencing medium is implicitly
8585 created for all normal media attached to the machine.
8586
8587 Each virtual machine has a "current snapshot", identified by
8588 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8589 to the last snapshot in the chain. In a future version of VirtualBox,
8590 it will be possible to reset a machine's current state to that of an
8591 earlier snapshot without discarding the current state so that it will be
8592 possible to create alternative snapshot paths in a snapshot tree.
8593
8594 In the current implementation, multiple snapshot branches within one
8595 virtual machine are not allowed. Every machine has a single branch,
8596 and <link to="IConsole::takeSnapshot"/> operation adds a new
8597 snapshot to the top of that branch.
8598 </desc>
8599
8600 <attribute name="id" type="uuid" mod="string" readonly="yes">
8601 <desc>UUID of the snapshot.</desc>
8602 </attribute>
8603
8604 <attribute name="name" type="wstring">
8605 <desc>Short name of the snapshot.</desc>
8606 </attribute>
8607
8608 <attribute name="description" type="wstring">
8609 <desc>Optional description of the snapshot.</desc>
8610 </attribute>
8611
8612 <attribute name="timeStamp" type="long long" readonly="yes">
8613 <desc>
8614 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8615 </desc>
8616 </attribute>
8617
8618 <attribute name="online" type="boolean" readonly="yes">
8619 <desc>
8620 @c true if this snapshot is an online snapshot and @c false otherwise.
8621
8622 When this attribute is @c true, the
8623 <link to="IMachine::stateFilePath"/> attribute of the
8624 <link to="#machine"/> object associated with this snapshot
8625 will point to the saved state file. Otherwise, it will be
8626 an empty string.
8627 </desc>
8628 </attribute>
8629
8630 <attribute name="machine" type="IMachine" readonly="yes">
8631 <desc>
8632 Virtual machine this snapshot is taken on. This object
8633 stores all settings the machine had when taking this snapshot.
8634 <note>
8635 The returned machine object is immutable, i.e. no
8636 any settings can be changed.
8637 </note>
8638 </desc>
8639 </attribute>
8640
8641 <attribute name="parent" type="ISnapshot" readonly="yes">
8642 <desc>
8643 Parent snapshot (a snapshot this one is based on), or
8644 @c null if the snapshot has no parent (i.e. is the first snapshot).
8645 </desc>
8646 </attribute>
8647
8648 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8649 <desc>
8650 Child snapshots (all snapshots having this one as a parent).
8651 </desc>
8652 </attribute>
8653
8654 </interface>
8655
8656
8657 <!--
8658 // IMedium
8659 /////////////////////////////////////////////////////////////////////////
8660 -->
8661
8662 <enum
8663 name="MediumState"
8664 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8665 >
8666 <desc>
8667 Virtual medium state.
8668 <see>IMedium</see>
8669 </desc>
8670
8671 <const name="NotCreated" value="0">
8672 <desc>
8673 Associated medium storage does not exist (either was not created yet or
8674 was deleted).
8675 </desc>
8676 </const>
8677 <const name="Created" value="1">
8678 <desc>
8679 Associated storage exists and accessible; this gets set if the
8680 accessibility check performed by <link to="IMedium::refreshState" />
8681 was successful.
8682 </desc>
8683 </const>
8684 <const name="LockedRead" value="2">
8685 <desc>
8686 Medium is locked for reading (see <link to="IMedium::lockRead"/>),
8687 no data modification is possible.
8688 </desc>
8689 </const>
8690 <const name="LockedWrite" value="3">
8691 <desc>
8692 Medium is locked for writing (see <link to="IMedium::lockWrite"/>),
8693 no concurrent data reading or modification is possible.
8694 </desc>
8695 </const>
8696 <const name="Inaccessible" value="4">
8697 <desc>
8698 Medium accessiblity check (see <link to="IMedium::refreshState" />) has
8699 not yet been performed, or else, associated medium storage is not
8700 accessible. In the first case, <link to="IMedium::lastAccessError"/>
8701 is empty, in the second case, it describes the error that occured.
8702 </desc>
8703 </const>
8704 <const name="Creating" value="5">
8705 <desc>
8706 Associated medium storage is being created.
8707 </desc>
8708 </const>
8709 <const name="Deleting" value="6">
8710 <desc>
8711 Associated medium storage is being deleted.
8712 </desc>
8713 </const>
8714 </enum>
8715
8716 <enum
8717 name="MediumType"
8718 uuid="11f6f7a5-0327-409a-9d42-7db6a0cec578"
8719 >
8720 <desc>
8721 Virtual medium type.
8722 <see>IMedium</see>
8723 </desc>
8724
8725 <const name="Normal" value="0">
8726 <desc>
8727 Normal medium (attached directly or indirectly, preserved
8728 when taking snapshots).
8729 </desc>
8730 </const>
8731 <const name="Immutable" value="1">
8732 <desc>
8733 Immutable medium (attached indirectly, changes are wiped out
8734 the next time the virtual machine is started).
8735 </desc>
8736 </const>
8737 <const name="Writethrough" value="2">
8738 <desc>
8739 Write through medium (attached directly, ignored when
8740 taking snapshots).
8741 </desc>
8742 </const>
8743 </enum>
8744
8745 <enum
8746 name="MediumVariant"
8747 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8748 >
8749 <desc>
8750 Virtual medium image variant. More than one flag may be set.
8751 <see>IMedium</see>
8752 </desc>
8753
8754 <const name="Standard" value="0">
8755 <desc>
8756 No particular variant requested, results in using the backend default.
8757 </desc>
8758 </const>
8759 <const name="VmdkSplit2G" value="0x01">
8760 <desc>
8761 VMDK image split in chunks of less than 2GByte.
8762 </desc>
8763 </const>
8764 <const name="VmdkStreamOptimized" value="0x04">
8765 <desc>
8766 VMDK streamOptimized image. Special import/export format which is
8767 read-only/append-only.
8768 </desc>
8769 </const>
8770 <const name="VmdkESX" value="0x08">
8771 <desc>
8772 VMDK format variant used on ESX products.
8773 </desc>
8774 </const>
8775 <const name="Fixed" value="0x10000">
8776 <desc>
8777 Fixed image. Only allowed for base images.
8778 </desc>
8779 </const>
8780 <const name="Diff" value="0x20000">
8781 <desc>
8782 Fixed image. Only allowed for base images.
8783 </desc>
8784 </const>
8785 </enum>
8786
8787 <interface
8788 name="IMediumAttachment" extends="$unknown"
8789 uuid="e58eb3eb-8627-428b-bdf8-34487c848de5"
8790 wsmap="struct"
8791 >
8792 <desc>
8793 The IMediumAttachment interface represents the attachment
8794 of a storage medium to a virtual machine. Each machine contains
8795 an array of its medium attachments in <link to="IMachine::mediumAttachments"/>.
8796
8797 Each medium attachment specifies a storage controller as well as a port
8798 and device number. Fixed media (hard disks) will always also specify
8799 an instance of IMedium in <link to="#medium" />, referring to the hard disk
8800 medium. For removeable media, the IMedia instance is optional; it can be
8801 @c null if no media is mounted (see <link to="IMachine::mountMedium" />).
8802 </desc>
8803
8804 <attribute name="medium" type="IMedium" readonly="yes">
8805 <desc>Medium object associated with this attachment; it
8806 can be @c null for removable devices.</desc>
8807 </attribute>
8808
8809 <attribute name="controller" type="wstring" readonly="yes">
8810 <desc>Name of the storage controller of this attachment; this
8811 refers to one of the controllers in <link to="IMachine::storageControllers" />
8812 by name.</desc>
8813 </attribute>
8814
8815 <attribute name="port" type="long" readonly="yes">
8816 <desc>Port number of this attachment.</desc>
8817 </attribute>
8818
8819 <attribute name="device" type="long" readonly="yes">
8820 <desc>Device slot number of this attachment.</desc>
8821 </attribute>
8822
8823 <attribute name="type" type="DeviceType" readonly="yes">
8824 <desc>Device type of this attachment.</desc>
8825 </attribute>
8826
8827 <attribute name="passthrough" type="boolean" readonly="yes">
8828 <desc>Pass I/O requests through to a device on the host.</desc>
8829 </attribute>
8830
8831 </interface>
8832
8833 <interface
8834 name="IMedium" extends="$unknown"
8835 uuid="aa8167ba-df72-4738-b740-9b84377ba9f1"
8836 wsmap="managed"
8837 >
8838 <desc>
8839 The IMedium interface represents virtual storage for a machine's
8840 hard disks, CD/DVD or floppy drives. It will typically represent
8841 a disk image on the host, for example a VDI or VMDK file representing
8842 a virtual hard disk, or an ISO or RAW file representing virtual
8843 removable media, but can also point to a network location (e.g.
8844 for iSCSI targets).
8845
8846 Instances of IMedium are connected to virtual machines by way of
8847 medium attachments (see <link to="IMediumAttachment" />), which link
8848 the storage medium to a particular device slot of a storage controller
8849 of the virtual machine.
8850 In the VirtualBox API, virtual storage is therefore always represented
8851 by the following chain of object links:
8852
8853 <ul>
8854 <li><link to="IMachine::storageControllers"/> contains an array of
8855 storage controllers (IDE, SATA, SCSI or a floppy controller;
8856 these are instances of <link to="IStorageController"/>).</li>
8857 <li><link to="IMachine::mediumAttachments"/> contains an array of
8858 medium attachments (instances of <link to="IMediumAttachment"/>),
8859 each containing a storage controller from the above array, a
8860 port/device specification, and an instance of IMedium representing
8861 the medium storage (image file).
8862
8863 For removable media, the storage medium is optional; a medium
8864 attachment with no medium represents a CD/DVD or floppy drive
8865 with no medium inserted. By contrast, hard disk attachments
8866 will always have an IMedium object attached.</li>
8867 <li>Each IMedium in turn points to a storage unit (such as a file
8868 on the host computer or a network resource) that holds actual
8869 data. This location is represented by the <link to="#location"/>
8870 attribute.</li>
8871 </ul>
8872
8873 Existing media are opened using the following methods, depending on the
8874 media type:
8875 <ul>
8876 <li><link to="IVirtualBox::openHardDisk"/></li>
8877 <li><link to="IVirtualBox::openDVDImage"/></li>
8878 <li><link to="IVirtualBox::openFloppyImage"/></li>
8879 </ul>
8880
8881 New hard disk media can be created with the VirtualBox API using the
8882 <link to="IVirtualBox::createHardDisk"/> method.
8883
8884 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8885 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8886 type in a regular file.
8887
8888 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8889 drive; in that case the <link to="#id" /> attribute contains the UUID of
8890 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8891
8892 <h3>Known media</h3>
8893
8894 When an existing medium is opened for the first time, it is automatically
8895 remembered by the given VirtualBox installation or, in other words, becomes
8896 a <i>known medium</i>. Known media are stored in the media
8897 registry transparently maintained by VirtualBox and stored in settings
8898 files so that this registry is preserved when VirtualBox is not running.
8899
8900 Newly created virtual media are remembered only when the associated
8901 storage unit is actually created.
8902
8903 All known media can be enumerated using
8904 <link to="IVirtualBox::hardDisks"/>,
8905 <link to="IVirtualBox::DVDImages"/> and
8906 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8907 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8908 and similar methods or by location using
8909 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8910
8911 Only known media can be attached to virtual machines.
8912
8913 Removing known media from the media registry is performed when the given
8914 medium is closed using the <link to="#close"/> method or when its
8915 associated storage unit is deleted.
8916
8917 <h3>Accessibility checks</h3>
8918
8919 VirtualBox defers media accessibility checks until the <link to="#refreshState" />
8920 method is called explicitly on a medium. This is done to make the VirtualBox object
8921 ready for serving requests as fast as possible and let the end-user
8922 application decide if it needs to check media accessibility right away or not.
8923
8924 As a result, when VirtualBox starts up (e.g. the VirtualBox
8925 object gets created for the first time), all known media are in the
8926 "Inaccessible" state, but the value of the <link to="#lastAccessError"/>
8927 attribute is an empty string because no actual accessibility check has
8928 been made yet.
8929
8930 After calling <link to="#refreshState" />, a medium is considered
8931 <i>accessible</i> if its storage unit can be read. In that case, the
8932 <link to="#state"/> attribute has a value of "Created". If the storage
8933 unit cannot be read (for example, because it is located on a disconnected
8934 network resource, or was accidentally deleted outside VirtualBox),
8935 the medium is considered <i>inaccessible</i>, which is indicated by the
8936 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8937 obtained by reading the <link to="#lastAccessError"/> attribute.
8938
8939 <h3>Medium types</h3>
8940
8941 There are three types of medium behavior (see <link to="MediumType" />):
8942 "normal", "immutable" and "writethrough", represented by the
8943 <link to="#type"/> attribute. The type of the medium defines how the
8944 medium is attached to a virtual machine and what happens when a
8945 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8946 attached medium is taken. At the moment DVD and floppy media are always
8947 of type "writethrough".
8948
8949 All media can be also divided in two groups: <i>base</i> media and
8950 <i>differencing</i> media. A base medium contains all sectors of the
8951 medium data in its own storage and therefore can be used independently.
8952 In contrast, a differencing mediun is a "delta" to some other medium and
8953 contains only those sectors which differ from that other medium, which is
8954 then called a <i>parent</i>. The differencing medium is said to be
8955 <i>linked to</i> that parent. The parent may be itself a differencing
8956 medium, thus forming a chain of linked media. The last element in that
8957 chain must always be a base medium. Note that several differencing
8958 media may be linked to the same parent medium.
8959
8960 Differencing media can be distinguished from base media by querying the
8961 <link to="#parent"/> attribute: base media do not have parents they would
8962 depend on, so the value of this attribute is always @c null for them.
8963 Using this attribute, it is possible to walk up the medium tree (from the
8964 child medium to its parent). It is also possible to walk down the tree
8965 using the <link to="#children"/> attribute.
8966
8967 Note that the type of all differencing media is "Normal"; all other
8968 values are meaningless for them. Base media may be of any type.
8969
8970 <h3>Creating hard disks</h3>
8971
8972 New base hard disks are created using
8973 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8974 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8975 disks are usually implicitly created by VirtualBox when needed but may
8976 also be created explicitly using <link to="#createDiffStorage"/>.
8977
8978 After the hard disk is successfully created (including the storage unit)
8979 or opened, it becomes a known hard disk (remembered in the internal media
8980 registry). Known hard disks can be attached to a virtual machine, accessed
8981 through <link to="IVirtualBox::getHardDisk"/> and
8982 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8983 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8984
8985 The following methods, besides <link to="IMedium::close"/>,
8986 automatically remove the hard disk from the media registry:
8987 <ul>
8988 <li><link to="#deleteStorage"/></li>
8989 <li><link to="#mergeTo"/></li>
8990 </ul>
8991
8992 If the storage unit of the hard disk is a regular file in the host's
8993 file system then the rules stated in the description of the
8994 <link to="IMedium::location"/> attribute apply when setting its value. In
8995 addition, a plain file name without any path may be given, in which case
8996 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8997 folder</link> will be prepended to it.
8998
8999 <h4>Automatic composition of the file name part</h4>
9000
9001 Another extension to the <link to="IMedium::location"/> attribute is that
9002 there is a possibility to cause VirtualBox to compose a unique value for
9003 the file name part of the location using the UUID of the hard disk. This
9004 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
9005 e.g. before the storage unit is created, and works as follows. You set the
9006 value of the <link to="IMedium::location"/> attribute to a location
9007 specification which only contains the path specification but not the file
9008 name part and ends with either a forward slash or a backslash character.
9009 In response, VirtualBox will generate a new UUID for the hard disk and
9010 compose the file name using the following pattern:
9011 <pre>
9012 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
9013 </pre>
9014 where <tt>&lt;path&gt;</tt> is the supplied path specification,
9015 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
9016 is the default extension for the storage format of this hard disk. After
9017 that, you may call any of the methods that create a new hard disk storage
9018 unit and they will use the generated UUID and file name.
9019
9020 <h3>Attaching Hard Disks</h3>
9021
9022 Hard disks are attached to virtual machines using the
9023 <link to="IMachine::attachDevice"/> method and detached using the
9024 <link to="IMachine::detachDevice"/> method. Depending on their
9025 <link to="#type"/>, hard disks are attached either
9026 <i>directly</i> or <i>indirectly</i>.
9027
9028 When a hard disk is being attached directly, it is associated with the
9029 virtual machine and used for hard disk operations when the machine is
9030 running. When a hard disk is being attached indirectly, a new differencing
9031 hard disk linked to it is implicitly created and this differencing hard
9032 disk is associated with the machine and used for hard disk operations.
9033 This also means that if <link to="IMachine::attachDevice"/> performs
9034 a direct attachment then the same hard disk will be returned in response
9035 to the subsequent <link to="IMachine::getMedium"/> call; however if
9036 an indirect attachment is performed then
9037 <link to="IMachine::getMedium"/> will return the implicitly created
9038 differencing hard disk, not the original one passed to <link
9039 to="IMachine::attachDevice"/>. In detail:
9040
9041 <ul>
9042 <li><b>Normal base</b> hard disks that do not have children (i.e.
9043 differencing hard disks linked to them) and that are not already
9044 attached to virtual machines in snapshots are attached <b>directly</b>.
9045 Otherwise, they are attached <b>indirectly</b> because having
9046 dependent children or being part of the snapshot makes it impossible
9047 to modify hard disk contents without breaking the integrity of the
9048 dependent party. The <link to="#readOnly"/> attribute allows to
9049 quickly determine the kind of the attachment for the given hard
9050 disk. Note that if a normal base hard disk is to be indirectly
9051 attached to a virtual machine with snapshots then a special
9052 procedure called <i>smart attachment</i> is performed (see below).</li>
9053 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
9054 they are attached <b>directly</b> if they do not have children and are
9055 not attached to virtual machines in snapshots, and <b>indirectly</b>
9056 otherwise. Note that the smart attachment procedure is never performed
9057 for differencing hard disks.</li>
9058 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
9059 they are designed to be non-writable. If an immutable hard disk is
9060 attached to a virtual machine with snapshots then a special
9061 procedure called smart attachment is performed (see below).</li>
9062 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
9063 also as designed. This also means that writethrough hard disks cannot
9064 have other hard disks linked to them at all.</li>
9065 </ul>
9066
9067 Note that the same hard disk, regardless of its type, may be attached to
9068 more than one virtual machine at a time. In this case, the machine that is
9069 started first gains exclusive access to the hard disk and attempts to
9070 start other machines having this hard disk attached will fail until the
9071 first machine is powered down.
9072
9073 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
9074 that the given hard disk remains associated with the given machine after a
9075 successful <link to="IMachine::detachDevice"/> call until
9076 <link to="IMachine::saveSettings"/> is called to save all changes to
9077 machine settings to disk. This deferring is necessary to guarantee that
9078 the hard disk configuration may be restored at any time by a call to
9079 <link to="IMachine::discardSettings"/> before the settings
9080 are saved (committed).
9081
9082 Note that if <link to="IMachine::discardSettings"/> is called after
9083 indirectly attaching some hard disks to the machine but before a call to
9084 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
9085 all differencing hard disks implicitly created by
9086 <link to="IMachine::attachDevice"/> for these indirect attachments.
9087 Such implicitly created hard disks will also be immediately deleted when
9088 detached explicitly using the <link to="IMachine::detachDevice"/>
9089 call if it is made before <link to="IMachine::saveSettings"/>. This
9090 implicit deletion is safe because newly created differencing hard
9091 disks do not contain any user data.
9092
9093 However, keep in mind that detaching differencing hard disks that were
9094 implicitly created by <link to="IMachine::attachDevice"/>
9095 before the last <link to="IMachine::saveSettings"/> call will
9096 <b>not</b> implicitly delete them as they may already contain some data
9097 (for example, as a result of virtual machine execution). If these hard
9098 disks are no more necessary, the caller can always delete them explicitly
9099 using <link to="#deleteStorage"/> after they are actually de-associated
9100 from this machine by the <link to="IMachine::saveSettings"/> call.
9101
9102 <h3>Smart Attachment</h3>
9103
9104 When normal base or immutable hard disks are indirectly attached to a
9105 virtual machine then some additional steps are performed to make sure the
9106 virtual machine will have the most recent "view" of the hard disk being
9107 attached. These steps include walking through the machine's snapshots
9108 starting from the current one and going through ancestors up to the first
9109 snapshot. Hard disks attached to the virtual machine in all
9110 of the encountered snapshots are checked whether they are descendants of
9111 the given normal base or immutable hard disk. The first found child (which
9112 is the differencing hard disk) will be used instead of the normal base or
9113 immutable hard disk as a parent for creating a new differencing hard disk
9114 that will be actually attached to the machine. And only if no descendants
9115 are found or if the virtual machine does not have any snapshots then the
9116 normal base or immutable hard disk will be used itself as a parent for
9117 this differencing hard disk.
9118
9119 It is easier to explain what smart attachment does using the
9120 following example:
9121 <pre>
9122BEFORE attaching B.vdi: AFTER attaching B.vdi:
9123
9124Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
9125 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
9126 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
9127 Snapshot 4 (none) Snapshot 4 (none)
9128 CurState (none) CurState (D3->D2.vdi)
9129
9130 NOT
9131 ...
9132 CurState (D3->B.vdi)
9133 </pre>
9134 The first column is the virtual machine configuration before the base hard
9135 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
9136 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
9137 mean that the hard disk that is actually attached to the machine is a
9138 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
9139 another hard disk, <tt>B.vdi</tt>.
9140
9141 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
9142 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
9143 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
9144 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
9145 it cannot be attached directly and needs an indirect attachment (i.e.
9146 implicit creation of a new differencing hard disk). Due to the smart
9147 attachment procedure, the new differencing hard disk
9148 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
9149 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
9150 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
9151 machine.
9152
9153 Note that if there is more than one descendant hard disk of the given base
9154 hard disk found in a snapshot, and there is an exact device, channel and
9155 bus match, then this exact match will be used. Otherwise, the youngest
9156 descendant will be picked up.
9157
9158 There is one more important aspect of the smart attachment procedure which
9159 is not related to snapshots at all. Before walking through the snapshots
9160 as described above, the backup copy of the current list of hard disk
9161 attachment is searched for descendants. This backup copy is created when
9162 the hard disk configuration is changed for the first time after the last
9163 <link to="IMachine::saveSettings"/> call and used by
9164 <link to="IMachine::discardSettings"/> to undo the recent hard disk
9165 changes. When such a descendant is found in this backup copy, it will be
9166 simply re-attached back, without creating a new differencing hard disk for
9167 it. This optimization is necessary to make it possible to re-attach the
9168 base or immutable hard disk to a different bus, channel or device slot
9169 without losing the contents of the differencing hard disk actually
9170 attached to the machine in place of it.
9171 </desc>
9172
9173 <attribute name="id" type="uuid" mod="string" readonly="yes">
9174 <desc>
9175 UUID of the medium. For a newly created medium, this value is a randomly
9176 generated UUID.
9177
9178 <note>
9179 For media in one of MediumState_NotCreated, MediumState_Creating or
9180 MediumState_Deleting states, the value of this property is undefined
9181 and will most likely be an empty UUID.
9182 </note>
9183 </desc>
9184 </attribute>
9185
9186 <attribute name="description" type="wstring">
9187 <desc>
9188 Optional description of the medium. For a newly created medium the value
9189 of this attribute is an empty string.
9190
9191 Medium types that don't support this attribute will return E_NOTIMPL in
9192 attempt to get or set this attribute's value.
9193
9194 <note>
9195 For some storage types, reading this attribute may return an outdated
9196 (last known) value when <link to="#state"/> is <link
9197 to="MediumState_Inaccessible"/> or <link
9198 to="MediumState_LockedWrite"/> because the value of this attribute is
9199 stored within the storage unit itself. Also note that changing the
9200 attribute value is not possible in such case, as well as when the
9201 medium is the <link to="MediumState_LockedRead"/> state.
9202 </note>
9203 </desc>
9204 </attribute>
9205
9206 <attribute name="state" type="MediumState" readonly="yes">
9207 <desc>
9208 Returns the current medium state, which is the last state set by
9209 the accessibility check performed by <link to="#refreshState"/>.
9210 If that method has not yet been called on the medium, the state
9211 is "Inaccessible"; as opposed to truly inaccessible media, the
9212 value of <link to="#lastAccessError"/> will be an empty string in
9213 that case.
9214
9215 <note>As of version 3.1, this no longer performs an accessibility check
9216 automatically; call <link to="#refreshState"/> for that.
9217 </note>
9218 </desc>
9219 </attribute>
9220
9221 <attribute name="location" type="wstring">
9222 <desc>
9223 Location of the storage unit holding medium data.
9224
9225 The format of the location string is medium type specific. For medium
9226 types using regular files in a host's file system, the location
9227 string is the full file name.
9228
9229 Some medium types may support changing the storage unit location by
9230 simply changing the value of this property. If this operation is not
9231 supported, the implementation will return E_NOTIMPL in attempt to set
9232 this attribute's value.
9233
9234 When setting a value of the location attribute which is a regular file
9235 in the host's file system, the given file name may be either relative to
9236 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
9237 absolute. Note that if the given location specification does not contain
9238 the file extension part then a proper default extension will be
9239 automatically appended by the implementation depending on the medium type.
9240 </desc>
9241 </attribute>
9242
9243 <attribute name="name" type="wstring" readonly="yes">
9244 <desc>
9245 Name of the storage unit holding medium data.
9246
9247 The returned string is a short version of the <link to="#location"/>
9248 attribute that is suitable for representing the medium in situations
9249 where the full location specification is too long (such as lists
9250 and comboboxes in GUI frontends). This string is also used by frontends
9251 to sort the media list alphabetically when needed.
9252
9253 For example, for locations that are regular files in the host's file
9254 system, the value of this attribute is just the file name (+ extension),
9255 without the path specification.
9256
9257 Note that as opposed to the <link to="#location"/> attribute, the name
9258 attribute will not necessary be unique for a list of media of the
9259 given type and format.
9260 </desc>
9261 </attribute>
9262
9263 <attribute name="deviceType" type="DeviceType" readonly="yes">
9264 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
9265 medium.</desc>
9266 </attribute>
9267
9268 <attribute name="hostDrive" type="boolean" readonly="yes">
9269 <desc>True if this corresponds to a drive on the host.</desc>
9270 </attribute>
9271
9272 <attribute name="size" type="unsigned long long" readonly="yes">
9273 <desc>
9274 Physical size of the storage unit used to hold medium data (in bytes).
9275
9276 <note>
9277 For media whose <link to="#state"/> is <link
9278 to="MediumState_Inaccessible"/>, the value of this property is the
9279 last known size. For <link to="MediumState_NotCreated"/> media,
9280 the returned value is zero.
9281 </note>
9282 </desc>
9283 </attribute>
9284
9285 <attribute name="format" type="wstring" readonly="yes">
9286 <desc>
9287 Storage format of this medium.
9288
9289 The value of this attribute is a string that specifies a backend used
9290 to store medium data. The storage format is defined when you create a
9291 new medium or automatically detected when you open an existing medium,
9292 and cannot be changed later.
9293
9294 The list of all storage formats supported by this VirtualBox
9295 installation can be obtained using
9296 <link to="ISystemProperties::mediumFormats"/>.
9297 </desc>
9298 </attribute>
9299
9300 <attribute name="type" type="MediumType">
9301 <desc>
9302 Type (role) of this medium.
9303
9304 The following constraints apply when changing the value of this
9305 attribute:
9306 <ul>
9307 <li>If a medium is attached to a virtual machine (either in the
9308 current state or in one of the snapshots), its type cannot be
9309 changed.
9310 </li>
9311 <li>As long as the medium has children, its type cannot be set
9312 to <link to="MediumType_Writethrough"/>.
9313 </li>
9314 <li>The type of all differencing media is
9315 <link to="MediumType_Normal"/> and cannot be changed.
9316 </li>
9317 </ul>
9318
9319 The type of a newly created or opened medium is set to
9320 <link to="MediumType_Normal"/>, except for DVD and floppy media,
9321 which have a type of <link to="MediumType_Writethrough"/>.
9322 </desc>
9323 </attribute>
9324
9325 <attribute name="parent" type="IMedium" readonly="yes">
9326 <desc>
9327 Parent of this medium (the medium this medium is directly based
9328 on).
9329
9330 Only differencing media have parents. For base (non-differencing)
9331 media, @c null is returned.
9332 </desc>
9333 </attribute>
9334
9335 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
9336 <desc>
9337 Children of this medium (all differencing media directly based
9338 on this medium). A @c null array is returned if this medium
9339 does not have any children.
9340 </desc>
9341 </attribute>
9342
9343 <attribute name="base" type="IMedium" readonly="yes">
9344 <desc>
9345 Base medium of this medium.
9346
9347 If this is a differencing medium, its base medium is the medium
9348 the given medium branch starts from. For all other types of media, this
9349 property returns the medium object itself (i.e. the same object this
9350 property is read on).
9351 </desc>
9352 </attribute>
9353
9354 <attribute name="readOnly" type="boolean" readonly="yes">
9355 <desc>
9356 Returns @c true if this medium is read-only and @c false otherwise.
9357
9358 A medium is considered to be read-only when its contents cannot be
9359 modified without breaking the integrity of other parties that depend on
9360 this medium such as its child media or snapshots of virtual machines
9361 where this medium is attached to these machines. If there are no
9362 children and no such snapshots then there is no dependency and the
9363 medium is not read-only.
9364
9365 The value of this attribute can be used to determine the kind of the
9366 attachment that will take place when attaching this medium to a
9367 virtual machine. If the value is @c false then the medium will
9368 be attached directly. If the value is @c true then the medium
9369 will be attached indirectly by creating a new differencing child
9370 medium for that. See the interface description for more information.
9371
9372 Note that all <link to="MediumType_Immutable">Immutable</link> media
9373 are always read-only while all
9374 <link to="MediumType_Writethrough">Writethrough</link> media are
9375 always not.
9376
9377 <note>
9378 The read-only condition represented by this attribute is related to
9379 the medium type and usage, not to the current
9380 <link to="IMedium::state">medium state</link> and not to the read-only
9381 state of the storage unit.
9382 </note>
9383 </desc>
9384 </attribute>
9385
9386 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9387 <desc>
9388 Logical size of this medium (in megabytes), as reported to the
9389 guest OS running inside the virtual machine this medium is
9390 attached to. The logical size is defined when the medium is created
9391 and cannot be changed later.
9392
9393 <note>
9394 Reading this property on a differencing medium will return the size
9395 of its <link to="#base"/> medium.
9396 </note>
9397 <note>
9398 For media whose state is <link to="#state"/> is <link
9399 to="MediumState_Inaccessible"/>, the value of this property is the
9400 last known logical size. For <link to="MediumaState_NotCreated"/>
9401 media, the returned value is zero.
9402 </note>
9403 </desc>
9404 </attribute>
9405
9406 <attribute name="autoReset" type="boolean">
9407 <desc>
9408 Whether this differencing medium will be automatically reset each
9409 time a virtual machine it is attached to is powered up. This
9410 attribute is automatically set to @c true for the last
9411 differencing image of an "immutable" medium (see
9412 <link to="MediumType" />).
9413
9414 See <link to="#reset"/> for more information about resetting
9415 differencing media.
9416
9417 <note>
9418 Reading this property on a base (non-differencing) medium will
9419 always @c false. Changing the value of this property in this
9420 case is not supported.
9421 </note>
9422
9423 <result name="VBOX_E_NOT_SUPPORTED">
9424 This is not a differencing medium (when changing the attribute
9425 value).
9426 </result>
9427 </desc>
9428 </attribute>
9429
9430 <attribute name="lastAccessError" type="wstring" readonly="yes">
9431 <desc>
9432 Text message that represents the result of the last accessibility
9433 check performed by <link to="#refreshState"/>.
9434
9435 An empty string is returned if the last accessibility check
9436 was successful or has not yet been called. As a result, if
9437 <link to="#state" /> is "Inaccessible" and this attribute is empty,
9438 then <link to="#refreshState"/> has yet to be called; this is the
9439 default value of media after VirtualBox initialization.
9440 A non-empty string indicates a failure and should normally describe
9441 a reason of the failure (for example, a file read error).
9442 </desc>
9443 </attribute>
9444
9445 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9446 <desc>
9447 Array of UUIDs of all machines this medium is attached to.
9448
9449 A @c null array is returned if this medium is not attached to any
9450 machine or to any machine's snapshot.
9451
9452 <note>
9453 The returned array will include a machine even if this medium is not
9454 attached to that machine in the current state but attached to it in
9455 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9456 details.
9457 </note>
9458 </desc>
9459 </attribute>
9460
9461 <method name="refreshState">
9462 <desc>
9463 If the current medium state (see <link to="MediumState"/>) is one of
9464 "Created", "Inaccessible" or "LockedRead", then this performs an
9465 accessibility check on the medium and sets the value of the <link to="#state"/>
9466 attribute accordingly; that value is also returned for convenience.
9467
9468 For all other state values, this does not perform a refresh but returns
9469 the state only.
9470
9471 The refresh, if performed, may take a long time (several seconds or even
9472 minutes, depending on the storage unit location and format) because it performs an
9473 accessibility check of the storage unit. This check may cause a significant
9474 delay if the storage unit of the given medium is, for example, a file located
9475 on a network share which is not currently accessible due to connectivity
9476 problems. In that case, the call will not return until a timeout
9477 interval defined by the host OS for this operation expires. For this reason,
9478 it is recommended to never read this attribute on the main UI thread to avoid
9479 making the UI unresponsive.
9480
9481 If the last known state of the medium is "Created" and the accessibility
9482 check fails, then the state would be set to "Inaccessible", and
9483 <link to="#lastAccessError"/> may be used to get more details about the
9484 failure. If the state of the medium is "LockedRead", then it remains the
9485 same, and a non-empty value of <link to="#lastAccessError"/> will
9486 indicate a failed accessibility check in this case.
9487
9488 Note that not all medium states are applicable to all medium types.
9489 </desc>
9490 <param name="state" type="MediumState" dir="return">
9491 <desc>
9492 New medium state.
9493 </desc>
9494 </param>
9495 </method>
9496
9497 <method name="getSnapshotIds">
9498 <desc>
9499 Returns an array of UUIDs of all snapshots of the given machine where
9500 this medium is attached to.
9501
9502 If the medium is attached to the machine in the current state, then the
9503 first element in the array will always be the ID of the queried machine
9504 (i.e. the value equal to the @c machineId argument), followed by
9505 snapshot IDs (if any).
9506
9507 If the medium is not attached to the machine in the current state, then
9508 the array will contain only snapshot IDs.
9509
9510 The returned array may be @c null if this medium is not attached
9511 to the given machine at all, neither in the current state nor in one of
9512 the snapshots.
9513 </desc>
9514 <param name="machineId" type="uuid" mod="string" dir="in">
9515 <desc>
9516 UUID of the machine to query.
9517 </desc>
9518 </param>
9519 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9520 <desc>
9521 Array of snapshot UUIDs of the given machine using this medium.
9522 </desc>
9523 </param>
9524 </method>
9525
9526 <method name="lockRead">
9527 <desc>
9528 Locks this medium for reading.
9529
9530 A read lock is shared: many clients can simultaneously lock the
9531 same medium for reading unless it is already locked for writing (see
9532 <link to="#lockWrite"/>) in which case an error is returned.
9533
9534 When the medium is locked for reading, it cannot be modified
9535 from within VirtualBox. This means that any method that changes
9536 the properties of this medium or contents of the storage unit
9537 will return an error (unless explicitly stated otherwise). That
9538 includes an attempt to start a virtual machine that wants to
9539 write to the the medium.
9540
9541 When the virtual machine is started up, it locks for reading all
9542 media it uses in read-only mode. If some medium cannot be locked
9543 for reading, the startup procedure will fail.
9544 A medium is typically locked for reading while it is used by a running
9545 virtual machine but has a depending differencing image that receives
9546 the actual write operations. This way one base medium can have
9547 multiple child differencing images which can be written to
9548 simultaneously. Read-only media such as DVD and floppy images are
9549 also locked for reading only (so they can be in use by multiple
9550 machines simultaneously).
9551
9552 A medium is also locked for reading when it is the source of a
9553 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9554
9555 The medium locked for reading must be unlocked using the <link
9556 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9557 can be nested and must be followed by the same number of paired
9558 <link to="#unlockRead"/> calls.
9559
9560 This method sets the medium state (see <link to="#state"/>) to
9561 "LockedRead" on success. The medium's previous state must be
9562 one of "Created", "Inaccessible" or "LockedRead".
9563
9564 Locking an inaccessible medium is not an error; this method performs
9565 a logical lock that prevents modifications of this medium through
9566 the VirtualBox API, not a physical file-system lock of the underlying
9567 storage unit.
9568
9569 This method returns the current state of the medium
9570 <i>before</i> the operation.
9571
9572 <result name="VBOX_E_INVALID_OBJECT_STATE">
9573 Invalid medium state (e.g. not created, locked, inaccessible,
9574 creating, deleting).
9575 </result>
9576
9577 </desc>
9578 <param name="state" type="MediumState" dir="return">
9579 <desc>
9580 State of the medium after the operation.
9581 </desc>
9582 </param>
9583 </method>
9584
9585 <method name="unlockRead">
9586 <desc>
9587 Cancels the read lock previously set by <link to="#lockRead"/>.
9588
9589 For both success and failure, this method returns the current state
9590 of the medium <i>after</i> the operation.
9591
9592 See <link to="#lockRead"/> for more details.
9593
9594 <result name="VBOX_E_INVALID_OBJECT_STATE">
9595 Medium not locked for reading.
9596 </result>
9597
9598 </desc>
9599 <param name="state" type="MediumState" dir="return">
9600 <desc>
9601 State of the medium after the operation.
9602 </desc>
9603 </param>
9604 </method>
9605
9606 <method name="lockWrite">
9607 <desc>
9608 Locks this medium for writing.
9609
9610 A write lock, as opposed to <link to="#lockRead"/>, is
9611 exclusive: there may be only one client holding a write lock,
9612 and there may be no read locks while the write lock is held.
9613 As a result, read-locking fails if a write lock is held, and
9614 write-locking fails if either a read or another write lock is held.
9615
9616 When a medium is locked for writing, it cannot be modified
9617 from within VirtualBox, and it is not guaranteed that the values
9618 of its properties are up-to-date. Any method that changes the
9619 properties of this medium or contents of the storage unit will
9620 return an error (unless explicitly stated otherwise).
9621
9622 When a virtual machine is started up, it locks for writing all
9623 media it uses to write data to. If any medium could not be locked
9624 for writing, the startup procedure will fail. If a medium has
9625 differencing images, then while the machine is running, only
9626 the last ("leaf") differencing image is locked for writing,
9627 whereas its parents are locked for reading only.
9628
9629 A medium is also locked for writing when it is the target of a
9630 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9631
9632 The medium locked for writing must be unlocked using the <link
9633 to="#unlockWrite"/> method. Write locks <i>cannot</i> be nested.
9634
9635 This method sets the medium state (see <link to="#state"/>) to
9636 "LockedWrite" on success. The medium's previous state must be
9637 either "Created" or "Inaccessible".
9638
9639 Locking an inaccessible medium is not an error; this method performs
9640 a logical lock that prevents modifications of this medium through
9641 the VirtualBox API, not a physical file-system lock of the underlying
9642 storage unit.
9643
9644 For both, success and failure, this method returns the current
9645 state of the medium <i>before</i> the operation.
9646
9647 <result name="VBOX_E_INVALID_OBJECT_STATE">
9648 Invalid medium state (e.g. not created, locked, inaccessible,
9649 creating, deleting).
9650 </result>
9651
9652 </desc>
9653 <param name="state" type="MediumState" dir="return">
9654 <desc>
9655 State of the medium after the operation.
9656 </desc>
9657 </param>
9658 </method>
9659
9660 <method name="unlockWrite">
9661 <desc>
9662 Cancels the write lock previously set by <link to="#lockWrite"/>.
9663
9664 For both success and failure, this method returns the current
9665 state of the medium <i>after</i> the operation.
9666
9667 See <link to="#lockWrite"/> for more details.
9668
9669 <result name="VBOX_E_INVALID_OBJECT_STATE">
9670 Medium not locked for writing.
9671 </result>
9672
9673 </desc>
9674 <param name="state" type="MediumState" dir="return">
9675 <desc>
9676 State of the medium after the operation.
9677 </desc>
9678 </param>
9679 </method>
9680
9681 <method name="close">
9682 <desc>
9683 Closes this medium.
9684
9685 The medium must not be attached to any known virtual machine
9686 and must not have any known child media, otherwise the
9687 operation will fail.
9688
9689 When the medium is successfully closed, it gets removed from
9690 the list of remembered media, but its storage unit is not
9691 deleted. In particular, this means that this medium can be
9692 later opened again using the <link
9693 to="IVirtualBox::openHardDisk"/> call.
9694
9695 Note that after this method successfully returns, the given medium
9696 object becomes uninitialized. This means that any attempt
9697 to call any of its methods or attributes will fail with the
9698 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9699
9700 <result name="VBOX_E_INVALID_OBJECT_STATE">
9701 Invalid medium state (other than not created, created or
9702 inaccessible).
9703 </result>
9704 <result name="VBOX_E_OBJECT_IN_USE">
9705 Medium attached to virtual machine.
9706 </result>
9707 <result name="VBOX_E_FILE_ERROR">
9708 Settings file not accessible.
9709 </result>
9710 <result name="VBOX_E_XML_ERROR">
9711 Could not parse the settings file.
9712 </result>
9713
9714 </desc>
9715 </method>
9716
9717 <!-- storage methods -->
9718
9719 <method name="getProperty">
9720 <desc>
9721 Returns the value of the custom medium property with the given name.
9722
9723 The list of all properties supported by the given medium format can
9724 be obtained with <link to="IMediumFormat::describeProperties"/>.
9725
9726 Note that if this method returns an empty string in @a value, the
9727 requested property is supported but currently not assigned any value.
9728
9729 <result name="VBOX_E_OBJECT_NOT_FOUND">
9730 Requested property does not exist (not supported by the format).
9731 </result>
9732 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9733 </desc>
9734 <param name="name" type="wstring" dir="in">
9735 <desc>Name of the property to get.</desc>
9736 </param>
9737 <param name="value" type="wstring" dir="return">
9738 <desc>Current property value.</desc>
9739 </param>
9740 </method>
9741
9742 <method name="setProperty">
9743 <desc>
9744 Sets the value of the custom medium property with the given name.
9745
9746 The list of all properties supported by the given medium format can
9747 be obtained with <link to="IMediumFormat::describeProperties"/>.
9748
9749 Note that setting the property value to @c null or an empty string is
9750 equivalent to deleting the existing value. A default value (if it is
9751 defined for this property) will be used by the format backend in this
9752 case.
9753
9754 <result name="VBOX_E_OBJECT_NOT_FOUND">
9755 Requested property does not exist (not supported by the format).
9756 </result>
9757 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9758 </desc>
9759 <param name="name" type="wstring" dir="in">
9760 <desc>Name of the property to set.</desc>
9761 </param>
9762 <param name="value" type="wstring" dir="in">
9763 <desc>Property value to set.</desc>
9764 </param>
9765 </method>
9766
9767 <method name="getProperties">
9768 <desc>
9769 Returns values for a group of properties in one call.
9770
9771 The names of the properties to get are specified using the @a names
9772 argument which is a list of comma-separated property names or
9773 an empty string if all properties are to be returned. Note that currently
9774 the value of this argument is ignored and the method always returns all
9775 existing properties.
9776
9777 The list of all properties supported by the given medium format can
9778 be obtained with <link to="IMediumFormat::describeProperties"/>.
9779
9780 The method returns two arrays, the array of property names corresponding
9781 to the @a names argument and the current values of these properties.
9782 Both arrays have the same number of elements with each elemend at the
9783 given index in the first array corresponds to an element at the same
9784 index in the second array.
9785
9786 Note that for properties that do not have assigned values,
9787 an empty string is returned at the appropriate index in the
9788 @a returnValues array.
9789
9790 </desc>
9791 <param name="names" type="wstring" dir="in">
9792 <desc>
9793 Names of properties to get.
9794 </desc>
9795 </param>
9796 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9797 <desc>Names of returned properties.</desc>
9798 </param>
9799 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9800 <desc>Values of returned properties.</desc>
9801 </param>
9802 </method>
9803
9804 <method name="setProperties">
9805 <desc>
9806 Sets values for a group of properties in one call.
9807
9808 The names of the properties to set are passed in the @a names
9809 array along with the new values for them in the @a values array. Both
9810 arrays have the same number of elements with each elemend at the given
9811 index in the first array corresponding to an element at the same index
9812 in the second array.
9813
9814 If there is at least one property name in @a names that is not valid,
9815 the method will fail before changing the values of any other properties
9816 from the @a names array.
9817
9818 Using this method over <link to="#setProperty"/> is preferred if you
9819 need to set several properties at once since it will result into less
9820 IPC calls.
9821
9822 The list of all properties supported by the given medium format can
9823 be obtained with <link to="IMediumFormat::describeProperties"/>.
9824
9825 Note that setting the property value to @c null or an empty string is
9826 equivalent to deleting the existing value. A default value (if it is
9827 defined for this property) will be used by the format backend in this
9828 case.
9829 </desc>
9830 <param name="names" type="wstring" safearray="yes" dir="in">
9831 <desc>Names of properties to set.</desc>
9832 </param>
9833 <param name="values" type="wstring" safearray="yes" dir="in">
9834 <desc>Values of properties to set.</desc>
9835 </param>
9836 </method>
9837
9838 <!-- storage methods -->
9839
9840 <method name="createBaseStorage">
9841 <desc>
9842 Starts creating a hard disk storage unit (fixed/dynamic, according
9843 to the variant flags) in in the background. The previous storage unit
9844 created for this object, if any, must first be deleted using
9845 <link to="#deleteStorage"/>, otherwise the operation will fail.
9846
9847 Before the operation starts, the medium is placed in
9848 <link to="MediumState_Creating"/> state. If the create operation
9849 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
9850 state.
9851
9852 After the returned progress object reports that the operation has
9853 successfully completed, the medium state will be set to <link
9854 to="MediumState_Created"/>, the medium will be remembered by this
9855 VirtualBox installation and may be attached to virtual machines.
9856
9857 <result name="VBOX_E_NOT_SUPPORTED">
9858 The variant of storage creation operation is not supported. See <link
9859 to="IMediumFormat::capabilities"/>.
9860 </result>
9861 </desc>
9862 <param name="logicalSize" type="unsigned long long" dir="in">
9863 <desc>Maximum logical size of the medium in megabytes.</desc>
9864 </param>
9865 <param name="variant" type="MediumVariant" dir="in">
9866 <desc>Exact image variant which should be created.</desc>
9867 </param>
9868 <param name="progress" type="IProgress" dir="return">
9869 <desc>Progress object to track the operation completion.</desc>
9870 </param>
9871 </method>
9872
9873 <method name="deleteStorage">
9874 <desc>
9875 Starts deleting the storage unit of this medium.
9876
9877 The medium must not be attached to any known virtual machine and must
9878 not have any known child media, otherwise the operation will fail.
9879 It will also fail if there is no storage unit to delete or if deletion
9880 is already in progress, or if the medium is being in use (locked for
9881 read or for write) or inaccessible. Therefore, the only valid state for
9882 this operation to succeed is <link to="MediumState_Created"/>.
9883
9884 Before the operation starts, the medium is placed in
9885 <link to="MediumState_Deleting"/> state and gets removed from the list
9886 of remembered hard disks (media registry). If the delete operation
9887 fails, the medium will be remembered again and placed back to
9888 <link to="MediumState_Created"/> state.
9889
9890 After the returned progress object reports that the operation is
9891 complete, the medium state will be set to
9892 <link to="MediumState_NotCreated"/> and you will be able to use one of
9893 the storage creation methods to create it again.
9894
9895 <see>#close()</see>
9896
9897 <result name="VBOX_E_OBJECT_IN_USE">
9898 Medium is attached to a virtual machine.
9899 </result>
9900 <result name="VBOX_E_NOT_SUPPORTED">
9901 Storage deletion is not allowed because neither of storage creation
9902 operations are supported. See
9903 <link to="IMediumFormat::capabilities"/>.
9904 </result>
9905
9906 <note>
9907 If the deletion operation fails, it is not guaranteed that the storage
9908 unit still exists. You may check the <link to="IMedium::state"/> value
9909 to answer this question.
9910 </note>
9911 </desc>
9912 <param name="progress" type="IProgress" dir="return">
9913 <desc>Progress object to track the operation completion.</desc>
9914 </param>
9915 </method>
9916
9917 <!-- diff methods -->
9918
9919 <method name="createDiffStorage">
9920 <desc>
9921 Starts creating an empty differencing storage unit based on this
9922 medium in the format and at the location defined by the @a target
9923 argument.
9924
9925 The target medium must be in <link to="MediumState_NotCreated"/>
9926 state (i.e. must not have an existing storage unit). Upon successful
9927 completion, this operation will set the type of the target medium to
9928 <link to="MediumType_Normal"/> and create a storage unit necessary to
9929 represent the differencing medium data in the given format (according
9930 to the storage format of the target object).
9931
9932 After the returned progress object reports that the operation is
9933 successfully complete, the target medium gets remembered by this
9934 VirtualBox installation and may be attached to virtual machines.
9935
9936 <note>
9937 The medium will be set to <link to="MediumState_LockedRead"/>
9938 state for the duration of this operation.
9939 </note>
9940 <result name="VBOX_E_OBJECT_IN_USE">
9941 Medium not in @c NotCreated state.
9942 </result>
9943 </desc>
9944 <param name="target" type="IMedium" dir="in">
9945 <desc>Target medium.</desc>
9946 </param>
9947 <param name="variant" type="MediumVariant" dir="in">
9948 <desc>Exact image variant which should be created.</desc>
9949 </param>
9950 <param name="progress" type="IProgress" dir="return">
9951 <desc>Progress object to track the operation completion.</desc>
9952 </param>
9953 </method>
9954
9955 <method name="mergeTo">
9956 <desc>
9957 Starts merging the contents of this medium and all intermediate
9958 differencing media in the chain to the given target medium.
9959
9960 The target medium must be either a descendant of this medium or
9961 its ancestor (otherwise this method will immediately return a failure).
9962 It follows that there are two logical directions of the merge operation:
9963 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9964 ancestor (<i>backward merge</i>). Let us consider the following medium
9965 chain:
9966
9967 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9968
9969 Here, calling this method on the <tt>Base</tt> medium object with
9970 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9971 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9972 merge. Note that in both cases the contents of the resulting medium
9973 will be the same, the only difference is the medium object that takes
9974 the result of the merge operation. In case of the forward merge in the
9975 above example, the result will be written to <tt>Diff_2</tt>; in case of
9976 the backward merge, the result will be written to <tt>Base</tt>. In
9977 other words, the result of the operation is always stored in the target
9978 medium.
9979
9980 Upon successful operation completion, the storage units of all media in
9981 the chain between this (source) medium and the target medium, including
9982 the source medium itself, will be automatically deleted and the
9983 relevant medium objects (including this medium) will become
9984 uninitialized. This means that any attempt to call any of
9985 their methods or attributes will fail with the
9986 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9987 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9988 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> media.
9989 Note that <tt>Diff_2</tt> in this case will become a base medium
9990 itself since it will no longer be based on any other medium.
9991
9992 Considering the above, all of the following conditions must be met in
9993 order for the merge operation to succeed:
9994 <ul>
9995 <li>
9996 Neither this (source) medium nor any intermediate
9997 differencing medium in the chain between it and the target
9998 medium is attached to any virtual machine.
9999 </li>
10000 <li>
10001 Neither the source medium nor the target medium is an
10002 <link to="MediumType_Immutable"/> medium.
10003 </li>
10004 <li>
10005 The part of the medium tree from the source medium to the
10006 target medium is a linear chain, i.e. all medium in this
10007 chain have exactly one child which is the next medium in this
10008 chain. The only exception from this rule is the target medium in
10009 the forward merge operation; it is allowed to have any number of
10010 child media because the merge operation will not change its
10011 logical contents (as it is seen by the guest OS or by children).
10012 </li>
10013 <li>
10014 None of the involved media are in
10015 <link to="MediumState_LockedRead"/> or
10016 <link to="MediumState_LockedWrite"/> state.
10017 </li>
10018 </ul>
10019
10020 <note>
10021 This (source) medium and all intermediates will be placed to <link
10022 to="MediumState_Deleting"/> state and the target medium will be
10023 placed to <link to="MediumState_LockedWrite"/> state and for the
10024 duration of this operation.
10025 </note>
10026 </desc>
10027 <param name="targetId" type="uuid" mod="string" dir="in">
10028 <desc>UUID of the target ancestor or descendant medium.</desc>
10029 </param>
10030 <param name="progress" type="IProgress" dir="return">
10031 <desc>Progress object to track the operation completion.</desc>
10032 </param>
10033 </method>
10034
10035 <!-- clone method -->
10036
10037 <method name="cloneTo">
10038 <desc>
10039 Starts creating a clone of this medium in the format and at the
10040 location defined by the @a target argument.
10041
10042 The target medium must be either in <link to="MediumState_NotCreated"/>
10043 state (i.e. must not have an existing storage unit) or in
10044 <link to="MediumState_Created"/> state (i.e. created and not locked, and
10045 big enough to hold the data or else the copy will be partial). Upon
10046 successful completion, the cloned medium will contain exactly the
10047 same sector data as the medium being cloned, except that in the
10048 first case a new UUID for the clone will be randomly generated, and in
10049 the second case the UUID will remain unchanged.
10050
10051 The @a parent argument defines which medium will be the parent
10052 of the clone. Passing a @c null reference indicates that the clone will
10053 be a base image, i.e. completely independent. It is possible to specify
10054 an arbitrary medium for this parameter, including the parent of the
10055 medium which is being cloned. Even cloning to a child of the source
10056 medium is possible. Note that when cloning to an existing image, the
10057 @a parent irgument is ignored.
10058
10059 After the returned progress object reports that the operation is
10060 successfully complete, the target medium gets remembered by this
10061 VirtualBox installation and may be attached to virtual machines.
10062
10063 <note>
10064 This medium will be placed to <link to="MediumState_LockedRead"/>
10065 state for the duration of this operation.
10066 </note>
10067 <result name="E_NOTIMPL">
10068 The specified cloning variant is not supported at the moment.
10069 </result>
10070 </desc>
10071 <param name="target" type="IMedium" dir="in">
10072 <desc>Target medium.</desc>
10073 </param>
10074 <param name="variant" type="MediumVariant" dir="in">
10075 <desc>Exact image variant which should be created.</desc>
10076 </param>
10077 <param name="parent" type="IMedium" dir="in">
10078 <desc>Parent of the cloned medium.</desc>
10079 </param>
10080 <param name="progress" type="IProgress" dir="return">
10081 <desc>Progress object to track the operation completion.</desc>
10082 </param>
10083 </method>
10084
10085 <!-- other methods -->
10086
10087 <method name="compact">
10088 <desc>
10089 Starts compacting of this medium. This means that the medium is
10090 transformed into a possibly more compact storage representation.
10091 This potentially creates temporary images, which can require a
10092 substantial amount of additional disk space.
10093
10094 This medium will be placed to <link to="MediumState_LockedWrite"/>
10095 state and all its parent media (if any) will be placed to
10096 <link to="MediumState_LockedRead"/> state for the duration of this
10097 operation.
10098
10099 Please note that the results can be either returned straight away,
10100 or later as the result of the background operation via the object
10101 returned via the @a progress parameter.
10102
10103 <result name="VBOX_E_NOT_SUPPORTED">
10104 Medium format does not support compacting (but potentially
10105 needs it).
10106 </result>
10107 </desc>
10108 <param name="progress" type="IProgress" dir="return">
10109 <desc>Progress object to track the operation completion.</desc>
10110 </param>
10111 </method>
10112
10113 <method name="resize">
10114 <desc>
10115 Starts resizing this medium. This means that the nominal size of the
10116 medium is set to the new value. Both increasing and decreasing the
10117 size is possible, and there are no safety checks, since VirtualBox
10118 does not make any assumptions about the medium contents.
10119
10120 Resizing usually needs additional disk space, and possibly also
10121 some temporary disk space. Note that resize does not create a full
10122 temporary copy of the medium, so the additional disk space requirement
10123 is usually much lower than using the clone operation.
10124
10125 This medium will be placed to <link to="MediumState_LockedWrite"/>
10126 state for the duration of this operation.
10127
10128 Please note that the results can be either returned straight away,
10129 or later as the result of the background operation via the object
10130 returned via the @a progress parameter.
10131
10132 <result name="VBOX_E_NOT_SUPPORTED">
10133 Medium format does not support resizing.
10134 </result>
10135 </desc>
10136 <param name="logicalSize" type="unsigned long long" dir="in">
10137 <desc>New nominal capacity of the medium in megabytes.</desc>
10138 </param>
10139 <param name="progress" type="IProgress" dir="return">
10140 <desc>Progress object to track the operation completion.</desc>
10141 </param>
10142 </method>
10143
10144 <method name="reset">
10145 <desc>
10146 Starts erasing the contents of this differencing medium.
10147
10148 This operation will reset the differencing medium to its initial
10149 state when it does not contain any sector data and any read operation is
10150 redirected to its parent medium. This automatically gets called
10151 during VM power-up for every medium whose <link to="#autoReset" />
10152 attribute is @c true.
10153
10154 The medium will be write-locked for the duration of this operation (see
10155 <link to="#lockWrite" />).
10156
10157 <result name="VBOX_E_NOT_SUPPORTED">
10158 This is not a differencing medium.
10159 </result>
10160 <result name="VBOX_E_INVALID_OBJECT_STATE">
10161 Medium is not in <link to="MediumState_Created"/> or
10162 <link to="MediumState_Inaccessible"/> state.
10163 </result>
10164 </desc>
10165 <param name="progress" type="IProgress" dir="return">
10166 <desc>Progress object to track the operation completion.</desc>
10167 </param>
10168 </method>
10169
10170 </interface>
10171
10172
10173 <!--
10174 // IMediumFormat
10175 /////////////////////////////////////////////////////////////////////////
10176 -->
10177
10178 <enum
10179 name="DataType"
10180 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
10181 >
10182 <const name="Int32" value="0"/>
10183 <const name="Int8" value="1"/>
10184 <const name="String" value="2"/>
10185 </enum>
10186
10187 <enum
10188 name="DataFlags"
10189 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
10190 >
10191 <const name="None" value="0x00"/>
10192 <const name="Mandatory" value="0x01"/>
10193 <const name="Expert" value="0x02"/>
10194 <const name="Array" value="0x04"/>
10195 <const name="FlagMask" value="0x07"/>
10196 </enum>
10197
10198 <enum
10199 name="MediumFormatCapabilities"
10200 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
10201 >
10202 <desc>
10203 Medium format capability flags.
10204 </desc>
10205
10206 <const name="Uuid" value="0x01">
10207 <desc>
10208 Supports UUIDs as expected by VirtualBox code.
10209 </desc>
10210 </const>
10211
10212 <const name="CreateFixed" value="0x02">
10213 <desc>
10214 Supports creating fixed size images, allocating all space instantly.
10215 </desc>
10216 </const>
10217
10218 <const name="CreateDynamic" value="0x04">
10219 <desc>
10220 Supports creating dynamically growing images, allocating space on
10221 demand.
10222 </desc>
10223 </const>
10224
10225 <const name="CreateSplit2G" value="0x08">
10226 <desc>
10227 Supports creating images split in chunks of a bit less than 2 GBytes.
10228 </desc>
10229 </const>
10230
10231 <const name="Differencing" value="0x10">
10232 <desc>
10233 Supports being used as a format for differencing media (see <link
10234 to="IMedium::createDiffStorage"/>).
10235 </desc>
10236 </const>
10237
10238 <const name="Asynchronous" value="0x20">
10239 <desc>
10240 Supports asynchronous I/O operations for at least some configurations.
10241 </desc>
10242 </const>
10243
10244 <const name="File" value="0x40">
10245 <desc>
10246 The format backend operates on files (the <link to="IMedium::location"/>
10247 attribute of the medium specifies a file used to store medium
10248 data; for a list of supported file extensions see
10249 <link to="IMediumFormat::fileExtensions"/>).
10250 </desc>
10251 </const>
10252
10253 <const name="Properties" value="0x80">
10254 <desc>
10255 The format backend uses the property interface to configure the storage
10256 location and properties (the <link to="IMediumFormat::describeProperties"/>
10257 method is used to get access to properties supported by the given medium format).
10258 </desc>
10259 </const>
10260
10261 <const name="CapabilityMask" value="0xFF"/>
10262 </enum>
10263
10264 <interface
10265 name="IMediumFormat" extends="$unknown"
10266 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
10267 wsmap="managed"
10268 >
10269 <desc>
10270 The IMediumFormat interface represents a medium format.
10271
10272 Each medium format has an associated backend which is used to handle
10273 media stored in this format. This interface provides information
10274 about the properties of the associated backend.
10275
10276 Each medium format is identified by a string represented by the
10277 <link to="#id"/> attribute. This string is used in calls like
10278 <link to="IVirtualBox::createHardDisk"/> to specify the desired
10279 format.
10280
10281 The list of all supported medium formats can be obtained using
10282 <link to="ISystemProperties::mediaFormats"/>.
10283
10284 <see>IMedium</see>
10285 </desc>
10286
10287 <attribute name="id" type="wstring" readonly="yes">
10288 <desc>
10289 Identifier of this format.
10290
10291 The format identifier is a non-@c null non-empty ASCII string. Note that
10292 this string is case-insensitive. This means that, for example, all of
10293 the following strings:
10294 <pre>
10295 "VDI"
10296 "vdi"
10297 "VdI"</pre>
10298 refer to the same medium format.
10299
10300 This string is used in methods of other interfaces where it is necessary
10301 to specify a medium format, such as
10302 <link to="IVirtualBox::createHardDisk"/>.
10303 </desc>
10304 </attribute>
10305
10306 <attribute name="name" type="wstring" readonly="yes">
10307 <desc>
10308 Human readable description of this format.
10309
10310 Mainly for use in file open dialogs.
10311 </desc>
10312 </attribute>
10313
10314 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
10315 <desc>
10316 Array of strings containing the supported file extensions.
10317
10318 The first extension in the array is the extension preferred by the
10319 backend. It is recommended to use this extension when specifying a
10320 location of the storage unit for a new medium.
10321
10322 Note that some backends do not work on files, so this array may be
10323 empty.
10324
10325 <see>IMediumFormat::capabilities</see>
10326 </desc>
10327 </attribute>
10328
10329 <attribute name="capabilities" type="unsigned long" readonly="yes">
10330 <desc>
10331 Capabilities of the format as a set of bit flags.
10332
10333 For the meaning of individual capability flags see
10334 <link to="MediumFormatCapabilities"/>.
10335 </desc>
10336 </attribute>
10337
10338 <method name="describeProperties">
10339 <desc>
10340 Returns several arrays describing the properties supported by this
10341 format.
10342
10343 An element with the given index in each array describes one
10344 property. Thus, the number of elements in each returned array is the
10345 same and corresponds to the number of supported properties.
10346
10347 The returned arrays are filled in only if the
10348 <link to="MediumFormatCapabilities_Properties"/> flag is set.
10349 All arguments must be non-@c null.
10350
10351 <see>DataType</see>
10352 <see>DataFlags</see>
10353 </desc>
10354
10355 <param name="names" type="wstring" safearray="yes" dir="out">
10356 <desc>Array of property names.</desc>
10357 </param>
10358 <param name="description" type="wstring" safearray="yes" dir="out">
10359 <desc>Array of property descriptions.</desc>
10360 </param>
10361 <param name="types" type="DataType" safearray="yes" dir="out">
10362 <desc>Array of property types.</desc>
10363 </param>
10364 <param name="flags" type="unsigned long" safearray="yes" dir="out">
10365 <desc>Array of property flags.</desc>
10366 </param>
10367 <param name="defaults" type="wstring" safearray="yes" dir="out">
10368 <desc>Array of default property values.</desc>
10369 </param>
10370 </method>
10371
10372 </interface>
10373
10374
10375 <!--
10376 // IKeyboard
10377 /////////////////////////////////////////////////////////////////////////
10378 -->
10379
10380 <interface
10381 name="IKeyboard" extends="$unknown"
10382 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10383 wsmap="managed"
10384 >
10385 <desc>
10386 The IKeyboard interface represents the virtual machine's keyboard. Used
10387 in <link to="IConsole::keyboard"/>.
10388
10389 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10390 to the virtual machine.
10391
10392 </desc>
10393 <method name="putScancode">
10394 <desc>Sends a scancode to the keyboard.
10395
10396 <result name="VBOX_E_IPRT_ERROR">
10397 Could not send scan code to virtual keyboard.
10398 </result>
10399
10400 </desc>
10401 <param name="scancode" type="long" dir="in"/>
10402 </method>
10403
10404 <method name="putScancodes">
10405 <desc>Sends an array of scancodes to the keyboard.
10406
10407 <result name="VBOX_E_IPRT_ERROR">
10408 Could not send all scan codes to virtual keyboard.
10409 </result>
10410
10411 </desc>
10412 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10413 <param name="codesStored" type="unsigned long" dir="return"/>
10414 </method>
10415
10416 <method name="putCAD">
10417 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10418 function is nothing special, it is just a convenience function
10419 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10420
10421 <result name="VBOX_E_IPRT_ERROR">
10422 Could not send all scan codes to virtual keyboard.
10423 </result>
10424
10425 </desc>
10426 </method>
10427
10428 </interface>
10429
10430
10431 <!--
10432 // IMouse
10433 /////////////////////////////////////////////////////////////////////////
10434 -->
10435
10436 <enum
10437 name="MouseButtonState"
10438 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10439 >
10440 <desc>
10441 Mouse button state.
10442 </desc>
10443
10444 <const name="LeftButton" value="0x01"/>
10445 <const name="RightButton" value="0x02"/>
10446 <const name="MiddleButton" value="0x04"/>
10447 <const name="WheelUp" value="0x08"/>
10448 <const name="WheelDown" value="0x10"/>
10449 <const name="XButton1" value="0x20"/>
10450 <const name="XButton2" value="0x40"/>
10451 <const name="MouseStateMask" value="0x7F"/>
10452 </enum>
10453
10454 <interface
10455 name="IMouse" extends="$unknown"
10456 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
10457 wsmap="managed"
10458 >
10459 <desc>
10460 The IMouse interface represents the virtual machine's mouse. Used in
10461 <link to="IConsole::mouse"/>.
10462
10463 Through this interface, the virtual machine's virtual mouse can be
10464 controlled.
10465 </desc>
10466
10467 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10468 <desc>
10469 Whether the guest OS supports absolute mouse pointer positioning
10470 or not.
10471 <note>
10472 VirtualBox Guest Tools need to be installed to the guest OS
10473 in order to enable absolute mouse positioning support.
10474 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10475 callback to be instantly informed about changes of this attribute
10476 during virtual machine execution.
10477 </note>
10478 <see><link to="#putMouseEventAbsolute"/></see>
10479 </desc>
10480 </attribute>
10481
10482 <method name="putMouseEvent">
10483 <desc>
10484 Initiates a mouse event using relative pointer movements
10485 along x and y axis.
10486
10487 <result name="E_ACCESSDENIED">
10488 Console not powered up.
10489 </result>
10490 <result name="VBOX_E_IPRT_ERROR">
10491 Could not send mouse event to virtual mouse.
10492 </result>
10493
10494 </desc>
10495
10496 <param name="dx" type="long" dir="in">
10497 <desc>
10498 Amount of pixels the mouse should move to the right.
10499 Negative values move the mouse to the left.
10500 </desc>
10501 </param>
10502 <param name="dy" type="long" dir="in">
10503 <desc>
10504 Amount of pixels the mouse should move downwards.
10505 Negative values move the mouse upwards.
10506 </desc>
10507 </param>
10508 <param name="dz" type="long" dir="in">
10509 <desc>
10510 Amount of mouse wheel moves.
10511 Positive values describe clockwise wheel rotations,
10512 negative values describe counterclockwise rotations.
10513 </desc>
10514 </param>
10515 <param name="dw" type="long" dir="in">
10516 <desc>
10517 Amount of horizontal mouse wheel moves.
10518 Positive values describe a movement to the left,
10519 negative values describe a movement to the right.
10520 </desc>
10521 </param>
10522 <param name="buttonState" type="long" dir="in">
10523 <desc>
10524 The current state of mouse buttons. Every bit represents
10525 a mouse button as follows:
10526 <table>
10527 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10528 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10529 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10530 </table>
10531 A value of <tt>1</tt> means the corresponding button is pressed.
10532 otherwise it is released.
10533 </desc>
10534 </param>
10535 </method>
10536
10537 <method name="putMouseEventAbsolute">
10538 <desc>
10539 Positions the mouse pointer using absolute x and y coordinates.
10540 These coordinates are expressed in pixels and
10541 start from <tt>[1,1]</tt> which corresponds to the top left
10542 corner of the virtual display.
10543
10544 <result name="E_ACCESSDENIED">
10545 Console not powered up.
10546 </result>
10547 <result name="VBOX_E_IPRT_ERROR">
10548 Could not send mouse event to virtual mouse.
10549 </result>
10550
10551 <note>
10552 This method will have effect only if absolute mouse
10553 positioning is supported by the guest OS.
10554 </note>
10555
10556 <see><link to="#absoluteSupported"/></see>
10557 </desc>
10558
10559 <param name="x" type="long" dir="in">
10560 <desc>
10561 X coordinate of the pointer in pixels, starting from @c 1.
10562 </desc>
10563 </param>
10564 <param name="y" type="long" dir="in">
10565 <desc>
10566 Y coordinate of the pointer in pixels, starting from @c 1.
10567 </desc>
10568 </param>
10569 <param name="dz" type="long" dir="in">
10570 <desc>
10571 Amount of mouse wheel moves.
10572 Positive values describe clockwise wheel rotations,
10573 negative values describe counterclockwise rotations.
10574 </desc>
10575 </param>
10576 <param name="dw" type="long" dir="in">
10577 <desc>
10578 Amount of horizontal mouse wheel moves.
10579 Positive values describe a movement to the left,
10580 negative values describe a movement to the right.
10581 </desc>
10582 </param>
10583 <param name="buttonState" type="long" dir="in">
10584 <desc>
10585 The current state of mouse buttons. Every bit represents
10586 a mouse button as follows:
10587 <table>
10588 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10589 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10590 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10591 </table>
10592 A value of @c 1 means the corresponding button is pressed.
10593 otherwise it is released.
10594 </desc>
10595 </param>
10596 </method>
10597
10598 </interface>
10599
10600 <!--
10601 // IDisplay
10602 /////////////////////////////////////////////////////////////////////////
10603 -->
10604
10605 <enum
10606 name="FramebufferPixelFormat"
10607 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10608 >
10609 <desc>
10610 Format of the video memory buffer. Constants represented by this enum can
10611 be used to test for particular values of <link
10612 to="IFramebuffer::pixelFormat"/>. See also <link
10613 to="IFramebuffer::requestResize"/>.
10614
10615 See also www.fourcc.org for more information about FOURCC pixel formats.
10616 </desc>
10617
10618 <const name="Opaque" value="0">
10619 <desc>
10620 Unknown buffer format (the user may not assume any particular format of
10621 the buffer).
10622 </desc>
10623 </const>
10624 <const name="FOURCC_RGB" value="0x32424752">
10625 <desc>
10626 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10627 bit layout).
10628 </desc>
10629 </const>
10630 </enum>
10631
10632 <interface
10633 name="IFramebuffer" extends="$unknown"
10634 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10635 wsmap="suppress"
10636 >
10637 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10638 <desc>Address of the start byte of the frame buffer.</desc>
10639 </attribute>
10640
10641 <attribute name="width" type="unsigned long" readonly="yes">
10642 <desc>Frame buffer width, in pixels.</desc>
10643 </attribute>
10644
10645 <attribute name="height" type="unsigned long" readonly="yes">
10646 <desc>Frame buffer height, in pixels.</desc>
10647 </attribute>
10648
10649 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10650 <desc>
10651 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10652 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10653 are: 8, 15, 16, 24 and 32.
10654 </desc>
10655 </attribute>
10656
10657 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10658 <desc>
10659 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10660 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10661 size of the scan line must be aligned to 32 bits.
10662 </desc>
10663 </attribute>
10664
10665 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10666 <desc>
10667 Frame buffer pixel format. It's either one of the values defined by <link
10668 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10669 <note>
10670 This attribute must never return <link
10671 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10672 <link to="#address"/> points to must be always known.
10673 </note>
10674 </desc>
10675 </attribute>
10676
10677 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10678 <desc>
10679 Defines whether this frame buffer uses the virtual video card's memory
10680 buffer (guest VRAM) directly or not. See <link
10681 to="IFramebuffer::requestResize"/> for more information.
10682 </desc>
10683 </attribute>
10684
10685 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10686 <desc>
10687 Hint from the frame buffer about how much of the standard
10688 screen height it wants to use for itself. This information is
10689 exposed to the guest through the VESA BIOS and VMMDev interface
10690 so that it can use it for determining its video mode table. It
10691 is not guaranteed that the guest respects the value.
10692 </desc>
10693 </attribute>
10694
10695 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10696 <desc>
10697 An alpha-blended overlay which is superposed over the frame buffer.
10698 The initial purpose is to allow the display of icons providing
10699 information about the VM state, including disk activity, in front
10700 ends which do not have other means of doing that. The overlay is
10701 designed to controlled exclusively by IDisplay. It has no locking
10702 of its own, and any changes made to it are not guaranteed to be
10703 visible until the affected portion of IFramebuffer is updated. The
10704 overlay can be created lazily the first time it is requested. This
10705 attribute can also return @c null to signal that the overlay is not
10706 implemented.
10707 </desc>
10708 </attribute>
10709
10710 <attribute name="winId" type="unsigned long long" readonly="yes">
10711 <desc>
10712 Platform-dependent identifier of the window where context of this
10713 frame buffer is drawn, or zero if there's no such window.
10714 </desc>
10715 </attribute>
10716
10717 <method name="lock">
10718 <desc>
10719 Locks the frame buffer.
10720 Gets called by the IDisplay object where this frame buffer is
10721 bound to.
10722 </desc>
10723 </method>
10724
10725 <method name="unlock">
10726 <desc>
10727 Unlocks the frame buffer.
10728 Gets called by the IDisplay object where this frame buffer is
10729 bound to.
10730 </desc>
10731 </method>
10732
10733 <method name="notifyUpdate">
10734 <desc>
10735 Informs about an update.
10736 Gets called by the display object where this buffer is
10737 registered.
10738 </desc>
10739 <param name="x" type="unsigned long" dir="in"/>
10740 <param name="y" type="unsigned long" dir="in"/>
10741 <param name="width" type="unsigned long" dir="in"/>
10742 <param name="height" type="unsigned long" dir="in"/>
10743 </method>
10744
10745 <method name="requestResize">
10746 <desc>
10747 Requests a size and pixel format change.
10748
10749 There are two modes of working with the video buffer of the virtual
10750 machine. The <i>indirect</i> mode implies that the IFramebuffer
10751 implementation allocates a memory buffer for the requested display mode
10752 and provides it to the virtual machine. In <i>direct</i> mode, the
10753 IFramebuffer implementation uses the memory buffer allocated and owned
10754 by the virtual machine. This buffer represents the video memory of the
10755 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10756 usually faster because the implementation gets a raw pointer to the
10757 guest VRAM buffer which it can directly use for visualizing the contents
10758 of the virtual display, as opposed to the indirect mode where the
10759 contents of guest VRAM are copied to the memory buffer provided by
10760 the implementation every time a display update occurs.
10761
10762 It is important to note that the direct mode is really fast only when
10763 the implementation uses the given guest VRAM buffer directly, for
10764 example, by blitting it to the window representing the virtual machine's
10765 display, which saves at least one copy operation comparing to the
10766 indirect mode. However, using the guest VRAM buffer directly is not
10767 always possible: the format and the color depth of this buffer may be
10768 not supported by the target window, or it may be unknown (opaque) as in
10769 case of text or non-linear multi-plane VGA video modes. In this case,
10770 the indirect mode (that is always available) should be used as a
10771 fallback: when the guest VRAM contents are copied to the
10772 implementation-provided memory buffer, color and format conversion is
10773 done automatically by the underlying code.
10774
10775 The @a pixelFormat parameter defines whether the direct mode is
10776 available or not. If @a pixelFormat is <link
10777 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10778 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10779 @a bytesPerLine parameters must be ignored and the implementation must use
10780 the indirect mode (where it provides its own buffer in one of the
10781 supported formats). In all other cases, @a pixelFormat together with
10782 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10783 buffer pointed to by the @a VRAM parameter and the implementation is
10784 free to choose which mode to use. To indicate that this frame buffer uses
10785 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10786 attribute must return @c true and <link to="#address"/> must
10787 return exactly the same address that is passed in the @a VRAM parameter
10788 of this method; otherwise it is assumed that the indirect strategy is
10789 chosen.
10790
10791 The @a width and @a height parameters represent the size of the
10792 requested display mode in both modes. In case of indirect mode, the
10793 provided memory buffer should be big enough to store data of the given
10794 display mode. In case of direct mode, it is guaranteed that the given
10795 @a VRAM buffer contains enough space to represent the display mode of the
10796 given size. Note that this frame buffer's <link to="#width"/> and <link
10797 to="#height"/> attributes must return exactly the same values as
10798 passed to this method after the resize is completed (see below).
10799
10800 The @a finished output parameter determines if the implementation has
10801 finished resizing the frame buffer or not. If, for some reason, the
10802 resize cannot be finished immediately during this call, @a finished
10803 must be set to @c false, and the implementation must call
10804 <link to="IDisplay::resizeCompleted"/> after it has returned from
10805 this method as soon as possible. If @a finished is @c false, the
10806 machine will not call any frame buffer methods until
10807 <link to="IDisplay::resizeCompleted"/> is called.
10808
10809 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10810 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10811 this frame buffer must return exactly the same values as specified in the
10812 parameters of this method, after the resize is completed. If the
10813 indirect mode is chosen, these attributes must return values describing
10814 the format of the implementation's own memory buffer <link
10815 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10816 value must always correlate with <link to="#pixelFormat"/>. Note that
10817 the <link to="#pixelFormat"/> attribute must never return <link
10818 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10819
10820 <note>
10821 This method is called by the IDisplay object under the
10822 <link to="#lock"/> provided by this IFramebuffer
10823 implementation. If this method returns @c false in @a finished, then
10824 this lock is not released until
10825 <link to="IDisplay::resizeCompleted"/> is called.
10826 </note>
10827 </desc>
10828 <param name="screenId" type="unsigned long" dir="in">
10829 <desc>
10830 Logical screen number. Must be used in the corresponding call to
10831 <link to="IDisplay::resizeCompleted"/> if this call is made.
10832 </desc>
10833 </param>
10834 <param name="pixelFormat" type="unsigned long" dir="in">
10835 <desc>
10836 Pixel format of the memory buffer pointed to by @a VRAM.
10837 See also <link to="FramebufferPixelFormat"/>.
10838 </desc>
10839 </param>
10840 <param name="VRAM" type="octet" mod="ptr" dir="in">
10841 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10842 </param>
10843 <param name="bitsPerPixel" type="unsigned long" dir="in">
10844 <desc>Color depth, bits per pixel.</desc>
10845 </param>
10846 <param name="bytesPerLine" type="unsigned long" dir="in">
10847 <desc>Size of one scan line, in bytes.</desc>
10848 </param>
10849 <param name="width" type="unsigned long" dir="in">
10850 <desc>Width of the guest display, in pixels.</desc>
10851 </param>
10852 <param name="height" type="unsigned long" dir="in">
10853 <desc>Height of the guest display, in pixels.</desc>
10854 </param>
10855 <param name="finished" type="boolean" dir="return">
10856 <desc>
10857 Can the VM start using the new frame buffer immediately
10858 after this method returns or it should wait for
10859 <link to="IDisplay::resizeCompleted"/>.
10860 </desc>
10861 </param>
10862 </method>
10863
10864 <method name="videoModeSupported">
10865 <desc>
10866 Returns whether the frame buffer implementation is willing to
10867 support a given video mode. In case it is not able to render
10868 the video mode (or for some reason not willing), it should
10869 return @c false. Usually this method is called when the guest
10870 asks the VMM device whether a given video mode is supported
10871 so the information returned is directly exposed to the guest.
10872 It is important that this method returns very quickly.
10873 </desc>
10874 <param name="width" type="unsigned long" dir="in"/>
10875 <param name="height" type="unsigned long" dir="in"/>
10876 <param name="bpp" type="unsigned long" dir="in"/>
10877 <param name="supported" type="boolean" dir="return"/>
10878 </method>
10879
10880 <method name="getVisibleRegion">
10881 <desc>
10882 Returns the visible region of this frame buffer.
10883
10884 If the @a rectangles parameter is @c null then the value of the
10885 @a count parameter is ignored and the number of elements necessary to
10886 describe the current visible region is returned in @a countCopied.
10887
10888 If @a rectangles is not @c null but @a count is less
10889 than the required number of elements to store region data, the method
10890 will report a failure. If @a count is equal or greater than the
10891 required number of elements, then the actual number of elements copied
10892 to the provided array will be returned in @a countCopied.
10893
10894 <note>
10895 The address of the provided array must be in the process space of
10896 this IFramebuffer object.
10897 </note>
10898 <note>
10899 Method not yet implemented.
10900 </note>
10901 </desc>
10902 <param name="rectangles" type="octet" mod="ptr" dir="in">
10903 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10904 </param>
10905 <param name="count" type="unsigned long" dir="in">
10906 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10907 </param>
10908 <param name="countCopied" type="unsigned long" dir="return">
10909 <desc>Number of elements copied to the @a rectangles array.</desc>
10910 </param>
10911 </method>
10912
10913 <method name="setVisibleRegion">
10914 <desc>
10915 Suggests a new visible region to this frame buffer. This region
10916 represents the area of the VM display which is a union of regions of
10917 all top-level windows of the guest operating system running inside the
10918 VM (if the Guest Additions for this system support this
10919 functionality). This information may be used by the frontends to
10920 implement the seamless desktop integration feature.
10921
10922 <note>
10923 The address of the provided array must be in the process space of
10924 this IFramebuffer object.
10925 </note>
10926 <note>
10927 The IFramebuffer implementation must make a copy of the provided
10928 array of rectangles.
10929 </note>
10930 <note>
10931 Method not yet implemented.
10932 </note>
10933 </desc>
10934 <param name="rectangles" type="octet" mod="ptr" dir="in">
10935 <desc>Pointer to the @c RTRECT array.</desc>
10936 </param>
10937 <param name="count" type="unsigned long" dir="in">
10938 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10939 </param>
10940 </method>
10941
10942 <method name="processVHWACommand">
10943 <desc>
10944 Posts a Video HW Acceleration Command to the frame buffer for processing.
10945 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10946 are posted from quest to the host to be processed by the host hardware.
10947
10948 <note>
10949 The address of the provided command must be in the process space of
10950 this IFramebuffer object.
10951 </note>
10952 </desc>
10953
10954 <param name="command" type="octet" mod="ptr" dir="in">
10955 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10956 </param>
10957 </method>
10958
10959 </interface>
10960
10961 <interface
10962 name="IFramebufferOverlay" extends="IFramebuffer"
10963 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10964 wsmap="suppress"
10965 >
10966 <desc>
10967 The IFramebufferOverlay interface represents an alpha blended overlay
10968 for displaying status icons above an IFramebuffer. It is always created
10969 not visible, so that it must be explicitly shown. It only covers a
10970 portion of the IFramebuffer, determined by its width, height and
10971 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10972 that order) format, and may be written to directly. Do re-read the
10973 width though, after setting it, as it may be adjusted (increased) to
10974 make it more suitable for the front end.
10975 </desc>
10976 <attribute name="x" type="unsigned long" readonly="yes">
10977 <desc>X position of the overlay, relative to the frame buffer.</desc>
10978 </attribute>
10979
10980 <attribute name="y" type="unsigned long" readonly="yes">
10981 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10982 </attribute>
10983
10984 <attribute name="visible" type="boolean" readonly="no">
10985 <desc>
10986 Whether the overlay is currently visible.
10987 </desc>
10988 </attribute>
10989
10990 <attribute name="alpha" type="unsigned long" readonly="no">
10991 <desc>
10992 The global alpha value for the overlay. This may or may not be
10993 supported by a given front end.
10994 </desc>
10995 </attribute>
10996
10997 <method name="move">
10998 <desc>
10999 Changes the overlay's position relative to the IFramebuffer.
11000 </desc>
11001 <param name="x" type="unsigned long" dir="in"/>
11002 <param name="y" type="unsigned long" dir="in"/>
11003 </method>
11004
11005 </interface>
11006
11007 <interface
11008 name="IDisplay" extends="$unknown"
11009 uuid="e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000"
11010 wsmap="managed"
11011 >
11012 <desc>
11013 The IDisplay interface represents the virtual machine's display.
11014
11015 The object implementing this interface is contained in each
11016 <link to="IConsole::display"/> attribute and represents the visual
11017 output of the virtual machine.
11018
11019 The virtual display supports pluggable output targets represented by the
11020 IFramebuffer interface. Examples of the output target are a window on
11021 the host computer or an RDP session's display on a remote computer.
11022 </desc>
11023 <attribute name="width" type="unsigned long" readonly="yes">
11024 <desc>Current display width.</desc>
11025 </attribute>
11026
11027 <attribute name="height" type="unsigned long" readonly="yes">
11028 <desc>Current display height.</desc>
11029 </attribute>
11030
11031 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
11032 <desc>
11033 Current guest display color depth. Note that this may differ
11034 from <link to="IFramebuffer::bitsPerPixel"/>.
11035 </desc>
11036 </attribute>
11037
11038 <method name="setFramebuffer">
11039 <desc>
11040 Sets the framebuffer for given screen.
11041 </desc>
11042 <param name="screenId" type="unsigned long" dir="in"/>
11043 <param name="framebuffer" type="IFramebuffer" dir="in"/>
11044 </method>
11045
11046 <method name="getFramebuffer">
11047 <desc>
11048 Queries the framebuffer for given screen.
11049 </desc>
11050 <param name="screenId" type="unsigned long" dir="in"/>
11051 <param name="framebuffer" type="IFramebuffer" dir="out"/>
11052 <param name="xOrigin" type="long" dir="out"/>
11053 <param name="yOrigin" type="long" dir="out"/>
11054 </method>
11055
11056 <method name="setVideoModeHint">
11057 <desc>
11058 Asks VirtualBox to request the given video mode from
11059 the guest. This is just a hint and it cannot be guaranteed
11060 that the requested resolution will be used. Guest Additions
11061 are required for the request to be seen by guests. The caller
11062 should issue the request and wait for a resolution change and
11063 after a timeout retry.
11064
11065 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
11066 parameters means that the corresponding values should be taken from the
11067 current video mode (i.e. left unchanged).
11068
11069 If the guest OS supports multi-monitor configuration then the @a display
11070 parameter specifies the number of the guest display to send the hint to:
11071 @c 0 is the primary display, @c 1 is the first secondary and
11072 so on. If the multi-monitor configuration is not supported, @a display
11073 must be @c 0.
11074
11075 <result name="E_INVALIDARG">
11076 The @a display is not associated with any monitor.
11077 </result>
11078
11079 </desc>
11080 <param name="width" type="unsigned long" dir="in"/>
11081 <param name="height" type="unsigned long" dir="in"/>
11082 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
11083 <param name="display" type="unsigned long" dir="in"/>
11084 </method>
11085
11086 <method name="setSeamlessMode">
11087 <desc>
11088 Enables or disables seamless guest display rendering (seamless desktop
11089 integration) mode.
11090 <note>
11091 Calling this method has no effect if <link
11092 to="IGuest::supportsSeamless"/> returns @c false.
11093 </note>
11094 </desc>
11095 <param name="enabled" type="boolean" dir="in"/>
11096 </method>
11097
11098 <method name="takeScreenShot">
11099 <desc>
11100 Takes a screen shot of the requested size and copies it to the
11101 32-bpp buffer allocated by the caller and pointed to by @a address.
11102 A pixel consists of 4 bytes in order: B, G, R, 0.
11103
11104 <note>This API can be used only by the COM/XPCOM C++ API as it
11105 requires pointer support. Use <link to="#takeScreenShotSlow" />
11106 with other language bindings.
11107 </note>
11108
11109 <result name="E_NOTIMPL">
11110 Feature not implemented.
11111 </result>
11112 <result name="VBOX_E_IPRT_ERROR">
11113 Could not take a screenshot.
11114 </result>
11115
11116 </desc>
11117 <param name="address" type="octet" mod="ptr" dir="in"/>
11118 <param name="width" type="unsigned long" dir="in"/>
11119 <param name="height" type="unsigned long" dir="in"/>
11120 </method>
11121
11122 <method name="takeScreenShotSlow">
11123 <desc>
11124 Takes a guest screen shot of the requested size and returns it as
11125 an array of bytes in uncompressed 32-bit RGBA format.
11126 A pixel consists of 4 bytes in order: R, G, B, 0xFF.
11127
11128 This API is slow, but could be the only option to get guest screenshot
11129 for scriptable languages not allowed to manipulate with addresses
11130 directly.
11131
11132 <result name="E_NOTIMPL">
11133 Feature not implemented.
11134 </result>
11135 <result name="VBOX_E_IPRT_ERROR">
11136 Could not take a screenshot.
11137 </result>
11138 </desc>
11139 <param name="width" type="unsigned long" dir="in">
11140 <desc>
11141 Desired image width.
11142 </desc>
11143 </param>
11144 <param name="height" type="unsigned long" dir="in">
11145 <desc>
11146 Desired image height.
11147 </desc>
11148 </param>
11149 <param name="screenData" type="octet" dir="return" safearray="yes">
11150 <desc>
11151 Array with resulting screen data.
11152 </desc>
11153 </param>
11154 </method>
11155
11156 <method name="drawToScreen">
11157 <desc>
11158 Draws a 32-bpp image of the specified size from the given buffer
11159 to the given point on the VM display.
11160
11161 <result name="E_NOTIMPL">
11162 Feature not implemented.
11163 </result>
11164 <result name="VBOX_E_IPRT_ERROR">
11165 Could not draw to screen.
11166 </result>
11167
11168 </desc>
11169 <param name="address" type="octet" mod="ptr" dir="in"/>
11170 <param name="x" type="unsigned long" dir="in"/>
11171 <param name="y" type="unsigned long" dir="in"/>
11172 <param name="width" type="unsigned long" dir="in"/>
11173 <param name="height" type="unsigned long" dir="in"/>
11174 </method>
11175
11176 <method name="invalidateAndUpdate">
11177 <desc>
11178 Does a full invalidation of the VM display and instructs the VM
11179 to update it.
11180
11181 <result name="VBOX_E_IPRT_ERROR">
11182 Could not invalidate and update screen.
11183 </result>
11184
11185 </desc>
11186 </method>
11187
11188 <method name="resizeCompleted">
11189 <desc>
11190 Signals that a framebuffer has completed the resize operation.
11191
11192 <result name="VBOX_E_NOT_SUPPORTED">
11193 Operation only valid for external frame buffers.
11194 </result>
11195
11196 </desc>
11197 <param name="screenId" type="unsigned long" dir="in"/>
11198 </method>
11199
11200 <method name="updateCompleted">
11201 <desc>
11202 Signals that a framebuffer has completed the update operation.
11203
11204 <result name="VBOX_E_NOT_SUPPORTED">
11205 Operation only valid for external frame buffers.
11206 </result>
11207
11208 </desc>
11209 </method>
11210
11211 <method name="completeVHWACommand">
11212 <desc>
11213 Signals that the Video HW Acceleration command has completed.
11214 </desc>
11215
11216 <param name="command" type="octet" mod="ptr" dir="in">
11217 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
11218 </param>
11219 </method>
11220
11221 </interface>
11222
11223 <!--
11224 // INetworkAdapter
11225 /////////////////////////////////////////////////////////////////////////
11226 -->
11227
11228 <enum
11229 name="NetworkAttachmentType"
11230 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
11231 >
11232 <desc>
11233 Network attachment type.
11234 </desc>
11235
11236 <const name="Null" value="0">
11237 <desc>Null value, also means "not attached".</desc>
11238 </const>
11239 <const name="NAT" value="1"/>
11240 <const name="Bridged" value="2"/>
11241 <const name="Internal" value="3"/>
11242 <const name="HostOnly" value="4"/>
11243 </enum>
11244
11245 <enum
11246 name="NetworkAdapterType"
11247 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
11248 >
11249 <desc>
11250 Network adapter type.
11251 </desc>
11252
11253 <const name="Null" value="0">
11254 <desc>Null value (never used by the API).</desc>
11255 </const>
11256 <const name="Am79C970A" value="1">
11257 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
11258 </const>
11259 <const name="Am79C973" value="2">
11260 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
11261 </const>
11262 <const name="I82540EM" value="3">
11263 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
11264 </const>
11265 <const name="I82543GC" value="4">
11266 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
11267 </const>
11268 <const name="I82545EM" value="5">
11269 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
11270 </const>
11271 <const name="Virtio" value="6">
11272 <desc>Virtio network device.</desc>
11273 </const>
11274 </enum>
11275
11276 <interface
11277 name="INetworkAdapter" extends="$unknown"
11278 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
11279 wsmap="managed"
11280 >
11281 <desc>
11282 Represents a virtual network adapter that is attached to a virtual machine.
11283 Each virtual machine has a fixed number of network adapter slots with one
11284 instance of this attached to each of them. Call
11285 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
11286 is attached to a given slot in a given machine.
11287
11288 Each network adapter can be in one of five attachment modes, which are
11289 represented by the <link to="NetworkAttachmentType" /> enumeration;
11290 see the <link to="#attachmentType" /> attribute.
11291 </desc>
11292
11293 <attribute name="adapterType" type="NetworkAdapterType">
11294 <desc>
11295 Type of the virtual network adapter. Depending on this value,
11296 VirtualBox will provide a different virtual network hardware
11297 to the guest.
11298 </desc>
11299 </attribute>
11300
11301 <attribute name="slot" type="unsigned long" readonly="yes">
11302 <desc>
11303 Slot number this adapter is plugged into. Corresponds to
11304 the value you pass to <link to="IMachine::getNetworkAdapter"/>
11305 to obtain this instance.
11306 </desc>
11307 </attribute>
11308
11309 <attribute name="enabled" type="boolean">
11310 <desc>
11311 Flag whether the network adapter is present in the
11312 guest system. If disabled, the virtual guest hardware will
11313 not contain this network adapter. Can only be changed when
11314 the VM is not running.
11315 </desc>
11316 </attribute>
11317
11318 <attribute name="MACAddress" type="wstring">
11319 <desc>
11320 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
11321 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
11322 </desc>
11323 </attribute>
11324
11325 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
11326
11327 <attribute name="hostInterface" type="wstring">
11328 <desc>
11329 Name of the host network interface the VM is attached to.
11330 </desc>
11331 </attribute>
11332
11333 <attribute name="internalNetwork" type="wstring">
11334 <desc>
11335 Name of the internal network the VM is attached to.
11336 </desc>
11337 </attribute>
11338
11339 <attribute name="NATNetwork" type="wstring">
11340 <desc>
11341 Name of the NAT network the VM is attached to.
11342 </desc>
11343 </attribute>
11344
11345 <attribute name="cableConnected" type="boolean">
11346 <desc>
11347 Flag whether the adapter reports the cable as connected or not.
11348 It can be used to report offline situations to a VM.
11349 </desc>
11350 </attribute>
11351
11352 <attribute name="lineSpeed" type="unsigned long">
11353 <desc>
11354 Line speed reported by custom drivers, in units of 1 kbps.
11355 </desc>
11356 </attribute>
11357
11358 <attribute name="traceEnabled" type="boolean">
11359 <desc>
11360 Flag whether network traffic from/to the network card should be traced.
11361 Can only be toggled when the VM is turned off.
11362 </desc>
11363 </attribute>
11364
11365 <attribute name="traceFile" type="wstring">
11366 <desc>
11367 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11368 will be used.
11369 </desc>
11370 </attribute>
11371
11372 <method name="attachToNAT">
11373 <desc>
11374 Attach the network adapter to the Network Address Translation (NAT) interface.
11375 </desc>
11376 </method>
11377
11378 <method name="attachToBridgedInterface">
11379 <desc>
11380 Attach the network adapter to a bridged host interface.
11381 </desc>
11382 </method>
11383
11384 <method name="attachToInternalNetwork">
11385 <desc>
11386 Attach the network adapter to an internal network.
11387 </desc>
11388 </method>
11389
11390 <method name="attachToHostOnlyInterface">
11391 <desc>
11392 Attach the network adapter to the host-only network.
11393 </desc>
11394 </method>
11395
11396 <method name="detach">
11397 <desc>
11398 Detach the network adapter
11399 </desc>
11400 </method>
11401 </interface>
11402
11403
11404 <!--
11405 // ISerialPort
11406 /////////////////////////////////////////////////////////////////////////
11407 -->
11408
11409 <enum
11410 name="PortMode"
11411 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11412 >
11413 <desc>
11414 The PortMode enumeration represents possible communication modes for
11415 the virtual serial port device.
11416 </desc>
11417
11418 <const name="Disconnected" value="0">
11419 <desc>Virtual device is not attached to any real host device.</desc>
11420 </const>
11421 <const name="HostPipe" value="1">
11422 <desc>Virtual device is attached to a host pipe.</desc>
11423 </const>
11424 <const name="HostDevice" value="2">
11425 <desc>Virtual device is attached to a host device.</desc>
11426 </const>
11427 <const name="RawFile" value="3">
11428 <desc>Virtual device is attached to a raw file.</desc>
11429 </const>
11430 </enum>
11431
11432 <interface
11433 name="ISerialPort" extends="$unknown"
11434 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11435 wsmap="managed"
11436 >
11437
11438 <desc>
11439 The ISerialPort interface represents the virtual serial port device.
11440
11441 The virtual serial port device acts like an ordinary serial port
11442 inside the virtual machine. This device communicates to the real
11443 serial port hardware in one of two modes: host pipe or host device.
11444
11445 In host pipe mode, the #path attribute specifies the path to the pipe on
11446 the host computer that represents a serial port. The #server attribute
11447 determines if this pipe is created by the virtual machine process at
11448 machine startup or it must already exist before starting machine
11449 execution.
11450
11451 In host device mode, the #path attribute specifies the name of the
11452 serial port device on the host computer.
11453
11454 There is also a third communication mode: the disconnected mode. In this
11455 mode, the guest OS running inside the virtual machine will be able to
11456 detect the serial port, but all port write operations will be discarded
11457 and all port read operations will return no data.
11458
11459 <see>IMachine::getSerialPort</see>
11460 </desc>
11461
11462 <attribute name="slot" type="unsigned long" readonly="yes">
11463 <desc>
11464 Slot number this serial port is plugged into. Corresponds to
11465 the value you pass to <link to="IMachine::getSerialPort"/>
11466 to obtain this instance.
11467 </desc>
11468 </attribute>
11469
11470 <attribute name="enabled" type="boolean">
11471 <desc>
11472 Flag whether the serial port is enabled. If disabled,
11473 the serial port will not be reported to the guest OS.
11474 </desc>
11475 </attribute>
11476
11477 <attribute name="IOBase" type="unsigned long">
11478 <desc>Base I/O address of the serial port.</desc>
11479 </attribute>
11480
11481 <attribute name="IRQ" type="unsigned long">
11482 <desc>IRQ number of the serial port.</desc>
11483 </attribute>
11484
11485 <attribute name="hostMode" type="PortMode">
11486 <desc>
11487 How is this port connected to the host.
11488 <note>
11489 Changing this attribute may fail if the conditions for
11490 <link to="#path"/> are not met.
11491 </note>
11492 </desc>
11493 </attribute>
11494
11495 <attribute name="server" type="boolean">
11496 <desc>
11497 Flag whether this serial port acts as a server (creates a new pipe on
11498 the host) or as a client (uses the existing pipe). This attribute is
11499 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11500 </desc>
11501 </attribute>
11502
11503 <attribute name="path" type="wstring">
11504 <desc>
11505 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11506 PortMode_HostPipe, or the host serial device name when
11507 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11508 cases, setting a @c null or empty string as the attribute's value
11509 is an error. Otherwise, the value of this property is ignored.
11510 </desc>
11511 </attribute>
11512
11513 </interface>
11514
11515 <!--
11516 // IParallelPort
11517 /////////////////////////////////////////////////////////////////////////
11518 -->
11519
11520 <interface
11521 name="IParallelPort" extends="$unknown"
11522 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11523 wsmap="managed"
11524 >
11525
11526 <desc>
11527 The IParallelPort interface represents the virtual parallel port device.
11528
11529 The virtual parallel port device acts like an ordinary parallel port
11530 inside the virtual machine. This device communicates to the real
11531 parallel port hardware using the name of the parallel device on the host
11532 computer specified in the #path attribute.
11533
11534 Each virtual parallel port device is assigned a base I/O address and an
11535 IRQ number that will be reported to the guest operating system and used
11536 to operate the given parallel port from within the virtual machine.
11537
11538 <see>IMachine::getParallelPort</see>
11539 </desc>
11540
11541 <attribute name="slot" type="unsigned long" readonly="yes">
11542 <desc>
11543 Slot number this parallel port is plugged into. Corresponds to
11544 the value you pass to <link to="IMachine::getParallelPort"/>
11545 to obtain this instance.
11546 </desc>
11547 </attribute>
11548
11549 <attribute name="enabled" type="boolean">
11550 <desc>
11551 Flag whether the parallel port is enabled. If disabled,
11552 the parallel port will not be reported to the guest OS.
11553 </desc>
11554 </attribute>
11555
11556 <attribute name="IOBase" type="unsigned long">
11557 <desc>Base I/O address of the parallel port.</desc>
11558 </attribute>
11559
11560 <attribute name="IRQ" type="unsigned long">
11561 <desc>IRQ number of the parallel port.</desc>
11562 </attribute>
11563
11564 <attribute name="path" type="wstring">
11565 <desc>
11566 Host parallel device name. If this parallel port is enabled, setting a
11567 @c null or an empty string as this attribute's value will result into
11568 an error.
11569 </desc>
11570 </attribute>
11571
11572 </interface>
11573
11574
11575 <!--
11576 // IMachineDebugger
11577 /////////////////////////////////////////////////////////////////////////
11578 -->
11579
11580 <interface
11581 name="IMachineDebugger" extends="$unknown"
11582 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11583 wsmap="suppress"
11584 >
11585 <method name="resetStats">
11586 <desc>
11587 Reset VM statistics.
11588 </desc>
11589 <param name="pattern" type="wstring" dir="in">
11590 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11591 </param>
11592 </method>
11593
11594 <method name="dumpStats">
11595 <desc>
11596 Dumps VM statistics.
11597 </desc>
11598 <param name="pattern" type="wstring" dir="in">
11599 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11600 </param>
11601 </method>
11602
11603 <method name="getStats">
11604 <desc>
11605 Get the VM statistics in a XMLish format.
11606 </desc>
11607 <param name="pattern" type="wstring" dir="in">
11608 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11609 </param>
11610 <param name="withDescriptions" type="boolean" dir="in">
11611 <desc>Whether to include the descriptions.</desc>
11612 </param>
11613 <param name="stats" type="wstring" dir="out">
11614 <desc>The XML document containing the statistics.</desc>
11615 </param>
11616 </method>
11617
11618 <method name="injectNMI">
11619 <desc>
11620 Inject an NMI into a running VT-x/AMD-V VM.
11621 </desc>
11622 </method>
11623
11624 <attribute name="singlestep" type="boolean">
11625 <desc>Switch for enabling singlestepping.</desc>
11626 </attribute>
11627
11628 <attribute name="recompileUser" type="boolean">
11629 <desc>Switch for forcing code recompilation for user mode code.</desc>
11630 </attribute>
11631
11632 <attribute name="recompileSupervisor" type="boolean">
11633 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11634 </attribute>
11635
11636 <attribute name="PATMEnabled" type="boolean">
11637 <desc>Switch for enabling and disabling the PATM component.</desc>
11638 </attribute>
11639
11640 <attribute name="CSAMEnabled" type="boolean">
11641 <desc>Switch for enabling and disabling the CSAM component.</desc>
11642 </attribute>
11643
11644 <attribute name="logEnabled" type="boolean">
11645 <desc>Switch for enabling and disabling logging.</desc>
11646 </attribute>
11647
11648 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11649 <desc>
11650 Flag indicating whether the VM is currently making use of CPU hardware
11651 virtualization extensions.
11652 </desc>
11653 </attribute>
11654
11655 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11656 <desc>
11657 Flag indicating whether the VM is currently making use of the nested paging
11658 CPU hardware virtualization extension.
11659 </desc>
11660 </attribute>
11661
11662 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11663 <desc>
11664 Flag indicating whether the VM is currently making use of the VPID
11665 VT-x extension.
11666 </desc>
11667 </attribute>
11668
11669 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11670 <desc>
11671 Flag indicating whether the VM is currently making use of the Physical
11672 Address Extension CPU feature.
11673 </desc>
11674 </attribute>
11675
11676 <attribute name="virtualTimeRate" type="unsigned long">
11677 <desc>
11678 The rate at which the virtual time runs expressed as a percentage.
11679 The accepted range is 2% to 20000%.
11680 </desc>
11681 </attribute>
11682
11683 <!-- @todo method for setting log flags, groups and destination! -->
11684
11685 <attribute name="VM" type="unsigned long long" readonly="yes">
11686 <desc>
11687 Gets the VM handle. This is only for internal use while
11688 we carve the details of this interface.
11689 </desc>
11690 </attribute>
11691
11692 </interface>
11693
11694 <!--
11695 // IUSBController
11696 /////////////////////////////////////////////////////////////////////////
11697 -->
11698
11699 <interface
11700 name="IUSBController" extends="$unknown"
11701 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11702 wsmap="managed"
11703 >
11704 <attribute name="enabled" type="boolean">
11705 <desc>
11706 Flag whether the USB controller is present in the
11707 guest system. If disabled, the virtual guest hardware will
11708 not contain any USB controller. Can only be changed when
11709 the VM is powered off.
11710 </desc>
11711 </attribute>
11712
11713 <attribute name="enabledEhci" type="boolean">
11714 <desc>
11715 Flag whether the USB EHCI controller is present in the
11716 guest system. If disabled, the virtual guest hardware will
11717 not contain a USB EHCI controller. Can only be changed when
11718 the VM is powered off.
11719 </desc>
11720 </attribute>
11721
11722 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11723 <desc>
11724 USB standard version which the controller implements.
11725 This is a BCD which means that the major version is in the
11726 high byte and minor version is in the low byte.
11727 </desc>
11728 </attribute>
11729
11730 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11731 <desc>
11732 List of USB device filters associated with the machine.
11733
11734 If the machine is currently running, these filters are activated
11735 every time a new (supported) USB device is attached to the host
11736 computer that was not ignored by global filters
11737 (<link to="IHost::USBDeviceFilters"/>).
11738
11739 These filters are also activated when the machine is powered up.
11740 They are run against a list of all currently available USB
11741 devices (in states
11742 <link to="USBDeviceState_Available"/>,
11743 <link to="USBDeviceState_Busy"/>,
11744 <link to="USBDeviceState_Held"/>) that were not previously
11745 ignored by global filters.
11746
11747 If at least one filter matches the USB device in question, this
11748 device is automatically captured (attached to) the virtual USB
11749 controller of this machine.
11750
11751 <see>IUSBDeviceFilter, ::IUSBController</see>
11752 </desc>
11753 </attribute>
11754
11755 <method name="createDeviceFilter">
11756 <desc>
11757 Creates a new USB device filter. All attributes except
11758 the filter name are set to empty (any match),
11759 <i>active</i> is @c false (the filter is not active).
11760
11761 The created filter can then be added to the list of filters using
11762 <link to="#insertDeviceFilter"/>.
11763
11764 <result name="VBOX_E_INVALID_VM_STATE">
11765 The virtual machine is not mutable.
11766 </result>
11767
11768 <see>#deviceFilters</see>
11769 </desc>
11770 <param name="name" type="wstring" dir="in">
11771 <desc>
11772 Filter name. See <link to="IUSBDeviceFilter::name"/>
11773 for more info.
11774 </desc>
11775 </param>
11776 <param name="filter" type="IUSBDeviceFilter" dir="return">
11777 <desc>Created filter object.</desc>
11778 </param>
11779 </method>
11780
11781 <method name="insertDeviceFilter">
11782 <desc>
11783 Inserts the given USB device to the specified position
11784 in the list of filters.
11785
11786 Positions are numbered starting from <tt>0</tt>. If the specified
11787 position is equal to or greater than the number of elements in
11788 the list, the filter is added to the end of the collection.
11789
11790 <note>
11791 Duplicates are not allowed, so an attempt to insert a
11792 filter that is already in the collection, will return an
11793 error.
11794 </note>
11795
11796 <result name="VBOX_E_INVALID_VM_STATE">
11797 Virtual machine is not mutable.
11798 </result>
11799 <result name="E_INVALIDARG">
11800 USB device filter not created within this VirtualBox instance.
11801 </result>
11802 <result name="VBOX_E_INVALID_OBJECT_STATE">
11803 USB device filter already in list.
11804 </result>
11805
11806 <see>#deviceFilters</see>
11807 </desc>
11808 <param name="position" type="unsigned long" dir="in">
11809 <desc>Position to insert the filter to.</desc>
11810 </param>
11811 <param name="filter" type="IUSBDeviceFilter" dir="in">
11812 <desc>USB device filter to insert.</desc>
11813 </param>
11814 </method>
11815
11816 <method name="removeDeviceFilter">
11817 <desc>
11818 Removes a USB device filter from the specified position in the
11819 list of filters.
11820
11821 Positions are numbered starting from <tt>0</tt>. Specifying a
11822 position equal to or greater than the number of elements in
11823 the list will produce an error.
11824
11825 <see>#deviceFilters</see>
11826
11827 <result name="VBOX_E_INVALID_VM_STATE">
11828 Virtual machine is not mutable.
11829 </result>
11830 <result name="E_INVALIDARG">
11831 USB device filter list empty or invalid @a position.
11832 </result>
11833
11834 </desc>
11835 <param name="position" type="unsigned long" dir="in">
11836 <desc>Position to remove the filter from.</desc>
11837 </param>
11838 <param name="filter" type="IUSBDeviceFilter" dir="return">
11839 <desc>Removed USB device filter.</desc>
11840 </param>
11841 </method>
11842
11843 </interface>
11844
11845
11846 <!--
11847 // IUSBDevice
11848 /////////////////////////////////////////////////////////////////////////
11849 -->
11850
11851 <interface
11852 name="IUSBDevice" extends="$unknown"
11853 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11854 wsmap="managed"
11855 >
11856 <desc>
11857 The IUSBDevice interface represents a virtual USB device attached to the
11858 virtual machine.
11859
11860 A collection of objects implementing this interface is stored in the
11861 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11862 attached to a running virtual machine's USB controller.
11863 </desc>
11864
11865 <attribute name="id" type="uuid" mod="string" readonly="yes">
11866 <desc>
11867 Unique USB device ID. This ID is built from #vendorId,
11868 #productId, #revision and #serialNumber.
11869 </desc>
11870 </attribute>
11871
11872 <attribute name="vendorId" type="unsigned short" readonly="yes">
11873 <desc>Vendor ID.</desc>
11874 </attribute>
11875
11876 <attribute name="productId" type="unsigned short" readonly="yes">
11877 <desc>Product ID.</desc>
11878 </attribute>
11879
11880 <attribute name="revision" type="unsigned short" readonly="yes">
11881 <desc>
11882 Product revision number. This is a packed BCD represented as
11883 unsigned short. The high byte is the integer part and the low
11884 byte is the decimal.
11885 </desc>
11886 </attribute>
11887
11888 <attribute name="manufacturer" type="wstring" readonly="yes">
11889 <desc>Manufacturer string.</desc>
11890 </attribute>
11891
11892 <attribute name="product" type="wstring" readonly="yes">
11893 <desc>Product string.</desc>
11894 </attribute>
11895
11896 <attribute name="serialNumber" type="wstring" readonly="yes">
11897 <desc>Serial number string.</desc>
11898 </attribute>
11899
11900 <attribute name="address" type="wstring" readonly="yes">
11901 <desc>Host specific address of the device.</desc>
11902 </attribute>
11903
11904 <attribute name="port" type="unsigned short" readonly="yes">
11905 <desc>
11906 Host USB port number the device is physically
11907 connected to.
11908 </desc>
11909 </attribute>
11910
11911 <attribute name="version" type="unsigned short" readonly="yes">
11912 <desc>
11913 The major USB version of the device - 1 or 2.
11914 </desc>
11915 </attribute>
11916
11917 <attribute name="portVersion" type="unsigned short" readonly="yes">
11918 <desc>
11919 The major USB version of the host USB port the device is
11920 physically connected to - 1 or 2. For devices not connected to
11921 anything this will have the same value as the version attribute.
11922 </desc>
11923 </attribute>
11924
11925 <attribute name="remote" type="boolean" readonly="yes">
11926 <desc>
11927 Whether the device is physically connected to a remote VRDP
11928 client or to a local host machine.
11929 </desc>
11930 </attribute>
11931
11932 </interface>
11933
11934
11935 <!--
11936 // IUSBDeviceFilter
11937 /////////////////////////////////////////////////////////////////////////
11938 -->
11939
11940 <interface
11941 name="IUSBDeviceFilter" extends="$unknown"
11942 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11943 wsmap="managed"
11944 >
11945 <desc>
11946 The IUSBDeviceFilter interface represents an USB device filter used
11947 to perform actions on a group of USB devices.
11948
11949 This type of filters is used by running virtual machines to
11950 automatically capture selected USB devices once they are physically
11951 attached to the host computer.
11952
11953 A USB device is matched to the given device filter if and only if all
11954 attributes of the device match the corresponding attributes of the
11955 filter (that is, attributes are joined together using the logical AND
11956 operation). On the other hand, all together, filters in the list of
11957 filters carry the semantics of the logical OR operation. So if it is
11958 desirable to create a match like "this vendor id OR this product id",
11959 one needs to create two filters and specify "any match" (see below)
11960 for unused attributes.
11961
11962 All filter attributes used for matching are strings. Each string
11963 is an expression representing a set of values of the corresponding
11964 device attribute, that will match the given filter. Currently, the
11965 following filtering expressions are supported:
11966
11967 <ul>
11968 <li><i>Interval filters</i>. Used to specify valid intervals for
11969 integer device attributes (Vendor ID, Product ID and Revision).
11970 The format of the string is:
11971
11972 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11973
11974 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11975 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11976 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11977 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11978 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11979 possible integer is assumed.
11980 </li>
11981 <li><i>Boolean filters</i>. Used to specify acceptable values for
11982 boolean device attributes. The format of the string is:
11983
11984 <tt>true|false|yes|no|0|1</tt>
11985
11986 </li>
11987 <li><i>Exact match</i>. Used to specify a single value for the given
11988 device attribute. Any string that doesn't start with <tt>int:</tt>
11989 represents the exact match. String device attributes are compared to
11990 this string including case of symbols. Integer attributes are first
11991 converted to a string (see individual filter attributes) and then
11992 compared ignoring case.
11993
11994 </li>
11995 <li><i>Any match</i>. Any value of the corresponding device attribute
11996 will match the given filter. An empty or @c null string is
11997 used to construct this type of filtering expressions.
11998
11999 </li>
12000 </ul>
12001
12002 <note>
12003 On the Windows host platform, interval filters are not currently
12004 available. Also all string filter attributes
12005 (<link to="#manufacturer"/>, <link to="#product"/>,
12006 <link to="#serialNumber"/>) are ignored, so they behave as
12007 <i>any match</i> no matter what string expression is specified.
12008 </note>
12009
12010 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
12011 </desc>
12012
12013 <attribute name="name" type="wstring">
12014 <desc>
12015 Visible name for this filter.
12016 This name is used to visually distinguish one filter from another,
12017 so it can neither be @c null nor an empty string.
12018 </desc>
12019 </attribute>
12020
12021 <attribute name="active" type="boolean">
12022 <desc>Whether this filter active or has been temporarily disabled.</desc>
12023 </attribute>
12024
12025 <attribute name="vendorId" type="wstring">
12026 <desc>
12027 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
12028 The string representation for the <i>exact matching</i>
12029 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
12030 (including leading zeroes).
12031 </desc>
12032 </attribute>
12033
12034 <attribute name="productId" type="wstring">
12035 <desc>
12036 <link to="IUSBDevice::productId">Product ID</link> filter.
12037 The string representation for the <i>exact matching</i>
12038 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
12039 (including leading zeroes).
12040 </desc>
12041 </attribute>
12042
12043 <attribute name="revision" type="wstring">
12044 <desc>
12045 <link to="IUSBDevice::productId">Product revision number</link>
12046 filter. The string representation for the <i>exact matching</i>
12047 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
12048 of the integer part of the revision, and <tt>F</tt> is the
12049 decimal digit of its fractional part (including leading and
12050 trailing zeros).
12051 Note that for interval filters, it's best to use the hexadecimal
12052 form, because the revision is stored as a 16 bit packed BCD value;
12053 so the expression <tt>int:0x0100-0x0199</tt> will match any
12054 revision from <tt>1.0</tt> to <tt>1.99</tt>.
12055 </desc>
12056 </attribute>
12057
12058 <attribute name="manufacturer" type="wstring">
12059 <desc>
12060 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
12061 </desc>
12062 </attribute>
12063
12064 <attribute name="product" type="wstring">
12065 <desc>
12066 <link to="IUSBDevice::product">Product</link> filter.
12067 </desc>
12068 </attribute>
12069
12070 <attribute name="serialNumber" type="wstring">
12071 <desc>
12072 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
12073 </desc>
12074 </attribute>
12075
12076 <attribute name="port" type="wstring">
12077 <desc>
12078 <link to="IUSBDevice::port">Host USB port</link> filter.
12079 </desc>
12080 </attribute>
12081
12082 <attribute name="remote" type="wstring">
12083 <desc>
12084 <link to="IUSBDevice::remote">Remote state</link> filter.
12085 <note>
12086 This filter makes sense only for machine USB filters,
12087 i.e. it is ignored by IHostUSBDeviceFilter objects.
12088 </note>
12089 </desc>
12090 </attribute>
12091
12092 <attribute name="maskedInterfaces" type="unsigned long">
12093 <desc>
12094 This is an advanced option for hiding one or more USB interfaces
12095 from the guest. The value is a bit mask where the bits that are set
12096 means the corresponding USB interface should be hidden, masked off
12097 if you like.
12098 This feature only works on Linux hosts.
12099 </desc>
12100 </attribute>
12101
12102 </interface>
12103
12104
12105 <!--
12106 // IHostUSBDevice
12107 /////////////////////////////////////////////////////////////////////////
12108 -->
12109
12110 <enum
12111 name="USBDeviceState"
12112 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
12113 >
12114 <desc>
12115 USB device state. This enumeration represents all possible states
12116 of the USB device physically attached to the host computer regarding
12117 its state on the host computer and availability to guest computers
12118 (all currently running virtual machines).
12119
12120 Once a supported USB device is attached to the host, global USB
12121 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
12122 either ignore the device, or put it to USBDeviceState_Held state, or do
12123 nothing. Unless the device is ignored by global filters, filters of all
12124 currently running guests (<link to="IUSBController::deviceFilters"/>) are
12125 activated that can put it to USBDeviceState_Captured state.
12126
12127 If the device was ignored by global filters, or didn't match
12128 any filters at all (including guest ones), it is handled by the host
12129 in a normal way. In this case, the device state is determined by
12130 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
12131 or USBDeviceState_Available, depending on the current device usage.
12132
12133 Besides auto-capturing based on filters, the device can be manually
12134 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
12135 state is USBDeviceState_Busy, USBDeviceState_Available or
12136 USBDeviceState_Held.
12137
12138 <note>
12139 Due to differences in USB stack implementations in Linux and Win32,
12140 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
12141 only to the Linux version of the product. This also means that (<link
12142 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
12143 device state is USBDeviceState_Held.
12144 </note>
12145
12146 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
12147 </desc>
12148
12149 <const name="NotSupported" value="0">
12150 <desc>
12151 Not supported by the VirtualBox server, not available to guests.
12152 </desc>
12153 </const>
12154 <const name="Unavailable" value="1">
12155 <desc>
12156 Being used by the host computer exclusively,
12157 not available to guests.
12158 </desc>
12159 </const>
12160 <const name="Busy" value="2">
12161 <desc>
12162 Being used by the host computer, potentially available to guests.
12163 </desc>
12164 </const>
12165 <const name="Available" value="3">
12166 <desc>
12167 Not used by the host computer, available to guests (the host computer
12168 can also start using the device at any time).
12169 </desc>
12170 </const>
12171 <const name="Held" value="4">
12172 <desc>
12173 Held by the VirtualBox server (ignored by the host computer),
12174 available to guests.
12175 </desc>
12176 </const>
12177 <const name="Captured" value="5">
12178 <desc>
12179 Captured by one of the guest computers, not available
12180 to anybody else.
12181 </desc>
12182 </const>
12183 </enum>
12184
12185 <interface
12186 name="IHostUSBDevice" extends="IUSBDevice"
12187 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
12188 wsmap="managed"
12189 >
12190 <desc>
12191 The IHostUSBDevice interface represents a physical USB device attached
12192 to the host computer.
12193
12194 Besides properties inherited from IUSBDevice, this interface adds the
12195 <link to="#state"/> property that holds the current state of the USB
12196 device.
12197
12198 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
12199 </desc>
12200
12201 <attribute name="state" type="USBDeviceState" readonly="yes">
12202 <desc>
12203 Current state of the device.
12204 </desc>
12205 </attribute>
12206
12207 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
12208
12209 </interface>
12210
12211
12212 <!--
12213 // IHostUSBDeviceFilter
12214 /////////////////////////////////////////////////////////////////////////
12215 -->
12216
12217 <enum
12218 name="USBDeviceFilterAction"
12219 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
12220 >
12221 <desc>
12222 Actions for host USB device filters.
12223 <see>IHostUSBDeviceFilter, USBDeviceState</see>
12224 </desc>
12225
12226 <const name="Null" value="0">
12227 <desc>Null value (never used by the API).</desc>
12228 </const>
12229 <const name="Ignore" value="1">
12230 <desc>Ignore the matched USB device.</desc>
12231 </const>
12232 <const name="Hold" value="2">
12233 <desc>Hold the matched USB device.</desc>
12234 </const>
12235 </enum>
12236
12237 <interface
12238 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
12239 uuid="4cc70246-d74a-400f-8222-3900489c0374"
12240 wsmap="managed"
12241 >
12242 <desc>
12243 The IHostUSBDeviceFilter interface represents a global filter for a
12244 physical USB device used by the host computer. Used indirectly in
12245 <link to="IHost::USBDeviceFilters"/>.
12246
12247 Using filters of this type, the host computer determines the initial
12248 state of the USB device after it is physically attached to the
12249 host's USB controller.
12250
12251 <note>
12252 The <link to="#remote"/> attribute is ignored by this type of
12253 filters, because it makes sense only for
12254 <link to="IUSBController::deviceFilters">machine USB filters</link>.
12255 </note>
12256
12257 <see>IHost::USBDeviceFilters</see>
12258 </desc>
12259
12260 <attribute name="action" type="USBDeviceFilterAction">
12261 <desc>
12262 Action performed by the host when an attached USB device
12263 matches this filter.
12264 </desc>
12265 </attribute>
12266
12267 </interface>
12268
12269 <!--
12270 // IAudioAdapter
12271 /////////////////////////////////////////////////////////////////////////
12272 -->
12273
12274 <enum
12275 name="AudioDriverType"
12276 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
12277 >
12278 <desc>
12279 Host audio driver type.
12280 </desc>
12281
12282 <const name="Null" value="0">
12283 <desc>Null value, also means "dummy audio driver".</desc>
12284 </const>
12285 <const name="WinMM" value="1">
12286 <desc>Windows multimedia (Windows hosts only).</desc>
12287 </const>
12288 <const name="OSS" value="2">
12289 <desc>Open Sound System (Linux hosts only).</desc>
12290 </const>
12291 <const name="ALSA" value="3">
12292 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
12293 </const>
12294 <const name="DirectSound" value="4">
12295 <desc>DirectSound (Windows hosts only).</desc>
12296 </const>
12297 <const name="CoreAudio" value="5">
12298 <desc>CoreAudio (Mac hosts only).</desc>
12299 </const>
12300 <const name="MMPM" value="6">
12301 <desc>Reserved for historical reasons.</desc>
12302 </const>
12303 <const name="Pulse" value="7">
12304 <desc>PulseAudio (Linux hosts only).</desc>
12305 </const>
12306 <const name="SolAudio" value="8">
12307 <desc>Solaris audio (Solaris hosts only).</desc>
12308 </const>
12309 </enum>
12310
12311 <enum
12312 name="AudioControllerType"
12313 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
12314 >
12315 <desc>
12316 Virtual audio controller type.
12317 </desc>
12318
12319 <const name="AC97" value="0"/>
12320 <const name="SB16" value="1"/>
12321 </enum>
12322
12323 <interface
12324 name="IAudioAdapter" extends="$unknown"
12325 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
12326 wsmap="managed"
12327 >
12328 <desc>
12329 The IAudioAdapter interface represents the virtual audio adapter of
12330 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
12331 </desc>
12332 <attribute name="enabled" type="boolean">
12333 <desc>
12334 Flag whether the audio adapter is present in the
12335 guest system. If disabled, the virtual guest hardware will
12336 not contain any audio adapter. Can only be changed when
12337 the VM is not running.
12338 </desc>
12339 </attribute>
12340 <attribute name="audioController" type="AudioControllerType">
12341 <desc>
12342 The audio hardware we emulate.
12343 </desc>
12344 </attribute>
12345 <attribute name="audioDriver" type="AudioDriverType">
12346 <desc>
12347 Audio driver the adapter is connected to. This setting
12348 can only be changed when the VM is not running.
12349 </desc>
12350 </attribute>
12351 </interface>
12352
12353 <!--
12354 // IVRDPServer
12355 /////////////////////////////////////////////////////////////////////////
12356 -->
12357
12358 <enum
12359 name="VRDPAuthType"
12360 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
12361 >
12362 <desc>
12363 VRDP authentication type.
12364 </desc>
12365
12366 <const name="Null" value="0">
12367 <desc>Null value, also means "no authentication".</desc>
12368 </const>
12369 <const name="External" value="1"/>
12370 <const name="Guest" value="2"/>
12371 </enum>
12372
12373 <interface
12374 name="IVRDPServer" extends="$unknown"
12375 uuid="72e671bc-1712-4052-ad6b-e45e76d9d3e4"
12376 wsmap="managed"
12377 >
12378 <attribute name="enabled" type="boolean">
12379 <desc>VRDP server status.</desc>
12380 </attribute>
12381
12382 <attribute name="ports" type="wstring">
12383 <desc>
12384 VRDP server port numbers. The server will try to bind to one of free ports from the list.
12385 <note>
12386 This is a string of comma separated TCP port numbers or port number ranges.
12387 Example <tt>5000,5010-5012,5015</tt>
12388 </note>
12389 </desc>
12390 </attribute>
12391
12392 <attribute name="netAddress" type="wstring">
12393 <desc>VRDP server address.</desc>
12394 </attribute>
12395
12396 <attribute name="authType" type="VRDPAuthType">
12397 <desc>VRDP authentication method.</desc>
12398 </attribute>
12399
12400 <attribute name="authTimeout" type="unsigned long">
12401 <desc>Timeout for guest authentication. Milliseconds.</desc>
12402 </attribute>
12403
12404 <attribute name="allowMultiConnection" type="boolean">
12405 <desc>
12406 Flag whether multiple simultaneous connections to the VM are permitted.
12407 Note that this will be replaced by a more powerful mechanism in the future.
12408 </desc>
12409 </attribute>
12410
12411 <attribute name="reuseSingleConnection" type="boolean">
12412 <desc>
12413 Flag whether the existing connection must be dropped and a new connection
12414 must be established by the VRDP server, when a new client connects in single
12415 connection mode.
12416 </desc>
12417 </attribute>
12418
12419 </interface>
12420
12421
12422 <!--
12423 // ISharedFolder
12424 /////////////////////////////////////////////////////////////////////////
12425 -->
12426
12427 <interface
12428 name="ISharedFolder" extends="$unknown"
12429 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
12430 wsmap="struct"
12431 >
12432 <desc>
12433 The ISharedFolder interface represents a folder in the host computer's
12434 file system accessible from the guest OS running inside a virtual
12435 machine using an associated logical name.
12436
12437 There are three types of shared folders:
12438 <ul>
12439 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12440 folders available to all virtual machines.</li>
12441 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12442 VM-specific shared folders available to the given virtual machine at
12443 startup.</li>
12444 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12445 VM-specific shared folders created in the session context (for
12446 example, when the virtual machine is running) and automatically
12447 discarded when the session is closed (the VM is powered off).</li>
12448 </ul>
12449
12450 Logical names of shared folders must be unique within the given scope
12451 (global, permanent or transient). However, they do not need to be unique
12452 across scopes. In this case, the definition of the shared folder in a
12453 more specific scope takes precedence over definitions in all other
12454 scopes. The order of precedence is (more specific to more general):
12455 <ol>
12456 <li>Transient definitions</li>
12457 <li>Permanent definitions</li>
12458 <li>Global definitions</li>
12459 </ol>
12460
12461 For example, if MyMachine has a shared folder named
12462 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12463 transient shared folder named <tt>C_DRIVE</tt> (that points
12464 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12465 of <tt>C_DRIVE</tt> in the guest OS so
12466 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12467 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12468 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12469 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12470 to <tt>C:\\</tt> if it still exists.
12471
12472 Note that permanent and transient shared folders of different machines
12473 are in different name spaces, so they don't overlap and don't need to
12474 have unique logical names.
12475
12476 <note>
12477 Global shared folders are not implemented in the current version of the
12478 product.
12479 </note>
12480 </desc>
12481
12482 <attribute name="name" type="wstring" readonly="yes">
12483 <desc>Logical name of the shared folder.</desc>
12484 </attribute>
12485
12486 <attribute name="hostPath" type="wstring" readonly="yes">
12487 <desc>Full path to the shared folder in the host file system.</desc>
12488 </attribute>
12489
12490 <attribute name="accessible" type="boolean" readonly="yes">
12491 <desc>
12492 Whether the folder defined by the host path is currently
12493 accessible or not.
12494 For example, the folder can be unaccessible if it is placed
12495 on the network share that is not available by the time
12496 this property is read.
12497 </desc>
12498 </attribute>
12499
12500 <attribute name="writable" type="boolean" readonly="yes">
12501 <desc>
12502 Whether the folder defined by the host path is writable or
12503 not.
12504 </desc>
12505 </attribute>
12506
12507 <attribute name="lastAccessError" type="wstring" readonly="yes">
12508 <desc>
12509 Text message that represents the result of the last accessibility
12510 check.
12511
12512 Accessibility checks are performed each time the <link to="#accessible"/>
12513 attribute is read. An empty string is returned if the last
12514 accessibility check was successful. A non-empty string indicates a
12515 failure and should normally describe a reason of the failure (for
12516 example, a file read error).
12517 </desc>
12518 </attribute>
12519
12520 </interface>
12521
12522 <!--
12523 // ISession
12524 /////////////////////////////////////////////////////////////////////////
12525 -->
12526
12527 <interface
12528 name="IInternalSessionControl" extends="$unknown"
12529 uuid="f9aac6d0-41b3-46b7-bea4-6370b4036de6"
12530 internal="yes"
12531 wsmap="suppress"
12532 >
12533 <method name="getPID">
12534 <desc>PID of the process that has created this Session object.
12535 </desc>
12536 <param name="pid" type="unsigned long" dir="return"/>
12537 </method>
12538
12539 <method name="getRemoteConsole">
12540 <desc>
12541 Returns the console object suitable for remote control.
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="console" type="IConsole" dir="return"/>
12552 </method>
12553
12554 <method name="assignMachine">
12555 <desc>
12556 Assigns the machine object associated with this direct-type
12557 session or informs the session that it will be a remote one
12558 (if @a machine == @c null).
12559
12560 <result name="VBOX_E_INVALID_VM_STATE">
12561 Session state prevents operation.
12562 </result>
12563 <result name="VBOX_E_INVALID_OBJECT_STATE">
12564 Session type prevents operation.
12565 </result>
12566
12567 </desc>
12568 <param name="machine" type="IMachine" dir="in"/>
12569 </method>
12570
12571 <method name="assignRemoteMachine">
12572 <desc>
12573 Assigns the machine and the (remote) console object associated with
12574 this remote-type session.
12575
12576 <result name="VBOX_E_INVALID_VM_STATE">
12577 Session state prevents operation.
12578 </result>
12579
12580 </desc>
12581 <param name="machine" type="IMachine" dir="in"/>
12582 <param name="console" type="IConsole" dir="in"/>
12583 </method>
12584
12585 <method name="updateMachineState">
12586 <desc>
12587 Updates the machine state in the VM process.
12588 Must be called only in certain cases
12589 (see the method implementation).
12590
12591 <result name="VBOX_E_INVALID_VM_STATE">
12592 Session state prevents operation.
12593 </result>
12594 <result name="VBOX_E_INVALID_OBJECT_STATE">
12595 Session type prevents operation.
12596 </result>
12597
12598 </desc>
12599 <param name="aMachineState" type="MachineState" dir="in"/>
12600 </method>
12601
12602 <method name="uninitialize">
12603 <desc>
12604 Uninitializes (closes) this session. Used by VirtualBox to close
12605 the corresponding remote session when the direct session dies
12606 or gets closed.
12607
12608 <result name="VBOX_E_INVALID_VM_STATE">
12609 Session state prevents operation.
12610 </result>
12611
12612 </desc>
12613 </method>
12614
12615 <method name="onNetworkAdapterChange">
12616 <desc>
12617 Triggered when settings of a network adapter 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="networkAdapter" type="INetworkAdapter" dir="in"/>
12629 <param name="changeAdapter" type="boolean" dir="in"/>
12630 </method>
12631
12632 <method name="onSerialPortChange">
12633 <desc>
12634 Triggered when settings of a serial port of the
12635 associated virtual machine have changed.
12636
12637 <result name="VBOX_E_INVALID_VM_STATE">
12638 Session state prevents operation.
12639 </result>
12640 <result name="VBOX_E_INVALID_OBJECT_STATE">
12641 Session type prevents operation.
12642 </result>
12643
12644 </desc>
12645 <param name="serialPort" type="ISerialPort" dir="in"/>
12646 </method>
12647
12648 <method name="onParallelPortChange">
12649 <desc>
12650 Triggered when settings of a parallel port of the
12651 associated virtual machine have changed.
12652
12653 <result name="VBOX_E_INVALID_VM_STATE">
12654 Session state prevents operation.
12655 </result>
12656 <result name="VBOX_E_INVALID_OBJECT_STATE">
12657 Session type prevents operation.
12658 </result>
12659
12660 </desc>
12661 <param name="parallelPort" type="IParallelPort" dir="in"/>
12662 </method>
12663
12664 <method name="onStorageControllerChange">
12665 <desc>
12666 Triggered when settings of a storage controller of the
12667 associated virtual machine have changed.
12668
12669 <result name="VBOX_E_INVALID_VM_STATE">
12670 Session state prevents operation.
12671 </result>
12672 <result name="VBOX_E_INVALID_OBJECT_STATE">
12673 Session type prevents operation.
12674 </result>
12675
12676 </desc>
12677 </method>
12678
12679 <method name="onMediumChange">
12680 <desc>
12681 Triggered when attached media 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
12693 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12694 <param name="force" type="boolean" dir="in"/>
12695 </method>
12696
12697 <method name="onVRDPServerChange">
12698 <desc>
12699 Triggered when settings of the VRDP server object of the
12700 associated virtual machine have changed.
12701
12702 <result name="VBOX_E_INVALID_VM_STATE">
12703 Session state prevents operation.
12704 </result>
12705 <result name="VBOX_E_INVALID_OBJECT_STATE">
12706 Session type prevents operation.
12707 </result>
12708
12709 </desc>
12710 </method>
12711
12712 <method name="onUSBControllerChange">
12713 <desc>
12714 Triggered when settings of the USB controller object of the
12715 associated virtual machine have changed.
12716
12717 <result name="VBOX_E_INVALID_VM_STATE">
12718 Session state prevents operation.
12719 </result>
12720 <result name="VBOX_E_INVALID_OBJECT_STATE">
12721 Session type prevents operation.
12722 </result>
12723
12724 </desc>
12725 </method>
12726
12727 <method name="onSharedFolderChange">
12728 <desc>
12729 Triggered when a permanent (global or machine) shared folder has been
12730 created or removed.
12731 <note>
12732 We don't pass shared folder parameters in this notification because
12733 the order in which parallel notifications are delivered is not defined,
12734 therefore it could happen that these parameters were outdated by the
12735 time of processing this notification.
12736 </note>
12737
12738 <result name="VBOX_E_INVALID_VM_STATE">
12739 Session state prevents operation.
12740 </result>
12741 <result name="VBOX_E_INVALID_OBJECT_STATE">
12742 Session type prevents operation.
12743 </result>
12744
12745 </desc>
12746 <param name="global" type="boolean" dir="in"/>
12747 </method>
12748
12749 <method name="onUSBDeviceAttach">
12750 <desc>
12751 Triggered when a request to capture a USB device (as a result
12752 of matched USB filters or direct call to
12753 <link to="IConsole::attachUSBDevice"/>) has completed.
12754 A @c null @a error object means success, otherwise it
12755 describes a failure.
12756
12757 <result name="VBOX_E_INVALID_VM_STATE">
12758 Session state prevents operation.
12759 </result>
12760 <result name="VBOX_E_INVALID_OBJECT_STATE">
12761 Session type prevents operation.
12762 </result>
12763
12764 </desc>
12765 <param name="device" type="IUSBDevice" dir="in"/>
12766 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12767 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12768 </method>
12769
12770 <method name="onUSBDeviceDetach">
12771 <desc>
12772 Triggered when a request to release the USB device (as a result
12773 of machine termination or direct call to
12774 <link to="IConsole::detachUSBDevice"/>) has completed.
12775 A @c null @a error object means success, otherwise it
12776 describes a failure.
12777
12778 <result name="VBOX_E_INVALID_VM_STATE">
12779 Session state prevents operation.
12780 </result>
12781 <result name="VBOX_E_INVALID_OBJECT_STATE">
12782 Session type prevents operation.
12783 </result>
12784
12785 </desc>
12786 <param name="id" type="uuid" mod="string" dir="in"/>
12787 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12788 </method>
12789
12790 <method name="onShowWindow">
12791 <desc>
12792 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12793 <link to="IMachine::showConsoleWindow"/> in order to notify
12794 console callbacks
12795 <link to="IConsoleCallback::onCanShowWindow"/>
12796 and <link to="IConsoleCallback::onShowWindow"/>.
12797
12798 <result name="VBOX_E_INVALID_OBJECT_STATE">
12799 Session type prevents operation.
12800 </result>
12801
12802 </desc>
12803 <param name="check" type="boolean" dir="in"/>
12804 <param name="canShow" type="boolean" dir="out"/>
12805 <param name="winId" type="unsigned long long" dir="out"/>
12806 </method>
12807
12808 <method name="accessGuestProperty">
12809 <desc>
12810 Called by <link to="IMachine::getGuestProperty"/> and by
12811 <link to="IMachine::setGuestProperty"/> in order to read and
12812 modify guest properties.
12813
12814 <result name="VBOX_E_INVALID_VM_STATE">
12815 Machine session is not open.
12816 </result>
12817 <result name="VBOX_E_INVALID_OBJECT_STATE">
12818 Session type is not direct.
12819 </result>
12820
12821 </desc>
12822 <param name="name" type="wstring" dir="in"/>
12823 <param name="value" type="wstring" dir="in"/>
12824 <param name="flags" type="wstring" dir="in"/>
12825 <param name="isSetter" type="boolean" dir="in"/>
12826 <param name="retValue" type="wstring" dir="out"/>
12827 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12828 <param name="retFlags" type="wstring" dir="out"/>
12829 </method>
12830
12831 <method name="enumerateGuestProperties">
12832 <desc>
12833 Return a list of the guest properties matching a set of patterns along
12834 with their values, time stamps and flags.
12835
12836 <result name="VBOX_E_INVALID_VM_STATE">
12837 Machine session is not open.
12838 </result>
12839 <result name="VBOX_E_INVALID_OBJECT_STATE">
12840 Session type is not direct.
12841 </result>
12842
12843 </desc>
12844 <param name="patterns" type="wstring" dir="in">
12845 <desc>
12846 The patterns to match the properties against as a comma-separated
12847 string. If this is empty, all properties currently set will be
12848 returned.
12849 </desc>
12850 </param>
12851 <param name="key" type="wstring" dir="out" safearray="yes">
12852 <desc>
12853 The key names of the properties returned.
12854 </desc>
12855 </param>
12856 <param name="value" type="wstring" dir="out" safearray="yes">
12857 <desc>
12858 The values of the properties returned. The array entries match the
12859 corresponding entries in the @a key array.
12860 </desc>
12861 </param>
12862 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12863 <desc>
12864 The time stamps of the properties returned. The array entries match
12865 the corresponding entries in the @a key array.
12866 </desc>
12867 </param>
12868 <param name="flags" type="wstring" dir="out" safearray="yes">
12869 <desc>
12870 The flags of the properties returned. The array entries match the
12871 corresponding entries in the @a key array.
12872 </desc>
12873 </param>
12874 </method>
12875
12876 </interface>
12877
12878 <interface
12879 name="ISession" extends="$dispatched"
12880 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12881 wsmap="managed"
12882 >
12883 <desc>
12884 The ISession interface represents a serialization primitive for virtual
12885 machines.
12886
12887 With VirtualBox, every time one wishes to manipulate a virtual machine
12888 (e.g. change its settings or start execution), a session object is
12889 required. Such an object must be passed to one of the session methods
12890 that open the given session, which then initiates the machine manipulation.
12891
12892 A session serves several purposes: it identifies to the inter-process VirtualBox
12893 code which process is currently working with the virtual machine, and it ensures
12894 that there are no incompatible requests from several processes for the
12895 same virtual machine. Session objects can therefore be thought of as mutex
12896 semaphores that lock virtual machines to prevent conflicting accesses from
12897 several processes.
12898
12899 How sessions objects are used depends on whether you use the Main API
12900 via COM or via the webservice:
12901
12902 <ul>
12903 <li>When using the COM API directly, an object of the Session class from the
12904 VirtualBox type library needs to be created. In regular COM C++ client code,
12905 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12906 This object will then act as a local session object in further calls to open
12907 a session.
12908 </li>
12909
12910 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12911 one session object automatically when <link to="IWebsessionManager::logon" />
12912 is called. A managed object reference to that session object can be retrieved by
12913 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12914 reference can then be used to open sessions.
12915 </li>
12916 </ul>
12917
12918 Sessions are mainly used in two variations:
12919
12920 <ul>
12921 <li>
12922 To start a virtual machine in a separate process, one would call
12923 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12924 object as its first parameter. This session then identifies the caller
12925 and lets him control the started machine (for example, pause machine
12926 execution or power it down) as well as be notified about machine
12927 execution state changes.
12928 </li>
12929
12930 <li>To alter machine settings, or to start machine execution within the
12931 current process, one needs to open a direct session for the machine first by
12932 calling <link to="IVirtualBox::openSession"/>. While a direct session
12933 is open within one process, no any other process may open another direct
12934 session for the same machine. This prevents the machine from being changed
12935 by other processes while it is running or while the machine is being configured.
12936 </li>
12937 </ul>
12938
12939 One also can attach to an existing direct session already opened by
12940 another process (for example, in order to send a control request to the
12941 virtual machine such as the pause or the reset request). This is done by
12942 calling <link to="IVirtualBox::openExistingSession"/>.
12943
12944 <note>
12945 Unless you are trying to write a new VirtualBox front-end that
12946 performs direct machine execution (like the VirtualBox or VBoxSDL
12947 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12948 session opened by <link to="IVirtualBox::openSession"/> and use this
12949 session only to change virtual machine settings. If you simply want to
12950 start virtual machine execution using one of the existing front-ends
12951 (for example the VirtualBox GUI or headless server), simply use
12952 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12953 will power up the machine automatically for you.
12954 </note>
12955 </desc>
12956
12957 <attribute name="state" type="SessionState" readonly="yes">
12958 <desc>Current state of this session.</desc>
12959 </attribute>
12960
12961 <attribute name="type" type="SessionType" readonly="yes">
12962 <desc>
12963 Type of this session. The value of this attribute is valid only
12964 if the session is currently open (i.e. its #state is
12965 SessionType_SessionOpen), otherwise an error will be returned.
12966 </desc>
12967 </attribute>
12968
12969 <attribute name="machine" type="IMachine" readonly="yes">
12970 <desc>Machine object associated with this session.</desc>
12971 </attribute>
12972
12973 <attribute name="console" type="IConsole" readonly="yes">
12974 <desc>Console object associated with this session.</desc>
12975 </attribute>
12976
12977 <method name="close">
12978 <desc>
12979 Closes a session that was previously opened.
12980
12981 It is recommended that every time an "open session" method (such as
12982 <link to="IVirtualBox::openRemoteSession" /> or
12983 <link to="IVirtualBox::openSession" />) has been called to
12984 manipulate a virtual machine, the caller invoke
12985 ISession::close() when it's done doing so. Since sessions are
12986 serialization primitives much like ordinary mutexes, they are
12987 best used the same way: for each "open" call, there should be
12988 a matching "close" call, even when errors occur.
12989
12990 Otherwise, if a direct session for a machine opened with
12991 <link to="IVirtualBox::openSession"/> is not explicitly closed
12992 when the application terminates, the state of the machine will
12993 be set to <link to="MachineState_Aborted" /> on the server.
12994
12995 Generally, it is recommended to close all open sessions explicitly
12996 before terminating the application (regardless of the reason for
12997 the termination).
12998
12999 <note>
13000 Do not expect the session state (<link to="ISession::state" />
13001 to return to "Closed" immediately after you invoke
13002 ISession::close(), particularly if you have started a remote
13003 session to execute the VM in a new process. The session state will
13004 automatically return to "Closed" once the VM is no longer executing,
13005 which can of course take a very long time.
13006 </note>
13007
13008 <result name="E_UNEXPECTED">
13009 Session is not open.
13010 </result>
13011
13012 </desc>
13013 </method>
13014
13015 </interface>
13016
13017 <!--
13018 // IStorageController
13019 /////////////////////////////////////////////////////////////////////////
13020 -->
13021
13022 <enum
13023 name="StorageBus"
13024 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
13025 >
13026 <desc>
13027 The bus type of the storage controller (IDE, SATA, SCSI or Floppy);
13028 see <link to="IStorageController::bus" />.
13029 </desc>
13030 <const name="Null" value="0">
13031 <desc>@c null value. Never used by the API.</desc>
13032 </const>
13033 <const name="IDE" value="1"/>
13034 <const name="SATA" value="2"/>
13035 <const name="SCSI" value="3"/>
13036 <const name="Floppy" value="4"/>
13037 <const name="SAS" value="5"/>
13038 </enum>
13039
13040 <enum
13041 name="StorageControllerType"
13042 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
13043 >
13044 <desc>
13045 The exact variant of storage controller hardware presented
13046 to the guest; see <link to="IStorageController::controllerType" />.
13047 </desc>
13048
13049 <const name="Null" value="0">
13050 <desc>@c null value. Never used by the API.</desc>
13051 </const>
13052 <const name="LsiLogic" value="1">
13053 <desc>A SCSI controller of the LsiLogic variant.</desc>
13054 </const>
13055 <const name="BusLogic" value="2">
13056 <desc>A SCSI controller of the BusLogic variant.</desc>
13057 </const>
13058 <const name="IntelAhci" value="3">
13059 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
13060 </const>
13061 <const name="PIIX3" value="4">
13062 <desc>An IDE controller of the PIIX3 variant.</desc>
13063 </const>
13064 <const name="PIIX4" value="5">
13065 <desc>An IDE controller of the PIIX4 variant.</desc>
13066 </const>
13067 <const name="ICH6" value="6">
13068 <desc>An IDE controller of the ICH6 variant.</desc>
13069 </const>
13070 <const name="I82078" value="7">
13071 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
13072 </const>
13073 <const name="LsiLogicSas" value="8">
13074 <desc>A variant of the LsiLogic controller using SAS.</desc>
13075 </const>
13076 </enum>
13077
13078 <interface
13079 name="IStorageController" extends="$unknown"
13080 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
13081 wsmap="managed"
13082 >
13083 <desc>
13084 Represents a storage controller that is attached to a virtual machine
13085 (<link to="IMachine" />). Just as drives (hard disks, DVDs, FDs) are
13086 attached to storage controllers in a real computer, virtual drives
13087 (represented by <link to="IMediumAttachment" />) are attached to virtual
13088 storage controllers, represented by this interface.
13089
13090 As opposed to physical hardware, VirtualBox has a very generic concept
13091 of a storage controller, and for purposes of the Main API, all virtual
13092 storage is attached to virtual machines via instances of this interface.
13093 There are four types of such virtual storage controllers: IDE, SCSI, SATA
13094 and Floppy (see <link to="#bus" />). Depending on which of these four is
13095 used, certain sub-types may be available and can be selected in
13096 <link to="#controllerType" />.
13097
13098 Depending on these settings, the guest operating system might see
13099 significantly different virtual hardware.
13100 </desc>
13101
13102 <attribute name="name" type="wstring" readonly="yes">
13103 <desc>
13104 Name of the storage controller, as originally specified with
13105 <link to="IMachine::addStorageController" />. This then uniquely
13106 identifies this controller with other method calls such as
13107 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
13108 </desc>
13109 </attribute>
13110
13111 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
13112 <desc>
13113 Maximum number of devices which can be attached to one port.
13114 </desc>
13115 </attribute>
13116
13117 <attribute name="minPortCount" type="unsigned long" readonly="yes">
13118 <desc>
13119 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
13120 </desc>
13121 </attribute>
13122
13123 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
13124 <desc>
13125 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
13126 </desc>
13127 </attribute>
13128
13129 <attribute name="instance" type="unsigned long">
13130 <desc>
13131 The instance number of the device in the running VM.
13132 </desc>
13133 </attribute>
13134
13135 <attribute name="portCount" type="unsigned long">
13136 <desc>
13137 The number of currently usable ports on the controller.
13138 The minimum and maximum number of ports for one controller are
13139 stored in <link to="IStorageController::minPortCount"/>
13140 and <link to="IStorageController::maxPortCount"/>.
13141 </desc>
13142 </attribute>
13143
13144 <attribute name="bus" type="StorageBus" readonly="yes">
13145 <desc>
13146 The bus type of the storage controller (IDE, SATA, SCSI or Floppy).
13147 </desc>
13148 </attribute>
13149
13150 <attribute name="controllerType" type="StorageControllerType">
13151 <desc>
13152 The exact variant of storage controller hardware presented
13153 to the guest.
13154 Depending on this value, VirtualBox will provide a different
13155 virtual storage controller hardware to the guest.
13156 For SATA and floppy controllers, only one variant is available,
13157 but for IDE and SCSI, there are several.
13158
13159 For SCSI controllers, the default type is LsiLogic.
13160 </desc>
13161 </attribute>
13162
13163 <method name="GetIDEEmulationPort">
13164 <desc>
13165 Gets the corresponding port number which is emulated as an IDE device.
13166 Works only with SATA controllers.
13167
13168 <result name="E_INVALIDARG">
13169 The @a devicePosition is not in the range 0 to 3.
13170 </result>
13171 <result name="E_NOTIMPL">
13172 The storage controller type is not SATAIntelAhci.
13173 </result>
13174
13175 </desc>
13176 <param name="devicePosition" type="long" dir="in"/>
13177 <param name="portNumber" type="long" dir="return"/>
13178 </method>
13179
13180 <method name="SetIDEEmulationPort">
13181 <desc>
13182 Sets the port number which is emulated as an IDE device.
13183 Works only with SATA controllers.
13184
13185 <result name="E_INVALIDARG">
13186 The @a devicePosition is not in the range 0 to 3 or the
13187 @a portNumber is not in the range 0 to 29.
13188 </result>
13189 <result name="E_NOTIMPL">
13190 The storage controller type is not SATAIntelAhci.
13191 </result>
13192
13193 </desc>
13194 <param name="devicePosition" type="long" dir="in"/>
13195 <param name="portNumber" type="long" dir="in"/>
13196 </method>
13197
13198 </interface>
13199
13200<if target="wsdl">
13201
13202 <!--
13203 // IManagedObjectRef
13204 /////////////////////////////////////////////////////////////////////////
13205 -->
13206
13207 <interface
13208 name="IManagedObjectRef" extends="$unknown"
13209 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
13210 internal="yes"
13211 wsmap="managed"
13212 wscpp="hardcoded"
13213 >
13214 <desc>
13215 Managed object reference.
13216
13217 Only within the webservice, a managed object reference (which is really
13218 an opaque number) allows a webservice client to address an object
13219 that lives in the address space of the webservice server.
13220
13221 Behind each managed object reference, there is a COM object that lives
13222 in the webservice server's address space. The COM object is not freed
13223 until the managed object reference is released, either by an explicit
13224 call to <link to="IManagedObjectRef::release" /> or by logging off from
13225 the webservice (<link to="IWebsessionManager::logoff" />), which releases
13226 all objects created during the webservice session.
13227
13228 Whenever a method call of the VirtualBox API returns a COM object, the
13229 webservice representation of that method will instead return a
13230 managed object reference, which can then be used to invoke methods
13231 on that object.
13232 </desc>
13233
13234 <method name="getInterfaceName">
13235 <desc>
13236 Returns the name of the interface that this managed object represents,
13237 for example, "IMachine", as a string.
13238 </desc>
13239 <param name="return" type="wstring" dir="return"/>
13240 </method>
13241
13242 <method name="release">
13243 <desc>
13244 Releases this managed object reference and frees the resources that
13245 were allocated for it in the webservice server process. After calling
13246 this method, the identifier of the reference can no longer be used.
13247 </desc>
13248 </method>
13249
13250 </interface>
13251
13252 <!--
13253 // IWebsessionManager
13254 /////////////////////////////////////////////////////////////////////////
13255 -->
13256
13257 <interface
13258 name="IWebsessionManager" extends="$unknown"
13259 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
13260 internal="yes"
13261 wsmap="global"
13262 wscpp="hardcoded"
13263 >
13264 <desc>
13265 Websession manager. This provides essential services
13266 to webservice clients.
13267 </desc>
13268 <method name="logon">
13269 <desc>
13270 Logs a new client onto the webservice and returns a managed object reference to
13271 the IVirtualBox instance, which the client can then use as a basis to further
13272 queries, since all calls to the VirtualBox API are based on the IVirtualBox
13273 interface, in one way or the other.
13274 </desc>
13275 <param name="username" type="wstring" dir="in"/>
13276 <param name="password" type="wstring" dir="in"/>
13277 <param name="return" type="IVirtualBox" dir="return"/>
13278 </method>
13279
13280 <method name="getSessionObject">
13281 <desc>
13282 Returns a managed object reference to the internal ISession object that was created
13283 for this web service session when the client logged on.
13284
13285 <see>ISession</see>
13286 </desc>
13287 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13288 <param name="return" type="ISession" dir="return"/>
13289 </method>
13290
13291 <method name="logoff">
13292 <desc>
13293 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
13294 and destroys all resources associated with the session (most importantly, all
13295 managed objects created in the server while the session was active).
13296 </desc>
13297 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13298 </method>
13299
13300 </interface>
13301
13302</if>
13303
13304 <!--
13305 // IPerformanceCollector & friends
13306 /////////////////////////////////////////////////////////////////////////
13307 -->
13308
13309 <interface
13310 name="IPerformanceMetric" extends="$unknown"
13311 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
13312 >
13313 <desc>
13314 The IPerformanceMetric interface represents parameters of the given
13315 performance metric.
13316 </desc>
13317
13318 <attribute name="metricName" type="wstring" readonly="yes">
13319 <desc>
13320 Name of the metric.
13321 </desc>
13322 </attribute>
13323
13324 <attribute name="object" type="$unknown" readonly="yes">
13325 <desc>
13326 Object this metric belongs to.
13327 </desc>
13328 </attribute>
13329
13330 <attribute name="description" type="wstring" readonly="yes">
13331 <desc>
13332 Textual description of the metric.
13333 </desc>
13334 </attribute>
13335
13336 <attribute name="period" type="unsigned long" readonly="yes">
13337 <desc>
13338 Time interval between samples, measured in seconds.
13339 </desc>
13340 </attribute>
13341
13342 <attribute name="count" type="unsigned long" readonly="yes">
13343 <desc>
13344 Number of recent samples retained by the performance collector for this
13345 metric.
13346
13347 When the collected sample count exceeds this number, older samples
13348 are discarded.
13349 </desc>
13350 </attribute>
13351
13352 <attribute name="unit" type="wstring" readonly="yes">
13353 <desc>
13354 Unit of measurement.
13355 </desc>
13356 </attribute>
13357
13358 <attribute name="minimumValue" type="long" readonly="yes">
13359 <desc>
13360 Minimum possible value of this metric.
13361 </desc>
13362 </attribute>
13363
13364 <attribute name="maximumValue" type="long" readonly="yes">
13365 <desc>
13366 Maximum possible value of this metric.
13367 </desc>
13368 </attribute>
13369 </interface>
13370
13371 <interface
13372 name="IPerformanceCollector" extends="$unknown"
13373 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
13374 wsmap="managed"
13375 >
13376 <desc>
13377 The IPerformanceCollector interface represents a service that collects and
13378 stores performance metrics data.
13379
13380 Performance metrics are associated with objects of interfaces like IHost and
13381 IMachine. Each object has a distinct set of performance metrics.
13382 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
13383
13384 Metric data is collected at the specified intervals and is retained
13385 internally. The interval and the number of retained samples can be set
13386 with <link to="IPerformanceCollector::setupMetrics" />.
13387
13388 Metrics are organized hierarchically, with each level separated by a
13389 slash (/) character. Generally, the scheme for metric names is like this:
13390
13391 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
13392
13393 "Category/Metric" together form the base metric name. A base metric is the
13394 smallest unit for which a sampling interval and the number of retained
13395 samples can be set. Only base metrics can be enabled and disabled. All
13396 sub-metrics are collected when their base metric is collected.
13397 Collected values for any set of sub-metrics can be queried with
13398 <link to="IPerformanceCollector::queryMetricsData" />.
13399
13400 For example "CPU/Load/User:avg"
13401 metric name stands for the "CPU" category, "Load" metric, "User" submetric,
13402 "average" aggregate. An aggregate function is computed over all retained
13403 data. Valid aggregate functions are:
13404
13405 <ul>
13406 <li>avg -- average</li>
13407 <li>min -- minimum</li>
13408 <li>max -- maximum</li>
13409 </ul>
13410
13411 When setting up
13412 metric parameters, querying metric data, enabling or disabling metrics
13413 wildcards can be used in metric names to specify a subset of metrics. For
13414 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
13415 averages can be queried using <tt>*:avg</tt> and so on. To query metric
13416 values without aggregates <tt>*:</tt> can be used.
13417
13418 The valid names for base metrics are:
13419
13420 <ul>
13421 <li>CPU/Load</li>
13422 <li>CPU/MHz</li>
13423 <li>RAM/Usage</li>
13424 </ul>
13425
13426 The general sequence for collecting and retrieving the metrics is:
13427 <ul>
13428 <li>
13429 Obtain an instance of IPerformanceCollector with
13430 <link to="IVirtualBox::performanceCollector" />
13431 </li>
13432 <li>
13433 Allocate and populate an array with references to objects the metrics
13434 will be collected for. Use references to IHost and IMachine objects.
13435 </li>
13436 <li>
13437 Allocate and populate an array with base metric names the data will be
13438 collected for.
13439 </li>
13440 <li>
13441 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
13442 metric data will be collected and stored.
13443 </li>
13444 <li>
13445 Wait for the data to get collected.
13446 </li>
13447 <li>
13448 Allocate and populate an array with references to objects the metric
13449 values will be queried for. You can re-use the object array used for
13450 setting base metrics.
13451 </li>
13452 <li>
13453 Allocate and populate an array with metric names the data will be
13454 collected for. Note that metric names differ from base metric names.
13455 </li>
13456 <li>
13457 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
13458 have been collected so far are returned. Note that the values are still
13459 retained internally and data collection continues.
13460 </li>
13461 </ul>
13462
13463 For an example of usage refer to the following files in VirtualBox SDK:
13464 <ul>
13465 <li>
13466 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13467 </li>
13468 <li>
13469 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13470 </li>
13471 </ul>
13472 </desc>
13473
13474 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13475 <desc>
13476 Array of unique names of metrics.
13477
13478 This array represents all metrics supported by the performance
13479 collector. Individual objects do not necessarily support all of them.
13480 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13481 list of supported metrics for a particular object.
13482 </desc>
13483 </attribute>
13484
13485 <method name="getMetrics">
13486 <desc>
13487 Returns parameters of specified metrics for a set of objects.
13488 <note>
13489 @c Null metrics array means all metrics. @c Null object array means
13490 all existing objects.
13491 </note>
13492 </desc>
13493 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13494 <desc>
13495 Metric name filter. Currently, only a comma-separated list of metrics
13496 is supported.
13497 </desc>
13498 </param>
13499 <param name="objects" type="$unknown" dir="in" safearray="yes">
13500 <desc>
13501 Set of objects to return metric parameters for.
13502 </desc>
13503 </param>
13504 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13505 <desc>
13506 Array of returned metric parameters.
13507 </desc>
13508 </param>
13509 </method>
13510
13511 <method name="setupMetrics">
13512 <desc>
13513 Sets parameters of specified base metrics for a set of objects. Returns
13514 an array of <link to="IPerformanceMetric" /> describing the metrics have
13515 been affected.
13516 <note>
13517 @c Null or empty metric name array means all metrics. @c Null or empty
13518 object array means all existing objects. If metric name array contains
13519 a single element and object array contains many, the single metric
13520 name array element is applied to each object array element to form
13521 metric/object pairs.
13522 </note>
13523 </desc>
13524 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13525 <desc>
13526 Metric name filter. Comma-separated list of metrics with wildcard
13527 support.
13528 </desc>
13529 </param>
13530 <param name="objects" type="$unknown" dir="in" safearray="yes">
13531 <desc>
13532 Set of objects to setup metric parameters for.
13533 </desc>
13534 </param>
13535 <param name="period" type="unsigned long" dir="in">
13536 <desc>
13537 Time interval in seconds between two consecutive samples of performance
13538 data.
13539 </desc>
13540 </param>
13541 <param name="count" type="unsigned long" dir="in">
13542 <desc>
13543 Number of samples to retain in performance data history. Older samples
13544 get discarded.
13545 </desc>
13546 </param>
13547 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13548 <desc>
13549 Array of metrics that have been modified by the call to this method.
13550 </desc>
13551 </param>
13552 </method>
13553
13554 <method name="enableMetrics">
13555 <desc>
13556 Turns on collecting specified base metrics. Returns an array of
13557 <link to="IPerformanceMetric" /> describing the metrics have been
13558 affected.
13559 <note>
13560 @c Null or empty metric name array means all metrics. @c Null or empty
13561 object array means all existing objects. If metric name array contains
13562 a single element and object array contains many, the single metric
13563 name array element is applied to each object array element to form
13564 metric/object pairs.
13565 </note>
13566 </desc>
13567 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13568 <desc>
13569 Metric name filter. Comma-separated list of metrics with wildcard
13570 support.
13571 </desc>
13572 </param>
13573 <param name="objects" type="$unknown" dir="in" safearray="yes">
13574 <desc>
13575 Set of objects to enable metrics for.
13576 </desc>
13577 </param>
13578 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13579 <desc>
13580 Array of metrics that have been modified by the call to this method.
13581 </desc>
13582 </param>
13583 </method>
13584
13585 <method name="disableMetrics">
13586 <desc>
13587 Turns off collecting specified base metrics. Returns an array of
13588 <link to="IPerformanceMetric" /> describing the metrics have been
13589 affected.
13590 <note>
13591 @c Null or empty metric name array means all metrics. @c Null or empty
13592 object array means all existing objects. If metric name array contains
13593 a single element and object array contains many, the single metric
13594 name array element is applied to each object array element to form
13595 metric/object pairs.
13596 </note>
13597 </desc>
13598 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13599 <desc>
13600 Metric name filter. Comma-separated list of metrics with wildcard
13601 support.
13602 </desc>
13603 </param>
13604 <param name="objects" type="$unknown" dir="in" safearray="yes">
13605 <desc>
13606 Set of objects to disable metrics for.
13607 </desc>
13608 </param>
13609 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13610 <desc>
13611 Array of metrics that have been modified by the call to this method.
13612 </desc>
13613 </param>
13614 </method>
13615
13616 <method name="queryMetricsData">
13617 <desc>
13618 Queries collected metrics data for a set of objects.
13619
13620 The data itself and related metric information are returned in seven
13621 parallel and one flattened array of arrays. Elements of
13622 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13623 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13624 the same index describe one set of values corresponding to a single
13625 metric.
13626
13627 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13628 start and length of a sub-array is indicated by
13629 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13630 value for metric <tt>metricNames[i]</tt> is at
13631 <tt>returnData[returnIndices[i]]</tt>.
13632
13633 <note>
13634 @c Null or empty metric name array means all metrics. @c Null or empty
13635 object array means all existing objects. If metric name array contains
13636 a single element and object array contains many, the single metric
13637 name array element is applied to each object array element to form
13638 metric/object pairs.
13639 </note>
13640 <note>
13641 Data collection continues behind the scenes after call to
13642 @c queryMetricsData. The return data can be seen as the snapshot of
13643 the current state at the time of @c queryMetricsData call. The
13644 internally kept metric values are not cleared by the call. This makes
13645 possible querying different subsets of metrics or aggregates with
13646 subsequent calls. If periodic querying is needed it is highly
13647 suggested to query the values with @c interval*count period to avoid
13648 confusion. This way a completely new set of data values will be
13649 provided by each query.
13650 </note>
13651 </desc>
13652 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13653 <desc>
13654 Metric name filter. Comma-separated list of metrics with wildcard
13655 support.
13656 </desc>
13657 </param>
13658 <param name="objects" type="$unknown" dir="in" safearray="yes">
13659 <desc>
13660 Set of objects to query metrics for.
13661 </desc>
13662 </param>
13663 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13664 <desc>
13665 Names of metrics returned in @c returnData.
13666 </desc>
13667 </param>
13668 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13669 <desc>
13670 Objects associated with metrics returned in @c returnData.
13671 </desc>
13672 </param>
13673 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13674 <desc>
13675 Units of measurement for each returned metric.
13676 </desc>
13677 </param>
13678 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13679 <desc>
13680 Divisor that should be applied to return values in order to get
13681 floating point values. For example:
13682 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13683 will retrieve the floating point value of i-th sample of the first
13684 metric.
13685 </desc>
13686 </param>
13687 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13688 <desc>
13689 Sequence numbers of the first elements of value sequences of particular metrics
13690 returned in @c returnData. For aggregate metrics it is the sequence number of
13691 the sample the aggregate started calculation from.
13692 </desc>
13693 </param>
13694 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13695 <desc>
13696 Indices of the first elements of value sequences of particular metrics
13697 returned in @c returnData.
13698 </desc>
13699 </param>
13700 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13701 <desc>
13702 Lengths of value sequences of particular metrics.
13703 </desc>
13704 </param>
13705 <param name="returnData" type="long" dir="return" safearray="yes">
13706 <desc>
13707 Flattened array of all metric data containing sequences of values for
13708 each metric.
13709 </desc>
13710 </param>
13711 </method>
13712
13713 </interface>
13714
13715 <module name="VBoxSVC" context="LocalServer">
13716 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13717 namespace="virtualbox.org">
13718 <interface name="IVirtualBox" default="yes"/>
13719 </class>
13720 </module>
13721
13722 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13723 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
13724 namespace="virtualbox.org">
13725 <interface name="ISession" default="yes"/>
13726 </class>
13727 <class name="CallbackWrapper" uuid="49EE8561-5563-4715-B18C-A4B1A490DAFE"
13728 namespace="virtualbox.org">
13729 <interface name="ILocalOwner" default="yes"/>
13730 <interface name="IVirtualBoxCallback"/>
13731 <interface name="IConsoleCallback"/>
13732 </class>
13733 </module>
13734
13735</library>
13736
13737</idl>
13738
13739<!-- 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