VirtualBox

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

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

Main: Teleport to local process with disks attached. Delays the LockMedia call till after the source machine has unlocked them.

  • Property svn:eol-style set to native
File size: 503.9 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * :tabSize=2:indentSize=2:noTabs=true:
5 * :folding=explicit:collapseFolds=1:
6 *
7 * Master declaration for VirtualBox's Main API, represented
8 * by COM/XPCOM and web service interfaces.
9 *
10 * From this document, the build system generates several files
11 * via XSLT that are then used during the build process.
12 *
13 * Below is the list of XSL templates that operate on this file and
14 * output files they generate. These XSL templates must be updated
15 * whenever the schema of this file changes:
16 *
17 * 1. src/VBox/Main/idl/midl.xsl =>
18 * out/<platform>/bin/sdk/idl/VirtualBox.idl
19 * (MS COM interface definition file for Main API)
20 *
21 * 2. src/VBox/Main/idl/xpidl.xsl =>
22 * out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
23 * (XPCOM interface definition file for Main API)
24 *
25 * 3. src/VBox/Main/idl/doxygen.xsl =>
26 * out/<platform>/obj/src/VBox/Main/VirtualBox.idl
27 * (pseudo-IDL for Doxygen to generate the official Main API
28 * documentation)
29 *
30 * 4. src/VBox/Main/webservice/*.xsl =>
31 * a bunch of WSDL and C++ files
32 * (VirtualBox web service sources and SOAP mappers;
33 * see src/VBox/Main/webservice/Makefile.kmk for details)
34 *
35 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
36 * out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
37 * (smart Qt-based C++ wrapper classes for COM interfaces
38 * of the Main API)
39 *
40 * 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
41 * out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
42 * (Main API TypeLib block for the WiX installer)
43 *
44 * 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
45 * out/<platform>/obj/Runtime/errmsgvboxcomdata.h
46 * (<result> extraction for the %Rhrc format specifier)
47 *
48 Copyright (C) 2006-2009 Sun Microsystems, Inc.
49
50 This file is part of VirtualBox Open Source Edition (OSE), as
51 available from http://www.virtualbox.org. This file is free software;
52 you can redistribute it and/or modify it under the terms of the GNU
53 General Public License (GPL) as published by the Free Software
54 Foundation, in version 2 as it comes in the "COPYING" file of the
55 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
56 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
57
58 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
59 Clara, CA 95054 USA or visit http://www.sun.com if you need
60 additional information or have any questions.
61-->
62
63<idl>
64
65<desc>
66 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
67 describes the so-called <i>VirtualBox Main API</i> which comprises all public
68 COM interfaces and components provided by the VirtualBox server and by the
69 VirtualBox client library.
70
71 VirtualBox employs a client-server design, meaning that whenever any part of
72 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
73 interface or any virtual machine --, a dedicated server process named
74 VBoxSVC runs in the background. This allows multiple processes working with
75 VirtualBox to cooperate without conflicts. These processes communicate to each
76 other using inter-process communication facilities provided by the COM
77 implementation of the host computer.
78
79 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
80 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
81 implementation, is used.
82
83 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
84 the VBoxManage command-line interface and the VBoxVRDP server) are technically
85 front-ends to the Main API and only use the interfaces that are documented
86 in this Main API documentation. This ensures that, with any given release
87 version of VirtualBox, all capabilities of the product that could be useful
88 to an external client program are always exposed by way of this API.
89
90 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
91 contains two public component classes:
92 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
93 implement IVirtualBox and ISession interfaces respectively. These two classes
94 are of supreme importance and will be needed in order for any front-end
95 program to do anything useful. It is recommended to read the documentation of
96 the mentioned interfaces first.
97
98 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
99 there can be only one object of this class on the local machine at any given
100 time. This object is a parent of many other objects in the VirtualBox COM
101 library and lives in the VBoxSVC process. In fact, when you create an instance
102 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
103 process is already running, starts it if not, and returns you a reference to
104 the <tt>VirtualBox</tt> object created in this process. When the last reference
105 to this object is released, the VBoxSVC process ends (with a 5 second delay to
106 protect from too frequent restarts).
107
108 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
109 as many <tt>Session</tt> objects as you need but all of them will live in a
110 process which issues the object instantiation call. <tt>Session</tt> objects
111 represent virtual machine sessions which are used to configure virtual
112 machines and control their execution.
113</desc>
114
115<if target="midl">
116 <cpp line="enum {"/>
117 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
118 <cpp line=" kTypeLibraryMinorVersion = 0"/>
119 <cpp line="};"/>
120</if>
121
122<if target="xpidl">
123 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
124 <cpp>
125/* currently, nsISupportsImpl.h lacks the below-like macros */
126
127#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
128#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
129#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI NS_IMPL_QUERY_INTERFACE3_CI
130
131#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
132# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
133 NS_IMPL_THREADSAFE_ADDREF(_class) \
134 NS_IMPL_THREADSAFE_RELEASE(_class) \
135 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
136 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
137#endif
138
139#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
140# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
141 NS_IMPL_THREADSAFE_ADDREF(_class) \
142 NS_IMPL_THREADSAFE_RELEASE(_class) \
143 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
144 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
145#endif
146
147#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_CI
148# define NS_IMPL_THREADSAFE_ISUPPORTS3_CI(_class, _i1, _i2, _i3) \
149 NS_IMPL_THREADSAFE_ADDREF(_class) \
150 NS_IMPL_THREADSAFE_RELEASE(_class) \
151 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI(_class, _i1, _i2, _i3) \
152 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
153#endif
154
155#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
156# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
157 NS_INTERFACE_MAP_BEGIN(_class) \
158 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
159 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
160 NS_IMPL_QUERY_CLASSINFO(_class) \
161 NS_INTERFACE_MAP_END
162#endif
163
164#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
165# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
166 _i2, _ic2) \
167 NS_INTERFACE_MAP_BEGIN(_class) \
168 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
169 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
170 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
171 NS_IMPL_QUERY_CLASSINFO(_class) \
172 NS_INTERFACE_MAP_END
173#endif
174
175#ifndef NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
176# define NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
177 _i2, _ic2, _i3, _ic3) \
178 NS_INTERFACE_MAP_BEGIN(_class) \
179 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
180 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
181 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i3, _ic3) \
182 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
183 NS_IMPL_QUERY_CLASSINFO(_class) \
184 NS_INTERFACE_MAP_END
185#endif
186
187#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
188#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
189#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
190
191#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
192# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
193 NS_IMPL_THREADSAFE_ADDREF(_class) \
194 NS_IMPL_THREADSAFE_RELEASE(_class) \
195 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
196 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
197#endif
198
199#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
200# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
201 _i2, _ic2) \
202 NS_IMPL_THREADSAFE_ADDREF(_class) \
203 NS_IMPL_THREADSAFE_RELEASE(_class) \
204 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
205 _i2, _ic2) \
206 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
207#endif
208
209#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI
210# define NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI(_class, _i1, _ic1, \
211 _i2, _ic2, _i3, _ic3) \
212 NS_IMPL_THREADSAFE_ADDREF(_class) \
213 NS_IMPL_THREADSAFE_RELEASE(_class) \
214 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
215 _i2, _ic2, _i3, _ic3) \
216 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
217#endif
218
219 </cpp>
220</if>
221
222<library
223 name="VirtualBox"
224 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
225 version="1.3"
226 desc="VirtualBox Type Library"
227 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
228 supportsErrorInfo="yes"
229>
230
231
232 <!--
233 // COM result codes for VirtualBox
234 /////////////////////////////////////////////////////////////////////////
235 -->
236
237 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
238 <desc>
239 This section describes all VirtualBox-specific COM result codes that may
240 be returned by methods of VirtualBox COM interfaces in addition to
241 standard COM result codes.
242
243 Note that along with the result code, every VirtualBox method returns
244 extended error information through the IVirtualBoxErrorInfo interface on
245 failure. This interface is a preferred way to present the error to the end
246 user because it contains a human readable description of the error. Raw
247 result codes, both standard and described in this section, are intended to
248 be used by programs to analyze the reason of a failure and select an
249 appropriate course of action without involving the end user (for example,
250 retry the operation later or make a different call).
251
252 The standard COM result codes that may originate from our methods include:
253
254 <table>
255 <tr><td>E_INVALIDARG</td>
256 <td>
257 Returned when the value of the method's argument is not within the range
258 of valid values. This should not be confused with situations when the
259 value is within the range but simply doesn't suit the current object
260 state and there is a possibility that it will be accepted later (in such
261 cases VirtualBox-specific codes are returned, for example,
262 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
263 </td>
264 </tr>
265 <tr><td>E_POINTER</td>
266 <td>
267 Returned if a memory pointer for the output argument is invalid (for
268 example, @c null). Note that when pointers representing input
269 arguments (such as strings) are invalid, E_INVALIDARG is returned.
270 </td>
271 </tr>
272 <tr><td>E_ACCESSDENIED</td>
273 <td>
274 Returned when the called object is not ready. Since the lifetime of a
275 public COM object cannot be fully controlled by the implementation,
276 VirtualBox maintains the readiness state for all objects it creates and
277 returns this code in response to any method call on the object that was
278 deactivated by VirtualBox and is not functioning any more.
279 </td>
280 </tr>
281 <tr><td>E_OUTOFMEMORY</td>
282 <td>
283 Returned when a memory allocation operation fails.
284 </td>
285 </tr>
286 </table>
287 </desc>
288 </descGroup>
289
290 <!--
291 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
292 everything in <result>/<desc> after (and including) the first dot, so express
293 the matter of the error code in the first sentence and keep it short.
294 -->
295
296 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
297 <desc>
298 Object corresponding to the supplied arguments does not exist.
299 </desc>
300 </result>
301
302 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
303 <desc>
304 Current virtual machine state prevents the operation.
305 </desc>
306 </result>
307
308 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
309 <desc>
310 Virtual machine error occurred attempting the operation.
311 </desc>
312 </result>
313
314 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
315 <desc>
316 File not accessible or erroneous file contents.
317 </desc>
318 </result>
319
320 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
321 <desc>
322 Runtime subsystem error.
323 </desc>
324 </result>
325
326 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
327 <desc>
328 Pluggable Device Manager error.
329 </desc>
330 </result>
331
332 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
333 <desc>
334 Current object state prohibits operation.
335 </desc>
336 </result>
337
338 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
339 <desc>
340 Host operating system related error.
341 </desc>
342 </result>
343
344 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
345 <desc>
346 Requested operation is not supported.
347 </desc>
348 </result>
349
350 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
351 <desc>
352 Invalid XML found.
353 </desc>
354 </result>
355
356 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
357 <desc>
358 Current session state prohibits operation.
359 </desc>
360 </result>
361
362 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
363 <desc>
364 Object being in use prohibits operation.
365 </desc>
366 </result>
367
368 <!--
369 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
370 everything in <result>/<desc> after (and including) the first dot, so express
371 the matter of the error code in the first sentence and keep it short.
372 -->
373
374 <descGroup/>
375
376 <!--
377 // all common enums
378 /////////////////////////////////////////////////////////////////////////
379 -->
380
381 <enum name="SettingsVersion"
382 uuid="52bd6f5f-1adb-4493-975d-581a9c4b803f"
383 >
384 <desc>Settings version of VirtualBox settings files. This is written to
385 the "version" attribute of the root "VirtualBox" element in the settings
386 file XML and indicates which VirtualBox version wrote the file.
387 </desc>
388
389 <const name="Null" value="0">
390 <desc>Null value, indicates invalid version.</desc>
391 </const>
392 <const name="v1_0" value="1">
393 <desc>Legacy settings version, not currently supported.</desc>
394 </const>
395 <const name="v1_1" value="2">
396 <desc>Legacy settings version, not currently supported.</desc>
397 </const>
398 <const name="v1_2" value="3">
399 <desc>Legacy settings version, not currently supported.</desc>
400 </const>
401 <const name="v1_3pre" value="4">
402 <desc>Legacy settings version, not currently supported.</desc>
403 </const>
404 <const name="v1_3" value="5">
405 <desc>Settings version "1.3", written by VirtualBox 2.0.12.</desc>
406 <!--
407 Machine XML: Capitalization of Uart, Lpt elements and many attributes changed.
408 -->
409 </const>
410 <const name="v1_4" value="6">
411 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
412 <!--
413 VirtualBox.xml: big DiskRegistry -> MediaRegistry revamp, various HardDisk types merged
414 (was VirtualDiskImage, VMDKImage, VHDImage, ISCSIHardDisk, CustomHardDisk, DiffHardDisk)
415 -->
416 </const>
417 <const name="v1_5" value="7">
418 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
419 <!-- 2008-09-04: 2.0.0 released
420 2008-11-20: settings version 1.5 introduced
421 2008-12-17: 2.1.0 released
422 Machine changes:
423 guest OS identifiers changed;
424 Machine/Hardware/Display/MonitorCount renamed to monitorCount;
425 Machine/Hardware/Display/Accelerate3D renamed to accelerate3D;
426 Machine/Hardware/CPU/CPUCount/@count changed to CPU/@count
427 -->
428 </const>
429 <const name="v1_6" value="8">
430 <desc>Settings version "1.6", written by VirtualBox 2.1.4 (at least).</desc>
431 <!-- 2008-12-17: 2.1.0 released
432 2008-12-19: settings version 1.6 introduced (is in 2.1 branch)
433 2009-04-08: 2.2.0 released
434 Machine changes: remove all Machine/Hardware/Network/Adapter/HostInterface[@TAPSetup or @TAPTerminate]/ attributes (done)
435 -->
436 </const>
437 <const name="v1_7" value="9">
438 <desc>Settings version "1.7", written by VirtualBox 2.2.x and 3.0.x.</desc>
439 <!-- 2008-12-17: 2.1.0 released
440 2009-03-11: settings version 1.7 introduced (is in 2.2 branch)
441 2009-04-08: 2.2.0 released
442 VirtualBox.xml additions: NetserviceRegistry with DHCPServers (done)
443 Machine changes: HardDiskAttachments is now StorageControllers (done)
444 -->
445 </const>
446 <const name="v1_8" value="10">
447 <desc>Intermediate settings version "1.8", understood by VirtualBox 3.1.x.</desc>
448 <!-- Machine additions: Display/@accelerate2DVideo (done)
449 -->
450 </const>
451 <const name="v1_9" value="11">
452 <desc>Settings version "1.9", written by VirtualBox 3.1.x.</desc>
453 <!-- The big storage controller / DVD / Floppy rework (done)
454 -->
455 </const>
456 <const name="Future" value="12">
457 <desc>Settings version greater than "1.9", written by a future VirtualBox version.</desc>
458 </const>
459 </enum>
460
461 <enum
462 name="AccessMode"
463 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
464 >
465 <desc>
466 Access mode for opening files.
467 </desc>
468
469 <const name="ReadOnly" value="1"/>
470 <const name="ReadWrite" value="2"/>
471 </enum>
472
473 <enum
474 name="MachineState"
475 uuid="36518cf6-cdf0-4d0d-ad2a-5ee9c60c7494"
476 >
477 <desc>
478 Virtual machine execution state.
479
480 This enumeration represents possible values of the <link
481 to="IMachine::state"/> attribute.
482
483 Below is the basic virtual machine state diagram. It shows how the state
484 changes during virtual machine execution. The text in square braces shows
485 a method of the IConsole interface that performs the given state
486 transition.
487
488 <pre>
489 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
490 V |
491 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
492 | | | | V |
493 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
494 | | ^ | ^ |
495 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
496 | ^ | | | |
497 | | +-----------------------------------------+-|-------------------+ +
498 | | | | |
499 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
500 | | | |
501 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
502 | | |
503 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
504 </pre>
505
506 Note that states to the right from PoweredOff, Aborted and Saved in the
507 above diagram are called <i>online VM states</i>. These states
508 represent the virtual machine which is being executed in a dedicated
509 process (usually with a GUI window attached to it where you can see the
510 activity of the virtual machine and interact with it). There are two
511 special pseudo-states, FirstOnline and LastOnline, that can be used in
512 relational expressions to detect if the given machine state is online or
513 not:
514
515 <pre>
516 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
517 machine.GetState() &lt;= MachineState_LastOnline)
518 {
519 ...the machine is being executed...
520 }
521 </pre>
522
523 When the virtual machine is in one of the online VM states (that is, being
524 executed), only a few machine settings can be modified. Methods working
525 with such settings contain an explicit note about that. An attempt to
526 change any oter setting or perform a modifying operation during this time
527 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
528
529 All online states except Running, Paused and Stuck are transitional: they
530 represent temporary conditions of the virtual machine that will last as
531 long as the operation that initiated such a condition.
532
533 The Stuck state is a special case. It means that execution of the machine
534 has reached the "Guru Meditation" condition. This condition indicates an
535 internal VMM (virtual machine manager) failure which may happen as a
536 result of either an unhandled low-level virtual hardware exception or one
537 of the recompiler exceptions (such as the <i>too-many-traps</i>
538 condition).
539
540 Note also that any online VM state may transit to the Aborted state. This
541 happens if the process that is executing the virtual machine terminates
542 unexpectedly (for example, crashes). Other than that, the Aborted state is
543 equivalent to PoweredOff.
544
545 There are also a few additional state diagrams that do not deal with
546 virtual machine execution and therefore are shown separately. The states
547 shown on these diagrams are called <i>offline VM states</i> (this includes
548 PoweredOff, Aborted and Saved too).
549
550 The first diagram shows what happens when a lengthy setup operation is
551 being executed (such as <link to="IMachine::attachDevice"/>).
552
553 <pre>
554 +----------------------------------(same state as before the call)------+
555 | |
556 +-&gt; PoweredOff --+ |
557 | | |
558 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
559 | |
560 +-&gt; Saved -------+
561 </pre>
562
563 The next two diagrams demonstrate the process of taking a snapshot of a
564 powered off virtual machine and performing one of the "discard..."
565 operations, respectively.
566
567 <pre>
568 +----------------------------------(same state as before the call)------+
569 | |
570 +-&gt; PoweredOff --+ |
571 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
572 +-&gt; Aborted -----+
573
574 +-&gt; PoweredOff --+
575 | |
576 | Aborted -----+--&gt;[restoreSnapshot() ]-------&gt; RestoringSnapshot -+
577 | | [deleteSnapshot() ]-------&gt; DeletingSnapshot --+
578 +-&gt; Saved -------+ |
579 | |
580 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
581 </pre>
582
583 Note that the Saving state is present in both the offline state group and
584 online state group. Currently, the only way to determine what group is
585 assumed in a particular case is to remember the previous machine state: if
586 it was Running or Paused, then Saving is an online state, otherwise it is
587 an offline state. This inconsistency may be removed in one of the future
588 versions of VirtualBox by adding a new state.
589
590 <note internal="yes">
591 For whoever decides to touch this enum: In order to keep the
592 comparisons involving FirstOnline and LastOnline pseudo-states valid,
593 the numeric values of these states must be correspondingly updated if
594 needed: for any online VM state, the condition
595 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
596 @c true. The same relates to transient states for which
597 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
598 @c true.
599 </note>
600 </desc>
601
602 <const name="Null" value="0">
603 <desc>Null value (never used by the API).</desc>
604 </const>
605 <const name="PoweredOff" value="1">
606 <desc>
607 The machine is not running and has no saved execution state; it has
608 either never been started or been shut down successfully.
609 </desc>
610 </const>
611 <const name="Saved" value="2">
612 <desc>
613 The machine is not currently running, but the execution state of the machine
614 has been saved to an external file when it was running, from where
615 it can be resumed.
616 </desc>
617 </const>
618 <const name="Teleported" value="3">
619 <desc>
620 The machine was teleported to a different host (or process) and then
621 powered off. Take care when powering it on again may corrupt resources
622 it shares with the teleportation target (e.g. disk and network).
623 </desc>
624 </const>
625 <const name="Aborted" value="4">
626 <desc>
627 The process running the machine has terminated abnormally. This may
628 indicate a crash of the VM process in host execution context, or
629 the VM process has been terminated externally.
630 </desc>
631 </const>
632 <const name="Running" value="5">
633 <desc>
634 The machine is currently being executed.
635 <note internal="yes">
636 For whoever decides to touch this enum: In order to keep the
637 comparisons in the old source code valid, this state must immediately
638 precede the Paused state.
639 TODO: Lift this spectacularly wonderful restriction.
640 </note>
641 </desc>
642 </const>
643 <const name="Paused" value="6">
644 <desc>
645 Execution of the machine has been paused.
646 <note internal="yes">
647 For whoever decides to touch this enum: In order to keep the
648 comparisons in the old source code valid, this state must immediately
649 follow the Running state.
650 TODO: Lift this spectacularly wonderful restriction.
651 </note>
652 </desc>
653 </const>
654 <const name="Stuck" value="7">
655 <desc>
656 Execution of the machine has reached the "Guru Meditation"
657 condition. This indicates a severe error in the hypervisor itself.
658 <note internal="yes">
659 bird: Why this uncool name? Could we rename it to "GuruMeditation" or
660 "Guru", perhaps? Or are there some other VMM states that are
661 intended to be lumped in here as well?
662 </note>
663 </desc>
664 </const>
665 <const name="Teleporting" value="8">
666 <desc>
667 The machine is about to be teleported to a different host or process.
668 It is possible to pause a machine in this state, but it will go to the
669 <link to="MachineState::PausedTeleporting"/> state and it will not be
670 possible to resume it again unless the teleportation fails.
671 </desc>
672 </const>
673 <const name="LiveSnapshotting" value="9">
674 <desc>
675 A live snapshot is being taken. The machine is running normally, but
676 some of the runtime configuration options are inaccessible. Also, if
677 paused while in this state it will transition to
678 <link to="MachineState::Saving"/> and it will not be resume the
679 execution until the snapshot operation has completed.
680 </desc>
681 </const>
682 <const name="Starting" value="10">
683 <desc>
684 Machine is being started after powering it on from a
685 zero execution state.
686 </desc>
687 </const>
688 <const name="Stopping" value="11">
689 <desc>
690 Machine is being normally stopped powering it off, or after the guest OS
691 has initiated a shutdown sequence.
692 </desc>
693 </const>
694 <const name="Saving" value="12">
695 <desc>
696 Machine is saving its execution state to a file, or an online
697 snapshot of the machine is being taken.
698 </desc>
699 </const>
700 <const name="Restoring" value="13">
701 <desc>
702 Execution state of the machine is being restored from a file
703 after powering it on from the saved execution state.
704 </desc>
705 </const>
706 <const name="TeleportingPausedVM" value="14">
707 <desc>
708 The machine is being teleported to another host or process, but it is
709 not running. This is the paused variant of the
710 <link to="MachineState::Teleporting"/> state.
711 </desc>
712 </const>
713 <const name="TeleportingIn" value="15">
714 <desc>
715 Teleporting the machine state in from another host or process.
716 </desc>
717 </const>
718 <const name="RestoringSnapshot" value="16">
719 <desc>
720 A machine snapshot is being restored; this typically does not take long.
721 </desc>
722 </const>
723 <const name="DeletingSnapshot" value="17">
724 <desc>
725 A machine snapshot is being deleted; this can take a long time since this
726 may require merging differencing media.
727 </desc>
728 </const>
729 <const name="SettingUp" value="18">
730 <desc>
731 Lengthy setup operation is in progress.
732 </desc>
733 </const>
734
735 <const name="FirstOnline" value="5" wsmap="suppress"> <!-- Running -->
736 <desc>
737 Pseudo-state: first online state (for use in relational expressions).
738 </desc>
739 </const>
740 <const name="LastOnline" value="13" wsmap="suppress"> <!-- TeleportingIn -->
741 <desc>
742 Pseudo-state: last online state (for use in relational expressions).
743 </desc>
744 </const>
745
746 <const name="FirstTransient" value="8" wsmap="suppress"> <!-- Teleporting -->
747 <desc>
748 Pseudo-state: first transient state (for use in relational expressions).
749 </desc>
750 </const>
751 <const name="LastTransient" value="18" wsmap="suppress"> <!-- SettingUp -->
752 <desc>
753 Pseudo-state: last transient state (for use in relational expressions).
754 </desc>
755 </const>
756
757 </enum>
758
759 <enum
760 name="SessionState"
761 uuid="cf2700c0-ea4b-47ae-9725-7810114b94d8"
762 >
763 <desc>
764 Session state. This enumeration represents possible values of
765 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
766 attributes. See individual enumerator descriptions for the meaning for
767 every value.
768 </desc>
769
770 <const name="Null" value="0">
771 <desc>Null value (never used by the API).</desc>
772 </const>
773 <const name="Closed" value="1">
774 <desc>
775 The machine has no open sessions (<link to="IMachine::sessionState"/>);
776 the session is closed (<link to="ISession::state"/>)
777 </desc>
778 </const>
779 <const name="Open" value="2">
780 <desc>
781 The machine has an open direct session (<link to="IMachine::sessionState"/>);
782 the session is open (<link to="ISession::state"/>)
783 </desc>
784 </const>
785 <const name="Spawning" value="3">
786 <desc>
787 A new (direct) session is being opened for the machine as a result of
788 <link to="IVirtualBox::openRemoteSession"/> call
789 (<link to="IMachine::sessionState"/> or <link to="ISession::state"/>).
790 This state also occurs as a short transient state when a new direct
791 session is opened by calling <link to="IVirtualBox::openSession"/>.
792 </desc>
793 </const>
794 <const name="Closing" value="4">
795 <desc>
796 The direct session is being closed (<link to="IMachine::sessionState"/>);
797 the session is being closed (<link to="ISession::state"/>)
798 </desc>
799 </const>
800 </enum>
801
802 <enum
803 name="CpuPropertyType"
804 uuid="af7bb668-eeb1-4404-b77f-a114b30c92d6"
805 >
806 <desc>
807 Virtual CPU property type. This enumeration represents possible values of the
808 IMachine get- and setCpuProperty methods.
809 </desc>
810 <const name="Null" value="0">
811 <desc>Null value (never used by the API).</desc>
812 </const>
813 <const name="PAE" value="1">
814 <desc>
815 This setting determines whether VirtualBox will expose the Physical Address
816 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
817 is not available, it will not be reported.
818 </desc>
819 </const>
820 <const name="Synthetic" value="2">
821 <desc>
822 This setting determines whether VirtualBox will expose a synthetic CPU to the guest to allow
823 teleporting between host systems that differ significantly.
824 </desc>
825 </const>
826 </enum>
827
828
829 <enum
830 name="HWVirtExPropertyType"
831 uuid="ce81dfdd-d2b8-4a90-bbea-40ee8b7ffcee"
832 >
833 <desc>
834 Hardware virtualization property type. This enumeration represents possible values
835 for the <link to="IMachine::getHWVirtExProperty"/> and
836 <link to="IMachine::setHWVirtExProperty"/> methods.
837 </desc>
838 <const name="Null" value="0">
839 <desc>Null value (never used by the API).</desc>
840 </const>
841 <const name="Enabled" value="1">
842 <desc>
843 Whether hardware virtualization (VT-x/AMD-V) is enabled at all. If
844 such extensions are not available, they will not be used.
845 </desc>
846 </const>
847 <const name="Exclusive" value="2">
848 <desc>
849 Whether hardware virtualization is used exclusively by VirtualBox. When enabled,
850 VirtualBox assumes it can acquire full and exclusive access to the VT-x or AMD-V
851 feature of the host. To share these with other hypervisors, you must disable this property.
852 </desc>
853 </const>
854 <const name="VPID" value="3">
855 <desc>
856 Whether VT-x VPID is enabled. If this extension is not available, it will not be used.
857 </desc>
858 </const>
859 <const name="NestedPaging" value="4">
860 <desc>
861 Whether Nested Paging is enabled. If this extension is not available, it will not be used.
862 </desc>
863 </const>
864 </enum>
865
866 <enum
867 name="SessionType"
868 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
869 >
870 <desc>
871 Session type. This enumeration represents possible values of the
872 <link to="ISession::type"/> attribute.
873 </desc>
874
875 <const name="Null" value="0">
876 <desc>Null value (never used by the API).</desc>
877 </const>
878 <const name="Direct" value="1">
879 <desc>
880 Direct session
881 (opened by <link to="IVirtualBox::openSession"/>)
882 </desc>
883 </const>
884 <const name="Remote" value="2">
885 <desc>
886 Remote session
887 (opened by <link to="IVirtualBox::openRemoteSession"/>)
888 </desc>
889 </const>
890 <const name="Existing" value="3">
891 <desc>
892 Existing session
893 (opened by <link to="IVirtualBox::openExistingSession"/>)
894 </desc>
895 </const>
896 </enum>
897
898 <enum
899 name="DeviceType"
900 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
901 >
902 <desc>
903 Device type.
904 </desc>
905 <const name="Null" value="0">
906 <desc>
907 Null value, may also mean "no device" (not allowed for
908 <link to="IConsole::getDeviceActivity"/>).
909 </desc>
910 </const>
911 <const name="Floppy" value="1">
912 <desc>Floppy device.</desc>
913 </const>
914 <const name="DVD" value="2">
915 <desc>CD/DVD-ROM device.</desc>
916 </const>
917 <const name="HardDisk" value="3">
918 <desc>Hard disk device.</desc>
919 </const>
920 <const name="Network" value="4">
921 <desc>Network device.</desc>
922 </const>
923 <const name="USB" value="5">
924 <desc>USB device.</desc>
925 </const>
926 <const name="SharedFolder" value="6">
927 <desc>Shared folder device.</desc>
928 </const>
929 </enum>
930
931 <enum
932 name="DeviceActivity"
933 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
934 >
935 <desc>
936 Device activity for <link to="IConsole::getDeviceActivity"/>.
937 </desc>
938
939 <const name="Null" value="0"/>
940 <const name="Idle" value="1"/>
941 <const name="Reading" value="2"/>
942 <const name="Writing" value="3"/>
943 </enum>
944
945 <enum
946 name="ClipboardMode"
947 uuid="33364716-4008-4701-8f14-be0fa3d62950"
948 >
949 <desc>
950 Host-Guest clipboard interchange mode.
951 </desc>
952
953 <const name="Disabled" value="0"/>
954 <const name="HostToGuest" value="1"/>
955 <const name="GuestToHost" value="2"/>
956 <const name="Bidirectional" value="3"/>
957 </enum>
958
959 <enum
960 name="Scope"
961 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
962 >
963 <desc>
964 Scope of the operation.
965
966 A generic enumeration used in various methods to define the action or
967 argument scope.
968 </desc>
969
970 <const name="Global" value="0"/>
971 <const name="Machine" value="1"/>
972 <const name="Session" value="2"/>
973 </enum>
974
975 <enum
976 name="GuestStatisticType"
977 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
978 >
979 <desc>
980 Statistics type for <link to="IGuest::getStatistic"/>.
981 </desc>
982
983 <const name="CPULoad_Idle" value="0">
984 <desc>
985 Idle CPU load (0-100%) for last interval.
986 </desc>
987 </const>
988 <const name="CPULoad_Kernel" value="1">
989 <desc>
990 Kernel CPU load (0-100%) for last interval.
991 </desc>
992 </const>
993 <const name="CPULoad_User" value="2">
994 <desc>
995 User CPU load (0-100%) for last interval.
996 </desc>
997 </const>
998 <const name="Threads" value="3">
999 <desc>
1000 Total number of threads in the system.
1001 </desc>
1002 </const>
1003 <const name="Processes" value="4">
1004 <desc>
1005 Total number of processes in the system.
1006 </desc>
1007 </const>
1008 <const name="Handles" value="5">
1009 <desc>
1010 Total number of handles in the system.
1011 </desc>
1012 </const>
1013 <const name="MemoryLoad" value="6">
1014 <desc>
1015 Memory load (0-100%).
1016 </desc>
1017 </const>
1018 <const name="PhysMemTotal" value="7">
1019 <desc>
1020 Total physical memory in megabytes.
1021 </desc>
1022 </const>
1023 <const name="PhysMemAvailable" value="8">
1024 <desc>
1025 Free physical memory in megabytes.
1026 </desc>
1027 </const>
1028 <const name="PhysMemBalloon" value="9">
1029 <desc>
1030 Ballooned physical memory in megabytes.
1031 </desc>
1032 </const>
1033 <const name="MemCommitTotal" value="10">
1034 <desc>
1035 Total amount of memory in the committed state in megabytes.
1036 </desc>
1037 </const>
1038 <const name="MemKernelTotal" value="11">
1039 <desc>
1040 Total amount of memory used by the guest OS's kernel in megabytes.
1041 </desc>
1042 </const>
1043 <const name="MemKernelPaged" value="12">
1044 <desc>
1045 Total amount of paged memory used by the guest OS's kernel in megabytes.
1046 </desc>
1047 </const>
1048 <const name="MemKernelNonpaged" value="13">
1049 <desc>
1050 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
1051 </desc>
1052 </const>
1053 <const name="MemSystemCache" value="14">
1054 <desc>
1055 Total amount of memory used by the guest OS's system cache in megabytes.
1056 </desc>
1057 </const>
1058 <const name="PageFileSize" value="15">
1059 <desc>
1060 Pagefile size in megabytes.
1061 </desc>
1062 </const>
1063 <const name="SampleNumber" value="16">
1064 <desc>
1065 Statistics sample number
1066 </desc>
1067 </const>
1068 <const name="MaxVal" value="17"/>
1069 </enum>
1070
1071 <enum
1072 name="BIOSBootMenuMode"
1073 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
1074 >
1075 <desc>
1076 BIOS boot menu mode.
1077 </desc>
1078
1079 <const name="Disabled" value="0"/>
1080 <const name="MenuOnly" value="1"/>
1081 <const name="MessageAndMenu" value="2"/>
1082 </enum>
1083
1084 <enum
1085 name="ProcessorFeature"
1086 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
1087 >
1088 <desc>
1089 CPU features.
1090 </desc>
1091
1092 <const name="HWVirtEx" value="0"/>
1093 <const name="PAE" value="1"/>
1094 <const name="LongMode" value="2"/>
1095 <const name="NestedPaging" value="3"/>
1096 </enum>
1097
1098 <enum
1099 name="FirmwareType"
1100 uuid="7ceea938-8b49-41e2-bb47-667219c0d586"
1101 >
1102 <desc>
1103 Firmware type.
1104 </desc>
1105 <const name="BIOS" value="1">
1106 <desc>BIOS Firmware.</desc>
1107 </const>
1108 <const name="EFI" value="2">
1109 <desc>Efi firmware.</desc>
1110 </const>
1111 </enum>
1112
1113 <!--
1114 // IVirtualBoxErrorInfo
1115 /////////////////////////////////////////////////////////////////////////
1116 -->
1117
1118 <interface
1119 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1120 uuid="4b86d186-407e-4f9e-8be8-e50061be8725"
1121 supportsErrorInfo="no"
1122 wsmap="managed"
1123 >
1124 <desc>
1125 The IVirtualBoxErrorInfo interface represents extended error information.
1126
1127 Extended error information can be set by VirtualBox components after
1128 unsuccessful or partially successful method invocation. This information
1129 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1130 and then shown to the client in addition to the plain 32-bit result code.
1131
1132 In MS COM, this interface extends the IErrorInfo interface,
1133 in XPCOM, it extends the nsIException interface. In both cases,
1134 it provides a set of common attributes to retrieve error
1135 information.
1136
1137 Sometimes invocation of some component's method may involve methods of
1138 other components that may also fail (independently of this method's
1139 failure), or a series of non-fatal errors may precede a fatal error that
1140 causes method failure. In cases like that, it may be desirable to preserve
1141 information about all errors happened during method invocation and deliver
1142 it to the caller. The <link to="#next"/> attribute is intended
1143 specifically for this purpose and allows to represent a chain of errors
1144 through a single IVirtualBoxErrorInfo object set after method invocation.
1145
1146 Note that errors are stored to a chain in the reverse order, i.e. the
1147 initial error object you query right after method invocation is the last
1148 error set by the callee, the object it points to in the @a next attribute
1149 is the previous error and so on, up to the first error (which is the last
1150 in the chain).
1151 </desc>
1152
1153 <attribute name="resultCode" type="long" readonly="yes">
1154 <desc>
1155 Result code of the error.
1156 Usually, it will be the same as the result code returned
1157 by the method that provided this error information, but not
1158 always. For example, on Win32, CoCreateInstance() will most
1159 likely return E_NOINTERFACE upon unsuccessful component
1160 instantiation attempt, but not the value the component factory
1161 returned. Value is typed 'long', not 'result',
1162 to make interface usable from scripting languages.
1163 <note>
1164 In MS COM, there is no equivalent.
1165 In XPCOM, it is the same as nsIException::result.
1166 </note>
1167 </desc>
1168 </attribute>
1169
1170 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1171 <desc>
1172 UUID of the interface that defined the error.
1173 <note>
1174 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1175 data type.
1176 In XPCOM, there is no equivalent.
1177 </note>
1178 </desc>
1179 </attribute>
1180
1181 <attribute name="component" type="wstring" readonly="yes">
1182 <desc>
1183 Name of the component that generated the error.
1184 <note>
1185 In MS COM, it is the same as IErrorInfo::GetSource.
1186 In XPCOM, there is no equivalent.
1187 </note>
1188 </desc>
1189 </attribute>
1190
1191 <attribute name="text" type="wstring" readonly="yes">
1192 <desc>
1193 Text description of the error.
1194 <note>
1195 In MS COM, it is the same as IErrorInfo::GetDescription.
1196 In XPCOM, it is the same as nsIException::message.
1197 </note>
1198 </desc>
1199 </attribute>
1200
1201 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1202 <desc>
1203 Next error object if there is any, or @c null otherwise.
1204 <note>
1205 In MS COM, there is no equivalent.
1206 In XPCOM, it is the same as nsIException::inner.
1207 </note>
1208 </desc>
1209 </attribute>
1210
1211 </interface>
1212
1213 <interface
1214 name="ILocalOwner" extends="$dispatched"
1215 uuid="308FF42A-DC45-49D4-A950-B1EEE5E00BB5" wsmap="suppress"
1216 >
1217 <desc>
1218 The ILocalOwner interface allows to register local objects
1219 (created without COM calls, but with new()).
1220 Once registered, calls to methods of such objects can be made
1221 from remote COM processes.
1222 The main usecase is the event callback implementation where
1223 API clients provide callback objects.
1224 </desc>
1225 <method name="setLocalObject">
1226 <desc>
1227 Set local object.
1228 </desc>
1229 <param name="object" type="$unknown" dir="in">
1230 <desc>Local object to forward requests to.
1231 If null, clears currently set local object.</desc>
1232 </param>
1233 </method>
1234 </interface>
1235
1236 <!--
1237 // IVirtualBox
1238 /////////////////////////////////////////////////////////////////////////
1239 -->
1240
1241 <interface
1242 name="IVirtualBoxCallback" extends="$unknown"
1243 uuid="9a65adf2-3ee6-406b-bca2-2b1fa05f0d0b"
1244 wsmap="suppress"
1245 >
1246
1247 <method name="onMachineStateChange">
1248 <desc>
1249 The execution state of the given machine has changed.
1250 <see>IMachine::state</see>
1251 </desc>
1252 <param name="machineId" type="uuid" mod="string" dir="in">
1253 <desc>ID of the machine this event relates to.</desc>
1254 </param>
1255 <param name="state" type="MachineState" dir="in">
1256 <desc>New execution state.</desc>
1257 </param>
1258 </method>
1259
1260 <method name="onMachineDataChange">
1261 <desc>
1262 Any of the settings of the given machine has changed.
1263 </desc>
1264 <param name="machineId" type="uuid" mod="string" dir="in">
1265 <desc>ID of the machine this event relates to.</desc>
1266 </param>
1267 </method>
1268
1269 <method name="onExtraDataCanChange">
1270 <desc>
1271 Notification when someone tries to change extra data for
1272 either the given machine or (if @c null) global extra data.
1273 This gives the chance to veto against changes.
1274 </desc>
1275 <param name="machineId" type="uuid" mod="string" dir="in">
1276 <desc>
1277 ID of the machine this event relates to
1278 (@c null ID for global extra data change requests).
1279 </desc>
1280 </param>
1281 <param name="key" type="wstring" dir="in">
1282 <desc>
1283 Extra data key for the attempted write.
1284 </desc>
1285 </param>
1286 <param name="value" type="wstring" dir="in">
1287 <desc>
1288 Extra data value for the given key.
1289 </desc>
1290 </param>
1291 <param name="error" type="wstring" dir="out">
1292 <desc>
1293 Optional error message describing the reason of the
1294 veto (ignored if this notification returns @c true).
1295 </desc>
1296 </param>
1297 <param name="allowChange" type="boolean" dir="return">
1298 <desc>
1299 Flag to indicate whether the callee agrees (@c true)
1300 or vetoes against the change (@c false).
1301 </desc>
1302 </param>
1303 </method>
1304
1305 <method name="onExtraDataChange">
1306 <desc>
1307 Notification when machine specific or global extra data
1308 has changed.
1309 </desc>
1310 <param name="machineId" type="uuid" mod="string" dir="in">
1311 <desc>
1312 ID of the machine this event relates to.
1313 Null for global extra data changes.
1314 </desc>
1315 </param>
1316 <param name="key" type="wstring" dir="in">
1317 <desc>
1318 Extra data key that has changed.
1319 </desc>
1320 </param>
1321 <param name="value" type="wstring" dir="in">
1322 <desc>
1323 Extra data value for the given key.
1324 </desc>
1325 </param>
1326 </method>
1327
1328 <method name="onMediumRegistered">
1329 <desc>
1330 The given medium was registered or unregistered
1331 within this VirtualBox installation.
1332
1333 The @a mediumType parameter describes what type of
1334 medium the specified @a mediumId refers to. Possible
1335 values are:
1336
1337 <ul>
1338 <li><link to="DeviceType_HardDisk"/>: the medium is a hard disk
1339 that, if registered, can be obtained using the
1340 <link to="IVirtualBox::getHardDisk"/> call.</li>
1341 <li><link to="DeviceType_DVD"/>: the medium is a CD/DVD image
1342 that, if registered, can be obtained using the
1343 <link to="IVirtualBox::getDVDImage"/> call.</li>
1344 <li><link to="DeviceType_Floppy"/>: the medium is a Floppy image
1345 that, if registered, can be obtained using the
1346 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1347 </ul>
1348
1349 Note that if this is a deregistration notification,
1350 there is no way to access the object representing the
1351 unregistered medium. It is supposed that the
1352 application will do required cleanup based on the
1353 @a mediumId value.
1354 </desc>
1355 <param name="mediumId" type="uuid" mod="string" dir="in">
1356 <desc>ID of the medium this event relates to.</desc>
1357 </param>
1358 <param name="mediumType" type="DeviceType" dir="in">
1359 <desc>Type of the medium this event relates to.</desc>
1360 </param>
1361 <param name="registered" type="boolean" dir="in">
1362 <desc>
1363 If @c true, the medium was registered, otherwise it was
1364 unregistered.
1365 </desc>
1366 </param>
1367 </method>
1368
1369 <method name="onMachineRegistered">
1370 <desc>
1371 The given machine was registered or unregistered
1372 within this VirtualBox installation.
1373 </desc>
1374 <param name="machineId" type="uuid" mod="string" dir="in">
1375 <desc>ID of the machine this event relates to.</desc>
1376 </param>
1377 <param name="registered" type="boolean" dir="in">
1378 <desc>
1379 If @c true, the machine was registered, otherwise it was
1380 unregistered.
1381 </desc>
1382 </param>
1383 </method>
1384
1385 <method name="onSessionStateChange">
1386 <desc>
1387 The state of the session for the given machine was changed.
1388 <see>IMachine::sessionState</see>
1389 </desc>
1390 <param name="machineId" type="uuid" mod="string" dir="in">
1391 <desc>ID of the machine this event relates to.</desc>
1392 </param>
1393 <param name="state" type="SessionState" dir="in">
1394 <desc>New session state.</desc>
1395 </param>
1396 </method>
1397
1398 <method name="onSnapshotTaken">
1399 <desc>
1400 A new snapshot of the machine has been taken.
1401 <see>ISnapshot</see>
1402 </desc>
1403 <param name="machineId" type="uuid" mod="string" dir="in">
1404 <desc>ID of the machine this event relates to.</desc>
1405 </param>
1406 <param name="snapshotId" type="uuid" mod="string" dir="in">
1407 <desc>ID of the new snapshot.</desc>
1408 </param>
1409 </method>
1410
1411 <method name="onSnapshotDiscarded">
1412 <desc>
1413 Snapshot of the given machine has been discarded.
1414
1415 <note>
1416 This notification is delivered <b>after</b> the snapshot
1417 object has been uninitialized on the server (so that any
1418 attempt to call its methods will return an error).
1419 </note>
1420
1421 <see>ISnapshot</see>
1422 </desc>
1423 <param name="machineId" type="uuid" mod="string" dir="in">
1424 <desc>ID of the machine this event relates to.</desc>
1425 </param>
1426 <param name="snapshotId" type="uuid" mod="string" dir="in">
1427 <desc>
1428 ID of the discarded snapshot. @c null means the current machine
1429 state has been discarded (restored from the current snapshot).
1430 </desc>
1431 </param>
1432 </method>
1433
1434 <method name="onSnapshotChange">
1435 <desc>
1436 Snapshot properties (name and/or description) have been changed.
1437 <see>ISnapshot</see>
1438 </desc>
1439 <param name="machineId" type="uuid" mod="string" dir="in">
1440 <desc>ID of the machine this event relates to.</desc>
1441 </param>
1442 <param name="snapshotId" type="uuid" mod="string" dir="in">
1443 <desc>ID of the changed snapshot.</desc>
1444 </param>
1445 </method>
1446
1447 <method name="onGuestPropertyChange">
1448 <desc>
1449 Notification when a guest property has changed.
1450 </desc>
1451 <param name="machineId" type="uuid" mod="string" dir="in">
1452 <desc>
1453 ID of the machine this event relates to.
1454 </desc>
1455 </param>
1456 <param name="name" type="wstring" dir="in">
1457 <desc>
1458 The name of the property that has changed.
1459 </desc>
1460 </param>
1461 <param name="value" type="wstring" dir="in">
1462 <desc>
1463 The new property value.
1464 </desc>
1465 </param>
1466 <param name="flags" type="wstring" dir="in">
1467 <desc>
1468 The new property flags.
1469 </desc>
1470 </param>
1471 </method>
1472
1473 </interface>
1474
1475 <interface
1476 name="IDHCPServer" extends="$unknown"
1477 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1478 wsmap="managed"
1479 >
1480 <desc>
1481 The IDHCPServer interface represents the vbox dhcp server configuration.
1482
1483 To enumerate all the dhcp servers on the host, use the
1484 <link to="IVirtualBox::DHCPServers"/> attribute.
1485 </desc>
1486
1487 <attribute name="enabled" type="boolean">
1488 <desc>
1489 specifies if the dhcp server is enabled
1490 </desc>
1491 </attribute>
1492
1493 <attribute name="IPAddress" type="wstring" readonly="yes">
1494 <desc>
1495 specifies server IP
1496 </desc>
1497 </attribute>
1498
1499 <attribute name="networkMask" type="wstring" readonly="yes">
1500 <desc>
1501 specifies server network mask
1502 </desc>
1503 </attribute>
1504
1505 <attribute name="networkName" type="wstring" readonly="yes">
1506 <desc>
1507 specifies internal network name the server is used for
1508 </desc>
1509 </attribute>
1510
1511 <attribute name="lowerIP" type="wstring" readonly="yes">
1512 <desc>
1513 specifies from IP adrres in server address range
1514 </desc>
1515 </attribute>
1516
1517 <attribute name="upperIP" type="wstring" readonly="yes">
1518 <desc>
1519 specifies to IP adrres in server address range
1520 </desc>
1521 </attribute>
1522
1523 <method name="setConfiguration">
1524 <desc>
1525 configures the server
1526 <result name="E_INVALIDARG">
1527 invalid configuration supplied
1528 </result>
1529 </desc>
1530 <param name="IPAddress" type="wstring" dir="in">
1531 <desc>
1532 server IP address
1533 </desc>
1534 </param>
1535 <param name="networkMask" type="wstring" dir="in">
1536 <desc>
1537 server network mask
1538 </desc>
1539 </param>
1540 <param name="FromIPAddress" type="wstring" dir="in">
1541 <desc>
1542 server From IP address for address range
1543 </desc>
1544 </param>
1545 <param name="ToIPAddress" type="wstring" dir="in">
1546 <desc>
1547 server To IP address for address range
1548 </desc>
1549 </param>
1550 </method>
1551
1552 <method name="start">
1553 <desc>
1554 Starts DHCP server process.
1555 <result name="E_FAIL">
1556 Failed to start the process.
1557 </result>
1558 </desc>
1559 <param name="networkName" type="wstring" dir="in">
1560 <desc>
1561 Name of internal network DHCP server should attach to.
1562 </desc>
1563 </param>
1564 <param name="trunkName" type="wstring" dir="in">
1565 <desc>
1566 Name of internal network trunk.
1567 </desc>
1568 </param>
1569 <param name="trunkType" type="wstring" dir="in">
1570 <desc>
1571 Type of internal network trunk.
1572 </desc>
1573 </param>
1574 </method>
1575
1576 <method name="stop">
1577 <desc>
1578 Stops DHCP server process.
1579 <result name="E_FAIL">
1580 Failed to stop the process.
1581 </result>
1582 </desc>
1583 </method>
1584 </interface>
1585
1586 <interface
1587 name="IVirtualBox" extends="$dispatched"
1588 uuid="c1b8d85d-8f44-4314-94fc-072332bdf852"
1589 wsmap="managed"
1590 >
1591 <desc>
1592 The IVirtualBox interface represents the main interface exposed by the
1593 product that provides virtual machine management.
1594
1595 An instance of IVirtualBox is required for the product to do anything
1596 useful. Even though the interface does not expose this, internally,
1597 IVirtualBox is implemented as a singleton and actually lives in the
1598 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1599 IVirtualBox can track the state of all virtual machines on a particular
1600 host, regardless of which frontend started them.
1601
1602 To enumerate all the virtual machines on the host, use the
1603 <link to="IVirtualBox::machines"/> attribute.
1604 </desc>
1605
1606 <attribute name="version" type="wstring" readonly="yes">
1607 <desc>
1608 A string representing the version number of the product. The
1609 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1610 last number represents the build number and will frequently change.
1611 </desc>
1612 </attribute>
1613
1614 <attribute name="revision" type="unsigned long" readonly="yes">
1615 <desc>
1616 The internal build revision number of the product.
1617 </desc>
1618 </attribute>
1619
1620 <attribute name="packageType" type="wstring" readonly="yes">
1621 <desc>
1622 A string representing the package type of this product. The
1623 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1624 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1625 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1626 this.
1627 </desc>
1628 </attribute>
1629
1630 <attribute name="homeFolder" type="wstring" readonly="yes">
1631 <desc>
1632 Full path to the directory where the global settings file,
1633 <tt>VirtualBox.xml</tt>, is stored.
1634
1635 In this version of VirtualBox, the value of this property is
1636 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1637 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1638 as determined by the host OS), and cannot be changed.
1639
1640 This path is also used as the base to resolve relative paths in
1641 places where relative paths are allowed (unless otherwise
1642 expressly indicated).
1643 </desc>
1644 </attribute>
1645
1646 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1647 <desc>
1648 Full name of the global settings file.
1649 The value of this property corresponds to the value of
1650 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1651 </desc>
1652 </attribute>
1653
1654 <attribute name="host" type="IHost" readonly="yes">
1655 <desc>Associated host object.</desc>
1656 </attribute>
1657
1658 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1659 <desc>Associated system information object.</desc>
1660 </attribute>
1661
1662 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1663 <desc>
1664 Array of machine objects registered within this VirtualBox instance.
1665 </desc>
1666 </attribute>
1667
1668 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1669 <desc>
1670 Array of medium objects known to this VirtualBox installation.
1671
1672 This array contains only base media. All differencing
1673 media of the given base medium can be enumerated using
1674 <link to="IMedium::children"/>.
1675 </desc>
1676 </attribute>
1677
1678 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1679 <desc>
1680 Array of CD/DVD image objects registered with this VirtualBox instance.
1681 </desc>
1682 </attribute>
1683
1684 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1685 <desc>
1686 Array of floppy image objects registered with this VirtualBox instance.
1687 </desc>
1688 </attribute>
1689
1690 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1691
1692 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1693
1694 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1695 <desc>
1696 Collection of global shared folders. Global shared folders are
1697 available to all virtual machines.
1698
1699 New shared folders are added to the collection using
1700 <link to="#createSharedFolder"/>. Existing shared folders can be
1701 removed using <link to="#removeSharedFolder"/>.
1702
1703 <note>
1704 In the current version of the product, global shared folders are not
1705 implemented and therefore this collection is always empty.
1706 </note>
1707 </desc>
1708 </attribute>
1709
1710 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1711 <desc>
1712 Associated performance collector object.
1713 </desc>
1714 </attribute>
1715
1716 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1717 <desc>
1718 dhcp server settings.
1719 </desc>
1720 </attribute>
1721
1722 <method name="createMachine">
1723 <desc>
1724 Creates a new virtual machine.
1725
1726 The new machine is created unregistered, with the initial configuration
1727 set according to the specified guest OS type. A typical sequence of
1728 actions to create a new virtual machine is as follows:
1729
1730 <ol>
1731 <li>
1732 Call this method to have a new machine created. The returned machine
1733 object will be "mutable" allowing to change any machine property.
1734 </li>
1735
1736 <li>
1737 Configure the machine using the appropriate attributes and methods.
1738 </li>
1739
1740 <li>
1741 Call <link to="IMachine::saveSettings" /> to write the settings
1742 to the machine's XML settings file. The configuration of the newly
1743 created machine will not be saved to disk until this method is
1744 called.
1745 </li>
1746
1747 <li>
1748 Call <link to="#registerMachine" /> to add the machine to the list
1749 of machines known to VirtualBox.
1750 </li>
1751 </ol>
1752
1753 You should specify valid name for the newly created machine when calling
1754 this method. See the <link to="IMachine::name"/> attribute description
1755 for more details about the machine name.
1756
1757 The specified guest OS type identifier must match an ID of one of known
1758 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1759 array.
1760
1761 Every machine has a <i>settings file</i> that is used to store
1762 the machine configuration. This file is stored in a directory called the
1763 <i>machine settings subfolder</i>. Both the settings subfolder and file
1764 will have a name that corresponds to the name of the virtual machine.
1765 You can specify where to create the machine setting subfolder using the
1766 @a baseFolder argument. The base folder can be absolute (full path) or
1767 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1768 directory</link>.
1769
1770 If @a baseFolder is a @c null or empty string (which is recommended), the
1771 <link to="ISystemProperties::defaultMachineFolder">default machine
1772 settings folder</link> will be used as a base folder for the created
1773 machine. Otherwise the given base folder will be used. In either case,
1774 the full path to the resulting settings file has the following
1775 structure:
1776 <pre>
1777 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1778 </pre>
1779
1780 Note that if the resulting settings file already exists, this method
1781 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1782
1783 Optionally, you may specify an UUID of to assign to the created machine.
1784 However, this is not recommended and you should normally pass an empty
1785 (@c null) UUID to this method so that a new UUID will be automatically
1786 generated for every created machine. You can use UUID
1787 00000000-0000-0000-0000-000000000000 as @c null value.
1788
1789 <note>
1790 There is no way to change the name of the settings file or
1791 subfolder of the created machine directly.
1792 </note>
1793
1794 <result name="VBOX_E_OBJECT_NOT_FOUND">
1795 @a osTypeId is invalid.
1796 </result>
1797 <result name="VBOX_E_FILE_ERROR">
1798 Resulting settings file name is invalid or the settings file already
1799 exists or could not be created due to an I/O error.
1800 </result>
1801 <result name="E_INVALIDARG">
1802 @a name is empty or @c null.
1803 </result>
1804 </desc>
1805
1806 <param name="name" type="wstring" dir="in">
1807 <desc>Machine name.</desc>
1808 </param>
1809 <param name="osTypeId" type="wstring" dir="in">
1810 <desc>Guest OS Type ID.</desc>
1811 </param>
1812 <param name="baseFolder" type="wstring" dir="in">
1813 <desc>Base machine folder (optional).</desc>
1814 </param>
1815 <param name="id" type="uuid" mod="string" dir="in">
1816 <desc>Machine UUID (optional).</desc>
1817 </param>
1818 <param name="machine" type="IMachine" dir="return">
1819 <desc>Created machine object.</desc>
1820 </param>
1821 </method>
1822
1823 <method name="createLegacyMachine">
1824 <desc>
1825 Creates a new virtual machine in "legacy" mode, using the specified
1826 settings file to store machine settings.
1827
1828 As opposed to machines created by <link to="#createMachine"/>,
1829 the settings file of the machine created in "legacy" mode is not
1830 automatically renamed when the machine name is changed -- it will always
1831 remain the same as specified in this method call.
1832
1833 The specified settings file name can be absolute (full path) or relative
1834 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1835 directory</link>. If the file name doesn't contain an extension, the
1836 default extension (.xml) will be appended.
1837
1838 Note that the configuration of the newly created machine is not
1839 saved to disk (and therefore no settings file is created)
1840 until <link to="IMachine::saveSettings"/> is called. If the
1841 specified settings file already exists, this method
1842 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1843
1844 See <link to="#createMachine"/> for more information.
1845
1846 @deprecated This method may be removed later. Use <link
1847 to="IVirtualBox::createMachine"/> instead.
1848
1849 <note>
1850 There is no way to change the name of the settings file
1851 of the machine created in "legacy" mode.
1852 </note>
1853
1854 <result name="VBOX_E_OBJECT_NOT_FOUND">
1855 @a osTypeId is invalid.
1856 </result>
1857 <result name="VBOX_E_FILE_ERROR">
1858 @a settingsFile is invalid or the settings file already exists or
1859 could not be created due to an I/O error.
1860 </result>
1861 <result name="E_INVALIDARG">
1862 @a name or @a settingsFile is empty or @c null.
1863 </result>
1864 </desc>
1865
1866 <param name="name" type="wstring" dir="in">
1867 <desc>Machine name.</desc>
1868 </param>
1869 <param name="osTypeId" type="wstring" dir="in">
1870 <desc>Machine OS Type ID.</desc>
1871 </param>
1872 <param name="settingsFile" type="wstring" dir="in">
1873 <desc>Name of the machine settings file.</desc>
1874 </param>
1875 <param name="id" type="uuid" mod="string" dir="in">
1876 <desc>Machine UUID (optional).</desc>
1877 </param>
1878 <param name="machine" type="IMachine" dir="return">
1879 <desc>Created machine object.</desc>
1880 </param>
1881 </method>
1882
1883 <method name="openMachine">
1884 <desc>
1885 Opens a virtual machine from the existing settings file.
1886 The opened machine remains unregistered until you call
1887 <link to="#registerMachine"/>.
1888
1889 The specified settings file name can be absolute
1890 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1891 VirtualBox home directory</link>. This file must exist
1892 and must be a valid machine settings file whose contents
1893 will be used to construct the machine object.
1894
1895 @deprecated Will be removed soon.
1896 <result name="VBOX_E_FILE_ERROR">
1897 Settings file name invalid, not found or sharing violation.
1898 </result>
1899 </desc>
1900 <param name="settingsFile" type="wstring" dir="in">
1901 <desc>
1902 Name of the machine settings file.
1903 </desc>
1904 </param>
1905 <param name="machine" type="IMachine" dir="return">
1906 <desc>Opened machine object.</desc>
1907 </param>
1908 <note>
1909 <link to="IMachine::settingsModified"/> will return
1910 @c false for the created machine, until any of machine settings
1911 are changed.
1912 </note>
1913 </method>
1914
1915 <method name="registerMachine">
1916 <desc>
1917
1918 Registers the machine previously created using
1919 <link to="#createMachine"/> or opened using
1920 <link to="#openMachine"/> within this VirtualBox installation. After
1921 successful method invocation, the
1922 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1923 to all registered callbacks.
1924
1925 <note>
1926 This method implicitly calls <link to="IMachine::saveSettings"/>
1927 to save all current machine settings before registering it.
1928 </note>
1929
1930 <result name="VBOX_E_OBJECT_NOT_FOUND">
1931 No matching virtual machine found.
1932 </result>
1933 <result name="VBOX_E_INVALID_OBJECT_STATE">
1934 Virtual machine was not created within this VirtualBox instance.
1935 </result>
1936
1937 </desc>
1938 <param name="machine" type="IMachine" dir="in"/>
1939 </method>
1940
1941 <method name="getMachine">
1942 <desc>
1943 Attempts to find a virtual machine given its UUID.
1944 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1945 instead.
1946
1947 <result name="VBOX_E_OBJECT_NOT_FOUND">
1948 Could not find registered machine matching @a id.
1949 </result>
1950
1951 </desc>
1952 <param name="id" type="uuid" mod="string" dir="in"/>
1953 <param name="machine" type="IMachine" dir="return"/>
1954 </method>
1955
1956 <method name="findMachine">
1957 <desc>
1958 Attempts to find a virtual machine given its name.
1959 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1960 instead.
1961
1962 <result name="VBOX_E_OBJECT_NOT_FOUND">
1963 Could not find registered machine matching @a name.
1964 </result>
1965
1966 </desc>
1967 <param name="name" type="wstring" dir="in"/>
1968 <param name="machine" type="IMachine" dir="return"/>
1969 </method>
1970
1971 <method name="unregisterMachine">
1972 <desc>
1973
1974 Unregisters the machine previously registered using
1975 <link to="#registerMachine"/>. After successful method invocation, the
1976 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1977 to all registered callbacks.
1978
1979 <note>
1980 The specified machine must not be in the Saved state, have an open
1981 (or a spawning) direct session associated with it, have snapshots or
1982 have any medium attached.
1983 </note>
1984
1985 <note>
1986 This method implicitly calls <link to="IMachine::saveSettings"/> to
1987 save all current machine settings before unregistering it.
1988 </note>
1989
1990 <note>
1991 If the given machine is inaccessible (see
1992 <link to="IMachine::accessible"/>), it will be unregistered and
1993 fully uninitialized right afterwards. As a result, the returned
1994 machine object will be unusable and an attempt to call
1995 <b>any</b> method will return the "Object not ready" error.
1996 </note>
1997
1998 <result name="VBOX_E_OBJECT_NOT_FOUND">
1999 Could not find registered machine matching @a id.
2000 </result>
2001 <result name="VBOX_E_INVALID_VM_STATE">
2002 Machine is in Saved state.
2003 </result>
2004 <result name="VBOX_E_INVALID_OBJECT_STATE">
2005 Machine has snapshot or open session or medium attached.
2006 </result>
2007
2008 </desc>
2009 <param name="id" type="uuid" mod="string" dir="in">
2010 <desc>UUID of the machine to unregister.</desc>
2011 </param>
2012 <param name="machine" type="IMachine" dir="return">
2013 <desc>Unregistered machine object.</desc>
2014 </param>
2015 </method>
2016
2017 <method name="createAppliance">
2018 <desc>
2019 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
2020 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
2021 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
2022 </desc>
2023 <param name="appliance" type="IAppliance" dir="return">
2024 <desc>New appliance.</desc>
2025 </param>
2026 </method>
2027
2028 <method name="createHardDisk">
2029 <desc>
2030 Creates a new base medium object that will use the given storage
2031 format and location for medium data.
2032
2033 Note that the actual storage unit is not created by this method. In
2034 order to do it, and before you are able to attach the created medium
2035 to virtual machines, you must call one of the following methods to
2036 allocate a format-specific storage unit at the specified location:
2037 <ul>
2038 <li><link to="IMedium::createBaseStorage"/></li>
2039 <li><link to="IMedium::createDiffStorage"/></li>
2040 </ul>
2041
2042 Some medium attributes, such as <link to="IMedium::id"/>, may
2043 remain uninitialized until the medium storage unit is successfully
2044 created by one of the above methods.
2045
2046 After the storage unit is successfully created, the medium gets
2047 remembered by this VirtualBox installation and will be accessible
2048 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
2049 methods. Remembered base medium are also returned as part of
2050 the <link to="#hardDisks"/> array. See IMedium for more details.
2051
2052 The list of all storage formats supported by this VirtualBox
2053 installation can be obtained using
2054 <link to="ISystemProperties::mediumFormats"/>. If the @a format
2055 attribute is empty or @c null then the default storage format
2056 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
2057 be used for creating a storage unit of the medium.
2058
2059 Note that the format of the location string is storage format specific.
2060 See <link to="IMedium::location"/>, IMedium and
2061 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2062
2063 <result name="VBOX_E_OBJECT_NOT_FOUND">
2064 @a format identifier is invalid. See
2065 <link to="ISystemProperties::mediumFormats"/>.
2066 </result>
2067 <result name="VBOX_E_FILE_ERROR">
2068 @a location is a not valid file name (for file-based formats only).
2069 </result>
2070 </desc>
2071 <param name="format" type="wstring" dir="in">
2072 <desc>
2073 Identifier of the storage format to use for the new medium.
2074 </desc>
2075 </param>
2076 <param name="location" type="wstring" dir="in">
2077 <desc>
2078 Location of the storage unit for the new medium.
2079 </desc>
2080 </param>
2081 <param name="medium" type="IMedium" dir="return">
2082 <desc>Created medium object.</desc>
2083 </param>
2084 </method>
2085
2086 <method name="openHardDisk">
2087 <desc>
2088 Opens a medium from an existing location, optionally replacing
2089 the image UUID and/or parent UUID.
2090
2091 After the medium is successfully opened by this method, it gets
2092 remembered by (known to) this VirtualBox installation and will be
2093 accessible through <link to="#getHardDisk"/> and
2094 <link to="#findHardDisk"/> methods. Remembered base media
2095 are also returned as part of the <link to="#hardDisks"/> array and can
2096 be attached to virtual machines. See IMedium for more details.
2097
2098 If a differencing medium is to be opened by this method, the
2099 operation will succeed only if its parent medium and all ancestors,
2100 if any, are already known to this VirtualBox installation (for example,
2101 were opened by this method before).
2102
2103 This method tries to guess the storage format of the specified medium
2104 by reading medium data at the specified location.
2105
2106 If @a write is ReadWrite (which it should be), the image is opened for
2107 read/write access and must have according permissions, as VirtualBox
2108 may actually write status information into the disk's metadata sections.
2109
2110 Note that write access is required for all typical image usage in VirtualBox,
2111 since VirtualBox may need to write metadata such as a UUID into the image.
2112 The only exception is opening a source image temporarily for copying and
2113 cloning when the image will quickly be closed again.
2114
2115 Note that the format of the location string is storage format specific.
2116 See <link to="IMedium::location"/>, IMedium and
2117 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2118
2119 <result name="VBOX_E_FILE_ERROR">
2120 Invalid medium storage file location or could not find the medium
2121 at the specified location.
2122 </result>
2123 <result name="VBOX_E_IPRT_ERROR">
2124 Could not get medium storage format.
2125 </result>
2126 <result name="E_INVALIDARG">
2127 Invalid medium storage format.
2128 </result>
2129
2130 </desc>
2131 <param name="location" type="wstring" dir="in">
2132 <desc>
2133 Location of the storage unit that contains medium data in one of
2134 the supported storage formats.
2135 </desc>
2136 </param>
2137 <param name="accessMode" type="AccessMode" dir="in">
2138 <desc>
2139 Determines whether to open the image in read/write or read-only mode.
2140 </desc>
2141 </param>
2142 <param name="setImageId" type="boolean" dir="in">
2143 <desc>
2144 Select whether a new image UUID is set or not.
2145 </desc>
2146 </param>
2147 <param name="imageId" type="uuid" mod="string" dir="in">
2148 <desc>
2149 New UUID for the image. If an empty string is passed, then a new
2150 UUID is automatically created. Specifying a zero UUIDs is not valid.
2151 </desc>
2152 </param>
2153 <param name="setParentId" type="boolean" dir="in">
2154 <desc>
2155 Select whether a new parent UUID is set or not.
2156 </desc>
2157 </param>
2158 <param name="parentId" type="uuid" mod="string" dir="in">
2159 <desc>
2160 New parent UUID for the image. If an empty string is passed, then a
2161 new UUID is automatically created, provided @a setParentId is
2162 @c true. A zero UUID is valid.
2163 </desc>
2164 </param>
2165 <param name="medium" type="IMedium" dir="return">
2166 <desc>Opened medium object.</desc>
2167 </param>
2168 </method>
2169
2170 <method name="getHardDisk" const="yes">
2171 <desc>
2172 Returns a medium with the given UUID.
2173
2174 The medium with the given UUID must be known to this VirtualBox
2175 installation, i.e. it must be previously created by
2176 <link to="#createHardDisk"/> or opened by <link
2177 to="#openHardDisk"/>, or attached to some known virtual machine.
2178
2179 <result name="VBOX_E_OBJECT_NOT_FOUND">
2180 No medium object matching @a id found.
2181 </result>
2182
2183 </desc>
2184 <param name="id" type="uuid" mod="string" dir="in">
2185 <desc>UUID of the medium to look for.</desc>
2186 </param>
2187 <param name="medium" type="IMedium" dir="return">
2188 <desc>Found medium object.</desc>
2189 </param>
2190 </method>
2191
2192 <method name="findHardDisk">
2193 <desc>
2194 Returns a medium that uses the given location to store medium data.
2195
2196 The given medium must be known to this VirtualBox installation, i.e.
2197 it must be previously created by
2198 <link to="#createHardDisk"/> or opened by <link
2199 to="#openHardDisk"/>, or attached to some known virtual machine.
2200
2201 The search is done by comparing the value of the @a location argument to
2202 the <link to="IMedium::location"/> attribute of each known medium.
2203
2204 For locations represented by file names in the host's file system, the
2205 requested location can be a path relative to the
2206 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2207 only a file name without any path is given, the
2208 <link to="ISystemProperties::defaultHardDiskFolder"> default medium
2209 folder</link> will be prepended to the file name before searching. Note
2210 that on case sensitive file systems, a case sensitive comparison is
2211 performed, otherwise the case of symbols in the file path is ignored.
2212
2213 <result name="VBOX_E_OBJECT_NOT_FOUND">
2214 No medium object matching @a location found.
2215 </result>
2216
2217 </desc>
2218 <param name="location" type="wstring" dir="in">
2219 <desc>Location string to search for.</desc>
2220 </param>
2221 <param name="medium" type="IMedium" dir="return">
2222 <desc>Found medium object.</desc>
2223 </param>
2224 </method>
2225
2226 <method name="openDVDImage">
2227 <desc>
2228 Opens a CD/DVD image contained in the specified file of the supported
2229 format and assigns it the given UUID.
2230
2231 After the image is successfully opened by this method, it gets
2232 remembered by (known to) this VirtualBox installation and will be
2233 accessible through <link to="#getDVDImage"/> and
2234 <link to="#findDVDImage"/> methods. Remembered images are also
2235 returned as part of the <link to="#DVDImages"/> array and can be mounted
2236 to virtual machines. See IMedium for more details.
2237
2238 See <link to="IMedium::location"/> to get more details about the format
2239 of the location string.
2240
2241 <note>
2242 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2243 </note>
2244
2245 <result name="VBOX_E_FILE_ERROR">
2246 Invalid CD/DVD image file location or could not find the CD/DVD
2247 image at the specified location.
2248 </result>
2249 <result name="VBOX_E_INVALID_OBJECT_STATE">
2250 CD/DVD image already exists in the media registry.
2251 </result>
2252
2253 </desc>
2254 <param name="location" type="wstring" dir="in">
2255 <desc>
2256 Full path to the file that contains a valid CD/DVD image.
2257 </desc>
2258 </param>
2259 <param name="id" type="uuid" mod="string" dir="in">
2260 <desc>
2261 UUID to assign to the given image within this VirtualBox installation.
2262 If an empty (@c null) UUID is specified, the system will randomly
2263 generate a new UUID.
2264 </desc>
2265 </param>
2266 <param name="image" type="IMedium" dir="return">
2267 <desc>Opened CD/DVD image object.</desc>
2268 </param>
2269 </method>
2270
2271 <method name="getDVDImage">
2272 <desc>
2273 Returns a CD/DVD image with the given UUID.
2274
2275 The image with the given UUID must be known to this VirtualBox
2276 installation, i.e. it must be previously opened by <link
2277 to="#openDVDImage"/>, or mounted to some known virtual machine.
2278
2279 <result name="VBOX_E_OBJECT_NOT_FOUND">
2280 No matching DVD image found in the media registry.
2281 </result>
2282
2283 </desc>
2284 <param name="id" type="uuid" mod="string" dir="in">
2285 <desc>UUID of the image to look for.</desc>
2286 </param>
2287 <param name="image" type="IMedium" dir="return">
2288 <desc>Found CD/DVD image object.</desc>
2289 </param>
2290 </method>
2291
2292 <method name="findDVDImage">
2293 <desc>
2294 Returns a CD/DVD image with the given image location.
2295
2296 The image with the given UUID must be known to this VirtualBox
2297 installation, i.e. it must be previously opened by <link
2298 to="#openDVDImage"/>, or mounted to some known virtual machine.
2299
2300 The search is done by comparing the value of the @a location argument to
2301 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2302
2303 The requested location can be a path relative to the
2304 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2305 only a file name without any path is given, the
2306 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2307 folder</link> will be prepended to the file name before searching. Note
2308 that on case sensitive file systems, a case sensitive comparison is
2309 performed, otherwise the case in the file path is ignored.
2310
2311 <result name="VBOX_E_FILE_ERROR">
2312 Invalid image file location.
2313 </result>
2314 <result name="VBOX_E_OBJECT_NOT_FOUND">
2315 No matching DVD image found in the media registry.
2316 </result>
2317
2318 </desc>
2319 <param name="location" type="wstring" dir="in">
2320 <desc>CD/DVD image file path to look for.</desc>
2321 </param>
2322 <param name="image" type="IMedium" dir="return">
2323 <desc>Found CD/DVD image object.</desc>
2324 </param>
2325 </method>
2326
2327 <method name="openFloppyImage">
2328 <desc>
2329 Opens a floppy image contained in the specified file of the supported
2330 format and assigns it the given UUID.
2331
2332 After the image is successfully opened by this method, it gets
2333 remembered by (known to) this VirtualBox installation and will be
2334 accessible through <link to="#getFloppyImage"/> and
2335 <link to="#findFloppyImage"/> methods. Remembered images are also
2336 returned as part of the <link to="#floppyImages"/> array and can be
2337 mounted to virtual machines. See IMedium for more details.
2338
2339 See <link to="IMedium::location"/> to get more details about the format
2340 of the location string.
2341
2342 <result name="VBOX_E_FILE_ERROR">
2343 Invalid floppy image file location or could not find the floppy
2344 image at the specified location.
2345 </result>
2346 <result name="VBOX_E_INVALID_OBJECT_STATE">
2347 Floppy image already exists in the media registry.
2348 </result>
2349
2350 <note>
2351 Currently, only raw floppy images are supported by VirtualBox.
2352 </note>
2353 </desc>
2354 <param name="location" type="wstring" dir="in">
2355 <desc>
2356 Full path to the file that contains a valid floppy image.
2357 </desc>
2358 </param>
2359 <param name="id" type="uuid" mod="string" dir="in">
2360 <desc>
2361 UUID to assign to the given image file within this VirtualBox
2362 installation. If an empty (@c null) UUID is specified, the system will
2363 randomly generate a new UUID.
2364 </desc>
2365 </param>
2366 <param name="image" type="IMedium" dir="return">
2367 <desc>Opened floppy image object.</desc>
2368 </param>
2369 </method>
2370
2371 <method name="getFloppyImage">
2372 <desc>
2373 Returns a floppy image with the given UUID.
2374
2375 The image with the given UUID must be known to this VirtualBox
2376 installation, i.e. it must be previously opened by <link
2377 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2378
2379 <result name="VBOX_E_OBJECT_NOT_FOUND">
2380 No matching floppy image found in the media registry.
2381 </result>
2382
2383 </desc>
2384 <param name="id" type="uuid" mod="string" dir="in">
2385 <desc>UUID of the image to look for.</desc>
2386 </param>
2387 <param name="image" type="IMedium" dir="return">
2388 <desc>Found floppy image object.</desc>
2389 </param>
2390 </method>
2391
2392 <method name="findFloppyImage">
2393 <desc>
2394 Returns a floppy image with the given image location.
2395
2396 The image with the given UUID must be known to this VirtualBox
2397 installation, i.e. it must be previously opened by <link
2398 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2399
2400 The search is done by comparing the value of the @a location argument to
2401 the <link to="IMedium::location"/> attribute of each known floppy image.
2402
2403 The requested location can be a path relative to the
2404 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2405 only a file name without any path is given, the
2406 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2407 folder</link> will be prepended to the file name before searching. Note
2408 that on case sensitive file systems, a case sensitive comparison is
2409 performed, otherwise the case of symbols in the file path is ignored.
2410
2411 <result name="VBOX_E_FILE_ERROR">
2412 Invalid image file location.
2413 </result>
2414 <result name="VBOX_E_OBJECT_NOT_FOUND">
2415 No matching floppy image found in the media registry.
2416 </result>
2417
2418 </desc>
2419 <param name="location" type="wstring" dir="in">
2420 <desc>Floppy image file path to look for.</desc>
2421 </param>
2422 <param name="image" type="IMedium" dir="return">
2423 <desc>Found floppy image object.</desc>
2424 </param>
2425 </method>
2426
2427 <method name="getGuestOSType">
2428 <desc>
2429 Returns an object describing the specified guest OS type.
2430
2431 The requested guest OS type is specified using a string which is a
2432 mnemonic identifier of the guest operating system, such as
2433 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2434 particular virtual machine can be read or set using the
2435 <link to="IMachine::OSTypeId"/> attribute.
2436
2437 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2438 available guest OS type objects. Each object has an
2439 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2440 the guest OS this object describes.
2441
2442 <result name="E_INVALIDARG">
2443 @a id is not a valid Guest OS type.
2444 </result>
2445
2446 </desc>
2447 <param name="id" type="uuid" mod="string" dir="in">
2448 <desc>Guest OS type ID string.</desc>
2449 </param>
2450 <param name="type" type="IGuestOSType" dir="return">
2451 <desc>Guest OS type object.</desc>
2452 </param>
2453 </method>
2454
2455 <method name="createSharedFolder">
2456 <desc>
2457 Creates a new global shared folder by associating the given logical
2458 name with the given host path, adds it to the collection of shared
2459 folders and starts sharing it. Refer to the description of
2460 <link to="ISharedFolder"/> to read more about logical names.
2461 <note>
2462 In the current implementation, this operation is not
2463 implemented.
2464 </note>
2465 </desc>
2466 <param name="name" type="wstring" dir="in">
2467 <desc>Unique logical name of the shared folder.</desc>
2468 </param>
2469 <param name="hostPath" type="wstring" dir="in">
2470 <desc>Full path to the shared folder in the host file system.</desc>
2471 </param>
2472 <param name="writable" type="boolean" dir="in">
2473 <desc>Whether the share is writable or readonly</desc>
2474 </param>
2475 </method>
2476
2477 <method name="removeSharedFolder">
2478 <desc>
2479 Removes the global shared folder with the given name previously
2480 created by <link to="#createSharedFolder"/> from the collection of
2481 shared folders and stops sharing it.
2482 <note>
2483 In the current implementation, this operation is not
2484 implemented.
2485 </note>
2486 </desc>
2487 <param name="name" type="wstring" dir="in">
2488 <desc>Logical name of the shared folder to remove.</desc>
2489 </param>
2490 </method>
2491
2492 <method name="getExtraDataKeys">
2493 <desc>
2494 Returns an array representing the global extra data keys which currently
2495 have values defined.
2496 </desc>
2497 <param name="value" type="wstring" dir="return" safearray="yes">
2498 <desc>Array of extra data keys.</desc>
2499 </param>
2500 </method>
2501
2502 <method name="getExtraData">
2503 <desc>
2504 Returns associated global extra data.
2505
2506 If the requested data @a key does not exist, this function will
2507 succeed and return an empty string in the @a value argument.
2508
2509 <result name="VBOX_E_FILE_ERROR">
2510 Settings file not accessible.
2511 </result>
2512 <result name="VBOX_E_XML_ERROR">
2513 Could not parse the settings file.
2514 </result>
2515
2516 </desc>
2517 <param name="key" type="wstring" dir="in">
2518 <desc>Name of the data key to get.</desc>
2519 </param>
2520 <param name="value" type="wstring" dir="return">
2521 <desc>Value of the requested data key.</desc>
2522 </param>
2523 </method>
2524
2525 <method name="setExtraData">
2526 <desc>
2527 Sets associated global extra data.
2528
2529 If you pass @c null or empty string as a key @a value, the given @a key
2530 will be deleted.
2531
2532 <note>
2533 Before performing the actual data change, this method will ask all
2534 registered callbacks using the
2535 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2536 notification for a permission. If one of the callbacks refuses the
2537 new value, the change will not be performed.
2538 </note>
2539 <note>
2540 On success, the
2541 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2542 is called to inform all registered callbacks about a successful data
2543 change.
2544 </note>
2545
2546 <result name="VBOX_E_FILE_ERROR">
2547 Settings file not accessible.
2548 </result>
2549 <result name="VBOX_E_XML_ERROR">
2550 Could not parse the settings file.
2551 </result>
2552 <result name="E_ACCESSDENIED">
2553 Modification request refused.
2554 </result>
2555
2556 </desc>
2557 <param name="key" type="wstring" dir="in">
2558 <desc>Name of the data key to set.</desc>
2559 </param>
2560 <param name="value" type="wstring" dir="in">
2561 <desc>Value to assign to the key.</desc>
2562 </param>
2563 </method>
2564
2565 <method name="openSession">
2566 <desc>
2567 Opens a new direct session with the given virtual machine.
2568
2569 A direct session acts as a local lock on the given VM.
2570 There can be only one direct session open at a time for every
2571 virtual machine, protecting the VM from being manipulated by
2572 conflicting actions from different processes. Only after a
2573 direct session has been opened, one can change all VM settings
2574 and execute the VM in the process space of the session object.
2575
2576 Sessions therefore can be compared to mutex semaphores that
2577 lock a given VM for modification and execution.
2578 See <link to="ISession">ISession</link> for details.
2579
2580 <note>Unless you are writing a new VM frontend, you will not
2581 want to execute a VM in the current process. To spawn a new
2582 process that executes a VM, use
2583 <link to="IVirtualBox::openRemoteSession" />
2584 instead.</note>
2585
2586 Upon successful return, the session object can be used to
2587 get access to the machine and to the VM console.
2588
2589 In VirtualBox terminology, the machine becomes "mutable" after
2590 a session has been opened. Note that the "mutable" machine
2591 object, on which you may invoke IMachine methods to change its
2592 settings, will be a different object from the immutable IMachine
2593 objects returned by various IVirtualBox methods. To obtain a
2594 mutable IMachine object (upon which you can invoke settings methods),
2595 use the <link to="ISession::machine" /> attribute.
2596
2597 One must always call <link to="ISession::close" /> to release the
2598 lock on the machine, or the machine's state will eventually be
2599 set to "Aborted".
2600
2601 In other words, to change settings on a machine, the following
2602 sequence is typically performed:
2603
2604 <ol>
2605 <li>Call this method (openSession) to have a machine locked for
2606 the current session.</li>
2607
2608 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2609
2610 <li>Change the settings of the machine.</li>
2611
2612 <li>Call <link to="IMachine::saveSettings" />.</li>
2613
2614 <li>Close the session by calling <link to="ISession::close"/>.</li>
2615 </ol>
2616
2617 <result name="E_UNEXPECTED">
2618 Virtual machine not registered.
2619 </result>
2620 <result name="E_ACCESSDENIED">
2621 Process not started by OpenRemoteSession.
2622 </result>
2623 <result name="VBOX_E_OBJECT_NOT_FOUND">
2624 No matching virtual machine found.
2625 </result>
2626 <result name="VBOX_E_INVALID_OBJECT_STATE">
2627 Session already open or being opened.
2628 </result>
2629 <result name="VBOX_E_VM_ERROR">
2630 Failed to assign machine to session.
2631 </result>
2632
2633 </desc>
2634 <param name="session" type="ISession" dir="in">
2635 <desc>
2636 Session object that will represent the opened session after
2637 successful method invocation. This object must not represent
2638 the already open session.
2639 <note>
2640 This session will be automatically closed if the
2641 VirtualBox server is terminated for some reason.
2642 </note>
2643 </desc>
2644 </param>
2645 <param name="machineId" type="uuid" mod="string" dir="in">
2646 <desc>ID of the virtual machine to open a session with.</desc>
2647 </param>
2648 </method>
2649
2650 <method name="openRemoteSession">
2651 <desc>
2652 Spawns a new process that executes a virtual machine (called a
2653 "remote session").
2654
2655 Opening a remote session causes the VirtualBox server to start a new
2656 process that opens a direct session with the given VM. As a result, the
2657 VM is locked by that direct session in the new process, preventing
2658 conflicting changes from other processes. Since sessions act as locks
2659 that prevent conflicting changes, one cannot open a remote session
2660 for a VM that already has another open session (direct or remote), or
2661 is currently in the process of opening one (see <link
2662 to="IMachine::sessionState"/>).
2663
2664 While the remote session still provides some level of control over the
2665 VM execution to the caller (using the <link to="IConsole" /> interface),
2666 not all VM settings are available for modification within the remote
2667 session context.
2668
2669 This operation can take some time (a new VM is started in a new process,
2670 for which memory and other resources need to be set up). Because of this,
2671 an <link to="IProgress" /> is returned to allow the caller to wait for this
2672 asynchronous operation to be completed. Until then, the remote session
2673 object remains in the closed state, and accessing the machine or its
2674 console through it is invalid. It is recommended to use
2675 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2676 completion.
2677
2678 As with all <link to="ISession" /> objects, it is recommended to call
2679 <link to="ISession::close" /> on the local session object once openRemoteSession()
2680 has been called. However, the session's state (see <link to="ISession::state" />)
2681 will not return to "Closed" until the remote session has also closed (i.e.
2682 until the VM is no longer running). In that case, however, the state of
2683 the session will automatically change back to "Closed".
2684
2685 Currently supported session types (values of the @a type
2686 argument) are:
2687 <ul>
2688 <li><tt>"gui"</tt>: VirtualBox Qt GUI session</li>
2689 <li><tt>"vrdp"</tt>: VirtualBox VRDP Server session</li>
2690 <li><tt>"sdl"</tt>: VirtualBox SDL GUI session</li>
2691 </ul>
2692
2693 The @a environment argument is a string containing definitions of
2694 environment variables in the following format:
2695 @code
2696 NAME[=VALUE]\n
2697 NAME[=VALUE]\n
2698 ...
2699 @endcode
2700 where <tt>\\n</tt> is the new line character. These environment
2701 variables will be appended to the environment of the VirtualBox server
2702 process. If an environment variable exists both in the server process
2703 and in this list, the value from this list takes precedence over the
2704 server's variable. If the value of the environment variable is
2705 omitted, this variable will be removed from the resulting environment.
2706 If the environment string is @c null or empty, the server environment
2707 is inherited by the started process as is.
2708
2709 <see>openExistingSession</see>
2710
2711 <result name="E_UNEXPECTED">
2712 Virtual machine not registered.
2713 </result>
2714 <result name="E_INVALIDARG">
2715 Invalid session type @a type.
2716 </result>
2717 <result name="VBOX_E_OBJECT_NOT_FOUND">
2718 No machine matching @a machineId found.
2719 </result>
2720 <result name="VBOX_E_INVALID_OBJECT_STATE">
2721 Session already open or being opened.
2722 </result>
2723 <result name="VBOX_E_IPRT_ERROR">
2724 Launching process for machine failed.
2725 </result>
2726 <result name="VBOX_E_VM_ERROR">
2727 Failed to assign machine to session.
2728 </result>
2729
2730 </desc>
2731 <param name="session" type="ISession" dir="in">
2732 <desc>
2733 Session object that will represent the opened remote session
2734 after successful method invocation (this object must not
2735 represent an already open session).
2736 </desc>
2737 </param>
2738 <param name="machineId" type="uuid" mod="string" dir="in">
2739 <desc>ID of the virtual machine to open a session with.</desc>
2740 </param>
2741 <param name="type" type="wstring" dir="in">
2742 <desc>
2743 Type of the remote session (case sensitive).
2744 </desc>
2745 </param>
2746 <param name="environment" type="wstring" dir="in">
2747 <desc>
2748 Environment to pass to the opened session.
2749 </desc>
2750 </param>
2751 <param name="progress" type="IProgress" dir="return">
2752 <desc>Progress object to track the operation completion.</desc>
2753 </param>
2754 </method>
2755
2756 <method name="openExistingSession">
2757 <desc>
2758 Opens a new remote session with the virtual machine for
2759 which a direct session is already open.
2760
2761 The remote session provides some level of control over the VM
2762 execution (using the IConsole interface) to the caller; however,
2763 within the remote session context, not all VM settings are available
2764 for modification.
2765
2766 As opposed to <link to="#openRemoteSession"/>, the number of
2767 remote sessions opened this way is not limited by the API
2768
2769 <note>
2770 It is an error to open a remote session with the machine that
2771 doesn't have an open direct session.
2772 </note>
2773
2774 <result name="E_UNEXPECTED">
2775 Virtual machine not registered.
2776 </result>
2777 <result name="VBOX_E_OBJECT_NOT_FOUND">
2778 No machine matching @a machineId found.
2779 </result>
2780 <result name="VBOX_E_INVALID_OBJECT_STATE">
2781 Session already open or being opened.
2782 </result>
2783 <result name="VBOX_E_INVALID_SESSION_STATE">
2784 Direct session state not Open.
2785 </result>
2786 <result name="VBOX_E_VM_ERROR">
2787 Failed to get console object from direct session or assign
2788 machine to session.
2789 </result>
2790
2791 <see>openRemoteSession</see>
2792 </desc>
2793 <param name="session" type="ISession" dir="in">
2794 <desc>
2795 Session object that will represent the open remote session
2796 after successful method invocation. This object must not
2797 represent an already open session.
2798 <note>
2799 This session will be automatically closed when the peer
2800 (direct) session dies or gets closed.
2801 </note>
2802 </desc>
2803 </param>
2804 <param name="machineId" type="uuid" mod="string" dir="in">
2805 <desc>ID of the virtual machine to open a session with.</desc>
2806 </param>
2807 </method>
2808
2809 <method name="registerCallback">
2810 <desc>
2811 Registers a new global VirtualBox callback. The methods of the given
2812 callback object will be called by VirtualBox when an appropriate
2813 event occurs.
2814
2815 <result name="E_INVALIDARG">
2816 A @c null callback cannot be registered.
2817 </result>
2818
2819 </desc>
2820 <param name="callback" type="IVirtualBoxCallback" dir="in">
2821 <desc>Callback object to register.</desc>
2822 </param>
2823 </method>
2824
2825 <method name="unregisterCallback">
2826 <desc>
2827 Unregisters the previously registered global VirtualBox callback.
2828
2829 <result name="E_INVALIDARG">
2830 Specified @a callback not registered.
2831 </result>
2832
2833 </desc>
2834 <param name="callback" type="IVirtualBoxCallback" dir="in">
2835 <desc>Callback object to unregister.</desc>
2836 </param>
2837 </method>
2838
2839 <method name="waitForPropertyChange">
2840 <desc>
2841 Blocks the caller until any of the properties represented by the
2842 @a what argument changes the value or until the given timeout interval
2843 expires.
2844
2845 The @a what argument is a comma separated list of property masks that
2846 describe properties the caller is interested in. The property mask is
2847 a string in the following format:
2848
2849 <pre>
2850 [[group.]subgroup.]name
2851 </pre>
2852
2853 where @c name is the property name and @c group, @c subgroup are zero
2854 or more property group specifiers. Each element (group or name) in
2855 the property mask may be either a Latin string or an asterisk symbol
2856 (@c "*") which is used to match any string for the given element. A
2857 property mask that doesn't contain asterisk symbols represents a
2858 single fully qualified property name.
2859
2860 Groups in the fully qualified property name go from more generic (the
2861 left-most part) to more specific (the right-most part). The first
2862 element is usually a name of the object the property belongs to. The
2863 second element may be either a property name, or a child object name,
2864 or an index if the preceding element names an object which is one of
2865 many objects of the same type. This way, property names form a
2866 hierarchy of properties. Here are some examples of property names:
2867
2868 <table>
2869 <tr>
2870 <td><tt>VirtualBox.version</tt></td>
2871 <td><link to="IVirtualBox::version"/> property</td>
2872 </tr>
2873 <tr>
2874 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2875 <td><link to="IMachine::name"/> property of the machine with the
2876 given UUID</td>
2877 </tr>
2878 </table>
2879
2880 Most property names directly correspond to the properties of objects
2881 (components) provided by the VirtualBox library and may be used to
2882 track changes to these properties. However, there may be
2883 pseudo-property names that don't correspond to any existing object's
2884 property directly, as well as there may be object properties that
2885 don't have a corresponding property name that is understood by this
2886 method, and therefore changes to such properties cannot be
2887 tracked. See individual object's property descriptions to get a
2888 fully qualified property name that can be used with this method (if
2889 any).
2890
2891 There is a special property mask @c "*" (i.e. a string consisting of a
2892 single asterisk symbol) that can be used to match all properties.
2893 Below are more examples of property masks:
2894
2895 <table>
2896 <tr>
2897 <td><tt>VirtualBox.*</tt></td>
2898 <td>Track all properties of the VirtualBox object</td>
2899 </tr>
2900 <tr>
2901 <td><tt>Machine.*.name</tt></td>
2902 <td>Track changes to the <link to="IMachine::name"/> property of
2903 all registered virtual machines</td>
2904 </tr>
2905 </table>
2906
2907 <note>
2908 This function is not implemented in the current version of the
2909 product.
2910 </note>
2911 </desc>
2912 <param name="what" type="wstring" dir="in">
2913 <desc>Comma separated list of property masks.</desc>
2914 </param>
2915 <param name="timeout" type="unsigned long" dir="in">
2916 <desc>
2917 Wait timeout in milliseconds.
2918 Specify -1 for an indefinite wait.
2919 </desc>
2920 </param>
2921 <param name="changed" type="wstring" dir="out">
2922 <desc>
2923 Comma separated list of properties that have been changed and caused
2924 this method to return to the caller.
2925 </desc>
2926 </param>
2927 <param name="values" type="wstring" dir="out">
2928 <desc>Reserved, not currently used.</desc>
2929 </param>
2930 </method>
2931
2932 <!--method name="createDHCPServerForInterface">
2933 <desc>
2934 Creates a dhcp server settings to be used for the given interface
2935 <result name="E_INVALIDARG">
2936 Host network interface @a name already exists.
2937 </result>
2938 </desc>
2939 <param name="interface" type="IHostNetworkInterface" dir="in">
2940 <desc>Network Interface</desc>
2941 </param>
2942 <param name="server" type="IDHCPServer" dir="out">
2943 <desc>Dhcp server settings</desc>
2944 </param>
2945 </method-->
2946
2947 <method name="createDHCPServer">
2948 <desc>
2949 Creates a dhcp server settings to be used for the given internal network name
2950 <result name="E_INVALIDARG">
2951 Host network interface @a name already exists.
2952 </result>
2953 </desc>
2954 <param name="name" type="wstring" dir="in">
2955 <desc>server name</desc>
2956 </param>
2957 <param name="server" type="IDHCPServer" dir="return">
2958 <desc>Dhcp server settings</desc>
2959 </param>
2960 </method>
2961
2962 <method name="findDHCPServerByNetworkName">
2963 <desc>
2964 Searches a dhcp server settings to be used for the given internal network name
2965 <result name="E_INVALIDARG">
2966 Host network interface @a name already exists.
2967 </result>
2968
2969 </desc>
2970 <param name="name" type="wstring" dir="in">
2971 <desc>server name</desc>
2972 </param>
2973 <param name="server" type="IDHCPServer" dir="return">
2974 <desc>Dhcp server settings</desc>
2975 </param>
2976 </method>
2977
2978 <!--method name="findDHCPServerForInterface">
2979 <desc>
2980 Searches a dhcp server settings to be used for the given interface
2981 <result name="E_INVALIDARG">
2982 Host network interface @a name already exists.
2983 </result>
2984 </desc>
2985 <param name="interface" type="IHostNetworkInterface" dir="in">
2986 <desc>Network Interface</desc>
2987 </param>
2988 <param name="server" type="IDHCPServer" dir="out">
2989 <desc>Dhcp server settings</desc>
2990 </param>
2991 </method-->
2992
2993 <method name="removeDHCPServer">
2994 <desc>
2995 Removes the dhcp server settings
2996 <result name="E_INVALIDARG">
2997 Host network interface @a name already exists.
2998 </result>
2999 </desc>
3000 <param name="server" type="IDHCPServer" dir="in">
3001 <desc>Dhcp server settings to be removed</desc>
3002 </param>
3003 </method>
3004
3005 </interface>
3006
3007 <!--
3008 // IVFSExplorer
3009 /////////////////////////////////////////////////////////////////////////
3010 -->
3011
3012 <enum
3013 name="VFSType"
3014 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
3015 >
3016 <desc>
3017 Virtual file systems supported by VFSExplorer.
3018 </desc>
3019
3020 <const name="File" value="1" />
3021 <const name="Cloud" value="2" />
3022 <const name="S3" value="3" />
3023 <const name="WebDav" value="4" />
3024 </enum>
3025
3026 <enum
3027 name="VFSFileType"
3028 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
3029 >
3030 <desc>
3031 File types known by VFSExplorer.
3032 </desc>
3033
3034 <const name="Unknown" value="1" />
3035 <const name="Fifo" value="2" />
3036 <const name="DevChar" value="3" />
3037 <const name="Directory" value="4" />
3038 <const name="DevBlock" value="5" />
3039 <const name="File" value="6" />
3040 <const name="SymLink" value="7" />
3041 <const name="Socket" value="8" />
3042 <const name="WhiteOut" value="9" />
3043 </enum>
3044
3045 <interface
3046 name="IVFSExplorer" extends="$unknown"
3047 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
3048 wsmap="managed"
3049 >
3050 <desc>
3051 The VFSExplorer interface unifies access to different file system
3052 types. This includes local file systems as well remote file systems like
3053 S3. For a list of supported types see <link to="VFSType" />.
3054 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
3055 </desc>
3056
3057 <attribute name="path" type="wstring" readonly="yes">
3058 <desc>Returns the current path in the virtual file system.</desc>
3059 </attribute>
3060
3061 <attribute name="type" type="VFSType" readonly="yes">
3062 <desc>Returns the file system type which is currently in use.</desc>
3063 </attribute>
3064
3065 <method name="update">
3066 <desc>Updates the internal list of files/directories from the
3067 current directory level. Use <link to="#entryList" /> to get the full list
3068 after a call to this method.</desc>
3069
3070 <param name="aProgress" type="IProgress" dir="return">
3071 <desc>Progress object to track the operation completion.</desc>
3072 </param>
3073 </method>
3074
3075 <method name="cd">
3076 <desc>Change the current directory level.</desc>
3077
3078 <param name="aDir" type="wstring" dir="in">
3079 <desc>The name of the directory to go in.</desc>
3080 </param>
3081
3082 <param name="aProgress" type="IProgress" dir="return">
3083 <desc>Progress object to track the operation completion.</desc>
3084 </param>
3085 </method>
3086
3087 <method name="cdUp">
3088 <desc>Go one directory upwards from the current directory level.</desc>
3089
3090 <param name="aProgress" type="IProgress" dir="return">
3091 <desc>Progress object to track the operation completion.</desc>
3092 </param>
3093 </method>
3094
3095 <method name="entryList">
3096 <desc>Returns a list of files/directories after a call to <link
3097 to="#update" />. The user is responsible for keeping this internal
3098 list up do date.</desc>
3099
3100 <param name="aNames" type="wstring" safearray="yes" dir="out">
3101 <desc>The list of names for the entries.</desc>
3102 </param>
3103
3104 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
3105 <desc>The list of types for the entries.</desc>
3106 </param>
3107 </method>
3108
3109 <method name="exists">
3110 <desc>Checks if the given file list exists in the current directory
3111 level.</desc>
3112
3113 <param name="aNames" type="wstring" safearray="yes" dir="in">
3114 <desc>The names to check.</desc>
3115 </param>
3116
3117 <param name="aExists" type="wstring" safearray="yes" dir="return">
3118 <desc>The names which exist.</desc>
3119 </param>
3120 </method>
3121
3122 <method name="remove">
3123 <desc>Deletes the given files in the current directory level.</desc>
3124
3125 <param name="aNames" type="wstring" safearray="yes" dir="in">
3126 <desc>The names to remove.</desc>
3127 </param>
3128
3129 <param name="aProgress" type="IProgress" dir="return">
3130 <desc>Progress object to track the operation completion.</desc>
3131 </param>
3132 </method>
3133
3134 </interface>
3135
3136 <!--
3137 // IAppliance
3138 /////////////////////////////////////////////////////////////////////////
3139 -->
3140
3141 <interface
3142 name="IAppliance" extends="$unknown"
3143 uuid="e3ba9ab9-ac2c-4266-8bd2-91c4bf721ceb"
3144 wsmap="managed"
3145 >
3146 <desc>
3147 Represents a platform-independent appliance in OVF format. An instance of this is returned
3148 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3149 appliances with VirtualBox.
3150
3151 The OVF standard suggests two different physical file formats:
3152
3153 <ol>
3154 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
3155 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
3156 this descriptor file references other files, as OVF appliances distributed as a set of
3157 files most likely do, those files must be in the same directory as the descriptor file.</li>
3158
3159 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
3160 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3161 files and optionally other files.
3162
3163 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3164 be added with a later version.</li>
3165 </ol>
3166
3167 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3168 <link to="IMachine" /> involves the following sequence of API calls:
3169
3170 <ol>
3171 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3172 </li>
3173
3174 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3175 would like to import. So long as this file is syntactically valid, this will succeed
3176 and return an instance of IAppliance that contains the parsed data from the OVF file.
3177 </li>
3178
3179 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3180 contents of the IAppliance attributes accordingly. These can be inspected by a
3181 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3182 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3183 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3184 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3185 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3186 The GUI can then give the user the option to confirm and/or change these suggestions.
3187 </li>
3188
3189 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3190 virtual system to override the suggestions made by the interpret() routine.
3191 </li>
3192
3193 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3194 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3195 virtual system descriptions.
3196 </li>
3197 </ol>
3198
3199 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3200
3201 <ol>
3202 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3203 an empty IAppliance object.
3204 </li>
3205
3206 <li>For each machine you would like to export, call <link to="IMachine::export" />
3207 with the IAppliance object you just created. This creates an instance of
3208 <link to="IVirtualSystemDescription" /> inside the appliance.
3209 </li>
3210
3211 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3212 virtual system to override the suggestions made by the export() routine.
3213 </li>
3214
3215 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3216 file written.</li>
3217 </ol>
3218
3219 </desc>
3220
3221 <attribute name="path" type="wstring" readonly="yes">
3222 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3223 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3224 <link to="#write" /> (for export).
3225 This attribute is empty until one of these methods has been called.
3226 </desc>
3227 </attribute>
3228
3229 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3230 <desc>
3231 Array of virtual disk definitions. One such description exists for each
3232 disk definition in the OVF; each string array item represents one such piece of
3233 disk information, with the information fields separated by tab (\\t) characters.
3234
3235 The caller should be prepared for additional fields being appended to
3236 this string in future versions of VirtualBox and therefore check for
3237 the number of tabs in the strings returned.
3238
3239 In the current version, the following eight fields are returned per string
3240 in the array:
3241
3242 <ol>
3243 <li>Disk ID (unique string identifier given to disk)</li>
3244
3245 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3246
3247 <li>Populated size (optional unsigned integer indicating the current size of the
3248 disk; can be approximate; -1 if unspecified)</li>
3249
3250 <li>Format (string identifying the disk format, typically
3251 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3252
3253 <li>Reference (where to find the disk image, typically a file name; if empty,
3254 then the disk should be created on import)</li>
3255
3256 <li>Image size (optional unsigned integer indicating the size of the image,
3257 which need not necessarily be the same as the values specified above, since
3258 the image may be compressed or sparse; -1 if not specified)</li>
3259
3260 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3261 presently unsupported and always -1)</li>
3262
3263 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3264 </ol>
3265 </desc>
3266 </attribute>
3267
3268 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3269 <desc> Array of virtual system descriptions. One such description is created
3270 for each virtual system found in the OVF.
3271 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3272 (for export) has been called.
3273 </desc>
3274 </attribute>
3275
3276 <method name="read">
3277 <desc>
3278 Reads an OVF file into the appliance object.
3279
3280 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3281 mere fact that this method returns successfully does not mean that VirtualBox supports all
3282 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3283 </desc>
3284 <param name="file" type="wstring" dir="in">
3285 <desc>
3286 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3287 on whether the appliance is distributed as a set of files or as a single file, respectively).
3288 </desc>
3289 </param>
3290 <param name="aProgress" type="IProgress" dir="return">
3291 <desc></desc>
3292 </param>
3293 </method>
3294
3295 <method name="interpret">
3296 <desc>
3297 Interprets the OVF data that was read when the appliance was constructed. After
3298 calling this method, one can inspect the
3299 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3300 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3301 the appliance.
3302
3303 Calling this method is the second step of importing an appliance into VirtualBox;
3304 see <link to="IAppliance" /> for an overview.
3305
3306 After calling this method, one should call <link to="#getWarnings" /> to find out
3307 if problems were encountered during the processing which might later lead to
3308 errors.
3309 </desc>
3310 </method>
3311
3312 <method name="importMachines">
3313 <desc>
3314 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3315 and other interfaces that match the information contained in the appliance as
3316 closely as possible, as represented by the import instructions in the
3317 <link to="#virtualSystemDescriptions" /> array.
3318
3319 Calling this method is the final step of importing an appliance into VirtualBox;
3320 see <link to="IAppliance" /> for an overview.
3321
3322 Since importing the appliance will most probably involve copying and converting
3323 disk images, which can take a long time, this method operates asynchronously and
3324 returns an IProgress object to allow the caller to monitor the progress.
3325 </desc>
3326
3327 <param name="aProgress" type="IProgress" dir="return">
3328 <desc></desc>
3329 </param>
3330 </method>
3331
3332 <method name="createVFSExplorer">
3333 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
3334
3335 <param name="aUri" type="wstring" dir="in">
3336 <desc>The URI describing the file system to use.</desc>
3337 </param>
3338
3339 <param name="aExplorer" type="IVFSExplorer" dir="return">
3340 <desc></desc>
3341 </param>
3342 </method>
3343
3344 <method name="write">
3345 <desc>
3346 Writes the contents of the appliance exports into a new OVF file.
3347
3348 Calling this method is the final step of exporting an appliance from VirtualBox;
3349 see <link to="IAppliance" /> for an overview.
3350
3351 Since exporting the appliance will most probably involve copying and converting
3352 disk images, which can take a long time, this method operates asynchronously and
3353 returns an IProgress object to allow the caller to monitor the progress.
3354 </desc>
3355 <param name="format" type="wstring" dir="in">
3356 <desc>
3357 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
3358 future versions of VirtualBox may support additional formats.
3359 </desc>
3360 </param>
3361 <param name="path" type="wstring" dir="in">
3362 <desc>
3363 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3364 on whether the appliance is distributed as a set of files or as a single file, respectively).
3365 </desc>
3366 </param>
3367 <param name="aProgress" type="IProgress" dir="return">
3368 <desc>Progress object to track the operation completion.</desc>
3369 </param>
3370 </method>
3371
3372 <method name="getWarnings">
3373 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3374
3375 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3376 <desc></desc>
3377 </param>
3378 </method>
3379
3380 </interface>
3381
3382 <enum
3383 name="VirtualSystemDescriptionType"
3384 uuid="aacc58de-5b45-4f82-ae2e-dd9a824fc3b5"
3385 >
3386 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3387 a configuration value.</desc>
3388
3389 <const name="Ignore" value="1" />
3390 <const name="OS" value="2" />
3391 <const name="Name" value="3" />
3392 <const name="Product" value="4" />
3393 <const name="Vendor" value="5" />
3394 <const name="Version" value="6" />
3395 <const name="ProductUrl" value="7" />
3396 <const name="VendorUrl" value="8" />
3397 <const name="Description" value="9" />
3398 <const name="License" value="10" />
3399 <const name="Miscellaneous" value="11" />
3400 <const name="CPU" value="12" />
3401 <const name="Memory" value="13" />
3402 <const name="HardDiskControllerIDE" value="14" />
3403 <const name="HardDiskControllerSATA" value="15" />
3404 <const name="HardDiskControllerSCSI" value="16" />
3405 <const name="HardDiskImage" value="17" />
3406 <const name="Floppy" value="18" />
3407 <const name="CDROM" value="19" />
3408 <const name="NetworkAdapter" value="20" />
3409 <const name="USBController" value="21" />
3410 <const name="SoundCard" value="22" />
3411
3412 </enum>
3413
3414 <enum
3415 name="VirtualSystemDescriptionValueType"
3416 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3417 >
3418 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
3419 type to fetch.</desc>
3420
3421 <const name="Reference" value="1" />
3422 <const name="Original" value="2" />
3423 <const name="Auto" value="3" />
3424 <const name="ExtraConfig" value="4" />
3425
3426 </enum>
3427
3428 <interface
3429 name="IVirtualSystemDescription" extends="$unknown"
3430 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3431 wsmap="managed"
3432 >
3433
3434 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3435 After <link to="IAppliance::interpret" /> has been called, that array contains
3436 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3437 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3438 into VirtualBox.
3439 </desc>
3440
3441 <attribute name="count" type="unsigned long" readonly="yes">
3442 <desc>Return the number of virtual system description entries.</desc>
3443 </attribute>
3444
3445 <method name="getDescription">
3446 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3447 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3448
3449 The list below identifies the value sets that are possible depending on the
3450 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3451 the array item with the same index in aOvfValues[] will contain the original value as contained
3452 in the OVF file (just for informational purposes), and the corresponding item in aVBoxValues[]
3453 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3454 the aExtraConfigValues[] array item may also be used.
3455
3456 <ul>
3457 <li>
3458 "OS": the guest operating system type. There must be exactly one such array item on import. The
3459 corresponding item in aVBoxValues[] contains the suggested guest operating system for VirtualBox.
3460 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3461 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF.
3462 </li>
3463 <li>
3464 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3465 if none is present on import, then an automatic name will be created from the operating system
3466 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3467 from the OVF file, and aVBoxValues[] will contain a suggestion for a unique VirtualBox
3468 <link to="IMachine" /> name that does not exist yet.
3469 </li>
3470 <li>
3471 "Description": an arbitrary description.
3472 </li>
3473 <li>
3474 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3475 code to display such a license for agreement; the Main API does not enforce any such policy.
3476 </li>
3477 <li>
3478 Miscellaneous: reserved for future use.
3479 </li>
3480 <li>
3481 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3482 </li>
3483 <li>
3484 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3485 is present on import, then VirtualBox will set a meaningful default based on the operating system
3486 type.
3487 </li>
3488 <li>
3489 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3490 has no value in aOvfValues[] or aVBoxValues[].
3491 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3492 type can use to specify which hard disk controller a virtual disk should be connected to.
3493 </li>
3494 <li>
3495 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3496 has no value in aOvfValues[] or aVBoxValues[].
3497 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3498 </li>
3499 <li>
3500 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3501 The items in aOvfValues[] and aVBoxValues[] will either be "LsiLogic" or "BusLogic".
3502 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3503 </li>
3504 <li>
3505 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3506 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3507
3508 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3509 a path since the image file should be in the same location as the OVF file itself), whereas the
3510 item in aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
3511 hard disk image. This means that on import the image will be copied and converted from the
3512 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3513 On import, the target image will also be registered with VirtualBox.
3514
3515 The matching item in the aExtraConfigValues[] array must contain a string of the following
3516 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3517 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3518 the image to. That number must be the index of an array item with one of the hard disk controller
3519 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3520 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3521 this can range from 0-3 (which VirtualBox will interpret as primary master, primary slave, secondary master and
3522 secondary slave. For SATA and SCSI controllers, the channel can range from 0-29.
3523 </li>
3524 <li>
3525 "CDROM": a virtual CD-ROM drive. The matching item in aExtraConfigValue[] contains the same
3526 attachment information as with "HardDiskImage" items.
3527 </li>
3528 <li>
3529 "CDROM": a virtual floppy drive. The matching item in aExtraConfigValue[] contains the same
3530 attachment information as with "HardDiskImage" items.
3531 </li>
3532 <li>
3533 "NetworkAdapter": a network adapter. The array item in aVBoxValues[] will specify the hardware
3534 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3535 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3536 </li>
3537 <li>
3538 "USBController": a USB controller. There can be at most one such item. If and only if such an
3539 item ispresent, USB support will be enabled for the new virtual machine.
3540 </li>
3541 <li>
3542 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3543 present, sound support will be enabled for the new virtual machine. Note that the virtual
3544 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3545 may be different from the virtual soundcard expected by the appliance.
3546 </li>
3547 </ul>
3548
3549 </desc>
3550
3551 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3552 <desc></desc>
3553 </param>
3554
3555 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3556 <desc></desc>
3557 </param>
3558
3559 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3560 <desc></desc>
3561 </param>
3562
3563 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3564 <desc></desc>
3565 </param>
3566
3567 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3568 <desc></desc>
3569 </param>
3570
3571 </method>
3572
3573 <method name="getDescriptionByType">
3574 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3575 should be returned.</desc>
3576
3577 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3578 <desc></desc>
3579 </param>
3580
3581 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3582 <desc></desc>
3583 </param>
3584
3585 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3586 <desc></desc>
3587 </param>
3588
3589 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3590 <desc></desc>
3591 </param>
3592
3593 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3594 <desc></desc>
3595 </param>
3596
3597 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3598 <desc></desc>
3599 </param>
3600
3601 </method>
3602
3603 <method name="getValuesByType">
3604 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3605 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3606 values.</desc>
3607
3608 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3609 <desc></desc>
3610 </param>
3611
3612 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3613 <desc></desc>
3614 </param>
3615
3616 <param name="aValues" type="wstring" dir="return" safearray="yes">
3617 <desc></desc>
3618 </param>
3619
3620 </method>
3621
3622 <method name="setFinalValues">
3623 <desc>
3624 This method allows the appliance's user to change the configuration for the virtual
3625 system descriptions. For each array item returned from <link to="#getDescription" />,
3626 you must pass in one boolean value and one configuration value.
3627
3628 Each item in the boolean array determines whether the particular configuration item
3629 should be enabled.
3630 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3631 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3632 and SoundCard.
3633
3634 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3635 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
3636 the configuration remains unchanged. Please see the documentation for getDescription()
3637 for valid configuration values for the individual array item types. If the
3638 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
3639 </desc>
3640
3641 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3642 <desc></desc>
3643 </param>
3644
3645 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
3646 <desc></desc>
3647 </param>
3648
3649 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3650 <desc></desc>
3651 </param>
3652 </method>
3653
3654 <method name="addDescription">
3655 <desc>
3656 This method adds an additional description entry to the stack of already
3657 available descriptions for this virtual system. This is handy for writing
3658 values which aren't directly supported by VirtualBox. One example would
3659 be the License type of <link to="VirtualSystemDescriptionType" />.
3660 </desc>
3661
3662 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3663 <desc></desc>
3664 </param>
3665
3666 <param name="aVBoxValue" type="wstring" dir="in">
3667 <desc></desc>
3668 </param>
3669
3670 <param name="aExtraConfigValue" type="wstring" dir="in">
3671 <desc></desc>
3672 </param>
3673 </method>
3674 </interface>
3675
3676
3677 <!--
3678 // IMachine
3679 /////////////////////////////////////////////////////////////////////////
3680 -->
3681
3682 <interface
3683 name="IInternalMachineControl" extends="$unknown"
3684 uuid="35d8d838-d066-447d-927a-fd93afdbec90"
3685 internal="yes"
3686 wsmap="suppress"
3687 >
3688 <method name="setRemoveSavedState">
3689 <desc>
3690 Updates the flag whether saved state is removed on a machine state
3691 change from Saved to PoweredOff.
3692 </desc>
3693 <param name="aRemove" type="boolean" dir="in"/>
3694 </method>
3695
3696 <method name="updateState">
3697 <desc>
3698 Updates the VM state.
3699 <note>
3700 This operation will also update the settings file with
3701 the correct information about the saved state file
3702 and delete this file from disk when appropriate.
3703 </note>
3704 </desc>
3705 <param name="state" type="MachineState" dir="in"/>
3706 </method>
3707
3708 <method name="getIPCId">
3709 <param name="id" type="wstring" dir="return"/>
3710 </method>
3711
3712 <method name="runUSBDeviceFilters">
3713 <desc>
3714 Asks the server to run USB devices filters of the associated
3715 machine against the given USB device and tell if there is
3716 a match.
3717 <note>
3718 Intended to be used only for remote USB devices. Local
3719 ones don't require to call this method (this is done
3720 implicitly by the Host and USBProxyService).
3721 </note>
3722 </desc>
3723 <param name="device" type="IUSBDevice" dir="in"/>
3724 <param name="matched" type="boolean" dir="out"/>
3725 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3726 </method>
3727
3728 <method name="captureUSBDevice">
3729 <desc>
3730 Requests a capture of the given host USB device.
3731 When the request is completed, the VM process will
3732 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3733 notification.
3734 </desc>
3735 <param name="id" type="uuid" mod="string" dir="in"/>
3736 </method>
3737
3738 <method name="detachUSBDevice">
3739 <desc>
3740 Notification that a VM is going to detach (@a done = @c false) or has
3741 already detached (@a done = @c true) the given USB device.
3742 When the @a done = @c true request is completed, the VM process will
3743 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3744 notification.
3745 <note>
3746 In the @a done = @c true case, the server must run its own filters
3747 and filters of all VMs but this one on the detached device
3748 as if it were just attached to the host computer.
3749 </note>
3750 </desc>
3751 <param name="id" type="uuid" mod="string" dir="in"/>
3752 <param name="done" type="boolean" dir="in"/>
3753 </method>
3754
3755 <method name="autoCaptureUSBDevices">
3756 <desc>
3757 Requests a capture all matching USB devices attached to the host.
3758 When the request is completed, the VM process will
3759 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3760 notification per every captured device.
3761 </desc>
3762 </method>
3763
3764 <method name="detachAllUSBDevices">
3765 <desc>
3766 Notification that a VM that is being powered down. The done
3767 parameter indicates whether which stage of the power down
3768 we're at. When @a done = @c false the VM is announcing its
3769 intentions, while when @a done = @c true the VM is reporting
3770 what it has done.
3771 <note>
3772 In the @a done = @c true case, the server must run its own filters
3773 and filters of all VMs but this one on all detach devices as
3774 if they were just attached to the host computer.
3775 </note>
3776 </desc>
3777 <param name="done" type="boolean" dir="in"/>
3778 </method>
3779
3780 <method name="onSessionEnd">
3781 <desc>
3782 Triggered by the given session object when the session is about
3783 to close normally.
3784 </desc>
3785 <param name="session" type="ISession" dir="in">
3786 <desc>Session that is being closed</desc>
3787 </param>
3788 <param name="progress" type="IProgress" dir="return">
3789 <desc>
3790 Used to wait until the corresponding machine is actually
3791 dissociated from the given session on the server.
3792 Returned only when this session is a direct one.
3793 </desc>
3794 </param>
3795 </method>
3796
3797 <method name="beginSavingState">
3798 <desc>
3799 Called by the VM process to inform the server it wants to
3800 save the current state and stop the VM execution.
3801 </desc>
3802 <param name="progress" type="IProgress" dir="in">
3803 <desc>
3804 Progress object created by the VM process to wait until
3805 the state is saved.
3806 </desc>
3807 </param>
3808 <param name="stateFilePath" type="wstring" dir="out">
3809 <desc>
3810 File path the VM process must save the execution state to.
3811 </desc>
3812 </param>
3813 </method>
3814
3815 <method name="endSavingState">
3816 <desc>
3817 Called by the VM process to inform the server that saving
3818 the state previously requested by #beginSavingState is either
3819 successfully finished or there was a failure.
3820
3821 <result name="VBOX_E_FILE_ERROR">
3822 Settings file not accessible.
3823 </result>
3824 <result name="VBOX_E_XML_ERROR">
3825 Could not parse the settings file.
3826 </result>
3827
3828 </desc>
3829
3830 <param name="success" type="boolean" dir="in">
3831 <desc>@c true to indicate success and @c false otherwise.
3832 </desc>
3833 </param>
3834 </method>
3835
3836 <method name="adoptSavedState">
3837 <desc>
3838 Gets called by IConsole::adoptSavedState.
3839 <result name="VBOX_E_FILE_ERROR">
3840 Invalid saved state file path.
3841 </result>
3842 </desc>
3843 <param name="savedStateFile" type="wstring" dir="in">
3844 <desc>Path to the saved state file to adopt.</desc>
3845 </param>
3846 </method>
3847
3848 <method name="beginTakingSnapshot">
3849 <desc>
3850 Called from the VM process to request from the server to perform the
3851 server-side actions of creating a snapshot (creating differencing images
3852 and the snapshot object).
3853
3854 <result name="VBOX_E_FILE_ERROR">
3855 Settings file not accessible.
3856 </result>
3857 <result name="VBOX_E_XML_ERROR">
3858 Could not parse the settings file.
3859 </result>
3860 </desc>
3861 <param name="initiator" type="IConsole" dir="in">
3862 <desc>The console object that initiated this call.</desc>
3863 </param>
3864 <param name="name" type="wstring" dir="in">
3865 <desc>Snapshot name.</desc>
3866 </param>
3867 <param name="description" type="wstring" dir="in">
3868 <desc>Snapshot description.</desc>
3869 </param>
3870 <param name="consoleProgress" type="IProgress" dir="in">
3871 <desc>
3872 Progress object created by the VM process tracking the
3873 snapshot's progress. This has the following sub-operations:
3874 <ul>
3875 <li>setting up (weight 1);</li>
3876 <li>one for each medium attachment that needs a differencing image (weight 1 each);</li>
3877 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3878 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3879 <li>finishing up (weight 1)</li>
3880 </ul>
3881 </desc>
3882 </param>
3883 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3884 <desc>
3885 Whether this is an online snapshot (i.e. the machine is running).
3886 </desc>
3887 </param>
3888 <param name="stateFilePath" type="wstring" dir="out">
3889 <desc>
3890 File path the VM process must save the execution state to.
3891 </desc>
3892 </param>
3893 </method>
3894
3895 <method name="endTakingSnapshot">
3896 <desc>
3897 Called by the VM process to inform the server that the snapshot
3898 previously requested by #beginTakingSnapshot is either
3899 successfully taken or there was a failure.
3900 </desc>
3901
3902 <param name="success" type="boolean" dir="in">
3903 <desc>@c true to indicate success and @c false otherwise</desc>
3904 </param>
3905 </method>
3906
3907 <method name="deleteSnapshot">
3908 <desc>
3909 Gets called by IConsole::deleteSnapshot.
3910 <result name="VBOX_E_INVALID_OBJECT_STATE">
3911 Snapshot has more than one child snapshot.
3912 </result>
3913 </desc>
3914 <param name="initiator" type="IConsole" dir="in">
3915 <desc>The console object that initiated this call.</desc>
3916 </param>
3917 <param name="id" type="uuid" mod="string" dir="in">
3918 <desc>UUID of the snapshot to discard.</desc>
3919 </param>
3920 <param name="machineState" type="MachineState" dir="out">
3921 <desc>New machine state after this operation is started.</desc>
3922 </param>
3923 <param name="progress" type="IProgress" dir="return">
3924 <desc>Progress object to track the operation completion.</desc>
3925 </param>
3926 </method>
3927
3928 <method name="restoreSnapshot">
3929 <desc>
3930 Gets called by IConsole::RestoreSnapshot.
3931 </desc>
3932 <param name="initiator" type="IConsole" dir="in">
3933 <desc>The console object that initiated this call.</desc>
3934 </param>
3935 <param name="snapshot" type="ISnapshot" dir="in">
3936 <desc>The snapshot to restore the VM state from.</desc>
3937 </param>
3938 <param name="machineState" type="MachineState" dir="out">
3939 <desc>New machine state after this operation is started.</desc>
3940 </param>
3941 <param name="progress" type="IProgress" dir="return">
3942 <desc>Progress object to track the operation completion.</desc>
3943 </param>
3944 </method>
3945
3946 <method name="pullGuestProperties">
3947 <desc>
3948 Get the list of the guest properties matching a set of patterns along
3949 with their values, time stamps and flags and give responsibility for
3950 managing properties to the console.
3951 </desc>
3952 <param name="name" type="wstring" dir="out" safearray="yes">
3953 <desc>
3954 The names of the properties returned.
3955 </desc>
3956 </param>
3957 <param name="value" type="wstring" dir="out" safearray="yes">
3958 <desc>
3959 The values of the properties returned. The array entries match the
3960 corresponding entries in the @a name array.
3961 </desc>
3962 </param>
3963 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3964 <desc>
3965 The time stamps of the properties returned. The array entries match
3966 the corresponding entries in the @a name array.
3967 </desc>
3968 </param>
3969 <param name="flags" type="wstring" dir="out" safearray="yes">
3970 <desc>
3971 The flags of the properties returned. The array entries match the
3972 corresponding entries in the @a name array.
3973 </desc>
3974 </param>
3975 </method>
3976
3977 <method name="pushGuestProperties">
3978 <desc>
3979 Set the list of the guest properties matching a set of patterns along
3980 with their values, time stamps and flags and return responsibility for
3981 managing properties to IMachine.
3982 </desc>
3983 <param name="name" type="wstring" dir="in" safearray="yes">
3984 <desc>
3985 The names of the properties.
3986 </desc>
3987 </param>
3988 <param name="value" type="wstring" dir="in" safearray="yes">
3989 <desc>
3990 The values of the properties. The array entries match the
3991 corresponding entries in the @a name array.
3992 </desc>
3993 </param>
3994 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3995 <desc>
3996 The time stamps of the properties. The array entries match
3997 the corresponding entries in the @a name array.
3998 </desc>
3999 </param>
4000 <param name="flags" type="wstring" dir="in" safearray="yes">
4001 <desc>
4002 The flags of the properties. The array entries match the
4003 corresponding entries in the @a name array.
4004 </desc>
4005 </param>
4006 </method>
4007 <method name="pushGuestProperty">
4008 <desc>
4009 Update a single guest property in IMachine.
4010 </desc>
4011 <param name="name" type="wstring" dir="in">
4012 <desc>
4013 The name of the property to be updated.
4014 </desc>
4015 </param>
4016 <param name="value" type="wstring" dir="in">
4017 <desc>
4018 The value of the property.
4019 </desc>
4020 </param>
4021 <param name="timestamp" type="unsigned long long" dir="in">
4022 <desc>
4023 The timestamp of the property.
4024 </desc>
4025 </param>
4026 <param name="flags" type="wstring" dir="in">
4027 <desc>
4028 The flags of the property.
4029 </desc>
4030 </param>
4031 </method>
4032
4033 <method name="lockMedia">
4034 <desc>
4035 Locks all media attached to the machine for writing and parents of
4036 attached differencing media (if any) for reading. This operation is
4037 atomic so that if it fails no media is actually locked.
4038
4039 This method is intended to be called when the machine is in Starting or
4040 Restoring state. The locked media will be automatically unlocked when
4041 the machine is powered off or crashed.
4042 </desc>
4043 </method>
4044 <method name="unlockMedia">
4045 <desc>
4046 Unlocks all media previously locked using
4047 <link to="IInternalMachineControl::lockMedia"/>.
4048
4049 This method is intended to be used with teleportation so that it is
4050 possible to teleport between processes on the same machine.
4051 </desc>
4052 </method>
4053 </interface>
4054
4055 <interface
4056 name="IBIOSSettings" extends="$unknown"
4057 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
4058 wsmap="managed"
4059 >
4060 <desc>
4061 The IBIOSSettings interface represents BIOS settings of the virtual
4062 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
4063 </desc>
4064 <attribute name="logoFadeIn" type="boolean">
4065 <desc>Fade in flag for BIOS logo animation.</desc>
4066 </attribute>
4067
4068 <attribute name="logoFadeOut" type="boolean">
4069 <desc>Fade out flag for BIOS logo animation.</desc>
4070 </attribute>
4071
4072 <attribute name="logoDisplayTime" type="unsigned long">
4073 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
4074 </attribute>
4075
4076 <attribute name="logoImagePath" type="wstring">
4077 <desc>Local file system path for external BIOS image.</desc>
4078 </attribute>
4079
4080 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
4081 <desc>Mode of the BIOS boot device menu.</desc>
4082 </attribute>
4083
4084 <attribute name="ACPIEnabled" type="boolean">
4085 <desc>ACPI support flag.</desc>
4086 </attribute>
4087
4088 <attribute name="IOAPICEnabled" type="boolean">
4089 <desc>
4090 IO APIC support flag. If set, VirtualBox will provide an IO APIC
4091 and support IRQs above 15.
4092 </desc>
4093 </attribute>
4094
4095 <attribute name="timeOffset" type="long long">
4096 <desc>
4097 Offset in milliseconds from the host system time. This allows for
4098 guests running with a different system date/time than the host.
4099 It is equivalent to setting the system date/time in the BIOS except
4100 it is not an absolute value but a relative one. Guest Additions
4101 time synchronization honors this offset.
4102 </desc>
4103 </attribute>
4104
4105 <attribute name="PXEDebugEnabled" type="boolean">
4106 <desc>
4107 PXE debug logging flag. If set, VirtualBox will write extensive
4108 PXE trace information to the release log.
4109 </desc>
4110 </attribute>
4111
4112 </interface>
4113
4114 <interface
4115 name="IMachine" extends="$unknown"
4116 uuid="99404f50-dd10-40d3-889b-dd2f79f1e95e"
4117 wsmap="managed"
4118 >
4119 <desc>
4120 The IMachine interface represents a virtual machine, or guest, created
4121 in VirtualBox.
4122
4123 This interface is used in two contexts. First of all, a collection of
4124 objects implementing this interface is stored in the
4125 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
4126 machines that are currently registered with this VirtualBox
4127 installation. Also, once a session has been opened for the given virtual
4128 machine (e.g. the virtual machine is running), the machine object
4129 associated with the open session can be queried from the session object;
4130 see <link to="ISession"/> for details.
4131
4132 The main role of this interface is to expose the settings of the virtual
4133 machine and provide methods to change various aspects of the virtual
4134 machine's configuration. For machine objects stored in the
4135 <link to="IVirtualBox::machines"/> collection, all attributes are
4136 read-only unless explicitly stated otherwise in individual attribute
4137 and method descriptions. In order to change a machine setting, a session
4138 for this machine must be opened using one of
4139 <link to="IVirtualBox::openSession"/>,
4140 <link to="IVirtualBox::openRemoteSession"/> or
4141 <link to="IVirtualBox::openExistingSession"/> methods. After the
4142 session has been successfully opened, a mutable machine object needs to
4143 be queried from the session object and then the desired settings changes
4144 can be applied to the returned object using IMachine attributes and
4145 methods. See the <link to="ISession"/> interface description for more
4146 information about sessions.
4147
4148 Note that IMachine does not provide methods to control virtual machine
4149 execution (such as start the machine, or power it down) -- these methods
4150 are grouped in a separate interface called <link to="IConsole" />.
4151
4152 <see>ISession, IConsole</see>
4153 </desc>
4154
4155 <attribute name="parent" type="IVirtualBox" readonly="yes">
4156 <desc>Associated parent object.</desc>
4157 </attribute>
4158
4159 <attribute name="accessible" type="boolean" readonly="yes">
4160 <desc>
4161 Whether this virtual machine is currently accessible or not.
4162
4163 A machine is always deemed accessible unless it is registered <i>and</i>
4164 its settings file cannot be read or parsed (either because the file itself
4165 is unavailable or has invalid XML contents).
4166
4167 Every time this property is read, the accessibility state of
4168 this machine is re-evaluated. If the returned value is @c false,
4169 the <link to="#accessError"/> property may be used to get the
4170 detailed error information describing the reason of
4171 inaccessibility, including XML error messages.
4172
4173 When the machine is inaccessible, only the following properties
4174 can be used on it:
4175 <ul>
4176 <li><link to="#parent"/></li>
4177 <li><link to="#id"/></li>
4178 <li><link to="#settingsFilePath"/></li>
4179 <li><link to="#accessible"/></li>
4180 <li><link to="#accessError"/></li>
4181 </ul>
4182
4183 An attempt to access any other property or method will return
4184 an error.
4185
4186 The only possible action you can perform on an inaccessible
4187 machine is to unregister it using the
4188 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4189 for the accessibility state once more by querying this
4190 property).
4191
4192 <note>
4193 In the current implementation, once this property returns
4194 @c true, the machine will never become inaccessible
4195 later, even if its settings file cannot be successfully
4196 read/written any more (at least, until the VirtualBox
4197 server is restarted). This limitation may be removed in
4198 future releases.
4199 </note>
4200 </desc>
4201 </attribute>
4202
4203 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4204 <desc>
4205 Error information describing the reason of machine
4206 inaccessibility.
4207
4208 Reading this property is only valid after the last call to
4209 <link to="#accessible"/> returned @c false (i.e. the
4210 machine is currently unaccessible). Otherwise, a @c null
4211 IVirtualBoxErrorInfo object will be returned.
4212 </desc>
4213 </attribute>
4214
4215 <attribute name="name" type="wstring">
4216 <desc>
4217 Name of the virtual machine.
4218
4219 Besides being used for human-readable identification purposes
4220 everywhere in VirtualBox, the virtual machine name is also used
4221 as a name of the machine's settings file and as a name of the
4222 subdirectory this settings file resides in. Thus, every time you
4223 change the value of this property, the settings file will be
4224 renamed once you call <link to="#saveSettings"/> to confirm the
4225 change. The containing subdirectory will be also renamed, but
4226 only if it has exactly the same name as the settings file
4227 itself prior to changing this property (for backward compatibility
4228 with previous API releases). The above implies the following
4229 limitations:
4230 <ul>
4231 <li>The machine name cannot be empty.</li>
4232 <li>The machine name can contain only characters that are valid
4233 file name characters according to the rules of the file
4234 system used to store VirtualBox configuration.</li>
4235 <li>You cannot have two or more machines with the same name
4236 if they use the same subdirectory for storing the machine
4237 settings files.</li>
4238 <li>You cannot change the name of the machine if it is running,
4239 or if any file in the directory containing the settings file
4240 is being used by another running machine or by any other
4241 process in the host operating system at a time when
4242 <link to="#saveSettings"/> is called.
4243 </li>
4244 </ul>
4245 If any of the above limitations are hit, <link to="#saveSettings"/>
4246 will return an appropriate error message explaining the exact
4247 reason and the changes you made to this machine will not be
4248 saved.
4249 <note>
4250 For "legacy" machines created using the
4251 <link to="IVirtualBox::createLegacyMachine"/> call,
4252 the above naming limitations do not apply because the
4253 machine name does not affect the settings file name.
4254 The settings file name remains the same as it was specified
4255 during machine creation and never changes.
4256 </note>
4257 </desc>
4258 </attribute>
4259
4260 <attribute name="description" type="wstring">
4261 <desc>
4262 Description of the virtual machine.
4263
4264 The description attribute can contain any text and is
4265 typically used to describe the hardware and software
4266 configuration of the virtual machine in detail (i.e. network
4267 settings, versions of the installed software and so on).
4268 </desc>
4269 </attribute>
4270
4271 <attribute name="id" type="uuid" mod="string" readonly="yes">
4272 <desc>UUID of the virtual machine.</desc>
4273 </attribute>
4274
4275 <attribute name="OSTypeId" type="wstring">
4276 <desc>
4277 User-defined identifier of the Guest OS type.
4278 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4279 an IGuestOSType object representing details about the given
4280 Guest OS type.
4281 <note>
4282 This value may differ from the value returned by
4283 <link to="IGuest::OSTypeId"/> if Guest Additions are
4284 installed to the guest OS.
4285 </note>
4286 </desc>
4287 </attribute>
4288
4289 <attribute name="HardwareVersion" type="wstring">
4290 <desc>Hardware version identifier. Internal use only for now.</desc>
4291 </attribute>
4292
4293 <attribute name="hardwareUUID" type="uuid" mod="string">
4294 <desc>
4295 The UUID presented to the guest via memory tables, hardware and guest
4296 properties. For most VMs this is the same as the @a id, but for VMs
4297 which have been cloned or teleported it may be the same as the source
4298 VM. This latter is because the guest shouldn't notice that it was
4299 cloned or teleported.
4300 </desc>
4301 </attribute>
4302
4303 <attribute name="CPUCount" type="unsigned long">
4304 <desc>Number of virtual CPUs in the VM.</desc>
4305 </attribute>
4306
4307 <attribute name="memorySize" type="unsigned long">
4308 <desc>System memory size in megabytes.</desc>
4309 </attribute>
4310
4311 <attribute name="memoryBalloonSize" type="unsigned long">
4312 <desc>Initial memory balloon size in megabytes.</desc>
4313 </attribute>
4314
4315 <attribute name="statisticsUpdateInterval" type="unsigned long">
4316 <desc>Initial interval to update guest statistics in seconds.</desc>
4317 </attribute>
4318
4319 <attribute name="VRAMSize" type="unsigned long">
4320 <desc>Video memory size in megabytes.</desc>
4321 </attribute>
4322
4323 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4324 <desc>
4325 This setting determines whether VirtualBox allows this machine to make
4326 use of the 3D graphics support available on the host.</desc>
4327 </attribute>
4328
4329 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
4330 <desc>
4331 This setting determines whether VirtualBox allows this machine to make
4332 use of the 2D video acceleration support available on the host.</desc>
4333 </attribute>
4334
4335 <attribute name="monitorCount" type="unsigned long">
4336 <desc>
4337 Number of virtual monitors.
4338 <note>
4339 Only effective on Windows XP and later guests with
4340 Guest Additions installed.
4341 </note>
4342 </desc>
4343 </attribute>
4344
4345 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4346 <desc>Object containing all BIOS settings.</desc>
4347 </attribute>
4348
4349 <attribute name="firmwareType" type="FirmwareType">
4350 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
4351 bootstrap in this VM.</desc>
4352 </attribute>
4353
4354 <attribute name="snapshotFolder" type="wstring">
4355 <desc>
4356 Full path to the directory used to store snapshot data
4357 (differencing media and saved state files) of this machine.
4358
4359 The initial value of this property is
4360 <tt>&lt;</tt><link to="#settingsFilePath">
4361 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4362 <link to="#id">machine_uuid</link>
4363 <tt>&gt;</tt>.
4364
4365 Currently, it is an error to try to change this property on
4366 a machine that has snapshots (because this would require to
4367 move possibly large files to a different location).
4368 A separate method will be available for this purpose later.
4369
4370 <note>
4371 Setting this property to @c null or to an empty string will restore
4372 the initial value.
4373 </note>
4374 <note>
4375 When setting this property, the specified path can be
4376 absolute (full path) or relative to the directory where the
4377 <link to="#settingsFilePath">machine settings file</link>
4378 is located. When reading this property, a full path is
4379 always returned.
4380 </note>
4381 <note>
4382 The specified path may not exist, it will be created
4383 when necessary.
4384 </note>
4385 </desc>
4386 </attribute>
4387
4388 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4389 <desc>VRDP server object.</desc>
4390 </attribute>
4391
4392 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
4393 <desc>Array of media attached to this machine.</desc>
4394 </attribute>
4395
4396 <attribute name="USBController" type="IUSBController" readonly="yes">
4397 <desc>
4398 Associated USB controller object.
4399
4400 <note>
4401 If USB functionality is not available in the given edition of
4402 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4403 </note>
4404 </desc>
4405 </attribute>
4406
4407 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4408 <desc>Associated audio adapter, always present.</desc>
4409 </attribute>
4410
4411 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4412 <desc>Array of storage controllers attached to this machine.</desc>
4413 </attribute>
4414
4415 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4416 <desc>
4417 Full name of the file containing machine settings data.
4418 </desc>
4419 </attribute>
4420
4421 <attribute name="settingsModified" type="boolean" readonly="yes">
4422 <desc>
4423 Whether the settings of this machine have been modified
4424 (but neither yet saved nor discarded).
4425 <note>
4426 Reading this property is only valid on instances returned
4427 by <link to="ISession::machine"/> and on new machines
4428 created by <link to="IVirtualBox::createMachine"/> or opened
4429 by <link to="IVirtualBox::openMachine"/> but not
4430 yet registered, or on unregistered machines after calling
4431 <link to="IVirtualBox::unregisterMachine"/>. For all other
4432 cases, the settings can never be modified.
4433 </note>
4434 <note>
4435 For newly created unregistered machines, the value of this
4436 property is always @c true until <link to="#saveSettings"/>
4437 is called (no matter if any machine settings have been
4438 changed after the creation or not). For opened machines
4439 the value is set to @c false (and then follows to normal rules).
4440 </note>
4441 </desc>
4442 </attribute>
4443
4444 <attribute name="sessionState" type="SessionState" readonly="yes">
4445 <desc>Current session state for this machine.</desc>
4446 </attribute>
4447
4448 <attribute name="sessionType" type="wstring" readonly="yes">
4449 <desc>
4450 Type of the session. If <link to="#sessionState"/> is
4451 SessionSpawning or SessionOpen, this attribute contains the
4452 same value as passed to the
4453 <link to="IVirtualBox::openRemoteSession"/> method in the
4454 @a type parameter. If the session was opened directly using
4455 <link to="IVirtualBox::openSession"/>, or if
4456 <link to="#sessionState"/> is SessionClosed, the value of this
4457 attribute is an empty string.
4458 </desc>
4459 </attribute>
4460
4461 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4462 <desc>
4463 Identifier of the session process. This attribute contains the
4464 platform-dependent identifier of the process that has opened a
4465 direct session for this machine using the
4466 <link to="IVirtualBox::openSession"/> call. The returned value
4467 is only valid if <link to="#sessionState"/> is SessionOpen or
4468 SessionClosing (i.e. a session is currently open or being
4469 closed) by the time this property is read.
4470 </desc>
4471 </attribute>
4472
4473 <attribute name="state" type="MachineState" readonly="yes">
4474 <desc>Current execution state of this machine.</desc>
4475 </attribute>
4476
4477 <attribute name="lastStateChange" type="long long" readonly="yes">
4478 <desc>
4479 Time stamp of the last execution state change,
4480 in milliseconds since 1970-01-01 UTC.
4481 </desc>
4482 </attribute>
4483
4484 <attribute name="stateFilePath" type="wstring" readonly="yes">
4485 <desc>
4486 Full path to the file that stores the execution state of
4487 the machine when it is in the <link to="MachineState_Saved"/> state.
4488 <note>
4489 When the machine is not in the Saved state, this attribute is
4490 an empty string.
4491 </note>
4492 </desc>
4493 </attribute>
4494
4495 <attribute name="logFolder" type="wstring" readonly="yes">
4496 <desc>
4497 Full path to the folder that stores a set of rotated log files
4498 recorded during machine execution. The most recent log file is
4499 named <tt>VBox.log</tt>, the previous log file is
4500 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4501 in the current version).
4502 </desc>
4503 </attribute>
4504
4505 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4506 <desc>
4507 Current snapshot of this machine. This is @c null if the machine
4508 currently has no snapshots. If it is not @c null, then it was
4509 set by one of <link to="Console::takeSnapshot" />,
4510 <link to="Console::deleteSnapshot" />
4511 or <link to="Console::restoreSnapshot" />, depending on which
4512 was called last. See <link to="ISnapshot"/> for details.
4513 </desc>
4514 </attribute>
4515
4516 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4517 <desc>
4518 Number of snapshots taken on this machine. Zero means the
4519 machine doesn't have any snapshots.
4520 </desc>
4521 </attribute>
4522
4523 <attribute name="currentStateModified" type="boolean" readonly="yes">
4524 <desc>
4525 Returns @c true if the current state of the machine is not
4526 identical to the state stored in the current snapshot.
4527
4528 The current state is identical to the current snapshot only
4529 directly after one of the following calls are made:
4530
4531 <ul>
4532 <li><link to="IConsole::restoreSnapshot"/>
4533 </li>
4534 <li><link to="IConsole::takeSnapshot"/> (issued on a
4535 "powered off" or "saved" machine, for which
4536 <link to="#settingsModified"/> returns @c false)
4537 </li>
4538 <li><link to="IMachine::setCurrentSnapshot"/>
4539 </li>
4540 </ul>
4541
4542 The current state remains identical until one of the following
4543 happens:
4544 <ul>
4545 <li>settings of the machine are changed</li>
4546 <li>the saved state is discarded</li>
4547 <li>the current snapshot is discarded</li>
4548 <li>an attempt to execute the machine is made</li>
4549 </ul>
4550
4551 <note>
4552 For machines that don't have snapshots, this property is
4553 always @c false.
4554 </note>
4555 </desc>
4556 </attribute>
4557
4558 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4559 <desc>
4560 Collection of shared folders for this machine (permanent shared
4561 folders). These folders are shared automatically at machine startup
4562 and available only to the guest OS installed within this machine.
4563
4564 New shared folders are added to the collection using
4565 <link to="#createSharedFolder"/>. Existing shared folders can be
4566 removed using <link to="#removeSharedFolder"/>.
4567 </desc>
4568 </attribute>
4569
4570 <attribute name="clipboardMode" type="ClipboardMode">
4571 <desc>
4572 Synchronization mode between the host OS clipboard
4573 and the guest OS clipboard.
4574 </desc>
4575 </attribute>
4576
4577 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4578 <desc>
4579 A comma-separated list of simple glob patterns. Changes to guest
4580 properties whose name matches one of the patterns will generate an
4581 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4582 </desc>
4583 </attribute>
4584
4585 <attribute name="teleporterEnabled" type="boolean">
4586 <desc>
4587 When set to @a true, the virtual machine becomes a target teleporter
4588 the next time it is powered on. This can only set to @a true when the
4589 VM is in the @a PoweredOff or @a Aborted state.
4590
4591 This property is automatically set to @a false when the VM is powered
4592 on.
4593 </desc>
4594 </attribute>
4595
4596 <attribute name="teleporterPort" type="unsigned long">
4597 <desc>
4598 The TCP port the target teleporter will listen for incoming
4599 teleportations on.
4600
4601 0 means the port is automatically selected upon power on. The actual
4602 value can be read from this property while the machine is waiting for
4603 incoming teleportations.
4604 </desc>
4605 </attribute>
4606
4607 <attribute name="teleporterAddress" type="wstring">
4608 <desc>
4609 The address the target teleporter will listen on. If set to an empty
4610 string, it will listen on all addresses.
4611 </desc>
4612 </attribute>
4613
4614 <attribute name="teleporterPassword" type="wstring">
4615 <desc>
4616 The password the to check for on the target teleporter. This is just a
4617 very basic measure to prevent simple hacks and operators accidentally
4618 beaming a virtual machine to the wrong place.
4619 </desc>
4620 </attribute>
4621
4622 <method name="setBootOrder">
4623 <desc>
4624 Puts the given device to the specified position in
4625 the boot order.
4626
4627 To indicate that no device is associated with the given position,
4628 <link to="DeviceType_Null"/> should be used.
4629
4630 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4631
4632 <result name="E_INVALIDARG">
4633 Boot @a position out of range.
4634 </result>
4635 <result name="E_NOTIMPL">
4636 Booting from USB @a device currently not supported.
4637 </result>
4638
4639 </desc>
4640 <param name="position" type="unsigned long" dir="in">
4641 <desc>
4642 Position in the boot order (@c 1 to the total number of
4643 devices the machine can boot from, as returned by
4644 <link to="ISystemProperties::maxBootPosition"/>).
4645 </desc>
4646 </param>
4647 <param name="device" type="DeviceType" dir="in">
4648 <desc>
4649 The type of the device used to boot at the given position.
4650 </desc>
4651 </param>
4652 </method>
4653
4654 <method name="getBootOrder" const="yes">
4655 <desc>
4656 Returns the device type that occupies the specified
4657 position in the boot order.
4658
4659 @todo [remove?]
4660 If the machine can have more than one device of the returned type
4661 (such as hard disks), then a separate method should be used to
4662 retrieve the individual device that occupies the given position.
4663
4664 If here are no devices at the given position, then
4665 <link to="DeviceType_Null"/> is returned.
4666
4667 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4668
4669 <result name="E_INVALIDARG">
4670 Boot @a position out of range.
4671 </result>
4672
4673 </desc>
4674 <param name="position" type="unsigned long" dir="in">
4675 <desc>
4676 Position in the boot order (@c 1 to the total number of
4677 devices the machine can boot from, as returned by
4678 <link to="ISystemProperties::maxBootPosition"/>).
4679 </desc>
4680 </param>
4681 <param name="device" type="DeviceType" dir="return">
4682 <desc>
4683 Device at the given position.
4684 </desc>
4685 </param>
4686 </method>
4687
4688 <method name="attachDevice">
4689 <desc>
4690 Attaches a device and optionally mounts a medium to the given storage
4691 controller (<link to="IStorageController" />, identified by @a name),
4692 at the indicated port and device.
4693
4694 This method is intended for managing storage devices in general (it works
4695 for both fixed and removable media). For storage devices supporting removable
4696 media (such as DVDs and floppies), you can also use <link to="IMedium::mountMedium"/>
4697 for changing the media while the machine is running.
4698
4699 For the IDE bus, the @a controllerPort parameter can be either
4700 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4701 respectively. For each of these, @a device can then be either @c 0 or @c 1,
4702 to specify the master or the slave device, respectively. (In the
4703 default configuration of virtual machines, the secondary master is
4704 used for a CD/DVD drive.)
4705
4706 For an SATA controller, @a controllerPort must be a number ranging
4707 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4708 be a number ranging from @c 0 to @c 15.
4709
4710 For both SCSI and SATA, the @a device parameter is unused and must
4711 be @c 0.
4712
4713 For fixed media such as hard disks, the given medium identifier cannot
4714 be a zero UUID. It may be a zero UUID for removable media such as DVDs
4715 and floppies.
4716
4717 After calling this returns successfully, a new instance of
4718 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4719 attachments (<link to="IMachine::mediumAttachments"/>).
4720
4721 The specified device slot must not have a device attached to it,
4722 or this method will fail.
4723
4724 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4725 information about attaching media.
4726
4727 <note>
4728 You cannot attach a device to a running machine. Also, you cannot
4729 attach a device to a newly created machine until this machine's
4730 settings are saved to disk using <link to="#saveSettings"/>.
4731 </note>
4732 <note>
4733 If the medium is being attached indirectly, a new differencing medium
4734 will implicitly be created for it and attached instead. If the
4735 changes made to the machine settings (including this indirect
4736 attachment) are later cancelled using <link to="#discardSettings"/>,
4737 this implicitly created differencing medium will implicitly
4738 be deleted.
4739 </note>
4740
4741 <result name="E_INVALIDARG">
4742 SATA device, SATA port, IDE port or IDE slot out of range.
4743 </result>
4744 <result name="VBOX_E_INVALID_OBJECT_STATE">
4745 Attempt to attach medium to an unregistered virtual machine.
4746 </result>
4747 <result name="VBOX_E_INVALID_VM_STATE">
4748 Invalid machine state.
4749 </result>
4750 <result name="VBOX_E_OBJECT_IN_USE">
4751 Hard disk already attached to this or another virtual machine.
4752 </result>
4753
4754 </desc>
4755 <param name="name" type="wstring" dir="in">
4756 <desc>Name of the storage controller to attach the device to.</desc>
4757 </param>
4758 <param name="controllerPort" type="long" dir="in">
4759 <desc>Port to attach the device to.</desc>
4760 </param>
4761 <param name="device" type="long" dir="in">
4762 <desc>Device slot in the given port to attach the device to.</desc>
4763 </param>
4764 <param name="type" type="DeviceType" dir="in">
4765 <desc>Device type of the attached device.</desc>
4766 </param>
4767 <param name="id" type="uuid" mod="string" dir="in">
4768 <desc>UUID of the medium to mount. Zero UUID means do not mount any
4769 medium.</desc>
4770 </param>
4771 </method>
4772
4773 <method name="detachDevice">
4774 <desc>
4775 Detaches the device attached to a device slot of the specified bus.
4776
4777 Detaching the device from the virtual machine is deferred. This means
4778 that the medium remains associated with the machine when this method
4779 returns and gets actually de-associated only after a successful
4780 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4781 for more detailed information about attaching media.
4782
4783 <note>
4784 You cannot detach a device from a running machine.
4785 </note>
4786 <note>
4787 Detaching differencing media implicitly created by <link
4788 to="#attachDevice"/> for the indirect attachment using this
4789 method will <b>not</b> implicitly delete them. The
4790 <link to="IMedium::deleteStorage"/> operation should be
4791 explicitly performed by the caller after the medium is successfully
4792 detached and the settings are saved with
4793 <link to="#saveSettings"/>, if it is the desired action.
4794 </note>
4795
4796 <result name="VBOX_E_INVALID_VM_STATE">
4797 Attempt to detach medium from a running virtual machine.
4798 </result>
4799 <result name="VBOX_E_OBJECT_NOT_FOUND">
4800 No medium attached to given slot/bus.
4801 </result>
4802 <result name="VBOX_E_NOT_SUPPORTED">
4803 Medium format does not support storage deletion.
4804 </result>
4805
4806 </desc>
4807 <param name="name" type="wstring" dir="in">
4808 <desc>Name of the storage controller to detach the medium from.</desc>
4809 </param>
4810 <param name="controllerPort" type="long" dir="in">
4811 <desc>Port number to detach the medium from.</desc>
4812 </param>
4813 <param name="device" type="long" dir="in">
4814 <desc>Device slot number to detach the medium from.</desc>
4815 </param>
4816 </method>
4817
4818 <method name="passthroughDevice">
4819 <desc>
4820 Sets the passthrough mode of an existing DVD device. Changing the
4821 setting while the VM is running is forbidden. The setting is only used
4822 if at VM start the device is configured as a host DVD drive, in all
4823 other cases it is ignored. The device must already exist; see
4824 <link to="IMachine::attachDevice"/> for how to attach a new device.
4825
4826 The @a controllerPort and @a device parameters specify the device slot and
4827 have have the same meaning as with <link to="IMachine::attachDevice" />.
4828
4829 <result name="E_INVALIDARG">
4830 SATA device, SATA port, IDE port or IDE slot out of range.
4831 </result>
4832 <result name="VBOX_E_INVALID_OBJECT_STATE">
4833 Attempt to modify an unregistered virtual machine.
4834 </result>
4835 <result name="VBOX_E_INVALID_VM_STATE">
4836 Invalid machine state.
4837 </result>
4838
4839 </desc>
4840 <param name="name" type="wstring" dir="in">
4841 <desc>Name of the storage controller.</desc>
4842 </param>
4843 <param name="controllerPort" type="long" dir="in">
4844 <desc>Storage controller port.</desc>
4845 </param>
4846 <param name="device" type="long" dir="in">
4847 <desc>Device slot in the given port.</desc>
4848 </param>
4849 <param name="passthrough" type="boolean" dir="in">
4850 <desc>New value for the passthrough setting.</desc>
4851 </param>
4852 </method>
4853
4854 <method name="mountMedium">
4855 <desc>
4856 Mounts a medium (<link to="IMedium" />, identified
4857 by the given UUID @a id) to the given storage controller
4858 (<link to="IStorageController" />, identified by @a name),
4859 at the indicated port and device. The device must already exist;
4860 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4861
4862 This method is intended only for managing removable media, where the
4863 device is fixed but media is changeable at runtime (such as DVDs
4864 and floppies). It cannot be used for fixed media such as hard disks.
4865
4866 The @a controllerPort and @a device parameters specify the device slot and
4867 have have the same meaning as with <link to="IMachine::attachDevice" />.
4868
4869 The specified device slot can have a medium mounted, which will be
4870 unmounted first. Specifying a zero UUID (or an empty string) for
4871 @a medium does just an unmount.
4872
4873 See <link to="IMedium"/> for more detailed information about
4874 attaching media.
4875
4876 <result name="E_INVALIDARG">
4877 SATA device, SATA port, IDE port or IDE slot out of range.
4878 </result>
4879 <result name="VBOX_E_INVALID_OBJECT_STATE">
4880 Attempt to attach medium to an unregistered virtual machine.
4881 </result>
4882 <result name="VBOX_E_INVALID_VM_STATE">
4883 Invalid machine state.
4884 </result>
4885 <result name="VBOX_E_OBJECT_IN_USE">
4886 Medium already attached to this or another virtual machine.
4887 </result>
4888
4889 </desc>
4890 <param name="name" type="wstring" dir="in">
4891 <desc>Name of the storage controller to attach the medium to.</desc>
4892 </param>
4893 <param name="controllerPort" type="long" dir="in">
4894 <desc>Port to attach the medium to.</desc>
4895 </param>
4896 <param name="device" type="long" dir="in">
4897 <desc>Device slot in the given port to attach the medium to.</desc>
4898 </param>
4899 <param name="medium" type="uuid" mod="string" dir="in">
4900 <desc>UUID of the medium to attach. A zero UUID means unmount the
4901 currently mounted medium.</desc>
4902 </param>
4903 <param name="force" type="boolean" dir="in">
4904 <desc>Allows to force unmount/mount of a medium which is locked by
4905 theDevice slot in the given port to attach the medium to.</desc>
4906 </param>
4907 </method>
4908
4909 <method name="getMedium" const="yes">
4910 <desc>
4911 Returns the virtual medium attached to a device slot of the specified
4912 bus.
4913
4914 Note that if the medium was indirectly attached by
4915 <link to="#mountMedium"/> to the given device slot then this
4916 method will return not the same object as passed to the
4917 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4918 more detailed information about mounting a medium.
4919
4920 <result name="VBOX_E_OBJECT_NOT_FOUND">
4921 No medium attached to given slot/bus.
4922 </result>
4923
4924 </desc>
4925 <param name="name" type="wstring" dir="in">
4926 <desc>Name of the storage controller the medium is attached to.</desc>
4927 </param>
4928 <param name="controllerPort" type="long" dir="in">
4929 <desc>Port to query.</desc>
4930 </param>
4931 <param name="device" type="long" dir="in">
4932 <desc>Device slot in the given port to query.</desc>
4933 </param>
4934 <param name="medium" type="IMedium" dir="return">
4935 <desc>Attached medium object.</desc>
4936 </param>
4937 </method>
4938
4939 <method name="getMediumAttachmentsOfController" const="yes">
4940 <desc>
4941 Returns an array of medium attachments which are attached to the
4942 the controller with the given name.
4943
4944 <result name="VBOX_E_OBJECT_NOT_FOUND">
4945 A storage controller with given name doesn't exist.
4946 </result>
4947 </desc>
4948 <param name="name" type="wstring" dir="in"/>
4949 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4950 </method>
4951
4952 <method name="getMediumAttachment" const="yes">
4953 <desc>
4954 Returns a medium attachment which corresponds to the controller with
4955 the given name, on the given port and device slot.
4956
4957 <result name="VBOX_E_OBJECT_NOT_FOUND">
4958 No attachment exists for the given controller/port/device combination.
4959 </result>
4960 </desc>
4961 <param name="name" type="wstring" dir="in"/>
4962 <param name="controllerPort" type="long" dir="in"/>
4963 <param name="device" type="long" dir="in"/>
4964 <param name="attachment" type="IMediumAttachment" dir="return"/>
4965 </method>
4966
4967 <method name="getNetworkAdapter" const="yes">
4968 <desc>
4969 Returns the network adapter associated with the given slot.
4970 Slots are numbered sequentially, starting with zero. The total
4971 number of adapters per machine is defined by the
4972 <link to="ISystemProperties::networkAdapterCount"/> property,
4973 so the maximum slot number is one less than that property's value.
4974
4975 <result name="E_INVALIDARG">
4976 Invalid @a slot number.
4977 </result>
4978
4979 </desc>
4980 <param name="slot" type="unsigned long" dir="in"/>
4981 <param name="adapter" type="INetworkAdapter" dir="return"/>
4982 </method>
4983
4984 <method name="addStorageController">
4985 <desc>
4986 Adds a new storage controller (SCSI or SATA controller) to the
4987 machine and returns it as an instance of
4988 <link to="IStorageController" />.
4989
4990 @a name identifies the controller for subsequent calls such as
4991 <link to="#getStorageControllerByName" />,
4992 <link to="#getStorageControllerByInstance" />,
4993 <link to="#removeStorageController" />,
4994 <link to="#attachDevice" /> or <link to="#mountMedium" />.
4995
4996 After the controller has been added, you can set its exact
4997 type by setting the <link to="IStorageController::controllerType" />.
4998
4999 <result name="VBOX_E_OBJECT_IN_USE">
5000 A storage controller with given name exists already.
5001 </result>
5002 <result name="E_INVALIDARG">
5003 Invalid @a controllerType.
5004 </result>
5005 </desc>
5006 <param name="name" type="wstring" dir="in"/>
5007 <param name="connectionType" type="StorageBus" dir="in"/>
5008 <param name="controller" type="IStorageController" dir="return"/>
5009 </method>
5010
5011 <method name="getStorageControllerByName" const="yes">
5012 <desc>
5013 Returns a storage controller with the given name.
5014
5015 <result name="VBOX_E_OBJECT_NOT_FOUND">
5016 A storage controller with given name doesn't exist.
5017 </result>
5018 </desc>
5019 <param name="name" type="wstring" dir="in"/>
5020 <param name="storageController" type="IStorageController" dir="return"/>
5021 </method>
5022
5023 <method name="getStorageControllerByInstance" const="yes">
5024 <desc>
5025 Returns a storage controller with the given instance number.
5026
5027 <result name="VBOX_E_OBJECT_NOT_FOUND">
5028 A storage controller with given instance number doesn't exist.
5029 </result>
5030 </desc>
5031 <param name="instance" type="unsigned long" dir="in"/>
5032 <param name="storageController" type="IStorageController" dir="return"/>
5033 </method>
5034
5035 <method name="removeStorageController">
5036 <desc>
5037 Removes a storage controller from the machine.
5038
5039 <result name="VBOX_E_OBJECT_NOT_FOUND">
5040 A storage controller with given name doesn't exist.
5041 </result>
5042 </desc>
5043 <param name="name" type="wstring" dir="in"/>
5044 </method>
5045
5046 <method name="getSerialPort" const="yes">
5047 <desc>
5048 Returns the serial port associated with the given slot.
5049 Slots are numbered sequentially, starting with zero. The total
5050 number of serial ports per machine is defined by the
5051 <link to="ISystemProperties::serialPortCount"/> property,
5052 so the maximum slot number is one less than that property's value.
5053
5054 <result name="E_INVALIDARG">
5055 Invalid @a slot number.
5056 </result>
5057
5058 </desc>
5059 <param name="slot" type="unsigned long" dir="in"/>
5060 <param name="port" type="ISerialPort" dir="return"/>
5061 </method>
5062
5063 <method name="getParallelPort" const="yes">
5064 <desc>
5065 Returns the parallel port associated with the given slot.
5066 Slots are numbered sequentially, starting with zero. The total
5067 number of parallel ports per machine is defined by the
5068 <link to="ISystemProperties::parallelPortCount"/> property,
5069 so the maximum slot number is one less than that property's value.
5070
5071 <result name="E_INVALIDARG">
5072 Invalid @a slot number.
5073 </result>
5074
5075 </desc>
5076 <param name="slot" type="unsigned long" dir="in"/>
5077 <param name="port" type="IParallelPort" dir="return"/>
5078 </method>
5079
5080 <method name="getExtraDataKeys">
5081 <desc>
5082 Returns an array representing the machine-specific extra data keys
5083 which currently have values defined.
5084 </desc>
5085 <param name="value" type="wstring" dir="return" safearray="yes">
5086 <desc>Array of extra data keys.</desc>
5087 </param>
5088 </method>
5089
5090 <method name="getExtraData">
5091 <desc>
5092 Returns associated machine-specific extra data.
5093
5094 If the requested data @a key does not exist, this function will
5095 succeed and return an empty string in the @a value argument.
5096
5097 <result name="VBOX_E_FILE_ERROR">
5098 Settings file not accessible.
5099 </result>
5100 <result name="VBOX_E_XML_ERROR">
5101 Could not parse the settings file.
5102 </result>
5103
5104 </desc>
5105 <param name="key" type="wstring" dir="in">
5106 <desc>Name of the data key to get.</desc>
5107 </param>
5108 <param name="value" type="wstring" dir="return">
5109 <desc>Value of the requested data key.</desc>
5110 </param>
5111 </method>
5112
5113 <method name="setExtraData">
5114 <desc>
5115 Sets associated machine-specific extra data.
5116
5117 If you pass @c null or an empty string as a key @a value, the given
5118 @a key will be deleted.
5119
5120 <note>
5121 Before performing the actual data change, this method will ask all
5122 registered callbacks using the
5123 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
5124 notification for a permission. If one of the callbacks refuses the
5125 new value, the change will not be performed.
5126 </note>
5127 <note>
5128 On success, the
5129 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
5130 is called to inform all registered callbacks about a successful data
5131 change.
5132 </note>
5133 <note>
5134 This method can be called outside the machine session and therefore
5135 it's a caller's responsibility to handle possible race conditions
5136 when several clients change the same key at the same time.
5137 </note>
5138
5139 <result name="VBOX_E_FILE_ERROR">
5140 Settings file not accessible.
5141 </result>
5142 <result name="VBOX_E_XML_ERROR">
5143 Could not parse the settings file.
5144 </result>
5145
5146 </desc>
5147 <param name="key" type="wstring" dir="in">
5148 <desc>Name of the data key to set.</desc>
5149 </param>
5150 <param name="value" type="wstring" dir="in">
5151 <desc>Value to assign to the key.</desc>
5152 </param>
5153 </method>
5154
5155 <method name="getCpuProperty" const="yes">
5156 <desc>
5157 Returns the virtual CPU boolean value of the specified property.
5158
5159 <result name="E_INVALIDARG">
5160 Invalid property.
5161 </result>
5162
5163 </desc>
5164 <param name="property" type="CpuPropertyType" dir="in">
5165 <desc>
5166 Property type to query.
5167 </desc>
5168 </param>
5169 <param name="value" type="boolean" dir="return">
5170 <desc>
5171 Property value.
5172 </desc>
5173 </param>
5174 </method>
5175
5176 <method name="setCpuProperty">
5177 <desc>
5178 Sets the virtual CPU boolean value of the specified property.
5179
5180 <result name="E_INVALIDARG">
5181 Invalid property.
5182 </result>
5183
5184 </desc>
5185 <param name="property" type="CpuPropertyType" dir="in">
5186 <desc>
5187 Property type to query.
5188 </desc>
5189 </param>
5190 <param name="value" type="boolean" dir="in">
5191 <desc>
5192 Property value.
5193 </desc>
5194 </param>
5195 </method>
5196
5197 <method name="getCpuIdLeaf" const="yes">
5198 <desc>
5199 Returns the virtual CPU cpuid information for the specified leaf.
5200
5201 Currently supported index values for cpuid:
5202 Standard CPUID leafs: 0 - 0xA
5203 Extended CPUID leafs: 0x80000000 - 0x8000000A
5204
5205 See the Intel and AMD programmer's manuals for detailed information
5206 about the cpuid instruction and its leafs.
5207 <result name="E_INVALIDARG">
5208 Invalid id.
5209 </result>
5210
5211 </desc>
5212 <param name="id" type="unsigned long" dir="in">
5213 <desc>
5214 Cpuid leaf index.
5215 </desc>
5216 </param>
5217 <param name="valEax" type="unsigned long" dir="out">
5218 <desc>
5219 Cpuid leaf value for register eax.
5220 </desc>
5221 </param>
5222 <param name="valEbx" type="unsigned long" dir="out">
5223 <desc>
5224 Cpuid leaf value for register ebx.
5225 </desc>
5226 </param>
5227 <param name="valEcx" type="unsigned long" dir="out">
5228 <desc>
5229 Cpuid leaf value for register ecx.
5230 </desc>
5231 </param>
5232 <param name="valEdx" type="unsigned long" dir="out">
5233 <desc>
5234 Cpuid leaf value for register edx.
5235 </desc>
5236 </param>
5237 </method>
5238
5239 <method name="setCpuIdLeaf" const="yes">
5240 <desc>
5241 Sets the virtual CPU cpuid information for the specified leaf. Note that these values
5242 are not passed unmodified. VirtualBox clears features that it doesn't support.
5243
5244 Currently supported index values for cpuid:
5245 Standard CPUID leafs: 0 - 0xA
5246 Extended CPUID leafs: 0x80000000 - 0x8000000A
5247
5248 See the Intel and AMD programmer's manuals for detailed information
5249 about the cpuid instruction and its leafs.
5250
5251 Do not use this method unless you know exactly what you're doing. Misuse can lead to
5252 random crashes inside VMs.
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="in">
5264 <desc>
5265 Cpuid leaf value for register eax.
5266 </desc>
5267 </param>
5268 <param name="valEbx" type="unsigned long" dir="in">
5269 <desc>
5270 Cpuid leaf value for register ebx.
5271 </desc>
5272 </param>
5273 <param name="valEcx" type="unsigned long" dir="in">
5274 <desc>
5275 Cpuid leaf value for register ecx.
5276 </desc>
5277 </param>
5278 <param name="valEdx" type="unsigned long" dir="in">
5279 <desc>
5280 Cpuid leaf value for register edx.
5281 </desc>
5282 </param>
5283 </method>
5284
5285 <method name="removeCpuIdLeaf" const="yes">
5286 <desc>
5287 Removes the virtual CPU cpuid leaf for the specified index
5288
5289 <result name="E_INVALIDARG">
5290 Invalid id.
5291 </result>
5292
5293 </desc>
5294 <param name="id" type="unsigned long" dir="in">
5295 <desc>
5296 Cpuid leaf index.
5297 </desc>
5298 </param>
5299 </method>
5300
5301 <method name="removeAllCpuIdLeafs" const="yes">
5302 <desc>
5303 Removes all the virtual CPU cpuid leafs
5304 </desc>
5305 </method>
5306
5307 <method name="getHWVirtExProperty" const="yes">
5308 <desc>
5309 Returns the value of the specified hardware virtualization boolean property.
5310
5311 <result name="E_INVALIDARG">
5312 Invalid property.
5313 </result>
5314
5315 </desc>
5316 <param name="property" type="HWVirtExPropertyType" dir="in">
5317 <desc>
5318 Property type to query.
5319 </desc>
5320 </param>
5321 <param name="value" type="boolean" dir="return">
5322 <desc>
5323 Property value.
5324 </desc>
5325 </param>
5326 </method>
5327
5328 <method name="setHWVirtExProperty">
5329 <desc>
5330 Sets a new value for the specified hardware virtualization boolean property.
5331
5332 <result name="E_INVALIDARG">
5333 Invalid property.
5334 </result>
5335
5336 </desc>
5337 <param name="property" type="HWVirtExPropertyType" dir="in">
5338 <desc>
5339 Property type to set.
5340 </desc>
5341 </param>
5342 <param name="value" type="boolean" dir="in">
5343 <desc>
5344 New property value.
5345 </desc>
5346 </param>
5347 </method>
5348
5349 <method name="saveSettings">
5350 <desc>
5351 Saves any changes to machine settings made since the session
5352 has been opened or a new machine has been created, or since the
5353 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
5354 For registered machines, new settings become visible to all
5355 other VirtualBox clients after successful invocation of this
5356 method.
5357 <note>
5358 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
5359 notification event after the configuration has been successfully
5360 saved (only for registered machines).
5361 </note>
5362 <note>
5363 Calling this method is only valid on instances returned
5364 by <link to="ISession::machine"/> and on new machines
5365 created by <link to="IVirtualBox::createMachine"/> but not
5366 yet registered, or on unregistered machines after calling
5367 <link to="IVirtualBox::unregisterMachine"/>.
5368 </note>
5369
5370 <result name="VBOX_E_FILE_ERROR">
5371 Settings file not accessible.
5372 </result>
5373 <result name="VBOX_E_XML_ERROR">
5374 Could not parse the settings file.
5375 </result>
5376 <result name="E_ACCESSDENIED">
5377 Modification request refused.
5378 </result>
5379
5380 </desc>
5381 </method>
5382
5383 <method name="discardSettings">
5384 <desc>
5385 Discards any changes to the machine settings made since the session
5386 has been opened or since the last call to <link to="#saveSettings"/>
5387 or <link to="#discardSettings"/>.
5388 <note>
5389 Calling this method is only valid on instances returned
5390 by <link to="ISession::machine"/> and on new machines
5391 created by <link to="IVirtualBox::createMachine"/> or
5392 opened by <link to="IVirtualBox::openMachine"/> but not
5393 yet registered, or on unregistered machines after calling
5394 <link to="IVirtualBox::unregisterMachine"/>.
5395 </note>
5396
5397 <result name="VBOX_E_INVALID_VM_STATE">
5398 Virtual machine is not mutable.
5399 </result>
5400
5401 </desc>
5402 </method>
5403
5404 <method name="deleteSettings">
5405 <desc>
5406 Deletes the settings file of this machine from disk.
5407 The machine must not be registered in order for this operation
5408 to succeed.
5409 <note>
5410 <link to="#settingsModified"/> will return @c true after this
5411 method successfully returns.
5412 </note>
5413 <note>
5414 Calling this method is only valid on instances returned
5415 by <link to="ISession::machine"/> and on new machines
5416 created by <link to="IVirtualBox::createMachine"/> or
5417 opened by <link to="IVirtualBox::openMachine"/> but not
5418 yet registered, or on unregistered machines after calling
5419 <link to="IVirtualBox::unregisterMachine"/>.
5420 </note>
5421 <note>
5422 The deleted machine settings file can be restored (saved again)
5423 by calling <link to="#saveSettings"/>.
5424 </note>
5425
5426 <result name="VBOX_E_INVALID_VM_STATE">
5427 Cannot delete settings of a registered machine or
5428 machine not mutable.
5429 </result>
5430 <result name="VBOX_E_IPRT_ERROR">
5431 Could not delete the settings file.
5432 </result>
5433
5434 </desc>
5435 </method>
5436
5437 <method name="export">
5438 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5439 steps required to export VirtualBox machines to OVF.
5440 </desc>
5441
5442 <param name="aAppliance" type="IAppliance" dir="in">
5443 <desc>Appliance to export this machine to.</desc>
5444 </param>
5445 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5446 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5447 </param>
5448 </method >
5449
5450 <method name="getSnapshot">
5451 <desc>
5452 Returns a snapshot of this machine with the given UUID.
5453 A @c null UUID can be used to obtain the first snapshot
5454 taken on this machine. This is useful if you want to traverse
5455 the whole tree of snapshots starting from the root.
5456
5457 <result name="VBOX_E_OBJECT_NOT_FOUND">
5458 Virtual machine has no snapshots or snapshot not found.
5459 </result>
5460
5461 </desc>
5462 <param name="id" type="uuid" mod="string" dir="in">
5463 <desc>UUID of the snapshot to get</desc>
5464 </param>
5465 <param name="snapshot" type="ISnapshot" dir="return">
5466 <desc>Snapshot object with the given UUID.</desc>
5467 </param>
5468 </method>
5469
5470 <method name="findSnapshot">
5471 <desc>
5472 Returns a snapshot of this machine with the given name.
5473
5474 <result name="VBOX_E_OBJECT_NOT_FOUND">
5475 Virtual machine has no snapshots or snapshot not found.
5476 </result>
5477
5478 </desc>
5479 <param name="name" type="wstring" dir="in">
5480 <desc>Name of the snapshot to find</desc>
5481 </param>
5482 <param name="snapshot" type="ISnapshot" dir="return">
5483 <desc>Snapshot object with the given name.</desc>
5484 </param>
5485 </method>
5486
5487 <method name="setCurrentSnapshot">
5488 <desc>
5489 Sets the current snapshot of this machine.
5490 <note>
5491 In the current implementation, this operation is not
5492 implemented.
5493 </note>
5494 </desc>
5495 <param name="id" type="uuid" mod="string" dir="in">
5496 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5497 </param>
5498 </method>
5499
5500 <method name="createSharedFolder">
5501 <desc>
5502 Creates a new permanent shared folder by associating the given logical
5503 name with the given host path, adds it to the collection of shared
5504 folders and starts sharing it. Refer to the description of
5505 <link to="ISharedFolder"/> to read more about logical names.
5506
5507 <result name="VBOX_E_OBJECT_IN_USE">
5508 Shared folder already exists.
5509 </result>
5510 <result name="VBOX_E_FILE_ERROR">
5511 Shared folder @a hostPath not accessible.
5512 </result>
5513
5514 </desc>
5515 <param name="name" type="wstring" dir="in">
5516 <desc>Unique logical name of the shared folder.</desc>
5517 </param>
5518 <param name="hostPath" type="wstring" dir="in">
5519 <desc>Full path to the shared folder in the host file system.</desc>
5520 </param>
5521 <param name="writable" type="boolean" dir="in">
5522 <desc>Whether the share is writable or readonly</desc>
5523 </param>
5524 </method>
5525
5526 <method name="removeSharedFolder">
5527 <desc>
5528 Removes the permanent shared folder with the given name previously
5529 created by <link to="#createSharedFolder"/> from the collection of
5530 shared folders and stops sharing it.
5531
5532 <result name="VBOX_E_INVALID_VM_STATE">
5533 Virtual machine is not mutable.
5534 </result>
5535 <result name="VBOX_E_OBJECT_NOT_FOUND">
5536 Shared folder @a name does not exist.
5537 </result>
5538
5539 </desc>
5540 <param name="name" type="wstring" dir="in">
5541 <desc>Logical name of the shared folder to remove.</desc>
5542 </param>
5543 </method>
5544
5545 <method name="canShowConsoleWindow">
5546 <desc>
5547 Returns @c true if the VM console process can activate the
5548 console window and bring it to foreground on the desktop of
5549 the host PC.
5550 <note>
5551 This method will fail if a session for this machine is not
5552 currently open.
5553 </note>
5554
5555 <result name="VBOX_E_INVALID_VM_STATE">
5556 Machine session is not open.
5557 </result>
5558
5559 </desc>
5560 <param name="canShow" type="boolean" dir="return">
5561 <desc>
5562 @c true if the console window can be shown and @c false otherwise.
5563 </desc>
5564 </param>
5565 </method>
5566
5567 <method name="showConsoleWindow">
5568 <desc>
5569 Activates the console window and brings it to foreground on
5570 the desktop of the host PC. Many modern window managers on
5571 many platforms implement some sort of focus stealing
5572 prevention logic, so that it may be impossible to activate
5573 a window without the help of the currently active
5574 application. In this case, this method will return a non-zero
5575 identifier that represents the top-level window of the VM
5576 console process. The caller, if it represents a currently
5577 active process, is responsible to use this identifier (in a
5578 platform-dependent manner) to perform actual window
5579 activation.
5580 <note>
5581 This method will fail if a session for this machine is not
5582 currently open.
5583 </note>
5584
5585 <result name="VBOX_E_INVALID_VM_STATE">
5586 Machine session is not open.
5587 </result>
5588
5589 </desc>
5590 <param name="winId" type="unsigned long long" dir="return">
5591 <desc>
5592 Platform-dependent identifier of the top-level VM console
5593 window, or zero if this method has performed all actions
5594 necessary to implement the <i>show window</i> semantics for
5595 the given platform and/or VirtualBox front-end.
5596 </desc>
5597 </param>
5598 </method>
5599
5600 <method name="getGuestProperty">
5601 <desc>
5602 Reads an entry from the machine's guest property store.
5603
5604 <result name="VBOX_E_INVALID_VM_STATE">
5605 Machine session is not open.
5606 </result>
5607
5608 </desc>
5609 <param name="name" type="wstring" dir="in">
5610 <desc>
5611 The name of the property to read.
5612 </desc>
5613 </param>
5614 <param name="value" type="wstring" dir="out">
5615 <desc>
5616 The value of the property. If the property does not exist then this
5617 will be empty.
5618 </desc>
5619 </param>
5620 <param name="timestamp" type="unsigned long long" dir="out">
5621 <desc>
5622 The time at which the property was last modified, as seen by the
5623 server process.
5624 </desc>
5625 </param>
5626 <param name="flags" type="wstring" dir="out">
5627 <desc>
5628 Additional property parameters, passed as a comma-separated list of
5629 "name=value" type entries.
5630 </desc>
5631 </param>
5632 </method>
5633
5634 <method name="getGuestPropertyValue">
5635 <desc>
5636 Reads a value from the machine's guest property store.
5637
5638 <result name="VBOX_E_INVALID_VM_STATE">
5639 Machine session is not open.
5640 </result>
5641
5642 </desc>
5643 <param name="property" type="wstring" dir="in">
5644 <desc>
5645 The name of the property to read.
5646 </desc>
5647 </param>
5648 <param name="value" type="wstring" dir="return">
5649 <desc>
5650 The value of the property. If the property does not exist then this
5651 will be empty.
5652 </desc>
5653 </param>
5654 </method>
5655
5656 <method name="getGuestPropertyTimestamp">
5657 <desc>
5658 Reads a property timestamp from the machine's guest property store.
5659
5660 <result name="VBOX_E_INVALID_VM_STATE">
5661 Machine session is not open.
5662 </result>
5663
5664 </desc>
5665 <param name="property" type="wstring" dir="in">
5666 <desc>
5667 The name of the property to read.
5668 </desc>
5669 </param>
5670 <param name="value" type="unsigned long long" dir="return">
5671 <desc>
5672 The timestamp. If the property does not exist then this will be
5673 empty.
5674 </desc>
5675 </param>
5676 </method>
5677
5678 <method name="setGuestProperty">
5679 <desc>
5680 Sets, changes or deletes an entry in the machine's guest property
5681 store.
5682
5683 <result name="E_ACCESSDENIED">
5684 Property cannot be changed.
5685 </result>
5686 <result name="E_INVALIDARG">
5687 Invalid @a flags.
5688 </result>
5689 <result name="VBOX_E_INVALID_VM_STATE">
5690 Virtual machine is not mutable or session not open.
5691 </result>
5692 <result name="VBOX_E_INVALID_OBJECT_STATE">
5693 Cannot set transient property when machine not running.
5694 </result>
5695
5696 </desc>
5697 <param name="property" type="wstring" dir="in">
5698 <desc>
5699 The name of the property to set, change or delete.
5700 </desc>
5701 </param>
5702 <param name="value" type="wstring" dir="in">
5703 <desc>
5704 The new value of the property to set, change or delete. If the
5705 property does not yet exist and value is non-empty, it will be
5706 created. If the value is @c null or empty, the property will be
5707 deleted if it exists.
5708 </desc>
5709 </param>
5710 <param name="flags" type="wstring" dir="in">
5711 <desc>
5712 Additional property parameters, passed as a comma-separated list of
5713 "name=value" type entries.
5714 </desc>
5715 </param>
5716 </method>
5717
5718 <method name="setGuestPropertyValue">
5719 <desc>
5720 Sets, changes or deletes a value in the machine's guest property
5721 store. The flags field will be left unchanged or created empty for a
5722 new property.
5723
5724 <result name="E_ACCESSDENIED">
5725 Property cannot be changed.
5726 </result>
5727 <result name="VBOX_E_INVALID_VM_STATE">
5728 Virtual machine is not mutable or session not open.
5729 </result>
5730 <result name="VBOX_E_INVALID_OBJECT_STATE">
5731 Cannot set transient property when machine not running.
5732 </result>
5733 </desc>
5734
5735 <param name="property" type="wstring" dir="in">
5736 <desc>
5737 The name of the property to set, change or delete.
5738 </desc>
5739 </param>
5740 <param name="value" type="wstring" dir="in">
5741 <desc>
5742 The new value of the property to set, change or delete. If the
5743 property does not yet exist and value is non-empty, it will be
5744 created. If the value is @c null or empty, the property will be
5745 deleted if it exists.
5746 </desc>
5747 </param>
5748 </method>
5749
5750 <method name="enumerateGuestProperties">
5751 <desc>
5752 Return a list of the guest properties matching a set of patterns along
5753 with their values, time stamps and flags.
5754 </desc>
5755 <param name="patterns" type="wstring" dir="in">
5756 <desc>
5757 The patterns to match the properties against, separated by '|'
5758 characters. If this is empty or @c null, all properties will match.
5759 </desc>
5760 </param>
5761 <param name="name" type="wstring" dir="out" safearray="yes">
5762 <desc>
5763 The names of the properties returned.
5764 </desc>
5765 </param>
5766 <param name="value" type="wstring" dir="out" safearray="yes">
5767 <desc>
5768 The values of the properties returned. The array entries match the
5769 corresponding entries in the @a name array.
5770 </desc>
5771 </param>
5772 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5773 <desc>
5774 The time stamps of the properties returned. The array entries match
5775 the corresponding entries in the @a name array.
5776 </desc>
5777 </param>
5778 <param name="flags" type="wstring" dir="out" safearray="yes">
5779 <desc>
5780 The flags of the properties returned. The array entries match the
5781 corresponding entries in the @a name array.
5782 </desc>
5783 </param>
5784 </method>
5785
5786 <method name="querySavedThumbnailSize">
5787 <desc>
5788 Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.
5789 </desc>
5790 <param name="size" type="unsigned long" dir="out">
5791 <desc>
5792 Size of buffer required to store the bitmap.
5793 </desc>
5794 </param>
5795 <param name="width" type="unsigned long" dir="out">
5796 <desc>
5797 Bitmap width.
5798 </desc>
5799 </param>
5800 <param name="height" type="unsigned long" dir="out">
5801 <desc>
5802 Bitmap height.
5803 </desc>
5804 </param>
5805 </method>
5806
5807 <method name="readSavedThumbnailToArray">
5808 <desc>
5809 Thumbnail is retrieved to an array of bytes in uncompressed 32-bit BGRA or RGBA format.
5810 </desc>
5811 <param name="BGR" type="boolean" dir="in">
5812 <desc>
5813 How to order bytes in the pixel. A pixel consists of 4 bytes. If this parameter is true, then
5814 bytes order is: B, G, R, 0xFF. If this parameter is false, then bytes order is: R, G, B, 0xFF.
5815 </desc>
5816 </param>
5817 <param name="width" type="unsigned long" dir="out">
5818 <desc>
5819 Bitmap width.
5820 </desc>
5821 </param>
5822 <param name="height" type="unsigned long" dir="out">
5823 <desc>
5824 Bitmap height.
5825 </desc>
5826 </param>
5827 <param name="data" type="octet" dir="return" safearray="yes">
5828 <desc>
5829 Array with resulting bitmap data.
5830 </desc>
5831 </param>
5832 </method>
5833
5834 <method name="querySavedScreenshotPNGSize">
5835 <desc>
5836 Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.
5837 </desc>
5838 <param name="size" type="unsigned long" dir="out">
5839 <desc>
5840 Size of buffer required to store the PNG binary data.
5841 </desc>
5842 </param>
5843 <param name="width" type="unsigned long" dir="out">
5844 <desc>
5845 Image width.
5846 </desc>
5847 </param>
5848 <param name="height" type="unsigned long" dir="out">
5849 <desc>
5850 Image height.
5851 </desc>
5852 </param>
5853 </method>
5854
5855 <method name="readSavedScreenshotPNGToArray">
5856 <desc>
5857 Screenshot in PNG format is retrieved to an array of bytes.
5858 </desc>
5859 <param name="width" type="unsigned long" dir="out">
5860 <desc>
5861 Image width.
5862 </desc>
5863 </param>
5864 <param name="height" type="unsigned long" dir="out">
5865 <desc>
5866 Image height.
5867 </desc>
5868 </param>
5869 <param name="data" type="octet" dir="return" safearray="yes">
5870 <desc>
5871 Array with resulting PNG data.
5872 </desc>
5873 </param>
5874 </method>
5875</interface>
5876
5877 <!--
5878 // IConsole
5879 /////////////////////////////////////////////////////////////////////////
5880 -->
5881
5882 <interface
5883 name="IConsoleCallback" extends="$unknown"
5884 uuid="d6239535-bda2-4ef7-83f4-f4722e4a3b2c"
5885 wsmap="suppress"
5886 >
5887
5888 <desc>
5889 This interface is used by a client of the Main API that need to
5890 be notified of events. For example, a graphical user interface
5891 can use this to learn about machine state changes so they can
5892 update the list of virtual machines without having to rely
5893 on polling.
5894
5895 Whenever relevant events occur in VirtualBox, the callbacks in
5896 objects of this interface are called. In order for this to be
5897 useful, a client needs to create its own subclass that implements
5898 this interface in which the methods for the relevant callbacks
5899 are overridden. An instance of this subclass interface can then
5900 be passed to <link to="IConsole::registerCallback" />.
5901 </desc>
5902
5903 <method name="onMousePointerShapeChange">
5904 <desc>
5905 Notification when the guest mouse pointer shape has
5906 changed. The new shape data is given.
5907 </desc>
5908 <param name="visible" type="boolean" dir="in">
5909 <desc>
5910 Flag whether the pointer is visible.
5911 </desc>
5912 </param>
5913 <param name="alpha" type="boolean" dir="in">
5914 <desc>
5915 Flag whether the pointer has an alpha channel.
5916 </desc>
5917 </param>
5918 <param name="xHot" type="unsigned long" dir="in">
5919 <desc>
5920 The pointer hot spot x coordinate.
5921 </desc>
5922 </param>
5923 <param name="yHot" type="unsigned long" dir="in">
5924 <desc>
5925 The pointer hot spot y coordinate.
5926 </desc>
5927 </param>
5928 <param name="width" type="unsigned long" dir="in">
5929 <desc>
5930 Width of the pointer shape in pixels.
5931 </desc>
5932 </param>
5933 <param name="height" type="unsigned long" dir="in">
5934 <desc>
5935 Height of the pointer shape in pixels.
5936 </desc>
5937 </param>
5938 <param name="shape" type="octet" mod="ptr" dir="in">
5939 <desc>
5940 Address of the shape buffer.
5941
5942 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5943 followed by a 32-bpp XOR (color) mask.
5944
5945 For pointers without alpha channel the XOR mask pixels are 32
5946 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5947 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5948
5949 An AND mask is used for pointers with alpha channel, so if the
5950 callback does not support alpha, the pointer could be
5951 displayed as a normal color pointer.
5952
5953 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5954 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5955 height</tt>. The padding bits at the end of each scanline are
5956 undefined.
5957
5958 The XOR mask follows the AND mask on the next 4-byte aligned
5959 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5960 Bytes in the gap between the AND and the XOR mask are undefined.
5961 The XOR mask scanlines have no gap between them and the size of
5962 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5963
5964 <note>
5965 If @a shape is 0, only the pointer visibility is changed.
5966 </note>
5967 </desc>
5968 </param>
5969 </method>
5970
5971 <method name="onMouseCapabilityChange">
5972 <desc>
5973 Notification when the mouse capabilities reported by the
5974 guest have changed. The new capabilities are passed.
5975 </desc>
5976 <param name="supportsAbsolute" type="boolean" dir="in"/>
5977 <param name="needsHostCursor" type="boolean" dir="in"/>
5978 </method>
5979
5980 <method name="onKeyboardLedsChange">
5981 <desc>
5982 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5983 to alter the state of the keyboard LEDs.
5984 </desc>
5985 <param name="numLock" type="boolean" dir="in"/>
5986 <param name="capsLock" type="boolean" dir="in"/>
5987 <param name="scrollLock" type="boolean" dir="in"/>
5988 </method>
5989
5990 <method name="onStateChange">
5991 <desc>
5992 Notification when the execution state of the machine has changed.
5993 The new state will be given.
5994 </desc>
5995 <param name="state" type="MachineState" dir="in"/>
5996 </method>
5997
5998 <method name="onAdditionsStateChange">
5999 <desc>
6000 Notification when a Guest Additions property changes.
6001 Interested callees should query IGuest attributes to
6002 find out what has changed.
6003 </desc>
6004 </method>
6005
6006 <method name="onNetworkAdapterChange">
6007 <desc>
6008 Notification when a property of one of the
6009 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
6010 changes. Interested callees should use INetworkAdapter methods and
6011 attributes to find out what has changed.
6012 </desc>
6013 <param name="networkAdapter" type="INetworkAdapter" dir="in">
6014 <desc>Network adapter that is subject to change.</desc>
6015 </param>
6016 </method>
6017
6018 <method name="onSerialPortChange">
6019 <desc>
6020 Notification when a property of one of the
6021 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
6022 Interested callees should use ISerialPort methods and attributes
6023 to find out what has changed.
6024 </desc>
6025 <param name="serialPort" type="ISerialPort" dir="in">
6026 <desc>Serial port that is subject to change.</desc>
6027 </param>
6028 </method>
6029
6030 <method name="onParallelPortChange">
6031 <desc>
6032 Notification when a property of one of the
6033 virtual <link to="IMachine::getParallelPort">parallel ports</link>
6034 changes. Interested callees should use ISerialPort methods and
6035 attributes to find out what has changed.
6036 </desc>
6037 <param name="parallelPort" type="IParallelPort" dir="in">
6038 <desc>Parallel port that is subject to change.</desc>
6039 </param>
6040 </method>
6041
6042 <method name="onStorageControllerChange">
6043 <desc>
6044 Notification when a property of one of the
6045 virtual <link to="IMachine::storageControllers">storage controllers</link>
6046 changes. Interested callees should query the corresponding collections
6047 to find out what has changed.
6048 </desc>
6049 </method>
6050
6051 <method name="onMediumChange">
6052 <desc>
6053 Notification when a
6054 <link to="IMachine::mediumAttachments">medium attachment</link>
6055 changes.
6056 </desc>
6057 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
6058 <desc>Medium attachment that is subject to change.</desc>
6059 </param>
6060 </method>
6061
6062 <method name="onVRDPServerChange">
6063 <desc>
6064 Notification when a property of the
6065 <link to="IMachine::VRDPServer">VRDP server</link> changes.
6066 Interested callees should use IVRDPServer methods and attributes to
6067 find out what has changed.
6068 </desc>
6069 </method>
6070
6071 <method name="onRemoteDisplayInfoChange">
6072 <desc>
6073 Notification when the status of the VRDP server changes. Interested callees
6074 should use <link to="IConsole::RemoteDisplayInfo">IRemoteDisplayInfo</link>
6075 attributes to find out what is the current status.
6076 </desc>
6077 </method>
6078
6079 <method name="onUSBControllerChange">
6080 <desc>
6081 Notification when a property of the virtual
6082 <link to="IMachine::USBController">USB controller</link> changes.
6083 Interested callees should use IUSBController methods and attributes to
6084 find out what has changed.
6085 </desc>
6086 </method>
6087
6088 <method name="onUSBDeviceStateChange">
6089 <desc>
6090 Notification when a USB device is attached to or detached from
6091 the virtual USB controller.
6092
6093 This notification is sent as a result of the indirect
6094 request to attach the device because it matches one of the
6095 machine USB filters, or as a result of the direct request
6096 issued by <link to="IConsole::attachUSBDevice"/> or
6097 <link to="IConsole::detachUSBDevice"/>.
6098
6099 This notification is sent in case of both a succeeded and a
6100 failed request completion. When the request succeeds, the
6101 @a error parameter is @c null, and the given device has been
6102 already added to (when @a attached is @c true) or removed from
6103 (when @a attached is @c false) the collection represented by
6104 <link to="IConsole::USBDevices"/>. On failure, the collection
6105 doesn't change and the @a error parameter represents the error
6106 message describing the failure.
6107
6108 </desc>
6109 <param name="device" type="IUSBDevice" dir="in">
6110 <desc>Device that is subject to state change.</desc>
6111 </param>
6112 <param name="attached" type="boolean" dir="in">
6113 <desc>
6114 @c true if the device was attached and @c false otherwise.
6115 </desc>
6116 </param>
6117 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
6118 <desc>
6119 @c null on success or an error message object on failure.
6120 </desc>
6121 </param>
6122 </method>
6123
6124 <method name="onSharedFolderChange">
6125 <desc>
6126 Notification when a shared folder is added or removed.
6127 The @a scope argument defines one of three scopes:
6128 <link to="IVirtualBox::sharedFolders">global shared folders</link>
6129 (<link to="Scope_Global">Global</link>),
6130 <link to="IMachine::sharedFolders">permanent shared folders</link> of
6131 the machine (<link to="Scope_Machine">Machine</link>) or <link
6132 to="IConsole::sharedFolders">transient shared folders</link> of the
6133 machine (<link to="Scope_Session">Session</link>). Interested callees
6134 should use query the corresponding collections to find out what has
6135 changed.
6136 </desc>
6137 <param name="scope" type="Scope" dir="in">
6138 <desc>Scope of the notification.</desc>
6139 </param>
6140 </method>
6141
6142 <method name="onRuntimeError">
6143 <desc>
6144 Notification when an error happens during the virtual
6145 machine execution.
6146
6147 There are three kinds of runtime errors:
6148 <ul>
6149 <li><i>fatal</i></li>
6150 <li><i>non-fatal with retry</i></li>
6151 <li><i>non-fatal warnings</i></li>
6152 </ul>
6153
6154 <b>Fatal</b> errors are indicated by the @a fatal parameter set
6155 to @c true. In case of fatal errors, the virtual machine
6156 execution is always paused before calling this notification, and
6157 the notification handler is supposed either to immediately save
6158 the virtual machine state using <link to="IConsole::saveState"/>
6159 or power it off using <link to="IConsole::powerDown"/>.
6160 Resuming the execution can lead to unpredictable results.
6161
6162 <b>Non-fatal</b> errors and warnings are indicated by the
6163 @a fatal parameter set to @c false. If the virtual machine
6164 is in the Paused state by the time the error notification is
6165 received, it means that the user can <i>try to resume</i> the machine
6166 execution after attempting to solve the problem that caused the
6167 error. In this case, the notification handler is supposed
6168 to show an appropriate message to the user (depending on the
6169 value of the @a id parameter) that offers several actions such
6170 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
6171 wants to retry, the notification handler should continue
6172 the machine execution using the <link to="IConsole::resume"/>
6173 call. If the machine execution is not Paused during this
6174 notification, then it means this notification is a <i>warning</i>
6175 (for example, about a fatal condition that can happen very soon);
6176 no immediate action is required from the user, the machine
6177 continues its normal execution.
6178
6179 Note that in either case the notification handler
6180 <b>must not</b> perform any action directly on a thread
6181 where this notification is called. Everything it is allowed to
6182 do is to post a message to another thread that will then talk
6183 to the user and take the corresponding action.
6184
6185 Currently, the following error identifiers are known:
6186 <ul>
6187 <li><tt>"HostMemoryLow"</tt></li>
6188 <li><tt>"HostAudioNotResponding"</tt></li>
6189 <li><tt>"VDIStorageFull"</tt></li>
6190 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
6191 </ul>
6192
6193 <note>
6194 This notification is not designed to be implemented by
6195 more than one callback at a time. If you have multiple
6196 IConsoleCallback instances registered on the given
6197 IConsole object, make sure you simply do nothing but
6198 return @c S_OK from all but one of them that does actual
6199 user notification and performs necessary actions.
6200 </note>
6201
6202 </desc>
6203 <param name="fatal" type="boolean" dir="in">
6204 <desc>Whether the error is fatal or not</desc>
6205 </param>
6206 <param name="id" type="wstring" dir="in">
6207 <desc>Error identifier</desc>
6208 </param>
6209 <param name="message" type="wstring" dir="in">
6210 <desc>Optional error message</desc>
6211 </param>
6212 </method>
6213
6214 <method name="onCanShowWindow">
6215 <desc>
6216 Notification when a call to
6217 <link to="IMachine::canShowConsoleWindow"/> is made by a
6218 front-end to check if a subsequent call to
6219 <link to="IMachine::showConsoleWindow"/> can succeed.
6220
6221 The callee should give an answer appropriate to the current
6222 machine state in the @a canShow argument. This answer must
6223 remain valid at least until the next
6224 <link to="IConsole::state">machine state</link> change.
6225
6226 <note>
6227 This notification is not designed to be implemented by
6228 more than one callback at a time. If you have multiple
6229 IConsoleCallback instances registered on the given
6230 IConsole object, make sure you simply do nothing but
6231 return @c true and @c S_OK from all but one of them that
6232 actually manages console window activation.
6233 </note>
6234 </desc>
6235 <param name="canShow" type="boolean" dir="return">
6236 <desc>
6237 @c true if the console window can be shown and @c false otherwise.
6238 </desc>
6239 </param>
6240 </method>
6241
6242 <method name="onShowWindow">
6243 <desc>
6244 Notification when a call to
6245 <link to="IMachine::showConsoleWindow"/>
6246 requests the console window to be activated and brought to
6247 foreground on the desktop of the host PC.
6248
6249 This notification should cause the VM console process to
6250 perform the requested action as described above. If it is
6251 impossible to do it at a time of this notification, this
6252 method should return a failure.
6253
6254 Note that many modern window managers on many platforms
6255 implement some sort of focus stealing prevention logic, so
6256 that it may be impossible to activate a window without the
6257 help of the currently active application (which is supposedly
6258 an initiator of this notification). In this case, this method
6259 must return a non-zero identifier that represents the
6260 top-level window of the VM console process. The caller, if it
6261 represents a currently active process, is responsible to use
6262 this identifier (in a platform-dependent manner) to perform
6263 actual window activation.
6264
6265 This method must set @a winId to zero if it has performed all
6266 actions necessary to complete the request and the console
6267 window is now active and in foreground, to indicate that no
6268 further action is required on the caller's side.
6269
6270 <note>
6271 This notification is not designed to be implemented by
6272 more than one callback at a time. If you have multiple
6273 IConsoleCallback instances registered on the given
6274 IConsole object, make sure you simply do nothing but
6275 return @c S_OK from all but one of them that actually
6276 manages console window activation.
6277 </note>
6278 </desc>
6279 <param name="winId" type="unsigned long long" dir="return">
6280 <desc>
6281 Platform-dependent identifier of the top-level VM console
6282 window, or zero if this method has performed all actions
6283 necessary to implement the <i>show window</i> semantics for
6284 the given platform and/or this VirtualBox front-end.
6285 </desc>
6286 </param>
6287 </method>
6288
6289 </interface>
6290
6291 <interface
6292 name="IRemoteDisplayInfo" extends="$unknown"
6293 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
6294 wsmap="struct"
6295 >
6296 <desc>
6297 Contains information about the remote display (VRDP) capabilities and status.
6298 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
6299 </desc>
6300
6301 <attribute name="active" type="boolean" readonly="yes">
6302 <desc>
6303 Whether the remote display connection is active.
6304 </desc>
6305 </attribute>
6306
6307 <attribute name="port" type="long" readonly="yes">
6308 <desc>
6309 VRDP server port number. If this property is equal to <tt>0</tt>, then
6310 the VRDP server failed to start, usually because there are no free TCP
6311 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
6312 server has not yet been started.
6313 </desc>
6314 </attribute>
6315
6316 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
6317 <desc>
6318 How many times a client connected.
6319 </desc>
6320 </attribute>
6321
6322 <attribute name="beginTime" type="long long" readonly="yes">
6323 <desc>
6324 When the last connection was established, in milliseconds since 1970-01-01 UTC.
6325 </desc>
6326 </attribute>
6327
6328 <attribute name="endTime" type="long long" readonly="yes">
6329 <desc>
6330 When the last connection was terminated or the current time, if
6331 connection is still active, in milliseconds since 1970-01-01 UTC.
6332 </desc>
6333 </attribute>
6334
6335 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
6336 <desc>
6337 How many bytes were sent in last or current, if still active, connection.
6338 </desc>
6339 </attribute>
6340
6341 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
6342 <desc>
6343 How many bytes were sent in all connections.
6344 </desc>
6345 </attribute>
6346
6347 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
6348 <desc>
6349 How many bytes were received in last or current, if still active, connection.
6350 </desc>
6351 </attribute>
6352
6353 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
6354 <desc>
6355 How many bytes were received in all connections.
6356 </desc>
6357 </attribute>
6358
6359 <attribute name="user" type="wstring" readonly="yes">
6360 <desc>
6361 Login user name supplied by the client.
6362 </desc>
6363 </attribute>
6364
6365 <attribute name="domain" type="wstring" readonly="yes">
6366 <desc>
6367 Login domain name supplied by the client.
6368 </desc>
6369 </attribute>
6370
6371 <attribute name="clientName" type="wstring" readonly="yes">
6372 <desc>
6373 The client name supplied by the client.
6374 </desc>
6375 </attribute>
6376
6377 <attribute name="clientIP" type="wstring" readonly="yes">
6378 <desc>
6379 The IP address of the client.
6380 </desc>
6381 </attribute>
6382
6383 <attribute name="clientVersion" type="unsigned long" readonly="yes">
6384 <desc>
6385 The client software version number.
6386 </desc>
6387 </attribute>
6388
6389 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
6390 <desc>
6391 Public key exchange method used when connection was established.
6392 Values: 0 - RDP4 public key exchange scheme.
6393 1 - X509 certificates were sent to client.
6394 </desc>
6395 </attribute>
6396
6397 </interface>
6398
6399 <interface
6400 name="IConsole" extends="$unknown"
6401 uuid="55dd56a5-1d1d-4d81-b742-b082b9571be6"
6402 wsmap="managed"
6403 >
6404 <desc>
6405 The IConsole interface represents an interface to control virtual
6406 machine execution.
6407
6408 The console object that implements the IConsole interface is obtained
6409 from a session object after the session for the given machine has been
6410 opened using one of <link to="IVirtualBox::openSession"/>,
6411 <link to="IVirtualBox::openRemoteSession"/> or
6412 <link to="IVirtualBox::openExistingSession"/> methods.
6413
6414 Methods of the IConsole interface allow the caller to query the current
6415 virtual machine execution state, pause the machine or power it down, save
6416 the machine state or take a snapshot, attach and detach removable media
6417 and so on.
6418
6419 <see>ISession</see>
6420 </desc>
6421
6422 <attribute name="machine" type="IMachine" readonly="yes">
6423 <desc>
6424 Machine object this console is sessioned with.
6425 <note>
6426 This is a convenience property, it has the same value as
6427 <link to="ISession::machine"/> of the corresponding session
6428 object.
6429 </note>
6430 </desc>
6431 </attribute>
6432
6433 <attribute name="state" type="MachineState" readonly="yes">
6434 <desc>
6435 Current execution state of the machine.
6436 <note>
6437 This property always returns the same value as the corresponding
6438 property of the IMachine object this console is sessioned with.
6439 For the process that owns (executes) the VM, this is the
6440 preferable way of querying the VM state, because no IPC
6441 calls are made.
6442 </note>
6443 </desc>
6444 </attribute>
6445
6446 <attribute name="guest" type="IGuest" readonly="yes">
6447 <desc>Guest object.</desc>
6448 </attribute>
6449
6450 <attribute name="keyboard" type="IKeyboard" readonly="yes">
6451 <desc>
6452 Virtual keyboard object.
6453 <note>
6454 If the machine is not running, any attempt to use
6455 the returned object will result in an error.
6456 </note>
6457 </desc>
6458 </attribute>
6459
6460 <attribute name="mouse" type="IMouse" readonly="yes">
6461 <desc>
6462 Virtual mouse object.
6463 <note>
6464 If the machine is not running, any attempt to use
6465 the returned object will result in an error.
6466 </note>
6467 </desc>
6468 </attribute>
6469
6470 <attribute name="display" type="IDisplay" readonly="yes">
6471 <desc>Virtual display object.
6472 <note>
6473 If the machine is not running, any attempt to use
6474 the returned object will result in an error.
6475 </note>
6476 </desc>
6477 </attribute>
6478
6479 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6480 <desc>Debugging interface.</desc>
6481 </attribute>
6482
6483 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6484 <desc>
6485 Collection of USB devices currently attached to the virtual
6486 USB controller.
6487 <note>
6488 The collection is empty if the machine is not running.
6489 </note>
6490 </desc>
6491 </attribute>
6492
6493 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6494 <desc>
6495 List of USB devices currently attached to the remote VRDP client.
6496 Once a new device is physically attached to the remote host computer,
6497 it appears in this list and remains there until detached.
6498 </desc>
6499 </attribute>
6500
6501 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6502 <desc>
6503 Collection of shared folders for the current session. These folders
6504 are called transient shared folders because they are available to the
6505 guest OS running inside the associated virtual machine only for the
6506 duration of the session (as opposed to
6507 <link to="IMachine::sharedFolders"/> which represent permanent shared
6508 folders). When the session is closed (e.g. the machine is powered down),
6509 these folders are automatically discarded.
6510
6511 New shared folders are added to the collection using
6512 <link to="#createSharedFolder"/>. Existing shared folders can be
6513 removed using <link to="#removeSharedFolder"/>.
6514 </desc>
6515 </attribute>
6516
6517 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6518 <desc>
6519 Interface that provides information on Remote Display (VRDP) connection.
6520 </desc>
6521 </attribute>
6522
6523 <method name="powerUp">
6524 <desc>
6525 Starts the virtual machine execution using the current machine
6526 state (that is, its current execution state, current settings and
6527 current storage devices).
6528
6529 If the machine is powered off or aborted, the execution will
6530 start from the beginning (as if the real hardware were just
6531 powered on).
6532
6533 If the machine is in the <link to="MachineState_Saved"/> state,
6534 it will continue its execution the point where the state has
6535 been saved.
6536
6537 <note>
6538 Unless you are trying to write a new VirtualBox front-end that
6539 performs direct machine execution (like the VirtualBox or VBoxSDL
6540 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6541 session opened by <link to="IVirtualBox::openSession"/> and use this
6542 session only to change virtual machine settings. If you simply want to
6543 start virtual machine execution using one of the existing front-ends
6544 (for example the VirtualBox GUI or headless server), simply use
6545 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6546 power up the machine automatically for you.
6547 </note>
6548
6549 <see>#saveState</see>
6550 <result name="VBOX_E_INVALID_VM_STATE">
6551 Virtual machine already running.
6552 </result>
6553 <result name="VBOX_E_HOST_ERROR">
6554 Host interface does not exist or name not set.
6555 </result>
6556 <result name="VBOX_E_FILE_ERROR">
6557 Invalid saved state file.
6558 </result>
6559 </desc>
6560 <param name="progress" type="IProgress" dir="return">
6561 <desc>Progress object to track the operation completion.</desc>
6562 </param>
6563 </method>
6564
6565 <method name="powerUpPaused">
6566 <desc>
6567 Identical to powerUp except that the VM will enter the
6568 <link to="MachineState_Paused"/> state, instead of
6569 <link to="MachineState_Running"/>.
6570
6571 <see>#powerUp</see>
6572 <result name="VBOX_E_INVALID_VM_STATE">
6573 Virtual machine already running.
6574 </result>
6575 <result name="VBOX_E_HOST_ERROR">
6576 Host interface does not exist or name not set.
6577 </result>
6578 <result name="VBOX_E_FILE_ERROR">
6579 Invalid saved state file.
6580 </result>
6581 </desc>
6582 <param name="progress" type="IProgress" dir="return">
6583 <desc>Progress object to track the operation completion.</desc>
6584 </param>
6585 </method>
6586
6587 <method name="powerDown">
6588 <desc>
6589 Initiates the power down procedure to stop the virtual machine
6590 execution.
6591
6592 The completion of the power down procedure is tracked using the returned
6593 IProgress object. After the operation is complete, the machine will go
6594 to the PoweredOff state.
6595 <result name="VBOX_E_INVALID_VM_STATE">
6596 Virtual machine must be Running, Paused or Stuck to be powered down.
6597 </result>
6598 </desc>
6599 <param name="progress" type="IProgress" dir="return">
6600 <desc>Progress object to track the operation completion.</desc>
6601 </param>
6602 </method>
6603
6604 <method name="reset">
6605 <desc>Resets the virtual machine.
6606 <result name="VBOX_E_INVALID_VM_STATE">
6607 Virtual machine not in Running state.
6608 </result>
6609 <result name="VBOX_E_VM_ERROR">
6610 Virtual machine error in reset operation.
6611 </result>
6612 </desc>
6613 </method>
6614
6615 <method name="pause">
6616 <desc>Pauses the virtual machine execution.
6617 <result name="VBOX_E_INVALID_VM_STATE">
6618 Virtual machine not in Running state.
6619 </result>
6620 <result name="VBOX_E_VM_ERROR">
6621 Virtual machine error in suspend operation.
6622 </result>
6623 </desc>
6624 </method>
6625
6626 <method name="resume">
6627 <desc>Resumes the virtual machine execution.
6628 <result name="VBOX_E_INVALID_VM_STATE">
6629 Virtual machine not in Paused state.
6630 </result>
6631 <result name="VBOX_E_VM_ERROR">
6632 Virtual machine error in resume operation.
6633 </result>
6634 </desc>
6635 </method>
6636
6637 <method name="powerButton">
6638 <desc>Sends the ACPI power button event to the guest.
6639 <result name="VBOX_E_INVALID_VM_STATE">
6640 Virtual machine not in Running state.
6641 </result>
6642 <result name="VBOX_E_PDM_ERROR">
6643 Controlled power off failed.
6644 </result>
6645 </desc>
6646 </method>
6647
6648 <method name="sleepButton">
6649 <desc>Sends the ACPI sleep button event to the guest.
6650 <result name="VBOX_E_INVALID_VM_STATE">
6651 Virtual machine not in Running state.
6652 </result>
6653 <result name="VBOX_E_PDM_ERROR">
6654 Sending sleep button event failed.
6655 </result>
6656 </desc>
6657 </method>
6658
6659 <method name="getPowerButtonHandled">
6660 <desc>Checks if the last power button event was handled by guest.
6661 <result name="VBOX_E_PDM_ERROR">
6662 Checking if the event was handled by the guest OS failed.
6663 </result>
6664 </desc>
6665 <param name="handled" type="boolean" dir="return"/>
6666 </method>
6667
6668 <method name="getGuestEnteredACPIMode">
6669 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6670 G1 (sleeping). If this method returns @c false, the guest will
6671 most likely not respond to external ACPI events.
6672 <result name="VBOX_E_INVALID_VM_STATE">
6673 Virtual machine not in Running state.
6674 </result>
6675 </desc>
6676 <param name="entered" type="boolean" dir="return"/>
6677 </method>
6678
6679 <method name="saveState">
6680 <desc>
6681 Saves the current execution state of a running virtual machine
6682 and stops its execution.
6683
6684 After this operation completes, the machine will go to the
6685 Saved state. Next time it is powered up, this state will
6686 be restored and the machine will continue its execution from
6687 the place where it was saved.
6688
6689 This operation differs from taking a snapshot to the effect
6690 that it doesn't create new differencing media. Also, once
6691 the machine is powered up from the state saved using this method,
6692 the saved state is deleted, so it will be impossible to return
6693 to this state later.
6694
6695 <note>
6696 On success, this method implicitly calls
6697 <link to="IMachine::saveSettings"/> to save all current machine
6698 settings (including runtime changes to the DVD medium, etc.).
6699 Together with the impossibility to change any VM settings when it is
6700 in the Saved state, this guarantees adequate hardware
6701 configuration of the machine when it is restored from the saved
6702 state file.
6703 </note>
6704
6705 <note>
6706 The machine must be in the Running or Paused state, otherwise
6707 the operation will fail.
6708 </note>
6709 <result name="VBOX_E_INVALID_VM_STATE">
6710 Virtual machine state neither Running nor Paused.
6711 </result>
6712 <result name="VBOX_E_FILE_ERROR">
6713 Failed to create directory for saved state file.
6714 </result>
6715
6716 <see><link to="#takeSnapshot"/></see>
6717 </desc>
6718 <param name="progress" type="IProgress" dir="return">
6719 <desc>Progress object to track the operation completion.</desc>
6720 </param>
6721 </method>
6722
6723 <method name="adoptSavedState">
6724 <desc>
6725 Associates the given saved state file to the virtual machine.
6726
6727 On success, the machine will go to the Saved state. Next time it is
6728 powered up, it will be restored from the adopted saved state and
6729 continue execution from the place where the saved state file was
6730 created.
6731
6732 The specified saved state file path may be absolute or relative to the
6733 folder the VM normally saves the state to (usually,
6734 <link to="IMachine::snapshotFolder"/>).
6735
6736 <note>
6737 It's a caller's responsibility to make sure the given saved state
6738 file is compatible with the settings of this virtual machine that
6739 represent its virtual hardware (memory size, storage disk configuration
6740 etc.). If there is a mismatch, the behavior of the virtual machine
6741 is undefined.
6742 </note>
6743 <result name="VBOX_E_INVALID_VM_STATE">
6744 Virtual machine state neither PoweredOff nor Aborted.
6745 </result>
6746 </desc>
6747 <param name="savedStateFile" type="wstring" dir="in">
6748 <desc>Path to the saved state file to adopt.</desc>
6749 </param>
6750 </method>
6751
6752 <method name="forgetSavedState">
6753 <desc>
6754 Forgets the saved state of the virtual machine previously created
6755 by <link to="#saveState"/>. Next time the machine is powered up, a
6756 clean boot will occur. If @a remove is @c true the saved state file
6757 is deleted.
6758 <note>
6759 This operation is equivalent to resetting or powering off
6760 the machine without doing a proper shutdown in the guest OS.
6761 </note>
6762 <result name="VBOX_E_INVALID_VM_STATE">
6763 Virtual machine not in state Saved.
6764 </result>
6765 </desc>
6766 <param name="remove" type="boolean" dir="in">
6767 <desc>If @c true remove the saved state file.</desc>
6768 </param>
6769 </method>
6770
6771 <method name="getDeviceActivity">
6772 <desc>
6773 Gets the current activity type of a given device or device group.
6774 <result name="E_INVALIDARG">
6775 Invalid device type.
6776 </result>
6777 </desc>
6778 <param name="type" type="DeviceType" dir="in"/>
6779 <param name="activity" type="DeviceActivity" dir="return"/>
6780 </method>
6781
6782 <method name="attachUSBDevice">
6783 <desc>
6784 Attaches a host USB device with the given UUID to the
6785 USB controller of the virtual machine.
6786
6787 The device needs to be in one of the following states:
6788 <link to="USBDeviceState_Busy"/>,
6789 <link to="USBDeviceState_Available"/> or
6790 <link to="USBDeviceState_Held"/>,
6791 otherwise an error is immediately returned.
6792
6793 When the device state is
6794 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6795 be returned if the host computer refuses to release it for some reason.
6796
6797 <see>IUSBController::deviceFilters, USBDeviceState</see>
6798 <result name="VBOX_E_INVALID_VM_STATE">
6799 Virtual machine state neither Running nor Paused.
6800 </result>
6801 <result name="VBOX_E_PDM_ERROR">
6802 Virtual machine does not have a USB controller.
6803 </result>
6804 </desc>
6805 <param name="id" type="uuid" mod="string" dir="in">
6806 <desc>UUID of the host USB device to attach.</desc>
6807 </param>
6808 </method>
6809
6810 <method name="detachUSBDevice">
6811 <desc>
6812 Detaches an USB device with the given UUID from the USB controller
6813 of the virtual machine.
6814
6815 After this method succeeds, the VirtualBox server re-initiates
6816 all USB filters as if the device were just physically attached
6817 to the host, but filters of this machine are ignored to avoid
6818 a possible automatic re-attachment.
6819
6820 <see>IUSBController::deviceFilters, USBDeviceState</see>
6821
6822 <result name="VBOX_E_PDM_ERROR">
6823 Virtual machine does not have a USB controller.
6824 </result>
6825 <result name="E_INVALIDARG">
6826 USB device not attached to this virtual machine.
6827 </result>
6828 </desc>
6829 <param name="id" type="uuid" mod="string" dir="in">
6830 <desc>UUID of the USB device to detach.</desc>
6831 </param>
6832 <param name="device" type="IUSBDevice" dir="return">
6833 <desc>Detached USB device.</desc>
6834 </param>
6835 </method>
6836
6837 <method name="findUSBDeviceByAddress">
6838 <desc>
6839 Searches for a USB device with the given host address.
6840
6841 <result name="VBOX_E_OBJECT_NOT_FOUND">
6842 Given @c name does not correspond to any USB device.
6843 </result>
6844
6845 <see>IUSBDevice::address</see>
6846 </desc>
6847 <param name="name" type="wstring" dir="in">
6848 <desc>
6849 Address of the USB device (as assigned by the host) to
6850 search for.
6851 </desc>
6852 </param>
6853 <param name="device" type="IUSBDevice" dir="return">
6854 <desc>Found USB device object.</desc>
6855 </param>
6856 </method>
6857
6858 <method name="findUSBDeviceById">
6859 <desc>
6860 Searches for a USB device with the given UUID.
6861
6862 <result name="VBOX_E_OBJECT_NOT_FOUND">
6863 Given @c id does not correspond to any USB device.
6864 </result>
6865
6866 <see>IUSBDevice::id</see>
6867 </desc>
6868 <param name="id" type="uuid" mod="string" dir="in">
6869 <desc>UUID of the USB device to search for.</desc>
6870 </param>
6871 <param name="device" type="IUSBDevice" dir="return">
6872 <desc>Found USB device object.</desc>
6873 </param>
6874 </method>
6875
6876 <method name="createSharedFolder">
6877 <desc>
6878 Creates a transient new shared folder by associating the given logical
6879 name with the given host path, adds it to the collection of shared
6880 folders and starts sharing it. Refer to the description of
6881 <link to="ISharedFolder"/> to read more about logical names.
6882
6883 <result name="VBOX_E_INVALID_VM_STATE">
6884 Virtual machine in Saved state or currently changing state.
6885 </result>
6886 <result name="VBOX_E_FILE_ERROR">
6887 Shared folder already exists or not accessible.
6888 </result>
6889 </desc>
6890 <param name="name" type="wstring" dir="in">
6891 <desc>Unique logical name of the shared folder.</desc>
6892 </param>
6893 <param name="hostPath" type="wstring" dir="in">
6894 <desc>Full path to the shared folder in the host file system.</desc>
6895 </param>
6896 <param name="writable" type="boolean" dir="in">
6897 <desc>Whether the share is writable or readonly</desc>
6898 </param>
6899 </method>
6900
6901 <method name="removeSharedFolder">
6902 <desc>
6903 Removes a transient shared folder with the given name previously
6904 created by <link to="#createSharedFolder"/> from the collection of
6905 shared folders and stops sharing it.
6906 <result name="VBOX_E_INVALID_VM_STATE">
6907 Virtual machine in Saved state or currently changing state.
6908 </result>
6909 <result name="VBOX_E_FILE_ERROR">
6910 Shared folder does not exists.
6911 </result>
6912 </desc>
6913 <param name="name" type="wstring" dir="in">
6914 <desc>Logical name of the shared folder to remove.</desc>
6915 </param>
6916 </method>
6917
6918 <method name="takeSnapshot">
6919 <desc>
6920 Saves the current execution state
6921 and all settings of the machine and creates differencing images
6922 for all normal (non-independent) media.
6923 See <link to="ISnapshot" /> for an introduction to snapshots.
6924
6925 This method can be called for a PoweredOff, Saved (see
6926 <link to="#saveState"/>), Running or
6927 Paused virtual machine. When the machine is PoweredOff, an
6928 offline snapshot is created. When the machine is Running a live
6929 snapshot is created, and an online snapshot is is created when Paused.
6930
6931 The taken snapshot is always based on the
6932 <link to="IMachine::currentSnapshot">current snapshot</link>
6933 of the associated virtual machine and becomes a new current snapshot.
6934
6935 <note>
6936 This method implicitly calls <link to="IMachine::saveSettings"/> to
6937 save all current machine settings before taking an offline snapshot.
6938 </note>
6939
6940 <result name="VBOX_E_INVALID_VM_STATE">
6941 Virtual machine currently changing state.
6942 </result>
6943 </desc>
6944 <param name="name" type="wstring" dir="in">
6945 <desc>Short name for the snapshot.</desc>
6946 </param>
6947 <param name="description" type="wstring" dir="in">
6948 <desc>Optional description of the snapshot.</desc>
6949 </param>
6950 <param name="progress" type="IProgress" dir="return">
6951 <desc>Progress object to track the operation completion.</desc>
6952 </param>
6953 </method>
6954
6955 <method name="deleteSnapshot">
6956 <desc>
6957 Starts discarding the specified snapshot asynchronously.
6958 See <link to="ISnapshot" /> for an introduction to snapshots.
6959
6960 The execution state and settings of the associated machine stored in
6961 the snapshot will be deleted. The contents of all differencing media of
6962 this snapshot will be merged with the contents of their dependent child
6963 media to keep the medium chain valid (in other words, all changes
6964 represented by media being discarded will be propagated to their child
6965 medium). After that, this snapshot's differencing medium will be
6966 deleted. The parent of this snapshot will become a new parent for all
6967 its child snapshots.
6968
6969 If the discarded snapshot is the current one, its parent
6970 snapshot will become a new current snapshot. The current machine
6971 state is not directly affected in this case, except that
6972 currently attached differencing media based on media
6973 of the discarded snapshot will be also merged as described
6974 above.
6975
6976 If the discarded snapshot is the first one (the root snapshot)
6977 and it has exactly one child snapshot, this child snapshot will
6978 become the first snapshot after discarding. If there are no
6979 children at all (i.e. the first snapshot is the only snapshot of
6980 the machine), both the current and the first snapshot of the
6981 machine will be set to @c null. In all other cases, the first
6982 snapshot cannot be discarded.
6983
6984 You cannot discard the snapshot if it
6985 stores <link to="MediumType_Normal">normal</link> (non-differencing)
6986 media that have differencing media based on them. Snapshots of
6987 such kind can be discarded only when every normal medium has either
6988 no children at all or exactly one child. In the former case, the normal
6989 medium simply becomes unused (i.e. not attached to any VM). In the
6990 latter case, it receives all the changes stored in the child medium,
6991 and then it replaces the child medium in the configuration of the
6992 corresponding snapshot or machine.
6993
6994 Also, you cannot discard the snapshot if it stores media
6995 (of any type) having differencing child media that belong
6996 to other machines. Such snapshots can be only discarded after
6997 you discard all snapshots of other machines containing "foreign"
6998 child media, or detach these "foreign" child media from machines
6999 they are attached to.
7000
7001 One particular example of the snapshot storing normal media
7002 is the first snapshot of a virtual machine that had normal media
7003 attached when taking the snapshot. Be careful when
7004 discarding such snapshots because this implicitly commits
7005 changes (made since the snapshot being discarded has been taken)
7006 to normal media (as described above), which may be not what
7007 you want.
7008
7009 The virtual machine is put to
7010 the <link to="MachineState_Discarding">Discarding</link> state until
7011 the discard operation is completed.
7012
7013 <note>
7014 The machine must not be running, otherwise the operation
7015 will fail.
7016 </note>
7017
7018 <note>
7019 Child media of all normal media of the discarded snapshot
7020 must be accessible (see <link to="IMedium::state"/>) for this
7021 operation to succeed. In particular, this means that all virtual
7022 machines, whose media are directly or indirectly based on the
7023 media of discarded snapshot, must be powered off.
7024 </note>
7025 <note>
7026 Merging medium contents can be very time and disk space
7027 consuming, if these media are big in size and have many
7028 children. However, if the snapshot being discarded is the last
7029 (head) snapshot on the branch, the operation will be rather
7030 quick.
7031 </note>
7032 <note>
7033 Note that discarding the current snapshot
7034 will implicitly call <link to="IMachine::saveSettings"/> to
7035 make all current machine settings permanent.
7036 </note>
7037 <result name="VBOX_E_INVALID_VM_STATE">
7038 Virtual machine is running.
7039 </result>
7040 </desc>
7041 <param name="id" type="uuid" mod="string" dir="in">
7042 <desc>UUID of the snapshot to discard.</desc>
7043 </param>
7044 <param name="progress" type="IProgress" dir="return">
7045 <desc>Progress object to track the operation completion.</desc>
7046 </param>
7047 </method>
7048
7049 <method name="restoreSnapshot">
7050 <desc>
7051 Starts resetting the machine's current state to the state contained
7052 in the given snapshot, asynchronously. All current settings of the
7053 machine will be reset and changes stored in differencing media
7054 will be lost.
7055 See <link to="ISnapshot" /> for an introduction to snapshots.
7056
7057 After this operation is successfully completed, new empty differencing
7058 media are created for all normal media of the machine.
7059
7060 If the given snapshot is an online snapshot, the machine will go to
7061 the <link to="MachineState_Saved"> saved state</link>, so that the
7062 next time it is powered on, the execution state will be restored
7063 from the state of the snapshot.
7064
7065 <note>
7066 The machine must not be running, otherwise the operation will fail.
7067 </note>
7068
7069 <note>
7070 If the machine state is <link to="MachineState_Saved">Saved</link>
7071 prior to this operation, the saved state file will be implicitly
7072 discarded (as if <link to="IConsole::forgetSavedState"/> were
7073 called).
7074 </note>
7075
7076 <result name="VBOX_E_INVALID_VM_STATE">
7077 Virtual machine is running.
7078 </result>
7079 </desc>
7080 <param name="snapshot" type="ISnapshot" dir="in">
7081 <desc>The snapshot to restore the VM state from.</desc>
7082 </param>
7083 <param name="progress" type="IProgress" dir="return">
7084 <desc>Progress object to track the operation completion.</desc>
7085 </param>
7086 </method>
7087
7088 <method name="teleport">
7089 <desc>
7090 Teleport the VM to a different host machine or process.
7091
7092 TODO explain the details.
7093
7094 <result name="VBOX_E_INVALID_VM_STATE">
7095 Virtual machine not running or paused.
7096 </result>
7097 </desc>
7098 <param name="hostname" type="wstring" dir="in">
7099 <desc>The name or IP of the host to teleport to.</desc>
7100 </param>
7101 <param name="tcpport" type="unsigned long" dir="in">
7102 <desc>The TCP port to connect to (1..65535).</desc>
7103 </param>
7104 <param name="password" type="wstring" dir="in">
7105 <desc>The password.</desc>
7106 </param>
7107 <param name="progress" type="IProgress" dir="return">
7108 <desc>Progress object to track the operation completion.</desc>
7109 </param>
7110 </method>
7111
7112 <method name="registerCallback">
7113 <desc>
7114 Registers a new console callback on this instance. The methods of the
7115 callback interface will be called by this instance when the appropriate
7116 event occurs.
7117 </desc>
7118 <param name="callback" type="IConsoleCallback" dir="in"/>
7119 </method>
7120
7121 <method name="unregisterCallback">
7122 <desc>
7123 Unregisters the console callback previously registered using
7124 <link to="#registerCallback"/>.
7125 <result name="E_INVALIDARG">
7126 Given @a callback handler is not registered.
7127 </result>
7128 </desc>
7129 <param name="callback" type="IConsoleCallback" dir="in"/>
7130 </method>
7131 </interface>
7132
7133 <!--
7134 // IHost
7135 /////////////////////////////////////////////////////////////////////////
7136 -->
7137
7138 <enum
7139 name="HostNetworkInterfaceMediumType"
7140 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
7141 >
7142 <desc>
7143 Type of encapsulation. Ethernet encapsulation includes both wired and
7144 wireless Ethernet connections.
7145 <see>IHostNetworkInterface</see>
7146 </desc>
7147
7148 <const name="Unknown" value="0">
7149 <desc>
7150 The type of interface cannot be determined.
7151 </desc>
7152 </const>
7153 <const name="Ethernet" value="1">
7154 <desc>
7155 Ethernet frame encapsulation.
7156 </desc>
7157 </const>
7158 <const name="PPP" value="2">
7159 <desc>
7160 Point-to-point protocol encapsulation.
7161 </desc>
7162 </const>
7163 <const name="SLIP" value="3">
7164 <desc>
7165 Serial line IP encapsulation.
7166 </desc>
7167 </const>
7168 </enum>
7169
7170 <enum
7171 name="HostNetworkInterfaceStatus"
7172 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
7173 >
7174 <desc>
7175 Current status of the interface.
7176 <see>IHostNetworkInterface</see>
7177 </desc>
7178
7179 <const name="Unknown" value="0">
7180 <desc>
7181 The state of interface cannot be determined.
7182 </desc>
7183 </const>
7184 <const name="Up" value="1">
7185 <desc>
7186 The interface is fully operational.
7187 </desc>
7188 </const>
7189 <const name="Down" value="2">
7190 <desc>
7191 The interface is not functioning.
7192 </desc>
7193 </const>
7194 </enum>
7195
7196 <enum
7197 name="HostNetworkInterfaceType"
7198 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
7199 >
7200 <desc>
7201 Network interface type.
7202 </desc>
7203 <const name="Bridged" value="1"/>
7204 <const name="HostOnly" value="2"/>
7205 </enum>
7206
7207 <interface
7208 name="IHostNetworkInterface" extends="$unknown"
7209 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
7210 wsmap="managed"
7211 >
7212 <desc>
7213 Represents one of host's network interfaces. IP V6 address and network
7214 mask are strings of 32 hexdecimal digits grouped by four. Groups are
7215 separated by colons.
7216 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
7217 </desc>
7218 <attribute name="name" type="wstring" readonly="yes">
7219 <desc>Returns the host network interface name.</desc>
7220 </attribute>
7221
7222 <attribute name="id" type="uuid" mod="string" readonly="yes">
7223 <desc>Returns the interface UUID.</desc>
7224 </attribute>
7225
7226 <attribute name="networkName" type="wstring" readonly="yes">
7227 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
7228 </attribute>
7229
7230 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
7231 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
7232 </attribute>
7233
7234 <attribute name="IPAddress" type="wstring" readonly="yes">
7235 <desc>Returns the IP V4 address of the interface.</desc>
7236 </attribute>
7237
7238 <attribute name="networkMask" type="wstring" readonly="yes">
7239 <desc>Returns the network mask of the interface.</desc>
7240 </attribute>
7241
7242 <attribute name="IPV6Supported" type="boolean" readonly="yes">
7243 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
7244 </attribute>
7245
7246 <attribute name="IPV6Address" type="wstring" readonly="yes">
7247 <desc>Returns the IP V6 address of the interface.</desc>
7248 </attribute>
7249
7250 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
7251 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
7252 </attribute>
7253
7254 <attribute name="hardwareAddress" type="wstring" readonly="yes">
7255 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
7256 </attribute>
7257
7258 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
7259 <desc>Type of protocol encapsulation used.</desc>
7260 </attribute>
7261
7262 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
7263 <desc>Status of the interface.</desc>
7264 </attribute>
7265
7266 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
7267 <desc>specifies the host interface type.</desc>
7268 </attribute>
7269
7270 <method name="enableStaticIpConfig">
7271 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
7272 <param name="IPAddress" type="wstring" dir="in">
7273 <desc>
7274 IP address.
7275 </desc>
7276 </param>
7277 <param name="networkMask" type="wstring" dir="in">
7278 <desc>
7279 network mask.
7280 </desc>
7281 </param>
7282 </method>
7283
7284 <method name="enableStaticIpConfigV6">
7285 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
7286 <param name="IPV6Address" type="wstring" dir="in">
7287 <desc>
7288 IP address.
7289 </desc>
7290 </param>
7291 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
7292 <desc>
7293 network mask.
7294 </desc>
7295 </param>
7296 </method>
7297
7298 <method name="enableDynamicIpConfig">
7299 <desc>enables the dynamic IP configuration.</desc>
7300 </method>
7301
7302 <method name="dhcpRediscover">
7303 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
7304 </method>
7305
7306 </interface>
7307
7308 <interface
7309 name="IHost" extends="$unknown"
7310 uuid="e380cbfc-ae65-4fa6-899e-45ded6b3132a"
7311 wsmap="managed"
7312 >
7313 <desc>
7314 The IHost interface represents the physical machine that this VirtualBox
7315 installation runs on.
7316
7317 An object implementing this interface is returned by the
7318 <link to="IVirtualBox::host" /> attribute. This interface contains
7319 read-only information about the host's physical hardware (such as what
7320 processors and disks are available, what the host operating system is,
7321 and so on) and also allows for manipulating some of the host's hardware,
7322 such as global USB device filters and host interface networking.
7323
7324 </desc>
7325 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
7326 <desc>List of DVD drives available on the host.</desc>
7327 </attribute>
7328
7329 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
7330 <desc>List of floppy drives available on the host.</desc>
7331 </attribute>
7332
7333 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
7334 <desc>
7335 List of USB devices currently attached to the host.
7336 Once a new device is physically attached to the host computer,
7337 it appears in this list and remains there until detached.
7338
7339 <note>
7340 If USB functionality is not available in the given edition of
7341 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7342 </note>
7343 </desc>
7344 </attribute>
7345
7346 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
7347 <desc>
7348 List of USB device filters in action.
7349 When a new device is physically attached to the host computer,
7350 filters from this list are applied to it (in order they are stored
7351 in the list). The first matched filter will determine the
7352 <link to="IHostUSBDeviceFilter::action">action</link>
7353 performed on the device.
7354
7355 Unless the device is ignored by these filters, filters of all
7356 currently running virtual machines
7357 (<link to="IUSBController::deviceFilters"/>) are applied to it.
7358
7359 <note>
7360 If USB functionality is not available in the given edition of
7361 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7362 </note>
7363
7364 <see>IHostUSBDeviceFilter, USBDeviceState</see>
7365 </desc>
7366 </attribute>
7367
7368 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
7369 <desc>List of host network interfaces currently defined on the host.</desc>
7370 </attribute>
7371
7372 <attribute name="processorCount" type="unsigned long" readonly="yes">
7373 <desc>Number of (logical) CPUs installed in the host system.</desc>
7374 </attribute>
7375
7376 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
7377 <desc>Number of (logical) CPUs online in the host system.</desc>
7378 </attribute>
7379
7380 <method name="getProcessorSpeed">
7381 <desc>Query the (approximate) maximum speed of a specified host CPU in
7382 Megahertz.
7383 </desc>
7384 <param name="cpuId" type="unsigned long" dir="in">
7385 <desc>
7386 Identifier of the CPU.
7387 </desc>
7388 </param>
7389 <param name="speed" type="unsigned long" dir="return">
7390 <desc>
7391 Speed value. 0 is returned if value is not known or @a cpuId is
7392 invalid.
7393 </desc>
7394 </param>
7395 </method>
7396
7397 <method name="getProcessorFeature">
7398 <desc>Query whether a CPU feature is supported or not.</desc>
7399 <param name="feature" type="ProcessorFeature" dir="in">
7400 <desc>
7401 CPU Feature identifier.
7402 </desc>
7403 </param>
7404 <param name="supported" type="boolean" dir="return">
7405 <desc>
7406 Feature is supported or not.
7407 </desc>
7408 </param>
7409 </method>
7410
7411 <method name="getProcessorDescription">
7412 <desc>Query the model string of a specified host CPU.
7413 </desc>
7414 <param name="cpuId" type="unsigned long" dir="in">
7415 <desc>
7416 Identifier of the CPU.
7417 <note>
7418 The current implementation might not necessarily return the
7419 description for this exact CPU.
7420 </note>
7421 </desc>
7422 </param>
7423 <param name="description" type="wstring" dir="return">
7424 <desc>
7425 Model string. An empty string is returned if value is not known or
7426 @a cpuId is invalid.
7427 </desc>
7428 </param>
7429 </method>
7430
7431 <method name="getProcessorCpuIdLeaf">
7432 <desc>
7433 Returns the CPU cpuid information for the specified leaf.
7434 </desc>
7435 <param name="cpuId" type="unsigned long" dir="in">
7436 <desc>
7437 Identifier of the CPU. The CPU most be online.
7438 <note>
7439 The current implementation might not necessarily return the
7440 description for this exact CPU.
7441 </note>
7442 </desc>
7443 </param>
7444 <param name="leaf" type="unsigned long" dir="in">
7445 <desc>
7446 Cpuid leaf index (eax).
7447 </desc>
7448 </param>
7449 <param name="subLeaf" type="unsigned long" dir="in">
7450 <desc>
7451 Cpuid leaf sub index (ecx). This currently only applies to cache
7452 information on Intel CPUs. Use 0 if retriving values for
7453 <link to="IMachine::setCpuIdLeaf"/>.
7454 </desc>
7455 </param>
7456 <param name="valEax" type="unsigned long" dir="out">
7457 <desc>
7458 Cpuid leaf value for register eax.
7459 </desc>
7460 </param>
7461 <param name="valEbx" type="unsigned long" dir="out">
7462 <desc>
7463 Cpuid leaf value for register ebx.
7464 </desc>
7465 </param>
7466 <param name="valEcx" type="unsigned long" dir="out">
7467 <desc>
7468 Cpuid leaf value for register ecx.
7469 </desc>
7470 </param>
7471 <param name="valEdx" type="unsigned long" dir="out">
7472 <desc>
7473 Cpuid leaf value for register edx.
7474 </desc>
7475 </param>
7476 </method>
7477
7478 <attribute name="memorySize" type="unsigned long" readonly="yes">
7479 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7480 </attribute>
7481
7482 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7483 <desc>Available system memory in the host system.</desc>
7484 </attribute>
7485
7486 <attribute name="operatingSystem" type="wstring" readonly="yes">
7487 <desc>Name of the host system's operating system.</desc>
7488 </attribute>
7489
7490 <attribute name="OSVersion" type="wstring" readonly="yes">
7491 <desc>Host operating system's version string.</desc>
7492 </attribute>
7493
7494 <attribute name="UTCTime" type="long long" readonly="yes">
7495 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7496 </attribute>
7497
7498 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
7499 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
7500 </attribute>
7501
7502 <method name="createHostOnlyNetworkInterface">
7503 <desc>
7504 Creates a new adapter for Host Only Networking.
7505 <result name="E_INVALIDARG">
7506 Host network interface @a name already exists.
7507 </result>
7508 </desc>
7509 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7510 <desc>
7511 Created host interface object.
7512 </desc>
7513 </param>
7514 <param name="progress" type="IProgress" dir="return">
7515 <desc>
7516 Progress object to track the operation completion.
7517 </desc>
7518 </param>
7519 </method>
7520
7521 <method name="removeHostOnlyNetworkInterface">
7522 <desc>
7523 Removes the given Host Only Networking interface.
7524 <result name="VBOX_E_OBJECT_NOT_FOUND">
7525 No host network interface matching @a id found.
7526 </result>
7527 </desc>
7528 <param name="id" type="uuid" mod="string" dir="in">
7529 <desc>
7530 Adapter GUID.
7531 </desc>
7532 </param>
7533 <param name="progress" type="IProgress" dir="return">
7534 <desc>
7535 Progress object to track the operation completion.
7536 </desc>
7537 </param>
7538 </method>
7539
7540 <method name="createUSBDeviceFilter">
7541 <desc>
7542 Creates a new USB device filter. All attributes except
7543 the filter name are set to empty (any match),
7544 <i>active</i> is @c false (the filter is not active).
7545
7546 The created filter can be added to the list of filters using
7547 <link to="#insertUSBDeviceFilter"/>.
7548
7549 <see>#USBDeviceFilters</see>
7550 </desc>
7551 <param name="name" type="wstring" dir="in">
7552 <desc>
7553 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7554 for more info.
7555 </desc>
7556 </param>
7557 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7558 <desc>Created filter object.</desc>
7559 </param>
7560 </method>
7561
7562 <method name="insertUSBDeviceFilter">
7563 <desc>
7564 Inserts the given USB device to the specified position
7565 in the list of filters.
7566
7567 Positions are numbered starting from @c 0. If the specified
7568 position is equal to or greater than the number of elements in
7569 the list, the filter is added at the end of the collection.
7570
7571 <note>
7572 Duplicates are not allowed, so an attempt to insert a
7573 filter already in the list is an error.
7574 </note>
7575 <note>
7576 If USB functionality is not available in the given edition of
7577 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7578 </note>
7579
7580 <see>#USBDeviceFilters</see>
7581
7582 <result name="VBOX_E_INVALID_OBJECT_STATE">
7583 USB device filter is not created within this VirtualBox instance.
7584 </result>
7585 <result name="E_INVALIDARG">
7586 USB device filter already in list.
7587 </result>
7588
7589 </desc>
7590 <param name="position" type="unsigned long" dir="in">
7591 <desc>Position to insert the filter to.</desc>
7592 </param>
7593 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7594 <desc>USB device filter to insert.</desc>
7595 </param>
7596 </method>
7597
7598 <method name="removeUSBDeviceFilter">
7599 <desc>
7600 Removes a USB device filter from the specified position in the
7601 list of filters.
7602
7603 Positions are numbered starting from @c 0. Specifying a
7604 position equal to or greater than the number of elements in
7605 the list will produce an error.
7606
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="E_INVALIDARG">
7615 USB device filter list empty or invalid @a position.
7616 </result>
7617
7618 </desc>
7619 <param name="position" type="unsigned long" dir="in">
7620 <desc>Position to remove the filter from.</desc>
7621 </param>
7622 </method>
7623
7624 <method name="findHostDVDDrive">
7625 <desc>
7626 Searches for a host DVD drive with the given @c name.
7627
7628 <result name="VBOX_E_OBJECT_NOT_FOUND">
7629 Given @c name does not correspond to any host drive.
7630 </result>
7631
7632 </desc>
7633 <param name="name" type="wstring" dir="in">
7634 <desc>Name of the host drive to search for</desc>
7635 </param>
7636 <param name="drive" type="IMedium" dir="return">
7637 <desc>Found host drive object</desc>
7638 </param>
7639 </method>
7640
7641 <method name="findHostFloppyDrive">
7642 <desc>
7643 Searches for a host floppy drive with the given @c name.
7644
7645 <result name="VBOX_E_OBJECT_NOT_FOUND">
7646 Given @c name does not correspond to any host floppy drive.
7647 </result>
7648
7649 </desc>
7650 <param name="name" type="wstring" dir="in">
7651 <desc>Name of the host floppy drive to search for</desc>
7652 </param>
7653 <param name="drive" type="IMedium" dir="return">
7654 <desc>Found host floppy drive object</desc>
7655 </param>
7656 </method>
7657
7658 <method name="findHostNetworkInterfaceByName">
7659 <desc>
7660 Searches through all host network interfaces for an interface with
7661 the given @c name.
7662 <note>
7663 The method returns an error if the given @c name does not
7664 correspond to any host network interface.
7665 </note>
7666 </desc>
7667 <param name="name" type="wstring" dir="in">
7668 <desc>Name of the host network interface to search for.</desc>
7669 </param>
7670 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7671 <desc>Found host network interface object.</desc>
7672 </param>
7673 </method>
7674 <method name="findHostNetworkInterfaceById">
7675 <desc>
7676 Searches through all host network interfaces for an interface with
7677 the given GUID.
7678 <note>
7679 The method returns an error if the given GUID does not
7680 correspond to any host network interface.
7681 </note>
7682 </desc>
7683 <param name="id" type="uuid" mod="string" dir="in">
7684 <desc>GUID of the host network interface to search for.</desc>
7685 </param>
7686 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7687 <desc>Found host network interface object.</desc>
7688 </param>
7689 </method>
7690 <method name="findHostNetworkInterfacesOfType">
7691 <desc>
7692 Searches through all host network interfaces and returns a list of interfaces of the specified type
7693 </desc>
7694 <param name="type" type="HostNetworkInterfaceType" dir="in">
7695 <desc>type of the host network interfaces to search for.</desc>
7696 </param>
7697 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7698 <desc>Found host network interface objects.</desc>
7699 </param>
7700 </method>
7701
7702 <method name="findUSBDeviceById">
7703 <desc>
7704 Searches for a USB device with the given UUID.
7705
7706 <result name="VBOX_E_OBJECT_NOT_FOUND">
7707 Given @c id does not correspond to any USB device.
7708 </result>
7709
7710 <see>IHostUSBDevice::id</see>
7711 </desc>
7712 <param name="id" type="uuid" mod="string" dir="in">
7713 <desc>UUID of the USB device to search for.</desc>
7714 </param>
7715 <param name="device" type="IHostUSBDevice" dir="return">
7716 <desc>Found USB device object.</desc>
7717 </param>
7718 </method>
7719
7720 <method name="findUSBDeviceByAddress">
7721 <desc>
7722 Searches for a USB device with the given host address.
7723
7724 <result name="VBOX_E_OBJECT_NOT_FOUND">
7725 Given @c name does not correspond to any USB device.
7726 </result>
7727
7728 <see>IHostUSBDevice::address</see>
7729 </desc>
7730 <param name="name" type="wstring" dir="in">
7731 <desc>
7732 Address of the USB device (as assigned by the host) to
7733 search for.
7734 </desc>
7735 </param>
7736 <param name="device" type="IHostUSBDevice" dir="return">
7737 <desc>Found USB device object.</desc>
7738 </param>
7739 </method>
7740
7741 </interface>
7742
7743 <!--
7744 // ISystemProperties
7745 /////////////////////////////////////////////////////////////////////////
7746 -->
7747
7748 <interface
7749 name="ISystemProperties"
7750 extends="$unknown"
7751 uuid="8030645c-8fef-4320-bb7b-c829f00069dc"
7752 wsmap="managed"
7753 >
7754 <desc>
7755 The ISystemProperties interface represents global properties of the given
7756 VirtualBox installation.
7757
7758 These properties define limits and default values for various attributes
7759 and parameters. Most of the properties are read-only, but some can be
7760 changed by a user.
7761 </desc>
7762
7763 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7764 <desc>Minimum guest system memory in Megabytes.</desc>
7765 </attribute>
7766
7767 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7768 <desc>Maximum guest system memory in Megabytes.</desc>
7769 </attribute>
7770
7771 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7772 <desc>Minimum guest video memory in Megabytes.</desc>
7773 </attribute>
7774
7775 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7776 <desc>Maximum guest video memory in Megabytes.</desc>
7777 </attribute>
7778
7779 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7780 <desc>Minimum CPU count.</desc>
7781 </attribute>
7782
7783 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7784 <desc>Maximum CPU count.</desc>
7785 </attribute>
7786
7787 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7788 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7789 </attribute>
7790
7791 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7792 <desc>
7793 Number of network adapters associated with every
7794 <link to="IMachine"/> instance.
7795 </desc>
7796 </attribute>
7797
7798 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7799 <desc>
7800 Number of serial ports associated with every
7801 <link to="IMachine"/> instance.
7802 </desc>
7803 </attribute>
7804
7805 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7806 <desc>
7807 Number of parallel ports associated with every
7808 <link to="IMachine"/> instance.
7809 </desc>
7810 </attribute>
7811
7812 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7813 <desc>
7814 Maximum device position in the boot order. This value corresponds
7815 to the total number of devices a machine can boot from, to make it
7816 possible to include all possible devices to the boot list.
7817 <see><link to="IMachine::setBootOrder"/></see>
7818 </desc>
7819 </attribute>
7820
7821 <attribute name="defaultMachineFolder" type="wstring">
7822 <desc>
7823 Full path to the default directory used to create new or open
7824 existing machines when a settings file name contains no
7825 path.
7826
7827 The initial value of this property is
7828 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7829 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7830
7831 <note>
7832 Setting this property to @c null or an empty string will restore the
7833 initial value.
7834 </note>
7835 <note>
7836 When settings this property, the specified path can be
7837 absolute (full path) or relative
7838 to the <link to="IVirtualBox::homeFolder">
7839 VirtualBox home directory</link>.
7840 When reading this property, a full path is
7841 always returned.
7842 </note>
7843 <note>
7844 The specified path may not exist, it will be created
7845 when necessary.
7846 </note>
7847
7848 <see>
7849 <link to="IVirtualBox::createMachine"/>,
7850 <link to="IVirtualBox::openMachine"/>
7851 </see>
7852 </desc>
7853 </attribute>
7854
7855 <attribute name="defaultHardDiskFolder" type="wstring">
7856 <desc>
7857 Full path to the default directory used to create new or open existing
7858 virtual disks.
7859
7860 This path is used when the storage unit of a hard disk is a regular file
7861 in the host's file system and only a file name that contains no path is
7862 given.
7863
7864 The initial value of this property is
7865 <tt>&lt;</tt>
7866 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7867 <tt>&gt;/HardDisks</tt>.
7868
7869 <note>
7870 Setting this property to @c null or empty string will restore the
7871 initial value.
7872 </note>
7873 <note>
7874 When settings this property, the specified path can be relative
7875 to the
7876 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7877 absolute. When reading this property, a full path is
7878 always returned.
7879 </note>
7880 <note>
7881 The specified path may not exist, it will be created
7882 when necessary.
7883 </note>
7884
7885 <see>
7886 IMedium,
7887 <link to="IVirtualBox::createHardDisk"/>,
7888 <link to="IVirtualBox::openHardDisk"/>,
7889 <link to="IMedium::location"/>
7890 </see>
7891 </desc>
7892 </attribute>
7893
7894 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7895 <desc>
7896 List of all medium storage formats supported by this VirtualBox
7897 installation.
7898
7899 Keep in mind that the medium format identifier
7900 (<link to="IMediumFormat::id"/>) used in other API calls like
7901 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7902 medium format is a case-insensitive string. This means that, for
7903 example, all of the following strings:
7904 <pre>
7905 "VDI"
7906 "vdi"
7907 "VdI"</pre>
7908 refer to the same medium format.
7909
7910 Note that the virtual medium framework is backend-based, therefore
7911 the list of supported formats depends on what backends are currently
7912 installed.
7913
7914 <see>
7915 <link to="IMediumFormat"/>,
7916 </see>
7917 </desc>
7918 </attribute>
7919
7920 <attribute name="defaultHardDiskFormat" type="wstring">
7921 <desc>
7922 Identifier of the default medium format used by VirtualBox.
7923
7924 The medium format set by this attribute is used by VirtualBox
7925 when the medium format was not specified explicitly. One example is
7926 <link to="IVirtualBox::createHardDisk"/> with the empty
7927 format argument. A more complex example is implicit creation of
7928 differencing media when taking a snapshot of a virtual machine:
7929 this operation will try to use a format of the parent medium first
7930 and if this format does not support differencing media the default
7931 format specified by this argument will be used.
7932
7933 The list of supported medium formats may be obtained by the
7934 <link to="#mediaFormats"/> call. Note that the default medium
7935 format must have a capability to create differencing media;
7936 otherwise operations that create media implicitly may fail
7937 unexpectedly.
7938
7939 The initial value of this property is <tt>"VDI"</tt> in the current
7940 version of the VirtualBox product, but may change in the future.
7941
7942 <note>
7943 Setting this property to @c null or empty string will restore the
7944 initial value.
7945 </note>
7946
7947 <see>
7948 <link to="#mediaFormats"/>,
7949 <link to="IMediumFormat::id"/>,
7950 <link to="IVirtualBox::createHardDisk"/>
7951 </see>
7952 </desc>
7953 </attribute>
7954
7955 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7956 <desc>
7957 Library that provides authentication for VRDP clients. The library
7958 is used if a virtual machine's authentication type is set to "external"
7959 in the VM RemoteDisplay configuration.
7960
7961 The system library extension (".DLL" or ".so") must be omitted.
7962 A full path can be specified; if not, then the library must reside on the
7963 system's default library path.
7964
7965 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7966 of that name in one of the default VirtualBox library directories.
7967
7968 For details about VirtualBox authentication libraries and how to implement
7969 them, please refer to the VirtualBox manual.
7970
7971 <note>
7972 Setting this property to @c null or empty string will restore the
7973 initial value.
7974 </note>
7975 </desc>
7976 </attribute>
7977
7978 <attribute name="webServiceAuthLibrary" type="wstring">
7979 <desc>
7980 Library that provides authentication for webservice clients. The library
7981 is used if a virtual machine's authentication type is set to "external"
7982 in the VM RemoteDisplay configuration and will be called from
7983 within the <link to="IWebsessionManager::logon" /> implementation.
7984
7985 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7986 there is no per-VM setting for this, as the webservice is a global
7987 resource (if it is running). Only for this setting (for the webservice),
7988 setting this value to a literal <tt>"null"</tt> string disables authentication,
7989 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7990 no matter what user name and password are supplied.
7991
7992 The initial value of this property is <tt>"VRDPAuth"</tt>,
7993 meaning that the webservice will use the same authentication
7994 library that is used by default for VBoxVRDP (again, see
7995 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7996 The format and calling convention of authentication libraries
7997 is the same for the webservice as it is for VBoxVRDP.
7998
7999 <note>
8000 Setting this property to @c null or empty string will restore the
8001 initial value.
8002 </note>
8003 </desc>
8004 </attribute>
8005
8006 <attribute name="LogHistoryCount" type="unsigned long">
8007 <desc>
8008 This value specifies how many old release log files are kept.
8009 </desc>
8010 </attribute>
8011
8012 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
8013 <desc>This value hold the default audio driver for the current
8014 system.</desc>
8015 </attribute>
8016
8017 <method name="getMaxDevicesPerPortForStorageBus">
8018 <desc>Returns the maximum number of devices which can be attached to a port
8019 for the given storage bus.</desc>
8020
8021 <param name="bus" type="StorageBus" dir="in">
8022 <desc>The storage bus type to get the value for.</desc>
8023 </param>
8024
8025 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
8026 <desc>The maximum number of devices which can eb attached to the port for the given
8027 storage bus.</desc>
8028 </param>
8029 </method>
8030
8031 <method name="getMinPortCountForStorageBus">
8032 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
8033
8034 <param name="bus" type="StorageBus" dir="in">
8035 <desc>The storage bus type to get the value for.</desc>
8036 </param>
8037
8038 <param name="minPortCount" type="unsigned long" dir="return">
8039 <desc>The minimum number of ports for the given storage bus.</desc>
8040 </param>
8041 </method>
8042
8043 <method name="getMaxPortCountForStorageBus">
8044 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
8045
8046 <param name="bus" type="StorageBus" dir="in">
8047 <desc>The storage bus type to get the value for.</desc>
8048 </param>
8049
8050 <param name="maxPortCount" type="unsigned long" dir="return">
8051 <desc>The maximum number of ports for the given storage bus.</desc>
8052 </param>
8053 </method>
8054
8055 <method name="getMaxInstancesOfStorageBus">
8056 <desc>Returns the maximum number of storage bus instances which
8057 can be configured for each VM. This corresponds to the number of
8058 storage controllers one can have.</desc>
8059
8060 <param name="bus" type="StorageBus" dir="in">
8061 <desc>The storage bus type to get the value for.</desc>
8062 </param>
8063
8064 <param name="maxInstances" type="unsigned long" dir="return">
8065 <desc>The maximum number of instances for the given storage bus.</desc>
8066 </param>
8067 </method>
8068
8069 <method name="getDeviceTypesForStorageBus">
8070 <desc>Returns list of all the supported device types
8071 (<link to="DeviceType"/>) for the given type of storage
8072 bus.</desc>
8073
8074 <param name="bus" type="StorageBus" dir="in">
8075 <desc>The storage bus type to get the value for.</desc>
8076 </param>
8077
8078 <param name="deviceTypes" type="DeviceType" safearray="yes" dir="return">
8079 <desc>The list of all supported device types for the given storage bus.</desc>
8080 </param>
8081 </method>
8082 </interface>
8083
8084 <!--
8085 // IGuest
8086 /////////////////////////////////////////////////////////////////////////
8087 -->
8088
8089 <interface
8090 name="IGuestOSType" extends="$unknown"
8091 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
8092 wsmap="struct"
8093 >
8094 <desc>
8095 </desc>
8096
8097 <attribute name="familyId" type="wstring" readonly="yes">
8098 <desc>Guest OS family identifier string.</desc>
8099 </attribute>
8100
8101 <attribute name="familyDescription" type="wstring" readonly="yes">
8102 <desc>Human readable description of the guest OS family.</desc>
8103 </attribute>
8104
8105 <attribute name="id" type="wstring" readonly="yes">
8106 <desc>Guest OS identifier string.</desc>
8107 </attribute>
8108
8109 <attribute name="description" type="wstring" readonly="yes">
8110 <desc>Human readable description of the guest OS.</desc>
8111 </attribute>
8112
8113 <attribute name="is64Bit" type="boolean" readonly="yes">
8114 <desc>Returns @c true if the given OS is 64-bit</desc>
8115 </attribute>
8116
8117 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
8118 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
8119 </attribute>
8120
8121 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
8122 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
8123 </attribute>
8124
8125 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
8126 <desc>Recommended RAM size in Megabytes.</desc>
8127 </attribute>
8128
8129 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
8130 <desc>Recommended video RAM size in Megabytes.</desc>
8131 </attribute>
8132
8133 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
8134 <desc>Recommended hard disk size in Megabytes.</desc>
8135 </attribute>
8136
8137 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
8138 <desc>Returns recommended network adapter for this OS type.</desc>
8139 </attribute>
8140 </interface>
8141
8142 <interface
8143 name="IGuest" extends="$unknown"
8144 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
8145 wsmap="managed"
8146 >
8147 <desc>
8148 The IGuest interface represents information about the operating system
8149 running inside the virtual machine. Used in
8150 <link to="IConsole::guest"/>.
8151
8152 IGuest provides information about the guest operating system, whether
8153 Guest Additions are installed and other OS-specific virtual machine
8154 properties.
8155 </desc>
8156
8157 <attribute name="OSTypeId" type="wstring" readonly="yes">
8158 <desc>
8159 Identifier of the Guest OS type as reported by the Guest
8160 Additions.
8161 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
8162 an IGuestOSType object representing details about the given
8163 Guest OS type.
8164 <note>
8165 If Guest Additions are not installed, this value will be
8166 the same as <link to="IMachine::OSTypeId"/>.
8167 </note>
8168 </desc>
8169 </attribute>
8170
8171 <attribute name="additionsActive" type="boolean" readonly="yes">
8172 <desc>
8173 Flag whether the Guest Additions are installed and active
8174 in which case their version will be returned by the
8175 <link to="#additionsVersion"/> property.
8176 </desc>
8177 </attribute>
8178
8179 <attribute name="additionsVersion" type="wstring" readonly="yes">
8180 <desc>
8181 Version of the Guest Additions (3 decimal numbers separated
8182 by dots) or empty when the Additions are not installed. The
8183 Additions may also report a version but yet not be active as
8184 the version might be refused by VirtualBox (incompatible) or
8185 other failures occurred.
8186 </desc>
8187 </attribute>
8188
8189 <attribute name="supportsSeamless" type="boolean" readonly="yes">
8190 <desc>
8191 Flag whether seamless guest display rendering (seamless desktop
8192 integration) is supported.
8193 </desc>
8194 </attribute>
8195
8196 <attribute name="supportsGraphics" type="boolean" readonly="yes">
8197 <desc>
8198 Flag whether the guest is in graphics mode. If it is not, then
8199 seamless rendering will not work, resize hints are not immediately
8200 acted on and guest display resizes are probably not initiated by
8201 the guest additions.
8202 </desc>
8203 </attribute>
8204
8205 <attribute name="memoryBalloonSize" type="unsigned long">
8206 <desc>Guest system memory balloon size in megabytes.</desc>
8207 </attribute>
8208
8209 <attribute name="statisticsUpdateInterval" type="unsigned long">
8210 <desc>Interval to update guest statistics in seconds.</desc>
8211 </attribute>
8212
8213 <method name="setCredentials">
8214 <desc>
8215 Store login credentials that can be queried by guest operating
8216 systems with Additions installed. The credentials are transient
8217 to the session and the guest may also choose to erase them. Note
8218 that the caller cannot determine whether the guest operating system
8219 has queried or made use of the credentials.
8220
8221 <result name="VBOX_E_VM_ERROR">
8222 VMM device is not available.
8223 </result>
8224
8225 </desc>
8226 <param name="userName" type="wstring" dir="in">
8227 <desc>User name string, can be empty</desc>
8228 </param>
8229 <param name="password" type="wstring" dir="in">
8230 <desc>Password string, can be empty</desc>
8231 </param>
8232 <param name="domain" type="wstring" dir="in">
8233 <desc>Domain name (guest logon scheme specific), can be empty</desc>
8234 </param>
8235 <param name="allowInteractiveLogon" type="boolean" dir="in">
8236 <desc>
8237 Flag whether the guest should alternatively allow the user to
8238 interactively specify different credentials. This flag might
8239 not be supported by all versions of the Additions.
8240 </desc>
8241 </param>
8242 </method>
8243
8244 <method name="getStatistic">
8245 <desc>
8246 Query specified guest statistics as reported by the VirtualBox Additions.
8247 </desc>
8248 <param name="cpuId" type="unsigned long" dir="in">
8249 <desc>Virtual CPU id; not relevant for all statistic types</desc>
8250 </param>
8251 <param name="statistic" type="GuestStatisticType" dir="in">
8252 <desc>Statistic type.</desc>
8253 </param>
8254 <param name="statVal" type="unsigned long" dir="return">
8255 <desc>Statistics value</desc>
8256 </param>
8257 </method>
8258
8259 </interface>
8260
8261
8262 <!--
8263 // IProgress
8264 /////////////////////////////////////////////////////////////////////////
8265 -->
8266
8267 <interface
8268 name="IProgress" extends="$unknown"
8269 uuid="62827ef1-c098-40eb-be96-36d0508489a6"
8270 wsmap="managed"
8271 >
8272 <desc>
8273 The IProgress interface is used to track and control
8274 asynchronous tasks within VirtualBox.
8275
8276 An instance of this is returned every time VirtualBox starts
8277 an asynchronous task (in other words, a separate thread) which
8278 continues to run after a method call returns. For example,
8279 <link to="IConsole::saveState" />, which saves the state of
8280 a running virtual machine, can take a long time to complete.
8281 To be able to display a progress bar, a user interface such as
8282 the VirtualBox graphical user interface can use the IProgress
8283 object returned by that method.
8284
8285 Note that IProgress is a "read-only" interface in the sense
8286 that only the VirtualBox internals behind the Main API can
8287 create and manipulate progress objects, whereas client code
8288 can only use the IProgress object to monitor a task's
8289 progress and, if <link to="#cancelable" /> is @c true,
8290 cancel the task by calling <link to="#cancel" />.
8291
8292 A task represented by IProgress consists of either one or
8293 several sub-operations that run sequentially, one by one (see
8294 <link to="#operation" /> and <link to="#operationCount" />).
8295 Every operation is identified by a number (starting from 0)
8296 and has a separate description.
8297
8298 You can find the individual percentage of completion of the current
8299 operation in <link to="#operationPercent" /> and the
8300 percentage of completion of the task as a whole
8301 in <link to="#percent" />.
8302
8303 Similarly, you can wait for the completion of a particular
8304 operation via <link to="#waitForOperationCompletion" /> or
8305 for the completion of the whole task via
8306 <link to="#waitForCompletion" />.
8307 </desc>
8308
8309 <attribute name="id" type="uuid" mod="string" readonly="yes">
8310 <desc>ID of the task.</desc>
8311 </attribute>
8312
8313 <attribute name="description" type="wstring" readonly="yes">
8314 <desc>Description of the task.</desc>
8315 </attribute>
8316
8317 <attribute name="initiator" type="$unknown" readonly="yes">
8318 <desc>Initiator of the task.</desc>
8319 </attribute>
8320
8321 <attribute name="cancelable" type="boolean" readonly="yes">
8322 <desc>Whether the task can be interrupted.</desc>
8323 </attribute>
8324
8325 <attribute name="percent" type="unsigned long" readonly="yes">
8326 <desc>
8327 Current progress value of the task as a whole, in percent.
8328 This value depends on how many operations are already complete.
8329 Returns 100 if <link to="#completed" /> is @c true.
8330 </desc>
8331 </attribute>
8332
8333 <attribute name="timeRemaining" type="long" readonly="yes">
8334 <desc>
8335 Estimated remaining time until the task completes, in
8336 seconds. Returns 0 once the task has completed; returns -1
8337 if the remaining time cannot be computed, in particular if
8338 the current progress is 0.
8339
8340 Even if a value is returned, the estimate will be unreliable
8341 for low progress values. It will become more reliable as the
8342 task progresses; it is not recommended to display an ETA
8343 before at least 20% of a task have completed.
8344 </desc>
8345 </attribute>
8346
8347 <attribute name="completed" type="boolean" readonly="yes">
8348 <desc>Whether the task has been completed.</desc>
8349 </attribute>
8350
8351 <attribute name="canceled" type="boolean" readonly="yes">
8352 <desc>Whether the task has been canceled.</desc>
8353 </attribute>
8354
8355 <attribute name="resultCode" type="long" readonly="yes">
8356 <desc>
8357 Result code of the progress task.
8358 Valid only if <link to="#completed"/> is @c true.
8359 </desc>
8360 </attribute>
8361
8362 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
8363 <desc>
8364 Extended information about the unsuccessful result of the
8365 progress operation. May be @c null if no extended information
8366 is available.
8367 Valid only if <link to="#completed"/> is @c true and
8368 <link to="#resultCode"/> indicates a failure.
8369 </desc>
8370 </attribute>
8371
8372 <attribute name="operationCount" type="unsigned long" readonly="yes">
8373 <desc>
8374 Number of sub-operations this task is divided into.
8375 Every task consists of at least one suboperation.
8376 </desc>
8377 </attribute>
8378
8379 <attribute name="operation" type="unsigned long" readonly="yes">
8380 <desc>Number of the sub-operation being currently executed.</desc>
8381 </attribute>
8382
8383 <attribute name="operationDescription" type="wstring" readonly="yes">
8384 <desc>
8385 Description of the sub-operation being currently executed.
8386 </desc>
8387 </attribute>
8388
8389 <attribute name="operationPercent" type="unsigned long" readonly="yes">
8390 <desc>Progress value of the current sub-operation only, in percent.</desc>
8391 </attribute>
8392
8393 <method name="setCurrentOperationProgress">
8394 <desc>Internal method, not to be called externally.</desc>
8395 <param name="percent" type="unsigned long" dir="in" />
8396 </method>
8397 <method name="setNextOperation">
8398 <desc>Internal method, not to be called externally.</desc>
8399 <param name="nextOperationDescription" type="wstring" dir="in" />
8400 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8401 </method>
8402
8403 <method name="waitForCompletion">
8404 <desc>
8405 Waits until the task is done (including all sub-operations)
8406 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8407
8408 <result name="VBOX_E_IPRT_ERROR">
8409 Failed to wait for task completion.
8410 </result>
8411 </desc>
8412
8413 <param name="timeout" type="long" dir="in">
8414 <desc>
8415 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8416 </desc>
8417 </param>
8418 </method>
8419
8420 <method name="waitForOperationCompletion">
8421 <desc>
8422 Waits until the given operation is done with a given timeout in
8423 milliseconds; specify -1 for an indefinite wait.
8424
8425 <result name="VBOX_E_IPRT_ERROR">
8426 Failed to wait for operation completion.
8427 </result>
8428
8429 </desc>
8430 <param name="operation" type="unsigned long" dir="in">
8431 <desc>
8432 Number of the operation to wait for.
8433 Must be less than <link to="#operationCount"/>.
8434 </desc>
8435 </param>
8436 <param name="timeout" type="long" dir="in">
8437 <desc>
8438 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8439 </desc>
8440 </param>
8441 </method>
8442
8443 <method name="cancel">
8444 <desc>
8445 Cancels the task.
8446 <note>
8447 If <link to="#cancelable"/> is @c false, then this method will fail.
8448 </note>
8449
8450 <result name="VBOX_E_INVALID_OBJECT_STATE">
8451 Operation cannot be canceled.
8452 </result>
8453
8454 </desc>
8455 </method>
8456
8457 </interface>
8458
8459
8460 <!--
8461 // ISnapshot
8462 /////////////////////////////////////////////////////////////////////////
8463 -->
8464
8465 <interface
8466 name="ISnapshot" extends="$unknown"
8467 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8468 wsmap="managed"
8469 >
8470 <desc>
8471 The ISnapshot interface represents a snapshot of the virtual
8472 machine.
8473
8474 Together with the differencing media that are created
8475 when a snapshot is taken, a machine can be brought back to
8476 the exact state it was in when the snapshot was taken.
8477
8478 The ISnapshot interface has no methods, only attributes; snapshots
8479 are controlled through methods of the <link to="IConsole" /> interface
8480 which also manage the media associated with the snapshot.
8481 The following operations exist:
8482
8483 <ul>
8484 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8485 by creating new, empty differencing images for the machine's
8486 media and saving the VM settings and (if the VM is running)
8487 the current VM state in the snapshot.
8488
8489 The differencing images will then receive all data written to
8490 the machine's media, while their parent (base) images
8491 remain unmodified after the snapshot has been taken (see
8492 <link to="IMedium" /> for details about differencing images).
8493 This simplifies restoring a machine to the state of a snapshot:
8494 only the differencing images need to be deleted.
8495
8496 The current machine state is not changed by taking a snapshot.
8497 If the machine is running, it will resume execution after the
8498 snapshot has been taken.
8499 </li>
8500
8501 <li><link to="IConsole::restoreSnapshot"/>: this goes back to
8502 a previous snapshot. This resets the machine's state to that of
8503 the previous snapshot by deleting the differencing image of each
8504 of the machine's media and setting the machine's settings
8505 and state to the state that was saved in the snapshot (if any).
8506
8507 This destroys the machine's current state.
8508 </li>
8509
8510 <li><link to="IConsole::deleteSnapshot"/>: deletes a snapshot
8511 without affecting the current machine state.
8512
8513 This does not change the machine, but instead frees the resources
8514 allocated when the snapshot was taken: the settings and machine state
8515 is deleted (if any), and the snapshot's differencing image for each
8516 of the machine's media gets merged with its parent image.
8517
8518 Neither the current machine state nor other snapshots are affected
8519 by this operation, except that parent media will be modified
8520 to contain the disk data associated with the snapshot being deleted.
8521 </li>
8522 </ul>
8523
8524 Each snapshot contains the settings of the virtual machine (hardware
8525 configuration etc.). In addition, if the machine was running when the
8526 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8527 the current VM state is saved in the snapshot (similarly to what happens
8528 when a VM's state is saved). The snapshot is then said to
8529 be <i>online</i> because when restoring it, the VM will be running.
8530
8531 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8532 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8533
8534 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8535 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8536 it then contains a so-called "zero execution state", representing a
8537 machine that is powered off.
8538
8539 <h3>Snapshot branches and the "current" snapshot</h3>
8540
8541 Snapshots can be chained, whereby every next snapshot is based on the
8542 previous one. This chaining is related to medium branching
8543 (see the <link to="IMedium"/> description) in that every time
8544 a new snapshot is created, a new differencing medium is implicitly
8545 created for all normal media attached to the machine.
8546
8547 Each virtual machine has a "current snapshot", identified by
8548 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8549 to the last snapshot in the chain. In a future version of VirtualBox,
8550 it will be possible to reset a machine's current state to that of an
8551 earlier snapshot without discarding the current state so that it will be
8552 possible to create alternative snapshot paths in a snapshot tree.
8553
8554 In the current implementation, multiple snapshot branches within one
8555 virtual machine are not allowed. Every machine has a single branch,
8556 and <link to="IConsole::takeSnapshot"/> operation adds a new
8557 snapshot to the top of that branch.
8558 </desc>
8559
8560 <attribute name="id" type="uuid" mod="string" readonly="yes">
8561 <desc>UUID of the snapshot.</desc>
8562 </attribute>
8563
8564 <attribute name="name" type="wstring">
8565 <desc>Short name of the snapshot.</desc>
8566 </attribute>
8567
8568 <attribute name="description" type="wstring">
8569 <desc>Optional description of the snapshot.</desc>
8570 </attribute>
8571
8572 <attribute name="timeStamp" type="long long" readonly="yes">
8573 <desc>
8574 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8575 </desc>
8576 </attribute>
8577
8578 <attribute name="online" type="boolean" readonly="yes">
8579 <desc>
8580 @c true if this snapshot is an online snapshot and @c false otherwise.
8581
8582 When this attribute is @c true, the
8583 <link to="IMachine::stateFilePath"/> attribute of the
8584 <link to="#machine"/> object associated with this snapshot
8585 will point to the saved state file. Otherwise, it will be
8586 an empty string.
8587 </desc>
8588 </attribute>
8589
8590 <attribute name="machine" type="IMachine" readonly="yes">
8591 <desc>
8592 Virtual machine this snapshot is taken on. This object
8593 stores all settings the machine had when taking this snapshot.
8594 <note>
8595 The returned machine object is immutable, i.e. no
8596 any settings can be changed.
8597 </note>
8598 </desc>
8599 </attribute>
8600
8601 <attribute name="parent" type="ISnapshot" readonly="yes">
8602 <desc>
8603 Parent snapshot (a snapshot this one is based on), or
8604 @c null if the snapshot has no parent (i.e. is the first snapshot).
8605 </desc>
8606 </attribute>
8607
8608 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8609 <desc>
8610 Child snapshots (all snapshots having this one as a parent).
8611 </desc>
8612 </attribute>
8613
8614 </interface>
8615
8616
8617 <!--
8618 // IMedium
8619 /////////////////////////////////////////////////////////////////////////
8620 -->
8621
8622 <enum
8623 name="MediumState"
8624 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8625 >
8626 <desc>
8627 Virtual medium state.
8628 <see>IMedium</see>
8629 </desc>
8630
8631 <const name="NotCreated" value="0">
8632 <desc>
8633 Associated medium storage does not exist (either was not created yet or
8634 was deleted).
8635 </desc>
8636 </const>
8637 <const name="Created" value="1">
8638 <desc>
8639 Associated storage exists and accessible; this gets set if the
8640 accessibility check performed by <link to="IMedium::refreshState" />
8641 was successful.
8642 </desc>
8643 </const>
8644 <const name="LockedRead" value="2">
8645 <desc>
8646 Medium is locked for reading (see <link to="IMedium::lockRead"/>),
8647 no data modification is possible.
8648 </desc>
8649 </const>
8650 <const name="LockedWrite" value="3">
8651 <desc>
8652 Medium is locked for writing (see <link to="IMedium::lockWrite"/>),
8653 no concurrent data reading or modification is possible.
8654 </desc>
8655 </const>
8656 <const name="Inaccessible" value="4">
8657 <desc>
8658 Medium accessiblity check (see <link to="IMedium::refreshState" />) has
8659 not yet been performed, or else, associated medium storage is not
8660 accessible. In the first case, <link to="IMedium::lastAccessError"/>
8661 is empty, in the second case, it describes the error that occured.
8662 </desc>
8663 </const>
8664 <const name="Creating" value="5">
8665 <desc>
8666 Associated medium storage is being created.
8667 </desc>
8668 </const>
8669 <const name="Deleting" value="6">
8670 <desc>
8671 Associated medium storage is being deleted.
8672 </desc>
8673 </const>
8674 </enum>
8675
8676 <enum
8677 name="MediumType"
8678 uuid="11f6f7a5-0327-409a-9d42-7db6a0cec578"
8679 >
8680 <desc>
8681 Virtual medium type.
8682 <see>IMedium</see>
8683 </desc>
8684
8685 <const name="Normal" value="0">
8686 <desc>
8687 Normal medium (attached directly or indirectly, preserved
8688 when taking snapshots).
8689 </desc>
8690 </const>
8691 <const name="Immutable" value="1">
8692 <desc>
8693 Immutable medium (attached indirectly, changes are wiped out
8694 the next time the virtual machine is started).
8695 </desc>
8696 </const>
8697 <const name="Writethrough" value="2">
8698 <desc>
8699 Write through medium (attached directly, ignored when
8700 taking snapshots).
8701 </desc>
8702 </const>
8703 </enum>
8704
8705 <enum
8706 name="MediumVariant"
8707 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8708 >
8709 <desc>
8710 Virtual medium image variant. More than one flag may be set.
8711 <see>IMedium</see>
8712 </desc>
8713
8714 <const name="Standard" value="0">
8715 <desc>
8716 No particular variant requested, results in using the backend default.
8717 </desc>
8718 </const>
8719 <const name="VmdkSplit2G" value="0x01">
8720 <desc>
8721 VMDK image split in chunks of less than 2GByte.
8722 </desc>
8723 </const>
8724 <const name="VmdkStreamOptimized" value="0x04">
8725 <desc>
8726 VMDK streamOptimized image. Special import/export format which is
8727 read-only/append-only.
8728 </desc>
8729 </const>
8730 <const name="VmdkESX" value="0x08">
8731 <desc>
8732 VMDK format variant used on ESX products.
8733 </desc>
8734 </const>
8735 <const name="Fixed" value="0x10000">
8736 <desc>
8737 Fixed image. Only allowed for base images.
8738 </desc>
8739 </const>
8740 <const name="Diff" value="0x20000">
8741 <desc>
8742 Fixed image. Only allowed for base images.
8743 </desc>
8744 </const>
8745 </enum>
8746
8747 <interface
8748 name="IMediumAttachment" extends="$unknown"
8749 uuid="e58eb3eb-8627-428b-bdf8-34487c848de5"
8750 wsmap="struct"
8751 >
8752 <desc>
8753 The IMediumAttachment interface represents the attachment
8754 of a storage medium to a virtual machine. Each machine contains
8755 an array of its medium attachments in <link to="IMachine::mediumAttachments"/>.
8756
8757 Each medium attachment specifies a storage controller as well as a port
8758 and device number. Fixed media (hard disks) will always also specify
8759 an instance of IMedium in <link to="#medium" />, referring to the hard disk
8760 medium. For removeable media, the IMedia instance is optional; it can be
8761 @c null if no media is mounted (see <link to="IMachine::mountMedium" />).
8762 </desc>
8763
8764 <attribute name="medium" type="IMedium" readonly="yes">
8765 <desc>Medium object associated with this attachment; it
8766 can be @c null for removable devices.</desc>
8767 </attribute>
8768
8769 <attribute name="controller" type="wstring" readonly="yes">
8770 <desc>Name of the storage controller of this attachment; this
8771 refers to one of the controllers in <link to="IMachine::storageControllers" />
8772 by name.</desc>
8773 </attribute>
8774
8775 <attribute name="port" type="long" readonly="yes">
8776 <desc>Port number of this attachment.</desc>
8777 </attribute>
8778
8779 <attribute name="device" type="long" readonly="yes">
8780 <desc>Device slot number of this attachment.</desc>
8781 </attribute>
8782
8783 <attribute name="type" type="DeviceType" readonly="yes">
8784 <desc>Device type of this attachment.</desc>
8785 </attribute>
8786
8787 <attribute name="passthrough" type="boolean" readonly="yes">
8788 <desc>Pass I/O requests through to a device on the host.</desc>
8789 </attribute>
8790
8791 </interface>
8792
8793 <interface
8794 name="IMedium" extends="$unknown"
8795 uuid="aa8167ba-df72-4738-b740-9b84377ba9f1"
8796 wsmap="managed"
8797 >
8798 <desc>
8799 The IMedium interface represents virtual storage for a machine's
8800 hard disks, CD/DVD or floppy drives. It will typically represent
8801 a disk image on the host, for example a VDI or VMDK file representing
8802 a virtual hard disk, or an ISO or RAW file representing virtual
8803 removable media, but can also point to a network location (e.g.
8804 for iSCSI targets).
8805
8806 Instances of IMedium are connected to virtual machines by way of
8807 medium attachments (see <link to="IMediumAttachment" />), which link
8808 the storage medium to a particular device slot of a storage controller
8809 of the virtual machine.
8810 In the VirtualBox API, virtual storage is therefore always represented
8811 by the following chain of object links:
8812
8813 <ul>
8814 <li><link to="IMachine::storageControllers"/> contains an array of
8815 storage controllers (IDE, SATA, SCSI or a floppy controller;
8816 these are instances of <link to="IStorageController"/>).</li>
8817 <li><link to="IMachine::mediumAttachments"/> contains an array of
8818 medium attachments (instances of <link to="IMediumAttachment"/>),
8819 each containing a storage controller from the above array, a
8820 port/device specification, and an instance of IMedium representing
8821 the medium storage (image file).
8822
8823 For removable media, the storage medium is optional; a medium
8824 attachment with no medium represents a CD/DVD or floppy drive
8825 with no medium inserted. By contrast, hard disk attachments
8826 will always have an IMedium object attached.</li>
8827 <li>Each IMedium in turn points to a storage unit (such as a file
8828 on the host computer or a network resource) that holds actual
8829 data. This location is represented by the <link to="#location"/>
8830 attribute.</li>
8831 </ul>
8832
8833 Existing media are opened using the following methods, depending on the
8834 media type:
8835 <ul>
8836 <li><link to="IVirtualBox::openHardDisk"/></li>
8837 <li><link to="IVirtualBox::openDVDImage"/></li>
8838 <li><link to="IVirtualBox::openFloppyImage"/></li>
8839 </ul>
8840
8841 New hard disk media can be created with the VirtualBox API using the
8842 <link to="IVirtualBox::createHardDisk"/> method.
8843
8844 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8845 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8846 type in a regular file.
8847
8848 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8849 drive; in that case the <link to="#id" /> attribute contains the UUID of
8850 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8851
8852 <h3>Known media</h3>
8853
8854 When an existing medium is opened for the first time, it is automatically
8855 remembered by the given VirtualBox installation or, in other words, becomes
8856 a <i>known medium</i>. Known media are stored in the media
8857 registry transparently maintained by VirtualBox and stored in settings
8858 files so that this registry is preserved when VirtualBox is not running.
8859
8860 Newly created virtual media are remembered only when the associated
8861 storage unit is actually created.
8862
8863 All known media can be enumerated using
8864 <link to="IVirtualBox::hardDisks"/>,
8865 <link to="IVirtualBox::DVDImages"/> and
8866 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8867 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8868 and similar methods or by location using
8869 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8870
8871 Only known media can be attached to virtual machines.
8872
8873 Removing known media from the media registry is performed when the given
8874 medium is closed using the <link to="#close"/> method or when its
8875 associated storage unit is deleted.
8876
8877 <h3>Accessibility checks</h3>
8878
8879 VirtualBox defers media accessibility checks until the <link to="#refreshState" />
8880 method is called explicitly on a medium. This is done to make the VirtualBox object
8881 ready for serving requests as fast as possible and let the end-user
8882 application decide if it needs to check media accessibility right away or not.
8883
8884 As a result, when VirtualBox starts up (e.g. the VirtualBox
8885 object gets created for the first time), all known media are in the
8886 "Inaccessible" state, but the value of the <link to="#lastAccessError"/>
8887 attribute is an empty string because no actual accessibility check has
8888 been made yet.
8889
8890 After calling <link to="#refreshState" />, a medium is considered
8891 <i>accessible</i> if its storage unit can be read. In that case, the
8892 <link to="#state"/> attribute has a value of "Created". If the storage
8893 unit cannot be read (for example, because it is located on a disconnected
8894 network resource, or was accidentally deleted outside VirtualBox),
8895 the medium is considered <i>inaccessible</i>, which is indicated by the
8896 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8897 obtained by reading the <link to="#lastAccessError"/> attribute.
8898
8899 <h3>Medium types</h3>
8900
8901 There are three types of medium behavior (see <link to="MediumType" />):
8902 "normal", "immutable" and "writethrough", represented by the
8903 <link to="#type"/> attribute. The type of the medium defines how the
8904 medium is attached to a virtual machine and what happens when a
8905 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8906 attached medium is taken. At the moment DVD and floppy media are always
8907 of type "writethrough".
8908
8909 All media can be also divided in two groups: <i>base</i> media and
8910 <i>differencing</i> media. A base medium contains all sectors of the
8911 medium data in its own storage and therefore can be used independently.
8912 In contrast, a differencing mediun is a "delta" to some other medium and
8913 contains only those sectors which differ from that other medium, which is
8914 then called a <i>parent</i>. The differencing medium is said to be
8915 <i>linked to</i> that parent. The parent may be itself a differencing
8916 medium, thus forming a chain of linked media. The last element in that
8917 chain must always be a base medium. Note that several differencing
8918 media may be linked to the same parent medium.
8919
8920 Differencing media can be distinguished from base media by querying the
8921 <link to="#parent"/> attribute: base media do not have parents they would
8922 depend on, so the value of this attribute is always @c null for them.
8923 Using this attribute, it is possible to walk up the medium tree (from the
8924 child medium to its parent). It is also possible to walk down the tree
8925 using the <link to="#children"/> attribute.
8926
8927 Note that the type of all differencing media is
8928 <link to="MediumType_Normal" />; all other values are meaningless for
8929 them. Base media may be of any type.
8930
8931 <h3>Creating hard disks</h3>
8932
8933 New base hard disks are created using
8934 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8935 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8936 disks are usually implicitly created by VirtualBox when needed but may
8937 also be created explicitly using <link to="#createDiffStorage"/>.
8938
8939 After the hard disk is successfully created (including the storage unit)
8940 or opened, it becomes a known hard disk (remembered in the internal media
8941 registry). Known hard disks can be attached to a virtual machine, accessed
8942 through <link to="IVirtualBox::getHardDisk"/> and
8943 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8944 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8945
8946 The following methods, besides <link to="IMedium::close"/>,
8947 automatically remove the hard disk from the media registry:
8948 <ul>
8949 <li><link to="#deleteStorage"/></li>
8950 <li><link to="#mergeTo"/></li>
8951 </ul>
8952
8953 If the storage unit of the hard disk is a regular file in the host's
8954 file system then the rules stated in the description of the
8955 <link to="IMedium::location"/> attribute apply when setting its value. In
8956 addition, a plain file name without any path may be given, in which case
8957 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8958 folder</link> will be prepended to it.
8959
8960 <h4>Automatic composition of the file name part</h4>
8961
8962 Another extension to the <link to="IMedium::location"/> attribute is that
8963 there is a possibility to cause VirtualBox to compose a unique value for
8964 the file name part of the location using the UUID of the hard disk. This
8965 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
8966 e.g. before the storage unit is created, and works as follows. You set the
8967 value of the <link to="IMedium::location"/> attribute to a location
8968 specification which only contains the path specification but not the file
8969 name part and ends with either a forward slash or a backslash character.
8970 In response, VirtualBox will generate a new UUID for the hard disk and
8971 compose the file name using the following pattern:
8972 <pre>
8973 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8974 </pre>
8975 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8976 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8977 is the default extension for the storage format of this hard disk. After
8978 that, you may call any of the methods that create a new hard disk storage
8979 unit and they will use the generated UUID and file name.
8980
8981 <h3>Attaching Hard Disks</h3>
8982
8983 Hard disks are attached to virtual machines using the
8984 <link to="IMachine::attachDevice"/> method and detached using the
8985 <link to="IMachine::detachDevice"/> method. Depending on their
8986 <link to="#type"/>, hard disks are attached either
8987 <i>directly</i> or <i>indirectly</i>.
8988
8989 When a hard disk is being attached directly, it is associated with the
8990 virtual machine and used for hard disk operations when the machine is
8991 running. When a hard disk is being attached indirectly, a new differencing
8992 hard disk linked to it is implicitly created and this differencing hard
8993 disk is associated with the machine and used for hard disk operations.
8994 This also means that if <link to="IMachine::attachDevice"/> performs
8995 a direct attachment then the same hard disk will be returned in response
8996 to the subsequent <link to="IMachine::getMedium"/> call; however if
8997 an indirect attachment is performed then
8998 <link to="IMachine::getMedium"/> will return the implicitly created
8999 differencing hard disk, not the original one passed to <link
9000 to="IMachine::attachDevice"/>. In detail:
9001
9002 <ul>
9003 <li><b>Normal base</b> hard disks that do not have children (i.e.
9004 differencing hard disks linked to them) and that are not already
9005 attached to virtual machines in snapshots are attached <b>directly</b>.
9006 Otherwise, they are attached <b>indirectly</b> because having
9007 dependent children or being part of the snapshot makes it impossible
9008 to modify hard disk contents without breaking the integrity of the
9009 dependent party. The <link to="#readOnly"/> attribute allows to
9010 quickly determine the kind of the attachment for the given hard
9011 disk. Note that if a normal base hard disk is to be indirectly
9012 attached to a virtual machine with snapshots then a special
9013 procedure called <i>smart attachment</i> is performed (see below).</li>
9014 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
9015 they are attached <b>directly</b> if they do not have children and are
9016 not attached to virtual machines in snapshots, and <b>indirectly</b>
9017 otherwise. Note that the smart attachment procedure is never performed
9018 for differencing hard disks.</li>
9019 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
9020 they are designed to be non-writable. If an immutable hard disk is
9021 attached to a virtual machine with snapshots then a special
9022 procedure called smart attachment is performed (see below).</li>
9023 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
9024 also as designed. This also means that writethrough hard disks cannot
9025 have other hard disks linked to them at all.</li>
9026 </ul>
9027
9028 Note that the same hard disk, regardless of its type, may be attached to
9029 more than one virtual machine at a time. In this case, the machine that is
9030 started first gains exclusive access to the hard disk and attempts to
9031 start other machines having this hard disk attached will fail until the
9032 first machine is powered down.
9033
9034 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
9035 that the given hard disk remains associated with the given machine after a
9036 successful <link to="IMachine::detachDevice"/> call until
9037 <link to="IMachine::saveSettings"/> is called to save all changes to
9038 machine settings to disk. This deferring is necessary to guarantee that
9039 the hard disk configuration may be restored at any time by a call to
9040 <link to="IMachine::discardSettings"/> before the settings
9041 are saved (committed).
9042
9043 Note that if <link to="IMachine::discardSettings"/> is called after
9044 indirectly attaching some hard disks to the machine but before a call to
9045 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
9046 all differencing hard disks implicitly created by
9047 <link to="IMachine::attachDevice"/> for these indirect attachments.
9048 Such implicitly created hard disks will also be immediately deleted when
9049 detached explicitly using the <link to="IMachine::detachDevice"/>
9050 call if it is made before <link to="IMachine::saveSettings"/>. This
9051 implicit deletion is safe because newly created differencing hard
9052 disks do not contain any user data.
9053
9054 However, keep in mind that detaching differencing hard disks that were
9055 implicitly created by <link to="IMachine::attachDevice"/>
9056 before the last <link to="IMachine::saveSettings"/> call will
9057 <b>not</b> implicitly delete them as they may already contain some data
9058 (for example, as a result of virtual machine execution). If these hard
9059 disks are no more necessary, the caller can always delete them explicitly
9060 using <link to="#deleteStorage"/> after they are actually de-associated
9061 from this machine by the <link to="IMachine::saveSettings"/> call.
9062
9063 <h3>Smart Attachment</h3>
9064
9065 When normal base or immutable hard disks are indirectly attached to a
9066 virtual machine then some additional steps are performed to make sure the
9067 virtual machine will have the most recent "view" of the hard disk being
9068 attached. These steps include walking through the machine's snapshots
9069 starting from the current one and going through ancestors up to the first
9070 snapshot. Hard disks attached to the virtual machine in all
9071 of the encountered snapshots are checked whether they are descendants of
9072 the given normal base or immutable hard disk. The first found child (which
9073 is the differencing hard disk) will be used instead of the normal base or
9074 immutable hard disk as a parent for creating a new differencing hard disk
9075 that will be actually attached to the machine. And only if no descendants
9076 are found or if the virtual machine does not have any snapshots then the
9077 normal base or immutable hard disk will be used itself as a parent for
9078 this differencing hard disk.
9079
9080 It is easier to explain what smart attachment does using the
9081 following example:
9082 <pre>
9083BEFORE attaching B.vdi: AFTER attaching B.vdi:
9084
9085Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
9086 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
9087 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
9088 Snapshot 4 (none) Snapshot 4 (none)
9089 CurState (none) CurState (D3->D2.vdi)
9090
9091 NOT
9092 ...
9093 CurState (D3->B.vdi)
9094 </pre>
9095 The first column is the virtual machine configuration before the base hard
9096 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
9097 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
9098 mean that the hard disk that is actually attached to the machine is a
9099 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
9100 another hard disk, <tt>B.vdi</tt>.
9101
9102 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
9103 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
9104 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
9105 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
9106 it cannot be attached directly and needs an indirect attachment (i.e.
9107 implicit creation of a new differencing hard disk). Due to the smart
9108 attachment procedure, the new differencing hard disk
9109 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
9110 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
9111 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
9112 machine.
9113
9114 Note that if there is more than one descendant hard disk of the given base
9115 hard disk found in a snapshot, and there is an exact device, channel and
9116 bus match, then this exact match will be used. Otherwise, the youngest
9117 descendant will be picked up.
9118
9119 There is one more important aspect of the smart attachment procedure which
9120 is not related to snapshots at all. Before walking through the snapshots
9121 as described above, the backup copy of the current list of hard disk
9122 attachment is searched for descendants. This backup copy is created when
9123 the hard disk configuration is changed for the first time after the last
9124 <link to="IMachine::saveSettings"/> call and used by
9125 <link to="IMachine::discardSettings"/> to undo the recent hard disk
9126 changes. When such a descendant is found in this backup copy, it will be
9127 simply re-attached back, without creating a new differencing hard disk for
9128 it. This optimization is necessary to make it possible to re-attach the
9129 base or immutable hard disk to a different bus, channel or device slot
9130 without losing the contents of the differencing hard disk actually
9131 attached to the machine in place of it.
9132 </desc>
9133
9134 <attribute name="id" type="uuid" mod="string" readonly="yes">
9135 <desc>
9136 UUID of the medium. For a newly created medium, this value is a randomly
9137 generated UUID.
9138
9139 <note>
9140 For media in one of MediumState_NotCreated, MediumState_Creating or
9141 MediumState_Deleting states, the value of this property is undefined
9142 and will most likely be an empty UUID.
9143 </note>
9144 </desc>
9145 </attribute>
9146
9147 <attribute name="description" type="wstring">
9148 <desc>
9149 Optional description of the medium. For a newly created medium the value
9150 of this attribute is an empty string.
9151
9152 Medium types that don't support this attribute will return E_NOTIMPL in
9153 attempt to get or set this attribute's value.
9154
9155 <note>
9156 For some storage types, reading this attribute may return an outdated
9157 (last known) value when <link to="#state"/> is <link
9158 to="MediumState_Inaccessible"/> or <link
9159 to="MediumState_LockedWrite"/> because the value of this attribute is
9160 stored within the storage unit itself. Also note that changing the
9161 attribute value is not possible in such case, as well as when the
9162 medium is the <link to="MediumState_LockedRead"/> state.
9163 </note>
9164 </desc>
9165 </attribute>
9166
9167 <attribute name="state" type="MediumState" readonly="yes">
9168 <desc>
9169 Returns the current medium state, which is the last state set by
9170 the accessibility check performed by <link to="#refreshState"/>.
9171 If that method has not yet been called on the medium, the state
9172 is "Inaccessible"; as opposed to truly inaccessible media, the
9173 value of <link to="#lastAccessError"/> will be an empty string in
9174 that case.
9175
9176 <note>As of version 3.1, this no longer performs an accessibility check
9177 automatically; call <link to="#refreshState"/> for that.
9178 </note>
9179 </desc>
9180 </attribute>
9181
9182 <attribute name="location" type="wstring">
9183 <desc>
9184 Location of the storage unit holding medium data.
9185
9186 The format of the location string is medium type specific. For medium
9187 types using regular files in a host's file system, the location
9188 string is the full file name.
9189
9190 Some medium types may support changing the storage unit location by
9191 simply changing the value of this property. If this operation is not
9192 supported, the implementation will return E_NOTIMPL in attempt to set
9193 this attribute's value.
9194
9195 When setting a value of the location attribute which is a regular file
9196 in the host's file system, the given file name may be either relative to
9197 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
9198 absolute. Note that if the given location specification does not contain
9199 the file extension part then a proper default extension will be
9200 automatically appended by the implementation depending on the medium type.
9201 </desc>
9202 </attribute>
9203
9204 <attribute name="name" type="wstring" readonly="yes">
9205 <desc>
9206 Name of the storage unit holding medium data.
9207
9208 The returned string is a short version of the <link to="#location"/>
9209 attribute that is suitable for representing the medium in situations
9210 where the full location specification is too long (such as lists
9211 and comboboxes in GUI frontends). This string is also used by frontends
9212 to sort the media list alphabetically when needed.
9213
9214 For example, for locations that are regular files in the host's file
9215 system, the value of this attribute is just the file name (+ extension),
9216 without the path specification.
9217
9218 Note that as opposed to the <link to="#location"/> attribute, the name
9219 attribute will not necessary be unique for a list of media of the
9220 given type and format.
9221 </desc>
9222 </attribute>
9223
9224 <attribute name="deviceType" type="DeviceType" readonly="yes">
9225 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
9226 medium.</desc>
9227 </attribute>
9228
9229 <attribute name="hostDrive" type="boolean" readonly="yes">
9230 <desc>True if this corresponds to a drive on the host.</desc>
9231 </attribute>
9232
9233 <attribute name="size" type="unsigned long long" readonly="yes">
9234 <desc>
9235 Physical size of the storage unit used to hold medium data (in bytes).
9236
9237 <note>
9238 For media whose <link to="#state"/> is <link
9239 to="MediumState_Inaccessible"/>, the value of this property is the
9240 last known size. For <link to="MediumState_NotCreated"/> media,
9241 the returned value is zero.
9242 </note>
9243 </desc>
9244 </attribute>
9245
9246 <attribute name="format" type="wstring" readonly="yes">
9247 <desc>
9248 Storage format of this medium.
9249
9250 The value of this attribute is a string that specifies a backend used
9251 to store medium data. The storage format is defined when you create a
9252 new medium or automatically detected when you open an existing medium,
9253 and cannot be changed later.
9254
9255 The list of all storage formats supported by this VirtualBox
9256 installation can be obtained using
9257 <link to="ISystemProperties::mediumFormats"/>.
9258 </desc>
9259 </attribute>
9260
9261 <attribute name="type" type="MediumType">
9262 <desc>
9263 Type (role) of this medium.
9264
9265 The following constraints apply when changing the value of this
9266 attribute:
9267 <ul>
9268 <li>If a medium is attached to a virtual machine (either in the
9269 current state or in one of the snapshots), its type cannot be
9270 changed.
9271 </li>
9272 <li>As long as the medium has children, its type cannot be set
9273 to <link to="MediumType_Writethrough"/>.
9274 </li>
9275 <li>The type of all differencing media is
9276 <link to="MediumType_Normal"/> and cannot be changed.
9277 </li>
9278 </ul>
9279
9280 The type of a newly created or opened medium is set to
9281 <link to="MediumType_Normal"/>, except for DVD and floppy media,
9282 which have a type of <link to="MediumType_Writethrough"/>.
9283 </desc>
9284 </attribute>
9285
9286 <attribute name="parent" type="IMedium" readonly="yes">
9287 <desc>
9288 Parent of this medium (the medium this medium is directly based
9289 on).
9290
9291 Only differencing media have parents. For base (non-differencing)
9292 media, @c null is returned.
9293 </desc>
9294 </attribute>
9295
9296 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
9297 <desc>
9298 Children of this medium (all differencing media directly based
9299 on this medium). A @c null array is returned if this medium
9300 does not have any children.
9301 </desc>
9302 </attribute>
9303
9304 <attribute name="base" type="IMedium" readonly="yes">
9305 <desc>
9306 Base medium of this medium.
9307
9308 If this is a differencing medium, its base medium is the medium
9309 the given medium branch starts from. For all other types of media, this
9310 property returns the medium object itself (i.e. the same object this
9311 property is read on).
9312 </desc>
9313 </attribute>
9314
9315 <attribute name="readOnly" type="boolean" readonly="yes">
9316 <desc>
9317 Returns @c true if this medium is read-only and @c false otherwise.
9318
9319 A medium is considered to be read-only when its contents cannot be
9320 modified without breaking the integrity of other parties that depend on
9321 this medium such as its child media or snapshots of virtual machines
9322 where this medium is attached to these machines. If there are no
9323 children and no such snapshots then there is no dependency and the
9324 medium is not read-only.
9325
9326 The value of this attribute can be used to determine the kind of the
9327 attachment that will take place when attaching this medium to a
9328 virtual machine. If the value is @c false then the medium will
9329 be attached directly. If the value is @c true then the medium
9330 will be attached indirectly by creating a new differencing child
9331 medium for that. See the interface description for more information.
9332
9333 Note that all <link to="MediumType_Immutable">Immutable</link> media
9334 are always read-only while all
9335 <link to="MediumType_Writethrough">Writethrough</link> media are
9336 always not.
9337
9338 <note>
9339 The read-only condition represented by this attribute is related to
9340 the medium type and usage, not to the current
9341 <link to="IMedium::state">medium state</link> and not to the read-only
9342 state of the storage unit.
9343 </note>
9344 </desc>
9345 </attribute>
9346
9347 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9348 <desc>
9349 Logical size of this medium (in megabytes), as reported to the
9350 guest OS running inside the virtual machine this medium is
9351 attached to. The logical size is defined when the medium is created
9352 and cannot be changed later.
9353
9354 <note>
9355 Reading this property on a differencing medium will return the size
9356 of its <link to="#base"/> medium.
9357 </note>
9358 <note>
9359 For media whose state is <link to="#state"/> is <link
9360 to="MediumState_Inaccessible"/>, the value of this property is the
9361 last known logical size. For <link to="MediumaState_NotCreated"/>
9362 media, the returned value is zero.
9363 </note>
9364 </desc>
9365 </attribute>
9366
9367 <attribute name="autoReset" type="boolean">
9368 <desc>
9369 Whether this differencing medium will be automatically reset each
9370 time a virtual machine it is attached to is powered up.
9371
9372 See <link to="#reset()"/> for more information about resetting
9373 differencing media.
9374
9375 <note>
9376 Reading this property on a base (non-differencing) medium will
9377 always @c false. Changing the value of this property in this
9378 case is not supported.
9379 </note>
9380
9381 <result name="VBOX_E_NOT_SUPPORTED">
9382 This is not a differencing medium (when changing the attribute
9383 value).
9384 </result>
9385 </desc>
9386 </attribute>
9387
9388 <attribute name="lastAccessError" type="wstring" readonly="yes">
9389 <desc>
9390 Text message that represents the result of the last accessibility
9391 check performed by <link to="#refreshState"/>.
9392
9393 An empty string is returned if the last accessibility check
9394 was successful or has not yet been called. As a result, if
9395 <link to="#state" /> is "Inaccessible" and this attribute is empty,
9396 then <link to="#refreshState"/> has yet to be called; this is the
9397 default value of media after VirtualBox initialization.
9398 A non-empty string indicates a failure and should normally describe
9399 a reason of the failure (for example, a file read error).
9400 </desc>
9401 </attribute>
9402
9403 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9404 <desc>
9405 Array of UUIDs of all machines this medium is attached to.
9406
9407 A @c null array is returned if this medium is not attached to any
9408 machine or to any machine's snapshot.
9409
9410 <note>
9411 The returned array will include a machine even if this medium is not
9412 attached to that machine in the current state but attached to it in
9413 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9414 details.
9415 </note>
9416 </desc>
9417 </attribute>
9418
9419 <method name="refreshState">
9420 <desc>
9421 If the current medium state (see <link to="MediumState"/>) is one of
9422 "Created", "Inaccessible" or "LockedRead", then this performs an
9423 accessibility check on the medium and sets the value of the <link to="#state"/>
9424 attribute accordingly; that value is also returned for convenience.
9425
9426 For all other state values, this does not perform a refresh but returns
9427 the state only.
9428
9429 The refresh, if performed, may take a long time (several seconds or even
9430 minutes, depending on the storage unit location and format) because it performs an
9431 accessibility check of the storage unit. This check may cause a significant
9432 delay if the storage unit of the given medium is, for example, a file located
9433 on a network share which is not currently accessible due to connectivity
9434 problems. In that case, the call will not return until a timeout
9435 interval defined by the host OS for this operation expires. For this reason,
9436 it is recommended to never read this attribute on the main UI thread to avoid
9437 making the UI unresponsive.
9438
9439 If the last known state of the medium is "Created" and the accessibility
9440 check fails, then the state would be set to "Inaccessible", and
9441 <link to="#lastAccessError"/> may be used to get more details about the
9442 failure. If the state of the medium is "LockedRead", then it remains the
9443 same, and a non-empty value of <link to="#lastAccessError"/> will
9444 indicate a failed accessibility check in this case.
9445
9446 Note that not all medium states are applicable to all medium types.
9447 </desc>
9448 <param name="state" type="MediumState" dir="return">
9449 <desc>
9450 New medium state.
9451 </desc>
9452 </param>
9453 </method>
9454
9455 <method name="getSnapshotIds">
9456 <desc>
9457 Returns an array of UUIDs of all snapshots of the given machine where
9458 this medium is attached to.
9459
9460 If the medium is attached to the machine in the current state, then the
9461 first element in the array will always be the ID of the queried machine
9462 (i.e. the value equal to the @c machineId argument), followed by
9463 snapshot IDs (if any).
9464
9465 If the medium is not attached to the machine in the current state, then
9466 the array will contain only snapshot IDs.
9467
9468 The returned array may be @c null if this medium is not attached
9469 to the given machine at all, neither in the current state nor in one of
9470 the snapshots.
9471 </desc>
9472 <param name="machineId" type="uuid" mod="string" dir="in">
9473 <desc>
9474 UUID of the machine to query.
9475 </desc>
9476 </param>
9477 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9478 <desc>
9479 Array of snapshot UUIDs of the given machine using this medium.
9480 </desc>
9481 </param>
9482 </method>
9483
9484 <method name="lockRead">
9485 <desc>
9486 Locks this medium for reading.
9487
9488 A read lock is shared: many clients can simultaneously lock the
9489 same medium for reading unless it is already locked for writing (see
9490 <link to="#lockWrite"/>) in which case an error is returned.
9491
9492 When the medium is locked for reading, it cannot be modified
9493 from within VirtualBox. This means that any method that changes
9494 the properties of this medium or contents of the storage unit
9495 will return an error (unless explicitly stated otherwise). That
9496 includes an attempt to start a virtual machine that wants to
9497 write to the the medium.
9498
9499 When the virtual machine is started up, it locks for reading all
9500 media it uses in read-only mode. If some medium cannot be locked
9501 for reading, the startup procedure will fail.
9502 A medium is typically locked for reading while it is used by a running
9503 virtual machine but has a depending differencing image that receives
9504 the actual write operations. This way one base medium can have
9505 multiple child differencing images which can be written to
9506 simultaneously. Read-only media such as DVD and floppy images are
9507 also locked for reading only (so they can be in use by multiple
9508 machines simultaneously).
9509
9510 A medium is also locked for reading when it is the source of a
9511 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9512
9513 The medium locked for reading must be unlocked using the <link
9514 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9515 can be nested and must be followed by the same number of paired
9516 <link to="#unlockRead"/> calls.
9517
9518 This method sets the medium state (see <link to="#state"/>) to
9519 "LockedRead" on success. The medium's previous state must be
9520 one of "Created", "Inaccessible" or "LockedRead".
9521
9522 Locking an inaccessible medium is not an error; this method performs
9523 a logical lock that prevents modifications of this medium through
9524 the VirtualBox API, not a physical file-system lock of the underlying
9525 storage unit.
9526
9527 This method returns the current state of the medium
9528 <i>before</i> the operation.
9529
9530 <result name="VBOX_E_INVALID_OBJECT_STATE">
9531 Invalid medium state (e.g. not created, locked, inaccessible,
9532 creating, deleting).
9533 </result>
9534
9535 </desc>
9536 <param name="state" type="MediumState" dir="return">
9537 <desc>
9538 State of the medium after the operation.
9539 </desc>
9540 </param>
9541 </method>
9542
9543 <method name="unlockRead">
9544 <desc>
9545 Cancels the read lock previously set by <link to="#lockRead"/>.
9546
9547 For both success and failure, this method returns the current state
9548 of the medium <i>after</i> the operation.
9549
9550 See <link to="#lockRead"/> for more details.
9551
9552 <result name="VBOX_E_INVALID_OBJECT_STATE">
9553 Medium not locked for reading.
9554 </result>
9555
9556 </desc>
9557 <param name="state" type="MediumState" dir="return">
9558 <desc>
9559 State of the medium after the operation.
9560 </desc>
9561 </param>
9562 </method>
9563
9564 <method name="lockWrite">
9565 <desc>
9566 Locks this medium for writing.
9567
9568 A write lock, as opposed to <link to="#lockRead"/>, is
9569 exclusive: there may be only one client holding a write lock,
9570 and there may be no read locks while the write lock is held.
9571 As a result, read-locking fails if a write lock is held, and
9572 write-locking fails if either a read or another write lock is held.
9573
9574 When a medium is locked for writing, it cannot be modified
9575 from within VirtualBox, and it is not guaranteed that the values
9576 of its properties are up-to-date. Any method that changes the
9577 properties of this medium or contents of the storage unit will
9578 return an error (unless explicitly stated otherwise).
9579
9580 When a virtual machine is started up, it locks for writing all
9581 media it uses to write data to. If any medium could not be locked
9582 for writing, the startup procedure will fail. If a medium has
9583 differencing images, then while the machine is running, only
9584 the last ("leaf") differencing image is locked for writing,
9585 whereas its parents are locked for reading only.
9586
9587 A medium is also locked for writing when it is the target of a
9588 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9589
9590 The medium locked for writing must be unlocked using the <link
9591 to="#unlockWrite"/> method. Write locks <i>cannot</i> be nested.
9592
9593 This method sets the medium state (see <link to="#state"/>) to
9594 "LockedWrite" on success. The medium's previous state must be
9595 either "Created" or "Inaccessible".
9596
9597 Locking an inaccessible medium is not an error; this method performs
9598 a logical lock that prevents modifications of this medium through
9599 the VirtualBox API, not a physical file-system lock of the underlying
9600 storage unit.
9601
9602 For both, success and failure, this method returns the current
9603 state of the medium <i>before</i> the operation.
9604
9605 <result name="VBOX_E_INVALID_OBJECT_STATE">
9606 Invalid medium state (e.g. not created, locked, inaccessible,
9607 creating, deleting).
9608 </result>
9609
9610 </desc>
9611 <param name="state" type="MediumState" dir="return">
9612 <desc>
9613 State of the medium after the operation.
9614 </desc>
9615 </param>
9616 </method>
9617
9618 <method name="unlockWrite">
9619 <desc>
9620 Cancels the write lock previously set by <link to="#lockWrite"/>.
9621
9622 For both success and failure, this method returns the current
9623 state of the medium <i>after</i> the operation.
9624
9625 See <link to="#lockWrite"/> for more details.
9626
9627 <result name="VBOX_E_INVALID_OBJECT_STATE">
9628 Medium not locked for writing.
9629 </result>
9630
9631 </desc>
9632 <param name="state" type="MediumState" dir="return">
9633 <desc>
9634 State of the medium after the operation.
9635 </desc>
9636 </param>
9637 </method>
9638
9639 <method name="close">
9640 <desc>
9641 Closes this medium.
9642
9643 The medium must not be attached to any known virtual machine
9644 and must not have any known child media, otherwise the
9645 operation will fail.
9646
9647 When the medium is successfully closed, it gets removed from
9648 the list of remembered media, but its storage unit is not
9649 deleted. In particular, this means that this medium can be
9650 later opened again using the <link
9651 to="IVirtualBox::openHardDisk"/> call.
9652
9653 Note that after this method successfully returns, the given medium
9654 object becomes uninitialized. This means that any attempt
9655 to call any of its methods or attributes will fail with the
9656 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9657
9658 <result name="VBOX_E_INVALID_OBJECT_STATE">
9659 Invalid medium state (other than not created, created or
9660 inaccessible).
9661 </result>
9662 <result name="VBOX_E_OBJECT_IN_USE">
9663 Medium attached to virtual machine.
9664 </result>
9665 <result name="VBOX_E_FILE_ERROR">
9666 Settings file not accessible.
9667 </result>
9668 <result name="VBOX_E_XML_ERROR">
9669 Could not parse the settings file.
9670 </result>
9671
9672 </desc>
9673 </method>
9674
9675 <!-- storage methods -->
9676
9677 <method name="getProperty">
9678 <desc>
9679 Returns the value of the custom medium property with the given name.
9680
9681 The list of all properties supported by the given medium format can
9682 be obtained with <link to="IMediumFormat::describeProperties"/>.
9683
9684 Note that if this method returns an empty string in @a value, the
9685 requested property is supported but currently not assigned any value.
9686
9687 <result name="VBOX_E_OBJECT_NOT_FOUND">
9688 Requested property does not exist (not supported by the format).
9689 </result>
9690 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9691 </desc>
9692 <param name="name" type="wstring" dir="in">
9693 <desc>Name of the property to get.</desc>
9694 </param>
9695 <param name="value" type="wstring" dir="return">
9696 <desc>Current property value.</desc>
9697 </param>
9698 </method>
9699
9700 <method name="setProperty">
9701 <desc>
9702 Sets the value of the custom medium property with the given name.
9703
9704 The list of all properties supported by the given medium format can
9705 be obtained with <link to="IMediumFormat::describeProperties"/>.
9706
9707 Note that setting the property value to @c null or an empty string is
9708 equivalent to deleting the existing value. A default value (if it is
9709 defined for this property) will be used by the format backend in this
9710 case.
9711
9712 <result name="VBOX_E_OBJECT_NOT_FOUND">
9713 Requested property does not exist (not supported by the format).
9714 </result>
9715 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9716 </desc>
9717 <param name="name" type="wstring" dir="in">
9718 <desc>Name of the property to set.</desc>
9719 </param>
9720 <param name="value" type="wstring" dir="in">
9721 <desc>Property value to set.</desc>
9722 </param>
9723 </method>
9724
9725 <method name="getProperties">
9726 <desc>
9727 Returns values for a group of properties in one call.
9728
9729 The names of the properties to get are specified using the @a names
9730 argument which is a list of comma-separated property names or
9731 an empty string if all properties are to be returned. Note that currently
9732 the value of this argument is ignored and the method always returns all
9733 existing properties.
9734
9735 The list of all properties supported by the given medium format can
9736 be obtained with <link to="IMediumFormat::describeProperties"/>.
9737
9738 The method returns two arrays, the array of property names corresponding
9739 to the @a names argument and the current values of these properties.
9740 Both arrays have the same number of elements with each elemend at the
9741 given index in the first array corresponds to an element at the same
9742 index in the second array.
9743
9744 Note that for properties that do not have assigned values,
9745 an empty string is returned at the appropriate index in the
9746 @a returnValues array.
9747
9748 </desc>
9749 <param name="names" type="wstring" dir="in">
9750 <desc>
9751 Names of properties to get.
9752 </desc>
9753 </param>
9754 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9755 <desc>Names of returned properties.</desc>
9756 </param>
9757 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9758 <desc>Values of returned properties.</desc>
9759 </param>
9760 </method>
9761
9762 <method name="setProperties">
9763 <desc>
9764 Sets values for a group of properties in one call.
9765
9766 The names of the properties to set are passed in the @a names
9767 array along with the new values for them in the @a values array. Both
9768 arrays have the same number of elements with each elemend at the given
9769 index in the first array corresponding to an element at the same index
9770 in the second array.
9771
9772 If there is at least one property name in @a names that is not valid,
9773 the method will fail before changing the values of any other properties
9774 from the @a names array.
9775
9776 Using this method over <link to="#setProperty"/> is preferred if you
9777 need to set several properties at once since it will result into less
9778 IPC calls.
9779
9780 The list of all properties supported by the given medium format can
9781 be obtained with <link to="IMediumFormat::describeProperties"/>.
9782
9783 Note that setting the property value to @c null or an empty string is
9784 equivalent to deleting the existing value. A default value (if it is
9785 defined for this property) will be used by the format backend in this
9786 case.
9787 </desc>
9788 <param name="names" type="wstring" safearray="yes" dir="in">
9789 <desc>Names of properties to set.</desc>
9790 </param>
9791 <param name="values" type="wstring" safearray="yes" dir="in">
9792 <desc>Values of properties to set.</desc>
9793 </param>
9794 </method>
9795
9796 <!-- storage methods -->
9797
9798 <method name="createBaseStorage">
9799 <desc>
9800 Starts creating a hard disk storage unit (fixed/dynamic, according
9801 to the variant flags) in in the background. The previous storage unit
9802 created for this object, if any, must first be deleted using
9803 <link to="#deleteStorage"/>, otherwise the operation will fail.
9804
9805 Before the operation starts, the medium is placed in
9806 <link to="MediumState_Creating"/> state. If the create operation
9807 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
9808 state.
9809
9810 After the returned progress object reports that the operation has
9811 successfully completed, the medium state will be set to <link
9812 to="MediumState_Created"/>, the medium will be remembered by this
9813 VirtualBox installation and may be attached to virtual machines.
9814
9815 <result name="VBOX_E_NOT_SUPPORTED">
9816 The variant of storage creation operation is not supported. See <link
9817 to="IMediumFormat::capabilities"/>.
9818 </result>
9819 </desc>
9820 <param name="logicalSize" type="unsigned long long" dir="in">
9821 <desc>Maximum logical size of the medium in megabytes.</desc>
9822 </param>
9823 <param name="variant" type="MediumVariant" dir="in">
9824 <desc>Exact image variant which should be created.</desc>
9825 </param>
9826 <param name="progress" type="IProgress" dir="return">
9827 <desc>Progress object to track the operation completion.</desc>
9828 </param>
9829 </method>
9830
9831 <method name="deleteStorage">
9832 <desc>
9833 Starts deleting the storage unit of this medium.
9834
9835 The medium must not be attached to any known virtual machine and must
9836 not have any known child media, otherwise the operation will fail.
9837 It will also fail if there is no storage unit to delete or if deletion
9838 is already in progress, or if the medium is being in use (locked for
9839 read or for write) or inaccessible. Therefore, the only valid state for
9840 this operation to succeed is <link to="MediumState_Created"/>.
9841
9842 Before the operation starts, the medium is placed in
9843 <link to="MediumState_Deleting"/> state and gets removed from the list
9844 of remembered hard disks (media registry). If the delete operation
9845 fails, the medium will be remembered again and placed back to
9846 <link to="MediumState_Created"/> state.
9847
9848 After the returned progress object reports that the operation is
9849 complete, the medium state will be set to
9850 <link to="MediumState_NotCreated"/> and you will be able to use one of
9851 the storage creation methods to create it again.
9852
9853 <see>#close()</see>
9854
9855 <result name="VBOX_E_OBJECT_IN_USE">
9856 Medium is attached to a virtual machine.
9857 </result>
9858 <result name="VBOX_E_NOT_SUPPORTED">
9859 Storage deletion is not allowed because neither of storage creation
9860 operations are supported. See
9861 <link to="IMediumFormat::capabilities"/>.
9862 </result>
9863
9864 <note>
9865 If the deletion operation fails, it is not guaranteed that the storage
9866 unit still exists. You may check the <link to="IMedium::state"/> value
9867 to answer this question.
9868 </note>
9869 </desc>
9870 <param name="progress" type="IProgress" dir="return">
9871 <desc>Progress object to track the operation completion.</desc>
9872 </param>
9873 </method>
9874
9875 <!-- diff methods -->
9876
9877 <method name="createDiffStorage">
9878 <desc>
9879 Starts creating an empty differencing storage unit based on this
9880 medium in the format and at the location defined by the @a target
9881 argument.
9882
9883 The target medium must be in <link to="MediumState_NotCreated"/>
9884 state (i.e. must not have an existing storage unit). Upon successful
9885 completion, this operation will set the type of the target medium to
9886 <link to="MediumType_Normal"/> and create a storage unit necessary to
9887 represent the differencing medium data in the given format (according
9888 to the storage format of the target object).
9889
9890 After the returned progress object reports that the operation is
9891 successfully complete, the target medium gets remembered by this
9892 VirtualBox installation and may be attached to virtual machines.
9893
9894 <note>
9895 The medium will be set to <link to="MediumState_LockedRead"/>
9896 state for the duration of this operation.
9897 </note>
9898 <result name="VBOX_E_OBJECT_IN_USE">
9899 Medium not in @c NotCreated state.
9900 </result>
9901 </desc>
9902 <param name="target" type="IMedium" dir="in">
9903 <desc>Target medium.</desc>
9904 </param>
9905 <param name="variant" type="MediumVariant" dir="in">
9906 <desc>Exact image variant which should be created.</desc>
9907 </param>
9908 <param name="progress" type="IProgress" dir="return">
9909 <desc>Progress object to track the operation completion.</desc>
9910 </param>
9911 </method>
9912
9913 <method name="mergeTo">
9914 <desc>
9915 Starts merging the contents of this medium and all intermediate
9916 differencing media in the chain to the given target medium.
9917
9918 The target medium must be either a descendant of this medium or
9919 its ancestor (otherwise this method will immediately return a failure).
9920 It follows that there are two logical directions of the merge operation:
9921 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9922 ancestor (<i>backward merge</i>). Let us consider the following medium
9923 chain:
9924
9925 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9926
9927 Here, calling this method on the <tt>Base</tt> medium object with
9928 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9929 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9930 merge. Note that in both cases the contents of the resulting medium
9931 will be the same, the only difference is the medium object that takes
9932 the result of the merge operation. In case of the forward merge in the
9933 above example, the result will be written to <tt>Diff_2</tt>; in case of
9934 the backward merge, the result will be written to <tt>Base</tt>. In
9935 other words, the result of the operation is always stored in the target
9936 medium.
9937
9938 Upon successful operation completion, the storage units of all media in
9939 the chain between this (source) medium and the target medium, including
9940 the source medium itself, will be automatically deleted and the
9941 relevant medium objects (including this medium) will become
9942 uninitialized. This means that any attempt to call any of
9943 their methods or attributes will fail with the
9944 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9945 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9946 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> media.
9947 Note that <tt>Diff_2</tt> in this case will become a base medium
9948 itself since it will no longer be based on any other medium.
9949
9950 Considering the above, all of the following conditions must be met in
9951 order for the merge operation to succeed:
9952 <ul>
9953 <li>
9954 Neither this (source) medium nor any intermediate
9955 differencing medium in the chain between it and the target
9956 medium is attached to any virtual machine.
9957 </li>
9958 <li>
9959 Neither the source medium nor the target medium is an
9960 <link to="MediumType_Immutable"/> medium.
9961 </li>
9962 <li>
9963 The part of the medium tree from the source medium to the
9964 target medium is a linear chain, i.e. all medium in this
9965 chain have exactly one child which is the next medium in this
9966 chain. The only exception from this rule is the target medium in
9967 the forward merge operation; it is allowed to have any number of
9968 child media because the merge operation will not change its
9969 logical contents (as it is seen by the guest OS or by children).
9970 </li>
9971 <li>
9972 None of the involved media are in
9973 <link to="MediumState_LockedRead"/> or
9974 <link to="MediumState_LockedWrite"/> state.
9975 </li>
9976 </ul>
9977
9978 <note>
9979 This (source) medium and all intermediates will be placed to <link
9980 to="MediumState_Deleting"/> state and the target medium will be
9981 placed to <link to="MediumState_LockedWrite"/> state and for the
9982 duration of this operation.
9983 </note>
9984 </desc>
9985 <param name="targetId" type="uuid" mod="string" dir="in">
9986 <desc>UUID of the target ancestor or descendant medium.</desc>
9987 </param>
9988 <param name="progress" type="IProgress" dir="return">
9989 <desc>Progress object to track the operation completion.</desc>
9990 </param>
9991 </method>
9992
9993 <!-- clone method -->
9994
9995 <method name="cloneTo">
9996 <desc>
9997 Starts creating a clone of this medium in the format and at the
9998 location defined by the @a target argument.
9999
10000 The target medium must be either in <link to="MediumState_NotCreated"/>
10001 state (i.e. must not have an existing storage unit) or in
10002 <link to="MediumState_Created"/> state (i.e. created and not locked, and
10003 big enough to hold the data or else the copy will be partial). Upon
10004 successful completion, the cloned medium will contain exactly the
10005 same sector data as the medium being cloned, except that in the
10006 first case a new UUID for the clone will be randomly generated, and in
10007 the second case the UUID will remain unchanged.
10008
10009 The @a parent argument defines which medium will be the parent
10010 of the clone. Passing a @c null reference indicates that the clone will
10011 be a base image, i.e. completely independent. It is possible to specify
10012 an arbitrary medium for this parameter, including the parent of the
10013 medium which is being cloned. Even cloning to a child of the source
10014 medium is possible. Note that when cloning to an existing image, the
10015 @a parent irgument is ignored.
10016
10017 After the returned progress object reports that the operation is
10018 successfully complete, the target medium gets remembered by this
10019 VirtualBox installation and may be attached to virtual machines.
10020
10021 <note>
10022 This medium will be placed to <link to="MediumState_LockedRead"/>
10023 state for the duration of this operation.
10024 </note>
10025 <result name="E_NOTIMPL">
10026 The specified cloning variant is not supported at the moment.
10027 </result>
10028 </desc>
10029 <param name="target" type="IMedium" dir="in">
10030 <desc>Target medium.</desc>
10031 </param>
10032 <param name="variant" type="MediumVariant" dir="in">
10033 <desc>Exact image variant which should be created.</desc>
10034 </param>
10035 <param name="parent" type="IMedium" dir="in">
10036 <desc>Parent of the cloned medium.</desc>
10037 </param>
10038 <param name="progress" type="IProgress" dir="return">
10039 <desc>Progress object to track the operation completion.</desc>
10040 </param>
10041 </method>
10042
10043 <!-- other methods -->
10044
10045 <method name="compact">
10046 <desc>
10047 Starts compacting of this medium. This means that the medium is
10048 transformed into a possibly more compact storage representation.
10049 This potentially creates temporary images, which can require a
10050 substantial amount of additional disk space.
10051
10052 This medium will be placed to <link to="MediumState_LockedWrite"/>
10053 state and all its parent media (if any) will be placed to
10054 <link to="MediumState_LockedRead"/> state for the duration of this
10055 operation.
10056
10057 Please note that the results can be either returned straight away,
10058 or later as the result of the background operation via the object
10059 returned via the @a progress parameter.
10060
10061 <result name="VBOX_E_NOT_SUPPORTED">
10062 Medium format does not support compacting (but potentially
10063 needs it).
10064 </result>
10065 </desc>
10066 <param name="progress" type="IProgress" dir="return">
10067 <desc>Progress object to track the operation completion.</desc>
10068 </param>
10069 </method>
10070
10071 <method name="resize">
10072 <desc>
10073 Starts resizing this medium. This means that the nominal size of the
10074 medium is set to the new value. Both increasing and decreasing the
10075 size is possible, and there are no safety checks, since VirtualBox
10076 does not make any assumptions about the medium contents.
10077
10078 Resizing usually needs additional disk space, and possibly also
10079 some temporary disk space. Note that resize does not create a full
10080 temporary copy of the medium, so the additional disk space requirement
10081 is usually much lower than using the clone operation.
10082
10083 This medium will be placed to <link to="MediumState_LockedWrite"/>
10084 state for the duration of this operation.
10085
10086 Please note that the results can be either returned straight away,
10087 or later as the result of the background operation via the object
10088 returned via the @a progress parameter.
10089
10090 <result name="VBOX_E_NOT_SUPPORTED">
10091 Medium format does not support resizing.
10092 </result>
10093 </desc>
10094 <param name="logicalSize" type="unsigned long long" dir="in">
10095 <desc>New nominal capacity of the medium in megabytes.</desc>
10096 </param>
10097 <param name="progress" type="IProgress" dir="return">
10098 <desc>Progress object to track the operation completion.</desc>
10099 </param>
10100 </method>
10101
10102 <method name="reset">
10103 <desc>
10104 Starts erasing the contents of this differencing medium.
10105
10106 This operation will reset the differencing medium to its initial
10107 state when it does not contain any sector data and any read operation is
10108 redirected to its parent medium.
10109
10110 This medium will be placed to <link to="MediumState_LockedWrite"/>
10111 for the duration of this operation.
10112
10113 <result name="VBOX_E_NOT_SUPPORTED">
10114 This is not a differencing medium.
10115 </result>
10116 <result name="VBOX_E_INVALID_OBJECT_STATE">
10117 Medium is not in <link to="MediumState_Created"/> or
10118 <link to="MediumState_Inaccessible"/> state.
10119 </result>
10120 </desc>
10121 <param name="progress" type="IProgress" dir="return">
10122 <desc>Progress object to track the operation completion.</desc>
10123 </param>
10124 </method>
10125
10126 </interface>
10127
10128
10129 <!--
10130 // IMediumFormat
10131 /////////////////////////////////////////////////////////////////////////
10132 -->
10133
10134 <enum
10135 name="DataType"
10136 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
10137 >
10138 <const name="Int32" value="0"/>
10139 <const name="Int8" value="1"/>
10140 <const name="String" value="2"/>
10141 </enum>
10142
10143 <enum
10144 name="DataFlags"
10145 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
10146 >
10147 <const name="None" value="0x00"/>
10148 <const name="Mandatory" value="0x01"/>
10149 <const name="Expert" value="0x02"/>
10150 <const name="Array" value="0x04"/>
10151 <const name="FlagMask" value="0x07"/>
10152 </enum>
10153
10154 <enum
10155 name="MediumFormatCapabilities"
10156 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
10157 >
10158 <desc>
10159 Medium format capability flags.
10160 </desc>
10161
10162 <const name="Uuid" value="0x01">
10163 <desc>
10164 Supports UUIDs as expected by VirtualBox code.
10165 </desc>
10166 </const>
10167
10168 <const name="CreateFixed" value="0x02">
10169 <desc>
10170 Supports creating fixed size images, allocating all space instantly.
10171 </desc>
10172 </const>
10173
10174 <const name="CreateDynamic" value="0x04">
10175 <desc>
10176 Supports creating dynamically growing images, allocating space on
10177 demand.
10178 </desc>
10179 </const>
10180
10181 <const name="CreateSplit2G" value="0x08">
10182 <desc>
10183 Supports creating images split in chunks of a bit less than 2 GBytes.
10184 </desc>
10185 </const>
10186
10187 <const name="Differencing" value="0x10">
10188 <desc>
10189 Supports being used as a format for differencing media (see <link
10190 to="IMedium::createDiffStorage"/>).
10191 </desc>
10192 </const>
10193
10194 <const name="Asynchronous" value="0x20">
10195 <desc>
10196 Supports asynchronous I/O operations for at least some configurations.
10197 </desc>
10198 </const>
10199
10200 <const name="File" value="0x40">
10201 <desc>
10202 The format backend operates on files (the <link to="IMedium::location"/>
10203 attribute of the medium specifies a file used to store medium
10204 data; for a list of supported file extensions see
10205 <link to="IMediumFormat::fileExtensions"/>).
10206 </desc>
10207 </const>
10208
10209 <const name="Properties" value="0x80">
10210 <desc>
10211 The format backend uses the property interface to configure the storage
10212 location and properties (the <link to="IMediumFormat::describeProperties"/>
10213 method is used to get access to properties supported by the given medium format).
10214 </desc>
10215 </const>
10216
10217 <const name="CapabilityMask" value="0xFF"/>
10218 </enum>
10219
10220 <interface
10221 name="IMediumFormat" extends="$unknown"
10222 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
10223 wsmap="managed"
10224 >
10225 <desc>
10226 The IMediumFormat interface represents a medium format.
10227
10228 Each medium format has an associated backend which is used to handle
10229 media stored in this format. This interface provides information
10230 about the properties of the associated backend.
10231
10232 Each medium format is identified by a string represented by the
10233 <link to="#id"/> attribute. This string is used in calls like
10234 <link to="IVirtualBox::createHardDisk"/> to specify the desired
10235 format.
10236
10237 The list of all supported medium formats can be obtained using
10238 <link to="ISystemProperties::mediaFormats"/>.
10239
10240 <see>IMedium</see>
10241 </desc>
10242
10243 <attribute name="id" type="wstring" readonly="yes">
10244 <desc>
10245 Identifier of this format.
10246
10247 The format identifier is a non-@c null non-empty ASCII string. Note that
10248 this string is case-insensitive. This means that, for example, all of
10249 the following strings:
10250 <pre>
10251 "VDI"
10252 "vdi"
10253 "VdI"</pre>
10254 refer to the same medium format.
10255
10256 This string is used in methods of other interfaces where it is necessary
10257 to specify a medium format, such as
10258 <link to="IVirtualBox::createHardDisk"/>.
10259 </desc>
10260 </attribute>
10261
10262 <attribute name="name" type="wstring" readonly="yes">
10263 <desc>
10264 Human readable description of this format.
10265
10266 Mainly for use in file open dialogs.
10267 </desc>
10268 </attribute>
10269
10270 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
10271 <desc>
10272 Array of strings containing the supported file extensions.
10273
10274 The first extension in the array is the extension preferred by the
10275 backend. It is recommended to use this extension when specifying a
10276 location of the storage unit for a new medium.
10277
10278 Note that some backends do not work on files, so this array may be
10279 empty.
10280
10281 <see>IMediumFormat::capabilities</see>
10282 </desc>
10283 </attribute>
10284
10285 <attribute name="capabilities" type="unsigned long" readonly="yes">
10286 <desc>
10287 Capabilities of the format as a set of bit flags.
10288
10289 For the meaning of individual capability flags see
10290 <link to="MediumFormatCapabilities"/>.
10291 </desc>
10292 </attribute>
10293
10294 <method name="describeProperties">
10295 <desc>
10296 Returns several arrays describing the properties supported by this
10297 format.
10298
10299 An element with the given index in each array describes one
10300 property. Thus, the number of elements in each returned array is the
10301 same and corresponds to the number of supported properties.
10302
10303 The returned arrays are filled in only if the
10304 <link to="MediumFormatCapabilities_Properties"/> flag is set.
10305 All arguments must be non-@c null.
10306
10307 <see>DataType</see>
10308 <see>DataFlags</see>
10309 </desc>
10310
10311 <param name="names" type="wstring" safearray="yes" dir="out">
10312 <desc>Array of property names.</desc>
10313 </param>
10314 <param name="description" type="wstring" safearray="yes" dir="out">
10315 <desc>Array of property descriptions.</desc>
10316 </param>
10317 <param name="types" type="DataType" safearray="yes" dir="out">
10318 <desc>Array of property types.</desc>
10319 </param>
10320 <param name="flags" type="unsigned long" safearray="yes" dir="out">
10321 <desc>Array of property flags.</desc>
10322 </param>
10323 <param name="defaults" type="wstring" safearray="yes" dir="out">
10324 <desc>Array of default property values.</desc>
10325 </param>
10326 </method>
10327
10328 </interface>
10329
10330
10331 <!--
10332 // IKeyboard
10333 /////////////////////////////////////////////////////////////////////////
10334 -->
10335
10336 <interface
10337 name="IKeyboard" extends="$unknown"
10338 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10339 wsmap="managed"
10340 >
10341 <desc>
10342 The IKeyboard interface represents the virtual machine's keyboard. Used
10343 in <link to="IConsole::keyboard"/>.
10344
10345 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10346 to the virtual machine.
10347
10348 </desc>
10349 <method name="putScancode">
10350 <desc>Sends a scancode to the keyboard.
10351
10352 <result name="VBOX_E_IPRT_ERROR">
10353 Could not send scan code to virtual keyboard.
10354 </result>
10355
10356 </desc>
10357 <param name="scancode" type="long" dir="in"/>
10358 </method>
10359
10360 <method name="putScancodes">
10361 <desc>Sends an array of scancodes to the keyboard.
10362
10363 <result name="VBOX_E_IPRT_ERROR">
10364 Could not send all scan codes to virtual keyboard.
10365 </result>
10366
10367 </desc>
10368 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10369 <param name="codesStored" type="unsigned long" dir="return"/>
10370 </method>
10371
10372 <method name="putCAD">
10373 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10374 function is nothing special, it is just a convenience function
10375 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10376
10377 <result name="VBOX_E_IPRT_ERROR">
10378 Could not send all scan codes to virtual keyboard.
10379 </result>
10380
10381 </desc>
10382 </method>
10383
10384 </interface>
10385
10386
10387 <!--
10388 // IMouse
10389 /////////////////////////////////////////////////////////////////////////
10390 -->
10391
10392 <enum
10393 name="MouseButtonState"
10394 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10395 >
10396 <desc>
10397 Mouse button state.
10398 </desc>
10399
10400 <const name="LeftButton" value="0x01"/>
10401 <const name="RightButton" value="0x02"/>
10402 <const name="MiddleButton" value="0x04"/>
10403 <const name="WheelUp" value="0x08"/>
10404 <const name="WheelDown" value="0x10"/>
10405 <const name="XButton1" value="0x20"/>
10406 <const name="XButton2" value="0x40"/>
10407 <const name="MouseStateMask" value="0x7F"/>
10408 </enum>
10409
10410 <interface
10411 name="IMouse" extends="$unknown"
10412 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
10413 wsmap="managed"
10414 >
10415 <desc>
10416 The IMouse interface represents the virtual machine's mouse. Used in
10417 <link to="IConsole::mouse"/>.
10418
10419 Through this interface, the virtual machine's virtual mouse can be
10420 controlled.
10421 </desc>
10422
10423 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10424 <desc>
10425 Whether the guest OS supports absolute mouse pointer positioning
10426 or not.
10427 <note>
10428 VirtualBox Guest Tools need to be installed to the guest OS
10429 in order to enable absolute mouse positioning support.
10430 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10431 callback to be instantly informed about changes of this attribute
10432 during virtual machine execution.
10433 </note>
10434 <see><link to="#putMouseEventAbsolute"/></see>
10435 </desc>
10436 </attribute>
10437
10438 <method name="putMouseEvent">
10439 <desc>
10440 Initiates a mouse event using relative pointer movements
10441 along x and y axis.
10442
10443 <result name="E_ACCESSDENIED">
10444 Console not powered up.
10445 </result>
10446 <result name="VBOX_E_IPRT_ERROR">
10447 Could not send mouse event to virtual mouse.
10448 </result>
10449
10450 </desc>
10451
10452 <param name="dx" type="long" dir="in">
10453 <desc>
10454 Amount of pixels the mouse should move to the right.
10455 Negative values move the mouse to the left.
10456 </desc>
10457 </param>
10458 <param name="dy" type="long" dir="in">
10459 <desc>
10460 Amount of pixels the mouse should move downwards.
10461 Negative values move the mouse upwards.
10462 </desc>
10463 </param>
10464 <param name="dz" type="long" dir="in">
10465 <desc>
10466 Amount of mouse wheel moves.
10467 Positive values describe clockwise wheel rotations,
10468 negative values describe counterclockwise rotations.
10469 </desc>
10470 </param>
10471 <param name="dw" type="long" dir="in">
10472 <desc>
10473 Amount of horizontal mouse wheel moves.
10474 Positive values describe a movement to the left,
10475 negative values describe a movement to the right.
10476 </desc>
10477 </param>
10478 <param name="buttonState" type="long" dir="in">
10479 <desc>
10480 The current state of mouse buttons. Every bit represents
10481 a mouse button as follows:
10482 <table>
10483 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10484 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10485 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10486 </table>
10487 A value of <tt>1</tt> means the corresponding button is pressed.
10488 otherwise it is released.
10489 </desc>
10490 </param>
10491 </method>
10492
10493 <method name="putMouseEventAbsolute">
10494 <desc>
10495 Positions the mouse pointer using absolute x and y coordinates.
10496 These coordinates are expressed in pixels and
10497 start from <tt>[1,1]</tt> which corresponds to the top left
10498 corner of the virtual display.
10499
10500 <result name="E_ACCESSDENIED">
10501 Console not powered up.
10502 </result>
10503 <result name="VBOX_E_IPRT_ERROR">
10504 Could not send mouse event to virtual mouse.
10505 </result>
10506
10507 <note>
10508 This method will have effect only if absolute mouse
10509 positioning is supported by the guest OS.
10510 </note>
10511
10512 <see><link to="#absoluteSupported"/></see>
10513 </desc>
10514
10515 <param name="x" type="long" dir="in">
10516 <desc>
10517 X coordinate of the pointer in pixels, starting from @c 1.
10518 </desc>
10519 </param>
10520 <param name="y" type="long" dir="in">
10521 <desc>
10522 Y coordinate of the pointer in pixels, starting from @c 1.
10523 </desc>
10524 </param>
10525 <param name="dz" type="long" dir="in">
10526 <desc>
10527 Amount of mouse wheel moves.
10528 Positive values describe clockwise wheel rotations,
10529 negative values describe counterclockwise rotations.
10530 </desc>
10531 </param>
10532 <param name="dw" type="long" dir="in">
10533 <desc>
10534 Amount of horizontal mouse wheel moves.
10535 Positive values describe a movement to the left,
10536 negative values describe a movement to the right.
10537 </desc>
10538 </param>
10539 <param name="buttonState" type="long" dir="in">
10540 <desc>
10541 The current state of mouse buttons. Every bit represents
10542 a mouse button as follows:
10543 <table>
10544 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10545 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10546 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10547 </table>
10548 A value of @c 1 means the corresponding button is pressed.
10549 otherwise it is released.
10550 </desc>
10551 </param>
10552 </method>
10553
10554 </interface>
10555
10556 <!--
10557 // IDisplay
10558 /////////////////////////////////////////////////////////////////////////
10559 -->
10560
10561 <enum
10562 name="FramebufferPixelFormat"
10563 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10564 >
10565 <desc>
10566 Format of the video memory buffer. Constants represented by this enum can
10567 be used to test for particular values of <link
10568 to="IFramebuffer::pixelFormat"/>. See also <link
10569 to="IFramebuffer::requestResize"/>.
10570
10571 See also www.fourcc.org for more information about FOURCC pixel formats.
10572 </desc>
10573
10574 <const name="Opaque" value="0">
10575 <desc>
10576 Unknown buffer format (the user may not assume any particular format of
10577 the buffer).
10578 </desc>
10579 </const>
10580 <const name="FOURCC_RGB" value="0x32424752">
10581 <desc>
10582 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10583 bit layout).
10584 </desc>
10585 </const>
10586 </enum>
10587
10588 <interface
10589 name="IFramebuffer" extends="$unknown"
10590 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10591 wsmap="suppress"
10592 >
10593 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10594 <desc>Address of the start byte of the frame buffer.</desc>
10595 </attribute>
10596
10597 <attribute name="width" type="unsigned long" readonly="yes">
10598 <desc>Frame buffer width, in pixels.</desc>
10599 </attribute>
10600
10601 <attribute name="height" type="unsigned long" readonly="yes">
10602 <desc>Frame buffer height, in pixels.</desc>
10603 </attribute>
10604
10605 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10606 <desc>
10607 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10608 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10609 are: 8, 15, 16, 24 and 32.
10610 </desc>
10611 </attribute>
10612
10613 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10614 <desc>
10615 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10616 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10617 size of the scan line must be aligned to 32 bits.
10618 </desc>
10619 </attribute>
10620
10621 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10622 <desc>
10623 Frame buffer pixel format. It's either one of the values defined by <link
10624 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10625 <note>
10626 This attribute must never return <link
10627 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10628 <link to="#address"/> points to must be always known.
10629 </note>
10630 </desc>
10631 </attribute>
10632
10633 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10634 <desc>
10635 Defines whether this frame buffer uses the virtual video card's memory
10636 buffer (guest VRAM) directly or not. See <link
10637 to="IFramebuffer::requestResize"/> for more information.
10638 </desc>
10639 </attribute>
10640
10641 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10642 <desc>
10643 Hint from the frame buffer about how much of the standard
10644 screen height it wants to use for itself. This information is
10645 exposed to the guest through the VESA BIOS and VMMDev interface
10646 so that it can use it for determining its video mode table. It
10647 is not guaranteed that the guest respects the value.
10648 </desc>
10649 </attribute>
10650
10651 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10652 <desc>
10653 An alpha-blended overlay which is superposed over the frame buffer.
10654 The initial purpose is to allow the display of icons providing
10655 information about the VM state, including disk activity, in front
10656 ends which do not have other means of doing that. The overlay is
10657 designed to controlled exclusively by IDisplay. It has no locking
10658 of its own, and any changes made to it are not guaranteed to be
10659 visible until the affected portion of IFramebuffer is updated. The
10660 overlay can be created lazily the first time it is requested. This
10661 attribute can also return @c null to signal that the overlay is not
10662 implemented.
10663 </desc>
10664 </attribute>
10665
10666 <attribute name="winId" type="unsigned long long" readonly="yes">
10667 <desc>
10668 Platform-dependent identifier of the window where context of this
10669 frame buffer is drawn, or zero if there's no such window.
10670 </desc>
10671 </attribute>
10672
10673 <method name="lock">
10674 <desc>
10675 Locks the frame buffer.
10676 Gets called by the IDisplay object where this frame buffer is
10677 bound to.
10678 </desc>
10679 </method>
10680
10681 <method name="unlock">
10682 <desc>
10683 Unlocks the frame buffer.
10684 Gets called by the IDisplay object where this frame buffer is
10685 bound to.
10686 </desc>
10687 </method>
10688
10689 <method name="notifyUpdate">
10690 <desc>
10691 Informs about an update.
10692 Gets called by the display object where this buffer is
10693 registered.
10694 </desc>
10695 <param name="x" type="unsigned long" dir="in"/>
10696 <param name="y" type="unsigned long" dir="in"/>
10697 <param name="width" type="unsigned long" dir="in"/>
10698 <param name="height" type="unsigned long" dir="in"/>
10699 </method>
10700
10701 <method name="requestResize">
10702 <desc>
10703 Requests a size and pixel format change.
10704
10705 There are two modes of working with the video buffer of the virtual
10706 machine. The <i>indirect</i> mode implies that the IFramebuffer
10707 implementation allocates a memory buffer for the requested display mode
10708 and provides it to the virtual machine. In <i>direct</i> mode, the
10709 IFramebuffer implementation uses the memory buffer allocated and owned
10710 by the virtual machine. This buffer represents the video memory of the
10711 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10712 usually faster because the implementation gets a raw pointer to the
10713 guest VRAM buffer which it can directly use for visualizing the contents
10714 of the virtual display, as opposed to the indirect mode where the
10715 contents of guest VRAM are copied to the memory buffer provided by
10716 the implementation every time a display update occurs.
10717
10718 It is important to note that the direct mode is really fast only when
10719 the implementation uses the given guest VRAM buffer directly, for
10720 example, by blitting it to the window representing the virtual machine's
10721 display, which saves at least one copy operation comparing to the
10722 indirect mode. However, using the guest VRAM buffer directly is not
10723 always possible: the format and the color depth of this buffer may be
10724 not supported by the target window, or it may be unknown (opaque) as in
10725 case of text or non-linear multi-plane VGA video modes. In this case,
10726 the indirect mode (that is always available) should be used as a
10727 fallback: when the guest VRAM contents are copied to the
10728 implementation-provided memory buffer, color and format conversion is
10729 done automatically by the underlying code.
10730
10731 The @a pixelFormat parameter defines whether the direct mode is
10732 available or not. If @a pixelFormat is <link
10733 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10734 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10735 @a bytesPerLine parameters must be ignored and the implementation must use
10736 the indirect mode (where it provides its own buffer in one of the
10737 supported formats). In all other cases, @a pixelFormat together with
10738 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10739 buffer pointed to by the @a VRAM parameter and the implementation is
10740 free to choose which mode to use. To indicate that this frame buffer uses
10741 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10742 attribute must return @c true and <link to="#address"/> must
10743 return exactly the same address that is passed in the @a VRAM parameter
10744 of this method; otherwise it is assumed that the indirect strategy is
10745 chosen.
10746
10747 The @a width and @a height parameters represent the size of the
10748 requested display mode in both modes. In case of indirect mode, the
10749 provided memory buffer should be big enough to store data of the given
10750 display mode. In case of direct mode, it is guaranteed that the given
10751 @a VRAM buffer contains enough space to represent the display mode of the
10752 given size. Note that this frame buffer's <link to="#width"/> and <link
10753 to="#height"/> attributes must return exactly the same values as
10754 passed to this method after the resize is completed (see below).
10755
10756 The @a finished output parameter determines if the implementation has
10757 finished resizing the frame buffer or not. If, for some reason, the
10758 resize cannot be finished immediately during this call, @a finished
10759 must be set to @c false, and the implementation must call
10760 <link to="IDisplay::resizeCompleted"/> after it has returned from
10761 this method as soon as possible. If @a finished is @c false, the
10762 machine will not call any frame buffer methods until
10763 <link to="IDisplay::resizeCompleted"/> is called.
10764
10765 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10766 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10767 this frame buffer must return exactly the same values as specified in the
10768 parameters of this method, after the resize is completed. If the
10769 indirect mode is chosen, these attributes must return values describing
10770 the format of the implementation's own memory buffer <link
10771 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10772 value must always correlate with <link to="#pixelFormat"/>. Note that
10773 the <link to="#pixelFormat"/> attribute must never return <link
10774 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10775
10776 <note>
10777 This method is called by the IDisplay object under the
10778 <link to="#lock"/> provided by this IFramebuffer
10779 implementation. If this method returns @c false in @a finished, then
10780 this lock is not released until
10781 <link to="IDisplay::resizeCompleted"/> is called.
10782 </note>
10783 </desc>
10784 <param name="screenId" type="unsigned long" dir="in">
10785 <desc>
10786 Logical screen number. Must be used in the corresponding call to
10787 <link to="IDisplay::resizeCompleted"/> if this call is made.
10788 </desc>
10789 </param>
10790 <param name="pixelFormat" type="unsigned long" dir="in">
10791 <desc>
10792 Pixel format of the memory buffer pointed to by @a VRAM.
10793 See also <link to="FramebufferPixelFormat"/>.
10794 </desc>
10795 </param>
10796 <param name="VRAM" type="octet" mod="ptr" dir="in">
10797 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10798 </param>
10799 <param name="bitsPerPixel" type="unsigned long" dir="in">
10800 <desc>Color depth, bits per pixel.</desc>
10801 </param>
10802 <param name="bytesPerLine" type="unsigned long" dir="in">
10803 <desc>Size of one scan line, in bytes.</desc>
10804 </param>
10805 <param name="width" type="unsigned long" dir="in">
10806 <desc>Width of the guest display, in pixels.</desc>
10807 </param>
10808 <param name="height" type="unsigned long" dir="in">
10809 <desc>Height of the guest display, in pixels.</desc>
10810 </param>
10811 <param name="finished" type="boolean" dir="return">
10812 <desc>
10813 Can the VM start using the new frame buffer immediately
10814 after this method returns or it should wait for
10815 <link to="IDisplay::resizeCompleted"/>.
10816 </desc>
10817 </param>
10818 </method>
10819
10820 <method name="videoModeSupported">
10821 <desc>
10822 Returns whether the frame buffer implementation is willing to
10823 support a given video mode. In case it is not able to render
10824 the video mode (or for some reason not willing), it should
10825 return @c false. Usually this method is called when the guest
10826 asks the VMM device whether a given video mode is supported
10827 so the information returned is directly exposed to the guest.
10828 It is important that this method returns very quickly.
10829 </desc>
10830 <param name="width" type="unsigned long" dir="in"/>
10831 <param name="height" type="unsigned long" dir="in"/>
10832 <param name="bpp" type="unsigned long" dir="in"/>
10833 <param name="supported" type="boolean" dir="return"/>
10834 </method>
10835
10836 <method name="getVisibleRegion">
10837 <desc>
10838 Returns the visible region of this frame buffer.
10839
10840 If the @a rectangles parameter is @c null then the value of the
10841 @a count parameter is ignored and the number of elements necessary to
10842 describe the current visible region is returned in @a countCopied.
10843
10844 If @a rectangles is not @c null but @a count is less
10845 than the required number of elements to store region data, the method
10846 will report a failure. If @a count is equal or greater than the
10847 required number of elements, then the actual number of elements copied
10848 to the provided array will be returned in @a countCopied.
10849
10850 <note>
10851 The address of the provided array must be in the process space of
10852 this IFramebuffer object.
10853 </note>
10854 <note>
10855 Method not yet implemented.
10856 </note>
10857 </desc>
10858 <param name="rectangles" type="octet" mod="ptr" dir="in">
10859 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10860 </param>
10861 <param name="count" type="unsigned long" dir="in">
10862 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10863 </param>
10864 <param name="countCopied" type="unsigned long" dir="return">
10865 <desc>Number of elements copied to the @a rectangles array.</desc>
10866 </param>
10867 </method>
10868
10869 <method name="setVisibleRegion">
10870 <desc>
10871 Suggests a new visible region to this frame buffer. This region
10872 represents the area of the VM display which is a union of regions of
10873 all top-level windows of the guest operating system running inside the
10874 VM (if the Guest Additions for this system support this
10875 functionality). This information may be used by the frontends to
10876 implement the seamless desktop integration feature.
10877
10878 <note>
10879 The address of the provided array must be in the process space of
10880 this IFramebuffer object.
10881 </note>
10882 <note>
10883 The IFramebuffer implementation must make a copy of the provided
10884 array of rectangles.
10885 </note>
10886 <note>
10887 Method not yet implemented.
10888 </note>
10889 </desc>
10890 <param name="rectangles" type="octet" mod="ptr" dir="in">
10891 <desc>Pointer to the @c RTRECT array.</desc>
10892 </param>
10893 <param name="count" type="unsigned long" dir="in">
10894 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10895 </param>
10896 </method>
10897
10898 <method name="processVHWACommand">
10899 <desc>
10900 Posts a Video HW Acceleration Command to the frame buffer for processing.
10901 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10902 are posted from quest to the host to be processed by the host hardware.
10903
10904 <note>
10905 The address of the provided command must be in the process space of
10906 this IFramebuffer object.
10907 </note>
10908 </desc>
10909
10910 <param name="command" type="octet" mod="ptr" dir="in">
10911 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10912 </param>
10913 </method>
10914
10915 </interface>
10916
10917 <interface
10918 name="IFramebufferOverlay" extends="IFramebuffer"
10919 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10920 wsmap="suppress"
10921 >
10922 <desc>
10923 The IFramebufferOverlay interface represents an alpha blended overlay
10924 for displaying status icons above an IFramebuffer. It is always created
10925 not visible, so that it must be explicitly shown. It only covers a
10926 portion of the IFramebuffer, determined by its width, height and
10927 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10928 that order) format, and may be written to directly. Do re-read the
10929 width though, after setting it, as it may be adjusted (increased) to
10930 make it more suitable for the front end.
10931 </desc>
10932 <attribute name="x" type="unsigned long" readonly="yes">
10933 <desc>X position of the overlay, relative to the frame buffer.</desc>
10934 </attribute>
10935
10936 <attribute name="y" type="unsigned long" readonly="yes">
10937 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10938 </attribute>
10939
10940 <attribute name="visible" type="boolean" readonly="no">
10941 <desc>
10942 Whether the overlay is currently visible.
10943 </desc>
10944 </attribute>
10945
10946 <attribute name="alpha" type="unsigned long" readonly="no">
10947 <desc>
10948 The global alpha value for the overlay. This may or may not be
10949 supported by a given front end.
10950 </desc>
10951 </attribute>
10952
10953 <method name="move">
10954 <desc>
10955 Changes the overlay's position relative to the IFramebuffer.
10956 </desc>
10957 <param name="x" type="unsigned long" dir="in"/>
10958 <param name="y" type="unsigned long" dir="in"/>
10959 </method>
10960
10961 </interface>
10962
10963 <interface
10964 name="IDisplay" extends="$unknown"
10965 uuid="e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000"
10966 wsmap="managed"
10967 >
10968 <desc>
10969 The IDisplay interface represents the virtual machine's display.
10970
10971 The object implementing this interface is contained in each
10972 <link to="IConsole::display"/> attribute and represents the visual
10973 output of the virtual machine.
10974
10975 The virtual display supports pluggable output targets represented by the
10976 IFramebuffer interface. Examples of the output target are a window on
10977 the host computer or an RDP session's display on a remote computer.
10978 </desc>
10979 <attribute name="width" type="unsigned long" readonly="yes">
10980 <desc>Current display width.</desc>
10981 </attribute>
10982
10983 <attribute name="height" type="unsigned long" readonly="yes">
10984 <desc>Current display height.</desc>
10985 </attribute>
10986
10987 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10988 <desc>
10989 Current guest display color depth. Note that this may differ
10990 from <link to="IFramebuffer::bitsPerPixel"/>.
10991 </desc>
10992 </attribute>
10993
10994 <method name="setFramebuffer">
10995 <desc>
10996 Sets the framebuffer for given screen.
10997 </desc>
10998 <param name="screenId" type="unsigned long" dir="in"/>
10999 <param name="framebuffer" type="IFramebuffer" dir="in"/>
11000 </method>
11001
11002 <method name="getFramebuffer">
11003 <desc>
11004 Queries the framebuffer for given screen.
11005 </desc>
11006 <param name="screenId" type="unsigned long" dir="in"/>
11007 <param name="framebuffer" type="IFramebuffer" dir="out"/>
11008 <param name="xOrigin" type="long" dir="out"/>
11009 <param name="yOrigin" type="long" dir="out"/>
11010 </method>
11011
11012 <method name="setVideoModeHint">
11013 <desc>
11014 Asks VirtualBox to request the given video mode from
11015 the guest. This is just a hint and it cannot be guaranteed
11016 that the requested resolution will be used. Guest Additions
11017 are required for the request to be seen by guests. The caller
11018 should issue the request and wait for a resolution change and
11019 after a timeout retry.
11020
11021 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
11022 parameters means that the corresponding values should be taken from the
11023 current video mode (i.e. left unchanged).
11024
11025 If the guest OS supports multi-monitor configuration then the @a display
11026 parameter specifies the number of the guest display to send the hint to:
11027 @c 0 is the primary display, @c 1 is the first secondary and
11028 so on. If the multi-monitor configuration is not supported, @a display
11029 must be @c 0.
11030
11031 <result name="E_INVALIDARG">
11032 The @a display is not associated with any monitor.
11033 </result>
11034
11035 </desc>
11036 <param name="width" type="unsigned long" dir="in"/>
11037 <param name="height" type="unsigned long" dir="in"/>
11038 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
11039 <param name="display" type="unsigned long" dir="in"/>
11040 </method>
11041
11042 <method name="setSeamlessMode">
11043 <desc>
11044 Enables or disables seamless guest display rendering (seamless desktop
11045 integration) mode.
11046 <note>
11047 Calling this method has no effect if <link
11048 to="IGuest::supportsSeamless"/> returns @c false.
11049 </note>
11050 </desc>
11051 <param name="enabled" type="boolean" dir="in"/>
11052 </method>
11053
11054 <method name="takeScreenShot">
11055 <desc>
11056 Takes a screen shot of the requested size and copies it to the
11057 32-bpp buffer allocated by the caller and pointed to by @a address.
11058 A pixel consists of 4 bytes in order: B, G, R, 0.
11059
11060 <note>This API can be used only by the COM/XPCOM C++ API as it
11061 requires pointer support. Use <link to="#takeScreenShotSlow" />
11062 with other language bindings.
11063 </note>
11064
11065 <result name="E_NOTIMPL">
11066 Feature not implemented.
11067 </result>
11068 <result name="VBOX_E_IPRT_ERROR">
11069 Could not take a screenshot.
11070 </result>
11071
11072 </desc>
11073 <param name="address" type="octet" mod="ptr" dir="in"/>
11074 <param name="width" type="unsigned long" dir="in"/>
11075 <param name="height" type="unsigned long" dir="in"/>
11076 </method>
11077
11078 <method name="takeScreenShotSlow">
11079 <desc>
11080 Takes a guest screen shot of the requested size and returns it as
11081 an array of bytes in uncompressed 32-bit RGBA format.
11082 A pixel consists of 4 bytes in order: R, G, B, 0xFF.
11083
11084 This API is slow, but could be the only option to get guest screenshot
11085 for scriptable languages not allowed to manipulate with addresses
11086 directly.
11087
11088 <result name="E_NOTIMPL">
11089 Feature not implemented.
11090 </result>
11091 <result name="VBOX_E_IPRT_ERROR">
11092 Could not take a screenshot.
11093 </result>
11094 </desc>
11095 <param name="width" type="unsigned long" dir="in">
11096 <desc>
11097 Desired image width.
11098 </desc>
11099 </param>
11100 <param name="height" type="unsigned long" dir="in">
11101 <desc>
11102 Desired image height.
11103 </desc>
11104 </param>
11105 <param name="screenData" type="octet" dir="return" safearray="yes">
11106 <desc>
11107 Array with resulting screen data.
11108 </desc>
11109 </param>
11110 </method>
11111
11112 <method name="drawToScreen">
11113 <desc>
11114 Draws a 32-bpp image of the specified size from the given buffer
11115 to the given point on the VM display.
11116
11117 <result name="E_NOTIMPL">
11118 Feature not implemented.
11119 </result>
11120 <result name="VBOX_E_IPRT_ERROR">
11121 Could not draw to screen.
11122 </result>
11123
11124 </desc>
11125 <param name="address" type="octet" mod="ptr" dir="in"/>
11126 <param name="x" type="unsigned long" dir="in"/>
11127 <param name="y" type="unsigned long" dir="in"/>
11128 <param name="width" type="unsigned long" dir="in"/>
11129 <param name="height" type="unsigned long" dir="in"/>
11130 </method>
11131
11132 <method name="invalidateAndUpdate">
11133 <desc>
11134 Does a full invalidation of the VM display and instructs the VM
11135 to update it.
11136
11137 <result name="VBOX_E_IPRT_ERROR">
11138 Could not invalidate and update screen.
11139 </result>
11140
11141 </desc>
11142 </method>
11143
11144 <method name="resizeCompleted">
11145 <desc>
11146 Signals that a framebuffer has completed the resize operation.
11147
11148 <result name="VBOX_E_NOT_SUPPORTED">
11149 Operation only valid for external frame buffers.
11150 </result>
11151
11152 </desc>
11153 <param name="screenId" type="unsigned long" dir="in"/>
11154 </method>
11155
11156 <method name="updateCompleted">
11157 <desc>
11158 Signals that a framebuffer has completed the update operation.
11159
11160 <result name="VBOX_E_NOT_SUPPORTED">
11161 Operation only valid for external frame buffers.
11162 </result>
11163
11164 </desc>
11165 </method>
11166
11167 <method name="completeVHWACommand">
11168 <desc>
11169 Signals that the Video HW Acceleration command has completed.
11170 </desc>
11171
11172 <param name="command" type="octet" mod="ptr" dir="in">
11173 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
11174 </param>
11175 </method>
11176
11177 </interface>
11178
11179 <!--
11180 // INetworkAdapter
11181 /////////////////////////////////////////////////////////////////////////
11182 -->
11183
11184 <enum
11185 name="NetworkAttachmentType"
11186 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
11187 >
11188 <desc>
11189 Network attachment type.
11190 </desc>
11191
11192 <const name="Null" value="0">
11193 <desc>Null value, also means "not attached".</desc>
11194 </const>
11195 <const name="NAT" value="1"/>
11196 <const name="Bridged" value="2"/>
11197 <const name="Internal" value="3"/>
11198 <const name="HostOnly" value="4"/>
11199 </enum>
11200
11201 <enum
11202 name="NetworkAdapterType"
11203 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
11204 >
11205 <desc>
11206 Network adapter type.
11207 </desc>
11208
11209 <const name="Null" value="0">
11210 <desc>Null value (never used by the API).</desc>
11211 </const>
11212 <const name="Am79C970A" value="1">
11213 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
11214 </const>
11215 <const name="Am79C973" value="2">
11216 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
11217 </const>
11218 <const name="I82540EM" value="3">
11219 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
11220 </const>
11221 <const name="I82543GC" value="4">
11222 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
11223 </const>
11224 <const name="I82545EM" value="5">
11225 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
11226 </const>
11227 <const name="Virtio" value="6">
11228 <desc>Virtio network device.</desc>
11229 </const>
11230 </enum>
11231
11232 <interface
11233 name="INetworkAdapter" extends="$unknown"
11234 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
11235 wsmap="managed"
11236 >
11237 <desc>
11238 Represents a virtual network adapter that is attached to a virtual machine.
11239 Each virtual machine has a fixed number of network adapter slots with one
11240 instance of this attached to each of them. Call
11241 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
11242 is attached to a given slot in a given machine.
11243
11244 Each network adapter can be in one of five attachment modes, which are
11245 represented by the <link to="NetworkAttachmentType" /> enumeration;
11246 see the <link to="#attachmentType" /> attribute.
11247 </desc>
11248
11249 <attribute name="adapterType" type="NetworkAdapterType">
11250 <desc>
11251 Type of the virtual network adapter. Depending on this value,
11252 VirtualBox will provide a different virtual network hardware
11253 to the guest.
11254 </desc>
11255 </attribute>
11256
11257 <attribute name="slot" type="unsigned long" readonly="yes">
11258 <desc>
11259 Slot number this adapter is plugged into. Corresponds to
11260 the value you pass to <link to="IMachine::getNetworkAdapter"/>
11261 to obtain this instance.
11262 </desc>
11263 </attribute>
11264
11265 <attribute name="enabled" type="boolean">
11266 <desc>
11267 Flag whether the network adapter is present in the
11268 guest system. If disabled, the virtual guest hardware will
11269 not contain this network adapter. Can only be changed when
11270 the VM is not running.
11271 </desc>
11272 </attribute>
11273
11274 <attribute name="MACAddress" type="wstring">
11275 <desc>
11276 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
11277 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
11278 </desc>
11279 </attribute>
11280
11281 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
11282
11283 <attribute name="hostInterface" type="wstring">
11284 <desc>
11285 Name of the host network interface the VM is attached to.
11286 </desc>
11287 </attribute>
11288
11289 <attribute name="internalNetwork" type="wstring">
11290 <desc>
11291 Name of the internal network the VM is attached to.
11292 </desc>
11293 </attribute>
11294
11295 <attribute name="NATNetwork" type="wstring">
11296 <desc>
11297 Name of the NAT network the VM is attached to.
11298 </desc>
11299 </attribute>
11300
11301 <attribute name="cableConnected" type="boolean">
11302 <desc>
11303 Flag whether the adapter reports the cable as connected or not.
11304 It can be used to report offline situations to a VM.
11305 </desc>
11306 </attribute>
11307
11308 <attribute name="lineSpeed" type="unsigned long">
11309 <desc>
11310 Line speed reported by custom drivers, in units of 1 kbps.
11311 </desc>
11312 </attribute>
11313
11314 <attribute name="traceEnabled" type="boolean">
11315 <desc>
11316 Flag whether network traffic from/to the network card should be traced.
11317 Can only be toggled when the VM is turned off.
11318 </desc>
11319 </attribute>
11320
11321 <attribute name="traceFile" type="wstring">
11322 <desc>
11323 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11324 will be used.
11325 </desc>
11326 </attribute>
11327
11328 <method name="attachToNAT">
11329 <desc>
11330 Attach the network adapter to the Network Address Translation (NAT) interface.
11331 </desc>
11332 </method>
11333
11334 <method name="attachToBridgedInterface">
11335 <desc>
11336 Attach the network adapter to a bridged host interface.
11337 </desc>
11338 </method>
11339
11340 <method name="attachToInternalNetwork">
11341 <desc>
11342 Attach the network adapter to an internal network.
11343 </desc>
11344 </method>
11345
11346 <method name="attachToHostOnlyInterface">
11347 <desc>
11348 Attach the network adapter to the host-only network.
11349 </desc>
11350 </method>
11351
11352 <method name="detach">
11353 <desc>
11354 Detach the network adapter
11355 </desc>
11356 </method>
11357 </interface>
11358
11359
11360 <!--
11361 // ISerialPort
11362 /////////////////////////////////////////////////////////////////////////
11363 -->
11364
11365 <enum
11366 name="PortMode"
11367 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11368 >
11369 <desc>
11370 The PortMode enumeration represents possible communication modes for
11371 the virtual serial port device.
11372 </desc>
11373
11374 <const name="Disconnected" value="0">
11375 <desc>Virtual device is not attached to any real host device.</desc>
11376 </const>
11377 <const name="HostPipe" value="1">
11378 <desc>Virtual device is attached to a host pipe.</desc>
11379 </const>
11380 <const name="HostDevice" value="2">
11381 <desc>Virtual device is attached to a host device.</desc>
11382 </const>
11383 <const name="RawFile" value="3">
11384 <desc>Virtual device is attached to a raw file.</desc>
11385 </const>
11386 </enum>
11387
11388 <interface
11389 name="ISerialPort" extends="$unknown"
11390 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11391 wsmap="managed"
11392 >
11393
11394 <desc>
11395 The ISerialPort interface represents the virtual serial port device.
11396
11397 The virtual serial port device acts like an ordinary serial port
11398 inside the virtual machine. This device communicates to the real
11399 serial port hardware in one of two modes: host pipe or host device.
11400
11401 In host pipe mode, the #path attribute specifies the path to the pipe on
11402 the host computer that represents a serial port. The #server attribute
11403 determines if this pipe is created by the virtual machine process at
11404 machine startup or it must already exist before starting machine
11405 execution.
11406
11407 In host device mode, the #path attribute specifies the name of the
11408 serial port device on the host computer.
11409
11410 There is also a third communication mode: the disconnected mode. In this
11411 mode, the guest OS running inside the virtual machine will be able to
11412 detect the serial port, but all port write operations will be discarded
11413 and all port read operations will return no data.
11414
11415 <see>IMachine::getSerialPort</see>
11416 </desc>
11417
11418 <attribute name="slot" type="unsigned long" readonly="yes">
11419 <desc>
11420 Slot number this serial port is plugged into. Corresponds to
11421 the value you pass to <link to="IMachine::getSerialPort"/>
11422 to obtain this instance.
11423 </desc>
11424 </attribute>
11425
11426 <attribute name="enabled" type="boolean">
11427 <desc>
11428 Flag whether the serial port is enabled. If disabled,
11429 the serial port will not be reported to the guest OS.
11430 </desc>
11431 </attribute>
11432
11433 <attribute name="IOBase" type="unsigned long">
11434 <desc>Base I/O address of the serial port.</desc>
11435 </attribute>
11436
11437 <attribute name="IRQ" type="unsigned long">
11438 <desc>IRQ number of the serial port.</desc>
11439 </attribute>
11440
11441 <attribute name="hostMode" type="PortMode">
11442 <desc>
11443 How is this port connected to the host.
11444 <note>
11445 Changing this attribute may fail if the conditions for
11446 <link to="#path"/> are not met.
11447 </note>
11448 </desc>
11449 </attribute>
11450
11451 <attribute name="server" type="boolean">
11452 <desc>
11453 Flag whether this serial port acts as a server (creates a new pipe on
11454 the host) or as a client (uses the existing pipe). This attribute is
11455 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11456 </desc>
11457 </attribute>
11458
11459 <attribute name="path" type="wstring">
11460 <desc>
11461 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11462 PortMode_HostPipe, or the host serial device name when
11463 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11464 cases, setting a @c null or empty string as the attribute's value
11465 is an error. Otherwise, the value of this property is ignored.
11466 </desc>
11467 </attribute>
11468
11469 </interface>
11470
11471 <!--
11472 // IParallelPort
11473 /////////////////////////////////////////////////////////////////////////
11474 -->
11475
11476 <interface
11477 name="IParallelPort" extends="$unknown"
11478 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11479 wsmap="managed"
11480 >
11481
11482 <desc>
11483 The IParallelPort interface represents the virtual parallel port device.
11484
11485 The virtual parallel port device acts like an ordinary parallel port
11486 inside the virtual machine. This device communicates to the real
11487 parallel port hardware using the name of the parallel device on the host
11488 computer specified in the #path attribute.
11489
11490 Each virtual parallel port device is assigned a base I/O address and an
11491 IRQ number that will be reported to the guest operating system and used
11492 to operate the given parallel port from within the virtual machine.
11493
11494 <see>IMachine::getParallelPort</see>
11495 </desc>
11496
11497 <attribute name="slot" type="unsigned long" readonly="yes">
11498 <desc>
11499 Slot number this parallel port is plugged into. Corresponds to
11500 the value you pass to <link to="IMachine::getParallelPort"/>
11501 to obtain this instance.
11502 </desc>
11503 </attribute>
11504
11505 <attribute name="enabled" type="boolean">
11506 <desc>
11507 Flag whether the parallel port is enabled. If disabled,
11508 the parallel port will not be reported to the guest OS.
11509 </desc>
11510 </attribute>
11511
11512 <attribute name="IOBase" type="unsigned long">
11513 <desc>Base I/O address of the parallel port.</desc>
11514 </attribute>
11515
11516 <attribute name="IRQ" type="unsigned long">
11517 <desc>IRQ number of the parallel port.</desc>
11518 </attribute>
11519
11520 <attribute name="path" type="wstring">
11521 <desc>
11522 Host parallel device name. If this parallel port is enabled, setting a
11523 @c null or an empty string as this attribute's value will result into
11524 an error.
11525 </desc>
11526 </attribute>
11527
11528 </interface>
11529
11530
11531 <!--
11532 // IMachineDebugger
11533 /////////////////////////////////////////////////////////////////////////
11534 -->
11535
11536 <interface
11537 name="IMachineDebugger" extends="$unknown"
11538 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11539 wsmap="suppress"
11540 >
11541 <method name="resetStats">
11542 <desc>
11543 Reset VM statistics.
11544 </desc>
11545 <param name="pattern" type="wstring" dir="in">
11546 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11547 </param>
11548 </method>
11549
11550 <method name="dumpStats">
11551 <desc>
11552 Dumps VM statistics.
11553 </desc>
11554 <param name="pattern" type="wstring" dir="in">
11555 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11556 </param>
11557 </method>
11558
11559 <method name="getStats">
11560 <desc>
11561 Get the VM statistics in a XMLish format.
11562 </desc>
11563 <param name="pattern" type="wstring" dir="in">
11564 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11565 </param>
11566 <param name="withDescriptions" type="boolean" dir="in">
11567 <desc>Whether to include the descriptions.</desc>
11568 </param>
11569 <param name="stats" type="wstring" dir="out">
11570 <desc>The XML document containing the statistics.</desc>
11571 </param>
11572 </method>
11573
11574 <method name="injectNMI">
11575 <desc>
11576 Inject an NMI into a running VT-x/AMD-V VM.
11577 </desc>
11578 </method>
11579
11580 <attribute name="singlestep" type="boolean">
11581 <desc>Switch for enabling singlestepping.</desc>
11582 </attribute>
11583
11584 <attribute name="recompileUser" type="boolean">
11585 <desc>Switch for forcing code recompilation for user mode code.</desc>
11586 </attribute>
11587
11588 <attribute name="recompileSupervisor" type="boolean">
11589 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11590 </attribute>
11591
11592 <attribute name="PATMEnabled" type="boolean">
11593 <desc>Switch for enabling and disabling the PATM component.</desc>
11594 </attribute>
11595
11596 <attribute name="CSAMEnabled" type="boolean">
11597 <desc>Switch for enabling and disabling the CSAM component.</desc>
11598 </attribute>
11599
11600 <attribute name="logEnabled" type="boolean">
11601 <desc>Switch for enabling and disabling logging.</desc>
11602 </attribute>
11603
11604 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11605 <desc>
11606 Flag indicating whether the VM is currently making use of CPU hardware
11607 virtualization extensions.
11608 </desc>
11609 </attribute>
11610
11611 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11612 <desc>
11613 Flag indicating whether the VM is currently making use of the nested paging
11614 CPU hardware virtualization extension.
11615 </desc>
11616 </attribute>
11617
11618 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11619 <desc>
11620 Flag indicating whether the VM is currently making use of the VPID
11621 VT-x extension.
11622 </desc>
11623 </attribute>
11624
11625 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11626 <desc>
11627 Flag indicating whether the VM is currently making use of the Physical
11628 Address Extension CPU feature.
11629 </desc>
11630 </attribute>
11631
11632 <attribute name="virtualTimeRate" type="unsigned long">
11633 <desc>
11634 The rate at which the virtual time runs expressed as a percentage.
11635 The accepted range is 2% to 20000%.
11636 </desc>
11637 </attribute>
11638
11639 <!-- @todo method for setting log flags, groups and destination! -->
11640
11641 <attribute name="VM" type="unsigned long long" readonly="yes">
11642 <desc>
11643 Gets the VM handle. This is only for internal use while
11644 we carve the details of this interface.
11645 </desc>
11646 </attribute>
11647
11648 </interface>
11649
11650 <!--
11651 // IUSBController
11652 /////////////////////////////////////////////////////////////////////////
11653 -->
11654
11655 <interface
11656 name="IUSBController" extends="$unknown"
11657 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11658 wsmap="managed"
11659 >
11660 <attribute name="enabled" type="boolean">
11661 <desc>
11662 Flag whether the USB controller is present in the
11663 guest system. If disabled, the virtual guest hardware will
11664 not contain any USB controller. Can only be changed when
11665 the VM is powered off.
11666 </desc>
11667 </attribute>
11668
11669 <attribute name="enabledEhci" type="boolean">
11670 <desc>
11671 Flag whether the USB EHCI controller is present in the
11672 guest system. If disabled, the virtual guest hardware will
11673 not contain a USB EHCI controller. Can only be changed when
11674 the VM is powered off.
11675 </desc>
11676 </attribute>
11677
11678 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11679 <desc>
11680 USB standard version which the controller implements.
11681 This is a BCD which means that the major version is in the
11682 high byte and minor version is in the low byte.
11683 </desc>
11684 </attribute>
11685
11686 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11687 <desc>
11688 List of USB device filters associated with the machine.
11689
11690 If the machine is currently running, these filters are activated
11691 every time a new (supported) USB device is attached to the host
11692 computer that was not ignored by global filters
11693 (<link to="IHost::USBDeviceFilters"/>).
11694
11695 These filters are also activated when the machine is powered up.
11696 They are run against a list of all currently available USB
11697 devices (in states
11698 <link to="USBDeviceState_Available"/>,
11699 <link to="USBDeviceState_Busy"/>,
11700 <link to="USBDeviceState_Held"/>) that were not previously
11701 ignored by global filters.
11702
11703 If at least one filter matches the USB device in question, this
11704 device is automatically captured (attached to) the virtual USB
11705 controller of this machine.
11706
11707 <see>IUSBDeviceFilter, ::IUSBController</see>
11708 </desc>
11709 </attribute>
11710
11711 <method name="createDeviceFilter">
11712 <desc>
11713 Creates a new USB device filter. All attributes except
11714 the filter name are set to empty (any match),
11715 <i>active</i> is @c false (the filter is not active).
11716
11717 The created filter can then be added to the list of filters using
11718 <link to="#insertDeviceFilter"/>.
11719
11720 <result name="VBOX_E_INVALID_VM_STATE">
11721 The virtual machine is not mutable.
11722 </result>
11723
11724 <see>#deviceFilters</see>
11725 </desc>
11726 <param name="name" type="wstring" dir="in">
11727 <desc>
11728 Filter name. See <link to="IUSBDeviceFilter::name"/>
11729 for more info.
11730 </desc>
11731 </param>
11732 <param name="filter" type="IUSBDeviceFilter" dir="return">
11733 <desc>Created filter object.</desc>
11734 </param>
11735 </method>
11736
11737 <method name="insertDeviceFilter">
11738 <desc>
11739 Inserts the given USB device to the specified position
11740 in the list of filters.
11741
11742 Positions are numbered starting from <tt>0</tt>. If the specified
11743 position is equal to or greater than the number of elements in
11744 the list, the filter is added to the end of the collection.
11745
11746 <note>
11747 Duplicates are not allowed, so an attempt to insert a
11748 filter that is already in the collection, will return an
11749 error.
11750 </note>
11751
11752 <result name="VBOX_E_INVALID_VM_STATE">
11753 Virtual machine is not mutable.
11754 </result>
11755 <result name="E_INVALIDARG">
11756 USB device filter not created within this VirtualBox instance.
11757 </result>
11758 <result name="VBOX_E_INVALID_OBJECT_STATE">
11759 USB device filter already in list.
11760 </result>
11761
11762 <see>#deviceFilters</see>
11763 </desc>
11764 <param name="position" type="unsigned long" dir="in">
11765 <desc>Position to insert the filter to.</desc>
11766 </param>
11767 <param name="filter" type="IUSBDeviceFilter" dir="in">
11768 <desc>USB device filter to insert.</desc>
11769 </param>
11770 </method>
11771
11772 <method name="removeDeviceFilter">
11773 <desc>
11774 Removes a USB device filter from the specified position in the
11775 list of filters.
11776
11777 Positions are numbered starting from <tt>0</tt>. Specifying a
11778 position equal to or greater than the number of elements in
11779 the list will produce an error.
11780
11781 <see>#deviceFilters</see>
11782
11783 <result name="VBOX_E_INVALID_VM_STATE">
11784 Virtual machine is not mutable.
11785 </result>
11786 <result name="E_INVALIDARG">
11787 USB device filter list empty or invalid @a position.
11788 </result>
11789
11790 </desc>
11791 <param name="position" type="unsigned long" dir="in">
11792 <desc>Position to remove the filter from.</desc>
11793 </param>
11794 <param name="filter" type="IUSBDeviceFilter" dir="return">
11795 <desc>Removed USB device filter.</desc>
11796 </param>
11797 </method>
11798
11799 </interface>
11800
11801
11802 <!--
11803 // IUSBDevice
11804 /////////////////////////////////////////////////////////////////////////
11805 -->
11806
11807 <interface
11808 name="IUSBDevice" extends="$unknown"
11809 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11810 wsmap="managed"
11811 >
11812 <desc>
11813 The IUSBDevice interface represents a virtual USB device attached to the
11814 virtual machine.
11815
11816 A collection of objects implementing this interface is stored in the
11817 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11818 attached to a running virtual machine's USB controller.
11819 </desc>
11820
11821 <attribute name="id" type="uuid" mod="string" readonly="yes">
11822 <desc>
11823 Unique USB device ID. This ID is built from #vendorId,
11824 #productId, #revision and #serialNumber.
11825 </desc>
11826 </attribute>
11827
11828 <attribute name="vendorId" type="unsigned short" readonly="yes">
11829 <desc>Vendor ID.</desc>
11830 </attribute>
11831
11832 <attribute name="productId" type="unsigned short" readonly="yes">
11833 <desc>Product ID.</desc>
11834 </attribute>
11835
11836 <attribute name="revision" type="unsigned short" readonly="yes">
11837 <desc>
11838 Product revision number. This is a packed BCD represented as
11839 unsigned short. The high byte is the integer part and the low
11840 byte is the decimal.
11841 </desc>
11842 </attribute>
11843
11844 <attribute name="manufacturer" type="wstring" readonly="yes">
11845 <desc>Manufacturer string.</desc>
11846 </attribute>
11847
11848 <attribute name="product" type="wstring" readonly="yes">
11849 <desc>Product string.</desc>
11850 </attribute>
11851
11852 <attribute name="serialNumber" type="wstring" readonly="yes">
11853 <desc>Serial number string.</desc>
11854 </attribute>
11855
11856 <attribute name="address" type="wstring" readonly="yes">
11857 <desc>Host specific address of the device.</desc>
11858 </attribute>
11859
11860 <attribute name="port" type="unsigned short" readonly="yes">
11861 <desc>
11862 Host USB port number the device is physically
11863 connected to.
11864 </desc>
11865 </attribute>
11866
11867 <attribute name="version" type="unsigned short" readonly="yes">
11868 <desc>
11869 The major USB version of the device - 1 or 2.
11870 </desc>
11871 </attribute>
11872
11873 <attribute name="portVersion" type="unsigned short" readonly="yes">
11874 <desc>
11875 The major USB version of the host USB port the device is
11876 physically connected to - 1 or 2. For devices not connected to
11877 anything this will have the same value as the version attribute.
11878 </desc>
11879 </attribute>
11880
11881 <attribute name="remote" type="boolean" readonly="yes">
11882 <desc>
11883 Whether the device is physically connected to a remote VRDP
11884 client or to a local host machine.
11885 </desc>
11886 </attribute>
11887
11888 </interface>
11889
11890
11891 <!--
11892 // IUSBDeviceFilter
11893 /////////////////////////////////////////////////////////////////////////
11894 -->
11895
11896 <interface
11897 name="IUSBDeviceFilter" extends="$unknown"
11898 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11899 wsmap="managed"
11900 >
11901 <desc>
11902 The IUSBDeviceFilter interface represents an USB device filter used
11903 to perform actions on a group of USB devices.
11904
11905 This type of filters is used by running virtual machines to
11906 automatically capture selected USB devices once they are physically
11907 attached to the host computer.
11908
11909 A USB device is matched to the given device filter if and only if all
11910 attributes of the device match the corresponding attributes of the
11911 filter (that is, attributes are joined together using the logical AND
11912 operation). On the other hand, all together, filters in the list of
11913 filters carry the semantics of the logical OR operation. So if it is
11914 desirable to create a match like "this vendor id OR this product id",
11915 one needs to create two filters and specify "any match" (see below)
11916 for unused attributes.
11917
11918 All filter attributes used for matching are strings. Each string
11919 is an expression representing a set of values of the corresponding
11920 device attribute, that will match the given filter. Currently, the
11921 following filtering expressions are supported:
11922
11923 <ul>
11924 <li><i>Interval filters</i>. Used to specify valid intervals for
11925 integer device attributes (Vendor ID, Product ID and Revision).
11926 The format of the string is:
11927
11928 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11929
11930 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11931 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11932 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11933 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11934 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11935 possible integer is assumed.
11936 </li>
11937 <li><i>Boolean filters</i>. Used to specify acceptable values for
11938 boolean device attributes. The format of the string is:
11939
11940 <tt>true|false|yes|no|0|1</tt>
11941
11942 </li>
11943 <li><i>Exact match</i>. Used to specify a single value for the given
11944 device attribute. Any string that doesn't start with <tt>int:</tt>
11945 represents the exact match. String device attributes are compared to
11946 this string including case of symbols. Integer attributes are first
11947 converted to a string (see individual filter attributes) and then
11948 compared ignoring case.
11949
11950 </li>
11951 <li><i>Any match</i>. Any value of the corresponding device attribute
11952 will match the given filter. An empty or @c null string is
11953 used to construct this type of filtering expressions.
11954
11955 </li>
11956 </ul>
11957
11958 <note>
11959 On the Windows host platform, interval filters are not currently
11960 available. Also all string filter attributes
11961 (<link to="#manufacturer"/>, <link to="#product"/>,
11962 <link to="#serialNumber"/>) are ignored, so they behave as
11963 <i>any match</i> no matter what string expression is specified.
11964 </note>
11965
11966 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11967 </desc>
11968
11969 <attribute name="name" type="wstring">
11970 <desc>
11971 Visible name for this filter.
11972 This name is used to visually distinguish one filter from another,
11973 so it can neither be @c null nor an empty string.
11974 </desc>
11975 </attribute>
11976
11977 <attribute name="active" type="boolean">
11978 <desc>Whether this filter active or has been temporarily disabled.</desc>
11979 </attribute>
11980
11981 <attribute name="vendorId" type="wstring">
11982 <desc>
11983 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11984 The string representation for the <i>exact matching</i>
11985 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11986 (including leading zeroes).
11987 </desc>
11988 </attribute>
11989
11990 <attribute name="productId" type="wstring">
11991 <desc>
11992 <link to="IUSBDevice::productId">Product ID</link> filter.
11993 The string representation for the <i>exact matching</i>
11994 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11995 (including leading zeroes).
11996 </desc>
11997 </attribute>
11998
11999 <attribute name="revision" type="wstring">
12000 <desc>
12001 <link to="IUSBDevice::productId">Product revision number</link>
12002 filter. The string representation for the <i>exact matching</i>
12003 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
12004 of the integer part of the revision, and <tt>F</tt> is the
12005 decimal digit of its fractional part (including leading and
12006 trailing zeros).
12007 Note that for interval filters, it's best to use the hexadecimal
12008 form, because the revision is stored as a 16 bit packed BCD value;
12009 so the expression <tt>int:0x0100-0x0199</tt> will match any
12010 revision from <tt>1.0</tt> to <tt>1.99</tt>.
12011 </desc>
12012 </attribute>
12013
12014 <attribute name="manufacturer" type="wstring">
12015 <desc>
12016 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
12017 </desc>
12018 </attribute>
12019
12020 <attribute name="product" type="wstring">
12021 <desc>
12022 <link to="IUSBDevice::product">Product</link> filter.
12023 </desc>
12024 </attribute>
12025
12026 <attribute name="serialNumber" type="wstring">
12027 <desc>
12028 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
12029 </desc>
12030 </attribute>
12031
12032 <attribute name="port" type="wstring">
12033 <desc>
12034 <link to="IUSBDevice::port">Host USB port</link> filter.
12035 </desc>
12036 </attribute>
12037
12038 <attribute name="remote" type="wstring">
12039 <desc>
12040 <link to="IUSBDevice::remote">Remote state</link> filter.
12041 <note>
12042 This filter makes sense only for machine USB filters,
12043 i.e. it is ignored by IHostUSBDeviceFilter objects.
12044 </note>
12045 </desc>
12046 </attribute>
12047
12048 <attribute name="maskedInterfaces" type="unsigned long">
12049 <desc>
12050 This is an advanced option for hiding one or more USB interfaces
12051 from the guest. The value is a bit mask where the bits that are set
12052 means the corresponding USB interface should be hidden, masked off
12053 if you like.
12054 This feature only works on Linux hosts.
12055 </desc>
12056 </attribute>
12057
12058 </interface>
12059
12060
12061 <!--
12062 // IHostUSBDevice
12063 /////////////////////////////////////////////////////////////////////////
12064 -->
12065
12066 <enum
12067 name="USBDeviceState"
12068 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
12069 >
12070 <desc>
12071 USB device state. This enumeration represents all possible states
12072 of the USB device physically attached to the host computer regarding
12073 its state on the host computer and availability to guest computers
12074 (all currently running virtual machines).
12075
12076 Once a supported USB device is attached to the host, global USB
12077 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
12078 either ignore the device, or put it to USBDeviceState_Held state, or do
12079 nothing. Unless the device is ignored by global filters, filters of all
12080 currently running guests (<link to="IUSBController::deviceFilters"/>) are
12081 activated that can put it to USBDeviceState_Captured state.
12082
12083 If the device was ignored by global filters, or didn't match
12084 any filters at all (including guest ones), it is handled by the host
12085 in a normal way. In this case, the device state is determined by
12086 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
12087 or USBDeviceState_Available, depending on the current device usage.
12088
12089 Besides auto-capturing based on filters, the device can be manually
12090 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
12091 state is USBDeviceState_Busy, USBDeviceState_Available or
12092 USBDeviceState_Held.
12093
12094 <note>
12095 Due to differences in USB stack implementations in Linux and Win32,
12096 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
12097 only to the Linux version of the product. This also means that (<link
12098 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
12099 device state is USBDeviceState_Held.
12100 </note>
12101
12102 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
12103 </desc>
12104
12105 <const name="NotSupported" value="0">
12106 <desc>
12107 Not supported by the VirtualBox server, not available to guests.
12108 </desc>
12109 </const>
12110 <const name="Unavailable" value="1">
12111 <desc>
12112 Being used by the host computer exclusively,
12113 not available to guests.
12114 </desc>
12115 </const>
12116 <const name="Busy" value="2">
12117 <desc>
12118 Being used by the host computer, potentially available to guests.
12119 </desc>
12120 </const>
12121 <const name="Available" value="3">
12122 <desc>
12123 Not used by the host computer, available to guests (the host computer
12124 can also start using the device at any time).
12125 </desc>
12126 </const>
12127 <const name="Held" value="4">
12128 <desc>
12129 Held by the VirtualBox server (ignored by the host computer),
12130 available to guests.
12131 </desc>
12132 </const>
12133 <const name="Captured" value="5">
12134 <desc>
12135 Captured by one of the guest computers, not available
12136 to anybody else.
12137 </desc>
12138 </const>
12139 </enum>
12140
12141 <interface
12142 name="IHostUSBDevice" extends="IUSBDevice"
12143 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
12144 wsmap="managed"
12145 >
12146 <desc>
12147 The IHostUSBDevice interface represents a physical USB device attached
12148 to the host computer.
12149
12150 Besides properties inherited from IUSBDevice, this interface adds the
12151 <link to="#state"/> property that holds the current state of the USB
12152 device.
12153
12154 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
12155 </desc>
12156
12157 <attribute name="state" type="USBDeviceState" readonly="yes">
12158 <desc>
12159 Current state of the device.
12160 </desc>
12161 </attribute>
12162
12163 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
12164
12165 </interface>
12166
12167
12168 <!--
12169 // IHostUSBDeviceFilter
12170 /////////////////////////////////////////////////////////////////////////
12171 -->
12172
12173 <enum
12174 name="USBDeviceFilterAction"
12175 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
12176 >
12177 <desc>
12178 Actions for host USB device filters.
12179 <see>IHostUSBDeviceFilter, USBDeviceState</see>
12180 </desc>
12181
12182 <const name="Null" value="0">
12183 <desc>Null value (never used by the API).</desc>
12184 </const>
12185 <const name="Ignore" value="1">
12186 <desc>Ignore the matched USB device.</desc>
12187 </const>
12188 <const name="Hold" value="2">
12189 <desc>Hold the matched USB device.</desc>
12190 </const>
12191 </enum>
12192
12193 <interface
12194 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
12195 uuid="4cc70246-d74a-400f-8222-3900489c0374"
12196 wsmap="managed"
12197 >
12198 <desc>
12199 The IHostUSBDeviceFilter interface represents a global filter for a
12200 physical USB device used by the host computer. Used indirectly in
12201 <link to="IHost::USBDeviceFilters"/>.
12202
12203 Using filters of this type, the host computer determines the initial
12204 state of the USB device after it is physically attached to the
12205 host's USB controller.
12206
12207 <note>
12208 The <link to="#remote"/> attribute is ignored by this type of
12209 filters, because it makes sense only for
12210 <link to="IUSBController::deviceFilters">machine USB filters</link>.
12211 </note>
12212
12213 <see>IHost::USBDeviceFilters</see>
12214 </desc>
12215
12216 <attribute name="action" type="USBDeviceFilterAction">
12217 <desc>
12218 Action performed by the host when an attached USB device
12219 matches this filter.
12220 </desc>
12221 </attribute>
12222
12223 </interface>
12224
12225 <!--
12226 // IAudioAdapter
12227 /////////////////////////////////////////////////////////////////////////
12228 -->
12229
12230 <enum
12231 name="AudioDriverType"
12232 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
12233 >
12234 <desc>
12235 Host audio driver type.
12236 </desc>
12237
12238 <const name="Null" value="0">
12239 <desc>Null value, also means "dummy audio driver".</desc>
12240 </const>
12241 <const name="WinMM" value="1">
12242 <desc>Windows multimedia (Windows hosts only).</desc>
12243 </const>
12244 <const name="OSS" value="2">
12245 <desc>Open Sound System (Linux hosts only).</desc>
12246 </const>
12247 <const name="ALSA" value="3">
12248 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
12249 </const>
12250 <const name="DirectSound" value="4">
12251 <desc>DirectSound (Windows hosts only).</desc>
12252 </const>
12253 <const name="CoreAudio" value="5">
12254 <desc>CoreAudio (Mac hosts only).</desc>
12255 </const>
12256 <const name="MMPM" value="6">
12257 <desc>Reserved for historical reasons.</desc>
12258 </const>
12259 <const name="Pulse" value="7">
12260 <desc>PulseAudio (Linux hosts only).</desc>
12261 </const>
12262 <const name="SolAudio" value="8">
12263 <desc>Solaris audio (Solaris hosts only).</desc>
12264 </const>
12265 </enum>
12266
12267 <enum
12268 name="AudioControllerType"
12269 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
12270 >
12271 <desc>
12272 Virtual audio controller type.
12273 </desc>
12274
12275 <const name="AC97" value="0"/>
12276 <const name="SB16" value="1"/>
12277 </enum>
12278
12279 <interface
12280 name="IAudioAdapter" extends="$unknown"
12281 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
12282 wsmap="managed"
12283 >
12284 <desc>
12285 The IAudioAdapter interface represents the virtual audio adapter of
12286 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
12287 </desc>
12288 <attribute name="enabled" type="boolean">
12289 <desc>
12290 Flag whether the audio adapter is present in the
12291 guest system. If disabled, the virtual guest hardware will
12292 not contain any audio adapter. Can only be changed when
12293 the VM is not running.
12294 </desc>
12295 </attribute>
12296 <attribute name="audioController" type="AudioControllerType">
12297 <desc>
12298 The audio hardware we emulate.
12299 </desc>
12300 </attribute>
12301 <attribute name="audioDriver" type="AudioDriverType">
12302 <desc>
12303 Audio driver the adapter is connected to. This setting
12304 can only be changed when the VM is not running.
12305 </desc>
12306 </attribute>
12307 </interface>
12308
12309 <!--
12310 // IVRDPServer
12311 /////////////////////////////////////////////////////////////////////////
12312 -->
12313
12314 <enum
12315 name="VRDPAuthType"
12316 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
12317 >
12318 <desc>
12319 VRDP authentication type.
12320 </desc>
12321
12322 <const name="Null" value="0">
12323 <desc>Null value, also means "no authentication".</desc>
12324 </const>
12325 <const name="External" value="1"/>
12326 <const name="Guest" value="2"/>
12327 </enum>
12328
12329 <interface
12330 name="IVRDPServer" extends="$unknown"
12331 uuid="72e671bc-1712-4052-ad6b-e45e76d9d3e4"
12332 wsmap="managed"
12333 >
12334 <attribute name="enabled" type="boolean">
12335 <desc>VRDP server status.</desc>
12336 </attribute>
12337
12338 <attribute name="ports" type="wstring">
12339 <desc>
12340 VRDP server port numbers. The server will try to bind to one of free ports from the list.
12341 <note>
12342 This is a string of comma separated TCP port numbers or port number ranges.
12343 Example <tt>5000,5010-5012,5015</tt>
12344 </note>
12345 </desc>
12346 </attribute>
12347
12348 <attribute name="netAddress" type="wstring">
12349 <desc>VRDP server address.</desc>
12350 </attribute>
12351
12352 <attribute name="authType" type="VRDPAuthType">
12353 <desc>VRDP authentication method.</desc>
12354 </attribute>
12355
12356 <attribute name="authTimeout" type="unsigned long">
12357 <desc>Timeout for guest authentication. Milliseconds.</desc>
12358 </attribute>
12359
12360 <attribute name="allowMultiConnection" type="boolean">
12361 <desc>
12362 Flag whether multiple simultaneous connections to the VM are permitted.
12363 Note that this will be replaced by a more powerful mechanism in the future.
12364 </desc>
12365 </attribute>
12366
12367 <attribute name="reuseSingleConnection" type="boolean">
12368 <desc>
12369 Flag whether the existing connection must be dropped and a new connection
12370 must be established by the VRDP server, when a new client connects in single
12371 connection mode.
12372 </desc>
12373 </attribute>
12374
12375 </interface>
12376
12377
12378 <!--
12379 // ISharedFolder
12380 /////////////////////////////////////////////////////////////////////////
12381 -->
12382
12383 <interface
12384 name="ISharedFolder" extends="$unknown"
12385 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
12386 wsmap="struct"
12387 >
12388 <desc>
12389 The ISharedFolder interface represents a folder in the host computer's
12390 file system accessible from the guest OS running inside a virtual
12391 machine using an associated logical name.
12392
12393 There are three types of shared folders:
12394 <ul>
12395 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12396 folders available to all virtual machines.</li>
12397 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12398 VM-specific shared folders available to the given virtual machine at
12399 startup.</li>
12400 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12401 VM-specific shared folders created in the session context (for
12402 example, when the virtual machine is running) and automatically
12403 discarded when the session is closed (the VM is powered off).</li>
12404 </ul>
12405
12406 Logical names of shared folders must be unique within the given scope
12407 (global, permanent or transient). However, they do not need to be unique
12408 across scopes. In this case, the definition of the shared folder in a
12409 more specific scope takes precedence over definitions in all other
12410 scopes. The order of precedence is (more specific to more general):
12411 <ol>
12412 <li>Transient definitions</li>
12413 <li>Permanent definitions</li>
12414 <li>Global definitions</li>
12415 </ol>
12416
12417 For example, if MyMachine has a shared folder named
12418 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12419 transient shared folder named <tt>C_DRIVE</tt> (that points
12420 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12421 of <tt>C_DRIVE</tt> in the guest OS so
12422 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12423 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12424 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12425 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12426 to <tt>C:\\</tt> if it still exists.
12427
12428 Note that permanent and transient shared folders of different machines
12429 are in different name spaces, so they don't overlap and don't need to
12430 have unique logical names.
12431
12432 <note>
12433 Global shared folders are not implemented in the current version of the
12434 product.
12435 </note>
12436 </desc>
12437
12438 <attribute name="name" type="wstring" readonly="yes">
12439 <desc>Logical name of the shared folder.</desc>
12440 </attribute>
12441
12442 <attribute name="hostPath" type="wstring" readonly="yes">
12443 <desc>Full path to the shared folder in the host file system.</desc>
12444 </attribute>
12445
12446 <attribute name="accessible" type="boolean" readonly="yes">
12447 <desc>
12448 Whether the folder defined by the host path is currently
12449 accessible or not.
12450 For example, the folder can be unaccessible if it is placed
12451 on the network share that is not available by the time
12452 this property is read.
12453 </desc>
12454 </attribute>
12455
12456 <attribute name="writable" type="boolean" readonly="yes">
12457 <desc>
12458 Whether the folder defined by the host path is writable or
12459 not.
12460 </desc>
12461 </attribute>
12462
12463 <attribute name="lastAccessError" type="wstring" readonly="yes">
12464 <desc>
12465 Text message that represents the result of the last accessibility
12466 check.
12467
12468 Accessibility checks are performed each time the <link to="#accessible"/>
12469 attribute is read. An empty string is returned if the last
12470 accessibility check was successful. A non-empty string indicates a
12471 failure and should normally describe a reason of the failure (for
12472 example, a file read error).
12473 </desc>
12474 </attribute>
12475
12476 </interface>
12477
12478 <!--
12479 // ISession
12480 /////////////////////////////////////////////////////////////////////////
12481 -->
12482
12483 <interface
12484 name="IInternalSessionControl" extends="$unknown"
12485 uuid="f9aac6d0-41b3-46b7-bea4-6370b4036de6"
12486 internal="yes"
12487 wsmap="suppress"
12488 >
12489 <method name="getPID">
12490 <desc>PID of the process that has created this Session object.
12491 </desc>
12492 <param name="pid" type="unsigned long" dir="return"/>
12493 </method>
12494
12495 <method name="getRemoteConsole">
12496 <desc>
12497 Returns the console object suitable for remote control.
12498
12499 <result name="VBOX_E_INVALID_VM_STATE">
12500 Session state prevents operation.
12501 </result>
12502 <result name="VBOX_E_INVALID_OBJECT_STATE">
12503 Session type prevents operation.
12504 </result>
12505
12506 </desc>
12507 <param name="console" type="IConsole" dir="return"/>
12508 </method>
12509
12510 <method name="assignMachine">
12511 <desc>
12512 Assigns the machine object associated with this direct-type
12513 session or informs the session that it will be a remote one
12514 (if @a machine == @c null).
12515
12516 <result name="VBOX_E_INVALID_VM_STATE">
12517 Session state prevents operation.
12518 </result>
12519 <result name="VBOX_E_INVALID_OBJECT_STATE">
12520 Session type prevents operation.
12521 </result>
12522
12523 </desc>
12524 <param name="machine" type="IMachine" dir="in"/>
12525 </method>
12526
12527 <method name="assignRemoteMachine">
12528 <desc>
12529 Assigns the machine and the (remote) console object associated with
12530 this remote-type session.
12531
12532 <result name="VBOX_E_INVALID_VM_STATE">
12533 Session state prevents operation.
12534 </result>
12535
12536 </desc>
12537 <param name="machine" type="IMachine" dir="in"/>
12538 <param name="console" type="IConsole" dir="in"/>
12539 </method>
12540
12541 <method name="updateMachineState">
12542 <desc>
12543 Updates the machine state in the VM process.
12544 Must be called only in certain cases
12545 (see the method implementation).
12546
12547 <result name="VBOX_E_INVALID_VM_STATE">
12548 Session state prevents operation.
12549 </result>
12550 <result name="VBOX_E_INVALID_OBJECT_STATE">
12551 Session type prevents operation.
12552 </result>
12553
12554 </desc>
12555 <param name="aMachineState" type="MachineState" dir="in"/>
12556 </method>
12557
12558 <method name="uninitialize">
12559 <desc>
12560 Uninitializes (closes) this session. Used by VirtualBox to close
12561 the corresponding remote session when the direct session dies
12562 or gets closed.
12563
12564 <result name="VBOX_E_INVALID_VM_STATE">
12565 Session state prevents operation.
12566 </result>
12567
12568 </desc>
12569 </method>
12570
12571 <method name="onNetworkAdapterChange">
12572 <desc>
12573 Triggered when settings of a network adapter of the
12574 associated virtual machine have changed.
12575
12576 <result name="VBOX_E_INVALID_VM_STATE">
12577 Session state prevents operation.
12578 </result>
12579 <result name="VBOX_E_INVALID_OBJECT_STATE">
12580 Session type prevents operation.
12581 </result>
12582
12583 </desc>
12584 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12585 <param name="changeAdapter" type="boolean" dir="in"/>
12586 </method>
12587
12588 <method name="onSerialPortChange">
12589 <desc>
12590 Triggered when settings of a serial port of the
12591 associated virtual machine have changed.
12592
12593 <result name="VBOX_E_INVALID_VM_STATE">
12594 Session state prevents operation.
12595 </result>
12596 <result name="VBOX_E_INVALID_OBJECT_STATE">
12597 Session type prevents operation.
12598 </result>
12599
12600 </desc>
12601 <param name="serialPort" type="ISerialPort" dir="in"/>
12602 </method>
12603
12604 <method name="onParallelPortChange">
12605 <desc>
12606 Triggered when settings of a parallel port of the
12607 associated virtual machine have changed.
12608
12609 <result name="VBOX_E_INVALID_VM_STATE">
12610 Session state prevents operation.
12611 </result>
12612 <result name="VBOX_E_INVALID_OBJECT_STATE">
12613 Session type prevents operation.
12614 </result>
12615
12616 </desc>
12617 <param name="parallelPort" type="IParallelPort" dir="in"/>
12618 </method>
12619
12620 <method name="onStorageControllerChange">
12621 <desc>
12622 Triggered when settings of a storage controller of the
12623 associated virtual machine have changed.
12624
12625 <result name="VBOX_E_INVALID_VM_STATE">
12626 Session state prevents operation.
12627 </result>
12628 <result name="VBOX_E_INVALID_OBJECT_STATE">
12629 Session type prevents operation.
12630 </result>
12631
12632 </desc>
12633 </method>
12634
12635 <method name="onMediumChange">
12636 <desc>
12637 Triggered when attached media of the
12638 associated virtual machine have changed.
12639
12640 <result name="VBOX_E_INVALID_VM_STATE">
12641 Session state prevents operation.
12642 </result>
12643 <result name="VBOX_E_INVALID_OBJECT_STATE">
12644 Session type prevents operation.
12645 </result>
12646
12647 </desc>
12648
12649 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12650 <param name="force" type="boolean" dir="in"/>
12651 </method>
12652
12653 <method name="onVRDPServerChange">
12654 <desc>
12655 Triggered when settings of the VRDP server object of the
12656 associated virtual machine have changed.
12657
12658 <result name="VBOX_E_INVALID_VM_STATE">
12659 Session state prevents operation.
12660 </result>
12661 <result name="VBOX_E_INVALID_OBJECT_STATE">
12662 Session type prevents operation.
12663 </result>
12664
12665 </desc>
12666 </method>
12667
12668 <method name="onUSBControllerChange">
12669 <desc>
12670 Triggered when settings of the USB controller object of the
12671 associated virtual machine have changed.
12672
12673 <result name="VBOX_E_INVALID_VM_STATE">
12674 Session state prevents operation.
12675 </result>
12676 <result name="VBOX_E_INVALID_OBJECT_STATE">
12677 Session type prevents operation.
12678 </result>
12679
12680 </desc>
12681 </method>
12682
12683 <method name="onSharedFolderChange">
12684 <desc>
12685 Triggered when a permanent (global or machine) shared folder has been
12686 created or removed.
12687 <note>
12688 We don't pass shared folder parameters in this notification because
12689 the order in which parallel notifications are delivered is not defined,
12690 therefore it could happen that these parameters were outdated by the
12691 time of processing this notification.
12692 </note>
12693
12694 <result name="VBOX_E_INVALID_VM_STATE">
12695 Session state prevents operation.
12696 </result>
12697 <result name="VBOX_E_INVALID_OBJECT_STATE">
12698 Session type prevents operation.
12699 </result>
12700
12701 </desc>
12702 <param name="global" type="boolean" dir="in"/>
12703 </method>
12704
12705 <method name="onUSBDeviceAttach">
12706 <desc>
12707 Triggered when a request to capture a USB device (as a result
12708 of matched USB filters or direct call to
12709 <link to="IConsole::attachUSBDevice"/>) has completed.
12710 A @c null @a error object means success, otherwise it
12711 describes a failure.
12712
12713 <result name="VBOX_E_INVALID_VM_STATE">
12714 Session state prevents operation.
12715 </result>
12716 <result name="VBOX_E_INVALID_OBJECT_STATE">
12717 Session type prevents operation.
12718 </result>
12719
12720 </desc>
12721 <param name="device" type="IUSBDevice" dir="in"/>
12722 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12723 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12724 </method>
12725
12726 <method name="onUSBDeviceDetach">
12727 <desc>
12728 Triggered when a request to release the USB device (as a result
12729 of machine termination or direct call to
12730 <link to="IConsole::detachUSBDevice"/>) has completed.
12731 A @c null @a error object means success, otherwise it
12732 describes a failure.
12733
12734 <result name="VBOX_E_INVALID_VM_STATE">
12735 Session state prevents operation.
12736 </result>
12737 <result name="VBOX_E_INVALID_OBJECT_STATE">
12738 Session type prevents operation.
12739 </result>
12740
12741 </desc>
12742 <param name="id" type="uuid" mod="string" dir="in"/>
12743 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12744 </method>
12745
12746 <method name="onShowWindow">
12747 <desc>
12748 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12749 <link to="IMachine::showConsoleWindow"/> in order to notify
12750 console callbacks
12751 <link to="IConsoleCallback::onCanShowWindow"/>
12752 and <link to="IConsoleCallback::onShowWindow"/>.
12753
12754 <result name="VBOX_E_INVALID_OBJECT_STATE">
12755 Session type prevents operation.
12756 </result>
12757
12758 </desc>
12759 <param name="check" type="boolean" dir="in"/>
12760 <param name="canShow" type="boolean" dir="out"/>
12761 <param name="winId" type="unsigned long long" dir="out"/>
12762 </method>
12763
12764 <method name="accessGuestProperty">
12765 <desc>
12766 Called by <link to="IMachine::getGuestProperty"/> and by
12767 <link to="IMachine::setGuestProperty"/> in order to read and
12768 modify guest properties.
12769
12770 <result name="VBOX_E_INVALID_VM_STATE">
12771 Machine session is not open.
12772 </result>
12773 <result name="VBOX_E_INVALID_OBJECT_STATE">
12774 Session type is not direct.
12775 </result>
12776
12777 </desc>
12778 <param name="name" type="wstring" dir="in"/>
12779 <param name="value" type="wstring" dir="in"/>
12780 <param name="flags" type="wstring" dir="in"/>
12781 <param name="isSetter" type="boolean" dir="in"/>
12782 <param name="retValue" type="wstring" dir="out"/>
12783 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12784 <param name="retFlags" type="wstring" dir="out"/>
12785 </method>
12786
12787 <method name="enumerateGuestProperties">
12788 <desc>
12789 Return a list of the guest properties matching a set of patterns along
12790 with their values, time stamps and flags.
12791
12792 <result name="VBOX_E_INVALID_VM_STATE">
12793 Machine session is not open.
12794 </result>
12795 <result name="VBOX_E_INVALID_OBJECT_STATE">
12796 Session type is not direct.
12797 </result>
12798
12799 </desc>
12800 <param name="patterns" type="wstring" dir="in">
12801 <desc>
12802 The patterns to match the properties against as a comma-separated
12803 string. If this is empty, all properties currently set will be
12804 returned.
12805 </desc>
12806 </param>
12807 <param name="key" type="wstring" dir="out" safearray="yes">
12808 <desc>
12809 The key names of the properties returned.
12810 </desc>
12811 </param>
12812 <param name="value" type="wstring" dir="out" safearray="yes">
12813 <desc>
12814 The values of the properties returned. The array entries match the
12815 corresponding entries in the @a key array.
12816 </desc>
12817 </param>
12818 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12819 <desc>
12820 The time stamps of the properties returned. The array entries match
12821 the corresponding entries in the @a key array.
12822 </desc>
12823 </param>
12824 <param name="flags" type="wstring" dir="out" safearray="yes">
12825 <desc>
12826 The flags of the properties returned. The array entries match the
12827 corresponding entries in the @a key array.
12828 </desc>
12829 </param>
12830 </method>
12831
12832 </interface>
12833
12834 <interface
12835 name="ISession" extends="$dispatched"
12836 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12837 wsmap="managed"
12838 >
12839 <desc>
12840 The ISession interface represents a serialization primitive for virtual
12841 machines.
12842
12843 With VirtualBox, every time one wishes to manipulate a virtual machine
12844 (e.g. change its settings or start execution), a session object is
12845 required. Such an object must be passed to one of the session methods
12846 that open the given session, which then initiates the machine manipulation.
12847
12848 A session serves several purposes: it identifies to the inter-process VirtualBox
12849 code which process is currently working with the virtual machine, and it ensures
12850 that there are no incompatible requests from several processes for the
12851 same virtual machine. Session objects can therefore be thought of as mutex
12852 semaphores that lock virtual machines to prevent conflicting accesses from
12853 several processes.
12854
12855 How sessions objects are used depends on whether you use the Main API
12856 via COM or via the webservice:
12857
12858 <ul>
12859 <li>When using the COM API directly, an object of the Session class from the
12860 VirtualBox type library needs to be created. In regular COM C++ client code,
12861 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12862 This object will then act as a local session object in further calls to open
12863 a session.
12864 </li>
12865
12866 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12867 one session object automatically when <link to="IWebsessionManager::logon" />
12868 is called. A managed object reference to that session object can be retrieved by
12869 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12870 reference can then be used to open sessions.
12871 </li>
12872 </ul>
12873
12874 Sessions are mainly used in two variations:
12875
12876 <ul>
12877 <li>
12878 To start a virtual machine in a separate process, one would call
12879 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12880 object as its first parameter. This session then identifies the caller
12881 and lets him control the started machine (for example, pause machine
12882 execution or power it down) as well as be notified about machine
12883 execution state changes.
12884 </li>
12885
12886 <li>To alter machine settings, or to start machine execution within the
12887 current process, one needs to open a direct session for the machine first by
12888 calling <link to="IVirtualBox::openSession"/>. While a direct session
12889 is open within one process, no any other process may open another direct
12890 session for the same machine. This prevents the machine from being changed
12891 by other processes while it is running or while the machine is being configured.
12892 </li>
12893 </ul>
12894
12895 One also can attach to an existing direct session already opened by
12896 another process (for example, in order to send a control request to the
12897 virtual machine such as the pause or the reset request). This is done by
12898 calling <link to="IVirtualBox::openExistingSession"/>.
12899
12900 <note>
12901 Unless you are trying to write a new VirtualBox front-end that
12902 performs direct machine execution (like the VirtualBox or VBoxSDL
12903 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12904 session opened by <link to="IVirtualBox::openSession"/> and use this
12905 session only to change virtual machine settings. If you simply want to
12906 start virtual machine execution using one of the existing front-ends
12907 (for example the VirtualBox GUI or headless server), simply use
12908 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12909 will power up the machine automatically for you.
12910 </note>
12911 </desc>
12912
12913 <attribute name="state" type="SessionState" readonly="yes">
12914 <desc>Current state of this session.</desc>
12915 </attribute>
12916
12917 <attribute name="type" type="SessionType" readonly="yes">
12918 <desc>
12919 Type of this session. The value of this attribute is valid only
12920 if the session is currently open (i.e. its #state is
12921 SessionType_SessionOpen), otherwise an error will be returned.
12922 </desc>
12923 </attribute>
12924
12925 <attribute name="machine" type="IMachine" readonly="yes">
12926 <desc>Machine object associated with this session.</desc>
12927 </attribute>
12928
12929 <attribute name="console" type="IConsole" readonly="yes">
12930 <desc>Console object associated with this session.</desc>
12931 </attribute>
12932
12933 <method name="close">
12934 <desc>
12935 Closes a session that was previously opened.
12936
12937 It is recommended that every time an "open session" method (such as
12938 <link to="IVirtualBox::openRemoteSession" /> or
12939 <link to="IVirtualBox::openSession" />) has been called to
12940 manipulate a virtual machine, the caller invoke
12941 ISession::close() when it's done doing so. Since sessions are
12942 serialization primitives much like ordinary mutexes, they are
12943 best used the same way: for each "open" call, there should be
12944 a matching "close" call, even when errors occur.
12945
12946 Otherwise, if a direct session for a machine opened with
12947 <link to="IVirtualBox::openSession"/> is not explicitly closed
12948 when the application terminates, the state of the machine will
12949 be set to <link to="MachineState_Aborted" /> on the server.
12950
12951 Generally, it is recommended to close all open sessions explicitly
12952 before terminating the application (regardless of the reason for
12953 the termination).
12954
12955 <note>
12956 Do not expect the session state (<link to="ISession::state" />
12957 to return to "Closed" immediately after you invoke
12958 ISession::close(), particularly if you have started a remote
12959 session to execute the VM in a new process. The session state will
12960 automatically return to "Closed" once the VM is no longer executing,
12961 which can of course take a very long time.
12962 </note>
12963
12964 <result name="E_UNEXPECTED">
12965 Session is not open.
12966 </result>
12967
12968 </desc>
12969 </method>
12970
12971 </interface>
12972
12973 <!--
12974 // IStorageController
12975 /////////////////////////////////////////////////////////////////////////
12976 -->
12977
12978 <enum
12979 name="StorageBus"
12980 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
12981 >
12982 <desc>
12983 The bus type of the storage controller (IDE, SATA, SCSI or Floppy);
12984 see <link to="IStorageController::bus" />.
12985 </desc>
12986 <const name="Null" value="0">
12987 <desc>@c null value. Never used by the API.</desc>
12988 </const>
12989 <const name="IDE" value="1"/>
12990 <const name="SATA" value="2"/>
12991 <const name="SCSI" value="3"/>
12992 <const name="Floppy" value="4"/>
12993 </enum>
12994
12995 <enum
12996 name="StorageControllerType"
12997 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
12998 >
12999 <desc>
13000 The exact variant of storage controller hardware presented
13001 to the guest; see <link to="IStorageController::controllerType" />.
13002 </desc>
13003
13004 <const name="Null" value="0">
13005 <desc>@c null value. Never used by the API.</desc>
13006 </const>
13007 <const name="LsiLogic" value="1">
13008 <desc>A SCSI controller of the LsiLogic variant.</desc>
13009 </const>
13010 <const name="BusLogic" value="2">
13011 <desc>A SCSI controller of the BusLogic variant.</desc>
13012 </const>
13013 <const name="IntelAhci" value="3">
13014 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
13015 </const>
13016 <const name="PIIX3" value="4">
13017 <desc>An IDE controller of the PIIX3 variant.</desc>
13018 </const>
13019 <const name="PIIX4" value="5">
13020 <desc>An IDE controller of the PIIX4 variant.</desc>
13021 </const>
13022 <const name="ICH6" value="6">
13023 <desc>An IDE controller of the ICH6 variant.</desc>
13024 </const>
13025 <const name="I82078" value="7">
13026 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
13027 </const>
13028 </enum>
13029
13030 <interface
13031 name="IStorageController" extends="$unknown"
13032 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
13033 wsmap="managed"
13034 >
13035 <desc>
13036 Represents a storage controller that is attached to a virtual machine
13037 (<link to="IMachine" />). Just as drives (hard disks, DVDs, FDs) are
13038 attached to storage controllers in a real computer, virtual drives
13039 (represented by <link to="IMediumAttachment" />) are attached to virtual
13040 storage controllers, represented by this interface.
13041
13042 As opposed to physical hardware, VirtualBox has a very generic concept
13043 of a storage controller, and for purposes of the Main API, all virtual
13044 storage is attached to virtual machines via instances of this interface.
13045 There are four types of such virtual storage controllers: IDE, SCSI, SATA
13046 and Floppy (see <link to="#bus" />). Depending on which of these four is
13047 used, certain sub-types may be available and can be selected in
13048 <link to="#controllerType" />.
13049
13050 Depending on these settings, the guest operating system might see
13051 significantly different virtual hardware.
13052 </desc>
13053
13054 <attribute name="name" type="wstring" readonly="yes">
13055 <desc>
13056 Name of the storage controller, as originally specified with
13057 <link to="IMachine::addStorageController" />. This then uniquely
13058 identifies this controller with other method calls such as
13059 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
13060 </desc>
13061 </attribute>
13062
13063 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
13064 <desc>
13065 Maximum number of devices which can be attached to one port.
13066 </desc>
13067 </attribute>
13068
13069 <attribute name="minPortCount" type="unsigned long" readonly="yes">
13070 <desc>
13071 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
13072 </desc>
13073 </attribute>
13074
13075 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
13076 <desc>
13077 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
13078 </desc>
13079 </attribute>
13080
13081 <attribute name="instance" type="unsigned long">
13082 <desc>
13083 The instance number of the device in the running VM.
13084 </desc>
13085 </attribute>
13086
13087 <attribute name="portCount" type="unsigned long">
13088 <desc>
13089 The number of currently usable ports on the controller.
13090 The minimum and maximum number of ports for one controller are
13091 stored in <link to="IStorageController::minPortCount"/>
13092 and <link to="IStorageController::maxPortCount"/>.
13093 </desc>
13094 </attribute>
13095
13096 <attribute name="bus" type="StorageBus" readonly="yes">
13097 <desc>
13098 The bus type of the storage controller (IDE, SATA, SCSI or Floppy).
13099 </desc>
13100 </attribute>
13101
13102 <attribute name="controllerType" type="StorageControllerType">
13103 <desc>
13104 The exact variant of storage controller hardware presented
13105 to the guest.
13106 Depending on this value, VirtualBox will provide a different
13107 virtual storage controller hardware to the guest.
13108 For SATA and floppy controllers, only one variant is available,
13109 but for IDE and SCSI, there are several.
13110
13111 For SCSI controllers, the default type is LsiLogic.
13112 </desc>
13113 </attribute>
13114
13115 <method name="GetIDEEmulationPort">
13116 <desc>
13117 Gets the corresponding port number which is emulated as an IDE device.
13118 Works only with SATA controllers.
13119
13120 <result name="E_INVALIDARG">
13121 The @a devicePosition is not in the range 0 to 3.
13122 </result>
13123 <result name="E_NOTIMPL">
13124 The storage controller type is not SATAIntelAhci.
13125 </result>
13126
13127 </desc>
13128 <param name="devicePosition" type="long" dir="in"/>
13129 <param name="portNumber" type="long" dir="return"/>
13130 </method>
13131
13132 <method name="SetIDEEmulationPort">
13133 <desc>
13134 Sets the port number which is emulated as an IDE device.
13135 Works only with SATA controllers.
13136
13137 <result name="E_INVALIDARG">
13138 The @a devicePosition is not in the range 0 to 3 or the
13139 @a portNumber is not in the range 0 to 29.
13140 </result>
13141 <result name="E_NOTIMPL">
13142 The storage controller type is not SATAIntelAhci.
13143 </result>
13144
13145 </desc>
13146 <param name="devicePosition" type="long" dir="in"/>
13147 <param name="portNumber" type="long" dir="in"/>
13148 </method>
13149
13150 </interface>
13151
13152<if target="wsdl">
13153
13154 <!--
13155 // IManagedObjectRef
13156 /////////////////////////////////////////////////////////////////////////
13157 -->
13158
13159 <interface
13160 name="IManagedObjectRef" extends="$unknown"
13161 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
13162 internal="yes"
13163 wsmap="managed"
13164 wscpp="hardcoded"
13165 >
13166 <desc>
13167 Managed object reference.
13168
13169 Only within the webservice, a managed object reference (which is really
13170 an opaque number) allows a webservice client to address an object
13171 that lives in the address space of the webservice server.
13172
13173 Behind each managed object reference, there is a COM object that lives
13174 in the webservice server's address space. The COM object is not freed
13175 until the managed object reference is released, either by an explicit
13176 call to <link to="IManagedObjectRef::release" /> or by logging off from
13177 the webservice (<link to="IWebsessionManager::logoff" />), which releases
13178 all objects created during the webservice session.
13179
13180 Whenever a method call of the VirtualBox API returns a COM object, the
13181 webservice representation of that method will instead return a
13182 managed object reference, which can then be used to invoke methods
13183 on that object.
13184 </desc>
13185
13186 <method name="getInterfaceName">
13187 <desc>
13188 Returns the name of the interface that this managed object represents,
13189 for example, "IMachine", as a string.
13190 </desc>
13191 <param name="return" type="wstring" dir="return"/>
13192 </method>
13193
13194 <method name="release">
13195 <desc>
13196 Releases this managed object reference and frees the resources that
13197 were allocated for it in the webservice server process. After calling
13198 this method, the identifier of the reference can no longer be used.
13199 </desc>
13200 </method>
13201
13202 </interface>
13203
13204 <!--
13205 // IWebsessionManager
13206 /////////////////////////////////////////////////////////////////////////
13207 -->
13208
13209 <interface
13210 name="IWebsessionManager" extends="$unknown"
13211 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
13212 internal="yes"
13213 wsmap="global"
13214 wscpp="hardcoded"
13215 >
13216 <desc>
13217 Websession manager. This provides essential services
13218 to webservice clients.
13219 </desc>
13220 <method name="logon">
13221 <desc>
13222 Logs a new client onto the webservice and returns a managed object reference to
13223 the IVirtualBox instance, which the client can then use as a basis to further
13224 queries, since all calls to the VirtualBox API are based on the IVirtualBox
13225 interface, in one way or the other.
13226 </desc>
13227 <param name="username" type="wstring" dir="in"/>
13228 <param name="password" type="wstring" dir="in"/>
13229 <param name="return" type="IVirtualBox" dir="return"/>
13230 </method>
13231
13232 <method name="getSessionObject">
13233 <desc>
13234 Returns a managed object reference to the internal ISession object that was created
13235 for this web service session when the client logged on.
13236
13237 <see>ISession</see>
13238 </desc>
13239 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13240 <param name="return" type="ISession" dir="return"/>
13241 </method>
13242
13243 <method name="logoff">
13244 <desc>
13245 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
13246 and destroys all resources associated with the session (most importantly, all
13247 managed objects created in the server while the session was active).
13248 </desc>
13249 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13250 </method>
13251
13252 </interface>
13253
13254</if>
13255
13256 <!--
13257 // IPerformanceCollector & friends
13258 /////////////////////////////////////////////////////////////////////////
13259 -->
13260
13261 <interface
13262 name="IPerformanceMetric" extends="$unknown"
13263 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
13264 >
13265 <desc>
13266 The IPerformanceMetric interface represents parameters of the given
13267 performance metric.
13268 </desc>
13269
13270 <attribute name="metricName" type="wstring" readonly="yes">
13271 <desc>
13272 Name of the metric.
13273 </desc>
13274 </attribute>
13275
13276 <attribute name="object" type="$unknown" readonly="yes">
13277 <desc>
13278 Object this metric belongs to.
13279 </desc>
13280 </attribute>
13281
13282 <attribute name="description" type="wstring" readonly="yes">
13283 <desc>
13284 Textual description of the metric.
13285 </desc>
13286 </attribute>
13287
13288 <attribute name="period" type="unsigned long" readonly="yes">
13289 <desc>
13290 Time interval between samples, measured in seconds.
13291 </desc>
13292 </attribute>
13293
13294 <attribute name="count" type="unsigned long" readonly="yes">
13295 <desc>
13296 Number of recent samples retained by the performance collector for this
13297 metric.
13298
13299 When the collected sample count exceeds this number, older samples
13300 are discarded.
13301 </desc>
13302 </attribute>
13303
13304 <attribute name="unit" type="wstring" readonly="yes">
13305 <desc>
13306 Unit of measurement.
13307 </desc>
13308 </attribute>
13309
13310 <attribute name="minimumValue" type="long" readonly="yes">
13311 <desc>
13312 Minimum possible value of this metric.
13313 </desc>
13314 </attribute>
13315
13316 <attribute name="maximumValue" type="long" readonly="yes">
13317 <desc>
13318 Maximum possible value of this metric.
13319 </desc>
13320 </attribute>
13321 </interface>
13322
13323 <interface
13324 name="IPerformanceCollector" extends="$unknown"
13325 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
13326 wsmap="managed"
13327 >
13328 <desc>
13329 The IPerformanceCollector interface represents a service that collects and
13330 stores performance metrics data.
13331
13332 Performance metrics are associated with objects of interfaces like IHost and
13333 IMachine. Each object has a distinct set of performance metrics.
13334 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
13335
13336 Metric data is collected at the specified intervals and is retained
13337 internally. The interval and the number of retained samples can be set
13338 with <link to="IPerformanceCollector::setupMetrics" />.
13339
13340 Metrics are organized hierarchically, with each level separated by a
13341 slash (/) character. Generally, the scheme for metric names is like this:
13342
13343 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
13344
13345 "Category/Metric" together form the base metric name. A base metric is the
13346 smallest unit for which a sampling interval and the number of retained
13347 samples can be set. Only base metrics can be enabled and disabled. All
13348 sub-metrics are collected when their base metric is collected.
13349 Collected values for any set of sub-metrics can be queried with
13350 <link to="IPerformanceCollector::queryMetricsData" />.
13351
13352 For example "CPU/Load/User:avg"
13353 metric name stands for the "CPU" category, "Load" metric, "User" submetric,
13354 "average" aggregate. An aggregate function is computed over all retained
13355 data. Valid aggregate functions are:
13356
13357 <ul>
13358 <li>avg -- average</li>
13359 <li>min -- minimum</li>
13360 <li>max -- maximum</li>
13361 </ul>
13362
13363 When setting up
13364 metric parameters, querying metric data, enabling or disabling metrics
13365 wildcards can be used in metric names to specify a subset of metrics. For
13366 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
13367 averages can be queried using <tt>*:avg</tt> and so on. To query metric
13368 values without aggregates <tt>*:</tt> can be used.
13369
13370 The valid names for base metrics are:
13371
13372 <ul>
13373 <li>CPU/Load</li>
13374 <li>CPU/MHz</li>
13375 <li>RAM/Usage</li>
13376 </ul>
13377
13378 The general sequence for collecting and retrieving the metrics is:
13379 <ul>
13380 <li>
13381 Obtain an instance of IPerformanceCollector with
13382 <link to="IVirtualBox::performanceCollector" />
13383 </li>
13384 <li>
13385 Allocate and populate an array with references to objects the metrics
13386 will be collected for. Use references to IHost and IMachine objects.
13387 </li>
13388 <li>
13389 Allocate and populate an array with base metric names the data will be
13390 collected for.
13391 </li>
13392 <li>
13393 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
13394 metric data will be collected and stored.
13395 </li>
13396 <li>
13397 Wait for the data to get collected.
13398 </li>
13399 <li>
13400 Allocate and populate an array with references to objects the metric
13401 values will be queried for. You can re-use the object array used for
13402 setting base metrics.
13403 </li>
13404 <li>
13405 Allocate and populate an array with metric names the data will be
13406 collected for. Note that metric names differ from base metric names.
13407 </li>
13408 <li>
13409 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
13410 have been collected so far are returned. Note that the values are still
13411 retained internally and data collection continues.
13412 </li>
13413 </ul>
13414
13415 For an example of usage refer to the following files in VirtualBox SDK:
13416 <ul>
13417 <li>
13418 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13419 </li>
13420 <li>
13421 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13422 </li>
13423 </ul>
13424 </desc>
13425
13426 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13427 <desc>
13428 Array of unique names of metrics.
13429
13430 This array represents all metrics supported by the performance
13431 collector. Individual objects do not necessarily support all of them.
13432 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13433 list of supported metrics for a particular object.
13434 </desc>
13435 </attribute>
13436
13437 <method name="getMetrics">
13438 <desc>
13439 Returns parameters of specified metrics for a set of objects.
13440 <note>
13441 @c Null metrics array means all metrics. @c Null object array means
13442 all existing objects.
13443 </note>
13444 </desc>
13445 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13446 <desc>
13447 Metric name filter. Currently, only a comma-separated list of metrics
13448 is supported.
13449 </desc>
13450 </param>
13451 <param name="objects" type="$unknown" dir="in" safearray="yes">
13452 <desc>
13453 Set of objects to return metric parameters for.
13454 </desc>
13455 </param>
13456 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13457 <desc>
13458 Array of returned metric parameters.
13459 </desc>
13460 </param>
13461 </method>
13462
13463 <method name="setupMetrics">
13464 <desc>
13465 Sets parameters of specified base metrics for a set of objects. Returns
13466 an array of <link to="IPerformanceMetric" /> describing the metrics have
13467 been affected.
13468 <note>
13469 @c Null or empty metric name array means all metrics. @c Null or empty
13470 object array means all existing objects. If metric name array contains
13471 a single element and object array contains many, the single metric
13472 name array element is applied to each object array element to form
13473 metric/object pairs.
13474 </note>
13475 </desc>
13476 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13477 <desc>
13478 Metric name filter. Comma-separated list of metrics with wildcard
13479 support.
13480 </desc>
13481 </param>
13482 <param name="objects" type="$unknown" dir="in" safearray="yes">
13483 <desc>
13484 Set of objects to setup metric parameters for.
13485 </desc>
13486 </param>
13487 <param name="period" type="unsigned long" dir="in">
13488 <desc>
13489 Time interval in seconds between two consecutive samples of performance
13490 data.
13491 </desc>
13492 </param>
13493 <param name="count" type="unsigned long" dir="in">
13494 <desc>
13495 Number of samples to retain in performance data history. Older samples
13496 get discarded.
13497 </desc>
13498 </param>
13499 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13500 <desc>
13501 Array of metrics that have been modified by the call to this method.
13502 </desc>
13503 </param>
13504 </method>
13505
13506 <method name="enableMetrics">
13507 <desc>
13508 Turns on collecting specified base metrics. Returns an array of
13509 <link to="IPerformanceMetric" /> describing the metrics have been
13510 affected.
13511 <note>
13512 @c Null or empty metric name array means all metrics. @c Null or empty
13513 object array means all existing objects. If metric name array contains
13514 a single element and object array contains many, the single metric
13515 name array element is applied to each object array element to form
13516 metric/object pairs.
13517 </note>
13518 </desc>
13519 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13520 <desc>
13521 Metric name filter. Comma-separated list of metrics with wildcard
13522 support.
13523 </desc>
13524 </param>
13525 <param name="objects" type="$unknown" dir="in" safearray="yes">
13526 <desc>
13527 Set of objects to enable metrics for.
13528 </desc>
13529 </param>
13530 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13531 <desc>
13532 Array of metrics that have been modified by the call to this method.
13533 </desc>
13534 </param>
13535 </method>
13536
13537 <method name="disableMetrics">
13538 <desc>
13539 Turns off collecting specified base metrics. Returns an array of
13540 <link to="IPerformanceMetric" /> describing the metrics have been
13541 affected.
13542 <note>
13543 @c Null or empty metric name array means all metrics. @c Null or empty
13544 object array means all existing objects. If metric name array contains
13545 a single element and object array contains many, the single metric
13546 name array element is applied to each object array element to form
13547 metric/object pairs.
13548 </note>
13549 </desc>
13550 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13551 <desc>
13552 Metric name filter. Comma-separated list of metrics with wildcard
13553 support.
13554 </desc>
13555 </param>
13556 <param name="objects" type="$unknown" dir="in" safearray="yes">
13557 <desc>
13558 Set of objects to disable metrics for.
13559 </desc>
13560 </param>
13561 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13562 <desc>
13563 Array of metrics that have been modified by the call to this method.
13564 </desc>
13565 </param>
13566 </method>
13567
13568 <method name="queryMetricsData">
13569 <desc>
13570 Queries collected metrics data for a set of objects.
13571
13572 The data itself and related metric information are returned in seven
13573 parallel and one flattened array of arrays. Elements of
13574 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13575 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13576 the same index describe one set of values corresponding to a single
13577 metric.
13578
13579 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13580 start and length of a sub-array is indicated by
13581 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13582 value for metric <tt>metricNames[i]</tt> is at
13583 <tt>returnData[returnIndices[i]]</tt>.
13584
13585 <note>
13586 @c Null or empty metric name array means all metrics. @c Null or empty
13587 object array means all existing objects. If metric name array contains
13588 a single element and object array contains many, the single metric
13589 name array element is applied to each object array element to form
13590 metric/object pairs.
13591 </note>
13592 <note>
13593 Data collection continues behind the scenes after call to
13594 @c queryMetricsData. The return data can be seen as the snapshot of
13595 the current state at the time of @c queryMetricsData call. The
13596 internally kept metric values are not cleared by the call. This makes
13597 possible querying different subsets of metrics or aggregates with
13598 subsequent calls. If periodic querying is needed it is highly
13599 suggested to query the values with @c interval*count period to avoid
13600 confusion. This way a completely new set of data values will be
13601 provided by each query.
13602 </note>
13603 </desc>
13604 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13605 <desc>
13606 Metric name filter. Comma-separated list of metrics with wildcard
13607 support.
13608 </desc>
13609 </param>
13610 <param name="objects" type="$unknown" dir="in" safearray="yes">
13611 <desc>
13612 Set of objects to query metrics for.
13613 </desc>
13614 </param>
13615 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13616 <desc>
13617 Names of metrics returned in @c returnData.
13618 </desc>
13619 </param>
13620 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13621 <desc>
13622 Objects associated with metrics returned in @c returnData.
13623 </desc>
13624 </param>
13625 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13626 <desc>
13627 Units of measurement for each returned metric.
13628 </desc>
13629 </param>
13630 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13631 <desc>
13632 Divisor that should be applied to return values in order to get
13633 floating point values. For example:
13634 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13635 will retrieve the floating point value of i-th sample of the first
13636 metric.
13637 </desc>
13638 </param>
13639 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13640 <desc>
13641 Sequence numbers of the first elements of value sequences of particular metrics
13642 returned in @c returnData. For aggregate metrics it is the sequence number of
13643 the sample the aggregate started calculation from.
13644 </desc>
13645 </param>
13646 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13647 <desc>
13648 Indices of the first elements of value sequences of particular metrics
13649 returned in @c returnData.
13650 </desc>
13651 </param>
13652 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13653 <desc>
13654 Lengths of value sequences of particular metrics.
13655 </desc>
13656 </param>
13657 <param name="returnData" type="long" dir="return" safearray="yes">
13658 <desc>
13659 Flattened array of all metric data containing sequences of values for
13660 each metric.
13661 </desc>
13662 </param>
13663 </method>
13664
13665 </interface>
13666
13667 <module name="VBoxSVC" context="LocalServer">
13668 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13669 namespace="virtualbox.org">
13670 <interface name="IVirtualBox" default="yes"/>
13671 </class>
13672 </module>
13673
13674 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13675 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
13676 namespace="virtualbox.org">
13677 <interface name="ISession" default="yes"/>
13678 </class>
13679 <class name="CallbackWrapper" uuid="49EE8561-5563-4715-B18C-A4B1A490DAFE"
13680 namespace="virtualbox.org">
13681 <interface name="ILocalOwner" default="yes"/>
13682 <interface name="IVirtualBoxCallback"/>
13683 <interface name="IConsoleCallback"/>
13684 </class>
13685 </module>
13686
13687</library>
13688
13689</idl>
13690
13691<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette